Commit 5d094fe4 by 宋祥

Merge branch 'dev' of http://git.pseer.com:8800/platform/hg-smart into dev

parents 7071b7dd f6546259
package com.baosight.hggp.hg.sj.domain;
import com.baosight.iplat4j.core.data.DaoEPBase;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.util.StringUtils;
import java.util.HashMap;
import java.util.Map;
/**
* Project: <br>
* Title:THpsc011.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-05-05 21:45:11 create
*/
public class HGSJ002 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "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_FACTORY_CODE = "factoryCode"; /* 厂区编码*/
public static final String FIELD_FACTORY_NAME = "factoryName"; /* 厂区名称*/
public static final String FIELD_FLOW_CODE = "flowCode"; /* 流程编码*/
public static final String FIELD_FLOW_NAME = "flowName"; /* 流程名称*/
public static final String FIELD_STATUS = "status"; /* 状态 0.启用 1.停止*/
public static final String COL_ID = "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_FACTORY_CODE = "FACTORY_CODE"; /* 厂区编码*/
public static final String COL_FACTORY_NAME = "FACTORY_NAME"; /* 厂区名称*/
public static final String COL_FLOW_CODE = "FLOW_CODE"; /* 流程编码*/
public static final String COL_FLOW_NAME = "FLOW_NAME"; /* 流程名称*/
public static final String COL_STATUS = "STATUS"; /* 状态 0.启用 1.停止*/
public static final String QUERY = "HGSJ002.query";
public static final String COUNT = "HGSJ002.count";
public static final String INSERT = "HGSJ002.insert";
public static final String UPDATE = "HGSJ002.update";
public static final String UPDATE_STATUS = "HGSJ002.updateStatus";
public static final String DELETE = "HGSJ002.delete";
public static final String DELETE_FLAG = "HGSJ002.deleteFlag";
private Long id = new Long(0); /* 主键id*/
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 factoryCode = " "; /* 厂区编码*/
private String factoryName = " "; /* 厂区名称*/
private String flowCode = " "; /* 流程编码*/
private String flowName = " "; /* 流程名称*/
private Integer status = 0; /* 状态 0.启用 1.停止*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName("主键id");
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_FACTORY_CODE);
eiColumn.setDescName("厂区编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FACTORY_NAME);
eiColumn.setDescName("厂区名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FLOW_CODE);
eiColumn.setDescName("流程编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FLOW_NAME);
eiColumn.setDescName("流程名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_STATUS);
eiColumn.setDescName("状态 0.启用 1.停止");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HGSJ002() {
initMetaData();
}
/**
* get the id - 主键id.
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id - 主键id.
*
* @param id - 主键id
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the companyCode - 企业编码 预留.
* @return the companyCode
*/
public String getAccountCode() {
return this.accountCode;
}
/**
* set the companyCode - 企业编码 预留.
*
* @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;
}
/**
* get the factoryCode - 厂区编码.
* @return the factoryCode
*/
public String getFactoryCode() {
return this.factoryCode;
}
/**
* set the factoryCode - 厂区编码.
*
* @param factoryCode - 厂区编码
*/
public void setFactoryCode(String factoryCode) {
this.factoryCode = factoryCode;
}
/**
* get the factoryName - 厂区名称.
* @return the factoryName
*/
public String getFactoryName() {
return this.factoryName;
}
/**
* set the factoryName - 厂区名称.
*
* @param factoryName - 厂区名称
*/
public void setFactoryName(String factoryName) {
this.factoryName = factoryName;
}
/**
* get the flowCode - 流程编码.
* @return the flowCode
*/
public String getFlowCode() {
return this.flowCode;
}
/**
* set the flowCode - 流程编码.
*
* @param flowCode - 流程编码
*/
public void setFlowCode(String flowCode) {
this.flowCode = flowCode;
}
/**
* get the flowName - 流程名称.
* @return the flowName
*/
public String getFlowName() {
return this.flowName;
}
/**
* set the flowName - 流程名称.
*
* @param flowName - 流程名称
*/
public void setFlowName(String flowName) {
this.flowName = flowName;
}
/**
* get the status - 状态 0.启用 1.停止.
* @return the status
*/
public Integer getStatus() {
return this.status;
}
/**
* set the status - 状态 0.启用 1.停止.
*
* @param status - 状态 0.启用 1.停止
*/
public void setStatus(Integer status) {
this.status = status;
}
/**
* 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));
setFactoryCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_CODE)), factoryCode));
setFactoryName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_NAME)), factoryName));
setFlowCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FLOW_CODE)), flowCode));
setFlowName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FLOW_NAME)), flowName));
setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status));
}
/**
* 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_FACTORY_CODE, StringUtils.toString(factoryCode, eiMetadata.getMeta(FIELD_FACTORY_CODE)));
map.put(FIELD_FACTORY_NAME, StringUtils.toString(factoryName, eiMetadata.getMeta(FIELD_FACTORY_NAME)));
map.put(FIELD_FLOW_CODE, StringUtils.toString(flowCode, eiMetadata.getMeta(FIELD_FLOW_CODE)));
map.put(FIELD_FLOW_NAME, StringUtils.toString(flowName, eiMetadata.getMeta(FIELD_FLOW_NAME)));
map.put(FIELD_STATUS, StringUtils.toString(status, eiMetadata.getMeta(FIELD_STATUS)));
return map;
}
}
package com.baosight.hggp.hg.sj.domain;
import com.baosight.iplat4j.core.data.DaoEPBase;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.util.StringUtils;
import java.util.HashMap;
import java.util.Map;
/**
* Project: <br>
* Title:THpsc012.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-05-05 21:45:14 create
*/
public class HGSJ002A extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "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_FACTORY_CODE = "factoryCode"; /* 厂区编码*/
public static final String FIELD_FACTORY_NAME = "factoryName"; /* 厂区名称*/
public static final String FIELD_FLOW_CODE = "flowCode"; /* 流程编码*/
public static final String FIELD_FLOW_NAME = "flowName"; /* 流程名称*/
public static final String FIELD_PROCESS_ORDER = "processOrder"; /* 加工顺序*/
public static final String FIELD_PROCESS_CODE = "processCode"; /* 工序编码*/
public static final String FIELD_PROCESS_NAME = "processName"; /* 工序名称*/
public static final String FIELD_PAREND_ID = "parendId";
public static final String COL_ID = "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_FACTORY_CODE = "FACTORY_CODE"; /* 厂区编码*/
public static final String COL_FACTORY_NAME = "FACTORY_NAME"; /* 厂区名称*/
public static final String COL_FLOW_CODE = "FLOW_CODE"; /* 流程编码*/
public static final String COL_FLOW_NAME = "FLOW_NAME"; /* 流程名称*/
public static final String COL_PROCESS_ORDER = "PROCESS_ORDER"; /* 加工顺序*/
public static final String COL_PROCESS_CODE = "PROCESS_CODE"; /* 工序编码*/
public static final String COL_PROCESS_NAME = "PROCESS_NAME"; /* 工序名称*/
public static final String QUERY = "HGSJ002A.query";
public static final String COUNT = "HGSJ002A.count";
public static final String INSERT = "HGSJ002A.insert";
public static final String UPDATE = "HGSJ002A.update";
public static final String DELETE = "HGSJ002A.delete";
public static final String DELETE_FLAG = "HGSJ002A.deleteFlag";
private Long id = new Long(0); /* 主键id*/
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 factoryCode = " "; /* 厂区编码*/
private String factoryName = " "; /* 厂区名称*/
private String flowCode = " "; /* 流程编码*/
private String flowName = " "; /* 流程名称*/
private Long processOrder = new Long(0); /* 加工顺序*/
private String processCode = " "; /* 工序编码*/
private String processName = " "; /* 工序名称*/
private Long parendId = new Long(0);
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName("主键id");
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_FACTORY_CODE);
eiColumn.setDescName("厂区编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FACTORY_NAME);
eiColumn.setDescName("厂区名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FLOW_CODE);
eiColumn.setDescName("流程编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FLOW_NAME);
eiColumn.setDescName("流程名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROCESS_ORDER);
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_PAREND_ID);
eiColumn.setDescName("上级ID");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HGSJ002A() {
initMetaData();
}
/**
* get the id - 主键id.
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id - 主键id.
*
* @param id - 主键id
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the companyCode - 企业编码 预留.
* @return the companyCode
*/
public String getAccountCode() {
return this.accountCode;
}
/**
* set the companyCode - 企业编码 预留.
*
* @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;
}
/**
* get the factoryCode - 厂区编码.
* @return the factoryCode
*/
public String getFactoryCode() {
return this.factoryCode;
}
/**
* set the factoryCode - 厂区编码.
*
* @param factoryCode - 厂区编码
*/
public void setFactoryCode(String factoryCode) {
this.factoryCode = factoryCode;
}
/**
* get the factoryName - 厂区名称.
* @return the factoryName
*/
public String getFactoryName() {
return this.factoryName;
}
/**
* set the factoryName - 厂区名称.
*
* @param factoryName - 厂区名称
*/
public void setFactoryName(String factoryName) {
this.factoryName = factoryName;
}
/**
* get the flowCode - 流程编码.
* @return the flowCode
*/
public String getFlowCode() {
return this.flowCode;
}
/**
* set the flowCode - 流程编码.
*
* @param flowCode - 流程编码
*/
public void setFlowCode(String flowCode) {
this.flowCode = flowCode;
}
/**
* get the flowName - 流程名称.
* @return the flowName
*/
public String getFlowName() {
return this.flowName;
}
/**
* set the flowName - 流程名称.
*
* @param flowName - 流程名称
*/
public void setFlowName(String flowName) {
this.flowName = flowName;
}
/**
* get the processOrder - 加工顺序.
* @return the processOrder
*/
public Long getProcessOrder() {
return this.processOrder;
}
/**
* set the processOrder - 加工顺序.
*
* @param processOrder - 加工顺序
*/
public void setProcessOrder(Long processOrder) {
this.processOrder = processOrder;
}
/**
* 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;
}
public String getProcessName() {
return processName;
}
public void setProcessName(String processName) {
this.processName = processName;
}
public Long getParendId() {
return parendId;
}
public void setParendId(Long parendId) {
this.parendId = parendId;
}
/**
* 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));
setFactoryCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_CODE)), factoryCode));
setFactoryName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_NAME)), factoryName));
setFlowCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FLOW_CODE)), flowCode));
setFlowName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FLOW_NAME)), flowName));
setProcessOrder(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_PROCESS_ORDER)), processOrder));
setProcessCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROCESS_CODE)), processCode));
setProcessName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROCESS_NAME)), processName));
setParendId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_PAREND_ID)),parendId));
}
/**
* 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_FACTORY_CODE, StringUtils.toString(factoryCode, eiMetadata.getMeta(FIELD_FACTORY_CODE)));
map.put(FIELD_FACTORY_NAME, StringUtils.toString(factoryName, eiMetadata.getMeta(FIELD_FACTORY_NAME)));
map.put(FIELD_FLOW_CODE, StringUtils.toString(flowCode, eiMetadata.getMeta(FIELD_FLOW_CODE)));
map.put(FIELD_FLOW_NAME, StringUtils.toString(flowName, eiMetadata.getMeta(FIELD_FLOW_NAME)));
map.put(FIELD_PROCESS_ORDER, StringUtils.toString(processOrder, eiMetadata.getMeta(FIELD_PROCESS_ORDER)));
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_PAREND_ID, StringUtils.toString(parendId, eiMetadata.getMeta(FIELD_PAREND_ID)));
return map;
}
}
package com.baosight.hggp.hg.sj.domain;
import com.baosight.iplat4j.core.data.DaoEPBase;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.util.StringUtils;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;
/**
* Project: <br>
* Title:THpsc013.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-05-05 21:45:17 create
*/
public class HGSJ003 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "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_FACTORY_CODE = "factoryCode"; /* 厂区编码*/
public static final String FIELD_FACTORY_NAME = "factoryName"; /* 厂区名称*/
public static final String FIELD_FLOW_CODE = "flowCode"; /* 流程编码*/
public static final String FIELD_FLOW_NAME = "flowName"; /* 流程名称*/
public static final String FIELD_PROCESS_CODE = "processCode"; /* 工序编码*/
public static final String FIELD_PROCESS_NAME = "processName"; /* 工序名称*/
public static final String FIELD_UNIT = "unit"; /* 单位*/
public static final String FIELD_PROCESS_CLASS = "processClass"; /* 工序分类*/
public static final String FIELD_PROCESS_CLASS_NAME = "processClassName"; /* 工序分类*/
public static final String FIELD_SPEC = "spec"; /* 规格*/
public static final String FIELD_LENGTH = "length"; /* 长*/
public static final String FIELD_WIDTH = "width"; /* 宽*/
public static final String FIELD_THICK = "thick"; /* 厚*/
public static final String FIELD_COEFFICIENT = "coefficient"; /* 系数*/
public static final String FIELD_STATUS = "status"; /* 状态 0-启用 1-停止*/
public static final String COL_ID = "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_FACTORY_CODE = "FACTORY_CODE"; /* 厂区编码*/
public static final String COL_FACTORY_NAME = "FACTORY_NAME"; /* 厂区名称*/
public static final String COL_FLOW_CODE = "FLOW_CODE"; /* 流程编码*/
public static final String COL_FLOW_NAME = "FLOW_NAME"; /* 流程名称*/
public static final String COL_PROCESS_CODE = "PROCESS_CODE"; /* 工序编码*/
public static final String COL_PROCESS_NAME = "PROCESS_NAME"; /* 工序名称*/
public static final String COL_UNIT = "UNIT"; /* 单位*/
public static final String COL_PROCESS_CLASS = "PROCESS_CLASS"; /* 工序分类*/
public static final String COL_SPEC = "SPEC"; /* 规格*/
public static final String COL_LENGTH = "LENGTH"; /* 长*/
public static final String COL_WIDTH = "WIDTH"; /* 宽*/
public static final String COL_THICK = "THICK"; /* 厚*/
public static final String COL_COEFFICIENT = "COEFFICIENT"; /* 系数*/
public static final String COL_STATUS = "STATUS"; /* 状态 0-启用 1-停止*/
public static final String QUERY = "HGSJ003.query";
public static final String COUNT = "HGSJ003.count";
public static final String INSERT = "HGSJ003.insert";
public static final String UPDATE = "HGSJ003.update";
public static final String DELETE = "HGSJ003.delete";
public static final String DELETE_FLAG = "HGSJ003.deleteFlag";
public static final String UPDATE_STATUS = "HGSJ003.updateStatus";
private Long id = new Long(0); /* 主键id*/
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 factoryCode = " "; /* 厂区编码*/
private String factoryName = " "; /* 厂区名称*/
private String flowCode = " "; /* 流程编码*/
private String flowName = " "; /* 流程名称*/
private String processCode = " "; /* 工序编码*/
private String processName = " "; /* 工序名称*/
private String unit = " "; /* 单位*/
private Integer processClass = new Integer(0); /* 工序分类*/
private String processClassName = " "; /* 工序分类名称*/
private String spec = " "; /* 规格*/
private BigDecimal length = new BigDecimal(0.000); /* 长*/
private BigDecimal width = new BigDecimal(0.000); /* 宽*/
private BigDecimal thick = new BigDecimal(0.000); /* 厚*/
private BigDecimal coefficient = new BigDecimal(0.000); /* 系数*/
private Integer status = 0; /* 状态 0-启用 1-停止*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName("主键id");
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_FACTORY_CODE);
eiColumn.setDescName("厂区编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FACTORY_NAME);
eiColumn.setDescName("厂区名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FLOW_CODE);
eiColumn.setDescName("流程编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FLOW_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_UNIT);
eiColumn.setDescName("单位");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROCESS_CLASS);
eiColumn.setDescName("工序分类");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROCESS_CLASS_NAME);
eiColumn.setDescName("工序分类名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SPEC);
eiColumn.setDescName("规格");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_LENGTH);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12);
eiColumn.setDescName("长");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_WIDTH);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12);
eiColumn.setDescName("宽");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_THICK);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12);
eiColumn.setDescName("厚");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COEFFICIENT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12);
eiColumn.setDescName("系数");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_STATUS);
eiColumn.setDescName("状态 0-启用 1-停止");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HGSJ003() {
initMetaData();
}
/**
* get the id - 主键id.
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id - 主键id.
*
* @param id - 主键id
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the companyCode - 企业编码 预留.
* @return the companyCode
*/
public String getAccountCode() {
return this.accountCode;
}
/**
* set the companyCode - 企业编码 预留.
*
* @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;
}
/**
* get the factoryCode - 厂区编码.
* @return the factoryCode
*/
public String getFactoryCode() {
return this.factoryCode;
}
/**
* set the factoryCode - 厂区编码.
*
* @param factoryCode - 厂区编码
*/
public void setFactoryCode(String factoryCode) {
this.factoryCode = factoryCode;
}
/**
* get the factoryName - 厂区名称.
* @return the factoryName
*/
public String getFactoryName() {
return this.factoryName;
}
/**
* set the factoryName - 厂区名称.
*
* @param factoryName - 厂区名称
*/
public void setFactoryName(String factoryName) {
this.factoryName = factoryName;
}
/**
* get the flowCode - 流程编码.
* @return the flowCode
*/
public String getFlowCode() {
return this.flowCode;
}
/**
* set the flowCode - 流程编码.
*
* @param flowCode - 流程编码
*/
public void setFlowCode(String flowCode) {
this.flowCode = flowCode;
}
/**
* get the flowName - 流程名称.
* @return the flowName
*/
public String getFlowName() {
return this.flowName;
}
/**
* set the flowName - 流程名称.
*
* @param flowName - 流程名称
*/
public void setFlowName(String flowName) {
this.flowName = flowName;
}
/**
* 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;
}
public String getProcessName() {
return processName;
}
public void setProcessName(String processName) {
this.processName = processName;
}
/**
* get the unit - 单位.
* @return the unit
*/
public String getUnit() {
return this.unit;
}
/**
* set the unit - 单位.
*
* @param unit - 单位
*/
public void setUnit(String unit) {
this.unit = unit;
}
/**
* get the processClass - 工序分类.
* @return the processClass
*/
public Integer getProcessClass() {
return this.processClass;
}
/**
* set the processClass - 工序分类.
*
* @param processClass - 工序分类
*/
public void setProcessClass(Integer processClass) {
this.processClass = processClass;
}
public String getProcessClassName() {
return processClassName;
}
public void setProcessClassName(String processClassName) {
this.processClassName = processClassName;
}
/**
* get the spec - 规格.
* @return the spec
*/
public String getSpec() {
return this.spec;
}
/**
* set the spec - 规格.
*
* @param spec - 规格
*/
public void setSpec(String spec) {
this.spec = spec;
}
/**
* get the length - 长.
* @return the length
*/
public BigDecimal getLength() {
return this.length;
}
/**
* set the length - 长.
*
* @param length - 长
*/
public void setLength(BigDecimal length) {
this.length = length;
}
/**
* get the width - 宽.
* @return the width
*/
public BigDecimal getWidth() {
return this.width;
}
/**
* set the width - 宽.
*
* @param width - 宽
*/
public void setWidth(BigDecimal width) {
this.width = width;
}
/**
* get the thick - 厚.
* @return the thick
*/
public BigDecimal getThick() {
return this.thick;
}
/**
* set the thick - 厚.
*
* @param thick - 厚
*/
public void setThick(BigDecimal thick) {
this.thick = thick;
}
/**
* get the coefficient - 系数.
* @return the coefficient
*/
public BigDecimal getCoefficient() {
return this.coefficient;
}
/**
* set the coefficient - 系数.
*
* @param coefficient - 系数
*/
public void setCoefficient(BigDecimal coefficient) {
this.coefficient = coefficient;
}
/**
* get the status - 状态 0-启用 1-停止.
* @return the status
*/
public Integer getStatus() {
return this.status;
}
/**
* set the status - 状态 0-启用 1-停止.
*
* @param status - 状态 0-启用 1-停止
*/
public void setStatus(Integer status) {
this.status = status;
}
/**
* 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));
setFactoryCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_CODE)), factoryCode));
setFactoryName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_NAME)), factoryName));
setFlowCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FLOW_CODE)), flowCode));
setFlowName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FLOW_NAME)), flowName));
setProcessCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROCESS_CODE)), processCode));
setProcessName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROCESS_NAME)), processName));
setUnit(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UNIT)), unit));
setProcessClass(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_PROCESS_CLASS)), processClass));
setProcessClassName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROCESS_CLASS_NAME)), processClassName));
setSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SPEC)), spec));
setLength(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_LENGTH)), length));
setWidth(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_WIDTH)), width));
setThick(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_THICK)), thick));
setCoefficient(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_COEFFICIENT)), coefficient));
setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status));
}
/**
* 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_FACTORY_CODE, StringUtils.toString(factoryCode, eiMetadata.getMeta(FIELD_FACTORY_CODE)));
map.put(FIELD_FACTORY_NAME, StringUtils.toString(factoryName, eiMetadata.getMeta(FIELD_FACTORY_NAME)));
map.put(FIELD_FLOW_CODE, StringUtils.toString(flowCode, eiMetadata.getMeta(FIELD_FLOW_CODE)));
map.put(FIELD_FLOW_NAME, StringUtils.toString(flowName, eiMetadata.getMeta(FIELD_FLOW_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_UNIT, StringUtils.toString(unit, eiMetadata.getMeta(FIELD_UNIT)));
map.put(FIELD_PROCESS_CLASS, StringUtils.toString(processClass, eiMetadata.getMeta(FIELD_PROCESS_CLASS)));
map.put(FIELD_PROCESS_CLASS_NAME, StringUtils.toString(processClassName, eiMetadata.getMeta(FIELD_PROCESS_CLASS_NAME)));
map.put(FIELD_SPEC, StringUtils.toString(spec, eiMetadata.getMeta(FIELD_SPEC)));
map.put(FIELD_LENGTH, StringUtils.toString(length, eiMetadata.getMeta(FIELD_LENGTH)));
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_COEFFICIENT, StringUtils.toString(coefficient, eiMetadata.getMeta(FIELD_COEFFICIENT)));
map.put(FIELD_STATUS, StringUtils.toString(status, eiMetadata.getMeta(FIELD_STATUS)));
return map;
}
}
package com.baosight.hggp.hg.sj.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.core.enums.OrgTypeEnum;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.sj.domain.HGSJ002;
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 java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/5/6
*/
public class ServiceHGSJ002 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 = super.query(inInfo, HGSJ002.QUERY, new HGSJ002());
CommonMethod.initBlock(inInfo,
Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID),
new HashMap<String,Object>(){{put("orgType", OrgTypeEnum.COMPANY.getCode());}}
);
return inInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGSJ002.FIELD_DELETE_FLAG,CommonConstant.YesNo.NO_0);
return super.query(inInfo, HGSJ002.QUERY);
}
@OperationLogAnnotation(operModul = "工艺流程",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
int i = 0;
try {
HGSJ002 hpsc013 = new HGSJ002();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hpsc013.fromMap(map);
hpsc013.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HGSJ002.DELETE_FLAG, hpsc013);
}
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 (int i = 0; i < resultRows.size(); i++) {
HGSJ002 hpsc013 = new HGSJ002();
hpsc013.fromMap(resultRows.get(i));
if (hpsc013.getId() == null || hpsc013.getId() == 0) {
this.add(hpsc013);
} else {
this.modify(hpsc013);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HGSJ002 hpsc013) {
//生成流程编码
hpsc013.setFlowCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.FLOW_CODE));
DaoUtils.insert(HGSJ002.INSERT, hpsc013);
}
/**
* 修改操作
*/
public void modify(HGSJ002 hpsc013) {
DaoUtils.update(HGSJ002.UPDATE, hpsc013);
}
/**
* 修改状态
*/
@OperationLogAnnotation(operModul = "工艺流程",operType = "修改",operDesc = "修改状态操作")
public EiInfo updateStatus(EiInfo inInfo){
int i = 0;
try {
HGSJ002 hpsc013 = new HGSJ002();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hpsc013.fromMap(map);
DaoUtils.update(HGSJ002.UPDATE_STATUS, hpsc013);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.update", "修改")});
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
ErrorCodeUtils.handleUpdateException(inInfo,i,e);
logError("修改失败", e.getMessage());
return inInfo;
}
return inInfo;
}
}
package com.baosight.hggp.hg.sj.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.core.enums.OrgTypeEnum;
import com.baosight.hggp.hg.sj.domain.HGSJ002A;
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 java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/5/6
*/
public class ServiceHGSJ002A extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGSJ002A.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
//inInfo.setCell(EiConstant.queryBlock,ACConstants.ROW_CODE_0,HGPZ002A.FIELD_PARENT_ID,inInfo.get("inqu_status-0-parendId"));
//inInfo.setCell(EiConstant.queryBlock,ACConstants.ROW_CODE_0,HGPZ002A.FIELD_FLOW_CODE,inInfo.get("inqu_status-0-flowCode"));
//inInfo.setCell(EiConstant.queryBlock,ACConstants.ROW_CODE_0,HGPZ002A.FIELD_FLOW_NAME,inInfo.get("inqu_status-0-flowName"));
inInfo = super.query(inInfo, HGSJ002A.QUERY, new HGSJ002A());
CommonMethod.initBlock(inInfo,
Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID,DdynamicEnum.PROCESS_CODE_BLOCK_ID),
new HashMap<String,Object>(){{
put("orgType", OrgTypeEnum.COMPANY.getCode());
put(HGSJ002A.FIELD_DELETE_FLAG,CommonConstant.YesNo.NO_0);}}
);
return inInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGSJ002A.FIELD_DELETE_FLAG,CommonConstant.YesNo.NO_0);
return super.query(inInfo, HGSJ002A.QUERY,new HGSJ002A());
}
@OperationLogAnnotation(operModul = "工艺流程详情",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
int i = 0;
try {
HGSJ002A hpsc013a = new HGSJ002A();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hpsc013a.fromMap(map);
hpsc013a.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HGSJ002A.DELETE_FLAG, hpsc013a);
}
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();
Long parendId = Long.valueOf(inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGSJ002A.FIELD_PAREND_ID));
String factoryCode = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGSJ002A.FIELD_FACTORY_CODE);
String flowCode = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGSJ002A.FIELD_FLOW_CODE);
String flowName = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGSJ002A.FIELD_FLOW_NAME);
// 写入数据
for (int i = 0; i < resultRows.size(); i++) {
HGSJ002A hpsc013a = new HGSJ002A();
hpsc013a.fromMap(resultRows.get(i));
if (hpsc013a.getId() == null || hpsc013a.getId() == 0) {
hpsc013a.setParendId(parendId);
hpsc013a.setFactoryCode(factoryCode);
hpsc013a.setFlowCode(flowCode);
hpsc013a.setFlowName(flowName);
this.add(hpsc013a);
} else {
this.modify(hpsc013a);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HGSJ002A hpsc013a) {
DaoUtils.insert(HGSJ002A.INSERT, hpsc013a);
}
/**
* 修改操作
*/
public void modify(HGSJ002A hpsc013a) {
DaoUtils.update(HGSJ002A.UPDATE, hpsc013a);
}
}
package com.baosight.hggp.hg.sj.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.core.enums.OrgTypeEnum;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.sj.domain.HGSJ002;
import com.baosight.hggp.hg.sj.domain.HGSJ003;
import com.baosight.hggp.hg.sj.tools.HGSJTools;
import com.baosight.hggp.util.*;
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.core.util.DateUtils;
import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.lang3.StringUtils;
import java.util.*;
/**
* @author LiuYang
* @version 1.0 2024/5/7
*/
public class ServiceHGSJ003 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGSJ003.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo = super.query(inInfo, HGSJ003.QUERY, new HGSJ003());
CommonMethod.initBlock(inInfo,
Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID,DdynamicEnum.PROCESS_CODE_BLOCK_ID),
new HashMap<String,Object>(){{
put("orgType", OrgTypeEnum.COMPANY.getCode());
put(HGSJ003.FIELD_DELETE_FLAG,CommonConstant.YesNo.NO_0);}}
);
return inInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGSJ003.FIELD_DELETE_FLAG,CommonConstant.YesNo.NO_0);
return super.query(inInfo,HGSJ003.QUERY,new HGSJ003());
}
@OperationLogAnnotation(operModul = "工艺单价",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
int i = 0;
try {
HGSJ003 hgsj003 = new HGSJ003();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hgsj003.fromMap(map);
hgsj003.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HGSJ003.DELETE_FLAG, hgsj003);
}
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 (int i = 0; i < resultRows.size(); i++) {
HGSJ003 hgsj003 = new HGSJ003();
hgsj003.fromMap(resultRows.get(i));
// 设置规格
if (StringUtils.isBlank(hgsj003.getSpec())) {
hgsj003.setSpec(HGSJTools.Hgsj003.jointSpec(hgsj003.getLength(), hgsj003.getWidth(), hgsj003.getThick()));
}
// 去除空格
hgsj003.setSpec(StringUtils.trimToEmpty(hgsj003.getSpec()));
if (hgsj003.getId() == null || hgsj003.getId() == 0) {
this.add(hgsj003);
} else {
this.modify(hgsj003);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HGSJ003 hgsj003) {
// 校验数据
this.checkAddData(hgsj003);
DaoUtils.insert(HGSJ003.INSERT, hgsj003);
}
/**
* 修改操作
*/
public void modify(HGSJ003 hgsj003) {
// 校验数据
this.checkAddData(hgsj003);
DaoUtils.update(HGSJ003.UPDATE, hgsj003);
}
/**
* 修改状态
*/
@OperationLogAnnotation(operModul = "工艺单价",operType = "修改",operDesc = "修改状态操作")
public EiInfo updateStatus(EiInfo inInfo){
int i = 0;
try {
HGSJ003 hgsj003 = new HGSJ003();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hgsj003.fromMap(map);
DaoUtils.update(HGSJ003.UPDATE_STATUS, hgsj003);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.update", "修改")});
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
ErrorCodeUtils.handleUpdateException(inInfo,i,e);
logError("修改失败", e.getMessage());
return inInfo;
}
return inInfo;
}
/**
* 校验保存的数据
*/
private void checkAddData(HGSJ003 hgsj003) {
AssertUtils.isNull(hgsj003.getProcessCode(), "工序名称不能为空");
AssertUtils.isNull(hgsj003.getProcessClass(), "工序分类不能为空");
// 重复校验
String msg;
Map queryParam = new HashMap();
queryParam.put(HGSJ003.FIELD_ACCOUNT_CODE,hgsj003.getAccountCode());
queryParam.put(HGSJ003.FIELD_PROCESS_CODE, hgsj003.getProcessCode());
queryParam.put(HGSJ003.FIELD_PROCESS_CLASS,hgsj003.getProcessClass());
if (StringUtils.isBlank(hgsj003.getSpec())) {
queryParam.put("notSpec", CommonConstant.YesNo.YES);
msg = String.format("工序编码[%s]已存在无规格,请勿重复添加!", hgsj003.getProcessCode());
} else {
queryParam.put("spec", hgsj003.getSpec());
msg = String.format("工序编码[%s]已存在规格[%s],请勿重复添加!", hgsj003.getProcessCode(), hgsj003.getSpec());
}
List<HGSJ003> hgsj003List = dao.query(HGSJ003.QUERY, queryParam);
AssertUtils.isNotEmpty(hgsj003List, msg);
}
@OperationLogAnnotation(operModul = "工艺单价",operType = "导入",operDesc = "导入操作")
public EiInfo importDate(EiInfo inInfo) {
Map<String, Object> params = new HashMap<>(10);
String fileName = inInfo.getString("fileName");
Map<String,Object> map = HGSJTools.Hgsj003.getCompany(UserSession.getLoginName(),OrgTypeEnum.COMPANY.getCode());
params.put(HGSJ003.FIELD_ACCOUNT_CODE, UserSessionUtils.getAccountCode());
params.put(HGSJ003.FIELD_FACTORY_CODE, map.get("orgEname"));
params.put(HGSJ003.FIELD_FACTORY_NAME, map.get("orgCname"));
//解析文件,将文件中数据传入到inInfo中
return ExcelUtils.importFromExcel(inInfo, fileName, params, new HGSJ003());
}
@OperationLogAnnotation(operModul = "工艺单价",operType = "下载模板",operDesc = "下载模板")
public EiInfo downloadTemplate(EiInfo inInfo){
Map<String, Object> param = new HashMap<>(4);
Map map = HGSJTools.Hgsj003.getCompany(UserSession.getLoginName(),OrgTypeEnum.COMPANY.getCode());
param.put(HGSJ003.FIELD_FACTORY_CODE, map.get("orgEname"));
param.put(HGSJ003.FIELD_FACTORY_NAME, map.get("orgCname"));
param.put("orgType", OrgTypeEnum.COMPANY.getCode());
param.put("loginName",UserSession.getLoginName());
param.put(HGSJ003.FIELD_ACCOUNT_CODE,UserSessionUtils.getAccountCode());
List list = new ArrayList<>(Arrays.asList(HGSJ003.FIELD_PROCESS_CODE,HGSJ003.FIELD_PROCESS_NAME,HGSJ003.FIELD_PROCESS_CLASS,
HGSJ003.FIELD_UNIT,HGSJ003.FIELD_LENGTH,HGSJ003.FIELD_WIDTH,HGSJ003.FIELD_THICK));
return ExcelUtils.exportToExcel(ACConstants.SQL_COUNT, ACConstants.SQL_TEMPLATE, param, list, new HGSJ003());
}
}
<?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-05 21:45:11
Version : 1.0
schema : hpjx
tableName : HGPZ002
ID BIGINT NOT NULL primarykey,
ACCOUNT_CODE VARCHAR NOT NULL,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
DELETE_FLAG TINYINT,
FACTORY_CODE VARCHAR,
FACTORY_NAME VARCHAR,
FLOW_CODE VARCHAR,
FLOW_NAME VARCHAR,
STATUS TINYINT
-->
<sqlMap namespace="HGSJ002">
<sql id="column">
ID as "id", <!-- 主键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-是 -->
FACTORY_CODE as "factoryCode", <!-- 厂区编码 -->
FACTORY_NAME as "factoryName", <!-- 厂区名称 -->
FLOW_CODE as "flowCode", <!-- 流程编码 -->
FLOW_NAME as "flowName", <!-- 流程名称 -->
STATUS as "status" <!-- 状态 0.启用 1.停止 -->
</sql>
<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="factoryCode">
FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryName">
FACTORY_NAME LIKE CONCAT('%', #factoryName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="flowCode">
FLOW_CODE = #flowCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="flowName">
FLOW_NAME LIKE CONCAT('%', #flowName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.sj.domain.HGSJ002">
SELECT
<include refid="column"/>
FROM ${hggpSchema}.HGGY002 WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
CREATED_TIME desc, ID asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGGY002 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="factoryCode">
FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryName">
FACTORY_NAME = #factoryName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="flowCode">
FLOW_CODE = #flowCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="flowName">
FLOW_NAME = #flowName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGGY002 (ID, <!-- 主键id -->
ACCOUNT_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 -->
DELETE_FLAG, <!-- 是否删除:0-否 1-是 -->
FACTORY_CODE, <!-- 厂区编码 -->
FACTORY_NAME, <!-- 厂区名称 -->
FLOW_CODE, <!-- 流程编码 -->
FLOW_NAME, <!-- 流程名称 -->
STATUS <!-- 状态 0.启用 1.停止 -->
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #factoryCode#, #factoryName#, #flowCode#, #flowName#, #status#)
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGGY002 WHERE
ID = #id#
</delete>
<update id="deleteFlag">
UPDATE ${hggpSchema}.HGGY002
SET
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DELETE_FLAG = #deleteFlag# <!-- 是否删除:0-否 1-是 -->
WHERE
ID = #id#
</update>
<update id="updateStatus">
UPDATE ${hggpSchema}.HGGY002
SET
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
STATUS = #status# <!-- 状态 0.启用 1.停止 -->
WHERE
ID = #id#
</update>
<update id="update">
UPDATE ${hggpSchema}.HGGY002
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-是 -->
FACTORY_CODE = #factoryCode#, <!-- 厂区编码 -->
FACTORY_NAME = #factoryName#, <!-- 厂区名称 -->
FLOW_CODE = #flowCode#, <!-- 流程编码 -->
FLOW_NAME = #flowName#, <!-- 流程名称 -->
STATUS = #status# <!-- 状态 0.启用 1.停止 -->
WHERE
ID = #id#
</update>
</sqlMap>
<?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-05 21:45:14
Version : 1.0
schema : hpjx
tableName : HGPZ002A
ID BIGINT NOT NULL primarykey,
ACCOUNT_CODE VARCHAR NOT NULL,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
DELETE_FLAG TINYINT,
FACTORY_CODE VARCHAR,
FACTORY_NAME VARCHAR,
FLOW_CODE VARCHAR,
FLOW_NAME VARCHAR,
PROCESS_ORDER BIGINT,
PROCESS_CODE VARCHAR
-->
<sqlMap namespace="HGSJ002A">
<sql id="column">
ID as "id", <!-- 主键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-是 -->
FACTORY_CODE as "factoryCode", <!-- 厂区编码 -->
FACTORY_NAME as "factoryName", <!-- 厂区名称 -->
FLOW_CODE as "flowCode", <!-- 流程编码 -->
FLOW_NAME as "flowName", <!-- 流程名称 -->
PROCESS_ORDER as "processOrder", <!-- 加工顺序 -->
PROCESS_CODE as "processCode", <!-- 工序编码 -->
PROCESS_NAME as "processName", <!-- 工序名称 -->
PAREND_ID as "parendId"
</sql>
<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="factoryCode">
FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryName">
FACTORY_NAME LIKE CONCAT('%', #factoryName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="flowCode">
FLOW_CODE = #flowCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="flowName">
FLOW_NAME LIKE CONCAT('%', #flowName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="processOrder">
PROCESS_ORDER = #processOrder#
</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="parendId">
PAREND_ID = #parendId#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.sj.domain.HGSJ002A">
SELECT
<include refid="column" />
FROM ${hggpSchema}.HGGY002A WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
PROCESS_ORDER asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGGY002A 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="factoryCode">
FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryName">
FACTORY_NAME = #factoryName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="flowCode">
FLOW_CODE = #flowCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="flowName">
FLOW_NAME = #flowName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="processOrder">
PROCESS_ORDER = #processOrder#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="processCode">
PROCESS_CODE = #processCode#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGGY002A (ID, <!-- 主键id -->
ACCOUNT_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 -->
DELETE_FLAG, <!-- 是否删除:0-否 1-是 -->
FACTORY_CODE, <!-- 厂区编码 -->
FACTORY_NAME, <!-- 厂区名称 -->
FLOW_CODE, <!-- 流程编码 -->
FLOW_NAME, <!-- 流程名称 -->
PROCESS_ORDER, <!-- 加工顺序 -->
PROCESS_CODE, <!-- 工序编码 -->
PROCESS_NAME, <!-- 工序名称 -->
PAREND_ID
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #factoryCode#, #factoryName#, #flowCode#, #flowName#, #processOrder#, #processCode#, #processName#, #parendId#)
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGGY002A WHERE ID = #id#
</delete>
<update id="deleteFlag">
UPDATE ${hggpSchema}.HGGY002A
SET
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DELETE_FLAG = #deleteFlag# <!-- 是否删除:0-否 1-是 -->
WHERE
ID = #id#
</update>
<update id="update">
UPDATE ${hggpSchema}.HGGY002A
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-是 -->
FACTORY_CODE = #factoryCode#, <!-- 厂区编码 -->
FACTORY_NAME = #factoryName#, <!-- 厂区名称 -->
FLOW_CODE = #flowCode#, <!-- 流程编码 -->
FLOW_NAME = #flowName#, <!-- 流程名称 -->
PROCESS_ORDER = #processOrder#, <!-- 加工顺序 -->
PROCESS_CODE = #processCode#, <!-- 工序编码 -->
PROCESS_NAME = #processName#, <!-- 工序名称 -->
PAREND_ID = #parendId#
WHERE
ID = #id#
</update>
</sqlMap>
<?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-05 21:45:17
Version : 1.0
schema : hpjx
tableName : HGPZ003
ID BIGINT NOT NULL primarykey,
ACCOUNT_CODE VARCHAR NOT NULL,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
DELETE_FLAG TINYINT,
FACTORY_CODE VARCHAR,
FACTORY_NAME VARCHAR,
FLOW_CODE VARCHAR,
FLOW_NAME VARCHAR,
PROCESS_CODE VARCHAR,
UNIT VARCHAR,
PROCESS_CLASS INTEGER,
SPEC VARCHAR,
LENGTH DECIMAL,
WIDTH DECIMAL,
THICK DECIMAL,
COEFFICIENT DECIMAL,
STATUS TINYINT
-->
<sqlMap namespace="HGSJ003">
<sql id="column">
ID as "id", <!-- 主键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-是 -->
FACTORY_CODE as "factoryCode", <!-- 厂区编码 -->
FACTORY_NAME as "factoryName", <!-- 厂区名称 -->
FLOW_CODE as "flowCode", <!-- 流程编码 -->
FLOW_NAME as "flowName", <!-- 流程名称 -->
PROCESS_CODE as "processCode", <!-- 工序编码 -->
PROCESS_NAME as "processName", <!-- 工序名称 -->
UNIT as "unit", <!-- 单位 -->
PROCESS_CLASS as "processClass", <!-- 工序分类 -->
SPEC as "spec", <!-- 规格 -->
LENGTH as "length", <!-- 长 -->
WIDTH as "width", <!-- 宽 -->
THICK as "thick", <!-- 厚 -->
COEFFICIENT as "coefficient", <!-- 系数 -->
STATUS as "status" <!-- 状态 0-启用 1-停止 -->
</sql>
<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="factoryCode">
FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryName">
FACTORY_NAME LIKE CONCAT('%', #factoryName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="flowCode">
FLOW_CODE = #flowCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="flowName">
FLOW_NAME LIKE CONCAT('%', #flowName#, '%')
</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="unit">
UNIT = #unit#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="processClass">
PROCESS_CLASS = #processClass#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="spec">
SPEC = #spec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="length">
LENGTH = #length#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="width">
WIDTH = #width#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="thick">
THICK = #thick#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="coefficient">
COEFFICIENT = #coefficient#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
</sql>
<sql id="customCondition">
<isNotEmpty prepend=" AND " property="ids">
ID IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="processClasss">
PROCESS_CLASS IN <iterate close=")" open="(" conjunction="," property="processClasss">#processClasss[]#</iterate>
</isNotEmpty>
<isNotNull prepend=" AND " property="notSpec">
<isEqual property="notSpec" compareValue="Y">
SPEC = ''
</isEqual>
</isNotNull>
<isNotNull prepend=" AND " property="spec">
SPEC = #spec#
</isNotNull>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.sj.domain.HGSJ003">
SELECT
<include refid="column"/>
FROM ${hggpSchema}.HGGY003 WHERE 1=1
<include refid="condition" />
<include refid="customCondition"/>
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
CREATED_TIME desc, ID asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGGY003 WHERE 1=1
<include refid="condition" />
<include refid="customCondition"/>
</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="factoryCode">
FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryName">
FACTORY_NAME = #factoryName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="flowCode">
FLOW_CODE = #flowCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="flowName">
FLOW_NAME = #flowName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="processCode">
PROCESS_CODE = #processCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unit">
UNIT = #unit#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="processClass">
PROCESS_CLASS = #processClass#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="spec">
SPEC = #spec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="length">
LENGTH = #length#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="width">
WIDTH = #width#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="thick">
THICK = #thick#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="coefficient">
COEFFICIENT = #coefficient#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGGY003 (ID, <!-- 主键id -->
ACCOUNT_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 -->
DELETE_FLAG, <!-- 是否删除:0-否 1-是 -->
FACTORY_CODE, <!-- 厂区编码 -->
FACTORY_NAME, <!-- 厂区名称 -->
FLOW_CODE, <!-- 流程编码 -->
FLOW_NAME, <!-- 流程名称 -->
PROCESS_CODE, <!-- 工序编码 -->
PROCESS_NAME, <!-- 工序名称 -->
UNIT, <!-- 单位 -->
PROCESS_CLASS, <!-- 工序分类 -->
SPEC, <!-- 规格 -->
LENGTH, <!-- 长 -->
WIDTH, <!-- 宽 -->
THICK, <!-- 厚 -->
COEFFICIENT, <!-- 系数 -->
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#)
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGGY003 WHERE
ID = #id#
</delete>
<update id="deleteFlag">
UPDATE ${hggpSchema}.HGGY003
SET
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DELETE_FLAG = #deleteFlag# <!-- 是否删除:0-否 1-是 -->
WHERE
ID = #id#
</update>
<update id="update">
UPDATE ${hggpSchema}.HGGY003
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-是 -->
FACTORY_CODE = #factoryCode#, <!-- 厂区编码 -->
FACTORY_NAME = #factoryName#, <!-- 厂区名称 -->
FLOW_CODE = #flowCode#, <!-- 流程编码 -->
FLOW_NAME = #flowName#, <!-- 流程名称 -->
PROCESS_CODE = #processCode#, <!-- 工序编码 -->
PROCESS_NAME = #processName#, <!-- 工序名称 -->
UNIT = #unit#, <!-- 单位 -->
PROCESS_CLASS = #processClass#, <!-- 工序分类 -->
SPEC = #spec#, <!-- 规格 -->
LENGTH = #length#, <!-- 长 -->
WIDTH = #width#, <!-- 宽 -->
THICK = #thick#, <!-- 厚 -->
COEFFICIENT = #coefficient#, <!-- 系数 -->
STATUS = #status# <!-- 状态 0-启用 1-停止 -->
WHERE
ID = #id#
</update>
<update id="updateStatus">
UPDATE ${hggpSchema}.HGGY003
SET
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
STATUS = #status# <!-- 状态 0-启用 1-停止 -->
WHERE
ID = #id#
</update>
<select id="template" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
select
PROCESS_CODE as "processCode",
PROCESS_NAME as "processName",
'' as "processClassName",
UNIT as "unit",
'' as "length",
'' as "width",
'' as "thick"
from hggp.hggy001
where ACCOUNT_CODE = #accountCode#
AND FACTORY_CODE IN (
select distinct
ORG_ENAME
from iplat_hggp.txsog01 A
inner join iplat_hggp.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#
)
</select>
<select id="queryCompanyCode" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
select distinct
ORG_ENAME as "orgEname",
ORG_CNAME as "orgCname",
ACCOUNT_CODE as "accountCode",
FACTORY_CODE as "factoryCode",
FACTORY_NAME as "factoryName",
COMPANY_CODE as "companyCode",
COMPANY_NAME as "companyName"
from iplat_hggp.txsog01 A
inner join iplat_hggp.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'
</select>
</sqlMap>
$(function (){
var factoryCodes = __eiInfo.getBlock("companyBox_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: "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="showDetail(' + item.id + ',\''+item.factoryCode+'\',\''+item.flowCode+'\',\''+item.flowName+'\')" >工艺流程详情</a>';
if (status == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="updateStatus(' + item.id + ',1)" >启用</a>';
} else if (status == 1) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="updateStatus(' + item.id + ',0)" >停止</a>';
}
}
return template;
}
},{
field: "factoryCode",
template: function (dataItem) {
for (let i = 0; i < factoryCodes.length; i++) {
if (factoryCodes[i]['valueField'] === dataItem['factoryCode']) {
dataItem['factoryName'] = factoryCodes[i]['textField'];
return factoryCodes[i]['textField'];
}
}
return dataItem['factoryCode'];
},
}, {
field: "createdName",
template: function (options) {
return showUserName(options.createdBy, options.createdName);
}
}
],
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",
}
}
}
})
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 factoryCode= item.get("factoryCode");
let flowName= item.get("flowName");
if(isBlank(factoryCode)){
message("选中的第"+(index+1)+"行\"工厂\",不能为空!");
flag = false;
return false;
}
if(isBlank(flowName)){
message("选中的第"+(index+1)+"行\"流程名称\",不能为空!");
flag = false;
return false;
}
});
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGSJ002", "save", true,
function (e) {
query();
});
btnNode.attr("disabled", false);
}
});
}
}
function updateStatus(id,status) {
let inEiInfo = new EiInfo();
inEiInfo.set("result-0-id", id);
inEiInfo.set("result-0-status", status);
EiCommunicator.send('HGSJ002', 'updateStatus', inEiInfo, {
onSuccess(response) {
NotificationUtil(response.msg);
query();
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
}
);
}
/**
* 显示详情
*/
function showDetail(id,factoryCode,flowCode,flowName) {
JSColorbox.open({
href: "HGSJ002A?methodName=initLoad&inqu_status-0-parendId=" + id+
"&inqu_status-0-flowCode="+flowCode+"&inqu_status-0-flowName="+flowName+"&inqu_status-0-factoryCode="+factoryCode,
title: "<div style='text-align: center;'>工艺流程详情</div>",
width: "80%",
height: "80%",
});
}
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/5/6
Time: 15:06
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="流程名称" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="status" cname="状态" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpjx.status"/>
</EF:EFSelect>
</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:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="140" align="center"/>
<EF:EFComboColumn ename="factoryCode" cname="公司名称"
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="流程名称" width="120" enable="true" readonly="false" align="center" required="true"/>
<EF:EFComboColumn ename="status" cname="状态" width="80" enable="true" readonly="false" align="center" required="true" defaultValue="1">
<EF:EFCodeOption codeName="hpjx.hpjx.status"/>
</EF:EFComboColumn>
<EF:EFColumn cname="创建人" ename="createdName" align="center" width="100" readonly="true" required="false"
enable="false"/>
<EF:EFColumn cname="创建时间" ename="createdTime" parseFormats="['yyyyMMddHHmmss']" editType="datetime"
dateFormat="yyyy-MM-dd HH:mm:ss" align="center" width="120" readonly="true" required="false"
enable="false"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
$(function (){
var factoryCodes = __eiInfo.getBlock("companyBox_block_id").getMappedRows();
var processCodes = __eiInfo.getBlock("processCode_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: "factoryCode",
template: function (dataItem) {
for (let i = 0; i < factoryCodes.length; i++) {
if (factoryCodes[i]['valueField'] === dataItem['factoryCode']) {
dataItem['factoryName'] = factoryCodes[i]['textField'];
return factoryCodes[i]['textField'];
}
}
return dataItem['factoryCode'];
},
},*/{
field: "processCode",
template: function (dataItem) {
for (let i = 0; i < processCodes.length; i++) {
if (processCodes[i]['valueField'] === dataItem['processCode']) {
dataItem['processName'] = processCodes[i]['textField'];
return processCodes[i]['textField'];
}
}
return dataItem['processCode'];
},
}
],
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",
}
}
}
})
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 processOrder= item.get("processOrder");
let processCode= item.get("processCode");
if(isBlank(processOrder)){
message("选中的第"+(index+1)+"行\"加工顺序\",不能为空!");
flag = false;
return false;
}
if(isBlank(processCode)){
message("选中的第"+(index+1)+"行\"工序名称\",不能为空!");
flag = false;
return false;
}
});
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGSJ002A", "save", true,
function (e) {
query();
});
btnNode.attr("disabled", false);
}
});
}
}
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/5/6
Time: 16:24
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:EFSelect blockId="inqu_status" row="0" ename="processCode" cname="工序名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="processCode_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="parendId" 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="parendId" cname="上级ID" hidden="true"/>
<EF:EFColumn ename="companyCode" cname="企业编码" hidden="true"/>
<%--<EF:EFComboColumn ename="factoryCode" cname="工厂"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" width="120" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="factoryCodeBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="flowCode" cname="流程编码" enable="false" width="100" align="center"/>
<EF:EFColumn ename="flowName" cname="流程名称" width="120" enable="true" readonly="false" align="center" required="true"/>--%>
<EF:EFColumn ename="processOrder" cname="加工顺序" width="120" enable="true" format="{0:N0}" editType="number"
displayType="0" sort="true" align="center" required="true"
data-regex="/^-?[0-9]{1,15}?$/" maxLength="15"
data-errorprompt="请输入数字,该值最大可设置15位整数!"
/>
<EF:EFComboColumn ename="processCode" cname="工序名称"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" width="120" required="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 cname="创建人" ename="createdName" align="center" width="100" readonly="true" required="false"
enable="false"/>
<EF:EFColumn cname="创建时间" ename="createdTime" parseFormats="['yyyyMMddHHmmss']" editType="datetime"
dateFormat="yyyy-MM-dd HH:mm:ss" align="center" width="120" readonly="true" required="false"
enable="false"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
$(function (){
var factoryCodes = __eiInfo.getBlock("companyBox_block_id").getMappedRows();
var processCodes = __eiInfo.getBlock("processCode_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: "operator",
title: "操作",
template: function (item) {
let status = item.status;
let template = '';
if (item.id){
if (status == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="updateStatus(' + item.id + ',1)" >启用</a>';
} else if (status == 1) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="updateStatus(' + item.id + ',0)" >停止</a>';
}
}
return template;
}
}, {
field: "factoryCode",
template: function (dataItem) {
for (let i = 0; i < factoryCodes.length; i++) {
if (factoryCodes[i]['valueField'] === dataItem['factoryCode']) {
dataItem['factoryName'] = factoryCodes[i]['textField'];
return factoryCodes[i]['textField'];
}
}
return dataItem['factoryCode'];
},
}, {
field: "processCode",
template: function (dataItem) {
for (let i = 0; i < processCodes.length; i++) {
if (processCodes[i]['valueField'] === dataItem['processCode']) {
dataItem['processName'] = processCodes[i]['textField'];
return processCodes[i]['textField'];
}
}
return dataItem['processCode'];
},
}, {
field: "spec",
template: function (options) {
return $.trim(options.spec) == "" ? "无规格" : options.spec;
}
}, {
field: "length",
template: function (options) {
return options.length == 0 ? "-" : options.length;
}
}, {
field: "width",
template: function (options) {
return options.width == 0 ? "-" : options.width;
}
}, {
field: "thick",
template: function (options) {
return options.thick == 0 ? "-" : options.thick;
}
}, {
field: "createdName",
template: function (options) {
return showUserName(options.createdBy, options.createdName);
}
}
],
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",
}
}
}
$("#DOWNLOAD").on("click", function (e) {
// var eiInfo = resultGrid.getQueryInfo();
//var itemCode = $("#inqu_status-0-itemCode").val();
// eiInfo.set("companyCode", $("#inqu_status-0-companyCode").val());
// eiInfo.set("itemCode", itemCode.replaceAll("AR","PR"));
var eiInfoJSONStr = resultGrid.getQueryInfo().toJSONString();
var info = {
exportFileName: "工序单价_" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR),
exportFileType: "xls",
exportBlockId: "result",
exportServiceName: "HGSJ003",
exportMethodName: "downloadTemplate",
queryInfo: eiInfoJSONStr,
frontExport: false
};
IPLAT.Util.exportGrid(info);
});
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("HGSJ003", "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);
}
},
onFail(ei) {
NotificationUtil("调用失败,原因[" + ei + "]", "error");
}
},
{
async: false
});
IPLAT.progress($("body"), false);
},
fail(e) {
IPLAT.NotificationUtil('导入失败!', "error");
}
}
}
//grush.downloadFile(`${ctx}\\DC\\BB\\template\\DCAMIN02_附加费用管理.xls`);
})
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 factoryCode= item.get("factoryCode");
let processClass= item.get("processClass");
if(isBlank(factoryCode)){
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", "HGSJ003", "save", true,
function (e) {
query();
});
btnNode.attr("disabled", false);
}
});
}
}
function updateStatus(id,status) {
let inEiInfo = new EiInfo();
inEiInfo.set("result-0-id", id);
inEiInfo.set("result-0-status", status);
EiCommunicator.send('HGSJ003', 'updateStatus', inEiInfo, {
onSuccess(response) {
NotificationUtil(response.msg);
query();
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
}
);
}
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/5/6
Time: 16:24
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:EFSelect blockId="inqu_status" row="0" ename="processCode" cname="工序名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="processCode_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect blockId="inqu_status" row="0" ename="status" cname="状态" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpjx.status"/>
</EF:EFSelect>
</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:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" align="center"/>
<EF:EFComboColumn ename="factoryCode" cname="公司名称"
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:EFComboColumn ename="processCode" cname="工序名称"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" width="120" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="processCode_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="processClass" cname="工序分类" width="100" enable="true" readonly="false" align="center"
required="true">
<EF:EFCodeOption codeName="hggp.hgsj.processClass"/>
</EF:EFComboColumn>
<EF:EFColumn ename="unit" cname="单位" width="80" enable="true" readonly="false" align="center"/>
<EF:EFColumn ename="spec" cname="规格" width="140" enable="false" align="center" maxLength="50"/>
<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="thick" cname="厚(MM)" width="100" align="right" format="{0:N2}" maxLength="10"/>
<EF:EFComboColumn ename="status" cname="状态" width="80" enable="true" readonly="false" align="center" required="true" defaultValue="1">
<EF:EFCodeOption codeName="hpjx.hpjx.status"/>
</EF:EFComboColumn>
<EF:EFColumn cname="创建人" ename="createdName" align="center" width="100" readonly="true" required="false"
enable="false"/>
<EF:EFColumn cname="创建时间" ename="createdTime" parseFormats="['yyyyMMddHHmmss']" editType="datetime"
dateFormat="yyyy-MM-dd HH:mm:ss" align="center" width="120" readonly="true" required="false"
enable="false"/>
</EF:EFGrid>
</EF:EFRegion>
<EF:EFWindow id="openFile">
<EF:EFRegion id="upload" title="文件导入区">
<div id="button"></div>
<EF:EFUpload ename="fileUpload" cname="导入" docTag="HGSJ003" path="share"/>
</EF:EFRegion>
</EF:EFWindow>
</EF:EFPage>
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