Merge branch 'weihongyang' of mengtong/mt-pms-api into master

This commit is contained in:
何勇 2020-01-16 16:20:48 +08:00 committed by Gitea
커밋 6b15aabe1f
11개의 변경된 파일119개의 추가작업 그리고 44개의 파일을 삭제

파일 보기

@ -25,4 +25,6 @@ public interface ProcessBomMapper extends Mapper<ProcessBom> {
void insertOrUpdate(List<ProcessBom> processBomList);
ProductProcessBomPo findProductAndProcessBomByProdBom(Integer productBomId);
Integer saveOrUpdate(ProcessBom processBom);
}

파일 보기

@ -24,12 +24,7 @@
</resultMap>
<resultMap id="ProcessBomDto" type="com.deer.wms.produce.manage.model.ProcessBomDto" extends="BaseResultMap">
<result column="product_name" jdbcType="VARCHAR" property="productName" />
<result column="product_specification" jdbcType="VARCHAR" property="productSpecification" />
<result column="unit_name" jdbcType="VARCHAR" property="unitName" />
<result column="product_process_name" jdbcType="VARCHAR" property="productProcessName" />
<result column="product_work_specification" jdbcType="VARCHAR" property="productWorkSpecification" />
<result column="process_content" jdbcType="VARCHAR" property="processContent" />
<result column="process_materials_id" jdbcType="INTEGER" property="processMaterialsId" />
<collection property="processMaterialsBomDtoList" ofType="com.deer.wms.produce.manage.model.ProcessMaterialsBomDto">
<result column="operator_id" jdbcType="INTEGER" property="operatorId" />
@ -46,6 +41,7 @@
<result column="memo" jdbcType="VARCHAR" property="memo" />
<result column="company_id" jdbcType="INTEGER" property="companyId" />
<result column="materials_name" jdbcType="VARCHAR" property="materialsName" />
<result column="process_materials_bom_id" jdbcType="INTEGER" property="processMaterialsBomId"/>
</collection>
</resultMap>
@ -74,7 +70,7 @@
<select id="findListById" resultMap="ProcessBomDto">
SELECT
mapb.id,mapb.process_name,mapb.process_apartment,mapb.process_step,mapb.process_content,mapab.code,mapab.specification,mapab.dosage,mami.materials_name,mamp.product_name,mamp.specification AS product_specification,u.unit_name,mappb.product_process_name,mapb.specification AS
product_work_specification,mapb.process_content
product_work_specification,mapab.id AS process_materials_id,mapab.id AS process_materials_bom_id,mapab.materials_id
FROM mt_alone_product_process_bom mappb
LEFT JOIN mt_alone_process_bom mapb ON mappb.id = mapb.product_process_id
LEFT JOIN mt_alone_process_materials_bom mapab ON mapb.id = mapab.process_bom_id
@ -182,4 +178,10 @@
</where> ORDER BY procbom.process_step
</select>
<insert id="saveOrUpdate" parameterType="com.deer.wms.produce.manage.model.ProcessBom" useGeneratedKeys="true" keyProperty="id">
REPLACE INTO mt_alone_process_bom
(id, update_time, process_name, product_process_id, process_content, process_step, process_apartment)
VALUES (#{id}, #{updateTime}, #{processName}, #{productProcessId}, #{processContent}, #{processStep}, #{processApartment})
</insert>
</mapper>

파일 보기

@ -97,8 +97,7 @@
</select>
<select id="findListByTerm" resultMap="ProPrcessBomDTOResultMap">
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
SELECT u.unit_name,mappb.id,mappb.product_process_name,mamp.product_code, mamp.product_name,mappb.specification AS work_specification,mamp.specification,mapb.process_content, COUNT(mapb.process_step) process_step
FROM mt_alone_product_process_bom mappb
LEFT JOIN mt_alone_machining_product mamp ON mappb.product_id = mamp.id
LEFT JOIN mt_alone_process_bom mapb ON mapb.product_process_id = mappb.id
@ -112,7 +111,7 @@
)
</if>
<if test="companyId != null">
AND mapb.company_id = #{companyId}
AND mappb.company_id = #{companyId}
</if>
</where>
GROUP BY mapb.product_process_id
@ -157,7 +156,7 @@
</select>
<select id="findDataById" resultMap="ProPrcessBomDTOResultMap">
SELECT mappb.id,mamp.id AS machining_product_id,mamp.product_name,mappb.specification,u.unit_name,mappb.product_process_name,mamp.specification AS work_specification,mappb.process_content
SELECT mappb.id,mamp.id AS machining_product_id,mamp.product_name,mappb.specification AS work_specification,u.unit_name,mappb.product_process_name,mamp.specification,mappb.process_content
FROM mt_alone_product_process_bom mappb
LEFT JOIN mt_alone_machining_product mamp ON mappb.product_id = mamp.id
LEFT JOIN unit u ON mamp.unit_id = u.unit_id

파일 보기

@ -90,6 +90,7 @@ public class MachiningProduct {
/**
* 规格
*/
@Column(name = "specification")
private String specification;
/**

파일 보기

@ -25,6 +25,26 @@ public class ProcessBomDto extends ProcessBom{
private String processContent;
private Integer processId;
private Integer processMaterialsId;
public Integer getProcessMaterialsId() {
return processMaterialsId;
}
public void setProcessMaterialsId(Integer processMaterialsId) {
this.processMaterialsId = processMaterialsId;
}
public Integer getProcessId() {
return processId;
}
public void setProcessId(Integer processId) {
this.processId = processId;
}
public String getProductName() {
return productName;
}

파일 보기

@ -62,6 +62,8 @@ public class ProcessBomParams extends QueryParams {
*/
private List<ProcessMaterialsBomParams> processMaterialsBomParamsList;
private Integer processId;
@Override
public String toString() {
return "ProcessBomParams{" +
@ -77,10 +79,19 @@ public class ProcessBomParams extends QueryParams {
", processApartment='" + processApartment + '\'' +
", processName='" + processName + '\'' +
", processMaterialsBomParamsList=" + processMaterialsBomParamsList +
", processId=" + processId +
", processBomVoList=" + processBomVoList +
'}';
}
public Integer getProcessId() {
return processId;
}
public void setProcessId(Integer processId) {
this.processId = processId;
}
public List<ProcessMaterialsBomParams> getProcessMaterialsBomParamsList() {
return processMaterialsBomParamsList;
}

파일 보기

@ -19,6 +19,28 @@ public class ProcessMaterialsBomDto extends ProcessMaterialsBom {
private String companyName;
private Integer processMaterialsBomId;
private Integer materialsId;
@Override
public Integer getMaterialsId() {
return materialsId;
}
@Override
public void setMaterialsId(Integer materialsId) {
this.materialsId = materialsId;
}
public Integer getProcessMaterialsBomId() {
return processMaterialsBomId;
}
public void setProcessMaterialsBomId(Integer processMaterialsBomId) {
this.processMaterialsBomId = processMaterialsBomId;
}
public Integer getProductProcessId() {
return productProcessId;
}

파일 보기

@ -46,6 +46,10 @@ public class ProcessMaterialsBomParams extends QueryParams {
*/
private Double dosage;
private Integer processMaterialsBomId;
private Integer unitId;
@Override
public String toString() {
return "ProcessMaterialsBomParams{" +
@ -60,6 +64,22 @@ public class ProcessMaterialsBomParams extends QueryParams {
'}';
}
public Integer getUnitId() {
return unitId;
}
public void setUnitId(Integer unitId) {
this.unitId = unitId;
}
public Integer getProcessMaterialsBomId() {
return processMaterialsBomId;
}
public void setProcessMaterialsBomId(Integer processMaterialsBomId) {
this.processMaterialsBomId = processMaterialsBomId;
}
public Integer getId() {
return id;
}

파일 보기

@ -60,7 +60,7 @@ public class ProductProcessBomParams extends QueryParams {
private Integer machiningProductId;
private String memo;
@Override
public String toString() {
@ -78,6 +78,14 @@ public class ProductProcessBomParams extends QueryParams {
'}';
}
public String getMemo() {
return memo;
}
public void setMemo(String memo) {
this.memo = memo;
}
public Integer getMachiningProductId() {
return machiningProductId;
}

파일 보기

@ -68,23 +68,24 @@ public class ProductProcessBomServiceImpl extends AbstractService<ProductProcess
ProductProcessBom productProcessBom = new ProductProcessBom();
productProcessBom.setCreateTime(params.getCreateTime());
productProcessBom.setCompanyId(params.getCompanyId());
productProcessBom.setSpecification(params.getSpecification());
productProcessBom.setSpecification(params.getWorkSpecification());
productProcessBom.setProductId(params.getProductId());
productProcessBom.setProcessContent(params.getProcessContent());
productProcessBom.setProductProcessName(params.getProductProcessName());
productProcessBomMapper.insert(productProcessBom);
productProcessBomMapper.insertSelective(productProcessBom);
for (ProcessBomParams processBomParams:params.getProcessBomParamsList()) {
ProcessBom processBom = new ProcessBom();
processBom.setCreateTime(new Date());
processBom.setProcessName(processBomParams.getProcessName());
processBom.setProductProcessId(productProcessBom.getId());
processBom.setSpecification(params.getSpecification());
processBom.setProcessContent(params.getProcessContent());
processBom.setSpecification(processBomParams.getSpecification());
processBom.setProcessContent(processBomParams.getProcessContent());
processBom.setProcessStep(processBomParams.getProcessStep());
processBom.setMemo(processBomParams.getMemo());
processBom.setCompanyId(params.getCompanyId());
processBom.setProcessApartment(processBomParams.getProcessApartment());
processBomMapper.insert(processBom);
processBomMapper.insertSelective(processBom);
for (ProcessMaterialsBomParams processMaterialsBomParams:processBomParams.getProcessMaterialsBomParamsList()) {
processMaterialsBomParams.setProcessBomId(processBom.getId());
}
@ -97,9 +98,11 @@ public class ProductProcessBomServiceImpl extends AbstractService<ProductProcess
processMaterialsBom.setProcessBomId(processMaterialsBomParams.getProcessBomId());
processMaterialsBom.setMaterialsId(processMaterialsBomParams.getMaterialsId());
processMaterialsBom.setCode(processMaterialsBomParams.getCode());
processMaterialsBom.setSpecification(params.getSpecification());
processMaterialsBom.setSpecification(processMaterialsBomParams.getSpecification());
processMaterialsBom.setDosage(processMaterialsBomParams.getDosage().floatValue());
processMaterialsBom.setUnitId(processMaterialsBomParams.getUnitId());
processMaterialsBom.setCompanyId(params.getCompanyId());
processMaterialsBomList.add(processMaterialsBom);
}
}
@ -109,21 +112,18 @@ public class ProductProcessBomServiceImpl extends AbstractService<ProductProcess
@Override
public void updateProductProcessBom(ProductProcessBomParams params) {
System.out.println(params.toString());
ProductProcessBom productProcessBom = new ProductProcessBom();
productProcessBom.setId(params.getId());
productProcessBom.setSpecification(params.getSpecification());
productProcessBom.setSpecification(params.getWorkSpecification());
productProcessBom.setProcessContent(params.getProcessContent());
productProcessBom.setProductProcessName(params.getProductProcessName());
productProcessBomMapper.updateByPrimaryKeySelective(productProcessBom);
MachiningProduct machiningProduct = new MachiningProduct();
machiningProduct.setSpecification(params.getWorkSpecification());
machiningProduct.setId(params.getMachiningProductId());
machiningProductMapper.updateByPrimaryKeySelective(machiningProduct);
List<ProcessBom> processBomList = new ArrayList<>();
for (ProcessBomParams processBomParams:params.getProcessBomParamsList()) {
ProcessBom processBom = new ProcessBom();
processBom.setId(processBomParams.getId());
processBom.setId(processBomParams.getProcessId());
processBom.setUpdateTime(new Date());
processBom.setProcessName(processBomParams.getProcessName());
processBom.setProductProcessId(processBomParams.getProductProcessId());
@ -131,21 +131,27 @@ public class ProductProcessBomServiceImpl extends AbstractService<ProductProcess
processBom.setProcessContent(processBomParams.getProcessContent());
processBom.setProcessStep(processBomParams.getProcessStep());
processBom.setProcessApartment(processBomParams.getProcessApartment());
processBomList.add(processBom);
processBomMapper.saveOrUpdate(processBom);
System.out.println("id="+ processBom.getId());
for (ProcessMaterialsBomParams processMaterialsBomParams:processBomParams.getProcessMaterialsBomParamsList()) {
processMaterialsBomParams.setProcessBomId(processBom.getId());
}
// processBomList.add(processBom);
}
processBomMapper.insertOrUpdate(processBomList);
// processBomMapper.insertOrUpdate(processBomList);
List<ProcessMaterialsBom> processMaterialsBomList = new ArrayList<>();
for (int i=0;i<params.getProcessBomParamsList().size();i++) {
for (ProcessMaterialsBomParams processMaterialsBomParams:params.getProcessBomParamsList().get(i).getProcessMaterialsBomParamsList()){
ProcessMaterialsBom processMaterialsBom = new ProcessMaterialsBom();
processMaterialsBom.setId(processMaterialsBomParams.getId());
processMaterialsBom.setId(processMaterialsBomParams.getProcessMaterialsBomId());
processMaterialsBom.setUpdateTime(new Date());
processMaterialsBom.setProcessBomId(processMaterialsBomParams.getProcessBomId());
processMaterialsBom.setMaterialsId(processMaterialsBomParams.getMaterialsId());
processMaterialsBom.setCode(processMaterialsBomParams.getCode());
processMaterialsBom.setSpecification(params.getSpecification());
processMaterialsBom.setSpecification(processMaterialsBomParams.getSpecification());
processMaterialsBom.setDosage(processMaterialsBomParams.getDosage().floatValue());
processMaterialsBom.setUnitId(processMaterialsBomParams.getUnitId());
processMaterialsBomList.add(processMaterialsBom);
}
}

파일 보기

@ -1,16 +0,0 @@
package com.deer.wms.produce.manage.web;
/**
* @Author: weihongyang
* @Date: 2019/10/18 16:54
* @Version 1.0
*/
public class Test {
public static void main(String[] args){
String s = "qwe";
int i = 1;
s = s + i;
System.out.println(s);
}
}