增加查询批次明细的扩展信息,查询时将已完成工序数修正为已检测工序数,增加根据批次明细id查询已检测的工序接口

This commit is contained in:
hy2250089 2020-03-23 18:46:49 +08:00
förälder 7783a360af
incheckning 6d569bc913
13 ändrade filer med 126 tillägg och 23 borttagningar

Visa fil

@ -1,9 +1,6 @@
package com.deer.wms.produce.manage.dao;
import com.deer.wms.produce.manage.model.MtAloneProcess;
import com.deer.wms.produce.manage.model.MtAloneProcessParams;
import com.deer.wms.produce.manage.model.MtAloneProcessVo;
import com.deer.wms.produce.manage.model.ProductProcessParams;
import com.deer.wms.produce.manage.model.*;
import com.deer.wms.project.seed.core.mapper.Mapper;
import java.util.List;
@ -18,5 +15,7 @@ public interface MtAloneProcessMapper extends Mapper<MtAloneProcess> {
MtAloneProcessVo findProcessById(MtAloneProcessParams processParams);
List<MtAloneProcess> findDetectProcessByBatchDet(ProductProcessBatchDetParams params);
//List<Integer> processStepListByProdprocid(ProductProcessParams params);
}

Visa fil

@ -2,6 +2,7 @@ package com.deer.wms.produce.manage.dao;
import com.deer.wms.produce.manage.model.ProductProcessBatchDet;
import com.deer.wms.produce.manage.model.ProductProcessBatchDetParams;
import com.deer.wms.produce.manage.model.ProductProcessBatchDetVo;
import com.deer.wms.produce.manage.model.ProductProcessParams;
import com.deer.wms.project.seed.core.mapper.Mapper;
@ -12,7 +13,7 @@ public interface ProductProcessBatchDetMapper extends Mapper<ProductProcessBatch
//List<String> volumeStepListByProdprocid(ProductProcessParams params);
List<ProductProcessBatchDet> findListByProductProcess(ProductProcessParams params);
List<ProductProcessBatchDetVo> findListByProductProcess(ProductProcessParams params);
ProductProcessBatchDet findBatchDetById(ProductProcessBatchDetParams batchDetParams);
}

Visa fil

@ -150,4 +150,19 @@
</where>
</select>
<select id="findDetectProcessByBatchDet"
parameterType="com.deer.wms.produce.manage.model.ProductProcessBatchDetParams"
resultMap="BaseResultMap">
SELECT process.process_name, process.process_step FROM mt_alone_process process
RIGHT JOIN mt_alone_product_batch_detect batchdetect ON batchdetect.process_id = process.id AND batchdetect.company_id = process.company_id
<where>
<if test="batchDetId != null">
AND batchdetect.batch_det_id = #{batchDetId}
</if>
<if test="companyId != null">
AND batchdetect.company_id = #{companyId}
</if>
</where> ORDER BY process.process_step ASC
</select>
</mapper>

Visa fil

@ -25,6 +25,29 @@
<result column="product_annex_code" jdbcType="VARCHAR" property="productAnnexCode" />
<result column="company_id" jdbcType="INTEGER" property="companyId" />
</resultMap>
<resultMap id="ProductProcessBatchDetVoResultMap" type="com.deer.wms.produce.manage.model.ProductProcessBatchDetVo">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="operator_id" jdbcType="INTEGER" property="operatorId" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="version" jdbcType="VARCHAR" property="version" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="batch_code" jdbcType="VARCHAR" property="batchCode" />
<result column="delivery_code" jdbcType="VARCHAR" property="deliveryCode" />
<result column="product_process_id" jdbcType="INTEGER" property="productProcessId" />
<result column="volume_num" jdbcType="VARCHAR" property="volumeNum" />
<result column="batch_det_code" jdbcType="VARCHAR" property="batchDetCode" />
<result column="len" jdbcType="REAL" property="len" />
<result column="delivery_len" jdbcType="REAL" property="deliveryLen" />
<result column="detection_len" jdbcType="REAL" property="detectionLen" />
<result column="shrinkage" jdbcType="VARCHAR" property="shrinkage" />
<result column="dyelot_num" jdbcType="VARCHAR" property="dyelotNum" />
<result column="dyelot_order" jdbcType="VARCHAR" property="dyelotOrder" />
<result column="product_annex_code" jdbcType="VARCHAR" property="productAnnexCode" />
<result column="company_id" jdbcType="INTEGER" property="companyId" />
<result column="product_process_name0" jdbcType="VARCHAR" property="productProcessName" />
</resultMap>
<select id="volumeStepListByProdprocid" parameterType="com.deer.wms.produce.manage.model.ProductProcessParams" resultType="java.lang.String">
SELECT det.volume_num FROM mt_alone_product_process_batch_det det
@ -39,11 +62,14 @@
ORDER BY CAST(det.volume_num AS DECIMAL)
</select>
<select id="findListByProductProcess" parameterType="com.deer.wms.produce.manage.model.ProductProcessParams" resultMap="BaseResultMap">
<select id="findListByProductProcess" parameterType="com.deer.wms.produce.manage.model.ProductProcessParams" resultMap="ProductProcessBatchDetVoResultMap">
SELECT det.id, det.create_time, det.batch_code, det.delivery_code,
det.volume_num, det.batch_det_code, det.len, det.delivery_len,
det.detection_len, det.shrinkage, det.dyelot_num, det.dyelot_order
det.detection_len, det.shrinkage, det.dyelot_num, det.dyelot_order,
prodproc.product_process_name0,
(SELECT COUNT(DISTINCT(batchdetect.process_id)) FROM mt_alone_product_batch_detect batchdetect WHERE batchdetect.batch_det_id = det.id AND batchdetect.company_id = det.company_id) detecteProcessNum
FROM mt_alone_product_process_batch_det det
LEFT JOIN mt_alone_product_process prodproc ON det.product_process_id = prodproc.id AND det.company_id = prodproc.company_id
<where>
<if test="productProcessId != null">
AND det.product_process_id = #{productProcessId}

Visa fil

@ -13,7 +13,7 @@ public class ProcessAndDet {
private List<MtAloneProcessVo> processVoList;//工序扩展信息
private List<ProductProcessBatchDet> productProcessBatchDetList;//明细信息
private List<ProductProcessBatchDetVo> productProcessBatchDetVoList;//明细信息
public Integer getProductProcessId() {
return productProcessId;
@ -31,11 +31,11 @@ public class ProcessAndDet {
this.processVoList = processVoList;
}
public List<ProductProcessBatchDet> getProductProcessBatchDetList() {
return productProcessBatchDetList;
public List<ProductProcessBatchDetVo> getProductProcessBatchDetVoList() {
return productProcessBatchDetVoList;
}
public void setProductProcessBatchDetList(List<ProductProcessBatchDet> productProcessBatchDetList) {
this.productProcessBatchDetList = productProcessBatchDetList;
public void setProductProcessBatchDetVoList(List<ProductProcessBatchDetVo> productProcessBatchDetVoList) {
this.productProcessBatchDetVoList = productProcessBatchDetVoList;
}
}

Visa fil

@ -0,0 +1,28 @@
package com.deer.wms.produce.manage.model;
/**
* @Author: hy
* @Date: 2020/3/23 16:09
* @Version 1.0
*/
public class ProductProcessBatchDetVo extends ProductProcessBatchDet {
private String productProcessName;//产品别名
private Integer detecteProcessNum;//已检测工序数
public String getProductProcessName() {
return productProcessName;
}
public void setProductProcessName(String productProcessName) {
this.productProcessName = productProcessName;
}
public Integer getDetecteProcessNum() {
return detecteProcessNum;
}
public void setDetecteProcessNum(Integer detecteProcessNum) {
this.detecteProcessNum = detecteProcessNum;
}
}

Visa fil

@ -22,5 +22,7 @@ public interface MtAloneProcessService extends Service<MtAloneProcess, Integer>
MtAloneProcessVo findProcessById(MtAloneProcessParams processParams);
List<MtAloneProcess> findDetectProcessByBatchDet(ProductProcessBatchDetParams params);
//List<Integer> processStepListByProdprocid(ProductProcessParams params);
}

Visa fil

@ -3,6 +3,7 @@ package com.deer.wms.produce.manage.service;
import com.deer.wms.produce.manage.model.ProductProcessBatchDet;
import com.deer.wms.produce.manage.model.ProductProcessBatchDetParams;
import com.deer.wms.produce.manage.model.ProductProcessBatchDetVo;
import com.deer.wms.produce.manage.model.ProductProcessParams;
import com.deer.wms.project.seed.core.service.Service;
import java.util.List;
@ -17,7 +18,7 @@ public interface ProductProcessBatchDetService extends Service<ProductProcessBat
//List<String> volumeStepListByProdprocid(ProductProcessParams params);
List<ProductProcessBatchDet> findListByProductProcess(ProductProcessParams params);
List<ProductProcessBatchDetVo> findListByProductProcess(ProductProcessParams params);
ProductProcessBatchDet findBatchDetById(ProductProcessBatchDetParams batchDetParams);
}

Visa fil

@ -117,6 +117,11 @@ public class MtAloneProcessServiceImpl extends AbstractService<MtAloneProcess, I
return mtAloneProcessMapper.findProcessById(processParams);
}
@Override
public List<MtAloneProcess> findDetectProcessByBatchDet(ProductProcessBatchDetParams params) {
return mtAloneProcessMapper.findDetectProcessByBatchDet(params);
}
//@Override
//public List<Integer> processStepListByProdprocid(ProductProcessParams params) {
// return mtAloneProcessMapper.processStepListByProdprocid(params);

Visa fil

@ -3,6 +3,7 @@ package com.deer.wms.produce.manage.service.impl;
import com.deer.wms.produce.manage.dao.ProductProcessBatchDetMapper;
import com.deer.wms.produce.manage.model.ProductProcessBatchDet;
import com.deer.wms.produce.manage.model.ProductProcessBatchDetParams;
import com.deer.wms.produce.manage.model.ProductProcessBatchDetVo;
import com.deer.wms.produce.manage.model.ProductProcessParams;
import com.deer.wms.produce.manage.service.ProductProcessBatchDetService;
@ -34,7 +35,7 @@ public class ProductProcessBatchDetServiceImpl extends AbstractService<ProductPr
//}
@Override
public List<ProductProcessBatchDet> findListByProductProcess(ProductProcessParams params) {
public List<ProductProcessBatchDetVo> findListByProductProcess(ProductProcessParams params) {
return productProcessBatchDetMapper.findListByProductProcess(params);
}

Visa fil

@ -185,4 +185,5 @@ public class MtAloneProcessController {
mtAloneProcessService.updateProcess(processHo);
return ResultGenerator.genSuccessResult();
}
}

Visa fil

@ -1,13 +1,12 @@
package com.deer.wms.produce.manage.web;
import com.deer.wms.produce.manage.model.ProductProcessBatchDetParams;
import com.deer.wms.produce.manage.model.ProductProcessParams;
import com.deer.wms.produce.manage.model.*;
import com.deer.wms.produce.manage.service.MtAloneProcessService;
import com.deer.wms.project.seed.annotation.OperateLog;
import com.deer.wms.project.seed.constant.SystemManageConstant;
import com.deer.wms.project.seed.core.result.CommonCode;
import com.deer.wms.project.seed.core.result.Result;
import com.deer.wms.project.seed.core.result.ResultGenerator;
import com.deer.wms.produce.manage.model.ProductProcessBatchDet;
import com.deer.wms.produce.manage.service.ProductProcessBatchDetService;
import com.deer.wms.intercept.annotation.User;
import com.deer.wms.intercept.common.data.CurrentUser;
@ -39,6 +38,9 @@ public class ProductProcessBatchDetController {
@Autowired
private ProductProcessBatchDetService productProcessBatchDetService;
@Autowired
private MtAloneProcessService mtAloneProcessService;
@OperateLog(description = "添加xxx", type = "增加")
@ApiOperation(value = "添加xxx", notes = "添加xxx")
@PostMapping("/add")
@ -76,7 +78,7 @@ public class ProductProcessBatchDetController {
}
/**
* hy正在用打卷系统
* hy正在用打卷系统瑕疵查询模块
* 获取批次加工单下的所有明细
* @param params
* @param currentUser
@ -84,8 +86,7 @@ public class ProductProcessBatchDetController {
*/
@ApiOperation(value = "批次生产加工单下的明细查询", notes = "批次生产加工单下的明细查询")
@ApiImplicitParams({
@ApiImplicitParam(name = "productProcessId", value = "批次生产加工单id", paramType = "query", dataType = "int", required = true),
@ApiImplicitParam(name = "companyId", value = "公司id", paramType = "query", dataType = "int", required = false)
@ApiImplicitParam(name = "productProcessId", value = "批次生产加工单id", paramType = "query", dataType = "int", required = true)
})
@OperateLog(description = "批次生产加工单下的明细查询", type = "查询")
@GetMapping("/listByProductProcess")
@ -96,10 +97,33 @@ public class ProductProcessBatchDetController {
params.setCompanyId(currentUser.getCompanyId());
PageHelper.startPage(params.getPageNum(), params.getPageSize());
List<ProductProcessBatchDet> list = productProcessBatchDetService.findListByProductProcess(params);
List<ProductProcessBatchDetVo> list = productProcessBatchDetService.findListByProductProcess(params);
PageInfo pageInfo = new PageInfo(list);
return ResultGenerator.genSuccessResult(pageInfo);
}
/**
* hy正在用
* 根据批次明细id查询已检测的工序,用于点击查看明细的工序瑕疵后显示的标签名称
* @param params
* @param currentUser
* @return
*/
@ApiOperation(value = "根据批次明细id查询已检测的工序", notes = "根据批次明细id查询已检测的工序")
@ApiImplicitParams({
@ApiImplicitParam(name = "batchDetId", value = "批次明细id", paramType = "query", dataType = "int", required = true)
})
@OperateLog(description = "根据批次明细id查询已检测的工序", type = "查询")
@GetMapping("/detectProcessByBatchDet")
public Result detectProcessByBatchDet(ProductProcessBatchDetParams params, @ApiIgnore @User CurrentUser currentUser) {
if(currentUser==null){
return ResultGenerator.genFailResult(CommonCode.SERVICE_ERROR,"未登录错误",null );
}
params.setCompanyId(currentUser.getCompanyId());
PageHelper.startPage(params.getPageNum(), params.getPageSize());
List<MtAloneProcess> list = mtAloneProcessService.findDetectProcessByBatchDet(params);
PageInfo pageInfo = new PageInfo(list);
return ResultGenerator.genSuccessResult(pageInfo);
}
}

Visa fil

@ -261,11 +261,11 @@ public class ProductProcessController {
//获取工序
List<MtAloneProcessVo> processVoList = processService.findProcessVoListByProductProcess(params);
//获取批次明细
List<ProductProcessBatchDet> productProcessBatchDetList = productProcessBatchDetService.findListByProductProcess(params);
List<ProductProcessBatchDetVo> productProcessBatchDetVoList = productProcessBatchDetService.findListByProductProcess(params);
processAndDet.setProductProcessId(params.getProductProcessId());//批次加工单id赋值
processAndDet.setProcessVoList(processVoList);//所有工序赋值
processAndDet.setProductProcessBatchDetList(productProcessBatchDetList);//所有批次明细赋值
processAndDet.setProductProcessBatchDetVoList(productProcessBatchDetVoList);//所有批次明细赋值
return ResultGenerator.genSuccessResult(processAndDet);
}