diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/CurrTaskDetServiceImpl.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/CurrTaskDetServiceImpl.java index a696a5d..c7d1814 100644 --- a/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/CurrTaskDetServiceImpl.java +++ b/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/CurrTaskDetServiceImpl.java @@ -4,7 +4,9 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.mt.wms.core.base.BaseService; import com.mt.wms.core.dal.entity.CurrTaskDet; +import com.mt.wms.core.dal.entity.OrderInfo; import com.mt.wms.core.dal.service.CurrTaskDetServiceBiz; +import com.mt.wms.core.dal.service.OrderInfoServiceBiz; import com.mt.wms.core.params.IdParam; import com.mt.wms.core.utils.BeanUtils; import com.mt.wms.core.vo.PageVo; @@ -39,6 +41,8 @@ public class CurrTaskDetServiceImpl extends BaseService implements CurrTaskDetSe CurrTaskDetServiceBiz currTaskDetServiceBiz; @Autowired CurrTaskService currTaskService; + @Autowired + OrderInfoServiceBiz orderInfoService; @Override public PageVo getCurrOrderCurrTask(OrderInfoTaskDetParam param) { @@ -66,7 +70,14 @@ public class CurrTaskDetServiceImpl extends BaseService implements CurrTaskDetSe queryWrapper.eq(CurrTaskDet.CURR_TASK_ID, currTaskId.getCurrTaskId()) .eq(CurrTaskDet.VALID, 1); Page page = currTaskDetServiceBiz.page(new Page<>(currTaskId.getCurrent(), currTaskId.getSize()), queryWrapper); - return successful(new PageVo<>(page, CurrTaskDetVo.class)); + PageVo currTaskDetVo = new PageVo<>(page, CurrTaskDetVo.class); + currTaskDetVo.getRecords().forEach( + e -> { + OrderInfo one = orderInfoService.getOne(new QueryWrapper().eq(OrderInfo.IDEN_CARD_NUM, e.getIdenCardNum())); + e.setProductModel(one.getProductModel()); + } + ); + return successful(currTaskDetVo); } @Override diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/CurrTaskServiceImpl.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/CurrTaskServiceImpl.java index ab7da2e..242b44c 100644 --- a/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/CurrTaskServiceImpl.java +++ b/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/CurrTaskServiceImpl.java @@ -143,6 +143,7 @@ public class CurrTaskServiceImpl extends BaseService implements CurrTaskService currTaskQueryWrapper.eq(CurrTask.VALID, 1); Page page = currTaskServiceBiz.page(new Page<>(param.getCurrent(), param.getSize()), currTaskQueryWrapper); PageVo pageVo = new PageVo<>(page, CurrTaskMainQueryVo.class); + Assert.notNull("无执行中的任务!", pageVo.getRecords()); pageVo.getRecords().forEach(e -> { //根据当前主任务查详细任务 @@ -155,7 +156,7 @@ public class CurrTaskServiceImpl extends BaseService implements CurrTaskService iden.add(a.getIdenCardNum()); }); e.setMaterials(materialDes); - e.setCustomers(iden); + e.setIdens(iden); ArrayList customers = new ArrayList<>(); //根据标识卡号查订单的客户名并写入 e.getIdens().forEach(id -> { diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/TaskDetHisServiceImpl.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/TaskDetHisServiceImpl.java index 5382a11..a720745 100644 --- a/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/TaskDetHisServiceImpl.java +++ b/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/TaskDetHisServiceImpl.java @@ -3,7 +3,9 @@ package com.mt.wms.empty.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.mt.wms.core.base.BaseService; +import com.mt.wms.core.dal.entity.OrderInfo; import com.mt.wms.core.dal.entity.TaskDetHis; +import com.mt.wms.core.dal.service.OrderInfoServiceBiz; import com.mt.wms.core.dal.service.TaskDetHisServiceBiz; import com.mt.wms.core.params.IdParam; import com.mt.wms.core.vo.PageVo; @@ -37,6 +39,8 @@ public class TaskDetHisServiceImpl extends BaseService implements TaskDetHisServ TaskDetHisServiceBiz taskDetHisServiceBiz; @Autowired TaskHisService taskhisService; + @Autowired + OrderInfoServiceBiz orderInfoService; @Override public R save(TaskDetHis taskDetHis) { @@ -89,6 +93,13 @@ public class TaskDetHisServiceImpl extends BaseService implements TaskDetHisServ queryWrapper.eq(TaskDetHis.TASK_ID, currTaskId.getCurrTaskId()) .eq(TaskDetHis.VALID, 1); Page page = taskDetHisServiceBiz.page(new Page<>(currTaskId.getCurrent(), currTaskId.getSize()), queryWrapper); - return successful(new PageVo<>(page, TaskHisDetVo.class)); + PageVo taskHisDetVoPageVo = new PageVo<>(page, TaskHisDetVo.class); + taskHisDetVoPageVo.getRecords().forEach( + e -> { + OrderInfo one = orderInfoService.getOne(new QueryWrapper().eq(OrderInfo.IDEN_CARD_NUM, e.getIdenCardNum())); + e.setProductModel(one.getProductModel()); + } + ); + return successful(taskHisDetVoPageVo); } } diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/vo/CurrTaskDetVo.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/vo/CurrTaskDetVo.java index 2a10900..25f32f4 100644 --- a/6.program/wms-empty/src/main/java/com/mt/wms/empty/vo/CurrTaskDetVo.java +++ b/6.program/wms-empty/src/main/java/com/mt/wms/empty/vo/CurrTaskDetVo.java @@ -53,6 +53,39 @@ public class CurrTaskDetVo extends BaseVo implements PageVo.ConvertVo { @ApiModelProperty("重量") private Float weight; + @ApiModelProperty("标识卡号") + private String idenCardNum; + + /** + * 产品名称 + */ + @ApiModelProperty("产品名称") + private String productName; + + /** + * 材料牌号 + */ + @ApiModelProperty("材料牌号") + private String materialDes; + + /** + * 产品型号 + */ + @ApiModelProperty("产品型号") + private String productModel; + + /** + * 工艺要求 + */ + @ApiModelProperty("工艺要求") + private String craftIll; + + /** + * 单位 + */ + @ApiModelProperty("单位") + private Float unit; + /** * 数量,手动输入 */ diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/vo/CurrTaskQueryVo.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/vo/CurrTaskQueryVo.java index c5dd173..d41b02e 100644 --- a/6.program/wms-empty/src/main/java/com/mt/wms/empty/vo/CurrTaskQueryVo.java +++ b/6.program/wms-empty/src/main/java/com/mt/wms/empty/vo/CurrTaskQueryVo.java @@ -57,6 +57,11 @@ public class CurrTaskQueryVo extends BaseVo implements PageVo.ConvertVo { @ApiModelProperty("开始位置") private String startPosition; + /** + * 生产单号 + */ + @ApiModelProperty("生产单号") + private String sheetNo; /** * 目标位置指的是窑炉的位置 */ diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/vo/TaskHisDetVo.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/vo/TaskHisDetVo.java index ad09f49..9ba4498 100644 --- a/6.program/wms-empty/src/main/java/com/mt/wms/empty/vo/TaskHisDetVo.java +++ b/6.program/wms-empty/src/main/java/com/mt/wms/empty/vo/TaskHisDetVo.java @@ -46,6 +46,40 @@ public class TaskHisDetVo extends BaseVo implements PageVo.ConvertVo { */ @ApiModelProperty("历史任务id") private Long taskId; + + @ApiModelProperty("标识卡号") + private String idenCardNum; + + /** + * 产品名称 + */ + @ApiModelProperty("产品名称") + private String productName; + + /** + * 材料牌号 + */ + @ApiModelProperty("材料牌号") + private String materialDes; + + /** + * 产品型号 + */ + @ApiModelProperty("产品型号") + private String productModel; + + /** + * 工艺要求 + */ + @ApiModelProperty("工艺要求") + private String craftIll; + + /** + * 单位 + */ + @ApiModelProperty("单位") + private Float unit; + /** * 重量,手动输入 */