jiazx0107@163.com
2023-06-24 6f45f4a29ce38525f3f9e3931bcedfc77bde765e
igds-inout/src/main/java/com/ld/igds/inout/service/impl/InoutServiceImpl.java
@@ -15,7 +15,6 @@
import com.ld.igds.inout.mapper.InoutCheckMapper;
import com.ld.igds.inout.mapper.InoutRecordMapper;
import com.ld.igds.inout.service.InoutService;
import com.ld.igds.models.Depot;
import com.ld.igds.models.InoutPrice;
import com.ld.igds.util.ContextUtil;
import com.ld.igds.util.DateUtil;
@@ -57,8 +56,6 @@
        if (null != result) {
            return result;
        }
        List<InoutData> list = inoutMapper.inoutProgressQuery(param);
        if (null == list || list.size() == 0)
            return null;
@@ -106,16 +103,18 @@
    }
    @Override
    public String inoutStop(InoutParam param) {
    public String inoutStop(InoutParam param) throws Exception {
        if (StringUtils.isEmpty(param.getCompanyId())) {
            param.setCompanyId(ContextUtil.getCompanyId());
            param.setCompanyId(ContextUtil.getDefaultCompanyId());
        }
        param.setProgress(InoutConstant.PROGRESS_RECORD);
        param.setRecordStatus(InoutConstant.RECORD_STATUS_DEL);
        // 缓存中删除
        delFromCache(param.getDeptId(), param.getType(), param.getId());
        param.setProgress(InoutConstant.PROGRESS_RECORD);
        param.setRecordStatus(InoutConstant.RECORD_STATUS_ERROR);
        inoutMapper.inoutStop(param);
@@ -299,7 +298,7 @@
    @Override
    public String quickComplete(InoutData data) throws Exception {
        if (null == data.getCompanyId()) {
            data.setCompanyId(ContextUtil.getCompanyId());
            data.setCompanyId(ContextUtil.getDefaultCompanyId());
        }
        if (null == data.getCompleteTime()) {
            data.setCompleteTime(new Date());
@@ -310,7 +309,6 @@
        if (null == data.getEmptyWeightTime()) {
            data.setEmptyWeightTime(new Date());
        }
        //调整时间差
        if (InoutConstant.TYPE_IN.equals(data.getType())) {
@@ -339,15 +337,10 @@
        // 设置流程结束
        data.setProgress(InoutConstant.PROGRESS_RECORD);
        if (null == data.getFoodType()) {
            // 根据仓库信息获取缓存
            Depot depot = commonService.getCacheDepot(data.getCompanyId(), data.getDepotId());
            data.setFoodType(depot.getFoodType());
        }
        //执行更新
        inoutMapper.updateData(data);
        //更新缓存
        updateInoutCache(data);
        return null;
@@ -368,8 +361,6 @@
        } else {
            setInoutCache(data.getDeptId(), data);
        }
    }