Commit 89f8d730 by liuyang

2024-10-08 委外出库单

parent 92e1cb78
......@@ -147,6 +147,8 @@ public class HGConstant {
public static final String CONTRACT_CODE = "CONTRACT_CODE";
//委外入库单号
public static final String DEPOSIT_CODE = "DEPOSIT_CODE";
//委外出库单号
public static final String OUT_CODE = "OUT_CODE";
}
......@@ -421,4 +423,15 @@ public class HGConstant {
// 已审核
public static final Integer S_1 = 1;
}
public static class ScOutStatus {
// 未出库
public static final Integer S_0 = 0;
// 部分出库
public static final Integer S_1 = 1;
// 全部出库
public static final Integer S_2 = 2;
}
}
......@@ -31,4 +31,29 @@ public class HgKcSqlConstant {
public static final String UPDATE_STATUS = MODULE_NAME+"Status";
}
public static class HgKc015 {
// 模块名称:HGCW003
private static final String MODULE_NAME = "HGKC015.";
public static final String UPDATE_STATUS = MODULE_NAME+"updateByStatus";
}
/**
* HGKC014A SQL定义
*
*/
public static class HgKc015a {
// 模块名称:HGCW003
private static final String MODULE_NAME = "HGKC015A.";
// 父级删除
public static final String DELETE_BY_PARENT_ID = MODULE_NAME+"deleteByParentId";
public static final String UPDATE_STATUS = MODULE_NAME+"Status";
}
}
......@@ -99,7 +99,7 @@ public class HGKC014A extends DaoEPBase {
private String inventType = " "; /* 存货类型*/
private String productCode = " "; /* 成品编码*/
private String productName = " "; /* 成品名称*/
private String specId = " "; /* 规格ID*/
private Long specId = new Long(0); /* 规格ID*/
private String spec = " "; /* 规格*/
private String unit = " "; /* 单位*/
private BigDecimal depositQty = new BigDecimal("0"); /* 入库数量*/
......@@ -611,11 +611,11 @@ public class HGKC014A extends DaoEPBase {
this.whName = whName;
}
public String getSpecId() {
public Long getSpecId() {
return specId;
}
public void setSpecId(String specId) {
public void setSpecId(Long specId) {
this.specId = specId;
}
......@@ -671,7 +671,7 @@ public class HGKC014A extends DaoEPBase {
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));
setSpecId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SPEC_ID)), specId));
setSpecId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_SPEC_ID)), specId));
setSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SPEC)), spec));
setUnit(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UNIT)), unit));
setDepositQty(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_DEPOSIT_QTY)), depositQty));
......
package com.baosight.hggp.hg.kc.domain;
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:Hgkc015.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 HGKC015 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_OUT_DATE = "outDate"; /* 委外出库日期*/
public static final String FIELD_OUT_CODE = "outCode"; /* 委外出库单号*/
public static final String FIELD_WH_CODE = "whCode"; /* 仓库编码*/
public static final String FIELD_WH_NAME = "whName"; /* 仓库名称*/
public static final String FIELD_USER_ID = "userId"; /* 仓库人员*/
public static final String FIELD_STATUS = "status"; /* 提交状态 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_OUT_DATE = "OUT_DATE"; /* 委外出库日期*/
public static final String COL_OUT_CODE = "OUT_CODE"; /* 委外出库单号*/
public static final String COL_WH_CODE = "WH_CODE"; /* 仓库编码*/
public static final String COL_WH_NAME = "WH_NAME"; /* 仓库名称*/
public static final String COL_USER_ID = "USER_ID"; /* 仓库人员*/
public static final String COL_STATUS = "STATUS"; /* 提交状态 0-未出库 1-已出库*/
public static final String QUERY = "HGKC015.query";
public static final String COUNT = "HGKC015.count";
public static final String INSERT = "HGKC015.insert";
public static final String UPDATE = "HGKC015.update";
public static final String DELETE = "HGKC015.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 String outDate = " "; /* 委外出库日期*/
private String outCode = " "; /* 委外出库单号*/
private String whCode = " "; /* 仓库编码*/
private String whName = " "; /* 仓库名称*/
private String userId = " "; /* 仓库人员*/
private Integer status = 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_OUT_DATE);
eiColumn.setDescName("委外出库日期");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_OUT_CODE);
eiColumn.setDescName("委外出库单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_WH_CODE);
eiColumn.setDescName("仓库编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_WH_NAME);
eiColumn.setDescName("仓库名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_USER_ID);
eiColumn.setDescName("仓库人员");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_STATUS);
eiColumn.setDescName("提交状态 0-未出库 1-已出库");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HGKC015() {
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 outDate - 委外出库日期.
* @return the outDate
*/
public String getOutDate() {
return this.outDate;
}
/**
* set the outDate - 委外出库日期.
*
* @param outDate - 委外出库日期
*/
public void setOutDate(String outDate) {
this.outDate = outDate;
}
/**
* get the outCode - 委外出库单号.
* @return the outCode
*/
public String getOutCode() {
return this.outCode;
}
/**
* set the outCode - 委外出库单号.
*
* @param outCode - 委外出库单号
*/
public void setOutCode(String outCode) {
this.outCode = outCode;
}
/**
* get the whCode - 仓库编码.
* @return the whCode
*/
public String getWhCode() {
return this.whCode;
}
/**
* set the whCode - 仓库编码.
*
* @param whCode - 仓库编码
*/
public void setWhCode(String whCode) {
this.whCode = whCode;
}
/**
* get the whName - 仓库名称.
* @return the whName
*/
public String getWhName() {
return this.whName;
}
/**
* set the whName - 仓库名称.
*
* @param whName - 仓库名称
*/
public void setWhName(String whName) {
this.whName = whName;
}
/**
* 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 status - 提交状态 0-未出库 1-已出库.
* @return the status
*/
public Integer getStatus() {
return this.status;
}
/**
* set the status - 提交状态 0-未出库 1-已出库.
*
* @param status - 提交状态 0-未出库 1-已出库
*/
public void setStatus(Integer status) {
this.status = status;
}
/**
* get the value from Map.
*
* @param map - source data map
*/
@Override
public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id));
setAccountCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ACCOUNT_CODE)), accountCode));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy));
setCreatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_NAME)), createdName));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_TIME)), createdTime));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_BY)), updatedBy));
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode));
setCompanyName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_NAME)), companyName));
setOutDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_OUT_DATE)), outDate));
setOutCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_OUT_CODE)), outCode));
setWhCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_WH_CODE)), whCode));
setWhName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_WH_NAME)), whName));
setUserId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_USER_ID)), userId));
setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status));
}
/**
* set the value to Map.
*/
@Override
public Map toMap() {
Map map = new HashMap();
map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID)));
map.put(FIELD_ACCOUNT_CODE, StringUtils.toString(accountCode, eiMetadata.getMeta(FIELD_ACCOUNT_CODE)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_CREATED_BY, StringUtils.toString(createdBy, eiMetadata.getMeta(FIELD_CREATED_BY)));
map.put(FIELD_CREATED_NAME, StringUtils.toString(createdName, eiMetadata.getMeta(FIELD_CREATED_NAME)));
map.put(FIELD_CREATED_TIME, StringUtils.toString(createdTime, eiMetadata.getMeta(FIELD_CREATED_TIME)));
map.put(FIELD_UPDATED_BY, StringUtils.toString(updatedBy, eiMetadata.getMeta(FIELD_UPDATED_BY)));
map.put(FIELD_UPDATED_NAME, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_UPDATED_NAME)));
map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME)));
map.put(FIELD_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG)));
map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE)));
map.put(FIELD_COMPANY_NAME, StringUtils.toString(companyName, eiMetadata.getMeta(FIELD_COMPANY_NAME)));
map.put(FIELD_OUT_DATE, StringUtils.toString(outDate, eiMetadata.getMeta(FIELD_OUT_DATE)));
map.put(FIELD_OUT_CODE, StringUtils.toString(outCode, eiMetadata.getMeta(FIELD_OUT_CODE)));
map.put(FIELD_WH_CODE, StringUtils.toString(whCode, eiMetadata.getMeta(FIELD_WH_CODE)));
map.put(FIELD_WH_NAME, StringUtils.toString(whName, eiMetadata.getMeta(FIELD_WH_NAME)));
map.put(FIELD_USER_ID, StringUtils.toString(userId, eiMetadata.getMeta(FIELD_USER_ID)));
map.put(FIELD_STATUS, StringUtils.toString(status, eiMetadata.getMeta(FIELD_STATUS)));
return map;
}
}
package com.baosight.hggp.hg.kc.domain;
import com.baosight.iplat4j.core.util.NumberUtils;
import java.math.BigDecimal;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.core.util.StringUtils;
/**
* Project: <br>
* Title:Hgkc015a.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 HGKC015A 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_WH_CODE = "whCode"; /* 仓库编码*/
public static final String FIELD_WH_NAME = "whName"; /* 仓库名称*/
public static final String FIELD_PARENT_ID = "parentId"; /* 委托ID*/
public static final String FIELD_CONTRACT_CODE = "contractCode"; /* 委外单号*/
public static final String FIELD_OUT_CODE = "outCode"; /* 委外出库单号*/
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_ID = "specId"; /* 规格Id*/
public static final String FIELD_SPEC = "spec"; /* 规格*/
public static final String FIELD_UNIT = "unit"; /* 单位*/
public static final String FIELD_OUT_QTY = "outQty"; /* 出库数量*/
public static final String FIELD_OUT_UNIT_WEIGHT = "outUnitWeight";
public static final String FIELD_OUT_WEIGHT = "outWeight"; /* 出库重量*/
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_OUT_CODE = "OUT_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_OUT_QTY = "OUT_QTY"; /* 出库数量*/
public static final String COL_OUT_WEIGHT = "OUT_WEIGHT"; /* 出库重量*/
public static final String QUERY = "HGKC015A.query";
public static final String COUNT = "HGKC015A.count";
public static final String INSERT = "HGKC015A.insert";
public static final String UPDATE = "HGKC015A.update";
public static final String DELETE = "HGKC015A.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 Boolean deleteFlag; /* 是否删除 0-否1-是*/
private String companyCode = " "; /* 公司编码*/
private String companyName = " "; /* 公司名称*/
private String whCode = " "; /* 仓库编码*/
private String whName = " "; /* 仓库名称*/
private Long parentId = new Long(0); /* 委外ID*/
private String contractCode = " "; /* 委外单号*/
private String outCode = " "; /* 委外出库单号*/
private String inventType = " "; /* 存货类型*/
private String inventCode = " "; /* 原料编码*/
private String inventName = " "; /* 原料名称*/
private Long specId = new Long(0);
private String spec = " "; /* 规格*/
private String unit = " "; /* 单位*/
private BigDecimal outQty = new BigDecimal("0"); /* 出库数量*/
private BigDecimal outUnitWeight = new BigDecimal("0");
private BigDecimal outWeight = 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_WH_CODE);
eiColumn.setDescName("仓库编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_WH_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_OUT_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_ID);
eiColumn.setDescName("规格ID");
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_OUT_QTY);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(20);
eiColumn.setDescName("出库数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_OUT_UNIT_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(17);
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);
}
/**
* the constructor.
*/
public HGKC015A() {
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 Boolean getDeleteFlag() {
return this.deleteFlag;
}
/**
* set the deleteFlag - 是否删除 0-否1-是.
*
* @param deleteFlag - 是否删除 0-否1-是
*/
public void setDeleteFlag(Boolean 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 outCode - 委托单号.
* @return the outCode
*/
public String getOutCode() {
return this.outCode;
}
/**
* set the outCode - 委托单号.
*
* @param outCode - 委托单号
*/
public void setOutCode(String outCode) {
this.outCode = outCode;
}
/**
* 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 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;
}
public String getWhCode() {
return whCode;
}
public void setWhCode(String whCode) {
this.whCode = whCode;
}
public String getWhName() {
return whName;
}
public void setWhName(String whName) {
this.whName = whName;
}
public String getContractCode() {
return contractCode;
}
public void setContractCode(String contractCode) {
this.contractCode = contractCode;
}
public BigDecimal getOutUnitWeight() {
return outUnitWeight;
}
public void setOutUnitWeight(BigDecimal outUnitWeight) {
this.outUnitWeight = outUnitWeight;
}
public Long getSpecId() {
return specId;
}
public void setSpecId(Long specId) {
this.specId = specId;
}
/**
* 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.toBoolean(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));
setWhCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_WH_CODE)), whCode));
setWhName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_WH_NAME)), whName));
setParentId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_PARENT_ID)), parentId));
setContractCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONTRACT_CODE)), contractCode));
setOutCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_OUT_CODE)), outCode));
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));
setSpecId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_SPEC_ID)), specId));
setSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SPEC)), spec));
setUnit(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UNIT)), unit));
setOutQty(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_OUT_QTY)), outQty));
setOutUnitWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_OUT_UNIT_WEIGHT)), outUnitWeight));
setOutWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_OUT_WEIGHT)), outWeight));
}
/**
* 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_OUT_CODE, StringUtils.toString(outCode, eiMetadata.getMeta(FIELD_OUT_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_ID, StringUtils.toString(specId, eiMetadata.getMeta(FIELD_SPEC_ID)));
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_OUT_QTY, StringUtils.toString(outQty, eiMetadata.getMeta(FIELD_OUT_QTY)));
map.put(FIELD_OUT_WEIGHT, StringUtils.toString(outWeight, eiMetadata.getMeta(FIELD_OUT_WEIGHT)));
return map;
}
}
......@@ -81,6 +81,9 @@
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentIds">
PARENT_ID IN <iterate close=")" open="(" conjunction="," property="parentIds">#parentIds[]#</iterate>
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
......
......@@ -277,30 +277,30 @@
<update id="update">
UPDATE ${hggpSchema}.HGKC014A
SET
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 修改时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 是否删除 0-否1-是 -->
COMPANY_CODE = #companyCode#, <!-- 公司编码 -->
COMPANY_NAME = #companyName#, <!-- 公司名称 -->
WH_CODE = #whCode#,
WH_NAME = #whName#,
PARENT_ID = #parentId#, <!-- 委托ID -->
CONTRACT_CODE = #contractCode#, <!-- 委托单号 -->
DEPOSIT_CODE = #depositCode#,
INVENT_TYPE = #inventType#, <!-- 存货类型 -->
PRODUCT_CODE = #productCode#, <!-- 成品编码 -->
PRODUCT_NAME = #productName#, <!-- 成品名称 -->
SPEC_ID = #specId#,
SPEC = #spec#, <!-- 规格 -->
UNIT = #unit#, <!-- 单位 -->
DEPOSIT_QTY = #depositQty#, <!-- 入库数量 -->
DEPOSIT_UNIT_WEIGHT = #depositUnitWeight#,
DEPOSIT_WEIGHT = #depositWeight#, <!-- 入库重量 -->
DELIVER_QTY = #deliverQty#,
ACTUAL_QTY = #actualQty#
WHERE
ID = #id#
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 修改时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 是否删除 0-否1-是 -->
COMPANY_CODE = #companyCode#, <!-- 公司编码 -->
COMPANY_NAME = #companyName#, <!-- 公司名称 -->
WH_CODE = #whCode#,
WH_NAME = #whName#,
PARENT_ID = #parentId#, <!-- 委托ID -->
CONTRACT_CODE = #contractCode#, <!-- 委托单号 -->
DEPOSIT_CODE = #depositCode#,
INVENT_TYPE = #inventType#, <!-- 存货类型 -->
PRODUCT_CODE = #productCode#, <!-- 成品编码 -->
PRODUCT_NAME = #productName#, <!-- 成品名称 -->
SPEC_ID = #specId#,
SPEC = #spec#, <!-- 规格 -->
UNIT = #unit#, <!-- 单位 -->
DEPOSIT_QTY = #depositQty#, <!-- 入库数量 -->
DEPOSIT_UNIT_WEIGHT = #depositUnitWeight#,
DEPOSIT_WEIGHT = #depositWeight#, <!-- 入库重量 -->
DELIVER_QTY = #deliverQty#,
ACTUAL_QTY = #actualQty#
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 : HGKC015
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,
OUT_DATE VARCHAR,
OUT_CODE VARCHAR,
WH_CODE VARCHAR,
WH_NAME VARCHAR,
USER_ID VARCHAR,
STATUS TINYINT
-->
<sqlMap namespace="HGKC015">
<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="outDate">
OUT_DATE = #outDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="outCode">
OUT_CODE LIKE CONCAT('%',#outCode#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode">
WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whName">
WH_NAME = #whName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="userId">
USER_ID = #userId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentIds">
PARENT_ID IN <iterate close=")" open="(" conjunction="," property="parentIds">#parentIds[]#</iterate>
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.kc.domain.HGKC015">
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", <!-- 公司名称 -->
OUT_DATE as "outDate", <!-- 委托入库日期 -->
OUT_CODE as "outCode", <!-- 委托入库单号 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 -->
USER_ID as "userId", <!-- 仓库人员 -->
STATUS as "status" <!-- 提交状态 0-未出库 1-已出库 -->
FROM ${hggpSchema}.HGKC015 WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
OUT_DATE DESC, ID DESC
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGKC015 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="outDate">
OUT_DATE = #outDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="outCode">
OUT_CODE = #outCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode">
WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whName">
WH_NAME = #whName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="userId">
USER_ID = #userId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGKC015 (ID, <!-- ID -->
ACCOUNT_CODE, <!-- 账套 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
DELETE_FLAG, <!-- 是否删除 0-否1-是 -->
COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 -->
OUT_DATE, <!-- 委托入库日期 -->
OUT_CODE, <!-- 委托入库单号 -->
WH_CODE, <!-- 仓库编码 -->
WH_NAME, <!-- 仓库名称 -->
USER_ID, <!-- 仓库人员 -->
STATUS <!-- 提交状态 0-未出库 1-已出库 -->
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #deleteFlag#,
#companyCode#, #companyName#, #outDate#, #outCode#, #whCode#, #whName#, #userId#,#status#
)
<selectKey resultClass="long" keyProperty="id">
SELECT MAX(ID) as "id" FROM ${hggpSchema}.HGKC015
</selectKey>
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGKC015 WHERE
ID = #id#
</delete>
<update id="update">
UPDATE ${hggpSchema}.HGKC015
SET
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 修改时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 是否删除 0-否1-是 -->
COMPANY_CODE = #companyCode#, <!-- 公司编码 -->
COMPANY_NAME = #companyName#, <!-- 公司名称 -->
OUT_DATE = #outDate#, <!-- 委托入库日期 -->
OUT_CODE = #outCode#, <!-- 委托入库单号 -->
WH_CODE = #whCode#, <!-- 仓库编码 -->
WH_NAME = #whName#, <!-- 仓库名称 -->
USER_ID = #userId#, <!-- 仓库人员 -->
STATUS = #status# <!-- 提交状态 0-未出库 1-已出库 -->
WHERE
ID = #id#
</update>
<update id="updateByStatus">
UPDATE ${hggpSchema}.HGKC015
SET
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 修改时间 -->
STATUS = #status# <!-- 提交状态 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 : HGKC015A
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,
OUT_CODE VARCHAR,
INVENT_TYPE TINYINT,
INVENT_CODE VARCHAR,
INVENT_NAME VARCHAR,
SPEC VARCHAR,
UNIT VARCHAR,
OUT_QTY DECIMAL,
OUT_WEIGHT DECIMAL
-->
<sqlMap namespace="HGKC015A">
<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="whCode">
WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whName">
WH_NAME = #whName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentId">
PARENT_ID = #parentId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractCode">
CONTRACT_CODE = #contractCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="outCode">
OUT_CODE = #outCode#
</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="specId">
SPEC_ID = #specId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="spec">
SPEC = #spec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unit">
UNIT = #unit#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="outQty">
OUT_QTY = #outQty#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="outWeight">
OUT_WEIGHT = #outWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentIds">
PARENT_ID IN <iterate close=")" open="(" conjunction="," property="parentIds">#parentIds[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractCodes">
CONTRACT_CODE IN <iterate close=")" open="(" conjunction="," property="contractCodes">#contractCodes[]#</iterate>
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.kc.domain.HGKC015A">
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", <!-- 公司名称 -->
WH_CODE as "whCode",
WH_NAME as "whName",
PARENT_ID as "parentId", <!-- 委外ID -->
CONTRACT_CODE as "contractCode",
OUT_CODE as "outCode", <!-- 委外单号 -->
INVENT_TYPE as "inventType", <!-- 存货类型 -->
INVENT_CODE as "inventCode", <!-- 原料编码 -->
INVENT_NAME as "inventName", <!-- 原料名称 -->
SPEC_ID as "specId",
SPEC as "spec", <!-- 规格 -->
UNIT as "unit", <!-- 单位 -->
OUT_QTY as "outQty", <!-- 出库数量 -->
OUT_UNIT_WEIGHT as "outUnitWeight", <!-- 出库单位重量 -->
OUT_WEIGHT as "outWeight" <!-- 出库重量 -->
FROM ${hggpSchema}.HGKC015A 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}.HGKC015A 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="outCode">
OUT_CODE = #outCode#
</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="outQty">
OUT_QTY = #outQty#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="outWeight">
OUT_WEIGHT = #outWeight#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGKC015A (ID, <!-- ID -->
ACCOUNT_CODE, <!-- 账套 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
DELETE_FLAG, <!-- 是否删除 0-否1-是 -->
COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 -->
WH_CODE,
WH_NAME,
PARENT_ID, <!-- 委外ID -->
CONTRACT_CODE, <!-- 委外单号 -->
OUT_CODE, <!-- 委外出库单号 -->
INVENT_TYPE, <!-- 存货类型 -->
INVENT_CODE, <!-- 原料编码 -->
INVENT_NAME, <!-- 原料名称 -->
SPEC_ID,
SPEC, <!-- 规格 -->
UNIT, <!-- 单位 -->
OUT_QTY, <!-- 出库数量 -->
OUT_UNIT_WEIGHT,
OUT_WEIGHT <!-- 出库重量 -->
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,#deleteFlag#,
#companyCode#, #companyName#, #whCode#, #whName#, #parentId#, #contractCode#,#outCode#, #inventType#, #inventCode#,
#inventName#, #specId#, #spec#, #unit#, #outQty#, #outUnitWeight#, #outWeight#)
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGKC015A WHERE ID = #id#
</delete>
<update id="update">
UPDATE ${hggpSchema}.HGKC015A
SET
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 修改时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 是否删除 0-否1-是 -->
COMPANY_CODE = #companyCode#, <!-- 公司编码 -->
COMPANY_NAME = #companyName#, <!-- 公司名称 -->
WH_CODE = #whCode#,
WH_NAME = #whName#,
PARENT_ID = #parentId#, <!-- 委外ID -->
CONTRACT_CODE = #contractCode#,
OUT_CODE = #outCode#, <!-- 委外单号 -->
INVENT_TYPE = #inventType#, <!-- 存货类型 -->
INVENT_CODE = #inventCode#, <!-- 原料编码 -->
INVENT_NAME = #inventName#, <!-- 原料名称 -->
SPEC_ID = #specId#,
SPEC = #spec#, <!-- 规格 -->
UNIT = #unit#, <!-- 单位 -->
OUT_QTY = #outQty#, <!-- 出库数量 -->
OUT_UNIT_WEIGHT = #outUnitWeight#,
OUT_WEIGHT = #outWeight# <!-- 出库重量 -->
WHERE
ID = #id#
</update>
</sqlMap>
......@@ -23,6 +23,7 @@ import com.baosight.hggp.hg.pz.tools.HGPZTools;
import com.baosight.hggp.hg.sc.domain.HGSC008;
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.zl.domain.HGZL001;
import com.baosight.hggp.hg.zl.domain.HGZL002;
......@@ -1254,4 +1255,62 @@ public class HGKCTools {
}
}
}
public static class HgKc015 {
public static List<HGKC015> getByParentId(List<Long> parentIds) {
if (Objects.isNull(parentIds)){
return new ArrayList<>();
}
Map<String, Object> paramMap = new HashMap();
paramMap.put("parentIds", parentIds);
paramMap.put("deleteFlag", 0);
List<HGKC015> list = DaoBase.getInstance().query(HGKC015.QUERY, paramMap);
return CollectionUtils.isEmpty(list)? null : list;
}
}
public static class HgKc015a {
public static List<HGKC015A> getByParentId(List<Long> parentIds) {
if (Objects.isNull(parentIds)){
return new ArrayList<>();
}
Map<String, Object> paramMap = new HashMap();
paramMap.put("parentIds", parentIds);
paramMap.put("deleteFlag", CommonConstant.YesNo.NO_0);
List<HGKC015A> list = DaoBase.getInstance().query(HGKC015A.QUERY, paramMap);
return CollectionUtils.isEmpty(list)? null : list;
}
public static List<HGKC015A> getByContractCodes(List<String> contractCodes) {
if (Objects.isNull(contractCodes)){
return new ArrayList<>();
}
Map<String, Object> paramMap = new HashMap();
paramMap.put("contractCodes", contractCodes);
paramMap.put("deleteFlag", CommonConstant.YesNo.NO_0);
List<HGKC015A> list = DaoBase.getInstance().query(HGKC015A.QUERY, paramMap);
return CollectionUtils.isEmpty(list)? null : list;
}
public static void deleteByParentId(List<HGKC015A> hgkc015As, List<HGSC010B> hgsc010Bs) {
if (CollectionUtils.isNotEmpty(hgkc015As)){
for (HGKC015A hgkc015A: hgkc015As) {
hgsc010Bs.stream().filter(hgsc010B ->
hgsc010B.getContractCode().equals(hgkc015A.getContractCode())
&& hgsc010B.getInventCode().equals(hgkc015A.getInventCode())
&& hgsc010B.getSpec().equals(hgkc015A.getSpec())
).forEach(hgsc010B -> {
hgsc010B.setRemainingQty(hgsc010B.getRemainingQty().add(hgkc015A.getOutQty()));
hgsc010B.setRemainingWeight(hgsc010B.getRemainingWeight().add(hgkc015A.getOutWeight()));
hgsc010B.setOutQty(hgsc010B.getOutQty().subtract(hgkc015A.getOutQty()));
hgsc010B.setOutWeight(hgsc010B.getOutWeight().subtract(hgkc015A.getOutWeight()));
DaoUtils.update(HGSC010B.UPDATE, hgsc010B);
});
DaoUtils.update(HgKcSqlConstant.HgKc015a.DELETE_BY_PARENT_ID, hgkc015A);
}
}
}
}
}
......@@ -74,5 +74,12 @@ public class HgScSqlConstant {
// 根据订单清除
public static final String DELETE_BY_ORDER = "HGSC007B.deleteByOrder";
}
public static class HgSc010 {
// 修改出库状态
public static final String UPDATE_OUT_STATUS = "HGSC010.updateByOutStatus";
// 修改入库状态
public static final String UPDATE_DEPOSIT_STATUS = "HGSC010.updateByDepositStatus";
}
}
......@@ -266,9 +266,9 @@
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 修改时间 -->
OUT_STATUS = #outStatus# <!-- 出库状态 0-未出库 1-已出库 -->
OUT_STATUS = #outStatus# <!-- 出库状态 0-未出库 1-部分出库 2-已出库-->
WHERE
ID = #id#
CONTRACT_CODE = #contractCode#
</update>
<update id="update">
......
......@@ -1998,6 +1998,18 @@ public class HGSCTools {
return (HGSC010B) DaoBase.getInstance().get(HGSC010B.QUERY, HGSC010B.FIELD_ID, id);
}
public static List<HGSC010B> getByContractCode(List<String> contractCodes){
if (CollectionUtils.isEmpty(contractCodes)){
return new ArrayList<>();
}
Map queryMap = new HashMap<String,Object>(){{
put("contractCodes",contractCodes);
put("deleteFlag",CommonConstant.YesNo.NO_0);
}};
List<HGSC010B> list = DaoBase.getInstance().query(HGSC010B.QUERY, queryMap);
return CollectionUtils.isEmpty(list)? new ArrayList<>():list;
}
public static List<HGSC010B> getByParentId(Long parentId){
AssertUtils.isTrue(Objects.isNull(parentId)||parentId<=0, "委托加工ID不能为空!");
Map queryMap = new HashMap<String,Object>(){{
......
......@@ -106,7 +106,7 @@ let saveResult = function () {
$.each(rows, function (index, item) {
let depositQty = item.get("depositQty");
let depositWeight = item.get("depositWeight");
if (isBlank(depositQty) || !isNumber(depositWeight) || depositQty <= 0) {
if (isBlank(depositQty) || !isNumber(depositQty) || depositQty <= 0) {
message("选中的第" + (index + 1) + "行\"入库数量\",不能为空并且不能为0!");
flag = false;
return false;
......
......@@ -35,7 +35,7 @@
</EF:EFComboColumn>
<EF:EFColumn ename="productName" cname="成品名称" width="120" align="center" readonly="true" required="false"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" width="120" align="center" required="flase" readonly="true"
blockName="invent_record_box_block_id" textField="textField" valueField="valueField"
blockName="invent_type_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#"
filter="contains">
</EF:EFComboColumn>
......@@ -59,7 +59,7 @@
data-errorprompt="请输入数字,该值最大可设置17位整数!"/>
<EF:EFColumn ename="remainingUnitWeight" 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-regex="/^-?[0-9]{1,17}([.][0-9]{1,3})?$/" readonly="false" hidden="true"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/>
<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"
......
$(function () {
var companyCodeBox = __eiInfo.getBlock("roleCompany").getMappedRows();
var whRecordCodeBox = __eiInfo.getBlock("wh_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 + '\')" >详情</a>';
}
return template;
}
}, {
field: "outDate",
attributes: {
class: "i-input-readonly"
},
defaultValue: function () {
return currShortDate();
}
},
],
beforeEdit: function (e) {
let item = e.model;
if(item.Status == '1'){
e.preventDefault();
}
},
loadComplete: function (grid) {
$("#BNT_SUBMIT").on("click", updateStatus);
$("#BNT_SELECT").on("click", selectFunc);
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 == "whCode") {
for (let i = 0; i < whRecordCodeBox.length; i++) {
if (whRecordCodeBox[i]['valueField'] === e.items[0]['whCode']) {
resultGrid.setCellValue(e.items[0],"whName",whRecordCodeBox[i]['textField']);
break;
}
}
}
});
},
onSuccess: function (e) {
if (e.eiInfo.extAttr.methodName == 'save' || e.eiInfo.extAttr.methodName == 'delete') {
query();
}
},
onAdd: function (e) {
$.each(e.items, function(index, item){
if (isBlank(item['outDate'])){
item['outDate'] = currShortDate();
}
});
},
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) {
JSColorbox.open({
href: "HGKC015A?methodName=initLoad" +
"&inqu_status-0-companyCode=" + companyCode +
"&inqu_status-0-companyName=" + companyName +
"&inqu_status-0-parentId=" + parentId ,
title: "<div style='text-align: center;'>委外出库详情</div>",
width: "90%",
height: "80%",
callbackName: function (){
// 关闭弹窗
JSColorbox.close();
}
});
}
function cancelFunc() {
// 关闭弹窗
JSColorbox.close();
}
/**
* 显示附件详情
* @param companyCode 公司编码
* @param companyName 公司名称
* @param parentId 父级ID
* @param contractCode 委托编号
*/
function selectFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length !== 1) {
message("请选择一条委外入库单");
return;
}
JSColorbox.open({
href: "HGKC015B?methodName=initLoad" +
"&inqu_status-0-companyCode=" + rows[0].companyCode +
"&inqu_status-0-companyName=" + rows[0].companyName +
"&inqu_status-0-whCode=" + rows[0].whCode +
"&inqu_status-0-whName=" + rows[0].whName +
"&inqu_status-0-outCode=" + rows[0].outCode +
"&inqu_status-0-parentId=" + rows[0].id ,
title: "<div style='text-align: center;'>委外出库详情</div>",
width: "90%",
height: "80%",
callbackName: function (){
// 关闭弹窗
JSColorbox.close();
}
});
}
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 outDate = item.get("outDate");
let whCode = item.get("whCode");
if (isBlank(companyName)) {
message("选中的第" + (index + 1) + "行\"公司\",不能为空!");
flag = false;
return false;
}
if (isBlank(outDate)) {
message("选中的第" + (index + 1) + "行\"委托出库日期\",不能为空!");
flag = false;
return false;
}
if (isBlank(whCode)) {
message("选中的第" + (index + 1) + "行\"仓库名称\",不能为空!");
flag = false;
return false;
}
});
if (flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGKC015", "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("status");
if (subStatus == '1') {
message("选中的第" + (index + 1) + "行\"委外任务已提交\",不能重复提交!");
flag = false;
return false;
}
});
if (flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"提交\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGKC015", "updateStatus", true,
function (e) {
var status = e.getStatus();
if (status !== -1) {
query();
}
});
}
});
}
}
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/9/30
Time: 9:20
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="outDate" cname="委外出库日期" role="date"
format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="outCode" cname="委外出库单号" placeholder="模糊查询" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="whCode" cname="仓库名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="wh_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="status" cname="提交状态" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.hpkc.submitStatus"/>
</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="true" 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="outDate" cname="委外出库日期" width="120" enable="true" readonly="false" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFColumn ename="outCode" cname="委外出库单号" width="120" enable="false" readonly="false" align="center"/>
<EF:EFComboColumn ename="whCode" 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="wh_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="whName" 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="status" cname="提交状态" width="80" enable="true" readonly="true" align="center"
required="false" defaultValue="0">
<EF:EFCodeOption codeName="hggp.hpkc.submitStatus"/>
</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: "inventCode",
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['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']) {
resultGrid.setCellValue(e.items[0],"inventName",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);
}
}
}
})
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
});
let query = function () {
resultGrid.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 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("result", "HGKC015A", "save", true);
btnNode.attr("disabled", false);
}
});
}
};
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/9/30
Time: 9:21
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="outDate" cname="委外入库单号" type="hidden"/>
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<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: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:EFColumn ename="spec" cname="规格" width="140" align="center" maxLength="50"/>
<EF:EFColumn ename="unit" cname="单位" width="80" align="center"/>
<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:EFGrid>
</EF:EFRegion>
</EF:EFPage>
$(function () {
$("#QUERY").on("click", function () {
query();
});
IPLATUI.EFGrid = {
"result":{
pageable: {
pageSize: 10,
pageSizes: [10, 20, 50, 70, 100],
},
columns: [
],
loadComplete: function (grid) {
grid.dataSource.bind("change", function (e) {
if (e.field == "outQty"){
let outQty = e.items[0]['outQty'];
let remainingUnitWeight = e.items[0]['remainingUnitWeight'];
let remainingQty = e.items[0]['remainingQty'];
if (outQty > remainingQty){
message("选中行\"入库数量\",不能大于\"剩余数量\"!");
return;
}
remainingQty = remainingQty - outQty;
resultGrid.setCellValue(e.items[0],"outUnitWeight",remainingUnitWeight);
resultGrid.setCellValue(e.items[0],"outWeight",outQty * remainingUnitWeight);
resultGrid.setCellValue(e.items[0],"remainingQty",remainingQty);
resultGrid.setCellValue(e.items[0],"remainingWeight",remainingQty * remainingUnitWeight);
}else if (e.field == "outWeight"){
let outWeight = e.items[0]['outWeight'];
let remainingWeight = e.items[0]['remainingWeight'];
let remainingUnitWeight = e.items[0]['remainingUnitWeight'];
if (outWeight > remainingWeight){
message("选中行\"入库重量\",不能大于\"剩余重量\"!");
return;
}
remainingWeight = remainingWeight - outWeight;
resultGrid.setCellValue(e.items[0],"outUnitWeight",remainingUnitWeight);
resultGrid.setCellValue(e.items[0],"outQty",outWeight / remainingUnitWeight);
resultGrid.setCellValue(e.items[0],"remainingQty",remainingWeight / remainingUnitWeight);
resultGrid.setCellValue(e.items[0],"remainingWeight",remainingWeight);
}
});
$("#BNT_SELECT").on("click", saveResult)
},
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();
}
}
}
$("#cancel").on("click", function () {
cancelFunc();
});
$("#btn_save").on("click", function () {
saveResult();
});
IPLATUI.EFSelect = {
"result-0-companyCode": {
// 点击下拉选项时触发
select: function (e) { //获取勾选值
var dataItem = e.dataItem;
var companyCode = dataItem['companyCode'];
$("#inqu_status-0-companyCode").val(companyCode);
query()
}
}
}
})
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
$("#depositDate").val(currShortDate);
});
let query = function () {
resultGrid.dataSource.page(1);
}
let saveResult = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
$.each(rows, function (index, item) {
let outQty = item.get("outQty");
let outWeight = item.get("outWeight");
if (isBlank(outQty) || !isNumber(outQty) || outQty <= 0) {
message("选中的第" + (index + 1) + "行\"出库数量\",不能为空并且不能为0!");
flag = false;
return false;
}
if (isBlank(outWeight) || !isNumber(outWeight) || outWeight <= 0) {
message("选中的第" + (index + 1) + "行\"出库重量\",不能为空并且不能为0!");
flag = false;
return false;
}
});
if (flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGKC015B", "save", true,
function (e) {
let status = e.getStatus();
if (status !== -1) {
parent.JSColorbox.close()
}
});
}
});
}
};
function cancelFunc() {
// 关闭弹窗
parent.JSColorbox.close();
}
<%@ page import="com.baosight.iplat4j.core.web.threadlocal.UserSession" %><%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/9/30
Time: 9:23
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" %>
<%
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="result" title="委外加工">
<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="whCode" cname="仓库编码" type="hidden"/>
<EF:EFInput blockId="inqu_status" row="0" ename="whName" cname="仓库名称" type="hidden"/>
<EF:EFInput blockId="inqu_status" row="0" ename="parentId" cname="上级ID" type="hidden"/>
<EF:EFInput blockId="inqu_status" row="0" ename="outCode" cname="委外出库单号" type="hidden"/>
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row" isFloat="true" copyToAdd="false">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFComboColumn ename="inventCode" cname="原料编码" width="120" align="center" required="true" readonly="true"
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" readonly="true" required="false"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" width="120" align="center" required="flase" readonly="true"
blockName="invent_type_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#"
filter="contains">
</EF:EFComboColumn>
<EF:EFColumn ename="spec" cname="规格" width="140" align="center" maxLength="50" readonly="true"/>
<EF:EFColumn ename="unit" cname="单位" width="80" align="center" readonly="true"/>
<EF:EFColumn ename="outQty" cname="出库数量" width="100" enable="true" 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="outUnitWeight" 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" hidden="true"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/>
<EF:EFColumn ename="outWeight" cname="出库重量" width="100" enable="true" 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="remainingUnitWeight" 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" hidden="true"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/>
<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>
<div class="row" style="display:flex;justify-content:center;">
<EF:EFButton ename="cancel" cname="取消" type="button" class="btn-center"/>
<EF:EFButton ename="btn_save" cname="保存" type="button" class="btn-center"/>
</div>
</EF:EFPage>
......@@ -16,7 +16,7 @@
</script>
<EF:EFPage title="委外加工">
<EF:EFRegion id="result" 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"/>
......
......@@ -277,7 +277,7 @@ function currShortDate() {
const year = date.getFullYear();
const month = date.getMonth() + 1; // 月份从0开始,需要加1
const day = date.getDate();
return year + (month < 10 ? '0' + month : month) + (day < 10 ? '0' + day : day);
return year + (month < 10 ? '0' + month : month.toString()) + (day < 10 ? '0' + day : day);
}
/**
......
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