进一步完善盘点

This commit is contained in:
liumingxiy 2024-11-14 09:17:59 +08:00
parent 62c8ab2cfb
commit 499ef5b518

View File

@ -2,7 +2,6 @@ package com.ktg.mes.md.service.impl;
import com.ktg.common.utils.DateUtils;
import com.ktg.mes.md.domain.WmsInventory;
import com.ktg.mes.md.domain.WmsInventoryPlan;
import com.ktg.mes.md.mapper.MdItemMapper;
import com.ktg.mes.md.mapper.MdUnitMeasureMapper;
import com.ktg.mes.md.mapper.WmsInventoryMapper;
@ -99,15 +98,15 @@ public class WmsInventoryServiceImpl implements IWmsInventoryService {
@Override
public int updateWmsInventory(WmsInventory wmsInventory) {
wmsInventory.setUpdateTime(DateUtils.getNowDate());
if (wmsInventory.getInventoryCount() != null && wmsInventory.getInventoryCount() != 0) {
if (wmsInventory.getInventoryCount() != null) {
wmsInventory.setInventoryTime(new Date(System.currentTimeMillis()));
wmsInventory.setDiffCount(Math.abs(wmsInventory.getSystemCount() - wmsInventory.getInventoryCount()));
}
if (wmsInventory.getAgCount() != null && wmsInventory.getAgCount() != 0) {
if (wmsInventory.getAgCount() != null) {
wmsInventory.setAgTime(new Date(System.currentTimeMillis()));
wmsInventory.setDiffCount(Math.abs(wmsInventory.getSystemCount() - wmsInventory.getAgCount()));
WmsInventoryPlan wmsInventoryPlan = wmsInventoryPlanMapper.selectWmsInventoryPlanByWmsStockPlanId(wmsInventory.getWmsStockPlanId());
wmsInventoryPlan.setIsag("Y");
} else {
wmsInventory.setAgTime(null);
}
return wmsInventoryMapper.updateWmsInventory(wmsInventory);
}