Commit ace52f87 by wancheng

app驾驶舱优化

parent d3a82c21
...@@ -286,13 +286,9 @@ public class ServiceHPMT003 extends ServiceBase { ...@@ -286,13 +286,9 @@ public class ServiceHPMT003 extends ServiceBase {
public Map queryPmCompanyInfo(EiInfo inInfo) { public Map queryPmCompanyInfo(EiInfo inInfo) {
Map resultMap = new HashMap(); Map resultMap = new HashMap();
try { try {
String date = inInfo.getString("date").replace("-","");
String factorycode = inInfo.getString("factorycode");
String companyCode = UserSessionUtils.getCompanyCode(); String companyCode = UserSessionUtils.getCompanyCode();
Map sqlMap = new HashMap(); Map sqlMap = new HashMap();
sqlMap.put("companyCode", companyCode); sqlMap.put("companyCode", companyCode);
sqlMap.put("date", date);
sqlMap.put("factorycode", factorycode);
List<Map> rows = this.dao.query("HPMT003.queryPmCompanyInfo", sqlMap); List<Map> rows = this.dao.query("HPMT003.queryPmCompanyInfo", sqlMap);
List<Map> maps = new ArrayList<>(); List<Map> maps = new ArrayList<>();
resultMap.put("result",rows); resultMap.put("result",rows);
...@@ -307,5 +303,30 @@ public class ServiceHPMT003 extends ServiceBase { ...@@ -307,5 +303,30 @@ public class ServiceHPMT003 extends ServiceBase {
} }
/**
* APP驾驶舱-最新登记日期
*
* @param inInfo
* @return
*/
public Map queryMaxDate(EiInfo inInfo) {
Map resultMap = new HashMap();
try {
String factorycode = inInfo.getString("factorycode");
String companyCode = UserSessionUtils.getCompanyCode();
Map sqlMap = new HashMap();
sqlMap.put("companyCode", companyCode);
sqlMap.put("factorycode", factorycode);
List<Map> rows = this.dao.query("HPMT003.queryMaxDate", sqlMap);
List<Map> maps = new ArrayList<>();
resultMap.put("result",rows);
resultMap.put("status",EiConstant.STATUS_SUCCESS);
resultMap.put("message","SUCCESS");
return resultMap;
} catch (Exception e) {
resultMap.put("status", 500);
resultMap.put("message",LogUtils.getMsg(e));
return resultMap;
}
}
} }
...@@ -242,18 +242,19 @@ ...@@ -242,18 +242,19 @@
<select id="queryPmXMinfo" resultClass="java.util.HashMap"> <select id="queryPmXMinfo" resultClass="java.util.HashMap">
select PROJ_NAME,JHDATE,JHCL,SJCL,JD from (select select
a.PROJ_NAME , a.PROJ_NAME,
concat(left(max(a.PLAN_COMPLETION_DATE),4),'年',substring(max(a.PLAN_COMPLETION_DATE),5,2),'月',right(max(a.PLAN_COMPLETION_DATE),2),'日') as JHDATE, concat(left(max(a.PLAN_COMPLETION_DATE),4),'年',substring(max(a.PLAN_COMPLETION_DATE),5,2),'月',right(max(a.PLAN_COMPLETION_DATE),2),'日') as JHDATE,
concat(format(ifnull(sum(b.TOTAL_WT ),0),2),'吨') as JHCL, concat(format(ifnull(sum(b.TOTAL_WT ),0),2),'吨') as JHCL,
concat(format(ifnull(sum(ACTUAL_COMPLETION_UNIT_WT),0),2),'吨') as SJCL, concat(format(ifnull(sum(c.WEIGHT),0),2),'吨') as SJCL,
concat(format((ifnull( sum( ACTUAL_COMPLETION_NUM ), 0 ) / ifnull( sum( b.NUM ), 0 ) * 100),2),'%') as JD concat(format((ifnull( sum( c.AMOUNT ), 0 ) / ifnull( sum( b.NUM ), 0 ) * 100),2),'%') as SCJD,
concat(format((ifnull( sum( d.AMOUNT ), 0 ) / ifnull( sum( b.NUM ), 0 ) * 100),2),'%') as FHJD
from hpjx.T_HPSC003 a from hpjx.T_HPSC003 a
join hpjx.T_HPSC004 b on b.PARENT_ID = a.PLAN_INFO_NO join hpjx.T_HPSC004 b on b.PARENT_ID = a.PLAN_INFO_NO
join hpjx.T_HPSC005A c on c.PROD_ORDER_NO = b.PROD_ORDER_NO left join hpjx.T_HPkC003 c on c.PROD_ORDER_NO = b.PROD_ORDER_NO
left join hpjx.T_HPkC004 d on d.PROD_NO = b.PROD_ORDER_NO
where a.COMPANY_CODE = #companyCode# and c.FACTORY_CODE = #factorycode# where a.COMPANY_CODE = #companyCode# and c.FACTORY_CODE = #factorycode#
group by a.PROJ_NAME) a group by a.PROJ_NAME
where JD <![CDATA[<>]]> 100
</select> </select>
<select id="queryPmCompanyInfo" resultClass="java.util.HashMap"> <select id="queryPmCompanyInfo" resultClass="java.util.HashMap">
...@@ -261,4 +262,17 @@ ...@@ -261,4 +262,17 @@
from iplat.TXSOG01 from iplat.TXSOG01
where ORG_TYPE = 'factory' and COMPANY_CODE = #companyCode# and IS_DELETED = 0 where ORG_TYPE = 'factory' and COMPANY_CODE = #companyCode# and IS_DELETED = 0
</select> </select>
<select id="queryMaxDate" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT
MAX(REGISTER_DATE) as "registerDate" <!-- 最新登记日期 -->
FROM ${hpjxSchema}.T_HPXS001
WHERE 1=1 AND DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<!-- <isNotEmpty prepend=" AND " property="factoryCode">
FACTORY_CODE = #factoryCode#
</isNotEmpty>-->
</select>
</sqlMap> </sqlMap>
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