Commit d1edf618 by yukang

Merge remote-tracking branch 'origin/dev' into dev

parents f9207f51 ceab032e
...@@ -68,6 +68,8 @@ public class HPSqlConstant { ...@@ -68,6 +68,8 @@ public class HPSqlConstant {
public static final String QUERY_SUM = "HPKC005.querySum"; public static final String QUERY_SUM = "HPKC005.querySum";
// 锁 // 锁
public static final String LOCK = "HPKC005.lock"; public static final String LOCK = "HPKC005.lock";
// 统计
public static final String STAT_DATE = "HPKC005.statDate";
} }
/** /**
...@@ -114,6 +116,8 @@ public class HPSqlConstant { ...@@ -114,6 +116,8 @@ public class HPSqlConstant {
public static final String DELETE_BY_TIME = "HPKC009.deleteByTime"; public static final String DELETE_BY_TIME = "HPKC009.deleteByTime";
// 查询 // 查询
public static final String QUERY = "HPKC009.query"; public static final String QUERY = "HPKC009.query";
// 查询统计
public static final String QUERY_SUM = "HPKC009.querySum";
} }
/** /**
...@@ -129,6 +133,18 @@ public class HPSqlConstant { ...@@ -129,6 +133,18 @@ public class HPSqlConstant {
} }
/** /**
* HPKC010A SQL 定义
*
* @author:songx
* @date:2024/1/20,16:45
*/
public class HPKC010A {
// 备份数量
public static final String BACKUP = "HPKC010A.backup";
}
/**
* HPPZ010 SQL 定义 * HPPZ010 SQL 定义
* *
* @author:songx * @author:songx
......
package com.baosight.hpjx.hp.kc.service;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPSqlConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC010;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import java.time.LocalDate;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author:songx
* @date:2024/1/25,18:49
*/
public class ServiceHPKC010A extends ServiceBase {
/**
* 备份数据
*
* @param inInfo
* @return
*/
public EiInfo backup(EiInfo inInfo) {
try {
Map queryMap = new HashMap();
queryMap.put("dateProc", LocalDate.now().minusDays(1).format(DateUtils.SHORT_DATE));
dao.insert(HPSqlConstant.HPKC010A.BACKUP, queryMap);
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("备份数据成功");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "新增失败");
}
return inInfo;
}
}
...@@ -216,4 +216,23 @@ ...@@ -216,4 +216,23 @@
</isNotEmpty> </isNotEmpty>
</update> </update>
<!-- 统计库存 -->
<select id="statDate" resultClass="com.baosight.hpjx.hp.kc.domain.HPKC005">
SELECT
COMPANY_CODE AS "companyCode",
DEP_CODE AS "depCode",
WH_CODE AS "whCode",
INVENT_TYPE AS "inventType",
INVENT_CODE AS "inventCode",
INVENT_RECORD_ID AS "inventRecordId",
COALESCE(SUM(DIFF_AMOUNT), 0) AS "diffAmount",
COALESCE(SUM(DIFF_WEIGHT), 0) AS "diffWeight"
FROM ${hpjxSchema}.T_HPKC005
WHERE 1=1
<isNotEmpty prepend=" AND " property="createdTimeFrom">
CREATED_TIME BETWEEN #createdTimeFrom# AND #createdTimeTo#
</isNotEmpty>
GROUP BY COMPANY_CODE, DEP_CODE, WH_CODE, INVENT_TYPE, INVENT_CODE, INVENT_RECORD_ID
</select>
</sqlMap> </sqlMap>
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
ID as "id", ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 --> COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
DEP_CODE as "depCode", <!-- 部门编码 --> DEP_CODE as "depCode", <!-- 部门编码 -->
KC_TYPE as "kcType", <!-- 库存类型:CG:采购,SC:生产,QT:其他 -->
DATE_TYPE as "dateType", <!-- 日期类型:DAY:天,MONTH:月 --> DATE_TYPE as "dateType", <!-- 日期类型:DAY:天,MONTH:月 -->
DATE_PROC as "dateProc", <!-- 日期 --> DATE_PROC as "dateProc", <!-- 日期 -->
WH_CODE as "whCode", <!-- 仓库编码 --> WH_CODE as "whCode", <!-- 仓库编码 -->
...@@ -17,10 +16,24 @@ ...@@ -17,10 +16,24 @@
INVENT_RECORD_ID as "inventRecordId", <!-- 规格ID --> INVENT_RECORD_ID as "inventRecordId", <!-- 规格ID -->
INIT_AMOUNT as "initAmount", <!-- 期初数量 --> INIT_AMOUNT as "initAmount", <!-- 期初数量 -->
INIT_WEIGHT as "initWeight", <!-- 期初重量 --> INIT_WEIGHT as "initWeight", <!-- 期初重量 -->
CG_ENTER_AMOUNT as "cgEnterAmount", <!-- 采购入库数量 -->
CG_ENTER_WEIGHT as "cgEnterWeight", <!-- 采购入库重量 -->
SC_ENTER_AMOUNT as "scEnterAmount", <!-- 生产入库数量 -->
SC_ENTER_WEIGHT as "scEnterWeight", <!-- 生产入库重量 -->
QT_ENTER_AMOUNT as "qtEnterAmount", <!-- 其它入库数量 -->
QT_ENTER_WEIGHT as "qtEnterWeight", <!-- 其它入库重量 -->
ENTER_AMOUNT as "enterAmount", <!-- 入库数量 --> ENTER_AMOUNT as "enterAmount", <!-- 入库数量 -->
ENTER_WEIGHT as "enterWeight", <!-- 入库重量 --> ENTER_WEIGHT as "enterWeight", <!-- 入库重量 -->
SC_OUTER_AMOUNT as "scOuterAmount", <!-- 生产领料数量 -->
SC_OUTER_WEIGHT as "scOuterWeight", <!-- 生产领料重量 -->
XS_OUTER_AMOUNT as "xsOuterAmount", <!-- 销售出库数量 -->
XS_OUTER_WEIGHT as "xsOuterWeight", <!-- 销售出库重量 -->
QT_OUTER_AMOUNT as "qtOuterAmount", <!-- 其它出库数量 -->
QT_OUTER_WEIGHT as "qtOuterWeight", <!-- 其它出库重量 -->
OUTER_AMOUNT as "outerAmount", <!-- 出库数量 --> OUTER_AMOUNT as "outerAmount", <!-- 出库数量 -->
OUTER_WEIGHT as "outerWeight", <!-- 出库重量 --> OUTER_WEIGHT as "outerWeight", <!-- 出库重量 -->
PD_DIFF_AMOUNT as "pdDiffAmount", <!-- 盘点差异数量 -->
PD_DIFF_WEIGHT as "pdDiffWeight", <!-- 盘点差异重量 -->
END_AMOUNT as "endAmount", <!-- 期末数量 --> END_AMOUNT as "endAmount", <!-- 期末数量 -->
END_WEIGHT as "endWeight", <!-- 期末重量 --> END_WEIGHT as "endWeight", <!-- 期末重量 -->
CREATED_BY as "createdBy", <!-- 创建人 --> CREATED_BY as "createdBy", <!-- 创建人 -->
...@@ -41,9 +54,6 @@ ...@@ -41,9 +54,6 @@
<isNotEmpty prepend=" AND " property="depCode"> <isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode# DEP_CODE = #depCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="kcType">
KC_TYPE = #kcType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="dateType"> <isNotEmpty prepend=" AND " property="dateType">
DATE_TYPE = #dateType# DATE_TYPE = #dateType#
</isNotEmpty> </isNotEmpty>
...@@ -76,7 +86,7 @@ ...@@ -76,7 +86,7 @@
$orderBy$ $orderBy$
</isNotEmpty> </isNotEmpty>
<isEmpty property="orderBy"> <isEmpty property="orderBy">
ID asc ID DESC
</isEmpty> </isEmpty>
</dynamic> </dynamic>
</sql> </sql>
...@@ -101,10 +111,24 @@ ...@@ -101,10 +111,24 @@
SELECT SELECT
COALESCE(SUM(INIT_AMOUNT), 0) AS "initAmount", <!-- 期初数量 --> COALESCE(SUM(INIT_AMOUNT), 0) AS "initAmount", <!-- 期初数量 -->
COALESCE(SUM(INIT_WEIGHT), 0) AS "initWeight", <!-- 期初重量 --> COALESCE(SUM(INIT_WEIGHT), 0) AS "initWeight", <!-- 期初重量 -->
COALESCE(SUM(CG_ENTER_AMOUNT), 0) AS "cgEnterAmount", <!-- 采购入库数量 -->
COALESCE(SUM(CG_ENTER_WEIGHT), 0) AS "cgEnterWeight", <!-- 采购入库重量 -->
COALESCE(SUM(SC_ENTER_AMOUNT), 0) AS "scEnterAmount", <!-- 生产入库数量 -->
COALESCE(SUM(SC_ENTER_WEIGHT), 0) AS "scEnterWeight", <!-- 生产入库重量 -->
COALESCE(SUM(QT_ENTER_AMOUNT), 0) AS "qtEnterAmount", <!-- 其它入库数量 -->
COALESCE(SUM(QT_ENTER_WEIGHT), 0) AS "qtEnterWeight", <!-- 其它入库重量 -->
COALESCE(SUM(ENTER_AMOUNT), 0) AS "enterAmount", <!-- 入库数量 --> COALESCE(SUM(ENTER_AMOUNT), 0) AS "enterAmount", <!-- 入库数量 -->
COALESCE(SUM(ENTER_WEIGHT), 0) AS "enterWeight", <!-- 入库重量 --> COALESCE(SUM(ENTER_WEIGHT), 0) AS "enterWeight", <!-- 入库重量 -->
COALESCE(SUM(OUTER_AMOUNT), 0) AS "outerAmount", <!-- 差异数量 --> COALESCE(SUM(SC_OUTER_AMOUNT), 0) AS "scOuterAmount", <!-- 生产领料数量 -->
COALESCE(SUM(OUTER_WEIGHT), 0) AS "outerWeight", <!-- 差异重量 --> COALESCE(SUM(SC_OUTER_WEIGHT), 0) AS "scOuterWeight", <!-- 生产领料重量 -->
COALESCE(SUM(XS_OUTER_AMOUNT), 0) AS "xsOuterAmount", <!-- 销售出库数量 -->
COALESCE(SUM(XS_OUTER_WEIGHT), 0) AS "xsOuterWeight", <!-- 销售出库重量 -->
COALESCE(SUM(QT_OUTER_AMOUNT), 0) AS "qtOuterAmount", <!-- 其它出库数量 -->
COALESCE(SUM(QT_OUTER_WEIGHT), 0) AS "qtOuterWeight", <!-- 其它出库重量 -->
COALESCE(SUM(OUTER_AMOUNT), 0) AS "outerAmount", <!-- 出库数量 -->
COALESCE(SUM(OUTER_WEIGHT), 0) AS "outerWeight", <!-- 出库重量 -->
COALESCE(SUM(PD_DIFF_AMOUNT), 0) AS "pdDiffAmount", <!-- 盘点差异数量 -->
COALESCE(SUM(PD_DIFF_WEIGHT), 0) AS "pdDiffWeight", <!-- 盘点差异重量 -->
COALESCE(SUM(END_AMOUNT), 0) AS "endAmount", <!-- 期末数量 --> COALESCE(SUM(END_AMOUNT), 0) AS "endAmount", <!-- 期末数量 -->
COALESCE(SUM(END_WEIGHT), 0) AS "endWeight" <!-- 期末重量 --> COALESCE(SUM(END_WEIGHT), 0) AS "endWeight" <!-- 期末重量 -->
FROM ${hpjxSchema}.T_HPKC009 FROM ${hpjxSchema}.T_HPKC009
...@@ -116,7 +140,6 @@ ...@@ -116,7 +140,6 @@
INSERT INTO ${hpjxSchema}.T_HPKC009 ( INSERT INTO ${hpjxSchema}.T_HPKC009 (
COMPANY_CODE, <!-- 企业编码 预留 --> COMPANY_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 --> DEP_CODE, <!-- 部门编码 -->
KC_TYPE, <!-- 库存类型:CG:采购,SC:生产,QT:其他 -->
DATE_TYPE, <!-- 日期类型:DAY:天,MONTH:月 --> DATE_TYPE, <!-- 日期类型:DAY:天,MONTH:月 -->
DATE_PROC, <!-- 日期 --> DATE_PROC, <!-- 日期 -->
WH_CODE, <!-- 仓库编码 --> WH_CODE, <!-- 仓库编码 -->
...@@ -127,21 +150,37 @@ ...@@ -127,21 +150,37 @@
INVENT_RECORD_ID, <!-- 规格ID --> INVENT_RECORD_ID, <!-- 规格ID -->
INIT_AMOUNT, <!-- 期初数量 --> INIT_AMOUNT, <!-- 期初数量 -->
INIT_WEIGHT, <!-- 期初重量 --> INIT_WEIGHT, <!-- 期初重量 -->
CG_ENTER_AMOUNT, <!-- 采购入库数量 -->
CG_ENTER_WEIGHT, <!-- 采购入库重量 -->
SC_ENTER_AMOUNT, <!-- 生产入库数量 -->
SC_ENTER_WEIGHT, <!-- 生产入库重量 -->
QT_ENTER_AMOUNT, <!-- 其它入库数量 -->
QT_ENTER_WEIGHT, <!-- 其它入库重量 -->
ENTER_AMOUNT, <!-- 入库数量 --> ENTER_AMOUNT, <!-- 入库数量 -->
ENTER_WEIGHT, <!-- 入库重量 --> ENTER_WEIGHT, <!-- 入库重量 -->
SC_OUTER_AMOUNT, <!-- 生产领料数量 -->
SC_OUTER_WEIGHT, <!-- 生产领料重量 -->
XS_OUTER_AMOUNT, <!-- 销售出库数量 -->
XS_OUTER_WEIGHT, <!-- 销售出库重量 -->
QT_OUTER_AMOUNT, <!-- 其它出库数量 -->
QT_OUTER_WEIGHT, <!-- 其它出库重量 -->
OUTER_AMOUNT, <!-- 出库数量 --> OUTER_AMOUNT, <!-- 出库数量 -->
OUTER_WEIGHT, <!-- 出库重量 --> OUTER_WEIGHT, <!-- 出库重量 -->
PD_DIFF_AMOUNT, <!-- 盘点差异数量 -->
PD_DIFF_WEIGHT, <!-- 盘点差异重量 -->
END_AMOUNT, <!-- 期末数量 --> END_AMOUNT, <!-- 期末数量 -->
END_WEIGHT, <!-- 期末重量 --> END_WEIGHT, <!-- 期末重量 -->
CREATED_BY, <!-- 创建人 --> CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 --> CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME <!-- 创建时间 --> CREATED_TIME <!-- 创建时间 -->
) VALUES ( ) VALUES (
#companyCode#, #depCode#, #kcType#, #dateType#, #dateProc#, #whCode#, #companyCode#, #depCode#, #dateType#, #dateProc#, #whCode#, #whName#,
#whName#, #inventType#, #inventCode#, #inventName#, #inventRecordId#, #inventType#, #inventCode#, #inventName#, #inventRecordId#, #initAmount#,
#initAmount#, #initWeight#, #enterAmount#, #enterWeight#, #outerAmount#, #initWeight#, #cgEnterAmount#, #cgEnterWeight#, #scEnterAmount#, #scEnterWeight#,
#outerWeight#, #endAmount#, #endWeight#, #createdBy#, #createdName#, #qtEnterAmount#, #qtEnterWeight#, #enterAmount#, #enterWeight#, #scOuterAmount#,
#createdTime# #scOuterWeight#, #xsOuterAmount#, #xsOuterWeight#, #qtOuterAmount#, #qtOuterWeight#,
#outerAmount#, #outerWeight#, #pdDiffAmount#, #pdDiffWeight#, #endAmount#,
#endWeight#, #createdBy#, #createdName#, #createdTime#
) )
</insert> </insert>
......
...@@ -4,20 +4,23 @@ ...@@ -4,20 +4,23 @@
<sql id="column"> <sql id="column">
ID as "id", ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 --> COMPANY_CODE as "companyCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
WH_CODE as "whCode", <!-- 仓库编码 --> WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 --> WH_NAME as "whName", <!-- 仓库名称 -->
INVENT_TYPE as "inventType", <!-- 存货类型 --> INVENT_TYPE as "inventType", <!-- 物料类型 -->
INVENT_CODE as "inventCode", <!-- 存货编码 --> INVENT_CODE as "inventCode", <!-- 物料编码 -->
INVENT_NAME as "inventName", <!-- 存货名称 --> INVENT_NAME as "inventName", <!-- 物料名称 -->
INVENT_RECORD_ID as "inventRecordId", <!-- 存货档案ID --> INVENT_RECORD_ID as "inventRecordId", <!-- 存货档案ID -->
AMOUNT as "amount", <!-- 数量 --> AMOUNT as "amount", <!-- 数量 -->
WEIGHT as "weight", <!-- 重量 --> WEIGHT as "weight", <!-- 重量 -->
CREATED_BY as "createdBy", <!-- 创建人 --> CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 --> CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 --> UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 --> UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
VERSION as "version" VERSION as "version" <!-- 版本号 -->
</sql> </sql>
<sql id="condition"> <sql id="condition">
...@@ -114,6 +117,7 @@ ...@@ -114,6 +117,7 @@
<insert id="insert"> <insert id="insert">
INSERT INTO hpjx.T_HPKC010 ( INSERT INTO hpjx.T_HPKC010 (
COMPANY_CODE, <!-- 企业编码 预留 --> COMPANY_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 预留 -->
WH_CODE, <!-- 仓库编码 --> WH_CODE, <!-- 仓库编码 -->
WH_NAME, <!-- 仓库名称 --> WH_NAME, <!-- 仓库名称 -->
INVENT_TYPE, <!-- 存货类型 --> INVENT_TYPE, <!-- 存货类型 -->
...@@ -128,7 +132,7 @@ ...@@ -128,7 +132,7 @@
UPDATED_TIME, <!-- 更新时间 --> UPDATED_TIME, <!-- 更新时间 -->
VERSION VERSION
) VALUES ( ) VALUES (
#companyCode#, #whCode#, #whName#, #inventType#, #companyCode#, #depCode#, #whCode#, #whName#, #inventType#,
#inventCode#, #inventName#, #inventRecordId#, #amount#, #weight#, #inventCode#, #inventName#, #inventRecordId#, #amount#, #weight#,
#createdBy#, #createdTime#, #updatedBy#, #createdBy#, #createdTime#, #updatedBy#,
#updatedTime#, #version# #updatedTime#, #version#
......
<?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="tHpkc010a">
<sql id="column">
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
DATE_PROC as "dateProc", <!-- 日期 -->
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", <!-- 重量 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
VERSION as "version" <!-- 版本号 -->
</sql>
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="dateProc">
DATE_PROC = #dateProc#
</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 = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventRecordId">
INVENT_RECORD_ID = #inventRecordId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="amount">
AMOUNT = #amount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="weight">
WEIGHT = #weight#
</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="version">
VERSION = #version#
</isNotEmpty>
</sql>
<sql id="order">
<dynamic prepend="ORDER BY">
<isNotEmpty property="order">
$orderBy$
</isNotEmpty>
<isEmpty property="order">
ID asc
</isEmpty>
</dynamic>
</sql>
<select id="query" resultClass="com.baosight.hpjx.hp.kc.domain.HPKC010A">
SELECT
<include refid="column"/>
FROM ${hpjxSchema}.T_HPKC010A
WHERE 1=1
<include refid="condition"/>
<include refid="order"/>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPKC010A WHERE 1=1
<include refid="condition"/>
</select>
<!-- 备份数据 -->
<insert id="backup">
INSERT INTO ${hpjxSchema}.T_HPKC010A (
COMPANY_CODE, DEP_CODE, DATE_PROC, WH_CODE, WH_NAME, INVENT_TYPE,
INVENT_CODE, INVENT_NAME, INVENT_RECORD_ID, AMOUNT, WEIGHT,
CREATED_BY, CREATED_NAME, CREATED_TIME, UPDATED_BY, UPDATED_NAME,
UPDATED_TIME, VERSION
)
SELECT
COMPANY_CODE, DEP_CODE, #dateProc#, WH_CODE, WH_NAME, INVENT_TYPE,
INVENT_CODE, INVENT_NAME, INVENT_RECORD_ID, AMOUNT, WEIGHT,
CREATED_BY, CREATED_NAME, CREATED_TIME, UPDATED_BY, UPDATED_NAME,
UPDATED_TIME, VERSION
FROM ${hpjxSchema}.T_HPKC010
</insert>
</sqlMap>
...@@ -55,10 +55,10 @@ ...@@ -55,10 +55,10 @@
<sql id="customCondition"> <sql id="customCondition">
<isNotEmpty prepend=" AND " property="createdDateFrom"> <isNotEmpty prepend=" AND " property="createdDateFrom">
A.CREATED_TIME &gt;= CONCAT(REPLACE(#depositDateFrom#, '-', ''), '000000') A.CREATED_TIME &gt;= CONCAT(REPLACE(#createdDateFrom#, '-', ''), '000000')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateTo"> <isNotEmpty prepend=" AND " property="createdDateTo">
A.CREATED_TIME &lt;= CONCAT(REPLACE(#depositDateTo#, '-', ''), '235959') A.CREATED_TIME &lt;= CONCAT(REPLACE(#createdDateTo#, '-', ''), '235959')
</isNotEmpty> </isNotEmpty>
</sql> </sql>
......
...@@ -34,37 +34,65 @@ ...@@ -34,37 +34,65 @@
<EF:EFRegion id="result" title="记录集"> <EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override"> <EF:EFGrid blockId="result" autoDraw="override">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFComboColumn cname="库存类型" ename="kcType" enable="false" width="80" align="center"> <EF:EFColumn ename="dateProc" cname="日期" enable="false" width="90" align="center"/>
<EF:EFCodeOption codeName="hpjx.hpkc.kcType"/> <EF:EFComboColumn ename="inventType" cname="存货类型" enable="false" width="90" align="center">
</EF:EFComboColumn>
<EF:EFColumn cname="日期" ename="dateProc" enable="false" width="90" align="center"/>
<EF:EFComboColumn cname="存货类型" ename="inventType" enable="false" width="90" align="center">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/> <EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFComboColumn cname="仓库名称" ename="whCode" enable="false" width="100" align="center" <EF:EFComboColumn ename="whCode" cname="仓库名称" enable="false" width="100" align="center"
blockName="wh_record_block_id" textField="textField" valueField="valueField" blockName="wh_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#"> columnTemplate="#=textField#" itemTemplate="#=textField#">
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFComboColumn cname="存货名称" ename="inventCode" enable="false" width="100" align="center" <EF:EFComboColumn ename="inventCode" cname="存货名称" enable="false" width="100" align="center"
blockName="invent_name_block_id" textField="textField" valueField="valueField" blockName="invent_name_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#"> columnTemplate="#=textField#" itemTemplate="#=textField#">
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn cname="规格" ename="spec" enable="false" width="120"/> <EF:EFComboColumn ename="inventRecordId" cname="规格" enable="false" width="120" align="center"
<EF:EFColumn cname="期初数量" ename="initAmount" enable="false" width="90" align="right" format="{0:N3}" blockName="invent_spec_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#">
</EF:EFComboColumn>
<EF:EFColumn ename="initAmount" cname="期初数量" enable="false" width="100" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="initWeight" cname="期初重量" enable="false" width="100" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="cgEnterAmount" cname="采购入库数量" enable="false" width="100" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="cgEnterWeight" cname="采购入库重量" enable="false" width="100" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="scEnterAmount" cname="生产入库数量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="scEnterWeight" cname="生产入库重量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="qtEnterAmount" cname="其它入库数量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="qtEnterWeight" cname="其它入库重量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="enterAmount" cname="入库数量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="enterWeight" cname="入库重量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="scOuterAmount" cname="生产领料数量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="scOuterWeight" cname="生产领料重量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="xsOuterAmount" cname="销售出库数量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="xsOuterWeight" cname="销售出库重量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="qtOuterAmount" cname="其它出库数量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/> sumType="all"/>
<EF:EFColumn cname="期初重量" ename="initWeight" enable="false" width="90" align="right" format="{0:N3}" <EF:EFColumn ename="qtOuterWeight" cname="其它出库重量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/> sumType="all"/>
<EF:EFColumn cname="入库数量" ename="stockinAmount" enable="false" width="90" align="right" format="{0:N3}" <EF:EFColumn ename="outerAmount" cname="出库数量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/> sumType="all"/>
<EF:EFColumn cname="入库重量" ename="stockinWeight" enable="false" width="90" align="right" format="{0:N3}" <EF:EFColumn ename="outerWeight" cname="出库重量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/> sumType="all"/>
<EF:EFColumn cname="出库数量" ename="stockoutAmount" enable="false" width="90" align="right" format="{0:N3}" <EF:EFColumn ename="pdDiffAmount" cname="盘点差异数量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/> sumType="all"/>
<EF:EFColumn cname="出库重量" ename="stockoutWeight" enable="false" width="90" align="right" format="{0:N3}" <EF:EFColumn ename="pdDiffWeight" cname="盘点差异重量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/> sumType="all"/>
<EF:EFColumn cname="期末数量" ename="endAmount" enable="false" width="90" align="right" format="{0:N3}" <EF:EFColumn ename="endAmount" cname="期末数量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/> sumType="all"/>
<EF:EFColumn cname="期末重量" ename="endWeight" enable="false" width="90" align="right" format="{0:N3}" <EF:EFColumn ename="endWeight" cname="期末重量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/> sumType="all"/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
......
...@@ -247,6 +247,9 @@ $(function () { ...@@ -247,6 +247,9 @@ $(function () {
let $iframe = uploadFileWindow.element.children("iframe"); let $iframe = uploadFileWindow.element.children("iframe");
let iframejQuery = $iframe[0].contentWindow.$; // 子窗口中的jQuery对象 let iframejQuery = $iframe[0].contentWindow.$; // 子窗口中的jQuery对象
let uploadFile = iframejQuery("#fileDocId").val(); let uploadFile = iframejQuery("#fileDocId").val();
if (isBlank(uploadFile)) {
return;
}
let inEiInfo = new EiInfo(); let inEiInfo = new EiInfo();
inEiInfo.set("result-0-id", rowId); inEiInfo.set("result-0-id", rowId);
inEiInfo.set("result-0-filePath1", uploadFile); inEiInfo.set("result-0-filePath1", uploadFile);
...@@ -344,4 +347,4 @@ function check(id, auditStatus) { ...@@ -344,4 +347,4 @@ function check(id, auditStatus) {
async: false async: false
} }
); );
} }
\ No newline at end of file
...@@ -22,6 +22,9 @@ $(function () { ...@@ -22,6 +22,9 @@ $(function () {
let $iframe = uploadFileWindow.element.children("iframe"); let $iframe = uploadFileWindow.element.children("iframe");
let iframejQuery = $iframe[0].contentWindow.$; // 子窗口中的jQuery对象 let iframejQuery = $iframe[0].contentWindow.$; // 子窗口中的jQuery对象
let uploadFile = iframejQuery("#fileDocId").val(); let uploadFile = iframejQuery("#fileDocId").val();
if (isBlank(uploadFile)) {
return;
}
let inEiInfo = new EiInfo(); let inEiInfo = new EiInfo();
inEiInfo.set("result-0-matId", $("#inqu_status-0-matId").val()); inEiInfo.set("result-0-matId", $("#inqu_status-0-matId").val());
inEiInfo.set("result-0-docId", uploadFile); inEiInfo.set("result-0-docId", uploadFile);
......
...@@ -51,6 +51,9 @@ $(function() { ...@@ -51,6 +51,9 @@ $(function() {
let $iframe = uploadFileWindow.element.children("iframe"); let $iframe = uploadFileWindow.element.children("iframe");
let iframejQuery = $iframe[0].contentWindow.$; // 子窗口中的jQuery对象 let iframejQuery = $iframe[0].contentWindow.$; // 子窗口中的jQuery对象
let uploadFile = iframejQuery("#fileDocId").val(); let uploadFile = iframejQuery("#fileDocId").val();
if (isBlank(uploadFile)) {
return;
}
let inEiInfo = new EiInfo(); let inEiInfo = new EiInfo();
inEiInfo.set("result-0-id", rowId); inEiInfo.set("result-0-id", rowId);
inEiInfo.set("result-0-affix", uploadFile); inEiInfo.set("result-0-affix", uploadFile);
......
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