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
f36f40dc
Commit
f36f40dc
authored
Mar 25, 2024
by
liulei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
APP文件上传
parent
8d26570c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
10 deletions
+42
-10
ServiceHPMT002.java
.../java/com/baosight/hpjx/hp/mt/service/ServiceHPMT002.java
+3
-8
HPMT002.xml
src/main/java/com/baosight/hpjx/hp/mt/sql/HPMT002.xml
+39
-2
No files found.
src/main/java/com/baosight/hpjx/hp/mt/service/ServiceHPMT002.java
View file @
f36f40dc
...
...
@@ -76,19 +76,14 @@ public class ServiceHPMT002 extends ServiceBase {
Map
sqlMap
=
new
HashMap
();
sqlMap
.
put
(
"companyCode"
,
companyCode
);
sqlMap
.
put
(
"projName"
,
projName
);
List
count
=
this
.
dao
.
query
(
"HPMT002.pmProjectCount"
,
sqlMap
);
List
<
Map
>
count
=
this
.
dao
.
query
(
"HPMT002.pmProjectCount"
,
sqlMap
);
offset
=(
offset
-
1
)*
pageSize
;
sqlMap
.
put
(
"offset"
,
offset
);
sqlMap
.
put
(
"pageSize"
,
pageSize
);
List
<
Map
>
rows
=
this
.
dao
.
query
(
"HPMT002.pmProject"
,
sqlMap
);
List
<
Map
>
maps
=
new
ArrayList
<>();
for
(
Map
row
:
rows
)
{
if
(!
row
.
get
(
"actualCompletionNum"
).
equals
(
row
.
get
(
"num"
))){
maps
.
add
(
row
);
}
}
resultMap
.
put
(
"result"
,
maps
);
resultMap
.
put
(
"count"
,
count
.
get
(
0
));
resultMap
.
put
(
"result"
,
rows
);
resultMap
.
put
(
"count"
,
count
.
size
());
resultMap
.
put
(
"status"
,
EiConstant
.
STATUS_SUCCESS
);
resultMap
.
put
(
"message"
,
"SUCCESS"
);
return
resultMap
;
...
...
src/main/java/com/baosight/hpjx/hp/mt/sql/HPMT002.xml
View file @
f36f40dc
...
...
@@ -3,6 +3,7 @@
<sqlMap
namespace=
"HPMT002"
>
<select
id=
"pmProject"
resultClass=
"java.util.HashMap"
>
SELECT * FROM (
SELECT
ID as "id",
COMPANY_CODE as "companyCode",
<!-- 企业编码 预留 -->
...
...
@@ -42,16 +43,52 @@
PROJ_NAME LIKE CONCAT('%', #projName#, '%')
</isNotEmpty>
order by STATUS,PLAN_COMPLETION_DATE
) AS A WHERE actualCompletionNum!=num
limit #offset#, #pageSize#
</select>
<select
id=
"pmProjectCount"
resultClass=
"int"
>
<select
id=
"pmProjectCount"
resultClass=
"java.util.HashMap"
>
SELECT * FROM (
SELECT
COUNT(*)
ID as "id",
COMPANY_CODE as "companyCode",
<!-- 企业编码 预留 -->
PROJ_TYPE as "projType",
<!-- 项目类型 -->
PROJ_CODE as "projCode",
<!-- 项目编码 -->
PROJ_NAME as "projName",
<!-- 项目名称 -->
PLAN_INFO_NO as "planInfoNo",
<!-- 生产计划单号 -->
PLAN_COMPLETION_DATE as "planCompletionDate",
<!-- 计划完成日期 -->
STATUS as "status",
<!-- 状态 0-计划中,1-生产中 -->
CONCAT((
SELECT
format((ifnull( SUM( ACTUAL_COMPLETION_NUM ), 0 ) / ifnull( SUM( NUM ), 0 ) * 100),2)
FROM
hpjx.T_HPSC004
WHERE
PARENT_ID = hpjx.T_HPSC003.PLAN_INFO_NO
),'%') AS "schedule",
<!-- 进度 -->
(
SELECT
IFNULL( SUM( ACTUAL_COMPLETION_UNIT_WT ), 0 )
FROM
hpjx.T_HPSC004
WHERE
PARENT_ID = hpjx.T_HPSC003.PLAN_INFO_NO
) AS "actualCompletionNum"
<!-- 完成重量 -->
,
(
SELECT
IFNULL( SUM( TOTAL_WT ),2)
FROM
hpjx.T_HPSC004
WHERE
PARENT_ID = hpjx.T_HPSC003.PLAN_INFO_NO
) AS "num"
<!-- 计划重量 -->
FROM hpjx.T_HPSC003 WHERE COMPANY_CODE= #companyCode#
<isNotEmpty
prepend=
" AND "
property=
"projName"
>
PROJ_NAME LIKE CONCAT('%', #projName#, '%')
</isNotEmpty>
order by STATUS,PLAN_COMPLETION_DATE
) AS A WHERE actualCompletionNum!=num
</select>
<select
id=
"pmQuality"
resultClass=
"java.util.HashMap"
>
...
...
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