优化任务详细的返回值。
This commit is contained in:
		@@ -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<OrderInfoTaskDetVo> 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<CurrTaskDet> page = currTaskDetServiceBiz.page(new Page<>(currTaskId.getCurrent(), currTaskId.getSize()), queryWrapper);
 | 
			
		||||
        return successful(new PageVo<>(page, CurrTaskDetVo.class));
 | 
			
		||||
        PageVo<CurrTaskDetVo> currTaskDetVo = new PageVo<>(page, CurrTaskDetVo.class);
 | 
			
		||||
        currTaskDetVo.getRecords().forEach(
 | 
			
		||||
                e -> {
 | 
			
		||||
                    OrderInfo one = orderInfoService.getOne(new QueryWrapper<OrderInfo>().eq(OrderInfo.IDEN_CARD_NUM, e.getIdenCardNum()));
 | 
			
		||||
                    e.setProductModel(one.getProductModel());
 | 
			
		||||
                }
 | 
			
		||||
        );
 | 
			
		||||
        return successful(currTaskDetVo);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
 
 | 
			
		||||
@@ -143,6 +143,7 @@ public class CurrTaskServiceImpl extends BaseService implements CurrTaskService
 | 
			
		||||
        currTaskQueryWrapper.eq(CurrTask.VALID, 1);
 | 
			
		||||
        Page<CurrTask> page = currTaskServiceBiz.page(new Page<>(param.getCurrent(), param.getSize()), currTaskQueryWrapper);
 | 
			
		||||
        PageVo<CurrTaskMainQueryVo> 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<String> customers = new ArrayList<>();
 | 
			
		||||
            //根据标识卡号查订单的客户名并写入
 | 
			
		||||
            e.getIdens().forEach(id -> {
 | 
			
		||||
 
 | 
			
		||||
@@ -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<String> 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<TaskDetHis> page = taskDetHisServiceBiz.page(new Page<>(currTaskId.getCurrent(), currTaskId.getSize()), queryWrapper);
 | 
			
		||||
        return successful(new PageVo<>(page, TaskHisDetVo.class));
 | 
			
		||||
        PageVo<TaskHisDetVo> taskHisDetVoPageVo = new PageVo<>(page, TaskHisDetVo.class);
 | 
			
		||||
        taskHisDetVoPageVo.getRecords().forEach(
 | 
			
		||||
                e -> {
 | 
			
		||||
                    OrderInfo one = orderInfoService.getOne(new QueryWrapper<OrderInfo>().eq(OrderInfo.IDEN_CARD_NUM, e.getIdenCardNum()));
 | 
			
		||||
                    e.setProductModel(one.getProductModel());
 | 
			
		||||
                }
 | 
			
		||||
        );
 | 
			
		||||
        return successful(taskHisDetVoPageVo);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 数量,手动输入
 | 
			
		||||
     */
 | 
			
		||||
 
 | 
			
		||||
@@ -57,6 +57,11 @@ public class CurrTaskQueryVo extends BaseVo implements PageVo.ConvertVo {
 | 
			
		||||
    @ApiModelProperty("开始位置")
 | 
			
		||||
    private String startPosition;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 生产单号
 | 
			
		||||
     */
 | 
			
		||||
    @ApiModelProperty("生产单号")
 | 
			
		||||
    private String sheetNo;
 | 
			
		||||
    /**
 | 
			
		||||
     * 目标位置指的是窑炉的位置
 | 
			
		||||
     */
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 重量,手动输入
 | 
			
		||||
     */
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user