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
94397c7b
Commit
94397c7b
authored
Nov 18, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生产计划添加排产功能
parent
ac45f1a3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
75 additions
and
0 deletions
+75
-0
ServiceHPSC103.java
.../java/com/baosight/hpjx/hp/sc/service/ServiceHPSC103.java
+35
-0
HPSC103.js
src/main/webapp/HP/SC/HPSC103.js
+40
-0
No files found.
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC103.java
View file @
94397c7b
...
...
@@ -382,4 +382,39 @@ public class ServiceHPSC103 extends ServiceEPBase {
}
}
}
@OperationLogAnnotation
(
operModul
=
"生产计划"
,
operType
=
"排产"
,
operDesc
=
"提交排产"
)
public
EiInfo
submitProduc
(
EiInfo
inInfo
)
{
try
{
List
<
HPSC003
>
hpsc003s
=
MapUtils
.
toDaoEPBases
(
inInfo
,
HPSC003
.
class
);
for
(
HPSC003
hpsc003
:
hpsc003s
)
{
List
<
HPSC004
>
hpsc004s
=
HPSCTools
.
HpSc004
.
queryByParent
(
hpsc003
.
getPlanInfoNo
());
for
(
HPSC004
hpsc004:
hpsc004s
)
{
String
startDate
=
handleEndDate
(
hpsc004
.
getPlanCommentDate
());
String
endDate
=
handleEndDate
(
hpsc004
.
getPlanCompletionDate
());
hpsc004
.
setPlanCommentDate
(
startDate
);
hpsc004
.
setPlanCompletionDate
(
endDate
);
DaoUtils
.
update
(
HPSC004
.
UPDATE
,
hpsc004
);
}
String
planCompletionDate
=
handleEndDate
(
hpsc003
.
getPlanCompletionDate
());
hpsc003
.
setPlanCompletionDate
(
planCompletionDate
);
DaoUtils
.
update
(
HPSC003
.
UPDATE
,
hpsc003
);
}
}
catch
(
PlatException
e
){
LogUtils
.
setMsg
(
inInfo
,
e
,
"提交排产失败"
);
}
return
inInfo
;
}
/**
* 处理计划完成日期
* @param endDate 计划完成日期
* @return 处理后的计划完成日期减3天
*/
private
static
String
handleEndDate
(
String
endDate
){
if
(
StringUtils
.
isNotBlank
(
endDate
)){
endDate
=
DateUtils
.
toDateStr
(
DateUtils
.
addDays
(
DateUtils
.
toDate
(
endDate
,
DateUtils
.
DATE8_PATTERN
),-
3
),
DateUtils
.
DATE8_PATTERN
);
}
return
endDate
;
}
}
src/main/webapp/HP/SC/HPSC103.js
View file @
94397c7b
...
...
@@ -66,6 +66,10 @@ $(function () {
pageOffset
=
e
.
page
;
console
.
log
(
e
.
page
);
},
loadComplete
:
function
(
grid
)
{
//此grid对象
$
(
"#SUBMIT_PRODUC"
).
on
(
"click"
,
submitProduc
);
},
onSave
:
function
(
e
)
{
// 阻止默认请求,使用自定义保存
e
.
preventDefault
();
...
...
@@ -462,3 +466,39 @@ let imgClick = function (docId) {
$
(
this
).
fadeOut
(
"fast"
);
});
}
let
submitProduc
=
function
()
{
let
rows
=
resultGrid
.
getCheckedRows
();
if
(
rows
.
length
<
1
)
{
message
(
"请选择数据"
);
return
;
}
let
flag
=
true
;
$
.
each
(
rows
,
function
(
index
,
item
)
{
let
status
=
item
.
get
(
"status"
);
if
(
status
==
"1"
){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
任务已提交
\"
,不能排产!"
);
flag
=
false
;
return
false
;
}
});
if
(
flag
){
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
排产
\"
操作? "
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result"
,
"HPSC003"
,
"submitProduc"
,
true
,
function
(
ei
)
{
if
(
ei
.
getStatus
()
>=
0
)
{
if
(
ei
.
getStatus
()
==
0
)
{
NotificationUtil
(
ei
,
'warning'
);
}
else
{
NotificationUtil
(
ei
);
}
query
();
}
else
{
NotificationUtil
(
ei
,
"error"
);
}
})
}
});
}
}
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