Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hg-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
hg-smart
Commits
02060db6
Commit
02060db6
authored
May 24, 2024
by
wuwenlong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
派工bugfix
parent
3b0d4d14
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
36 additions
and
28 deletions
+36
-28
ServiceHGSC005A.java
...java/com/baosight/hggp/hg/sc/service/ServiceHGSC005A.java
+6
-0
HGSC006A.xml
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC006A.xml
+2
-2
HGSCTools.java
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
+3
-3
HGSC006A.js
src/main/webapp/HG/SC/HGSC006A.js
+4
-4
HGSC006A.jsp
src/main/webapp/HG/SC/HGSC006A.jsp
+0
-2
HGSC006B.js
src/main/webapp/HG/SC/HGSC006B.js
+7
-5
HGSC006B.jsp
src/main/webapp/HG/SC/HGSC006B.jsp
+14
-12
No files found.
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC005A.java
View file @
02060db6
...
...
@@ -71,6 +71,12 @@ public class ServiceHGSC005A extends ServiceBase {
}
private
void
checkSaveData
(
List
<
HGSC005A
>
hgsc005AList
)
{
AssertUtils
.
isEmpty
(
hgsc005AList
,
"保存数据为空,请勾选后修改保存!"
);
AssertUtils
.
isEmpty
(
hgsc005AList
.
get
(
0
).
getPlanCode
(),
"生产计划详情数据异常,请联系管理员!"
);
HGSC005
hgsc005
=
HGSCTools
.
THGSC005
.
queryByPlanCode
(
hgsc005AList
.
get
(
0
).
getPlanCode
());
AssertUtils
.
isTrue
(
Objects
.
isNull
(
hgsc005
.
getCommitStatus
()),
"生产计划状态异常,请联系管理员!"
);
AssertUtils
.
isTrue
(
hgsc005
.
getCommitStatus
().
compareTo
(
CommonConstant
.
YesNo
.
NO_0
)>
0
,
"生产计划已提交,不可修改!"
);
for
(
HGSC005A
hgsc005a
:
hgsc005AList
)
{
AssertUtils
.
isEmpty
(
hgsc005a
.
getPlanStartDate
(),
String
.
format
(
"产品[%s]计划开工日期为空!"
,
hgsc005a
.
getProductName
()));
AssertUtils
.
isEmpty
(
hgsc005a
.
getPlanEndDate
(),
String
.
format
(
"产品[%s]计划完工日期为空!"
,
hgsc005a
.
getProductName
()));
...
...
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC006A.xml
View file @
02060db6
...
...
@@ -481,10 +481,10 @@
assign_quantity = #assignQuantity#,
<!-- 派工数量 -->
unassign_quantity = #unassignQuantity#,
<!-- 未派工数量 -->
<isNotEmpty
property=
"assignWeight"
>
assign_weight = #assignWeight#
assign_weight = #assignWeight#
,
</isNotEmpty>
<isNotEmpty
property=
"unassignWeight"
>
unassign_weight = #unassignWeight#
unassign_weight = #unassignWeight#
,
</isNotEmpty>
<include
refid=
"updateRevise"
/>
WHERE id = #id#
...
...
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
View file @
02060db6
...
...
@@ -64,7 +64,7 @@ public class HGSCTools {
AssertUtils
.
isGt
(
new
BigDecimal
(
totalNum
),
new
BigDecimal
(
jhNum
),
"拆单的分派数量不能大于生产订单数量!"
);
Map
updateMap
=
new
HashMap
();
updateMap
.
put
(
hgsc006A
.
FIELD_id
,
hgsc006A
.
getId
());
updateMap
.
put
(
HGSC006A
.
FIELD_quantity
,
totalNum
);
updateMap
.
put
(
HGSC006A
.
FIELD_
assign_
quantity
,
totalNum
);
updateMap
.
put
(
HGSC006A
.
FIELD_unassign_quantity
,
jhNum
-
totalNum
);
if
(
Objects
.
nonNull
(
hgsc006A
.
getSingleWeight
())&&
hgsc006A
.
getSingleWeight
().
compareTo
(
BigDecimal
.
ZERO
)>
0
)
{
BigDecimal
assignWeight
=
hgsc006A
.
getSingleWeight
().
multiply
(
new
BigDecimal
(
totalNum
));
...
...
@@ -524,7 +524,7 @@ public class HGSCTools {
ComputeTypeEnum
computeType
=
ComputeTypeEnum
.
getEnumByCode
(
sj
.
getComputeType
());
switch
(
computeType
){
case
CD:
workHour
.
set
(
product
.
getLength
().
multiply
(
new
BigDecimal
(
planInfo
.
getQuantity
())).
multiply
(
unitConver
).
multiply
(
composingCoeff
)
workHour
.
set
(
product
.
getLength
().
multiply
(
new
BigDecimal
(
planInfo
.
getQuantity
())).
divide
(
unitConver
,
2
,
ROUND_DOWN
).
multiply
(
composingCoeff
)
.
divide
(
timing
,
2
,
ROUND_DOWN
)
.
multiply
(
baseWorkHour
).
add
(
finalRemainder
));
break
;
...
...
@@ -545,7 +545,7 @@ public class HGSCTools {
BigDecimal
day
=
workHour
.
get
().
divide
(
baseWorkHour
,
0
,
ROUND_DOWN
);
remainder
=
workHour
.
get
().
remainder
(
baseWorkHour
);
if
(
day
.
compareTo
(
new
BigDecimal
(
0
))>
0
)
{
endDate
=
DateUtil
.
toDateStr
(
DateUtils
.
addDays
(
DateUtil
.
toDate
(
endDate
,
DateUtil
.
DATE10_PATTERN
),
day
.
intValue
()),
DateUtil
.
DATE10_PATTERN
);
endDate
=
DateUtil
.
toDateStr
(
DateUtils
.
addDays
(
DateUtil
.
toDate
(
endDate
,
DateUtil
.
DATE10_PATTERN
),
day
.
negate
().
intValue
()),
DateUtil
.
DATE10_PATTERN
);
}
planInfo
.
setPlanStartDate
(
endDate
);
return
remainder
;
...
...
src/main/webapp/HG/SC/HGSC006A.js
View file @
02060db6
...
...
@@ -16,7 +16,7 @@ $(function () {
let
template
=
""
;
if
(
item
.
unassignQuantity
>
0
){
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="separateAssign(
\'
'
+
item
.
orderCode
+
'
\
'
)" >拆单派工</a>'
;
+
'onclick="separateAssign(
'
+
item
.
id
+
')" >拆单派工</a>'
;
}
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="showTaskInfo('
+
item
.
id
+
')" >任务详情</a>'
;
...
...
@@ -102,11 +102,11 @@ function assign() {
}
function
separateAssign
(
i
d
){
function
separateAssign
(
orderDetailI
d
){
JSColorbox
.
open
({
href
:
"HGSC006B?methodName=initLoad&inqu_status-0-
orderCode="
+
orderCode
,
href
:
"HGSC006B?methodName=initLoad&inqu_status-0-
id="
+
orderDetailId
,
title
:
"<div style='text-align: center;'>拆单派工</div>"
,
width
:
"
8
0%"
,
width
:
"
9
0%"
,
height
:
"90%"
,
callbackName
:
separateAssignCallback
});
...
...
src/main/webapp/HG/SC/HGSC006A.jsp
View file @
02060db6
...
...
@@ -18,8 +18,6 @@
<EF:EFInput
ename=
"inqu_status-0-projName"
cname=
"项目名称"
colWidth=
"3"
/>
<EF:EFDatePicker
cname=
"生产订单"
ename=
"inqu_status-0-createdTime"
colWidth=
"3"
format=
"yyyy-MM-dd"
readonly=
"false"
/>
<EF:EFDatePicker
cname=
"派工日期"
ename=
"inqu_status-0-assignDate"
colWidth=
"3"
format=
"yyyy-MM-dd"
readonly=
"false"
/>
</div>
</EF:EFRegion>
<EF:EFRegion
id=
"result"
title=
"记录集"
>
...
...
src/main/webapp/HG/SC/HGSC006B.js
View file @
02060db6
$
(
function
()
{
var
factoryGlobalData
=
__eiInfo
.
getBlock
(
"factory_record_block_id"
).
getMappedRows
();
let
factoryGlobalData
=
__eiInfo
.
getBlock
(
"factory_record_block_id"
).
getMappedRows
();
let
groupGlobalData
=
__eiInfo
.
getBlock
(
"group_record_block_id"
).
getMappedRows
();
IPLATUI
.
EFGrid
=
{
...
...
@@ -18,6 +18,7 @@ $(function () {
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
factoryGlobalData
.
length
;
i
++
)
{
if
(
factoryGlobalData
[
i
][
'factoryCode'
]
===
dataItem
[
'factoryCode'
])
{
dataItem
[
'factoryName'
]
=
factoryGlobalData
[
i
][
'factoryName'
];
return
factoryGlobalData
[
i
][
'factoryName'
];
}
}
...
...
@@ -44,18 +45,19 @@ $(function () {
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
groupGlobalData
.
length
;
i
++
)
{
if
(
groupGlobalData
[
i
][
'groupCode'
]
===
dataItem
[
'groupCode'
])
{
return
groupGlobalData
[
i
][
'groupName'
];
dataItem
[
'groupName'
]
=
groupGlobalData
[
i
][
'groupName'
];
return
groupGlobalData
[
i
][
'groupName'
];
}
}
return
""
;
},
editor
:
function
(
container
,
options
)
{
editor
:
function
(
container
,
options
)
{
let
dataSource
;
let
inInfo
=
new
EiInfo
();
inInfo
.
set
(
"inqu_status-0-factoryCode"
,
options
.
model
[
"factoryCode"
]);
inInfo
.
set
(
"inqu_status-0-productType"
,
$
(
"#detail-0-productType"
).
val
());
inInfo
.
set
(
"field"
,
options
.
field
);
EiCommunicator
.
send
(
HGSC006B
,
groupRecordComboBox
,
inInfo
,
{
EiCommunicator
.
send
(
"HGSC006B"
,
"groupRecordComboBox"
,
inInfo
,
{
onSuccess
:
function
(
ei
)
{
dataSource
=
ei
.
getBlock
(
"group_record_block_id"
).
getMappedRows
();
},
...
...
@@ -106,7 +108,7 @@ $(function () {
}
}
$
(
"#QUERY"
).
on
(
"click"
,
query
);
//
$("#QUERY").on("click", query);
downKeyUp
();
});
...
...
src/main/webapp/HG/SC/HGSC006B.jsp
View file @
02060db6
...
...
@@ -15,7 +15,7 @@
<div
class=
"row"
>
<EF:EFInput
ename=
"detail-0-projCode"
cname=
"项目号"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"detail-0-projName"
cname=
"项目名称"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"detail-0-order
No
"
cname=
"生产订单号"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"detail-0-order
Code
"
cname=
"生产订单号"
colWidth=
"4"
readonly=
"true"
/>
</div>
<div
class=
"row"
>
<EF:EFInput
ename=
"detail-0-productCode"
cname=
"产品编码"
colWidth=
"4"
readonly=
"true"
/>
...
...
@@ -23,7 +23,7 @@
<EF:EFInput
ename=
"detail-0-processName"
cname=
"工序"
colWidth=
"4"
readonly=
"true"
/>
</div>
<div
class=
"row"
>
<EF:EFInput
ename=
"detail-0-plan
Completion
Date"
cname=
"计划完成日期"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"detail-0-plan
End
Date"
cname=
"计划完成日期"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"detail-0-singleWeight"
cname=
"单量(kg)"
format=
"{0:0.00}"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"detail-0-totalWeight"
cname=
"订单重量(kg)"
format=
"{0:0.00}"
colWidth=
"4"
readonly=
"true"
/>
</div>
...
...
@@ -43,17 +43,19 @@
<EF:EFRegion
id=
"result"
title=
"明细信息"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"override"
checkMode=
"row"
isFloat=
"true"
>
<EF:EFColumn
ename=
"id"
cname=
"任务ID"
enable=
"false"
width=
"80"
align=
"center
"
/>
<EF:EFColumn
ename=
"id"
cname=
"任务ID"
hidden=
"true
"
/>
<EF:EFColumn
ename=
"taskCode"
cname=
"任务单号"
enable=
"false"
hidden=
"true"
/>
<EF:EFComboColumn
ename=
"factoryCode"
cname=
"厂区"
width=
"110"
align=
"center"
defaultValue=
""
required=
"true"
filter=
"contains"
readonly=
"true"
>
<EF:EFOptions
blockId=
"factory_record_block_id"
valueField=
"valueField"
textField=
"textField"
/>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"factoryName"
cname=
"工厂"
enable=
"false"
align=
"center"
hidden=
"true"
/>
<EF:EFComboColumn
ename=
"groupCode"
cname=
"生产组"
width=
"110"
align=
"center"
defaultValue=
""
required=
"true"
filter=
"contains"
readonly=
"true"
>
<EF:EFOptions
blockId=
"group_record_block_id"
valueField=
"valueField"
textField=
"textField"
/>
</EF:EFComboColumn>
<
%
--
<
EF:EFComboColumn
ename=
"factoryCode"
cname=
"厂区"
width=
"110"
align=
"center"
defaultValue=
""
required=
"true"
--
%
>
<
%
--
filter=
"contains"
readonly=
"true"
>
--%>
<
%
--
<
EF:EFOptions
blockId=
"factory_record_block_id"
valueField=
"factoryCode"
textField=
"factoryName"
/>
--%>
<
%
--
</
EF:EFComboColumn
>
--%>
<EF:EFColumn
ename=
"factoryCode"
cname=
"厂区"
width=
"100"
align=
"center"
/>
<EF:EFColumn
ename=
"factoryName"
cname=
"工厂名称"
enable=
"false"
align=
"center"
hidden=
"true"
/>
<
%
--
<
EF:EFComboColumn
ename=
"groupCode"
cname=
"生产组"
width=
"110"
align=
"center"
defaultValue=
""
required=
"true"
--
%
>
<
%
--
filter=
"contains"
readonly=
"true"
>
--%>
<
%
--
<
EF:EFOptions
blockId=
"group_record_block_id"
valueField=
"groupCode"
textField=
"groupName"
/>
--%>
<
%
--
</
EF:EFComboColumn
>
--%>
<EF:EFColumn
ename=
"groupCode"
cname=
"生产组"
width=
"100"
align=
"center"
/>
<EF:EFColumn
ename=
"groupName"
cname=
"生产组名称"
enable=
"false"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"createdTime"
cname=
"派工时间"
enable=
"false"
width=
"100"
align=
"center"
editType=
"date"
dateFormat=
"yyyy-MM-dd"
parseFormats=
"['yyyyMMdd']"
required=
"true"
/>
...
...
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