Commit fb832d60 by YG9635

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

parents ffa92ce7 7c3479df
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;
public enum CompanyTypeEnum {
GQ(1,"国企"),
MY(2,"民营");
private Integer code;
private String 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;
}
CompanyTypeEnum(Integer code, String value) {
this.code = code;
this.value = value;
}
public static EiBlock generatorEiBlock(){
EiBlock block = new EiBlock("company_type_block_id");
List<Map<String,Object>> rows = new ArrayList<Map<String,Object>>(){{
add(new HashMap<String,Object>(){{
put(HPConstants.TEXT_FIELD,GQ.code);
put(HPConstants.VALUE_FIELD,GQ.value);
}});
add(new HashMap<String,Object>(){{
put(HPConstants.TEXT_FIELD,MY.code);
put(HPConstants.VALUE_FIELD,MY.value);
}});
}};
block.setRows(rows);
return block;
}
}
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;
}
}
package com.baosight.iplat4j.common;
/**
* @author xuao
* @date 2024年01月09日 14:53
*/
public class HPConstants {
//公司編碼
public static final String SQL_FIELD_COMPANYCODE = "companyCode";
//創建人
public static final String SQL_FIELD_CREATED_BY = "createdBy";
//創建時間
public static final String SQL_FIELD_CREATED_TIME = "createdTime";
//修改人
public static final String SQL_FIELD_UPDATED_BY = "updatedBy";
//修改時間
public static final String SQL_FIELD_UPDATED_TIME = "updatedTime";
//代碼名字分隔符
public static final String SPLICING_SYMBOL = "-";
/** 前后台交互下拉框字段 字段名 dzg */
public static final String TEXT_FIELD = "textField";
/** 前后台交互下拉框字段 字段名 dzg */
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;
}
}
package com.baosight.iplat4j.common;
\ No newline at end of file
package com.baosight.iplat4j.hp.kc.service;
import com.baosight.iplat4j.common.CompanyTypeEnum;
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.kc.domain.Thpkc008;
import com.baosight.iplat4j.util.CommonMethod;
import java.util.Map;
/**
* @author xuao
* @date 2024年01月09日 10:18
*/
public class ServiceHPKC008 extends ServiceBase {
/**
* 画面初始化.
*/
public EiInfo initLoad(EiInfo inInfo) {
Thpkc008 HPKC008 = new Thpkc008();
EiInfo outInfo = super.initLoad(inInfo, HPKC008);
outInfo.addBlock(EiConstant.resultBlock).addBlockMeta(HPKC008.eiMetadata);
outInfo.setBlock(CompanyTypeEnum.generatorEiBlock());
return outInfo;
}
/**
* 查询操作.
*/
@Override
public EiInfo query(EiInfo inInfo) {
/* 调用EI查询方法.*/
EiInfo outInfo = super.query(inInfo, "HPKC008.query", new Thpkc008());
return outInfo;
}
/**
* 新增操作.
*/
@Override
public EiInfo insert(EiInfo inInfo) {
try {
CommonMethod.creatorInfo(inInfo,EiConstant.resultBlock);
super.insert(inInfo,"HPKC008.insert");
// Thpkc008 HPKC008 = new Thpkc008();
// EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
// for (int i = 0; i < eiBlock.getRowCount(); i++) {
// Map<?, ?> map = eiBlock.getRow(i);
// HPKC008.fromMap(map);
// this.dao.insertBatch()//insert("HPKC008.insert", HPKC008.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 {
Thpkc008 HPKC008 = new Thpkc008();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HPKC008.fromMap(map);
this.dao.update("HPKC008.update", HPKC008.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) {
Thpkc008 HPKC008 = new Thpkc008();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
try {
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HPKC008.fromMap(map);
this.dao.delete("HPKC008.delete", HPKC008.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;
}
}
<?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 18:54:54
Version : 1.0
tableName :hpjx.t_hpkc008
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR NOT NULL,
DATEMONTH VARCHAR NOT NULL,
STATISTICAL_NUMBER VARCHAR NOT NULL,
MATERIAL_CODE VARCHAR NOT NULL,
MATERIAL_NAME VARCHAR NOT NULL,
UNIT VARCHAR,
AMOUNT DECIMAL NOT NULL,
PRICE DECIMAL NOT NULL,
TOTAL_PRICE DECIMAL NOT NULL,
NOTES VARCHAR,
CREATED_BY VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_TIME VARCHAR
-->
<sqlMap namespace="HPKC008">
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.iplat4j.hp.kc.domain.Thpkc008">
SELECT
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
DATEMONTH as "datemonth", <!-- 月份 -->
STATISTICAL_NUMBER as "statisticalNumber", <!-- 统计单单号 -->
MATERIAL_CODE as "materialCode", <!-- 物料编码 -->
MATERIAL_NAME as "materialName", <!-- 物料名称 -->
UNIT as "unit", <!-- 单位 -->
AMOUNT as "amount", <!-- 数量 -->
PRICE as "price", <!-- 单价 -->
TOTAL_PRICE as "totalPrice", <!-- 金额 -->
NOTES as "notes", <!-- 备注 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime" <!-- 更新时间 -->
FROM hpjx.t_hpkc008 WHERE 1=1
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="datemonth">
datemonth = #datemonth#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="statisticalNumber">
statisticalNumber = #statisticalNumber#
</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_hpkc008 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="datemonth">
DATEMONTH = #datemonth#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="statisticalNumber">
STATISTICAL_NUMBER = #statisticalNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="materialCode">
MATERIAL_CODE = #materialCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="materialName">
MATERIAL_NAME = #materialName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unit">
UNIT = #unit#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="amount">
AMOUNT = #amount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="price">
PRICE = #price#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalPrice">
TOTAL_PRICE = #totalPrice#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="notes">
NOTES = #notes#
</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_hpkc008 (
COMPANY_CODE, <!-- 企业编码 预留 -->
DATEMONTH, <!-- 月份 -->
STATISTICAL_NUMBER, <!-- 统计单单号 -->
MATERIAL_CODE, <!-- 物料编码 -->
MATERIAL_NAME, <!-- 物料名称 -->
UNIT, <!-- 单位 -->
AMOUNT, <!-- 数量 -->
PRICE, <!-- 单价 -->
TOTAL_PRICE, <!-- 金额 -->
NOTES, <!-- 备注 -->
CREATED_BY, <!-- 创建人 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_TIME <!-- 更新时间 -->
)
VALUES (#companyCode#, #datemonth#, #statisticalNumber#, #materialCode#, #materialName#, #unit#, #amount#, #price#, #totalPrice#, #notes#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#)
</insert>
<delete id="delete">
DELETE FROM hpjx.t_hpkc008 WHERE
ID = #id#
</delete>
<update id="update">
UPDATE hpjx.t_hpkc008
SET
DATEMONTH = #datemonth#, <!-- 月份 -->
STATISTICAL_NUMBER = #statisticalNumber#, <!-- 统计单单号 -->
MATERIAL_CODE = #materialCode#, <!-- 物料编码 -->
MATERIAL_NAME = #materialName#, <!-- 物料名称 -->
UNIT = #unit#, <!-- 单位 -->
AMOUNT = #amount#, <!-- 数量 -->
PRICE = #price#, <!-- 单价 -->
TOTAL_PRICE = #totalPrice#, <!-- 金额 -->
NOTES = #notes#, <!-- 备注 -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_TIME = #updatedTime# <!-- 更新时间 -->
WHERE
ID = #id#
</update>
</sqlMap>
\ No newline at end of file
/**
* 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 19:08:59
* 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;
/**
* THppz002
*
*/
public class THppz002 extends DaoEPBase {
private Long id = 0L;
private String companyCode = " "; /* 企业编码 预留*/
private Integer custType = 0; /* 供应商类型 1 国企 : 2 民营*/
private String custCode = " "; /* 供应商编码*/
private String custName = " "; /* 供应商名称*/
private String address = " "; /* 地址*/
private int status; /* 状态 0禁用 1启用*/
private String createdBy = " "; /* 创建人*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/
private String updatedTime = " "; /* 更新时间*/
/**
* initialize the metadata
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn("id");
eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" ");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("companyCode");
eiColumn.setDescName("企业编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("custType");
eiColumn.setDescName("供应商类型 1 国企 : 2 民营");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("custCode");
eiColumn.setDescName("供应商编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("custName");
eiColumn.setDescName("供应商名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("address");
eiColumn.setDescName("地址");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("status");
eiColumn.setDescName("状态 0未启用 1启用");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("createdBy");
eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("createdTime");
eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("updatedBy");
eiColumn.setDescName("更新人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("updatedTime");
eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor
*/
public THppz002() {
initMetaData();
}
/**
* get the id
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the companyCode - 企业编码 预留
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 企业编码 预留
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the custType - 供应商类型 1 国企 : 2 民营
* @return the custType
*/
public Integer getCustType() {
return this.custType;
}
/**
* set the custType - 供应商类型 1 国企 : 2 民营
*/
public void setCustType(Integer custType) {
this.custType = custType;
}
/**
* get the custCode - 供应商编码
* @return the custCode
*/
public String getCustCode() {
return this.custCode;
}
/**
* set the custCode - 供应商编码
*/
public void setCustCode(String custCode) {
this.custCode = custCode;
}
/**
* get the custName - 供应商名称
* @return the custName
*/
public String getCustName() {
return this.custName;
}
/**
* set the custName - 供应商名称
*/
public void setCustName(String custName) {
this.custName = custName;
}
/**
* get the address - 地址
* @return the address
*/
public String getAddress() {
return this.address;
}
/**
* set the address - 地址
*/
public void setAddress(String address) {
this.address = address;
}
/**
* get the status - 状态 0未启用 1启用
* @return the status
*/
public int getStatus() {
return this.status;
}
/**
* set the status - 状态 0未启用 1启用
*/
public void setStatus(int status) {
this.status = status;
}
/**
* get the createdBy - 创建人
* @return the createdBy
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 创建人
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
* get the createdTime - 创建时间
* @return the createdTime
*/
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 创建时间
*/
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
/**
* get the updatedBy - 更新人
* @return the updatedBy
*/
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 更新人
*/
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
/**
* get the updatedTime - 更新时间
* @return the updatedTime
*/
public String getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 更新时间
*/
public void setUpdatedTime(String updatedTime) {
this.updatedTime = updatedTime;
}
/**
* get the 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.toInteger(StringUtils.toString(map.get("custType")), custType));
setCustCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("custCode")), custCode));
setCustName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("custName")), custName));
setAddress(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("address")), address));
setStatus(NumberUtils.toint(StringUtils.toString(map.get("status")), status));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("createdBy")), createdBy));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("createdTime")), createdTime));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("updatedBy")), updatedBy));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("updatedTime")), updatedTime));
}
/**
* set the value to Map
*/
public Map toMap() {
Map map = new HashMap();
map.put("id",StringUtils.toString(id, eiMetadata.getMeta("id")));
map.put("companyCode",StringUtils.toString(companyCode, eiMetadata.getMeta("companyCode")));
map.put("custType",StringUtils.toString(custType, eiMetadata.getMeta("custType")));
map.put("custCode",StringUtils.toString(custCode, eiMetadata.getMeta("custCode")));
map.put("custName",StringUtils.toString(custName, eiMetadata.getMeta("custName")));
map.put("address",StringUtils.toString(address, eiMetadata.getMeta("address")));
map.put("status", StringUtils.toString(status, eiMetadata.getMeta("status")));
map.put("createdBy",StringUtils.toString(createdBy, eiMetadata.getMeta("createdBy")));
map.put("createdTime",StringUtils.toString(createdTime, eiMetadata.getMeta("createdTime")));
map.put("updatedBy",StringUtils.toString(updatedBy, eiMetadata.getMeta("updatedBy")));
map.put("updatedTime",StringUtils.toString(updatedTime, eiMetadata.getMeta("updatedTime")));
return map;
}
}
\ No newline at end of file
/**
* 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 {
private int custType; /* 客商类型 1:国企;2:民营;*/
private int status; /* 状态 0未启用 1启用*/
private String createdBy = " "; /* 创建人*/
private String createdTime = " "; /* 创建时间*/
private String createdTime ; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/
private String updatedTime = " "; /* 更新时间*/
private String updatedTime ; /* 更新时间*/
/**
* initialize the metadata
......@@ -249,9 +249,9 @@ public class Thppz001 extends DaoEPBase {
setCustType(NumberUtils.toint(StringUtils.toString(map.get("custType")), custType));
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));
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));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("updatedTime")),updatedTime));
}
/**
......
......@@ -10,8 +10,6 @@ import com.baosight.iplat4j.hp.pz.domain.Thppz001;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
......@@ -52,13 +50,13 @@ public class ServiceHPPZ001 extends ServiceBase {
try {
Thppz001 hppz001 = new Thppz001();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hppz001.fromMap(map);
hppz001.setCreatedBy(UserSession.getLoginName());
hppz001.setCreatedBy(UserSession.getUserId());
hppz001.setCreatedTime(sdf.format(new Date()));
hppz001.setUpdatedBy(null);
hppz001.setUpdatedTime(null);
this.dao.insert("HPPZ001.insert", hppz001.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
......@@ -72,7 +70,7 @@ public class ServiceHPPZ001 extends ServiceBase {
logError("新增失败", e.getMessage());
return inInfo;
}
return inInfo;
return query(inInfo);
}
/**
......@@ -86,7 +84,7 @@ public class ServiceHPPZ001 extends ServiceBase {
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hppz001.fromMap(map);
hppz001.setUpdatedBy(UserSession.getLoginName());
hppz001.setUpdatedBy(UserSession.getUserId());
hppz001.setUpdatedTime(sdf.format(new Date()));
this.dao.update("HPPZ001.update", hppz001.toMap());
}
......
package com.baosight.iplat4j.hp.pz.service;
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.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.THppz002;
import java.util.Map;
/**
* @author xuao
* @date 2024年01月09日 10:18
*/
public class ServiceHPPZ002 extends ServiceBase {
/**
* 画面初始化.
*/
public EiInfo initLoad(EiInfo inInfo) {
THppz002 hppz002 = new THppz002();
EiInfo outInfo = new EiInfo();
outInfo.addBlock(EiConstant.resultBlock);
outInfo.getBlock(EiConstant.resultBlock).addBlockMeta(hppz002.eiMetadata);
return outInfo;
}
/**
* 查询操作.
*/
@Override
public EiInfo query(EiInfo inInfo) {
/* 调用EI查询方法.*/
EiInfo outInfo = super.query(inInfo, "HPPZ002.query", new THppz002());
return outInfo;
}
/**
* 新增操作.
*/
@Override
public EiInfo insert(EiInfo inInfo) {
try {
CommonMethod.creatorInfo(inInfo,EiConstant.resultBlock);
super.insert(inInfo,"HPPZ002.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 {
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.update("HPPZ002.update", HPPZ002.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) {
THppz002 HPPZ002 = new THppz002();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
try {
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HPPZ002.fromMap(map);
this.dao.delete("HPPZ002.delete", HPPZ002.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.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;
}
}
<?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 14:40:53
Version : 1.0
tableName :hpjx.t_hppz002
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR NOT NULL,
CUST_TYPE TINYINT NOT NULL,
CUST_CODE VARCHAR NOT NULL,
CUST_NAME VARCHAR NOT NULL,
ADDRESS VARCHAR NOT NULL,
STATUS TINYINT NOT NULL,
CREATED_BY VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_TIME VARCHAR
-->
<sqlMap namespace="HPPZ002">
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.iplat4j.hp.pz.domain.THppz002">
SELECT
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
CUST_TYPE as "custType", <!-- 供应商类型 1 国企 : 2 民营 -->
CUST_CODE as "custCode", <!-- 供应商编码 -->
CUST_NAME as "custName", <!-- 供应商名称 -->
ADDRESS as "address", <!-- 地址 -->
STATUS as "status", <!-- 状态 0禁用 1启用 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime" <!-- 更新时间 -->
FROM hpjx.t_hppz002 WHERE 1=1
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="custType">
CUST_TYPE = #custType#
</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_hppz002 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="custName">
CUST_NAME = #custName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="address">
ADDRESS = #address#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO hpjx.t_hppz002 (
COMPANY_CODE, <!-- 企业编码 预留 -->
CUST_TYPE, <!-- 供应商类型 1 国企 : 2 民营 -->
CUST_CODE, <!-- 供应商编码 -->
CUST_NAME, <!-- 供应商名称 -->
ADDRESS, <!-- 地址 -->
STATUS, <!-- 状态 0禁用 1启用 -->
CREATED_BY, <!-- 创建人 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_TIME <!-- 更新时间 -->
)
VALUES (#companyCode#, #custType#, #custCode#, #custName#, #address#, #status#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#)
</insert>
<delete id="delete">
DELETE FROM hpjx.t_hppz002 WHERE
ID = #id#
</delete>
<update id="update">
UPDATE hpjx.t_hppz002
SET
CUST_TYPE = #custType#, <!-- 供应商类型 1 国企 : 2 民营 -->
CUST_CODE = #custCode#, <!-- 供应商编码 -->
CUST_NAME = #custName#, <!-- 供应商名称 -->
ADDRESS = #address#, <!-- 地址 -->
STATUS = #status#, <!-- 状态 0禁用 1启用 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_TIME = #updatedTime# <!-- 更新时间 -->
WHERE
ID = #id#
</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>
\ 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
<?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;
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.EiConstant;
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.web.threadlocal.UserSession;
import org.apache.commons.lang.StringUtils;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author xuao
* @date 2024年01月09日 14:50
*/
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){
EiBlock block=eiInfo.getBlock(resultBlock);
String userId = UserSession.getLoginName();
String userName = UserSession.getLoginCName();
String time = DateUtils.curDateTimeStr14();
for(int i=0; i < block.getRowCount(); i++){
//TODO 公司代码待补充
block.setCell(i, HPConstants.SQL_FIELD_COMPANYCODE, "");
block.setCell(i, HPConstants.SQL_FIELD_CREATED_BY, userId+ HPConstants.SPLICING_SYMBOL + userName);
block.setCell(i, HPConstants.SQL_FIELD_CREATED_TIME, time);
block.setCell(i, HPConstants.SQL_FIELD_UPDATED_BY, userId+ HPConstants.SPLICING_SYMBOL + userName);
block.setCell(i, HPConstants.SQL_FIELD_UPDATED_TIME, time);
}
}
}
package com.baosight.iplat4j.util;
\ 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($("#HPKC008"), "HPKC008", "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($("#HPKC008"), "HPKC008", "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($("#HPKC008"), "HPKC008", "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:EFDatePicker ename="inqu_status-0-datemonth" cname="单据日期"
format="yyyy-MM" start="year" depth="year" required="true"/>
<EF:EFInput ename="inqu_status-0-statisticalNumber" cname="统计单单号" colWidth="4" readonly="false"/>
</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:EFComboColumn ename="datemonth" cname="月份" align="center"
blockName="company_type_block_id"
columnTemplate="#=textField#-#=valueField#" optionLabel=" "
itemTemplate="#=textField#-#=valueField#" textField="textField"
valueField="valueField" width="100">
</EF:EFComboColumn>--%>
<EF:EFColumn ename="datemonth" cname="月份" width="100" readonly="false" />
<EF:EFColumn ename="statisticalNumber" cname="统计单单号" width="100" readonly="false" />
<EF:EFColumn ename="materialCode" cname="物料编码" width="100" readonly="false"/>
<EF:EFColumn ename="materialName" cname="物料名称" width="100" readonly="false"/>
<EF:EFColumn ename="unit" cname="单位" width="100" readonly="false"/>
<EF:EFColumn ename="amount" cname="数量" width="100" readonly="false"/>
<EF:EFColumn ename="price" cname="单价" width="100" readonly="false"/>
<EF:EFColumn ename="totalPrice" cname="金额" width="100" readonly="false"/>
<EF:EFColumn ename="notes" cname="备注" width="100" readonly="false"/>
<EF:EFColumn ename="createdTime" cname="创建时间" readonly="true" width="150" align="center" enable="false" parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss"/>
<EF:EFColumn ename="createdBy" cname="创建人" readonly="true" width="150" align="center" enable="false"/>
<EF:EFColumn ename="updatedTime" cname="更新时间" readonly="true" width="150" align="center" enable="false" parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss"/>
<EF:EFColumn ename="updatedBy" cname="更新人" readonly="true" width="150" align="center" enable="false"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
......@@ -7,7 +7,7 @@
<head>
<%-- <link rel="stylesheet" href="${ctx}/css/simulatedOperation.css"/>--%>
</head>
<EF:EFPage title="设备索赔">
<EF:EFPage title="客商类型">
<EF:EFRegion id="inqu" title="查询条件"><%-- type="query" efRegionShowClear="true" efRegionSave="true"--%>
......@@ -28,23 +28,27 @@
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no">
<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="2"/>
</EF:EFComboColumn>
<EF:EFColumn ename="custCode" cname="类型编码"/>
<EF:EFComboColumn align="center" ename="custType" cname="客商类型">
<EF:EFColumn required="true" ename="custCode" cname="类型编码"/>
<EF:EFComboColumn required="true" align="center" ename="custType" cname="客商类型">
<EF:EFOption label="民营" value="1"/>
<EF:EFOption label="国营" value="2"/>
</EF:EFComboColumn>
<EF:EFComboColumn align="center" ename="status" cname="状态">
<EF:EFOption label="启用" value="1"/>
<EF:EFOption label="停用" value="0"/>
<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" enable="false" cname="创建人"/>
<EF:EFColumn ename="updatedBy" enable="false" cname="修改时间"/>
<EF:EFColumn ename="updatedTime" enable="false" cname="修改人"/>
<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>
......
$(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($("#HPPZ002"), "HPPZ002", "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($("#HPPZ002"), "HPPZ002", "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($("#HPPZ002"), "HPPZ002", "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-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>
</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:EFComboColumn ename="custType" 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="2"></EF:EFOption>
</EF:EFComboColumn>
<EF:EFColumn ename="custCode" cname="供应商编码" width="100" readonly="false" required="true"/>
<EF:EFColumn ename="custName" cname="供应商名称" width="100" readonly="false" required="true"/>
<EF:EFColumn ename="address" cname="地址" width="100" readonly="false" required="true"/>
<EF:EFComboColumn ename="status" cname="状态" align="center" 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 () {
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