Commit 1a63dea6 by liuyang

2024-05-31 调拨单

parent 59d462d3
......@@ -135,7 +135,7 @@ public enum DdynamicEnum {
* 用途:调拨单下拉框
* 编写:ly
*/
SPEC_BOX_BLOCK_ID("spec_box_block_id", "specId", "spec","length", "width","thick","invQty","invUnitWeight","invWeight", "HGKC010.querySpecIdBox"),
SPEC_BOX_BLOCK_ID("spec_box_block_id", "spec", "spec","length", "width","thick","invQty","invUnitWeight","invWeight","specId", "HGKC010.querySpecIdBox"),
/**
* 模块:仓库类型
......
package com.baosight.hggp.hg.kc.domain;
import com.baosight.hggp.util.DateUtils;
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:Hgkc012.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-05-29 11:02:29 create
*/
public class HGKC013 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id";
public static final String FIELD_ACCOUNT_CODE = "accountCode"; /* 企业编码*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
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 FIELD_DELETE_FLAG = "deleteFlag"; /* 0-未删除,1-已删除*/
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 公司编码*/
public static final String FIELD_COMPANY_NAME = "companyName"; /* 公司名称*/
public static final String FIELD_ALLOT_TYPE = "allotType"; /* 调拨类型*/
public static final String FIELD_RECEIPT_DATE = "receiptDate"; /* 单据日期*/
public static final String FIELD_ALLOT_NO = "allotNo"; /* 调拨库单号*/
public static final String FIELD_CALLOUT_COMPANY_CODE = "calloutCompanyCode"; /* 调出公司编码*/
public static final String FIELD_CALLOUT_COMPANY_NAME = "calloutCompanyName"; /* 调出公司名称*/
public static final String FIELD_CALLIN_COMPANY_CODE = "callinCompanyCode"; /* 调入公司编码*/
public static final String FIELD_CALLIN_COMPANY_NAME = "callinCompanyName"; /* 调入公司名称*/
public static final String FIELD_CALLOUT_WH_CODE = "calloutWhCode"; /* 调出仓库编码*/
public static final String FIELD_CALLOUT_WH_NAME = "calloutWhName"; /* 调出仓库名称*/
public static final String FIELD_CALLIN_WH_CODE = "callinWhCode"; /* 调入仓库编码*/
public static final String FIELD_CALLIN_WH_NAME = "callinWhName"; /* 调入仓库名称*/
public static final String FIELD_STATUS = "status"; /* 状态0-未提交,1-已提交*/
public static final String COL_ID = "ID";
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
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 COL_DELETE_FLAG = "DELETE_FLAG"; /* 0-未删除,1-已删除*/
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 公司编码*/
public static final String COL_COMPANY_NAME = "COMPANY_NAME"; /* 公司名称*/
public static final String COL_ALLOT_TYPE = "ALLOT_TYPE"; /* 调拨类型*/
public static final String COL_RECEIPT_DATE = "RECEIPT_DATE"; /* 单据日期*/
public static final String COL_ALLOT_NO = "ALLOT_NO"; /* 调拨库单号*/
public static final String COL_CALLOUT_COMPANY_CODE = "CALLOUT_COMPANY_CODE"; /* 调出公司编码*/
public static final String COL_CALLOUT_COMPANY_NAME = "CALLOUT_COMPANY_NAME"; /* 调出公司名称*/
public static final String COL_CALLIN_COMPANY_CODE = "CALLIN_COMPANY_CODE"; /* 调入公司编码*/
public static final String COL_CALLIN_COMPANY_NAME = "CALLIN_COMPANY_NAME"; /* 调入公司名称*/
public static final String COL_CALLOUT_WH_CODE = "CALLOUT_WH_CODE"; /* 调出仓库编码*/
public static final String COL_CALLOUT_WH_NAME = "CALLOUT_WH_NAME"; /* 调出仓库名称*/
public static final String COL_CALLIN_WH_CODE = "CALLIN_WH_CODE"; /* 调入仓库编码*/
public static final String COL_CALLIN_WH_NAME = "CALLIN_WH_NAME"; /* 调入仓库名称*/
public static final String COL_STATUS = "STATUS"; /* 状态0-未提交,1-已提交*/
public static final String QUERY = "HGKC013.query";
public static final String COUNT = "HGKC013.count";
public static final String INSERT = "HGKC013.insert";
public static final String UPDATE = "HGKC013.update";
public static final String UPDATE_STATUS = "HGKC013.updateStatus";
public static final String DELETE = "HGKC013.delete";
public static final String DELETE_FLAG = "HGKC013.deleteFlag";
private Long id = new Long(0);
private String accountCode = " "; /* 企业编码*/
private String depCode = " "; /* 部门编码*/
private String createdBy = " "; /* 记录创建者*/
private String createdName = " "; /* 记录创建名称*/
private String createdTime = " "; /* 记录创建时间*/
private String updatedBy = " "; /* 记录修改者*/
private String updatedName = " "; /* 记录修改名称*/
private String updatedTime = " "; /* 记录修改时间*/
private Integer deleteFlag = 0; /* 0-未删除,1-已删除*/
private String companyCode = " "; /* 公司编码*/
private String companyName = " "; /* 公司名称*/
private String allotType = " "; /* 调拨类型*/
private String receiptDate = " "; /* 单据日期*/
private String allotNo = " "; /* 调拨库单号*/
private String calloutCompanyCode = " "; /* 调出公司编码*/
private String calloutCompanyName = " "; /* 调出公司名称*/
private String callinCompanyCode = " "; /* 调入公司编码*/
private String callinCompanyName = " "; /* 调入公司名称*/
private String calloutWhCode = " "; /* 调出仓库编码*/
private String calloutWhName = " "; /* 调出仓库名称*/
private String callinWhCode = " "; /* 调入仓库编码*/
private String callinWhName = " "; /* 调入仓库名称*/
private Integer status = 0; /* 状态0-未提交,1-已提交*/
/**
* 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_ACCOUNT_CODE);
eiColumn.setDescName("企业编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
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);
eiColumn = new EiColumn(FIELD_DELETE_FLAG);
eiColumn.setDescName("0-未删除,1-已删除");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("公司编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_NAME);
eiColumn.setDescName("公司名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ALLOT_TYPE);
eiColumn.setDescName("调拨类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RECEIPT_DATE);
eiColumn.setDescName("单据日期");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ALLOT_NO);
eiColumn.setDescName("调拨库单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CALLOUT_COMPANY_CODE);
eiColumn.setDescName("调出公司编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CALLOUT_COMPANY_NAME);
eiColumn.setDescName("调出公司名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CALLIN_COMPANY_CODE);
eiColumn.setDescName("调入公司编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CALLIN_COMPANY_NAME);
eiColumn.setDescName("调入公司名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CALLOUT_WH_CODE);
eiColumn.setDescName("调出仓库编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CALLOUT_WH_NAME);
eiColumn.setDescName("调出仓库名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CALLIN_WH_CODE);
eiColumn.setDescName("调入仓库编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CALLIN_WH_NAME);
eiColumn.setDescName("调入仓库名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_STATUS);
eiColumn.setDescName("状态0-未提交,1-已提交");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HGKC013() {
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 accountCode - 企业编码.
* @return the accountCode
*/
public String getAccountCode() {
return this.accountCode;
}
/**
* set the accountCode - 企业编码.
*
* @param accountCode - 企业编码
*/
public void setAccountCode(String accountCode) {
this.accountCode = accountCode;
}
/**
* 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 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 deleteFlag - 0-未删除,1-已删除.
* @return the deleteFlag
*/
public Integer getDeleteFlag() {
return this.deleteFlag;
}
/**
* set the deleteFlag - 0-未删除,1-已删除.
*
* @param deleteFlag - 0-未删除,1-已删除
*/
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
/**
* 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 companyName - 公司名称.
* @return the companyName
*/
public String getCompanyName() {
return this.companyName;
}
/**
* set the companyName - 公司名称.
*
* @param companyName - 公司名称
*/
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
/**
* get the allotType - 调拨类型.
* @return the allotType
*/
public String getAllotType() {
return this.allotType;
}
/**
* set the allotType - 调拨类型.
*
* @param allotType - 调拨类型
*/
public void setAllotType(String allotType) {
this.allotType = allotType;
}
/**
* get the receiptDate - 单据日期.
* @return the receiptDate
*/
public String getReceiptDate() {
return this.receiptDate;
}
/**
* set the receiptDate - 单据日期.
*
* @param receiptDate - 单据日期
*/
public void setReceiptDate(String receiptDate) {
this.receiptDate = receiptDate;
}
/**
* get the allotNo - 调拨库单号.
* @return the allotNo
*/
public String getAllotNo() {
return this.allotNo;
}
/**
* set the allotNo - 调拨库单号.
*
* @param allotNo - 调拨库单号
*/
public void setAllotNo(String allotNo) {
this.allotNo = allotNo;
}
/**
* get the calloutCompanyCode - 调出公司编码.
* @return the calloutCompanyCode
*/
public String getCalloutCompanyCode() {
return this.calloutCompanyCode;
}
/**
* set the calloutCompanyCode - 调出公司编码.
*
* @param calloutCompanyCode - 调出公司编码
*/
public void setCalloutCompanyCode(String calloutCompanyCode) {
this.calloutCompanyCode = calloutCompanyCode;
}
/**
* get the calloutCompanyName - 调出公司名称.
* @return the calloutCompanyName
*/
public String getCalloutCompanyName() {
return this.calloutCompanyName;
}
/**
* set the calloutCompanyName - 调出公司名称.
*
* @param calloutCompanyName - 调出公司名称
*/
public void setCalloutCompanyName(String calloutCompanyName) {
this.calloutCompanyName = calloutCompanyName;
}
/**
* get the callinCompanyCode - 调入公司编码.
* @return the callinCompanyCode
*/
public String getCallinCompanyCode() {
return this.callinCompanyCode;
}
/**
* set the callinCompanyCode - 调入公司编码.
*
* @param callinCompanyCode - 调入公司编码
*/
public void setCallinCompanyCode(String callinCompanyCode) {
this.callinCompanyCode = callinCompanyCode;
}
/**
* get the callinCompanyName - 调入公司名称.
* @return the callinCompanyName
*/
public String getCallinCompanyName() {
return this.callinCompanyName;
}
/**
* set the callinCompanyName - 调入公司名称.
*
* @param callinCompanyName - 调入公司名称
*/
public void setCallinCompanyName(String callinCompanyName) {
this.callinCompanyName = callinCompanyName;
}
/**
* get the calloutWhCode - 调出仓库编码.
* @return the calloutWhCode
*/
public String getCalloutWhCode() {
return this.calloutWhCode;
}
/**
* set the calloutWhCode - 调出仓库编码.
*
* @param calloutWhCode - 调出仓库编码
*/
public void setCalloutWhCode(String calloutWhCode) {
this.calloutWhCode = calloutWhCode;
}
/**
* get the calloutWhName - 调出仓库名称.
* @return the calloutWhName
*/
public String getCalloutWhName() {
return this.calloutWhName;
}
/**
* set the calloutWhName - 调出仓库名称.
*
* @param calloutWhName - 调出仓库名称
*/
public void setCalloutWhName(String calloutWhName) {
this.calloutWhName = calloutWhName;
}
/**
* get the callinWhCode - 调入仓库编码.
* @return the callinWhCode
*/
public String getCallinWhCode() {
return this.callinWhCode;
}
/**
* set the callinWhCode - 调入仓库编码.
*
* @param callinWhCode - 调入仓库编码
*/
public void setCallinWhCode(String callinWhCode) {
this.callinWhCode = callinWhCode;
}
/**
* get the callinWhName - 调入仓库名称.
* @return the callinWhName
*/
public String getCallinWhName() {
return this.callinWhName;
}
/**
* set the callinWhName - 调入仓库名称.
*
* @param callinWhName - 调入仓库名称
*/
public void setCallinWhName(String callinWhName) {
this.callinWhName = callinWhName;
}
/**
* 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 value from Map.
*
* @param map - source data map
*/
@Override
public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id));
setAccountCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ACCOUNT_CODE)), accountCode));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
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));
setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode));
setCompanyName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_NAME)), companyName));
setAllotType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ALLOT_TYPE)), allotType));
setReceiptDate(StringUtils.defaultIfEmpty(StringUtils.toString(DateUtils.formatShort(map.get(FIELD_RECEIPT_DATE))), receiptDate));
setAllotNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ALLOT_NO)), allotNo));
setCalloutCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CALLOUT_COMPANY_CODE)), calloutCompanyCode));
setCalloutCompanyName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CALLOUT_COMPANY_NAME)), calloutCompanyName));
setCallinCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CALLIN_COMPANY_CODE)), callinCompanyCode));
setCallinCompanyName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CALLIN_COMPANY_NAME)), callinCompanyName));
setCalloutWhCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CALLOUT_WH_CODE)), calloutWhCode));
setCalloutWhName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CALLOUT_WH_NAME)), calloutWhName));
setCallinWhCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CALLIN_WH_CODE)), callinWhCode));
setCallinWhName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CALLIN_WH_NAME)), callinWhName));
setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status));
}
/**
* 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_ACCOUNT_CODE, StringUtils.toString(accountCode, eiMetadata.getMeta(FIELD_ACCOUNT_CODE)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
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)));
map.put(FIELD_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG)));
map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE)));
map.put(FIELD_COMPANY_NAME, StringUtils.toString(companyName, eiMetadata.getMeta(FIELD_COMPANY_NAME)));
map.put(FIELD_ALLOT_TYPE, StringUtils.toString(allotType, eiMetadata.getMeta(FIELD_ALLOT_TYPE)));
map.put(FIELD_RECEIPT_DATE, StringUtils.toString(receiptDate, eiMetadata.getMeta(FIELD_RECEIPT_DATE)));
map.put(FIELD_ALLOT_NO, StringUtils.toString(allotNo, eiMetadata.getMeta(FIELD_ALLOT_NO)));
map.put(FIELD_CALLOUT_COMPANY_CODE, StringUtils.toString(calloutCompanyCode, eiMetadata.getMeta(FIELD_CALLOUT_COMPANY_CODE)));
map.put(FIELD_CALLOUT_COMPANY_NAME, StringUtils.toString(calloutCompanyName, eiMetadata.getMeta(FIELD_CALLOUT_COMPANY_NAME)));
map.put(FIELD_CALLIN_COMPANY_CODE, StringUtils.toString(callinCompanyCode, eiMetadata.getMeta(FIELD_CALLIN_COMPANY_CODE)));
map.put(FIELD_CALLIN_COMPANY_NAME, StringUtils.toString(callinCompanyName, eiMetadata.getMeta(FIELD_CALLIN_COMPANY_NAME)));
map.put(FIELD_CALLOUT_WH_CODE, StringUtils.toString(calloutWhCode, eiMetadata.getMeta(FIELD_CALLOUT_WH_CODE)));
map.put(FIELD_CALLOUT_WH_NAME, StringUtils.toString(calloutWhName, eiMetadata.getMeta(FIELD_CALLOUT_WH_NAME)));
map.put(FIELD_CALLIN_WH_CODE, StringUtils.toString(callinWhCode, eiMetadata.getMeta(FIELD_CALLIN_WH_CODE)));
map.put(FIELD_CALLIN_WH_NAME, StringUtils.toString(callinWhName, eiMetadata.getMeta(FIELD_CALLIN_WH_NAME)));
map.put(FIELD_STATUS, StringUtils.toString(status, eiMetadata.getMeta(FIELD_STATUS)));
return map;
}
}
package com.baosight.hggp.hg.kc.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:Hgkc013a.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-05-29 15:30:19 create
*/
public class HGKC013A extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id"; /* ID*/
public static final String FIELD_ACCOUNT_CODE = "accountCode"; /* 企业编码*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
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 FIELD_DELETE_FLAG = "deleteFlag"; /* 0-未删除,1-已删除*/
public static final String FIELD_CALLOUT_WH_CODE = "calloutWhCode"; /* 调出仓库编码*/
public static final String FIELD_CALLOUT_WH_NAME = "calloutWhName"; /* 调出仓库名称*/
public static final String FIELD_CALLIN_WH_CODE = "callinWhCode"; /* 调入仓库编码*/
public static final String FIELD_CALLIN_WH_NAME = "callinWhName"; /* 调入仓库名称*/
public static final String FIELD_INVENT_RECORD_ID = "inventRecordId"; /* 存货档案id*/
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_SPEC = "spec"; /* 规格*/
public static final String FIELD_LENGTH = "length"; /* 长*/
public static final String FIELD_WIDTH = "width"; /* 宽*/
public static final String FIELD_THICK = "thick"; /* 厚*/
public static final String FIELD_QUANTITY = "quantity"; /* 数量*/
public static final String FIELD_UNIT_WEIGHT = "unitWeight"; /* 单重*/
public static final String FIELD_WEIGHT = "weight"; /* 重量*/
public static final String FIELD_PARENT_ID = "parentId"; /* 调度单ID*/
public static final String COL_ID = "ID"; /* ID*/
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
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 COL_DELETE_FLAG = "DELETE_FLAG"; /* 0-未删除,1-已删除*/
public static final String COL_CALLOUT_WH_CODE = "CALLOUT_WH_CODE"; /* 调出仓库编码*/
public static final String COL_CALLOUT_WH_NAME = "CALLOUT_WH_NAME"; /* 调出仓库名称*/
public static final String COL_CALLIN_WH_CODE = "CALLIN_WH_CODE"; /* 调入仓库编码*/
public static final String COL_CALLIN_WH_NAME = "CALLIN_WH_NAME"; /* 调入仓库名称*/
public static final String COL_INVENT_RECORD_ID = "INVENT_RECORD_ID"; /* 存货档案id*/
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_SPEC = "SPEC"; /* 规格*/
public static final String COL_LENGTH = "LENGTH"; /* 长*/
public static final String COL_WIDTH = "WIDTH"; /* 宽*/
public static final String COL_THICK = "THICK"; /* 厚*/
public static final String COL_QUANTITY = "QUANTITY"; /* 数量*/
public static final String COL_UNIT_WEIGHT = "UNIT_WEIGHT"; /* 单重*/
public static final String COL_WEIGHT = "WEIGHT"; /* 重量*/
public static final String COL_PARENT_ID = "PARENT_ID"; /* 调度单ID*/
public static final String QUERY = "HGKC013A.query";
public static final String COUNT = "HGKC013A.count";
public static final String INSERT = "HGKC013A.insert";
public static final String UPDATE = "HGKC013A.update";
public static final String DELETE = "HGKC013A.delete";
public static final String DELETE_FLAG = "HGKC013A.deleteFlag";
private Long id = new Long(0); /* ID*/
private String accountCode = " "; /* 企业编码*/
private String depCode = " "; /* 部门编码*/
private String createdBy = " "; /* 记录创建者*/
private String createdName = " "; /* 记录创建名称*/
private String createdTime = " "; /* 记录创建时间*/
private String updatedBy = " "; /* 记录修改者*/
private String updatedName = " "; /* 记录修改名称*/
private String updatedTime = " "; /* 记录修改时间*/
private Integer deleteFlag = 0; /* 0-未删除,1-已删除*/
private String calloutWhCode = " "; /* 调出仓库编码*/
private String calloutWhName = " "; /* 调出仓库名称*/
private String callinWhCode = " "; /* 调入仓库编码*/
private String callinWhName = " "; /* 调入仓库名称*/
private Long inventRecordId = new Long(0); /* 存货档案id*/
private String inventType = " "; /* 存货类型*/
private String inventCode = " "; /* 存货编码*/
private String inventName = " "; /* 存货名称*/
private String spec = " "; /* 规格*/
private BigDecimal length = new BigDecimal("0"); /* 长*/
private BigDecimal width = new BigDecimal("0"); /* 宽*/
private BigDecimal thick = new BigDecimal("0"); /* 厚*/
private BigDecimal quantity = new BigDecimal("0"); /* 数量*/
private BigDecimal unitWeight = new BigDecimal("0"); /* 单重*/
private BigDecimal weight = new BigDecimal("0"); /* 重量*/
private Long parentId = new Long(0); /* 调度单ID*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName("ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ACCOUNT_CODE);
eiColumn.setDescName("企业编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
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);
eiColumn = new EiColumn(FIELD_DELETE_FLAG);
eiColumn.setDescName("0-未删除,1-已删除");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CALLOUT_WH_CODE);
eiColumn.setDescName("调出仓库编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CALLOUT_WH_NAME);
eiColumn.setDescName("调出仓库名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CALLIN_WH_CODE);
eiColumn.setDescName("调入仓库编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CALLIN_WH_NAME);
eiColumn.setDescName("调入仓库名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_RECORD_ID);
eiColumn.setDescName("存货档案id");
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_SPEC);
eiColumn.setDescName("规格");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_LENGTH);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12);
eiColumn.setDescName("长");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_WIDTH);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12);
eiColumn.setDescName("宽");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_THICK);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12);
eiColumn.setDescName("厚");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_QUANTITY);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(20);
eiColumn.setDescName("数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UNIT_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(17);
eiColumn.setDescName("单重");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(17);
eiColumn.setDescName("重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PARENT_ID);
eiColumn.setDescName("调度单ID");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HGKC013A() {
initMetaData();
}
/**
* get the id - ID.
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id - ID.
*
* @param id - ID
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the accountCode - 企业编码.
* @return the accountCode
*/
public String getAccountCode() {
return this.accountCode;
}
/**
* set the accountCode - 企业编码.
*
* @param accountCode - 企业编码
*/
public void setAccountCode(String accountCode) {
this.accountCode = accountCode;
}
/**
* 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 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 deleteFlag - 0-未删除,1-已删除.
* @return the deleteFlag
*/
public Integer getDeleteFlag() {
return this.deleteFlag;
}
/**
* set the deleteFlag - 0-未删除,1-已删除.
*
* @param deleteFlag - 0-未删除,1-已删除
*/
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
/**
* get the calloutWhCode - 调出仓库编码.
* @return the calloutWhCode
*/
public String getCalloutWhCode() {
return this.calloutWhCode;
}
/**
* set the calloutWhCode - 调出仓库编码.
*
* @param calloutWhCode - 调出仓库编码
*/
public void setCalloutWhCode(String calloutWhCode) {
this.calloutWhCode = calloutWhCode;
}
/**
* get the calloutWhName - 调出仓库名称.
* @return the calloutWhName
*/
public String getCalloutWhName() {
return this.calloutWhName;
}
/**
* set the calloutWhName - 调出仓库名称.
*
* @param calloutWhName - 调出仓库名称
*/
public void setCalloutWhName(String calloutWhName) {
this.calloutWhName = calloutWhName;
}
/**
* get the callinWhCode - 调入仓库编码.
* @return the callinWhCode
*/
public String getCallinWhCode() {
return this.callinWhCode;
}
/**
* set the callinWhCode - 调入仓库编码.
*
* @param callinWhCode - 调入仓库编码
*/
public void setCallinWhCode(String callinWhCode) {
this.callinWhCode = callinWhCode;
}
/**
* get the callinWhName - 调入仓库名称.
* @return the callinWhName
*/
public String getCallinWhName() {
return this.callinWhName;
}
/**
* set the callinWhName - 调入仓库名称.
*
* @param callinWhName - 调入仓库名称
*/
public void setCallinWhName(String callinWhName) {
this.callinWhName = callinWhName;
}
/**
* get the inventRecordId - 存货档案id.
* @return the inventRecordId
*/
public Long getInventRecordId() {
return this.inventRecordId;
}
/**
* set the inventRecordId - 存货档案id.
*
* @param inventRecordId - 存货档案id
*/
public void setInventRecordId(Long inventRecordId) {
this.inventRecordId = inventRecordId;
}
/**
* get the inventType - 存货类型.
* @return the inventType
*/
public String getInventType() {
return this.inventType;
}
/**
* set the inventType - 存货类型.
*
* @param inventType - 存货类型
*/
public void setInventType(String 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 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 width - 宽.
* @return the width
*/
public BigDecimal getWidth() {
return this.width;
}
/**
* set the width - 宽.
*
* @param width - 宽
*/
public void setWidth(BigDecimal width) {
this.width = width;
}
/**
* 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 quantity - 数量.
* @return the quantity
*/
public BigDecimal getQuantity() {
return this.quantity;
}
/**
* set the quantity - 数量.
*
* @param quantity - 数量
*/
public void setQuantity(BigDecimal quantity) {
this.quantity = quantity;
}
/**
* get the unitWeight - 单重.
* @return the unitWeight
*/
public BigDecimal getUnitWeight() {
return this.unitWeight;
}
/**
* set the unitWeight - 单重.
*
* @param unitWeight - 单重
*/
public void setUnitWeight(BigDecimal unitWeight) {
this.unitWeight = unitWeight;
}
/**
* get the weight - 重量.
* @return the weight
*/
public BigDecimal getWeight() {
return this.weight;
}
/**
* set the weight - 重量.
*
* @param weight - 重量
*/
public void setWeight(BigDecimal weight) {
this.weight = weight;
}
/**
* get the parentId - 调度单ID.
* @return the parentId
*/
public Long getParentId() {
return this.parentId;
}
/**
* set the parentId - 调度单ID.
*
* @param parentId - 调度单ID
*/
public void setParentId(Long parentId) {
this.parentId = parentId;
}
/**
* 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));
setAccountCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ACCOUNT_CODE)), accountCode));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
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));
setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
setCalloutWhCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CALLOUT_WH_CODE)), calloutWhCode));
setCalloutWhName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CALLOUT_WH_NAME)), calloutWhName));
setCallinWhCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CALLIN_WH_CODE)), callinWhCode));
setCallinWhName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CALLIN_WH_NAME)), callinWhName));
setInventRecordId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_INVENT_RECORD_ID)), inventRecordId));
setInventType(StringUtils.defaultIfEmpty(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));
setSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SPEC)), spec));
setLength(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_LENGTH)), length));
setWidth(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_WIDTH)), width));
setThick(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_THICK)), thick));
setQuantity(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_QUANTITY)), quantity));
setUnitWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_UNIT_WEIGHT)), unitWeight));
setWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_WEIGHT)), weight));
setParentId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_PARENT_ID)), parentId));
}
/**
* 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_ACCOUNT_CODE, StringUtils.toString(accountCode, eiMetadata.getMeta(FIELD_ACCOUNT_CODE)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
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)));
map.put(FIELD_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG)));
map.put(FIELD_CALLOUT_WH_CODE, StringUtils.toString(calloutWhCode, eiMetadata.getMeta(FIELD_CALLOUT_WH_CODE)));
map.put(FIELD_CALLOUT_WH_NAME, StringUtils.toString(calloutWhName, eiMetadata.getMeta(FIELD_CALLOUT_WH_NAME)));
map.put(FIELD_CALLIN_WH_CODE, StringUtils.toString(callinWhCode, eiMetadata.getMeta(FIELD_CALLIN_WH_CODE)));
map.put(FIELD_CALLIN_WH_NAME, StringUtils.toString(callinWhName, eiMetadata.getMeta(FIELD_CALLIN_WH_NAME)));
map.put(FIELD_INVENT_RECORD_ID, StringUtils.toString(inventRecordId, eiMetadata.getMeta(FIELD_INVENT_RECORD_ID)));
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_SPEC, StringUtils.toString(spec, eiMetadata.getMeta(FIELD_SPEC)));
map.put(FIELD_LENGTH, StringUtils.toString(length, eiMetadata.getMeta(FIELD_LENGTH)));
map.put(FIELD_WIDTH, StringUtils.toString(width, eiMetadata.getMeta(FIELD_WIDTH)));
map.put(FIELD_THICK, StringUtils.toString(thick, eiMetadata.getMeta(FIELD_THICK)));
map.put(FIELD_QUANTITY, StringUtils.toString(quantity, eiMetadata.getMeta(FIELD_QUANTITY)));
map.put(FIELD_UNIT_WEIGHT, StringUtils.toString(unitWeight, eiMetadata.getMeta(FIELD_UNIT_WEIGHT)));
map.put(FIELD_WEIGHT, StringUtils.toString(weight, eiMetadata.getMeta(FIELD_WEIGHT)));
map.put(FIELD_PARENT_ID, StringUtils.toString(parentId, eiMetadata.getMeta(FIELD_PARENT_ID)));
return map;
}
}
package com.baosight.hggp.hg.kc.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.kc.domain.*;
import com.baosight.hggp.hg.kc.tools.HGKCTools;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.StringUtils;
import com.baosight.hggp.util.contants.ACConstants;
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.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/5/29
*/
public class ServiceHGKC013 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGKC013.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo = super.query(inInfo,HGKC013.QUERY,new HGKC013());
inInfo.getBlock(EiConstant.resultBlock).setBlockMeta(new HGKC013().eiMetadata);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID,DdynamicEnum.WH_RECORD_BOX_BLOCK_ID));
return inInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGKC013.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
String receiptDate = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGKC013.FIELD_RECEIPT_DATE);
if (StringUtils.isNotEmpty(receiptDate)){
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGKC013.FIELD_RECEIPT_DATE, DateUtils.formatShort(receiptDate));
}
return super.query(inInfo,HGKC013.QUERY,new HGKC013());
}
@OperationLogAnnotation(operModul = "调拨单",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
int i = 0;
try {
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HGKC013 hgkc013 = new HGKC013();
hgkc013.fromMap(map);
if (hgkc013.getStatus()==1) {
throw new PlatException("单据状态为已提交,不能删除!");
}
hgkc013.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HGKC013.DELETE_FLAG, hgkc013);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")});
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "销售出库明细",operType = "保存",operDesc = "保存操作")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据
for (Map resultRow : resultRows) {
HGKC013 hgkc013 = new HGKC013();
hgkc013.fromMap(resultRow);
if (hgkc013.getId() == null || hgkc013.getId() == 0) {
this.add(hgkc013);
} else {
if (hgkc013.getStatus()==1) {
throw new PlatException("单据状态为已提交,不能修改!");
}
this.modify(hgkc013);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HGKC013 hgkc013) {
hgkc013.setAllotNo(SequenceGenerator.getNextSequence(HGConstant.SequenceId.ALLOT_NO));
DaoUtils.insert(HGKC013.INSERT, hgkc013);
}
/**
* 修改操作
*/
public void modify(HGKC013 hgkc013) {
DaoUtils.update(HGKC013.UPDATE, hgkc013);
}
@OperationLogAnnotation(operModul = "调拨单",operType = "修改",operDesc = "修改状态操作")
public EiInfo updateStatus(EiInfo inInfo){
int i = 0;
try {
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HGKC013 hgkc013 = new HGKC013();
hgkc013.fromMap(map);
HGKC013 kc013 = HGKCTools.HgKc013.getId(hgkc013.getId());
List<HGKC013A> list = HGKCTools.HgKc013.getDetail(hgkc013.getId());
addKC006(kc013,list);
addKC007(kc013,list);
DaoUtils.update(HGKC013.UPDATE_STATUS, hgkc013);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.update", "修改")});
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "提交失败");
return inInfo;
}
return inInfo;
}
public void addKC006(HGKC013 hgkc013, List<HGKC013A> hgkc013AList){
HGKC006 hgkc006 = new HGKC006();
hgkc006.setOtherEnterNo(SequenceGenerator.getNextSequence(HGConstant.SequenceId.OTHER_ENTER_NO));
//UserVO userVO = HGCWTools.HgCw002.getUserCompany();
hgkc006.setCompanyCode(hgkc013.getCallinCompanyCode());
hgkc006.setCompanyName(hgkc013.getCallinCompanyName());
hgkc006.setOtherEnterDate(DateUtils.formatShort(DateUtils.date()));
hgkc006.setWhCode(hgkc013.getCallinWhCode());
hgkc006.setWhName(hgkc013.getCallinWhName());
hgkc006.setSource(3);
hgkc006.setSubmitStatus(0);
DaoUtils.insert(HGKC006.INSERT, hgkc006);
List<HGKC006> list = this.dao.query("HGKC006.queryList", hgkc006.toMap());
if (list.size()>0){
hgkc006 = (HGKC006) list.get(0);
for (HGKC013A hgkc013A : hgkc013AList) {
HGKC006A hgkc006A = new HGKC006A();
hgkc006A.setPrimaryId(hgkc006.getId());
hgkc006A.setCompanyCode(hgkc006.getCompanyCode());
hgkc006A.setCompanyName(hgkc006.getCompanyName());
hgkc006A.setOtherEnterDate(hgkc006.getOtherEnterDate());
hgkc006A.setOtherEnterNo(hgkc006.getOtherEnterNo());
hgkc006A.setWhCode(hgkc013A.getCallinWhCode());
hgkc006A.setWhName(hgkc013A.getCallinWhName());
hgkc006A.setInventRecordId(hgkc013A.getInventRecordId());
hgkc006A.setInventType(hgkc013A.getInventType());
hgkc006A.setInventCode(hgkc013A.getInventCode());
hgkc006A.setInventName(hgkc013A.getInventName());
hgkc006A.setInvQty(hgkc013A.getQuantity());
hgkc006A.setInvUnitWeight(hgkc013A.getUnitWeight());
hgkc006A.setInvWeight(hgkc013A.getWeight());
hgkc006A.setPartLength(hgkc013A.getLength());
hgkc006A.setPartWidth(hgkc013A.getWidth());
hgkc006A.setPartThick(hgkc013A.getThick());
hgkc006A.setPartSpec(hgkc013A.getSpec());
hgkc006A.setSource(3);
DaoUtils.insert(HGKC006A.INSERT, hgkc006A);
}
}
}
public void addKC007(HGKC013 hgkc013, List<HGKC013A> hgkc013AList){
HGKC007 hgkc007 = new HGKC007();
hgkc007.setOtherOutNo(SequenceGenerator.getNextSequence(HGConstant.SequenceId.OTHER_OUT_NO));
//UserVO userVO = HGCWTools.HgCw002.getUserCompany();
hgkc007.setCompanyCode(hgkc013.getCalloutCompanyCode());
hgkc007.setCompanyName(hgkc013.getCalloutCompanyName());
hgkc007.setOtherOutDate(DateUtils.formatShort(DateUtils.date()));
hgkc007.setWhCode(hgkc013.getCalloutWhCode());
hgkc007.setWhName(hgkc013.getCalloutWhName());
hgkc007.setSource(3);
hgkc007.setSubmitStatus(0);
DaoUtils.insert(HGKC007.INSERT, hgkc007);
List<HGKC007> list = this.dao.query("HGKC007.queryList", hgkc007.toMap());
if (list.size()>0){
hgkc007 = (HGKC007) list.get(0);
for (HGKC013A hgkc013A : hgkc013AList) {
HGKC007A hgkc007A = new HGKC007A();
hgkc007A.setPrimaryId(hgkc007.getId());
hgkc007A.setCompanyCode(hgkc007.getCompanyCode());
hgkc007A.setCompanyName(hgkc007.getCompanyName());
hgkc007A.setOtherOutDate(hgkc007.getOtherOutDate());
hgkc007A.setOtherOutNo(hgkc007.getOtherOutNo());
hgkc007A.setWhCode(hgkc013A.getCallinWhCode());
hgkc007A.setWhName(hgkc013A.getCallinWhName());
hgkc007A.setInventRecordId(hgkc013A.getInventRecordId());
hgkc007A.setInventType(hgkc013A.getInventType());
hgkc007A.setInventCode(hgkc013A.getInventCode());
hgkc007A.setInventName(hgkc013A.getInventName());
hgkc007A.setInvQty(hgkc013A.getQuantity());
hgkc007A.setInvUnitWeight(hgkc013A.getUnitWeight());
hgkc007A.setInvWeight(hgkc013A.getWeight());
hgkc007A.setPartLength(hgkc013A.getLength());
hgkc007A.setPartWidth(hgkc013A.getWidth());
hgkc007A.setPartThick(hgkc013A.getThick());
hgkc007A.setPartSpec(hgkc013A.getSpec());
hgkc007A.setSource(3);
DaoUtils.insert(HGKC007A.INSERT, hgkc007A);
}
}
}
}
package com.baosight.hggp.hg.kc.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.kc.domain.HGKC010;
import com.baosight.hggp.hg.kc.domain.HGKC013;
import com.baosight.hggp.hg.kc.domain.HGKC013A;
import com.baosight.hggp.hg.kc.tools.HGKCTools;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.MapUtils;
import com.baosight.hggp.util.contants.ACConstants;
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.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.*;
/**
* @author LiuYang
* @version 1.0 2024/5/29
*/
public class ServiceHGKC013A extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
Map map = EiInfoUtils.getFirstRow(inInfo);
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGKC013A.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo = super.query(inInfo, HGKC013A.QUERY, new HGKC013A());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID,DdynamicEnum.INVENT_TYPE_BOX_BLOCK_ID));
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_CODE_BOX_BLOCK_ID,DdynamicEnum.SPEC_BOX_BLOCK_ID),
new HashMap<String,Object>(){{
put(HGKC013.FIELD_COMPANY_CODE,map.get(HGKC013.FIELD_CALLOUT_COMPANY_CODE));
put(HGKC010.FIELD_WH_CODE,map.get(HGKC013A.FIELD_CALLOUT_WH_CODE));
put(HGKC013A.FIELD_DELETE_FLAG,CommonConstant.YesNo.NO_0);
}}, false);
return inInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGKC013A.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
return super.query(inInfo, HGKC013A.QUERY,new HGKC013A());
}
@OperationLogAnnotation(operModul = "调拨单详情",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
int i = 0;
try {
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
int status = Integer.parseInt(inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGKC013.FIELD_STATUS));
if (status==1) {
throw new PlatException("单据状态为已提交,不能删除!");
}
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HGKC013A hgkc013a = new HGKC013A();
hgkc013a.fromMap(map);
hgkc013a.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HGKC013A.DELETE_FLAG, hgkc013a);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")});
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "调拨单详情",operType = "保存",operDesc = "保存操作")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
int status = Integer.parseInt(inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGKC013.FIELD_STATUS));
String calloutWhCode = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGKC013A.FIELD_CALLOUT_WH_CODE);
String calloutWhName = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGKC013A.FIELD_CALLOUT_WH_NAME);
String callinWhCode = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGKC013A.FIELD_CALLIN_WH_CODE);
String callinWhName = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGKC013A.FIELD_CALLIN_WH_NAME);
Long parentId = Long.parseLong(inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGKC013A.FIELD_PARENT_ID));
if (status==1) {
throw new PlatException("单据状态为已提交,不能保存!");
}
// 写入数据
for (Map resultRow : resultRows) {
HGKC013A hgkc013a = new HGKC013A();
hgkc013a.fromMap(resultRow);
hgkc013a.setParentId(parentId);
hgkc013a.setCalloutWhCode(calloutWhCode);
hgkc013a.setCalloutWhName(calloutWhName);
hgkc013a.setCallinWhCode(callinWhCode);
hgkc013a.setCallinWhName(callinWhName);
Object object = this.dao.get(HGKC013.QUERY,HGKC010.FIELD_ID,parentId);
if (object!=null){
Map map1 = MapUtils.toMap(object);
HGKC010 hgkc010 = HGKCTools.HgKc010.get(map1.get(HGKC013.FIELD_COMPANY_CODE).toString(),map1.get(HGKC013.FIELD_CALLOUT_WH_CODE).toString(),hgkc013a.getInventRecordId());
if (hgkc010==null){
throw new PlatException("实时库存不存在!");
}
int result = hgkc013a.getQuantity().compareTo(hgkc010.getInvQty());
if ( result > 0){
throw new PlatException("实时库存数量不够,无法保存!");
}
}
if (hgkc013a.getId() == null || hgkc013a.getId() == 0) {
this.add(hgkc013a);
} else {
this.modify(hgkc013a);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HGKC013A hgkc013a) {
DaoUtils.insert(HGKC013A.INSERT, hgkc013a);
}
/**
* 修改操作
*/
public void modify(HGKC013A hgkc013a) {
DaoUtils.update(HGKC013A.UPDATE, hgkc013a);
}
/**
* 下拉框
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "仓库档案",operType = "查询",operDesc = "下拉框")
public EiInfo queryComboBox(EiInfo inInfo) {
Map queryRow = EiInfoUtils.getFirstRow(inInfo);
List<DdynamicEnum> list = new ArrayList<>();
list.add(DdynamicEnum.INVENT_ALL_BOX_BLOCK_ID);
boolean isSplicingSymbol = true;
if (inInfo.getString("isSplicingSymbol") != null) {
isSplicingSymbol = Boolean.parseBoolean(inInfo.getString("isSplicingSymbol"));
} else if (queryRow.get("isSplicingSymbol") != null) {
isSplicingSymbol = MapUtils.getBoolean(queryRow, "isSplicingSymbol");
}
CommonMethod.initBlock(inInfo, list, EiInfoUtils.getFirstRow(inInfo), isSplicingSymbol);
return inInfo;
}
}
......@@ -444,4 +444,94 @@
ID = #id#
</update>
<select id="queryList" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.kc.domain.HGKC006">
SELECT
ID as "id",
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 记录创建者 -->
CREATED_NAME as "createdName", <!-- 记录创建名称 -->
CREATED_TIME as "createdTime", <!-- 记录创建时间 -->
UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DELETE_FLAG as "deleteFlag", <!-- 0-未删除,1-已删除 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
OTHER_ENTER_DATE as "otherEnterDate", <!-- 其他入库日期 -->
OTHER_ENTER_NO as "otherEnterNo", <!-- 其他入库单号 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 -->
OTHER_ENTER_NO_OLD as "otherEnterNoOld", <!-- 其他入库单号(旧) -->
REMARK as "remark", <!-- 备注 -->
FACTORY_CODE as "factoryCode", <!-- 工厂代码 -->
PROD_ORDER_NO as "prodOrderNo", <!-- 生产订单号 -->
PROD_TASK_NO as "prodTaskNo", <!-- 生产任务号 -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
PRDT_TYPE as "prdtType", <!-- 产品类型 -->
PRDT_CODE as "prdtCode", <!-- 产品编码 -->
PRDT_NAME as "prdtName", <!-- 产品名称 -->
PRDT_LENGTH as "prdtLength", <!-- 产品-长 -->
PRDT_WIDTH as "prdtWidth", <!-- 产品-宽 -->
PRDT_THICK as "prdtThick", <!-- 产品-厚 -->
PRDT_SPEC as "prdtSpec", <!-- 产品规格 -->
PART_TYPE as "partType", <!-- 零件类型 -->
PART_CODE as "partCode", <!-- 零件编码 -->
PART_NAME as "partName", <!-- 零件名称 -->
PART_LENGTH as "partLength", <!-- 零件-长 -->
PART_WIDTH as "partWidth", <!-- 零件-宽 -->
PART_THICK as "partThick", <!-- 零件-厚 -->
PART_SPEC as "partSpec", <!-- 零件规格 -->
SUBMIT_STATUS as "submitStatus", <!-- 提交状态 -->
SOURCE as "source" <!-- 数据来源 -->
FROM ${hggpSchema}.HGKC006 WHERE 1=1 and DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="otherEnterDate">
OTHER_ENTER_DATE = #otherEnterDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="otherEnterNo">
OTHER_ENTER_NO = #otherEnterNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode">
WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whName">
WH_NAME = #whName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="otherEnterNoOld">
OTHER_ENTER_NO_OLD = #otherEnterNoOld#
</isNotEmpty>
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
</isEmpty>
</dynamic>
</select>
</sqlMap>
......@@ -442,4 +442,94 @@
ID = #id#
</update>
<select id="queryList" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.kc.domain.HGKC007">
SELECT
ID as "id",
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 记录创建者 -->
CREATED_NAME as "createdName", <!-- 记录创建名称 -->
CREATED_TIME as "createdTime", <!-- 记录创建时间 -->
UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DELETE_FLAG as "deleteFlag", <!-- 0-未删除,1-已删除 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
OTHER_OUT_DATE as "otherOutDate", <!-- 其他出库日期 -->
OTHER_OUT_NO as "otherOutNo", <!-- 其他出库单号 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 -->
OTHER_OUT_NO_OLD as "otherOutNoOld", <!-- 其他出库单号(旧) -->
REMARK as "remark", <!-- 备注 -->
FACTORY_CODE as "factoryCode", <!-- 工厂代码 -->
PROD_ORDER_NO as "prodOrderNo", <!-- 生产订单号 -->
PROD_TASK_NO as "prodTaskNo", <!-- 生产任务号 -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
PRDT_TYPE as "prdtType", <!-- 产品类型 -->
PRDT_CODE as "prdtCode", <!-- 产品编码 -->
PRDT_NAME as "prdtName", <!-- 产品名称 -->
PRDT_LENGTH as "prdtLength", <!-- 产品-长 -->
PRDT_WIDTH as "prdtWidth", <!-- 产品-宽 -->
PRDT_THICK as "prdtThick", <!-- 产品-厚 -->
PRDT_SPEC as "prdtSpec", <!-- 产品规格 -->
PART_TYPE as "partType", <!-- 零件类型 -->
PART_CODE as "partCode", <!-- 零件编码 -->
PART_NAME as "partName", <!-- 零件名称 -->
PART_LENGTH as "partLength", <!-- 零件-长 -->
PART_WIDTH as "partWidth", <!-- 零件-宽 -->
PART_THICK as "partThick", <!-- 零件-厚 -->
PART_SPEC as "partSpec", <!-- 零件规格 -->
SUBMIT_STATUS as "submitStatus", <!-- 提交状态 -->
SOURCE as "source" <!-- 数据来源 -->
FROM ${hggpSchema}.HGKC007 WHERE 1=1 and DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="otherOutDate">
OTHER_OUT_DATE = #otherOutDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="otherOutNo">
OTHER_OUT_NO = #otherOutNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode">
WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whName">
WH_NAME = #whName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="otherOutNoOld">
OTHER_OUT_NO_OLD = #otherOutNoOld#
</isNotEmpty>
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
</isEmpty>
</dynamic>
</select>
</sqlMap>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <!-- table information
Generate time : 2024-05-29 11:02:29
Version : 1.0
schema : hggp
tableName : HGKC013
ID BIGINT NOT NULL primarykey,
ACCOUNT_CODE VARCHAR,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR NOT NULL,
CREATED_NAME VARCHAR NOT NULL,
CREATED_TIME VARCHAR NOT NULL,
UPDATED_BY VARCHAR NOT NULL,
UPDATED_NAME VARCHAR NOT NULL,
UPDATED_TIME VARCHAR NOT NULL,
DELETE_FLAG TINYINT,
COMPANY_CODE VARCHAR,
COMPANY_NAME VARCHAR,
ALLOT_TYPE VARCHAR,
RECEIPT_DATE VARCHAR,
ALLOT_NO VARCHAR,
CALLOUT_COMPANY_CODE VARCHAR,
CALLOUT_COMPANY_NAME VARCHAR,
CALLIN_COMPANY_CODE VARCHAR,
CALLIN_COMPANY_NAME VARCHAR,
CALLOUT_WH_CODE VARCHAR,
CALLOUT_WH_NAME VARCHAR,
CALLIN_WH_CODE VARCHAR,
CALLIN_WH_NAME VARCHAR,
STATUS TINYINT
-->
<sqlMap namespace="HGKC013">
<typeAlias alias="HGKC013" type="com.baosight.hggp.hg.kc.domain.HGKC013"/>
<typeAlias alias="hashMap" type="java.util.HashMap"/>
<sql id="column">
ID as "id",
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 记录创建者 -->
CREATED_NAME as "createdName", <!-- 记录创建名称 -->
CREATED_TIME as "createdTime", <!-- 记录创建时间 -->
UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DELETE_FLAG as "deleteFlag", <!-- 0-未删除,1-已删除 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
ALLOT_TYPE as "allotType", <!-- 调拨类型 -->
RECEIPT_DATE as "receiptDate", <!-- 单据日期 -->
ALLOT_NO as "allotNo", <!-- 调拨库单号 -->
CALLOUT_COMPANY_CODE as "calloutCompanyCode", <!-- 调出公司编码 -->
CALLOUT_COMPANY_NAME as "calloutCompanyName", <!-- 调出公司名称 -->
CALLIN_COMPANY_CODE as "callinCompanyCode", <!-- 调入公司编码 -->
CALLIN_COMPANY_NAME as "callinCompanyName", <!-- 调入公司名称 -->
CALLOUT_WH_CODE as "calloutWhCode", <!-- 调出仓库编码 -->
CALLOUT_WH_NAME as "calloutWhName", <!-- 调出仓库名称 -->
CALLIN_WH_CODE as "callinWhCode", <!-- 调入仓库编码 -->
CALLIN_WH_NAME as "callinWhName", <!-- 调入仓库名称 -->
STATUS as "status" <!-- 状态0-未提交,1-已提交 -->
</sql>
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="allotType">
ALLOT_TYPE = #allotType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiptDate">
RECEIPT_DATE = #receiptDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="allotNo">
ALLOT_NO LIKE CONCAT('%',#allotNo#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="calloutCompanyCode">
CALLOUT_COMPANY_CODE = #calloutCompanyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="calloutCompanyName">
CALLOUT_COMPANY_NAME LIKE CONCAT('%',#calloutCompanyName#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="callinCompanyCode">
CALLIN_COMPANY_CODE = #callinCompanyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="callinCompanyName">
CALLIN_COMPANY_NAME LIKE CONCAT('%',#callinCompanyName#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="calloutWhCode">
CALLOUT_WH_CODE = #calloutWhCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="calloutWhName">
CALLOUT_WH_NAME LIKE CONCAT('%',#calloutWhName#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="callinWhCode">
CALLIN_WH_CODE = #callinWhCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="callinWhName">
CALLIN_WH_NAME LIKE CONCAT('%',#callinWhName#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
</sql>
<!-- 公共修改字段 -->
<sql id="updateRevise">
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime# <!-- 记录修改时间 -->
</sql>
<select id="query" parameterClass="hashMap" resultClass="HGKC013">
SELECT
<include refid="column"/>
FROM ${hggpSchema}.HGKC013 WHERE 1=1
<include refid="condition"/>
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
RECEIPT_DATE desc, ID asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGKC013 WHERE 1=1
<include refid="condition"/>
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="allotType">
ALLOT_TYPE = #allotType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiptDate">
RECEIPT_DATE = #receiptDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="allotNo">
ALLOT_NO = #allotNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="calloutCompanyCode">
CALLOUT_COMPANY_CODE = #calloutCompanyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="calloutCompanyName">
CALLOUT_COMPANY_NAME = #calloutCompanyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="callinCompanyCode">
CALLIN_COMPANY_CODE = #callinCompanyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="callinCompanyName">
CALLIN_COMPANY_NAME = #callinCompanyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="calloutWhCode">
CALLOUT_WH_CODE = #calloutWhCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="calloutWhName">
CALLOUT_WH_NAME = #calloutWhName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="callinWhCode">
CALLIN_WH_CODE = #callinWhCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="callinWhName">
CALLIN_WH_NAME = #callinWhName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGKC013 (ID,
ACCOUNT_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 -->
UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
DELETE_FLAG, <!-- 0-未删除,1-已删除 -->
COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 -->
ALLOT_TYPE, <!-- 调拨类型 -->
RECEIPT_DATE, <!-- 单据日期 -->
ALLOT_NO, <!-- 调拨库单号 -->
CALLOUT_COMPANY_CODE, <!-- 调出公司编码 -->
CALLOUT_COMPANY_NAME, <!-- 调出公司名称 -->
CALLIN_COMPANY_CODE, <!-- 调入公司编码 -->
CALLIN_COMPANY_NAME, <!-- 调入公司名称 -->
CALLOUT_WH_CODE, <!-- 调出仓库编码 -->
CALLOUT_WH_NAME, <!-- 调出仓库名称 -->
CALLIN_WH_CODE, <!-- 调入仓库编码 -->
CALLIN_WH_NAME, <!-- 调入仓库名称 -->
STATUS <!-- 状态0-未提交,1-已提交 -->
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#,
#updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #allotType#, #receiptDate#, #allotNo#,
#calloutCompanyCode#, #calloutCompanyName#, #callinCompanyCode#, #callinCompanyName#, #calloutWhCode#,
#calloutWhName#, #callinWhCode#, #callinWhName#, #status#)
</insert>
<delete id="delete">
DELETE
FROM ${hggpSchema}.HGKC013
WHERE ID = #id#
</delete>
<update id="deleteFlag">
UPDATE ${hggpSchema}.HGKC013
SET
DELETE_FLAG = #deleteFlag#, <!-- 0-未删除,1-已删除 -->
<include refid="updateRevise"/>
WHERE ID = #id#
</update>
<update id="update">
UPDATE ${hggpSchema}.HGKC013
SET
ACCOUNT_CODE = #accountCode#, <!-- 企业编码 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
CREATED_BY = #createdBy#, <!-- 记录创建者 -->
CREATED_NAME = #createdName#, <!-- 记录创建名称 -->
CREATED_TIME = #createdTime#, <!-- 记录创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 0-未删除,1-已删除 -->
COMPANY_CODE = #companyCode#, <!-- 公司编码 -->
COMPANY_NAME = #companyName#, <!-- 公司名称 -->
ALLOT_TYPE = #allotType#, <!-- 调拨类型 -->
RECEIPT_DATE = #receiptDate#, <!-- 单据日期 -->
ALLOT_NO = #allotNo#, <!-- 调拨库单号 -->
CALLOUT_COMPANY_CODE = #calloutCompanyCode#, <!-- 调出公司编码 -->
CALLOUT_COMPANY_NAME = #calloutCompanyName#, <!-- 调出公司名称 -->
CALLIN_COMPANY_CODE = #callinCompanyCode#, <!-- 调入公司编码 -->
CALLIN_COMPANY_NAME = #callinCompanyName#, <!-- 调入公司名称 -->
CALLOUT_WH_CODE = #calloutWhCode#, <!-- 调出仓库编码 -->
CALLOUT_WH_NAME = #calloutWhName#, <!-- 调出仓库名称 -->
CALLIN_WH_CODE = #callinWhCode#, <!-- 调入仓库编码 -->
CALLIN_WH_NAME = #callinWhName#, <!-- 调入仓库名称 -->
STATUS = #status# <!-- 状态0-未提交,1-已提交 -->
WHERE
ID = #id#
</update>
<update id="updateStatus">
UPDATE ${hggpSchema}.HGKC013
SET
STATUS = #status#, <!-- 状态0-未提交,1-已提交 -->
<include refid="updateRevise"/>
WHERE
ID = #id#
</update>
</sqlMap>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <!-- table information
Generate time : 2024-05-29 15:30:19
Version : 1.0
schema : hggp
tableName : HGKC013A
ID BIGINT NOT NULL primarykey,
ACCOUNT_CODE VARCHAR,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
DELETE_FLAG TINYINT,
CALLOUT_WH_CODE VARCHAR,
CALLOUT_WH_NAME VARCHAR,
CALLIN_WH_CODE VARCHAR,
CALLIN_WH_NAME VARCHAR,
INVENT_RECORD_ID BIGINT,
INVENT_TYPE VARCHAR,
INVENT_CODE VARCHAR NOT NULL,
INVENT_NAME VARCHAR NOT NULL,
SPEC VARCHAR,
LENGTH DECIMAL,
WIDTH DECIMAL,
THICK DECIMAL,
QUANTITY DECIMAL,
UNIT_WEIGHT DECIMAL,
WEIGHT DECIMAL,
PARENT_ID BIGINT
-->
<sqlMap namespace="HGKC013A">
<typeAlias alias="HGKC013A" type="com.baosight.hggp.hg.kc.domain.HGKC013A"/>
<sql id="column">
ID as "id", <!-- ID -->
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 记录创建者 -->
CREATED_NAME as "createdName", <!-- 记录创建名称 -->
CREATED_TIME as "createdTime", <!-- 记录创建时间 -->
UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DELETE_FLAG as "deleteFlag", <!-- 0-未删除,1-已删除 -->
CALLOUT_WH_CODE as "calloutWhCode", <!-- 调出仓库编码 -->
CALLOUT_WH_NAME as "calloutWhName", <!-- 调出仓库名称 -->
CALLIN_WH_CODE as "callinWhCode", <!-- 调入仓库编码 -->
CALLIN_WH_NAME as "callinWhName", <!-- 调入仓库名称 -->
INVENT_RECORD_ID as "inventRecordId", <!-- 存货档案id -->
INVENT_TYPE as "inventType", <!-- 存货类型 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_NAME as "inventName", <!-- 存货名称 -->
SPEC as "spec", <!-- 规格 -->
LENGTH as "length", <!-- 长 -->
WIDTH as "width", <!-- 宽 -->
THICK as "thick", <!-- 厚 -->
QUANTITY as "quantity", <!-- 数量 -->
UNIT_WEIGHT as "unitWeight", <!-- 单重 -->
WEIGHT as "weight", <!-- 重量 -->
PARENT_ID as "parentId" <!-- 调度单ID -->
</sql>
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="calloutWhCode">
CALLOUT_WH_CODE = #calloutWhCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="calloutWhName">
CALLOUT_WH_NAME = #calloutWhName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="callinWhCode">
CALLIN_WH_CODE = #callinWhCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="callinWhName">
CALLIN_WH_NAME = #callinWhName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventRecordId">
INVENT_RECORD_ID = #inventRecordId#
</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="spec">
SPEC = #spec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="length">
LENGTH = #length#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="width">
WIDTH = #width#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="thick">
THICK = #thick#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="quantity">
QUANTITY = #quantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unitWeight">
UNIT_WEIGHT = #unitWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="weight">
WEIGHT = #weight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentId">
PARENT_ID = #parentId#
</isNotEmpty>
</sql>
<sql id="updateRevise">
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime# <!-- 记录修改时间 -->
</sql>
<select id="query" parameterClass="java.util.HashMap" resultClass="HGKC013A">
SELECT
<include refid="column"/>
FROM ${hggpSchema}.HGKC013A WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
CREATED_TIME desc, ID asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGKC013A WHERE 1=1
<include refid="condition" />
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="calloutWhCode">
CALLOUT_WH_CODE = #calloutWhCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="calloutWhName">
CALLOUT_WH_NAME = #calloutWhName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="callinWhCode">
CALLIN_WH_CODE = #callinWhCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="callinWhName">
CALLIN_WH_NAME = #callinWhName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventRecordId">
INVENT_RECORD_ID = #inventRecordId#
</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="spec">
SPEC = #spec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="length">
LENGTH = #length#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="width">
WIDTH = #width#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="thick">
THICK = #thick#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="quantity">
QUANTITY = #quantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unitWeight">
UNIT_WEIGHT = #unitWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="weight">
WEIGHT = #weight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentId">
PARENT_ID = #parentId#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGKC013A (ID, <!-- ID -->
ACCOUNT_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 -->
UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
DELETE_FLAG, <!-- 0-未删除,1-已删除 -->
CALLOUT_WH_CODE, <!-- 调出仓库编码 -->
CALLOUT_WH_NAME, <!-- 调出仓库名称 -->
CALLIN_WH_CODE, <!-- 调入仓库编码 -->
CALLIN_WH_NAME, <!-- 调入仓库名称 -->
INVENT_RECORD_ID, <!-- 存货档案id -->
INVENT_TYPE, <!-- 存货类型 -->
INVENT_CODE, <!-- 存货编码 -->
INVENT_NAME, <!-- 存货名称 -->
SPEC, <!-- 规格 -->
LENGTH, <!-- 长 -->
WIDTH, <!-- 宽 -->
THICK, <!-- 厚 -->
QUANTITY, <!-- 数量 -->
UNIT_WEIGHT, <!-- 单重 -->
WEIGHT, <!-- 重量 -->
PARENT_ID <!-- 调度单ID -->
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#,
#updatedTime#, #deleteFlag#, #calloutWhCode#, #calloutWhName#, #callinWhCode#, #callinWhName#, #inventRecordId#,
#inventType#, #inventCode#, #inventName#, #spec#, #length#, #width#, #thick#, #quantity#, #unitWeight#,
#weight#, #parentId#)
</insert>
<delete id="delete">
DELETE
FROM ${hggpSchema}.HGKC013A
WHERE ID = #id#
</delete>
<update id="deleteFlag">
UPDATE ${hggpSchema}.HGKC013A
SET
DELETE_FLAG = #deleteFlag#, <!-- 0-未删除,1-已删除 -->
<include refid="updateRevise"/>
WHERE ID = #id#
</update>
<update id="update">
UPDATE ${hggpSchema}.HGKC013A
SET
ACCOUNT_CODE = #accountCode#, <!-- 企业编码 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
CREATED_BY = #createdBy#, <!-- 记录创建者 -->
CREATED_NAME = #createdName#, <!-- 记录创建名称 -->
CREATED_TIME = #createdTime#, <!-- 记录创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 0-未删除,1-已删除 -->
CALLOUT_WH_CODE = #calloutWhCode#, <!-- 调出仓库编码 -->
CALLOUT_WH_NAME = #calloutWhName#, <!-- 调出仓库名称 -->
CALLIN_WH_CODE = #callinWhCode#, <!-- 调入仓库编码 -->
CALLIN_WH_NAME = #callinWhName#, <!-- 调入仓库名称 -->
INVENT_RECORD_ID = #inventRecordId#, <!-- 存货档案id -->
INVENT_TYPE = #inventType#, <!-- 存货类型 -->
INVENT_CODE = #inventCode#, <!-- 存货编码 -->
INVENT_NAME = #inventName#, <!-- 存货名称 -->
SPEC = #spec#, <!-- 规格 -->
LENGTH = #length#, <!-- 长 -->
WIDTH = #width#, <!-- 宽 -->
THICK = #thick#, <!-- 厚 -->
QUANTITY = #quantity#, <!-- 数量 -->
UNIT_WEIGHT = #unitWeight#, <!-- 单重 -->
WEIGHT = #weight#, <!-- 重量 -->
PARENT_ID = #parentId# <!-- 调度单ID -->
WHERE
ID = #id#
</update>
</sqlMap>
\ No newline at end of file
......@@ -12,10 +12,7 @@ import com.baosight.hggp.util.StringUtils;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.collections.CollectionUtils;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.*;
import java.util.stream.Collectors;
/**
......@@ -489,4 +486,26 @@ public class HGKCTools {
}
}
public static class HgKc013 {
public static HGKC013 getId(Long id) {
AssertUtils.isEmpty(Collections.singleton(id), "调拨单为空!");
Map<String, Object> paramMap = new HashMap();
paramMap.put("id", id);
paramMap.put("deleteFlag", 0);
List<HGKC013> list = DaoBase.getInstance().query(HGKC013.QUERY, paramMap);
AssertUtils.isEmpty(list, "调拨单为空!");
return list.get(0);
}
public static List<HGKC013A> getDetail(Long parentId) {
AssertUtils.isEmpty(Collections.singleton(parentId), "调拨单ID不能为空");
Map<String, Object> paramMap = new HashMap();
paramMap.put("parentId", parentId);
paramMap.put("deleteFlag", 0);
List<HGKC013A> list = DaoBase.getInstance().query(HGKC013A.QUERY, paramMap);
AssertUtils.isEmpty(list, "调拨单明细为空!");
return list;
}
}
}
......@@ -6,6 +6,7 @@ import com.baosight.iplat4j.core.ei.EiInfo;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import java.lang.reflect.Method;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.Arrays;
......@@ -202,5 +203,26 @@ public class MapUtils extends org.apache.commons.collections.MapUtils {
return newBean;
}).filter(t -> t != null).collect(Collectors.toList());
}
/**
* object 转 map
*/
public static Map<String, Object> toMap(Object obj) {
Map<String, Object> map = new HashMap<>();
Method[] methods = obj.getClass().getMethods();
for (Method method : methods) {
if (method.getName().startsWith("get")) {
try {
Object value = method.invoke(obj);
String key = method.getName().substring(3);
key = key.substring(0, 1).toLowerCase() + key.substring(1);
map.put(key, value);
} catch (Exception e) {
// Handle exception
}
}
}
return map;
}
}
$(function () {
$(".row").children().attr("class", "col-md-3");
var companyCodeBox = __eiInfo.getBlock("companyBox_block_id").getMappedRows();
var whCodeBox = __eiInfo.getBlock("wh_record_box_block_id").getMappedRows();
IPLATUI.EFGrid = {
"result": {
columns: [{
field: "operator",
title: "操作",
template: function (item) {
let auditStatus = item.status;
let template = '';
if (!isBlank(item.id)){
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showDetail(' + item.id + ',\''+item.calloutWhCode+'\',\''+item.calloutWhName+'\',\''+item.callinWhCode+'\',\''+item.callinWhName+'\','+item.status+',\''+item.calloutCompanyCode+'\')" >调拨单详情</a>';
if (auditStatus == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="updateStatus(' + item.id + ',1)" >提交</a>';
} else if (auditStatus == -1) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="updateStatus(' + item.id + ',0)" >撤回</a>';
}
}
return template;
}
}, {
field: "companyCode",
title: "公司名称",
template: function (item) {
let companyCode = item.companyCode;
for (let i = 0; i < companyCodeBox.length; i++) {
if (companyCode === companyCodeBox[i]['valueField']) {
item['companyName'] = companyCodeBox[i]['textField'];
return companyCodeBox[i]['textField'];
}
}
return companyCode;
}
}, {
field: "receiptDate",
defaultValue: currShortDate()
}, {
field: "calloutCompanyCode",
title: "调出公司名称",
/*filter: function (options) {
let allotType = options.model["allotType"];
let companyCode = options.model["companyCode"];
if (allotType === "1" && companyCode){
return _.filter(options.values, function (item) {
return item["valueField"]===companyCode;
})
}
return options.values;
},*/
template: function (item) {
let calloutCompanyCode = item.calloutCompanyCode;
for (let i = 0; i < companyCodeBox.length; i++) {
if (calloutCompanyCode === companyCodeBox[i]['valueField']) {
item['calloutCompanyName'] = companyCodeBox[i]['textField'];
return companyCodeBox[i]['textField'];
}
}
return calloutCompanyCode;
}
}, {
field: "calloutWhCode",
title: "调出仓库名称",
filter: function (options) {
let calloutCompanyCode = options.model["calloutCompanyCode"];
if (calloutCompanyCode){
return _.filter(whCodeBox, function (item) {
return item["param1Field"]===calloutCompanyCode;
})
}
return options.values;
},
template: function (item) {
let calloutWhCode = item.calloutWhCode;
for (let i = 0; i < whCodeBox.length; i++) {
if (calloutWhCode === whCodeBox[i]['valueField']) {
item['calloutWhName'] = whCodeBox[i]['textField'];
return whCodeBox[i]['textField'];
}
}
return calloutWhCode;
}
}, {
field: "callinCompanyCode",
title: "调入公司名称",
filter: function (options) {
let allotType = options.model["allotType"];
let calloutCompanyCode = options.model["calloutCompanyCode"];
if (allotType === "1" && calloutCompanyCode){
return _.filter(options.values, function (item) {
return item["valueField"]===calloutCompanyCode;
})
}
return options.values;
},
template: function (item) {
let callinCompanyCode = item.callinCompanyCode;
for (let i = 0; i < companyCodeBox.length; i++) {
if (callinCompanyCode === companyCodeBox[i]['valueField']) {
item['callinCompanyName'] = companyCodeBox[i]['textField'];
return companyCodeBox[i]['textField'];
}
}
return callinCompanyCode;
}
}, {
field: "callinWhCode",
title: "调入仓库名称",
filter: function (options) {
let calloutCompanyCode = options.model['calloutCompanyCode'];
let callinCompanyCode = options.model['callinCompanyCode'];
let calloutWhCode = options.model['calloutWhCode'];
if (callinCompanyCode == calloutCompanyCode){
return _.filter(whCodeBox, function (item) {
return item["param1Field"]===callinCompanyCode && item["valueField"]!=calloutWhCode;
})
}else if (callinCompanyCode != calloutCompanyCode){
return _.filter(whCodeBox, function (item) {
return item["param1Field"]===callinCompanyCode;
})
}
return options.values;
},
template: function (item) {
let callinWhCode = item.callinWhCode;
for (let i = 0; i < whCodeBox.length; i++) {
if (callinWhCode === whCodeBox[i]['valueField']) {
item['callinWhName'] = whCodeBox[i]['textField'];
return whCodeBox[i]['textField'];
}
}
return callinWhCode;
}
}],
loadComplete: function (grid) {
// 此 grid 对象
// 处理父子级联动,通过监听 change 事件,判断父级节点是否发生变化
grid.dataSource.bind("change", function(e) {
// 判断父级节点是否发生变化
if (e.field === "companyCode"){
loadChange(grid,e,"allotType");
}else if (e.field === "calloutCompanyCode") {
e.items[0]["calloutWhCode"]= '';
e.items[0]["calloutWhName"]= '';
e.items[0]["callinCompanyCode"]= '';
e.items[0]["callinCompanyName"]= '';
e.items[0]["callinWhCode"] = '';
e.items[0]["callinWhName"] = '';
loadChange(grid,e,"calloutWhCode");
}else if (e.field == "calloutWhCode") {
if (e.items[0]["allotType"] == 2){
e.items[0]["callinCompanyCode"]= '';
loadChange(grid,e,"callinCompanyCode");
}else if (e.items[0]["allotType"] == 1 && isBlank(e.items[0]["callinCompanyCode"])) {
e.items[0]["callinWhCode"] = '';
loadChange(grid,e,"callinCompanyCode");
}else {
e.items[0]["callinWhCode"] = '';
loadChange(grid,e,"callinWhCode");
}
}else if (e.field == "callinCompanyCode") {
e.items[0]["callinWhCode"] = '';
loadChange(grid,e,"callinWhCode");
}
});
},
onSave: function (e) {
// 阻止后台保存请求,使用自定义保存
e.preventDefault();
save();
},
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'delete' ||e.eiInfo.extAttr.methodName == 'save'){
query();
}
}
},
}
// 查询
$("#QUERY").on("click", query);
downKeyUp();
// 导出打印
//$("#PRINT").on("click", exportPrint);
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
let save = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
$.each(rows, function(index, item) {
let companyCode= item.get("companyCode");
let allotType= item.get("allotType");
let receiptDate= item.get("receiptDate");
let calloutCompanyCode= item.get("calloutCompanyCode");
let calloutWhCode= item.get("calloutWhCode");
let callinCompanyCode= item.get("callinCompanyCode");
let callinWhCode= item.get("callinWhCode");
if(isBlank(companyCode)){
message("选中的第"+(index+1)+"行\"公司名称\",不能为空!");
flag = false;
return false;
}
if(isBlank(allotType)){
message("选中的第"+(index+1)+"行\"调拨类型\",不能为空!");
flag = false;
return false;
}
if(isBlank(receiptDate)){
message("选中的第"+(index+1)+"行\"单据日期\",不能为空!");
flag = false;
return false;
}
if(isBlank(calloutCompanyCode)){
message("选中的第" + (i + 1) + "行\"调出公司名称\",不能为空!");
flag = false;
return false;
}
if(isBlank(calloutWhCode)){
message("选中的第" + (i + 1) + "行\"调出仓库名称\",不能为空!");
flag = false;
return false;
}
if(isBlank(callinCompanyCode)){
message("选中的第" + (i + 1) + "行\"调入公司名称\",不能为空!");
flag = false;
return false;
}
if(isBlank(callinWhCode)){
message("选中的第" + (i + 1) + "行\"调入仓库名称\",不能为空!");
flag = false;
return false;
}
});
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGKC013", "save", true);
}
});
}
}
function updateStatus(id,deviceStatus) {
JSUtils.confirm("确定是否\"提交\"操作? ", {
ok: function () {
let inEiInfo = new EiInfo();
inEiInfo.set("result-0-id", id);
inEiInfo.set("result-0-status", deviceStatus);
EiCommunicator.send('HGKC013', 'updateStatus', inEiInfo, {
onSuccess(response) {
if (response.status == 1){
NotificationUtil(response.msg);
query();
}else {
NotificationUtil(response.msg, "error");
}
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
}
)
}
});
}
/**
* 显示详情
*/
function showDetail(id,calloutWhCode,calloutWhName,callinWhCode,callinWhName,status,calloutCompanyCode) {
JSColorbox.open({
href: "HGKC013A?methodName=initLoad&inqu_status-0-parentId="+id+"&inqu_status-0-calloutWhCode="+calloutWhCode+"&inqu_status-0-calloutWhName="+calloutWhName+"&inqu_status-0-callinWhCode="+callinWhCode+"&inqu_status-0-callinWhName="+callinWhName+"&inqu_status-0-status="+status+"&inqu_status-0-calloutCompanyCode="+calloutCompanyCode,
title: "<div style='text-align: center;'>调拨单详情</div>",
width: "80%",
height: "80%",
});
}
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/5/29
Time: 14:20
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="调拨单">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFDatePicker blockId="inqu_status" row="0" ename="receiptDate" cname="单据日期" colWidth="3" format="yyyy-MM-dd"/>
<EF:EFInput blockId="inqu_status" row="0" ename="allotNo" cname="调拨单号" colWidth="3" placeholder="模糊查询"/>
<EF:EFInput blockId="inqu_status" row="0" ename="calloutWhName" cname="调入仓库名称" colWidth="3" placeholder="模糊查询"/>
<EF:EFInput blockId="inqu_status" row="0" ename="callinWhName" cname="调出仓库名称" colWidth="3" placeholder="模糊查询"/>
<%--<EF:EFSelect blockId="inqu_status" row="0" ename="status" cname="状态" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.hgkc.status"/>
</EF:EFSelect>
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>--%>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="150" align="center"/>
<EF:EFComboColumn ename="companyCode" enable="true" cname="公司名称" width="110" align="center"
filter="contains" readonly="true" required="true">
<EF:EFOptions blockId="companyBox_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="allotType" cname="调拨类型" width="80" align="center" enable="true" required="true">
<EF:EFCodeOption codeName="hggp.hgkc.allotType"/>
</EF:EFComboColumn>
<EF:EFColumn ename="receiptDate" cname="单据日期" enable="true" width="90" align="center"
editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFColumn ename="allotNo" cname="调拨单号" enable="false" width="120" align="center"/>
<EF:EFComboColumn ename="calloutCompanyCode" enable="true" cname="调出公司名称" width="110" align="center"
filter="contains" readonly="true" required="true">
<EF:EFOptions blockId="companyBox_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="calloutWhCode" cname="调出仓库名称" enable="true" width="120" align="center" required="true"
blockName="wh_record_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#">
</EF:EFComboColumn>
<EF:EFComboColumn ename="callinCompanyCode" enable="true" cname="调入公司名称" width="110" align="center"
filter="contains" readonly="true" required="true">
<EF:EFOptions blockId="companyBox_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="callinWhCode" cname="调入仓库名称" enable="true" width="120" align="center" required="true"
blockName="wh_record_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#">
</EF:EFComboColumn>
<EF:EFComboColumn ename="status" cname="状态" width="80" align="center" enable="false" defaultValue="0" required="true">
<EF:EFCodeOption codeName="hggp.hgkc.status"/>
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
$(function() {
$(".row").children().attr("class", "col-md-3");
var inventTypeBox = __eiInfo.getBlock("invent_type_box_block_id").getMappedRows();
var inventCodedBox = __eiInfo.getBlock("invent_code_box_block_id").getMappedRows();
var specIdBox = __eiInfo.getBlock("spec_box_block_id").getMappedRows();
// 查询
$("#QUERY").on("click", query);
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 30, 50, 100, 200]
},
columns: [{
field: "inventType",
filter: function (options) {
return _.filter(inventTypeBox, function (item) {
return item["param1Field"]=="true";
})
},
editor: function (container, options) {
this.filter(options);
}
}, {
field: "inventCode",
title: "存货名称",
filter: function (options) {
let inventType = options.model["inventType"];
if (inventType){
return _.filter(inventCodedBox, function (item) {
return item["param1Field"] === inventType;
})
}
return options.values;
},
template: function (dataItem) {
for (let i = 0; i < inventCodedBox.length; i++) {
if (inventCodedBox[i]['valueField'] === dataItem['inventCode']){
dataItem['inventName'] = inventCodedBox[i]['textField']
dataItem['inventRecordId'] = inventCodedBox[i]['param2Field'];
return inventCodedBox[i]['textField'];
}
}
return dataItem["inventCode"];
}
}, {
field: "spec",
filter: function (options) {
let specId = options.model["inventRecordId"];
if (specId){
return _.filter(specIdBox, function (item) {
return item["param7Field"] === specId;
})
}
return options.values;
},
template: function (item) {
return $.trim(item.spec) == "" ? "" : item.spec;
}
}, {
field: "length",
template: function (item) {
return item.length == 0 ? "-" : item.length;
}
}, {
field: "width",
template: function (item) {
return item.width == 0 ? "-" : item.width;
}
}, {
field: "thick",
template: function (item) {
return item.thick == 0 ? "-" : item.thick;
}
}/*, {
field: "unitWeight",
format: "{0:n3}",
template: function (item) {
item["weight"] = item["quantity"]*item["unitWeight"];
return item["unitWeight"];
}
}, {
field: "weight",
format: "{0:n3}",
template: function (item) {
if (item["quantity"] != 0){
item["unitWeight"] = item["weight"]/item["quantity"];
}
return item["weight"];
}
}*/],
loadComplete: function(grid) {
// 此 grid 对象
// 处理父子级联动,通过监听 change 事件,判断父级节点是否发生变化
grid.dataSource.bind("change", function(e) {
// 判断父级节点是否发生变化
if (e.field === "spec"){
for (let i = 0; i < specIdBox.length; i++) {
if (specIdBox[i]['param7Field'] === e.items[0]["inventRecordId"]){
e.items[0]["length"] = specIdBox[i]['param1Field'];
e.items[0]["width"] = specIdBox[i]['param2Field'];
e.items[0]["thick"] = specIdBox[i]['param3Field'];
e.items[0]["quantity"] = specIdBox[i]['param4Field'];
e.items[0]["unitWeight"] = specIdBox[i]['param5Field'];
e.items[0]["weight"] = specIdBox[i]['param6Field'];
}
}
loadChange(grid,e,"length");
loadChange(grid,e,"width");
loadChange(grid,e,"thick");
loadChange(grid,e,"unitWeight");
loadChange(grid,e,"weight");
loadChange(grid,e,"quantity");
}else if (e.field === "quantity"){
if (e.items[0].quantity != 0 && e.items[0].unitWeight > 0){
e.items[0].weight = e.items[0].unitWeight*e.items[0].quantity;
loadChange(grid,e,"weight");
}else if (e.items[0].unitWeight == 0){
loadChange(grid,e,"unitWeight");
}
}else if (e.field === "unitWeight"){
if (e.items[0].unitWeight != 0){
e.items[0].weight = e.items[0].quantity*e.items[0].unitWeight;
loadChange(grid,e,"weight");
}
}else if (e.field === "weight"){
if (e.items[0].quantity != 0){
e.items[0].unitWeight = e.items[0].weight/e.items[0].quantity;
loadChange(grid,e,"unitWeight");
}
}else if (e.field === "inventCode"){
loadChange(grid,e,"spec");
}else if (e.field === "inventRecordId"){
loadChange(grid,e,"spec");
}
});
},
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'save'
||e.eiInfo.extAttr.methodName == 'delete' ){
query();
}
},
onSave: function (e) {
// 阻止后台保存请求,使用自定义保存
e.preventDefault();
save();
},
onDelete: function (e) {
// 阻止后台删除请求,使用自定义删除
//e.preventDefault();
//deleteFunc();
}
}
downKeyUp();
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 保存
*/
let save = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
$.each(rows, function(index, item) {
let inventType= item.get("inventType");
let inventCode= item.get("inventCode");
let spec= item.get("spec");
let quantity= item.get("quantity");
let unitWeight= item.get("unitWeight");
let weight= item.get("weight");
if(isBlank(inventType)){
message("选中的第" + (index + 1) + "行\"存货类型\",不能为空!");
flag = false;
return false;
}
if(isBlank(inventCode)){
message("选中的第" + (index + 1) + "行\"存货编码\",不能为空!");
flag = false;
return false;
}
if(isBlank(spec)){
message("选中的第" + (index + 1) + "行\"规格\",不能为空!");
flag = false;
return false;
}
if(isBlank(quantity) || parseInt(quantity) <= 0){
message("选中的第" + (index + 1) + "行\"数量\",必须是数值并且数量必须大于0!");
flag = false;
return false;
}
if(isBlank(unitWeight) || parseFloat(unitWeight) <= 0){
message("选中的第" + (index + 1) + "行\"单重\",必须是数值并且数量必须大于0!");
flag = false;
return false;
}
if(isBlank(weight)){
message("选中的第" + (index + 1) + "行\"重量\",必须是数值!");
flag = false;
return false;
}
});
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGKC013A", "save", true);
}
});
}
}
/**
* 删除
*/
let deleteFunc = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGKC004A", "delete", true);
}
});
}
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/5/29
Time: 15:43
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<script>
var ctx = "${ctx}";
</script>
<EF:EFPage title="调拨单详情">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFInput blockId="inqu_status" row="0" ename="calloutWhName" cname="调出仓库名称" colWidth="3" readonly="true"/>
<EF:EFInput blockId="inqu_status" row="0" ename="callinWhName" cname="调入仓库名称" colWidth="3" readonly="true"/>
<EF:EFInput blockId="inqu_status" row="0" ename="calloutWhCode" cname="调出仓库编码" colWidth="3" type="hidden" readonly="true"/>
<EF:EFInput blockId="inqu_status" row="0" ename="callinWhCode" cname="调入仓库编码" colWidth="3" type="hidden" readonly="true"/>
<EF:EFInput blockId="inqu_status" row="0" ename="inventName" cname="存货名称" colWidth="3" placeholder="模糊查询"/>
<EF:EFInput blockId="inqu_status" row="0" ename="status" cname="状态" colWidth="3" type="hidden"/>
<EF:EFInput blockId="inqu_status" row="0" ename="parentId" cname="上级ID" colWidth="3" type="hidden"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" enable="true" width="120" align="center" required="true"
blockName="invent_type_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFComboColumn ename="inventCode" cname="存货名称" enable="true" width="120" align="center" required="true"
blockName="invent_code_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFComboColumn ename="spec" cname="规格" enable="true" width="120" align="center" required="true"
blockName="spec_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<%--defaultValue="0"--%>
<EF:EFColumn ename="inventRecordId" cname="规格ID" width="120" enable="true" readonly="true" align="center" hidden="true" maxLength="50"/>
<EF:EFColumn ename="length" cname="长度(MM)" enable="true" readonly="false" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="width" cname="宽度(MM)" enable="true" readonly="false" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="thick" cname="厚度(MM)" enable="true" readonly="false" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="quantity" cname="数量" width="120" enable="true" format="{0:N0}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,20}([.][0-9]{1,3})?$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="unitWeight" cname="单重" width="120" enable="true" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="weight" cname="重量" width="120" enable="true" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
</EF:EFGrid>
</EF:EFRegion>
<EF:EFWindow id="openFile">
<EF:EFRegion id="upload" title="文件导入区">
<div id="button"></div>
<EF:EFUpload ename="fileUpload" cname="导入" docTag="HGPZ005" path="pz"/>
</EF:EFRegion>
</EF:EFWindow>
</EF:EFPage>
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/5/28
Time: 15:30
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page import="com.baosight.hggp.hg.kc.tools.CKExcelTools" %>
<%@ page import="com.baosight.iplat4j.core.exception.PlatException" %>
<%
try {
// 1.出库单
if ("1".equals(request.getParameter("route"))) {
CKExcelTools.downloadFile(pageContext);
} else {
throw new PlatException("非法的路由信息");
}
out.clear();
out = pageContext.pushBody();
} catch (Throwable e) {
request.setAttribute("iplat_msgKey", "ES001");
request.setAttribute("iplat_msg", "文件下载失败");
request.setAttribute("iplat_msgDetail", e.toString());
request.getRequestDispatcher("/EU/DM/EUDM30.jsp").forward(request, response);
}
%>
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