Commit 7c3479df by YG6494

Merge branch 'dev' of ssh://10.70.33.7:32359/smart/hp-smart into dev

parents ef513817 cfce3314
package com.baosight.iplat4j.common;
import com.baosight.iplat4j.core.ei.EiBlock;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @Author wwl
* @Date 2024/1/9 19:25
*/
public enum CustomerTypeEnum {
SUPPLIER(1,"供应商"),
CUSTOMER(2,"客户");
private Integer code;
private String value;
CustomerTypeEnum(Integer code, String value) {
this.code = code;
this.value = value;
}
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public static EiBlock generatorEiBlock() {
EiBlock block = new EiBlock("customer_type_block_id");
List<Map<String, Object>> rows = new ArrayList<Map<String, Object>>() {{
add(new HashMap<String, Object>() {{
put(HPConstants.TEXT_FIELD, SUPPLIER.code);
put(HPConstants.VALUE_FIELD, SUPPLIER.value);
}});
add(new HashMap<String, Object>() {{
put(HPConstants.TEXT_FIELD, CUSTOMER.code);
put(HPConstants.VALUE_FIELD, CUSTOMER.value);
}});
}};
block.setRows(rows);
return block;
}
}
package com.baosight.iplat4j.common;
/**
* @Author wwl
* @Date 2024/1/9 19:35
* 将给定的查询条件用来查表 给结果集中添加block块 查询参数传入
*CommonMethod.initBlock(outInfo,
*Arrays.asList(DdynamicEnum.SUPPLIER_RECORD_BLOCK_ID,
*DropDownBoxEnum.XXXXXXXX_BLOCK_ID,
*DropDownBoxEnum.XXXXXXXX_BLOCK_ID),
*new HashMap<String, String>(1){{
*put(HPConstants.SQL_FIELD_COMPANYCODE,companyCode);
*put(sqlQueryParamName,sqlQueryParamValue);
*}});
*/
public enum DdynamicEnum {
/**
* 模块:供应商档案
* 用途:供应商档案下拉框.
* 编写:wwl.
*/
SUPPLIER_RECORD_BLOCK_ID("supplier_record_block_id","CUST_CODE","CUST_NAME","HPPZ002.queryComboBox"),
/**
* 模块:客户档案
* 用途:客户档案下拉框.
* 编写:wwl.
*/
CUSTOMER_RECORD_BLOCK_ID("customer_record_block_id","CUST_CODE","CUST_NAME","HPPZ003.queryComboBox");
/** 将结果集放入的块名 */
private final String blockId;
/** 字段名 */
private final String value;
/** 字段描述 */
private final String text;
/** 数据源 */
private final String dbSource;
DdynamicEnum(String blockId, String value, String text, String dbSource){
this.blockId = blockId;
this.value = value;
this.text = text;
this.dbSource = dbSource;
}
public String getDbSource() {
return dbSource;
}
public String getBlockId() {
return blockId;
}
public String getValue() {
return value;
}
public String getText() {
return text;
}
}
...@@ -24,8 +24,11 @@ public class HPConstants { ...@@ -24,8 +24,11 @@ public class HPConstants {
//代碼名字分隔符 //代碼名字分隔符
public static final String SPLICING_SYMBOL = "-"; public static final String SPLICING_SYMBOL = "-";
/** 前后台交互下拉框字段 字段名 dzg */
public static final String TEXT_FIELD = "textField"; public static final String TEXT_FIELD = "textField";
/** 前后台交互下拉框字段 字段名 dzg */
public static final String VALUE_FIELD = "valueField"; public static final String VALUE_FIELD = "valueField";
} }
package com.baosight.iplat4j.common;
import com.baosight.iplat4j.core.ei.EiBlock;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @Author wwl
* @Date 2024/1/9 19:16
*/
public enum InitiateModeEnum {
STOP(0,"停用"),
USING(1,"启用");
private Integer code;
private String value;
InitiateModeEnum(Integer code, String value) {
this.code = code;
this.value = value;
}
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public static EiBlock generatorEiBlock(){
EiBlock block = new EiBlock("initiate_mode_block_id");
List<Map<String,Object>> rows = new ArrayList<Map<String,Object>>(){{
add(new HashMap<String,Object>(){{
put(HPConstants.TEXT_FIELD,STOP.code);
put(HPConstants.VALUE_FIELD,STOP.value);
}});
add(new HashMap<String,Object>(){{
put(HPConstants.TEXT_FIELD,USING.code);
put(HPConstants.VALUE_FIELD,USING.value);
}});
}};
block.setRows(rows);
return block;
}
}
/**
* Generate time : 2024-01-09 10:44:10
* Version : 1.0
*/
package com.baosight.iplat4j.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;
/**
* THppz005
*
*/
public class HPPZ005 extends DaoEPBase {
private Integer id = 0;
private String companyCode = " "; /* 企业编码 预留*/
private String inventCode = " "; /* 类型编码*/
private String inventName = " "; /* 存货类型*/
private int status; /* 状态 0未启用 1启用*/
private String createdTime = " "; /* 创建时间*/
private String createdBy = " "; /* 创建人*/
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("inventCode");
eiColumn.setDescName("类型编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("inventName");
eiColumn.setDescName("存货类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("status");
eiColumn.setDescName("状态 0未启用 1启用");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("createdTime");
eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("createdBy");
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 HPPZ005() {
initMetaData();
}
/**
* get the id
* @return the id
*/
public Integer getId() {
return this.id;
}
/**
* set the id
*/
public void setId(Integer 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 inventCode - 类型编码
* @return the inventCode
*/
public String getInventCode() {
return this.inventCode;
}
/**
* set the inventCode - 类型编码
*/
public void setInventCode(String inventCode) {
this.inventCode = inventCode;
}
/**
* get the inventName - 存货类型
* @return the inventName
*/
public String getInventName() {
return this.inventName;
}
/**
* set the inventName - 存货类型
*/
public void setInventName(String inventName) {
this.inventName = inventName;
}
/**
* 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 createdTime - 创建时间
* @return the createdTime
*/
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 创建时间
*/
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
/**
* 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 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.toInteger(StringUtils.toString(map.get("id")), id));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("companyCode")), companyCode));
setInventCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("inventCode")), inventCode));
setInventName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("inventName")), inventName));
setStatus(NumberUtils.toint(StringUtils.toString(map.get("status")), status));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("createdTime")), createdTime));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("createdBy")), createdBy));
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("inventCode", StringUtils.toString(inventCode, eiMetadata.getMeta("inventCode")));
map.put("inventName", StringUtils.toString(inventName, eiMetadata.getMeta("inventName")));
map.put("status", StringUtils.toString(status, eiMetadata.getMeta("status")));
map.put("createdTime", StringUtils.toString(createdTime, eiMetadata.getMeta("createdTime")));
map.put("createdBy", StringUtils.toString(createdBy, eiMetadata.getMeta("createdBy")));
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
/**
* Generate time : 2024-01-09 15:56:49
* Version : 1.0
*/
package com.baosight.iplat4j.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;
/**
* THppz007
*
*/
public class HPPZ007 extends DaoEPBase {
private Integer id = 0;
private String companyCode = " "; /* 企业编码 预留*/
private String whType = " "; /* 仓库类型*/
private String whCode = " "; /* 仓库编码*/
private String whName = " "; /* 仓库名称*/
private String princ = " "; /* 负责人*/
private int status; /* 状态 0未启用 1启用*/
private Timestamp createdTime ; /* 创建时间*/
private String createdBy = " "; /* 创建人*/
private Timestamp updatedTime ; /* 修改时间*/
private String updatedBy = " "; /* 修改人*/
/**
* 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("whType");
eiColumn.setDescName("仓库类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("whCode");
eiColumn.setDescName("仓库编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("whName");
eiColumn.setDescName("仓库名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("princ");
eiColumn.setDescName("负责人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("status");
eiColumn.setDescName("状态 0未启用 1启用");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("createdTime");
eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("createdBy");
eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("updatedTime");
eiColumn.setDescName("修改时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("updatedBy");
eiColumn.setDescName("修改人");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor
*/
public HPPZ007() {
initMetaData();
}
/**
* get the id
* @return the id
*/
public Integer getId() {
return this.id;
}
/**
* set the id
*/
public void setId(Integer 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 whType - 仓库类型
* @return the whType
*/
public String getWhType() {
return this.whType;
}
/**
* set the whType - 仓库类型
*/
public void setWhType(String whType) {
this.whType = whType;
}
/**
* get the whCode - 仓库编码
* @return the whCode
*/
public String getWhCode() {
return this.whCode;
}
/**
* set the whCode - 仓库编码
*/
public void setWhCode(String whCode) {
this.whCode = whCode;
}
/**
* get the whName - 仓库名称
* @return the whName
*/
public String getWhName() {
return this.whName;
}
/**
* set the whName - 仓库名称
*/
public void setWhName(String whName) {
this.whName = whName;
}
/**
* get the princ - 负责人
* @return the princ
*/
public String getPrinc() {
return this.princ;
}
/**
* set the princ - 负责人
*/
public void setPrinc(String princ) {
this.princ = princ;
}
/**
* 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 createdTime - 创建时间
* @return the createdTime
*/
public Timestamp getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 创建时间
*/
public void setCreatedTime(Timestamp createdTime) {
this.createdTime = createdTime;
}
/**
* 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 updatedTime - 修改时间
* @return the updatedTime
*/
public Timestamp getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 修改时间
*/
public void setUpdatedTime(Timestamp updatedTime) {
this.updatedTime = updatedTime;
}
/**
* 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 value from Map
*/
public void fromMap(Map map) {
setId(NumberUtils.toInteger(StringUtils.toString(map.get("id")), id));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("companyCode")), companyCode));
setWhType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("whType")), whType));
setWhCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("whCode")), whCode));
setWhName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("whName")), whName));
setPrinc(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("princ")), princ));
setStatus(NumberUtils.toint(StringUtils.toString(map.get("status")), status));
setCreatedTime(DateUtils.toTimestamp(StringUtils.toString(map.get("createdTime"))));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("createdBy")), createdBy));
setUpdatedTime(DateUtils.toTimestamp(StringUtils.toString(map.get("updatedTime"))));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("updatedBy")), updatedBy));
}
/**
* 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("whType",StringUtils.toString(whType, eiMetadata.getMeta("whType")));
map.put("whCode",StringUtils.toString(whCode, eiMetadata.getMeta("whCode")));
map.put("whName",StringUtils.toString(whName, eiMetadata.getMeta("whName")));
map.put("princ",StringUtils.toString(princ, eiMetadata.getMeta("princ")));
map.put("status",StringUtils.toString(status, eiMetadata.getMeta("status")));
map.put("createdTime",StringUtils.toString(createdTime, eiMetadata.getMeta("createdTime")));
map.put("createdBy",StringUtils.toString(createdBy, eiMetadata.getMeta("createdBy")));
map.put("updatedTime",StringUtils.toString(updatedTime, eiMetadata.getMeta("updatedTime")));
map.put("updatedBy",StringUtils.toString(updatedBy, eiMetadata.getMeta("updatedBy")));
return map;
}
}
\ No newline at end of file
/** /**
* Generate time : 2024-01-09 14:40:53 * Generate time : 2024-01-09 19:08:59
* Version : 1.0 * Version : 1.0
*/ */
package com.baosight.iplat4j.hp.pz.domain; package com.baosight.iplat4j.hp.pz.domain;
...@@ -22,7 +22,7 @@ public class THppz002 extends DaoEPBase { ...@@ -22,7 +22,7 @@ public class THppz002 extends DaoEPBase {
private String custCode = " "; /* 供应商编码*/ private String custCode = " "; /* 供应商编码*/
private String custName = " "; /* 供应商名称*/ private String custName = " "; /* 供应商名称*/
private String address = " "; /* 地址*/ private String address = " "; /* 地址*/
private Boolean status; /* 状态 0禁用 1启用*/ private int status; /* 状态 0禁用 1启用*/
private String createdBy = " "; /* 创建人*/ private String createdBy = " "; /* 创建人*/
private String createdTime = " "; /* 创建时间*/ private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/ private String updatedBy = " "; /* 更新人*/
...@@ -59,7 +59,7 @@ EiColumn eiColumn; ...@@ -59,7 +59,7 @@ EiColumn eiColumn;
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("status"); eiColumn = new EiColumn("status");
eiColumn.setDescName("状态 0用 1启用"); eiColumn.setDescName("状态 0未启用 1启用");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("createdBy"); eiColumn = new EiColumn("createdBy");
...@@ -171,20 +171,20 @@ initMetaData(); ...@@ -171,20 +171,20 @@ initMetaData();
public void setAddress(String address) { public void setAddress(String address) {
this.address = address; this.address = address;
} }
/** /**
* get the status - 状态 0禁用 1启用 * get the status - 状态 0未启用 1启用
* @return the status * @return the status
*/ */
public Boolean getStatus() { public int getStatus() {
return this.status; return this.status;
} }
/** /**
* set the status - 状态 0禁用 1启用 * set the status - 状态 0未启用 1启用
*/ */
public void setStatus(Boolean status) { public void setStatus(int status) {
this.status = status; this.status = status;
} }
/** /**
* get the createdBy - 创建人 * get the createdBy - 创建人
* @return the createdBy * @return the createdBy
...@@ -252,7 +252,7 @@ public void fromMap(Map map) { ...@@ -252,7 +252,7 @@ public void fromMap(Map map) {
setCustCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("custCode")), custCode)); setCustCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("custCode")), custCode));
setCustName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("custName")), custName)); setCustName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("custName")), custName));
setAddress(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("address")), address)); setAddress(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("address")), address));
setStatus(NumberUtils.toBoolean(StringUtils.toString(map.get("status")), status)); setStatus(NumberUtils.toint(StringUtils.toString(map.get("status")), status));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("createdBy")), createdBy)); setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("createdBy")), createdBy));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("createdTime")), createdTime)); setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("createdTime")), createdTime));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("updatedBy")), updatedBy)); setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("updatedBy")), updatedBy));
...@@ -271,7 +271,7 @@ Map map = new HashMap(); ...@@ -271,7 +271,7 @@ Map map = new HashMap();
map.put("custCode",StringUtils.toString(custCode, eiMetadata.getMeta("custCode"))); map.put("custCode",StringUtils.toString(custCode, eiMetadata.getMeta("custCode")));
map.put("custName",StringUtils.toString(custName, eiMetadata.getMeta("custName"))); map.put("custName",StringUtils.toString(custName, eiMetadata.getMeta("custName")));
map.put("address",StringUtils.toString(address, eiMetadata.getMeta("address"))); map.put("address",StringUtils.toString(address, eiMetadata.getMeta("address")));
map.put("status",StringUtils.toString(status, eiMetadata.getMeta("status"))); map.put("status", StringUtils.toString(status, eiMetadata.getMeta("status")));
map.put("createdBy",StringUtils.toString(createdBy, eiMetadata.getMeta("createdBy"))); map.put("createdBy",StringUtils.toString(createdBy, eiMetadata.getMeta("createdBy")));
map.put("createdTime",StringUtils.toString(createdTime, eiMetadata.getMeta("createdTime"))); map.put("createdTime",StringUtils.toString(createdTime, eiMetadata.getMeta("createdTime")));
map.put("updatedBy",StringUtils.toString(updatedBy, eiMetadata.getMeta("updatedBy"))); map.put("updatedBy",StringUtils.toString(updatedBy, eiMetadata.getMeta("updatedBy")));
......
/**
* Generate time : 2024-01-09 17:46:33
* Version : 1.0
*/
package com.baosight.iplat4j.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
/**
* Generate time : 2024-01-09 19:25:19
* Version : 1.0
*/
package com.baosight.iplat4j.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;
/**
* THppz004
*
*/
public class THppz004 extends DaoEPBase {
private Integer id = 0;
private String companyCode = " "; /* 企业编码 预留*/
private String inventName = " "; /* 存货类型*/
private String inventCode = " "; /* 存货类型编码*/
private String inventFatherName = " "; /* 上级存货类型*/
private String inventFatherCode = " "; /* 上级存货类型编码*/
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("inventName");
eiColumn.setDescName("存货类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("inventCode");
eiColumn.setDescName("存货类型编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("inventFatherName");
eiColumn.setDescName("上级存货类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("inventFatherCode");
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 THppz004() {
initMetaData();
}
/**
* get the id
* @return the id
*/
public Integer getId() {
return this.id;
}
/**
* set the id
*/
public void setId(Integer 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 inventName - 存货类型
* @return the inventName
*/
public String getInventName() {
return this.inventName;
}
/**
* set the inventName - 存货类型
*/
public void setInventName(String inventName) {
this.inventName = inventName;
}
/**
* get the inventCode - 存货类型编码
* @return the inventCode
*/
public String getInventCode() {
return this.inventCode;
}
/**
* set the inventCode - 存货类型编码
*/
public void setInventCode(String inventCode) {
this.inventCode = inventCode;
}
/**
* get the inventFatherName - 上级存货类型
* @return the inventFatherName
*/
public String getInventFatherName() {
return this.inventFatherName;
}
/**
* set the inventFatherName - 上级存货类型
*/
public void setInventFatherName(String inventFatherName) {
this.inventFatherName = inventFatherName;
}
/**
* get the inventFatherCode - 上级存货类型编码
* @return the inventFatherCode
*/
public String getInventFatherCode() {
return this.inventFatherCode;
}
/**
* set the inventFatherCode - 上级存货类型编码
*/
public void setInventFatherCode(String inventFatherCode) {
this.inventFatherCode = inventFatherCode;
}
/**
* 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.toInteger(StringUtils.toString(map.get("id")), id));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("companyCode")), companyCode));
setInventName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("inventName")), inventName));
setInventCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("inventCode")), inventCode));
setInventFatherName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("inventFatherName")), inventFatherName));
setInventFatherCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("inventFatherCode")), inventFatherCode));
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("inventName",StringUtils.toString(inventName, eiMetadata.getMeta("inventName")));
map.put("inventCode",StringUtils.toString(inventCode, eiMetadata.getMeta("inventCode")));
map.put("inventFatherName",StringUtils.toString(inventFatherName, eiMetadata.getMeta("inventFatherName")));
map.put("inventFatherCode",StringUtils.toString(inventFatherCode, eiMetadata.getMeta("inventFatherCode")));
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
...@@ -26,9 +26,9 @@ public class Thppz001 extends DaoEPBase { ...@@ -26,9 +26,9 @@ public class Thppz001 extends DaoEPBase {
private int custType; /* 客商类型 1:国企;2:民营;*/ private int custType; /* 客商类型 1:国企;2:民营;*/
private int status; /* 状态 0未启用 1启用*/ private int status; /* 状态 0未启用 1启用*/
private String createdBy = " "; /* 创建人*/ private String createdBy = " "; /* 创建人*/
private String createdTime = " "; /* 创建时间*/ private String createdTime ; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/ private String updatedBy = " "; /* 更新人*/
private String updatedTime = " "; /* 更新时间*/ private String updatedTime ; /* 更新时间*/
/** /**
* initialize the metadata * initialize the metadata
...@@ -249,9 +249,9 @@ public class Thppz001 extends DaoEPBase { ...@@ -249,9 +249,9 @@ public class Thppz001 extends DaoEPBase {
setCustType(NumberUtils.toint(StringUtils.toString(map.get("custType")), custType)); setCustType(NumberUtils.toint(StringUtils.toString(map.get("custType")), custType));
setStatus(NumberUtils.toint(StringUtils.toString(map.get("status")), status)); setStatus(NumberUtils.toint(StringUtils.toString(map.get("status")), status));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("createdBy")), createdBy)); setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("createdBy")), createdBy));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("createdTime")), createdTime)); setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("createdTime")),createdTime));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("updatedBy")), updatedBy)); setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("updatedBy")), updatedBy));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("updatedTime")), updatedTime)); setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("updatedTime")),updatedTime));
} }
/** /**
......
...@@ -10,8 +10,6 @@ import com.baosight.iplat4j.hp.pz.domain.Thppz001; ...@@ -10,8 +10,6 @@ import com.baosight.iplat4j.hp.pz.domain.Thppz001;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Date; import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
...@@ -52,13 +50,13 @@ public class ServiceHPPZ001 extends ServiceBase { ...@@ -52,13 +50,13 @@ public class ServiceHPPZ001 extends ServiceBase {
try { try {
Thppz001 hppz001 = new Thppz001(); Thppz001 hppz001 = new Thppz001();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock); EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < eiBlock.getRowCount(); i++) { for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i); Map<?, ?> map = eiBlock.getRow(i);
hppz001.fromMap(map); hppz001.fromMap(map);
hppz001.setCreatedBy(UserSession.getLoginName()); hppz001.setCreatedBy(UserSession.getUserId());
hppz001.setCreatedTime(sdf.format(new Date())); hppz001.setCreatedTime(sdf.format(new Date()));
hppz001.setUpdatedBy(null);
hppz001.setUpdatedTime(null);
this.dao.insert("HPPZ001.insert", hppz001.toMap()); this.dao.insert("HPPZ001.insert", hppz001.toMap());
} }
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo.setStatus(EiConstant.STATUS_SUCCESS);
...@@ -72,7 +70,7 @@ public class ServiceHPPZ001 extends ServiceBase { ...@@ -72,7 +70,7 @@ public class ServiceHPPZ001 extends ServiceBase {
logError("新增失败", e.getMessage()); logError("新增失败", e.getMessage());
return inInfo; return inInfo;
} }
return inInfo; return query(inInfo);
} }
/** /**
...@@ -86,7 +84,7 @@ public class ServiceHPPZ001 extends ServiceBase { ...@@ -86,7 +84,7 @@ public class ServiceHPPZ001 extends ServiceBase {
for (int i = 0; i < eiBlock.getRowCount(); i++) { for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i); Map<?, ?> map = eiBlock.getRow(i);
hppz001.fromMap(map); hppz001.fromMap(map);
hppz001.setUpdatedBy(UserSession.getLoginName()); hppz001.setUpdatedBy(UserSession.getUserId());
hppz001.setUpdatedTime(sdf.format(new Date())); hppz001.setUpdatedTime(sdf.format(new Date()));
this.dao.update("HPPZ001.update", hppz001.toMap()); this.dao.update("HPPZ001.update", hppz001.toMap());
} }
......
package com.baosight.iplat4j.hp.pz.service; package com.baosight.iplat4j.hp.pz.service;
import com.baosight.iplat4j.common.CompanyTypeEnum; import com.baosight.iplat4j.common.CompanyTypeEnum;
import com.baosight.iplat4j.util.CommonMethod;
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.hp.pz.domain.THppz002; import com.baosight.iplat4j.hp.pz.domain.THppz002;
import com.baosight.iplat4j.util.CommonMethod;
import java.util.Map; import java.util.Map;
...@@ -21,10 +21,10 @@ public class ServiceHPPZ002 extends ServiceBase { ...@@ -21,10 +21,10 @@ public class ServiceHPPZ002 extends ServiceBase {
* 画面初始化. * 画面初始化.
*/ */
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
THppz002 HPPZ002 = new THppz002(); THppz002 hppz002 = new THppz002();
EiInfo outInfo = super.initLoad(inInfo, HPPZ002); EiInfo outInfo = new EiInfo();
outInfo.addBlock(EiConstant.resultBlock).addBlockMeta(HPPZ002.eiMetadata); outInfo.addBlock(EiConstant.resultBlock);
outInfo.setBlock(CompanyTypeEnum.generatorEiBlock()); outInfo.getBlock(EiConstant.resultBlock).addBlockMeta(hppz002.eiMetadata);
return outInfo; return outInfo;
} }
...@@ -52,7 +52,8 @@ public class ServiceHPPZ002 extends ServiceBase { ...@@ -52,7 +52,8 @@ public class ServiceHPPZ002 extends ServiceBase {
// for (int i = 0; i < eiBlock.getRowCount(); i++) { // for (int i = 0; i < eiBlock.getRowCount(); i++) {
// Map<?, ?> map = eiBlock.getRow(i); // Map<?, ?> map = eiBlock.getRow(i);
// hppz002.fromMap(map); // hppz002.fromMap(map);
// this.dao.insertBatch()//insert("HPPZ002.insert", hppz002.toMap()); //
// this.dao.insert("HPPZ002.insert", hppz002.toMap());
// } // }
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("新增成功!"); inInfo.setMsg("新增成功!");
......
package com.baosight.iplat4j.hp.pz.service;
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.service.impl.ServiceBase;
import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import com.baosight.iplat4j.hp.pz.domain.THppz003;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Map;
/**
*
*/
public class ServiceHPPZ003 extends ServiceBase {
/**
* 画面初始化.
*/
public EiInfo initLoad(EiInfo inInfo) {
THppz003 hppz003 = new THppz003();
EiInfo outInfo = super.initLoad(inInfo, hppz003);
outInfo.addBlock(EiConstant.resultBlock).addBlockMeta(hppz003.eiMetadata);
return inInfo;
}
/**
* 查询操作.
*/
@Override
public EiInfo query(EiInfo inInfo) {
/* 调用EI查询方法.*/
EiInfo outInfo = super.query(inInfo, "HPPZ003.query", new THppz003());
return outInfo;
}
/**
* 新增操作.
*/
@Override
public EiInfo insert(EiInfo inInfo) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
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());
hppz003.setCreatedTime(sdf.format(new Date()));
hppz003.setUpdatedBy(null);
hppz003.setUpdatedTime(null);
this.dao.insert("HPPZ003.insert", hppz003.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("新增成功!");
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
inInfo.setMsg("新增失败!原因参见详细错误描述!");
inInfo.setDetailMsg(e.getMessage());
logError("新增失败", e.getMessage());
return inInfo;
}
return query(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);
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hppz003.fromMap(map);
hppz003.setUpdatedBy(UserSession.getUserId());
hppz003.setUpdatedTime(sdf.format(new Date()));
this.dao.update("HPPZ003.update", hppz003.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("修改成功!");
} catch (PlatException e) {
inInfo.setStatus(EiConstant.STATUS_FAILURE);
inInfo.setMsg("操作失败!原因参见详细错误描述!");
inInfo.setDetailMsg(e.getMessage());
logError("修改失败", e.getMessage());
return inInfo;
}
return query(inInfo);
}
/**
* 删除操作.
*/
public EiInfo delete(EiInfo eiInfo) {
THppz003 hppz003 = new THppz003();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
try {
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hppz003.fromMap(map);
this.dao.delete("HPPZ003.delete", hppz003.toMap());
}
} catch (PlatException e) {
eiInfo.setStatus(EiConstant.STATUS_FAILURE);
eiInfo.setMsg("删除失败,原因参见详细错误描述!");
eiInfo.setDetailMsg(e.getMessage());
logError("删除失败!", e.getMessage());
return eiInfo;
}
eiInfo.setStatus(EiConstant.STATUS_SUCCESS);
eiInfo.setMsg("删除成功!");
return eiInfo;
}
}
package com.baosight.iplat4j.hp.pz.service;
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.service.impl.ServiceBase;
import com.baosight.iplat4j.hp.pz.domain.THppz004;
import com.baosight.iplat4j.util.CommonMethod;
import java.util.Map;
/**
* @author xuao
* @date 2024年01月09日 19:35
*/
public class ServiceHPPZ004 extends ServiceBase {
/**
* 画面初始化.
*/
public EiInfo initLoad(EiInfo inInfo) {
THppz004 hppz004 = new THppz004();
EiInfo outInfo = new EiInfo();
outInfo.addBlock(EiConstant.resultBlock);
outInfo.getBlock(EiConstant.resultBlock).addBlockMeta(hppz004.eiMetadata);
return outInfo;
}
/**
* 查询操作.
*/
@Override
public EiInfo query(EiInfo inInfo) {
/* 调用EI查询方法.*/
EiInfo outInfo = super.query(inInfo, "HPPZ004.query", new THppz004());
return outInfo;
}
/**
* 新增操作.
*/
@Override
public EiInfo insert(EiInfo inInfo) {
try {
CommonMethod.creatorInfo(inInfo,EiConstant.resultBlock);
super.insert(inInfo,"HPPZ004.insert");
// THppz002 hppz002 = new THppz002();
// EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
// for (int i = 0; i < eiBlock.getRowCount(); i++) {
// Map<?, ?> map = eiBlock.getRow(i);
// hppz002.fromMap(map);
//
// this.dao.insert("HPPZ002.insert", hppz002.toMap());
// }
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("新增成功!");
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
inInfo.setMsg("新增失败!原因参见详细错误描述!");
inInfo.setDetailMsg(e.getMessage());
logError("新增失败", e.getMessage());
return inInfo;
}
return inInfo;
}
/**
* 修改操作.
*/
public EiInfo update(EiInfo inInfo) {
try {
THppz004 HPPZ004 = new THppz004();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HPPZ004.fromMap(map);
this.dao.update("HPPZ004.update", HPPZ004.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("修改成功!");
} catch (PlatException e) {
inInfo.setStatus(EiConstant.STATUS_FAILURE);
inInfo.setMsg("操作失败!原因参见详细错误描述!");
inInfo.setDetailMsg(e.getMessage());
logError("修改失败", e.getMessage());
return inInfo;
}
return query(inInfo);
}
/**
* 删除操作.
*/
public EiInfo delete(EiInfo eiInfo) {
THppz004 HPPZ004 = new THppz004();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
try {
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HPPZ004.fromMap(map);
this.dao.delete("HPPZ004.delete", HPPZ004.toMap());
}
} catch (PlatException e) {
eiInfo.setStatus(EiConstant.STATUS_FAILURE);
eiInfo.setMsg("删除失败,原因参见详细错误描述!");
eiInfo.setDetailMsg(e.getMessage());
logError("删除失败!", e.getMessage());
return eiInfo;
}
eiInfo.setStatus(EiConstant.STATUS_SUCCESS);
eiInfo.setMsg("删除成功!");
return eiInfo;
}
}
package com.baosight.iplat4j.hp.pz.service;
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.service.impl.ServiceBase;
import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import com.baosight.iplat4j.hp.pz.domain.HPPZ005;
import com.baosight.iplat4j.hp.pz.domain.HPPZ005;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Map;
public class ServiceHPPZ005 extends ServiceBase {
public EiInfo initLoad(EiInfo inInfo) {
HPPZ005 hppz005 = new HPPZ005();
EiInfo outInfo = super.initLoad(inInfo, hppz005);
outInfo.addBlock(EiConstant.resultBlock).addBlockMeta(hppz005.eiMetadata);
return inInfo;
}
/**
* 查询操作.
*/
@Override
public EiInfo query(EiInfo inInfo) {
/* 调用EI查询方法.*/
EiInfo outInfo = super.query(inInfo, "HPPZ005.query", new HPPZ005());
return outInfo;
}
/**
* 新增操作.
*/
@Override
public EiInfo insert(EiInfo inInfo) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
HPPZ005 hppz005 = new HPPZ005();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hppz005.fromMap(map);
hppz005.setCreatedBy(UserSession.getLoginName());
hppz005.setCreatedTime(String.valueOf(Timestamp.valueOf(sdf.format(new Date()))));
this.dao.insert("HPPZ005.insert", hppz005.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("新增成功!");
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
inInfo.setMsg("新增失败!原因参见详细错误描述!");
inInfo.setDetailMsg(e.getMessage());
logError("新增失败", e.getMessage());
return inInfo;
}
return inInfo;
}
/**
* 修改操作.
*/
public EiInfo update(EiInfo inInfo) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
HPPZ005 hppz005 = new HPPZ005();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hppz005.fromMap(map);
hppz005.setUpdatedBy(UserSession.getLoginName());
hppz005.setUpdatedTime(String.valueOf(Timestamp.valueOf(sdf.format(new Date()))));
this.dao.update("HPPZ005.update", hppz005.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("修改成功!");
} catch (PlatException e) {
inInfo.setStatus(EiConstant.STATUS_FAILURE);
inInfo.setMsg("操作失败!原因参见详细错误描述!");
inInfo.setDetailMsg(e.getMessage());
logError("修改失败", e.getMessage());
return inInfo;
}
return query(inInfo);
}
/**
* 删除操作.
*/
public EiInfo delete(EiInfo eiInfo) {
HPPZ005 hppz005 = new HPPZ005();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
try {
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hppz005.fromMap(map);
this.dao.delete("HPPZ005.delete", hppz005.toMap());
}
} catch (PlatException e) {
eiInfo.setStatus(EiConstant.STATUS_FAILURE);
eiInfo.setMsg("删除失败,原因参见详细错误描述!");
eiInfo.setDetailMsg(e.getMessage());
logError("删除失败!", e.getMessage());
return eiInfo;
}
eiInfo.setStatus(EiConstant.STATUS_SUCCESS);
eiInfo.setMsg("删除成功!");
return eiInfo;
}
}
package com.baosight.iplat4j.hp.pz.service;
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.service.impl.ServiceBase;
import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import com.baosight.iplat4j.hp.pz.domain.HPPZ007;
import com.baosight.iplat4j.hp.pz.domain.HPPZ007;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Map;
public class ServiceHPPZ007 extends ServiceBase {
public EiInfo initLoad(EiInfo inInfo) {
HPPZ007 hppz007 = new HPPZ007();
EiInfo outInfo = super.initLoad(inInfo, hppz007);
outInfo.addBlock(EiConstant.resultBlock).addBlockMeta(hppz007.eiMetadata);
return inInfo;
}
/**
* 查询操作.
*/
@Override
public EiInfo query(EiInfo inInfo) {
/* 调用EI查询方法.*/
EiInfo outInfo = super.query(inInfo, "HPPZ007.query", new HPPZ007());
return outInfo;
}
/**
* 新增操作.
*/
@Override
public EiInfo insert(EiInfo inInfo) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
HPPZ007 hppz007 = new HPPZ007();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hppz007.fromMap(map);
hppz007.setCreatedBy(UserSession.getLoginName());
hppz007.setCreatedTime(Timestamp.valueOf(sdf.format(new Date())));
this.dao.insert("HPPZ007.insert", hppz007.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("新增成功!");
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
inInfo.setMsg("新增失败!原因参见详细错误描述!");
inInfo.setDetailMsg(e.getMessage());
logError("新增失败", e.getMessage());
return inInfo;
}
return inInfo;
}
/**
* 修改操作.
*/
public EiInfo update(EiInfo inInfo) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
HPPZ007 hppz007 = new HPPZ007();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hppz007.fromMap(map);
hppz007.setUpdatedBy(UserSession.getLoginName());
hppz007.setUpdatedTime(Timestamp.valueOf(sdf.format(new Date())));
this.dao.update("HPPZ007.update", hppz007.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("修改成功!");
} catch (PlatException e) {
inInfo.setStatus(EiConstant.STATUS_FAILURE);
inInfo.setMsg("操作失败!原因参见详细错误描述!");
inInfo.setDetailMsg(e.getMessage());
logError("修改失败", e.getMessage());
return inInfo;
}
return query(inInfo);
}
/**
* 删除操作.
*/
public EiInfo delete(EiInfo eiInfo) {
HPPZ007 hppz007 = new HPPZ007();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
try {
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hppz007.fromMap(map);
this.dao.delete("HPPZ007.delete", hppz007.toMap());
}
} catch (PlatException e) {
eiInfo.setStatus(EiConstant.STATUS_FAILURE);
eiInfo.setMsg("删除失败,原因参见详细错误描述!");
eiInfo.setDetailMsg(e.getMessage());
logError("删除失败!", e.getMessage());
return eiInfo;
}
eiInfo.setStatus(EiConstant.STATUS_SUCCESS);
eiInfo.setMsg("删除成功!");
return eiInfo;
}
}
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
resultClass="com.baosight.iplat4j.hp.pz.domain.THppz002"> resultClass="com.baosight.iplat4j.hp.pz.domain.THppz002">
SELECT SELECT
ID as "id", ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 --> COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
CUST_TYPE as "custType", <!-- 供应商类型 1 国企 : 2 民营 --> CUST_TYPE as "custType", <!-- 供应商类型 1 国企 : 2 民营 -->
CUST_CODE as "custCode", <!-- 供应商编码 --> CUST_CODE as "custCode", <!-- 供应商编码 -->
...@@ -37,6 +36,12 @@ ...@@ -37,6 +36,12 @@
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="custType">
CUST_TYPE = #custType#
</isNotEmpty>
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy"> <isNotEmpty property="orderBy">
$orderBy$ $orderBy$
...@@ -125,5 +130,21 @@ ...@@ -125,5 +130,21 @@
WHERE WHERE
ID = #id# ID = #id#
</update> </update>
<select id="queryComboBox" parameterClass="java.util.HashMap"
resultClass="java.util.HashMap">
SELECT DISTINCT
CUST_CODE as "custCode",
CUST_NAME as "custName"
FROM hpjx.t_hppz002 WHERE 1=1
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="custType">
CUST_TYPE = #custType#
</isNotEmpty>
ORDER BY CUST_CODE
</select>
</sqlMap> </sqlMap>
\ No newline at end of file
<?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">
<!-- 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">
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.iplat4j.hp.pz.domain.THppz003">
SELECT
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
CUST_TYPE as "custType", <!-- 客商类型 1:国企;2:民营; -->
CUST_CODE as "custCode", <!-- 客户编码 -->
CUST_CNAME as "custCname", <!-- 客户名称 -->
CUST_ADDR as "custAddr", <!-- 地址 -->
STATUS as "status", <!-- 状态 0未启用 1启用 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime" <!-- 更新时间 -->
FROM hpjx.t_hppz003 WHERE 1=1
<isNotEmpty prepend=" AND " property="custCname">
CUST_CNAME LIKE CONCAT('%',CONCAT(#custCname#,'%'))
</isNotEmpty>
<isNotEmpty prepend=" AND " property="custType">
CUST_TYPE = #custType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
CREATED_TIME DESC
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hppz003 WHERE 1=1
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
</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 INTO hpjx.t_hppz003 (ID,
COMPANY_CODE, <!-- 企业编码 预留 -->
CUST_TYPE, <!-- 客商类型 1:国企;2:民营; -->
CUST_CODE, <!-- 客户编码 -->
CUST_CNAME, <!-- 客户名称 -->
CUST_ADDR, <!-- 地址 -->
STATUS, <!-- 状态 0未启用 1启用 -->
CREATED_BY, <!-- 创建人 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_TIME <!-- 更新时间 -->
)
VALUES (#id#, #companyCode#, #custType#, #custCode#, #custCname#, #custAddr#, #status#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#)
</insert>
<delete id="delete">
DELETE FROM hpjx.t_hppz003 WHERE
ID = #id#
</delete>
<update id="update">
UPDATE hpjx.t_hppz003
SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 -->
CUST_TYPE = #custType#, <!-- 客商类型 1:国企;2:民营; -->
CUST_CODE = #custCode#, <!-- 客户编码 -->
CUST_CNAME = #custCname#, <!-- 客户名称 -->
CUST_ADDR = #custAddr#, <!-- 地址 -->
STATUS = #status#, <!-- 状态 0未启用 1启用 -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_TIME = #updatedTime# <!-- 更新时间 -->
WHERE
ID = #id#
</update>
</sqlMap>
\ No newline at end of file
<?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">
<!-- table information
Generate time : 2024-01-09 19:25:19
Version : 1.0
tableName :hpjx.t_hppz004
ID INTEGER NOT NULL primarykey,
COMPANY_CODE VARCHAR NOT NULL,
INVENT_NAME VARCHAR NOT NULL,
INVENT_CODE VARCHAR NOT NULL,
INVENT_FATHER_NAME VARCHAR NOT NULL,
INVENT_FATHER_CODE VARCHAR NOT NULL,
STATUS TINYINT NOT NULL,
CREATED_BY VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_TIME VARCHAR
-->
<sqlMap namespace="HPPZ004">
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.iplat4j.hp.pz.domain.THppz004">
SELECT
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
INVENT_NAME as "inventName", <!-- 存货类型 -->
INVENT_CODE as "inventCode", <!-- 存货类型编码 -->
INVENT_FATHER_NAME as "inventFatherName", <!-- 上级存货类型 -->
INVENT_FATHER_CODE as "inventFatherCode", <!-- 上级存货类型编码 -->
STATUS as "status", <!-- 状态 0未启用 1启用 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime" <!-- 更新时间 -->
FROM hpjx.t_hppz004 WHERE 1=1
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hppz004 WHERE 1=1
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventFatherName">
INVENT_FATHER_NAME = #inventFatherName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventFatherCode">
INVENT_FATHER_CODE = #inventFatherCode#
</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 INTO hpjx.t_hppz004 (
COMPANY_CODE, <!-- 企业编码 预留 -->
INVENT_NAME, <!-- 存货类型 -->
INVENT_CODE, <!-- 存货类型编码 -->
INVENT_FATHER_NAME, <!-- 上级存货类型 -->
INVENT_FATHER_CODE, <!-- 上级存货类型编码 -->
STATUS, <!-- 状态 0未启用 1启用 -->
CREATED_BY, <!-- 创建人 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_TIME <!-- 更新时间 -->
)
VALUES (#companyCode#, #inventName#, #inventCode#, #inventFatherName#, #inventFatherCode#, #status#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#)
</insert>
<delete id="delete">
DELETE FROM hpjx.t_hppz004 WHERE
ID = #id#
</delete>
<update id="update">
UPDATE hpjx.t_hppz004
SET
INVENT_NAME = #inventName#, <!-- 存货类型 -->
INVENT_CODE = #inventCode#, <!-- 存货类型编码 -->
INVENT_FATHER_NAME = #inventFatherName#, <!-- 上级存货类型 -->
INVENT_FATHER_CODE = #inventFatherCode#, <!-- 上级存货类型编码 -->
STATUS = #status#, <!-- 状态 0未启用 1启用 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_TIME = #updatedTime# <!-- 更新时间 -->
WHERE
ID = #id#
</update>
</sqlMap>
\ No newline at end of file
<?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">
<!-- table information
Generate time : 2024-01-09 10:44:10
Version : 1.0
tableName :hpjx.t_hppz005
ID INTEGER NOT NULL primarykey,
COMPANY_CODE VARCHAR NOT NULL,
INVENT_CODE VARCHAR NOT NULL,
INVENT_NAME VARCHAR NOT NULL,
STATUS TINYINT NOT NULL,
CREATED_TIME VARCHAR,
CREATED_BY VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_TIME VARCHAR
-->
<sqlMap namespace="HPPZ005">
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.iplat4j.hp.pz.domain.HPPZ005">
SELECT
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
INVENT_CODE as "inventCode", <!-- 类型编码 -->
INVENT_NAME as "inventName", <!-- 存货类型 -->
STATUS as "status", <!-- 状态 0未启用 1启用 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
UPDATED_BY as "updatedBy", <!-- 修改人 -->
UPDATED_TIME as "updatedTime" <!-- 修改时间 -->
FROM hpjx.t_hppz005 WHERE 1=1
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME LIKE CONCAT('%', CONCAT(#inventName#,'%'))
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hppz005 WHERE 1=1
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO hpjx.t_hppz005 (
INVENT_CODE, <!-- 类型编码 -->
INVENT_NAME, <!-- 存货类型 -->
STATUS, <!-- 状态 0未启用 1启用 -->
CREATED_TIME, <!-- 创建时间 -->
CREATED_BY, <!-- 创建人 -->
UPDATED_BY, <!-- 修改人 -->
UPDATED_TIME <!-- 修改时间 -->
)
VALUES ( #inventCode#, #inventName#, #status#, #createdTime#, #createdBy#, #updatedBy#, #updatedTime#)
</insert>
<delete id="delete">
DELETE FROM hpjx.t_hppz005 WHERE
ID = #id#
</delete>
<update id="update">
UPDATE hpjx.t_hppz005
SET
INVENT_CODE = #inventCode#, <!-- 类型编码 -->
INVENT_NAME = #inventName#, <!-- 存货类型 -->
STATUS = #status#, <!-- 状态 0未启用 1启用 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_TIME = #updatedTime# <!-- 修改时间 -->
WHERE
ID = #id#
</update>
</sqlMap>
\ No newline at end of file
<?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">
<!-- table information
Generate time : 2024-01-09 15:56:49
Version : 1.0
tableName :hpjx.t_hppz007
ID INTEGER NOT NULL primarykey,
COMPANY_CODE VARCHAR NOT NULL,
WH_TYPE VARCHAR NOT NULL,
WH_CODE VARCHAR NOT NULL,
WH_NAME VARCHAR NOT NULL,
PRINC VARCHAR NOT NULL,
STATUS TINYINT NOT NULL,
CREATED_TIME DATETIME,
CREATED_BY VARCHAR,
UPDATED_TIME DATETIME,
UPDATED_BY VARCHAR
-->
<sqlMap namespace="HPPZ007">
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.iplat4j.hp.pz.domain.HPPZ007">
SELECT
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
WH_TYPE as "whType", <!-- 仓库类型 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 -->
PRINC as "princ", <!-- 负责人 -->
STATUS as "status", <!-- 状态 0未启用 1启用 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
UPDATED_TIME as "updatedTime", <!-- 修改时间 -->
UPDATED_BY as "updatedBy" <!-- 修改人 -->
FROM hpjx.t_hppz007 WHERE 1=1
<isNotEmpty prepend=" AND " property="whName">
WH_NAME LIKE CONCAT('%',CONCAT(#whName#),'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whType">
WH_TYPE LIKE CONCAT('%',CONCAT(#whType#),'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hppz007 WHERE 1=1
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whType">
WH_TYPE = #whType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode">
WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whName">
WH_NAME = #whName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="princ">
PRINC = #princ#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO hpjx.t_hppz007 (
WH_TYPE, <!-- 仓库类型 -->
WH_CODE, <!-- 仓库编码 -->
WH_NAME, <!-- 仓库名称 -->
PRINC, <!-- 负责人 -->
STATUS, <!-- 状态 0未启用 1启用 -->
CREATED_TIME, <!-- 创建时间 -->
CREATED_BY, <!-- 创建人 -->
UPDATED_TIME, <!-- 修改时间 -->
UPDATED_BY <!-- 修改人 -->
)
VALUES (#whType#, #whCode#, #whName#, #princ#, #status#, #createdTime#, #createdBy#, #updatedTime#, #updatedBy#)
</insert>
<delete id="delete">
DELETE FROM hpjx.t_hppz007 WHERE
ID = #id#
</delete>
<update id="update">
UPDATE hpjx.t_hppz007
SET
WH_TYPE = #whType#, <!-- 仓库类型 -->
WH_CODE = #whCode#, <!-- 仓库编码 -->
WH_NAME = #whName#, <!-- 仓库名称 -->
PRINC = #princ#, <!-- 负责人 -->
STATUS = #status#, <!-- 状态 0未启用 1启用 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
UPDATED_TIME = #updatedTime#, <!-- 修改时间 -->
UPDATED_BY = #updatedBy# <!-- 修改人 -->
WHERE
ID = #id#
</update>
</sqlMap>
\ No newline at end of file
/**
* Generate time : 2024-01-10 9:33:44
* Version : 1.0
*/
package com.baosight.iplat4j.hp.sc.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;
/**
* THpsc001
*
*/
public class THpsc001 extends DaoEPBase {
private Long id = 0L;
private String companyCode = " "; /* 企业编码 预留*/
private Integer projType = 0; /* 项目类型*/
private String projCode = " "; /* 项目编码*/
private String projName = " "; /* 项目名称*/
private String princ1 = " "; /* 本公司项目负责人*/
private String princ2 = " "; /* 客户项目负责人*/
private Integer status = 0; /* 状态 0-未审核,1-已审核*/
private String createdBy = " "; /* 创建人*/
private Timestamp createdTime ; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/
private Timestamp 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("projType");
eiColumn.setDescName("项目类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("projCode");
eiColumn.setDescName("项目编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("projName");
eiColumn.setDescName("项目名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("princ1");
eiColumn.setDescName("本公司项目负责人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("princ2");
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 THpsc001() {
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 projType - 项目类型
* @return the projType
*/
public Integer getProjType() {
return this.projType;
}
/**
* set the projType - 项目类型
*/
public void setProjType(Integer projType) {
this.projType = projType;
}
/**
* get the projCode - 项目编码
* @return the projCode
*/
public String getProjCode() {
return this.projCode;
}
/**
* set the projCode - 项目编码
*/
public void setProjCode(String projCode) {
this.projCode = projCode;
}
/**
* get the projName - 项目名称
* @return the projName
*/
public String getProjName() {
return this.projName;
}
/**
* set the projName - 项目名称
*/
public void setProjName(String projName) {
this.projName = projName;
}
/**
* get the princ1 - 本公司项目负责人
* @return the princ1
*/
public String getPrinc1() {
return this.princ1;
}
/**
* set the princ1 - 本公司项目负责人
*/
public void setPrinc1(String princ1) {
this.princ1 = princ1;
}
/**
* get the princ2 - 客户项目负责人
* @return the princ2
*/
public String getPrinc2() {
return this.princ2;
}
/**
* set the princ2 - 客户项目负责人
*/
public void setPrinc2(String princ2) {
this.princ2 = princ2;
}
/**
* get the status - 状态 0-未审核,1-已审核
* @return the status
*/
public Integer getStatus() {
return this.status;
}
/**
* set the 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 - 创建人
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
* get the createdTime - 创建时间
* @return the createdTime
*/
public Timestamp getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 创建时间
*/
public void setCreatedTime(Timestamp 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 Timestamp getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 更新时间
*/
public void setUpdatedTime(Timestamp 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));
setProjType(NumberUtils.toInteger(StringUtils.toString(map.get("projType")), projType));
setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("projCode")), projCode));
setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("projName")), projName));
setPrinc1(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("princ1")), princ1));
setPrinc2(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("princ2")), princ2));
setStatus(NumberUtils.toInteger(StringUtils.toString(map.get("status")), status));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("createdBy")), createdBy));
setCreatedTime(DateUtils.toTimestamp(StringUtils.toString(map.get("createdTime"))));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("updatedBy")), updatedBy));
setUpdatedTime(DateUtils.toTimestamp(StringUtils.toString(map.get("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("projType",StringUtils.toString(projType, eiMetadata.getMeta("projType")));
map.put("projCode",StringUtils.toString(projCode, eiMetadata.getMeta("projCode")));
map.put("projName",StringUtils.toString(projName, eiMetadata.getMeta("projName")));
map.put("princ1",StringUtils.toString(princ1, eiMetadata.getMeta("princ1")));
map.put("princ2",StringUtils.toString(princ2, eiMetadata.getMeta("princ2")));
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
<?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">
<!-- table information
Generate time : 2024-01-10 9:33:44
Version : 1.0
tableName :hpjx.t_hpsc001
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR NOT NULL,
PROJ_TYPE TINYINT,
PROJ_CODE VARCHAR,
PROJ_NAME VARCHAR,
PRINC1 VARCHAR,
PRINC2 VARCHAR,
STATUS TINYINT,
CREATED_BY VARCHAR,
CREATED_TIME DATETIME,
UPDATED_BY VARCHAR,
UPDATED_TIME DATETIME,
DEP_CODE VARCHAR
-->
<sqlMap namespace="tHpsc001">
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.iplat4j.hp.sc.domain.THpsc001">
SELECT
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
PROJ_TYPE as "projType", <!-- 项目类型 -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
PRINC1 as "princ1", <!-- 本公司项目负责人 -->
PRINC2 as "princ2", <!-- 客户项目负责人 -->
STATUS as "status", <!-- 状态 0-未审核,1-已审核 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DEP_CODE as "depCode" <!-- 部门编码 -->
FROM hpjx.t_hpsc001 WHERE 1=1
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hpsc001 WHERE 1=1
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projType">
PROJ_TYPE = #projType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="princ1">
PRINC1 = #princ1#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="princ2">
PRINC2 = #princ2#
</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>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO hpjx.t_hpsc001 (ID,
COMPANY_CODE, <!-- 企业编码 预留 -->
PROJ_TYPE, <!-- 项目类型 -->
PROJ_CODE, <!-- 项目编码 -->
PROJ_NAME, <!-- 项目名称 -->
PRINC1, <!-- 本公司项目负责人 -->
PRINC2, <!-- 客户项目负责人 -->
STATUS, <!-- 状态 0-未审核,1-已审核 -->
CREATED_BY, <!-- 创建人 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_TIME, <!-- 更新时间 -->
DEP_CODE <!-- 部门编码 -->
)
VALUES (#id#, #companyCode#, #projType#, #projCode#, #projName#, #princ1#, #princ2#, #status#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #depCode#)
</insert>
<delete id="delete">
DELETE FROM hpjx.t_hpsc001 WHERE
ID = #id#
</delete>
<update id="update">
UPDATE hpjx.t_hpsc001
SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 -->
PROJ_TYPE = #projType#, <!-- 项目类型 -->
PROJ_CODE = #projCode#, <!-- 项目编码 -->
PROJ_NAME = #projName#, <!-- 项目名称 -->
PRINC1 = #princ1#, <!-- 本公司项目负责人 -->
PRINC2 = #princ2#, <!-- 客户项目负责人 -->
STATUS = #status#, <!-- 状态 0-未审核,1-已审核 -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DEP_CODE = #depCode# <!-- 部门编码 -->
WHERE
ID = #id#
</update>
</sqlMap>
\ No newline at end of file
package com.baosight.iplat4j.util; package com.baosight.iplat4j.util;
import com.baosight.iplat4j.common.HPConstants; import com.baosight.iplat4j.common.HPConstants;
import com.baosight.iplat4j.common.DdynamicEnum;
import com.baosight.iplat4j.core.data.DaoEPBase;
import com.baosight.iplat4j.core.data.ibatis.dao.Dao;
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.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.ioc.spring.PlatApplicationContext;
import com.baosight.iplat4j.core.util.DateUtils; import com.baosight.iplat4j.core.util.DateUtils;
import com.baosight.iplat4j.core.web.threadlocal.UserSession; import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import org.apache.commons.lang.StringUtils;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/** /**
* @author xuao * @author xuao
...@@ -12,6 +22,64 @@ import com.baosight.iplat4j.core.web.threadlocal.UserSession; ...@@ -12,6 +22,64 @@ import com.baosight.iplat4j.core.web.threadlocal.UserSession;
*/ */
public class CommonMethod { public class CommonMethod {
protected static Dao dao = (Dao) PlatApplicationContext.getBean( "dao" );
/**
* @param inInfo 前后台交互对象
* @param tableParams 表信息
* @param selectParams 筛选条件
* 公用下拉方法
*/
public static void initBlock(EiInfo inInfo, List<DdynamicEnum> tableParams, Map<String, String> selectParams){
initBlock(inInfo, tableParams, selectParams,true);
}
/**
* @param inInfo 前后台交互对象
* @param tableParams 表信息
* @param selectParams 筛选条件
* 公用下拉方法
*/
public static void initBlock(EiInfo inInfo, List<DdynamicEnum> tableParams, Map<String, String> selectParams, Boolean isSplicingSymbol){
/* 新建一个块 将每个表查询到的结果放入单独的块中 */
EiBlock eiBlock;
/* 行数据 将每个数据源查询到的数据放到每个模块的行数据中 */
Map<String,String> row;
/* 每个数据源查询到的结果暂存在这个变量中 */
List results;
/* 将结果集中的每个结果暂存然后 强转为map */
Map tryValue;
/* 如果数据源为空就抛异常 原则上不允许出现这个问题!!! */
if (tableParams.size() <= 0) {
throw new NullPointerException();
}
/* 遍历每个数据源 */
for (DdynamicEnum tableParam : tableParams) {
/* 编辑块名称 */
eiBlock = new EiBlock(tableParam.getBlockId());
/* 将所有查询到的结果放到暂存变量中 */
results = dao.query(tableParam.getDbSource(), selectParams, EiConstant.defaultOffset,-999999);
for (Object result : results) {
row = new HashMap<>(3);
try {
tryValue = (Map) result;
}catch (ClassCastException e){
tryValue = ((DaoEPBase)result).toMap();
}
row.put(HPConstants.VALUE_FIELD, String.valueOf(tryValue.get(tableParam.getValue())));
if(isSplicingSymbol) {
row.put(HPConstants.TEXT_FIELD, (tryValue.get(tableParam.getValue()) + HPConstants.SPLICING_SYMBOL + tryValue.get(tableParam.getText())));
}else{
row.put(HPConstants.TEXT_FIELD, String.valueOf(tryValue.get(tableParam.getText())));
}
eiBlock.addRow(row);
}
inInfo.setBlock(eiBlock);
}
}
public static void creatorInfo(EiInfo eiInfo, String resultBlock){ public static void creatorInfo(EiInfo eiInfo, String resultBlock){
EiBlock block=eiInfo.getBlock(resultBlock); EiBlock block=eiInfo.getBlock(resultBlock);
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<head> <head>
<%-- <link rel="stylesheet" href="${ctx}/css/simulatedOperation.css"/>--%> <%-- <link rel="stylesheet" href="${ctx}/css/simulatedOperation.css"/>--%>
</head> </head>
<EF:EFPage title="设备索赔"> <EF:EFPage title="客商类型">
<EF:EFRegion id="inqu" title="查询条件"><%-- type="query" efRegionShowClear="true" efRegionSave="true"--%> <EF:EFRegion id="inqu" title="查询条件"><%-- type="query" efRegionShowClear="true" efRegionSave="true"--%>
...@@ -28,23 +28,27 @@ ...@@ -28,23 +28,27 @@
<EF:EFRegion id="result" title="记录集"> <EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no"> <EF:EFGrid blockId="result" autoDraw="no">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFComboColumn align="center" ename="custClassify" cname="分类"> <EF:EFComboColumn required="true" align="center" ename="custClassify" cname="分类">
<EF:EFOption label="供应商" value="1"/> <EF:EFOption label="供应商" value="1"/>
<EF:EFOption label="客户" value="2"/> <EF:EFOption label="客户" value="2"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="custCode" cname="类型编码"/> <EF:EFColumn required="true" ename="custCode" cname="类型编码"/>
<EF:EFComboColumn align="center" ename="custType" cname="客商类型"> <EF:EFComboColumn required="true" align="center" ename="custType" cname="客商类型">
<EF:EFOption label="民营" value="1"/> <EF:EFOption label="民营" value="1"/>
<EF:EFOption label="国营" value="2"/> <EF:EFOption label="国营" value="2"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFComboColumn align="center" ename="status" cname="状态"> <EF:EFComboColumn required="true" ename="status" cname="状态" align="center"
<EF:EFOption label="启用" value="1"/> columnTemplate="#=valueField#-#=textField#" optionLabel=" "
<EF:EFOption label="停用" value="0"/> itemTemplate="#=valueField#-#=textField#" textField="textField"
valueField="valueField" width="100">
<EF:EFOption label="--请选择--" value=""></EF:EFOption>
<EF:EFOption label="启用" value="1"></EF:EFOption>
<EF:EFOption label="禁用" value="0"></EF:EFOption>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="createdBy" enable="false" cname="创建时间"/> <EF:EFColumn ename="createdBy" enable="false" cname="创建人"/>
<EF:EFColumn ename="createdTime" enable="false" cname="创建人"/> <EF:EFColumn ename="createdTime" dateFormat="yyyy-MM-dd HH:mm:ss" enable="false" cname="创建时间"/>
<EF:EFColumn ename="updatedBy" enable="false" cname="修改时间"/> <EF:EFColumn ename="updatedBy" enable="false" cname="修改"/>
<EF:EFColumn ename="updatedTime" enable="false" cname="修改人"/> <EF:EFColumn ename="updatedTime" dateFormat="yyyy-MM-dd HH:mm:ss" enable="false" cname="修改时间"/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
</EF:EFPage> </EF:EFPage>
......
...@@ -6,6 +6,7 @@ $(function() { ...@@ -6,6 +6,7 @@ $(function() {
}); });
IPLATUI.EFGrid = { IPLATUI.EFGrid = {
"result": { "result": {
loadComplete: function (grid) { loadComplete: function (grid) {
......
...@@ -10,6 +10,16 @@ ...@@ -10,6 +10,16 @@
<EF:EFRegion id="inqu" title="查询条件"> <EF:EFRegion id="inqu" title="查询条件">
<div class="row"> <div class="row">
<EF:EFInput ename="inqu_status-0-custName" cname="供应商名称" colWidth="4" readonly="false"/> <EF:EFInput ename="inqu_status-0-custName" cname="供应商名称" colWidth="4" readonly="false"/>
<EF:EFSelect ename="inqu_status-0-custType" cname="供应商类型" colWidth="4">
<EF:EFOption label="--请选择--" value=""/>
<EF:EFOption label="国企" value="1"></EF:EFOption>
<EF:EFOption label="民营" value="2"></EF:EFOption>
</EF:EFSelect>
<EF:EFSelect ename="inqu_status-0-status" cname="状态" colWidth="4">
<EF:EFOption label="--请选择--" value=""/>
<EF:EFOption label="启用" value="1"></EF:EFOption>
<EF:EFOption label="禁用" value="0"></EF:EFOption>
</EF:EFSelect>
</div> </div>
</EF:EFRegion> </EF:EFRegion>
...@@ -18,27 +28,27 @@ ...@@ -18,27 +28,27 @@
<EF:EFColumn ename="id" cname="内码" hidden="true"/> <EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFComboColumn ename="custType" cname="供应商类型" align="center" <EF:EFComboColumn ename="custType" cname="供应商类型" align="center"
blockName="company_type_block_id"
columnTemplate="#=textField#-#=valueField#" optionLabel=" " columnTemplate="#=textField#-#=valueField#" optionLabel=" "
itemTemplate="#=textField#-#=valueField#" textField="textField" itemTemplate="#=textField#-#=valueField#" textField="textField"
valueField="valueField" width="100"> valueField="valueField" width="100" required="true">
<EF:EFOption label="--请选择--" value=""></EF:EFOption>
<EF:EFOption label="国企" value="1"></EF:EFOption>
<EF:EFOption label="民营" value="2"></EF:EFOption>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="custCode" cname="供应商编码" width="100" readonly="true" disabled="true"/> <EF:EFColumn ename="custCode" cname="供应商编码" width="100" readonly="false" required="true"/>
<EF:EFColumn ename="custName" cname="供应商名称" width="100" readonly="false"/> <EF:EFColumn ename="custName" cname="供应商名称" width="100" readonly="false" required="true"/>
<EF:EFColumn ename="address" cname="地址" width="100" readonly="false"/> <EF:EFColumn ename="address" cname="地址" width="100" readonly="false" required="true"/>
<EF:EFComboColumn ename="status" cname="状态" align="center" <EF:EFComboColumn ename="status" cname="状态" align="center" columnTemplate="#=textField#-#=valueField#" optionLabel=" "
columnTemplate="#=valueField#-#=textField#" optionLabel=" " itemTemplate="#=textField#-#=valueField#" textField="textField"
itemTemplate="#=valueField#-#=textField#" textField="textField" valueField="valueField" width="100" required="true">
valueField="valueField" width="100">
<EF:EFOption label="--请选择--" value=""></EF:EFOption> <EF:EFOption label="--请选择--" value=""></EF:EFOption>
<EF:EFOption label="启用" value="1"></EF:EFOption> <EF:EFOption label="启用" value="1"></EF:EFOption>
<EF:EFOption label="禁用" value="0"></EF:EFOption> <EF:EFOption label="禁用" value="0"></EF:EFOption>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="createdTime" cname="创建时间" width="100" readonly="true" disabled="true"/> <EF:EFColumn ename="createdTime" cname="创建时间" width="100" readonly="true" disabled="true"/>
<EF:EFColumn ename="createdBy" cname="创建人" width="100" readonly="false"/> <EF:EFColumn ename="createdBy" cname="创建人" width="100" readonly="true" disabled="true"/>
<EF:EFColumn ename="updatedTime" cname="更新时间" width="100" readonly="true" disabled="true"/> <EF:EFColumn ename="updatedTime" cname="更新时间" width="100" readonly="true" disabled="true"/>
<EF:EFColumn ename="updatedBy" cname="更新人" width="100" readonly="false"/> <EF:EFColumn ename="updatedBy" cname="更新人" width="100" readonly="true" disabled="true"/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
......
$(function () {
$("#QUERY").on("click", function () {
resultGrid.dataSource.page(1);
});
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 50, 70, 100],
},
}
});
\ No newline at end of file
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ 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}"/>
<head>
<%-- <link rel="stylesheet" href="${ctx}/css/simulatedOperation.css"/>--%>
</head>
<EF:EFPage title="客户档案">
<EF:EFRegion id="inqu" title="查询条件"><%-- type="query" efRegionShowClear="true" efRegionSave="true"--%>
<div class="row"> <%-- blockId="inqu_status" row="0" --%>
<EF:EFInput blockId="inqu_status" ename="custCname" cname="客户名称" row="0"/>
<EF:EFSelect cname="客户类型" optionLabel="全部" blockId="inqu_status" ename="custType" row="0">
<EF:EFOption label="民营" value="1"/>
<EF:EFOption label="国营" value="2"/>
</EF:EFSelect>
<EF:EFSelect cname="状态" optionLabel="全部" blockId="inqu_status" ename="status" row="0">
<EF:EFOption label="启用" value="1"/>
<EF:EFOption label="停用" value="0"/>
</EF:EFSelect>
</div>
<EF:EFButton ename="QUERY" cname="查询" row="1" class="btn-align-right"></EF:EFButton>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFComboColumn required="true" align="center" ename="custType" cname="客户类型">
<EF:EFOption label="民营" value="1"/>
<EF:EFOption label="国营" value="2"/>
</EF:EFComboColumn>
<EF:EFColumn equired="true" ename="custCode" cname="客户编码"/>
<EF:EFColumn equired="true" ename="custCname" cname="客户名称"/>
<EF:EFColumn ename="custAddr" cname="地址"/>
<EF:EFComboColumn required="true" ename="status" cname="状态" align="center"
columnTemplate="#=valueField#-#=textField#" optionLabel=" "
itemTemplate="#=valueField#-#=textField#" textField="textField"
valueField="valueField" width="100">
<EF:EFOption label="--请选择--" value=""></EF:EFOption>
<EF:EFOption label="启用" value="1"></EF:EFOption>
<EF:EFOption label="禁用" value="0"></EF:EFOption>
</EF:EFComboColumn>
<EF:EFColumn ename="createdBy" enable="false" cname="创建人"/>
<EF:EFColumn ename="createdTime" dateFormat="yyyy-MM-dd HH:mm:ss" enable="false" cname="创建时间"/>
<EF:EFColumn ename="updatedBy" enable="false" cname="修改人"/>
<EF:EFColumn ename="updatedTime" dateFormat="yyyy-MM-dd HH:mm:ss" enable="false" cname="修改时间"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
<script>
var ctx = "${ctx}";
</script>
<script src="${ctx}/HP/PZ/HPPZ003.js"></script>
\ No newline at end of file
$(function() {
// 查询
$("#QUERY").on("click", function () {
resultGrid.dataSource.page(1); // 点击查询按钮,从第1页开始查询
});
IPLATUI.EFGrid = {
"result": {
loadComplete: function (grid) {
// 新增
$("#BTN_INSERT").on("click", function () {
var btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
IPLAT.submitNode($("#HPPZ004"), "HPPZ004", "insert", {
onSuccess: function (ei) {
if (ei["status"] == -1) {
NotificationUtil(ei, "error");
} else {
// 绑定grid
resultGrid.setEiInfo(ei);
NotificationUtil({
msg: '新增成功'
});
}
//释放禁用按钮
btnNode.attr("disabled", false);
resultGrid.dataSource.page(1);
},
onFail: function (ei) { // onFail 表示失败回调函数
// 发生异常
console.log(ei);
//释放禁用按钮
btnNode.attr("disabled", false);
}
});
});
// 修改
$("#UPDATE").on("click", function () {
var rowCount = resultGrid.getCheckedRows();
// 检验是否选中数据
if (rowCount == null || rowCount == "") {
NotificationUtil({
msg : '请选择一条或多条数据'
}, "warning");
return false;
}
var btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
IPLAT.submitNode($("#HPPZ004"), "HPPZ004", "update", {
onSuccess: function (ei) {
if (ei["status"] == -1) {
NotificationUtil(ei, "error");
} else {
NotificationUtil({
msg: '修改成功'
});
// 绑定grid
resultGrid.setEiInfo(ei);
}
//释放禁用按钮
btnNode.attr("disabled", false);
},
onFail: function (ei) { // onFail 表示失败回调函数
// 发生异常
console.log(ei);
//释放禁用按钮
btnNode.attr("disabled", false);
}
});
});
//删除
$("#DELETE").on("click", function () {
var btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
var dataItems = resultGrid.getCheckedRows();
if (dataItems == null || dataItems == "") {
NotificationUtil({
msg: '选择要删除的数据'
}, "warning");
//释放禁用按钮
btnNode.attr("disabled", false);
return false;
}
IPLAT.submitNode($("#HPPZ004"), "HPPZ004", "delete", {
onSuccess: function (ei) {
if (ei["status"] == -1) {
NotificationUtil(ei, "error");
} else {
NotificationUtil({
msg: '删除成功'
});
// 绑定grid
resultGrid.setEiInfo(ei);
}
//释放禁用按钮
btnNode.attr("disabled", false);
},
onFail: function (ei) {// onFail
// 表示失败回调函数
// 发生异常
console.log(ei);
//释放禁用按钮
btnNode.attr("disabled", false);
}
});
});
}
},
};
});
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ 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:EFInput ename="inqu_status-0-inventName" cname="存货类型" colWidth="4" readonly="false"/>
<EF:EFSelect ename="inqu_status-0-status" cname="状态" colWidth="4">
<EF:EFOption label="--请选择--" value=""/>
<EF:EFOption label="启用" value="1"></EF:EFOption>
<EF:EFOption label="未启用" value="0"></EF:EFOption>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="false" isFloat="true" autoFit="true">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="inventCode" cname="类型编码" width="100" readonly="false" required="true"/>
<EF:EFColumn ename="inventName" cname="存货类型" width="100" readonly="false" required="true"/>
<EF:EFColumn ename="inventFatherName" cname="上级名称" width="100" readonly="false" required="true"/>
<EF:EFComboColumn ename="status" cname="状态" align="center" columnTemplate="#=textField#-#=valueField#" optionLabel=" "
itemTemplate="#=textField#-#=valueField#" textField="textField"
valueField="valueField" width="100" required="true">
<EF:EFOption label="--请选择--" value=""></EF:EFOption>
<EF:EFOption label="启用" value="1"></EF:EFOption>
<EF:EFOption label="禁用" value="0"></EF:EFOption>
</EF:EFComboColumn>
<EF:EFColumn ename="createdTime" cname="创建时间" width="100" readonly="true" disabled="true"/>
<EF:EFColumn ename="createdBy" cname="创建人" width="100" readonly="true" disabled="true"/>
<EF:EFColumn ename="updatedTime" cname="更新时间" width="100" readonly="true" disabled="true"/>
<EF:EFColumn ename="updatedBy" cname="更新人" width="100" readonly="true" disabled="true"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
$(function () {
$("#QUERY").on("click", function (e) {
resultGrid.dataSource.page(1);
});
});
<%--
Created by IntelliJ IDEA.
User: 孟翔宇
Date: 2024-01-09
Time: 11:18
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ 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 >
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFInput ename="inqu_status-0-inventName" cname="存货类型"/>
<EF:EFSelect cname="状态:" optionLabel="全部" blockId="inqu_status" ename="status" row="0">
<EF:EFOption label="启用" value="1"/>
<EF:EFOption label="停用" value="0"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集" >
<EF:EFGrid blockId="result" autoDraw="no">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="inventCode" cname="类型编码"/>
<EF:EFColumn ename="inventName" cname="存货类型"/>
<EF:EFComboColumn align="center" ename="status" cname="状态">
<EF:EFOption label="启用" value="1"/>
<EF:EFOption label="停用" value="0"/>
</EF:EFComboColumn>
<EF:EFColumn ename="createdTime" enable="false" cname="创建时间"/>
<EF:EFColumn ename="createdBy" enable="false" cname="创建人"/>
<EF:EFColumn ename="updatedTime" enable="false" cname="修改时间"/>
<EF:EFColumn ename="updatedBy" enable="false" cname="修改人"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
$(function () {
$("#QUERY").on("click", function () {
resultGrid.dataSource.page(1);
});
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 50, 70, 100],
},
}
});
\ No newline at end of file
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ 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}"/>
<head>
<%-- <link rel="stylesheet" href="${ctx}/css/simulatedOperation.css"/>--%>
</head>
<EF:EFPage title="仓库档案">
<EF:EFRegion id="inqu" title="查询条件"><%-- type="query" efRegionShowClear="true" efRegionSave="true"--%>
<div class="row"> <%-- blockId="inqu_status" row="0" --%>
<EF:EFInput blockId="inqu_status" ename="whName" cname="仓库名称:" row="0"/>
<EF:EFInput blockId="inqu_status" ename="whType" cname="仓库类型:" row="0"/>
<EF:EFSelect cname="状态:" optionLabel="全部" blockId="inqu_status" ename="status" row="0">
<EF:EFOption label="启用" value="1"/>
<EF:EFOption label="停用" value="0"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="whType" cname="仓库类型"/>
<EF:EFColumn ename="whCode" cname="仓库编码"/>
<EF:EFColumn ename="whName" cname="仓库名称"/>
<EF:EFColumn ename="princ" cname="负责人"/>
<EF:EFComboColumn align="center" ename="status" cname="状态">
<EF:EFOption label="启用" value="1"/>
<EF:EFOption label="停用" value="0"/>
</EF:EFComboColumn>
<EF:EFColumn ename="createdTime" enable="false" cname="创建时间"/>
<EF:EFColumn ename="createdBy" enable="false" cname="创建人"/>
<EF:EFColumn ename="updatedTime" enable="false" cname="修改时间"/>
<EF:EFColumn ename="updatedBy" enable="false" cname="修改人"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
<script>
var ctx = "${ctx}";
</script>
<script src="${ctx}/HP/PZ/HPPZ007.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