| | |
| | | order.setUrgent(mp.getUrgent()); |
| | | order.setFactoryId(mp.getFactoryId()); |
| | | order.setBackorderId(mp.getBackorderId()); |
| | | order.setUnqualifiedNum(param.getUnqualifiedNum()); |
| | | order.setQualifiedNum(param.getQualifiedNum()); |
| | | order.setOriginId(systemDictDataBiz.queryByCode(Constants.WORKORDER_SOURCE,Constants.WORKORDER_SOURCE_PLAN).getId()); |
| | | //工单编码 |
| | | order.setCode(workorderExtService.getNextCode(user.getCompany().getId())); |
| | |
| | | param.setProUserList(autoWorkReportDTO.getProUserList()); |
| | | param.setPlanNum(num.intValue()); |
| | | //生成工单信息 |
| | | param.setUnqualifiedNum(autoWorkReportDTO.getCreateWorkorderRecordDTO().getUnQualifiedNum().intValue()); |
| | | param.setQualifiedNum(autoWorkReportDTO.getCreateWorkorderRecordDTO().getQualifiedNum().intValue()); |
| | | Workorder workorder = this.distributeDone(user,param,num.intValue()); |
| | | //工单投料记录 |
| | | CreateMaterialDTO createMaterialDTO = new CreateMaterialDTO(); |
| | |
| | | * @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){ |
| | |
| | | if (bomDetailList == null || bomDetailList.size() == 0) { |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "对不起,该生产物料的bom配置有误,请联系管理员!"); |
| | | } |
| | | // for (BomDetailExtListVO i :bomDetailList) { |
| | | // //查询是否投料 |
| | | // if(workorderRecordExtMapper.selectCount(new QueryWrapper<WorkorderRecord>() |
| | | // .eq("DELETED",Constants.ZERO).eq("MATERIAL_ID",i.getMaterialId()).eq("TYPE",Constants.ZERO))<=0){ |
| | | // throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"存在未投料BOM物料,无法进行报工"); |
| | | // } |
| | | // } |
| | | for (BomDetailExtListVO i :bomDetailList) { |
| | | //查询是否投料 |
| | | if(workorderRecordExtMapper.selectCount(new QueryWrapper<WorkorderRecord>() |
| | | .eq("WORKORDER_ID",mp.getId()) |
| | | .eq("DELETED",Constants.ZERO).eq("MATERIAL_ID",i.getMaterialId()).eq("TYPE",Constants.ZERO))<=0){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"存在未投料BOM物料,无法进行报工"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | WOutbound outbound = new WOutbound(); |
| | |
| | | import doumeemes.core.utils.Constants; |
| | | import doumeemes.core.utils.HttpsUtil; |
| | | import doumeemes.core.utils.Utils; |
| | | import doumeemes.dao.business.model.Company; |
| | | import doumeemes.dao.business.model.CompanyUser; |
| | | import doumeemes.dao.business.model.Department; |
| | | import doumeemes.dao.ext.CompanyExtMapper; |
| | |
| | | |
| | | @Autowired |
| | | private SystemLoginLogService systemLoginLogService; |
| | | @Autowired |
| | | private CompanyExtMapper companyExtMapper; |
| | | |
| | | |
| | | /** |
| | |
| | | if(Objects.isNull(department)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询到绑定部门信息"); |
| | | } |
| | | Company company = companyExtMapper.selectById(department.getCompanyId()); |
| | | if(Objects.isNull(company)||company.getStatus().equals(Constants.ONE)){ |
| | | wxLoginVO.setLoginStatus(Constants.ONE); |
| | | return wxLoginVO; |
| | | } |
| | | SystemUser systemUser = systemUserMapper.selectById(companyUser.getUserId()); |
| | | //查询用户数据 |
| | | LoginDTO dto = new LoginDTO(); |
| | |
| | | wxLoginVO.setLoginStatus(Constants.ZERO); |
| | | wxLoginVO.setSession(session); |
| | | return wxLoginVO; |
| | | }catch (BusinessException e) { |
| | | wxLoginVO.setLoginStatus(Constants.ONE); |
| | | return wxLoginVO; |
| | | }catch (AuthenticationException e) { |
| | | BusinessException ee = null; |
| | | loginLog.setSuccess(Boolean.FALSE); |
| | |
| | | <!-- AND #{endDate} >= `a`.`PLAN_DATE`--> |
| | | <!-- </if>--> |
| | | <if test="mixParam != null and mixParam!=''"> |
| | | AND (mmodel.name like concat('%',#{mixParam},'%') or mmodel.code like concat('%',#{mixParam},'%') or pmodel.name like concat('%',#{mixParam},'%')) |
| | | AND (mmodel.name like concat('%',#{mixParam},'%') or mmodel.code like concat('%',#{mixParam},'%') or pmodel.name like concat('%',#{mixParam},'%') or a.BATCH like concat('%',#{mixParam},'%') or w.SALESORDER like concat('%',#{mixParam},'%') ) |
| | | </if> |
| | | <if test="usermodelInvalidTime != null"> |
| | | AND `usermodel`.`INVALID_TIME` = #{usermodelInvalidTime} |