新增根据批次加工单获取批次明细接口,修改根据批次加工单获取工序和明细的接口

这个提交包含在:
hy2250089 2020-03-13 11:08:00 +08:00
父节点 3295968f76
当前提交 f520e678f1
共有 14 个文件被更改,包括 116 次插入76 次删除

查看文件

@ -16,5 +16,5 @@ public interface MtAloneProcessMapper extends Mapper<MtAloneProcess> {
void setNextProcessBeforeHandleStatus(MtAloneProcess currentProcess);
List<Integer> processStepListByProdprocid(ProductProcessParams params);
//List<Integer> processStepListByProdprocid(ProductProcessParams params);
}

查看文件

@ -10,5 +10,7 @@ import java.util.List;
public interface ProductProcessBatchDetMapper extends Mapper<ProductProcessBatchDet> {
List<ProductProcessBatchDet> findList(ProductProcessBatchDetParams params);
List<String> volumeStepListByProdprocid(ProductProcessParams params);
//List<String> volumeStepListByProdprocid(ProductProcessParams params);
List<ProductProcessBatchDet> findListByProductProcess(ProductProcessParams params);
}

查看文件

@ -1,7 +1,6 @@
package com.deer.wms.produce.manage.dao;
import com.deer.wms.produce.manage.model.ProcessStepAndVolumeNum;
import com.deer.wms.produce.manage.model.ProductProcess;
import com.deer.wms.produce.manage.model.ProductProcessParams;
import com.deer.wms.produce.manage.model.ProductProcessVo;

查看文件

@ -13,7 +13,7 @@
<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_code" jdbcType="VARCHAR" property="productProcessCode" />
<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" />
@ -38,4 +38,22 @@
</where>
ORDER BY CAST(det.volume_num AS DECIMAL)
</select>
<select id="findListByProductProcess" parameterType="com.deer.wms.produce.manage.model.ProductProcessParams" resultMap="BaseResultMap">
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
FROM mt_alone_product_process_batch_det det
<where>
<if test="productProcessId != null">
AND det.product_process_id = #{productProcessId}
</if>
<if test="companyId != null">
AND det.company_id = #{companyId}
</if>
</where>
ORDER BY CAST(det.volume_num AS DECIMAL)
</select>
</mapper>

查看文件

@ -0,0 +1,32 @@
package com.deer.wms.produce.manage.model;
import java.util.List;
/**
* 用于打卷系统根据批次加工单号获取其下的所有工序和明细
* @Author: hy
* @Date: 2020/3/11 15:10
* @Version 1.0
*/
public class ProcessAndDet {
private List<MtAloneProcessVo> processVoList;//工序扩展信息
private List<ProductProcessBatchDet> productProcessBatchDetList;//明细信息
public List<MtAloneProcessVo> getProcessVoList() {
return processVoList;
}
public void setProcessVoList(List<MtAloneProcessVo> processVoList) {
this.processVoList = processVoList;
}
public List<ProductProcessBatchDet> getProductProcessBatchDetList() {
return productProcessBatchDetList;
}
public void setProductProcessBatchDetList(List<ProductProcessBatchDet> productProcessBatchDetList) {
this.productProcessBatchDetList = productProcessBatchDetList;
}
}

查看文件

@ -1,31 +0,0 @@
package com.deer.wms.produce.manage.model;
import java.util.List;
/**
* 用于打卷系统根据批次加工单号获取其下的所有工序和卷号
* @Author: hy
* @Date: 2020/3/11 15:10
* @Version 1.0
*/
public class ProcessStepAndVolumeNum {
private List<Integer> processStepList;
private List<String> volumeStepList;
public List<Integer> getProcessStepList() {
return processStepList;
}
public void setProcessStepList(List<Integer> processStepList) {
this.processStepList = processStepList;
}
public List<String> getVolumeStepList() {
return volumeStepList;
}
public void setVolumeStepList(List<String> volumeStepList) {
this.volumeStepList = volumeStepList;
}
}

查看文件

@ -20,5 +20,5 @@ public interface MtAloneProcessService extends Service<MtAloneProcess, Integer>
void updateProcess(ProcessHo processHo);
List<Integer> processStepListByProdprocid(ProductProcessParams params);
//List<Integer> processStepListByProdprocid(ProductProcessParams params);
}

查看文件

@ -15,5 +15,7 @@ public interface ProductProcessBatchDetService extends Service<ProductProcessBat
List<ProductProcessBatchDet> findList(ProductProcessBatchDetParams params) ;
List<String> volumeStepListByProdprocid(ProductProcessParams params);
//List<String> volumeStepListByProdprocid(ProductProcessParams params);
List<ProductProcessBatchDet> findListByProductProcess(ProductProcessParams params);
}

查看文件

@ -22,7 +22,7 @@ public interface ProductProcessService extends Service<ProductProcess, Integer>
void addProduceProcess(ProductProcessHo productProcessHo, CurrentUser currentUser);
ProcessStepAndVolumeNum stepAndNumByProdprocid(ProductProcessParams params);
//ProcessAndDet stepAndNumByProdprocid(ProductProcessParams params);
//void deleteRelevantById(Integer produceProcessId, CurrentUser currentUser);

查看文件

@ -112,10 +112,10 @@ public class MtAloneProcessServiceImpl extends AbstractService<MtAloneProcess, I
}
}
@Override
public List<Integer> processStepListByProdprocid(ProductProcessParams params) {
return mtAloneProcessMapper.processStepListByProdprocid(params);
}
//@Override
//public List<Integer> processStepListByProdprocid(ProductProcessParams params) {
// return mtAloneProcessMapper.processStepListByProdprocid(params);
//}
//设置下一道工序的前道工序处理状态
public void setNextProcessBeforeHandleStatus(MtAloneProcess currentProcess) {

查看文件

@ -28,8 +28,13 @@ public class ProductProcessBatchDetServiceImpl extends AbstractService<ProductPr
return productProcessBatchDetMapper.findList(params);
}
//@Override
//public List<String> volumeStepListByProdprocid(ProductProcessParams params) {
// return productProcessBatchDetMapper.volumeStepListByProdprocid(params);
//}
@Override
public List<String> volumeStepListByProdprocid(ProductProcessParams params) {
return productProcessBatchDetMapper.volumeStepListByProdprocid(params);
public List<ProductProcessBatchDet> findListByProductProcess(ProductProcessParams params) {
return productProcessBatchDetMapper.findListByProductProcess(params);
}
}

查看文件

@ -12,8 +12,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.util.*;
/**
@ -267,15 +265,15 @@ public class ProductProcessServiceImpl extends AbstractService<ProductProcess, I
productProcessBatchDetService.save(productProcessBatchDetList);
}
@Override
public ProcessStepAndVolumeNum stepAndNumByProdprocid(ProductProcessParams params) {
ProcessStepAndVolumeNum processStepAndVolumeNum = new ProcessStepAndVolumeNum();
List<Integer> processStepList = processService.processStepListByProdprocid(params);
List<String> volumeStepList = productProcessBatchDetService.volumeStepListByProdprocid(params);
processStepAndVolumeNum.setProcessStepList(processStepList);
processStepAndVolumeNum.setVolumeStepList(volumeStepList);
return processStepAndVolumeNum;
}
//@Override
//public ProcessAndDet stepAndNumByProdprocid(ProductProcessParams params) {
// ProcessAndDet processAndDet = new ProcessAndDet();
// List<Integer> processStepList = processService.processStepListByProdprocid(params);
// List<String> volumeStepList = productProcessBatchDetService.volumeStepListByProdprocid(params);
// processAndDet.setProcessStepList(processStepList);
// processAndDet.setVolumeStepList(volumeStepList);
// return processAndDet;
//}
//@Override

查看文件

@ -1,6 +1,7 @@
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.project.seed.annotation.OperateLog;
import com.deer.wms.project.seed.constant.SystemManageConstant;
import com.deer.wms.project.seed.core.result.CommonCode;
@ -28,7 +29,7 @@ import java.util.List;
/**
* Created by on 2019/09/09.
*/
@Api(description = "xxx接口")
@Api(description = "批次明细接口")
@RestController
@RequestMapping("/product/process/batch/dets")
public class ProductProcessBatchDetController {
@ -72,21 +73,25 @@ public class ProductProcessBatchDetController {
return ResultGenerator.genSuccessResult(productProcessBatchDet);
}
@GetMapping("/list")
public Result list(ProductProcessBatchDetParams params, @ApiIgnore @User CurrentUser currentUser) {
/**
* hy正在用打卷系统
* 获取批次加工单下的所有明细
* @param params
* @param currentUser
* @return
*/
@GetMapping("/listByProductProcess")
public Result listByProductProcess(ProductProcessParams params, @ApiIgnore @User CurrentUser currentUser) {
if(currentUser==null){
return ResultGenerator.genFailResult(CommonCode.SERVICE_ERROR,"未登录错误",null );
}
if (currentUser.getCompanyType() != SystemManageConstant.COMPANY_TYPE_MT){
params.setCompanyId(currentUser.getCompanyId());
}else{
params.setCompanyId(null);
}
params.setCompanyId(currentUser.getCompanyId());
PageHelper.startPage(params.getPageNum(), params.getPageSize());
List<ProductProcessBatchDet> list = productProcessBatchDetService.findList(params);
List<ProductProcessBatchDet> list = productProcessBatchDetService.findListByProductProcess(params);
PageInfo pageInfo = new PageInfo(list);
return ResultGenerator.genSuccessResult(pageInfo);
}
}

查看文件

@ -4,7 +4,9 @@ import com.deer.wms.intercept.annotation.Authority;
import com.deer.wms.intercept.annotation.User;
import com.deer.wms.intercept.common.data.CurrentUser;
import com.deer.wms.produce.manage.model.*;
import com.deer.wms.produce.manage.service.MtAloneProcessService;
import com.deer.wms.produce.manage.service.ProcessBomService;
import com.deer.wms.produce.manage.service.ProductProcessBatchDetService;
import com.deer.wms.produce.manage.service.ProductProcessService;
import com.deer.wms.project.seed.annotation.OperateLog;
import com.deer.wms.project.seed.core.result.CommonCode;
@ -37,7 +39,10 @@ public class ProductProcessController {
private ProductProcessService productProcessService;
@Autowired
private ProcessBomService processBomService;
private MtAloneProcessService processService;
@Autowired
private ProductProcessBatchDetService productProcessBatchDetService;
/**
* hy暂时没用
@ -238,27 +243,32 @@ public class ProductProcessController {
/**
* hy正在用打卷系统
* 根据批次加工单id获取其下卷号和工序
* 根据批次加工单id获取其下所有的工序和明细
* @param params
* @param currentUser
* @return
*/
@ApiOperation(value = "批次生产加工单下的工序和卷号查询", notes = "批次生产加工单下的工序和卷号查询")
@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)
})
@OperateLog(description = "批次生产加工单下的工序和卷号查询", type = "查询")
@GetMapping("/step/and/num/by/prodprocid")
public Result stepAndNumByProdprocid(ProductProcessParams params, @ApiIgnore @User CurrentUser currentUser) {
//if(currentUser==null){
// return ResultGenerator.genFailResult(CommonCode.SERVICE_ERROR,"未登录错误",null );
//}
@GetMapping("/processAndDetByProductProcess")
public Result processAndDetByProductProcess(ProductProcessParams params, @ApiIgnore @User CurrentUser currentUser) {
if(currentUser==null){
return ResultGenerator.genFailResult(CommonCode.SERVICE_ERROR,"未登录错误",null );
}
params.setCompanyId(1);
ProcessStepAndVolumeNum processStepAndVolumeNum = productProcessService.stepAndNumByProdprocid(params);
return ResultGenerator.genSuccessResult(processStepAndVolumeNum);
params.setCompanyId(currentUser.getCompanyId());
ProcessAndDet processAndDet = new ProcessAndDet();
//获取工序
List<MtAloneProcessVo> processVoList = processService.findProcessVoListByProductProcess(params);
//获取明细
List<ProductProcessBatchDet> productProcessBatchDetList = productProcessBatchDetService.findListByProductProcess(params);
processAndDet.setProcessVoList(processVoList);
processAndDet.setProductProcessBatchDetList(productProcessBatchDetList);
return ResultGenerator.genSuccessResult(processAndDet);
}
}