增加产品bom字段

This commit is contained in:
weihongyang 2020-01-03 10:27:02 +08:00
parent b8c8a97523
commit a7a4df7db1
5 changed files with 19 additions and 10 deletions

View File

@ -8,6 +8,10 @@
<packaging>pom</packaging> <packaging>pom</packaging>
<version>1.0.0-SNAPSHOT</version> <version>1.0.0-SNAPSHOT</version>
<modules>
<module>wms-produce-manage</module>
</modules>
<parent> <parent>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId> <artifactId>spring-boot-starter-parent</artifactId>
@ -15,9 +19,6 @@
<relativePath/> <relativePath/>
</parent> </parent>
<modules>
<module>wms-produce-manage</module>
</modules>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

View File

@ -106,7 +106,7 @@
</select> </select>
<select id="findListByTerm" resultMap="ProPrcessBomDTOResultMap"> <select id="findListByTerm" resultMap="ProPrcessBomDTOResultMap">
SELECT u.unit_name,mappb.id,mamp.product_code, mamp.product_name,mamp.specification,mapb.specification AS SELECT u.unit_name,mappb.id,mappb.product_process_name,mamp.product_code, mamp.product_name,mamp.specification,mapb.specification AS
work_specification,mapb.process_content, COUNT(mapb.process_step) process_step work_specification,mapb.process_content, COUNT(mapb.process_step) process_step
FROM mt_alone_product_process_bom mappb FROM mt_alone_product_process_bom mappb
LEFT JOIN mt_alone_machining_product mamp ON mappb.product_id = mamp.id LEFT JOIN mt_alone_machining_product mamp ON mappb.product_id = mamp.id

View File

@ -28,6 +28,9 @@ public class ProductProcessBomParams extends QueryParams {
private String productNum; private String productNum;
private String productProcessName;
/** /**
*添加时间 *添加时间
@ -148,4 +151,12 @@ public class ProductProcessBomParams extends QueryParams {
public void setProductBomId(String productBomId) { public void setProductBomId(String productBomId) {
this.productBomId = productBomId; this.productBomId = productBomId;
} }
public String getProductProcessName() {
return productProcessName;
}
public void setProductProcessName(String productProcessName) {
this.productProcessName = productProcessName;
}
} }

View File

@ -61,6 +61,7 @@ public class ProductProcessBomServiceImpl extends AbstractService<ProductProcess
productProcessBom.setSpecification(params.getSpecification()); productProcessBom.setSpecification(params.getSpecification());
productProcessBom.setProductId(params.getProductId()); productProcessBom.setProductId(params.getProductId());
productProcessBom.setProcessContent(params.getProcessContent()); productProcessBom.setProcessContent(params.getProcessContent());
productProcessBom.setProductProcessName(params.getProductProcessName());
productProcessBomMapper.insert(productProcessBom); productProcessBomMapper.insert(productProcessBom);
for (ProcessBomParams processBomParams:params.getProcessBomParamsList()) { for (ProcessBomParams processBomParams:params.getProcessBomParamsList()) {
ProcessBom processBom = new ProcessBom(); ProcessBom processBom = new ProcessBom();
@ -107,7 +108,7 @@ public class ProductProcessBomServiceImpl extends AbstractService<ProductProcess
for (ProcessBomParams processBomParams:params.getProcessBomParamsList()) { for (ProcessBomParams processBomParams:params.getProcessBomParamsList()) {
ProcessBom processBom = new ProcessBom(); ProcessBom processBom = new ProcessBom();
processBom.setId(processBomParams.getId()); processBom.setId(processBomParams.getId());
processBom.setCreateTime(processBomParams.getCreateTime()); processBom.setUpdateTime(new Date());
processBom.setProcessName(processBomParams.getProcessName()); processBom.setProcessName(processBomParams.getProcessName());
processBom.setProductProcessId(processBomParams.getProductProcessId()); processBom.setProductProcessId(processBomParams.getProductProcessId());
processBom.setSpecification(processBomParams.getSpecification()); processBom.setSpecification(processBomParams.getSpecification());
@ -123,7 +124,7 @@ public class ProductProcessBomServiceImpl extends AbstractService<ProductProcess
for (ProcessMaterialsBomParams processMaterialsBomParams:params.getProcessBomParamsList().get(i).getProcessMaterialsBomParamsList()){ for (ProcessMaterialsBomParams processMaterialsBomParams:params.getProcessBomParamsList().get(i).getProcessMaterialsBomParamsList()){
ProcessMaterialsBom processMaterialsBom = new ProcessMaterialsBom(); ProcessMaterialsBom processMaterialsBom = new ProcessMaterialsBom();
processMaterialsBom.setId(processMaterialsBomParams.getId()); processMaterialsBom.setId(processMaterialsBomParams.getId());
processMaterialsBom.setCreateTime(new Date()); processMaterialsBom.setUpdateTime(new Date());
processMaterialsBom.setProcessBomId(processMaterialsBomParams.getProcessBomId()); processMaterialsBom.setProcessBomId(processMaterialsBomParams.getProcessBomId());
processMaterialsBom.setMaterialsId(processMaterialsBomParams.getMaterialsId()); processMaterialsBom.setMaterialsId(processMaterialsBomParams.getMaterialsId());
processMaterialsBom.setCode(processMaterialsBomParams.getCode()); processMaterialsBom.setCode(processMaterialsBomParams.getCode());

View File

@ -85,10 +85,6 @@ public class ProductProcessBomController {
} }
productProcessBomParams.setCreateTime(new Date()); productProcessBomParams.setCreateTime(new Date());
productProcessBomParams.setCompanyId(currentUser.getCompanyId()); productProcessBomParams.setCompanyId(currentUser.getCompanyId());
// productProcessBomParams.setProductId(1);
// productProcessBomParams.setProcessContent("1");
// productProcessBomParams.setSpecification("1");
productProcessBomService.updateProductProcessBom(productProcessBomParams); productProcessBomService.updateProductProcessBom(productProcessBomParams);
return ResultGenerator.genSuccessResult(); return ResultGenerator.genSuccessResult();
} }