Browse Source

预约任务优化

master
常熟吴彦祖 2 months ago
parent
commit
218201cca7
  1. 4
      src/main/java/com/gaotao/modules/automatedWarehouse/service/impl/AgvStationServiceImpl.java
  2. 4
      src/main/java/com/gaotao/modules/warehouse/service/impl/PalletServiceImpl.java

4
src/main/java/com/gaotao/modules/automatedWarehouse/service/impl/AgvStationServiceImpl.java

@ -11,10 +11,12 @@ import com.gaotao.modules.automatedWarehouse.entity.AgvStationData;
import com.gaotao.modules.automatedWarehouse.entity.Area; import com.gaotao.modules.automatedWarehouse.entity.Area;
import com.gaotao.modules.automatedWarehouse.mapper.AgvStationMapper; import com.gaotao.modules.automatedWarehouse.mapper.AgvStationMapper;
import com.gaotao.modules.automatedWarehouse.service.AgvStationService; import com.gaotao.modules.automatedWarehouse.service.AgvStationService;
import com.gaotao.modules.sys.entity.SysUserEntity;
import com.gaotao.modules.warehouse.entity.Location; import com.gaotao.modules.warehouse.entity.Location;
import com.gaotao.modules.warehouse.dao.LocationMapper; import com.gaotao.modules.warehouse.dao.LocationMapper;
import com.gaotao.modules.system.entity.SensitiveFieldChangeLog; // 新增 - rqrq import com.gaotao.modules.system.entity.SensitiveFieldChangeLog; // 新增 - rqrq
import com.gaotao.modules.system.service.SensitiveFieldChangeLogService; // 新增 - rqrq import com.gaotao.modules.system.service.SensitiveFieldChangeLogService; // 新增 - rqrq
import org.apache.shiro.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
@ -230,7 +232,7 @@ public class AgvStationServiceImpl extends ServiceImpl<AgvStationMapper, AgvStat
log.setFieldName("status_db"); log.setFieldName("status_db");
log.setOldValue(oldStatusDb != null ? oldStatusDb + "(" + oldStatusDesc + ")" : ""); log.setOldValue(oldStatusDb != null ? oldStatusDb + "(" + oldStatusDesc + ")" : "");
log.setNewValue(newStatusDb != null ? newStatusDb + "(" + newStatusDesc + ")" : ""); log.setNewValue(newStatusDb != null ? newStatusDb + "(" + newStatusDesc + ")" : "");
log.setOperator("SYSTEM"); // 可根据实际情况从上下文获取 - rqrq
log.setOperator(((SysUserEntity) SecurityUtils.getSubject().getPrincipal()).getUsername()); // 可根据实际情况从上下文获取 - rqrq
log.setOperationTime(new java.util.Date()); log.setOperationTime(new java.util.Date());
log.setRecordId(data.getId()); log.setRecordId(data.getId());
log.setOperationType("UPDATE"); log.setOperationType("UPDATE");

4
src/main/java/com/gaotao/modules/warehouse/service/impl/PalletServiceImpl.java

@ -8,6 +8,7 @@ import com.gaotao.common.exception.XJException;
import com.gaotao.common.utils.PageUtils; import com.gaotao.common.utils.PageUtils;
import com.gaotao.modules.automatedWarehouse.entity.AgvStation; import com.gaotao.modules.automatedWarehouse.entity.AgvStation;
import com.gaotao.modules.automatedWarehouse.mapper.WcsIntegrationMapper; import com.gaotao.modules.automatedWarehouse.mapper.WcsIntegrationMapper;
import com.gaotao.modules.sys.entity.SysUserEntity;
import com.gaotao.modules.trans.entity.TransNoControl; import com.gaotao.modules.trans.entity.TransNoControl;
import com.gaotao.modules.trans.service.TransNoControlService; import com.gaotao.modules.trans.service.TransNoControlService;
import com.gaotao.modules.warehouse.dao.PalletMapper; import com.gaotao.modules.warehouse.dao.PalletMapper;
@ -18,6 +19,7 @@ import com.gaotao.modules.warehouse.entity.vo.PalletVo;
import com.gaotao.modules.warehouse.service.PalletService; import com.gaotao.modules.warehouse.service.PalletService;
import com.gaotao.modules.system.entity.SensitiveFieldChangeLog; // 新增 - rqrq import com.gaotao.modules.system.entity.SensitiveFieldChangeLog; // 新增 - rqrq
import com.gaotao.modules.system.service.SensitiveFieldChangeLogService; // 新增 - rqrq import com.gaotao.modules.system.service.SensitiveFieldChangeLogService; // 新增 - rqrq
import org.apache.shiro.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -173,7 +175,7 @@ public class PalletServiceImpl extends ServiceImpl<PalletMapper, Pallet> impleme
log.setFieldName("location_code"); log.setFieldName("location_code");
log.setOldValue(oldLocationCode != null ? oldLocationCode : ""); log.setOldValue(oldLocationCode != null ? oldLocationCode : "");
log.setNewValue(newLocationCode != null ? newLocationCode : ""); log.setNewValue(newLocationCode != null ? newLocationCode : "");
log.setOperator("SYSTEM"); // 可根据实际情况从上下文获取 - rqrq
log.setOperator(((SysUserEntity) SecurityUtils.getSubject().getPrincipal()).getUsername()); // 可根据实际情况从上下文获取 - rqrq
log.setOperationTime(new Date()); log.setOperationTime(new Date());
log.setRecordId(palletData.getId()); log.setRecordId(palletData.getId());
log.setOperationType("UPDATE"); log.setOperationType("UPDATE");

Loading…
Cancel
Save