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
ab35b494
Commit
ab35b494
authored
Mar 26, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://git.pseer.com/platform/hp-smart
into dev
parents
fbad462e
f36f40dc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
11 deletions
+43
-11
ServiceHPMT002.java
.../java/com/baosight/hpjx/hp/mt/service/ServiceHPMT002.java
+4
-9
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 @
ab35b494
...
@@ -76,19 +76,14 @@ public class ServiceHPMT002 extends ServiceBase {
...
@@ -76,19 +76,14 @@ public class ServiceHPMT002 extends ServiceBase {
Map
sqlMap
=
new
HashMap
();
Map
sqlMap
=
new
HashMap
();
sqlMap
.
put
(
"companyCode"
,
companyCode
);
sqlMap
.
put
(
"companyCode"
,
companyCode
);
sqlMap
.
put
(
"projName"
,
projName
);
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
;
offset
=(
offset
-
1
)*
pageSize
;
sqlMap
.
put
(
"offset"
,
offset
);
sqlMap
.
put
(
"offset"
,
offset
);
sqlMap
.
put
(
"pageSize"
,
pageSize
);
sqlMap
.
put
(
"pageSize"
,
pageSize
);
List
<
Map
>
rows
=
this
.
dao
.
query
(
"HPMT002.pmProject"
,
sqlMap
);
List
<
Map
>
rows
=
this
.
dao
.
query
(
"HPMT002.pmProject"
,
sqlMap
);
List
<
Map
>
maps
=
new
ArrayList
<>();
List
<
Map
>
maps
=
new
ArrayList
<>();
for
(
Map
row
:
rows
)
{
resultMap
.
put
(
"result"
,
rows
);
if
(!
row
.
get
(
"actualCompletionNum"
).
equals
(
row
.
get
(
"num"
))){
resultMap
.
put
(
"count"
,
count
.
size
());
maps
.
add
(
row
);
}
}
resultMap
.
put
(
"result"
,
maps
);
resultMap
.
put
(
"count"
,
count
.
get
(
0
));
resultMap
.
put
(
"status"
,
EiConstant
.
STATUS_SUCCESS
);
resultMap
.
put
(
"status"
,
EiConstant
.
STATUS_SUCCESS
);
resultMap
.
put
(
"message"
,
"SUCCESS"
);
resultMap
.
put
(
"message"
,
"SUCCESS"
);
return
resultMap
;
return
resultMap
;
...
...
src/main/java/com/baosight/hpjx/hp/mt/sql/HPMT002.xml
View file @
ab35b494
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
<sqlMap
namespace=
"HPMT002"
>
<sqlMap
namespace=
"HPMT002"
>
<select
id=
"pmProject"
resultClass=
"java.util.HashMap"
>
<select
id=
"pmProject"
resultClass=
"java.util.HashMap"
>
SELECT * FROM (
SELECT
SELECT
ID as "id",
ID as "id",
COMPANY_CODE as "companyCode",
<!-- 企业编码 预留 -->
COMPANY_CODE as "companyCode",
<!-- 企业编码 预留 -->
...
@@ -42,16 +43,52 @@
...
@@ -42,16 +43,52 @@
PROJ_NAME LIKE CONCAT('%', #projName#, '%')
PROJ_NAME LIKE CONCAT('%', #projName#, '%')
</isNotEmpty>
</isNotEmpty>
order by STATUS,PLAN_COMPLETION_DATE
order by STATUS,PLAN_COMPLETION_DATE
) AS A WHERE actualCompletionNum!=num
limit #offset#, #pageSize#
limit #offset#, #pageSize#
</select>
</select>
<select
id=
"pmProjectCount"
resultClass=
"int"
>
<select
id=
"pmProjectCount"
resultClass=
"java.util.HashMap"
>
SELECT * FROM (
SELECT
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#
FROM hpjx.T_HPSC003 WHERE COMPANY_CODE= #companyCode#
<isNotEmpty
prepend=
" AND "
property=
"projName"
>
<isNotEmpty
prepend=
" AND "
property=
"projName"
>
PROJ_NAME LIKE CONCAT('%', #projName#, '%')
PROJ_NAME LIKE CONCAT('%', #projName#, '%')
</isNotEmpty>
</isNotEmpty>
order by STATUS,PLAN_COMPLETION_DATE
) AS A WHERE actualCompletionNum!=num
</select>
</select>
<select
id=
"pmQuality"
resultClass=
"java.util.HashMap"
>
<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