Commit f2d28b86 by 宋祥

1.采购入库实体类和XML

parent 5364f889
......@@ -2,6 +2,30 @@
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap namespace="HPKC001">
<sql id="column">
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", <!-- 更新时间 -->
PURCHASE_CODE as "purchaseCode", <!-- 采购单号 -->
RECEIPT_DATE as "receiptDate", <!-- 单据日期 -->
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 -->
AMOUNT as "amount", <!-- 数量 -->
WEIGHT as "weight", <!-- 重量 -->
REMARKS as "remarks", <!-- 备注 -->
DELETE_FLAG as "deleteFlag" <!-- 是否删除0.否1.是 -->
</sql>
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
......@@ -25,35 +49,10 @@
CREATED_TIME BETWEEN #createdTimeFrom# AND #createdTimeTo#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.kc.domain.HPKC001">
SELECT
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
STATUS as "status", <!-- 数据状态 1正常 0删除 -->
DOCUMENT_CODE as "documentCode", <!-- 采购入库单号 -->
DOCUMENT_TIME as "documentTime", <!-- 单据日期 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 -->
MATERIAL_TYPE as "materialType", <!-- 存货类型编码 -->
MATERIAL_TYPE_NAME as "materialTypeName", <!-- 存货类型名称 -->
MATERIAL_CODE as "materialCode", <!-- 存货编码 -->
MATERIAL_NAME as "materialName", <!-- 存货名称 -->
SPEC as "spec", <!-- 规格 -->
UNIT as "unit", <!-- 单位 -->
QUANTITY as "quantity", <!-- 数量 -->
WEIGHT as "weight", <!-- 重量 -->
REMARKS as "remarks", <!-- 备注 -->
APPROVAL_STATUS as "approvalStatus", <!-- 审批状态:1-保存,2-已提交,3-审批通过,4-审批拒绝 -->
CUST_CODE as "custCode", <!-- 供应商编码 -->
CUST_NAME as "custName" <!-- 供应商名称 -->
SELECT <include refid="column"/>
FROM hpjx.t_hpkc001 WHERE 1=1
<include refid="condition"/>
<dynamic prepend="ORDER BY">
......@@ -71,43 +70,36 @@
<include refid="condition"/>
</select>
<insert id="insert">
INSERT INTO hpjx.t_hpkc001 (
COMPANY_CODE, <!-- 企业编码 预留 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 -->
DEP_CODE, <!-- 部门编码 -->
STATUS, <!-- 数据状态 1正常 0删除 -->
DOCUMENT_CODE, <!-- 采购入库单号 -->
DOCUMENT_TIME, <!-- 单据日期 -->
WH_CODE, <!-- 仓库编码 -->
WH_NAME, <!-- 仓库名称 -->
MATERIAL_TYPE, <!-- 存货类型编码 -->
MATERIAL_TYPE_NAME, <!-- 存货类型名称 -->
MATERIAL_CODE, <!-- 存货编码 -->
MATERIAL_NAME, <!-- 存货名称 -->
SPEC, <!-- 规格 -->
UNIT, <!-- 单位 -->
QUANTITY, <!-- 数量 -->
WEIGHT, <!-- 重量 -->
REMARKS, <!-- 备注 -->
APPROVAL_STATUS, <!-- 审批状态:1-保存,2-已提交,3-审批通过,4-审批拒绝 -->
CUST_CODE, <!-- 供应商编码 -->
CUST_NAME <!-- 供应商名称 -->
)
VALUES (#companyCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#,
#updatedName#, #updatedTime#,#depCode#, #status#, #documentCode#,
#documentTime#, #whCode#, #whName#, #materialType#, #materialTypeName#,
#materialCode#, #materialName#, #spec#, #unit#, #quantity#,
#weight#, #remarks#, #approvalStatus#, #custCode#, #custName#)
</insert>
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPKC001 (
COMPANY_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
PURCHASE_CODE, <!-- 采购单号 -->
RECEIPT_DATE, <!-- 单据日期 -->
WH_CODE, <!-- 仓库编码 -->
WH_NAME, <!-- 仓库名称 -->
INVENT_TYPE, <!-- 存货类型 -->
INVENT_CODE, <!-- 存货编码 -->
INVENT_NAME, <!-- 存货名称 -->
INVENT_RECORD_ID, <!-- 存货档案ID -->
AMOUNT, <!-- 数量 -->
WEIGHT, <!-- 重量 -->
REMARKS, <!-- 备注 -->
DELETE_FLAG <!-- 是否删除0.否1.是 -->
) VALUES (
#companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#purchaseCode#, #receiptDate#, #whCode#, #whName#, #inventType#,
#inventCode#, #inventName#, #inventRecordId#, #amount#, #weight#,
#remarks#, #deleteFlag#
)
</insert>
<!-- 逻辑删除 -->
<delete id="delete">
DELETE FROM hpjx.t_hpkc001 WHERE ID = #id#
UPDATE hpjx.t_hpkc001 SET DELETE_FLAG = 1 WHERE ID = #id#
</delete>
<update id="approvalStatusUpdate">
......@@ -119,67 +111,20 @@
<update id="update">
UPDATE hpjx.t_hpkc001
SET
UPDATED_BY = #updatedBy#,
UPDATED_NAME = #updatedName#,
UPDATED_TIME = #updatedTime#
<isNotEmpty property="companyCode">
,COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty property="depCode">
,DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty property="STATUS">
,STATUS = #status#
</isNotEmpty>
<isNotEmpty property="documentCode">
,DOCUMENT_CODE = #documentCode#
</isNotEmpty>
<isNotEmpty property="documentTime">
,DOCUMENT_TIME = #documentTime#
</isNotEmpty>
<isNotEmpty property="whCode">
,WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty property="whName">
,WH_NAME = #whName#
</isNotEmpty>
<isNotEmpty property="materialType">
,MATERIAL_TYPE = #materialType#
</isNotEmpty>
<isNotEmpty property="materialTypeName">
,MATERIAL_TYPE_NAME = #materialTypeName#
</isNotEmpty>
<isNotEmpty property="materialCode">
,MATERIAL_CODE = #materialCode#
</isNotEmpty>
<isNotEmpty property="materialName">
,MATERIAL_NAME = #materialName#
</isNotEmpty>
<isNotEmpty property="spec">
,SPEC = #spec#
</isNotEmpty>
<isNotEmpty property="unit">
,UNIT = #unit#
</isNotEmpty>
<isNotEmpty property="quantity">
,QUANTITY = #quantity#
</isNotEmpty>
<isNotEmpty property="weight">
,WEIGHT = #weight#
</isNotEmpty>
<isNotEmpty property="remarks">
,REMARKS = #remarks#
</isNotEmpty>
<isNotEmpty property="approvalStatus">
,APPROVAL_STATUS = #approvalStatus#
</isNotEmpty>
<isNotEmpty property="custCode">
,CUST_CODE = #custCode#
</isNotEmpty>
<isNotEmpty property="custName">
,CUST_NAME = #custName#
</isNotEmpty>
WHERE ID = #id#
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
RECEIPT_DATE = #receiptDate#, <!-- 单据日期 -->
WH_CODE = #whCode#, <!-- 仓库编码 -->
WH_NAME = #whName#, <!-- 仓库名称 -->
INVENT_TYPE = #inventType#, <!-- 存货类型 -->
INVENT_CODE = #inventCode#, <!-- 存货编码 -->
INVENT_NAME = #inventName#, <!-- 存货名称 -->
INVENT_RECORD_ID = #inventRecordId#, <!-- 存货档案ID -->
AMOUNT = #amount#, <!-- 数量 -->
WEIGHT = #weight#, <!-- 重量 -->
REMARKS = #remarks# <!-- 备注 -->
WHERE ID = #id#
</update>
<!-- 统计库存 -->
......
......@@ -2,6 +2,30 @@
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap namespace="HPKC002">
<sql id="column">
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", <!-- 更新时间 -->
REQ_CODE as "reqCode", <!-- 领料单号 -->
RECEIPT_DATE as "receiptDate", <!-- 单据日期 -->
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 -->
AMOUNT as "amount", <!-- 数量 -->
WEIGHT as "weight", <!-- 重量 -->
REMARKS as "remarks", <!-- 备注 -->
DELETE_FLAG as "deleteFlag" <!-- 是否删除0.否1.是 -->
</sql>
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
......@@ -27,33 +51,7 @@
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.kc.domain.HPKC002">
SELECT
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
STATUS as "status", <!-- 数据状态 1正常 0删除 -->
DOCUMENT_CODE as "documentCode", <!-- 采购入库单号 -->
DOCUMENT_TIME as "documentTime", <!-- 单据日期 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 -->
MATERIAL_TYPE as "materialType", <!-- 存货类型编码 -->
MATERIAL_TYPE_NAME as "materialTypeName", <!-- 存货类型名称 -->
MATERIAL_CODE as "materialCode", <!-- 存货编码 -->
MATERIAL_NAME as "materialName", <!-- 存货名称 -->
SPEC as "spec", <!-- 规格 -->
UNIT as "unit", <!-- 单位 -->
QUANTITY as "quantity", <!-- 数量 -->
WEIGHT as "weight", <!-- 重量 -->
REMARKS as "remarks", <!-- 备注 -->
APPROVAL_STATUS as "approvalStatus", <!-- 审批状态:1-保存,2-已提交,3-审批通过,4-审批拒绝 -->
CUST_CODE as "custCode", <!-- 供应商编码 -->
CUST_NAME as "custName" <!-- 供应商名称 -->
SELECT <include refid="column"/>
FROM hpjx.t_hpkc002 WHERE 1=1
<include refid="condition"/>
<dynamic prepend="ORDER BY">
......@@ -73,110 +71,56 @@
<include refid="condition"/>
</select>
<insert id="insert">
INSERT INTO hpjx.t_hpkc002 (
COMPANY_CODE, <!-- 企业编码 预留 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 -->
DEP_CODE, <!-- 部门编码 -->
STATUS, <!-- 数据状态 1正常 0删除 -->
DOCUMENT_CODE, <!-- 采购入库单号 -->
DOCUMENT_TIME, <!-- 单据日期 -->
WH_CODE, <!-- 仓库编码 -->
WH_NAME, <!-- 仓库名称 -->
MATERIAL_TYPE, <!-- 存货类型编码 -->
MATERIAL_TYPE_NAME, <!-- 存货类型名称 -->
MATERIAL_CODE, <!-- 存货编码 -->
MATERIAL_NAME, <!-- 存货名称 -->
SPEC, <!-- 规格 -->
UNIT, <!-- 单位 -->
QUANTITY, <!-- 数量 -->
WEIGHT, <!-- 重量 -->
REMARKS, <!-- 备注 -->
APPROVAL_STATUS, <!-- 审批状态:1-保存,2-已提交,3-审批通过,4-审批拒绝 -->
CUST_CODE, <!-- 供应商编码 -->
CUST_NAME <!-- 供应商名称 -->
)
VALUES (#companyCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#,
#updatedName#, #updatedTime#,#depCode#, #status#, #documentCode#,
#documentTime#, #whCode#, #whName#, #materialType#, #materialTypeName#,
#materialCode#, #materialName#, #spec#, #unit#, #quantity#,
#weight#, #remarks#, #approvalStatus#, #custCode#, #custName#)
</insert>
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPKC002 (
COMPANY_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
REQ_CODE, <!-- 领料单号 -->
RECEIPT_DATE, <!-- 单据日期 -->
WH_CODE, <!-- 仓库编码 -->
WH_NAME, <!-- 仓库名称 -->
INVENT_TYPE, <!-- 存货类型 -->
INVENT_CODE, <!-- 存货编码 -->
INVENT_NAME, <!-- 存货名称 -->
INVENT_RECORD_ID, <!-- 存货档案ID -->
AMOUNT, <!-- 数量 -->
WEIGHT, <!-- 重量 -->
REMARKS, <!-- 备注 -->
DELETE_FLAG <!-- 是否删除0.否1.是 -->
) VALUES (
#companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#reqCode#, #receiptDate#, #whCode#, #whName#, #inventType#, #inventCode#,
#inventName#, #inventRecordId#, #amount#, #weight#, #remarks#, #deleteFlag#
)
</insert>
<!-- 逻辑删除 -->
<delete id="delete">
DELETE FROM hpjx.t_hpkc002 WHERE ID = #id#
UPDATE hpjx.t_hpkc002 SET DELETE_FLAG = 1 WHERE ID = #id#
</delete>
<update id="update">
UPDATE hpjx.t_hpkc002
SET
UPDATED_BY = #updatedBy#,
UPDATED_BY = #updatedBy#,
UPDATED_BY = #updatedBy#
<isNotEmpty property="companyCode">
,COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty property="depCode">
,DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty property="STATUS">
,STATUS = #status#
</isNotEmpty>
<isNotEmpty property="documentCode">
,DOCUMENT_CODE = #documentCode#
</isNotEmpty>
<isNotEmpty property="documentTime">
,DOCUMENT_TIME = #documentTime#
</isNotEmpty>
<isNotEmpty property="whCode">
,WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty property="whName">
,WH_NAME = #whName#
</isNotEmpty>
<isNotEmpty property="materialType">
,MATERIAL_TYPE = #materialType#
</isNotEmpty>
<isNotEmpty property="materialTypeName">
,MATERIAL_TYPE_NAME = #materialTypeName#
</isNotEmpty>
<isNotEmpty property="materialCode">
,MATERIAL_CODE = #materialCode#
</isNotEmpty>
<isNotEmpty property="materialName">
,MATERIAL_NAME = #materialName#
</isNotEmpty>
<isNotEmpty property="spec">
,SPEC = #spec#
</isNotEmpty>
<isNotEmpty property="unit">
,UNIT = #unit#
</isNotEmpty>
<isNotEmpty property="quantity">
,QUANTITY = #quantity#
</isNotEmpty>
<isNotEmpty property="weight">
,WEIGHT = #weight#
</isNotEmpty>
<isNotEmpty property="remarks">
,REMARKS = #remarks#
</isNotEmpty>
<isNotEmpty property="approvalStatus">
,APPROVAL_STATUS = #approvalStatus#
</isNotEmpty>
<isNotEmpty property="custCode">
,CUST_CODE = #custCode#
</isNotEmpty>
<isNotEmpty property="custName">
,CUST_NAME = #custName#
</isNotEmpty>
WHERE ID = #id#
</update>
<update id="update">
UPDATE ${hpjxSchema}.T_HPKC002
SET
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
REQ_CODE = #reqCode#, <!-- 领料单号 -->
RECEIPT_DATE = #receiptDate#, <!-- 单据日期 -->
WH_CODE = #whCode#, <!-- 仓库编码 -->
WH_NAME = #whName#, <!-- 仓库名称 -->
INVENT_TYPE = #inventType#, <!-- 存货类型 -->
INVENT_CODE = #inventCode#, <!-- 存货编码 -->
INVENT_NAME = #inventName#, <!-- 存货名称 -->
INVENT_RECORD_ID = #inventRecordId#, <!-- 存货档案ID -->
AMOUNT = #amount#, <!-- 数量 -->
WEIGHT = #weight#, <!-- 重量 -->
REMARKS = #remarks# <!-- 备注 -->
WHERE ID = #id#
</update>
<!-- 统计库存 -->
<select id="statDate" resultClass="com.baosight.hpjx.hp.kc.domain.HPKC002">
......
......@@ -35,10 +35,10 @@
<EF:EFComboColumn ename="status" cname="状态" align="center" width="100" required="true">
<EF:EFCodeOption codeName="hpjx.hpjx.status"/>
</EF:EFComboColumn>
<EF:EFColumn ename="createdBy" cname="创建人" enable="false" width="100" align="center"/>
<EF:EFColumn ename="createdName" cname="创建人" enable="false" width="100" align="center"/>
<EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="140" align="center"
parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss"/>
<EF:EFColumn ename="updatedBy" cname="更新人" enable="false" width="100" align="center"/>
<EF:EFColumn ename="updatedName" cname="更新人" enable="false" width="100" align="center"/>
<EF:EFColumn ename="updatedTime" cname="更新时间" enable="false" width="140" align="center"
parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss"/>
</EF:EFGrid>
......
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