Commit 8be369a9 by 971729

feat():完成HPKC006

parent d5ae1751
/** /**
* Generate time : 2024-01-10 10:28:03 * Generate time : 2024-01-10 10:28:03
* Version : 1.0 * Version : 1.0
*/ */
package com.baosight.hpjx.hp.kc.domain; package com.baosight.hpjx.hp.kc.domain;
import com.baosight.iplat4j.core.util.NumberUtils; import com.baosight.iplat4j.core.util.NumberUtils;
import java.math.BigDecimal; import java.math.BigDecimal;
import com.baosight.iplat4j.core.util.DateUtils; import com.baosight.iplat4j.core.util.DateUtils;
import java.sql.Timestamp; import java.sql.Timestamp;
import com.baosight.iplat4j.core.ei.EiColumn; import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase; import com.baosight.iplat4j.core.data.DaoEPBase;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import com.baosight.iplat4j.core.util.StringUtils; import com.baosight.iplat4j.core.util.StringUtils;
/** /**
* THpkc006 * THpkc006
* *
*/ */
public class HPKC006 extends DaoEPBase { public class HPKC006 extends DaoEPBase {
private Integer id = 0; private Integer id = 0;
private String companyCode = " "; /* 企业编码 预留*/ private String companyCode = " "; /* 企业编码 预留*/
private String depCode = " "; /* 部门编码 预留*/ private String depCode = " "; /* 部门编码 预留*/
private Timestamp receiptTime ; /* 单据日期*/ private Timestamp receiptTime; /* 单据日期*/
private String otherEnthouse = " "; /* 其他入库单号*/ private String otherEnthouse = " "; /* 其他入库单号*/
private String whCode = " "; /* 仓库编码*/ private String whCode = " "; /* 仓库编码*/
private String whName = " "; /* 仓库名称*/ private String whName = " "; /* 仓库名称*/
private String matType = " "; /* 物料类型*/ private String matType = " "; /* 物料类型*/
private String matCode = " "; /* 物料编码*/ private String matCode = " "; /* 物料编码*/
private String matName = " "; /* 物料名称*/ private String matName = " "; /* 物料名称*/
private String spec = " "; /* 规格*/ private String spec = " "; /* 规格*/
private BigDecimal amount = new BigDecimal("0"); /* 数量*/ private BigDecimal amount = new BigDecimal("0"); /* 数量*/
private BigDecimal weight = new BigDecimal("0"); /* 重量*/ private BigDecimal weight = new BigDecimal("0"); /* 重量*/
private int status; /* 状态 0审核 1保存*/ private int status; /* 状态 0审核 1保存*/
private String remark = " "; /* 备注*/ private String remark = " "; /* 备注*/
/**
* initialize the metadata /**
*/ * initialize the metadata
public void initMetaData() { */
EiColumn eiColumn; public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn("id"); eiColumn = new EiColumn("id");
eiColumn.setPrimaryKey(true); eiColumn.setPrimaryKey(true);
...@@ -108,269 +116,286 @@ EiColumn eiColumn; ...@@ -108,269 +116,286 @@ EiColumn eiColumn;
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
} }
/**
* the constructor /**
*/ * the constructor
public HPKC006() { */
initMetaData(); public HPKC006() {
} initMetaData();
}
/**
* get the id /**
* @return the id * get the id
*/ * @return the id
public Integer getId() { */
public Integer getId() {
return this.id; return this.id;
} }
/** /**
* set the id * set the id
*/ */
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
/**
* get the companyCode - 企业编码 预留 /**
* @return the companyCode * get the companyCode - 企业编码 预留
*/ * @return the companyCode
public String getCompanyCode() { */
public String getCompanyCode() {
return this.companyCode; return this.companyCode;
} }
/** /**
* set the companyCode - 企业编码 预留 * set the companyCode - 企业编码 预留
*/ */
public void setCompanyCode(String companyCode) { public void setCompanyCode(String companyCode) {
this.companyCode = companyCode; this.companyCode = companyCode;
} }
/**
* get the depCode - 部门编码 预留 /**
* @return the depCode * get the depCode - 部门编码 预留
*/ * @return the depCode
public String getDepCode() { */
public String getDepCode() {
return this.depCode; return this.depCode;
} }
/** /**
* set the depCode - 部门编码 预留 * set the depCode - 部门编码 预留
*/ */
public void setDepCode(String depCode) { public void setDepCode(String depCode) {
this.depCode = depCode; this.depCode = depCode;
} }
/**
* get the receiptTime - 单据日期 /**
* @return the receiptTime * get the receiptTime - 单据日期
*/ * @return the receiptTime
public Timestamp getReceiptTime() { */
public Timestamp getReceiptTime() {
return this.receiptTime; return this.receiptTime;
} }
/** /**
* set the receiptTime - 单据日期 * set the receiptTime - 单据日期
*/ */
public void setReceiptTime(Timestamp receiptTime) { public void setReceiptTime(Timestamp receiptTime) {
this.receiptTime = receiptTime; this.receiptTime = receiptTime;
} }
/**
* get the otherEnthouse - 其他入库单号 /**
* @return the otherEnthouse * get the otherEnthouse - 其他入库单号
*/ * @return the otherEnthouse
public String getOtherEnthouse() { */
public String getOtherEnthouse() {
return this.otherEnthouse; return this.otherEnthouse;
} }
/** /**
* set the otherEnthouse - 其他入库单号 * set the otherEnthouse - 其他入库单号
*/ */
public void setOtherEnthouse(String otherEnthouse) { public void setOtherEnthouse(String otherEnthouse) {
this.otherEnthouse = otherEnthouse; this.otherEnthouse = otherEnthouse;
} }
/**
* get the whCode - 仓库编码 /**
* @return the whCode * get the whCode - 仓库编码
*/ * @return the whCode
public String getWhCode() { */
public String getWhCode() {
return this.whCode; return this.whCode;
} }
/** /**
* set the whCode - 仓库编码 * set the whCode - 仓库编码
*/ */
public void setWhCode(String whCode) { public void setWhCode(String whCode) {
this.whCode = whCode; this.whCode = whCode;
} }
/**
* get the whName - 仓库名称 /**
* @return the whName * get the whName - 仓库名称
*/ * @return the whName
public String getWhName() { */
public String getWhName() {
return this.whName; return this.whName;
} }
/** /**
* set the whName - 仓库名称 * set the whName - 仓库名称
*/ */
public void setWhName(String whName) { public void setWhName(String whName) {
this.whName = whName; this.whName = whName;
} }
/**
* get the matType - 物料类型 /**
* @return the matType * get the matType - 物料类型
*/ * @return the matType
public String getMatType() { */
public String getMatType() {
return this.matType; return this.matType;
} }
/** /**
* set the matType - 物料类型 * set the matType - 物料类型
*/ */
public void setMatType(String matType) { public void setMatType(String matType) {
this.matType = matType; this.matType = matType;
} }
/**
* get the matCode - 物料编码 /**
* @return the matCode * get the matCode - 物料编码
*/ * @return the matCode
public String getMatCode() { */
public String getMatCode() {
return this.matCode; return this.matCode;
} }
/** /**
* set the matCode - 物料编码 * set the matCode - 物料编码
*/ */
public void setMatCode(String matCode) { public void setMatCode(String matCode) {
this.matCode = matCode; this.matCode = matCode;
} }
/**
* get the matName - 物料名称 /**
* @return the matName * get the matName - 物料名称
*/ * @return the matName
public String getMatName() { */
public String getMatName() {
return this.matName; return this.matName;
} }
/** /**
* set the matName - 物料名称 * set the matName - 物料名称
*/ */
public void setMatName(String matName) { public void setMatName(String matName) {
this.matName = matName; this.matName = matName;
} }
/**
* get the spec - 规格 /**
* @return the spec * get the spec - 规格
*/ * @return the spec
public String getSpec() { */
public String getSpec() {
return this.spec; return this.spec;
} }
/** /**
* set the spec - 规格 * set the spec - 规格
*/ */
public void setSpec(String spec) { public void setSpec(String spec) {
this.spec = spec; this.spec = spec;
} }
/**
* get the amount - 数量 /**
* @return the amount * get the amount - 数量
*/ * @return the amount
public BigDecimal getAmount() { */
public BigDecimal getAmount() {
return this.amount; return this.amount;
} }
/** /**
* set the amount - 数量 * set the amount - 数量
*/ */
public void setAmount(BigDecimal amount) { public void setAmount(BigDecimal amount) {
this.amount = amount; this.amount = amount;
} }
/**
* get the weight - 重量 /**
* @return the weight * get the weight - 重量
*/ * @return the weight
public BigDecimal getWeight() { */
public BigDecimal getWeight() {
return this.weight; return this.weight;
} }
/** /**
* set the weight - 重量 * set the weight - 重量
*/ */
public void setWeight(BigDecimal weight) { public void setWeight(BigDecimal weight) {
this.weight = weight; this.weight = weight;
} }
/**
* get the status - 状态 0审核 1保存 /**
* @return the status * get the status - 状态 0审核 1保存
*/ * @return the status
public int getStatus() { */
public int getStatus() {
return this.status; return this.status;
} }
/** /**
* set the status - 状态 0审核 1保存 * set the status - 状态 0审核 1保存
*/ */
public void setStatus(int status) { public void setStatus(int status) {
this.status = status; this.status = status;
} }
/**
* get the remark - 备注 /**
* @return the remark * get the remark - 备注
*/ * @return the remark
public String getRemark() { */
public String getRemark() {
return this.remark; return this.remark;
} }
/** /**
* set the remark - 备注 * set the remark - 备注
*/ */
public void setRemark(String remark) { public void setRemark(String remark) {
this.remark = remark; this.remark = remark;
} }
/**
* get the value from Map /**
*/ * get the value from Map
public void fromMap(Map map) { */
public void fromMap(Map map) {
setId(NumberUtils.toInteger(StringUtils.toString(map.get("id")), id));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("companyCode")), companyCode)); setId(NumberUtils.toInteger(StringUtils.toString(map.get("id")), id));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("depCode")), depCode)); setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("companyCode")), companyCode));
setReceiptTime(DateUtils.toTimestamp(StringUtils.toString(map.get("receiptTime")))); setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("depCode")), depCode));
setOtherEnthouse(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("otherEnthouse")), otherEnthouse)); setReceiptTime(DateUtils.toTimestamp(StringUtils.toString(map.get("receiptTime"))));
setWhCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("whCode")), whCode)); setOtherEnthouse(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("otherEnthouse")), otherEnthouse));
setWhName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("whName")), whName)); setWhCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("whCode")), whCode));
setMatType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("matType")), matType)); setWhName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("whName")), whName));
setMatCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("matCode")), matCode)); setMatType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("matType")), matType));
setMatName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("matName")), matName)); setMatCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("matCode")), matCode));
setSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("spec")), spec)); setMatName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("matName")), matName));
setAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get("amount")), amount)); setSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("spec")), spec));
setWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get("weight")), weight)); setAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get("amount")), amount));
setStatus(NumberUtils.toint(StringUtils.toString(map.get("status")), status)); setWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get("weight")), weight));
setRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("remark")), remark)); setStatus(NumberUtils.toint(StringUtils.toString(map.get("status")), status));
} setRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("remark")), remark));
}
/**
* set the value to Map /**
*/ * set the value to Map
public Map toMap() { */
public Map toMap() {
Map map = new HashMap();
map.put("id",StringUtils.toString(id, eiMetadata.getMeta("id"))); Map map = new HashMap();
map.put("companyCode",StringUtils.toString(companyCode, eiMetadata.getMeta("companyCode"))); map.put("id", StringUtils.toString(id, eiMetadata.getMeta("id")));
map.put("depCode",StringUtils.toString(depCode, eiMetadata.getMeta("depCode"))); map.put("companyCode", StringUtils.toString(companyCode, eiMetadata.getMeta("companyCode")));
map.put("receiptTime",StringUtils.toString(receiptTime, eiMetadata.getMeta("receiptTime"))); map.put("depCode", StringUtils.toString(depCode, eiMetadata.getMeta("depCode")));
map.put("otherEnthouse",StringUtils.toString(otherEnthouse, eiMetadata.getMeta("otherEnthouse"))); map.put("receiptTime", StringUtils.toString(receiptTime, eiMetadata.getMeta("receiptTime")));
map.put("whCode",StringUtils.toString(whCode, eiMetadata.getMeta("whCode"))); map.put("otherEnthouse", StringUtils.toString(otherEnthouse, eiMetadata.getMeta("otherEnthouse")));
map.put("whName",StringUtils.toString(whName, eiMetadata.getMeta("whName"))); map.put("whCode", StringUtils.toString(whCode, eiMetadata.getMeta("whCode")));
map.put("matType",StringUtils.toString(matType, eiMetadata.getMeta("matType")));
map.put("matCode",StringUtils.toString(matCode, eiMetadata.getMeta("matCode"))); map.put("whName", StringUtils.toString(whName, eiMetadata.getMeta("whName")));
map.put("matName",StringUtils.toString(matName, eiMetadata.getMeta("matName"))); map.put("matType", StringUtils.toString(matType, eiMetadata.getMeta("matType")));
map.put("spec",StringUtils.toString(spec, eiMetadata.getMeta("spec"))); map.put("matCode", StringUtils.toString(matCode, eiMetadata.getMeta("matCode")));
map.put("amount",StringUtils.toString(amount, eiMetadata.getMeta("amount"))); map.put("matName", StringUtils.toString(matName, eiMetadata.getMeta("matName")));
map.put("weight",StringUtils.toString(weight, eiMetadata.getMeta("weight"))); map.put("spec", StringUtils.toString(spec, eiMetadata.getMeta("spec")));
map.put("status",StringUtils.toString(status, eiMetadata.getMeta("status"))); map.put("amount", StringUtils.toString(amount, eiMetadata.getMeta("amount")));
map.put("remark",StringUtils.toString(remark, eiMetadata.getMeta("remark"))); map.put("weight", StringUtils.toString(weight, eiMetadata.getMeta("weight")));
map.put("status", StringUtils.toString(status, eiMetadata.getMeta("status")));
return map; map.put("remark", StringUtils.toString(remark, eiMetadata.getMeta("remark")));
// System.out.println("map-->"+map);
} return map;
}
} }
\ No newline at end of file
...@@ -40,11 +40,13 @@ public class ServiceHPKC006 extends ServiceBase { ...@@ -40,11 +40,13 @@ public class ServiceHPKC006 extends ServiceBase {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try { try {
HPKC006 hpkc006 = new HPKC006(); HPKC006 hpkc006 = new HPKC006();
// System.out.println(inInfo.getBlock("result"));
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock); EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < eiBlock.getRowCount(); i++) { for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i); Map<?, ?> map = eiBlock.getRow(i);
// System.out.println(map);
hpkc006.fromMap(map); hpkc006.fromMap(map);
this.dao.insert("HPKC006.insert", hpkc006.toMap()); this.dao.insert("HPKC006.insert", hpkc006.toMap());
......
...@@ -72,54 +72,6 @@ ...@@ -72,54 +72,6 @@
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
</select> </select>
<!--
<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="receiptTime">
RECEIPT_TIME = #receiptTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="otherEnthouse">
OTHER_ENTHOUSE = #otherEnthouse#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode">
WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whName">
WH_NAME = #whName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="matType">
MAT_TYPE = #matType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="matCode">
MAT_CODE = #matCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="matName">
MAT_NAME = #matName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="spec">
SPEC = #spec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="amount">
AMOUNT = #amount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="weight">
WEIGHT = #weight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="remark">
REMARK = #remark#
</isNotEmpty>
-->
<insert id="insert"> <insert id="insert">
INSERT INTO hpjx.t_hpkc006 ( INSERT INTO hpjx.t_hpkc006 (
......
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