Commit bc0022e9 by 宋祥

1.客户档案页面完善

parent 1a8f1078
...@@ -24,6 +24,10 @@ public class HPConstant { ...@@ -24,6 +24,10 @@ public class HPConstant {
public static final String HPKC003_PROD_NO = "HPKC003_PROD_NO"; public static final String HPKC003_PROD_NO = "HPKC003_PROD_NO";
// 生产销售单号 // 生产销售单号
public static final String HPKC004_SALE_NO = "HPKC004_SALE_NO"; public static final String HPKC004_SALE_NO = "HPKC004_SALE_NO";
// 供应商编码
public static final String HPPZ002_CUST_CODE = "HPPZ002_CUST_CODE";
// 客户编码
public static final String HPPZ003_CUST_CODE = "HPPZ003_CUST_CODE";
} }
/** /**
......
package com.baosight.hpjx.hp.pz.domain;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.core.util.StringUtils;
/**
* Project: <br>
* Title:THppz002.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-01-22 13:46:10 create
*/
public class HPPZ002 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id";
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码 预留*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_CUST_TYPE = "custType"; /* 供应商类型 1 国企 : 2 民营*/
public static final String FIELD_CUST_CODE = "custCode"; /* 供应商编码*/
public static final String FIELD_CUST_NAME = "custName"; /* 供应商名称*/
public static final String FIELD_ADDRESS = "address"; /* 地址*/
public static final String FIELD_STATUS = "status"; /* 状态 0禁用 1启用*/
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 COL_ID = "ID";
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String COL_CUST_TYPE = "CUST_TYPE"; /* 供应商类型 1 国企 : 2 民营*/
public static final String COL_CUST_CODE = "CUST_CODE"; /* 供应商编码*/
public static final String COL_CUST_NAME = "CUST_NAME"; /* 供应商名称*/
public static final String COL_ADDRESS = "ADDRESS"; /* 地址*/
public static final String COL_STATUS = "STATUS"; /* 状态 0禁用 1启用*/
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 QUERY = "HPPZ002.query";
public static final String COUNT = "HPPZ002.count";
public static final String INSERT = "HPPZ002.insert";
public static final String UPDATE = "HPPZ002.update";
public static final String DELETE = "HPPZ002.delete";
private Long id = null;
private String companyCode = " "; /* 企业编码 预留*/
private String depCode = " "; /* 部门编码*/
private Integer custType = null; /* 供应商类型 1 国企 : 2 民营*/
private String custCode = " "; /* 供应商编码*/
private String custName = " "; /* 供应商名称*/
private String address = " "; /* 地址*/
private Integer status = 1; /* 状态 0禁用 1启用*/
private String createdBy = " "; /* 创建人*/
private String createdName = " "; /* 创建人名称*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/
private String updatedName = " "; /* 更新人名称*/
private String updatedTime = " "; /* 更新时间*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" ");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("企业编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CUST_TYPE);
eiColumn.setDescName("供应商类型 1 国企 : 2 民营");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CUST_CODE);
eiColumn.setDescName("供应商编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CUST_NAME);
eiColumn.setDescName("供应商名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ADDRESS);
eiColumn.setDescName("地址");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_STATUS);
eiColumn.setDescName("状态 0禁用 1启用");
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);
}
/**
* the constructor.
*/
public HPPZ002() {
initMetaData();
}
/**
* get the id .
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id .
*
* @param id
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the companyCode - 企业编码 预留.
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 企业编码 预留.
*
* @param companyCode - 企业编码 预留
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* 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 custType - 供应商类型 1 国企 : 2 民营.
* @return the custType
*/
public Integer getCustType() {
return this.custType;
}
/**
* set the custType - 供应商类型 1 国企 : 2 民营.
*
* @param custType - 供应商类型 1 国企 : 2 民营
*/
public void setCustType(Integer custType) {
this.custType = custType;
}
/**
* get the custCode - 供应商编码.
* @return the custCode
*/
public String getCustCode() {
return this.custCode;
}
/**
* set the custCode - 供应商编码.
*
* @param custCode - 供应商编码
*/
public void setCustCode(String custCode) {
this.custCode = custCode;
}
/**
* get the custName - 供应商名称.
* @return the custName
*/
public String getCustName() {
return this.custName;
}
/**
* set the custName - 供应商名称.
*
* @param custName - 供应商名称
*/
public void setCustName(String custName) {
this.custName = custName;
}
/**
* get the address - 地址.
* @return the address
*/
public String getAddress() {
return this.address;
}
/**
* set the address - 地址.
*
* @param address - 地址
*/
public void setAddress(String address) {
this.address = address;
}
/**
* 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 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 value from Map.
*
* @param map - source data map
*/
@Override
public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setCustType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_CUST_TYPE)), custType));
setCustCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CUST_CODE)), custCode));
setCustName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CUST_NAME)), custName));
setAddress(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ADDRESS)), address));
setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status));
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));
}
/**
* 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_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_CUST_TYPE, StringUtils.toString(custType, eiMetadata.getMeta(FIELD_CUST_TYPE)));
map.put(FIELD_CUST_CODE, StringUtils.toString(custCode, eiMetadata.getMeta(FIELD_CUST_CODE)));
map.put(FIELD_CUST_NAME, StringUtils.toString(custName, eiMetadata.getMeta(FIELD_CUST_NAME)));
map.put(FIELD_ADDRESS, StringUtils.toString(address, eiMetadata.getMeta(FIELD_ADDRESS)));
map.put(FIELD_STATUS, StringUtils.toString(status, eiMetadata.getMeta(FIELD_STATUS)));
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)));
return map;
}
}
package com.baosight.hpjx.hp.pz.domain;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.util.DateUtils;
import java.sql.Timestamp;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.core.util.StringUtils;
/**
* Project: <br>
* Title:THppz003.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-01-22 14:07:38 create
*/
public class HPPZ003 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id";
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码 预留*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码 预留*/
public static final String FIELD_CUST_TYPE = "custType"; /* 客商类型 1:国企;2:民营;*/
public static final String FIELD_CUST_CODE = "custCode"; /* 客户编码*/
public static final String FIELD_CUST_NAME = "custName"; /* 客户名称*/
public static final String FIELD_ADDRESS = "address"; /* 地址*/
public static final String FIELD_STATUS = "status"; /* 状态 0未启用 1启用*/
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 COL_ID = "ID";
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码 预留*/
public static final String COL_CUST_TYPE = "CUST_TYPE"; /* 客商类型 1:国企;2:民营;*/
public static final String COL_CUST_CODE = "CUST_CODE"; /* 客户编码*/
public static final String COL_CUST_NAME = "CUST_NAME"; /* 客户名称*/
public static final String COL_ADDRESS = "ADDRESS"; /* 地址*/
public static final String COL_STATUS = "STATUS"; /* 状态 0未启用 1启用*/
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 QUERY = "HPPZ003.query";
public static final String COUNT = "HPPZ003.count";
public static final String INSERT = "HPPZ003.insert";
public static final String UPDATE = "HPPZ003.update";
public static final String DELETE = "HPPZ003.delete";
private Long id = null;
private String companyCode = " "; /* 企业编码 预留*/
private String depCode = " "; /* 部门编码 预留*/
private Integer custType = null; /* 客商类型 1:国企;2:民营;*/
private String custCode = " "; /* 客户编码*/
private String custName = " "; /* 客户名称*/
private String address = " "; /* 地址*/
private Integer status = 1; /* 状态 0未启用 1启用*/
private String createdBy = " "; /* 创建人*/
private String createdName = " "; /* 创建人名称*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/
private String updatedName = " "; /* 更新人名称*/
private String updatedTime = " "; /* 更新时间*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" ");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("企业编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
eiColumn.setDescName("部门编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CUST_TYPE);
eiColumn.setDescName("客商类型 1:国企;2:民营;");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CUST_CODE);
eiColumn.setDescName("客户编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CUST_NAME);
eiColumn.setDescName("客户名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ADDRESS);
eiColumn.setDescName("地址");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_STATUS);
eiColumn.setDescName("状态 0未启用 1启用");
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);
}
/**
* the constructor.
*/
public HPPZ003() {
initMetaData();
}
/**
* get the id .
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id .
*
* @param id
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the companyCode - 企业编码 预留.
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 企业编码 预留.
*
* @param companyCode - 企业编码 预留
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* 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 custType - 客商类型 1:国企;2:民营;.
* @return the custType
*/
public Integer getCustType() {
return this.custType;
}
/**
* set the custType - 客商类型 1:国企;2:民营;.
*
* @param custType - 客商类型 1:国企;2:民营;
*/
public void setCustType(Integer custType) {
this.custType = custType;
}
/**
* get the custCode - 客户编码.
* @return the custCode
*/
public String getCustCode() {
return this.custCode;
}
/**
* set the custCode - 客户编码.
*
* @param custCode - 客户编码
*/
public void setCustCode(String custCode) {
this.custCode = custCode;
}
/**
* get the custName - 客户名称.
* @return the custName
*/
public String getCustName() {
return this.custName;
}
/**
* set the custName - 客户名称.
*
* @param custName - 客户名称
*/
public void setCustName(String custName) {
this.custName = custName;
}
/**
* get the address - 地址.
* @return the address
*/
public String getAddress() {
return this.address;
}
/**
* set the address - 地址.
*
* @param address - 地址
*/
public void setAddress(String address) {
this.address = address;
}
/**
* 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 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 value from Map.
*
* @param map - source data map
*/
@Override
public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setCustType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_CUST_TYPE)), custType));
setCustCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CUST_CODE)), custCode));
setCustName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CUST_NAME)), custName));
setAddress(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ADDRESS)), address));
setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status));
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));
}
/**
* 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_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_CUST_TYPE, StringUtils.toString(custType, eiMetadata.getMeta(FIELD_CUST_TYPE)));
map.put(FIELD_CUST_CODE, StringUtils.toString(custCode, eiMetadata.getMeta(FIELD_CUST_CODE)));
map.put(FIELD_CUST_NAME, StringUtils.toString(custName, eiMetadata.getMeta(FIELD_CUST_NAME)));
map.put(FIELD_ADDRESS, StringUtils.toString(address, eiMetadata.getMeta(FIELD_ADDRESS)));
map.put(FIELD_STATUS, StringUtils.toString(status, eiMetadata.getMeta(FIELD_STATUS)));
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)));
return map;
}
}
/**
* Generate time : 2024-01-10 10:28:33
* Version : 1.0
*/
package com.baosight.hpjx.hp.pz.domain;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.core.util.StringUtils;
/**
* THppz002
*
*/
public class THppz002 extends DaoEPBase {
private Long id = 0L;
private String companyCode = " "; /* 企业编码 预留*/
private int custType; /* 供应商类型 1 国企 : 2 民营*/
private String custCode = " "; /* 供应商编码*/
private String custName = " "; /* 供应商名称*/
private String address = " "; /* 地址*/
private int status; /* 状态 0禁用 1启用*/
private String createdBy = " "; /* 创建人*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/
private String updatedTime = " "; /* 更新时间*/
private String depCode = " "; /* 部门编码*/
/**
* initialize the metadata
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn("id");
eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" ");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("companyCode");
eiColumn.setDescName("企业编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("custType");
eiColumn.setDescName("供应商类型 1 国企 : 2 民营");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("custCode");
eiColumn.setDescName("供应商编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("custName");
eiColumn.setDescName("供应商名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("address");
eiColumn.setDescName("地址");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("status");
eiColumn.setDescName("状态 0禁用 1启用");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("createdBy");
eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("createdTime");
eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("updatedBy");
eiColumn.setDescName("更新人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("updatedTime");
eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("depCode");
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor
*/
public THppz002() {
initMetaData();
}
/**
* get the id
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the companyCode - 企业编码 预留
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 企业编码 预留
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the custType - 供应商类型 1 国企 : 2 民营
* @return the custType
*/
public int getCustType() {
return this.custType;
}
/**
* set the custType - 供应商类型 1 国企 : 2 民营
*/
public void setCustType(int custType) {
this.custType = custType;
}
/**
* get the custCode - 供应商编码
* @return the custCode
*/
public String getCustCode() {
return this.custCode;
}
/**
* set the custCode - 供应商编码
*/
public void setCustCode(String custCode) {
this.custCode = custCode;
}
/**
* get the custName - 供应商名称
* @return the custName
*/
public String getCustName() {
return this.custName;
}
/**
* set the custName - 供应商名称
*/
public void setCustName(String custName) {
this.custName = custName;
}
/**
* get the address - 地址
* @return the address
*/
public String getAddress() {
return this.address;
}
/**
* set the address - 地址
*/
public void setAddress(String address) {
this.address = address;
}
/**
* get the status - 状态 0未启用 1启用
* @return the status
*/
public int getStatus() {
return this.status;
}
/**
* set the status - 状态 0未启用 1启用
*/
public void setStatus(int status) {
this.status = status;
}
/**
* get the createdBy - 创建人
* @return the createdBy
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 创建人
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
* get the createdTime - 创建时间
* @return the createdTime
*/
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 创建时间
*/
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
/**
* get the updatedBy - 更新人
* @return the updatedBy
*/
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 更新人
*/
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
/**
* get the updatedTime - 更新时间
* @return the updatedTime
*/
public String getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 更新时间
*/
public void setUpdatedTime(String updatedTime) {
this.updatedTime = updatedTime;
}
/**
* get the depCode - 部门编码
* @return the depCode
*/
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码
*/
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the value from Map
*/
public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get("id")), id));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("companyCode")), companyCode));
setCustType(NumberUtils.toint(StringUtils.toString(map.get("custType")), custType));
setCustCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("custCode")), custCode));
setCustName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("custName")), custName));
setAddress(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("address")), address));
setStatus(NumberUtils.toint(StringUtils.toString(map.get("status")), status));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("createdBy")), createdBy));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("createdTime")), createdTime));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("updatedBy")), updatedBy));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("updatedTime")), updatedTime));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("depCode")), depCode));
}
/**
* set the value to Map
*/
public Map toMap() {
Map map = new HashMap();
map.put("id",StringUtils.toString(id, eiMetadata.getMeta("id")));
map.put("companyCode",StringUtils.toString(companyCode, eiMetadata.getMeta("companyCode")));
map.put("custType",StringUtils.toString(custType, eiMetadata.getMeta("custType")));
map.put("custCode",StringUtils.toString(custCode, eiMetadata.getMeta("custCode")));
map.put("custName",StringUtils.toString(custName, eiMetadata.getMeta("custName")));
map.put("address",StringUtils.toString(address, eiMetadata.getMeta("address")));
map.put("status",StringUtils.toString(status, eiMetadata.getMeta("status")));
map.put("createdBy",StringUtils.toString(createdBy, eiMetadata.getMeta("createdBy")));
map.put("createdTime",StringUtils.toString(createdTime, eiMetadata.getMeta("createdTime")));
map.put("updatedBy",StringUtils.toString(updatedBy, eiMetadata.getMeta("updatedBy")));
map.put("updatedTime",StringUtils.toString(updatedTime, eiMetadata.getMeta("updatedTime")));
map.put("depCode",StringUtils.toString(depCode, eiMetadata.getMeta("depCode")));
return map;
}
}
\ No newline at end of file
/**
* Generate time : 2024-01-09 17:46:33
* Version : 1.0
*/
package com.baosight.hpjx.hp.pz.domain;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.core.util.StringUtils;
/**
* THppz003
*
*/
public class THppz003 extends DaoEPBase {
private Long id = 0L;
private String companyCode = " "; /* 企业编码 预留*/
private int custType; /* 客商类型 1:国企;2:民营;*/
private String custCode = " "; /* 客户编码*/
private String custCname = " "; /* 客户名称*/
private String custAddr = " "; /* 地址*/
private int status; /* 状态 0未启用 1启用*/
private String createdBy = " "; /* 创建人*/
private String createdTime; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/
private String updatedTime; /* 更新时间*/
/**
* initialize the metadata
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn("id");
eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" ");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("companyCode");
eiColumn.setDescName("企业编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("custType");
eiColumn.setDescName("客商类型 1:国企;2:民营;");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("custCode");
eiColumn.setDescName("客户编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("custCname");
eiColumn.setDescName("客户名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("custAddr");
eiColumn.setDescName("地址");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("status");
eiColumn.setDescName("状态 0未启用 1启用");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("createdBy");
eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("createdTime");
eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("updatedBy");
eiColumn.setDescName("更新人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("updatedTime");
eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor
*/
public THppz003() {
initMetaData();
}
/**
* get the id
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the companyCode - 企业编码 预留
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 企业编码 预留
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the custType - 客商类型 1:国企;2:民营;
* @return the custType
*/
public int getCustType() {
return this.custType;
}
/**
* set the custType - 客商类型 1:国企;2:民营;
*/
public void setCustType(int custType) {
this.custType = custType;
}
/**
* get the custCode - 客户编码
* @return the custCode
*/
public String getCustCode() {
return this.custCode;
}
/**
* set the custCode - 客户编码
*/
public void setCustCode(String custCode) {
this.custCode = custCode;
}
/**
* get the custCname - 客户名称
* @return the custCname
*/
public String getCustCname() {
return this.custCname;
}
/**
* set the custCname - 客户名称
*/
public void setCustCname(String custCname) {
this.custCname = custCname;
}
/**
* get the custAddr - 地址
* @return the custAddr
*/
public String getCustAddr() {
return this.custAddr;
}
/**
* set the custAddr - 地址
*/
public void setCustAddr(String custAddr) {
this.custAddr = custAddr;
}
/**
* get the status - 状态 0未启用 1启用
* @return the status
*/
public int getStatus() {
return this.status;
}
/**
* set the status - 状态 0未启用 1启用
*/
public void setStatus(int status) {
this.status = status;
}
/**
* get the createdBy - 创建人
* @return the createdBy
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 创建人
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
* get the createdTime - 创建时间
* @return the createdTime
*/
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 创建时间
*/
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
/**
* get the updatedBy - 更新人
* @return the updatedBy
*/
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 更新人
*/
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
/**
* get the updatedTime - 更新时间
* @return the updatedTime
*/
public String getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 更新时间
*/
public void setUpdatedTime(String updatedTime) {
this.updatedTime = updatedTime;
}
/**
* get the value from Map
*/
public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get("id")), id));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("companyCode")), companyCode));
setCustType(NumberUtils.toint(StringUtils.toString(map.get("custType")), custType));
setCustCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("custCode")), custCode));
setCustCname(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("custCname")), custCname));
setCustAddr(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("custAddr")), custAddr));
setStatus(NumberUtils.toint(StringUtils.toString(map.get("status")), status));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("createdBy")), createdBy));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("createdTime")), createdTime));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("updatedBy")), updatedBy));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("updatedTime")), updatedTime));
}
/**
* set the value to Map
*/
public Map toMap() {
Map map = new HashMap();
map.put("id", StringUtils.toString(id, eiMetadata.getMeta("id")));
map.put("companyCode", StringUtils.toString(companyCode, eiMetadata.getMeta("companyCode")));
map.put("custType", StringUtils.toString(custType, eiMetadata.getMeta("custType")));
map.put("custCode", StringUtils.toString(custCode, eiMetadata.getMeta("custCode")));
map.put("custCname", StringUtils.toString(custCname, eiMetadata.getMeta("custCname")));
map.put("custAddr", StringUtils.toString(custAddr, eiMetadata.getMeta("custAddr")));
map.put("status", StringUtils.toString(status, eiMetadata.getMeta("status")));
map.put("createdBy", StringUtils.toString(createdBy, eiMetadata.getMeta("createdBy")));
map.put("createdTime", StringUtils.toString(createdTime, eiMetadata.getMeta("createdTime")));
map.put("updatedBy", StringUtils.toString(updatedBy, eiMetadata.getMeta("updatedBy")));
map.put("updatedTime", StringUtils.toString(updatedTime, eiMetadata.getMeta("updatedTime")));
return map;
}
}
\ No newline at end of file
...@@ -2,14 +2,26 @@ package com.baosight.hpjx.hp.pz.service; ...@@ -2,14 +2,26 @@ package com.baosight.hpjx.hp.pz.service;
import com.baosight.hpjx.common.CompanyTypeEnum; import com.baosight.hpjx.common.CompanyTypeEnum;
import com.baosight.hpjx.common.InitiateModeEnum; import com.baosight.hpjx.common.InitiateModeEnum;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC004;
import com.baosight.hpjx.hp.pz.domain.HPPZ009;
import com.baosight.hpjx.hp.pz.tools.HPPZTools;
import com.baosight.hpjx.util.CommonMethod; import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.StringUtil;
import com.baosight.iplat4j.core.ei.EiBlock; import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException; import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase; import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.hpjx.hp.pz.domain.THppz002; import com.baosight.hpjx.hp.pz.domain.HPPZ002;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.collections.MapUtils;
import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
...@@ -17,112 +29,111 @@ import java.util.Map; ...@@ -17,112 +29,111 @@ import java.util.Map;
* @date 2024年01月09日 10:18 * @date 2024年01月09日 10:18
*/ */
public class ServiceHPPZ002 extends ServiceBase { public class ServiceHPPZ002 extends ServiceBase {
/** /**
* 画面初始化. * 画面初始化
*/ *
public EiInfo initLoad(EiInfo inInfo) { * @param inInfo
THppz002 hppz002 = new THppz002(); * @return
EiInfo outInfo = new EiInfo(); */
outInfo.addBlock(EiConstant.queryBlock); public EiInfo initLoad(EiInfo inInfo) {
outInfo.getBlock(EiConstant.queryBlock).addBlockMeta(hppz002.eiMetadata); try {
outInfo.addBlock(EiConstant.resultBlock); inInfo.setBlock(CompanyTypeEnum.generatorEiBlock());
outInfo.getBlock(EiConstant.resultBlock).addBlockMeta(hppz002.eiMetadata); inInfo.setBlock(InitiateModeEnum.generatorEiBlock());
outInfo.setBlock(CompanyTypeEnum.generatorEiBlock()); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPPZ002().eiMetadata);
outInfo.setBlock(InitiateModeEnum.generatorEiBlock()); } catch (PlatException e) {
return outInfo; LogUtils.setDetailMsg(inInfo, e, "初始化失败");
} }
return inInfo;
/** }
* 查询操作.
*/ /**
@Override * 查询操作
public EiInfo query(EiInfo inInfo) { *
/* 调用EI查询方法.*/ * @param inInfo
EiInfo outInfo = super.query(inInfo, "HPPZ002.query", new THppz002()); * @return
return outInfo; */
@Override
} public EiInfo query(EiInfo inInfo) {
try {
/** inInfo = super.query(inInfo, "HPPZ002.query", new HPPZ002());
* 新增操作. } catch (Exception e) {
*/ LogUtils.setDetailMsg(inInfo, e, "查询失败");
@Override }
public EiInfo insert(EiInfo inInfo) { return inInfo;
try { }
CommonMethod.creatorInfo(inInfo,EiConstant.resultBlock);
THppz002 hppz002 = new THppz002(); /**
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock); * 新增操作
for (int i = 0; i < eiBlock.getRowCount(); i++) { *
Map<?, ?> map = eiBlock.getRow(i); * @param inInfo
hppz002.fromMap(map); * @return
this.dao.insert("HPPZ002.insert", hppz002.toMap()); */
} @Override
inInfo.setStatus(EiConstant.STATUS_SUCCESS); public EiInfo insert(EiInfo inInfo) {
inInfo.setMsg("新增成功!"); CommonMethod.creatorInfo(inInfo, EiConstant.resultBlock);
try {
} catch (PlatException e) { List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
e.printStackTrace(); // 数据写入
inInfo.setStatus(EiConstant.STATUS_FAILURE); for (int i = 0; i < resultRows.size(); i++) {
inInfo.setMsg("新增失败!原因参见详细错误描述!"); HPPZ002 fPz002 = new HPPZ002();
inInfo.setDetailMsg(e.getMessage()); fPz002.fromMap(resultRows.get(i));
logError("新增失败", e.getMessage()); // 生成供应商编码
return inInfo; fPz002.setCustCode(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPPZ002_CUST_CODE));
} DaoUtils.insert("HPPZ002.insert", fPz002);
return inInfo; }
} inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据新增成功!");
/** } catch (Exception e) {
* 修改操作. LogUtils.setDetailMsg(inInfo, e, "新增失败");
*/ }
public EiInfo update(EiInfo inInfo) { return inInfo;
try { }
CommonMethod.creatorInfo(inInfo,EiConstant.resultBlock);
THppz002 HPPZ002 = new THppz002(); /**
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock); * 修改操作
for (int i = 0; i < eiBlock.getRowCount(); i++) { *
Map<?, ?> map = eiBlock.getRow(i); * @param inInfo
HPPZ002.fromMap(map); * @return
*/
this.dao.update("HPPZ002.update", HPPZ002.toMap()); public EiInfo update(EiInfo inInfo) {
} CommonMethod.creatorInfo(inInfo, EiConstant.resultBlock);
inInfo.setStatus(EiConstant.STATUS_SUCCESS); try {
inInfo.setMsg("修改成功!"); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
} catch (PlatException e) { for (int i = 0; i < resultRows.size(); i++) {
inInfo.setStatus(EiConstant.STATUS_FAILURE); HPPZ002 fPz002 = new HPPZ002();
inInfo.setMsg("操作失败!原因参见详细错误描述!"); fPz002.fromMap(resultRows.get(i));
inInfo.setDetailMsg(e.getMessage()); DaoUtils.update("HPPZ002.update", fPz002);
logError("修改失败", e.getMessage()); }
return inInfo; inInfo = this.query(inInfo);
} inInfo.setStatus(EiConstant.STATUS_DEFAULT);
return query(inInfo); inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据修改成功!");
} } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "修改失败");
/** }
* 删除操作. return inInfo;
*/ }
public EiInfo delete(EiInfo eiInfo) {
THppz002 HPPZ002 = new THppz002(); /**
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock); * 删除操作
try { *
for (int i = 0; i < eiBlock.getRowCount(); i++) { * @param inInfo
Map<?, ?> map = eiBlock.getRow(i); * @return
HPPZ002.fromMap(map); */
public EiInfo delete(EiInfo inInfo) {
this.dao.delete("HPPZ002.delete", HPPZ002.toMap()); try {
} List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
} catch (PlatException e) { for (int i = 0; i < resultRows.size(); i++) {
eiInfo.setStatus(EiConstant.STATUS_FAILURE); DaoUtils.update("HPPZ002.delete", resultRows.get(i));
eiInfo.setMsg("删除失败,原因参见详细错误描述!"); }
eiInfo.setDetailMsg(e.getMessage()); inInfo = this.query(inInfo);
logError("删除失败!", e.getMessage()); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
return eiInfo; inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
eiInfo.setStatus(EiConstant.STATUS_SUCCESS); }
eiInfo.setMsg("删除成功!"); return inInfo;
return eiInfo; }
}
} }
package com.baosight.hpjx.hp.pz.service; package com.baosight.hpjx.hp.pz.service;
import com.baosight.hpjx.common.CompanyTypeEnum;
import com.baosight.hpjx.common.InitiateModeEnum;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.pz.domain.HPPZ002;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiBlock; import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException; import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase; import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.core.web.threadlocal.UserSession; import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import com.baosight.hpjx.hp.pz.domain.THppz003; import com.baosight.hpjx.hp.pz.domain.HPPZ003;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Date; import java.util.Date;
import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
* * @author:songx
* @date:2024/1/22,14:13
*/ */
public class ServiceHPPZ003 extends ServiceBase { public class ServiceHPPZ003 extends ServiceBase {
/**
* 画面初始化
/** *
* 画面初始化. * @param inInfo
*/ * @return
public EiInfo initLoad(EiInfo inInfo) { */
THppz003 hppz003 = new THppz003(); public EiInfo initLoad(EiInfo inInfo) {
EiInfo outInfo = super.initLoad(inInfo, hppz003); try {
outInfo.addBlock(EiConstant.resultBlock).addBlockMeta(hppz003.eiMetadata); inInfo.setBlock(CompanyTypeEnum.generatorEiBlock());
return inInfo; inInfo.setBlock(InitiateModeEnum.generatorEiBlock());
} inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPPZ003().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
/** }
* 查询操作. return inInfo;
*/ }
@Override
public EiInfo query(EiInfo inInfo) { /**
/* 调用EI查询方法.*/ * 查询操作
EiInfo outInfo = super.query(inInfo, "HPPZ003.query", new THppz003()); *
return outInfo; * @param inInfo
* @return
} */
@Override
/** public EiInfo query(EiInfo inInfo) {
* 新增操作. try {
*/ inInfo = super.query(inInfo, "HPPZ003.query", new HPPZ003());
@Override } catch (Exception e) {
public EiInfo insert(EiInfo inInfo) { LogUtils.setDetailMsg(inInfo, e, "查询失败");
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); }
try { return inInfo;
THppz003 hppz003 = new THppz003(); }
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < eiBlock.getRowCount(); i++) { /**
Map<?, ?> map = eiBlock.getRow(i); * 新增操作
hppz003.fromMap(map); *
hppz003.setCreatedBy(UserSession.getUserId()); * @param inInfo
hppz003.setCreatedTime(sdf.format(new Date())); * @return
hppz003.setUpdatedBy(null); */
hppz003.setUpdatedTime(null); @Override
this.dao.insert("HPPZ003.insert", hppz003.toMap()); public EiInfo insert(EiInfo inInfo) {
} try {
inInfo.setStatus(EiConstant.STATUS_SUCCESS); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
inInfo.setMsg("新增成功!"); // 数据写入
for (int i = 0; i < resultRows.size(); i++) {
} catch (PlatException e) { HPPZ003 fPz003 = new HPPZ003();
e.printStackTrace(); fPz003.fromMap(resultRows.get(i));
inInfo.setStatus(EiConstant.STATUS_FAILURE); // 生成客户编码
inInfo.setMsg("新增失败!原因参见详细错误描述!"); fPz003.setCustCode(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPPZ003_CUST_CODE));
inInfo.setDetailMsg(e.getMessage()); DaoUtils.insert("HPPZ003.insert", fPz003);
logError("新增失败", e.getMessage()); }
return inInfo; inInfo = this.query(inInfo);
} inInfo.setStatus(EiConstant.STATUS_DEFAULT);
return query(inInfo); inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据新增成功!");
} } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "新增失败");
/** }
* 修改操作. return inInfo;
*/ }
public EiInfo update(EiInfo inInfo) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); /**
try { * 修改操作
THppz003 hppz003 = new THppz003(); *
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock); * @param inInfo
for (int i = 0; i < eiBlock.getRowCount(); i++) { * @return
Map<?, ?> map = eiBlock.getRow(i); */
hppz003.fromMap(map); public EiInfo update(EiInfo inInfo) {
hppz003.setUpdatedBy(UserSession.getUserId()); try {
hppz003.setUpdatedTime(sdf.format(new Date())); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
this.dao.update("HPPZ003.update", hppz003.toMap()); for (int i = 0; i < resultRows.size(); i++) {
} HPPZ003 fPz003 = new HPPZ003();
inInfo.setStatus(EiConstant.STATUS_SUCCESS); fPz003.fromMap(resultRows.get(i));
inInfo.setMsg("修改成功!"); DaoUtils.update("HPPZ003.update", fPz003);
} catch (PlatException e) { }
inInfo.setStatus(EiConstant.STATUS_FAILURE); inInfo = this.query(inInfo);
inInfo.setMsg("操作失败!原因参见详细错误描述!"); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setDetailMsg(e.getMessage()); inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据修改成功!");
logError("修改失败", e.getMessage()); } catch (Exception e) {
return inInfo; LogUtils.setDetailMsg(inInfo, e, "修改失败");
} }
return query(inInfo); return inInfo;
} }
/** /**
* 删除操作. * 删除操作
*/ *
public EiInfo delete(EiInfo eiInfo) { * @param inInfo
THppz003 hppz003 = new THppz003(); * @return
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock); */
try { public EiInfo delete(EiInfo inInfo) {
for (int i = 0; i < eiBlock.getRowCount(); i++) { try {
Map<?, ?> map = eiBlock.getRow(i); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
hppz003.fromMap(map); for (int i = 0; i < resultRows.size(); i++) {
DaoUtils.update("HPPZ003.delete", resultRows.get(i));
this.dao.delete("HPPZ003.delete", hppz003.toMap()); }
} inInfo = this.query(inInfo);
} catch (PlatException e) { inInfo.setStatus(EiConstant.STATUS_DEFAULT);
eiInfo.setStatus(EiConstant.STATUS_FAILURE); inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
eiInfo.setMsg("删除失败,原因参见详细错误描述!"); } catch (Exception e) {
eiInfo.setDetailMsg(e.getMessage()); LogUtils.setDetailMsg(inInfo, e, "删除失败");
logError("删除失败!", e.getMessage()); }
return eiInfo; return inInfo;
} }
eiInfo.setStatus(EiConstant.STATUS_SUCCESS);
eiInfo.setMsg("删除成功!");
return eiInfo;
}
} }
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd"> <!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<!-- table information
Generate time : 2024-01-09 14:40:53
Version : 1.0
tableName :hpjx.t_hppz002
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR NOT NULL,
CUST_TYPE TINYINT NOT NULL,
CUST_CODE VARCHAR NOT NULL,
CUST_NAME VARCHAR NOT NULL,
ADDRESS VARCHAR NOT NULL,
STATUS TINYINT NOT NULL,
CREATED_BY VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_TIME VARCHAR
-->
<sqlMap namespace="HPPZ002"> <sqlMap namespace="HPPZ002">
<select id="query" parameterClass="java.util.HashMap" <sql id="column">
resultClass="com.baosight.hpjx.hp.pz.domain.THppz002"> ID as "id",
SELECT COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
ID as "id", DEP_CODE as "depCode", <!-- 部门编码 -->
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 --> CUST_TYPE as "custType", <!-- 供应商类型 1 国企 : 2 民营 -->
CUST_TYPE as "custType", <!-- 供应商类型 1 国企 : 2 民营 --> CUST_CODE as "custCode", <!-- 供应商编码 -->
CUST_CODE as "custCode", <!-- 供应商编码 --> CUST_NAME as "custName", <!-- 供应商名称 -->
CUST_NAME as "custName", <!-- 供应商名称 --> ADDRESS as "address", <!-- 地址 -->
ADDRESS as "address", <!-- 地址 --> STATUS as "status", <!-- 状态 0禁用 1启用 -->
STATUS as "status", <!-- 状态 0禁用 1启用 --> CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_BY as "createdBy", <!-- 创建人 --> CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 --> CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 --> UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 --> UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
DEP_CODE as "depCode" <!-- 部门编码 --> UPDATED_TIME as "updatedTime" <!-- 更新时间 -->
FROM hpjx.t_hppz002 WHERE 1=1 </sql>
<isNotEmpty prepend=" AND " property="id">
ID = #id# <sql id="condition">
</isNotEmpty> <isNotEmpty prepend=" AND " property="id">
<isNotEmpty prepend=" AND " property="status"> ID = #id#
STATUS = #status# </isNotEmpty>
</isNotEmpty> <isNotEmpty prepend=" AND " property="companyCode">
<isNotEmpty prepend=" AND " property="custType"> COMPANY_CODE = #companyCode#
CUST_TYPE = #custType# </isNotEmpty>
</isNotEmpty> <isNotEmpty prepend=" AND " property="depCode">
<dynamic prepend="ORDER BY"> DEP_CODE = #depCode#
<isNotEmpty property="orderBy"> </isNotEmpty>
$orderBy$ <isNotEmpty prepend=" AND " property="custType">
</isNotEmpty> CUST_TYPE = #custType#
<isEmpty property="orderBy"> </isNotEmpty>
ID asc <isNotEmpty prepend=" AND " property="custCode">
</isEmpty> CUST_CODE = #custCode#
</dynamic> </isNotEmpty>
<isNotEmpty prepend=" AND " property="custName">
</select> CUST_NAME LIKE CONCAT('%', #custName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="address">
ADDRESS = #address#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
</sql>
<sql id="order">
<dynamic prepend=" ORDER BY ">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID DESC
</isEmpty>
</dynamic>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.pz.domain.HPPZ002">
SELECT
<include refid="column"/>
FROM hpjx.t_hppz002 WHERE 1=1
<include refid="condition"/>
<include refid="order"/>
</select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hppz002 WHERE 1=1 SELECT COUNT(*) FROM hpjx.t_hppz002 WHERE 1=1
<isNotEmpty prepend=" AND " property="id"> <include refid="condition"/>
ID = #id#
</isNotEmpty>
</select> </select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="custType">
CUST_TYPE = #custType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="custCode">
CUST_CODE = #custCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="custName">
CUST_NAME = #custName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="address">
ADDRESS = #address#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
-->
<insert id="insert"> <insert id="insert">
INSERT INTO hpjx.t_hppz002 ( INSERT INTO ${hpjxSchema}.T_HPPZ002 (
COMPANY_CODE, <!-- 企业编码 预留 --> COMPANY_CODE, <!-- 企业编码 预留 -->
CUST_TYPE, <!-- 供应商类型 1 国企 : 2 民营 --> DEP_CODE, <!-- 部门编码 -->
CUST_CODE, <!-- 供应商编码 --> CUST_TYPE, <!-- 供应商类型 1 国企 : 2 民营 -->
CUST_NAME, <!-- 供应商名称 --> CUST_CODE, <!-- 供应商编码 -->
ADDRESS, <!-- 地址 --> CUST_NAME, <!-- 供应商名称 -->
STATUS, <!-- 状态 0禁用 1启用 --> ADDRESS, <!-- 地址 -->
CREATED_BY, <!-- 创建人 --> STATUS, <!-- 状态 0禁用 1启用 -->
CREATED_TIME, <!-- 创建时间 --> CREATED_BY, <!-- 创建人 -->
DEP_CODE <!-- 部门编码 --> CREATED_NAME, <!-- 创建人名称 -->
) CREATED_TIME <!-- 创建时间 -->
VALUES ( #companyCode#, #custType#, #custCode#, #custName#, #address#, #status#, #createdBy#, #createdTime#, #depCode#) ) VALUES (
</insert> #companyCode#, #depCode#, #custType#, #custCode#, #custName#, #address#,
#status#, #createdBy#, #createdName#, #createdTime#
)
</insert>
<delete id="delete"> <delete id="delete">
DELETE FROM hpjx.t_hppz002 WHERE DELETE FROM hpjx.t_hppz002 WHERE ID = #id#
ID = #id#
</delete> </delete>
<update id="update"> <update id="update">
UPDATE hpjx.t_hppz002 UPDATE hpjx.t_hppz002
SET SET
CUST_TYPE = #custType#, <!-- 供应商类型 1 国企 : 2 民营 --> CUST_TYPE = #custType#, <!-- 供应商类型 1 国企 : 2 民营 -->
CUST_CODE = #custCode#, <!-- 供应商编码 --> CUST_CODE = #custCode#, <!-- 供应商编码 -->
CUST_NAME = #custName#, <!-- 供应商名称 --> CUST_NAME = #custName#, <!-- 供应商名称 -->
ADDRESS = #address#, <!-- 地址 --> ADDRESS = #address#, <!-- 地址 -->
STATUS = #status#, <!-- 状态 0禁用 1启用 --> STATUS = #status#, <!-- 状态 0禁用 1启用 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 --> UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_TIME = #updatedTime# <!-- 更新时间 --> UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
WHERE UPDATED_TIME = #updatedTime# <!-- 更新时间 -->
ID = #id# WHERE ID = #id#
</update> </update>
...@@ -147,4 +123,4 @@ ...@@ -147,4 +123,4 @@
</isNotEmpty> </isNotEmpty>
ORDER BY CUST_CODE ORDER BY CUST_CODE
</select> </select>
</sqlMap> </sqlMap>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd"> <!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<!-- table information
Generate time : 2024-01-09 17:46:33
Version : 1.0
tableName :hpjx.t_hppz003
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR NOT NULL,
CUST_TYPE TINYINT NOT NULL,
CUST_CODE VARCHAR NOT NULL,
CUST_CNAME VARCHAR NOT NULL,
CUST_ADDR VARCHAR NOT NULL,
STATUS TINYINT NOT NULL,
CREATED_BY VARCHAR,
CREATED_TIME DATETIME,
UPDATED_BY VARCHAR,
UPDATED_TIME DATETIME
-->
<sqlMap namespace="HPPZ003"> <sqlMap namespace="HPPZ003">
<select id="query" parameterClass="java.util.HashMap" <sql id="column">
resultClass="com.baosight.hpjx.hp.pz.domain.THppz003"> ID as "id",
SELECT COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
ID as "id", DEP_CODE as "depCode", <!-- 部门编码 预留 -->
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 --> CUST_TYPE as "custType", <!-- 客商类型 1:国企;2:民营; -->
CUST_TYPE as "custType", <!-- 客商类型 1:国企;2:民营; --> CUST_CODE as "custCode", <!-- 客户编码 -->
CUST_CODE as "custCode", <!-- 客户编码 --> CUST_NAME as "custName", <!-- 客户名称 -->
CUST_CNAME as "custCname", <!-- 客户名称 --> ADDRESS as "address", <!-- 地址 -->
CUST_ADDR as "custAddr", <!-- 地址 --> STATUS as "status", <!-- 状态 0未启用 1启用 -->
STATUS as "status", <!-- 状态 0未启用 1启用 --> CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_BY as "createdBy", <!-- 创建人 --> CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 --> CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 --> UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime" <!-- 更新时间 --> UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
FROM hpjx.t_hppz003 WHERE 1=1 UPDATED_TIME as "updatedTime" <!-- 更新时间 -->
<isNotEmpty prepend=" AND " property="custCname"> </sql>
CUST_CNAME LIKE CONCAT('%',CONCAT(#custCname#,'%'))
</isNotEmpty> <sql id="condition">
<isNotEmpty prepend=" AND " property="custType"> <isNotEmpty prepend=" AND " property="id">
CUST_TYPE = #custType# ID = #id#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="status"> <isNotEmpty prepend=" AND " property="companyCode">
STATUS = #status# COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
<dynamic prepend="ORDER BY"> <isNotEmpty prepend=" AND " property="depCode">
<isNotEmpty property="orderBy"> DEP_CODE = #depCode#
$orderBy$ </isNotEmpty>
</isNotEmpty> <isNotEmpty prepend=" AND " property="custType">
<isEmpty property="orderBy"> CUST_TYPE = #custType#
CREATED_TIME DESC </isNotEmpty>
</isEmpty> <isNotEmpty prepend=" AND " property="custCode">
</dynamic> CUST_CODE = #custCode#
</isNotEmpty>
</select> <isNotEmpty prepend=" AND " property="custName">
CUST_NAME LIKE CONCAT('%', #custName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="address">
ADDRESS = #address#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
</sql>
<sql id="order">
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
CREATED_TIME DESC
</isEmpty>
</dynamic>
</sql>
<select id="query" resultClass="com.baosight.hpjx.hp.pz.domain.HPPZ003">
SELECT
<include refid="column"/>
FROM hpjx.t_hppz003 WHERE 1=1
<include refid="condition"/>
<include refid="order"/>
</select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hppz003 WHERE 1=1 SELECT COUNT(*) FROM hpjx.t_hppz003 WHERE 1=1
<isNotEmpty prepend=" AND " property="id"> <include refid="condition"/>
ID = #id#
</isNotEmpty>
</select> </select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="custType">
CUST_TYPE = #custType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="custCode">
CUST_CODE = #custCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="custCname">
CUST_CNAME = #custCname#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="custAddr">
CUST_ADDR = #custAddr#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
-->
<insert id="insert"> <insert id="insert">
INSERT INTO hpjx.t_hppz003 (ID, INSERT INTO ${hpjxSchema}.T_HPPZ003 (
COMPANY_CODE, <!-- 企业编码 预留 --> COMPANY_CODE, <!-- 企业编码 预留 -->
CUST_TYPE, <!-- 客商类型 1:国企;2:民营; --> DEP_CODE, <!-- 部门编码 预留 -->
CUST_CODE, <!-- 客户编码 --> CUST_TYPE, <!-- 客商类型 1:国企;2:民营; -->
CUST_CNAME, <!-- 客户名称 --> CUST_CODE, <!-- 客户编码 -->
CUST_ADDR, <!-- 地址 --> CUST_NAME, <!-- 客户名称 -->
STATUS, <!-- 状态 0未启用 1启用 --> ADDRESS, <!-- 地址 -->
CREATED_BY, <!-- 创建人 --> STATUS, <!-- 状态 0未启用 1启用 -->
CREATED_TIME, <!-- 创建时间 --> CREATED_BY, <!-- 创建人 -->
UPDATED_BY, <!-- 更新人 --> CREATED_NAME, <!-- 创建人名称 -->
UPDATED_TIME <!-- 更新时间 --> CREATED_TIME <!-- 创建时间 -->
) ) VALUES (
VALUES (#id#, #companyCode#, #custType#, #custCode#, #custCname#, #custAddr#, #status#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#) #companyCode#, #depCode#, #custType#, #custCode#, #custName#, #address#,
</insert> #status#, #createdBy#, #createdName#, #createdTime#
)
</insert>
<delete id="delete"> <delete id="delete">
DELETE FROM hpjx.t_hppz003 WHERE DELETE FROM hpjx.t_hppz003 WHERE ID = #id#
ID = #id#
</delete> </delete>
<update id="update"> <update id="update">
UPDATE hpjx.t_hppz003 UPDATE hpjx.t_hppz003
SET SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 --> CUST_TYPE = #custType#, <!-- 客商类型 1:国企;2:民营; -->
CUST_TYPE = #custType#, <!-- 客商类型 1:国企;2:民营; --> CUST_CODE = #custCode#, <!-- 客户编码 -->
CUST_CODE = #custCode#, <!-- 客户编码 --> CUST_NAME = #custName#, <!-- 客户名称 -->
CUST_CNAME = #custCname#, <!-- 客户名称 --> ADDRESS = #address#, <!-- 地址 -->
CUST_ADDR = #custAddr#, <!-- 地址 --> STATUS = #status#, <!-- 状态 0未启用 1启用 -->
STATUS = #status#, <!-- 状态 0未启用 1启用 --> UPDATED_BY = #updatedBy#, <!-- 更新人 -->
CREATED_BY = #createdBy#, <!-- 创建人 --> UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 --> UPDATED_TIME = #updatedTime# <!-- 更新时间 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 --> WHERE ID = #id#
UPDATED_TIME = #updatedTime# <!-- 更新时间 -->
WHERE
ID = #id#
</update> </update>
<select id="queryComboBox" parameterClass="java.util.HashMap" <select id="queryComboBox" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
resultClass="java.util.HashMap">
SELECT DISTINCT SELECT DISTINCT
CUST_CODE as "custCode", CUST_CODE as "custCode",
CUST_CNAME as "custName" CUST_NAME as "custName"
FROM hpjx.t_hppz003 WHERE STATUS=1 FROM hpjx.t_hppz003 WHERE STATUS=1
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode# COMPANY_CODE = #companyCode#
...@@ -148,4 +119,5 @@ ...@@ -148,4 +119,5 @@
</isNotEmpty> </isNotEmpty>
ORDER BY CUST_CODE ORDER BY CUST_CODE
</select> </select>
</sqlMap>
\ No newline at end of file </sqlMap>
$(function() { $(function() {
// 查询 // 查询
$("#QUERY").on("click", function () { $("#QUERY").on("click", query);
resultGrid.dataSource.page(1); // 点击查询按钮,从第1页开始查询
});
IPLATUI.EFGrid.result = { IPLATUI.EFGrid.result = {
pageable: { pageable: {
pageSize: 20, pageSize: 20,
pageSizes: [10, 20, 30, 50, 100, 200], pageSizes: [10, 20, 30, 50, 100, 200]
}, }
} }
}); });
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
...@@ -5,52 +5,46 @@ ...@@ -5,52 +5,46 @@
<c:set var="ctx" value="${pageContext.request.contextPath}"/> <c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="供应商档案"> <EF:EFPage title="供应商档案">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFSelect ename="inqu_status-0-custType" cname="供应商类型" colWidth="3"
template="#=valueField#-#=textField#" valueTemplate="#=valueField#-#=textField#">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="company_type_block_id" textField="valueField" valueField="textField"/>
</EF:EFSelect>
<EF:EFInput ename="inqu_status-0-custName" cname="供应商名称" colWidth="3" readonly="false"/>
<EF:EFSelect ename="inqu_status-0-status" cname="状态" colWidth="3"
template="#=valueField#-#=textField#" valueTemplate="#=valueField#-#=textField#">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpjx.status"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="inqu" title="查询条件"> <EF:EFRegion id="result" title="明细信息">
<div class="row"> <EF:EFGrid blockId="result" autoDraw="false" isFloat="true" autoFit="true">
<EF:EFInput ename="inqu_status-0-custName" cname="供应商名称" colWidth="4" readonly="false"/> <EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFSelect ename="inqu_status-0-custType" cname="供应商类型" colWidth="4" <EF:EFColumn ename="custCode" cname="供应商编码" enable="false" width="100" align="center"/>
template="#=valueField#-#=textField#" valueTemplate="#=valueField#-#=textField#" enable="true"> <EF:EFColumn ename="custName" cname="供应商名称" width="100" required="true"/>
<EF:EFOption label="全部" value=""/> <EF:EFComboColumn ename="custType" cname="供应商类型" align="center"
<EF:EFOptions blockId="company_type_block_id" textField="valueField" valueField="textField"/> blockName="company_type_block_id"
</EF:EFSelect> columnTemplate="#=textField#-#=valueField#" optionLabel=" "
<EF:EFSelect ename="inqu_status-0-status" cname="状态" colWidth="4" itemTemplate="#=textField#-#=valueField#" textField="valueField"
template="#=valueField#-#=textField#" valueTemplate="#=valueField#-#=textField#" enable="true"> valueField="textField" width="100" required="true">
<EF:EFOption label="全部" value=""/> </EF:EFComboColumn>
<EF:EFOptions blockId="initiate_mode_block_id" textField="valueField" valueField="textField"/> <EF:EFColumn ename="address" cname="地址" width="120" required="true"/>
</EF:EFSelect> <EF:EFComboColumn ename="status" cname="状态" align="center" width="100" required="true">
</div> <EF:EFCodeOption codeName="hpjx.hpjx.status"/>
<EF:EFButton ename="QUERY" cname="查询" row="1" class="btn-align-right"></EF:EFButton> </EF:EFComboColumn>
</EF:EFRegion> <EF:EFColumn ename="createdBy" cname="创建人" enable="false" width="100" align="center"/>
<EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="140" align="center"
<EF:EFRegion id="result" title="明细信息"> parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss"/>
<EF:EFGrid blockId="result" autoDraw="false" isFloat="true" autoFit="true"> <EF:EFColumn ename="updatedBy" cname="更新人" enable="false" width="100" align="center"/>
<EF:EFColumn ename="updatedTime" cname="更新时间" enable="false" width="140" align="center"
<EF:EFColumn ename="id" cname="内码" hidden="true"/> parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss"/>
<EF:EFComboColumn ename="custType" cname="供应商类型" align="center" </EF:EFGrid>
blockName="company_type_block_id" </EF:EFRegion>
columnTemplate="#=textField#-#=valueField#" optionLabel=" "
itemTemplate="#=textField#-#=valueField#" textField="valueField"
valueField="textField" width="100" required="true">
</EF:EFComboColumn>
<EF:EFColumn ename="custCode" cname="供应商编码" width="100" readonly="false" required="true"/>
<EF:EFColumn ename="custName" cname="供应商名称" width="100" readonly="false" required="true"/>
<EF:EFColumn ename="address" cname="地址" width="100" readonly="false" required="true"/>
<EF:EFComboColumn ename="status" cname="状态" align="center"
blockName="initiate_mode_block_id"
columnTemplate="#=textField#-#=valueField#" optionLabel=" "
itemTemplate="#=textField#-#=valueField#" textField="valueField"
valueField="textField" width="100" required="true">
</EF:EFComboColumn>
<EF:EFColumn ename="createdTime" cname="创建时间" readonly="true" width="100" align="center" enable="false"
parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss" />
<EF:EFColumn ename="createdBy" cname="创建人" width="100" readonly="true" disabled="true"/>
<EF:EFColumn ename="updatedTime" cname="更新时间" readonly="true" width="100" align="center" enable="false"
parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss" />
<EF:EFColumn ename="updatedBy" cname="更新人" width="100" readonly="true" disabled="true"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage> </EF:EFPage>
$(function () { $(function() {
$("#QUERY").on("click", function () { // 查询
resultGrid.dataSource.page(1); $("#QUERY").on("click", query);
});
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 30, 50, 100, 200]
}
}
});
IPLATUI.EFGrid.result = { /**
pageable: { * 页面加载时执行
pageSize: 20, */
pageSizes: [10, 20, 50, 70, 100], $(window).load(function () {
}, // 查询
} query();
}); });
\ No newline at end of file
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
...@@ -4,54 +4,43 @@ ...@@ -4,54 +4,43 @@
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %> <%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/> <c:set var="ctx" value="${pageContext.request.contextPath}"/>
<head>
<%-- <link rel="stylesheet" href="${ctx}/css/simulatedOperation.css"/>--%>
</head>
<EF:EFPage title="客户档案"> <EF:EFPage title="客户档案">
<EF:EFRegion id="inqu" title="查询条件"><%-- type="query" efRegionShowClear="true" efRegionSave="true"--%> <EF:EFRegion id="inqu" title="查询条件">
<div class="row"> <%-- blockId="inqu_status" row="0" --%> <div class="row">
<EF:EFInput blockId="inqu_status" ename="custCname" cname="客户名称" row="0"/> <EF:EFInput cname="客户名称" ename="custName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFSelect cname="客户类型" optionLabel="全部" blockId="inqu_status" ename="custType" row="0"> <EF:EFSelect ename="inqu_status-0-custType" cname="客户类型" colWidth="3"
<EF:EFOption label="民营" value="1"/> template="#=valueField#-#=textField#" valueTemplate="#=valueField#-#=textField#">
<EF:EFOption label="国营" value="2"/> <EF:EFOption label="全部" value=""/>
</EF:EFSelect> <EF:EFOptions blockId="company_type_block_id" textField="valueField" valueField="textField"/>
<EF:EFSelect cname="状态" optionLabel="全部" blockId="inqu_status" ename="status" row="0"> </EF:EFSelect>
<EF:EFOption label="启用" value="1"/> <EF:EFSelect ename="inqu_status-0-status" cname="状态" colWidth="3"
<EF:EFOption label="停用" value="0"/> template="#=valueField#-#=textField#" valueTemplate="#=valueField#-#=textField#">
</EF:EFSelect> <EF:EFOption label="全部" value=""/>
</div> <EF:EFCodeOption codeName="hpjx.hpjx.status"/>
<EF:EFButton ename="QUERY" cname="查询" row="1" class="btn-align-right"></EF:EFButton> </EF:EFSelect>
</EF:EFRegion> </div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集"> <EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no"> <EF:EFGrid blockId="result" autoDraw="override">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFComboColumn required="true" align="center" ename="custType" cname="客户类型"> <EF:EFColumn ename="custCode" cname="客户编码" enable="false" width="100" align="center"/>
<EF:EFOption label="民营" value="1"/> <EF:EFComboColumn ename="custType" cname="客户类型" width="100" align="center"
<EF:EFOption label="国营" value="2"/> blockName="company_type_block_id" itemTemplate="#=textField#-#=valueField#"
</EF:EFComboColumn> textField="valueField" valueField="textField" required="true">
<EF:EFColumn equired="true" ename="custCode" cname="客户编码"/> </EF:EFComboColumn>
<EF:EFColumn equired="true" ename="custCname" cname="客户名称"/> <EF:EFColumn ename="custName" cname="客户名称" width="120" align="center" required="true"/>
<EF:EFColumn ename="custAddr" cname="地址"/> <EF:EFColumn ename="address" cname="地址" width="150" align="center" required="true"/>
<EF:EFComboColumn required="true" ename="status" cname="状态" align="center" <EF:EFComboColumn ename="status" cname="状态" align="center" width="100" required="true">
columnTemplate="#=valueField#-#=textField#" optionLabel=" " <EF:EFCodeOption codeName="hpjx.hpjx.status"/>
itemTemplate="#=valueField#-#=textField#" textField="textField" </EF:EFComboColumn>
valueField="valueField" width="100"> <EF:EFColumn ename="createdName" cname="创建人名称" enable="false" width="100" align="center"/>
<EF:EFOption label="--请选择--" value=""></EF:EFOption> <EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="140" align="center"
<EF:EFOption label="启用" value="1"></EF:EFOption> parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss"/>
<EF:EFOption label="禁用" value="0"></EF:EFOption> <EF:EFColumn ename="updatedName" cname="更新人名称" enable="false" width="100" align="center"/>
</EF:EFComboColumn> <EF:EFColumn ename="updatedTime" cname="更新时间" enable="false" width="140" align="center"
<EF:EFColumn ename="createdBy" enable="false" cname="创建人"/> parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss"/>
<EF:EFColumn ename="createdTime" dateFormat="yyyy-MM-dd HH:mm:ss" enable="false" cname="创建时间"/> </EF:EFGrid>
<EF:EFColumn ename="updatedBy" enable="false" cname="修改人"/> </EF:EFRegion>
<EF:EFColumn ename="updatedTime" dateFormat="yyyy-MM-dd HH:mm:ss" enable="false" cname="修改时间"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage> </EF:EFPage>
<script>
var ctx = "${ctx}";
</script>
<script src="${ctx}/HP/PZ/HPPZ003.js"></script>
\ No newline at end of file
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