Commit e85aadb3 by liuyang

2024-06-05 新增销售发货

parent 5aff4d51
...@@ -45,6 +45,13 @@ public enum DdynamicEnum { ...@@ -45,6 +45,13 @@ public enum DdynamicEnum {
CUSTOMER_RECORD_BLOCK_ID("customer_record_block_id", "custCode", "custName", "HGPZ002.queryComboBox"), CUSTOMER_RECORD_BLOCK_ID("customer_record_block_id", "custCode", "custName", "HGPZ002.queryComboBox"),
/** /**
* 模块:客户档案
* 用途:客户档案全部信息下拉框
* 编写:wwl
*/
CUSTOMER_RECORD_ALL_BLOCK_ID("customer_record_all_block_id", "custCode", "custName","phoneName","putAddress", "HGPZ002.queryCustAllBox"),
/**
* 模块:供应商档案 * 模块:供应商档案
* 用途:供应商档案下拉框 * 用途:供应商档案下拉框
* 编写: * 编写:
...@@ -290,7 +297,7 @@ public enum DdynamicEnum { ...@@ -290,7 +297,7 @@ public enum DdynamicEnum {
* 用途:项目档案下拉框 * 用途:项目档案下拉框
* 编写:wwl * 编写:wwl
*/ */
PROJ_RECORD_BLOCK_ID("proj_record_block_id", "projCode", "projName", "HGSC001.queryComboBox"), PROJ_RECORD_BLOCK_ID("proj_record_block_id", "projCode", "projName","companyCode","companyName", "HGSC001.queryComboBox"),
/** /**
* 模块:蓝图 * 模块:蓝图
......
...@@ -124,6 +124,8 @@ public class HGConstant { ...@@ -124,6 +124,8 @@ public class HGConstant {
//材料计划订单号 //材料计划订单号
public static final String PLAN_MATERIAL_CODE = "PLAN_MATERIAL_CODE"; public static final String PLAN_MATERIAL_CODE = "PLAN_MATERIAL_CODE";
// 销售发货单号
public static final String DELIVERY_CODE = "DELIVERY_CODE";
} }
......
...@@ -9,10 +9,7 @@ import com.baosight.hggp.hg.cw.tools.HGCWTools; ...@@ -9,10 +9,7 @@ import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO; import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.kc.domain.*; import com.baosight.hggp.hg.kc.domain.*;
import com.baosight.hggp.hg.kc.tools.HGKCTools; import com.baosight.hggp.hg.kc.tools.HGKCTools;
import com.baosight.hggp.util.CommonMethod; import com.baosight.hggp.util.*;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.StringUtils;
import com.baosight.hggp.util.contants.ACConstants; import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock; import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
...@@ -79,7 +76,7 @@ public class ServiceHGKC013 extends ServiceEPBase { ...@@ -79,7 +76,7 @@ public class ServiceHGKC013 extends ServiceEPBase {
return inInfo; return inInfo;
} }
@OperationLogAnnotation(operModul = "销售出库明细",operType = "保存",operDesc = "保存操作") @OperationLogAnnotation(operModul = "调拨单",operType = "保存",operDesc = "保存操作")
public EiInfo save(EiInfo inInfo) { public EiInfo save(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
...@@ -118,6 +115,8 @@ public class ServiceHGKC013 extends ServiceEPBase { ...@@ -118,6 +115,8 @@ public class ServiceHGKC013 extends ServiceEPBase {
* 修改操作 * 修改操作
*/ */
public void modify(HGKC013 hgkc013) { public void modify(HGKC013 hgkc013) {
List<HGKC013A> hgkc013aList = HGKCTools.HgKc013.getDetail(hgkc013.getId());
AssertUtils.isNotEmpty(hgkc013aList, "已经添加调拨单明细,无法保存!");
DaoUtils.update(HGKC013.UPDATE, hgkc013); DaoUtils.update(HGKC013.UPDATE, hgkc013);
} }
...@@ -132,6 +131,7 @@ public class ServiceHGKC013 extends ServiceEPBase { ...@@ -132,6 +131,7 @@ public class ServiceHGKC013 extends ServiceEPBase {
hgkc013.fromMap(map); hgkc013.fromMap(map);
HGKC013 kc013 = HGKCTools.HgKc013.getId(hgkc013.getId()); HGKC013 kc013 = HGKCTools.HgKc013.getId(hgkc013.getId());
List<HGKC013A> list = HGKCTools.HgKc013.getDetail(hgkc013.getId()); List<HGKC013A> list = HGKCTools.HgKc013.getDetail(hgkc013.getId());
AssertUtils.isEmpty(list, "调拨单明细为空!");
addKC006(kc013,list); addKC006(kc013,list);
addKC007(kc013,list); addKC007(kc013,list);
DaoUtils.update(HGKC013.UPDATE_STATUS, hgkc013); DaoUtils.update(HGKC013.UPDATE_STATUS, hgkc013);
......
...@@ -160,6 +160,9 @@ ...@@ -160,6 +160,9 @@
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#,
#updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #parentId#, #receiptDate#, #saleOutCode#, #whCode#, #updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #parentId#, #receiptDate#, #saleOutCode#, #whCode#,
#whName#, #status#) #whName#, #status#)
<selectKey resultClass="long" keyProperty="id">
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGKC004
</selectKey>
</insert> </insert>
<delete id="delete"> <delete id="delete">
......
...@@ -60,6 +60,7 @@ ...@@ -60,6 +60,7 @@
STATUS as "status" <!-- 状态0-未提交,1-已提交 --> STATUS as "status" <!-- 状态0-未提交,1-已提交 -->
</sql> </sql>
<sql id="condition"> <sql id="condition">
<include refid="HGXSDataAuth.authCondition"/>
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
......
...@@ -63,6 +63,7 @@ ...@@ -63,6 +63,7 @@
PARENT_ID as "parentId" <!-- 调度单ID --> PARENT_ID as "parentId" <!-- 调度单ID -->
</sql> </sql>
<sql id="condition"> <sql id="condition">
<include refid="HGXSDataAuth.authCondition"/>
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
......
...@@ -532,7 +532,6 @@ public class HGKCTools { ...@@ -532,7 +532,6 @@ public class HGKCTools {
paramMap.put("parentId", parentId); paramMap.put("parentId", parentId);
paramMap.put("deleteFlag", 0); paramMap.put("deleteFlag", 0);
List<HGKC013A> list = DaoBase.getInstance().query(HGKC013A.QUERY, paramMap); List<HGKC013A> list = DaoBase.getInstance().query(HGKC013A.QUERY, paramMap);
AssertUtils.isEmpty(list, "调拨单明细为空!");
return list; return list;
} }
} }
......
...@@ -328,4 +328,22 @@ ...@@ -328,4 +328,22 @@
ORDER BY CUST_CODE ORDER BY CUST_CODE
</select> </select>
<select id="queryCustAllBox" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT DISTINCT
CUST_CODE as "custCode",
CUST_NAME as "custName",
PHONE_NAME as "phoneName",
PUT_ADDRESS as "putAddress"
FROM ${hggpSchema}.HGPZ002
WHERE DELETE_FLAG = 0
AND STATUS=1
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="custType">
CUST_TYPE = #custType#
</isNotEmpty>
ORDER BY CUST_CODE
</select>
</sqlMap> </sqlMap>
...@@ -364,7 +364,9 @@ ...@@ -364,7 +364,9 @@
resultClass="java.util.HashMap"> resultClass="java.util.HashMap">
SELECT DISTINCT SELECT DISTINCT
PROJ_CODE as "projCode", PROJ_CODE as "projCode",
PROJ_NAME as "projName" PROJ_NAME as "projName",
company_code as "companyCode", <!-- 公司编码 -->
company_name as "companyName" <!-- 公司名称 -->
FROM ${hggpSchema}.HGSC001 FROM ${hggpSchema}.HGSC001
WHERE 1=1 WHERE 1=1
<isNotEmpty prepend=" AND " property="accountCode"> <isNotEmpty prepend=" AND " property="accountCode">
......
package com.baosight.hggp.hg.yx.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:Hgyx001.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-06-04 9:20:26 create
*/
public class HGYX001 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id";
public static final String FIELD_ACCOUNT_CODE = "accountCode"; /* 企业编码*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_CREATED_BY = "createdBy"; /* 记录创建者*/
public static final String FIELD_CREATED_NAME = "createdName"; /* 记录创建名称*/
public static final String FIELD_CREATED_TIME = "createdTime"; /* 记录创建时间*/
public static final String FIELD_UPDATED_BY = "updatedBy"; /* 记录修改者*/
public static final String FIELD_UPDATED_NAME = "updatedName"; /* 记录修改名称*/
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 记录修改时间*/
public static final String FIELD_DELETE_FLAG = "deleteFlag"; /* 0-未删除,1-已删除*/
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 公司编码*/
public static final String FIELD_COMPANY_NAME = "companyName"; /* 公司名称*/
public static final String FIELD_PROJ_CODE = "projCode"; /* 项目编码*/
public static final String FIELD_PROJ_NAME = "projName"; /* 项目名称*/
public static final String FIELD_DELIVERY_CODE = "deliveryCode"; /* 发货单号*/
public static final String FIELD_OUTBOUND_CODE = "outboundCode"; /* 出库单号*/
public static final String FIELD_CONS_CODE = "consCode"; /* 发货方编码*/
public static final String FIELD_CONS_NAME = "consName"; /* 发货方名称*/
public static final String FIELD_CONS_WH_CODE = "consWhCode"; /* 发货仓库编码*/
public static final String FIELD_CONS_WH_NAME = "consWhName"; /* 发货仓库名称*/
public static final String FIELD_CONS_ADDR = "consAddr"; /* 发货地址*/
public static final String FIELD_RECE_CODE = "receCode"; /* 收货方编码*/
public static final String FIELD_RECE_NAME = "receName"; /* 收货方名称*/
public static final String FIELD_RECE_ADDR = "receAddr"; /* 收货地址*/
public static final String FIELD_RECE_USER_PHONE = "receUserPhone"; /* 收货人电话*/
public static final String FIELD_TRAN_TYPE = "tranType"; /* 运输方式*/
public static final String FIELD_NUM_PLATE = "numPlate"; /* 车号*/
public static final String FIELD_CONS_QUANTITY = "consQuantity"; /* 发货数量*/
public static final String FIELD_CONS_WEIGHT = "consWeight"; /* 发货重量*/
public static final String FIELD_STATUS = "status"; /* 审批状态 0-未审核,1-已审核*/
public static final String COL_ID = "ID";
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String COL_CREATED_BY = "CREATED_BY"; /* 记录创建者*/
public static final String COL_CREATED_NAME = "CREATED_NAME"; /* 记录创建名称*/
public static final String COL_CREATED_TIME = "CREATED_TIME"; /* 记录创建时间*/
public static final String COL_UPDATED_BY = "UPDATED_BY"; /* 记录修改者*/
public static final String COL_UPDATED_NAME = "UPDATED_NAME"; /* 记录修改名称*/
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 记录修改时间*/
public static final String COL_DELETE_FLAG = "DELETE_FLAG"; /* 0-未删除,1-已删除*/
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 公司编码*/
public static final String COL_COMPANY_NAME = "COMPANY_NAME"; /* 公司名称*/
public static final String COL_PROJ_CODE = "PROJ_CODE"; /* 项目编码*/
public static final String COL_PROJ_NAME = "PROJ_NAME"; /* 项目名称*/
public static final String COL_DELIVERY_CODE = "DELIVERY_CODE"; /* 发货单号*/
public static final String COL_OUTBOUND_CODE = "OUTBOUND_CODE"; /* 出库单号*/
public static final String COL_CONS_CODE = "CONS_CODE"; /* 发货方编码*/
public static final String COL_CONS_NAME = "CONS_NAME"; /* 发货方名称*/
public static final String COL_CONS_WH_CODE = "CONS_WH_CODE"; /* 发货仓库编码*/
public static final String COL_CONS_WH_NAME = "CONS_WH_NAME"; /* 发货仓库名称*/
public static final String COL_CONS_ADDR = "CONS_ADDR"; /* 发货地址*/
public static final String COL_RECE_CODE = "RECE_CODE"; /* 收货方编码*/
public static final String COL_RECE_NAME = "RECE_NAME"; /* 收货方名称*/
public static final String COL_RECE_ADDR = "RECE_ADDR"; /* 收货地址*/
public static final String COL_RECE_USER_PHONE = "RECE_USER_PHONE"; /* 收货人电话*/
public static final String COL_TRAN_TYPE = "TRAN_TYPE"; /* 运输方式*/
public static final String COL_NUM_PLATE = "NUM_PLATE"; /* 车号*/
public static final String COL_CONS_QUANTITY = "CONS_QUANTITY"; /* 发货数量*/
public static final String COL_CONS_WEIGHT = "CONS_WEIGHT"; /* 发货重量*/
public static final String COL_STATUS = "STATUS"; /* 审批状态 0-未审核,1-已审核*/
public static final String QUERY = "HGYX001.query";
public static final String COUNT = "HGYX001.count";
public static final String INSERT = "HGYX001.insert";
public static final String UPDATE = "HGYX001.update";
public static final String UPDATE_STATUS = "HGYX001.updateStatus";
public static final String DELETE = "HGYX001.delete";
public static final String DELETE_FLAG = "HGYX001.deleteFlag";
public static final String BATCH_COMMIT = "HGYX001.batchCommit";
private Long id = new Long(0);
private String accountCode = " "; /* 企业编码*/
private String depCode = " "; /* 部门编码*/
private String createdBy = " "; /* 记录创建者*/
private String createdName = " "; /* 记录创建名称*/
private String createdTime = " "; /* 记录创建时间*/
private String updatedBy = " "; /* 记录修改者*/
private String updatedName = " "; /* 记录修改名称*/
private String updatedTime = " "; /* 记录修改时间*/
private Integer deleteFlag = 0; /* 0-未删除,1-已删除*/
private String companyCode = " "; /* 公司编码*/
private String companyName = " "; /* 公司名称*/
private String projCode = " "; /* 项目编码*/
private String projName = " "; /* 项目名称*/
private String deliveryCode = " "; /* 发货单号*/
private String outboundCode = " "; /* 出库单号*/
private String consCode = " "; /* 发货方编码*/
private String consName = " "; /* 发货方名称*/
private String consWhCode = " "; /* 发货仓库编码*/
private String consWhName = " "; /* 发货仓库名称*/
private String consAddr = " "; /* 发货地址*/
private String receCode = " "; /* 收货方编码*/
private String receName = " "; /* 收货方名称*/
private String receAddr = " "; /* 收货地址*/
private String receUserPhone = " "; /* 收货人电话*/
private Integer tranType = 0; /* 运输方式*/
private String numPlate = " "; /* 车号*/
private String consQuantity = " "; /* 发货数量*/
private String consWeight = " "; /* 发货重量*/
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_PROJ_CODE);
eiColumn.setDescName("项目编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROJ_NAME);
eiColumn.setDescName("项目名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DELIVERY_CODE);
eiColumn.setDescName("发货单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_OUTBOUND_CODE);
eiColumn.setDescName("出库单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONS_CODE);
eiColumn.setDescName("发货方编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONS_NAME);
eiColumn.setDescName("发货方名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONS_WH_CODE);
eiColumn.setDescName("发货仓库编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONS_WH_NAME);
eiColumn.setDescName("发货仓库名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONS_ADDR);
eiColumn.setDescName("发货地址");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RECE_CODE);
eiColumn.setDescName("收货方编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RECE_NAME);
eiColumn.setDescName("收货方名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RECE_ADDR);
eiColumn.setDescName("收货地址");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RECE_USER_PHONE);
eiColumn.setDescName("收货人电话");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_TRAN_TYPE);
eiColumn.setDescName("运输方式");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_NUM_PLATE);
eiColumn.setDescName("车号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONS_QUANTITY);
eiColumn.setDescName("发货数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONS_WEIGHT);
eiColumn.setDescName("发货重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_STATUS);
eiColumn.setDescName("审批状态 0-未审核,1-已审核");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HGYX001() {
initMetaData();
}
/**
* get the id .
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id .
*
* @param id
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the accountCode - 企业编码.
* @return the accountCode
*/
public String getAccountCode() {
return this.accountCode;
}
/**
* set the accountCode - 企业编码.
*
* @param accountCode - 企业编码
*/
public void setAccountCode(String accountCode) {
this.accountCode = accountCode;
}
/**
* get the depCode - 部门编码.
* @return the depCode
*/
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码.
*
* @param depCode - 部门编码
*/
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the createdBy - 记录创建者.
* @return the createdBy
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 记录创建者.
*
* @param createdBy - 记录创建者
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
* get the createdName - 记录创建名称.
* @return the createdName
*/
public String getCreatedName() {
return this.createdName;
}
/**
* set the createdName - 记录创建名称.
*
* @param createdName - 记录创建名称
*/
public void setCreatedName(String createdName) {
this.createdName = createdName;
}
/**
* get the createdTime - 记录创建时间.
* @return the createdTime
*/
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 记录创建时间.
*
* @param createdTime - 记录创建时间
*/
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
/**
* get the updatedBy - 记录修改者.
* @return the updatedBy
*/
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 记录修改者.
*
* @param updatedBy - 记录修改者
*/
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
/**
* get the updatedName - 记录修改名称.
* @return the updatedName
*/
public String getUpdatedName() {
return this.updatedName;
}
/**
* set the updatedName - 记录修改名称.
*
* @param updatedName - 记录修改名称
*/
public void setUpdatedName(String updatedName) {
this.updatedName = updatedName;
}
/**
* get the updatedTime - 记录修改时间.
* @return the updatedTime
*/
public String getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 记录修改时间.
*
* @param updatedTime - 记录修改时间
*/
public void setUpdatedTime(String updatedTime) {
this.updatedTime = updatedTime;
}
/**
* get the deleteFlag - 0-未删除,1-已删除.
* @return the deleteFlag
*/
public Integer getDeleteFlag() {
return this.deleteFlag;
}
/**
* set the deleteFlag - 0-未删除,1-已删除.
*
* @param deleteFlag - 0-未删除,1-已删除
*/
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
/**
* get the companyCode - 公司编码.
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 公司编码.
*
* @param companyCode - 公司编码
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the companyName - 公司名称.
* @return the companyName
*/
public String getCompanyName() {
return this.companyName;
}
/**
* set the companyName - 公司名称.
*
* @param companyName - 公司名称
*/
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
/**
* get the projCode - 项目编码.
* @return the projCode
*/
public String getProjCode() {
return this.projCode;
}
/**
* set the projCode - 项目编码.
*
* @param projCode - 项目编码
*/
public void setProjCode(String projCode) {
this.projCode = projCode;
}
/**
* get the projName - 项目名称.
* @return the projName
*/
public String getProjName() {
return this.projName;
}
/**
* set the projName - 项目名称.
*
* @param projName - 项目名称
*/
public void setProjName(String projName) {
this.projName = projName;
}
/**
* get the deliveryCode - 发货单号.
* @return the deliveryCode
*/
public String getDeliveryCode() {
return this.deliveryCode;
}
/**
* set the deliveryCode - 发货单号.
*
* @param deliveryCode - 发货单号
*/
public void setDeliveryCode(String deliveryCode) {
this.deliveryCode = deliveryCode;
}
/**
* get the outboundCode - 出库单号.
* @return the outboundCode
*/
public String getOutboundCode() {
return this.outboundCode;
}
/**
* set the outboundCode - 出库单号.
*
* @param outboundCode - 出库单号
*/
public void setOutboundCode(String outboundCode) {
this.outboundCode = outboundCode;
}
/**
* get the consCode - 发货方编码.
* @return the consCode
*/
public String getConsCode() {
return this.consCode;
}
/**
* set the consCode - 发货方编码.
*
* @param consCode - 发货方编码
*/
public void setConsCode(String consCode) {
this.consCode = consCode;
}
/**
* get the consName - 发货方名称.
* @return the consName
*/
public String getConsName() {
return this.consName;
}
/**
* set the consName - 发货方名称.
*
* @param consName - 发货方名称
*/
public void setConsName(String consName) {
this.consName = consName;
}
/**
* get the consWhCode - 发货仓库编码.
* @return the consWhCode
*/
public String getConsWhCode() {
return this.consWhCode;
}
/**
* set the consWhCode - 发货仓库编码.
*
* @param consWhCode - 发货仓库编码
*/
public void setConsWhCode(String consWhCode) {
this.consWhCode = consWhCode;
}
/**
* get the consWhName - 发货仓库名称.
* @return the consWhName
*/
public String getConsWhName() {
return this.consWhName;
}
/**
* set the consWhName - 发货仓库名称.
*
* @param consWhName - 发货仓库名称
*/
public void setConsWhName(String consWhName) {
this.consWhName = consWhName;
}
/**
* get the consAddr - 发货地址.
* @return the consAddr
*/
public String getConsAddr() {
return this.consAddr;
}
/**
* set the consAddr - 发货地址.
*
* @param consAddr - 发货地址
*/
public void setConsAddr(String consAddr) {
this.consAddr = consAddr;
}
/**
* get the receCode - 收货方编码.
* @return the receCode
*/
public String getReceCode() {
return this.receCode;
}
/**
* set the receCode - 收货方编码.
*
* @param receCode - 收货方编码
*/
public void setReceCode(String receCode) {
this.receCode = receCode;
}
/**
* get the receName - 收货方名称.
* @return the receName
*/
public String getReceName() {
return this.receName;
}
/**
* set the receName - 收货方名称.
*
* @param receName - 收货方名称
*/
public void setReceName(String receName) {
this.receName = receName;
}
/**
* get the receAddr - 收货地址.
* @return the receAddr
*/
public String getReceAddr() {
return this.receAddr;
}
/**
* set the receAddr - 收货地址.
*
* @param receAddr - 收货地址
*/
public void setReceAddr(String receAddr) {
this.receAddr = receAddr;
}
/**
* get the receUserPhone - 收货人电话.
* @return the receUserPhone
*/
public String getReceUserPhone() {
return this.receUserPhone;
}
/**
* set the receUserPhone - 收货人电话.
*
* @param receUserPhone - 收货人电话
*/
public void setReceUserPhone(String receUserPhone) {
this.receUserPhone = receUserPhone;
}
/**
* get the tranType - 运输方式.
* @return the tranType
*/
public Integer getTranType() {
return this.tranType;
}
/**
* set the tranType - 运输方式.
*
* @param tranType - 运输方式
*/
public void setTranType(Integer tranType) {
this.tranType = tranType;
}
/**
* get the numPlate - 车号.
* @return the numPlate
*/
public String getNumPlate() {
return this.numPlate;
}
/**
* set the numPlate - 车号.
*
* @param numPlate - 车号
*/
public void setNumPlate(String numPlate) {
this.numPlate = numPlate;
}
/**
* get the consQuantity - 发货数量.
* @return the consQuantity
*/
public String getConsQuantity() {
return this.consQuantity;
}
/**
* set the consQuantity - 发货数量.
*
* @param consQuantity - 发货数量
*/
public void setConsQuantity(String consQuantity) {
this.consQuantity = consQuantity;
}
/**
* get the consWeight - 发货重量.
* @return the consWeight
*/
public String getConsWeight() {
return this.consWeight;
}
/**
* set the consWeight - 发货重量.
*
* @param consWeight - 发货重量
*/
public void setConsWeight(String consWeight) {
this.consWeight = consWeight;
}
/**
* 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));
setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_CODE)), projCode));
setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_NAME)), projName));
setDeliveryCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DELIVERY_CODE)), deliveryCode));
setOutboundCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_OUTBOUND_CODE)), outboundCode));
setConsCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONS_CODE)), consCode));
setConsName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONS_NAME)), consName));
setConsWhCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONS_WH_CODE)), consWhCode));
setConsWhName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONS_WH_NAME)), consWhName));
setConsAddr(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONS_ADDR)), consAddr));
setReceCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_RECE_CODE)), receCode));
setReceName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_RECE_NAME)), receName));
setReceAddr(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_RECE_ADDR)), receAddr));
setReceUserPhone(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_RECE_USER_PHONE)), receUserPhone));
setTranType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_TRAN_TYPE)), tranType));
setNumPlate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_NUM_PLATE)), numPlate));
setConsQuantity(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONS_QUANTITY)), consQuantity));
setConsWeight(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONS_WEIGHT)), consWeight));
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_PROJ_CODE, StringUtils.toString(projCode, eiMetadata.getMeta(FIELD_PROJ_CODE)));
map.put(FIELD_PROJ_NAME, StringUtils.toString(projName, eiMetadata.getMeta(FIELD_PROJ_NAME)));
map.put(FIELD_DELIVERY_CODE, StringUtils.toString(deliveryCode, eiMetadata.getMeta(FIELD_DELIVERY_CODE)));
map.put(FIELD_OUTBOUND_CODE, StringUtils.toString(outboundCode, eiMetadata.getMeta(FIELD_OUTBOUND_CODE)));
map.put(FIELD_CONS_CODE, StringUtils.toString(consCode, eiMetadata.getMeta(FIELD_CONS_CODE)));
map.put(FIELD_CONS_NAME, StringUtils.toString(consName, eiMetadata.getMeta(FIELD_CONS_NAME)));
map.put(FIELD_CONS_WH_CODE, StringUtils.toString(consWhCode, eiMetadata.getMeta(FIELD_CONS_WH_CODE)));
map.put(FIELD_CONS_WH_NAME, StringUtils.toString(consWhName, eiMetadata.getMeta(FIELD_CONS_WH_NAME)));
map.put(FIELD_CONS_ADDR, StringUtils.toString(consAddr, eiMetadata.getMeta(FIELD_CONS_ADDR)));
map.put(FIELD_RECE_CODE, StringUtils.toString(receCode, eiMetadata.getMeta(FIELD_RECE_CODE)));
map.put(FIELD_RECE_NAME, StringUtils.toString(receName, eiMetadata.getMeta(FIELD_RECE_NAME)));
map.put(FIELD_RECE_ADDR, StringUtils.toString(receAddr, eiMetadata.getMeta(FIELD_RECE_ADDR)));
map.put(FIELD_RECE_USER_PHONE, StringUtils.toString(receUserPhone, eiMetadata.getMeta(FIELD_RECE_USER_PHONE)));
map.put(FIELD_TRAN_TYPE, StringUtils.toString(tranType, eiMetadata.getMeta(FIELD_TRAN_TYPE)));
map.put(FIELD_NUM_PLATE, StringUtils.toString(numPlate, eiMetadata.getMeta(FIELD_NUM_PLATE)));
map.put(FIELD_CONS_QUANTITY, StringUtils.toString(consQuantity, eiMetadata.getMeta(FIELD_CONS_QUANTITY)));
map.put(FIELD_CONS_WEIGHT, StringUtils.toString(consWeight, eiMetadata.getMeta(FIELD_CONS_WEIGHT)));
map.put(FIELD_STATUS, StringUtils.toString(status, eiMetadata.getMeta(FIELD_STATUS)));
return map;
}
}
package com.baosight.hggp.hg.yx.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:Hgyx001a.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-06-04 9:20:26 create
*/
public class HGYX001A 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_INVENT_RECORD_ID = "inventRecordId"; /* 存货档案id*/
public static final String FIELD_INVENT_TYPE = "inventType"; /* 存货类型*/
public static final String FIELD_INVENT_CODE = "inventCode"; /* 存货编码*/
public static final String FIELD_INVENT_NAME = "inventName"; /* 存货名称*/
public static final String FIELD_SPEC = "spec"; /* 规格*/
public static final String FIELD_LENGTH = "length"; /* 长*/
public static final String FIELD_WIDTH = "width"; /* 宽*/
public static final String FIELD_THICK = "thick"; /* 厚*/
public static final String FIELD_QUANTITY = "quantity"; /* 发货数量*/
public static final String FIELD_UNIT_WEIGHT = "unitWeight"; /* 发货单重*/
public static final String FIELD_WEIGHT = "weight"; /* 发货重量*/
public static final String FIELD_PARENT_ID = "parentId"; /* 销售发货ID*/
public static final String COL_ID = "ID"; /* ID*/
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String COL_CREATED_BY = "CREATED_BY"; /* 记录创建者*/
public static final String COL_CREATED_NAME = "CREATED_NAME"; /* 记录创建名称*/
public static final String COL_CREATED_TIME = "CREATED_TIME"; /* 记录创建时间*/
public static final String COL_UPDATED_BY = "UPDATED_BY"; /* 记录修改者*/
public static final String COL_UPDATED_NAME = "UPDATED_NAME"; /* 记录修改名称*/
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 记录修改时间*/
public static final String COL_DELETE_FLAG = "DELETE_FLAG"; /* 0-未删除,1-已删除*/
public static final String COL_INVENT_RECORD_ID = "INVENT_RECORD_ID"; /* 存货档案id*/
public static final String COL_INVENT_TYPE = "INVENT_TYPE"; /* 存货类型*/
public static final String COL_INVENT_CODE = "INVENT_CODE"; /* 存货编码*/
public static final String COL_INVENT_NAME = "INVENT_NAME"; /* 存货名称*/
public static final String COL_SPEC = "SPEC"; /* 规格*/
public static final String COL_LENGTH = "LENGTH"; /* 长*/
public static final String COL_WIDTH = "WIDTH"; /* 宽*/
public static final String COL_THICK = "THICK"; /* 厚*/
public static final String COL_QUANTITY = "QUANTITY"; /* 发货数量*/
public static final String COL_UNIT_WEIGHT = "UNIT_WEIGHT"; /* 发货单重*/
public static final String COL_WEIGHT = "WEIGHT"; /* 发货重量*/
public static final String COL_PARENT_ID = "PARENT_ID"; /* 销售发货ID*/
public static final String QUERY = "HGYX001A.query";
public static final String COUNT = "HGYX001A.count";
public static final String INSERT = "HGYX001A.insert";
public static final String UPDATE = "HGYX001A.update";
public static final String DELETE = "HGYX001A.delete";
public static final String DELETE_FLAG = "HGYX001A.deleteFlag";
public static final String DELETE_BY_PARENT_ID = "HGYX001A.deleteByParentId";
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 Long inventRecordId = new Long(0); /* 存货档案id*/
private String inventType = " "; /* 存货类型*/
private String inventCode = " "; /* 存货编码*/
private String inventName = " "; /* 存货名称*/
private String spec = " "; /* 规格*/
private BigDecimal length = new BigDecimal("0"); /* 长*/
private BigDecimal width = new BigDecimal("0"); /* 宽*/
private BigDecimal thick = new BigDecimal("0"); /* 厚*/
private BigDecimal quantity = new BigDecimal("0"); /* 发货数量*/
private BigDecimal unitWeight = new BigDecimal("0"); /* 单重*/
private BigDecimal weight = new BigDecimal("0"); /* 发货重量*/
private Long parentId = new Long(0); /* 销售发货ID*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName("ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ACCOUNT_CODE);
eiColumn.setDescName("企业编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_BY);
eiColumn.setDescName("记录创建者");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_NAME);
eiColumn.setDescName("记录创建名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_TIME);
eiColumn.setDescName("记录创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_BY);
eiColumn.setDescName("记录修改者");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_NAME);
eiColumn.setDescName("记录修改名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_TIME);
eiColumn.setDescName("记录修改时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DELETE_FLAG);
eiColumn.setDescName("0-未删除,1-已删除");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_RECORD_ID);
eiColumn.setDescName("存货档案id");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_TYPE);
eiColumn.setDescName("存货类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_CODE);
eiColumn.setDescName("存货编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_NAME);
eiColumn.setDescName("存货名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SPEC);
eiColumn.setDescName("规格");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_LENGTH);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12);
eiColumn.setDescName("长");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_WIDTH);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12);
eiColumn.setDescName("宽");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_THICK);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12);
eiColumn.setDescName("厚");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_QUANTITY);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(20);
eiColumn.setDescName("发货数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UNIT_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(17);
eiColumn.setDescName("发货单重");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(17);
eiColumn.setDescName("发货重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PARENT_ID);
eiColumn.setDescName("销售发货ID");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HGYX001A() {
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 inventRecordId - 存货档案id.
* @return the inventRecordId
*/
public Long getInventRecordId() {
return this.inventRecordId;
}
/**
* set the inventRecordId - 存货档案id.
*
* @param inventRecordId - 存货档案id
*/
public void setInventRecordId(Long inventRecordId) {
this.inventRecordId = inventRecordId;
}
/**
* get the inventType - 存货类型.
* @return the inventType
*/
public String getInventType() {
return this.inventType;
}
/**
* set the inventType - 存货类型.
*
* @param inventType - 存货类型
*/
public void setInventType(String inventType) {
this.inventType = inventType;
}
/**
* get the inventCode - 存货编码.
* @return the inventCode
*/
public String getInventCode() {
return this.inventCode;
}
/**
* set the inventCode - 存货编码.
*
* @param inventCode - 存货编码
*/
public void setInventCode(String inventCode) {
this.inventCode = inventCode;
}
/**
* get the inventName - 存货名称.
* @return the inventName
*/
public String getInventName() {
return this.inventName;
}
/**
* set the inventName - 存货名称.
*
* @param inventName - 存货名称
*/
public void setInventName(String inventName) {
this.inventName = inventName;
}
/**
* get the spec - 规格.
* @return the spec
*/
public String getSpec() {
return this.spec;
}
/**
* set the spec - 规格.
*
* @param spec - 规格
*/
public void setSpec(String spec) {
this.spec = spec;
}
/**
* get the length - 长.
* @return the length
*/
public BigDecimal getLength() {
return this.length;
}
/**
* set the length - 长.
*
* @param length - 长
*/
public void setLength(BigDecimal length) {
this.length = length;
}
/**
* get the width - 宽.
* @return the width
*/
public BigDecimal getWidth() {
return this.width;
}
/**
* set the width - 宽.
*
* @param width - 宽
*/
public void setWidth(BigDecimal width) {
this.width = width;
}
/**
* get the thick - 厚.
* @return the thick
*/
public BigDecimal getThick() {
return this.thick;
}
/**
* set the thick - 厚.
*
* @param thick - 厚
*/
public void setThick(BigDecimal thick) {
this.thick = thick;
}
/**
* get the quantity - 发货数量.
* @return the quantity
*/
public BigDecimal getQuantity() {
return this.quantity;
}
/**
* set the quantity - 发货数量.
*
* @param quantity - 发货数量
*/
public void setQuantity(BigDecimal quantity) {
this.quantity = quantity;
}
public BigDecimal getUnitWeight() {
return unitWeight;
}
public void setUnitWeight(BigDecimal unitWeight) {
this.unitWeight = unitWeight;
}
/**
* get the weight - 发货重量.
* @return the weight
*/
public BigDecimal getWeight() {
return this.weight;
}
/**
* set the weight - 发货重量.
*
* @param weight - 发货重量
*/
public void setWeight(BigDecimal weight) {
this.weight = weight;
}
/**
* get the parentId - 销售发货ID.
* @return the parentId
*/
public Long getParentId() {
return this.parentId;
}
/**
* set the parentId - 销售发货ID.
*
* @param parentId - 销售发货ID
*/
public void setParentId(Long parentId) {
this.parentId = parentId;
}
/**
* get the value from Map.
*
* @param map - source data map
*/
@Override
public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id));
setAccountCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ACCOUNT_CODE)), accountCode));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy));
setCreatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_NAME)), createdName));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_TIME)), createdTime));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_BY)), updatedBy));
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
setInventRecordId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_INVENT_RECORD_ID)), inventRecordId));
setInventType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_TYPE)), inventType));
setInventCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_CODE)), inventCode));
setInventName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_NAME)), inventName));
setSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SPEC)), spec));
setLength(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_LENGTH)), length));
setWidth(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_WIDTH)), width));
setThick(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_THICK)), thick));
setQuantity(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_QUANTITY)), quantity));
setUnitWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_UNIT_WEIGHT)), unitWeight));
setWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_WEIGHT)), weight));
setParentId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_PARENT_ID)), parentId));
}
/**
* set the value to Map.
*/
@Override
public Map toMap() {
Map map = new HashMap();
map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID)));
map.put(FIELD_ACCOUNT_CODE, StringUtils.toString(accountCode, eiMetadata.getMeta(FIELD_ACCOUNT_CODE)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_CREATED_BY, StringUtils.toString(createdBy, eiMetadata.getMeta(FIELD_CREATED_BY)));
map.put(FIELD_CREATED_NAME, StringUtils.toString(createdName, eiMetadata.getMeta(FIELD_CREATED_NAME)));
map.put(FIELD_CREATED_TIME, StringUtils.toString(createdTime, eiMetadata.getMeta(FIELD_CREATED_TIME)));
map.put(FIELD_UPDATED_BY, StringUtils.toString(updatedBy, eiMetadata.getMeta(FIELD_UPDATED_BY)));
map.put(FIELD_UPDATED_NAME, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_UPDATED_NAME)));
map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME)));
map.put(FIELD_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG)));
map.put(FIELD_INVENT_RECORD_ID, StringUtils.toString(inventRecordId, eiMetadata.getMeta(FIELD_INVENT_RECORD_ID)));
map.put(FIELD_INVENT_TYPE, StringUtils.toString(inventType, eiMetadata.getMeta(FIELD_INVENT_TYPE)));
map.put(FIELD_INVENT_CODE, StringUtils.toString(inventCode, eiMetadata.getMeta(FIELD_INVENT_CODE)));
map.put(FIELD_INVENT_NAME, StringUtils.toString(inventName, eiMetadata.getMeta(FIELD_INVENT_NAME)));
map.put(FIELD_SPEC, StringUtils.toString(spec, eiMetadata.getMeta(FIELD_SPEC)));
map.put(FIELD_LENGTH, StringUtils.toString(length, eiMetadata.getMeta(FIELD_LENGTH)));
map.put(FIELD_WIDTH, StringUtils.toString(width, eiMetadata.getMeta(FIELD_WIDTH)));
map.put(FIELD_THICK, StringUtils.toString(thick, eiMetadata.getMeta(FIELD_THICK)));
map.put(FIELD_QUANTITY, StringUtils.toString(quantity, eiMetadata.getMeta(FIELD_QUANTITY)));
map.put(FIELD_UNIT_WEIGHT, StringUtils.toString(unitWeight, eiMetadata.getMeta(FIELD_UNIT_WEIGHT)));
map.put(FIELD_WEIGHT, StringUtils.toString(weight, eiMetadata.getMeta(FIELD_WEIGHT)));
map.put(FIELD_PARENT_ID, StringUtils.toString(parentId, eiMetadata.getMeta(FIELD_PARENT_ID)));
return map;
}
}
package com.baosight.hggp.hg.yx.domain;
import com.baosight.iplat4j.core.data.DaoEPBase;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.util.StringUtils;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;
/**
* Project: <br>
* Title:Hgkc010.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-05-13 15:39:23 create
*/
public class HGYX001C extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id";
public static final String FIELD_ACCOUNT_CODE = "accountCode"; /* 企业编码*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_CREATED_BY = "createdBy"; /* 记录创建者*/
public static final String FIELD_CREATED_NAME = "createdName"; /* 记录创建名称*/
public static final String FIELD_CREATED_TIME = "createdTime"; /* 记录创建时间*/
public static final String FIELD_UPDATED_BY = "updatedBy"; /* 记录修改者*/
public static final String FIELD_UPDATED_NAME = "updatedName"; /* 记录修改名称*/
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 记录修改时间*/
public static final String FIELD_DELETE_FLAG = "deleteFlag"; /* 0-未删除,1-已删除*/
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 公司编码*/
public static final String FIELD_COMPANY_NAME = "companyName"; /* 公司名称*/
public static final String FIELD_WH_CODE = "whCode"; /* 仓库编码*/
public static final String FIELD_WH_NAME = "whName"; /* 仓库名称*/
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_MATERIAL = "material"; /* 材质*/
public static final String FIELD_UNIT = "unit"; /* 单位*/
public static final String FIELD_LENGTH = "length"; /* 长度*/
public static final String FIELD_WIDTH = "width"; /* 宽度*/
public static final String FIELD_THICK = "thick"; /* 厚度*/
public static final String FIELD_CONS_QUANTITY = "consQuantity"; /* 库存数量*/
public static final String FIELD_CONS_UNIT_WEIGHT = "consUnitWeight"; /* 库存单重*/
public static final String FIELD_CONS_WEIGHT = "consWeight"; /* 库存重量*/
public static final String FIELD_FACTORY_CODE = "factoryCode"; /* 厂区编码*/
public static final String FIELD_FACTORY_NAME = "factoryName"; /* 厂区名称*/
public static final String COL_ID = "ID";
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String COL_CREATED_BY = "CREATED_BY"; /* 记录创建者*/
public static final String COL_CREATED_NAME = "CREATED_NAME"; /* 记录创建名称*/
public static final String COL_CREATED_TIME = "CREATED_TIME"; /* 记录创建时间*/
public static final String COL_UPDATED_BY = "UPDATED_BY"; /* 记录修改者*/
public static final String COL_UPDATED_NAME = "UPDATED_NAME"; /* 记录修改名称*/
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 记录修改时间*/
public static final String COL_DELETE_FLAG = "DELETE_FLAG"; /* 0-未删除,1-已删除*/
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 公司编码*/
public static final String COL_COMPANY_NAME = "COMPANY_NAME"; /* 公司名称*/
public static final String COL_WH_CODE = "WH_CODE"; /* 仓库编码*/
public static final String COL_WH_NAME = "WH_NAME"; /* 仓库名称*/
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_ID = "SPEC_ID"; /* 规格ID*/
public static final String COL_SPEC = "SPEC"; /* 规格*/
public static final String COL_MATERIAL = "MATERIAL"; /* 材质*/
public static final String COL_UNIT = "UNIT"; /* 单位*/
public static final String COL_LENGTH = "LENGTH"; /* 长度*/
public static final String COL_WIDTH = "WIDTH"; /* 宽度*/
public static final String COL_THICK = "THICK"; /* 厚度*/
public static final String COL_INV_QTY = "INV_QTY"; /* 库存数量*/
public static final String COL_INV_UNIT_WEIGHT = "INV_UNIT_WEIGHT"; /* 库存单重*/
public static final String COL_INV_WEIGHT = "INV_WEIGHT"; /* 库存重量*/
public static final String COL_FACTORY_CODE = "FACTORY_CODE"; /* 厂区编码*/
public static final String COL_FACTORY_NAME = "FACTORY_NAME"; /* 厂区名称*/
public static final String QUERY = "HGYX001C.query";
public static final String COUNT = "HGYX001C.count";
public static final String INSERT = "HGYX001C.insert";
public static final String UPDATE = "HGYX001C.update";
public static final String DELETE = "HGYX001C.delete";
private Long id = new Long(0);
private String accountCode = " "; /* 企业编码*/
private String depCode = " "; /* 部门编码*/
private String createdBy = " "; /* 记录创建者*/
private String createdName = " "; /* 记录创建名称*/
private String createdTime = " "; /* 记录创建时间*/
private String updatedBy = " "; /* 记录修改者*/
private String updatedName = " "; /* 记录修改名称*/
private String updatedTime = " "; /* 记录修改时间*/
private Integer deleteFlag; /* 0-未删除,1-已删除*/
private String companyCode = " "; /* 公司编码*/
private String companyName = " "; /* 公司名称*/
private String whCode = " "; /* 仓库编码*/
private String whName = " "; /* 仓库名称*/
private String inventType = " "; /* 存货类型*/
private String inventCode = " "; /* 存货编码*/
private String inventName = " "; /* 存货名称*/
private Long specId = new Long(0); /* 规格ID*/
private String spec = " "; /* 规格*/
private String material = " "; /* 材质*/
private String unit = " "; /* 单位*/
private BigDecimal length = new BigDecimal(0.000); /* 长度*/
private BigDecimal width = new BigDecimal(0.000); /* 宽度*/
private BigDecimal thick = new BigDecimal(0.000); /* 厚度*/
private BigDecimal consQuantity = new BigDecimal(0); /* 库存数量*/
private BigDecimal consUnitWeight = new BigDecimal(0.000); /* 库存单重*/
private BigDecimal consWeight = new BigDecimal(0.000); /* 库存重量*/
private String factoryCode = " "; /* 厂区编码*/
private String factoryName = " "; /* 厂区名称*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" ");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ACCOUNT_CODE);
eiColumn.setDescName("企业编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_BY);
eiColumn.setDescName("记录创建者");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_NAME);
eiColumn.setDescName("记录创建名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_TIME);
eiColumn.setDescName("记录创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_BY);
eiColumn.setDescName("记录修改者");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_NAME);
eiColumn.setDescName("记录修改名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_TIME);
eiColumn.setDescName("记录修改时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DELETE_FLAG);
eiColumn.setDescName("0-未删除,1-已删除");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("公司编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_NAME);
eiColumn.setDescName("公司名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_WH_CODE);
eiColumn.setDescName("仓库编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_WH_NAME);
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_MATERIAL);
eiColumn.setDescName("材质");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UNIT);
eiColumn.setDescName("单位");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_LENGTH);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20);
eiColumn.setDescName("长度");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_WIDTH);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20);
eiColumn.setDescName("宽度");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_THICK);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20);
eiColumn.setDescName("厚度");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONS_QUANTITY);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(15);
eiColumn.setDescName("库存数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONS_UNIT_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("库存单重");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONS_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("库存重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FACTORY_CODE);
eiColumn.setDescName("厂区编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FACTORY_NAME);
eiColumn.setDescName("厂区名称");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HGYX001C() {
initMetaData();
}
/**
* get the id .
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id .
*
* @param id
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the accountCode - 企业编码.
* @return the accountCode
*/
public String getAccountCode() {
return this.accountCode;
}
/**
* set the accountCode - 企业编码.
*
* @param accountCode - 企业编码
*/
public void setAccountCode(String accountCode) {
this.accountCode = accountCode;
}
/**
* get the depCode - 部门编码.
* @return the depCode
*/
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码.
*
* @param depCode - 部门编码
*/
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the createdBy - 记录创建者.
* @return the createdBy
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 记录创建者.
*
* @param createdBy - 记录创建者
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
* get the createdName - 记录创建名称.
* @return the createdName
*/
public String getCreatedName() {
return this.createdName;
}
/**
* set the createdName - 记录创建名称.
*
* @param createdName - 记录创建名称
*/
public void setCreatedName(String createdName) {
this.createdName = createdName;
}
/**
* get the createdTime - 记录创建时间.
* @return the createdTime
*/
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 记录创建时间.
*
* @param createdTime - 记录创建时间
*/
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
/**
* get the updatedBy - 记录修改者.
* @return the updatedBy
*/
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 记录修改者.
*
* @param updatedBy - 记录修改者
*/
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
/**
* get the updatedName - 记录修改名称.
* @return the updatedName
*/
public String getUpdatedName() {
return this.updatedName;
}
/**
* set the updatedName - 记录修改名称.
*
* @param updatedName - 记录修改名称
*/
public void setUpdatedName(String updatedName) {
this.updatedName = updatedName;
}
/**
* get the updatedTime - 记录修改时间.
* @return the updatedTime
*/
public String getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 记录修改时间.
*
* @param updatedTime - 记录修改时间
*/
public void setUpdatedTime(String updatedTime) {
this.updatedTime = updatedTime;
}
/**
* get the deleteFlag - 0-未删除,1-已删除.
* @return the deleteFlag
*/
public Integer getDeleteFlag() {
return this.deleteFlag;
}
/**
* set the deleteFlag - 0-未删除,1-已删除.
*
* @param deleteFlag - 0-未删除,1-已删除
*/
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
/**
* get the companyCode - 公司编码.
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 公司编码.
*
* @param companyCode - 公司编码
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the companyName - 公司名称.
* @return the companyName
*/
public String getCompanyName() {
return this.companyName;
}
/**
* set the companyName - 公司名称.
*
* @param companyName - 公司名称
*/
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
/**
* get the 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 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 specId - 规格ID.
* @return the specId
*/
public Long getSpecId() {
return this.specId;
}
/**
* set the specId - 规格ID.
*
* @param specId - 规格ID
*/
public void setSpecId(Long specId) {
this.specId = specId;
}
/**
* 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 material - 材质.
* @return the material
*/
public String getMaterial() {
return this.material;
}
/**
* set the material - 材质.
*
* @param material - 材质
*/
public void setMaterial(String material) {
this.material = material;
}
/**
* 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 length - 长度.
* @return the length
*/
public BigDecimal getLength() {
return this.length;
}
/**
* set the length - 长度.
*
* @param length - 长度
*/
public void setLength(BigDecimal length) {
this.length = length;
}
/**
* get the width - 宽度.
* @return the width
*/
public BigDecimal getWidth() {
return this.width;
}
/**
* set the width - 宽度.
*
* @param width - 宽度
*/
public void setWidth(BigDecimal width) {
this.width = width;
}
/**
* get the thick - 厚度.
* @return the thick
*/
public BigDecimal getThick() {
return this.thick;
}
/**
* set the thick - 厚度.
*
* @param thick - 厚度
*/
public void setThick(BigDecimal thick) {
this.thick = thick;
}
/**
* get the consQuantity - 库存数量.
* @return the consQuantity
*/
public BigDecimal getInvQty() {
return this.consQuantity;
}
public BigDecimal getConsQuantity() {
return consQuantity;
}
public void setConsQuantity(BigDecimal consQuantity) {
this.consQuantity = consQuantity;
}
public BigDecimal getConsUnitWeight() {
return consUnitWeight;
}
public void setConsUnitWeight(BigDecimal consUnitWeight) {
this.consUnitWeight = consUnitWeight;
}
public BigDecimal getConsWeight() {
return consWeight;
}
public void setConsWeight(BigDecimal consWeight) {
this.consWeight = consWeight;
}
/**
* get the factoryCode - 厂区编码.
* @return the factoryCode
*/
public String getFactoryCode() {
return this.factoryCode;
}
/**
* set the factoryCode - 厂区编码.
*
* @param factoryCode - 厂区编码
*/
public void setFactoryCode(String factoryCode) {
this.factoryCode = factoryCode;
}
/**
* get the factoryName - 厂区名称.
* @return the factoryName
*/
public String getFactoryName() {
return this.factoryName;
}
/**
* set the factoryName - 厂区名称.
*
* @param factoryName - 厂区名称
*/
public void setFactoryName(String factoryName) {
this.factoryName = factoryName;
}
/**
* 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));
setWhCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_WH_CODE)), whCode));
setWhName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_WH_NAME)), whName));
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));
setMaterial(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_MATERIAL)), material));
setUnit(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UNIT)), unit));
setLength(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_LENGTH)), length));
setWidth(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_WIDTH)), width));
setThick(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_THICK)), thick));
setConsQuantity(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_CONS_QUANTITY)), consQuantity));
setConsUnitWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_CONS_UNIT_WEIGHT)), consUnitWeight));
setConsWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_CONS_WEIGHT)), consWeight));
setFactoryCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_CODE)), factoryCode));
setFactoryName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_NAME)), factoryName));
}
/**
* 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_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_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_MATERIAL, StringUtils.toString(material, eiMetadata.getMeta(FIELD_MATERIAL)));
map.put(FIELD_UNIT, StringUtils.toString(unit, eiMetadata.getMeta(FIELD_UNIT)));
map.put(FIELD_LENGTH, StringUtils.toString(length, eiMetadata.getMeta(FIELD_LENGTH)));
map.put(FIELD_WIDTH, StringUtils.toString(width, eiMetadata.getMeta(FIELD_WIDTH)));
map.put(FIELD_THICK, StringUtils.toString(thick, eiMetadata.getMeta(FIELD_THICK)));
map.put(FIELD_CONS_QUANTITY, StringUtils.toString(consQuantity, eiMetadata.getMeta(FIELD_CONS_QUANTITY)));
map.put(FIELD_CONS_UNIT_WEIGHT, StringUtils.toString(consUnitWeight, eiMetadata.getMeta(FIELD_CONS_UNIT_WEIGHT)));
map.put(FIELD_CONS_WEIGHT, StringUtils.toString(consWeight, eiMetadata.getMeta(FIELD_CONS_WEIGHT)));
map.put(FIELD_FACTORY_CODE, StringUtils.toString(factoryCode, eiMetadata.getMeta(FIELD_FACTORY_CODE)));
map.put(FIELD_FACTORY_NAME, StringUtils.toString(factoryName, eiMetadata.getMeta(FIELD_FACTORY_NAME)));
return map;
}
}
package com.baosight.hggp.hg.yx.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.kc.domain.HGKC004;
import com.baosight.hggp.hg.kc.domain.HGKC004A;
import com.baosight.hggp.hg.pz.domain.HGPZ005;
import com.baosight.hggp.hg.pz.tools.HGPZTools;
import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.hg.yx.domain.HGYX001;
import com.baosight.hggp.hg.yx.domain.HGYX001A;
import com.baosight.hggp.hg.yx.tools.HGYXTools;
import com.baosight.hggp.util.*;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.collections.CollectionUtils;
import java.math.BigDecimal;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/6/4
*/
public class ServiceHGYX001 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
EiInfo outInfo = super.initLoad(inInfo,EiConstant.resultBlock, new HGYX001());
UserVO userVO = HGCWTools.HgCw002.getUserCompany();
outInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX001.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
outInfo.getBlock(EiConstant.resultBlock).setBlockMeta(new HGYX001().eiMetadata);
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID,DdynamicEnum.PROJ_RECORD_BLOCK_ID,DdynamicEnum.WH_RECORD_BOX_BLOCK_ID,DdynamicEnum.CUSTOMER_RECORD_ALL_BLOCK_ID));
outInfo.set(HGYX001.FIELD_COMPANY_CODE, userVO.getUsercode());
return outInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX001.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
return super.query(inInfo,HGYX001.QUERY,new HGYX001());
}
/**
* 删除
* @param inInfo inInfo
* @return
*/
@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);
HGYX001 hgyx001 = new HGYX001();
hgyx001.fromMap(map);
hgyx001.setDeleteFlag(CommonConstant.YesNo.YES_1);
if (hgyx001.getStatus()==1) {
throw new PlatException("已审核,无法删除!");
}
DaoUtils.update(HGYX001.DELETE_FLAG, hgyx001);
HGYX001A hgyx001A = new HGYX001A();
hgyx001A.setParentId(hgyx001.getId());
hgyx001A.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HGYX001A.DELETE_BY_PARENT_ID, hgyx001A);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")});
} catch (PlatException e) {
LogUtils.setMsg(inInfo, e,"删除失败");
}
return inInfo;
}
/**
* 保存操作
*/
@OperationLogAnnotation(operModul = "销售发货",operType = "保存",operDesc = "保存操作")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> queryBlock = inInfo.getBlock(EiConstant.queryBlock).getRows();
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map queryRow:queryBlock) {
HGYX001 hgyx001 = new HGYX001();
hgyx001.fromMap(queryRow);
if (hgyx001.getId() == null || hgyx001.getId() == 0) {
this.add(hgyx001);
for (Map resultRow : resultRows) {
HGYX001A hgyx001A = new HGYX001A();
hgyx001A.fromMap(resultRow);
hgyx001A.setParentId(hgyx001.getId());
if (hgyx001A.getId() == null || hgyx001A.getId() == 0) {
this.addDatail(hgyx001A);
}
}
} else {
this.modify(hgyx001);
for (Map resultRow : resultRows) {
HGYX001A hgyx001A = new HGYX001A();
hgyx001A.fromMap(resultRow);
hgyx001A.setParentId(hgyx001.getId());
if (hgyx001A.getId() == null || hgyx001A.getId() == 0) {
this.addDatail(hgyx001A);
}else {
this.modifyDatail(hgyx001A);
}
}
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HGYX001 hgyx001) {
//生成工序编码
hgyx001.setDeliveryCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.PLAN_CODE));
DaoUtils.insert(HGYX001.INSERT, hgyx001);
}
public void addDatail(HGYX001A hgyx001A) {
//生成工序编码
//hgyx001A.setDeliveryCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.PLAN_CODE));
DaoUtils.insert(HGYX001A.INSERT, hgyx001A);
}
/**
* 修改操作
*/
public void modify(HGYX001 hgyx001) {
DaoUtils.update(HGYX001.UPDATE, hgyx001);
}
public void modifyDatail(HGYX001A hgyx001A) {
DaoUtils.update(HGYX001A.UPDATE, hgyx001A);
}
@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);
HGYX001 hgyx001 = new HGYX001();
hgyx001.fromMap(map);
Map<String,Object> qarma = new HashMap<>();
List list = HGYXTools.Hgyx001.getParentId(hgyx001.getId());
AssertUtils.isEmpty(list, "销售发货不能为空,无法审批完成!");
DaoUtils.update(HGYX001.UPDATE_STATUS, hgyx001);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.update", "修改")});
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "审批失败");
return inInfo;
}
return inInfo;
}
@OperationLogAnnotation(operModul = "销售发货", operType = "提交", operDesc = "提交")
public EiInfo commit(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
//List<Long> ids = ObjectUtils.listKey(resultRows, HGSC001.FIELD_id);
for (Map resultRow:resultRows) {
String outboundCode = SequenceGenerator.getNextSequence(HGConstant.SequenceId.SALE_OUT_CODE);
HGYX001 hgyx001 = new HGYX001();
hgyx001.fromMap(resultRow);
hgyx001.setStatus(1);
hgyx001.setOutboundCode(outboundCode);
/*销售出库*/
saveOutbound(resultRow, outboundCode);
DaoUtils.update(HGYX001.BATCH_COMMIT,hgyx001);
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据提交成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "操作失败");
}
return inInfo;
}
public void saveOutbound(Map resultRow, String outboundCode) {
// 写入数据
HGKC004 hgkc004 = new HGKC004();
hgkc004.setReceiptDate(DateUtils.formatShort(DateUtils.date()));
hgkc004.setCompanyCode(resultRow.get(HGYX001.FIELD_COMPANY_CODE).toString());
//hgkc004.setCompanyName(resultRow.get(HGYX001.FIELD_COMPANY_NAME).toString());
hgkc004.setWhCode(resultRow.get(HGYX001.FIELD_CONS_WH_CODE).toString());
//hgkc004.setWhName(resultRow.get(HGYX001.FIELD_CONS_WH_NAME).toString());
hgkc004.setSaleOutCode(outboundCode);
if (hgkc004.getId() == null || hgkc004.getId() == 0) {
this.add(hgkc004);
String parentId = resultRow.get(HGYX001.FIELD_ID).toString();
List<HGYX001A> hgyx001As = HGYXTools.Hgyx001.getParentId(Long.parseLong(parentId));
if (CollectionUtils.isEmpty(hgyx001As)){
throw new PlatException("销售发货详情不能为空!");
}
this.addDetail(hgyx001As, hgkc004.getId());
}
}
/**
* 新增销售发货
* @param hgkc004
*/
public void add(HGKC004 hgkc004) {
//生成工序编码
//hgkc004.setSaleOutCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.SALE_OUT_CODE));
//hgkc004.setReceiptDate(DateUtils.formatShort(DateUtils.date()));
DaoUtils.insert(HGKC004.INSERT, hgkc004);
}
/**
* 新增销售发货详情
*/
public void addDetail( List<HGYX001A> hgyx001As,Long parentId) {
for (HGYX001A hgyx001A : hgyx001As) {
HGKC004A hgkc004A = new HGKC004A();
hgkc004A.setInventType(hgyx001A.getInventType());
hgkc004A.setInventCode(hgyx001A.getInventCode());
hgkc004A.setInventName(hgyx001A.getInventName());
hgkc004A.setInventRecordId(hgyx001A.getInventRecordId());
hgkc004A.setSpec(hgyx001A.getSpec());
hgkc004A.setLength(hgyx001A.getLength());
hgkc004A.setThick(hgyx001A.getThick());
hgkc004A.setWidth(hgyx001A.getWidth());
hgkc004A.setQuantity(hgyx001A.getQuantity());
hgkc004A.setUnitWeight(hgyx001A.getUnitWeight());
hgkc004A.setWeight(hgyx001A.getWeight());
hgkc004A.setParentId(parentId);
DaoUtils.insert(HGKC004A.INSERT, hgkc004A);
}
}
@OperationLogAnnotation(operModul = "销售发货",operType = "保存并审核",operDesc = "保存操作")
public EiInfo saveStatus(EiInfo inInfo) {
try {
List<Map> queryBlock = inInfo.getBlock(EiConstant.queryBlock).getRows();
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map queryRow:queryBlock) {
HGYX001 hgyx001 = new HGYX001();
hgyx001.fromMap(queryRow);
if (hgyx001.getId() == null || hgyx001.getId() == 0) {
String outboundCode = SequenceGenerator.getNextSequence(HGConstant.SequenceId.SALE_OUT_CODE);
hgyx001.setOutboundCode(outboundCode);
hgyx001.setStatus(1);
this.add(hgyx001);
HGKC004 hgkc004 = new HGKC004();
hgkc004.setReceiptDate(DateUtils.formatShort(DateUtils.date()));
hgkc004.setCompanyCode(hgyx001.getCompanyCode());
hgkc004.setWhCode(hgyx001.getConsWhCode());
hgkc004.setSaleOutCode(outboundCode);
DaoUtils.insert(HGKC004.INSERT, hgkc004);
for (Map resultRow : resultRows) {
HGYX001A hgyx001A = new HGYX001A();
hgyx001A.fromMap(resultRow);
hgyx001A.setParentId(hgyx001.getId());
if (hgyx001A.getId() == null || hgyx001A.getId() == 0) {
this.addDatail(hgyx001A);
HGKC004A hgkc004A = new HGKC004A();
hgkc004A.setInventType(hgyx001A.getInventType());
hgkc004A.setInventCode(hgyx001A.getInventCode());
hgkc004A.setInventName(hgyx001A.getInventName());
hgkc004A.setInventRecordId(hgyx001A.getInventRecordId());
hgkc004A.setSpec(hgyx001A.getSpec());
hgkc004A.setLength(hgyx001A.getLength());
hgkc004A.setThick(hgyx001A.getThick());
hgkc004A.setWidth(hgyx001A.getWidth());
hgkc004A.setQuantity(hgyx001A.getQuantity());
hgkc004A.setUnitWeight(hgyx001A.getUnitWeight());
hgkc004A.setWeight(hgyx001A.getWeight());
hgkc004A.setParentId(hgkc004.getId());
DaoUtils.insert(HGKC004A.INSERT, hgkc004A);
}
}
} else {
this.modify(hgyx001);
for (Map resultRow : resultRows) {
HGYX001A hgyx001A = new HGYX001A();
hgyx001A.fromMap(resultRow);
hgyx001A.setParentId(hgyx001.getId());
if (hgyx001A.getId() == null || hgyx001A.getId() == 0) {
this.addDatail(hgyx001A);
}else {
this.modifyDatail(hgyx001A);
}
}
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
}
package com.baosight.hggp.hg.yx.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.kc.domain.HGKC010;
import com.baosight.hggp.hg.kc.domain.HGKC013;
import com.baosight.hggp.hg.kc.domain.HGKC013A;
import com.baosight.hggp.hg.yx.domain.HGYX001;
import com.baosight.hggp.hg.yx.domain.HGYX001A;
import com.baosight.hggp.hg.yx.tools.HGYXTools;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/6/4
*/
public class ServiceHGYX001A extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
String id = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX001A.FIELD_PARENT_ID);
EiInfo outInfo = super.initLoad(inInfo, new HGYX001A());
outInfo.getBlock(EiConstant.resultBlock).getRows().clear();
if (id != null) {
HGYX001 hgYx001 =HGYXTools.Hgyx001.getId(Long.valueOf(id));
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX001.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
outInfo = super.query(inInfo, HGYX001A.QUERY, new HGYX001A());
outInfo.getBlock(EiConstant.queryBlock).setRows(Collections.singletonList(hgYx001));
}
UserVO userVO = HGCWTools.HgCw002.getUserCompany();
outInfo.getBlock(EiConstant.resultBlock).setBlockMeta(new HGYX001().eiMetadata);
CommonMethod.initBlock(outInfo,
Arrays.asList(
DdynamicEnum.COMPANY_BOX_BLOCK_ID,
DdynamicEnum.WH_RECORD_BOX_BLOCK_ID,
DdynamicEnum.CUSTOMER_RECORD_ALL_BLOCK_ID));
CommonMethod.initBlock(outInfo,
Arrays.asList(
DdynamicEnum.PROJ_RECORD_BLOCK_ID,
DdynamicEnum.INVENT_TYPE_BOX_BLOCK_ID,
DdynamicEnum.INVENT_CODE_BOX_BLOCK_ID,
DdynamicEnum.SPEC_BOX_BLOCK_ID),
new HashMap<String,Object>(){{
put(HGKC013.FIELD_COMPANY_CODE,userVO.getUsercode());
put(HGKC013A.FIELD_DELETE_FLAG,CommonConstant.YesNo.NO_0);
}}, false);
outInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGYX001.FIELD_COMPANY_CODE, userVO.getUsercode());
outInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGYX001.FIELD_COMPANY_NAME, userVO.getUsername());
outInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGYX001.FIELD_CONS_CODE, userVO.getUsercode());
outInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGYX001.FIELD_CONS_NAME, userVO.getUsername());
return outInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX001.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
return super.query(inInfo,HGYX001.QUERY,new HGYX001());
}
@OperationLogAnnotation(operModul = "销售发货详情",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
int i = 0;
try {
String status = inInfo.getCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX001.FIELD_STATUS).toString();
if ("1".equals(status)) {
String str = "已审核,无法删除!";
throw new PlatException(str);
}
HGYX001A hgyx001A = new HGYX001A();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hgyx001A.fromMap(map);
hgyx001A.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HGYX001A.DELETE_FLAG, hgyx001A);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")});
} catch (PlatException e) {
LogUtils.setMsg(inInfo, e,"删除失败");
}
return inInfo;
}
}
package com.baosight.hggp.hg.yx.service;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.kc.domain.HGKC013;
import com.baosight.hggp.hg.kc.domain.HGKC013A;
import com.baosight.hggp.hg.yx.domain.HGYX001;
import com.baosight.hggp.hg.yx.domain.HGYX001A;
import com.baosight.hggp.hg.yx.tools.HGYXTools;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.StringUtils;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
/**
* @author LiuYang
* @version 1.0 2024/6/4
*/
public class ServiceHGYX001B extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
String id = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX001A.FIELD_PARENT_ID);
EiInfo outInfo = super.initLoad(inInfo, new HGYX001A());
outInfo.getBlock(EiConstant.resultBlock).getRows().clear();
if (id != null) {
HGYX001 hgYx001 = HGYXTools.Hgyx001.getId(Long.valueOf(id));
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX001.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
outInfo = super.query(inInfo, HGYX001A.QUERY, new HGYX001A());
outInfo.getBlock(EiConstant.queryBlock).setRows(Collections.singletonList(hgYx001));
}
UserVO userVO = HGCWTools.HgCw002.getUserCompany();
outInfo.getBlock(EiConstant.resultBlock).setBlockMeta(new HGYX001().eiMetadata);
CommonMethod.initBlock(outInfo,
Arrays.asList(
DdynamicEnum.COMPANY_BOX_BLOCK_ID,
DdynamicEnum.WH_RECORD_BOX_BLOCK_ID,
DdynamicEnum.CUSTOMER_RECORD_ALL_BLOCK_ID));
CommonMethod.initBlock(outInfo,
Arrays.asList(
DdynamicEnum.PROJ_RECORD_BLOCK_ID,
DdynamicEnum.INVENT_TYPE_BOX_BLOCK_ID,
DdynamicEnum.INVENT_CODE_BOX_BLOCK_ID,
DdynamicEnum.SPEC_BOX_BLOCK_ID),
new HashMap<String,Object>(){{
put(HGKC013.FIELD_COMPANY_CODE,userVO.getUsercode());
put(HGKC013A.FIELD_DELETE_FLAG,CommonConstant.YesNo.NO_0);
}}, false);
outInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGYX001.FIELD_COMPANY_CODE, userVO.getUsercode());
outInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGYX001.FIELD_COMPANY_NAME, userVO.getUsername());
outInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGYX001.FIELD_CONS_CODE, userVO.getUsercode());
outInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGYX001.FIELD_CONS_NAME, userVO.getUsername());
return outInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
String id = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX001A.FIELD_ID);
inInfo.getBlock(EiConstant.queryBlock).getRows().clear();
if (StringUtils.isNotEmpty(id)) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX001A.FIELD_PARENT_ID, id);
}
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX001.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
return super.query(inInfo,HGYX001A.QUERY,new HGYX001A());
}
}
package com.baosight.hggp.hg.yx.service;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.kc.domain.HGKC010;
import com.baosight.hggp.hg.yx.domain.HGYX001;
import com.baosight.hggp.hg.yx.domain.HGYX001C;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.Arrays;
/**
* @author LiuYang
* @version 1.0 2024/6/4
*/
public class ServiceHGYX001C extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX001C.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
String[] specIds = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, "specIds").split(",");
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, "specIds", specIds);
inInfo = super.query(inInfo, HGYX001C.QUERY, new HGYX001C());
CommonMethod.initBlock(inInfo,
Arrays.asList(
DdynamicEnum.INVENT_TYPE_BLOCK_ID,
DdynamicEnum.INVENT_RECORD_BLOCK_ID,
DdynamicEnum.SPEC_NAME_BLOCK_ID));
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGYX001C().eiMetadata);
return inInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX001.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
return super.query(inInfo, HGYX001C.QUERY,new HGYX001C());
}
}
<?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-06-04 9:20:26
Version : 1.0
schema : hggp
tableName : HGYX001
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,
PROJ_CODE VARCHAR,
PROJ_NAME VARCHAR,
DELIVERY_CODE VARCHAR,
OUTBOUND_CODE VARCHAR,
CONS_CODE VARCHAR,
CONS_NAME VARCHAR,
CONS_WH_CODE VARCHAR,
CONS_WH_NAME VARCHAR,
CONS_ADDR VARCHAR,
RECE_CODE VARCHAR,
RECE_NAME VARCHAR,
RECE_ADDR VARCHAR,
RECE_USER_PHONE VARCHAR,
TRAN_TYPE TINYINT,
NUM_PLATE VARCHAR,
CONS_QUANTITY VARCHAR,
CONS_WEIGHT VARCHAR,
STATUS TINYINT
-->
<sqlMap namespace="HGYX001">
<typeAlias alias="HGYX001" type="com.baosight.hggp.hg.yx.domain.HGYX001"/>
<sql id="column">
ID as "id",
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 记录创建者 -->
CREATED_NAME as "createdName", <!-- 记录创建名称 -->
CREATED_TIME as "createdTime", <!-- 记录创建时间 -->
UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DELETE_FLAG as "deleteFlag", <!-- 0-未删除,1-已删除 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
DELIVERY_CODE as "deliveryCode", <!-- 发货单号 -->
OUTBOUND_CODE as "outboundCode", <!-- 出库单号 -->
CONS_CODE as "consCode", <!-- 发货方编码 -->
CONS_NAME as "consName", <!-- 发货方名称 -->
CONS_WH_CODE as "consWhCode", <!-- 发货仓库编码 -->
CONS_WH_NAME as "consWhName", <!-- 发货仓库名称 -->
CONS_ADDR as "consAddr", <!-- 发货地址 -->
RECE_CODE as "receCode", <!-- 收货方编码 -->
RECE_NAME as "receName", <!-- 收货方名称 -->
RECE_ADDR as "receAddr", <!-- 收货地址 -->
RECE_USER_PHONE as "receUserPhone", <!-- 收货人电话 -->
TRAN_TYPE as "tranType", <!-- 运输方式 -->
NUM_PLATE as "numPlate", <!-- 车号 -->
CONS_QUANTITY as "consQuantity", <!-- 发货数量 -->
CONS_WEIGHT as "consWeight", <!-- 发货重量 -->
STATUS as "status" <!-- 审批状态 0-未审核,1-已审核 -->
</sql>
<sql id="condition">
<include refid="HGXSDataAuth.authCondition"/>
<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 LIKE CONCAT('%',#companyName#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME LIKE CONCAT('%',#projName#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deliveryCode">
DELIVERY_CODE LIKE CONCAT('%',#deliveryCode#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="outboundCode">
OUTBOUND_CODE LIKE CONCAT('%',#outboundCode#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="consCode">
CONS_CODE = #consCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="consName">
CONS_NAME LIKE CONCAT('%',#consName#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="consWhCode">
CONS_WH_CODE = #consWhCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="consWhName">
CONS_WH_NAME LIKE CONCAT('%',#consWhName#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="consAddr">
CONS_ADDR LIKE CONCAT('%',#consAddr#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receCode">
RECE_CODE = #receCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receName">
RECE_NAME LIKE CONCAT('%',#receName#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receAddr">
RECE_ADDR LIKE CONCAT('%',#receAddr#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receUserPhone">
RECE_USER_PHONE = #receUserPhone#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="tranType">
TRAN_TYPE = #tranType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="numPlate">
NUM_PLATE LIKE CONCAT('%',#numPlate#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="consQuantity">
CONS_QUANTITY = #consQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="consWeight">
CONS_WEIGHT = #consWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap" resultClass="HGYX001">
SELECT
<include refid="column"/>
FROM ${hggpSchema}.HGYX001 WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
CREATED_TIME desc, ID asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGYX001 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="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deliveryCode">
DELIVERY_CODE = #deliveryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="outboundCode">
OUTBOUND_CODE = #outboundCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="consCode">
CONS_CODE = #consCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="consName">
CONS_NAME = #consName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="consWhCode">
CONS_WH_CODE = #consWhCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="consWhName">
CONS_WH_NAME = #consWhName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="consAddr">
CONS_ADDR = #consAddr#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receCode">
RECE_CODE = #receCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receName">
RECE_NAME = #receName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receAddr">
RECE_ADDR = #receAddr#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receUserPhone">
RECE_USER_PHONE = #receUserPhone#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="tranType">
TRAN_TYPE = #tranType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="numPlate">
NUM_PLATE = #numPlate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="consQuantity">
CONS_QUANTITY = #consQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="consWeight">
CONS_WEIGHT = #consWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGYX001 (ID,
ACCOUNT_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 -->
UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
DELETE_FLAG, <!-- 0-未删除,1-已删除 -->
COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 -->
PROJ_CODE, <!-- 项目编码 -->
PROJ_NAME, <!-- 项目名称 -->
DELIVERY_CODE, <!-- 发货单号 -->
OUTBOUND_CODE, <!-- 出库单号 -->
CONS_CODE, <!-- 发货方编码 -->
CONS_NAME, <!-- 发货方名称 -->
CONS_WH_CODE, <!-- 发货仓库编码 -->
CONS_WH_NAME, <!-- 发货仓库名称 -->
CONS_ADDR, <!-- 发货地址 -->
RECE_CODE, <!-- 收货方编码 -->
RECE_NAME, <!-- 收货方名称 -->
RECE_ADDR, <!-- 收货地址 -->
RECE_USER_PHONE, <!-- 收货人电话 -->
TRAN_TYPE, <!-- 运输方式 -->
NUM_PLATE, <!-- 车号 -->
CONS_QUANTITY, <!-- 发货数量 -->
CONS_WEIGHT, <!-- 发货重量 -->
STATUS <!-- 审批状态 0-未审核,1-已审核 -->
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#,
#updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #projCode#, #projName#, #deliveryCode#,
#outboundCode#, #consCode#, #consName#, #consWhCode#, #consWhName#, #consAddr#, #receCode#, #receName#,
#receAddr#, #receUserPhone#, #tranType#, #numPlate#, #consQuantity#, #consWeight#, #status#)
<selectKey resultClass="long" keyProperty="id">
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGYX001
</selectKey>
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGYX001 WHERE
ID = #id#
</delete>
<update id="deleteFlag">
UPDATE ${hggpSchema}.HGYX001
SET
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
DELETE_FLAG = #deleteFlag# <!-- 0-未删除,1-已删除 -->
WHERE
ID = #id#
</update>
<update id="update">
UPDATE ${hggpSchema}.HGYX001
SET
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 0-未删除,1-已删除 -->
COMPANY_CODE = #companyCode#, <!-- 公司编码 -->
COMPANY_NAME = #companyName#, <!-- 公司名称 -->
PROJ_CODE = #projCode#, <!-- 项目编码 -->
PROJ_NAME = #projName#, <!-- 项目名称 -->
DELIVERY_CODE = #deliveryCode#, <!-- 发货单号 -->
OUTBOUND_CODE = #outboundCode#, <!-- 出库单号 -->
CONS_CODE = #consCode#, <!-- 发货方编码 -->
CONS_NAME = #consName#, <!-- 发货方名称 -->
CONS_WH_CODE = #consWhCode#, <!-- 发货仓库编码 -->
CONS_WH_NAME = #consWhName#, <!-- 发货仓库名称 -->
CONS_ADDR = #consAddr#, <!-- 发货地址 -->
RECE_CODE = #receCode#, <!-- 收货方编码 -->
RECE_NAME = #receName#, <!-- 收货方名称 -->
RECE_ADDR = #receAddr#, <!-- 收货地址 -->
RECE_USER_PHONE = #receUserPhone#, <!-- 收货人电话 -->
TRAN_TYPE = #tranType#, <!-- 运输方式 -->
NUM_PLATE = #numPlate#, <!-- 车号 -->
CONS_QUANTITY = #consQuantity#, <!-- 发货数量 -->
CONS_WEIGHT = #consWeight#, <!-- 发货重量 -->
STATUS = #status# <!-- 审批状态 0-未审核,1-已审核 -->
WHERE
ID = #id#
</update>
<update id="batchCommit">
UPDATE ${hggpSchema}.HGYX001
SET
OUTBOUND_CODE = #outboundCode#, <!-- 出库单号 -->
STATUS = #status#, <!-- 审批状态 0-未审核,1-已审核 -->
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime# <!-- 记录修改时间 -->
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-06-04 9:20:26
Version : 1.0
schema : hggp
tableName : HGYX001A
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,
INVENT_RECORD_ID BIGINT,
INVENT_TYPE VARCHAR,
INVENT_CODE VARCHAR NOT NULL,
INVENT_NAME VARCHAR NOT NULL,
SPEC VARCHAR,
LENGTH DECIMAL,
WIDTH DECIMAL,
THICK DECIMAL,
QUANTITY DECIMAL,
WEIGHT DECIMAL,
PARENT_ID BIGINT
-->
<sqlMap namespace="HGYX001A">
<typeAlias alias="HGYX001A" type="com.baosight.hggp.hg.yx.domain.HGYX001A"/>
<sql id="column">
ID as "id", <!-- ID -->
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 记录创建者 -->
CREATED_NAME as "createdName", <!-- 记录创建名称 -->
CREATED_TIME as "createdTime", <!-- 记录创建时间 -->
UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DELETE_FLAG as "deleteFlag", <!-- 0-未删除,1-已删除 -->
INVENT_RECORD_ID as "inventRecordId", <!-- 存货档案id -->
INVENT_TYPE as "inventType", <!-- 存货类型 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_NAME as "inventName", <!-- 存货名称 -->
SPEC as "spec", <!-- 规格 -->
LENGTH as "length", <!-- 长 -->
WIDTH as "width", <!-- 宽 -->
THICK as "thick", <!-- 厚 -->
QUANTITY as "quantity", <!-- 发货数量 -->
UNIT_WEIGHT as "unitWeight", <!-- 发货单重 -->
WEIGHT as "weight", <!-- 发货重量 -->
PARENT_ID as "parentId" <!-- 销售发货ID -->
</sql>
<sql id="condition">
<include refid="HGXSDataAuth.authCondition"/>
<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="inventRecordId">
INVENT_RECORD_ID = #inventRecordId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventType">
INVENT_TYPE = #inventType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="spec">
SPEC = #spec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="length">
LENGTH = #length#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="width">
WIDTH = #width#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="thick">
THICK = #thick#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="quantity">
QUANTITY = #quantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="weight">
WEIGHT = #weight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentId">
PARENT_ID = #parentId#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap" resultClass="HGYX001A">
SELECT
<include refid="column" />
FROM ${hggpSchema}.HGYX001A WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
CREATED_TIME desc, ID asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGYX001A 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="inventRecordId">
INVENT_RECORD_ID = #inventRecordId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventType">
INVENT_TYPE = #inventType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="spec">
SPEC = #spec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="length">
LENGTH = #length#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="width">
WIDTH = #width#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="thick">
THICK = #thick#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="quantity">
QUANTITY = #quantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="weight">
WEIGHT = #weight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentId">
PARENT_ID = #parentId#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGYX001A (ID, <!-- ID -->
ACCOUNT_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 -->
UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
DELETE_FLAG, <!-- 0-未删除,1-已删除 -->
INVENT_RECORD_ID, <!-- 存货档案id -->
INVENT_TYPE, <!-- 存货类型 -->
INVENT_CODE, <!-- 存货编码 -->
INVENT_NAME, <!-- 存货名称 -->
SPEC, <!-- 规格 -->
LENGTH, <!-- 长 -->
WIDTH, <!-- 宽 -->
THICK, <!-- 厚 -->
QUANTITY, <!-- 发货数量 -->
UNIT_WEIGHT, <!-- 发货单重 -->
WEIGHT, <!-- 发货重量 -->
PARENT_ID <!-- 销售发货ID -->
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #inventRecordId#, #inventType#, #inventCode#, #inventName#, #spec#, #length#, #width#, #thick#, #quantity#, #unitWeight#, #weight#, #parentId#)
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGYX001A WHERE
ID = #id#
</delete>
<update id="deleteFlag">
UPDATE ${hggpSchema}.HGYX001A
SET
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
DELETE_FLAG = #deleteFlag# <!-- 0-未删除,1-已删除 -->
WHERE ID = #id#
</update>
<update id="deleteByParentId">
UPDATE ${hggpSchema}.HGYX001A
SET
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
DELETE_FLAG = #deleteFlag# <!-- 0-未删除,1-已删除 -->
WHERE PARENT_ID = #parentId#
</update>
<update id="update">
UPDATE ${hggpSchema}.HGYX001A
SET
ACCOUNT_CODE = #accountCode#, <!-- 企业编码 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
CREATED_BY = #createdBy#, <!-- 记录创建者 -->
CREATED_NAME = #createdName#, <!-- 记录创建名称 -->
CREATED_TIME = #createdTime#, <!-- 记录创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 0-未删除,1-已删除 -->
INVENT_RECORD_ID = #inventRecordId#, <!-- 存货档案id -->
INVENT_TYPE = #inventType#, <!-- 存货类型 -->
INVENT_CODE = #inventCode#, <!-- 存货编码 -->
INVENT_NAME = #inventName#, <!-- 存货名称 -->
SPEC = #spec#, <!-- 规格 -->
LENGTH = #length#, <!-- 长 -->
WIDTH = #width#, <!-- 宽 -->
THICK = #thick#, <!-- 厚 -->
QUANTITY = #quantity#, <!-- 发货数量 -->
UNIT_WEIGHT = #unitWeight#, <!-- 发货单重 -->
WEIGHT = #weight#, <!-- 发货重量 -->
PARENT_ID = #parentId# <!-- 销售发货ID -->
WHERE
ID = #id#
</update>
</sqlMap>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap namespace="HGYX001C">
<sql id="column">
ID as "id",
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 记录创建者 -->
CREATED_NAME as "createdName", <!-- 记录创建名称 -->
CREATED_TIME as "createdTime", <!-- 记录创建时间 -->
UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DELETE_FLAG as "deleteFlag", <!-- 0-未删除,1-已删除 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 -->
INVENT_TYPE as "inventType", <!-- 存货类型 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_NAME as "inventName", <!-- 存货名称 -->
SPEC_ID as "specId", <!-- 规格ID -->
SPEC as "spec", <!-- 规格 -->
MATERIAL as "material", <!-- 材质 -->
UNIT as "unit", <!-- 单位 -->
LENGTH as "length", <!-- 长度 -->
WIDTH as "width", <!-- 宽度 -->
THICK as "thick", <!-- 厚度 -->
INV_QTY as "consQuantity", <!-- 库存数量 -->
INV_UNIT_WEIGHT as "consUnitWeight", <!-- 库存单重 -->
INV_WEIGHT as "consWeight", <!-- 库存重量 -->
FACTORY_CODE as "factoryCode", <!-- 厂区编码 -->
FACTORY_NAME as "factoryName" <!-- 厂区名称 -->
</sql>
<sql id="condition">
<include refid="HGXSDataAuth.authCondition"/>
<include refid="idCondition"/>
<include refid="customCondition"/>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</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="inventType">
INVENT_TYPE = #inventType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE LIKE CONCAT('%',#inventCode#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME LIKE CONCAT('%',#inventName#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="specId">
SPEC_ID = #specId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="spec">
SPEC LIKE CONCAT(#spec#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="material">
MATERIAL = #material#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unit">
UNIT = #unit#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCode">
FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryName">
FACTORY_NAME = #factoryName#
</isNotEmpty>
</sql>
<sql id="idCondition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="ids">
ID IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="specIds">
SPEC_ID NOT IN <iterate close=")" open="(" conjunction="," property="specIds">#specIds[]#</iterate>
</isNotEmpty>
</sql>
<sql id="customCondition">
<include refid="BaseCondition.specCondition"/>
<include refid="BaseCondition.createdTimeCondition"/>
</sql>
<sql id="orderBy">
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID DESC
</isEmpty>
</dynamic>
</sql>
<select id="query" resultClass="com.baosight.hggp.hg.yx.domain.HGYX001C">
SELECT
<include refid="column"/>
FROM ${hggpSchema}.HGKC010
WHERE 1=1
<include refid="condition"/>
<include refid="orderBy"/>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGKC010 WHERE 1=1
<include refid="condition"/>
</select>
<insert id="insert">
INSERT INTO ${hggpSchema}.HGKC010 (
ACCOUNT_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 -->
UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
DELETE_FLAG, <!-- 0-未删除,1-已删除 -->
COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 -->
WH_CODE, <!-- 仓库编码 -->
WH_NAME, <!-- 仓库名称 -->
INVENT_TYPE, <!-- 存货类型 -->
INVENT_CODE, <!-- 存货编码 -->
INVENT_NAME, <!-- 存货名称 -->
SPEC_ID, <!-- 规格ID -->
SPEC, <!-- 规格 -->
MATERIAL, <!-- 材质 -->
UNIT, <!-- 单位 -->
LENGTH, <!-- 长度 -->
WIDTH, <!-- 宽度 -->
THICK, <!-- 厚度 -->
INV_QTY, <!-- 库存数量 -->
INV_UNIT_WEIGHT, <!-- 库存单重 -->
INV_WEIGHT, <!-- 库存重量 -->
FACTORY_CODE, <!-- 厂区编码 -->
FACTORY_NAME <!-- 厂区名称 -->
) VALUES (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #companyCode#,
#companyName#, #whCode#, #whName#, #inventType#, #inventCode#,
#inventName#, #specId#, #spec#, #material#, #unit#, #length#, #width#,
#thick#, #consQuantity#, #invUnitWeight#, #consWeight#, #factoryCode#, #factoryName#
)
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGKC010 WHERE ID = #id#
</delete>
<!-- 锁 -->
<update id="lock">
UPDATE ${hggpSchema}.HGKC010
SET CREATED_TIME = CREATED_TIME
WHERE 1=1
AND ACCOUNT_CODE = #accountCode#
AND COMPANY_CODE = #companyCode#
AND WH_CODE = #whCode#
AND INVENT_CODE = #inventCode#
AND SPEC_ID = #specId#
</update>
<!-- 锁 -->
<update id="locks">
UPDATE ${hggpSchema}.HGKC010
SET CREATED_TIME = CREATED_TIME
WHERE 1=1
<include refid="idCondition"/>
</update>
<!-- 更新库存 -->
<update id="updateInv">
UPDATE ${hggpSchema}.HGKC010
SET
INV_QTY = #consQuantity#, <!-- 库存数量 -->
INV_UNIT_WEIGHT = #invUnitWeight#, <!-- 库存单重 -->
INV_WEIGHT = #consWeight# <!-- 库存重量 -->
WHERE ID = #id#
</update>
<!--仓库公司下拉框-->
<select id="queryWhCodeBox" resultClass="java.util.HashMap">
SELECT distinct
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName" <!-- 仓库名称 -->
FROM ${hggpSchema}.HGKC010
WHERE 1=1
<include refid="condition"/>
</select>
<!--存货名称下拉框-->
<select id="queryInventCodeBox" resultClass="java.util.HashMap">
SELECT distinct
INVENT_TYPE as "inventType", <!-- 存货类型 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_NAME as "inventName", <!-- 存货名称 -->
SPEC_ID as "specId" <!-- 规格ID -->
FROM ${hggpSchema}.HGKC010
WHERE 1=1
<include refid="condition"/>
</select>
<!--规格下拉框-->
<select id="querySpecIdBox" resultClass="java.util.HashMap">
SELECT distinct
SPEC_ID as "specId", <!-- 规格ID -->
SPEC as "spec", <!-- 规格 -->
LENGTH as "length", <!-- 长度 -->
WIDTH as "width", <!-- 宽度 -->
THICK as "thick", <!-- 厚度 -->
INV_QTY as "consQuantity", <!-- 库存数量 -->
INV_UNIT_WEIGHT as "invUnitWeight", <!-- 库存单重 -->
INV_WEIGHT as "consWeight" <!-- 库存重量 -->
FROM ${hggpSchema}.HGKC010
WHERE 1=1
<include refid="condition"/>
</select>
</sqlMap>
package com.baosight.hggp.hg.yx.tools;
import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.hg.sj.domain.HGSJ001;
import com.baosight.hggp.hg.yx.domain.HGYX001;
import com.baosight.hggp.hg.yx.domain.HGYX001A;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.MapUtils;
import org.apache.commons.collections.CollectionUtils;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/6/4
*/
public class HGYXTools {
/**
* Hgyx001公共DAO方法定义
*/
public static class Hgyx001 {
public static HGYX001 getId(Long id){
HGYX001 hgyx001 = new HGYX001();
AssertUtils.isNull(id, "销售发货ID不能为空!");
Object object = DaoBase.getInstance().get(HGYX001.QUERY,HGYX001.FIELD_ID, id);
AssertUtils.isNull(object, "销售发货不存在!");
hgyx001.fromMap(MapUtils.toMap(object));
return hgyx001;
}
public static List<HGYX001> list(Map params){
List<HGYX001> hgyx001s = DaoBase.getInstance().query(HGYX001.QUERY, params);
AssertUtils.isNull(hgyx001s, "销售发货不存在!");
return hgyx001s;
}
public static List<HGYX001> list(List<Long> ids){
AssertUtils.isNull(ids, "销售发货ID不能为空!");
Map params = new HashMap<>();
params.put("ids", ids);
List<HGYX001> hgyx001s = DaoBase.getInstance().query(HGYX001.QUERY, params);
AssertUtils.isEmpty(hgyx001s, "销售发货不存在!");
return hgyx001s;
}
public static List<HGYX001A> getParentId(Long parentId){
AssertUtils.isNull(parentId, "销售发货ID不能为空!");
Map params = new HashMap<>();
params.put("parentId", parentId);
List<HGYX001A> hgyx001As = DaoBase.getInstance().query(HGYX001A.QUERY, params);
AssertUtils.isEmpty(hgyx001As, "销售发货详情不存在!");
return hgyx001As;
}
}
}
...@@ -29,8 +29,8 @@ ...@@ -29,8 +29,8 @@
<sqlMap resource="com/baosight/hggp/hg/kc/sql/HGKC004A.xml"/> <sqlMap resource="com/baosight/hggp/hg/kc/sql/HGKC004A.xml"/>
<sqlMap resource="com/baosight/hggp/hg/kc/sql/HGKC010.xml"/> <sqlMap resource="com/baosight/hggp/hg/kc/sql/HGKC010.xml"/>
<sqlMap resource="com/baosight/hggp/hg/kc/sql/HGKC011.xml"/> <sqlMap resource="com/baosight/hggp/hg/kc/sql/HGKC011.xml"/>
<!-- <sqlMap resource="com/baosight/hggp/hg/kc/sql/HGKC013.xml"/>--> <sqlMap resource="com/baosight/hggp/hg/kc/sql/HGKC013.xml"/>
<!-- <sqlMap resource="com/baosight/hggp/hg/kc/sql/HGKC013A.xml"/>--> <sqlMap resource="com/baosight/hggp/hg/kc/sql/HGKC013A.xml"/>
<!-- 质量 --> <!-- 质量 -->
<sqlMap resource="com/baosight/hggp/hg/zl/sql/HGZL001.xml"/> <sqlMap resource="com/baosight/hggp/hg/zl/sql/HGZL001.xml"/>
<!-- 生产 --> <!-- 生产 -->
...@@ -62,4 +62,9 @@ ...@@ -62,4 +62,9 @@
<!--配置--> <!--配置-->
<sqlMap resource="com/baosight/hggp/hg/pz/sql/HGPZ005A.xml"/> <sqlMap resource="com/baosight/hggp/hg/pz/sql/HGPZ005A.xml"/>
<!--销售-->
<sqlMap resource="com/baosight/hggp/hg/yx/sql/HGYX001.xml"/>
<sqlMap resource="com/baosight/hggp/hg/yx/sql/HGYX001A.xml"/>
<sqlMap resource="com/baosight/hggp/hg/yx/sql/HGYX001C.xml"/>
</sqlMapConfig> </sqlMapConfig>
...@@ -36,7 +36,8 @@ ...@@ -36,7 +36,8 @@
<EF:EFColumn cname="统一社会信用代码" ename="taxRegisterCode" align="center" width="200" /> <EF:EFColumn cname="统一社会信用代码" ename="taxRegisterCode" align="center" width="200" />
<EF:EFColumn cname="开户银行" ename="openBankName" align="center" width="200" /> <EF:EFColumn cname="开户银行" ename="openBankName" align="center" width="200" />
<EF:EFColumn cname="银行账号" ename="accountNum" align="center" width="200" /> <EF:EFColumn cname="银行账号" ename="accountNum" align="center" width="200" />
<EF:EFColumn cname="地址" ename="docIdPc" align="center" width="200" /> <EF:EFColumn cname="地址" ename="address" align="center" width="200" />
<EF:EFColumn cname="收货地址" ename="putAddress" align="center" width="200" />
<EF:EFColumn cname="联系人" ename="headName" align="center" width="200" /> <EF:EFColumn cname="联系人" ename="headName" align="center" width="200" />
<EF:EFColumn cname="电话" ename="phoneName" align="center" width="200" <EF:EFColumn cname="电话" ename="phoneName" align="center" width="200"
data-rules="mobile_phone"/> data-rules="mobile_phone"/>
......
$(function () {
$(".row").children().attr("class", "col-md-3");
var companyCode = __eiInfo.get("companyCode");
var companyCodeBox = __eiInfo.getBlock("companyBox_block_id").getMappedRows();
var whCodeBox = __eiInfo.getBlock("wh_record_box_block_id").getMappedRows();
IPLATUI.EFGrid = {
"result": {
columns: [{
field: "operator",
title: "操作",
template: function (item) {
let auditStatus = item.status;
let template = '';
if (!isBlank(item.id)){
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showDetail(' + item.id + ')" >发货详情</a>';
/*if (auditStatus == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="updateStatus(' + item.id + ',1)" >审核</a>';
} else if (auditStatus == -1) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="updateStatus(' + item.id + ',0)" >撤回</a>';
}*/
}
return template;
}
}, {
field: "consCode",
title: "发货方",
filter: function (options) {
if (companyCode){
return _.filter(options.values, function (item) {
return item["valueField"]===companyCode;
})
}
return options.values;
},
template: function (item) {
let calloutCompanyCode = item["consCode"];
for (let i = 0; i < companyCodeBox.length; i++) {
if (calloutCompanyCode === companyCodeBox[i]['valueField']) {
item['consName'] = companyCodeBox[i]['textField'];
return companyCodeBox[i]['textField'];
}
}
return calloutCompanyCode;
}
}, {
field: "consWhCode",
title: "发货仓库",
filter: function (options) {
let calloutCompanyCode = options.model["consWhCode"];
if (calloutCompanyCode){
return _.filter(whCodeBox, function (item) {
return item["param1Field"]===calloutCompanyCode;
})
}
return options.values;
},
template: function (item) {
let calloutWhCode = item['consWhCode'];
for (let i = 0; i < whCodeBox.length; i++) {
if (calloutWhCode === whCodeBox[i]['valueField']) {
item['consWhName'] = whCodeBox[i]['textField'];
return whCodeBox[i]['textField'];
}
}
return calloutWhCode;
}
}],
loadComplete: function (grid) {
// 此 grid 对象
// 新增
$("#add").on("click",add);
//修改
$("#BNT_MODIFY").on("click", update);
//删除
$("#BNT_REMOVE").on("click", remove);
//提交
$("#BNT_COMMIT").on("click", commit);
},
onAdd: function(e) {
e.preventDefault();
},
onSave: function (e) {
// 阻止后台保存请求,使用自定义保存
e.preventDefault();
save();
},
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'delete' ||e.eiInfo.extAttr.methodName == 'save'){
query();
}
}
},
}
// 查询
$("#QUERY").on("click", query);
downKeyUp();
// 导出打印
//$("#PRINT").on("click", exportPrint);
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
let save = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
$.each(rows, function(index, item) {
//let companyCode= item.get("companyCode");
let allotType= item.get("allotType");
let receiptDate= item.get("receiptDate");
let calloutCompanyCode= item.get("calloutCompanyCode");
let calloutWhCode= item.get("calloutWhCode");
let callinCompanyCode= item.get("callinCompanyCode");
let callinWhCode= item.get("callinWhCode");
/*if(isBlank(companyCode)){
message("选中的第"+(index+1)+"行\"公司名称\",不能为空!");
flag = false;
return false;
}*/
if(isBlank(allotType)){
message("选中的第"+(index+1)+"行\"调拨类型\",不能为空!");
flag = false;
return false;
}
if(isBlank(receiptDate)){
message("选中的第"+(index+1)+"行\"单据日期\",不能为空!");
flag = false;
return false;
}
if(isBlank(calloutCompanyCode)){
message("选中的第" + (i + 1) + "行\"调出公司名称\",不能为空!");
flag = false;
return false;
}
if(isBlank(calloutWhCode)){
message("选中的第" + (i + 1) + "行\"调出仓库名称\",不能为空!");
flag = false;
return false;
}
if(isBlank(callinCompanyCode)){
message("选中的第" + (i + 1) + "行\"调入公司名称\",不能为空!");
flag = false;
return false;
}
if(isBlank(callinWhCode)){
message("选中的第" + (i + 1) + "行\"调入仓库名称\",不能为空!");
flag = false;
return false;
}
});
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGKC013", "save", true);
}
});
}
}
function updateStatus(id,deviceStatus) {
JSUtils.confirm("确定是否\"提交\"操作? ", {
ok: function () {
let inEiInfo = new EiInfo();
inEiInfo.set("result-0-id", id);
inEiInfo.set("result-0-status", deviceStatus);
EiCommunicator.send('HGKC013', 'updateStatus', inEiInfo, {
onSuccess(response) {
if (response.status == 1){
NotificationUtil(response.msg);
query();
}else {
NotificationUtil(response.msg, "error");
}
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
}
)
}
});
}
/**
* 显示详情
*/
function showDetail(id) {
JSColorbox.open({
href: "HGYX001B?methodName=initLoad&inqu_status-0-parentId=" + id,
title: "<div style='text-align: center;'>发货详情</div>",
width: "80%",
height: "80%",
callbackName: windowCallback
});
}
function add() {
JSColorbox.open({
href: "HGYX001A?methodName=initLoad",
title: "<div style='text-align: center;'>新增销售发货</div>",
width: "80%",
height: "80%",
callbackName: windowCallback
});
}
function update() {
let rows = resultGrid.getCheckedRows()
if (rows.length < 1||rows.length > 1) {
message2("修改","请选择一条需要修改的数据");
return;
}
if(rows[0].status>0){
message2("修改","销售发货已审核不可修改!");
return;
}
let id = rows[0].id;
JSColorbox.open({
href: "HGYX001A??methodName=initLoad&inqu_status-0-parentId=" + id + "&efParentFormEname=HGYX001",
title: "<div style='text-align: center;'>修改销售发货</div>",
width: "80%",
height: "80%",
callbackName: windowCallback
});
}
function remove() {
let rows = resultGrid.getCheckedRows()
if (rows.length < 1) {
message2("删除","没有选中的行");
return;
}
let flag = true;
$.each(rows, function(index, item) {
if(item.status > 0){
message2("审核","销售出库已审核不可删除!");
flag = false;
return false;
}
});
if(flag) {
IPLAT.confirm({ title: '删除', message: '确认删除此数据么?',
okFn: function () {
var post = new EiInfo();
post.addBlock(resultGrid.getCheckedBlockData());
EiCommunicator.send("HGYX001", "delete", post, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
NotificationUtil(ei);
resultGrid.dataSource.query();
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
});
}
});
}
}
function commit() {
let rows = resultGrid.getCheckedRows()
if (rows.length < 1) {
message2("提交","没有选中的行");
return;
}
let flag = true;
$.each(rows, function(index, item) {
//let companyCode= item.get("companyCode");
let status= item.get("status");
if(status > 0){
message2("提交","销售发货已审核不可重复提交!");
flag = false;
return false;
}
});
if (flag){
IPLAT.confirm({
title:'提交',
message:'确认提交此数据么?',
okFn:function () {
var post = new EiInfo();
post.addBlock(resultGrid.getCheckedBlockData());
post.set("recursion", true);
EiCommunicator.send("HGYX001","commit",post,{
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
NotificationUtil(ei);
resultGrid.dataSource.query();
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
});
}
})
}
}
function windowCallback(ei) {
if (ei.getStatus() >= 0) {
// 刷新列表
resultGrid.dataSource.page(1);
// 关闭弹窗
JSColorbox.close();
}
}
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/6/4
Time: 10:45
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="销售发货">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="projName" cname="项目名称" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="deliveryCode" cname="发货单号" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="outboundCode" cname="出库单号" placeholder="模糊查询" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="tranType" cname="运输方式" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.hgyx.tranType"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="numPlate" cname="车牌号" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="consName" cname="发货方" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="receName" cname="收货方" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="consWhName" cname="发货仓库" placeholder="模糊查询" colWidth="3"/>
<%--<EF:EFSelect blockId="inqu_status" row="0" ename="consWhName" cname="发货仓库" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="wh_record_box_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.hgsb.approveStatus" condition="ITEM_CODE IN ('0','1')"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row" copyToAdd="false">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFComboColumn ename="companyCode" enable="true" cname="公司名称" width="110" align="center"
filter="contains" readonly="true" required="true">
<EF:EFOptions blockId="companyBox_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="projCode" enable="true" cname="项目名称" width="110" align="center"
filter="contains" readonly="true" required="true">
<EF:EFOptions blockId="proj_record_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="deliveryCode" cname="发货单号" enable="false" width="120" align="center"/>
<EF:EFColumn ename="outboundCode" cname="出库单号" enable="false" width="120" align="center"/>
<EF:EFComboColumn ename="consCode" enable="true" cname="发货方" width="110" align="center"
filter="contains" readonly="true" required="true">
<EF:EFOptions blockId="companyBox_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="receCode" enable="true" cname="收货方" width="110" align="center"
filter="contains" readonly="true" required="true">
<EF:EFOptions blockId="customer_record_all_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="receAddr" cname="收货地址" width="120" align="center"/>
<EF:EFColumn ename="receUserPhone" cname="收货人电话" width="120" align="center" data-rules="mobile_phone"/>
<EF:EFComboColumn ename="tranType" cname="运输方式" width="80" align="center" enable="true" required="true">
<EF:EFCodeOption codeName="hggp.hgyx.tranType"/>
</EF:EFComboColumn>
<EF:EFColumn ename="numPlate" cname="车牌号" width="120" align="center"/>
<EF:EFComboColumn ename="consWhCode" cname="发货仓库" enable="true" width="120" align="center" required="true"
blockName="wh_record_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#">
</EF:EFComboColumn>
<EF:EFColumn ename="consAddr" cname="发货地址" hidden="true" width="120" align="center"/>
<EF:EFColumn ename="consQuantity" cname="发货数量" width="120" align="center" format="{0:N0}" data-rules="number"/>
<EF:EFColumn ename="consWeight" cname="发货重量" width="120" align="center" format="{0:N3}" data-rules="number"/>
<EF:EFComboColumn ename="status" cname="审核状态" width="80" align="center" enable="false" defaultValue="0" required="true">
<EF:EFCodeOption codeName="hggp.hgsb.approveStatus" condition="ITEM_CODE IN ('0','1')"/>
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
$(function() {
/*$(".row").children().attr("class", "col-md-3");*/
var companyBox = __eiInfo.getBlock("companyBox_block_id").getMappedRows();
var projRecordBox = __eiInfo.getBlock("proj_record_block_id").getMappedRows();
var inventTypeBox = __eiInfo.getBlock("invent_type_box_block_id").getMappedRows();
var inventCodedBox = __eiInfo.getBlock("invent_code_box_block_id").getMappedRows();
var specIdBox = __eiInfo.getBlock("spec_box_block_id").getMappedRows();
var customerAllBox = __eiInfo.getBlock("customer_record_all_block_id").getMappedRows();
var whRecordBox = __eiInfo.getBlock("wh_record_box_block_id").getMappedRows();
// 查询
$("#QUERY").on("click", query);
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 10,
pageSizes: [10, 20, 30, 50, 100, 200]
},
columns: [{
field: "inventType",
filter: function (options) {
return _.filter(inventTypeBox, function (item) {
return item["param1Field"]=="true";
})
},
editor: function (container, options) {
this.filter(options);
}
}, {
field: "inventCode",
title: "存货名称",
filter: function (options) {
let inventType = options.model["inventType"];
if (inventType){
return _.filter(inventCodedBox, function (item) {
return item["param1Field"] === inventType;
})
}
return options.values;
},
template: function (dataItem) {
for (let i = 0; i < inventCodedBox.length; i++) {
if (inventCodedBox[i]['valueField'] === dataItem['inventCode']){
dataItem['inventName'] = inventCodedBox[i]['textField']
dataItem['inventRecordId'] = inventCodedBox[i]['param2Field'];
return inventCodedBox[i]['textField'];
}
}
return dataItem["inventCode"];
}
}, {
field: "spec",
filter: function (options) {
let specId = options.model["inventRecordId"];
if (specId){
return _.filter(specIdBox, function (item) {
return item["param7Field"] === specId;
})
}
return options.values;
},
template: function (item) {
return $.trim(item.spec) == "" ? "" : item.spec;
}
}, {
field: "length",
template: function (item) {
return item.length == 0 ? "-" : item.length;
}
}, {
field: "width",
template: function (item) {
return item.width == 0 ? "-" : item.width;
}
}, {
field: "thick",
template: function (item) {
return item.thick == 0 ? "-" : item.thick;
}
}],
loadComplete: function(grid) {
// 此 grid 对象
// 处理父子级联动,通过监听 change 事件,判断父级节点是否发生变化
grid.dataSource.bind("change", function(e) {
// 判断父级节点是否发生变化
if (e.field === "quantity"){
for (let i = 0; i < e.items.length; i++) {
let quantity = e.items[i]["quantity"];
let unitWeight = e.items[i]["unitWeight"];
let weight = quantity*unitWeight;
resultGrid.setCellValue(e.items[i],"weight",weight);
$("#inqu_status-0-consQuantity_textField").val(quantity)
$("#inqu_status-0-consQuantity").val(quantity)
$("#inqu_status-0-consWeight_textField").val(weight)
$("#inqu_status-0-consWeight").val(weight)
}
}
});
},
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'save'
||e.eiInfo.extAttr.methodName == 'delete' ){
query();
}
},
onSave: function (e) {
// 阻止后台保存请求,使用自定义保存
e.preventDefault();
save();
},
onDelete: function(e) {
e.preventDefault();
resultGrid.removeRows(resultGrid.getCheckedRowsIndex())
},
}
$("#inqu_status-0-projCode").change(function () {
let projCode = $("#inqu_status-0-projCode");
let textField = IPLAT.EFSelect.text(projCode);
let valueField = IPLAT.EFSelect.value(projCode);
$("#inqu_status-0-projName").val(textField);
let proj = _.filter(projRecordBox, function (item) {
return item["valueField"] === valueField;
})
let whRecord = _.filter(whRecordBox, function (item) {
return item["param1Field"] === proj[0]["param1Field"];
})
IPLAT.EFSelect.setDataSource($("#inqu_status-0-consWhCode"),whRecord);
let company = _.filter(companyBox, function (item) {
return item["valueField"] === proj[0]["param1Field"];
})
IPLAT.EFSelect.setDataSource($("#inqu_status-0-consCode"),company);
})
$("#inqu_status-0-consCode").change(function () {
let consCode = $("#inqu_status-0-consCode")
let textField = IPLAT.EFSelect.text(consCode);
let valueField = IPLAT.EFSelect.value(consCode);
$("#inqu_status-0-consName").val(textField);
let whRecord = _.filter(whRecordBox, function (item) {
return item["param1Field"] === valueField;
})
IPLAT.EFSelect.setDataSource($("#inqu_status-0-consWhCode"),whRecord);
});
$("#inqu_status-0-consWhCode").change(function () {
let textField = IPLAT.EFSelect.text($("#inqu_status-0-consWhCode"));
$("#inqu_status-0-consWhName").val(textField);
});
$("#inqu_status-0-receCode").change(function () {
let valueField = IPLAT.EFSelect.value($("#inqu_status-0-receCode"));
for (let i = 0; i < customerAllBox.length; i++) {
if (customerAllBox[i]["valueField"] === valueField){
$("#inqu_status-0-receName").val(customerAllBox[i]["textField"]);
$("#inqu_status-0-receUserPhone").val(isBlank(customerAllBox[i]["param1Field"].trim())?"":customerAllBox[i]["param1Field"]);
$("#inqu_status-0-receAddr").val(isBlank(customerAllBox[i]["param2Field"].trim())?"":customerAllBox[i]["param2Field"]);
}
}
});
/**
* 取消
*/
$('#cancel').on('click', function () {
// 关闭弹窗
parent.JSColorbox.close();
});
/**
* 选择明细
*/
$("#BNT_CHOICE").on("click", detail);
/**
* 保存
*/
$("#btn_save").on("click",function(){
let flag = true;
var validator1 = IPLAT.Validator({
id: "inqu"
});
// 点击按钮后校验
if (!validator1.validate()) {
var errorMsg = validator1.errors().toString();
var errs = errorMsg.split(',');
IPLAT.alert({
message: '<b>错误:<br>' + errs.join('<br>') + '</b>',
okFn: function (e) {
},
title: '错误'
});
return false;
}
let rows = resultGrid.getDataItems();
if (rows.length < 1) {
message("明细信息不能为空,请选择数据");
flag = false;
return false;
}
if(flag) {
JSUtils.confirm("确定对数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGrid("result", "HGYX001", "save", {
isAlldata: true,
onSuccessCallback: parent.windowCallback
});
}
});
}
});
/**
* 保存并审核提交
*/
$("#btn_save_status").on("click",function(){
let flag = true;
var validator1 = IPLAT.Validator({
id: "inqu"
});
// 点击按钮后校验
if (!validator1.validate()) {
var errorMsg = validator1.errors().toString();
var errs = errorMsg.split(',');
IPLAT.alert({
message: '<b>错误:<br>' + errs.join('<br>') + '</b>',
okFn: function (e) {
},
title: '错误'
});
return false;
}
let rows = resultGrid.getDataItems();
if (rows.length < 1) {
message("明细信息不能为空,请选择数据");
flag = false;
return false;
}
if(flag) {
JSUtils.confirm("确定对数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGrid("result", "HGYX001", "saveStatus", {
isAlldata: true,
onSuccessCallback: parent.windowCallback
});
}
});
}
})
downKeyUp();
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
//query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 保存
*/
let save = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
$.each(rows, function(index, item) {
let inventType= item.get("inventType");
let inventCode= item.get("inventCode");
let spec= item.get("spec");
let quantity= item.get("quantity");
let unitWeight= item.get("unitWeight");
let weight= item.get("weight");
if(isBlank(inventType)){
message("选中的第" + (index + 1) + "行\"存货类型\",不能为空!");
flag = false;
return false;
}
if(isBlank(inventCode)){
message("选中的第" + (index + 1) + "行\"存货编码\",不能为空!");
flag = false;
return false;
}
if(isBlank(spec)){
message("选中的第" + (index + 1) + "行\"规格\",不能为空!");
flag = false;
return false;
}
if(isBlank(quantity) || parseInt(quantity) <= 0){
message("选中的第" + (index + 1) + "行\"数量\",必须是数值并且数量必须大于0!");
flag = false;
return false;
}
/*if(isBlank(unitWeight) || parseFloat(unitWeight) <= 0){
message("选中的第" + (index + 1) + "行\"单重\",必须是数值并且数量必须大于0!");
flag = false;
return false;
}
if(isBlank(weight)){
message("选中的第" + (index + 1) + "行\"重量\",必须是数值!");
flag = false;
return false;
}*/
});
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGKC013A", "save", true);
}
});
}
}
/**
* 删除
*/
let deleteFunc = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGKC004A", "delete", true);
}
});
}
function detail() {
let ids = [];
let rows = resultGrid.getDataItems();
$.each(rows, function(index, item) {
ids.push(item.inventRecordId)
});
JSColorbox.open({
href: "HGYX001C?methodName=initLoad&inqu_status-0-companyCode="+$("#inqu_status-0-consCode").val()+"&inqu_status-0-whCode="+$("#inqu_status-0-consWhCode").val()+"&inqu_status-0-specIds="+ids.join(','),
title: "<div style='text-align: center;'>选择发货明细</div>",
width: "90%",
height: "80%",
callbackName: detailCallback
});
}
function detailCallback(result) {
let consQuantity = 0;
let consWeight = 0;
let rows = resultGrid.getDataItems();
if (result.length> 0) {
for (let i = 0; i < result.length; i++) {
let specId = rows.filter(row => row.inventRecordId == result[i].specId)
if (specId.length > 0){
message("无法重复添加!");
return false;
}
result[i].quantity = result[i].consQuantity;
result[i].unitWeight = result[i].consUnitWeight;
result[i].weight = result[i].consWeight;
resultGrid.addRows(result[i]);
}
}
rows = resultGrid.getDataItems();
for (let i = 0; i < rows.length; i++) {
consQuantity += parseInt(rows[i].quantity);
consWeight += parseFloat(rows[i].weight);
}
//获取显示框的值
$("#inqu_status-0-consQuantity_textField").val(consQuantity)
$("#inqu_status-0-consQuantity").val(consQuantity)
$("#inqu_status-0-consWeight_textField").val(consWeight)
$("#inqu_status-0-consWeight").val(consWeight)
}
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/6/4
Time: 10:46
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="销售发货">
<EF:EFRegion id="inqu" title="发货信息">
<div class="row">
<EF:EFInput blockId="inqu_status" row="0" ename="id" cname="ID" type="hidden" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="companyCode" cname="公司编码" type="hidden" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="companyName" cname="公司名称" type="hidden" required="true" disabled="true" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="projCode" cname="项目名称" required="true" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="proj_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="projName" cname="项目名称" type="hidden" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="deliveryCode" cname="发货单号" disabled="true" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="outboundCode" cname="出库单号" disabled="true" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="status" cname="审核状态" colWidth="3" disabled="true" filter="contains" value="0">
<EF:EFCodeOption codeName="hggp.hgsb.approveStatus" condition="ITEM_CODE IN ('0','1')"/>
</EF:EFSelect>
</div>
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="consCode" cname="发货方" required="true" colWidth="3" filter="contains">
<EF:EFOption label="请选择" value=""/>
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="consName" type="hidden" cname="发货方名称" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="consWhCode" cname="发货仓库" required="true" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="wh_record_box_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="consWhName" type="hidden" cname="发货仓库名称" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="consAddr" cname="发货地址" placeholder="请输入发货地址" required="true" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="receCode" cname="收货方" required="true" colWidth="3" filter="contains">
<EF:EFOption label="请选择" value=""/>
<EF:EFOptions blockId="customer_record_all_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="receName" type="hidden" cname="收货方名称" colWidth="3"/>
</div>
<div class="row">
<EF:EFInput blockId="inqu_status" row="0" ename="receAddr" cname="收货地址" placeholder="请输入收货地址" required="true" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="receUserPhone" cname="收货人电话" required="true" data-rules="mobile_phone" placeholder="请输入电话号码" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="tranType" cname="运输方式" required="true" placeholder="请选择运输方式" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.hgyx.tranType"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="numPlate" cname="车牌号" placeholder="请输入车牌号" colWidth="3"/>
</div>
<div class="row">
<EF:EFInput blockId="inqu_status" row="0" ename="consQuantity" cname="发货数量" format="{0:N0}"
required="true" colWidth="3" disabled="true"
data-regex="/^-?[0-9]{1,15}?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数"/>
<EF:EFInput blockId="inqu_status" row="0" ename="consWeight" cname="发货重量" format="{0:N3}"
required="true" colWidth="3" disabled="true"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" enable="true" width="120" align="center" required="true"
blockName="invent_type_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFComboColumn ename="inventCode" cname="存货名称" enable="true" width="120" align="center" required="true"
blockName="invent_code_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFComboColumn ename="spec" cname="规格" enable="true" width="120" align="center" required="true"
blockName="spec_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFColumn ename="inventRecordId" cname="规格ID" width="120" enable="true" readonly="true" align="center" hidden="true" maxLength="50"/>
<EF:EFColumn ename="length" cname="长度(MM)" enable="true" readonly="false" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="width" cname="宽度(MM)" enable="true" readonly="false" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="thick" cname="厚度(MM)" enable="true" readonly="false" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="quantity" cname="数量" width="120" enable="true" format="{0:N0}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="unitWeight" cname="单重" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="weight" cname="重量" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
</EF:EFGrid>
</EF:EFRegion>
<div class="row" style="display:flex;justify-content:center;">
<EF:EFButton ename="btn_save" cname="保存" type="button" class="btn-center"/>
<EF:EFButton ename="btn_save_status" cname="保存&提交审核" type="button" class="btn-center"/>
<EF:EFButton ename="cancel" cname="取消" type="button" class="btn-center"/>
</div>
</EF:EFPage>
\ No newline at end of file
$(function () {
$(".row").children().attr("class", "col-md-3");
var inventTypeBox = __eiInfo.getBlock("invent_type_box_block_id").getMappedRows();
var inventCodedBox = __eiInfo.getBlock("invent_code_box_block_id").getMappedRows();
var specIdBox = __eiInfo.getBlock("spec_box_block_id").getMappedRows();
// 查询
$("#QUERY").on("click", query);
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 10,
pageSizes: [10, 20, 30, 50, 100, 200]
},
columns: [],
loadComplete: function(grid) {
// 此 grid 对象
// 处理父子级联动,通过监听 change 事件,判断父级节点是否发生变化
grid.dataSource.bind("change", function(e) {
// 判断父级节点是否发生变化
if (e.field === "spec"){
for (let i = 0; i < specIdBox.length; i++) {
if (specIdBox[i]['param7Field'] === e.items[0]["inventRecordId"]){
e.items[0]["length"] = specIdBox[i]['param1Field'];
e.items[0]["width"] = specIdBox[i]['param2Field'];
e.items[0]["thick"] = specIdBox[i]['param3Field'];
e.items[0]["quantity"] = specIdBox[i]['param4Field'];
resultGrid.setCellValue(e.items[0],"unitWeight",specIdBox[i]['param5Field']);
resultGrid.setCellValue(e.items[0],"weight",specIdBox[i]['param6Field']);
//e.items[0]["unitWeight"] = specIdBox[i]['param5Field'];
//e.items[0]["weight"] = specIdBox[i]['param6Field'];
}
}
loadChange(grid,e,"length");
loadChange(grid,e,"width");
loadChange(grid,e,"thick");
//loadChange(grid,e,"unitWeight");
//loadChange(grid,e,"weight");
loadChange(grid,e,"quantity");
}else if (e.field === "quantity"){
if (e.items[0].quantity != 0 && e.items[0].unitWeight > 0){
e.items[0].weight = e.items[0].unitWeight*e.items[0].quantity;
resultGrid.setCellValue(e.items[0],"weight",e.items[0].unitWeight*e.items[0].quantity);
}
}else if (e.field === "inventCode"){
loadChange(grid,e,"spec");
}
});
},
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'save'
||e.eiInfo.extAttr.methodName == 'delete' ){
query();
}
},
onSave: function (e) {
// 阻止后台保存请求,使用自定义保存
e.preventDefault();
save();
},
onDelete: function (e) {
// 阻止后台删除请求,使用自定义删除
//e.preventDefault();
//deleteFunc();
}
}
})
let query = function () {
resultGrid.dataSource.page(1);
}
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/6/4
Time: 14:56
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="销售发货">
<EF:EFRegion id="inqu" title="发货信息">
<div class="row">
<EF:EFInput blockId="inqu_status" row="0" ename="id" cname="ID" type="hidden" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="companyCode" cname="公司编码" type="hidden" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="companyName" cname="公司名称" type="hidden" required="true" disabled="true" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="projCode" cname="项目名称" required="true" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="proj_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="projName" cname="项目名称" type="hidden" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="deliveryCode" cname="发货单号" disabled="true" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="outboundCode" cname="出库单号" disabled="true" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="status" cname="审核状态" colWidth="3" disabled="true" filter="contains" value="0">
<EF:EFCodeOption codeName="hggp.hgsb.approveStatus" condition="ITEM_CODE IN ('0','1')"/>
</EF:EFSelect>
</div>
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="consCode" cname="发货方" required="true" colWidth="3" filter="contains">
<EF:EFOption label="请选择" value=""/>
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="consName" type="hidden" cname="发货方名称" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="consWhCode" cname="发货仓库" required="true" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="wh_record_box_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="consWhName" type="hidden" cname="发货仓库名称" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="consAddr" cname="发货地址" placeholder="请输入发货地址" required="true" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="receCode" cname="收货方" required="true" colWidth="3" filter="contains">
<EF:EFOption label="请选择" value=""/>
<EF:EFOptions blockId="customer_record_all_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="receName" type="hidden" cname="收货方名称" colWidth="3"/>
</div>
<div class="row">
<EF:EFInput blockId="inqu_status" row="0" ename="receAddr" cname="收货地址" placeholder="请输入收货地址" required="true" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="receUserPhone" cname="收货人电话" required="true" data-rules="mobile_phone" placeholder="请输入电话号码" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="tranType" cname="运输方式" required="true" placeholder="请选择运输方式" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.hgyx.tranType"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="numPlate" cname="车牌号" placeholder="请输入车牌号" colWidth="3"/>
</div>
<div class="row">
<EF:EFInput blockId="inqu_status" row="0" ename="consQuantity" cname="发货数量" format="{0:N0}"
required="true" colWidth="3" disabled="true"
data-regex="/^-?[0-9]{1,15}?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数"/>
<EF:EFInput blockId="inqu_status" row="0" ename="consWeight" cname="发货重量" format="{0:N3}"
required="true" colWidth="3" disabled="true"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" enable="true" width="120" align="center" required="true"
blockName="invent_type_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFComboColumn ename="inventCode" cname="存货名称" enable="true" width="120" align="center" required="true"
blockName="invent_code_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFComboColumn ename="spec" cname="规格" enable="true" width="120" align="center" required="true"
blockName="spec_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFColumn ename="inventRecordId" cname="规格ID" width="120" enable="true" readonly="true" align="center" hidden="true" maxLength="50"/>
<EF:EFColumn ename="length" cname="长度(MM)" enable="true" readonly="false" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="width" cname="宽度(MM)" enable="true" readonly="false" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="thick" cname="厚度(MM)" enable="true" readonly="false" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="quantity" cname="数量" width="120" enable="true" format="{0:N0}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="unitWeight" cname="单重" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="weight" cname="重量" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
\ No newline at end of file
$(function () {
// 查询
$("#QUERY").on("click", query);
$("#BNT_CHOICE").on("click", choice)
})
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
let choice = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
parent.JSColorbox.setValueCallback(rows);
parent.JSColorbox.close();
}
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/6/4
Time: 22:28
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<script>
var ctx = "${ctx}";
</script>
<EF:EFPage title="发货明细">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFInput blockId="inqu_status" row="0" ename="inventName" cname="物料名称" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="spec" cname="规格" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" type="hidden" required="true" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="whCode" cname="仓库名称" type="hidden" required="true" colWidth="3"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" enable="true" width="120" align="center" required="true"
blockName="invent_type_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFComboColumn ename="inventCode" cname="存货名称" enable="true" width="120" align="center" required="true"
blockName="invent_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFComboColumn ename="spec" cname="规格" enable="true" width="120" align="center" required="true"
blockName="spec_name_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFColumn ename="inventRecordId" cname="规格ID" width="120" enable="true" readonly="true" align="center" hidden="true" maxLength="50"/>
<EF:EFColumn ename="length" cname="长度(MM)" enable="true" readonly="false" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="width" cname="宽度(MM)" enable="true" readonly="false" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="thick" cname="厚度(MM)" enable="true" readonly="false" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="consQuantity" cname="数量" width="120" enable="true" format="{0:N0}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,20}([.][0-9]{1,3})?$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="consUnitWeight" cname="单重" width="120" enable="true" format="{0:N0}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,20}([.][0-9]{1,3})?$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="consWeight" cname="重量" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
</EF:EFGrid>
</EF:EFRegion>
</EF: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