Commit e7752899 by 江和松

Merge remote-tracking branch 'origin/dev' into dev

parents bd0f7c51 0b3344a6
...@@ -15,7 +15,7 @@ import com.baosight.iplat4j.core.util.StringUtils; ...@@ -15,7 +15,7 @@ import com.baosight.iplat4j.core.util.StringUtils;
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br> * Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
* *
* @version 1.0 * @version 1.0
* @history 2024-05-17 17:03:29 create * @history 2024-05-17 17:15:03 create
*/ */
public class HGSC005A extends DaoEPBase { public class HGSC005A extends DaoEPBase {
...@@ -95,7 +95,7 @@ public class HGSC005A extends DaoEPBase { ...@@ -95,7 +95,7 @@ public class HGSC005A extends DaoEPBase {
private Long techFlowId = new Long(0); /* 工艺流程ID*/ private Long techFlowId = new Long(0); /* 工艺流程ID*/
private Long techFlowName = new Long(0); /* 工艺流程名称*/ private Long techFlowName = new Long(0); /* 工艺流程名称*/
private Long inventProcessId = new Long(0); /* 存货工序ID,对应HGPZ005A.id*/ private Long inventProcessId = new Long(0); /* 存货工序ID,对应HGPZ005A.id*/
private Long processName = new Long(0); /* 工序名称*/ private String processName = " "; /* 工序名称*/
private String companyCode = " "; /* 公司编码*/ private String companyCode = " "; /* 公司编码*/
private String companyName = " "; /* 公司名称*/ private String companyName = " "; /* 公司名称*/
private String depCode = " "; /* 部门编码*/ private String depCode = " "; /* 部门编码*/
...@@ -357,7 +357,7 @@ public class HGSC005A extends DaoEPBase { ...@@ -357,7 +357,7 @@ public class HGSC005A extends DaoEPBase {
* get the processName - 工序名称. * get the processName - 工序名称.
* @return the processName * @return the processName
*/ */
public Long getProcessName() { public String getProcessName() {
return this.processName; return this.processName;
} }
...@@ -366,7 +366,7 @@ public class HGSC005A extends DaoEPBase { ...@@ -366,7 +366,7 @@ public class HGSC005A extends DaoEPBase {
* *
* @param processName - 工序名称 * @param processName - 工序名称
*/ */
public void setProcessName(Long processName) { public void setProcessName(String processName) {
this.processName = processName; this.processName = processName;
} }
/** /**
...@@ -751,7 +751,7 @@ public class HGSC005A extends DaoEPBase { ...@@ -751,7 +751,7 @@ public class HGSC005A extends DaoEPBase {
setTechFlowId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_tech_flow_id)), techFlowId)); setTechFlowId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_tech_flow_id)), techFlowId));
setTechFlowName(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_tech_flow_name)), techFlowName)); setTechFlowName(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_tech_flow_name)), techFlowName));
setInventProcessId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_invent_process_id)), inventProcessId)); setInventProcessId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_invent_process_id)), inventProcessId));
setProcessName(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_process_name)), processName)); setProcessName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_process_name)), processName));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_company_code)), companyCode)); setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_company_code)), companyCode));
setCompanyName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_company_name)), companyName)); setCompanyName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_company_name)), companyName));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_dep_code)), depCode)); setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_dep_code)), depCode));
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <!-- table information <!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <!-- table information
Generate time : 2024-05-17 17:03:29 Generate time : 2024-05-17 17:15:03
Version : 1.0 Version : 1.0
schema : hggp schema : hggp
tableName : HGSC005A tableName : HGSC005A
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
tech_flow_id BIGINT, tech_flow_id BIGINT,
tech_flow_name BIGINT, tech_flow_name BIGINT,
invent_process_id BIGINT, invent_process_id BIGINT,
process_name BIGINT, process_name VARCHAR,
company_code VARCHAR NOT NULL, company_code VARCHAR NOT NULL,
company_name VARCHAR NOT NULL, company_name VARCHAR NOT NULL,
dep_code VARCHAR, dep_code VARCHAR,
......
...@@ -176,7 +176,7 @@ public class HGSCTools { ...@@ -176,7 +176,7 @@ public class HGSCTools {
hgpz005AList.forEach(pz -> { hgpz005AList.forEach(pz -> {
HGSC005A obj = new HGSC005A(); HGSC005A obj = new HGSC005A();
BeanUtils.copyProperties(hgsc005a,obj); BeanUtils.copyProperties(hgsc005a,obj);
obj.setProcessId(pz.getId()); obj.setInventProcessId(pz.getId());
obj.setProcessName(pz.getProcessName()); obj.setProcessName(pz.getProcessName());
hgsc005AList.add(obj); hgsc005AList.add(obj);
}); });
...@@ -193,7 +193,7 @@ public class HGSCTools { ...@@ -193,7 +193,7 @@ public class HGSCTools {
} }
List<HGSC005A> oldObjList = DaoBase.getInstance().query(HGSC005A.QUERY, paramMap); List<HGSC005A> oldObjList = DaoBase.getInstance().query(HGSC005A.QUERY, paramMap);
Map<Long,Optional<HGSC005A>> oldObjMap = Optional.ofNullable(oldObjList).orElse(new ArrayList<>()).stream() Map<Long,Optional<HGSC005A>> oldObjMap = Optional.ofNullable(oldObjList).orElse(new ArrayList<>()).stream()
.collect(Collectors.groupingBy(HGSC005A::getProcessId,Collectors.maxBy( .collect(Collectors.groupingBy(HGSC005A::getInventProcessId,Collectors.maxBy(
Comparator.comparingInt(HGSC005A::getQuantity)))); Comparator.comparingInt(HGSC005A::getQuantity))));
return oldObjMap; return oldObjMap;
} }
...@@ -206,7 +206,7 @@ public class HGSCTools { ...@@ -206,7 +206,7 @@ public class HGSCTools {
List<HGSC005A> createList = new ArrayList<>(); List<HGSC005A> createList = new ArrayList<>();
List<HGSC005A> updateList = new ArrayList<>(); List<HGSC005A> updateList = new ArrayList<>();
hgsc005AList.forEach(o -> { hgsc005AList.forEach(o -> {
Optional<HGSC005A> op = oldObjMap.get(o.getProcessId()); Optional<HGSC005A> op = oldObjMap.get(o.getInventProcessId());
if(Objects.nonNull(op)){ if(Objects.nonNull(op)){
HGSC005A uo = op.get(); HGSC005A uo = op.get();
uo.setQuantity(uo.getQuantity()+o.getQuantity()); uo.setQuantity(uo.getQuantity()+o.getQuantity());
...@@ -237,7 +237,7 @@ public class HGSCTools { ...@@ -237,7 +237,7 @@ public class HGSCTools {
List<HGSC005A> createList = new ArrayList<>(); List<HGSC005A> createList = new ArrayList<>();
List<HGSC005A> updateList = new ArrayList<>(); List<HGSC005A> updateList = new ArrayList<>();
hgsc005AList.forEach(o -> { hgsc005AList.forEach(o -> {
Optional<HGSC005A> op = oldObjMap.get(o.getProcessId()); Optional<HGSC005A> op = oldObjMap.get(o.getInventProcessId());
if(Objects.nonNull(op)){ if(Objects.nonNull(op)){
HGSC005A uo = op.get(); HGSC005A uo = op.get();
uo.setQuantity(o.getQuantity()); uo.setQuantity(o.getQuantity());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment