Commit 6f0e87b6 by yukang

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

parents 231bcabd bca5f0c1
...@@ -14,6 +14,7 @@ import com.baosight.hpjx.util.EiInfoUtils; ...@@ -14,6 +14,7 @@ import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils; import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.ObjectUtils; import com.baosight.hpjx.util.ObjectUtils;
import com.baosight.hpjx.util.StringUtil; import com.baosight.hpjx.util.StringUtil;
import com.baosight.hpjx.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException; import com.baosight.iplat4j.core.exception.PlatException;
...@@ -76,6 +77,7 @@ public class ServiceHPKC002 extends ServiceBase { ...@@ -76,6 +77,7 @@ public class ServiceHPKC002 extends ServiceBase {
queryRow.put("receiptDate", StringUtil.removeSpecifiedCharacter(receiptDate, queryRow.put("receiptDate", StringUtil.removeSpecifiedCharacter(receiptDate,
StringUtil.DEFAULT_CHARACTER_TO_BE_REMOVED)); StringUtil.DEFAULT_CHARACTER_TO_BE_REMOVED));
queryRow.put("inventTypes", DEFAULT_INVENT_CODE); queryRow.put("inventTypes", DEFAULT_INVENT_CODE);
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,"isAmount",1);
inInfo = super.query(inInfo, HPKC002.QUERY, new HPKC002()); inInfo = super.query(inInfo, HPKC002.QUERY, new HPKC002());
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败"); LogUtils.setDetailMsg(inInfo, e, "查询失败");
......
...@@ -24,6 +24,7 @@ import com.baosight.hpjx.util.ObjectUtils; ...@@ -24,6 +24,7 @@ import com.baosight.hpjx.util.ObjectUtils;
import com.baosight.hpjx.hp.sc.domain.HPSC006; import com.baosight.hpjx.hp.sc.domain.HPSC006;
import com.baosight.hpjx.hp.sc.tools.HPSCTools; import com.baosight.hpjx.hp.sc.tools.HPSCTools;
import com.baosight.hpjx.util.*; import com.baosight.hpjx.util.*;
import com.baosight.hpjx.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase; import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
...@@ -91,6 +92,7 @@ public class ServiceHPKC002A extends ServiceEPBase { ...@@ -91,6 +92,7 @@ public class ServiceHPKC002A extends ServiceEPBase {
try { try {
Map queryRow = EiInfoUtils.getFirstRow(inInfo); Map queryRow = EiInfoUtils.getFirstRow(inInfo);
queryRow.put("inventTypes", DEFAULT_INVENT_CODE); queryRow.put("inventTypes", DEFAULT_INVENT_CODE);
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,"isAmount",1);
inInfo = super.query(inInfo, HPKC010.QUERY, new HPKC010()); inInfo = super.query(inInfo, HPKC010.QUERY, new HPKC010());
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败"); LogUtils.setDetailMsg(inInfo, e, "查询失败");
......
...@@ -13,6 +13,7 @@ import com.baosight.hpjx.hp.kc.tools.HPKCTools; ...@@ -13,6 +13,7 @@ import com.baosight.hpjx.hp.kc.tools.HPKCTools;
import com.baosight.hpjx.hp.sc.domain.HPSC006; import com.baosight.hpjx.hp.sc.domain.HPSC006;
import com.baosight.hpjx.hp.sc.tools.HPSCTools; import com.baosight.hpjx.hp.sc.tools.HPSCTools;
import com.baosight.hpjx.util.*; import com.baosight.hpjx.util.*;
import com.baosight.hpjx.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase; import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
...@@ -81,6 +82,7 @@ public class ServiceHPKC002B extends ServiceEPBase { ...@@ -81,6 +82,7 @@ public class ServiceHPKC002B extends ServiceEPBase {
try { try {
Map queryRow = EiInfoUtils.getFirstRow(inInfo); Map queryRow = EiInfoUtils.getFirstRow(inInfo);
queryRow.put("inventTypes", DEFAULT_INVENT_CODE); queryRow.put("inventTypes", DEFAULT_INVENT_CODE);
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,"isAmount",1);
inInfo = super.query(inInfo, HPKC010.QUERY, new HPKC010()); inInfo = super.query(inInfo, HPKC010.QUERY, new HPKC010());
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败"); LogUtils.setDetailMsg(inInfo, e, "查询失败");
......
...@@ -17,6 +17,7 @@ import com.baosight.hpjx.util.EiInfoUtils; ...@@ -17,6 +17,7 @@ import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils; import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.MapUtils; import com.baosight.hpjx.util.MapUtils;
import com.baosight.hpjx.util.ObjectUtils; import com.baosight.hpjx.util.ObjectUtils;
import com.baosight.hpjx.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase; import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
...@@ -72,6 +73,7 @@ public class ServiceHPKC005A extends ServiceEPBase { ...@@ -72,6 +73,7 @@ public class ServiceHPKC005A extends ServiceEPBase {
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
Map queryRow = EiInfoUtils.getFirstRow(inInfo); Map queryRow = EiInfoUtils.getFirstRow(inInfo);
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,"isAmount",1);
inInfo = super.query(inInfo, HPKC010.QUERY, new HPKC010()); inInfo = super.query(inInfo, HPKC010.QUERY, new HPKC010());
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败"); LogUtils.setDetailMsg(inInfo, e, "查询失败");
......
...@@ -17,6 +17,7 @@ import com.baosight.hpjx.util.EiInfoUtils; ...@@ -17,6 +17,7 @@ import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils; import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.MapUtils; import com.baosight.hpjx.util.MapUtils;
import com.baosight.hpjx.util.ObjectUtils; import com.baosight.hpjx.util.ObjectUtils;
import com.baosight.hpjx.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase; import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
...@@ -76,6 +77,7 @@ public class ServiceHPKC007A extends ServiceEPBase { ...@@ -76,6 +77,7 @@ public class ServiceHPKC007A extends ServiceEPBase {
try { try {
Map queryRow = EiInfoUtils.getFirstRow(inInfo); Map queryRow = EiInfoUtils.getFirstRow(inInfo);
queryRow.put("inventTypes", DEFAULT_INVENT_CODE); queryRow.put("inventTypes", DEFAULT_INVENT_CODE);
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,"isAmount",1);
inInfo = super.query(inInfo, HPKC010.QUERY, new HPKC010()); inInfo = super.query(inInfo, HPKC010.QUERY, new HPKC010());
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败"); LogUtils.setDetailMsg(inInfo, e, "查询失败");
......
...@@ -119,6 +119,9 @@ ...@@ -119,6 +119,9 @@
<isNotEmpty prepend=" AND " property="factoryName"> <isNotEmpty prepend=" AND " property="factoryName">
FACTORY_NAME = #factoryName# FACTORY_NAME = #factoryName#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="isAmount">
AMOUNT != 0
</isNotEmpty>
</sql> </sql>
<sql id="customCondition"> <sql id="customCondition">
......
...@@ -149,6 +149,42 @@ ...@@ -149,6 +149,42 @@
from ( from (
select select
a.GROUP_NAME as SERIES, a.GROUP_NAME as SERIES,
concat(substring(replace(date_sub(str_to_date(#date#,'%Y%m%d'), INTERVAL 6 day),'-',''),5,2),'/',substring(replace(date_sub(str_to_date(#date#,'%Y%m%d'), INTERVAL 6 day),'-',''),7,2)) as X,
sum(ifnull(WEIGHT,0)+ifnull(WEIGHT_JH,0))/2 as VALUE
,replace(date_sub(str_to_date(#date#,'%Y%m%d'), INTERVAL 6 day),'-','') as date,
case when right(a.GROUP_NAME,2) = '一组' then 1
when right(a.GROUP_NAME,2) = '二组' then 2
when right(a.GROUP_NAME,2) = '三组' then 3
else 4 end as SORT
from (select a.ORG_ID as FACTORY_CODE,c.ORG_ID as GROUP_CODE,c.ORG_CNAME as GROUP_NAME,a.COMPANY_CODE
from iplat.TXSOG01 a
join iplat.TXSOG01 b on a.ORG_ID = b.PARENT_ORG_ID
join iplat.TXSOG01 c on b.ORG_ID = c.PARENT_ORG_ID
where a.ORG_TYPE = 'factory' and b.ORG_TYPE = 'dept' and c.ORG_TYPE = 'prodGroup' and a.IS_DELETED = 0 and b.IS_DELETED =0 and c.IS_DELETED = 0 and a.ORG_ID = #factorycode#) a
left join hpjx.t_hpsc009 b on b.FACTORY_CODE = a.FACTORY_CODE and b.GROUP_CODE = a.GROUP_CODE and b.COMPANY_CODE = #companyCode# and b.DELETE_FLAG = 0
and b.REGISTER_DATE = replace(date_sub(str_to_date(#date#,'%Y%m%d'), INTERVAL 6 day),'-','') and b.FACTORY_CODE = #factorycode#
group by a.GROUP_NAME,b.REGISTER_DATE
union all
select
a.GROUP_NAME as SERIES,
concat(substring(replace(date_sub(str_to_date(#date#,'%Y%m%d'), INTERVAL 5 day),'-',''),5,2),'/',substring(replace(date_sub(str_to_date(#date#,'%Y%m%d'), INTERVAL 5 day),'-',''),7,2)) as X,
sum(ifnull(WEIGHT,0)+ifnull(WEIGHT_JH,0))/2 as VALUE
,replace(date_sub(str_to_date(#date#,'%Y%m%d'), INTERVAL 5 day),'-','') as date,
case when right(a.GROUP_NAME,2) = '一组' then 1
when right(a.GROUP_NAME,2) = '二组' then 2
when right(a.GROUP_NAME,2) = '三组' then 3
else 4 end as SORT
from (select a.ORG_ID as FACTORY_CODE,c.ORG_ID as GROUP_CODE,c.ORG_CNAME as GROUP_NAME,a.COMPANY_CODE
from iplat.TXSOG01 a
join iplat.TXSOG01 b on a.ORG_ID = b.PARENT_ORG_ID
join iplat.TXSOG01 c on b.ORG_ID = c.PARENT_ORG_ID
where a.ORG_TYPE = 'factory' and b.ORG_TYPE = 'dept' and c.ORG_TYPE = 'prodGroup' and a.IS_DELETED = 0 and b.IS_DELETED =0 and c.IS_DELETED = 0 and a.ORG_ID = #factorycode#) a
left join hpjx.t_hpsc009 b on b.FACTORY_CODE = a.FACTORY_CODE and b.GROUP_CODE = a.GROUP_CODE and b.COMPANY_CODE = #companyCode# and b.DELETE_FLAG = 0
and b.REGISTER_DATE = replace(date_sub(str_to_date(#date#,'%Y%m%d'), INTERVAL 5 day),'-','') and b.FACTORY_CODE = #factorycode#
group by a.GROUP_NAME,b.REGISTER_DATE
union all
select
a.GROUP_NAME as SERIES,
concat(substring(replace(date_sub(str_to_date(#date#,'%Y%m%d'), INTERVAL 4 day),'-',''),5,2),'/',substring(replace(date_sub(str_to_date(#date#,'%Y%m%d'), INTERVAL 4 day),'-',''),7,2)) as X, concat(substring(replace(date_sub(str_to_date(#date#,'%Y%m%d'), INTERVAL 4 day),'-',''),5,2),'/',substring(replace(date_sub(str_to_date(#date#,'%Y%m%d'), INTERVAL 4 day),'-',''),7,2)) as X,
sum(ifnull(WEIGHT,0)+ifnull(WEIGHT_JH,0))/2 as VALUE sum(ifnull(WEIGHT,0)+ifnull(WEIGHT_JH,0))/2 as VALUE
,replace(date_sub(str_to_date(#date#,'%Y%m%d'), INTERVAL 4 day),'-','') as date, ,replace(date_sub(str_to_date(#date#,'%Y%m%d'), INTERVAL 4 day),'-','') as date,
......
...@@ -50,10 +50,14 @@ public class ServiceHPSC005A extends ServiceBase { ...@@ -50,10 +50,14 @@ public class ServiceHPSC005A extends ServiceBase {
HPSC005 dbSc005 = HPSCTools.HpSc005.get(prodOrderNo); HPSC005 dbSc005 = HPSCTools.HpSc005.get(prodOrderNo);
inInfo.addBlock(CommonConstant.Field.DETAIL).addRow(dbSc005); inInfo.addBlock(CommonConstant.Field.DETAIL).addRow(dbSc005);
queryMap.put("userId", UserSessionUtils.getUserId()); queryMap.put("userId", UserSessionUtils.getUserId());
queryMap.put("orgType", "prodGroup");
queryMap.put(HPSC005.FIELD_FACTORY_CODE, dbSc005.getFactoryCode());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.USER_GROUP_BLOCK_ID), queryMap, false); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.USER_GROUP_BLOCK_ID), queryMap, false);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.FACTORY_RECORD_BLOCK_ID), null, false); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.FACTORY_RECORD_BLOCK_ID), null, false);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.FACTORY_RECORD_BLOCK_ID,DdynamicEnum.GROUP_PRO_BLOCK_ID),
new HashMap<String,Object>(){{put(HPSC005.FIELD_FACTORY_CODE,dbSc005.getFactoryCode());}}, false); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.FACTORY_RECORD_BLOCK_ID,DdynamicEnum.GROUP_RECORD_BLOCK_ID),
queryMap, false);
/*new HashMap<String,Object>(){{put(HPSC005.FIELD_FACTORY_CODE,dbSc005.getFactoryCode());}}*/
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC005A().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC005A().eiMetadata);
} catch (Exception e) { } catch (Exception e) {
LogUtils.setMsg(inInfo, e, "初始化失败"); LogUtils.setMsg(inInfo, e, "初始化失败");
......
...@@ -146,7 +146,22 @@ ...@@ -146,7 +146,22 @@
FROM ${platSchema}.TXSOG01 FROM ${platSchema}.TXSOG01
WHERE 1=1 WHERE 1=1
AND ORG_TYPE = 'factory' AND ORG_TYPE = 'factory'
<include refid="condition"/> AND IS_DELETED = '0'
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="orgEname">
ORG_ENAME = #orgEname#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="orgCname">
ORG_CNAME LIKE CONCAT('%', #orgCname#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="orgId">
ORG_ID = #orgId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentOrgId">
PARENT_ORG_ID = #parentOrgId#
</isNotEmpty>
<include refid="order"/> <include refid="order"/>
</select> </select>
...@@ -182,6 +197,9 @@ ...@@ -182,6 +197,9 @@
<isNotEmpty prepend=" AND " property="orgType"> <isNotEmpty prepend=" AND " property="orgType">
T3.ORG_TYPE = #orgType# T3.ORG_TYPE = #orgType#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCode">
T3.FACTORY_CODE = #factoryCode#
</isNotEmpty>
ORDER BY T2.LEVEL, T3.ORG_ID ORDER BY T2.LEVEL, T3.ORG_ID
</select> </select>
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
<EF:EFColumn ename="factoryName" cname="工厂" enable="false" align="center" hidden="true"/>--%> <EF:EFColumn ename="factoryName" cname="工厂" enable="false" align="center" hidden="true"/>--%>
<EF:EFComboColumn ename="orgNo" cname="生产组" width="110" align="center" defaultValue="" required="true" <EF:EFComboColumn ename="orgNo" cname="生产组" width="110" align="center" defaultValue="" required="true"
filter="contains" readonly="true"> filter="contains" readonly="true">
<EF:EFOptions blockId="group_pro_block_id" valueField="valueField" textField="textField"/> <EF:EFOptions blockId="group_record_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="orgName" cname="生产组名称" enable="false" align="center" hidden="true"/> <EF:EFColumn ename="orgName" cname="生产组名称" enable="false" align="center" hidden="true"/>
<EF:EFColumn ename="workDate" cname="派工时间" enable="false" width="100" align="center" <EF:EFColumn ename="workDate" cname="派工时间" enable="false" width="100" 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