Commit 0a79818e by liuyang

2024-04-26 新增采购申请

parent aeda13b0
...@@ -82,6 +82,7 @@ public class HPCG001 extends DaoEPBase { ...@@ -82,6 +82,7 @@ public class HPCG001 extends DaoEPBase {
public static final String UPDATE = "HPCG001.update"; public static final String UPDATE = "HPCG001.update";
public static final String DELETE = "HPCG001.delete"; public static final String DELETE = "HPCG001.delete";
public static final String DELETE_FLAG = "HPCG001.deleteFlag"; public static final String DELETE_FLAG = "HPCG001.deleteFlag";
public static final String UPDATE_PRO_APPLY_STATUS = "HPCG001.updateProApplyStatus";
private Long id = new Long(0); /* 主键id*/ private Long id = new Long(0); /* 主键id*/
private String companyCode = " "; /* 企业编码 预留*/ private String companyCode = " "; /* 企业编码 预留*/
...@@ -96,13 +97,13 @@ public class HPCG001 extends DaoEPBase { ...@@ -96,13 +97,13 @@ public class HPCG001 extends DaoEPBase {
private String proApplyNo = " "; /* 采购单号*/ private String proApplyNo = " "; /* 采购单号*/
private String whCode = " "; /* 仓库编码*/ private String whCode = " "; /* 仓库编码*/
private String whName = " "; /* 仓库名称*/ private String whName = " "; /* 仓库名称*/
private String inventType = " "; /* 存货类型*/ private Integer inventType = 0; /* 存货类型*/
private String inventCode = " "; /* 存货编码*/ private String inventCode = " "; /* 存货编码*/
private String inventName = " "; /* 存货名称*/ private String inventName = " "; /* 存货名称*/
private Long inventRecordId = new Long(0); /* 存货档案ID*/ private Long inventRecordId = new Long(0); /* 存货档案ID*/
private BigDecimal applyAmount = new BigDecimal(0); /* 申请数量*/ private BigDecimal applyAmount = new BigDecimal(0); /* 申请数量*/
private BigDecimal unitWeight = new BigDecimal(0.000); /* 单重*/ private BigDecimal unitWeight = new BigDecimal(0.000000); /* 单重*/
private BigDecimal weight = new BigDecimal(0.000); /* 重量*/ private BigDecimal weight = new BigDecimal(0.000000); /* 重量*/
private String remark = " "; /* 备注*/ private String remark = " "; /* 备注*/
private String oldPurchaseNo = " "; /* 原采购单号*/ private String oldPurchaseNo = " "; /* 原采购单号*/
private Integer deleteFlag = 0; /* 是否删除0.否1.是*/ private Integer deleteFlag = 0; /* 是否删除0.否1.是*/
...@@ -194,14 +195,14 @@ public class HPCG001 extends DaoEPBase { ...@@ -194,14 +195,14 @@ public class HPCG001 extends DaoEPBase {
eiColumn = new EiColumn(FIELD_UNIT_WEIGHT); eiColumn = new EiColumn(FIELD_UNIT_WEIGHT);
eiColumn.setType("N"); eiColumn.setType("N");
eiColumn.setScaleLength(3); eiColumn.setScaleLength(6);
eiColumn.setFieldLength(15); eiColumn.setFieldLength(15);
eiColumn.setDescName("单重"); eiColumn.setDescName("单重");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_WEIGHT); eiColumn = new EiColumn(FIELD_WEIGHT);
eiColumn.setType("N"); eiColumn.setType("N");
eiColumn.setScaleLength(3); eiColumn.setScaleLength(6);
eiColumn.setFieldLength(15); eiColumn.setFieldLength(15);
eiColumn.setDescName("重量"); eiColumn.setDescName("重量");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
...@@ -452,7 +453,7 @@ public class HPCG001 extends DaoEPBase { ...@@ -452,7 +453,7 @@ public class HPCG001 extends DaoEPBase {
* get the inventType - 存货类型. * get the inventType - 存货类型.
* @return the inventType * @return the inventType
*/ */
public String getInventType() { public Integer getInventType() {
return this.inventType; return this.inventType;
} }
...@@ -461,7 +462,7 @@ public class HPCG001 extends DaoEPBase { ...@@ -461,7 +462,7 @@ public class HPCG001 extends DaoEPBase {
* *
* @param inventType - 存货类型 * @param inventType - 存货类型
*/ */
public void setInventType(String inventType) { public void setInventType(Integer inventType) {
this.inventType = inventType; this.inventType = inventType;
} }
/** /**
...@@ -677,7 +678,7 @@ public class HPCG001 extends DaoEPBase { ...@@ -677,7 +678,7 @@ public class HPCG001 extends DaoEPBase {
setProApplyNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRO_APPLY_NO)), proApplyNo)); setProApplyNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRO_APPLY_NO)), proApplyNo));
setWhCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_WH_CODE)), whCode)); setWhCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_WH_CODE)), whCode));
setWhName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_WH_NAME)), whName)); setWhName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_WH_NAME)), whName));
setInventType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_TYPE)), inventType)); setInventType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_INVENT_TYPE)), inventType));
setInventCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_CODE)), inventCode)); setInventCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_CODE)), inventCode));
setInventName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_NAME)), inventName)); setInventName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_NAME)), inventName));
setInventRecordId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_INVENT_RECORD_ID)), inventRecordId)); setInventRecordId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_INVENT_RECORD_ID)), inventRecordId));
......
...@@ -51,11 +51,11 @@ public class HPCG002 extends DaoEPBase { ...@@ -51,11 +51,11 @@ public class HPCG002 extends DaoEPBase {
public static final String COL_INVENT_TYPE = "INVENT_TYPE"; /* 存货类型*/ public static final String COL_INVENT_TYPE = "INVENT_TYPE"; /* 存货类型*/
public static final String COL_PRO_PLAN_STATUS = "PRO_PLAN_STATUS"; /* 提交状态 0-未提交 1-部分提交 2-全部提交*/ public static final String COL_PRO_PLAN_STATUS = "PRO_PLAN_STATUS"; /* 提交状态 0-未提交 1-部分提交 2-全部提交*/
public static final String QUERY = "t_hpcg002.query"; public static final String QUERY = "HPCG002.query";
public static final String COUNT = "t_hpcg002.count"; public static final String COUNT = "HPCG002.count";
public static final String INSERT = "t_hpcg002.insert"; public static final String INSERT = "HPCG002.insert";
public static final String UPDATE = "t_hpcg002.update"; public static final String UPDATE = "HPCG002.update";
public static final String DELETE = "t_hpcg002.delete"; public static final String DELETE = "HPCG002.delete";
private Long id = new Long(0); /* ID*/ private Long id = new Long(0); /* ID*/
private String companyCode = " "; /* 公司编码*/ private String companyCode = " "; /* 公司编码*/
......
...@@ -82,11 +82,11 @@ public class HPCG002A extends DaoEPBase { ...@@ -82,11 +82,11 @@ public class HPCG002A extends DaoEPBase {
public static final String COL_FACTORY_NAME = "FACTORY_NAME"; /* 厂区名称*/ public static final String COL_FACTORY_NAME = "FACTORY_NAME"; /* 厂区名称*/
public static final String COL_PARENT_ID = "PARENT_ID"; /* 父级ID*/ public static final String COL_PARENT_ID = "PARENT_ID"; /* 父级ID*/
public static final String QUERY = "t_hpcg002a.query"; public static final String QUERY = "HPCG002A.query";
public static final String COUNT = "t_hpcg002a.count"; public static final String COUNT = "HPCG002A.count";
public static final String INSERT = "t_hpcg002a.insert"; public static final String INSERT = "HPCG002A.insert";
public static final String UPDATE = "t_hpcg002a.update"; public static final String UPDATE = "HPCG002A.update";
public static final String DELETE = "t_hpcg002a.delete"; public static final String DELETE = "HPCG002A.delete";
private Long id = new Long(0); /* ID*/ private Long id = new Long(0); /* ID*/
private String companyCode = " "; /* 公司编码*/ private String companyCode = " "; /* 公司编码*/
......
...@@ -112,6 +112,12 @@ ...@@ -112,6 +112,12 @@
<isNotEmpty prepend=" AND " property="factoryName"> <isNotEmpty prepend=" AND " property="factoryName">
FACTORY_NAME = #factoryName# FACTORY_NAME = #factoryName#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateFrom">
CREATED_TIME &gt;= REPLACE(#createdDateFrom#, '-', '')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateTo">
CREATED_TIME &lt;= REPLACE(#createdDateTo#, '-', '')
</isNotEmpty>
</sql> </sql>
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
...@@ -150,7 +156,7 @@ ...@@ -150,7 +156,7 @@
$orderBy$ $orderBy$
</isNotEmpty> </isNotEmpty>
<isEmpty property="orderBy"> <isEmpty property="orderBy">
ID asc PRO_APPLY_DATE desc,PRO_APPLY_STATUS asc,FACTORY_CODE asc
</isEmpty> </isEmpty>
</dynamic> </dynamic>
...@@ -278,6 +284,29 @@ ...@@ -278,6 +284,29 @@
ID = #id# ID = #id#
</delete> </delete>
<update id="daleteFlag">
UPDATE ${hpjxSchema}.T_HPCG001
SET
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 修改时间 -->
DELETE_FLAG = #deleteFlag# <!-- 是否删除0:否1.是 -->
WHERE
ID = #id#
</update>
<!--修改提交状态-->
<update id="updateProApplyStatus">
UPDATE ${hpjxSchema}.T_HPCG001
SET
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
PRO_APPLY_STATUS = #proApplyStatus# <!-- 提交状态 0-未提交 1-已提交 -->
WHERE
ID = #id#
</update>
<update id="update"> <update id="update">
UPDATE ${hpjxSchema}.T_HPCG001 UPDATE ${hpjxSchema}.T_HPCG001
SET SET
......
...@@ -134,55 +134,6 @@ ...@@ -134,55 +134,6 @@
</isNotEmpty> </isNotEmpty>
</sql> </sql>
<sql id="authCondition">
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCodes">
DEP_CODE IN <iterate close=")" open="(" conjunction="," property="depCodes">#depCodes[]#</iterate>
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.cg.domain.HPCG002A">
SELECT
ID as "id", <!-- ID -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
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-是 -->
CUST_CODE as "custCode", <!-- 供应商编码 -->
PRO_APPLY_DATE as "proApplyDate", <!-- 采购申请日期 -->
PRO_APPLY_NO as "proApplyNo", <!-- 采购申请单号 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 -->
INVENT_TYPE as "inventType", <!-- 存货类型 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_NAME as "inventName", <!-- 存货名称 -->
INVENT_RECORD_ID as "inventRecordId", <!-- 存货档案ID -->
APPLY_AMOUNT as "applyAmount", <!-- 申请数量 -->
APPLY_UNIT_WEIGHT as "applyUnitWeight", <!-- 申请单重 -->
APPLY_WEIGHT as "applyWeight", <!-- 重量 -->
PLAN_AMOUNT as "planAmount", <!-- 计划数量 -->
PLAN_WEIGHT as "planWeight", <!-- 计划重量 -->
REMARK as "remark", <!-- 备注 -->
PRO_APPLY_STATUS as "proApplyStatus", <!-- 提交状态 0-未提交 1-已提交 -->
FACTORY_CODE as "factoryCode", <!-- 厂区编码 -->
FACTORY_NAME as "factoryName", <!-- 厂区名称 -->
PARENT_ID as "parentId" <!-- 父级ID -->
FROM ${hpjxSchema}.T_HPCG002A WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.cg.domain.HPCG002A"> resultClass="com.baosight.hpjx.hp.cg.domain.HPCG002A">
SELECT SELECT
......
...@@ -66,6 +66,10 @@ public class HPConstant { ...@@ -66,6 +66,10 @@ public class HPConstant {
public static final String PLAN_SALES_CODE = "PLAN_SALES_CODE"; public static final String PLAN_SALES_CODE = "PLAN_SALES_CODE";
// 退货单号 // 退货单号
public static final String HPKC013_RETURN_NO = "HPKC013_RETURN_NO"; public static final String HPKC013_RETURN_NO = "HPKC013_RETURN_NO";
//采购申请单号
public static final String PRO_APPLY_NO = "PRO_APPLY_NO";
//采购计划单号
public static final String PRO_PLAN_NO = "PRO_PLAN_NO";
} }
/** /**
......
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