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
c7b28c54
Commit
c7b28c54
authored
Apr 10, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-04-10 报工管理功能优化
parent
2d475068
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
80 additions
and
46 deletions
+80
-46
ServiceHPSC010.java
.../java/com/baosight/hpjx/hp/sc/service/ServiceHPSC010.java
+13
-14
ServiceHPSC010A.java
...java/com/baosight/hpjx/hp/sc/service/ServiceHPSC010A.java
+6
-5
ServiceHPSC096.java
.../java/com/baosight/hpjx/hp/sc/service/ServiceHPSC096.java
+19
-22
HPSC010.js
src/main/webapp/HP/SC/HPSC010.js
+1
-1
HPSC010.jsp
src/main/webapp/HP/SC/HPSC010.jsp
+1
-1
HPSC096.js
src/main/webapp/HP/SC/HPSC096.js
+40
-3
No files found.
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC010.java
View file @
c7b28c54
...
...
@@ -3,13 +3,11 @@ package com.baosight.hpjx.hp.sc.service;
import
com.baosight.hpjx.common.DdynamicEnum
;
import
com.baosight.hpjx.core.constant.CommonConstant
;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.hp.sc.domain.HPSC008
;
import
com.baosight.hpjx.hp.sc.domain.HPSC009
;
import
com.baosight.hpjx.hp.sc.domain.HPSC010
;
import
com.baosight.hpjx.hp.sc.domain.HPSC010A
;
import
com.baosight.hpjx.util.CommonMethod
;
import
com.baosight.hpjx.util.ErrorCodeUtils
;
import
com.baosight.hpjx.util.StringUtil
;
import
com.baosight.hpjx.util.StringUtils
;
import
com.baosight.hpjx.util.contants.ACConstants
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
...
...
@@ -32,7 +30,7 @@ public class ServiceHPSC010 extends ServiceEPBase {
@Override
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HPSC0
09
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HPSC0
10
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
final
EiInfo
outEiInfo
=
super
.
query
(
inInfo
,
HPSC010
.
QUERY
,
new
HPSC010
().
eiMetadata
);
CommonMethod
.
initBlock
(
outEiInfo
,
Arrays
.
asList
(
DdynamicEnum
.
FACTORY_CODE_BLOCK_ID
),
new
HashMap
<
String
,
Object
>());
...
...
@@ -50,7 +48,7 @@ public class ServiceHPSC010 extends ServiceEPBase {
if
(!
startDate
.
isEmpty
())
{
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
"createdDateFrom"
,
StringUtil
.
removeHorizontalLine
(
startDate
));
}
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HPSC0
08
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HPSC0
10
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
return
super
.
query
(
inInfo
,
HPSC010
.
QUERY
,
new
HPSC010
());
}
...
...
@@ -64,7 +62,7 @@ public class ServiceHPSC010 extends ServiceEPBase {
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
hpxs010
.
fromMap
(
map
);
hpxs010
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
YES_1
);
delRows
(
hpxs010
.
getId
()
.
toString
()
);
delRows
(
hpxs010
.
getId
());
DaoUtils
.
update
(
HPSC010
.
DELETE_FLAG
,
hpxs010
.
toMap
());
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
...
...
@@ -115,9 +113,9 @@ public class ServiceHPSC010 extends ServiceEPBase {
//BigDecimal weight = new BigDecimal("0");
for
(
i
=
0
;
i
<
list
.
size
();
i
++)
{
Map
<?,
?>
map
=
list
.
get
(
i
);
HPSC0
08
hpsc008
=
new
HPSC008
();
hpsc0
08
.
fromMap
(
map
);
weight
=
weight
+
hpsc0
08
.
getWeight
().
doubleValue
()+
hpsc008
.
getWeightJh
().
doubleValue
();
HPSC0
10A
hpsc010A
=
new
HPSC010A
();
hpsc0
10A
.
fromMap
(
map
);
weight
=
weight
+
hpsc0
10A
.
getWeight
().
doubleValue
()+
hpsc010A
.
getWeightJh
().
doubleValue
();
}
String
registerDate
=
inInfo
.
getCellStr
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HPSC010
.
FIELD_REGISTER_DATE
);
hpxs010
.
fromMap
(
eiBlock
.
getRow
(
0
));
...
...
@@ -138,10 +136,10 @@ public class ServiceHPSC010 extends ServiceEPBase {
return
inInfo
;
}
public
void
delRows
(
Stri
ng
id
){
HPSC0
08
hpxs001
=
new
HPSC008
();
hp
xs001
.
setRemark
(
id
);
hp
xs001
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
YES_1
);
DaoUtils
.
update
(
HPSC0
08
.
DELETE_REMARK
,
hpxs001
);
public
void
delRows
(
Lo
ng
id
){
HPSC0
10A
hpsc010A
=
new
HPSC010A
();
hp
sc010A
.
setParentId
(
id
);
hp
sc010A
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
YES_1
);
DaoUtils
.
update
(
HPSC0
10A
.
DELETE_PARENT_ID
,
hpsc010A
);
}
}
\ No newline at end of file
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC010A.java
View file @
c7b28c54
...
...
@@ -4,6 +4,7 @@ import com.baosight.hpjx.common.DdynamicEnum;
import
com.baosight.hpjx.core.constant.CommonConstant
;
import
com.baosight.hpjx.core.security.UserSessionUtils
;
import
com.baosight.hpjx.hp.sc.domain.HPSC008
;
import
com.baosight.hpjx.hp.sc.domain.HPSC010A
;
import
com.baosight.hpjx.util.CommonMethod
;
import
com.baosight.hpjx.util.StringUtil
;
import
com.baosight.hpjx.util.contants.ACConstants
;
...
...
@@ -24,10 +25,10 @@ public class ServiceHPSC010A extends ServiceEPBase {
@Override
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HPSC008
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
final
EiInfo
outEiInfo
=
super
.
query
(
inInfo
,
HPSC0
08
.
QUERY_RESULT
,
new
HPSC008
());
EiInfo
detailEiInfo
=
super
.
query
(
inInfo
,
HPSC0
08
.
QUERY_DETAIL
,
new
HPSC008
());
final
EiInfo
outEiInfo
=
super
.
query
(
inInfo
,
HPSC0
10A
.
QUERY_RESULT
,
new
HPSC010A
());
EiInfo
detailEiInfo
=
super
.
query
(
inInfo
,
HPSC0
10A
.
QUERY_DETAIL
,
new
HPSC010A
());
EiBlock
detailBlock
=
new
EiBlock
(
CommonConstant
.
Field
.
DETAIL
);
detailBlock
.
setBlockMeta
(
new
HPSC0
08
().
eiMetadata
);
detailBlock
.
setBlockMeta
(
new
HPSC0
10A
().
eiMetadata
);
detailBlock
.
setRows
(
detailEiInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
());
outEiInfo
.
setBlock
(
detailBlock
);
CommonMethod
.
initBlock
(
outEiInfo
,
Arrays
.
asList
(
DdynamicEnum
.
FACTORY_RECORD_BLOCK_ID
),
null
,
false
);
...
...
@@ -47,7 +48,7 @@ public class ServiceHPSC010A extends ServiceEPBase {
if
(!
startDate
.
isEmpty
())
{
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
"createdDateFrom"
,
StringUtil
.
removeHorizontalLine
(
startDate
));
}
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HPSC0
08
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
return
super
.
query
(
inInfo
,
HPSC0
08
.
QUERY
,
new
HPSC008
());
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HPSC0
10A
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
return
super
.
query
(
inInfo
,
HPSC0
10A
.
QUERY
,
new
HPSC010A
());
}
}
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC096.java
View file @
c7b28c54
...
...
@@ -5,10 +5,7 @@ import com.baosight.hpjx.common.DdynamicEnum;
import
com.baosight.hpjx.core.constant.CommonConstant
;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.core.security.UserSessionUtils
;
import
com.baosight.hpjx.hp.sc.domain.HPSC008
;
import
com.baosight.hpjx.hp.sc.domain.HPSC010
;
import
com.baosight.hpjx.hp.sc.domain.HPSC096
;
import
com.baosight.hpjx.hp.sc.domain.HPSC098
;
import
com.baosight.hpjx.hp.sc.domain.*
;
import
com.baosight.hpjx.util.CommonMethod
;
import
com.baosight.hpjx.util.ErrorCodeUtils
;
import
com.baosight.hpjx.util.StringUtil
;
...
...
@@ -37,8 +34,8 @@ public class ServiceHPSC096 extends ServiceEPBase {
List
<
Map
>
listFactoryCode
;
if
(
"update"
.
equals
(
methodType
))
{
String
id
=
inInfo
.
getString
(
"inqu_status-0-id"
);
listFactoryCode
=
this
.
dao
.
query
(
HPSC0
08
.
QUERY
,
new
HashMap
<
String
,
Object
>(){{
put
(
HPSC0
08
.
FIELD_REMARK
,
id
);
listFactoryCode
=
this
.
dao
.
query
(
HPSC0
10A
.
QUERY
,
new
HashMap
<
String
,
Object
>(){{
put
(
HPSC0
10A
.
FIELD_PARENT_ID
,
id
);
}},
EiConstant
.
defaultOffset
,
100
);
EiInfo
eiInfo
=
super
.
query
(
inInfo
,
HPSC010
.
QUERY
,
new
HPSC010
());
if
(
eiInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
().
size
()
>
0
)
{
...
...
@@ -61,16 +58,16 @@ public class ServiceHPSC096 extends ServiceEPBase {
rowNo
++;
Map
result
=
new
HashMap
();
result
.
putAll
(
listFactoryCode
.
get
(
i
));
result
.
put
(
HPSC0
08
.
FIELD_WEIGHT
,
0
);
result
.
put
(
HPSC0
08
.
FIELD_WEIGHT_JH
,
0
);
result
.
put
(
HPSC0
08
.
FIELD_GROUP_TYPE
,
1
);
result
.
put
(
HPSC0
10A
.
FIELD_WEIGHT
,
0
);
result
.
put
(
HPSC0
10A
.
FIELD_WEIGHT_JH
,
0
);
result
.
put
(
HPSC0
10A
.
FIELD_GROUP_TYPE
,
1
);
result
.
put
(
"rowNo"
,
rowNo
);
listResult
.
add
(
result
);
}
else
if
(
"cutGroup"
.
equals
(
listFactoryCode
.
get
(
i
).
get
(
HPSC096
.
FIELD_ORG_TYPE
))){
Map
detailMap
=
new
HashMap
();
detailMap
.
putAll
(
listFactoryCode
.
get
(
i
));
detailMap
.
put
(
HPSC0
08
.
FIELD_WEIGHT
,
0
);
detailMap
.
put
(
HPSC0
08
.
FIELD_WEIGHT_JH
,
0
);
detailMap
.
put
(
HPSC0
10A
.
FIELD_WEIGHT
,
0
);
detailMap
.
put
(
HPSC0
10A
.
FIELD_WEIGHT_JH
,
0
);
detailMap
.
put
(
"rowNo"
,
detrowNo
);
listdetail
.
add
(
detailMap
);
detrowNo
++;
...
...
@@ -85,7 +82,7 @@ public class ServiceHPSC096 extends ServiceEPBase {
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
GROUP_RECORD1_BLOCK_ID
,
DdynamicEnum
.
FACTORY_CODE_BLOCK_ID
),
new
HashMap
<
String
,
Object
>(){{
put
(
HPSC0
08
.
FIELD_COMPANY_CODE
,
UserSessionUtils
.
getCompanyCode
());
put
(
HPSC0
10A
.
FIELD_COMPANY_CODE
,
UserSessionUtils
.
getCompanyCode
());
}}
);
return
inInfo
;
...
...
@@ -101,13 +98,13 @@ public class ServiceHPSC096 extends ServiceEPBase {
public
EiInfo
update
(
EiInfo
inInfo
)
{
int
i
=
0
;
try
{
HPSC0
08
hpxs002
=
new
HPSC008
();
HPSC0
10A
hpsc010A
=
new
HPSC010A
();
EiBlock
eiBlock
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
);
for
(
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
hp
xs002
.
fromMap
(
map
);
hp
xs002
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
NO_0
);
DaoUtils
.
update
(
HPSC0
08
.
UPDATE
,
hpxs002
);
hp
sc010A
.
fromMap
(
map
);
hp
sc010A
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
NO_0
);
DaoUtils
.
update
(
HPSC0
10A
.
UPDATE
,
hpsc010A
);
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsgByKey
(
"ep.1000"
,
new
String
[]{
String
.
valueOf
(
i
),
I18nMessages
.
getText
(
"label.update"
,
"修改"
)});
...
...
@@ -135,16 +132,16 @@ public class ServiceHPSC096 extends ServiceEPBase {
List
<
Map
>
listResult
=
eiBlock
.
getRows
();
listResult
.
addAll
(
inInfo
.
getBlock
(
CommonConstant
.
Field
.
DETAIL
).
getRows
());
String
registerDate
=
inInfo
.
getCellStr
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HPSC010
.
FIELD_REGISTER_DATE
);
HPSC0
08
hpxs008
=
new
HPSC008
();
HPSC0
10A
hpsc010A
=
new
HPSC010A
();
for
(
i
=
0
;
i
<
listResult
.
size
();
i
++)
{
Map
<?,
?>
map
=
listResult
.
get
(
i
);
hp
xs008
.
fromMap
(
map
);
hp
xs008
.
setRegisterDate
(
StringUtil
.
removeHorizontalLine
(
registerDate
));
hp
xs008
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
NO_0
);
hp
sc010A
.
fromMap
(
map
);
hp
sc010A
.
setRegisterDate
(
StringUtil
.
removeHorizontalLine
(
registerDate
));
hp
sc010A
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
NO_0
);
for
(
Map
map1:
list
)
{
hp
xs008
.
setRemark
(
map1
.
get
(
HPSC010
.
FIELD_ID
).
toString
(
));
hp
sc010A
.
setParentId
((
Long
)
map1
.
get
(
HPSC010
.
FIELD_ID
));
}
DaoUtils
.
insert
(
HPSC0
08
.
INSERT
,
hpxs008
);
DaoUtils
.
insert
(
HPSC0
10A
.
INSERT
,
hpsc010A
);
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsgByKey
(
"ep.1000"
,
new
String
[]{
String
.
valueOf
(
i
),
I18nMessages
.
getText
(
"label.insert"
,
"新增"
)});
...
...
src/main/webapp/HP/SC/HPSC010.js
View file @
c7b28c54
...
...
@@ -336,7 +336,7 @@ function loadChange(grid,e,field) {
* @param let
*/
function
showGroupDetail
(
id
)
{
window
.
open
(
"HPSC010A?methodName=initLoad&inqu_status-0-
remark="
+
id
+
"&efParentFormEname=HPSC011
"
)
window
.
open
(
"HPSC010A?methodName=initLoad&inqu_status-0-
parentId="
+
id
+
"&efParentFormEname=HPSC010
"
)
}
function
addWindowOpen
(
id
)
{
...
...
src/main/webapp/HP/SC/HPSC010.jsp
View file @
c7b28c54
...
...
@@ -28,7 +28,7 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="
single
">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="
row
">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="companyCode" cname="企业编码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
...
...
src/main/webapp/HP/SC/HPSC096.js
View file @
c7b28c54
...
...
@@ -109,7 +109,7 @@ $(function (){
* 确认
*/
$
(
'#confirm'
).
on
(
'click'
,
function
()
{
let
rows
=
resultGrid
.
get
CheckedRow
s
();
let
rows
=
resultGrid
.
get
DataItem
s
();
if
(
rows
.
length
<
1
)
{
message
(
"请选择数据"
);
return
;
...
...
@@ -146,8 +146,8 @@ $(function (){
var
info
=
new
EiInfo
();
info
.
set
(
"inqu_status-0-userCount"
,
$
(
"#inqu_status-0-userCount"
).
val
());
info
.
set
(
"inqu_status-0-registerDate"
,
registerDate
);
info
.
addBlock
(
JSUtils
.
checkedRows2
Block
(
"result"
));
info
.
addBlock
(
JSUtils
.
checkedRows2
Block
(
"detail"
))
info
.
addBlock
(
rows
Block
(
"result"
));
info
.
addBlock
(
rows
Block
(
"detail"
))
EiCommunicator
.
send
(
"HPSC010"
,
methodType
,
info
,
{
onSuccess
:
function
(
ei
)
{
if
(
ei
.
getStatus
()
>=
0
)
{
...
...
@@ -286,3 +286,39 @@ let detailRefreshRowNo = function (rowNo) {
}
}
}
var
rowsBlock
=
function
(
grid_id
)
{
var
resultGrid
=
window
[
grid_id
+
'Grid'
];
var
columns
=
resultGrid
.
columns
;
var
dateColumns
=
_
.
filter
(
columns
,
function
(
column
)
{
return
column
.
editType
===
"date"
||
column
.
editType
===
"datetime"
;
}
);
var
eiblock
=
new
EiBlock
(
grid_id
);
var
rowsDate
=
resultGrid
.
getDataItems
();
for
(
var
int
=
0
;
int
<
rowsDate
.
length
;
int
++
)
{
if
(
int
==
0
)
{
for
(
var
key
in
rowsDate
[
0
].
toJSON
())
{
var
eColumn
=
new
EiColumn
(
key
);
eiblock
.
getBlockMeta
().
addMeta
(
eColumn
);
}
}
var
model
=
rowsDate
[
int
];
$
.
each
(
dateColumns
,
function
(
index
,
dateColumn
)
{
var
field
=
dateColumn
.
field
,
dateFormat
=
dateColumn
.
dateFormat
;
model
[
field
]
=
kendo
.
toString
(
model
[
field
],
dateFormat
);
// 日期转String
});
eiblock
.
addRow
(
eiblock
.
getMappedArray
(
model
,
true
));
}
var
showCount
=
eiblock
.
get
(
EiConstant
.
SHOW_COUNT
)
||
"true"
;
eiblock
.
set
(
EiConstant
.
SHOW_COUNT
,
showCount
);
eiblock
.
set
(
EiConstant
.
LIMIT
,
resultGrid
.
dataSource
[
'_pageSize'
]);
// eiblock.set(EiConstant.OFFSET, resultGrid.dataSource['_skip']);
// 默认查询第一页
eiblock
.
set
(
EiConstant
.
OFFSET
,
0
);
return
eiblock
;
}
\ No newline at end of file
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