Commit 8be369a9 by 971729

feat():完成HPKC006

parent d5ae1751
/**
* Generate time : 2024-01-10 10:28:03
* Version : 1.0
*/
* Generate time : 2024-01-10 10:28:03
* Version : 1.0
*/
package com.baosight.hpjx.hp.kc.domain;
import com.baosight.iplat4j.core.util.NumberUtils;
import java.math.BigDecimal;
import com.baosight.iplat4j.core.util.DateUtils;
import java.sql.Timestamp;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.core.util.StringUtils;
/**
* THpkc006
*
*/
* THpkc006
*
*/
public class HPKC006 extends DaoEPBase {
private Integer id = 0;
private String companyCode = " "; /* 企业编码 预留*/
private String depCode = " "; /* 部门编码 预留*/
private Timestamp receiptTime ; /* 单据日期*/
private Timestamp receiptTime; /* 单据日期*/
private String otherEnthouse = " "; /* 其他入库单号*/
private String whCode = " "; /* 仓库编码*/
private String whName = " "; /* 仓库名称*/
......@@ -34,11 +41,12 @@ public class HPKC006 extends DaoEPBase {
private BigDecimal weight = new BigDecimal("0"); /* 重量*/
private int status; /* 状态 0审核 1保存*/
private String remark = " "; /* 备注*/
/**
* initialize the metadata
*/
public void initMetaData() {
EiColumn eiColumn;
/**
* initialize the metadata
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn("id");
eiColumn.setPrimaryKey(true);
......@@ -108,13 +116,14 @@ EiColumn eiColumn;
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor
*/
public HPKC006() {
initMetaData();
}
}
/**
* the constructor
*/
public HPKC006() {
initMetaData();
}
/**
* get the id
......@@ -130,6 +139,7 @@ initMetaData();
public void setId(Integer id) {
this.id = id;
}
/**
* get the companyCode - 企业编码 预留
* @return the companyCode
......@@ -144,6 +154,7 @@ initMetaData();
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the depCode - 部门编码 预留
* @return the depCode
......@@ -158,6 +169,7 @@ initMetaData();
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the receiptTime - 单据日期
* @return the receiptTime
......@@ -172,6 +184,7 @@ initMetaData();
public void setReceiptTime(Timestamp receiptTime) {
this.receiptTime = receiptTime;
}
/**
* get the otherEnthouse - 其他入库单号
* @return the otherEnthouse
......@@ -186,6 +199,7 @@ initMetaData();
public void setOtherEnthouse(String otherEnthouse) {
this.otherEnthouse = otherEnthouse;
}
/**
* get the whCode - 仓库编码
* @return the whCode
......@@ -200,6 +214,7 @@ initMetaData();
public void setWhCode(String whCode) {
this.whCode = whCode;
}
/**
* get the whName - 仓库名称
* @return the whName
......@@ -214,6 +229,7 @@ initMetaData();
public void setWhName(String whName) {
this.whName = whName;
}
/**
* get the matType - 物料类型
* @return the matType
......@@ -228,6 +244,7 @@ initMetaData();
public void setMatType(String matType) {
this.matType = matType;
}
/**
* get the matCode - 物料编码
* @return the matCode
......@@ -242,6 +259,7 @@ initMetaData();
public void setMatCode(String matCode) {
this.matCode = matCode;
}
/**
* get the matName - 物料名称
* @return the matName
......@@ -256,6 +274,7 @@ initMetaData();
public void setMatName(String matName) {
this.matName = matName;
}
/**
* get the spec - 规格
* @return the spec
......@@ -270,6 +289,7 @@ initMetaData();
public void setSpec(String spec) {
this.spec = spec;
}
/**
* get the amount - 数量
* @return the amount
......@@ -284,6 +304,7 @@ initMetaData();
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
/**
* get the weight - 重量
* @return the weight
......@@ -298,6 +319,7 @@ initMetaData();
public void setWeight(BigDecimal weight) {
this.weight = weight;
}
/**
* get the status - 状态 0审核 1保存
* @return the status
......@@ -312,6 +334,7 @@ initMetaData();
public void setStatus(int status) {
this.status = status;
}
/**
* get the remark - 备注
* @return the remark
......@@ -326,10 +349,11 @@ initMetaData();
public void setRemark(String remark) {
this.remark = remark;
}
/**
* get the value from Map
*/
public void fromMap(Map map) {
/**
* get the value from Map
*/
public void fromMap(Map map) {
setId(NumberUtils.toInteger(StringUtils.toString(map.get("id")), id));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("companyCode")), companyCode));
......@@ -346,31 +370,32 @@ public void fromMap(Map map) {
setWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get("weight")), weight));
setStatus(NumberUtils.toint(StringUtils.toString(map.get("status")), status));
setRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("remark")), remark));
}
}
/**
* 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("depCode",StringUtils.toString(depCode, eiMetadata.getMeta("depCode")));
map.put("receiptTime",StringUtils.toString(receiptTime, eiMetadata.getMeta("receiptTime")));
map.put("otherEnthouse",StringUtils.toString(otherEnthouse, eiMetadata.getMeta("otherEnthouse")));
map.put("whCode",StringUtils.toString(whCode, eiMetadata.getMeta("whCode")));
map.put("whName",StringUtils.toString(whName, eiMetadata.getMeta("whName")));
map.put("matType",StringUtils.toString(matType, eiMetadata.getMeta("matType")));
map.put("matCode",StringUtils.toString(matCode, eiMetadata.getMeta("matCode")));
map.put("matName",StringUtils.toString(matName, eiMetadata.getMeta("matName")));
map.put("spec",StringUtils.toString(spec, eiMetadata.getMeta("spec")));
map.put("amount",StringUtils.toString(amount, eiMetadata.getMeta("amount")));
map.put("weight",StringUtils.toString(weight, eiMetadata.getMeta("weight")));
map.put("status",StringUtils.toString(status, eiMetadata.getMeta("status")));
map.put("remark",StringUtils.toString(remark, eiMetadata.getMeta("remark")));
return map;
/**
* 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("depCode", StringUtils.toString(depCode, eiMetadata.getMeta("depCode")));
map.put("receiptTime", StringUtils.toString(receiptTime, eiMetadata.getMeta("receiptTime")));
map.put("otherEnthouse", StringUtils.toString(otherEnthouse, eiMetadata.getMeta("otherEnthouse")));
map.put("whCode", StringUtils.toString(whCode, eiMetadata.getMeta("whCode")));
map.put("whName", StringUtils.toString(whName, eiMetadata.getMeta("whName")));
map.put("matType", StringUtils.toString(matType, eiMetadata.getMeta("matType")));
map.put("matCode", StringUtils.toString(matCode, eiMetadata.getMeta("matCode")));
map.put("matName", StringUtils.toString(matName, eiMetadata.getMeta("matName")));
map.put("spec", StringUtils.toString(spec, eiMetadata.getMeta("spec")));
map.put("amount", StringUtils.toString(amount, eiMetadata.getMeta("amount")));
map.put("weight", StringUtils.toString(weight, eiMetadata.getMeta("weight")));
map.put("status", StringUtils.toString(status, eiMetadata.getMeta("status")));
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 {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
HPKC006 hpkc006 = new HPKC006();
// System.out.println(inInfo.getBlock("result"));
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
// System.out.println(map);
hpkc006.fromMap(map);
this.dao.insert("HPKC006.insert", hpkc006.toMap());
......
......@@ -73,54 +73,6 @@
</isNotEmpty>
</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 INTO hpjx.t_hpkc006 (
COMPANY_CODE, <!-- 企业编码 预留 -->
......
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