Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hp-smart
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
platform
hp-smart
Commits
ace52f87
Commit
ace52f87
authored
Apr 07, 2024
by
wancheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
app驾驶舱优化
parent
d3a82c21
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
12 deletions
+47
-12
ServiceHPMT003.java
.../java/com/baosight/hpjx/hp/mt/service/ServiceHPMT003.java
+26
-5
HPMT003.xml
src/main/java/com/baosight/hpjx/hp/mt/sql/HPMT003.xml
+21
-7
No files found.
src/main/java/com/baosight/hpjx/hp/mt/service/ServiceHPMT003.java
View file @
ace52f87
...
@@ -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
;
}
}
}
}
src/main/java/com/baosight/hpjx/hp/mt/sql/HPMT003.xml
View file @
ace52f87
...
@@ -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>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment