Commit 253a4e1f by 宋祥

1.存货类型页面完善

2.存货档案页面完善
parent bc0022e9
......@@ -28,6 +28,8 @@ public class HPConstant {
public static final String HPPZ002_CUST_CODE = "HPPZ002_CUST_CODE";
// 客户编码
public static final String HPPZ003_CUST_CODE = "HPPZ003_CUST_CODE";
// 存货编码
public static final String INVENT_CODE = "INVENT_CODE";
}
/**
......
package com.baosight.hpjx.hp.kc.service;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.HPConstants;
import com.baosight.hpjx.common.InventTypeEnun;
import com.baosight.hpjx.hp.kc.domain.HPKC001;
import com.baosight.hpjx.hp.kc.domain.HPKC001;
import com.baosight.hpjx.hp.pz.domain.HPPZ007;
import com.baosight.hpjx.hp.pz.domain.THppz004;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.StringUtil;
import com.baosight.hpjx.util.contants.ACConstants;
......@@ -18,7 +14,6 @@ import com.baosight.iplat4j.core.service.impl.ServiceBase;
import org.apache.commons.lang3.StringUtils;
import java.util.*;
import java.util.stream.Collectors;
/**
* @author YK
......
package com.baosight.hpjx.hp.kc.service;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC003;
import com.baosight.hpjx.hp.kc.domain.HPKC009;
import com.baosight.hpjx.hp.pz.domain.HPPZ007;
import com.baosight.hpjx.hp.pz.domain.HPPZ009;
import com.baosight.hpjx.hp.pz.domain.THppz004;
import com.baosight.hpjx.hp.pz.tools.HPPZTools;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.EiInfoUtils;
......@@ -17,14 +13,12 @@ import com.baosight.hpjx.util.StringUtil;
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.ed.util.SequenceGenerator;
import org.apache.commons.collections.MapUtils;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -88,9 +82,9 @@ public class ServiceHPKC003 extends ServiceBase {
fKc003.fromMap(resultRows.get(i));
fKc003.setDocumentDate(StringUtil.removeHorizontalLine(fKc003.getDocumentDate()));
// 仓库名称
fKc003.setWhName(HPPZTools.getWhNameByCode(fKc003.getWhCode()));
fKc003.setWhName(HPPZTools.getPz007ByCode(fKc003.getWhCode()).getWhName());
// 物料名称
fKc003.setInventName(HPPZTools.getInventNameByCode(fKc003.getInventCode()));
fKc003.setInventName(HPPZTools.getPz004ByCode(fKc003.getInventCode()).getInventName());
// 生成入库单号
fKc003.setProdNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPKC003_PROD_NO));
DaoUtils.insert("HPKC003.insert", fKc003);
......@@ -119,9 +113,9 @@ public class ServiceHPKC003 extends ServiceBase {
fKc003.fromMap(resultRows.get(i));
fKc003.setDocumentDate(StringUtil.removeHorizontalLine(fKc003.getDocumentDate()));
// 仓库名称
fKc003.setWhName(HPPZTools.getWhNameByCode(fKc003.getWhCode()));
fKc003.setWhName(HPPZTools.getPz007ByCode(fKc003.getWhCode()).getWhName());
// 物料名称
fKc003.setInventName(HPPZTools.getInventNameByCode(fKc003.getInventCode()));
fKc003.setInventName(HPPZTools.getPz004ByCode(fKc003.getInventCode()).getInventName());
DaoUtils.update("HPKC003.update", fKc003);
}
inInfo = this.query(inInfo);
......
......@@ -3,17 +3,12 @@ package com.baosight.hpjx.hp.kc.service;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC003;
import com.baosight.hpjx.hp.kc.domain.HPKC004;
import com.baosight.hpjx.hp.pz.domain.HPPZ007;
import com.baosight.hpjx.hp.pz.domain.HPPZ009;
import com.baosight.hpjx.hp.pz.domain.THppz004;
import com.baosight.hpjx.hp.pz.tools.HPPZTools;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.StringUtil;
import com.baosight.hpjx.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
......@@ -24,7 +19,6 @@ import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.collections.MapUtils;
import java.util.*;
import java.util.stream.Collectors;
/**
* @author YK
......@@ -86,9 +80,9 @@ public class ServiceHPKC004 extends ServiceBase {
fKc004.fromMap(resultRows.get(i));
fKc004.setReceiptDate(StringUtil.removeHorizontalLine(fKc004.getReceiptDate()));
// 仓库名称
fKc004.setWhName(HPPZTools.getWhNameByCode(fKc004.getWhCode()));
fKc004.setWhName(HPPZTools.getPz007ByCode(fKc004.getWhCode()).getWhName());
// 物料名称
fKc004.setInventName(HPPZTools.getInventNameByCode(fKc004.getInventCode()));
fKc004.setInventName(HPPZTools.getPz004ByCode(fKc004.getInventCode()).getInventName());
// 生成销售单号
fKc004.setSaleNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPKC004_SALE_NO));
DaoUtils.insert("HPKC004.insert", fKc004);
......@@ -117,9 +111,9 @@ public class ServiceHPKC004 extends ServiceBase {
fKc004.fromMap(resultRows.get(i));
fKc004.setReceiptDate(StringUtil.removeHorizontalLine(fKc004.getReceiptDate()));
// 仓库名称
fKc004.setWhName(HPPZTools.getWhNameByCode(fKc004.getWhCode()));
fKc004.setWhName(HPPZTools.getPz007ByCode(fKc004.getWhCode()).getWhName());
// 物料名称
fKc004.setInventName(HPPZTools.getInventNameByCode(fKc004.getInventCode()));
fKc004.setInventName(HPPZTools.getPz004ByCode(fKc004.getInventCode()).getInventName());
DaoUtils.update("HPKC004.update", fKc004);
}
inInfo = this.query(inInfo);
......
package com.baosight.hpjx.hp.kc.service;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC005;
import com.baosight.hpjx.hp.pz.domain.HPPZ007;
import com.baosight.hpjx.hp.pz.domain.HPPZ009;
import com.baosight.hpjx.hp.pz.domain.THppz004;
import com.baosight.hpjx.hp.pz.domain.HPPZ004;
import com.baosight.hpjx.hp.pz.tools.HPPZTools;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.StringUtil;
import com.baosight.hpjx.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
......@@ -27,7 +25,6 @@ import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
*
......@@ -90,15 +87,9 @@ public class ServiceHPKC005 extends ServiceBase {
// 去除日期字符串中的-
fKc005.setReceiptDate(StringUtil.removeHorizontalLine(fKc005.getReceiptDate()));
// 仓库名称
Map params = new HashMap<>();
params.put("whCode", fKc005.getWhCode());
List query = dao.query("HPPZ007.queryByWhCode", params);
fKc005.setWhName(((HPPZ007) query.get(0)).getWhName());
fKc005.setWhName(HPPZTools.getPz007ByCode(fKc005.getWhCode()).getWhName());
// 物料名称
Map params1 = new HashMap<>();
params1.put("inventCode", fKc005.getInventCode());
List query1 = dao.query("HPPZ004.queryMatNameByCode", params1);
fKc005.setInventName(((THppz004) query1.get(0)).getInventName());
fKc005.setInventName(HPPZTools.getPz004ByCode(fKc005.getInventCode()).getInventName());
if (fKc005.getId() == null || fKc005.getId() == 0) {
this.add(fKc005);
} else {
......@@ -158,28 +149,18 @@ public class ServiceHPKC005 extends ServiceBase {
CommonMethod.creatorInfo(inInfo, EiConstant.resultBlock);
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
Map resultRow = resultRows.get(i);
HPKC005 fKc005 = new HPKC005();
fKc005.fromMap(resultRows.get(i));
// 去除日期字符串中的-
String receiptDate = MapUtils.getString(resultRow, "receiptDate");
resultRow.put("receiptDate", StringUtil.removeHorizontalLine(receiptDate));
String whCode = MapUtils.getString(resultRow, "whCode");
String inventCode = MapUtils.getString(resultRow, "inventCode");
fKc005.setReceiptDate(StringUtil.removeHorizontalLine(fKc005.getReceiptDate()));
// 仓库名称
Map params = new HashMap<>();
params.put("whCode", whCode);
List query = dao.query("HPPZ007.queryByWhCode", params);
String whName = ((HPPZ007) query.get(0)).getWhName();
resultRow.put("whName", whName);
fKc005.setWhName(HPPZTools.getPz007ByCode(fKc005.getWhCode()).getWhName());
// 物料名称
Map params1 = new HashMap<>();
params1.put("inventCode", inventCode);
List query1 = dao.query("HPPZ004.queryMatNameByCode", params1);
String inventName = ((THppz004) query1.get(0)).getInventName();
resultRow.put("inventName", inventName);
fKc005.setInventName(HPPZTools.getPz004ByCode(fKc005.getInventCode()).getInventName());
// 生成单据号
resultRow.put("statisticalNumber", SequenceGenerator.getNextSequence(
fKc005.setStatisticalNumber(SequenceGenerator.getNextSequence(
HPConstant.SequenceId.STATISTICAL_NUMBER));
DaoUtils.insert("HPKC005.insert", resultRow);
DaoUtils.insert("HPKC005.insert", fKc005);
}
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据新增成功!");
} catch (Exception e) {
......@@ -189,30 +170,22 @@ public class ServiceHPKC005 extends ServiceBase {
}
/**
* 修改操作.
* 修改操作
*
* @param inInfo
* @return
*/
public EiInfo update(EiInfo inInfo) {
try {
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
List<String> list = new ArrayList<>();
for (int i = 0; i < eiBlock.getRowCount(); i++) {
HPKC005 HPKC005 = new HPKC005();
HPKC005.fromMap(eiBlock.getRow(i));
if (HPKC005.getStatus() == 1) {
list.add(HPKC005.getStatisticalNumber());
continue;
}
Map params=new HashMap<>();
params.put("whCode", HPKC005.getWhCode());
List query = dao.query("HPPZ007.queryByWhCode",params);
String whName = ((HPPZ007)query.get(0)).getWhName();
HPKC005.setWhName(whName);
Map params1=new HashMap<>();
params1.put("inventCode", HPKC005.getInventCode());
List query1 = dao.query("HPPZ004.queryMatNameByCode",params1);
String matName = ((THppz004)query1.get(0)).getInventName();
HPKC005.setInventName(matName);
this.dao.update("HPKC005.update", HPKC005.toMap());
HPKC005 fKc005 = new HPKC005();
fKc005.fromMap(eiBlock.getRow(i));
// 仓库名称
fKc005.setWhName(HPPZTools.getPz007ByCode(fKc005.getWhCode()).getWhName());
// 物料名称
fKc005.setInventName(HPPZTools.getPz004ByCode(fKc005.getInventCode()).getInventName());
this.dao.update("HPKC005.update", fKc005);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
......
......@@ -2,10 +2,8 @@ package com.baosight.hpjx.hp.kc.service;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC005;
import com.baosight.hpjx.hp.kc.domain.HPKC008;
import com.baosight.hpjx.hp.pz.domain.HPPZ007;
import com.baosight.hpjx.hp.pz.domain.THppz004;
import com.baosight.hpjx.hp.pz.domain.HPPZ004;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.StringUtil;
......@@ -80,8 +78,8 @@ public class ServiceHPKC008 extends ServiceBase {
// 物料名称
Map params1 = new HashMap<>();
params1.put("inventCode", MapUtils.getString(resultRow, "materialCode"));
List query1 = dao.query("HPPZ004.queryMatNameByCode", params1);
String matName = ((THppz004) query1.get(0)).getInventName();
List query1 = dao.query("HPPZ004.query", params1);
String matName = ((HPPZ004) query1.get(0)).getInventName();
resultRow.put("materialName", matName);
// 生成单据号
resultRow.put("statisticalNumber", SequenceGenerator.getNextSequence(
......
......@@ -14,7 +14,7 @@ import com.baosight.hpjx.hp.kc.domain.HPKC007;
import com.baosight.hpjx.hp.kc.domain.HPKC009;
import com.baosight.hpjx.hp.pz.domain.HPPZ007;
import com.baosight.hpjx.hp.pz.domain.HPPZ009;
import com.baosight.hpjx.hp.pz.domain.THppz004;
import com.baosight.hpjx.hp.pz.domain.HPPZ004;
import com.baosight.hpjx.hp.pz.tools.HPPZTools;
import com.baosight.hpjx.util.BeanUtils;
import com.baosight.hpjx.util.CommonMethod;
......@@ -381,14 +381,14 @@ public class ServiceHPKC009 extends ServiceBase {
Map<String, HPPZ007> mapPz007 = HPPZTools.mapPz007(whCodes);
// 存货名称
List<String> inventCodes = kc009s.stream().map(HPKC009::getInventCode).collect(Collectors.toList());
Map<String, THppz004> mapPz004 = HPPZTools.mapPz004(inventCodes);
Map<String, HPPZ004> mapPz004 = HPPZTools.mapPz004(inventCodes);
for (HPKC009 kc009 : kc009s) {
String whCode = kc009.getWhCode();
// 仓库名称
HPPZ007 pz007 = mapPz007 == null ? null : mapPz007.get(whCode);
kc009.setWhName(pz007 == null ? "" : pz007.getWhName());
// 存货名称
THppz004 pz004 = mapPz004 == null ? null : mapPz004.get(whCode);
HPPZ004 pz004 = mapPz004 == null ? null : mapPz004.get(whCode);
kc009.setInventName(pz004 == null ? "" : pz004.getInventName());
}
}
......
package com.baosight.hpjx.hp.pz.domain;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.core.util.StringUtils;
/**
* Project: <br>
* Title:THppz004.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-01-22 14:36:36 create
*/
public class HPPZ004 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id";
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码 预留*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_INVENT_TYPE = "inventType"; /* 存货类型*/
public static final String FIELD_INVENT_CODE = "inventCode"; /* 存货编码*/
public static final String FIELD_INVENT_NAME = "inventName"; /* 存货名称*/
public static final String FIELD_STATUS = "status"; /* 状态 0未启用 1启用*/
public static final String FIELD_CREATED_BY = "createdBy"; /* 创建人*/
public static final String FIELD_CREATED_NAME = "createdName"; /* 创建人名称*/
public static final String FIELD_CREATED_TIME = "createdTime"; /* 创建时间*/
public static final String FIELD_UPDATED_BY = "updatedBy"; /* 更新人*/
public static final String FIELD_UPDATED_NAME = "updatedName"; /* 更新人名称*/
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 更新时间*/
public static final String COL_ID = "ID";
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String COL_INVENT_TYPE = "INVENT_TYPE"; /* 存货类型*/
public static final String COL_INVENT_CODE = "INVENT_CODE"; /* 存货编码*/
public static final String COL_INVENT_NAME = "INVENT_NAME"; /* 存货名称*/
public static final String COL_STATUS = "STATUS"; /* 状态 0未启用 1启用*/
public static final String COL_CREATED_BY = "CREATED_BY"; /* 创建人*/
public static final String COL_CREATED_NAME = "CREATED_NAME"; /* 创建人名称*/
public static final String COL_CREATED_TIME = "CREATED_TIME"; /* 创建时间*/
public static final String COL_UPDATED_BY = "UPDATED_BY"; /* 更新人*/
public static final String COL_UPDATED_NAME = "UPDATED_NAME"; /* 更新人名称*/
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 更新时间*/
public static final String QUERY = "HPPZ004.query";
public static final String COUNT = "HPPZ004.count";
public static final String INSERT = "HPPZ004.insert";
public static final String UPDATE = "HPPZ004.update";
public static final String DELETE = "HPPZ004.delete";
private Long id = null;
private String companyCode = " "; /* 企业编码 预留*/
private String depCode = " "; /* 部门编码*/
private Integer inventType = null; /* 存货类型*/
private String inventCode = " "; /* 存货编码*/
private String inventName = " "; /* 存货名称*/
private Integer status = 1; /* 状态 0未启用 1启用*/
private String createdBy = " "; /* 创建人*/
private String createdName = " "; /* 创建人名称*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/
private String updatedName = " "; /* 更新人名称*/
private String updatedTime = " "; /* 更新时间*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" ");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("企业编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_TYPE);
eiColumn.setDescName("存货类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_CODE);
eiColumn.setDescName("存货编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_NAME);
eiColumn.setDescName("存货名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_STATUS);
eiColumn.setDescName("状态 0未启用 1启用");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_BY);
eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_NAME);
eiColumn.setDescName("创建人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_TIME);
eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_BY);
eiColumn.setDescName("更新人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_NAME);
eiColumn.setDescName("更新人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_TIME);
eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HPPZ004() {
initMetaData();
}
/**
* get the id .
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id .
*
* @param id
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the companyCode - 企业编码 预留.
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 企业编码 预留.
*
* @param companyCode - 企业编码 预留
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the depCode - 部门编码.
* @return the depCode
*/
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码.
*
* @param depCode - 部门编码
*/
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the inventType - 存货类型.
* @return the inventType
*/
public Integer getInventType() {
return this.inventType;
}
/**
* set the inventType - 存货类型.
*
* @param inventType - 存货类型
*/
public void setInventType(Integer inventType) {
this.inventType = inventType;
}
/**
* get the inventCode - 存货编码.
* @return the inventCode
*/
public String getInventCode() {
return this.inventCode;
}
/**
* set the inventCode - 存货编码.
*
* @param inventCode - 存货编码
*/
public void setInventCode(String inventCode) {
this.inventCode = inventCode;
}
/**
* get the inventName - 存货名称.
* @return the inventName
*/
public String getInventName() {
return this.inventName;
}
/**
* set the inventName - 存货名称.
*
* @param inventName - 存货名称
*/
public void setInventName(String inventName) {
this.inventName = inventName;
}
/**
* get the status - 状态 0未启用 1启用.
* @return the status
*/
public Integer getStatus() {
return this.status;
}
/**
* set the status - 状态 0未启用 1启用.
*
* @param status - 状态 0未启用 1启用
*/
public void setStatus(Integer status) {
this.status = status;
}
/**
* get the createdBy - 创建人.
* @return the createdBy
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 创建人.
*
* @param createdBy - 创建人
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
* get the createdName - 创建人名称.
* @return the createdName
*/
public String getCreatedName() {
return this.createdName;
}
/**
* set the createdName - 创建人名称.
*
* @param createdName - 创建人名称
*/
public void setCreatedName(String createdName) {
this.createdName = createdName;
}
/**
* get the createdTime - 创建时间.
* @return the createdTime
*/
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 创建时间.
*
* @param createdTime - 创建时间
*/
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
/**
* get the updatedBy - 更新人.
* @return the updatedBy
*/
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 更新人.
*
* @param updatedBy - 更新人
*/
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
/**
* get the updatedName - 更新人名称.
* @return the updatedName
*/
public String getUpdatedName() {
return this.updatedName;
}
/**
* set the updatedName - 更新人名称.
*
* @param updatedName - 更新人名称
*/
public void setUpdatedName(String updatedName) {
this.updatedName = updatedName;
}
/**
* get the updatedTime - 更新时间.
* @return the updatedTime
*/
public String getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 更新时间.
*
* @param updatedTime - 更新时间
*/
public void setUpdatedTime(String updatedTime) {
this.updatedTime = updatedTime;
}
/**
* get the value from Map.
*
* @param map - source data map
*/
@Override
public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setInventType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_INVENT_TYPE)), inventType));
setInventCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_CODE)), inventCode));
setInventName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_NAME)), inventName));
setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy));
setCreatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_NAME)), createdName));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_TIME)), createdTime));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_BY)), updatedBy));
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
}
/**
* set the value to Map.
*/
@Override
public Map toMap() {
Map map = new HashMap();
map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID)));
map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_INVENT_TYPE, StringUtils.toString(inventType, eiMetadata.getMeta(FIELD_INVENT_TYPE)));
map.put(FIELD_INVENT_CODE, StringUtils.toString(inventCode, eiMetadata.getMeta(FIELD_INVENT_CODE)));
map.put(FIELD_INVENT_NAME, StringUtils.toString(inventName, eiMetadata.getMeta(FIELD_INVENT_NAME)));
map.put(FIELD_STATUS, StringUtils.toString(status, eiMetadata.getMeta(FIELD_STATUS)));
map.put(FIELD_CREATED_BY, StringUtils.toString(createdBy, eiMetadata.getMeta(FIELD_CREATED_BY)));
map.put(FIELD_CREATED_NAME, StringUtils.toString(createdName, eiMetadata.getMeta(FIELD_CREATED_NAME)));
map.put(FIELD_CREATED_TIME, StringUtils.toString(createdTime, eiMetadata.getMeta(FIELD_CREATED_TIME)));
map.put(FIELD_UPDATED_BY, StringUtils.toString(updatedBy, eiMetadata.getMeta(FIELD_UPDATED_BY)));
map.put(FIELD_UPDATED_NAME, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_UPDATED_NAME)));
map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME)));
return map;
}
}
package com.baosight.hpjx.hp.pz.domain;
import com.baosight.iplat4j.core.util.NumberUtils;
import java.math.BigDecimal;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.core.util.StringUtils;
/**
* Project: <br>
* Title:THppz006.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-01-22 15:16:13 create
*/
public class HPPZ006 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id";
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码 预留*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_INVENT_TYPE = "inventType"; /* 存货类型*/
public static final String FIELD_INVENT_CODE = "inventCode"; /* 存货编码*/
public static final String FIELD_INVENT_NAME = "inventName"; /* 存货名称*/
public static final String FIELD_STATUS = "status"; /* 状态 0未启用 1启用*/
public static final String FIELD_SPEC = "spec"; /* 规格*/
public static final String FIELD_LENGTH = "length"; /* 长*/
public static final String FIELD_WIDE = "wide"; /* 宽*/
public static final String FIELD_THICK = "thick"; /* 厚*/
public static final String FIELD_MATERIAL = "material"; /* 材质*/
public static final String FIELD_COEFFICIENT = "coefficient"; /* 系数*/
public static final String FIELD_UNIT = "unit"; /* 单位*/
public static final String FIELD_CREATED_BY = "createdBy"; /* 创建人*/
public static final String FIELD_CREATED_NAME = "createdName"; /* 创建人名称*/
public static final String FIELD_CREATED_TIME = "createdTime"; /* 创建时间*/
public static final String FIELD_UPDATED_BY = "updatedBy"; /* 更新人*/
public static final String FIELD_UPDATED_NAME = "updatedName"; /* 更新人名称*/
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 更新时间*/
public static final String COL_ID = "ID";
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String COL_INVENT_TYPE = "INVENT_TYPE"; /* 存货类型*/
public static final String COL_INVENT_CODE = "INVENT_CODE"; /* 存货编码*/
public static final String COL_INVENT_NAME = "INVENT_NAME"; /* 存货名称*/
public static final String COL_STATUS = "STATUS"; /* 状态 0未启用 1启用*/
public static final String COL_SPEC = "SPEC"; /* 规格*/
public static final String COL_LENGTH = "LENGTH"; /* 长*/
public static final String COL_WIDE = "WIDE"; /* 宽*/
public static final String COL_THICK = "THICK"; /* 厚*/
public static final String COL_MATERIAL = "MATERIAL"; /* 材质*/
public static final String COL_COEFFICIENT = "COEFFICIENT"; /* 系数*/
public static final String COL_UNIT = "UNIT"; /* 单位*/
public static final String COL_CREATED_BY = "CREATED_BY"; /* 创建人*/
public static final String COL_CREATED_NAME = "CREATED_NAME"; /* 创建人名称*/
public static final String COL_CREATED_TIME = "CREATED_TIME"; /* 创建时间*/
public static final String COL_UPDATED_BY = "UPDATED_BY"; /* 更新人*/
public static final String COL_UPDATED_NAME = "UPDATED_NAME"; /* 更新人名称*/
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 更新时间*/
public static final String QUERY = "HPPZ006.query";
public static final String COUNT = "HPPZ006.count";
public static final String INSERT = "HPPZ006.insert";
public static final String UPDATE = "HPPZ006.update";
public static final String DELETE = "HPPZ006.delete";
private Long id = null;
private String companyCode = " "; /* 企业编码 预留*/
private String depCode = " "; /* 部门编码*/
private Integer inventType = null; /* 存货类型*/
private String inventCode = " "; /* 存货编码*/
private String inventName = " "; /* 存货名称*/
private Integer status = 1; /* 状态 0未启用 1启用*/
private String spec = " "; /* 规格*/
private BigDecimal length = new BigDecimal(0.00); /* 长*/
private BigDecimal wide = new BigDecimal(0.00); /* 宽*/
private BigDecimal thick = new BigDecimal(0.00); /* 厚*/
private String material = " "; /* 材质*/
private BigDecimal coefficient = new BigDecimal(0.00); /* 系数*/
private String unit = " "; /* 单位*/
private String createdBy = " "; /* 创建人*/
private String createdName = " "; /* 创建人名称*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/
private String updatedName = " "; /* 更新人名称*/
private String updatedTime = " "; /* 更新时间*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" ");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("企业编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_TYPE);
eiColumn.setDescName("存货类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_CODE);
eiColumn.setDescName("存货编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_NAME);
eiColumn.setDescName("存货名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_STATUS);
eiColumn.setDescName("状态 0未启用 1启用");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SPEC);
eiColumn.setDescName("规格");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_LENGTH);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("长");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_WIDE);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("宽");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_THICK);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("厚");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_MATERIAL);
eiColumn.setDescName("材质");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COEFFICIENT);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("系数");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UNIT);
eiColumn.setDescName("单位");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_BY);
eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_NAME);
eiColumn.setDescName("创建人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_TIME);
eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_BY);
eiColumn.setDescName("更新人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_NAME);
eiColumn.setDescName("更新人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_TIME);
eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HPPZ006() {
initMetaData();
}
/**
* get the id .
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id .
*
* @param id
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the companyCode - 企业编码 预留.
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 企业编码 预留.
*
* @param companyCode - 企业编码 预留
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the depCode - 部门编码.
* @return the depCode
*/
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码.
*
* @param depCode - 部门编码
*/
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the inventType - 存货类型.
* @return the inventType
*/
public Integer getInventType() {
return this.inventType;
}
/**
* set the inventType - 存货类型.
*
* @param inventType - 存货类型
*/
public void setInventType(Integer inventType) {
this.inventType = inventType;
}
/**
* get the inventCode - 存货编码.
* @return the inventCode
*/
public String getInventCode() {
return this.inventCode;
}
/**
* set the inventCode - 存货编码.
*
* @param inventCode - 存货编码
*/
public void setInventCode(String inventCode) {
this.inventCode = inventCode;
}
/**
* get the inventName - 存货名称.
* @return the inventName
*/
public String getInventName() {
return this.inventName;
}
/**
* set the inventName - 存货名称.
*
* @param inventName - 存货名称
*/
public void setInventName(String inventName) {
this.inventName = inventName;
}
/**
* get the status - 状态 0未启用 1启用.
* @return the status
*/
public Integer getStatus() {
return this.status;
}
/**
* set the status - 状态 0未启用 1启用.
*
* @param status - 状态 0未启用 1启用
*/
public void setStatus(Integer status) {
this.status = status;
}
/**
* get the spec - 规格.
* @return the spec
*/
public String getSpec() {
return this.spec;
}
/**
* set the spec - 规格.
*
* @param spec - 规格
*/
public void setSpec(String spec) {
this.spec = spec;
}
/**
* get the length - 长.
* @return the length
*/
public BigDecimal getLength() {
return this.length;
}
/**
* set the length - 长.
*
* @param length - 长
*/
public void setLength(BigDecimal length) {
this.length = length;
}
/**
* get the wide - 宽.
* @return the wide
*/
public BigDecimal getWide() {
return this.wide;
}
/**
* set the wide - 宽.
*
* @param wide - 宽
*/
public void setWide(BigDecimal wide) {
this.wide = wide;
}
/**
* get the thick - 厚.
* @return the thick
*/
public BigDecimal getThick() {
return this.thick;
}
/**
* set the thick - 厚.
*
* @param thick - 厚
*/
public void setThick(BigDecimal thick) {
this.thick = thick;
}
/**
* get the material - 材质.
* @return the material
*/
public String getMaterial() {
return this.material;
}
/**
* set the material - 材质.
*
* @param material - 材质
*/
public void setMaterial(String material) {
this.material = material;
}
/**
* get the coefficient - 系数.
* @return the coefficient
*/
public BigDecimal getCoefficient() {
return this.coefficient;
}
/**
* set the coefficient - 系数.
*
* @param coefficient - 系数
*/
public void setCoefficient(BigDecimal coefficient) {
this.coefficient = coefficient;
}
/**
* get the unit - 单位.
* @return the unit
*/
public String getUnit() {
return this.unit;
}
/**
* set the unit - 单位.
*
* @param unit - 单位
*/
public void setUnit(String unit) {
this.unit = unit;
}
/**
* get the createdBy - 创建人.
* @return the createdBy
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 创建人.
*
* @param createdBy - 创建人
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
* get the createdName - 创建人名称.
* @return the createdName
*/
public String getCreatedName() {
return this.createdName;
}
/**
* set the createdName - 创建人名称.
*
* @param createdName - 创建人名称
*/
public void setCreatedName(String createdName) {
this.createdName = createdName;
}
/**
* get the createdTime - 创建时间.
* @return the createdTime
*/
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 创建时间.
*
* @param createdTime - 创建时间
*/
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
/**
* get the updatedBy - 更新人.
* @return the updatedBy
*/
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 更新人.
*
* @param updatedBy - 更新人
*/
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
/**
* get the updatedName - 更新人名称.
* @return the updatedName
*/
public String getUpdatedName() {
return this.updatedName;
}
/**
* set the updatedName - 更新人名称.
*
* @param updatedName - 更新人名称
*/
public void setUpdatedName(String updatedName) {
this.updatedName = updatedName;
}
/**
* get the updatedTime - 更新时间.
* @return the updatedTime
*/
public String getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 更新时间.
*
* @param updatedTime - 更新时间
*/
public void setUpdatedTime(String updatedTime) {
this.updatedTime = updatedTime;
}
/**
* get the value from Map.
*
* @param map - source data map
*/
@Override
public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setInventType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_INVENT_TYPE)), inventType));
setInventCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_CODE)), inventCode));
setInventName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_NAME)), inventName));
setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status));
setSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SPEC)), spec));
setLength(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_LENGTH)), length));
setWide(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_WIDE)), wide));
setThick(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_THICK)), thick));
setMaterial(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_MATERIAL)), material));
setCoefficient(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_COEFFICIENT)), coefficient));
setUnit(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UNIT)), unit));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy));
setCreatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_NAME)), createdName));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_TIME)), createdTime));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_BY)), updatedBy));
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
}
/**
* set the value to Map.
*/
@Override
public Map toMap() {
Map map = new HashMap();
map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID)));
map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_INVENT_TYPE, StringUtils.toString(inventType, eiMetadata.getMeta(FIELD_INVENT_TYPE)));
map.put(FIELD_INVENT_CODE, StringUtils.toString(inventCode, eiMetadata.getMeta(FIELD_INVENT_CODE)));
map.put(FIELD_INVENT_NAME, StringUtils.toString(inventName, eiMetadata.getMeta(FIELD_INVENT_NAME)));
map.put(FIELD_STATUS, StringUtils.toString(status, eiMetadata.getMeta(FIELD_STATUS)));
map.put(FIELD_SPEC, StringUtils.toString(spec, eiMetadata.getMeta(FIELD_SPEC)));
map.put(FIELD_LENGTH, StringUtils.toString(length, eiMetadata.getMeta(FIELD_LENGTH)));
map.put(FIELD_WIDE, StringUtils.toString(wide, eiMetadata.getMeta(FIELD_WIDE)));
map.put(FIELD_THICK, StringUtils.toString(thick, eiMetadata.getMeta(FIELD_THICK)));
map.put(FIELD_MATERIAL, StringUtils.toString(material, eiMetadata.getMeta(FIELD_MATERIAL)));
map.put(FIELD_COEFFICIENT, StringUtils.toString(coefficient, eiMetadata.getMeta(FIELD_COEFFICIENT)));
map.put(FIELD_UNIT, StringUtils.toString(unit, eiMetadata.getMeta(FIELD_UNIT)));
map.put(FIELD_CREATED_BY, StringUtils.toString(createdBy, eiMetadata.getMeta(FIELD_CREATED_BY)));
map.put(FIELD_CREATED_NAME, StringUtils.toString(createdName, eiMetadata.getMeta(FIELD_CREATED_NAME)));
map.put(FIELD_CREATED_TIME, StringUtils.toString(createdTime, eiMetadata.getMeta(FIELD_CREATED_TIME)));
map.put(FIELD_UPDATED_BY, StringUtils.toString(updatedBy, eiMetadata.getMeta(FIELD_UPDATED_BY)));
map.put(FIELD_UPDATED_NAME, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_UPDATED_NAME)));
map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME)));
return map;
}
}
/**
* Generate time : 2024-01-10 14:11:21
* Version : 1.0
*/
package com.baosight.hpjx.hp.pz.domain;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.core.util.StringUtils;
/**
* THppz004
*
*/
public class THppz004 extends DaoEPBase {
private Long id = 0L;
private String companyCode = " "; /* 企业编码 预留*/
private String inventName = " "; /* 存货名称*/
private String inventCode = " "; /* 存货编码*/
private int inventType; /* 存货类型*/
private int status; /* 状态 0未启用 1启用*/
private String createdBy = " "; /* 创建人*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/
private String updatedTime = " "; /* 更新时间*/
private String depCode = " "; /* 部门编码*/
/**
* initialize the metadata
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn("id");
eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" ");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("companyCode");
eiColumn.setDescName("企业编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("inventName");
eiColumn.setDescName("存货名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("inventCode");
eiColumn.setDescName("存货编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("inventType");
eiColumn.setDescName("存货类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("status");
eiColumn.setDescName("状态 0未启用 1启用");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("createdBy");
eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("createdTime");
eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("updatedBy");
eiColumn.setDescName("更新人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("updatedTime");
eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("depCode");
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor
*/
public THppz004() {
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 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 inventType - 存货类型
* @return the inventType
*/
public int getInventType() {
return this.inventType;
}
/**
* set the inventType - 存货类型
*/
public void setInventType(int inventType) {
this.inventType = inventType;
}
/**
* get the status - 状态 0未启用 1启用
* @return the status
*/
public int getStatus() {
return this.status;
}
/**
* set the status - 状态 0未启用 1启用
*/
public void setStatus(int status) {
this.status = status;
}
/**
* get the createdBy - 创建人
* @return the createdBy
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 创建人
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
* get the createdTime - 创建时间
* @return the createdTime
*/
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 创建时间
*/
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
/**
* get the updatedBy - 更新人
* @return the updatedBy
*/
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 更新人
*/
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
/**
* get the updatedTime - 更新时间
* @return the updatedTime
*/
public String getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 更新时间
*/
public void setUpdatedTime(String updatedTime) {
this.updatedTime = updatedTime;
}
/**
* get the depCode - 部门编码
* @return the depCode
*/
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码
*/
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the value from Map
*/
public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get("id")), id));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("companyCode")), companyCode));
setInventName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("inventName")), inventName));
setInventCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("inventCode")), inventCode));
setInventType(NumberUtils.toint(StringUtils.toString(map.get("inventType")), inventType));
setStatus(NumberUtils.toint(StringUtils.toString(map.get("status")), status));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("createdBy")), createdBy));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("createdTime")), createdTime));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("updatedBy")), updatedBy));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("updatedTime")), updatedTime));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("depCode")), depCode));
}
/**
* set the value to Map
*/
public Map toMap() {
Map map = new HashMap();
map.put("id",StringUtils.toString(id, eiMetadata.getMeta("id")));
map.put("companyCode",StringUtils.toString(companyCode, eiMetadata.getMeta("companyCode")));
map.put("inventName",StringUtils.toString(inventName, eiMetadata.getMeta("inventName")));
map.put("inventCode",StringUtils.toString(inventCode, eiMetadata.getMeta("inventCode")));
map.put("inventType",StringUtils.toString(inventType, eiMetadata.getMeta("inventType")));
map.put("status",StringUtils.toString(status, eiMetadata.getMeta("status")));
map.put("createdBy",StringUtils.toString(createdBy, eiMetadata.getMeta("createdBy")));
map.put("createdTime",StringUtils.toString(createdTime, eiMetadata.getMeta("createdTime")));
map.put("updatedBy",StringUtils.toString(updatedBy, eiMetadata.getMeta("updatedBy")));
map.put("updatedTime",StringUtils.toString(updatedTime, eiMetadata.getMeta("updatedTime")));
map.put("depCode",StringUtils.toString(depCode, eiMetadata.getMeta("depCode")));
return map;
}
}
\ No newline at end of file
/**
* Generate time : 2024-01-10 18:46:04
* Version : 1.0
*/
package com.baosight.hpjx.hp.pz.domain;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.core.util.StringUtils;
/**
* THppz006
*
*/
public class THppz006 extends DaoEPBase {
private Long id = 0L;
private String companyCode = " "; /* 企业编码 预留*/
private String inventName; /* 存货名称*/
private String inventCode; /* 存货编码*/
private int inventType; /* 存货类型*/
private int status; /* 状态 0未启用 1启用*/
private String spec = " "; /* 规格*/
private String length = " "; /* 长*/
private String wide = " "; /* 宽*/
private String thick = " "; /* 厚*/
private String material = " "; /* 材质*/
private String coefficient = " "; /* 系数*/
private String unit = " "; /* 单位*/
private String createdBy = " "; /* 创建人*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/
private String updatedTime = " "; /* 更新时间*/
private String depCode = " "; /* 部门编码*/
/**
* initialize the metadata
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn("id");
eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" ");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("companyCode");
eiColumn.setDescName("企业编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("inventName");
eiColumn.setDescName("存货名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("inventCode");
eiColumn.setDescName("存货编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("inventType");
eiColumn.setDescName("存货类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("status");
eiColumn.setDescName("状态 0未启用 1启用");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("spec");
eiColumn.setDescName("规格");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("length");
eiColumn.setDescName("长");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("wide");
eiColumn.setDescName("宽");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("thick");
eiColumn.setDescName("厚");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("material");
eiColumn.setDescName("材质");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("coefficient");
eiColumn.setDescName("系数");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("unit");
eiColumn.setDescName("单位");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("createdBy");
eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("createdTime");
eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("updatedBy");
eiColumn.setDescName("更新人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("updatedTime");
eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("depCode");
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor
*/
public THppz006() {
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 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 inventType - 存货类型
* @return the inventType
*/
public int getInventType() {
return this.inventType;
}
/**
* set the inventType - 存货类型
*/
public void setInventType(int inventType) {
this.inventType = inventType;
}
/**
* 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 spec - 规格
* @return the spec
*/
public String getSpec() {
return this.spec;
}
/**
* set the spec - 规格
*/
public void setSpec(String spec) {
this.spec = spec;
}
/**
* get the length - 长
* @return the length
*/
public String getLength() {
return this.length;
}
/**
* set the length - 长
*/
public void setLength(String length) {
this.length = length;
}
/**
* get the wide - 宽
* @return the wide
*/
public String getWide() {
return this.wide;
}
/**
* set the wide - 宽
*/
public void setWide(String wide) {
this.wide = wide;
}
/**
* get the thick - 厚
* @return the thick
*/
public String getThick() {
return this.thick;
}
/**
* set the thick - 厚
*/
public void setThick(String thick) {
this.thick = thick;
}
/**
* get the material - 材质
* @return the material
*/
public String getMaterial() {
return this.material;
}
/**
* set the material - 材质
*/
public void setMaterial(String material) {
this.material = material;
}
/**
* get the coefficient - 系数
* @return the coefficient
*/
public String getCoefficient() {
return this.coefficient;
}
/**
* set the coefficient - 系数
*/
public void setCoefficient(String coefficient) {
this.coefficient = coefficient;
}
/**
* get the unit - 单位
* @return the unit
*/
public String getUnit() {
return this.unit;
}
/**
* set the unit - 单位
*/
public void setUnit(String unit) {
this.unit = unit;
}
/**
* get the createdBy - 创建人
* @return the createdBy
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 创建人
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
* get the createdTime - 创建时间
* @return the createdTime
*/
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 创建时间
*/
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
/**
* get the updatedBy - 更新人
* @return the updatedBy
*/
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 更新人
*/
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
/**
* get the updatedTime - 更新时间
* @return the updatedTime
*/
public String getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 更新时间
*/
public void setUpdatedTime(String updatedTime) {
this.updatedTime = updatedTime;
}
/**
* get the depCode - 部门编码
* @return the depCode
*/
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码
*/
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the value from Map
*/
public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get("id")), id));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("companyCode")), companyCode));
setInventName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("inventName")), inventName));
setInventCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("inventCode")), inventCode));
setInventType(NumberUtils.toint(StringUtils.toString(map.get("inventType")), inventType));
setStatus(NumberUtils.toint(StringUtils.toString(map.get("status")), status));
setSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("spec")), spec));
setLength(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("length")), length));
setWide(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("wide")), wide));
setThick(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("thick")), thick));
setMaterial(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("material")), material));
setCoefficient(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("coefficient")), coefficient));
setUnit(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("unit")), unit));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("createdBy")), createdBy));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("createdTime")), createdTime));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("updatedBy")), updatedBy));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("updatedTime")), updatedTime));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("depCode")), depCode));
}
/**
* set the value to Map
*/
public Map toMap() {
Map map = new HashMap();
map.put("id",StringUtils.toString(id, eiMetadata.getMeta("id")));
map.put("companyCode",StringUtils.toString(companyCode, eiMetadata.getMeta("companyCode")));
map.put("inventName",StringUtils.toString(inventName, eiMetadata.getMeta("inventName")));
map.put("inventCode",StringUtils.toString(inventCode, eiMetadata.getMeta("inventCode")));
map.put("inventType",StringUtils.toString(inventType, eiMetadata.getMeta("inventType")));
map.put("status",StringUtils.toString(status, eiMetadata.getMeta("status")));
map.put("spec",StringUtils.toString(spec, eiMetadata.getMeta("spec")));
map.put("length",StringUtils.toString(length, eiMetadata.getMeta("length")));
map.put("wide",StringUtils.toString(wide, eiMetadata.getMeta("wide")));
map.put("thick",StringUtils.toString(thick, eiMetadata.getMeta("thick")));
map.put("material",StringUtils.toString(material, eiMetadata.getMeta("material")));
map.put("coefficient",StringUtils.toString(coefficient, eiMetadata.getMeta("coefficient")));
map.put("unit",StringUtils.toString(unit, eiMetadata.getMeta("unit")));
map.put("createdBy",StringUtils.toString(createdBy, eiMetadata.getMeta("createdBy")));
map.put("createdTime",StringUtils.toString(createdTime, eiMetadata.getMeta("createdTime")));
map.put("updatedBy",StringUtils.toString(updatedBy, eiMetadata.getMeta("updatedBy")));
map.put("updatedTime",StringUtils.toString(updatedTime, eiMetadata.getMeta("updatedTime")));
map.put("depCode",StringUtils.toString(depCode, eiMetadata.getMeta("depCode")));
return map;
}
}
\ No newline at end of file
package com.baosight.hpjx.hp.pz.service;
import com.baosight.hpjx.common.CompanyTypeEnum;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.InitiateModeEnum;
import com.baosight.hpjx.common.InventTypeEnun;
import com.baosight.hpjx.hp.pz.domain.THppz004;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.pz.domain.HPPZ003;
import com.baosight.hpjx.hp.pz.domain.HPPZ004;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.iplat4j.core.data.DaoEPBase;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.hpjx.util.LogUtils;
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.ed.util.SequenceGenerator;
import java.util.ArrayList;
import java.util.HashMap;
......@@ -19,124 +20,125 @@ import java.util.List;
import java.util.Map;
/**
* @author xuao
* @date 2024年01月09日 19:35
* @author:songx
* @date:2024/1/22,15:18
*/
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);
outInfo.setBlock(InventTypeEnun.generatorEiBlock());
outInfo.setBlock(InitiateModeEnum.generatorEiBlock());
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);
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.insert("HPPZ004.insert", hppz004.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 {
CommonMethod.creatorInfo(inInfo,EiConstant.resultBlock);
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;
}
public EiInfo queryComboBox(EiInfo eiInfo) {
Map map = new HashMap();
map.put("inventType", eiInfo.getString("inventType"));
List<DdynamicEnum> list = new ArrayList<>();
list.add(DdynamicEnum.INVENT_NAME_BLOCK_ID);
CommonMethod.initBlock(eiInfo, list, map);
return eiInfo;
}
/**
* 画面初始化
*
* @param inInfo
* @return
*/
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo.setBlock(InitiateModeEnum.generatorEiBlock());
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPPZ004().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, "HPPZ004.query", new HPPZ003());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 新增操作
*
* @param inInfo
* @return
*/
@Override
public EiInfo insert(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 数据写入
for (int i = 0; i < resultRows.size(); i++) {
HPPZ004 fPz004 = new HPPZ004();
fPz004.fromMap(resultRows.get(i));
// 生成客户编码
fPz004.setInventCode(SequenceGenerator.getNextSequence(HPConstant.SequenceId.INVENT_CODE));
DaoUtils.insert(HPPZ004.INSERT, fPz004);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据新增成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "新增失败");
}
return inInfo;
}
/**
* 修改操作
*
* @param inInfo
* @return
*/
public EiInfo update(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
HPPZ004 fPz004 = new HPPZ004();
fPz004.fromMap(resultRows.get(i));
DaoUtils.update(HPPZ004.UPDATE, fPz004);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据修改成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "修改失败");
}
return inInfo;
}
/**
* 删除操作
*
* @param inInfo
* @return
*/
public EiInfo delete(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
DaoUtils.update(HPPZ004.DELETE, resultRows.get(i));
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
/**
* @param eiInfo
* @return
*/
public EiInfo queryComboBox(EiInfo eiInfo) {
Map map = new HashMap();
map.put("inventType", eiInfo.getString("inventType"));
List<DdynamicEnum> list = new ArrayList<>();
list.add(DdynamicEnum.INVENT_NAME_BLOCK_ID);
CommonMethod.initBlock(eiInfo, list, map);
return eiInfo;
}
}
......@@ -2,12 +2,14 @@ package com.baosight.hpjx.hp.pz.service;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.InitiateModeEnum;
import com.baosight.hpjx.common.InventTypeEnun;
import com.baosight.hpjx.hp.pz.domain.THppz006;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.kc.domain.HPKC006;
import com.baosight.hpjx.hp.pz.domain.HPPZ006;
import com.baosight.hpjx.hp.pz.tools.HPPZTools;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
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;
......@@ -15,127 +17,133 @@ import com.baosight.iplat4j.core.service.impl.ServiceBase;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author xuao
* @date 2024年01月10日 15:51
* @author:songx
* @date:2024/1/22,15:17
*/
public class ServiceHPPZ006 extends ServiceBase {
/**
* 画面初始化.
*/
public EiInfo initLoad(EiInfo inInfo) {
THppz006 hppz006 = new THppz006();
EiInfo outInfo = new EiInfo();
outInfo.addBlock(EiConstant.resultBlock);
outInfo.getBlock(EiConstant.resultBlock).addBlockMeta(hppz006.eiMetadata);
outInfo.setBlock(InitiateModeEnum.generatorEiBlock());
outInfo.setBlock(InventTypeEnun.generatorEiBlock());
CommonMethod.initBlock(outInfo, Arrays.asList(
DdynamicEnum.INVENT_NAME_BLOCK_ID),
new HashMap<String,String>(1) {{
put("status", "1" );
}});
return outInfo;
}
/**
* 查询操作.
*/
@Override
public EiInfo query(EiInfo inInfo) {
/* 调用EI查询方法.*/
EiInfo outInfo = super.query(inInfo, "HPPZ006.query", new THppz006());
return outInfo;
}
/**
* 新增操作.
*/
@Override
public EiInfo insert(EiInfo inInfo) {
try {
CommonMethod.creatorInfo(inInfo,EiConstant.resultBlock);
for (int i = 0; i < inInfo.getBlock(EiConstant.resultBlock).getRowCount(); i++) {
String inventName =inInfo.getCellStr(EiConstant.resultBlock,i,"inventName");
String[] str = inventName.split("-");
inInfo.setCell(EiConstant.resultBlock,i,"inventCode", str[0]);
inInfo.setCell(EiConstant.resultBlock,i,"inventName", str[1]);
}
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 super.insert(inInfo,"HPPZ006.insert");
}
/**
* 修改操作.
*/
public EiInfo update(EiInfo inInfo) {
try {
CommonMethod.creatorInfo(inInfo,EiConstant.resultBlock);
THppz006 hppz006 = new THppz006();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hppz006.fromMap(map);
this.dao.update("HPPZ006.update", hppz006.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) {
THppz006 hppz006 = new THppz006();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
try {
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hppz006.fromMap(map);
this.dao.delete("HPPZ006.delete", hppz006.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;
}
/**
* 画面初始化
*
* @param inInfo
* @return
*/
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_NAME_BLOCK_ID), null);
inInfo.setBlock(InitiateModeEnum.generatorEiBlock());
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPPZ006().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作.
*/
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, "HPPZ006.query", new HPKC006());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 新增操作
*
* @param inInfo
* @return
*/
@Override
public EiInfo insert(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 数据写入
this.checkSaveData(resultRows);
// 数据写入
for (int i = 0; i < resultRows.size(); i++) {
HPPZ006 fPz006 = new HPPZ006();
fPz006.fromMap(resultRows.get(i));
// 存货名称
fPz006.setInventName(HPPZTools.getPz004ByCode(fPz006.getInventCode()).getInventName());
DaoUtils.insert(HPPZ006.INSERT, fPz006);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据新增成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "新增失败");
}
return inInfo;
}
/**
* 校验保存的数据
*
* @param resultRows
*/
private void checkSaveData(List<Map> resultRows) {
for (int i = 0; i < resultRows.size(); i++) {
HPPZ006 fPz006 = new HPPZ006();
fPz006.fromMap(resultRows.get(i));
AssertUtils.isNull(fPz006.getInventType(), "存货类型不能为空");
AssertUtils.isNull(fPz006.getInventCode(), "存货名称不能为空");
}
}
/**
* 修改操作
*
* @param inInfo
* @return
*/
public EiInfo update(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
HPPZ006 fPz006 = new HPPZ006();
fPz006.fromMap(resultRows.get(i));
// 存货名称
fPz006.setInventName(HPPZTools.getPz004ByCode(fPz006.getInventCode()).getInventName());
DaoUtils.update(HPPZ006.UPDATE, fPz006);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据修改成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "修改失败");
}
return inInfo;
}
/**
* 删除操作
*
* @param inInfo
* @return
*/
public EiInfo delete(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
DaoUtils.update(HPPZ006.DELETE, resultRows.get(i));
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
/**
* 规格下拉框
......@@ -149,7 +157,7 @@ public class ServiceHPPZ006 extends ServiceBase {
list.add(DdynamicEnum.INVENT_SPEC_BLOCK_ID);
CommonMethod.initBlock(inInfo, list, EiInfoUtils.getFirstRow(inInfo), false);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "规格下拉框");
LogUtils.setDetailMsg(inInfo, e, "查询规格失败");
}
return inInfo;
}
......
......@@ -97,7 +97,6 @@
UPDATE hpjx.t_hppz002
SET
CUST_TYPE = #custType#, <!-- 供应商类型 1 国企 : 2 民营 -->
CUST_CODE = #custCode#, <!-- 供应商编码 -->
CUST_NAME = #custName#, <!-- 供应商名称 -->
ADDRESS = #address#, <!-- 地址 -->
STATUS = #status#, <!-- 状态 0禁用 1启用 -->
......
......@@ -96,7 +96,6 @@
UPDATE hpjx.t_hppz003
SET
CUST_TYPE = #custType#, <!-- 客商类型 1:国企;2:民营; -->
CUST_CODE = #custCode#, <!-- 客户编码 -->
CUST_NAME = #custName#, <!-- 客户名称 -->
ADDRESS = #address#, <!-- 地址 -->
STATUS = #status#, <!-- 状态 0未启用 1启用 -->
......
<?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.hpjx.hp.pz.domain.THppz004">
SELECT
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
INVENT_NAME as "inventName", <!-- 存货名称 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_TYPE as "inventType", <!-- 存货类型 -->
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_hppz004 WHERE 1=1
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<sql id="column">
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
INVENT_TYPE as "inventType", <!-- 存货类型 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_NAME as "inventName", <!-- 存货名称 -->
STATUS as "status", <!-- 状态 0未启用 1启用 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime" <!-- 更新时间 -->
</sql>
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventType">
INVENT_TYPE = #inventType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME LIKE CONCAT('%', #inventName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
</sql>
<sql id="customCondition">
<isNotEmpty prepend=" AND " property="inventCodes">
INVENT_CODE IN <iterate close=")" open="(" conjunction="," property="inventCodes">#inventCodes[]#</iterate>
</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>
</sql>
</select>
<sql id="order">
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID DESC
</isEmpty>
</dynamic>
</sql>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hppz004 WHERE 1=1
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
</select>
<select id="query" resultClass="com.baosight.hpjx.hp.pz.domain.HPPZ004">
SELECT
<include refid="column"/>
FROM hpjx.t_hppz004 WHERE 1=1
<include refid="condition"/>
<include refid="customCondition"/>
<include refid="order"/>
</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>
-->
<select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hppz004 WHERE 1=1
<include refid="condition"/>
<include refid="customCondition"/>
</select>
<insert id="insert">
INSERT INTO hpjx.t_hppz004 (
COMPANY_CODE, <!-- 企业编码 预留 -->
INVENT_NAME, <!-- 存货名称 -->
INVENT_CODE, <!-- 存货编码 -->
INVENT_TYPE, <!-- 存货类型 -->
STATUS, <!-- 状态 0未启用 1启用 -->
CREATED_BY, <!-- 创建人 -->
CREATED_TIME, <!-- 创建时间 -->
DEP_CODE <!-- 部门编码 -->
)
VALUES ( #companyCode#, #inventName#, #inventCode#, #inventType#, #status#, #createdBy#, #createdTime#, #depCode#)
</insert>
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPPZ004 (
COMPANY_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 -->
INVENT_TYPE, <!-- 存货类型 -->
INVENT_CODE, <!-- 存货编码 -->
INVENT_NAME, <!-- 存货名称 -->
STATUS, <!-- 状态 0未启用 1启用 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME <!-- 创建时间 -->
) VALUES (
#companyCode#, #depCode#, #inventType#, #inventCode#, #inventName#,
#status#, #createdBy#, #createdName#, #createdTime#
)
</insert>
<delete id="delete">
DELETE FROM hpjx.t_hppz004 WHERE
ID = #id#
<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_TYPE = #inventType#, <!-- 存货类型 -->
STATUS = #status#, <!-- 状态 0未启用 1启用 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_TIME = #updatedTime# <!-- 更新时间 -->
WHERE
ID = #id#
INVENT_TYPE = #inventType#, <!-- 存货类型 -->
INVENT_NAME = #inventName#, <!-- 存货名称 -->
STATUS = #status#, <!-- 状态 0未启用 1启用 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime# <!-- 更新时间 -->
WHERE ID = #id#
</update>
<select id="queryComboBox" parameterClass="java.util.HashMap"
resultClass="java.util.HashMap">
<!-- -->
<select id="queryComboBox" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT DISTINCT
INVENT_CODE as "inventCode",
INVENT_NAME as "inventName"
FROM hpjx.t_hppz004 WHERE STATUS=1
FROM hpjx.t_hppz004
WHERE STATUS = 1
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
......@@ -146,31 +123,6 @@
<isNotEmpty prepend=" AND " property="inventType">
INVENT_TYPE = #inventType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
ORDER BY INVENT_CODE
</select>
<select id="queryMatNameByCode" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.pz.domain.THppz004">
SELECT DISTINCT
INVENT_CODE as "inventCode",
INVENT_NAME as "inventName"
FROM hpjx.t_hppz004 WHERE STATUS=1
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventType">
INVENT_TYPE = #inventType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
ORDER BY INVENT_CODE
</select>
......
......@@ -2,110 +2,130 @@
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap namespace="HPPZ006">
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.pz.domain.THppz006">
<sql id="column">
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
INVENT_TYPE as "inventType", <!-- 存货类型 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_NAME as "inventName", <!-- 存货名称 -->
STATUS as "status", <!-- 状态 0未启用 1启用 -->
SPEC as "spec", <!-- 规格 -->
LENGTH as "length", <!-- 长 -->
WIDE as "wide", <!-- 宽 -->
THICK as "thick", <!-- 厚 -->
MATERIAL as "material", <!-- 材质 -->
COEFFICIENT as "coefficient", <!-- 系数 -->
UNIT as "unit", <!-- 单位 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime" <!-- 更新时间 -->
</sql>
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventType">
INVENT_TYPE = #inventType#
</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="spec">
SPEC = #spec#
</isNotEmpty>
</sql>
<sql id="order">
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID DESC
</isEmpty>
</dynamic>
</sql>
<select id="query" resultClass="com.baosight.hpjx.hp.pz.domain.HPPZ006">
SELECT
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
INVENT_NAME as "inventName", <!-- 存货名称 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_TYPE as "inventType", <!-- 存货类型 -->
STATUS as "status", <!-- 状态 0未启用 1启用 -->
SPEC as "spec", <!-- 规格 -->
LENGTH as "length", <!-- 长 -->
WIDE as "wide", <!-- 宽 -->
THICK as "thick", <!-- 厚 -->
MATERIAL as "material", <!-- 材质 -->
COEFFICIENT as "coefficient", <!-- 系数 -->
UNIT as "unit", <!-- 单位 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DEP_CODE as "depCode" <!-- 部门编码 -->
<include refid="column"/>
FROM hpjx.t_hppz006 WHERE 1=1
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventType">
INVENT_TYPE = #inventType#
</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>
<include refid="condition"/>
<include refid="order"/>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hppz006 WHERE 1=1
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<include refid="condition"/>
</select>
<insert id="insert">
INSERT INTO hpjx.t_hppz006 (
COMPANY_CODE, <!-- 企业编码 预留 -->
INVENT_NAME, <!-- 存货名称 -->
INVENT_CODE, <!-- 存货编码 -->
INVENT_TYPE, <!-- 存货类型 -->
STATUS, <!-- 状态 0未启用 1启用 -->
SPEC, <!-- 规格 -->
LENGTH, <!-- 长 -->
WIDE, <!-- 宽 -->
THICK, <!-- 厚 -->
MATERIAL, <!-- 材质 -->
COEFFICIENT, <!-- 系数 -->
UNIT, <!-- 单位 -->
CREATED_BY, <!-- 创建人 -->
CREATED_TIME, <!-- 创建时间 -->
DEP_CODE <!-- 部门编码 -->
)
VALUES ( #companyCode#, #inventName#, #inventCode#, #inventType#, #status#, #spec#, #length#, #wide#, #thick#, #material#, #coefficient#, #unit#, #createdBy#, #createdTime#, #depCode#)
</insert>
INSERT INTO ${hpjxSchema}.T_HPPZ006 (
COMPANY_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 -->
INVENT_TYPE, <!-- 存货类型 -->
INVENT_CODE, <!-- 存货编码 -->
INVENT_NAME, <!-- 存货名称 -->
STATUS, <!-- 状态 0未启用 1启用 -->
SPEC, <!-- 规格 -->
LENGTH, <!-- 长 -->
WIDE, <!-- 宽 -->
THICK, <!-- 厚 -->
MATERIAL, <!-- 材质 -->
COEFFICIENT, <!-- 系数 -->
UNIT, <!-- 单位 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME <!-- 创建时间 -->
) VALUES (
#companyCode#, #depCode#, #inventType#, #inventCode#, #inventName#,
#status#, #spec#, #length#, #wide#, #thick#, #material#, #coefficient#,
#unit#, #createdBy#, #createdName#, #createdTime#
)
</insert>
<delete id="delete">
DELETE FROM hpjx.t_hppz006 WHERE
ID = #id#
DELETE FROM hpjx.t_hppz006 WHERE ID = #id#
</delete>
<update id="update">
UPDATE hpjx.t_hppz006
SET
INVENT_NAME = #inventName#, <!-- 存货名称 -->
INVENT_CODE = #inventCode#, <!-- 存货编码 -->
INVENT_TYPE = #inventType#, <!-- 存货类型 -->
STATUS = #status#, <!-- 状态 0未启用 1启用 -->
SPEC = #spec#, <!-- 规格 -->
LENGTH = #length#, <!-- 长 -->
WIDE = #wide#, <!-- 宽 -->
THICK = #thick#, <!-- 厚 -->
MATERIAL = #material#, <!-- 材质 -->
COEFFICIENT = #coefficient#, <!-- 系数 -->
UNIT = #unit#, <!-- 单位 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_TIME = #updatedTime# <!-- 更新时间 -->
WHERE
ID = #id#
STATUS = #status#, <!-- 状态 0未启用 1启用 -->
SPEC = #spec#, <!-- 规格 -->
LENGTH = #length#, <!-- 长 -->
WIDE = #wide#, <!-- 宽 -->
THICK = #thick#, <!-- 厚 -->
MATERIAL = #material#, <!-- 材质 -->
COEFFICIENT = #coefficient#, <!-- 系数 -->
UNIT = #unit#, <!-- 单位 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime# <!-- 更新时间 -->
WHERE ID = #id#
</update>
<select id="queryComboBox" parameterClass="java.util.HashMap"
resultClass="java.util.HashMap">
<select id="queryComboBox" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT DISTINCT
ID as "id",
CONCAT(INVENT_CODE,'-',INVENT_NAME,'[',SPEC,']') as "inventName"
ID as "id",
CONCAT(INVENT_CODE,'-',INVENT_NAME,'[',SPEC,']') as "inventName"
FROM hpjx.t_hppz006 WHERE STATUS=1
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
......
......@@ -4,8 +4,7 @@ import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoBase;
import com.baosight.hpjx.hp.pz.domain.HPPZ007;
import com.baosight.hpjx.hp.pz.domain.HPPZ009;
import com.baosight.hpjx.hp.pz.domain.THppz004;
import com.baosight.hpjx.hp.pz.domain.THppz006;
import com.baosight.hpjx.hp.pz.domain.HPPZ004;
import com.baosight.hpjx.util.AssertUtils;
import org.springframework.util.CollectionUtils;
......@@ -21,31 +20,33 @@ import java.util.stream.Collectors;
public class HPPZTools {
/**
* 查询存货名称
* 查询存货
*
* @param inventCode
* @return
*/
public static String getInventNameByCode(String inventCode) {
public static HPPZ004 getPz004ByCode(String inventCode) {
AssertUtils.isEmpty(inventCode, "存货编码不能为空");
Map queryMap = new HashMap();
queryMap.put("inventCode", inventCode);
List<THppz004> pz004s = DaoBase.getInstance().query("HPPZ004.queryMatNameByCode", queryMap);
return CollectionUtils.isEmpty(pz004s) ? null : pz004s.get(0).getInventName();
List<HPPZ004> pz004s = DaoBase.getInstance().query("HPPZ004.query", queryMap);
AssertUtils.isNull(pz004s, String.format("存货编码[%s]不存在", inventCode));
return pz004s.get(0);
}
/**
* 查询仓库名称
* 查询仓库
*
* @param whCode
* @return
*/
public static String getWhNameByCode(String whCode) {
public static HPPZ007 getPz007ByCode(String whCode) {
AssertUtils.isEmpty(whCode, "仓库编码不能为空");
Map queryMap = new HashMap();
queryMap.put("whCode", whCode);
List<HPPZ007> pz007s = DaoBase.getInstance().query("HPPZ007.queryByWhCode", queryMap);
return CollectionUtils.isEmpty(pz007s) ? null : pz007s.get(0).getWhName();
AssertUtils.isNull(pz007s, String.format("仓库编码[%s]不存在", whCode));
return pz007s.get(0);
}
/**
......@@ -54,7 +55,7 @@ public class HPPZTools {
* @param inventCodes
* @return
*/
public static List<THppz004> listPz004(List<String> inventCodes) {
public static List<HPPZ004> listPz004(List<String> inventCodes) {
if (CollectionUtils.isEmpty(inventCodes)) {
return null;
}
......@@ -69,12 +70,12 @@ public class HPPZTools {
* @param inventCodes
* @return
*/
public static Map<String, THppz004> mapPz004(List<String> inventCodes) {
List<THppz004> pz004s = listPz004(inventCodes);
public static Map<String, HPPZ004> mapPz004(List<String> inventCodes) {
List<HPPZ004> pz004s = listPz004(inventCodes);
if (CollectionUtils.isEmpty(pz004s)) {
return null;
}
return pz004s.stream().collect(Collectors.toMap(THppz004::getInventCode, item -> item));
return pz004s.stream().collect(Collectors.toMap(HPPZ004::getInventCode, item -> item));
}
/**
......
......@@ -3,9 +3,7 @@ import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC008;
import com.baosight.hpjx.hp.pz.domain.THppz004;
import com.baosight.hpjx.hp.sc.domain.THPSC001;
import com.baosight.hpjx.hp.sc.domain.THPSC002;
import com.baosight.hpjx.hp.zl.domain.HPZL001;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.EiInfoUtils;
......
......@@ -129,10 +129,9 @@ $(function() {
});
/**
* 查询
* 页面加载时执行
*/
let query = function () {
resultGrid.dataSource.page(1); // 点击查询按钮,从第1页开始查询
$(window).load(function () {
// 存货名称
let eiInfo = new EiInfo();
EiCommunicator.send("HPPZ004", "queryComboBox", eiInfo, {
......@@ -150,6 +149,15 @@ let query = function () {
onFail: function (ei) {
}
}, {async: false});
// 查询
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1); // 点击查询按钮,从第1页开始查询
}
/**
......
$(function() {
// 查询
$("#QUERY").on("click", function () {
resultGrid.dataSource.page(1); // 点击查询按钮,从第1页开始查询
});
// 查询
$("#QUERY").on("click", query);
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 30, 50, 100, 200],
},
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 30, 50, 100, 200]
}
}
}
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
......@@ -5,50 +5,41 @@
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="存货类型">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFSelect ename="inqu_status-0-inventType" cname="存货类型" colWidth="4"
template="#=valueField#-#=textField#" valueTemplate="#=valueField#-#=textField#" enable="true">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="customer_type_block_id" textField="valueField" valueField="textField"/>
</EF:EFSelect>
<EF:EFSelect ename="inqu_status-0-status" cname="状态" colWidth="4"
template="#=valueField#-#=textField#" valueTemplate="#=valueField#-#=textField#" enable="true">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="initiate_mode_block_id" textField="valueField" valueField="textField"/>
</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="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:EFComboColumn ename="inventType" cname="存货类型" align="center"
blockName="customer_type_block_id"
columnTemplate="#=textField#-#=valueField#" optionLabel=" "
itemTemplate="#=textField#-#=valueField#" textField="valueField"
valueField="textField" width="100" required="true">
</EF:EFComboColumn>
<EF:EFComboColumn ename="status" cname="状态" align="center"
blockName="initiate_mode_block_id"
columnTemplate="#=textField#-#=valueField#" optionLabel=" "
itemTemplate="#=textField#-#=valueField#" textField="valueField"
valueField="textField" width="100" required="true">
</EF:EFComboColumn>
<EF:EFColumn ename="createdTime" cname="创建时间" readonly="true" width="100" align="center" enable="false"
parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss" />
<EF:EFColumn ename="createdBy" cname="创建人" width="100" readonly="true" disabled="true"/>
<EF:EFColumn ename="updatedTime" cname="更新时间" readonly="true" width="100" align="center" enable="false"
parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss" />
<EF:EFColumn ename="updatedBy" cname="更新人" width="100" readonly="true" disabled="true"/>
</EF:EFGrid>
</EF:EFRegion>
<EF:EFPage title="存货类型">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFInput cname="存货名称" ename="inventName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFSelect cname="存货类型" ename="inventType" blockId="inqu_status" row="0" colWidth="3" filter="contains"
defaultValue="">
<EF:EFOption label="请选择" value=""/>
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
</EF:EFSelect>
<EF:EFSelect cname="状态" ename="inqu_status-0-status" colWidth="3"
template="#=valueField#-#=textField#" valueTemplate="#=valueField#-#=textField#">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpjx.status"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="false" isFloat="true" autoFit="true">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="inventCode" cname="存货编码" enable="false" width="100" align="center"/>
<EF:EFColumn ename="inventName" cname="存货名称" width="120" required="true"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" width="90" align="center">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="status" cname="状态" align="center" width="100" required="true">
<EF:EFCodeOption codeName="hpjx.hpjx.status"/>
</EF:EFComboColumn>
<EF:EFColumn ename="createdName" cname="创建人名称" enable="false" width="100" align="center"/>
<EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="140" align="center"
parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss"/>
<EF:EFColumn ename="updatedName" cname="更新人名称" enable="false" width="100" align="center"/>
<EF:EFColumn ename="updatedTime" cname="更新时间" enable="false" width="140" align="center"
parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
var inventNameGlobalData = [];
$(function() {
// 查询
$("#QUERY").on("click", function () {
resultGrid.dataSource.page(1); // 点击查询按钮,从第1页开始查询
});
// 查询
$("#QUERY").on("click", query);
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 30, 50, 100, 200],
},
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 30, 50, 100, 200]
},
columns: [{
field: "inventCode",
template: function (dataItem) {
for (let i = 0; i < inventNameGlobalData.length; i++) {
if (inventNameGlobalData[i]['valueField'] === dataItem['inventCode']) {
return inventNameGlobalData[i]['textField'];
}
}
return "";
},
editor: function (container, options) {
var grid = container.closest(".k-grid").data("kendoGrid");
var cellIndex = grid.cellIndex(container);
var input = $('<input />');
input.attr("name", options.field);
input.attr("id", options.field);
input.appendTo(container);
let eiInfo = new EiInfo();
eiInfo.set("inventType", options.model["inventType"]);
var dataSource;
EiCommunicator.send("HPPZ004", "queryComboBox", eiInfo, {
onSuccess: function (ei) {
dataSource = ei.getBlock("invent_name_block_id").getMappedRows();
},
onFail: function (ei) {
}
}, {async: false});
input.kendoDropDownList({
valuePrimitive: true,
dataTextField: "textField",
dataValueField: "valueField",
dataSource: dataSource,
template: "#=textField#"
});
}
}]
}
}
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 存货名称
let inInfo = new EiInfo();
EiCommunicator.send("HPPZ004", "queryComboBox", inInfo, {
onSuccess: function (ei) {
inventNameGlobalData = ei.getBlock("invent_name_block_id").getMappedRows();
},
onFail: function (ei) {
}
}, {async: false});
// 查询
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
......@@ -6,81 +6,55 @@
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="存货档案">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFSelect ename="inqu_status-0-inventName" cname="存货名称"
valueTemplate="#=textField#"
template="#=textField#"
textField="textField"
valueField="valueField"
required="true"
locked="true"
filter="contains">
<EF:EFOption label="--全部--" value=""/>
<EF:EFOptions blockId="invent_name_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect ename="inqu_status-0-inventType" cname="存货类型" colWidth="4"
template="#=valueField#-#=textField#" valueTemplate="#=valueField#-#=textField#" enable="true">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="customer_type_block_id" textField="valueField" valueField="textField"/>
</EF:EFSelect>
<EF:EFSelect ename="inqu_status-0-status" cname="状态" colWidth="4"
template="#=valueField#-#=textField#" valueTemplate="#=valueField#-#=textField#" enable="true">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="initiate_mode_block_id" textField="valueField" valueField="textField"/>
</EF:EFSelect>
</div>
<EF:EFButton ename="QUERY" cname="查询" row="1" class="btn-align-right"></EF:EFButton>
<div class="row">
<EF:EFSelect cname="存货类型" ename="inventType" blockId="inqu_status" row="0" colWidth="3" filter="contains"
defaultValue="">
<EF:EFOption label="请选择" value=""/>
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
</EF:EFSelect>
<EF:EFSelect ename="inqu_status-0-inventCode" cname="存货名称" colWidth="3" filter="contains">
<EF:EFOption label="--全部--" value=""/>
<EF:EFOptions blockId="invent_name_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="状态" ename="inqu_status-0-status" colWidth="3"
template="#=valueField#-#=textField#" valueTemplate="#=valueField#-#=textField#">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpjx.status"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="false" isFloat="true" autoFit="true">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFComboColumn ename="inventName" cname="存货名称"
columnTemplate="#=textField#"
itemTemplate="#=textField#"
blockName="invent_name_block_id"
textField="textField"
valueField="textField"
maxLength="20"
readonly="false"
style="color:blue;"
required="true"
filter="contains"
width="150">
</EF:EFComboColumn>
<EF:EFComboColumn ename="inventType" cname="存货类型" align="center"
blockName="customer_type_block_id"
columnTemplate="#=textField#-#=valueField#" optionLabel=" "
itemTemplate="#=textField#-#=valueField#" textField="valueField"
valueField="textField" width="100" required="true">
</EF:EFComboColumn>
<EF:EFColumn ename="spec" cname="规格" width="100" readonly="false" required="true"/>
<EF:EFColumn ename="length" cname="长" width="100" readonly="false" required="true"/>
<EF:EFColumn ename="wide" cname="宽" width="100" readonly="false" required="true"/>
<EF:EFColumn ename="thick" cname="厚" width="100" readonly="false" required="true"/>
<EF:EFColumn ename="material" cname="材质" width="100" readonly="false" required="true"/>
<EF:EFColumn ename="coefficient" cname="系数" width="100" readonly="false" required="true"/>
<EF:EFColumn ename="unit" cname="单位" width="100" readonly="false" required="true"/>
<EF:EFComboColumn ename="status" cname="状态" align="center"
blockName="initiate_mode_block_id"
columnTemplate="#=textField#-#=valueField#" optionLabel=" "
itemTemplate="#=textField#-#=valueField#" textField="valueField"
valueField="textField" width="100" required="true">
</EF:EFComboColumn>
<EF:EFColumn ename="createdTime" cname="创建时间" readonly="true" width="100" align="center" enable="false"
parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss" />
<EF:EFColumn ename="createdBy" cname="创建人" width="100" readonly="true" disabled="true"/>
<EF:EFColumn ename="updatedTime" cname="更新时间" readonly="true" width="100" align="center" enable="false"
parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss" />
<EF:EFColumn ename="updatedBy" cname="更新人" width="100" readonly="true" disabled="true"/>
</EF:EFGrid>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="false" isFloat="true" autoFit="true">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" width="120" align="center">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
</EF:EFComboColumn>
<EF:EFColumn ename="inventCode" cname="存货名称" width="120" align="center"/>
<EF:EFColumn ename="spec" cname="规格" width="120" align="center" maxLength="50"
required="true"/>
<EF:EFColumn ename="length" cname="长" width="100" align="right" format="{0:N2}" maxLength="10"
required="true"/>
<EF:EFColumn ename="wide" cname="宽" width="100" align="right" format="{0:N2}" maxLength="10"
required="true"/>
<EF:EFColumn ename="thick" cname="厚" width="100" align="right" format="{0:N2}" maxLength="10"
required="true"/>
<EF:EFColumn ename="material" cname="材质" width="100" align="center" required="true"/>
<EF:EFColumn ename="coefficient" cname="系数" width="100" align="right" format="{0:N2}" maxLength="10"
required="true"/>
<EF:EFColumn ename="unit" cname="单位" width="100" align="center" required="true"/>
<EF:EFComboColumn ename="status" cname="状态" align="center" width="100" required="true">
<EF:EFCodeOption codeName="hpjx.hpjx.status"/>
</EF:EFComboColumn>
<EF:EFColumn ename="createdName" cname="创建人名称" enable="false" width="100" align="center"/>
<EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="140" align="center"
parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss"/>
<EF:EFColumn ename="updatedName" cname="更新人名称" enable="false" width="100" align="center"/>
<EF:EFColumn ename="updatedTime" cname="更新时间" enable="false" width="140" align="center"
parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment