Commit 91cdba6f by liuyang

2024-09-29 委托加工

parent 7363e2b3
...@@ -142,6 +142,9 @@ public class HGConstant { ...@@ -142,6 +142,9 @@ public class HGConstant {
public static final String FOL_NO = "FOL_NO"; public static final String FOL_NO = "FOL_NO";
// 维修单号 // 维修单号
public static final String REP_ORDER_NO = "REP_ORDER_NO"; public static final String REP_ORDER_NO = "REP_ORDER_NO";
// 委托单号
public static final String CONTRACT_CODE = "CONTRACT_CODE";
} }
......
package com.baosight.hggp.hg.sc.domain;
import com.baosight.hggp.util.DateUtil;
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:Hgsc009.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-09-29 14:12:44 create
*/
public class HGSC010 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_COMPANY_CODE = "companyCode"; /* 公司编码*/
public static final String FIELD_COMPANY_NAME = "companyName"; /* 公司名称*/
public static final String FIELD_CONTRACT_DATE = "contractDate"; /* 委托日期*/
public static final String FIELD_CONTRACT_CODE = "contractCode"; /* 委托单号*/
public static final String FIELD_SUP_CODE = "supCode"; /* 供应商编码*/
public static final String FIELD_SUP_NAME = "supName"; /* 供应商名称*/
public static final String FIELD_USER_ID = "userId"; /* 申请人*/
public static final String FIELD_SUB_STATUS = "subStatus"; /* 提交状态 0-未提交 1-已提交*/
public static final String FIELD_DEPOSIT_STATUS = "depositStatus"; /* 入库状态 0-未入库 1-已入库*/
public static final String FIELD_OUT_STATUS = "outStatus"; /* 出库状态 0-未出库 1-已出库*/
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_COMPANY_CODE = "COMPANY_CODE"; /* 公司编码*/
public static final String COL_COMPANY_NAME = "COMPANY_NAME"; /* 公司名称*/
public static final String COL_CONTRACT_DATE = "CONTRACT_DATE"; /* 委托日期*/
public static final String COL_CONTRACT_CODE = "CONTRACT_CODE"; /* 委托单号*/
public static final String COL_SUP_CODE = "SUP_CODE"; /* 供应商编码*/
public static final String COL_SUP_NAME = "SUP_NAME"; /* 供应商名称*/
public static final String COL_USER_ID = "USER_ID"; /* 申请人*/
public static final String COL_SUB_STATUS = "SUB_STATUS"; /* 提交状态 0-未提交 1-已提交*/
public static final String COL_DEPOSIT_STATUS = "DEPOSIT_STATUS"; /* 入库状态 0-未入库 1-已入库*/
public static final String COL_OUT_STATUS = "OUT_STATUS"; /* 出库状态 0-未出库 1-已出库*/
public static final String QUERY = "HGSC010.query";
public static final String COUNT = "HGSC010.count";
public static final String INSERT = "HGSC010.insert";
public static final String UPDATE = "HGSC010.update";
public static final String DELETE = "HGSC010.delete";
public static final String DELETE_FLAG = "HGSC010.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 companyCode = " "; /* 公司编码*/
private String companyName = " "; /* 公司名称*/
private String contractDate = " "; /* 委托日期*/
private String contractCode = " "; /* 委托单号*/
private String supCode = " "; /* 供应商编码*/
private String supName = " "; /* 供应商名称*/
private String userId = " "; /* 申请人*/
private Integer subStatus = 0; /* 提交状态 0-未提交 1-已提交*/
private Integer depositStatus = 0; /* 入库状态 0-未入库 1-已入库*/
private Integer outStatus = 0; /* 出库状态 0-未出库 1-已出库*/
/**
* 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_COMPANY_CODE);
eiColumn.setDescName("公司编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_NAME);
eiColumn.setDescName("公司名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONTRACT_DATE);
eiColumn.setDescName("委托日期");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONTRACT_CODE);
eiColumn.setDescName("委托单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SUP_CODE);
eiColumn.setDescName("供应商编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SUP_NAME);
eiColumn.setDescName("供应商名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_USER_ID);
eiColumn.setDescName("申请人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SUB_STATUS);
eiColumn.setDescName("提交状态 0-未提交 1-已提交");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEPOSIT_STATUS);
eiColumn.setDescName("入库状态 0-未入库 1-已入库");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_OUT_STATUS);
eiColumn.setDescName("出库状态 0-未出库 1-已出库");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HGSC010() {
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 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 contractDate - 委托日期.
* @return the contractDate
*/
public String getContractDate() {
return this.contractDate;
}
/**
* set the contractDate - 委托日期.
*
* @param contractDate - 委托日期
*/
public void setContractDate(String contractDate) {
this.contractDate = contractDate;
}
/**
* get the contractCode - 委托单号.
* @return the contractCode
*/
public String getContractCode() {
return this.contractCode;
}
/**
* set the contractCode - 委托单号.
*
* @param contractCode - 委托单号
*/
public void setContractCode(String contractCode) {
this.contractCode = contractCode;
}
/**
* get the supCode - 供应商编码.
* @return the supCode
*/
public String getSupCode() {
return this.supCode;
}
/**
* set the supCode - 供应商编码.
*
* @param supCode - 供应商编码
*/
public void setSupCode(String supCode) {
this.supCode = supCode;
}
/**
* get the supName - 供应商名称.
* @return the supName
*/
public String getSupName() {
return this.supName;
}
/**
* set the supName - 供应商名称.
*
* @param supName - 供应商名称
*/
public void setSupName(String supName) {
this.supName = supName;
}
/**
* get the userId - 申请人.
* @return the userId
*/
public String getUserId() {
return this.userId;
}
/**
* set the userId - 申请人.
*
* @param userId - 申请人
*/
public void setUserId(String userId) {
this.userId = userId;
}
/**
* get the subStatus - 提交状态 0-未提交 1-已提交.
* @return the subStatus
*/
public Integer getSubStatus() {
return this.subStatus;
}
/**
* set the subStatus - 提交状态 0-未提交 1-已提交.
*
* @param subStatus - 提交状态 0-未提交 1-已提交
*/
public void setSubStatus(Integer subStatus) {
this.subStatus = subStatus;
}
/**
* get the depositStatus - 入库状态 0-未入库 1-已入库.
* @return the depositStatus
*/
public Integer getDepositStatus() {
return this.depositStatus;
}
/**
* set the depositStatus - 入库状态 0-未入库 1-已入库.
*
* @param depositStatus - 入库状态 0-未入库 1-已入库
*/
public void setDepositStatus(Integer depositStatus) {
this.depositStatus = depositStatus;
}
/**
* get the outStatus - 出库状态 0-未出库 1-已出库.
* @return the outStatus
*/
public Integer getOutStatus() {
return this.outStatus;
}
/**
* set the outStatus - 出库状态 0-未出库 1-已出库.
*
* @param outStatus - 出库状态 0-未出库 1-已出库
*/
public void setOutStatus(Integer outStatus) {
this.outStatus = outStatus;
}
/**
* 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));
setContractDate(StringUtils.defaultIfEmpty(StringUtils.toString(DateUtils.formatShort(map.get(FIELD_CONTRACT_DATE))), contractDate));
setContractCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONTRACT_CODE)), contractCode));
setSupCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SUP_CODE)), supCode));
setSupName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SUP_NAME)), supName));
setUserId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_USER_ID)), userId));
setSubStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_SUB_STATUS)), subStatus));
setDepositStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DEPOSIT_STATUS)), depositStatus));
setOutStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_OUT_STATUS)), outStatus));
}
/**
* 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_CONTRACT_DATE, StringUtils.toString(contractDate, eiMetadata.getMeta(FIELD_CONTRACT_DATE)));
map.put(FIELD_CONTRACT_CODE, StringUtils.toString(contractCode, eiMetadata.getMeta(FIELD_CONTRACT_CODE)));
map.put(FIELD_SUP_CODE, StringUtils.toString(supCode, eiMetadata.getMeta(FIELD_SUP_CODE)));
map.put(FIELD_SUP_NAME, StringUtils.toString(supName, eiMetadata.getMeta(FIELD_SUP_NAME)));
map.put(FIELD_USER_ID, StringUtils.toString(userId, eiMetadata.getMeta(FIELD_USER_ID)));
map.put(FIELD_SUB_STATUS, StringUtils.toString(subStatus, eiMetadata.getMeta(FIELD_SUB_STATUS)));
map.put(FIELD_DEPOSIT_STATUS, StringUtils.toString(depositStatus, eiMetadata.getMeta(FIELD_DEPOSIT_STATUS)));
map.put(FIELD_OUT_STATUS, StringUtils.toString(outStatus, eiMetadata.getMeta(FIELD_OUT_STATUS)));
return map;
}
}
package com.baosight.hggp.hg.sc.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:Hgsc009a.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-09-29 14:12:44 create
*/
public class HGSC010A 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_COMPANY_CODE = "companyCode"; /* 公司编码*/
public static final String FIELD_COMPANY_NAME = "companyName"; /* 公司名称*/
public static final String FIELD_PARENT_ID = "parentId"; /* 委托ID*/
public static final String FIELD_CONTRACT_CODE = "contractCode"; /* 委托单号*/
public static final String FIELD_INVENT_TYPE = "inventType"; /* 存货类型*/
public static final String FIELD_PRODUCT_CODE = "productCode"; /* 成品编码*/
public static final String FIELD_PRODUCT_NAME = "productName"; /* 成品名称*/
public static final String FIELD_SPEC = "spec"; /* 规格*/
public static final String FIELD_UNIT = "unit"; /* 单位*/
public static final String FIELD_PCS_QTY = "pcsQty"; /* 加工数量*/
public static final String FIELD_PCS_WEIGHT = "pcsWeight"; /* 加工重量*/
public static final String FIELD_DEPOSIT_QTY = "depositQty"; /* 入库数量*/
public static final String FIELD_DEPOSIT_WEIGHT = "depositWeight"; /* 入库重量*/
public static final String FIELD_REMAINING_QTY = "remainingQty"; /* 剩余数量*/
public static final String FIELD_REMAINING_WEIGHT = "remainingWeight"; /* 剩余重量*/
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_COMPANY_CODE = "COMPANY_CODE"; /* 公司编码*/
public static final String COL_COMPANY_NAME = "COMPANY_NAME"; /* 公司名称*/
public static final String COL_PARENT_ID = "PARENT_ID"; /* 委托ID*/
public static final String COL_CONTRACT_CODE = "CONTRACT_CODE"; /* 委托单号*/
public static final String COL_INVENT_TYPE = "INVENT_TYPE"; /* 存货类型*/
public static final String COL_PRODUCT_CODE = "PRODUCT_CODE"; /* 成品编码*/
public static final String COL_PRODUCT_NAME = "PRODUCT_NAME"; /* 成品名称*/
public static final String COL_SPEC = "SPEC"; /* 规格*/
public static final String COL_UNIT = "UNIT"; /* 单位*/
public static final String COL_PCS_QTY = "PCS_QTY"; /* 加工数量*/
public static final String COL_PCS_WEIGHT = "PCS_WEIGHT"; /* 加工重量*/
public static final String COL_DEPOSIT_QTY = "DEPOSIT_QTY"; /* 入库数量*/
public static final String COL_DEPOSIT_WEIGHT = "DEPOSIT_WEIGHT"; /* 入库重量*/
public static final String COL_REMAINING_QTY = "REMAINING_QTY"; /* 剩余数量*/
public static final String COL_REMAINING_WEIGHT = "REMAINING_WEIGHT"; /* 剩余重量*/
public static final String QUERY = "HGSC010A.query";
public static final String COUNT = "HGSC010A.count";
public static final String INSERT = "HGSC010A.insert";
public static final String UPDATE = "HGSC010A.update";
public static final String DELETE = "HGSC010A.delete";
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 companyCode = " "; /* 公司编码*/
private String companyName = " "; /* 公司名称*/
private Long parentId = new Long(0); /* 委托ID*/
private String contractCode = " "; /* 委托单号*/
private String inventType = " "; /* 存货类型*/
private String productCode = " "; /* 成品编码*/
private String productName = " "; /* 成品名称*/
private String spec = " "; /* 规格*/
private String unit = " "; /* 单位*/
private BigDecimal pcsQty = new BigDecimal("0"); /* 加工数量*/
private BigDecimal pcsWeight = new BigDecimal("0"); /* 加工重量*/
private BigDecimal depositQty = new BigDecimal("0"); /* 入库数量*/
private BigDecimal depositWeight = new BigDecimal("0"); /* 入库重量*/
private BigDecimal remainingQty = new BigDecimal("0"); /* 剩余数量*/
private BigDecimal remainingWeight = new BigDecimal("0"); /* 剩余重量*/
/**
* 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_COMPANY_CODE);
eiColumn.setDescName("公司编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_NAME);
eiColumn.setDescName("公司名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PARENT_ID);
eiColumn.setDescName("委托ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONTRACT_CODE);
eiColumn.setDescName("委托单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_TYPE);
eiColumn.setDescName("存货类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRODUCT_CODE);
eiColumn.setDescName("成品编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRODUCT_NAME);
eiColumn.setDescName("成品名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SPEC);
eiColumn.setDescName("规格");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UNIT);
eiColumn.setDescName("单位");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PCS_QTY);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(20);
eiColumn.setDescName("加工数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PCS_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(17);
eiColumn.setDescName("加工重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEPOSIT_QTY);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(20);
eiColumn.setDescName("入库数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEPOSIT_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(17);
eiColumn.setDescName("入库重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_REMAINING_QTY);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(20);
eiColumn.setDescName("剩余数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_REMAINING_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(17);
eiColumn.setDescName("剩余重量");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HGSC010A() {
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 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 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 contractCode - 委托单号.
* @return the contractCode
*/
public String getContractCode() {
return this.contractCode;
}
/**
* set the contractCode - 委托单号.
*
* @param contractCode - 委托单号
*/
public void setContractCode(String contractCode) {
this.contractCode = contractCode;
}
/**
* 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 productCode - 成品编码.
* @return the productCode
*/
public String getProductCode() {
return this.productCode;
}
/**
* set the productCode - 成品编码.
*
* @param productCode - 成品编码
*/
public void setProductCode(String productCode) {
this.productCode = productCode;
}
/**
* get the productName - 成品名称.
* @return the productName
*/
public String getProductName() {
return this.productName;
}
/**
* set the productName - 成品名称.
*
* @param productName - 成品名称
*/
public void setProductName(String productName) {
this.productName = productName;
}
/**
* 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 unit - 单位.
* @return the unit
*/
public String getUnit() {
return this.unit;
}
/**
* set the unit - 单位.
*
* @param unit - 单位
*/
public void setUnit(String unit) {
this.unit = unit;
}
/**
* get the pcsQty - 加工数量.
* @return the pcsQty
*/
public BigDecimal getPcsQty() {
return this.pcsQty;
}
/**
* set the pcsQty - 加工数量.
*
* @param pcsQty - 加工数量
*/
public void setPcsQty(BigDecimal pcsQty) {
this.pcsQty = pcsQty;
}
/**
* get the pcsWeight - 加工重量.
* @return the pcsWeight
*/
public BigDecimal getPcsWeight() {
return this.pcsWeight;
}
/**
* set the pcsWeight - 加工重量.
*
* @param pcsWeight - 加工重量
*/
public void setPcsWeight(BigDecimal pcsWeight) {
this.pcsWeight = pcsWeight;
}
/**
* get the depositQty - 入库数量.
* @return the depositQty
*/
public BigDecimal getDepositQty() {
return this.depositQty;
}
/**
* set the depositQty - 入库数量.
*
* @param depositQty - 入库数量
*/
public void setDepositQty(BigDecimal depositQty) {
this.depositQty = depositQty;
}
/**
* get the depositWeight - 入库重量.
* @return the depositWeight
*/
public BigDecimal getDepositWeight() {
return this.depositWeight;
}
/**
* set the depositWeight - 入库重量.
*
* @param depositWeight - 入库重量
*/
public void setDepositWeight(BigDecimal depositWeight) {
this.depositWeight = depositWeight;
}
/**
* get the remainingQty - 剩余数量.
* @return the remainingQty
*/
public BigDecimal getRemainingQty() {
return this.remainingQty;
}
/**
* set the remainingQty - 剩余数量.
*
* @param remainingQty - 剩余数量
*/
public void setRemainingQty(BigDecimal remainingQty) {
this.remainingQty = remainingQty;
}
/**
* get the remainingWeight - 剩余重量.
* @return the remainingWeight
*/
public BigDecimal getRemainingWeight() {
return this.remainingWeight;
}
/**
* set the remainingWeight - 剩余重量.
*
* @param remainingWeight - 剩余重量
*/
public void setRemainingWeight(BigDecimal remainingWeight) {
this.remainingWeight = remainingWeight;
}
/**
* 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));
setParentId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_PARENT_ID)), parentId));
setContractCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONTRACT_CODE)), contractCode));
setInventType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_TYPE)), inventType));
setProductCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRODUCT_CODE)), productCode));
setProductName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRODUCT_NAME)), productName));
setSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SPEC)), spec));
setUnit(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UNIT)), unit));
setPcsQty(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PCS_QTY)), pcsQty));
setPcsWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PCS_WEIGHT)), pcsWeight));
setDepositQty(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_DEPOSIT_QTY)), depositQty));
setDepositWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_DEPOSIT_WEIGHT)), depositWeight));
setRemainingQty(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_REMAINING_QTY)), remainingQty));
setRemainingWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_REMAINING_WEIGHT)), remainingWeight));
}
/**
* 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_PARENT_ID, StringUtils.toString(parentId, eiMetadata.getMeta(FIELD_PARENT_ID)));
map.put(FIELD_CONTRACT_CODE, StringUtils.toString(contractCode, eiMetadata.getMeta(FIELD_CONTRACT_CODE)));
map.put(FIELD_INVENT_TYPE, StringUtils.toString(inventType, eiMetadata.getMeta(FIELD_INVENT_TYPE)));
map.put(FIELD_PRODUCT_CODE, StringUtils.toString(productCode, eiMetadata.getMeta(FIELD_PRODUCT_CODE)));
map.put(FIELD_PRODUCT_NAME, StringUtils.toString(productName, eiMetadata.getMeta(FIELD_PRODUCT_NAME)));
map.put(FIELD_SPEC, StringUtils.toString(spec, eiMetadata.getMeta(FIELD_SPEC)));
map.put(FIELD_UNIT, StringUtils.toString(unit, eiMetadata.getMeta(FIELD_UNIT)));
map.put(FIELD_PCS_QTY, StringUtils.toString(pcsQty, eiMetadata.getMeta(FIELD_PCS_QTY)));
map.put(FIELD_PCS_WEIGHT, StringUtils.toString(pcsWeight, eiMetadata.getMeta(FIELD_PCS_WEIGHT)));
map.put(FIELD_DEPOSIT_QTY, StringUtils.toString(depositQty, eiMetadata.getMeta(FIELD_DEPOSIT_QTY)));
map.put(FIELD_DEPOSIT_WEIGHT, StringUtils.toString(depositWeight, eiMetadata.getMeta(FIELD_DEPOSIT_WEIGHT)));
map.put(FIELD_REMAINING_QTY, StringUtils.toString(remainingQty, eiMetadata.getMeta(FIELD_REMAINING_QTY)));
map.put(FIELD_REMAINING_WEIGHT, StringUtils.toString(remainingWeight, eiMetadata.getMeta(FIELD_REMAINING_WEIGHT)));
return map;
}
}
package com.baosight.hggp.hg.sc.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:Hgsc009b.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-09-29 14:27:41 create
*/
public class HGSC010B 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_COMPANY_CODE = "companyCode"; /* 公司编码*/
public static final String FIELD_COMPANY_NAME = "companyName"; /* 公司名称*/
public static final String FIELD_PARENT_ID = "parentId"; /* 委托ID*/
public static final String FIELD_CONTRACT_CODE = "contractCode"; /* 委托单号*/
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_UNIT = "unit"; /* 单位*/
public static final String FIELD_PCS_QTY = "pcsQty"; /* 加工数量*/
public static final String FIELD_PCS_WEIGHT = "pcsWeight"; /* 加工重量*/
public static final String FIELD_OUT_QTY = "outQty"; /* 出库数量*/
public static final String FIELD_OUT_WEIGHT = "outWeight"; /* 出库重量*/
public static final String FIELD_REMAINING_QTY = "remainingQty"; /* 剩余数量*/
public static final String FIELD_REMAINING_WEIGHT = "remainingWeight"; /* 剩余重量*/
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_COMPANY_CODE = "COMPANY_CODE"; /* 公司编码*/
public static final String COL_COMPANY_NAME = "COMPANY_NAME"; /* 公司名称*/
public static final String COL_PARENT_ID = "PARENT_ID"; /* 委托ID*/
public static final String COL_CONTRACT_CODE = "CONTRACT_CODE"; /* 委托单号*/
public static final String COL_INVENT_TYPE = "INVENT_TYPE"; /* 存货类型*/
public static final String COL_INVENT_CODE = "INVENT_CODE"; /* 原料编码*/
public static final String COL_INVENT_NAME = "INVENT_NAME"; /* 原料名称*/
public static final String COL_SPEC = "SPEC"; /* 规格*/
public static final String COL_UNIT = "UNIT"; /* 单位*/
public static final String COL_PCS_QTY = "PCS_QTY"; /* 加工数量*/
public static final String COL_PCS_WEIGHT = "PCS_WEIGHT"; /* 加工重量*/
public static final String COL_OUT_QTY = "OUT_QTY"; /* 出库数量*/
public static final String COL_OUT_WEIGHT = "OUT_WEIGHT"; /* 出库重量*/
public static final String COL_REMAINING_QTY = "REMAINING_QTY"; /* 剩余数量*/
public static final String COL_REMAINING_WEIGHT = "REMAINING_WEIGHT"; /* 剩余重量*/
public static final String QUERY = "HGSC010B.query";
public static final String COUNT = "HGSC010B.count";
public static final String INSERT = "HGSC010B.insert";
public static final String UPDATE = "HGSC010B.update";
public static final String DELETE = "HGSC010B.delete";
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 companyCode = " "; /* 公司编码*/
private String companyName = " "; /* 公司名称*/
private Long parentId = new Long(0); /* 委托ID*/
private String contractCode = " "; /* 委托单号*/
private String inventType = " "; /* 存货类型*/
private String inventCode = " "; /* 原料编码*/
private String inventName = " "; /* 原料名称*/
private String spec = " "; /* 规格*/
private String unit = " "; /* 单位*/
private BigDecimal pcsQty = new BigDecimal("0"); /* 加工数量*/
private BigDecimal pcsWeight = new BigDecimal("0"); /* 加工重量*/
private BigDecimal outQty = new BigDecimal("0"); /* 出库数量*/
private BigDecimal outWeight = new BigDecimal("0"); /* 出库重量*/
private BigDecimal remainingQty = new BigDecimal("0"); /* 剩余数量*/
private BigDecimal remainingWeight = new BigDecimal("0"); /* 剩余重量*/
/**
* 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_COMPANY_CODE);
eiColumn.setDescName("公司编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_NAME);
eiColumn.setDescName("公司名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PARENT_ID);
eiColumn.setDescName("委托ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONTRACT_CODE);
eiColumn.setDescName("委托单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_TYPE);
eiColumn.setDescName("存货类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_CODE);
eiColumn.setDescName("原料编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_NAME);
eiColumn.setDescName("原料名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SPEC);
eiColumn.setDescName("规格");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UNIT);
eiColumn.setDescName("单位");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PCS_QTY);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(20);
eiColumn.setDescName("加工数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PCS_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(17);
eiColumn.setDescName("加工重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_OUT_QTY);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(20);
eiColumn.setDescName("出库数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_OUT_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(17);
eiColumn.setDescName("出库重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_REMAINING_QTY);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(20);
eiColumn.setDescName("剩余数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_REMAINING_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(17);
eiColumn.setDescName("剩余重量");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HGSC010B() {
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 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 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 contractCode - 委托单号.
* @return the contractCode
*/
public String getContractCode() {
return this.contractCode;
}
/**
* set the contractCode - 委托单号.
*
* @param contractCode - 委托单号
*/
public void setContractCode(String contractCode) {
this.contractCode = contractCode;
}
/**
* 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 unit - 单位.
* @return the unit
*/
public String getUnit() {
return this.unit;
}
/**
* set the unit - 单位.
*
* @param unit - 单位
*/
public void setUnit(String unit) {
this.unit = unit;
}
/**
* get the pcsQty - 加工数量.
* @return the pcsQty
*/
public BigDecimal getPcsQty() {
return this.pcsQty;
}
/**
* set the pcsQty - 加工数量.
*
* @param pcsQty - 加工数量
*/
public void setPcsQty(BigDecimal pcsQty) {
this.pcsQty = pcsQty;
}
/**
* get the pcsWeight - 加工重量.
* @return the pcsWeight
*/
public BigDecimal getPcsWeight() {
return this.pcsWeight;
}
/**
* set the pcsWeight - 加工重量.
*
* @param pcsWeight - 加工重量
*/
public void setPcsWeight(BigDecimal pcsWeight) {
this.pcsWeight = pcsWeight;
}
/**
* get the outQty - 出库数量.
* @return the outQty
*/
public BigDecimal getOutQty() {
return this.outQty;
}
/**
* set the outQty - 出库数量.
*
* @param outQty - 出库数量
*/
public void setOutQty(BigDecimal outQty) {
this.outQty = outQty;
}
/**
* get the outWeight - 出库重量.
* @return the outWeight
*/
public BigDecimal getOutWeight() {
return this.outWeight;
}
/**
* set the outWeight - 出库重量.
*
* @param outWeight - 出库重量
*/
public void setOutWeight(BigDecimal outWeight) {
this.outWeight = outWeight;
}
/**
* get the remainingQty - 剩余数量.
* @return the remainingQty
*/
public BigDecimal getRemainingQty() {
return this.remainingQty;
}
/**
* set the remainingQty - 剩余数量.
*
* @param remainingQty - 剩余数量
*/
public void setRemainingQty(BigDecimal remainingQty) {
this.remainingQty = remainingQty;
}
/**
* get the remainingWeight - 剩余重量.
* @return the remainingWeight
*/
public BigDecimal getRemainingWeight() {
return this.remainingWeight;
}
/**
* set the remainingWeight - 剩余重量.
*
* @param remainingWeight - 剩余重量
*/
public void setRemainingWeight(BigDecimal remainingWeight) {
this.remainingWeight = remainingWeight;
}
/**
* 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));
setParentId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_PARENT_ID)), parentId));
setContractCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONTRACT_CODE)), contractCode));
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));
setUnit(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UNIT)), unit));
setPcsQty(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PCS_QTY)), pcsQty));
setPcsWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PCS_WEIGHT)), pcsWeight));
setOutQty(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_OUT_QTY)), outQty));
setOutWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_OUT_WEIGHT)), outWeight));
setRemainingQty(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_REMAINING_QTY)), remainingQty));
setRemainingWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_REMAINING_WEIGHT)), remainingWeight));
}
/**
* 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_PARENT_ID, StringUtils.toString(parentId, eiMetadata.getMeta(FIELD_PARENT_ID)));
map.put(FIELD_CONTRACT_CODE, StringUtils.toString(contractCode, eiMetadata.getMeta(FIELD_CONTRACT_CODE)));
map.put(FIELD_INVENT_TYPE, StringUtils.toString(inventType, eiMetadata.getMeta(FIELD_INVENT_TYPE)));
map.put(FIELD_INVENT_CODE, StringUtils.toString(inventCode, eiMetadata.getMeta(FIELD_INVENT_CODE)));
map.put(FIELD_INVENT_NAME, StringUtils.toString(inventName, eiMetadata.getMeta(FIELD_INVENT_NAME)));
map.put(FIELD_SPEC, StringUtils.toString(spec, eiMetadata.getMeta(FIELD_SPEC)));
map.put(FIELD_UNIT, StringUtils.toString(unit, eiMetadata.getMeta(FIELD_UNIT)));
map.put(FIELD_PCS_QTY, StringUtils.toString(pcsQty, eiMetadata.getMeta(FIELD_PCS_QTY)));
map.put(FIELD_PCS_WEIGHT, StringUtils.toString(pcsWeight, eiMetadata.getMeta(FIELD_PCS_WEIGHT)));
map.put(FIELD_OUT_QTY, StringUtils.toString(outQty, eiMetadata.getMeta(FIELD_OUT_QTY)));
map.put(FIELD_OUT_WEIGHT, StringUtils.toString(outWeight, eiMetadata.getMeta(FIELD_OUT_WEIGHT)));
map.put(FIELD_REMAINING_QTY, StringUtils.toString(remainingQty, eiMetadata.getMeta(FIELD_REMAINING_QTY)));
map.put(FIELD_REMAINING_WEIGHT, StringUtils.toString(remainingWeight, eiMetadata.getMeta(FIELD_REMAINING_WEIGHT)));
return map;
}
}
package com.baosight.hggp.hg.sc.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.core.security.UserSessionUtils;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.sc.domain.HGSC010;
import com.baosight.hggp.hg.sc.domain.HGSC010A;
import com.baosight.hggp.hg.sc.domain.HGSC010B;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.util.*;
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 org.apache.commons.lang.StringUtils;
import java.util.*;
/**
* @author LiuYang
* @version 1.0 2024/9/29
* @description 委托加工
*/
public class ServiceHGSC010 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SUP_RECORD_BLOCK_ID, DdynamicEnum.USER_BLOCK_ID));
EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGSC010().eiMetadata);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "委托加工", operType = "查询", operDesc = "查询")
@Override
public EiInfo query(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
String contractDate = MapUtils.getString(queryMap, HGSC010.FIELD_CONTRACT_DATE);
if (StringUtils.isNotBlank(contractDate)) {
queryMap.put(HGSC010.FIELD_CONTRACT_DATE, StringUtil.removeHorizontalLine(contractDate));
}
inInfo = super.query(inInfo, HGSC010.QUERY, new HGSC010());
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
@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);
HGSC010 hgsc010 = new HGSC010();
hgsc010.fromMap(map);
DaoUtils.update(HGSC010.DELETE_FLAG, hgsc010.toMap());
Map<String,Object> params = new HashMap<>();
params.put(HGSC010A.FIELD_PARENT_ID, hgsc010.getId());
DaoUtils.update(HGSC010A.DELETE, params);
DaoUtils.update(HGSC010B.DELETE, params);
}
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> resultMaps = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map resultMap: resultMaps) {
HGSC010 hgsc010 = new HGSC010();
hgsc010.fromMap(resultMap);
if(Objects.nonNull(hgsc010.getId())&&hgsc010.getId()!=0){
this.modify(hgsc010);
}else {
this.add(hgsc010);
}
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
public void add(HGSC010 hgsc010) {
hgsc010.setContractCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.CONTRACT_CODE));
DaoUtils.insert(HGSC010.INSERT, hgsc010);
}
public void modify(HGSC010 hgsc010) {
DaoUtils.update(HGSC010.UPDATE, hgsc010);
}
@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);
HGSC010 hgsc010 = new HGSC010();
hgsc010.fromMap(map);
hgsc010.setSubStatus(CommonConstant.YesNo.YES_1);
DaoUtils.update("HGSC010.updateBySubStatus", hgsc010.toMap());
}
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;
}
}
package com.baosight.hggp.hg.sc.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.common.InventTypeDetailEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.pz.domain.HGPZ004;
import com.baosight.hggp.hg.pz.domain.HGPZ005;
import com.baosight.hggp.hg.sc.domain.HGSC010;
import com.baosight.hggp.hg.sc.domain.HGSC010A;
import com.baosight.hggp.hg.sc.domain.HGSC010B;
import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.util.*;
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 org.apache.commons.lang.StringUtils;
import java.util.*;
/**
* @author LiuYang
* @version 1.0 2024/9/29
* @description 委托加工成本
*/
public class ServiceHGSC010A extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo,
Arrays.asList(
DdynamicEnum.SUP_RECORD_BLOCK_ID,
DdynamicEnum.INVENT_TYPE_BLOCK_ID));
CommonMethod.initBlock(inInfo,
Arrays.asList(DdynamicEnum.INVENT_RECORD_BOX_BLOCK_ID),
new HashMap<String, Object>(){{
put(HGPZ005.FIELD_STATUS,1);
put(HGPZ004.FIELD_INVENT_TYPE_DETAILS, Arrays.asList(InventTypeDetailEnum.COMPONENT.getCode(),InventTypeDetailEnum.RAW.getCode()));
}}, false);
EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGSC010A().eiMetadata);
inInfo.addBlock(CommonConstant.Field.DETAIL).addBlockMeta(new HGSC010B().eiMetadata);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "委托加工", operType = "查询", operDesc = "查询")
@Override
public EiInfo query(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
inInfo = super.query(inInfo, HGSC010A.QUERY, new HGSC010A());
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
@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);
HGSC010A hgsc010a = new HGSC010A();
hgsc010a.fromMap(map);
DaoUtils.update(HGSC010A.DELETE, hgsc010a);
}
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 {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
HGSC010 hgsc010 = HGSCTools.Hgsc010.getById(Long.parseLong(queryMap.get("parentId").toString()));
AssertUtils.isTrue(hgsc010.getSubStatus().equals(CommonConstant.YesNo.YES_1), "当前委托任务已提交,不允许修改保存!");
List<Map> resultMaps = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map resultMap: resultMaps) {
HGSC010A hgsc010a = new HGSC010A();
hgsc010a.fromMap(resultMap);
if(Objects.nonNull(hgsc010a.getId())&&hgsc010a.getId()!=0){
this.modifyHgsc010a(hgsc010a);
}else {
hgsc010a.setCompanyCode(queryMap.get("companyCode").toString());
hgsc010a.setCompanyName(queryMap.get("companyName").toString());
hgsc010a.setParentId(Long.parseLong(queryMap.get("parentId").toString()));
hgsc010a.setContractCode(queryMap.get("contractCode").toString());
this.addHgsc010a(hgsc010a);
}
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
public void addHgsc010a(HGSC010A hgsc010a) {
DaoUtils.insert(HGSC010A.INSERT, hgsc010a);
}
public void modifyHgsc010a(HGSC010A hgsc010a) {
DaoUtils.update(HGSC010A.UPDATE, hgsc010a);
}
public void addHgsc010b(HGSC010B hgsc010b) {
DaoUtils.insert(HGSC010A.INSERT, hgsc010b);
}
public void modifyHgsc010b(HGSC010B hgsc010a) {
DaoUtils.update(HGSC010A.UPDATE, hgsc010a);
}
}
package com.baosight.hggp.hg.sc.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.common.InventTypeDetailEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.pz.domain.HGPZ004;
import com.baosight.hggp.hg.pz.domain.HGPZ005;
import com.baosight.hggp.hg.sc.domain.HGSC010;
import com.baosight.hggp.hg.sc.domain.HGSC010A;
import com.baosight.hggp.hg.sc.domain.HGSC010B;
import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.util.*;
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.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/9/29
* @description 委托加工原料
*/
public class ServiceHGSC010B extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo,
Arrays.asList(
DdynamicEnum.SUP_RECORD_BLOCK_ID,
DdynamicEnum.INVENT_TYPE_BLOCK_ID));
CommonMethod.initBlock(inInfo,
Arrays.asList(DdynamicEnum.INVENT_RECORD_BOX_BLOCK_ID),
new HashMap<String, Object>(){{
put(HGPZ005.FIELD_STATUS,1);
put(HGPZ004.FIELD_INVENT_TYPE_DETAILS, Arrays.asList(InventTypeDetailEnum.COMPONENT.getCode(),InventTypeDetailEnum.RAW.getCode()));
}}, false);
EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGSC010B().eiMetadata);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "委托加工", operType = "查询", operDesc = "查询")
@Override
public EiInfo query(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
inInfo = super.query(inInfo, HGSC010B.QUERY, new HGSC010B(),false,new HGSC010B().eiMetadata,EiConstant.queryBlock, CommonConstant.Field.DETAIL,CommonConstant.Field.DETAIL);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "市场调研-需求调研",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
int i = 0;
try {
EiBlock eiBlock = inInfo.getBlock(CommonConstant.Field.DETAIL);
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HGSC010B hgsc010B = new HGSC010B();
hgsc010B.fromMap(map);
DaoUtils.update(HGSC010B.DELETE, hgsc010B.toMap());
}
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 {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
HGSC010 hgsc010 = HGSCTools.Hgsc010.getById(Long.parseLong(queryMap.get("parentId").toString()));
AssertUtils.isTrue(hgsc010.getSubStatus().equals(CommonConstant.YesNo.YES_1), "当前委托任务已提交,不允许修改保存!");
List<Map> resultRows = inInfo.getBlock(CommonConstant.Field.DETAIL).getRows();
// 写入数据
for (Map resultRow : resultRows) {
HGSC010B hgsc010B = new HGSC010B();
hgsc010B.fromMap(resultRow);
if (hgsc010B.getId() == null || hgsc010B.getId() == 0) {
hgsc010B.setCompanyCode(queryMap.get("companyCode").toString());
hgsc010B.setCompanyName(queryMap.get("companyName").toString());
hgsc010B.setParentId(Long.parseLong(queryMap.get("parentId").toString()));
hgsc010B.setContractCode(queryMap.get("contractCode").toString());
this.add(hgsc010B);
} else {
this.modify(hgsc010B);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HGSC010B hgsc010B) {
DaoUtils.insert(HGSC010B.INSERT, hgsc010B);
}
/**
* 修改操作
*/
public void modify(HGSC010B hgsc010B) {
DaoUtils.update(HGSC010B.UPDATE, hgsc010B);
}
}
<?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-09-29 14:12:44
Version : 1.0
schema : hggp
tableName : HGSC010
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,
COMPANY_CODE VARCHAR,
COMPANY_NAME VARCHAR,
CONTRACT_DATE VARCHAR,
CONTRACT_CODE VARCHAR,
SUP_CODE VARCHAR,
SUP_NAME VARCHAR,
USER_ID VARCHAR,
SUB_STATUS TINYINT,
DEPOSIT_STATUS TINYINT,
OUT_STATUS TINYINT
-->
<sqlMap namespace="HGSC010">
<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="contractDate">
CONTRACT_DATE = #contractDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractCode">
CONTRACT_CODE like concat('%',#contractCode#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="supCode">
SUP_CODE = #supCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="supName">
SUP_NAME = #supName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="userId">
USER_ID = #userId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="subStatus">
SUB_STATUS = #subStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depositStatus">
DEPOSIT_STATUS = #depositStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="outStatus">
OUT_STATUS = #outStatus#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.sc.domain.HGSC010">
SELECT
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-是 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
CONTRACT_DATE as "contractDate", <!-- 委托日期 -->
CONTRACT_CODE as "contractCode", <!-- 委托单号 -->
SUP_CODE as "supCode", <!-- 供应商编码 -->
SUP_NAME as "supName", <!-- 供应商名称 -->
USER_ID as "userId", <!-- 申请人 -->
SUB_STATUS as "subStatus", <!-- 提交状态 0-未提交 1-已提交 -->
DEPOSIT_STATUS as "depositStatus", <!-- 入库状态 0-未入库 1-已入库 -->
OUT_STATUS as "outStatus" <!-- 出库状态 0-未出库 1-已出库 -->
FROM ${hggpSchema}.HGSC010 WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID desc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGSC010 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="contractDate">
CONTRACT_DATE = #contractDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractCode">
CONTRACT_CODE = #contractCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="supCode">
SUP_CODE = #supCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="supName">
SUP_NAME = #supName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="userId">
USER_ID = #userId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="subStatus">
SUB_STATUS = #subStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depositStatus">
DEPOSIT_STATUS = #depositStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="outStatus">
OUT_STATUS = #outStatus#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGSC010 (ID, <!-- ID -->
ACCOUNT_CODE, <!-- 账套 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
DELETE_FLAG, <!-- 是否删除 0-否1-是 -->
COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 -->
CONTRACT_DATE, <!-- 委托日期 -->
CONTRACT_CODE, <!-- 委托单号 -->
SUP_CODE, <!-- 供应商编码 -->
SUP_NAME, <!-- 供应商名称 -->
USER_ID, <!-- 申请人 -->
SUB_STATUS, <!-- 提交状态 0-未提交 1-已提交 -->
DEPOSIT_STATUS, <!-- 入库状态 0-未入库 1-已入库 -->
OUT_STATUS <!-- 出库状态 0-未出库 1-已出库 -->
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #deleteFlag#,
#companyCode#, #companyName#, #contractDate#, #contractCode#, #supCode#, #supName#,
#userId#, #subStatus#, #depositStatus#, #outStatus#)
<selectKey resultClass="long" keyProperty="id">
SELECT MAX(ID) as "id" FROM ${hggpSchema}.HGSC010
</selectKey>
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGSC010 WHERE ID = #id#
</delete>
<!--修改提交状态-->
<update id="deleteFlag">
UPDATE ${hggpSchema}.HGSC010
SET
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 修改时间 -->
DELETE_FLAG = 1 <!-- 提交状态 0-未提交 1-已提交 -->
WHERE
ID = #id#
</update>
<!--修改提交状态-->
<update id="updateBySubStatus">
UPDATE ${hggpSchema}.HGSC010
SET
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 修改时间 -->
SUB_STATUS = #subStatus# <!-- 提交状态 0-未提交 1-已提交 -->
WHERE
ID = #id#
</update>
<!--修改入库状态-->
<update id="updateByDepositStatus">
UPDATE ${hggpSchema}.HGSC010
SET
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 修改时间 -->
DEPOSIT_STATUS = #depositStatus# <!-- 入库状态 0-未入库 1-已入库 -->
WHERE
ID = #id#
</update>
<update id="updateByOutStatus">
UPDATE ${hggpSchema}.HGSC010
SET
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 修改时间 -->
OUT_STATUS = #outStatus# <!-- 出库状态 0-未出库 1-已出库 -->
WHERE
ID = #id#
</update>
<update id="update">
UPDATE ${hggpSchema}.HGSC010
SET
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 修改时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 是否删除 0-否1-是 -->
COMPANY_CODE = #companyCode#, <!-- 公司编码 -->
COMPANY_NAME = #companyName#, <!-- 公司名称 -->
CONTRACT_DATE = #contractDate#, <!-- 委托日期 -->
CONTRACT_CODE = #contractCode#, <!-- 委托单号 -->
SUP_CODE = #supCode#, <!-- 供应商编码 -->
SUP_NAME = #supName#, <!-- 供应商名称 -->
USER_ID = #userId#, <!-- 申请人 -->
SUB_STATUS = #subStatus#, <!-- 提交状态 0-未提交 1-已提交 -->
DEPOSIT_STATUS = #depositStatus#, <!-- 入库状态 0-未入库 1-已入库 -->
OUT_STATUS = #outStatus# <!-- 出库状态 0-未出库 1-已出库 -->
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-09-29 14:12:44
Version : 1.0
schema : hggp
tableName : HGSC010A
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,
COMPANY_CODE VARCHAR,
COMPANY_NAME VARCHAR,
PARENT_ID BIGINT NOT NULL,
CONTRACT_CODE VARCHAR,
INVENT_TYPE TINYINT,
PRODUCT_CODE VARCHAR,
PRODUCT_NAME VARCHAR,
SPEC VARCHAR,
UNIT VARCHAR,
PCS_QTY DECIMAL,
PCS_WEIGHT DECIMAL,
DEPOSIT_QTY DECIMAL,
DEPOSIT_WEIGHT DECIMAL,
REMAINING_QTY DECIMAL,
REMAINING_WEIGHT DECIMAL
-->
<sqlMap namespace="HGSC010A">
<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="parentId">
PARENT_ID = #parentId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractCode">
CONTRACT_CODE = #contractCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventType">
INVENT_TYPE = #inventType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productCode">
PRODUCT_CODE = #productCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productName">
PRODUCT_NAME = #productName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="spec">
SPEC = #spec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unit">
UNIT = #unit#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="pcsQty">
PCS_QTY = #pcsQty#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="pcsWeight">
PCS_WEIGHT = #pcsWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depositQty">
DEPOSIT_QTY = #depositQty#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depositWeight">
DEPOSIT_WEIGHT = #depositWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="remainingQty">
REMAINING_QTY = #remainingQty#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="remainingWeight">
REMAINING_WEIGHT = #remainingWeight#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.sc.domain.HGSC010A">
SELECT
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-是 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
PARENT_ID as "parentId", <!-- 委托ID -->
CONTRACT_CODE as "contractCode", <!-- 委托单号 -->
INVENT_TYPE as "inventType", <!-- 存货类型 -->
PRODUCT_CODE as "productCode", <!-- 成品编码 -->
PRODUCT_NAME as "productName", <!-- 成品名称 -->
SPEC as "spec", <!-- 规格 -->
UNIT as "unit", <!-- 单位 -->
PCS_QTY as "pcsQty", <!-- 加工数量 -->
PCS_WEIGHT as "pcsWeight", <!-- 加工重量 -->
DEPOSIT_QTY as "depositQty", <!-- 入库数量 -->
DEPOSIT_WEIGHT as "depositWeight", <!-- 入库重量 -->
REMAINING_QTY as "remainingQty", <!-- 剩余数量 -->
REMAINING_WEIGHT as "remainingWeight" <!-- 剩余重量 -->
FROM ${hggpSchema}.HGSC010A WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGSC010A 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="parentId">
PARENT_ID = #parentId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractCode">
CONTRACT_CODE = #contractCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventType">
INVENT_TYPE = #inventType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productCode">
PRODUCT_CODE = #productCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productName">
PRODUCT_NAME = #productName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="spec">
SPEC = #spec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unit">
UNIT = #unit#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="pcsQty">
PCS_QTY = #pcsQty#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="pcsWeight">
PCS_WEIGHT = #pcsWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depositQty">
DEPOSIT_QTY = #depositQty#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depositWeight">
DEPOSIT_WEIGHT = #depositWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="remainingQty">
REMAINING_QTY = #remainingQty#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="remainingWeight">
REMAINING_WEIGHT = #remainingWeight#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGSC010A (ID, <!-- ID -->
ACCOUNT_CODE, <!-- 账套 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
DELETE_FLAG, <!-- 是否删除 0-否1-是 -->
COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 -->
PARENT_ID, <!-- 委托ID -->
CONTRACT_CODE, <!-- 委托单号 -->
INVENT_TYPE, <!-- 存货类型 -->
PRODUCT_CODE, <!-- 成品编码 -->
PRODUCT_NAME, <!-- 成品名称 -->
SPEC, <!-- 规格 -->
UNIT, <!-- 单位 -->
PCS_QTY, <!-- 加工数量 -->
PCS_WEIGHT, <!-- 加工重量 -->
DEPOSIT_QTY, <!-- 入库数量 -->
DEPOSIT_WEIGHT, <!-- 入库重量 -->
REMAINING_QTY, <!-- 剩余数量 -->
REMAINING_WEIGHT <!-- 剩余重量 -->
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #deleteFlag#,
#companyCode#, #companyName#, #parentId#, #contractCode#, #inventType#,
#productCode#, #productName#, #spec#, #unit#, #pcsQty#, #pcsWeight#, #depositQty#, #depositWeight#,
#remainingQty#, #remainingWeight#)
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGSC010A WHERE ID = #id#
</delete>
<delete id="deleteFlag">
DELETE FROM ${hggpSchema}.HGSC010A WHERE PARENT_ID = #parentId#
</delete>
<update id="update">
UPDATE ${hggpSchema}.HGSC010A
SET
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 修改时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 是否删除 0-否1-是 -->
COMPANY_CODE = #companyCode#, <!-- 公司编码 -->
COMPANY_NAME = #companyName#, <!-- 公司名称 -->
PARENT_ID = #parentId#, <!-- 委托ID -->
CONTRACT_CODE = #contractCode#, <!-- 委托单号 -->
INVENT_TYPE = #inventType#, <!-- 存货类型 -->
PRODUCT_CODE = #productCode#, <!-- 成品编码 -->
PRODUCT_NAME = #productName#, <!-- 成品名称 -->
SPEC = #spec#, <!-- 规格 -->
UNIT = #unit#, <!-- 单位 -->
PCS_QTY = #pcsQty#, <!-- 加工数量 -->
PCS_WEIGHT = #pcsWeight#, <!-- 加工重量 -->
DEPOSIT_QTY = #depositQty#, <!-- 入库数量 -->
DEPOSIT_WEIGHT = #depositWeight#, <!-- 入库重量 -->
REMAINING_QTY = #remainingQty#, <!-- 剩余数量 -->
REMAINING_WEIGHT = #remainingWeight# <!-- 剩余重量 -->
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-09-29 14:27:41
Version : 1.0
schema : hggp
tableName : HGSC010B
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,
COMPANY_CODE VARCHAR,
COMPANY_NAME VARCHAR,
PARENT_ID BIGINT NOT NULL,
CONTRACT_CODE VARCHAR,
INVENT_TYPE TINYINT,
INVENT_CODE VARCHAR,
INVENT_NAME VARCHAR,
SPEC VARCHAR,
UNIT VARCHAR,
PCS_QTY DECIMAL,
PCS_WEIGHT DECIMAL,
OUT_QTY DECIMAL,
OUT_WEIGHT DECIMAL,
REMAINING_QTY DECIMAL,
REMAINING_WEIGHT DECIMAL
-->
<sqlMap namespace="HGSC010B">
<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="parentId">
PARENT_ID = #parentId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractCode">
CONTRACT_CODE = #contractCode#
</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="unit">
UNIT = #unit#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="pcsQty">
PCS_QTY = #pcsQty#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="pcsWeight">
PCS_WEIGHT = #pcsWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="outQty">
OUT_QTY = #outQty#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="outWeight">
OUT_WEIGHT = #outWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="remainingQty">
REMAINING_QTY = #remainingQty#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="remainingWeight">
REMAINING_WEIGHT = #remainingWeight#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.sc.domain.HGSC010B">
SELECT
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-是 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
PARENT_ID as "parentId", <!-- 委托ID -->
CONTRACT_CODE as "contractCode", <!-- 委托单号 -->
INVENT_TYPE as "inventType", <!-- 存货类型 -->
INVENT_CODE as "inventCode", <!-- 原料编码 -->
INVENT_NAME as "inventName", <!-- 原料名称 -->
SPEC as "spec", <!-- 规格 -->
UNIT as "unit", <!-- 单位 -->
PCS_QTY as "pcsQty", <!-- 加工数量 -->
PCS_WEIGHT as "pcsWeight", <!-- 加工重量 -->
OUT_QTY as "outQty", <!-- 出库数量 -->
OUT_WEIGHT as "outWeight", <!-- 出库重量 -->
REMAINING_QTY as "remainingQty", <!-- 剩余数量 -->
REMAINING_WEIGHT as "remainingWeight" <!-- 剩余重量 -->
FROM ${hggpSchema}.HGSC010B WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGSC010B 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="parentId">
PARENT_ID = #parentId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractCode">
CONTRACT_CODE = #contractCode#
</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="unit">
UNIT = #unit#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="pcsQty">
PCS_QTY = #pcsQty#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="pcsWeight">
PCS_WEIGHT = #pcsWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="outQty">
OUT_QTY = #outQty#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="outWeight">
OUT_WEIGHT = #outWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="remainingQty">
REMAINING_QTY = #remainingQty#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="remainingWeight">
REMAINING_WEIGHT = #remainingWeight#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGSC010B (ID, <!-- ID -->
ACCOUNT_CODE, <!-- 账套 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
DELETE_FLAG, <!-- 是否删除 0-否1-是 -->
COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 -->
PARENT_ID, <!-- 委托ID -->
CONTRACT_CODE, <!-- 委托单号 -->
INVENT_TYPE, <!-- 存货类型 -->
INVENT_CODE, <!-- 原料编码 -->
INVENT_NAME, <!-- 原料名称 -->
SPEC, <!-- 规格 -->
UNIT, <!-- 单位 -->
PCS_QTY, <!-- 加工数量 -->
PCS_WEIGHT, <!-- 加工重量 -->
OUT_QTY, <!-- 出库数量 -->
OUT_WEIGHT, <!-- 出库重量 -->
REMAINING_QTY, <!-- 剩余数量 -->
REMAINING_WEIGHT <!-- 剩余重量 -->
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #deleteFlag#,
#companyCode#, #companyName#, #parentId#, #contractCode#, #inventType#,
#inventCode#, #inventName#, #spec#, #unit#, #pcsQty#, #pcsWeight#, #outQty#, #outWeight#, #remainingQty#,
#remainingWeight#)
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGSC010B WHERE ID = #id#
</delete>
<delete id="deleteFlag">
DELETE FROM ${hggpSchema}.HGSC010B WHERE PARENT_ID = #parentId#
</delete>
<update id="update">
UPDATE ${hggpSchema}.HGSC010B
SET
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 修改时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 是否删除 0-否1-是 -->
COMPANY_CODE = #companyCode#, <!-- 公司编码 -->
COMPANY_NAME = #companyName#, <!-- 公司名称 -->
PARENT_ID = #parentId#, <!-- 委托ID -->
CONTRACT_CODE = #contractCode#, <!-- 委托单号 -->
INVENT_TYPE = #inventType#, <!-- 存货类型 -->
INVENT_CODE = #inventCode#, <!-- 原料编码 -->
INVENT_NAME = #inventName#, <!-- 原料名称 -->
SPEC = #spec#, <!-- 规格 -->
UNIT = #unit#, <!-- 单位 -->
PCS_QTY = #pcsQty#, <!-- 加工数量 -->
PCS_WEIGHT = #pcsWeight#, <!-- 加工重量 -->
OUT_QTY = #outQty#, <!-- 出库数量 -->
OUT_WEIGHT = #outWeight#, <!-- 出库重量 -->
REMAINING_QTY = #remainingQty#, <!-- 剩余数量 -->
REMAINING_WEIGHT = #remainingWeight# <!-- 剩余重量 -->
WHERE
ID = #id#
</update>
</sqlMap>
...@@ -17,22 +17,7 @@ import com.baosight.hggp.hg.pz.domain.HGPZ005; ...@@ -17,22 +17,7 @@ import com.baosight.hggp.hg.pz.domain.HGPZ005;
import com.baosight.hggp.hg.pz.domain.HGPZ005A; import com.baosight.hggp.hg.pz.domain.HGPZ005A;
import com.baosight.hggp.hg.pz.tools.HGPZTools; import com.baosight.hggp.hg.pz.tools.HGPZTools;
import com.baosight.hggp.hg.sc.constant.HgScSqlConstant; import com.baosight.hggp.hg.sc.constant.HgScSqlConstant;
import com.baosight.hggp.hg.sc.domain.HGSC001; import com.baosight.hggp.hg.sc.domain.*;
import com.baosight.hggp.hg.sc.domain.HGSC001A;
import com.baosight.hggp.hg.sc.domain.HGSC003;
import com.baosight.hggp.hg.sc.domain.HGSC004;
import com.baosight.hggp.hg.sc.domain.HGSC004A;
import com.baosight.hggp.hg.sc.domain.HGSC004B;
import com.baosight.hggp.hg.sc.domain.HGSC005;
import com.baosight.hggp.hg.sc.domain.HGSC005A;
import com.baosight.hggp.hg.sc.domain.HGSC006;
import com.baosight.hggp.hg.sc.domain.HGSC006A;
import com.baosight.hggp.hg.sc.domain.HGSC007;
import com.baosight.hggp.hg.sc.domain.HGSC007B;
import com.baosight.hggp.hg.sc.domain.HGSC008;
import com.baosight.hggp.hg.sc.domain.HGSC009;
import com.baosight.hggp.hg.sc.domain.HGSC009A;
import com.baosight.hggp.hg.sc.domain.HGSC099;
import com.baosight.hggp.hg.sj.domain.HGSJ001; import com.baosight.hggp.hg.sj.domain.HGSJ001;
import com.baosight.hggp.hg.sj.tools.HGSJTools; import com.baosight.hggp.hg.sj.tools.HGSJTools;
import com.baosight.hggp.hg.zl.domain.HGZL002; import com.baosight.hggp.hg.zl.domain.HGZL002;
...@@ -1954,4 +1939,14 @@ public class HGSCTools { ...@@ -1954,4 +1939,14 @@ public class HGSCTools {
} }
} }
public static class Hgsc010 {
public static HGSC010 getById(Long id){
AssertUtils.isTrue(Objects.isNull(id)||id<=0, "委托加工ID不能为空!");
return (HGSC010)DaoBase.getInstance().get(HGSC010.QUERY, HGSC009.FIELD_ID, id);
}
}
} }
$(function () {
var companyCodeBox = __eiInfo.getBlock("roleCompany").getMappedRows();
var supRecordCodeBox = __eiInfo.getBlock("sup_record_block_id").getMappedRows();
$("#QUERY").on("click", function () {
resultGrid.dataSource.page(1);
});
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 50, 70, 100],
},
columns: [
{
field: "operator",
template: function (item) {
let template = '';
if (item.companyCode) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showFunc(\'' + item.companyCode + '\',\'' + item.companyName + '\',\'' + item.id + '\',\'' + item.contractCode + '\')" >详情</a>';
}
return template;
}
}, {
field: "contractDate",
attributes: {
class: "i-input-readonly"
},
defaultValue: function () {
return currShortDate();
}
},
],
beforeEdit: function (e) {
let item = e.model;
if(item.subStatus == '1'){
e.preventDefault();
}
},
loadComplete: function (grid) {
$("#BNT_SUBMIT").on("click", updateStatus);
grid.dataSource.bind("change", function (e) {
if (e.field == "companyCode") {
for (let i = 0; i < companyCodeBox.length; i++) {
if (companyCodeBox[i]['companyCode'] === e.items[0]['companyCode']) {
resultGrid.setCellValue(e.items[0],"companyName",companyCodeBox[i]['companyName']);
break;
}
}
}
if (e.field == "supCode") {
for (let i = 0; i < supRecordCodeBox.length; i++) {
if (supRecordCodeBox[i]['valueField'] === e.items[0]['supCode']) {
resultGrid.setCellValue(e.items[0],"supName",supRecordCodeBox[i]['textField']);
break;
}
}
}
});
},
onSuccess: function (e) {
if (e.eiInfo.extAttr.methodName == 'save' || e.eiInfo.extAttr.methodName == 'delete') {
query();
}
},
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
let btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
save(btnNode);
}
}
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
});
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 显示附件详情
* @param companyCode 公司编码
* @param companyName 公司名称
* @param parentId 父级ID
* @param contractCode 委托编号
*/
function showFunc(companyCode,companyName,parentId,contractCode) {
JSColorbox.open({
href: "HGSC010A?methodName=initLoad" +
"&inqu_status-0-companyCode=" + companyCode +
"&inqu_status-0-companyName=" + companyName +
"&inqu_status-0-parentId=" + parentId +
"&inqu_status-0-contractCode="+ contractCode,
title: "<div style='text-align: center;'>委托详情</div>",
width: "90%",
height: "80%",
});
}
let save = function (btnNode) {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
$.each(rows, function (index, item) {
let companyName = item.get("companyName");
let contractDate = item.get("contractDate");
let supCode = item.get("supCode");
if (isBlank(companyName)) {
message("选中的第" + (index + 1) + "行\"公司\",不能为空!");
flag = false;
return false;
}
if (isBlank(contractDate)) {
message("选中的第" + (index + 1) + "行\"委托日期\",不能为空!");
flag = false;
return false;
}
if (isBlank(supCode)) {
message("选中的第" + (index + 1) + "行\"供应商名称\",不能为空!");
flag = false;
return false;
}
});
if (flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGSC010", "save", true);
btnNode.attr("disabled", false);
}
});
}
};
function updateStatus() {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
$.each(rows, function (index, item) {
let subStatus = item.get("subStatus");
if (subStatus == '1') {
message("选中的第" + (index + 1) + "行\"委托任务已提交\",不能重复提交!");
flag = false;
return false;
}
});
if (flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"提交\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGSC010", "updateStatus", true);
}
});
}
}
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/9/29
Time: 15:49
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page import="com.baosight.iplat4j.core.web.threadlocal.UserSession" %><
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<%
String loginName = UserSession.getLoginName();
%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<c:set var="loginName" value="<%=loginName%>" />
<script>
var ctx = "${ctx}";
</script>
<EF:EFPage title="委托加工">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/>
</EF:EFSelect>
<EF:EFDatePicker blockId="inqu_status" row="0" ename="contractDate" cname="委托加工日期" role="date"
format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="contractCode" cname="委托单号" placeholder="模糊查询" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="supCode" cname="供应商名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="sup_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect blockId="inqu_status" row="0" ename="userId" cname="申请人" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="user_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect blockId="inqu_status" row="0" ename="subStatus" cname="提交状态" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.hpkc.submitStatus"/>
</EF:EFSelect>
<EF:EFSelect blockId="inqu_status" row="0" ename="depositStatus" cname="入库状态" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.hgsc.depositStatus"/>
</EF:EFSelect>
<EF:EFSelect blockId="inqu_status" row="0" ename="outStatus" cname="出库状态" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.hgsc.outStatus"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="150" align="center"/>
<EF:EFComboColumn ename="companyCode" cname="公司名称"
columnTemplate="#=companyName#" itemTemplate="#=companyName#"
textField="companyName" valueField="companyCode"
maxLength="16" readonly="false" width="200" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/>
</EF:EFComboColumn>
<EF:EFColumn ename="companyName" cname="公司名称" hidden="true"/>
<EF:EFColumn ename="contractDate" cname="委托日期" width="120" enable="true" readonly="false" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFColumn ename="contractCode" cname="委托单号" width="120" enable="false" readonly="false" align="center"/>
<EF:EFComboColumn ename="supCode" cname="供应商名称"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="false" width="200" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="sup_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="supName" cname="供应商名称" hidden="true"/>
<EF:EFComboColumn ename="userId" cname="申请人" defaultValue="${loginName}"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="false" width="100" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="user_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="subStatus" cname="提交状态" width="80" enable="true" readonly="true" align="center"
required="false" defaultValue="0">
<EF:EFCodeOption codeName="hggp.hpkc.submitStatus"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="depositStatus" cname="入库状态" width="80" enable="true" readonly="true" align="center"
required="false" defaultValue="0">
<EF:EFCodeOption codeName="hggp.hgsc.depositStatus"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="outStatus" cname="出库状态" width="80" enable="true" readonly="true" align="center"
required="false" defaultValue="0">
<EF:EFCodeOption codeName="hggp.hgsc.outStatus"/>
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
$(function () {
var inventRecordBox = __eiInfo.getBlock("invent_record_box_block_id").getMappedRows();
$("#QUERY").on("click", function () {
resultGrid.dataSource.page(1);
});
IPLATUI.EFGrid = {
"result":{
pageable: {
pageSize: 10,
pageSizes: [10, 20, 50, 70, 100],
},
columns: [
{
field: "productCode",
filter: function (option) {
let inventType = option.model['inventType'];
if (inventType){
return _.filter(inventRecordBox, function (item) {
return item["param3Field"]==inventType && item["param1Field"]=='1';
})
}else {
return _.filter(inventRecordBox, function (item) {
return item["param1Field"]=='1';
})
}
},
template: function (dataItem) {
for (let i = 0; i < inventRecordBox.length; i++) {
if (inventRecordBox[i]['valueField'] === dataItem['productCode']) {
return inventRecordBox[i]['valueField'];
}
}
return dataItem["productCode"];
}
}
],
loadComplete: function (grid) {
grid.dataSource.bind("change", function (e) {
if (e.field == "productCode") {
for (let i = 0; i < inventRecordBox.length; i++) {
if (inventRecordBox[i]['valueField'] === e.items[0]['productCode']) {
resultGrid.setCellValue(e.items[0],"productName",inventRecordBox[i]['textField']);
resultGrid.setCellValue(e.items[0],"spec",inventRecordBox[i]['param4Field']);
resultGrid.setCellValue(e.items[0],"unit",inventRecordBox[i]['param6Field']);
if (isBlank(e.items[0]['inventType'])){
resultGrid.setCellValue(e.items[0],"inventType",inventRecordBox[i]['param3Field']);
}
}
}
loadChange(grid, e, "pcsQty");
}else if (e.field == "pcsQty"){
resultGrid.setCellValue(e.items[0],"remainingQty",e.items[0]['pcsQty']);
}else if (e.field == "pcsWeight"){
resultGrid.setCellValue(e.items[0],"remainingWeight",e.items[0]['pcsWeight']);
}
});
},
onSuccess: function (e) {
if (e.eiInfo.extAttr.methodName == 'save' || e.eiInfo.extAttr.methodName == 'delete') {
query();
}
},
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
let btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
saveResult(btnNode);
}
},
"detail":{
pageable: {
pageSize: 10,
pageSizes: [10, 20, 50, 70, 100],
},
columns: [
{
field: "inventCode",
filter: function (option) {
let inventType = option.model['inventType'];
if (inventType){
return _.filter(inventRecordBox, function (item) {
return item["param3Field"]==inventType && item["param1Field"]=='3';
})
}else {
return _.filter(inventRecordBox, function (item) {
return item["param1Field"]=='3';
})
}
},
template: function (dataItem) {
for (let i = 0; i < inventRecordBox.length; i++) {
if (inventRecordBox[i]['valueField'] === dataItem['inventCode']) {
return inventRecordBox[i]['valueField'];
}
}
return dataItem["inventCode"];
}
}
],
loadComplete: function (grid) {
grid.dataSource.bind("change", function (e) {
// 判断父级节点是否发生变化
if (e.field == "inventCode") {
for (let i = 0; i < inventRecordBox.length; i++) {
if (inventRecordBox[i]['valueField'] === e.items[0]['inventCode']) {
detailGrid.setCellValue(e.items[0],"inventName",inventRecordBox[i]['textField']);
detailGrid.setCellValue(e.items[0],"spec",inventRecordBox[i]['param4Field']);
detailGrid.setCellValue(e.items[0],"unit",inventRecordBox[i]['param6Field']);
if (isBlank(e.items[0]['inventType'])){
detailGrid.setCellValue(e.items[0],"inventType",inventRecordBox[i]['param3Field']);
}
}
}
loadChange(grid, e, "pcsQty");
}else if (e.field == "pcsQty"){
detailGrid.setCellValue(e.items[0],"remainingQty",e.items[0]['pcsQty']);
}else if (e.field == "pcsWeight"){
detailGrid.setCellValue(e.items[0],"remainingWeight",e.items[0]['pcsWeight']);
}
});
},
onSuccess: function (e) {
if (e.eiInfo.extAttr.methodName == 'save' || e.eiInfo.extAttr.methodName == 'delete') {
query();
}
},
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
let btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
saveDetail(btnNode);
}
}
}
})
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
});
let query = function () {
resultGrid.dataSource.page(1);
detailGrid.dataSource.page(1);
}
let saveResult = function (btnNode) {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
$.each(rows, function (index, item) {
let inventType = item.get("inventType");
let productCode = item.get("productCode");
if (isBlank(inventType)) {
message("选中的第" + (index + 1) + "行\"存货类型\",不能为空!");
flag = false;
return false;
}
if (isBlank(productCode)) {
message("选中的第" + (index + 1) + "行\"成品编码\",不能为空!");
flag = false;
return false;
}
});
if (flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGSC010A", "save", true);
btnNode.attr("disabled", false);
}
});
}
};
let saveDetail = function (btnNode) {
let rows = detailGrid.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");
if (isBlank(inventType)) {
message("选中的第" + (index + 1) + "行\"存货类型\",不能为空!");
flag = false;
return false;
}
if (isBlank(inventCode)) {
message("选中的第" + (index + 1) + "行\"原料编码\",不能为空!");
flag = false;
return false;
}
});
if (flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("detail", "HGSC010B", "save", true);
btnNode.attr("disabled", false);
}
});
}
};
function updateStatus(id,status) {
let inEiInfo = new EiInfo();
inEiInfo.set("result-0-id", id);
inEiInfo.set("result-0-status", status);
EiCommunicator.send('HGSC009', 'updateStatus', inEiInfo, {
onSuccess(response) {
NotificationUtil(response.msg);
query();
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
}
);
}
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/9/29
Time: 15:50
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ 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="result" title="成本信息">
<EF:EFInput blockId="inqu_status" row="0" ename="parentId" cname="委托ID" type="hidden"/>
<EF:EFInput blockId="inqu_status" row="0" ename="companyCode" cname="公司编码" type="hidden"/>
<EF:EFInput blockId="inqu_status" row="0" ename="companyName" cname="公司名称" type="hidden"/>
<EF:EFInput blockId="inqu_status" row="0" ename="contractCode" cname="委托单号" type="hidden"/>
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" needAuth="false">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" width="120" align="center" required="true"
blockName="invent_type_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFComboColumn ename="productCode" cname="成品编码" width="120" align="center" required="true" readonly="false"
blockName="invent_record_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#"
filter="contains">
</EF:EFComboColumn>
<EF:EFColumn ename="productName" cname="成品名称" width="120" align="center" required="true"/>
<EF:EFColumn ename="spec" cname="规格" width="140" align="center" maxLength="50"/>
<EF:EFColumn ename="unit" cname="单位" width="80" align="center"/>
<EF:EFColumn ename="pcsQty" cname="加工数量" width="120" enable="true" format="{0:N0}" editType="text"
displayType="0" sort="true" align="right" maxLength="17" required="true" defaultValue="0"
data-regex="/^-?[0-9]{1,17}$/" readonly="false"
data-errorprompt="请输入数字,该值最大可设置17位整数!"/>
<EF:EFColumn ename="pcsWeight" cname="加工重量" width="120" enable="true" format="{0:N3}" editType="text"
displayType="0.00" sort="true" align="right" maxLength="17" required="true" defaultValue="0"
data-regex="/^-?[0-9]{1,17}([.][0-9]{1,3})?$/" readonly="false"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/>
<EF:EFColumn ename="depositQty" cname="入库数量" width="100" enable="false" format="{0:N0}" editType="text"
displayType="0" sort="true" align="right" maxLength="17" required="false" defaultValue="0"
data-regex="/^-?[0-9]{1,17}$/" readonly="false"
data-errorprompt="请输入数字,该值最大可设置17位整数!"/>
<EF:EFColumn ename="depositWeight" cname="入库重量" width="100" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="17" required="false" defaultValue="0"
data-regex="/^-?[0-9]{1,17}([.][0-9]{1,3})?$/" readonly="false"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/>
<EF:EFColumn ename="remainingQty" cname="剩余数量" width="100" enable="false" format="{0:N0}" editType="text"
displayType="0" sort="true" align="right" maxLength="17" required="false" defaultValue="0"
data-regex="/^-?[0-9]{1,17}$/" readonly="false"
data-errorprompt="请输入数字,该值最大可设置17位整数!"/>
<EF:EFColumn ename="remainingWeight" cname="剩余重量" width="100" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="17" required="false" defaultValue="0"
data-regex="/^-?[0-9]{1,17}([.][0-9]{1,3})?$/" readonly="false"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/>
</EF:EFGrid>
</EF:EFRegion>
<EF:EFRegion id="detail" title="原料信息">
<EF:EFGrid blockId="detail" autoDraw="override" isFloat="true" needAuth="false" serviceName="HGSC010B">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" width="100" align="center" required="true"
blockName="invent_type_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFComboColumn ename="inventCode" cname="原料编码" width="120" align="center" required="true" readonly="false"
blockName="invent_record_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#"
filter="contains">
</EF:EFComboColumn>
<EF:EFColumn ename="inventName" cname="原料名称" width="120" align="center" required="true"/>
<EF:EFColumn ename="spec" cname="规格" width="140" align="center" maxLength="50"/>
<EF:EFColumn ename="unit" cname="单位" width="80" align="center"/>
<EF:EFColumn ename="pcsQty" cname="加工数量" width="120" enable="true" format="{0:N0}" editType="text"
displayType="0" sort="true" align="right" maxLength="17" required="true" defaultValue="0"
data-regex="/^-?[0-9]{1,17}$/" readonly="false"
data-errorprompt="请输入数字,该值最大可设置17位整数!"/>
<EF:EFColumn ename="pcsWeight" cname="加工重量" width="120" enable="true" format="{0:N3}" editType="text"
displayType="0.00" sort="true" align="right" maxLength="17" required="true" defaultValue="0"
data-regex="/^-?[0-9]{1,17}([.][0-9]{1,3})?$/" readonly="false"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/>
<EF:EFColumn ename="outQty" cname="出库数量" width="100" enable="false" format="{0:N0}" editType="text"
displayType="0" sort="true" align="right" maxLength="17" required="false" defaultValue="0"
data-regex="/^-?[0-9]{1,17}$/" readonly="false"
data-errorprompt="请输入数字,该值最大可设置17位整数!"/>
<EF:EFColumn ename="outWeight" cname="出库重量" width="100" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="17" required="false" defaultValue="0"
data-regex="/^-?[0-9]{1,17}([.][0-9]{1,3})?$/" readonly="false"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/>
<EF:EFColumn ename="remainingQty" cname="剩余数量" width="100" enable="false" format="{0:N0}" editType="text"
displayType="0" sort="true" align="right" maxLength="17" required="false" defaultValue="0"
data-regex="/^-?[0-9]{1,17}$/" readonly="false"
data-errorprompt="请输入数字,该值最大可设置17位整数!"/>
<EF:EFColumn ename="remainingWeight" cname="剩余重量" width="100" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="17" required="false" defaultValue="0"
data-regex="/^-?[0-9]{1,17}([.][0-9]{1,3})?$/" readonly="false"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment