| | |
| | | <script setup> |
| | | import { RouterLink, RouterView } from 'vue-router' |
| | | |
| | | import AppLayout from './components/AppLayout.vue' |
| | | </script> |
| | | |
| | | <template> |
| | | <AppLayout /> |
| | | <<<<<<< HEAD |
| | | |
| | | ======= |
| | | >>>>>>> 5103535bcd7b012c0eda4cbb26968066b35704d1 |
| | | </template> |
| | | |
| | | <style scoped> |
| | | header { |
| | | line-height: 1.5; |
| | | max-height: 100vh; |
| | | } |
| | | |
| | | .logo { |
| | | display: block; |
| | | margin: 0 auto 2rem; |
| | | } |
| | | |
| | | nav { |
| | | width: 100%; |
| | | font-size: 12px; |
| | | text-align: center; |
| | | margin-top: 2rem; |
| | | } |
| | | |
| | | nav a.router-link-exact-active { |
| | | color: var(--color-text); |
| | | } |
| | | |
| | | nav a.router-link-exact-active:hover { |
| | | background-color: transparent; |
| | | } |
| | | |
| | | nav a { |
| | | display: inline-block; |
| | | padding: 0 1rem; |
| | | border-left: 1px solid var(--color-border); |
| | | } |
| | | |
| | | nav a:first-of-type { |
| | | border: 0; |
| | | } |
| | | |
| | | @media (min-width: 1024px) { |
| | | header { |
| | | display: flex; |
| | | place-items: center; |
| | | padding-right: calc(var(--section-gap) / 2); |
| | | } |
| | | |
| | | .logo { |
| | | margin: 0 2rem 0 0; |
| | | } |
| | | |
| | | header .wrapper { |
| | | display: flex; |
| | | place-items: flex-start; |
| | | flex-wrap: wrap; |
| | | } |
| | | |
| | | nav { |
| | | text-align: left; |
| | | margin-left: -1rem; |
| | | font-size: 1rem; |
| | | |
| | | padding: 1rem 0; |
| | | margin-top: 1rem; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | @import './base.css'; |
| | | |
| | | #app { |
| | | max-width: 1280px; |
| | | margin: 0 auto; |
| | | padding: 2rem; |
| | | |
| | | height: 100vh; |
| | | font-weight: normal; |
| | | } |
| | | |
| | | a, |
| | | .green { |
| | | text-decoration: none; |
| | | color: hsla(160, 100%, 37%, 1); |
| | | transition: 0.4s; |
| | | } |
| | | |
| | | @media (hover: hover) { |
| | | a:hover { |
| | | background-color: hsla(160, 100%, 37%, 0.2); |
| | | } |
| | | } |
| | | |
| | | @media (min-width: 1024px) { |
| | | body { |
| | | display: flex; |
| | | place-items: center; |
| | | } |
| | | |
| | | #app { |
| | | display: grid; |
| | | grid-template-columns: 1fr 1fr; |
| | | padding: 0 2rem; |
| | | } |
| | | } |
| | |
| | | <template> |
| | | <div class="content"> |
| | | <div class="header"> |
| | | <div class="header-item" style="font-size: 20px;">豆米科技</div> |
| | | <div class="title">DM云工厂车间大屏</div> |
| | | <div class="header-item">天气</div> |
| | | </div> |
| | | |
| | | <div class="num-list"> |
| | | |
| | | </div> |
| | | <RouterView /> |
| | | </div> |
| | | </template> |
| | | |
| | | |
| | | <script setup> |
| | | |
| | | import { reactive } from 'vue'; |
| | | import { RouterView } from 'vue-router' |
| | | |
| | | const layoutList = [ |
| | | { bgImg: requir('@/assets/img/bg_zhixingzhong@2x.png'), name: '执行中计划数(个)', logo: requir('@/assets/img') } |
| | | ] |
| | | |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .content { |
| | | background-image: url('@/assets/img/bg@2x.png'); |
| | | background-position: center; |
| | | background-size: 100% 100%; |
| | | background-repeat: no-repeat; |
| | | width: 100%; |
| | | height: 100%; |
| | | padding: 30px; |
| | | box-sizing: border-box; |
| | | .header { |
| | | background-image: url('@/assets/img/bg_maintitle@2x.png'); |
| | | background-size: 100% 74px; |
| | | width: 100%; |
| | | height: 74px; |
| | | display: flex; |
| | | padding-top: 1px; |
| | | justify-content: space-between; |
| | | color: #fff; |
| | | .header-item { |
| | | width: 200px; |
| | | } |
| | | .title { |
| | | margin-top: 15px; |
| | | font-size: 25px; |
| | | font-weight: 500; |
| | | text-shadow: 0px 2px 17px rgba(0,0,0,0.32); |
| | | line-height: 25px; |
| | | text-align: center; |
| | | } |
| | | } |
| | | .num-list { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | public ApiResponse<List<ProcedureProcessModel>> getProcedureProcessList (@PathVariable Integer companyId, @PathVariable Integer departId ) { |
| | | return ApiResponse.success(statisticsService.getProcedureProcessList(companyId,departId)); |
| | | } |
| | | @ApiOperation("成品计划-实时仓库余量统计") |
| | | @GetMapping("/getStockList/{companyId}/{departId}") |
| | | public ApiResponse<List<StockDataModel>> getStockList (@PathVariable Integer companyId, @PathVariable Integer departId ) { |
| | | return ApiResponse.success(statisticsService.getStockList(companyId,departId)); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | @Data |
| | | @ApiModel("大屏数据看板-库存实时余量统计返回数据") |
| | | /** |
| | | * 执行中计划数:统计范围为:成品计划;状态为【执行中】; |
| | | * 延期计划数:统计范围为:成品计划;状态为【执行中】且当前时间大于计划结束时间; |
| | | * 今日生产人数:根据今日投料/产出记录表数据,统计今日的生产人数(去重);统计范围为工单状态为【已创建、已备料、生产中、已检验、已完工检、已报工】; |
| | | * 今日生产设备:根据今日投料/产出记录表关联的工单数据,统计今日的生产设备数(去重);统计范围为工单状态为【已创建、已备料、生产中、已检验、已完工检、已报工】; |
| | | * 今日不良品率:根据今日产出记录表数据,统计今日产出不良数/今日产出总数量*100%;统计范围为工单状态为【已报工】; |
| | | * 展示仓库的实时余量情况(拉取全部数据);按照【物料+仓库+批次号】汇总方式;(即PC端库存查询默认列表数据); |
| | | * 不滚动,支持上下滚动查看其他数据; |
| | | */ |
| | | public class StockDataModel { |
| | | @ApiModelProperty(value = "执行中计划数", example = "1") |
| | | private Integer ingNum; |
| | | @ApiModelProperty(value = "延期计划数", example = "1") |
| | | private Integer delayNum; |
| | | @ApiModelProperty(value = "今日生产人数", example = "1") |
| | | private Integer prouserNum; |
| | | @ApiModelProperty(value = "今日生产设备数", example = "1") |
| | | private Integer deviceNum; |
| | | @ApiModelProperty(value = "今日不良品率", example = "1") |
| | | private BigDecimal unqualifiedRate; |
| | | @ApiModelProperty(value = "今日不良品数", example = "1",hidden = true) |
| | | private BigDecimal unqualifiedNum; |
| | | @ApiModelProperty(value = "今日报工数", example = "1",hidden = true) |
| | | private BigDecimal doneNUm; |
| | | @ApiModelProperty(value = "物料名称", example = "1") |
| | | private String materialName; |
| | | @ApiModelProperty(value = "工序名称", example = "1") |
| | | private String procedureName; |
| | | @ApiModelProperty(value = "仓库名称", example = "1") |
| | | private String warehouseName; |
| | | @ApiModelProperty(value = "货架名称", example = "1") |
| | | private String location; |
| | | @ApiModelProperty(value = "数量", example = "1") |
| | | private BigDecimal num; |
| | | @ApiModelProperty(value = "单位") |
| | | private String unitName; |
| | | } |
| | |
| | | package doumeemes.dao.ext; |
| | | |
| | | import doumeemes.dao.business.dto.statistics.StockDataModel; |
| | | import doumeemes.dao.business.model.WStock; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import doumeemes.dao.ext.beanDto.QueryWStockDto; |
| | |
| | | List<WStockExtListVO> selectAdminListForH5(QueryWStockDto dto); |
| | | |
| | | List<WStockExtListVO> choiceStockPageByTransfer(QueryWStockHeadNewDTO dto); |
| | | |
| | | List<StockDataModel> getStatisticsStockList(QueryWStockExtDTO param); |
| | | } |
| | |
| | | List<WorkPlansPageModel> getWorkPlansList(Integer companyId, Integer departId); |
| | | |
| | | List<ProcedureProcessModel> getProcedureProcessList(Integer companyId, Integer departId); |
| | | List<StockDataModel> getStockList(Integer companyId, Integer departId); |
| | | } |
| | |
| | | @Autowired |
| | | private PlansExtMapper plansExtMapper; |
| | | @Autowired |
| | | private WStockExtMapper stockExtMapper; |
| | | @Autowired |
| | | private WorkorderRecordExtMapper workorderRecordExtMapper; |
| | | @Autowired |
| | | private DepartmentExtService departmentExtService; |
| | |
| | | return result; |
| | | } |
| | | @Override |
| | | public List<StockDataModel> getStockList(Integer companyId, Integer departId){ |
| | | DepartmentExtListVO department = departmentExtService.getModelById(companyId,departId); |
| | | if(department == null || Constants.equalsInteger(department.getDeleted(), Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对不起,企业或者部门信息不合法,如有疑问,请联系系统管理员"); |
| | | } |
| | | QueryWStockExtDTO param = new QueryWStockExtDTO(); |
| | | param.setRootDepartId(department.getRootId()); |
| | | param.setWmodelDepartId(departId); |
| | | //查询统计结果 |
| | | List<StockDataModel> result = stockExtMapper.getStatisticsStockList(param); |
| | | return result; |
| | | } |
| | | @Override |
| | | public List<Unqualified7DayModel> getUnqualified7DayData(Integer companyId, Integer departId, Integer procedureId) { |
| | | DepartmentExtListVO department = departmentExtService.getModelById(companyId,departId); |
| | | if(department == null || Constants.equalsInteger(department.getDeleted(), Constants.ONE)){ |
| | |
| | | <result column="WMODEL_ADDR" jdbcType="VARCHAR" property="addr"/> |
| | | </association> |
| | | </resultMap> |
| | | <select id="getStatisticsStockList" parameterType="doumeemes.dao.ext.dto.QueryWStockExtDTO" resultType="doumeemes.dao.business.dto.statistics.StockDataModel"> |
| | | select sum(a.NUM) as num,c.`NAME` as materialName,d.name as warehouseName,f.UNION_NAME as location,u.name as unitName |
| | | from w_stock a |
| | | left join material_distribute b on a.MATERIAL_ID=b.ID |
| | | left join material c on b.MATERIAL_ID=c.ID |
| | | left join warehouse d on a.WAREHOUSE_ID=d.ID |
| | | left join warehouse_location f on a.LOCATION_ID=f.ID |
| | | left join unit u on a.UNIT_ID=u.id |
| | | where a.DELETED = 0 AND a.ROOT_DEPART_ID = #{rootDepartId} AND d.DEPART_ID=#{wmodelDepartId} |
| | | GROUP BY a.MATERIAL_ID,a.WAREHOUSE_ID,a.BATCH |
| | | ORDER BY num DESC |
| | | </select> |
| | | <select id="selectAllList" parameterType="doumeemes.dao.ext.dto.QueryWStockExtDTO" resultMap="WStockExtListVO"> |
| | | SELECT a.* |
| | | FROM w_stock a |