Commit 612ecbdc by 971729

feat():HPKC006 HPKC007

parent fecb702b
/**
* Generate time : 2024-01-10 10:28:03
* Version : 1.0
*/
package com.baosight.iplat4j.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
*
*/
public class HPKC006 extends DaoEPBase {
private Integer id = 0;
private String companyCode = " "; /* 企业编码 预留*/
private String depCode = " "; /* 部门编码 预留*/
private Timestamp receiptTime ; /* 单据日期*/
private String otherEnthouse = " "; /* 其他入库单号*/
private String whCode = " "; /* 仓库编码*/
private String whName = " "; /* 仓库名称*/
private String matType = " "; /* 物料类型*/
private String matCode = " "; /* 物料编码*/
private String matName = " "; /* 物料名称*/
private String spec = " "; /* 规格*/
private BigDecimal amount = new BigDecimal("0"); /* 数量*/
private BigDecimal weight = new BigDecimal("0"); /* 重量*/
private int status; /* 状态 0审核 1保存*/
private String remark = " "; /* 备注*/
/**
* 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("depCode");
eiColumn.setDescName("部门编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("receiptTime");
eiColumn.setDescName("单据日期");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("otherEnthouse");
eiColumn.setDescName("其他入库单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("whCode");
eiColumn.setDescName("仓库编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("whName");
eiColumn.setDescName("仓库名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("matType");
eiColumn.setDescName("物料类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("matCode");
eiColumn.setDescName("物料编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("matName");
eiColumn.setDescName("物料名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("spec");
eiColumn.setDescName("规格");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("amount");
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("weight");
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("status");
eiColumn.setDescName("状态 0审核 1保存");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("remark");
eiColumn.setDescName("备注");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor
*/
public HPKC006() {
initMetaData();
}
/**
* get the id
* @return the id
*/
public Integer getId() {
return this.id;
}
/**
* set the id
*/
public void setId(Integer id) {
this.id = id;
}
/**
* get the companyCode - 企业编码 预留
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 企业编码 预留
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the depCode - 部门编码 预留
* @return the depCode
*/
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码 预留
*/
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the receiptTime - 单据日期
* @return the receiptTime
*/
public Timestamp getReceiptTime() {
return this.receiptTime;
}
/**
* set the receiptTime - 单据日期
*/
public void setReceiptTime(Timestamp receiptTime) {
this.receiptTime = receiptTime;
}
/**
* get the otherEnthouse - 其他入库单号
* @return the otherEnthouse
*/
public String getOtherEnthouse() {
return this.otherEnthouse;
}
/**
* set the otherEnthouse - 其他入库单号
*/
public void setOtherEnthouse(String otherEnthouse) {
this.otherEnthouse = otherEnthouse;
}
/**
* get the whCode - 仓库编码
* @return the whCode
*/
public String getWhCode() {
return this.whCode;
}
/**
* set the whCode - 仓库编码
*/
public void setWhCode(String whCode) {
this.whCode = whCode;
}
/**
* get the whName - 仓库名称
* @return the whName
*/
public String getWhName() {
return this.whName;
}
/**
* set the whName - 仓库名称
*/
public void setWhName(String whName) {
this.whName = whName;
}
/**
* get the matType - 物料类型
* @return the matType
*/
public String getMatType() {
return this.matType;
}
/**
* set the matType - 物料类型
*/
public void setMatType(String matType) {
this.matType = matType;
}
/**
* get the matCode - 物料编码
* @return the matCode
*/
public String getMatCode() {
return this.matCode;
}
/**
* set the matCode - 物料编码
*/
public void setMatCode(String matCode) {
this.matCode = matCode;
}
/**
* get the matName - 物料名称
* @return the matName
*/
public String getMatName() {
return this.matName;
}
/**
* set the matName - 物料名称
*/
public void setMatName(String matName) {
this.matName = matName;
}
/**
* 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 amount - 数量
* @return the amount
*/
public BigDecimal getAmount() {
return this.amount;
}
/**
* set the amount - 数量
*/
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
/**
* get the weight - 重量
* @return the weight
*/
public BigDecimal getWeight() {
return this.weight;
}
/**
* set the weight - 重量
*/
public void setWeight(BigDecimal weight) {
this.weight = weight;
}
/**
* 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 remark - 备注
* @return the remark
*/
public String getRemark() {
return this.remark;
}
/**
* set the remark - 备注
*/
public void setRemark(String remark) {
this.remark = remark;
}
/**
* 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));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("depCode")), depCode));
setReceiptTime(DateUtils.toTimestamp(StringUtils.toString(map.get("receiptTime"))));
setOtherEnthouse(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("otherEnthouse")), otherEnthouse));
setWhCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("whCode")), whCode));
setWhName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("whName")), whName));
setMatType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("matType")), matType));
setMatCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("matCode")), matCode));
setMatName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("matName")), matName));
setSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("spec")), spec));
setAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get("amount")), amount));
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;
}
}
\ No newline at end of file
/**
* Generate time : 2024-01-10 14:03:35
* Version : 1.0
*/
package com.baosight.iplat4j.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;
/**
* THpkc007
*
*/
public class HPKC007 extends DaoEPBase {
private Integer id = 0;
private String companyCode = " "; /* 企业编码 预留*/
private String depCode = " "; /* 部门编码 预留*/
private Timestamp receiptTime ; /* 单据日期*/
private String otherEnthouse = " "; /* 其他入库单号*/
private String whCode = " "; /* 仓库编码*/
private String whName = " "; /* 仓库名称*/
private String matType = " "; /* 物料类型*/
private String matCode = " "; /* 物料编码*/
private String matName = " "; /* 物料名称*/
private BigDecimal amount = new BigDecimal("0"); /* 数量*/
private BigDecimal weight = new BigDecimal("0"); /* 重量*/
private int status; /* 状态 0审核 1保存*/
private String remark = " "; /* 备注*/
/**
* 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("depCode");
eiColumn.setDescName("部门编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("receiptTime");
eiColumn.setDescName("单据日期");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("otherEnthouse");
eiColumn.setDescName("其他入库单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("whCode");
eiColumn.setDescName("仓库编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("whName");
eiColumn.setDescName("仓库名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("matType");
eiColumn.setDescName("物料类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("matCode");
eiColumn.setDescName("物料编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("matName");
eiColumn.setDescName("物料名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("amount");
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("weight");
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("status");
eiColumn.setDescName("状态 0审核 1保存");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("remark");
eiColumn.setDescName("备注");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor
*/
public HPKC007() {
initMetaData();
}
/**
* get the id
* @return the id
*/
public Integer getId() {
return this.id;
}
/**
* set the id
*/
public void setId(Integer id) {
this.id = id;
}
/**
* get the companyCode - 企业编码 预留
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 企业编码 预留
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the depCode - 部门编码 预留
* @return the depCode
*/
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码 预留
*/
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the receiptTime - 单据日期
* @return the receiptTime
*/
public Timestamp getReceiptTime() {
return this.receiptTime;
}
/**
* set the receiptTime - 单据日期
*/
public void setReceiptTime(Timestamp receiptTime) {
this.receiptTime = receiptTime;
}
/**
* get the otherEnthouse - 其他入库单号
* @return the otherEnthouse
*/
public String getOtherEnthouse() {
return this.otherEnthouse;
}
/**
* set the otherEnthouse - 其他入库单号
*/
public void setOtherEnthouse(String otherEnthouse) {
this.otherEnthouse = otherEnthouse;
}
/**
* get the whCode - 仓库编码
* @return the whCode
*/
public String getWhCode() {
return this.whCode;
}
/**
* set the whCode - 仓库编码
*/
public void setWhCode(String whCode) {
this.whCode = whCode;
}
/**
* get the whName - 仓库名称
* @return the whName
*/
public String getWhName() {
return this.whName;
}
/**
* set the whName - 仓库名称
*/
public void setWhName(String whName) {
this.whName = whName;
}
/**
* get the matType - 物料类型
* @return the matType
*/
public String getMatType() {
return this.matType;
}
/**
* set the matType - 物料类型
*/
public void setMatType(String matType) {
this.matType = matType;
}
/**
* get the matCode - 物料编码
* @return the matCode
*/
public String getMatCode() {
return this.matCode;
}
/**
* set the matCode - 物料编码
*/
public void setMatCode(String matCode) {
this.matCode = matCode;
}
/**
* get the matName - 物料名称
* @return the matName
*/
public String getMatName() {
return this.matName;
}
/**
* set the matName - 物料名称
*/
public void setMatName(String matName) {
this.matName = matName;
}
/**
* get the amount - 数量
* @return the amount
*/
public BigDecimal getAmount() {
return this.amount;
}
/**
* set the amount - 数量
*/
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
/**
* get the weight - 重量
* @return the weight
*/
public BigDecimal getWeight() {
return this.weight;
}
/**
* set the weight - 重量
*/
public void setWeight(BigDecimal weight) {
this.weight = weight;
}
/**
* 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 remark - 备注
* @return the remark
*/
public String getRemark() {
return this.remark;
}
/**
* set the remark - 备注
*/
public void setRemark(String remark) {
this.remark = remark;
}
/**
* 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));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("depCode")), depCode));
setReceiptTime(DateUtils.toTimestamp(StringUtils.toString(map.get("receiptTime"))));
setOtherEnthouse(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("otherEnthouse")), otherEnthouse));
setWhCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("whCode")), whCode));
setWhName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("whName")), whName));
setMatType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("matType")), matType));
setMatCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("matCode")), matCode));
setMatName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("matName")), matName));
setAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get("amount")), amount));
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("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;
}
}
\ No newline at end of file
package com.baosight.iplat4j.hp.kc.service;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.hp.kc.domain.HPKC006;
import java.text.SimpleDateFormat;
import java.util.Map;
public class ServiceHPKC006 extends ServiceBase {
public EiInfo initLoad(EiInfo inInfo) {
HPKC006 hpkc006 = new HPKC006();
EiInfo outInfo = super.initLoad(inInfo, hpkc006);
outInfo.addBlock(EiConstant.resultBlock).addBlockMeta(hpkc006.eiMetadata);
return inInfo;
}
/**
* 查询操作.
*/
@Override
public EiInfo query(EiInfo inInfo) {
/* 调用EI查询方法.*/
EiInfo outInfo = super.query(inInfo, "HPKC006.query", new HPKC006());
return outInfo;
}
/**
* 新增操作.
*/
@Override
public EiInfo insert(EiInfo inInfo) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
HPKC006 hpkc006 = new HPKC006();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hpkc006.fromMap(map);
this.dao.insert("HPKC006.insert", hpkc006.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("新增成功!");
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
inInfo.setMsg("新增失败!原因参见详细错误描述!");
inInfo.setDetailMsg(e.getMessage());
logError("新增失败", e.getMessage());
return inInfo;
}
return inInfo;
}
/**
* 修改操作.
*/
public EiInfo update(EiInfo inInfo) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
HPKC006 hpkc006 = new HPKC006();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hpkc006.fromMap(map);
this.dao.update("HPKC006.update", hpkc006.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) {
HPKC006 hpkc006 = new HPKC006();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
try {
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hpkc006.fromMap(map);
this.dao.delete("HPKC006.delete", hpkc006.toMap());
}
} catch (PlatException e) {
eiInfo.setStatus(EiConstant.STATUS_FAILURE);
eiInfo.setMsg("删除失败,原因参见详细错误描述!");
eiInfo.setDetailMsg(e.getMessage());
logError("删除失败!", e.getMessage());
return eiInfo;
}
eiInfo.setStatus(EiConstant.STATUS_SUCCESS);
eiInfo.setMsg("删除成功!");
return eiInfo;
}
}
package com.baosight.iplat4j.hp.kc.service;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.hp.kc.domain.HPKC007;
import com.baosight.iplat4j.hp.kc.domain.HPKC007;
import java.text.SimpleDateFormat;
import java.util.Map;
public class ServiceHPKC007 extends ServiceBase {
public EiInfo initLoad(EiInfo inInfo) {
HPKC007 hpkc007 = new HPKC007();
EiInfo outInfo = super.initLoad(inInfo, hpkc007);
outInfo.addBlock(EiConstant.resultBlock).addBlockMeta(hpkc007.eiMetadata);
return inInfo;
}
/**
* 查询操作.
*/
@Override
public EiInfo query(EiInfo inInfo) {
/* 调用EI查询方法.*/
EiInfo outInfo = super.query(inInfo, "HPKC007.query", new HPKC007());
return outInfo;
}
/**
* 新增操作.
*/
@Override
public EiInfo insert(EiInfo inInfo) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
HPKC007 hpkc007 = new HPKC007();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hpkc007.fromMap(map);
this.dao.insert("HPKC007.insert", hpkc007.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("新增成功!");
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
inInfo.setMsg("新增失败!原因参见详细错误描述!");
inInfo.setDetailMsg(e.getMessage());
logError("新增失败", e.getMessage());
return inInfo;
}
return inInfo;
}
/**
* 修改操作.
*/
public EiInfo update(EiInfo inInfo) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
HPKC007 hpkc007 = new HPKC007();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hpkc007.fromMap(map);
this.dao.update("HPKC007.update", hpkc007.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) {
HPKC007 hpkc007 = new HPKC007();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
try {
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hpkc007.fromMap(map);
this.dao.delete("HPKC007.delete", hpkc007.toMap());
}
} catch (PlatException e) {
eiInfo.setStatus(EiConstant.STATUS_FAILURE);
eiInfo.setMsg("删除失败,原因参见详细错误描述!");
eiInfo.setDetailMsg(e.getMessage());
logError("删除失败!", e.getMessage());
return eiInfo;
}
eiInfo.setStatus(EiConstant.STATUS_SUCCESS);
eiInfo.setMsg("删除成功!");
return eiInfo;
}
}
package com.baosight.iplat4j.hp.kc.service;
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<!-- table information
Generate time : 2024-01-10 10:28:03
Version : 1.0
tableName :hpjx.t_hpkc006
ID INTEGER NOT NULL primarykey,
COMPANY_CODE VARCHAR NOT NULL,
DEP_CODE VARCHAR NOT NULL,
RECEIPT_TIME DATETIME,
OTHER_ENTHOUSE VARCHAR NOT NULL,
WH_CODE VARCHAR NOT NULL,
WH_NAME VARCHAR NOT NULL,
MAT_TYPE VARCHAR NOT NULL,
MAT_CODE VARCHAR NOT NULL,
MAT_NAME VARCHAR NOT NULL,
SPEC VARCHAR NOT NULL,
AMOUNT DECIMAL NOT NULL,
WEIGHT DECIMAL NOT NULL,
STATUS TINYINT NOT NULL,
REMARK VARCHAR
-->
<sqlMap namespace="HPKC006">
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.iplat4j.hp.kc.domain.HPKC006">
SELECT
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
DEP_CODE as "depCode", <!-- 部门编码 预留 -->
RECEIPT_TIME as "receiptTime", <!-- 单据日期 -->
OTHER_ENTHOUSE as "otherEnthouse", <!-- 其他入库单号 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 -->
MAT_TYPE as "matType", <!-- 物料类型 -->
MAT_CODE as "matCode", <!-- 物料编码 -->
MAT_NAME as "matName", <!-- 物料名称 -->
SPEC as "spec", <!-- 规格 -->
AMOUNT as "amount", <!-- 数量 -->
WEIGHT as "weight", <!-- 重量 -->
STATUS as "status", <!-- 状态 0审核 1保存 -->
REMARK as "remark" <!-- 备注 -->
FROM hpjx.t_hpkc006 WHERE 1=1
<isNotEmpty prepend=" AND " property="receiptTime">
RECEIPT_TIME LIKE CONCAT('%' ,CONCAT( #receiptTime#,'%'))
</isNotEmpty>
<isNotEmpty prepend=" AND " property="otherEnthouse">
OTHER_ENTHOUSE LIKE CONCAT('%' ,CONCAT( #otherEnthouse#,'%'))
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whName">
WH_NAME LIKE CONCAT('%' ,CONCAT( #whName#,'%'))
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hpkc006 WHERE 1=1
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="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, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 预留 -->
RECEIPT_TIME, <!-- 单据日期 -->
OTHER_ENTHOUSE, <!-- 其他入库单号 -->
WH_CODE, <!-- 仓库编码 -->
WH_NAME, <!-- 仓库名称 -->
MAT_TYPE, <!-- 物料类型 -->
MAT_CODE, <!-- 物料编码 -->
MAT_NAME, <!-- 物料名称 -->
SPEC, <!-- 规格 -->
AMOUNT, <!-- 数量 -->
WEIGHT, <!-- 重量 -->
STATUS, <!-- 状态 0审核 1保存 -->
REMARK <!-- 备注 -->
)
VALUES ( #companyCode#, #depCode#, #receiptTime#, #otherEnthouse#, #whCode#, #whName#, #matType#, #matCode#, #matName#, #spec#, #amount#, #weight#, #status#, #remark#)
</insert>
<delete id="delete">
DELETE FROM hpjx.t_hpkc006 WHERE
ID = #id#
</delete>
<update id="update">
UPDATE hpjx.t_hpkc006
SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 -->
DEP_CODE = #depCode#, <!-- 部门编码 预留 -->
RECEIPT_TIME = #receiptTime#, <!-- 单据日期 -->
OTHER_ENTHOUSE = #otherEnthouse#, <!-- 其他入库单号 -->
WH_CODE = #whCode#, <!-- 仓库编码 -->
WH_NAME = #whName#, <!-- 仓库名称 -->
MAT_TYPE = #matType#, <!-- 物料类型 -->
MAT_CODE = #matCode#, <!-- 物料编码 -->
MAT_NAME = #matName#, <!-- 物料名称 -->
SPEC = #spec#, <!-- 规格 -->
AMOUNT = #amount#, <!-- 数量 -->
WEIGHT = #weight#, <!-- 重量 -->
STATUS = #status#, <!-- 状态 0审核 1保存 -->
REMARK = #remark# <!-- 备注 -->
WHERE
ID = #id#
</update>
</sqlMap>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<!-- table information
Generate time : 2024-01-10 14:03:35
Version : 1.0
tableName :hpjx.t_hpkc007
ID INTEGER NOT NULL primarykey,
COMPANY_CODE VARCHAR NOT NULL,
DEP_CODE VARCHAR NOT NULL,
RECEIPT_TIME DATETIME,
OTHER_ENTHOUSE VARCHAR NOT NULL,
WH_CODE VARCHAR NOT NULL,
WH_NAME VARCHAR NOT NULL,
MAT_TYPE VARCHAR NOT NULL,
MAT_CODE VARCHAR NOT NULL,
MAT_NAME VARCHAR NOT NULL,
AMOUNT DECIMAL NOT NULL,
WEIGHT DECIMAL NOT NULL,
STATUS TINYINT NOT NULL,
REMARK VARCHAR
-->
<sqlMap namespace="HPKC007">
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.iplat4j.hp.kc.domain.HPKC007">
SELECT
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
DEP_CODE as "depCode", <!-- 部门编码 预留 -->
RECEIPT_TIME as "receiptTime", <!-- 单据日期 -->
OTHER_ENTHOUSE as "otherEnthouse", <!-- 其他入库单号 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 -->
MAT_TYPE as "matType", <!-- 物料类型 -->
MAT_CODE as "matCode", <!-- 物料编码 -->
MAT_NAME as "matName", <!-- 物料名称 -->
AMOUNT as "amount", <!-- 数量 -->
WEIGHT as "weight", <!-- 重量 -->
STATUS as "status", <!-- 状态 0审核 1保存 -->
REMARK as "remark" <!-- 备注 -->
FROM hpjx.t_hpkc007 WHERE 1=1
<isNotEmpty prepend=" AND " property="receiptTime">
RECEIPT_TIME = #receiptTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="otherEnthouse">
OTHER_ENTHOUSE LIKE CONCAT('%',CONCAT(#otherEnthouse#,'%'))
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whName">
WH_NAME = LIKE CONCAT('%',CONCAT(#whName#,'%'))
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hpkc007 WHERE 1=1
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="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="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_hpkc007 (ID,
COMPANY_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 预留 -->
RECEIPT_TIME, <!-- 单据日期 -->
OTHER_ENTHOUSE, <!-- 其他入库单号 -->
WH_CODE, <!-- 仓库编码 -->
WH_NAME, <!-- 仓库名称 -->
MAT_TYPE, <!-- 物料类型 -->
MAT_CODE, <!-- 物料编码 -->
MAT_NAME, <!-- 物料名称 -->
AMOUNT, <!-- 数量 -->
WEIGHT, <!-- 重量 -->
STATUS, <!-- 状态 0审核 1保存 -->
REMARK <!-- 备注 -->
)
VALUES (#id#, #companyCode#, #depCode#, #receiptTime#, #otherEnthouse#, #whCode#, #whName#, #matType#, #matCode#, #matName#, #amount#, #weight#, #status#, #remark#)
</insert>
<delete id="delete">
DELETE FROM hpjx.t_hpkc007 WHERE
ID = #id#
</delete>
<update id="update">
UPDATE hpjx.t_hpkc007
SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 -->
DEP_CODE = #depCode#, <!-- 部门编码 预留 -->
RECEIPT_TIME = #receiptTime#, <!-- 单据日期 -->
OTHER_ENTHOUSE = #otherEnthouse#, <!-- 其他入库单号 -->
WH_CODE = #whCode#, <!-- 仓库编码 -->
WH_NAME = #whName#, <!-- 仓库名称 -->
MAT_TYPE = #matType#, <!-- 物料类型 -->
MAT_CODE = #matCode#, <!-- 物料编码 -->
MAT_NAME = #matName#, <!-- 物料名称 -->
AMOUNT = #amount#, <!-- 数量 -->
WEIGHT = #weight#, <!-- 重量 -->
STATUS = #status#, <!-- 状态 0审核 1保存 -->
REMARK = #remark# <!-- 备注 -->
WHERE
ID = #id#
</update>
</sqlMap>
\ No newline at end of file
package com.baosight.iplat4j.hp.kc.sql;
\ No newline at end of file
$(function () {
$("#QUERY").on("click", function () {
resultGrid.dataSource.page(1);
});
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 50, 70, 100],
},
}
});
\ No newline at end of file
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<head>
<%-- <link rel="stylesheet" href="${ctx}/css/simulatedOperation.css"/>--%>
</head>
<EF:EFPage title="仓库档案">
<EF:EFRegion id="inqu" title="查询条件"><%-- type="query" efRegionShowClear="true" efRegionSave="true"--%>
<div class="row"> <%-- blockId="inqu_status" row="0" --%>
<EF:EFInput blockId="inqu_status" ename="receiptTime" cname="单据日期" row="0"/>
<EF:EFInput blockId="inqu_status" ename="otherEnthouse" cname="其他出库单号" row="0"/>
<EF:EFInput blockId="inqu_status" ename="whName" cname="仓库名称" row="0"/>
<EF:EFSelect cname="单据状态" optionLabel="全部" blockId="inqu_status" ename="status" row="0">
<EF:EFOption label="启用" value="1"/>
<EF:EFOption label="停用" value="0"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="receiptTime" cname="单据日期"/>
<EF:EFColumn ename="otherEnthouse" cname="其他入库单号"/>
<EF:EFColumn ename="whCode" cname="仓库编码"/>
<EF:EFColumn ename="whName" cname="仓库名称"/>
<EF:EFColumn ename="matType" cname="物料类型"/>
<EF:EFColumn ename="matCode" cname="物料编码"/>
<EF:EFColumn ename="matName" cname="物料名称"/>
<EF:EFColumn ename="spec" cname="规格"/>
<EF:EFColumn ename="amount" cname="数量"/>
<EF:EFColumn ename="weight" cname="重量"/>
<EF:EFComboColumn align="center" ename="status" cname="状态">
<EF:EFOption label="启用" value="1"/>
<EF:EFOption label="停用" value="0"/>
</EF:EFComboColumn>
<EF:EFColumn ename="remark" cname="备注"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
<script>
var ctx = "${ctx}";
</script>
<script src="${ctx}/HP/KC/HPKC006.js"></script>
\ No newline at end of file
$(function () {
$("#QUERY").on("click", function () {
resultGrid.dataSource.page(1);
});
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 50, 70, 100],
},
}
});
\ No newline at end of file
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<head>
<%-- <link rel="stylesheet" href="${ctx}/css/simulatedOperation.css"/>--%>
</head>
<EF:EFPage title="仓库档案">
<EF:EFRegion id="inqu" title="查询条件"><%-- type="query" efRegionShowClear="true" efRegionSave="true"--%>
<div class="row"> <%-- blockId="inqu_status" row="0" --%>
<EF:EFInput blockId="inqu_status" ename="receiptTime" cname="单据日期" row="0"/>
<EF:EFInput blockId="inqu_status" ename="otherEnthouse" cname="其他出库单号" row="0"/>
<EF:EFInput blockId="inqu_status" ename="whName" cname="仓库名称" row="0"/>
<EF:EFSelect cname="单据状态" optionLabel="全部" blockId="inqu_status" ename="status" row="0">
<EF:EFOption label="启用" value="1"/>
<EF:EFOption label="停用" value="0"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="receiptTime" cname="单据日期"/>
<EF:EFColumn ename="otherEnthouse" cname="其他出库单号"/>
<EF:EFColumn ename="whCode" cname="仓库编码"/>
<EF:EFColumn ename="whName" cname="仓库名称"/>
<EF:EFColumn ename="matType" cname="物料类型"/>
<EF:EFColumn ename="matCode" cname="物料编码"/>
<EF:EFColumn ename="matName" cname="物料名称"/>
<EF:EFColumn ename="amount" cname="数量"/>
<EF:EFColumn ename="weight" cname="重量"/>
<EF:EFComboColumn align="center" ename="status" cname="单据状态">
<EF:EFOption label="启用" value="1"/>
<EF:EFOption label="停用" value="0"/>
</EF:EFComboColumn>
<EF:EFColumn ename="remark" cname="备注"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
<script>
var ctx = "${ctx}";
</script>
<script src="${ctx}/HP/KC/HPKC007.js"></script>
$(function () { $(function () {
$("#QUERY").on("click", function (e) {
$("#QUERY").on("click", function () {
resultGrid.dataSource.page(1); resultGrid.dataSource.page(1);
}); });
});
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 50, 70, 100],
},
}
});
\ No newline at end of file
...@@ -36,4 +36,7 @@ ...@@ -36,4 +36,7 @@
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
</EF:EFPage> </EF:EFPage>
<script>
var ctx = "${ctx}";
</script>
<script src="${ctx}/HP/PZ/HPPZ005.js"></script>
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