Commit 6fdf5c1d by liuyang

Merge branch 'dev' of http://git.pseer.com:8800/platform/hg-smart into dev-ly

 Conflicts:
	src/main/java/com/baosight/hggp/hg/constant/HGSqlConstant.java
	src/main/java/com/baosight/hggp/hg/pz/tools/HGPZTools.java
parents 0e73e9b1 0364fded
...@@ -199,4 +199,23 @@ ...@@ -199,4 +199,23 @@
<include refid="idCondition"/> <include refid="idCondition"/>
</update> </update>
<!-- 统计库存 -->
<select id="statDate" resultClass="com.baosight.hggp.hg.kc.domain.HGKC001">
SELECT
COMPANY_CODE AS "companyCode",
DEP_CODE AS "depCode",
WH_CODE AS "whCode",
INVENT_TYPE AS "inventType",
INVENT_CODE AS "inventCode",
SPEC_ID AS "specId",
COALESCE(SUM(DEPOSIT_QTY), 0) AS "depositQty",
COALESCE(SUM(DEPOSIT_WEIGHT), 0) AS "depositWeight"
FROM ${hggpSchema}.HGKC001
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>
...@@ -342,4 +342,23 @@ ...@@ -342,4 +342,23 @@
ID = #id# ID = #id#
</update> </update>
<!-- 统计库存 -->
<select id="statDate" resultClass="com.baosight.hggp.hg.kc.domain.HGKC006A">
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(AMOUNT), 0) AS "amount",
COALESCE(SUM(INV_WEIGHT), 0) AS "invWeight"
FROM ${hggpSchema}.HGKC006A
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>
...@@ -335,4 +335,24 @@ ...@@ -335,4 +335,24 @@
ID = #id# ID = #id#
</update> </update>
<!-- 统计库存 -->
<select id="statDate" resultClass="com.baosight.hggp.hg.kc.domain.HGKC007A">
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(INV_QTY), 0) AS "invQty",
COALESCE(SUM(INV_WEIGHT), 0) AS "invWeight"
FROM ${hggpSchema}.HGKC007A
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>
...@@ -233,4 +233,23 @@ ...@@ -233,4 +233,23 @@
id IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate> id IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
</delete> </delete>
<!-- 统计库存 -->
<select id="statDate" resultClass="com.baosight.hggp.hg.kc.domain.HGKC008A">
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(INV_QTY), 0) AS "invQty",
COALESCE(SUM(INV_WEIGHT), 0) AS "invWeight"
FROM ${hggpSchema}.HGKC008A
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>
...@@ -52,7 +52,7 @@ public class HGKCTools { ...@@ -52,7 +52,7 @@ public class HGKCTools {
} }
Map paramMap = new HashMap(); Map paramMap = new HashMap();
paramMap.put("depositNos", depositNos); paramMap.put("depositNos", depositNos);
DaoBase.getInstance().update(HGSqlConstant.HgKc001.LOCK, paramMap); DaoBase.getInstance().update(HGSqlConstant.HGKC001.LOCK, paramMap);
} }
/** /**
......
package com.baosight.hggp.hg.pz.tools; package com.baosight.hggp.hg.pz.tools;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.common.InventTypeEnum; import com.baosight.hggp.common.InventTypeEnum;
import com.baosight.hggp.core.constant.CommonConstant; import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoBase; import com.baosight.hggp.core.dao.DaoBase;
...@@ -7,6 +8,11 @@ import com.baosight.hggp.core.dao.DaoUtils; ...@@ -7,6 +8,11 @@ import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.enums.ValidFlagEnum; import com.baosight.hggp.core.enums.ValidFlagEnum;
import com.baosight.hggp.hg.constant.HGConstant; import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.pz.domain.*; import com.baosight.hggp.hg.pz.domain.*;
import com.baosight.hggp.hg.sc.domain.HGSC001A;
import com.baosight.hggp.hg.sc.domain.HGSC005A;
import com.baosight.hggp.hg.sj.domain.HGSJ003;
import com.baosight.hggp.util.*;
import com.baosight.iplat4j.common.ed.domain.TEDCM01;
import com.baosight.hggp.hg.pz.domain.HGPZ002; import com.baosight.hggp.hg.pz.domain.HGPZ002;
import com.baosight.hggp.hg.pz.domain.HGPZ003; import com.baosight.hggp.hg.pz.domain.HGPZ003;
import com.baosight.hggp.hg.pz.domain.HGPZ005; import com.baosight.hggp.hg.pz.domain.HGPZ005;
...@@ -76,7 +82,156 @@ public class HGPZTools { ...@@ -76,7 +82,156 @@ public class HGPZTools {
} }
/** /**
* HPPZ005 公共DAO定义 * HGPZ004 公共DAO定义
*
* @author:songx
* @date:2024/2/6,13:37
*/
public static class hgpz004 {
/**
* 查询存货
*
* @param inventCode
* @return
*/
public static HGPZ004 getByCode(String inventCode) {
AssertUtils.isEmpty(inventCode, "存货编码不能为空");
Map queryMap = new HashMap();
queryMap.put("inventCode", inventCode);
List<HGPZ004> pz004s = DaoBase.getInstance().query(HGPZ004.QUERY, queryMap);
if(pz004s!=null&&pz004s.size()==0){
pz004s = null;
}
AssertUtils.isEmpty(pz004s, String.format("存货编码[%s]不存在", inventCode));
return pz004s.get(0);
}
/**
* 查询存货信息
*
* @param inventCodes
* @return
*/
public static List<HGPZ004> list(List<String> inventCodes) {
if (CollectionUtils.isEmpty(inventCodes)) {
return null;
}
Map queryMap = new HashMap();
queryMap.put("inventCodes", inventCodes);
return DaoBase.getInstance().query(HGPZ004.QUERY, queryMap);
}
/**
* 查询存货信息
*
* @param inventCodes
* @return
*/
public static Map<String, HGPZ004> map(List<String> inventCodes) {
List<HGPZ004> pz004s = list(inventCodes);
if (CollectionUtils.isEmpty(pz004s)) {
return null;
}
return pz004s.stream().collect(Collectors.toMap(HGPZ004::getInventType, item -> item));
}
}
/**
* 仓库管理
* HPPZ007 公共DAO定义
*
* @author:songx
* @date:2024/2/6,13:37
*/
public static class HgPz007 {
/**
* 查询
*
* @param whCode
* @return
*/
public static HGPZ007 get(String whCode) {
AssertUtils.isEmpty(whCode, "仓库编码不能为空");
Map queryMap = new HashMap();
queryMap.put("whCode", whCode);
List<HGPZ007> results = DaoBase.getInstance().query(HGPZ007.QUERY, queryMap);
return CollectionUtils.isEmpty(results) ? null : results.get(0);
}
/**
* 查询仓库信息
*
* @param whCodes
* @return
*/
public static List<HGPZ007> list(List<String> whCodes) {
if (CollectionUtils.isEmpty(whCodes)) {
return null;
}
Map queryMap = new HashMap();
queryMap.put("whCodes", whCodes);
return DaoBase.getInstance().query("HGPZ007.query", queryMap);
}
/**
* 查询仓库信息
*
* @param whCodes
* @return
*/
public static Map<String, HGPZ007> map(List<String> whCodes) {
List<HGPZ007> pz007s = list(whCodes);
if (CollectionUtils.isEmpty(pz007s)) {
return null;
}
return pz007s.stream().collect(Collectors.toMap(HGPZ007::getWhCode, item -> item));
}
}
/**
* HPPZ009 公共DAO定义
*
* @author:songx
* @date:2024/2/6,13:37
*/
public static class HgPz009 {
/**
* 查询企业信息
*
* @param accountCode
* @return
*/
public static HGPZ009 getByCode(String accountCode) {
AssertUtils.isEmpty(accountCode, "企业编码不能为空");
Map queryMap = new HashMap();
queryMap.put("accountCode", accountCode);
List<HGPZ009> pz009s = DaoBase.getInstance().query(HGPZ009.QUERY, queryMap);
return CollectionUtils.isEmpty(pz009s) ? null : pz009s.get(0);
}
/**
* 企业是否启用
*
* @param accountCode
* @return
*/
public static boolean isValid(String accountCode) {
HGPZ009 pz009 = getByCode(accountCode);
if (pz009 == null) {
return false;
}
return !ValidFlagEnum.STOP.getCode().equals(pz009.getValidFlag());
}
}
/**
* 存货管理
* HGPZ005 公共DAO定义
* *
* @author:songx * @author:songx
* @date:2024/2/6,13:37 * @date:2024/2/6,13:37
...@@ -495,7 +650,7 @@ public class HGPZTools { ...@@ -495,7 +650,7 @@ public class HGPZTools {
* @date:2024/2/6,13:37 * @date:2024/2/6,13:37
*/ */
public static class HgPz007 { public static class HgPz007 {
/** /**
* 查询 * 查询
* *
...@@ -510,7 +665,7 @@ public class HGPZTools { ...@@ -510,7 +665,7 @@ public class HGPZTools {
return CollectionUtils.isEmpty(results) ? null : results.get(0); return CollectionUtils.isEmpty(results) ? null : results.get(0);
} }
} }
/** /**
* HPPZ009 公共DAO定义 * HPPZ009 公共DAO定义
* *
...@@ -518,7 +673,7 @@ public class HGPZTools { ...@@ -518,7 +673,7 @@ public class HGPZTools {
* @date:2024/2/6,13:37 * @date:2024/2/6,13:37
*/ */
public static class HgPz009 { public static class HgPz009 {
/** /**
* 查询企业信息 * 查询企业信息
* *
...@@ -532,7 +687,7 @@ public class HGPZTools { ...@@ -532,7 +687,7 @@ public class HGPZTools {
List<HGPZ009> pz009s = DaoBase.getInstance().query(HGPZ009.QUERY, queryMap); List<HGPZ009> pz009s = DaoBase.getInstance().query(HGPZ009.QUERY, queryMap);
return CollectionUtils.isEmpty(pz009s) ? null : pz009s.get(0); return CollectionUtils.isEmpty(pz009s) ? null : pz009s.get(0);
} }
/** /**
* 企业是否启用 * 企业是否启用
* *
...@@ -546,7 +701,7 @@ public class HGPZTools { ...@@ -546,7 +701,7 @@ public class HGPZTools {
} }
return !ValidFlagEnum.STOP.getCode().equals(pz009.getValidFlag()); return !ValidFlagEnum.STOP.getCode().equals(pz009.getValidFlag());
} }
} }
} }
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="companyName" cname="公司名称" hidden="true"/> <EF:EFColumn ename="companyName" cname="公司名称" hidden="true"/>
<EF:EFColumn ename="projCode" cname="项目编码" enable="true" width="120" align="center"/> <EF:EFColumn ename="projCode" cname="项目编码" enable="true" width="120" align="center" required="true"/>
<EF:EFColumn ename="projName" cname="项目名称" width="120" align="center" enable="false"/> <EF:EFColumn ename="projName" cname="项目名称" width="120" align="center" enable="false"/>
<EF:EFColumn ename="blueprintCode" cname="蓝图编码" enable="true" width="120" align="center" required="true"/> <EF:EFColumn ename="blueprintCode" cname="蓝图编码" enable="true" width="120" align="center" required="true"/>
<EF:EFColumn ename="blueprintName" cname="蓝图名称" enable="false" width="120" align="center"/> <EF:EFColumn ename="blueprintName" cname="蓝图名称" enable="false" width="120" align="center"/>
......
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