From f520e678f1dfd3ce5f19bd770cfd2491b2e831c5 Mon Sep 17 00:00:00 2001 From: hy2250089 Date: Fri, 13 Mar 2020 11:08:00 +0800 Subject: [PATCH] =?UTF-8?q?=20=E6=96=B0=E5=A2=9E=E6=A0=B9=E6=8D=AE?= =?UTF-8?q?=E6=89=B9=E6=AC=A1=E5=8A=A0=E5=B7=A5=E5=8D=95=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E6=89=B9=E6=AC=A1=E6=98=8E=E7=BB=86=E6=8E=A5=E5=8F=A3=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A0=B9=E6=8D=AE=E6=89=B9=E6=AC=A1=E5=8A=A0?= =?UTF-8?q?=E5=B7=A5=E5=8D=95=E8=8E=B7=E5=8F=96=E5=B7=A5=E5=BA=8F=E5=92=8C?= =?UTF-8?q?=E6=98=8E=E7=BB=86=E7=9A=84=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../manage/dao/MtAloneProcessMapper.java | 2 +- .../dao/ProductProcessBatchDetMapper.java | 4 ++- .../manage/dao/ProductProcessMapper.java | 1 - .../mapper/ProductProcessBatchDetMapper.xml | 20 ++++++++++- .../produce/manage/model/ProcessAndDet.java | 32 +++++++++++++++++ .../manage/model/ProcessStepAndVolumeNum.java | 31 ----------------- .../manage/service/MtAloneProcessService.java | 2 +- .../ProductProcessBatchDetService.java | 4 ++- .../manage/service/ProductProcessService.java | 2 +- .../impl/MtAloneProcessServiceImpl.java | 8 ++--- .../ProductProcessBatchDetServiceImpl.java | 9 +++-- .../impl/ProductProcessServiceImpl.java | 20 +++++------ .../web/ProductProcessBatchDetController.java | 23 ++++++++----- .../manage/web/ProductProcessController.java | 34 ++++++++++++------- 14 files changed, 116 insertions(+), 76 deletions(-) create mode 100644 wms-produce-manage/src/main/java/com/deer/wms/produce/manage/model/ProcessAndDet.java delete mode 100644 wms-produce-manage/src/main/java/com/deer/wms/produce/manage/model/ProcessStepAndVolumeNum.java diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/dao/MtAloneProcessMapper.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/dao/MtAloneProcessMapper.java index 0dfb441..ecbfb1b 100644 --- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/dao/MtAloneProcessMapper.java +++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/dao/MtAloneProcessMapper.java @@ -16,5 +16,5 @@ public interface MtAloneProcessMapper extends Mapper { void setNextProcessBeforeHandleStatus(MtAloneProcess currentProcess); - List processStepListByProdprocid(ProductProcessParams params); + //List processStepListByProdprocid(ProductProcessParams params); } \ No newline at end of file diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/dao/ProductProcessBatchDetMapper.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/dao/ProductProcessBatchDetMapper.java index 6b61936..47735ad 100644 --- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/dao/ProductProcessBatchDetMapper.java +++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/dao/ProductProcessBatchDetMapper.java @@ -10,5 +10,7 @@ import java.util.List; public interface ProductProcessBatchDetMapper extends Mapper { List findList(ProductProcessBatchDetParams params); - List volumeStepListByProdprocid(ProductProcessParams params); + //List volumeStepListByProdprocid(ProductProcessParams params); + + List findListByProductProcess(ProductProcessParams params); } \ No newline at end of file diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/dao/ProductProcessMapper.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/dao/ProductProcessMapper.java index b26e768..aa670fa 100644 --- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/dao/ProductProcessMapper.java +++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/dao/ProductProcessMapper.java @@ -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; diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/mapper/ProductProcessBatchDetMapper.xml b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/mapper/ProductProcessBatchDetMapper.xml index 806cb3a..4ee5e59 100644 --- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/mapper/ProductProcessBatchDetMapper.xml +++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/mapper/ProductProcessBatchDetMapper.xml @@ -13,7 +13,7 @@ - + @@ -38,4 +38,22 @@ ORDER BY CAST(det.volume_num AS DECIMAL) + + + + \ No newline at end of file diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/model/ProcessAndDet.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/model/ProcessAndDet.java new file mode 100644 index 0000000..9fbf790 --- /dev/null +++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/model/ProcessAndDet.java @@ -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 processVoList;//工序扩展信息 + + private List productProcessBatchDetList;//明细信息 + + public List getProcessVoList() { + return processVoList; + } + + public void setProcessVoList(List processVoList) { + this.processVoList = processVoList; + } + + public List getProductProcessBatchDetList() { + return productProcessBatchDetList; + } + + public void setProductProcessBatchDetList(List productProcessBatchDetList) { + this.productProcessBatchDetList = productProcessBatchDetList; + } +} diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/model/ProcessStepAndVolumeNum.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/model/ProcessStepAndVolumeNum.java deleted file mode 100644 index af91d51..0000000 --- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/model/ProcessStepAndVolumeNum.java +++ /dev/null @@ -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 processStepList; - - private List volumeStepList; - - public List getProcessStepList() { - return processStepList; - } - - public void setProcessStepList(List processStepList) { - this.processStepList = processStepList; - } - - public List getVolumeStepList() { - return volumeStepList; - } - - public void setVolumeStepList(List volumeStepList) { - this.volumeStepList = volumeStepList; - } -} diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/MtAloneProcessService.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/MtAloneProcessService.java index 9a1f736..aaa44ea 100644 --- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/MtAloneProcessService.java +++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/MtAloneProcessService.java @@ -20,5 +20,5 @@ public interface MtAloneProcessService extends Service void updateProcess(ProcessHo processHo); - List processStepListByProdprocid(ProductProcessParams params); + //List processStepListByProdprocid(ProductProcessParams params); } diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/ProductProcessBatchDetService.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/ProductProcessBatchDetService.java index 12440c0..e413497 100644 --- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/ProductProcessBatchDetService.java +++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/ProductProcessBatchDetService.java @@ -15,5 +15,7 @@ public interface ProductProcessBatchDetService extends Service findList(ProductProcessBatchDetParams params) ; - List volumeStepListByProdprocid(ProductProcessParams params); + //List volumeStepListByProdprocid(ProductProcessParams params); + + List findListByProductProcess(ProductProcessParams params); } diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/ProductProcessService.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/ProductProcessService.java index 95fdf0f..414ab00 100644 --- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/ProductProcessService.java +++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/ProductProcessService.java @@ -22,7 +22,7 @@ public interface ProductProcessService extends Service void addProduceProcess(ProductProcessHo productProcessHo, CurrentUser currentUser); - ProcessStepAndVolumeNum stepAndNumByProdprocid(ProductProcessParams params); + //ProcessAndDet stepAndNumByProdprocid(ProductProcessParams params); //void deleteRelevantById(Integer produceProcessId, CurrentUser currentUser); diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/impl/MtAloneProcessServiceImpl.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/impl/MtAloneProcessServiceImpl.java index 1e60800..ad5190d 100644 --- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/impl/MtAloneProcessServiceImpl.java +++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/impl/MtAloneProcessServiceImpl.java @@ -112,10 +112,10 @@ public class MtAloneProcessServiceImpl extends AbstractService processStepListByProdprocid(ProductProcessParams params) { - return mtAloneProcessMapper.processStepListByProdprocid(params); - } + //@Override + //public List processStepListByProdprocid(ProductProcessParams params) { + // return mtAloneProcessMapper.processStepListByProdprocid(params); + //} //设置下一道工序的前道工序处理状态 public void setNextProcessBeforeHandleStatus(MtAloneProcess currentProcess) { diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/impl/ProductProcessBatchDetServiceImpl.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/impl/ProductProcessBatchDetServiceImpl.java index ad995d5..fb9aaa6 100644 --- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/impl/ProductProcessBatchDetServiceImpl.java +++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/impl/ProductProcessBatchDetServiceImpl.java @@ -28,8 +28,13 @@ public class ProductProcessBatchDetServiceImpl extends AbstractService volumeStepListByProdprocid(ProductProcessParams params) { + // return productProcessBatchDetMapper.volumeStepListByProdprocid(params); + //} + @Override - public List volumeStepListByProdprocid(ProductProcessParams params) { - return productProcessBatchDetMapper.volumeStepListByProdprocid(params); + public List findListByProductProcess(ProductProcessParams params) { + return productProcessBatchDetMapper.findListByProductProcess(params); } } diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/impl/ProductProcessServiceImpl.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/impl/ProductProcessServiceImpl.java index feb61df..eba2c16 100644 --- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/impl/ProductProcessServiceImpl.java +++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/impl/ProductProcessServiceImpl.java @@ -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 processStepList = processService.processStepListByProdprocid(params); - List volumeStepList = productProcessBatchDetService.volumeStepListByProdprocid(params); - processStepAndVolumeNum.setProcessStepList(processStepList); - processStepAndVolumeNum.setVolumeStepList(volumeStepList); - return processStepAndVolumeNum; - } + //@Override + //public ProcessAndDet stepAndNumByProdprocid(ProductProcessParams params) { + // ProcessAndDet processAndDet = new ProcessAndDet(); + // List processStepList = processService.processStepListByProdprocid(params); + // List volumeStepList = productProcessBatchDetService.volumeStepListByProdprocid(params); + // processAndDet.setProcessStepList(processStepList); + // processAndDet.setVolumeStepList(volumeStepList); + // return processAndDet; + //} //@Override diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/ProductProcessBatchDetController.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/ProductProcessBatchDetController.java index bebd923..7f44c1c 100644 --- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/ProductProcessBatchDetController.java +++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/ProductProcessBatchDetController.java @@ -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 list = productProcessBatchDetService.findList(params); + List list = productProcessBatchDetService.findListByProductProcess(params); PageInfo pageInfo = new PageInfo(list); return ResultGenerator.genSuccessResult(pageInfo); } + } diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/ProductProcessController.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/ProductProcessController.java index c9144fb..43ec412 100644 --- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/ProductProcessController.java +++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/ProductProcessController.java @@ -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 processVoList = processService.findProcessVoListByProductProcess(params); + //获取明细 + List productProcessBatchDetList = productProcessBatchDetService.findListByProductProcess(params); + processAndDet.setProcessVoList(processVoList); + processAndDet.setProductProcessBatchDetList(productProcessBatchDetList); + return ResultGenerator.genSuccessResult(processAndDet); } - }