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
b76223c9
Commit
b76223c9
authored
Aug 12, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-08-12 生产任务的报工增加超报原因字段
parent
99af012a
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
70 additions
and
41 deletions
+70
-41
HGSC008.java
src/main/java/com/baosight/hggp/hg/sc/domain/HGSC008.java
+16
-0
HGSC008.xml
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC008.xml
+44
-41
HGSCTools.java
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
+1
-0
HGSC007A.js
src/main/webapp/HG/SC/HGSC007A.js
+7
-0
HGSC007A.jsp
src/main/webapp/HG/SC/HGSC007A.jsp
+1
-0
HGSC008.jsp
src/main/webapp/HG/SC/HGSC008.jsp
+1
-0
No files found.
src/main/java/com/baosight/hggp/hg/sc/domain/HGSC008.java
View file @
b76223c9
...
...
@@ -69,6 +69,7 @@ public class HGSC008 extends DaoEPBase {
public
static
final
String
FIELD_spec
=
"spec"
;
/* 规格*/
public
static
final
String
FIELD_length
=
"length"
;
/* 长*/
public
static
final
String
FIELD_exceed_reason
=
"exceedReason"
;
public
static
final
String
COL_id
=
"id"
;
public
static
final
String
COL_mat_id
=
"mat_id"
;
/* 物料清单ID*/
...
...
@@ -153,6 +154,7 @@ public class HGSC008 extends DaoEPBase {
private
String
updatedTime
=
" "
;
/* 更新时间*/
private
String
spec
=
" "
;
/* 规格*/
private
BigDecimal
length
=
new
BigDecimal
(
"0"
);
/* 长*/
private
String
exceedReason
=
" "
;
//补充字段
...
...
@@ -412,6 +414,10 @@ public class HGSC008 extends DaoEPBase {
eiColumn
.
setDescName
(
"长"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_exceed_reason
);
eiColumn
.
setDescName
(
"超报原因"
);
eiMetadata
.
addMeta
(
eiColumn
);
// private Integer registeredQuantity = new Integer(0);
// private BigDecimal registeredWeight = new BigDecimal(0);
// private Integer unregisterQuantity = new Integer(0);
...
...
@@ -1019,6 +1025,14 @@ public class HGSC008 extends DaoEPBase {
this
.
length
=
length
;
}
public
String
getExceedReason
()
{
return
exceedReason
;
}
public
void
setExceedReason
(
String
exceedReason
)
{
this
.
exceedReason
=
exceedReason
;
}
/**
* get the value from Map.
*
...
...
@@ -1072,6 +1086,7 @@ public class HGSC008 extends DaoEPBase {
setTaskWeight
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_task_weight
)),
taskWeight
));
setSpec
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_spec
)),
spec
));
setLength
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_length
)),
length
));
setExceedReason
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_exceed_reason
)),
exceedReason
));
}
/**
...
...
@@ -1125,6 +1140,7 @@ public class HGSC008 extends DaoEPBase {
map
.
put
(
FIELD_task_weight
,
StringUtils
.
toString
(
taskWeight
,
eiMetadata
.
getMeta
(
FIELD_task_weight
)));
map
.
put
(
FIELD_spec
,
StringUtils
.
toString
(
spec
,
eiMetadata
.
getMeta
(
FIELD_spec
)));
map
.
put
(
FIELD_length
,
StringUtils
.
toString
(
length
,
eiMetadata
.
getMeta
(
FIELD_length
)));
map
.
put
(
FIELD_exceed_reason
,
StringUtils
.
toString
(
exceedReason
,
eiMetadata
.
getMeta
(
FIELD_exceed_reason
)));
return
map
;
}
}
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC008.xml
View file @
b76223c9
...
...
@@ -196,7 +196,8 @@
updated_name as "updatedName",
<!-- 修改人名称 -->
updated_time as "updatedTime",
<!-- 更新时间 -->
length as "length",
<!-- 长 -->
spec as "spec"
<!-- 规格 -->
spec as "spec",
<!-- 规格 -->
exceed_reason as "exceedReason"
FROM ${hggpSchema}.HGSC008
WHERE 1=1
<include
refid=
"condition"
/>
...
...
@@ -365,13 +366,14 @@
updated_name,
<!-- 修改人名称 -->
updated_time,
<!-- 更新时间 -->
spec,
length
length,
exceed_reason
)
VALUES (#id#, #matId#, #taskId#, #techFlowId#, #techFlowName#, #inventProcessId#, #processCode#, #processName#,
#processOrder#, #companyCode#, #companyName#, #depCode#, #depName#, #projCode#, #projName#, #workCode#,
#productType#, #productCode#, #productName#, #planStartDate#, #planEndDate#, #factoryCode#, #factoryName#,
#groupCode#, #groupName#, #registerDate#, #quantity#, #singleWeight#, #totalWeight#, #accountCode#, #createdBy#,
#createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#,#spec#,#length#)
#createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#,#spec#,#length#
,#exceedReason#
)
<selectKey
resultClass=
"long"
keyProperty=
"id"
>
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGSC008
</selectKey>
...
...
@@ -385,44 +387,45 @@
<update
id=
"update"
>
UPDATE ${hggpSchema}.HGSC008
SET
mat_id = #matId#,
<!-- 物料清单ID -->
task_id = #taskId#,
<!-- 生产任务ID -->
tech_flow_id = #techFlowId#,
<!-- 工艺流程ID -->
tech_flow_name = #techFlowName#,
<!-- 工艺流程名称 -->
invent_process_id = #inventProcessId#,
<!-- 存货工序ID,对应HGPZ005A.id -->
process_code = #processCode#,
<!-- 工序编码 -->
process_name = #processName#,
<!-- 工序名称 -->
process_order = #processOrder#,
<!-- 加工顺序 -->
company_code = #companyCode#,
<!-- 公司编码 -->
company_name = #companyName#,
<!-- 公司名称 -->
dep_code = #depCode#,
<!-- 部门编码 -->
dep_name = #depName#,
<!-- 部门名称 -->
proj_code = #projCode#,
<!-- 项目编码 -->
proj_name = #projName#,
<!-- 项目名称 -->
work_code = #workCode#,
<!-- 报工编码 -->
product_type = #productType#,
<!-- 产品类型 -->
product_code = #productCode#,
<!-- 产品编号 -->
product_name = #productName#,
<!-- 产品名称 -->
plan_start_date = #planStartDate#,
<!-- 计划开始日期 -->
plan_end_date = #planEndDate#,
<!-- 计划结束日期 -->
factory_code = #factoryCode#,
<!-- 工厂编号 -->
factory_name = #factoryName#,
<!-- 工厂名称 -->
group_code = #groupCode#,
<!-- 工作组编号 -->
group_name = #groupName#,
<!-- 工作组名称 -->
register_date = #registerDate#,
<!-- 报工日期 -->
quantity = #quantity#,
<!-- 数量 -->
single_weight = #singleWeight#,
<!-- 单重 -->
total_weight = #totalWeight#,
<!-- 总重 -->
account_code = #accountCode#,
<!-- 帐套 -->
created_by = #createdBy#,
<!-- 创建人 -->
created_name = #createdName#,
<!-- 创建人名称 -->
created_time = #createdTime#,
<!-- 创建时间 -->
updated_by = #updatedBy#,
<!-- 更新人 -->
updated_name = #updatedName#,
<!-- 修改人名称 -->
updated_time = #updatedTime#,
<!-- 更新时间 -->
spec = #spec#,
length = #length#
WHERE
mat_id = #matId#,
<!-- 物料清单ID -->
task_id = #taskId#,
<!-- 生产任务ID -->
tech_flow_id = #techFlowId#,
<!-- 工艺流程ID -->
tech_flow_name = #techFlowName#,
<!-- 工艺流程名称 -->
invent_process_id = #inventProcessId#,
<!-- 存货工序ID,对应HGPZ005A.id -->
process_code = #processCode#,
<!-- 工序编码 -->
process_name = #processName#,
<!-- 工序名称 -->
process_order = #processOrder#,
<!-- 加工顺序 -->
company_code = #companyCode#,
<!-- 公司编码 -->
company_name = #companyName#,
<!-- 公司名称 -->
dep_code = #depCode#,
<!-- 部门编码 -->
dep_name = #depName#,
<!-- 部门名称 -->
proj_code = #projCode#,
<!-- 项目编码 -->
proj_name = #projName#,
<!-- 项目名称 -->
work_code = #workCode#,
<!-- 报工编码 -->
product_type = #productType#,
<!-- 产品类型 -->
product_code = #productCode#,
<!-- 产品编号 -->
product_name = #productName#,
<!-- 产品名称 -->
plan_start_date = #planStartDate#,
<!-- 计划开始日期 -->
plan_end_date = #planEndDate#,
<!-- 计划结束日期 -->
factory_code = #factoryCode#,
<!-- 工厂编号 -->
factory_name = #factoryName#,
<!-- 工厂名称 -->
group_code = #groupCode#,
<!-- 工作组编号 -->
group_name = #groupName#,
<!-- 工作组名称 -->
register_date = #registerDate#,
<!-- 报工日期 -->
quantity = #quantity#,
<!-- 数量 -->
single_weight = #singleWeight#,
<!-- 单重 -->
total_weight = #totalWeight#,
<!-- 总重 -->
account_code = #accountCode#,
<!-- 帐套 -->
created_by = #createdBy#,
<!-- 创建人 -->
created_name = #createdName#,
<!-- 创建人名称 -->
created_time = #createdTime#,
<!-- 创建时间 -->
updated_by = #updatedBy#,
<!-- 更新人 -->
updated_name = #updatedName#,
<!-- 修改人名称 -->
updated_time = #updatedTime#,
<!-- 更新时间 -->
spec = #spec#,
length = #length#,
exceed_reason = #exceedReason#
WHERE
id = #id#
</update>
...
...
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
View file @
b76223c9
...
...
@@ -1223,6 +1223,7 @@ public class HGSCTools {
hgsc008
.
setTaskId
(
hgsc007
.
getId
());
hgsc008
.
setQuantity
(
NumberUtils
.
toInteger
(
resultMap
.
get
(
HGSC008
.
FIELD_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
(
new
BigDecimal
(
hgsc008
.
getQuantity
())));
checkAddDate
(
hgsc008
);
hgsc008
.
setWorkCode
(
SequenceGenerator
.
getNextSequence
(
HGConstant
.
SequenceId
.
HGSC008_WORK_CODE
));
...
...
src/main/webapp/HG/SC/HGSC007A.js
View file @
b76223c9
...
...
@@ -35,6 +35,13 @@ $(function () {
message
(
"报工日期不能为空!"
);
return
;
}
let
unregisterQuantity
=
$
(
"#result-0-unregisterQuantity"
).
val
();
let
exceedReason
=
$
(
"#result-0-exceedReason"
).
val
();
if
(
quantity
-
unregisterQuantity
>
0
&&
exceedReason
.
trim
().
length
===
0
){
message
(
"报工数量大于剩余报工数量,请填写超报原因"
);
return
;
}
JSUtils
.
confirm
(
"确定对数据做
\"
保存
\"
操作? "
,
{
ok
:
function
()
{
JSUtils
.
submitGrid
(
""
,
"HGSC007A"
,
"save"
,
{
isAlldata
:
true
,
onSuccessCallback
:
parent
.
registerWorkCallback
});
...
...
src/main/webapp/HG/SC/HGSC007A.jsp
View file @
b76223c9
...
...
@@ -34,6 +34,7 @@
format=
"yyyy-MM-dd"
required=
"true"
readonly=
"false"
/>
<EF:EFInput
ename=
"result-0-quantity"
cname=
"报工数量"
format=
"{0:0}"
editType=
"text"
colWidth=
"4"
required=
"true"
/>
<EF:EFInput
ename=
"result-0-totalWeight"
cname=
"报工重量"
format=
"{0:0.00}"
editType=
"text"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"result-0-exceedReason"
cname=
"超报原因"
type=
"textarea"
editType=
"text"
colWidth=
"8"
ratio=
"2:10"
/>
</div>
</EF:EFRegion>
...
...
src/main/webapp/HG/SC/HGSC008.jsp
View file @
b76223c9
...
...
@@ -42,6 +42,7 @@
<EF:EFColumn ename="quantity" cname="数量" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="singleWeight" cname="单重(KG)" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="totalWeight" cname="任务总重(KG)" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="exceedReason" cname="超报原因" width="200" etype="textarea" enable="false" readonly="true" align="center"/>
</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