| | |
| | | result.setStartNum(workorderExtMapper.selectCount(param)); |
| | | param.setStatusList(new ArrayList<>()); |
| | | param.getStatusList().add(Constants.WORKORDER_STATUS.done); |
| | | param.getStatusList().add(Constants.WORKORDER_STATUS.producing); |
| | | param.getStatusList().add(Constants.WORKORDER_STATUS.check); |
| | | //进行中数量 |
| | | result.setIngNum(workorderExtMapper.selectCount(param)); |
| | |
| | | rParam.setPlanId(pageWrap.getId()); |
| | | rParam.setDeleted(Constants.ZERO); |
| | | //已完工数量 |
| | | plan.setDoneNum(0); |
| | | // plan.setDoneNum(0); |
| | | //已分配数量 |
| | | plan.setDistributNum(0); |
| | | //查询全部投料和产出 |
| | |
| | | tModle.setProUserName(w.getProUserName()); |
| | | tModle.setProUserName(w.getProUserName()); |
| | | tModle.setCreateUser(w.getCreateUser()); |
| | | tModle.setCreateUserName(w.getCreateUserName()); |
| | | if(w.getProUserId()!=null){ |
| | | //查询班组信息 |
| | | QueryCompanyUserExtDTO queryCompanyUserExtDTO = new QueryCompanyUserExtDTO(); |
| | |
| | | * @param param |
| | | */ |
| | | @Override |
| | | @Async |
| | | // @Async |
| | | public void statisticNum(Workorder param){ |
| | | if(param.getPlanId()== null){ |
| | | if(param.getId()== null){ |
| | |
| | | && item.getOmodel()!=null |
| | | && (Constants.equalsInteger(item.getOmodel().getStatus() ,Constants.WORKORDER_STATUS.baogong) |
| | | ||Constants.equalsInteger(item.getOmodel().getStatus() ,Constants.WORKORDER_STATUS.instock))){ |
| | | //如果是产出 |
| | | if(Constants.equalsInteger(item.getDoneType(),Constants.ZERO)){ |
| | | //如果是合格产出,累计数量 |
| | | qulifiedNum += Constants.formatBigdecimal(item.getNum()).intValue(); |
| | | }else{ |
| | | //如果是不良产出,累计数量 |
| | | unqulifiedNum += Constants.formatBigdecimal(item.getNum()).intValue(); |
| | | } |
| | | //如果是合格产出,累计数量 |
| | | qulifiedNum += Constants.formatBigdecimal(BigDecimal.valueOf(item.getQualifiedNum())).intValue(); |
| | | //如果是不良产出,累计数量 |
| | | unqulifiedNum += Constants.formatBigdecimal(BigDecimal.valueOf(item.getUnqualifiedNum())).intValue(); |
| | | } |
| | | } |
| | | } |
| | |
| | | if(!Objects.isNull(plan.getWorkPlansId())){ |
| | | //更新主订单数据信息 |
| | | if(plansMapper.selectCount(new QueryWrapper<Plans>() |
| | | .in("STATUS",0,1,4) |
| | | .in("STATUS",0,1,4,5) |
| | | .eq("DELETED",Constants.ZERO) |
| | | .ne("id",p.getId()) |
| | | .eq("WORK_PLANS_ID",plan.getWorkPlansId()))<=Constants.ZERO){ |