| | |
| | | import com.thhy.mobile.modules.biz.pipeinfo.entity.MaterialInfo; |
| | | import com.thhy.mobile.modules.biz.pipeinfo.entity.PipeInfo; |
| | | import com.thhy.mobile.modules.biz.pipeinfo.mapper.PipeInfoMapper; |
| | | import com.thhy.mobile.modules.biz.steelcheck.entity.SteelStockRecord; |
| | | import com.thhy.mobile.modules.biz.steelproduce.entity.ProduceDto; |
| | | import com.thhy.mobile.modules.biz.steelproduce.entity.SteelProduce; |
| | | import com.thhy.mobile.modules.biz.steelproduce.mapper.SteelProduceMapper; |
| | |
| | | if(compareResult){//匹配成功 |
| | | //更改钢筋笼产品入模状态 |
| | | steelProduceMapper.updateisModel(new ProduceDto(1,modCheckDto.getProduceNumber())); |
| | | //钢筋笼库存记录 |
| | | SteelStockRecord steelStockRecord = new SteelStockRecord(steelProduce,true); |
| | | steelStockRecord.setModCheckId(mouldCheck.getModCheckId()); |
| | | steelStockMapper.insertSteelStockRecord(steelStockRecord); |
| | | //减掉钢筋笼库存 |
| | | steelStockMapper.updateMinusStock(new SteelStock(steelProduce)); |
| | | //更新模具循环次数 |
| | |
| | | pipeInfo.setOutMod(PipeOutModType.IN.getValue()); //入模 |
| | | pipeInfo.setPipeNum(UUIDUtils.createPipeNum(proNumber,countPipeInPro)); |
| | | //pipeInfo.setRingNum(); |
| | | RingCompleteCheck completeCheck = pipeInfoMapper.queryRingComplete(pipeInfo); |
| | | if(completeCheck==null){ |
| | | List<RingCompleteCheck> completeCheckList = pipeInfoMapper.queryRingCompleteByMod(mould.getMouldNum(),pipeInfo.getProId()); |
| | | if(completeCheckList.isEmpty()){ |
| | | int maxRingNum = pipeInfoMapper.queryMaxRingNum(userInfo.getCompanyId()); |
| | | pipeInfo.setRingNum(UUIDUtils.createRingNum(maxRingNum)); |
| | | }else { |
| | | pipeInfo.setRingNum(completeCheck.getRingnum()); |
| | | pipeInfo.setRingNum(completeCheckList.get(0).getRingnum()); |
| | | } |
| | | pipeInfoMapper.insert(pipeInfo); |
| | | pipeInfoMapper.updateSysMouldFree(new MouldFree(pipeInfo.getModId(), MouldFreeType.AL_USE.getValue())); |
| | |
| | | String proId = modCheckDto.getProId(); |
| | | |
| | | try { |
| | | if(ringNum.length()>5){ |
| | | if(ringNum.length()>4){ |
| | | throw new BasicException(BasicStatus.RING_NOT_DIS); |
| | | } |
| | | Integer.parseInt(ringNum); |
| | |
| | | throw new BasicException(BasicStatus.RING_NOT_DIS); |
| | | } |
| | | |
| | | String newRingNum = UUIDUtils.addZeroNoPlus(Integer.parseInt(ringNum),5); |
| | | String newRingNum = UUIDUtils.addZeroNoPlus(Integer.parseInt(ringNum),4); |
| | | |
| | | int count = pipeInfoMapper.countByRingNum(newRingNum); |
| | | if(count>0){ |
| | | throw new BasicException(BasicStatus.RING_NUM_IS_REPEAT); |
| | | } |
| | | |
| | | List<Mould> mouldList = pipeInfoMapper.queryMouldTypeByPro(proId); |
| | | List<Mould> mouldList = pipeInfoMapper.queryMouldByNumType(proId,modCheckDto.getNumType()); |
| | | /*mouldList.forEach(ml->{ |
| | | ml = mouldMapper.queryById(ml.getMouldId()); |
| | | });*/ |
| | |
| | | steelProduce.setReinforcementId("02d336f47ea0eff7ec70c64f"); //配筋写死值 |
| | | |
| | | for(Mould m : mouldList){ |
| | | m = mouldMapper.queryById(m.getMouldId()); |
| | | //m = mouldMapper.queryById(m.getMouldId()); |
| | | String proNumber = steelProduceMapper.queryProNumByProject(proId); |
| | | int maxSteelNum = pipeInfoMapper.queryMaxNumBySteelProduce(); |
| | | steelProduce.setProduceNumber(UUIDUtils.createSteelNum(proNumber,maxSteelNum)); |
| | |
| | | }*/ |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public List<MouldCheckListVo> findModCheckList(ModCheckDto modCheckDto) { |
| | | SysUserInfo userInfo = UserInfoUtils.getInstance().getUserInfo(); |
| | |
| | | return mouldMapper.getH5MouldInfo(mouldId); |
| | | } |
| | | |
| | | @Override |
| | | public List<Integer> allNumType() { |
| | | return pipeInfoMapper.queryAllNumType(); |
| | | } |
| | | } |