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
451dee5c
Commit
451dee5c
authored
Sep 26, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.报工管理用工人数,支持小数位
parent
6ebe8cde
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
53 additions
and
48 deletions
+53
-48
HPFW001.java
src/main/java/com/baosight/hpjx/hp/fw/domain/HPFW001.java
+0
-0
HPFW002.java
src/main/java/com/baosight/hpjx/hp/fw/domain/HPFW002.java
+0
-0
HPSC010.java
src/main/java/com/baosight/hpjx/hp/sc/domain/HPSC010.java
+7
-4
HPSC010A.java
src/main/java/com/baosight/hpjx/hp/sc/domain/HPSC010A.java
+7
-4
ServiceHPSC010.java
.../java/com/baosight/hpjx/hp/sc/service/ServiceHPSC010.java
+13
-12
HPSC010.jsp
src/main/webapp/HP/SC/HPSC010.jsp
+2
-3
HPSC010A.jsp
src/main/webapp/HP/SC/HPSC010A.jsp
+1
-1
HPSC096.js
src/main/webapp/HP/SC/HPSC096.js
+17
-17
HPSC096.jsp
src/main/webapp/HP/SC/HPSC096.jsp
+2
-3
HPSC105B.js
src/main/webapp/HP/SC/HPSC105B.js
+4
-4
No files found.
src/main/java/com/baosight/hpjx/hp/fw/domain/HPFW001.java
View file @
451dee5c
This diff is collapsed.
Click to expand it.
src/main/java/com/baosight/hpjx/hp/fw/domain/HPFW002.java
View file @
451dee5c
This diff is collapsed.
Click to expand it.
src/main/java/com/baosight/hpjx/hp/sc/domain/HPSC010.java
View file @
451dee5c
...
...
@@ -73,7 +73,7 @@ public class HPSC010 extends DaoEPBase {
private
String
registerDate
=
" "
;
/* 登记日期*/
private
String
factoryCode
=
" "
;
/* 工厂代码*/
private
BigDecimal
weight
=
new
BigDecimal
(
"0"
);
/* 产量*/
private
Long
userCount
=
new
Long
(
0
);
/* 用工人数*/
private
BigDecimal
userCount
=
new
BigDecimal
(
0
);
/* 用工人数*/
/**
* initialize the metadata.
...
...
@@ -138,6 +138,9 @@ public class HPSC010 extends DaoEPBase {
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_USER_COUNT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
1
);
eiColumn
.
setFieldLength
(
18
);
eiColumn
.
setDescName
(
"用工人数"
);
eiMetadata
.
addMeta
(
eiColumn
);
...
...
@@ -363,7 +366,7 @@ public class HPSC010 extends DaoEPBase {
* get the userCount - 用工人数.
* @return the userCount
*/
public
Long
getUserCount
()
{
public
BigDecimal
getUserCount
()
{
return
this
.
userCount
;
}
...
...
@@ -372,7 +375,7 @@ public class HPSC010 extends DaoEPBase {
*
* @param userCount - 用工人数
*/
public
void
setUserCount
(
Long
userCount
)
{
public
void
setUserCount
(
BigDecimal
userCount
)
{
this
.
userCount
=
userCount
;
}
/**
...
...
@@ -396,7 +399,7 @@ public class HPSC010 extends DaoEPBase {
setRegisterDate
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_REGISTER_DATE
)),
registerDate
));
setFactoryCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_FACTORY_CODE
)),
factoryCode
));
setWeight
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_WEIGHT
)),
weight
));
setUserCount
(
NumberUtils
.
to
Long
(
StringUtils
.
toString
(
map
.
get
(
FIELD_USER_COUNT
)),
userCount
));
setUserCount
(
NumberUtils
.
to
BigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_USER_COUNT
)),
userCount
));
}
/**
...
...
src/main/java/com/baosight/hpjx/hp/sc/domain/HPSC010A.java
View file @
451dee5c
...
...
@@ -92,7 +92,7 @@ public class HPSC010A extends DaoEPBase {
private
BigDecimal
weight
=
new
BigDecimal
(
"0"
);
/* 产量*/
private
BigDecimal
weightJh
=
new
BigDecimal
(
"0"
);
/* 加焊产量*/
private
Integer
groupUserCount
=
0
;
/* 组用工人数*/
private
BigDecimal
groupUserCount
=
new
BigDecimal
(
0
)
;
/* 组用工人数*/
private
Integer
rowNo
=
0
;
private
Long
parentId
=
new
Long
(
0
);
/* 父级ID*/
private
Integer
deleteFlag
;
/* 是否删除0:否1.是*/
...
...
@@ -165,6 +165,9 @@ public class HPSC010A extends DaoEPBase {
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_GROUP_USER_COUNT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
1
);
eiColumn
.
setFieldLength
(
20
);
eiColumn
.
setDescName
(
"组人数"
);
eiMetadata
.
addMeta
(
eiColumn
);
...
...
@@ -408,7 +411,7 @@ public class HPSC010A extends DaoEPBase {
* get the groupUserCount - 组人数.
* @return the groupUserCount
*/
public
Integer
getGroupUserCount
()
{
public
BigDecimal
getGroupUserCount
()
{
return
this
.
groupUserCount
;
}
...
...
@@ -417,7 +420,7 @@ public class HPSC010A extends DaoEPBase {
*
* @param groupUserCount - 组人数
*/
public
void
setGroupUserCount
(
Integer
groupUserCount
)
{
public
void
setGroupUserCount
(
BigDecimal
groupUserCount
)
{
this
.
groupUserCount
=
groupUserCount
;
}
...
...
@@ -578,7 +581,7 @@ public class HPSC010A extends DaoEPBase {
setPrdtName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PRDT_NAME
)),
prdtName
));
setWeight
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_WEIGHT
)),
weight
));
setWeightJh
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_WEIGHT_JH
)),
weightJh
));
setGroupUserCount
(
NumberUtils
.
to
Integer
(
StringUtils
.
toString
(
map
.
get
(
FIELD_GROUP_USER_COUNT
)),
groupUserCount
));
setGroupUserCount
(
NumberUtils
.
to
BigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_GROUP_USER_COUNT
)),
groupUserCount
));
setParentId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PARENT_ID
)),
parentId
));
setDeleteFlag
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DELETE_FLAG
)),
deleteFlag
));
setCreatedBy
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CREATED_BY
)),
createdBy
));
...
...
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC010.java
View file @
451dee5c
...
...
@@ -81,6 +81,7 @@ public class ServiceHPSC010 extends ServiceEPBase {
public
EiInfo
update
(
EiInfo
inInfo
)
{
int
i
=
0
;
try
{
Map
queryMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
HPSC010
hpsc010
=
new
HPSC010
();
EiBlock
eiBlock
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
);
List
<
Map
>
list
=
eiBlock
.
getRows
();
...
...
@@ -99,7 +100,7 @@ public class ServiceHPSC010 extends ServiceEPBase {
hpsc010
.
setWeight
(
BigDecimal
.
valueOf
(
weight
/
2
));
hpsc010
.
setId
(
Long
.
valueOf
(
inInfo
.
getCellStr
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HPSC010
.
FIELD_ID
)));
hpsc010
.
setRegisterDate
(
StringUtil
.
removeHorizontalLine
(
registerDate
));
hpsc010
.
setUserCount
(
Long
.
valueOf
(
inInfo
.
getCellStr
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HPSC010
.
FIELD_USER_COUNT
)
));
hpsc010
.
setUserCount
(
MapUtils
.
getBigDecimal
(
queryMap
,
HPSC010
.
FIELD_USER_COUNT
));
DaoUtils
.
update
(
HPSC010
.
UPDATE
,
hpsc010
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
...
...
@@ -119,17 +120,18 @@ public class ServiceHPSC010 extends ServiceEPBase {
public
EiInfo
insert
(
EiInfo
inInfo
)
{
int
i
=
0
;
try
{
Map
queryMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
HPSC010
hpxs010
=
new
HPSC010
();
EiBlock
eiBlock
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
);
List
<
Map
>
list
=
eiBlock
.
getRows
();
list
.
addAll
(
inInfo
.
getBlock
(
CommonConstant
.
Field
.
DETAIL
).
getRows
());
double
weight
=
0
;
String
registerDate
=
inInfo
.
getCellStr
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HPSC010
.
FIELD_REGISTER_DATE
);
Map
query
Map
=
new
HashMap
();
query
Map
.
put
(
HPSC010
.
FIELD_FACTORY_CODE
,
list
.
get
(
0
).
get
(
HPSC010
.
FIELD_FACTORY_CODE
));
query
Map
.
put
(
HPSC010
.
FIELD_REGISTER_DATE
,
StringUtil
.
removeHorizontalLine
(
registerDate
));
query
Map
.
put
(
HPSC010
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
queryFactoryCode
(
inInfo
,
query
Map
);
Map
param
Map
=
new
HashMap
();
param
Map
.
put
(
HPSC010
.
FIELD_FACTORY_CODE
,
list
.
get
(
0
).
get
(
HPSC010
.
FIELD_FACTORY_CODE
));
param
Map
.
put
(
HPSC010
.
FIELD_REGISTER_DATE
,
StringUtil
.
removeHorizontalLine
(
registerDate
));
param
Map
.
put
(
HPSC010
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
queryFactoryCode
(
inInfo
,
param
Map
);
for
(
i
=
0
;
i
<
list
.
size
();
i
++)
{
Map
<?,
?>
map
=
list
.
get
(
i
);
HPSC010A
hpsc010A
=
new
HPSC010A
();
...
...
@@ -138,10 +140,10 @@ public class ServiceHPSC010 extends ServiceEPBase {
}
hpxs010
.
fromMap
(
eiBlock
.
getRow
(
0
));
hpxs010
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
NO_0
);
hpxs010
.
setWeight
(
BigDecimal
.
valueOf
(
weight
/
2
));
hpxs010
.
setRegisterDate
(
StringUtil
.
removeHorizontalLine
(
registerDate
));
hpxs010
.
setUserCount
(
Long
.
valueOf
(
inInfo
.
getCellStr
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HPSC010
.
FIELD_USER_COUNT
)
));
DaoUtils
.
insert
(
HPSC010
.
INSERT
,
hpxs010
);
hpxs010
.
setWeight
(
BigDecimal
.
valueOf
(
weight
/
2
));
hpxs010
.
setRegisterDate
(
StringUtil
.
removeHorizontalLine
(
registerDate
));
hpxs010
.
setUserCount
(
MapUtils
.
getBigDecimal
(
queryMap
,
HPSC010
.
FIELD_USER_COUNT
));
DaoUtils
.
insert
(
HPSC010
.
INSERT
,
hpxs010
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsgByKey
(
"ep.1000"
,
new
String
[]{
String
.
valueOf
(
i
),
I18nMessages
.
getText
(
"label.insert"
,
"新增"
)});
}
catch
(
PlatException
e
)
{
...
...
@@ -165,4 +167,4 @@ public class ServiceHPSC010 extends ServiceEPBase {
AssertUtils
.
isNotEmpty
(
hpsc010List
,
String
.
format
(
"日期[%s]工厂数据以存在,添加失败!"
,
queryMap
.
get
(
HPSC010
.
FIELD_REGISTER_DATE
)));
}
}
\ No newline at end of file
}
src/main/webapp/HP/SC/HPSC010.jsp
View file @
451dee5c
...
...
@@ -45,11 +45,11 @@
data-regex="/^-?[0-9]{1,16}([.][0-9]{1,3})?$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"
/>
<EF:EFColumn ename="userCount" cname="用工人数" width="120" enable="false" format="{0:N
3
}" editType="text"
<EF:EFColumn ename="userCount" cname="用工人数" width="120" enable="false" format="{0:N
1
}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,16}([.][0-9]{1,3})?$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"
/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
\ No newline at end of file
</EF:EFPage>
src/main/webapp/HP/SC/HPSC010A.jsp
View file @
451dee5c
...
...
@@ -78,7 +78,7 @@
data-regex="/^-?[0-9]{1,16}([.][0-9]{1,3})?$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"
/>
<EF:EFColumn ename="groupUserCount" cname="组用工数" maxLength="15" displayType="0" format="{0:N
0
}" enable="false" align="right"/>
<EF:EFColumn ename="groupUserCount" cname="组用工数" maxLength="15" displayType="0" format="{0:N
1
}" enable="false" align="right"/>
<%--<EF:EFColumn ename="remark" cname="备注" enable="true" width="200" align="center"/>--%>
</EF:EFGrid>
</EF:EFRegion>
...
...
src/main/webapp/HP/SC/HPSC096.js
View file @
451dee5c
...
...
@@ -137,8 +137,8 @@ $(function (){
return
false
;
}
let
groupUserCount
=
item
.
get
(
"groupUserCount"
);
if
(
!
is
Integ
er
(
groupUserCount
)
||
parseFloat
(
groupUserCount
)
<
0
)
{
message
(
"选中的生产组第"
+
(
index
+
1
)
+
"行
\"
组用工数
\"
,必须为
正整数
!"
);
if
(
!
is
Numb
er
(
groupUserCount
)
||
parseFloat
(
groupUserCount
)
<
0
)
{
message
(
"选中的生产组第"
+
(
index
+
1
)
+
"行
\"
组用工数
\"
,必须为
大于等于0的数字
!"
);
flag
=
false
;
return
false
;
}
...
...
@@ -146,26 +146,26 @@ $(function (){
if
(
flag
)
{
JSUtils
.
confirm
(
"确定对数据做
\"
保存
\"
操作? "
,
{
ok
:
function
()
{
var
info
=
new
EiInfo
();
info
.
set
(
"inqu_status-0-userCount"
,
$
(
"#inqu_status-0-userCount"
).
val
());
info
.
set
(
"inqu_status-0-registerDate"
,
registerDate
);
info
.
set
(
"inqu_status-0-id"
,
$
(
"#inqu_status-0-id"
).
val
());
info
.
addBlock
(
rowsBlock
(
"result"
));
var
info
=
new
EiInfo
();
info
.
set
(
"inqu_status-0-userCount"
,
$
(
"#inqu_status-0-userCount"
).
val
());
info
.
set
(
"inqu_status-0-registerDate"
,
registerDate
);
info
.
set
(
"inqu_status-0-id"
,
$
(
"#inqu_status-0-id"
).
val
());
info
.
addBlock
(
rowsBlock
(
"result"
));
info
.
addBlock
(
rowsBlock
(
"detail"
))
EiCommunicator
.
send
(
"HPSC010"
,
methodType
,
info
,
{
onSuccess
:
function
(
ei
)
{
if
(
ei
.
getStatus
()
>=
0
)
{
try
{
EiCommunicator
.
send
(
"HPSC096"
,
methodType
,
info
,
{
onSuccess
:
function
(
ei
)
{
parent
.
JSColorbox
.
setValueCallback
(
ei
);
parent
.
JSColorbox
.
close
();
},
onFail
:
function
(
ei
)
{
// 发生异常
NotificationUtil
(
"操作失败,原因["
+
ei
+
"]"
,
"error"
);
}
})
EiCommunicator
.
send
(
"HPSC096"
,
methodType
,
info
,
{
onSuccess
:
function
(
ei
)
{
parent
.
JSColorbox
.
setValueCallback
(
ei
);
parent
.
JSColorbox
.
close
();
},
onFail
:
function
(
ei
)
{
// 发生异常
NotificationUtil
(
"操作失败,原因["
+
ei
+
"]"
,
"error"
);
}
})
}
catch
(
e
)
{
// TODO: handle exception
}
...
...
src/main/webapp/HP/SC/HPSC096.jsp
View file @
451dee5c
...
...
@@ -44,7 +44,7 @@
data-regex="/^-?[0-9]{1,16}([.][0-9]{1,3})?$/" maxLength="20"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"
/>
<EF:EFColumn ename="groupUserCount" cname="组用工数" maxLength="15" displayType="0" format="{0:N
0
}" align="right"/>
<EF:EFColumn ename="groupUserCount" cname="组用工数" maxLength="15" displayType="0" format="{0:N
1
}" align="right"/>
<EF:EFComboColumn ename="groupType" cname="生产类型"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField" hidden="true"
...
...
@@ -111,4 +111,4 @@
<EF:EFButton ename="cancel" cname="取消" type="button" class="btn-align-right"/>
<EF:EFButton ename="confirm" cname="确认" type="button" class="btn-align-right"/>
</div>
</EF:EFPage>
\ No newline at end of file
</EF:EFPage>
src/main/webapp/HP/SC/HPSC105B.js
View file @
451dee5c
...
...
@@ -2,8 +2,8 @@ $(function () {
$
(
"#result-0-quantity_textField"
).
on
(
'change'
,
function
()
{
var
quantity
=
$
(
"#result-0-quantity_textField"
).
val
();
if
(
!
isPositive
Integ
er
(
quantity
)){
message
(
"报工数量必须是大于0的
正整数
"
)
if
(
!
isPositive
Numb
er
(
quantity
)){
message
(
"报工数量必须是大于0的
数字
"
)
}
var
taskWeight
=
$
(
"#result-0-taskWeight_textField"
).
val
();
if
(
isPositiveNumber
(
taskWeight
))
{
...
...
@@ -28,8 +28,8 @@ $(function () {
$
(
"#btn_save"
).
on
(
"click"
,
function
(){
let
quantity
=
$
(
"#result-0-quantity_textField"
).
val
().
split
(
"%"
)[
0
];
let
unregisterQuantity
=
$
(
"#result-0-unregisterQuantity"
).
val
();
if
(
!
isPositive
Integ
er
(
quantity
)){
message
(
"报工数量必须是大于0的
正整数
"
);
if
(
!
isPositive
Numb
er
(
quantity
)){
message
(
"报工数量必须是大于0的
数字
"
);
return
;
}
if
(
unregisterQuantity
-
quantity
<
0
){
...
...
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