优化显示效果

This commit is contained in:
刘名喜 2024-11-08 12:06:14 +08:00
parent ba4a211a0d
commit f0413064d8
2 changed files with 17 additions and 3 deletions

View File

@ -315,6 +315,8 @@ public class WmsOutPlanServiceImpl implements IWmsOutPlanService {
wmsOutPlanDetail.setWmStorageAreaName(wmStorageArea.getAreaName());
wmsOutPlanDetail.setDetailState("1");
wmsOutPlanDetail.setRemark("一键清退无寿命物品");
wmsOutPlanDetail.setCreateBy(username);
wmsOutPlanDetail.setCreateTime(new Date());
wmsOutPlanMapper.insertWmsOutPlanDetail(wmsOutPlanDetail);
// 遍历台账对象
@ -324,6 +326,8 @@ public class WmsOutPlanServiceImpl implements IWmsOutPlanService {
wmsOutPlanDetailEntity.setWmsOutPlanDetailId(wmsOutPlanDetail.getWmsOutPlanDetailId());
wmsOutPlanDetailEntity.setBaseKnifeId(baseKnife.getBaseKnifeId());
wmsOutPlanDetailEntity.setRemark("一键清退无寿命物品");
wmsOutPlanDetailEntity.setCreateBy(username);
wmsOutPlanDetailEntity.setCreateTime(new Date());
wmsOutPlanDetailEntityMapper.insertWmsOutPlanDetailEntity(wmsOutPlanDetailEntity);
// 锁定并出库台账明细实体
@ -354,6 +358,8 @@ public class WmsOutPlanServiceImpl implements IWmsOutPlanService {
wmsOutTask.setMdItemUnit(wmsOutPlanDetail.getMdItemUnit());
wmsOutTask.setTaskState("1");
wmsOutTask.setRemark("一键清退无寿命物品");
wmsOutTask.setCreateBy(username);
wmsOutTask.setCreateTime(new Date());
wmsOutTaskMapper.insertWmsOutTask(wmsOutTask);
});
});

View File

@ -1,6 +1,5 @@
package com.ktg.mes.md.service.impl;
import com.alibaba.fastjson.JSON;
import com.ktg.common.utils.DateUtils;
import com.ktg.mes.md.domain.*;
import com.ktg.mes.md.mapper.*;
@ -37,6 +36,9 @@ public class WmsOutTaskServiceImpl implements IWmsOutTaskService {
@Autowired
private WmsBusinessTypeMapper wmsBusinessTypeMapper;
@Autowired
private MdItemMapper mdItemMapper;
/**
* 查询出库任务
*
@ -50,13 +52,14 @@ public class WmsOutTaskServiceImpl implements IWmsOutTaskService {
// 构建出库信息
List<HashMap<String, Object>> hashMapList = new ArrayList<>();
// 获得物料
MdItem mdItem = this.mdItemMapper.selectMdItemById(wmsOutTask.getMdItemId());
// 获得当前出库计划明细实体列表并遍历
WmsOutPlanDetailEntity entityQuery = new WmsOutPlanDetailEntity();
entityQuery.setWmsOutPlanDetailId(wmsOutTask.getWmsOutPlanDetailId());
List<WmsOutPlanDetailEntity> wmsOutPlanDetailEntityList = wmsOutPlanDetailEntityMapper.selectWmsOutPlanDetailEntityList(entityQuery);
System.out.println(JSON.toJSONString(wmsOutPlanDetailEntityList));
wmsOutPlanDetailEntityList.forEach(nowWmsOutPlanDetailEntity -> {
// 根据出库实例对象获取出库计划明细
WmsOutPlanDetail wmsOutPlanDetail = this.wmsOutPlanMapper.selectWmsOutPlanDetailById(nowWmsOutPlanDetailEntity.getWmsOutPlanDetailId());
@ -69,6 +72,10 @@ public class WmsOutTaskServiceImpl implements IWmsOutTaskService {
// 设定出库信息数据
HashMap<String, Object> hashMap = new HashMap<>();
/* 来自物料 */
hashMap.put("mdItemId", mdItem.getItemId()); // 物料ID
hashMap.put("mdItemCode", mdItem.getItemCode()); // 物料编码
hashMap.put("mdItemName", mdItem.getItemName()); // 物料名称
/* 来自计划 */
hashMap.put("planCode", wmsOutPlan.getPlanCode()); // 计划编号
hashMap.put("planStatus", wmsOutPlan.getPlanState()); // 计划状态
@ -89,6 +96,7 @@ public class WmsOutTaskServiceImpl implements IWmsOutTaskService {
if (nowWmsOutPlanDetailEntity.getCreateTime() != null)
outTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(nowWmsOutPlanDetailEntity.getCreateTime());
hashMap.put("outTime", outTime); // 出库时间
hashMap.put("baseKnifeId", nowWmsOutPlanDetailEntity.getBaseKnifeId());
hashMapList.add(hashMap);
// 注入出库信息对象