diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 2718949..a14e223 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -5,32 +5,32 @@ - - + + - - + + - - - + + + + + + + - - - - + - - + + - + + - - @@ -77,125 +77,118 @@ - - + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -208,9 +201,6 @@ - materialsOutgoingLogDTOService - ProductDetDto - ProductCombinationMap MtAloneProductBatchDetectDet mtAlone MtAlone @@ -219,7 +209,6 @@ MaterialsOutgoingLogDto materialsInfo setMaterialsId - unit mapperscan mapper currentUser @@ -238,6 +227,10 @@ logging.ipdb.path productprocesspo findProductProcessPoById + materialsId + tempStock + MtAloneProcessParams + unit ProductBatchDetectDet @@ -264,27 +257,12 @@ @@ -395,9 +388,9 @@ - - + + @@ -460,6 +453,27 @@ + + + + + + + + + + + + + + + + + + + + + @@ -470,11 +484,26 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/mapper/ProcessMaterialsMapper.xml b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/mapper/ProcessMaterialsMapper.xml index 40861e8..8207ac6 100644 --- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/mapper/ProcessMaterialsMapper.xml +++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/mapper/ProcessMaterialsMapper.xml @@ -18,8 +18,41 @@ - + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/model/MaterialsOutgoingLog.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/model/MaterialsOutgoingLog.java index fefa6fa..534d801 100644 --- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/model/MaterialsOutgoingLog.java +++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/model/MaterialsOutgoingLog.java @@ -59,6 +59,12 @@ public class MaterialsOutgoingLog { @Column(name = "position_name") private String positionName; + /** + * 单位id, 关联表:unit + */ + @Column(name = "unit_id") + private Integer unitId; + /** * 备注 */ @@ -274,4 +280,22 @@ public class MaterialsOutgoingLog { public void setCompanyId(Integer companyId) { this.companyId = companyId; } + + /** + * 获取单位id + * + * @return unit_Id - 单位id + */ + public Integer getUnitId() { + return unitId; + } + + /** + * 设置单位id + * + * @param unitId 单位id + */ + public void setUnitId(Integer unitId) { + this.unitId = unitId; + } } \ No newline at end of file diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/model/MaterialsOutgoingLogDto.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/model/MaterialsOutgoingLogDto.java index 1d66966..607113b 100644 --- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/model/MaterialsOutgoingLogDto.java +++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/model/MaterialsOutgoingLogDto.java @@ -1,6 +1,7 @@ package com.deer.wms.produce.manage.model; /** + * 暂时没用 * @Author: hy * @Date: 2019/8/20 11:23 * @Version 1.0 diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/model/MtAloneProcess.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/model/MtAloneProcess.java index 2421099..3b16a5c 100644 --- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/model/MtAloneProcess.java +++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/model/MtAloneProcess.java @@ -156,6 +156,18 @@ public class MtAloneProcess { @Column(name = "company_id") private Integer companyId; + /** + * 工序开始日期 + */ + @Column(name = "beg_date") + private Date begDate; + + /** + * 工序完成日期 + */ + @Column(name = "end_date") + private Date endDate; + /** * @return id */ @@ -634,4 +646,40 @@ public class MtAloneProcess { public void setProcessBomName(String processBomName) { this.processBomName = processBomName; } + + /** + * 获取工序开始日期 + * + * @return beg_date - 工序开始日期 + */ + public Date getBegDate() { + return begDate; + } + + /** + * 设置工序开始日期 + * + * @param begDate 工序开始日期 + */ + public void setBegDate(Date begDate) { + this.begDate = begDate; + } + + /** + * 获取工序完成日期 + * + * @return end_date - 工序完成日期 + */ + public Date getEndDate() { + return endDate; + } + + /** + * 设置工序完成日期 + * + * @param endDate 工序完成日期 + */ + public void setEndDate(Date endDate) { + this.endDate = endDate; + } } \ No newline at end of file diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/model/MtAloneProcessParams.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/model/MtAloneProcessParams.java index 99f37c9..1847ab7 100644 --- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/model/MtAloneProcessParams.java +++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/model/MtAloneProcessParams.java @@ -6,9 +6,18 @@ import com.deer.wms.project.seed.core.service.QueryParams; * Created by hy on 2019/07/19. */ public class MtAloneProcessParams extends QueryParams { + private Integer processId; private Integer productBomId; + public Integer getProcessId() { + return processId; + } + + public void setProcessId(Integer processId) { + this.processId = processId; + } + public Integer getProductBomId() { return productBomId; } diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/model/ProcessAndMaterials.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/model/ProcessAndMaterials.java new file mode 100644 index 0000000..66e9195 --- /dev/null +++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/model/ProcessAndMaterials.java @@ -0,0 +1,30 @@ +package com.deer.wms.produce.manage.model; + +/** + *同时获取工序信息和物料信息 + * @Author: hy + * @Date: 2019/12/19 20:13 + * @Version 1.0 + */ +public class ProcessAndMaterials { + + private MtAloneProcessVo processVo;//工序扩展信息 + + private ProcessMaterialsVo[] processMaterialsVo;//物料扩展信息 + + public MtAloneProcessVo getProcessVo() { + return processVo; + } + + public void setProcessVo(MtAloneProcessVo processVo) { + this.processVo = processVo; + } + + public ProcessMaterialsVo[] getProcessMaterialsVo() { + return processMaterialsVo; + } + + public void setProcessMaterialsVo(ProcessMaterialsVo[] processMaterialsVo) { + this.processMaterialsVo = processMaterialsVo; + } +} diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/model/ProcessMaterials.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/model/ProcessMaterials.java index ee3d4a6..62f4814 100644 --- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/model/ProcessMaterials.java +++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/model/ProcessMaterials.java @@ -76,11 +76,6 @@ public class ProcessMaterials { @Column(name = "unit_id") private Integer unitId; - /** - * 单位名称 - */ - @Column(name = "unit_name") - private String unitName; /** * 备注 @@ -320,24 +315,6 @@ public class ProcessMaterials { this.unitId = unitId; } - /** - * 获取单位名称 - * - * @return unit_name - 单位名称 - */ - public String getUnitName() { - return unitName; - } - - /** - * 设置单位名称 - * - * @param unitName 单位名称 - */ - public void setUnitName(String unitName) { - this.unitName = unitName; - } - /** * 获取备注 * diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/model/ProcessMaterialsVo.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/model/ProcessMaterialsVo.java new file mode 100644 index 0000000..be61507 --- /dev/null +++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/model/ProcessMaterialsVo.java @@ -0,0 +1,18 @@ +package com.deer.wms.produce.manage.model; + +/** + * @Author: hy + * @Date: 2019/12/21 17:33 + * @Version 1.0 + */ +public class ProcessMaterialsVo extends ProcessMaterials { + private String unitName0; + + public String getUnitName0() { + return unitName0; + } + + public void setUnitName0(String unitName0) { + this.unitName0 = unitName0; + } +} diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/model/ProcessParams.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/model/ProcessParams.java deleted file mode 100644 index 236b3fb..0000000 --- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/model/ProcessParams.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.deer.wms.produce.manage.model; - -import com.deer.wms.project.seed.core.service.QueryParams; - -/** -* Created by hy on 2019/07/19. -*/ -public class ProcessParams extends QueryParams { -} diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/model/ProductAndProcess.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/model/ProductAndProcess.java index 4cad2a4..c7d211b 100644 --- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/model/ProductAndProcess.java +++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/model/ProductAndProcess.java @@ -4,15 +4,15 @@ import java.util.ArrayList; import java.util.List; /** - * 从前端同时获取批次产品加工信息和工序信息 + * 同时获取批次产品加工信息和工序信息 * @Author: hy * @Date: 2019/10/30 22:52 * @Version 1.0 */ public class ProductAndProcess { - private ProductProcess productProcess; + private ProductProcess productProcess;//批次生产加工信息 - private MtAloneProcessVo[] processesVo; + private MtAloneProcessVo[] processesVo;//工序扩展信息 public ProductProcess getProductProcess() { return productProcess; diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/MaterialsOutgoingLogService.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/MaterialsOutgoingLogService.java index de9c694..674b6ca 100644 --- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/MaterialsOutgoingLogService.java +++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/MaterialsOutgoingLogService.java @@ -18,5 +18,5 @@ public interface MaterialsOutgoingLogService extends Service findListByOneMaterial(MaterialsOutgoingLogParams params) ; - void save(MaterialsOutgoingLogDto materialsOutgoingLogDto, CurrentUser currentUser); + void save(MaterialsOutgoingLog materialsOutgoingLog, CurrentUser currentUser); } 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 4e601e5..b60086e 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 @@ -11,7 +11,9 @@ import java.util.List; public interface MtAloneProcessService extends Service { List findProcessListByProductBom(ProcessBomParams params); - List findProcessListByProductProcess(ProductProcessParams params); + List findProcessVoListByProductProcess(ProductProcessParams params); + + ProcessAndMaterials queryProcessDetail(MtAloneProcessParams params); //List findList(MtAloneProcessParams params) ; diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/ProcessMaterialsService.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/ProcessMaterialsService.java index 5843e27..9cfdf3e 100644 --- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/ProcessMaterialsService.java +++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/ProcessMaterialsService.java @@ -1,7 +1,9 @@ package com.deer.wms.produce.manage.service; +import com.deer.wms.produce.manage.model.MtAloneProcessParams; import com.deer.wms.produce.manage.model.ProcessMaterials; import com.deer.wms.produce.manage.model.ProcessMaterialsParams; +import com.deer.wms.produce.manage.model.ProcessMaterialsVo; import com.deer.wms.project.seed.core.service.Service; import java.util.List; @@ -10,6 +12,7 @@ import java.util.List; * Created by hy on 2019/07/19. */ public interface ProcessMaterialsService extends Service { + List findProcMatVoListByProcess(MtAloneProcessParams params); //List findList(ProcessMaterialsParams params) ; diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/impl/MaterialsOutgoingLogServiceImpl.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/impl/MaterialsOutgoingLogServiceImpl.java index 6b05283..90673e0 100644 --- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/impl/MaterialsOutgoingLogServiceImpl.java +++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/impl/MaterialsOutgoingLogServiceImpl.java @@ -6,6 +6,7 @@ import com.deer.wms.produce.manage.dao.MaterialsOutgoingLogMapper; import com.deer.wms.produce.manage.dao.MaterialsStockInfoMapper; import com.deer.wms.produce.manage.model.*; import com.deer.wms.produce.manage.service.MaterialsOutgoingLogService; +import com.deer.wms.produce.manage.service.MaterialsStockInfoService; import com.deer.wms.project.seed.core.service.AbstractService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -25,7 +26,7 @@ public class MaterialsOutgoingLogServiceImpl extends AbstractService findProcessListByProductBom(ProcessBomParams params) { //通过产品bom获取工序bom @@ -35,12 +40,7 @@ public class MtAloneProcessServiceImpl extends AbstractService findProcessListByProductProcess(ProductProcessParams params) { - return mtAloneProcessMapper.findProcessListByProductProcess(params); + public List findProcessVoListByProductProcess(ProductProcessParams params) { + return mtAloneProcessMapper.findProcessVoListByProductProcess(params); + } + + /*接着写*/ + @Override + public ProcessAndMaterials queryProcessDetail(MtAloneProcessParams params) { + //根据工序id查询工序详细信息 + MtAloneProcessVo processVo = (MtAloneProcessVo) mtAloneProcessMapper.selectProcessVoByProcessId(params); + + //根据工序id查询物料信息 + List processMaterialsVoList = processMaterialsService.findProcMatVoListByProcess(params); + + ProcessAndMaterials processAndMaterials = new ProcessAndMaterials(); + processAndMaterials.setProcessVo(processVo); + if(null != processMaterialsVoList) { + ProcessMaterialsVo[] processMaterialsVo = new ProcessMaterialsVo[processMaterialsVoList.size()]; + for (int i = 0; i < processMaterialsVo.length; i++) { + processMaterialsVo[i] = processMaterialsVoList.get(i); + } + processAndMaterials.setProcessMaterialsVo(processMaterialsVo); + } + + + return processAndMaterials; } diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/impl/ProcessMaterialsServiceImpl.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/impl/ProcessMaterialsServiceImpl.java index 08cb787..9a9cdfa 100644 --- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/impl/ProcessMaterialsServiceImpl.java +++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/service/impl/ProcessMaterialsServiceImpl.java @@ -1,8 +1,10 @@ package com.deer.wms.produce.manage.service.impl; import com.deer.wms.produce.manage.dao.ProcessMaterialsMapper; +import com.deer.wms.produce.manage.model.MtAloneProcessParams; import com.deer.wms.produce.manage.model.ProcessMaterials; import com.deer.wms.produce.manage.model.ProcessMaterialsParams; +import com.deer.wms.produce.manage.model.ProcessMaterialsVo; import com.deer.wms.produce.manage.service.ProcessMaterialsService; import com.deer.wms.project.seed.core.service.AbstractService; import org.springframework.beans.factory.annotation.Autowired; @@ -21,6 +23,11 @@ public class ProcessMaterialsServiceImpl extends AbstractService findProcMatVoListByProcess(MtAloneProcessParams params) { + return processMaterialsMapper.findProcMatVoListByProcess(params); + } + //@Override //public List findList(ProcessMaterialsParams 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 ac09bd9..c3eb334 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 @@ -89,14 +89,14 @@ public class ProductProcessServiceImpl extends AbstractService processList = processService.findProcessListByProductProcess(params); + List processVoList = processService.findProcessVoListByProductProcess(params); ProductAndProcess productAndProcess = new ProductAndProcess(); productAndProcess.setProductProcess(productProcess); - if(null != processList) { - MtAloneProcessVo[] processesVo = new MtAloneProcessVo[processList.size()]; + if(null != processVoList) { + MtAloneProcessVo[] processesVo = new MtAloneProcessVo[processVoList.size()]; for (int i = 0; i < processesVo.length; i++) { - processesVo[i] = processList.get(i); + processesVo[i] = processVoList.get(i); } productAndProcess.setProcessesVo(processesVo); } diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/MaterialsInfoController.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/MaterialsInfoController.java index d600fe9..6ce0bff 100644 --- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/MaterialsInfoController.java +++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/MaterialsInfoController.java @@ -115,12 +115,12 @@ public class MaterialsInfoController { @ApiOperation(value = "获取某种物料详细信息", notes = "获取某种物料详细信息") @GetMapping("/detail") public Result detail(MaterialsInfoParams params, @ApiIgnore @User CurrentUser currentUser) { - //if(currentUser==null){ - // return ResultGenerator.genFailResult(CommonCode.SERVICE_ERROR,"未登录错误",null ); - //} - //StringUtil.trimObjectStringProperties(params); + if(currentUser==null){ + return ResultGenerator.genFailResult(CommonCode.SERVICE_ERROR,"未登录错误",null ); + } + StringUtil.trimObjectStringProperties(params); - params.setCompanyId(1); + params.setCompanyId(currentUser.getCompanyId()); MaterialsInfoDto materialsInfoDto = materialsInfoService.findDetailById(params); return ResultGenerator.genSuccessResult(materialsInfoDto); } diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/MaterialsOutgoingLogController.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/MaterialsOutgoingLogController.java index 85db252..2635a2b 100644 --- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/MaterialsOutgoingLogController.java +++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/MaterialsOutgoingLogController.java @@ -10,6 +10,7 @@ import com.deer.wms.project.seed.annotation.OperateLog; 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.project.seed.util.StringUtil; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import io.swagger.annotations.Api; @@ -41,24 +42,24 @@ public class MaterialsOutgoingLogController { //private MaterialsOutgoingLogDTOService materialsOutgoingLogDTOService; /** - * hy - * 添加一条出入库记录,同时更新对应的库存信息 - * @param materialsOutgoingLogDto + * hy正在用 + * 出入库操作,添加一条出入库记录,同时更新对应的库存信息 + * @param materialsOutgoingLog * @param currentUser * @return */ @ApiImplicitParams({ - @ApiImplicitParam(name = "materialsOutgoingLogDto", value = "物料出入库", paramType = "body", dataType = "MaterialsOutgoingLogDto", required = true) + @ApiImplicitParam(name = "materialsOutgoingLog", value = "物料出入库", paramType = "body", dataType = "MaterialsOutgoingLog", required = true) }) @OperateLog(description = "添加一条出入库记录", type = "增加") @ApiOperation(value = "添加一条出入库记录", notes = "添加一条出入库记录") @PostMapping("/add") - public Result add(@RequestBody MaterialsOutgoingLogDto materialsOutgoingLogDto, @ApiIgnore @User CurrentUser currentUser) { + public Result add(@RequestBody MaterialsOutgoingLog materialsOutgoingLog, @ApiIgnore @User CurrentUser currentUser) { if(currentUser==null){ return ResultGenerator.genFailResult( CommonCode.SERVICE_ERROR,"未登录错误",null ); } - materialsOutgoingLogService.save(materialsOutgoingLogDto, currentUser); + materialsOutgoingLogService.save(materialsOutgoingLog, currentUser); return ResultGenerator.genSuccessResult(); } @@ -86,7 +87,7 @@ public class MaterialsOutgoingLogController { } /** - * hy + * hy正在用 * 获取某种物料的所有出入库记录 * @param params * @param currentUser diff --git a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/MtAloneProcessController.java b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/MtAloneProcessController.java index 2f07347..9b62c26 100644 --- a/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/MtAloneProcessController.java +++ b/wms-produce-manage/src/main/java/com/deer/wms/produce/manage/web/MtAloneProcessController.java @@ -14,6 +14,8 @@ import com.deer.wms.project.seed.core.result.ResultGenerator; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -82,6 +84,7 @@ public class MtAloneProcessController { /** * hy + * 暂时没用 * 用于批次生产加工新建页面下方的工序列表展示,获取工序bom和工序,如果没有工序则新建对应的工序并初步赋值 * @param params * @param currentUser @@ -113,8 +116,35 @@ public class MtAloneProcessController { params.setCompanyId(1); PageHelper.startPage(params.getPageNum(), params.getPageSize()); - List list = mtAloneProcessService.findProcessListByProductProcess(params); + List list = mtAloneProcessService.findProcessVoListByProductProcess(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 = "processId", value = "工序id", paramType = "query", dataType = "int", required = true), + @ApiImplicitParam(name = "companyId", value = "公司id", paramType = "query", dataType = "int", required = false) + + }) + @OperateLog(description = "根据工序id查询工序详情及物料信息", type = "查询") + @GetMapping("/query/process/detail") + public Result queryProcessDetail(MtAloneProcessParams params, @ApiIgnore @User CurrentUser currentUser) { + //if(currentUser==null){ + // return ResultGenerator.genFailResult(CommonCode.SERVICE_ERROR,"未登录错误",null ); + //} + + params.setCompanyId(1); + PageHelper.startPage(params.getPageNum(), params.getPageSize()); + ProcessAndMaterials processAndMaterials = mtAloneProcessService.queryProcessDetail(params); + return ResultGenerator.genSuccessResult(processAndMaterials); + } } 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 f196e77..5f3df4a 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 @@ -124,9 +124,9 @@ public class ProductProcessController { @OperateLog(description = "批次生产加工及工序保存", type = "保存") @PostMapping("/saveProdAndProc") public Result saveProdAndProc(@RequestBody ProductAndProcess productAndProcess, @ApiIgnore @User CurrentUser currentUser) { - //if(currentUser==null){ - // return ResultGenerator.genFailResult(CommonCode.SERVICE_ERROR,"未登录错误",null ); - //} + if(currentUser==null){ + return ResultGenerator.genFailResult(CommonCode.SERVICE_ERROR,"未登录错误",null ); + } productProcessService.saveProdAndProc(productAndProcess, currentUser); return ResultGenerator.genSuccessResult(); @@ -135,7 +135,8 @@ public class ProductProcessController { /** * hy正在用 - * 点击批次生产加工单列表最后一列详情按钮,查询批次生产加工单详情 + * 点击批次生产加工单列表最后一列查看或处理按钮, + * 获取该批次生产加工单详情 * @param params * @param currentUser * @return