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
4d473550
Commit
4d473550
authored
Feb 28, 2024
by
liulei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
下料登记优化
parent
07b96c3c
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
63 additions
and
6 deletions
+63
-6
HPSC007.java
src/main/java/com/baosight/hpjx/hp/sc/domain/HPSC007.java
+1
-0
ServiceHPSC007.java
.../java/com/baosight/hpjx/hp/sc/service/ServiceHPSC007.java
+14
-2
HPSC007.xml
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC007.xml
+30
-0
HPSCTools.java
src/main/java/com/baosight/hpjx/hp/sc/tools/HPSCTools.java
+17
-2
HPSC006.jsp
src/main/webapp/HP/SC/HPSC006.jsp
+0
-1
HPSC007.jsp
src/main/webapp/HP/SC/HPSC007.jsp
+1
-1
No files found.
src/main/java/com/baosight/hpjx/hp/sc/domain/HPSC007.java
View file @
4d473550
...
...
@@ -386,6 +386,7 @@ public class HPSC007 extends DaoEPBase {
}
/**
* get the value from Map.
*
...
...
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC007.java
View file @
4d473550
...
...
@@ -6,6 +6,7 @@ import com.baosight.hpjx.core.constant.CommonConstant;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.core.security.UserSessionUtils
;
import
com.baosight.hpjx.hp.constant.HPConstant
;
import
com.baosight.hpjx.hp.sc.domain.HPSC004
;
import
com.baosight.hpjx.hp.sc.domain.HPSC005
;
import
com.baosight.hpjx.hp.sc.domain.HPSC006
;
import
com.baosight.hpjx.hp.sc.domain.HPSC007
;
...
...
@@ -96,11 +97,17 @@ public class ServiceHPSC007 extends ServiceBase {
DaoUtils
.
insert
(
"HPSC007.insert"
,
HPSC007
);
}
// 修改下料表中的字段
HPSC006
.
setActualCompletionNum
(
HPSC006
.
getActualCompletionNum
().
add
(
totalNum
));
HPSC006
.
setActualCompletionTotalWt
(
HPSC006
.
getActualCompletionTotalWt
().
add
(
actualCompletionTotalWt
));
if
(
HPSC006
.
getActualCompletionNum
().
compareTo
(
HPSC006
.
getNum
())
>=
0
)
{
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"hpsc006Id"
,
HPSC006
.
getId
());
List
<
HPSC007
>
Hpsc007
=
this
.
dao
.
query
(
"HPSC007.query"
,
queryMap
);
String
maxPlanCompletionDate
=
Hpsc007
.
stream
().
map
(
com
.
baosight
.
hpjx
.
hp
.
sc
.
domain
.
HPSC007
::
getActualCompletionDate
).
max
(
String:
:
compareTo
)
.
orElse
(
""
);
HPSC006
.
setStatus
(
2
);
HPSC006
.
setActualCompletionDate
(
DateUtils
.
shortDateTime
()
);
HPSC006
.
setActualCompletionDate
(
maxPlanCompletionDate
);
}
HPSCTools
.
Hpsc006
.
updateCompleteNum
(
HPSC006
.
getId
(),
HPSC006
.
getActualCompletionNum
(),
HPSC006
.
getActualCompletionTotalWt
(),
HPSC006
.
getStatus
(),
HPSC006
.
getActualCompletionDate
());
...
...
@@ -157,8 +164,13 @@ public class ServiceHPSC007 extends ServiceBase {
HPSC006
.
setActualCompletionNum
(
HPSC006
.
getActualCompletionNum
().
add
(
totalNum
));
HPSC006
.
setActualCompletionTotalWt
(
HPSC006
.
getActualCompletionTotalWt
().
add
(
actualCompletionTotalWt
));
if
(
HPSC006
.
getActualCompletionNum
().
compareTo
(
HPSC006
.
getNum
())
>=
0
)
{
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"hpsc006Id"
,
HPSC006
.
getId
());
List
<
HPSC007
>
Hpsc007
=
this
.
dao
.
query
(
"HPSC007.query"
,
queryMap
);
String
maxPlanCompletionDate
=
Hpsc007
.
stream
().
map
(
com
.
baosight
.
hpjx
.
hp
.
sc
.
domain
.
HPSC007
::
getActualCompletionDate
).
max
(
String:
:
compareTo
)
.
orElse
(
""
);
HPSC006
.
setStatus
(
2
);
HPSC006
.
setActualCompletionDate
(
DateUtils
.
shortDateTime
()
);
HPSC006
.
setActualCompletionDate
(
maxPlanCompletionDate
);
}
else
{
HPSC006
.
setStatus
(
1
);
HPSC006
.
setActualCompletionDate
(
" "
);
...
...
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC007.xml
View file @
4d473550
...
...
@@ -96,6 +96,36 @@
</select>
<select
id=
"queryList"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.List"
>
SELECT
ID as "id",
COMPANY_CODE as "companyCode",
<!-- 企业编码 预留 -->
HPSC006_ID as "hpsc006Id",
<!-- 生产下料ID -->
ACTUAL_COMPLETION_DATE as "actualCompletionDate",
<!-- 实际完工日期 -->
ACTUAL_COMPLETION_NUM as "actualCompletionNum",
<!-- 实际完工数量 -->
ACTUAL_COMPLETION_TOTAL_WT as "actualCompletionTotalWt",
<!-- 实际完工重量 -->
USER_ID as "userId",
<!-- 完成人ID -->
USER_NAME as "userName",
<!-- 完成人姓名 -->
CREATED_BY as "createdBy",
<!-- 创建人 -->
CREATED_TIME as "createdTime",
<!-- 创建时间 -->
UPDATED_BY as "updatedBy",
<!-- 更新人 -->
UPDATED_TIME as "updatedTime",
<!-- 更新时间 -->
DEP_CODE as "depCode",
<!-- 部门编码 -->
REMARK as "remark"
<!-- 备注 -->
FROM ${hpjxSchema}.T_HPSC007 WHERE 1=1
<include
refid=
"condition"
/>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"orderBy"
>
$orderBy$
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
ID asc
</isEmpty>
</dynamic>
</select>
<select
id=
"count"
resultClass=
"int"
>
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPSC007 WHERE 1=1
<include
refid=
"condition"
/>
...
...
src/main/java/com/baosight/hpjx/hp/sc/tools/HPSCTools.java
View file @
4d473550
...
...
@@ -792,13 +792,28 @@ public class HPSCTools {
* @param id
* @return
*/
public
static
HPSC007
getById
(
Long
id
)
{
public
static
List
<
HPSC007
>
getById
(
Long
id
)
{
AssertUtils
.
isNull
(
id
,
"生产下料ID不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"id"
,
id
);
List
<
HPSC007
>
results
=
DaoBase
.
getInstance
().
query
(
HPSC007
.
QUERY
,
queryMap
);
AssertUtils
.
isNull
(
results
,
String
.
format
(
"生产下料ID[%s]信息不存在"
,
id
));
return
results
.
get
(
0
);
return
results
;
}
/**
* 查询
*
* @param
* @return
*/
public
static
List
<
HPSC007
>
getBy006Id
(
Long
id
)
{
AssertUtils
.
isNull
(
id
,
"生产下料ID不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"hpsc006Id"
,
id
);
List
<
HPSC007
>
results
=
DaoBase
.
getInstance
().
query
(
HPSC007
.
QUERY
,
queryMap
);
AssertUtils
.
isNull
(
results
,
String
.
format
(
"生产下料ID[%s]信息不存在"
,
id
));
return
results
;
}
}
}
src/main/webapp/HP/SC/HPSC006.jsp
View file @
4d473550
...
...
@@ -70,7 +70,6 @@
<EF:EFColumn
enable=
"false"
format=
"{0:N3}"
ename=
"totalWt"
width=
"80"
cname=
"总重"
/>
<EF:EFComboColumn
ename=
"factoryCode"
cname=
"厂区"
width=
"110"
align=
"center"
filter=
"contains"
readonly=
"true"
>
<EF:EFOption
label=
" "
value=
""
/>
<EF:EFOptions
blockId=
"factory_record_block_id"
valueField=
"valueField"
textField=
"textField"
/>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"orgNo"
cname=
"生产组"
width=
"110"
align=
"center"
readonly=
"true"
/>
...
...
src/main/webapp/HP/SC/HPSC007.jsp
View file @
4d473550
...
...
@@ -42,7 +42,7 @@
<EF:EFInput
ename=
"productionOrderNo"
type=
"hidden"
/>
<EF:EFGrid
blockId=
"result"
autoDraw=
"override"
checkMode=
"row"
>
<EF:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
<EF:EFColumn
ename=
"actualCompletionDate"
required=
'true'
cname=
"完成日期"
dateFormat=
"yyyy-MM-dd"
parseFormats=
"['yyyyMMdd']"
/>
<EF:EFColumn
ename=
"actualCompletionDate"
editType=
"date"
cname=
"完成日期"
dateFormat=
"yyyy-MM-dd"
parseFormats=
"['yyyyMMdd']"
/>
<EF:EFColumn
ename=
"hpsc006Id"
cname=
"生产下料ID"
hidden=
"true"
/>
<EF:EFPopupColumn
ename=
"userId"
cname=
"完成人"
popupType=
"ServiceGrid"
popupTitle=
"人员信息"
serviceName=
"HPXSUser"
methodName=
"queryComboBox"
resultId=
"user_block_id"
...
...
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