张晓波
2023-12-12 766effa6e04db9b37b1dc3886d988beaa595c38d
hd/pipe/mobile/src/main/java/com/thhy/mobile/modules/biz/mouldcheck/service/impl/ModCheckServiceImpl.java
@@ -17,6 +17,7 @@
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;
@@ -141,6 +142,10 @@
                        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));
                            //更新模具循环次数
@@ -154,12 +159,12 @@
                            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()));
@@ -214,7 +219,7 @@
            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());
        });*/
@@ -233,7 +238,7 @@
        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));
@@ -291,6 +296,8 @@
        }*/
    }
    @Override
    public List<MouldCheckListVo> findModCheckList(ModCheckDto modCheckDto) {
        SysUserInfo userInfo = UserInfoUtils.getInstance().getUserInfo();
@@ -339,4 +346,8 @@
        return mouldMapper.getH5MouldInfo(mouldId);
    }
    @Override
    public List<Integer> allNumType() {
        return pipeInfoMapper.queryAllNumType();
    }
}