自动化立体仓库 - WMS系统
admin
2021-09-01 e84d4700e32dba450aa4d239779fc39f38ae4afa
src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
@@ -17,8 +17,10 @@
import com.zy.common.model.OutLocDto;
import com.zy.common.model.StartupDto;
import com.zy.common.service.CommonService;
import com.zy.ints.entity.IoComplete;
import com.zy.ints.entity.WaitMatchk;
import com.zy.ints.entity.WaitMatout;
import com.zy.ints.service.IoCompleteService;
import com.zy.ints.service.WaitMatchkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -63,9 +65,10 @@
    private WrkMastLogService wrkMastLogService;
    @Autowired
    private WrkDetlLogService wrkDetlLogService;
    @Autowired
    private WaitMatchkService waitMatchkService;
    @Autowired
    private IoCompleteService ioCompleteService;
    @Override
    @Transactional
@@ -530,6 +533,32 @@
        } else if (wrkMast.getWrkSts() > 10) {
            wrkMast.setWrkSts(14L);
        }
        //查询明细
        List<WrkDetl> detls = wrkDetlService.selectList(new EntityWrapper<WrkDetl>().eq("wrk_no", workNo));
        int i=1;
        for (WrkDetl detl : detls) {
            //生成回报档
            IoComplete ioComplete = new IoComplete();
            ioComplete.setBillNo(detl.getBillNo());
            ioComplete.setMatNo(detl.getMatNo());
            ioComplete.setMatName(detl.getMatName());
            ioComplete.setSeqNo(i);
            ioComplete.setQty(detl.getQty());
            ioComplete.setZpallet(detl.getZpallet());
            ioComplete.setAppeUser(userId);
            if (wrkMast.getWrkSts()==4L){
                ioComplete.setTaskType(1);
                ioComplete.setLocNo(wrkMast.getLocNo());
            }else if (wrkMast.getWrkSts()==14L){
                ioComplete.setTaskType(2);
                ioComplete.setLocNo(wrkMast.getSourceLocNo());
            }
            ioComplete.setAppeTime(new Date());
            if (!ioCompleteService.insert(ioComplete)){
                throw new CoolException("生成回报档失败");
            }
            i++;
        }
        // 完成操作人员记录
        wrkMast.setManuType("手动完成");
        Date now = new Date();