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
28ce2d0a
Commit
28ce2d0a
authored
Oct 10, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-10-10 生产任务添加报工状态和已报工数量
parent
96f4abf0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
86 additions
and
6 deletions
+86
-6
HGConstant.java
src/main/java/com/baosight/hggp/hg/constant/HGConstant.java
+12
-0
HGSC007.java
src/main/java/com/baosight/hggp/hg/sc/domain/HGSC007.java
+34
-0
HGSC007.xml
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC007.xml
+16
-4
HGSCTools.java
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
+20
-2
HGSC007.jsp
src/main/webapp/HG/SC/HGSC007.jsp
+4
-0
No files found.
src/main/java/com/baosight/hggp/hg/constant/HGConstant.java
View file @
28ce2d0a
...
...
@@ -505,4 +505,16 @@ public class HGConstant {
// 已提交
public
static
final
Integer
S1
=
1
;
}
// 报工状态
public
static
class
BGStatus
{
// 未报工
public
static
final
Integer
S0
=
0
;
// 部分报工
public
static
final
Integer
S1
=
1
;
// 已报工
public
static
final
Integer
S2
=
2
;
//超报工
public
static
final
Integer
S3
=
3
;
}
}
src/main/java/com/baosight/hggp/hg/sc/domain/HGSC007.java
View file @
28ce2d0a
...
...
@@ -69,6 +69,8 @@ public class HGSC007 extends DaoEPBase {
public
static
final
String
FIELD_IS_COMPLTE
=
"isComplete"
;
public
static
final
String
FIELD_TASK_QUANTITY
=
"taskQuantity"
;
public
static
final
String
FIELD_UN_TASK_QUANTITY
=
"unTaskQuantity"
;
public
static
final
String
FIELD_STATUS
=
"status"
;
public
static
final
String
FIELD_REGISTER_NUM
=
"registerNum"
;
public
static
final
String
COL_id
=
"id"
;
...
...
@@ -171,6 +173,8 @@ public class HGSC007 extends DaoEPBase {
private
Integer
isComplete
=
new
Integer
(
0
);
/* 是否完工 0-未报工 1-部分报工 2-已报工*/
private
BigDecimal
taskQuantity
=
new
BigDecimal
(
"0"
);
private
BigDecimal
unTaskQuantity
=
new
BigDecimal
(
"0"
);
private
Integer
status
=
new
Integer
(
0
);
/* 报工状态*/
private
BigDecimal
registerNum
=
new
BigDecimal
(
"0"
);
/**
...
...
@@ -388,6 +392,16 @@ public class HGSC007 extends DaoEPBase {
eiColumn
.
setDescName
(
"待报工数量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_STATUS
);
eiColumn
.
setDescName
(
"报工状态"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_REGISTER_NUM
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
0
);
eiColumn
.
setFieldLength
(
20
);
eiColumn
.
setDescName
(
"报工数量"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
/**
...
...
@@ -1094,6 +1108,22 @@ public class HGSC007 extends DaoEPBase {
this
.
unTaskQuantity
=
unTaskQuantity
;
}
public
Integer
getStatus
()
{
return
status
;
}
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
public
BigDecimal
getRegisterNum
()
{
return
registerNum
;
}
public
void
setRegisterNum
(
BigDecimal
registerNum
)
{
this
.
registerNum
=
registerNum
;
}
/**
* get the value from Map.
*
...
...
@@ -1148,6 +1178,8 @@ public class HGSC007 extends DaoEPBase {
setIsComplete
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_IS_COMPLTE
)),
isComplete
));
setTaskQuantity
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_TASK_QUANTITY
)),
taskQuantity
));
setUnTaskQuantity
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UN_TASK_QUANTITY
)),
unTaskQuantity
));
setStatus
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_STATUS
)),
status
));
setRegisterNum
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_REGISTER_NUM
)),
registerNum
));
}
...
...
@@ -1204,6 +1236,8 @@ public class HGSC007 extends DaoEPBase {
map
.
put
(
FIELD_IS_COMPLTE
,
StringUtils
.
toString
(
isComplete
,
eiMetadata
.
getMeta
(
FIELD_IS_COMPLTE
)));
map
.
put
(
FIELD_TASK_QUANTITY
,
StringUtils
.
toString
(
taskQuantity
,
eiMetadata
.
getMeta
(
FIELD_TASK_QUANTITY
)));
map
.
put
(
FIELD_UN_TASK_QUANTITY
,
StringUtils
.
toString
(
unTaskQuantity
,
eiMetadata
.
getMeta
(
FIELD_UN_TASK_QUANTITY
)));
map
.
put
(
FIELD_STATUS
,
StringUtils
.
toString
(
status
,
eiMetadata
.
getMeta
(
FIELD_STATUS
)));
map
.
put
(
FIELD_REGISTER_NUM
,
StringUtils
.
toString
(
registerNum
,
eiMetadata
.
getMeta
(
FIELD_REGISTER_NUM
)));
return
map
;
}
...
...
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC007.xml
View file @
28ce2d0a
...
...
@@ -45,7 +45,9 @@
updated_name as "updatedName",
<!-- 修改人名称 -->
updated_time as "updatedTime",
<!-- 更新时间 -->
LENGTH as "length",
<!-- 长 -->
SPEC as "spec"
<!-- 规格 -->
SPEC as "spec",
<!-- 规格 -->
STATUS as "status",
REGISTER_NUM as "registerNum"
</sql>
<sql
id=
"condition"
>
...
...
@@ -170,6 +172,12 @@
<isNotEmpty
prepend=
" AND "
property=
"updatedTime"
>
updated_time = #updatedTime#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"status"
>
STATUS = #status#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"registerNum"
>
REGISTER_NUM = #registerNum#
</isNotEmpty>
</sql>
<sql
id=
"customCondition"
>
...
...
@@ -741,14 +749,16 @@
updated_name,
<!-- 修改人名称 -->
updated_time,
<!-- 更新时间 -->
spec,
length
length,
STATUS,
REGISTER_NUM
) VALUES (
#matId#, #orderId#, #orderDetailId#, #techFlowId#, #techFlowName#, #inventProcessId#,
#processCode#, #processName#, #processOrder#, #companyCode#, #companyName#, #depCode#, #depName#, #projCode#,
#projName#, #taskCode#, #productType#, #productCode#, #productName#, #planStartDate#, #planEndDate#,
#factoryCode#, #factoryName#, #groupCode#, #groupName#, #completeDate#, #quantity#, #finishQuantity#,
#unfinishQuantity#, #singleWeight#, #totalWeight#, #finishWeight#, #unfinishWeight#, #accountCode#, #createdBy#,
#createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #spec#, #length#
#createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #spec#, #length#
, #status#, #registerNum#
)
</insert>
...
...
@@ -796,7 +806,9 @@
updated_name = #updatedName#,
<!-- 修改人名称 -->
updated_time = #updatedTime#,
<!-- 更新时间 -->
spec = #spec#,
length = #length#
length = #length#,
STATUS = #status#,
REGISTER_NUM = #registerNum#
WHERE id = #id#
</update>
...
...
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
View file @
28ce2d0a
...
...
@@ -1679,17 +1679,35 @@ public class HGSCTools {
Map
resultMap
=
EiInfoUtils
.
getFirstRow
(
info
,
EiConstant
.
resultBlock
);
String
taskId
=
MapUtils
.
getString
(
resultMap
,
HGSC008
.
FIELD_task_id
);
HGSC007
hgsc007
=
HGSCTools
.
THGSC007
.
getById
(
Long
.
valueOf
(
taskId
));
BigDecimal
quantity
=
MapUtils
.
getBigDecimal
(
resultMap
,
HGSC008
.
FIELD_quantity
);
BigDecimal
singleWeight
=
MapUtils
.
getBigDecimal
(
resultMap
,
HGSC008
.
FIELD_single_weight
);
BigDecimal
totalWeight
=
singleWeight
.
multiply
(
quantity
);
BigDecimal
unregisterQuantity
=
MapUtils
.
getBigDecimal
(
resultMap
,
HGSC008
.
FIELD_unregister_quantity
).
subtract
(
quantity
);
BigDecimal
registeredQuantity
=
MapUtils
.
getBigDecimal
(
resultMap
,
HGSC008
.
FIELD_registered_quantity
).
add
(
quantity
);
HGSC008
hgsc008
=
new
HGSC008
();
BeanUtils
.
copyProperties
(
hgsc007
,
hgsc008
);
cleanBaseInfo
(
hgsc008
);
hgsc008
.
setTaskId
(
hgsc007
.
getId
());
hgsc008
.
setQuantity
(
MapUtils
.
getBigDecimal
(
resultMap
,
HGSC008
.
FIELD_quantity
)
);
hgsc008
.
setQuantity
(
quantity
);
hgsc008
.
setRegisterDate
(
String
.
valueOf
(
resultMap
.
get
(
HGSC008
.
FIELD_register_date
)));
hgsc008
.
setExceedReason
(
resultMap
.
get
(
HGSC008
.
FIELD_exceed_reason
).
toString
());
hgsc008
.
setTotalWeight
(
hgsc007
.
getSingleWeight
().
multiply
(
hgsc008
.
getQuantity
())
);
hgsc008
.
setTotalWeight
(
totalWeight
);
checkAddDate
(
hgsc008
);
hgsc008
.
setWorkCode
(
SequenceGenerator
.
getNextSequence
(
HGConstant
.
SequenceId
.
HGSC008_WORK_CODE
));
DaoUtils
.
insert
(
HGSC008
.
INSERT
,
hgsc008
);
hgsc007
.
setRegisterNum
(
registeredQuantity
);
if
(
unregisterQuantity
.
compareTo
(
BigDecimal
.
ZERO
)
<
0
){
hgsc007
.
setStatus
(
HGConstant
.
BGStatus
.
S3
);
}
else
if
(
unregisterQuantity
.
compareTo
(
BigDecimal
.
ZERO
)
==
0
){
hgsc007
.
setStatus
(
HGConstant
.
BGStatus
.
S2
);
}
else
if
(
unregisterQuantity
.
compareTo
(
BigDecimal
.
ZERO
)
>
0
){
hgsc007
.
setStatus
(
HGConstant
.
BGStatus
.
S1
);
}
else
{
hgsc007
.
setStatus
(
HGConstant
.
BGStatus
.
S0
);
}
DaoUtils
.
update
(
HGSC007
.
UPDATE
,
hgsc007
);
HGZLTools
.
THGZL002
.
add
(
hgsc008
);
return
hgsc008
;
}
...
...
src/main/webapp/HG/SC/HGSC007.jsp
View file @
28ce2d0a
...
...
@@ -52,6 +52,10 @@
<EF:EFColumn
ename=
"quantity"
cname=
"任务数量"
width=
"100"
enable=
"false"
readonly=
"true"
align=
"center"
/>
<EF:EFColumn
ename=
"finishQuantity"
cname=
"完工数量"
width=
"100"
enable=
"false"
readonly=
"true"
align=
"center"
/>
<EF:EFColumn
ename=
"unfinishQuantity"
cname=
"未完工数量"
width=
"100"
enable=
"false"
readonly=
"true"
align=
"center"
/>
<EF:EFColumn
ename=
"registerNum"
cname=
"已报工数量"
width=
"100"
enable=
"false"
readonly=
"true"
align=
"center"
/>
<EF:EFComboColumn
ename=
"status"
cname=
"报工状态"
width=
"80"
align=
"center"
readonly=
"true"
>
<EF:EFCodeOption
codeName=
"hggp.hgsc.status"
/>
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
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