Commit 6b8c6fb9 by wuwenlong

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

parents 5c7f4446 a568a105
...@@ -219,6 +219,8 @@ public enum DdynamicEnum { ...@@ -219,6 +219,8 @@ public enum DdynamicEnum {
*/ */
PROJ_RECORD_BLOCK_ID("proj_record_block_id", "projCode", "projName", "HGSC001.queryComboBox"), PROJ_RECORD_BLOCK_ID("proj_record_block_id", "projCode", "projName", "HGSC001.queryComboBox"),
ITEM_CODE_BOX_BLOCK_ID("item_code_box_block_id", "itemCode", "itemCname", "HGPZ005A.queryEdcm01"),
; ;
......
...@@ -43,6 +43,7 @@ public class HGPZ005 extends DaoEPBase { ...@@ -43,6 +43,7 @@ public class HGPZ005 extends DaoEPBase {
public static final String FIELD_UPDATED_NAME = "updatedName"; /* 更新人名称*/ public static final String FIELD_UPDATED_NAME = "updatedName"; /* 更新人名称*/
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 更新时间*/ public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 更新时间*/
public static final String FIELD_DELETE_FLAG = "deleteFlag"; /* 是否删除0.否1.是*/ public static final String FIELD_DELETE_FLAG = "deleteFlag"; /* 是否删除0.否1.是*/
public static final String FIELD_FLOW_ID = "flowId";
public static final String COL_ID = "ID"; public static final String COL_ID = "ID";
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 帐套编码*/ public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 帐套编码*/
...@@ -70,6 +71,7 @@ public class HGPZ005 extends DaoEPBase { ...@@ -70,6 +71,7 @@ public class HGPZ005 extends DaoEPBase {
public static final String COUNT = "HGPZ005.count"; public static final String COUNT = "HGPZ005.count";
public static final String INSERT = "HGPZ005.insert"; public static final String INSERT = "HGPZ005.insert";
public static final String UPDATE = "HGPZ005.update"; public static final String UPDATE = "HGPZ005.update";
public static final String UPDATE_FLOW_ID = "HGPZ005.updateFlowId";
public static final String DELETE = "HGPZ005.delete"; public static final String DELETE = "HGPZ005.delete";
private Long id = new Long(0); private Long id = new Long(0);
...@@ -93,6 +95,7 @@ public class HGPZ005 extends DaoEPBase { ...@@ -93,6 +95,7 @@ public class HGPZ005 extends DaoEPBase {
private String updatedName = " "; /* 更新人名称*/ private String updatedName = " "; /* 更新人名称*/
private String updatedTime = " "; /* 更新时间*/ private String updatedTime = " "; /* 更新时间*/
private Integer deleteFlag = 0; /* 是否删除0.否1.是*/ private Integer deleteFlag = 0; /* 是否删除0.否1.是*/
private Long flowId = new Long(0); /*工艺流程ID*/
/** /**
* initialize the metadata. * initialize the metadata.
...@@ -197,6 +200,9 @@ public class HGPZ005 extends DaoEPBase { ...@@ -197,6 +200,9 @@ public class HGPZ005 extends DaoEPBase {
eiColumn.setDescName("是否删除0.否1.是"); eiColumn.setDescName("是否删除0.否1.是");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FLOW_ID);
eiColumn.setDescName("工艺流程ID");
eiMetadata.addMeta(eiColumn);
} }
...@@ -543,6 +549,15 @@ public class HGPZ005 extends DaoEPBase { ...@@ -543,6 +549,15 @@ public class HGPZ005 extends DaoEPBase {
public void setDeleteFlag(Integer deleteFlag) { public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag; this.deleteFlag = deleteFlag;
} }
public Long getFlowId() {
return flowId;
}
public void setFlowId(Long flowId) {
this.flowId = flowId;
}
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -572,6 +587,7 @@ public class HGPZ005 extends DaoEPBase { ...@@ -572,6 +587,7 @@ public class HGPZ005 extends DaoEPBase {
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName)); setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime)); setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag)); setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
setFlowId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_FLOW_ID)), flowId));
} }
/** /**
...@@ -602,6 +618,7 @@ public class HGPZ005 extends DaoEPBase { ...@@ -602,6 +618,7 @@ public class HGPZ005 extends DaoEPBase {
map.put(FIELD_UPDATED_NAME, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_UPDATED_NAME))); map.put(FIELD_UPDATED_NAME, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_UPDATED_NAME)));
map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME))); map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME)));
map.put(FIELD_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG))); map.put(FIELD_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG)));
map.put(FIELD_FLOW_ID, StringUtils.toString(flowId, eiMetadata.getMeta(FIELD_FLOW_ID)));
return map; return map;
} }
......
package com.baosight.hggp.hg.pz.domain;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.core.util.StringUtils;
/**
* Project: <br>
* Title:Hgpz005a.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-05-15 18:59:20 create
*/
public class HGPZ005A extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id";
public static final String FIELD_ACCOUNT_CODE = "accountCode"; /* 帐套编码*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_CREATED_BY = "createdBy"; /* 创建人*/
public static final String FIELD_CREATED_NAME = "createdName"; /* 创建人名称*/
public static final String FIELD_CREATED_TIME = "createdTime"; /* 创建时间*/
public static final String FIELD_UPDATED_BY = "updatedBy"; /* 更新人*/
public static final String FIELD_UPDATED_NAME = "updatedName"; /* 更新人名称*/
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 更新时间*/
public static final String FIELD_DELETE_FLAG = "deleteFlag"; /* 是否删除0.否1.是*/
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 公司编码*/
public static final String FIELD_COMPANY_NAME = "companyName"; /* 公司名称*/
public static final String FIELD_PROCESS_CODE = "processCode"; /* 工序编码*/
public static final String FIELD_PROCESS_NAME = "processName"; /* 工序名称*/
public static final String FIELD_COMPOSING_COEFF = "composingCoeff"; /* 排产系数*/
public static final String FIELD_UNIT_COEFF = "unitCoeff"; /* 单价系数*/
public static final String FIELD_PROCESS_CLASS = "processClass"; /* 工序类别*/
public static final String FIELD_PARENT_ID = "parentId"; /* 上级ID*/
public static final String COL_ID = "ID";
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 帐套编码*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String COL_CREATED_BY = "CREATED_BY"; /* 创建人*/
public static final String COL_CREATED_NAME = "CREATED_NAME"; /* 创建人名称*/
public static final String COL_CREATED_TIME = "CREATED_TIME"; /* 创建时间*/
public static final String COL_UPDATED_BY = "UPDATED_BY"; /* 更新人*/
public static final String COL_UPDATED_NAME = "UPDATED_NAME"; /* 更新人名称*/
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 更新时间*/
public static final String COL_DELETE_FLAG = "DELETE_FLAG"; /* 是否删除0.否1.是*/
public static final String COL_PROCESS_CODE = "PROCESS_CODE"; /* 工序编码*/
public static final String COL_PROCESS_NAME = "PROCESS_NAME"; /* 工序名称*/
public static final String COL_COMPOSING_COEFF = "COMPOSING_COEFF"; /* 排产系数*/
public static final String COL_UNIT_COEFF = "UNIT_COEFF"; /* 单价系数*/
public static final String COL_PROCESS_CLASS = "PROCESS_CLASS"; /* 工序分类*/
public static final String COL_PARENT_ID = "PARENT_ID"; /* 上级ID*/
public static final String QUERY = "HGPZ005A.query";
public static final String COUNT = "HGPZ005A.count";
public static final String INSERT = "HGPZ005A.insert";
public static final String UPDATE = "HGPZ005A.update";
public static final String DELETE = "HGPZ005A.delete";
public static final String DELETE_PARENT_ID = "HGPZ005A.deleteByParentId";
private Long id = new Long(0);
private String accountCode = " "; /* 帐套编码*/
private String depCode = " "; /* 部门编码*/
private String createdBy = " "; /* 创建人*/
private String createdName = " "; /* 创建人名称*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/
private String updatedName = " "; /* 更新人名称*/
private String updatedTime = " "; /* 更新时间*/
private Integer deleteFlag = 0; /* 是否删除0.否1.是*/
private String companyCode = " "; /* 公司编码*/
private String companyName = " "; /* 公司名称*/
private String processCode = " "; /* 工序编码*/
private String processName = " "; /* 工序名称*/
private BigDecimal composingCoeff = new BigDecimal(0); /* 排产系数*/
private BigDecimal unitCoeff = new BigDecimal(0); /* 单价系数*/
private String processClass = " "; /* 工序分类*/
private Long parentId = new Long(0); /* 上级ID*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" ");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ACCOUNT_CODE);
eiColumn.setDescName("帐套编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_BY);
eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_NAME);
eiColumn.setDescName("创建人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_TIME);
eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_BY);
eiColumn.setDescName("更新人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_NAME);
eiColumn.setDescName("更新人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_TIME);
eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DELETE_FLAG);
eiColumn.setDescName("是否删除0.否1.是");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("公司编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_NAME);
eiColumn.setDescName("公司名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROCESS_CODE);
eiColumn.setDescName("工序编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROCESS_NAME);
eiColumn.setDescName("工序名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPOSING_COEFF);
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("排产系数");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UNIT_COEFF);
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("单价系数");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROCESS_CLASS);
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("工序分类");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PARENT_ID);
eiColumn.setDescName("上级ID");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HGPZ005A() {
initMetaData();
}
/**
* get the id .
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id .
*
* @param id
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the accountCode - 帐套编码.
* @return the accountCode
*/
public String getAccountCode() {
return this.accountCode;
}
/**
* set the accountCode - 帐套编码.
*
* @param accountCode - 帐套编码
*/
public void setAccountCode(String accountCode) {
this.accountCode = accountCode;
}
/**
* get the depCode - 部门编码.
* @return the depCode
*/
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码.
*
* @param depCode - 部门编码
*/
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the createdBy - 创建人.
* @return the createdBy
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 创建人.
*
* @param createdBy - 创建人
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
* get the createdName - 创建人名称.
* @return the createdName
*/
public String getCreatedName() {
return this.createdName;
}
/**
* set the createdName - 创建人名称.
*
* @param createdName - 创建人名称
*/
public void setCreatedName(String createdName) {
this.createdName = createdName;
}
/**
* get the createdTime - 创建时间.
* @return the createdTime
*/
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 创建时间.
*
* @param createdTime - 创建时间
*/
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
/**
* get the updatedBy - 更新人.
* @return the updatedBy
*/
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 更新人.
*
* @param updatedBy - 更新人
*/
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
/**
* get the updatedName - 更新人名称.
* @return the updatedName
*/
public String getUpdatedName() {
return this.updatedName;
}
/**
* set the updatedName - 更新人名称.
*
* @param updatedName - 更新人名称
*/
public void setUpdatedName(String updatedName) {
this.updatedName = updatedName;
}
/**
* get the updatedTime - 更新时间.
* @return the updatedTime
*/
public String getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 更新时间.
*
* @param updatedTime - 更新时间
*/
public void setUpdatedTime(String updatedTime) {
this.updatedTime = updatedTime;
}
/**
* get the deleteFlag - 是否删除0.否1.是.
* @return the deleteFlag
*/
public Integer getDeleteFlag() {
return this.deleteFlag;
}
/**
* set the deleteFlag - 是否删除0.否1.是.
*
* @param deleteFlag - 是否删除0.否1.是
*/
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
public String getCompanyCode() {
return companyCode;
}
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
public String getCompanyName() {
return companyName;
}
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
/**
* get the processCode - 工序编码.
* @return the processCode
*/
public String getProcessCode() {
return this.processCode;
}
/**
* set the processCode - 工序编码.
*
* @param processCode - 工序编码
*/
public void setProcessCode(String processCode) {
this.processCode = processCode;
}
/**
* get the processName - 工序名称.
* @return the processName
*/
public String getProcessName() {
return this.processName;
}
/**
* set the processName - 工序名称.
*
* @param processName - 工序名称
*/
public void setProcessName(String processName) {
this.processName = processName;
}
/**
* get the composingCoeff - 排产系数.
* @return the composingCoeff
*/
public BigDecimal getComposingCoeff() {
return this.composingCoeff;
}
/**
* set the composingCoeff - 排产系数.
*
* @param composingCoeff - 排产系数
*/
public void setComposingCoeff(BigDecimal composingCoeff) {
this.composingCoeff = composingCoeff;
}
/**
* get the unitCoeff - 单价系数.
* @return the unitCoeff
*/
public BigDecimal getUnitCoeff() {
return this.unitCoeff;
}
/**
* set the unitCoeff - 单价系数.
*
* @param unitCoeff - 单价系数
*/
public void setUnitCoeff(BigDecimal unitCoeff) {
this.unitCoeff = unitCoeff;
}
/**
* get the processClass - 工序类别.
* @return the processClass
*/
public String getProcessClass() {
return this.processClass;
}
/**
* set the processClass - 工序类别.
*
* @param processClass - 工序类别
*/
public void setProcessClass(String processClass) {
this.processClass = processClass;
}
/**
* get the parentId - 上级ID.
* @return the parentId
*/
public Long getParentId() {
return this.parentId;
}
/**
* set the parentId - 上级ID.
*
* @param parentId - 上级ID
*/
public void setParentId(Long parentId) {
this.parentId = parentId;
}
/**
* get the value from Map.
*
* @param map - source data map
*/
@Override
public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id));
setAccountCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ACCOUNT_CODE)), accountCode));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy));
setCreatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_NAME)), createdName));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_TIME)), createdTime));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_BY)), updatedBy));
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode));
setCompanyName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_NAME)), companyName));
setProcessCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROCESS_CODE)), processCode));
setProcessName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROCESS_NAME)), processName));
setComposingCoeff(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_COMPOSING_COEFF)), composingCoeff));
setUnitCoeff(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_UNIT_COEFF)), unitCoeff));
setProcessClass(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROCESS_CLASS)), processClass));
setParentId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_PARENT_ID)), parentId));
}
/**
* set the value to Map.
*/
@Override
public Map toMap() {
Map map = new HashMap();
map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID)));
map.put(FIELD_ACCOUNT_CODE, StringUtils.toString(accountCode, eiMetadata.getMeta(FIELD_ACCOUNT_CODE)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_CREATED_BY, StringUtils.toString(createdBy, eiMetadata.getMeta(FIELD_CREATED_BY)));
map.put(FIELD_CREATED_NAME, StringUtils.toString(createdName, eiMetadata.getMeta(FIELD_CREATED_NAME)));
map.put(FIELD_CREATED_TIME, StringUtils.toString(createdTime, eiMetadata.getMeta(FIELD_CREATED_TIME)));
map.put(FIELD_UPDATED_BY, StringUtils.toString(updatedBy, eiMetadata.getMeta(FIELD_UPDATED_BY)));
map.put(FIELD_UPDATED_NAME, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_UPDATED_NAME)));
map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME)));
map.put(FIELD_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG)));
map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE)));
map.put(FIELD_COMPANY_NAME, StringUtils.toString(companyName, eiMetadata.getMeta(FIELD_COMPANY_NAME)));
map.put(FIELD_PROCESS_CODE, StringUtils.toString(processCode, eiMetadata.getMeta(FIELD_PROCESS_CODE)));
map.put(FIELD_PROCESS_NAME, StringUtils.toString(processName, eiMetadata.getMeta(FIELD_PROCESS_NAME)));
map.put(FIELD_COMPOSING_COEFF, StringUtils.toString(composingCoeff, eiMetadata.getMeta(FIELD_COMPOSING_COEFF)));
map.put(FIELD_UNIT_COEFF, StringUtils.toString(unitCoeff, eiMetadata.getMeta(FIELD_UNIT_COEFF)));
map.put(FIELD_PROCESS_CLASS, StringUtils.toString(processClass, eiMetadata.getMeta(FIELD_PROCESS_CLASS)));
map.put(FIELD_PARENT_ID, StringUtils.toString(parentId, eiMetadata.getMeta(FIELD_PARENT_ID)));
return map;
}
}
...@@ -4,9 +4,17 @@ import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; ...@@ -4,9 +4,17 @@ import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum; import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant; import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.enums.OrgTypeEnum;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.constant.HGConstant; import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.pz.domain.HGPZ005; import com.baosight.hggp.hg.pz.domain.HGPZ005;
import com.baosight.hggp.hg.pz.domain.HGPZ005A;
import com.baosight.hggp.hg.sb.domain.HGSB002;
import com.baosight.hggp.hg.pz.tools.HGPZTools; import com.baosight.hggp.hg.pz.tools.HGPZTools;
import com.baosight.hggp.hg.sj.domain.HGSJ002;
import com.baosight.hggp.hg.sj.domain.HGSJ002A;
import com.baosight.hggp.hg.sj.domain.HGSJ003;
import com.baosight.hggp.hg.sj.tools.HGSJTools;
import com.baosight.hggp.hg.xs.tools.HGXSTools; import com.baosight.hggp.hg.xs.tools.HGXSTools;
import com.baosight.hggp.util.*; import com.baosight.hggp.util.*;
import com.baosight.hggp.util.contants.ACConstants; import com.baosight.hggp.util.contants.ACConstants;
...@@ -19,6 +27,7 @@ import com.baosight.iplat4j.core.service.soa.XLocalManager; ...@@ -19,6 +27,7 @@ import com.baosight.iplat4j.core.service.soa.XLocalManager;
import com.baosight.iplat4j.core.web.threadlocal.UserSession; import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import com.baosight.iplat4j.ed.util.SequenceGenerator; import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.math.BigDecimal;
import java.util.*; import java.util.*;
/** /**
...@@ -238,7 +247,6 @@ public class ServiceHGPZ005 extends ServiceBase { ...@@ -238,7 +247,6 @@ public class ServiceHGPZ005 extends ServiceBase {
return inInfo; return inInfo;
} }
/** /**
* 下拉框 * 下拉框
* *
...@@ -256,5 +264,62 @@ public class ServiceHGPZ005 extends ServiceBase { ...@@ -256,5 +264,62 @@ public class ServiceHGPZ005 extends ServiceBase {
} }
return inInfo; return inInfo;
} }
@OperationLogAnnotation(operModul = "存货档案",operType = "导入",operDesc = "导入操作")
public EiInfo importDate(EiInfo inInfo) {
try {
Map<String, Object> params = new HashMap<>(10);
String fileName = inInfo.getString("fileName");
params.put(HGPZ005.FIELD_ACCOUNT_CODE, UserSessionUtils.getAccountCode());
//解析文件,将文件中数据传入到inInfo中
ExcelUtils.importFromExcel(inInfo, fileName, params, new HGPZ005());
}catch (Exception e){
inInfo.setStatus(EiConstant.STATUS_FAILURE);
LogUtils.setDetailMsg(inInfo, e, "导入失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "存货档案", operType = "修改", operDesc = "绑定流程")
public EiInfo updateFlowId(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map resultRow : resultRows) {
HGPZ005 hgpz005 = new HGPZ005();
hgpz005.fromMap(resultRow);
HGSJ002 hgsj002 = new HGSJ002();
hgsj002.fromMap((Map) resultRow.get("flow"));
hgpz005.setFlowId(hgsj002.getId());
DaoUtils.update(HGPZ005.UPDATE_FLOW_ID, hgpz005);
addHgpz005a(hgpz005,hgsj002);
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据修改成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "修改失败");
}
return inInfo;
}
/**
* 添加流程详情
* @param hppz005
*/
public void addHgpz005a (HGPZ005 hppz005,HGSJ002 hgsj002){
DaoUtils.update(HGPZ005A.DELETE_PARENT_ID,new HashMap<String,Object>(){{put(HGPZ005A.FIELD_PARENT_ID,hppz005.getId());}});
//流程详情
List<HGSJ002A> hgsb002AList = HGSJTools.Hgsj002a.list(hgsj002.getId());
for (HGSJ002A hgsj002a: hgsb002AList) {
HGPZ005A hgpz005A = new HGPZ005A();
hgpz005A.setCompanyCode(hgsj002.getFactoryCode());
hgpz005A.setCompanyName(hgsj002.getFactoryName());
hgpz005A.setProcessCode(hgsj002a.getProcessCode());
hgpz005A.setProcessName(hgsj002a.getProcessName());
hgpz005A.setUnitCoeff(BigDecimal.ONE);
hgpz005A.setComposingCoeff(BigDecimal.ONE);
hgpz005A.setParentId(hppz005.getId());
DaoUtils.insert(HGPZ005A.INSERT,hgpz005A.toMap());
}
}
} }
package com.baosight.hggp.hg.pz.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.pz.domain.HGPZ005A;
import com.baosight.hggp.hg.sj.domain.HGSJ003;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.ErrorCodeUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.springframework.security.core.parameters.P;
import java.util.*;
import java.util.stream.Collectors;
/**
* @author LiuYang
* @version 1.0 2024/5/15
*/
public class ServiceHGPZ005A extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGPZ005A.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo = super.query(inInfo, HGPZ005A.QUERY, new HGPZ005A());
CommonMethod.initBlock(inInfo,
Arrays.asList(DdynamicEnum.PROCESS_CODE_BLOCK_ID,DdynamicEnum.ITEM_CODE_BOX_BLOCK_ID),
new HashMap<String,Object>(){{put("codesetCode","hggp.hgsj.processClass");}}
);
return inInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGPZ005A.FIELD_DELETE_FLAG,CommonConstant.YesNo.NO_0);
return super.query(inInfo, HGPZ005A.QUERY);
}
@OperationLogAnnotation(operModul = "工序设置",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
int i = 0;
try {
HGPZ005A hgpz005A = new HGPZ005A();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hgpz005A.fromMap(map);
hgpz005A.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HGPZ005A.DELETE, hgpz005A.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")});
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
ErrorCodeUtils.handleDeleteException(inInfo,i,e);
logError("删除失败", e.getMessage());
return inInfo;
}
return inInfo;
}
/**
* 保存操作
*/
@OperationLogAnnotation(operModul = "工序设置",operType = "保存",operDesc = "保存操作")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据
for (Map resultRow : resultRows) {
HGPZ005A hgpz005a = new HGPZ005A();
hgpz005a.fromMap(resultRow);
if (hgpz005a.getId() == null || hgpz005a.getId() == 0) {
Long parentId = Long.valueOf(inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGPZ005A.FIELD_PARENT_ID));
hgpz005a.setParentId(parentId);
this.add(hgpz005a);
} else {
this.modify(hgpz005a);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HGPZ005A hgpz005A) {
DaoUtils.insert(HGPZ005A.INSERT, hgpz005A);
}
/**
* 修改操作
*/
public void modify(HGPZ005A hgpz005A) {
DaoUtils.update(HGPZ005A.UPDATE, hgpz005A);
}
public EiInfo queryEdcm01(EiInfo inInfo){
inInfo = super.query(inInfo, HGSJ003.QUERY,new HGSJ003());
List<Object> integerList = new ArrayList<>();
List<Map> hgsj003s = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map map:hgsj003s) {
integerList.add(map.get(HGSJ003.FIELD_PROCESS_CLASS));
}
CommonMethod.initBlock(inInfo,Arrays.asList(DdynamicEnum.ITEM_CODE_BOX_BLOCK_ID),
new HashMap<String,Object>(){{
put("codesetCode","hggp.hgsj.processClass");
put("itemCodes",integerList);
}}
);
return inInfo;
}
}
package com.baosight.hggp.hg.pz.service;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.hg.sj.domain.HGSJ002;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.Arrays;
/**
* @author LiuYang
* @version 1.0 2024/5/15
*/
public class ServiceHGPZ005B extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGSJ002.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGSJ002.FIELD_STATUS, CommonConstant.YesNo.YES_1);
inInfo = super.query(inInfo, HGSJ002.QUERY, new HGSJ002());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID),null);
return inInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGSJ002.FIELD_DELETE_FLAG,CommonConstant.YesNo.NO_0);
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGSJ002.FIELD_STATUS, CommonConstant.YesNo.YES_1);
return super.query(inInfo, HGSJ002.QUERY, new HGSJ002());
}
}
...@@ -92,6 +92,9 @@ ...@@ -92,6 +92,9 @@
<isNotEmpty prepend=" AND " property="deleteFlag"> <isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag# DELETE_FLAG = #deleteFlag#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="flowId">
FLOW_ID = #flowId#
</isNotEmpty>
</sql> </sql>
<sql id="authCondition"> <sql id="authCondition">
...@@ -137,7 +140,8 @@ ...@@ -137,7 +140,8 @@
UPDATED_BY as "updatedBy", <!-- 更新人 --> UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 --> UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 --> UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DELETE_FLAG as "deleteFlag" <!-- 是否删除0.否1.是 --> DELETE_FLAG as "deleteFlag", <!-- 是否删除0.否1.是 -->
FLOW_ID as "flowId"
FROM ${hggpSchema}.HGPZ005 WHERE 1=1 AND DELETE_FLAG = 0 FROM ${hggpSchema}.HGPZ005 WHERE 1=1 AND DELETE_FLAG = 0
<include refid="condition" /> <include refid="condition" />
<include refid="authCondition" /> <include refid="authCondition" />
...@@ -245,9 +249,10 @@ ...@@ -245,9 +249,10 @@
UPDATED_BY, <!-- 更新人 --> UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 --> UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 --> UPDATED_TIME, <!-- 更新时间 -->
DELETE_FLAG <!-- 是否删除0.否1.是 --> DELETE_FLAG, <!-- 是否删除0.否1.是 -->
FLOW_ID
) )
VALUES (#id#, #accountCode#, #depCode#, #inventType#, #inventCode#, #inventName#, #spec#, #length#, #width#, #thick#, #material#, #coefficient#, #unit#, #status#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#) VALUES (#id#, #accountCode#, #depCode#, #inventType#, #inventCode#, #inventName#, #spec#, #length#, #width#, #thick#, #material#, #coefficient#, #unit#, #status#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#,#flowId#)
</insert> </insert>
<delete id="delete"> <delete id="delete">
...@@ -276,11 +281,23 @@ ...@@ -276,11 +281,23 @@
UPDATED_BY = #updatedBy#, <!-- 更新人 --> UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 --> UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 --> UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DELETE_FLAG = #deleteFlag# <!-- 是否删除0.否1.是 --> DELETE_FLAG = #deleteFlag#, <!-- 是否删除0.否1.是 -->
FLOW_ID = #flowId#
WHERE WHERE
ID = #id# ID = #id#
</update> </update>
<update id="updateFlowId">
UPDATE ${hggpSchema}.HGPZ005
SET
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
FLOW_ID = #flowId#
WHERE
ID = #id#
</update>
<select id="queryComboBox" parameterClass="java.util.HashMap" <select id="queryComboBox" parameterClass="java.util.HashMap"
resultClass="java.util.HashMap"> resultClass="java.util.HashMap">
SELECT DISTINCT SELECT DISTINCT
......
<?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
Generate time : 2024-05-15 18:59:20
Version : 1.0
schema : hggp
tableName : HGPZ005A
ID BIGINT NOT NULL primarykey,
ACCOUNT_CODE VARCHAR,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
DELETE_FLAG TINYINT,
PROCESS_CODE VARCHAR NOT NULL,
PROCESS_NAME VARCHAR NOT NULL,
COMPOSING_COEFF VARCHAR,
UNIT_COEFF VARCHAR,
PARENT_ID BIGINT
-->
<sqlMap namespace="HGPZ005A">
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME LIKE CONCAT('%', #companyName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="processCode">
PROCESS_CODE = #processCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="processName">
PROCESS_NAME LIKE CONCAT('%', #processName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="composingCoeff">
COMPOSING_COEFF = #composingCoeff#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unitCoeff">
UNIT_COEFF = #unitCoeff#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="processClass">
PROCESS_CLASS = #processClass#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentId">
PARENT_ID = #parentId#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.pz.domain.HGPZ005A">
SELECT
ID as "id",
ACCOUNT_CODE as "accountCode", <!-- 帐套编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DELETE_FLAG as "deleteFlag", <!-- 是否删除0.否1.是 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
PROCESS_CODE as "processCode", <!-- 工序编码 -->
PROCESS_NAME as "processName", <!-- 工序名称 -->
COMPOSING_COEFF as "composingCoeff", <!-- 排产系数 -->
UNIT_COEFF as "unitCoeff", <!-- 单价系数 -->
PROCESS_CLASS as "processClass", <!-- 工序类别 -->
PARENT_ID as "parentId" <!-- 上级ID -->
FROM ${hggpSchema}.HGPZ005A WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
CREATED_TIME asc, ID asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGPZ005A WHERE 1=1
<include refid="condition" />
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="processCode">
PROCESS_CODE = #processCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="processName">
PROCESS_NAME = #processName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="composingCoeff">
COMPOSING_COEFF = #composingCoeff#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unitCoeff">
UNIT_COEFF = #unitCoeff#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="processClass">
PROCESS_CLASS = #processClass#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentId">
PARENT_ID = #parentId#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGPZ005A (ID,
ACCOUNT_CODE, <!-- 帐套编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 -->
DELETE_FLAG, <!-- 是否删除0.否1.是 -->
COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 -->
PROCESS_CODE, <!-- 工序编码 -->
PROCESS_NAME, <!-- 工序名称 -->
COMPOSING_COEFF, <!-- 排产系数 -->
UNIT_COEFF, <!-- 单价系数 -->
PROCESS_CLASS, <!-- 工序类别 -->
PARENT_ID <!-- 上级ID -->
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #processCode#, #processName#, #composingCoeff#, #unitCoeff#, #processClass#, #parentId#)
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGPZ005A WHERE
ID = #id#
</delete>
<delete id="deleteByParentId">
DELETE FROM ${hggpSchema}.HGPZ005A WHERE PARENT_ID = #parentId#
</delete>
<update id="update">
UPDATE ${hggpSchema}.HGPZ005A
SET
ACCOUNT_CODE = #accountCode#, <!-- 帐套编码 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_NAME = #createdName#, <!-- 创建人名称 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 是否删除0.否1.是 -->
COMPANY_CODE = #companyCode#, <!-- 公司编码 -->
COMPANY_NAME = #companyName#, <!-- 公司名称 -->
PROCESS_CODE = #processCode#, <!-- 工序编码 -->
PROCESS_NAME = #processName#, <!-- 工序名称 -->
COMPOSING_COEFF = #composingCoeff#, <!-- 排产系数 -->
UNIT_COEFF = #unitCoeff#, <!-- 单价系数 -->
PROCESS_CLASS = #processClass#, <!-- 工序类别 -->
PARENT_ID = #parentId# <!-- 上级ID -->
WHERE
ID = #id#
</update>
<select id="queryEdcm01" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
select
ITEM_CODE as "itemCode",
ITEM_CNAME as "itemCname"
from ${platSchema}.TEDCM01
where CODESET_CODE = #codesetCode#
<isNotEmpty prepend=" AND " property="itemCode">
ITEM_CODE = #itemCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="itemCodes">
ITEM_CODE in <iterate property="itemCodes" open="(" close=")" conjunction=","> #itemCodes[]# </iterate>
</isNotEmpty>
</select>
</sqlMap>
package com.baosight.hggp.hg.pz.tools; package com.baosight.hggp.hg.pz.tools;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant; import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoBase; import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.enums.ValidFlagEnum; import com.baosight.hggp.core.enums.ValidFlagEnum;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.pz.domain.HGPZ004;
import com.baosight.hggp.hg.pz.domain.HGPZ005; import com.baosight.hggp.hg.pz.domain.HGPZ005;
import com.baosight.hggp.hg.pz.domain.HGPZ007; import com.baosight.hggp.hg.pz.domain.HGPZ007;
import com.baosight.hggp.hg.pz.domain.HGPZ009; import com.baosight.hggp.hg.pz.domain.HGPZ009;
import com.baosight.hggp.util.AssertUtils; import com.baosight.hggp.hg.sj.domain.HGSJ003;
import com.baosight.hggp.util.MapUtils; import com.baosight.hggp.util.*;
import com.baosight.hggp.util.ObjectUtils; import com.baosight.iplat4j.common.ed.domain.TEDCM01;
import com.baosight.hggp.util.StringUtils;
import com.baosight.iplat4j.core.data.DaoEPBase; import com.baosight.iplat4j.core.data.DaoEPBase;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.beanutils.BeanUtils; import org.apache.commons.beanutils.BeanUtils;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.RoundingMode; import java.math.RoundingMode;
import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -360,7 +364,31 @@ public class HGPZTools { ...@@ -360,7 +364,31 @@ public class HGPZTools {
log.warn("设置规格失败:{}", e.getMessage(), e); log.warn("设置规格失败:{}", e.getMessage(), e);
} }
} }
}
/**
* 导入添加存货档案
* @param list
*/
public static void add(List<Map> list){
List<HGPZ004> hgpz004s = DaoBase.getInstance().query(HGPZ004.QUERY, new HashMap<>());
Map parmap = hgpz004s.stream().collect(Collectors.toMap(HGPZ004::getInventTypeName, HGPZ004::getInventType));
for (Map map:list) {
String inventType = MapUtils.getString(parmap, StringUtils.trimToEmpty(map.get(HGPZ005.FIELD_INVENT_TYPE).toString()));
AssertUtils.isEmpty(inventType, String.format("存货类型[%s]代码不存在,添加失败!", inventType));
HGPZ005 hgpz005 = new HGPZ005();
hgpz005.fromMap(map);
hgpz005.setInventType(inventType);
hgpz005.setStatus(1); //默认启用
hgpz005.setInventCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.INVENT_CODE));
// 设置规格
if (StringUtils.isBlank(hgpz005.getSpec())) {
hgpz005.setSpec(HGPZTools.HgPz005.jointSpec(hgpz005.getLength(), hgpz005.getWidth(), hgpz005.getThick()));
}
// 去除空格
hgpz005.setSpec(StringUtils.trimToEmpty(hgpz005.getSpec()));
DaoUtils.insert(HGPZ005.INSERT,hgpz005);
}
}
}
} }
...@@ -36,7 +36,7 @@ public class HGSJ002 extends DaoEPBase { ...@@ -36,7 +36,7 @@ public class HGSJ002 extends DaoEPBase {
public static final String FIELD_FACTORY_NAME = "factoryName"; /* 厂区名称*/ public static final String FIELD_FACTORY_NAME = "factoryName"; /* 厂区名称*/
public static final String FIELD_FLOW_CODE = "flowCode"; /* 流程编码*/ public static final String FIELD_FLOW_CODE = "flowCode"; /* 流程编码*/
public static final String FIELD_FLOW_NAME = "flowName"; /* 流程名称*/ public static final String FIELD_FLOW_NAME = "flowName"; /* 流程名称*/
public static final String FIELD_STATUS = "status"; /* 状态 0.启用 1.停止*/ public static final String FIELD_STATUS = "status"; /* 状态 1.启用 0.停止*/
public static final String COL_ID = "ID"; /* 主键id*/ public static final String COL_ID = "ID"; /* 主键id*/
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码 预留*/ public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码 预留*/
...@@ -76,7 +76,7 @@ public class HGSJ002 extends DaoEPBase { ...@@ -76,7 +76,7 @@ public class HGSJ002 extends DaoEPBase {
private String factoryName = " "; /* 厂区名称*/ private String factoryName = " "; /* 厂区名称*/
private String flowCode = " "; /* 流程编码*/ private String flowCode = " "; /* 流程编码*/
private String flowName = " "; /* 流程名称*/ private String flowName = " "; /* 流程名称*/
private Integer status = 0; /* 状态 0.启用 1.停止*/ private Integer status = 0; /* 状态 1.启用 0.停止*/
/** /**
* initialize the metadata. * initialize the metadata.
...@@ -142,7 +142,7 @@ public class HGSJ002 extends DaoEPBase { ...@@ -142,7 +142,7 @@ public class HGSJ002 extends DaoEPBase {
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_STATUS); eiColumn = new EiColumn(FIELD_STATUS);
eiColumn.setDescName("状态 0.启用 1.停止"); eiColumn.setDescName("状态 1.启用 0.停止");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
......
...@@ -47,6 +47,7 @@ public class HGSJ003 extends DaoEPBase { ...@@ -47,6 +47,7 @@ public class HGSJ003 extends DaoEPBase {
public static final String FIELD_WIDTH = "width"; /* 宽*/ public static final String FIELD_WIDTH = "width"; /* 宽*/
public static final String FIELD_THICK = "thick"; /* 厚*/ public static final String FIELD_THICK = "thick"; /* 厚*/
public static final String FIELD_COEFFICIENT = "coefficient"; /* 系数*/ public static final String FIELD_COEFFICIENT = "coefficient"; /* 系数*/
public static final String FIELD_PRICE = "price"; /* 单价*/
public static final String FIELD_STATUS = "status"; /* 状态 0-启用 1-停止*/ public static final String FIELD_STATUS = "status"; /* 状态 0-启用 1-停止*/
public static final String COL_ID = "ID"; /* 主键id*/ public static final String COL_ID = "ID"; /* 主键id*/
...@@ -106,6 +107,7 @@ public class HGSJ003 extends DaoEPBase { ...@@ -106,6 +107,7 @@ public class HGSJ003 extends DaoEPBase {
private BigDecimal width = new BigDecimal(0.000); /* 宽*/ private BigDecimal width = new BigDecimal(0.000); /* 宽*/
private BigDecimal thick = new BigDecimal(0.000); /* 厚*/ private BigDecimal thick = new BigDecimal(0.000); /* 厚*/
private BigDecimal coefficient = new BigDecimal(0.000); /* 系数*/ private BigDecimal coefficient = new BigDecimal(0.000); /* 系数*/
private BigDecimal price = new BigDecimal(0.000); /* 单价*/
private Integer status = 0; /* 状态 0-启用 1-停止*/ private Integer status = 0; /* 状态 0-启用 1-停止*/
/** /**
...@@ -223,6 +225,13 @@ public class HGSJ003 extends DaoEPBase { ...@@ -223,6 +225,13 @@ public class HGSJ003 extends DaoEPBase {
eiColumn.setDescName("系数"); eiColumn.setDescName("系数");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRICE);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("单价");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_STATUS); eiColumn = new EiColumn(FIELD_STATUS);
eiColumn.setDescName("状态 0-启用 1-停止"); eiColumn.setDescName("状态 0-启用 1-停止");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
...@@ -607,6 +616,15 @@ public class HGSJ003 extends DaoEPBase { ...@@ -607,6 +616,15 @@ public class HGSJ003 extends DaoEPBase {
public void setCoefficient(BigDecimal coefficient) { public void setCoefficient(BigDecimal coefficient) {
this.coefficient = coefficient; this.coefficient = coefficient;
} }
public BigDecimal getPrice() {
return price;
}
public void setPrice(BigDecimal price) {
this.price = price;
}
/** /**
* get the status - 状态 0-启用 1-停止. * get the status - 状态 0-启用 1-停止.
* @return the status * @return the status
...@@ -655,6 +673,7 @@ public class HGSJ003 extends DaoEPBase { ...@@ -655,6 +673,7 @@ public class HGSJ003 extends DaoEPBase {
setWidth(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_WIDTH)), width)); setWidth(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_WIDTH)), width));
setThick(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_THICK)), thick)); setThick(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_THICK)), thick));
setCoefficient(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_COEFFICIENT)), coefficient)); setCoefficient(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_COEFFICIENT)), coefficient));
setPrice(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PRICE)), price));
setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status)); setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status));
} }
...@@ -689,6 +708,7 @@ public class HGSJ003 extends DaoEPBase { ...@@ -689,6 +708,7 @@ public class HGSJ003 extends DaoEPBase {
map.put(FIELD_WIDTH, StringUtils.toString(width, eiMetadata.getMeta(FIELD_WIDTH))); map.put(FIELD_WIDTH, StringUtils.toString(width, eiMetadata.getMeta(FIELD_WIDTH)));
map.put(FIELD_THICK, StringUtils.toString(thick, eiMetadata.getMeta(FIELD_THICK))); map.put(FIELD_THICK, StringUtils.toString(thick, eiMetadata.getMeta(FIELD_THICK)));
map.put(FIELD_COEFFICIENT, StringUtils.toString(coefficient, eiMetadata.getMeta(FIELD_COEFFICIENT))); map.put(FIELD_COEFFICIENT, StringUtils.toString(coefficient, eiMetadata.getMeta(FIELD_COEFFICIENT)));
map.put(FIELD_PRICE, StringUtils.toString(price, eiMetadata.getMeta(FIELD_PRICE)));
map.put(FIELD_STATUS, StringUtils.toString(status, eiMetadata.getMeta(FIELD_STATUS))); map.put(FIELD_STATUS, StringUtils.toString(status, eiMetadata.getMeta(FIELD_STATUS)));
return map; return map;
......
...@@ -90,10 +90,7 @@ public class ServiceHGSJ003 extends ServiceEPBase { ...@@ -90,10 +90,7 @@ public class ServiceHGSJ003 extends ServiceEPBase {
hgsj003.setSpec(StringUtils.trimToEmpty(hgsj003.getSpec())); hgsj003.setSpec(StringUtils.trimToEmpty(hgsj003.getSpec()));
this.add(hgsj003); this.add(hgsj003);
} else { } else {
// 设置规格
hgsj003.setSpec(HGSJTools.Hgsj003.jointSpec(hgsj003.getLength(), hgsj003.getWidth(), hgsj003.getThick()));
// 去除空格
hgsj003.setSpec(StringUtils.trimToEmpty(hgsj003.getSpec()));
this.modify(hgsj003); this.modify(hgsj003);
} }
} }
...@@ -118,8 +115,14 @@ public class ServiceHGSJ003 extends ServiceEPBase { ...@@ -118,8 +115,14 @@ public class ServiceHGSJ003 extends ServiceEPBase {
* 修改操作 * 修改操作
*/ */
public void modify(HGSJ003 hgsj003) { public void modify(HGSJ003 hgsj003) {
// 校验数据 String spec = HGSJTools.Hgsj003.jointSpec(hgsj003.getLength(), hgsj003.getWidth(), hgsj003.getThick());
this.checkAddData(hgsj003); if (!StringUtils.trimToEmpty(hgsj003.getSpec()).equals(StringUtils.trimToEmpty(spec))){
// 设置规格,去除空格
hgsj003.setSpec(StringUtils.trimToEmpty(spec));
// 校验数据
this.checkAddData(hgsj003);
}
DaoUtils.update(HGSJ003.UPDATE, hgsj003); DaoUtils.update(HGSJ003.UPDATE, hgsj003);
} }
......
...@@ -293,8 +293,8 @@ ...@@ -293,8 +293,8 @@
select select
a.ORG_ENAME as "orgEname", a.ORG_ENAME as "orgEname",
a.ORG_CNAME as "orgCname" a.ORG_CNAME as "orgCname"
from iplat_hggp.txsog01 a from ${platSchema}.txsog01 a
left join iplat_hggp.txsog02 b on a.ORG_ID = b.ORG_ID left join ${platSchema}.txsog02 b on a.ORG_ID = b.ORG_ID
where where
a.ACCOUNT_CODE = #accountCode# a.ACCOUNT_CODE = #accountCode#
and a.ORG_TYPE = #orgType# and a.ORG_TYPE = #orgType#
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
UPDATED_BY as "updatedBy", <!-- 更新人 --> UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 --> UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 --> UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DELETE_FLAG as "deleteFlag", <!-- 是否删除:0-否 1-是 --> DELETE_FLAG as "deleteFlag", <!-- 状态 1.启用 0.停止 -->
FACTORY_CODE as "factoryCode", <!-- 厂区编码 --> FACTORY_CODE as "factoryCode", <!-- 厂区编码 -->
FACTORY_NAME as "factoryName", <!-- 厂区名称 --> FACTORY_NAME as "factoryName", <!-- 厂区名称 -->
FLOW_CODE as "flowCode", <!-- 流程编码 --> FLOW_CODE as "flowCode", <!-- 流程编码 -->
...@@ -190,12 +190,12 @@ ...@@ -190,12 +190,12 @@
UPDATED_BY, <!-- 更新人 --> UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 --> UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 --> UPDATED_TIME, <!-- 更新时间 -->
DELETE_FLAG, <!-- 是否删除:0-否 1-是 --> DELETE_FLAG, <!-- 状态 1.启用 0.停止 -->
FACTORY_CODE, <!-- 厂区编码 --> FACTORY_CODE, <!-- 厂区编码 -->
FACTORY_NAME, <!-- 厂区名称 --> FACTORY_NAME, <!-- 厂区名称 -->
FLOW_CODE, <!-- 流程编码 --> FLOW_CODE, <!-- 流程编码 -->
FLOW_NAME, <!-- 流程名称 --> FLOW_NAME, <!-- 流程名称 -->
STATUS <!-- 状态 0.启用 1.停止 --> STATUS <!-- 状态 1.启用 0.停止 -->
) )
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #factoryCode#, #factoryName#, #flowCode#, #flowName#, #status#) VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #factoryCode#, #factoryName#, #flowCode#, #flowName#, #status#)
</insert> </insert>
...@@ -211,7 +211,7 @@ ...@@ -211,7 +211,7 @@
UPDATED_BY = #updatedBy#, <!-- 更新人 --> UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 --> UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 --> UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DELETE_FLAG = #deleteFlag# <!-- 是否删除:0-否 1-是 --> DELETE_FLAG = #deleteFlag# <!-- 状态 1.启用 0.停止 -->
WHERE WHERE
ID = #id# ID = #id#
</update> </update>
...@@ -238,7 +238,7 @@ ...@@ -238,7 +238,7 @@
UPDATED_BY = #updatedBy#, <!-- 更新人 --> UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 --> UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 --> UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 是否删除:0-否 1-是 --> DELETE_FLAG = #deleteFlag#, <!-- 状态 1.启用 0.停止 -->
FACTORY_CODE = #factoryCode#, <!-- 厂区编码 --> FACTORY_CODE = #factoryCode#, <!-- 厂区编码 -->
FACTORY_NAME = #factoryName#, <!-- 厂区名称 --> FACTORY_NAME = #factoryName#, <!-- 厂区名称 -->
FLOW_CODE = #flowCode#, <!-- 流程编码 --> FLOW_CODE = #flowCode#, <!-- 流程编码 -->
......
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,7 @@
WIDTH as "width", <!-- 宽 --> WIDTH as "width", <!-- 宽 -->
THICK as "thick", <!-- 厚 --> THICK as "thick", <!-- 厚 -->
COEFFICIENT as "coefficient", <!-- 系数 --> COEFFICIENT as "coefficient", <!-- 系数 -->
PRICE as "price",
STATUS as "status" <!-- 状态 0-启用 1-停止 --> STATUS as "status" <!-- 状态 0-启用 1-停止 -->
</sql> </sql>
...@@ -291,9 +292,10 @@ ...@@ -291,9 +292,10 @@
WIDTH, <!-- 宽 --> WIDTH, <!-- 宽 -->
THICK, <!-- 厚 --> THICK, <!-- 厚 -->
COEFFICIENT, <!-- 系数 --> COEFFICIENT, <!-- 系数 -->
PRICE,
STATUS <!-- 状态 0-启用 1-停止 --> STATUS <!-- 状态 0-启用 1-停止 -->
) )
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #factoryCode#, #factoryName#, #flowCode#, #flowName#, #processCode#, #processName#, #unit#, #processClass#, #spec#, #length#, #width#, #thick#, #coefficient#, #status#) VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #factoryCode#, #factoryName#, #flowCode#, #flowName#, #processCode#, #processName#, #unit#, #processClass#, #spec#, #length#, #width#, #thick#, #coefficient#, #price#, #status#)
</insert> </insert>
<delete id="delete"> <delete id="delete">
...@@ -337,6 +339,7 @@ ...@@ -337,6 +339,7 @@
WIDTH = #width#, <!-- 宽 --> WIDTH = #width#, <!-- 宽 -->
THICK = #thick#, <!-- 厚 --> THICK = #thick#, <!-- 厚 -->
COEFFICIENT = #coefficient#, <!-- 系数 --> COEFFICIENT = #coefficient#, <!-- 系数 -->
PRICE = #price#,
STATUS = #status# <!-- 状态 0-启用 1-停止 --> STATUS = #status# <!-- 状态 0-启用 1-停止 -->
WHERE WHERE
ID = #id# ID = #id#
...@@ -362,7 +365,7 @@ ...@@ -362,7 +365,7 @@
'' as "length", '' as "length",
'' as "width", '' as "width",
'' as "thick" '' as "thick"
from hggp.hggy001 from ${hggpSchema}.hggy001
where ACCOUNT_CODE = #accountCode# where ACCOUNT_CODE = #accountCode#
<isNotEmpty prepend=" AND " property="deleteFlag"> <isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag# DELETE_FLAG = #deleteFlag#
...@@ -378,8 +381,8 @@ ...@@ -378,8 +381,8 @@
FACTORY_NAME as "factoryName", FACTORY_NAME as "factoryName",
COMPANY_CODE as "companyCode", COMPANY_CODE as "companyCode",
COMPANY_NAME as "companyName" COMPANY_NAME as "companyName"
from iplat_hggp.txsog01 A from ${platSchema}.txsog01 A
inner join iplat_hggp.txsog02 B ON A.ORG_ID = B.ORG_ID inner join ${platSchema}.txsog02 B ON A.ORG_ID = B.ORG_ID
where A.ACCOUNT_CODE = #accountCode# and A.ORG_TYPE in (#orgType#) AND B.USER_ID = #loginName# and A.IS_DELETED = '0' where A.ACCOUNT_CODE = #accountCode# and A.ORG_TYPE in (#orgType#) AND B.USER_ID = #loginName# and A.IS_DELETED = '0'
</select> </select>
......
...@@ -2,6 +2,8 @@ package com.baosight.hggp.hg.sj.tools; ...@@ -2,6 +2,8 @@ package com.baosight.hggp.hg.sj.tools;
import com.baosight.hggp.core.dao.DaoBase; import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.security.UserSessionUtils; import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.sb.domain.HGSB002A;
import com.baosight.hggp.hg.sj.domain.HGSJ002A;
import com.baosight.hggp.hg.sj.domain.HGSJ003; import com.baosight.hggp.hg.sj.domain.HGSJ003;
import com.baosight.hggp.util.AssertUtils; import com.baosight.hggp.util.AssertUtils;
import com.baosight.iplat4j.common.ed.domain.TEDCM01; import com.baosight.iplat4j.common.ed.domain.TEDCM01;
...@@ -21,8 +23,26 @@ import java.util.stream.Collectors; ...@@ -21,8 +23,26 @@ import java.util.stream.Collectors;
public class HGSJTools { public class HGSJTools {
/** /**
* Hgsj002a公共DAO方法定义
*/
public static class Hgsj002a {
/**
* 查询
* @param parentId
* @return
*/
public static List<HGSJ002A> list(Long parentId){
AssertUtils.isNull(parentId, "parentId不能为空");
Map queryMap = new HashMap();
queryMap.put(HGSJ002A.FIELD_PAREND_ID, parentId);
List<HGSJ002A> results = DaoBase.getInstance().query(HGSJ002A.QUERY, queryMap);
AssertUtils.isEmpty(results, String.format("流程ID[%s]没有添加流程详情不存在", parentId));
return results;
}
}
/**
* Hgsj003公共DAO方法定义 * Hgsj003公共DAO方法定义
*
*/ */
public static class Hgsj003 { public static class Hgsj003 {
/** /**
......
package com.baosight.hggp.util; package com.baosight.hggp.util;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant; import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.pz.tools.HGPZTools;
import com.baosight.hggp.hg.sj.domain.HGSJ003; import com.baosight.hggp.hg.sj.domain.HGSJ003;
import com.baosight.hggp.hg.sj.tools.HGSJTools; import com.baosight.hggp.hg.sj.tools.HGSJTools;
import com.baosight.hggp.util.importer.Importer; import com.baosight.hggp.util.importer.Importer;
...@@ -238,6 +240,11 @@ public class ExcelUtils { ...@@ -238,6 +240,11 @@ public class ExcelUtils {
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("导入成功" + arrayList.size() + "条"); inInfo.setMsg("导入成功" + arrayList.size() + "条");
break; break;
case "HGPZ005":
HGPZTools.HgPz005.add(arrayList);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("导入成功" + arrayList.size() + "条");
break;
default: default:
} }
......
...@@ -29,4 +29,7 @@ ...@@ -29,4 +29,7 @@
<sqlMap resource="com/baosight/hggp/hg/sc/sql/HGSC001A.xml"/> <sqlMap resource="com/baosight/hggp/hg/sc/sql/HGSC001A.xml"/>
<sqlMap resource="com/baosight/hggp/hg/sc/sql/HGSC002.xml"/> <sqlMap resource="com/baosight/hggp/hg/sc/sql/HGSC002.xml"/>
<!--配置-->
<sqlMap resource="com/baosight/hggp/hg/pz/sql/HGPZ005A.xml"/>
</sqlMapConfig> </sqlMapConfig>
...@@ -9,6 +9,22 @@ $(function() { ...@@ -9,6 +9,22 @@ $(function() {
pageSizes: [10, 20, 30, 50, 100, 200] pageSizes: [10, 20, 30, 50, 100, 200]
}, },
columns: [{ columns: [{
field: "operator",
title: "操作",
template: function (item) {
let status = item.status;
let template = '';
if (item.id){
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showFlowDetail(' + item.id + ')" >工艺流程</a>';
if (item.flowId>0){
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showDetail(' + item.id + ')" >工艺流程详情</a>';
}
}
return template;
}
}, {
field: "spec", field: "spec",
template: function (options) { template: function (options) {
return $.trim(options.spec) == "" ? "无规格" : options.spec; return $.trim(options.spec) == "" ? "无规格" : options.spec;
...@@ -56,6 +72,56 @@ $(function() { ...@@ -56,6 +72,56 @@ $(function() {
deleteFunc(); deleteFunc();
} }
} }
/*$("#DOWNLOAD").on("click", function (e) {
var href = ${ctx} + "\\common\\template\\PZ\\HGPZ005_存货档案.xls";
window.location.href = href;
});*/
grush.openImportBox();
IPLATUI.EFUpload = {
fileUpload: {
showFileList: false,
upload: function (e) {
openFileWindow.close();
IPLAT.progress($("body"), true);
},
success: function (e) {
var src = e.response.docUrl;
var eiInfo = new EiInfo();
let notIsExcelFile = isExcelFile(src);
eiInfo.set("fileName", src);
EiCommunicator.send("HGPZ005", "importDate", eiInfo, {
onSuccess(ei) {
if (notIsExcelFile) {
NotificationUtil("请导入xls或xlsx文件", "error");
return;
}
if (ei.status == "-1") {
NotificationUtil(
{msg: ei.msg, detailMsg: ei.detailMsg}, "error");
} else {
NotificationUtil(ei.msg);
query();
}
},
onFail(ei) {
NotificationUtil("调用失败,原因[" + ei + "]", "error");
}
},
{
async: false
});
IPLAT.progress($("body"), false);
},
fail(e) {
IPLAT.NotificationUtil('导入失败!', "error");
}
}
}
grush.downloadFile(`${ctx}\\common\\template\\PZ\\HGPZ005_存货档案.xls`);
downKeyUp(); downKeyUp();
}); });
...@@ -147,3 +213,46 @@ let deleteFunc = function () { ...@@ -147,3 +213,46 @@ let deleteFunc = function () {
} }
}); });
} }
function showDetail(id) {
JSColorbox.open({
href: "HGPZ005A?methodName=initLoad&inqu_status-0-parentId=" + id,
title: "<div style='text-align: center;'>工艺流程详情</div>",
width: "75%",
height: "80%",
});
}
function showFlowDetail(id) {
JSColorbox.open({
href: "HGPZ005B?methodName=initLoad&inqu_status-0-parentId=" + id,
title: "<div style='text-align: center;'>工艺流程</div>",
width: "75%",
height: "80%",
callbackName: cllback
});
}
/**
* 回调
*/
function cllback(result) {
let inEiInfo = new EiInfo();
inEiInfo.set("result-0-id", result.id);
inEiInfo.set("result-0-flow", result.rows);
EiCommunicator.send('HGPZ005', 'updateFlowId', inEiInfo, {
onSuccess(ei) {
if (ei.status == "-1") {
NotificationUtil({msg: ei.msg, detailMsg: ei.detailMsg}, "error");
} else {
NotificationUtil(ei.msg);
query();
}
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
});
}
...@@ -4,6 +4,9 @@ ...@@ -4,6 +4,9 @@
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %> <%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/> <c:set var="ctx" value="${pageContext.request.contextPath}"/>
<script>
var ctx = "${ctx}";
</script>
<EF:EFPage title="存货档案"> <EF:EFPage title="存货档案">
<EF:EFRegion id="inqu" title="查询条件"> <EF:EFRegion id="inqu" title="查询条件">
<div class="row"> <div class="row">
...@@ -22,6 +25,7 @@ ...@@ -22,6 +25,7 @@
<EF:EFRegion id="result" title="记录集"> <EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true"> <EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="160" align="center"/>
<EF:EFColumn cname="存货编码" ename="inventCode" width="140" align="center" enable="false"/> <EF:EFColumn cname="存货编码" ename="inventCode" width="140" align="center" enable="false"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" width="120" align="center" required="true" <EF:EFComboColumn ename="inventType" cname="存货类型" width="120" align="center" required="true"
blockName="invent_type_block_id" textField="textField" valueField="valueField" blockName="invent_type_block_id" textField="textField" valueField="valueField"
...@@ -34,8 +38,7 @@ ...@@ -34,8 +38,7 @@
<EF:EFColumn ename="width" cname="宽(MM)" width="100" align="right" format="{0:N2}" maxLength="10"/> <EF:EFColumn ename="width" cname="宽(MM)" width="100" align="right" format="{0:N2}" maxLength="10"/>
<EF:EFColumn ename="thick" cname="厚(MM)" width="100" align="right" format="{0:N2}" maxLength="10"/> <EF:EFColumn ename="thick" cname="厚(MM)" width="100" align="right" format="{0:N2}" maxLength="10"/>
<EF:EFColumn ename="material" cname="材质" width="100" align="center"/> <EF:EFColumn ename="material" cname="材质" width="100" align="center"/>
<EF:EFColumn ename="coefficient" cname="系数" width="80" align="right" format="{0:N2}" maxLength="10" <EF:EFColumn ename="coefficient" cname="系数" width="80" align="right" format="{0:N2}" maxLength="10" defaultValue="1"/>
defaultValue="1"/>
<EF:EFColumn ename="unit" cname="单位" width="80" align="center"/> <EF:EFColumn ename="unit" cname="单位" width="80" align="center"/>
<EF:EFComboColumn ename="status" cname="状态" align="center" width="80" required="true" defaultValue="1"> <EF:EFComboColumn ename="status" cname="状态" align="center" width="80" required="true" defaultValue="1">
<EF:EFCodeOption codeName="hpjx.hpjx.status"/> <EF:EFCodeOption codeName="hpjx.hpjx.status"/>
...@@ -49,7 +52,12 @@ ...@@ -49,7 +52,12 @@
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
<EF:EFWindow id="openFile">
<EF:EFRegion id="upload" title="文件导入区">
<div id="button"></div>
<EF:EFUpload ename="fileUpload" cname="导入" docTag="HGPZ005" path="pz"/>
</EF:EFRegion>
</EF:EFWindow>
</EF:EFPage> </EF:EFPage>
$(function (){
var processCodes = __eiInfo.getBlock("processCode_block_id").getMappedRows();
var itemCodeBox = __eiInfo.getBlock("item_code_box_block_id").getMappedRows();
$(".row").children().attr("class", "col-md-3");
$("#QUERY").on("click", query);
/* 页面查询框的尺寸设置 */
$.extend(true, IPLATUI.Config, {
EFGrid: {
height: $(document).height() - $("#inqu").height() - $("#ef_form_head").height() - 100,
}
});
IPLATUI.EFGrid = {
"result": {
pageable: {
pageSize: 10,
pageSizes: [10, 20, 50, 100],
},
columns: [
{
field: "processCode",
template: function (dataItem) {
for (let i = 0; i < processCodes.length; i++) {
if (processCodes[i]['valueField'] === dataItem['processCode']) {
dataItem['processName'] = processCodes[i]['textField'].split("]")[1];
return processCodes[i]['textField'].split("]")[1];
}
}
return dataItem['processCode'];
},
},{
field: "processClass",
template: function (dataItem) {
for (let i = 0; i < itemCodeBox.length; i++) {
if (itemCodeBox[i]['valueField'] === dataItem['processClass']) {
return itemCodeBox[i]['textField'];
}
}
return "";
},
editor: function (container, options) {
let eiInfo = new EiInfo();
eiInfo.set("inqu_status-0-companyCode", options.model["companyCode"]);
eiInfo.set("inqu_status-0-processCode", options.model["processCode"]);
eiInfo.set("serviceName", "HGPZ005A");
eiInfo.set("methodName", "queryEdcm01");
eiInfo.set("blockId", "item_code_box_block_id");
eiInfo.set("field", options.field);
refreshSelect(container,eiInfo);
}
}
],
loadComplete: function(grid) {},
afterEdit:function (e) {},
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
let btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
save(btnNode);
},
onDelete: function (e) {
// 阻止默认请求,使用自定义删除
//e.preventDefault();
//deleteFunc();
},
onSuccess: function (e) {
if (e.eiInfo.extAttr.methodName == 'save' || e.eiInfo.extAttr.methodName == 'delete') {
query();
}
},
onRowClick: function (e) {},
exportGrid : {
exportFileName: function (gridInstance) {
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return "工艺流程详情_" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
},
exportFileType: "xls",
exportBlockId: "result",
}
}
}
downKeyUp();
})
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 保存
*/
let save = function (btnNode) {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
$.each(rows, function(index, item) {
let processCode= item.get("processCode");
let composingCoeff= item.get("composingCoeff");
let unitCoeff= item.get("unitCoeff");
let processClass= item.get("processClass");
if(isBlank(processCode)){
message("选中的第"+(index+1)+"行\"工序名称\",不能为空!");
flag = false;
return false;
}
if(isBlank(composingCoeff)){
message("选中的第"+(index+1)+"行\"排产系数\",不能为空!");
flag = false;
return false;
}
if(isBlank(unitCoeff)){
message("选中的第"+(index+1)+"行\"单价系数\",不能为空!");
flag = false;
return false;
}
if(isBlank(processClass)){
message("选中的第"+(index+1)+"行\"工序类别\",不能为空!");
flag = false;
return false;
}
});
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGPZ005A", "save", true,
function (e) {
query();
});
btnNode.attr("disabled", false);
}
});
}
}
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/5/15
Time: 19:21
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="工艺流程详情">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<%--<EF:EFSelect blockId="inqu_status" row="0" ename="factoryCode" cname="公司名称" colWidth="3" filter="contains" readonly="true">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="flowCode" cname="流程编码" colWidth="3" readonly="true"/>
<EF:EFInput blockId="inqu_status" row="0" ename="flowName" cname="流程名称" colWidth="3" readonly="true"/>--%>
<EF:EFInput blockId="inqu_status" row="0" ename="processName" cname="工序名称" colWidth="3" placeholder="模糊查询"/>
<EF:EFInput blockId="inqu_status" row="0" ename="parentId" type="hidden" colWidth="3"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="companyCode" cname="企业编码" hidden="true"/>
<EF:EFComboColumn ename="processCode" cname="工序名称"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" width="120" required="true" readonly="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="processCode_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="processName" cname="工序名称" hidden="true"/>
<EF:EFColumn ename="composingCoeff" cname="排产系数" width="120" enable="true" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="unitCoeff" cname="单价系数" width="120" enable="true" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="processClass" cname="工序分类" width="120" enable="true" align="center" required="true"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
$(function (){
$(".row").children().attr("class", "col-md-3");
$("#QUERY").on("click", query);
/* 页面查询框的尺寸设置 */
$.extend(true, IPLATUI.Config, {
EFGrid: {
height: $(document).height() - $("#inqu").height() - $("#ef_form_head").height() - 100,
}
});
IPLATUI.EFGrid = {
"result": {
pageable: {
pageSize: 10,
pageSizes: [10, 20, 50, 100],
},
columns: [
],
loadComplete: function(grid) {
},
afterEdit:function (e) {
},
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
let btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
save(btnNode);
},
onDelete: function (e) {
// 阻止默认请求,使用自定义删除
//e.preventDefault();
//deleteFunc();
},
onSuccess: function (e) {
if (e.eiInfo.extAttr.methodName == 'save' || e.eiInfo.extAttr.methodName == 'delete') {
query();
}
},
onRowClick: function (e) {},
exportGrid : {
exportFileName: function (gridInstance) {
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return "工艺流程_" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
},
exportFileType: "xls",
exportBlockId: "result",
}
}
}
$("#result").on("click", function () {
let id = $("#inqu_status-0-parentId").val();
let rows = resultGrid.getCheckedRows();
parent.JSColorbox.setValueCallback({"id":id,"rows":rows[0]});
parent.JSColorbox.close();
});
})
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/5/15
Time: 22:39
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="工艺流程">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="factoryCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="flowName" cname="流程名称" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="parentId" cname="上级ID" colWidth="3" type="hidden"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="single" isFloat="true">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="companyCode" cname="企业编码" hidden="true" checkMode ="single"/>
<EF:EFComboColumn ename="factoryCode" cname="公司名称" enable="false"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" width="120" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="flowCode" cname="流程编码" enable="false" width="100" align="center"/>
<EF:EFColumn ename="flowName" cname="流程名称" enable="false" width="120" readonly="false" align="center" required="true"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
...@@ -260,17 +260,29 @@ let save = function (btnNode) { ...@@ -260,17 +260,29 @@ let save = function (btnNode) {
let flag = true; let flag = true;
$.each(rows, function(index, item) { $.each(rows, function(index, item) {
let factoryCode= item.get("factoryCode"); let factoryCode= item.get("factoryCode");
let processCode= item.get("processCode");
let processClass= item.get("processClass"); let processClass= item.get("processClass");
let price= item.get("price");
if(isBlank(factoryCode)){ if(isBlank(factoryCode)){
message("选中的第"+(index+1)+"行\"工厂\",不能为空!"); message("选中的第"+(index+1)+"行\"工厂\",不能为空!");
flag = false; flag = false;
return false; return false;
} }
if(isBlank(processCode)){
message("选中的第"+(index+1)+"行\"工序名称\",不能为空!");
flag = false;
return false;
}
if(isBlank(processClass)){ if(isBlank(processClass)){
message("选中的第"+(index+1)+"行\"工序分类\",不能为空!"); message("选中的第"+(index+1)+"行\"工序分类\",不能为空!");
flag = false; flag = false;
return false; return false;
} }
if(isBlank(price)){
message("选中的第"+(index+1)+"行\"单价\",不能为空!");
flag = false;
return false;
}
}); });
if(flag) { if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", { JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
......
...@@ -59,6 +59,11 @@ ...@@ -59,6 +59,11 @@
<EF:EFColumn ename="length" cname="长(MM)" width="100" align="right" format="{0:N2}" maxLength="10"/> <EF:EFColumn ename="length" cname="长(MM)" width="100" align="right" format="{0:N2}" maxLength="10"/>
<EF:EFColumn ename="width" cname="宽(MM)" width="100" align="right" format="{0:N2}" maxLength="10"/> <EF:EFColumn ename="width" cname="宽(MM)" width="100" align="right" format="{0:N2}" maxLength="10"/>
<EF:EFColumn ename="thick" cname="厚(MM)" width="100" align="right" format="{0:N2}" maxLength="10"/> <EF:EFColumn ename="thick" cname="厚(MM)" width="100" align="right" format="{0:N2}" maxLength="10"/>
<EF:EFColumn ename="price" cname="单价" width="120" enable="true" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"
/>
<EF:EFComboColumn ename="status" cname="状态" width="80" enable="true" readonly="false" align="center" required="true" defaultValue="1"> <EF:EFComboColumn ename="status" cname="状态" width="80" enable="true" readonly="false" align="center" required="true" defaultValue="1">
<EF:EFCodeOption codeName="hpjx.hpjx.status"/> <EF:EFCodeOption codeName="hpjx.hpjx.status"/>
</EF:EFComboColumn> </EF:EFComboColumn>
......
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