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
442edf6f
Commit
442edf6f
authored
Feb 28, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.修改默认前缀
parent
64890cd8
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
101 additions
and
87 deletions
+101
-87
ServiceHPKC009.java
.../java/com/baosight/hpjx/hp/kc/service/ServiceHPKC009.java
+77
-68
ServiceHPPZ006.java
.../java/com/baosight/hpjx/hp/pz/service/ServiceHPPZ006.java
+0
-1
ServiceHPPZ009.java
.../java/com/baosight/hpjx/hp/pz/service/ServiceHPPZ009.java
+7
-11
ServiceXSOG0801.java
...com/baosight/xservices/xs/og/service/ServiceXSOG0801.java
+5
-2
ServiceXS40.java
...n/java/com/baosight/xservices/xs/service/ServiceXS40.java
+5
-3
XS3001.js
src/main/webapp/XS/XS3001.js
+7
-2
No files found.
src/main/java/com/baosight/hpjx/hp/kc/service/ServiceHPKC009.java
View file @
442edf6f
...
@@ -3,12 +3,9 @@ package com.baosight.hpjx.hp.kc.service;
...
@@ -3,12 +3,9 @@ package com.baosight.hpjx.hp.kc.service;
import
com.baosight.hpjx.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hpjx.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hpjx.common.DdynamicEnum
;
import
com.baosight.hpjx.common.DdynamicEnum
;
import
com.baosight.hpjx.core.constant.CommonConstant
;
import
com.baosight.hpjx.core.constant.CommonConstant
;
import
com.baosight.hpjx.hp.constant.HPConstant
;
import
com.baosight.hpjx.hp.constant.HPSqlConstant
;
import
com.baosight.hpjx.hp.constant.HPSqlConstant
;
import
com.baosight.hpjx.hp.kc.domain.HPKC003
;
import
com.baosight.hpjx.hp.kc.domain.HPKC001
;
import
com.baosight.hpjx.hp.kc.domain.HPKC001
;
import
com.baosight.hpjx.hp.kc.domain.HPKC002
;
import
com.baosight.hpjx.hp.kc.domain.HPKC002
;
import
com.baosight.hpjx.hp.kc.domain.HPKC004
;
import
com.baosight.hpjx.hp.kc.domain.HPKC005
;
import
com.baosight.hpjx.hp.kc.domain.HPKC005
;
import
com.baosight.hpjx.hp.kc.domain.HPKC006
;
import
com.baosight.hpjx.hp.kc.domain.HPKC006
;
import
com.baosight.hpjx.hp.kc.domain.HPKC007
;
import
com.baosight.hpjx.hp.kc.domain.HPKC007
;
...
@@ -24,11 +21,13 @@ import com.baosight.hpjx.util.EiInfoUtils;
...
@@ -24,11 +21,13 @@ import com.baosight.hpjx.util.EiInfoUtils;
import
com.baosight.hpjx.util.LogUtils
;
import
com.baosight.hpjx.util.LogUtils
;
import
com.baosight.hpjx.util.ObjectUtils
;
import
com.baosight.hpjx.util.ObjectUtils
;
import
com.baosight.hpjx.util.StringUtil
;
import
com.baosight.hpjx.util.StringUtil
;
import
com.baosight.iplat4j.core.data.DaoEPBase
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.core.web.threadlocal.UserSession
;
import
com.baosight.iplat4j.core.web.threadlocal.UserSession
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.MapUtils
;
import
org.apache.commons.collections.MapUtils
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
...
@@ -55,7 +54,8 @@ public class ServiceHPKC009 extends ServiceBase {
...
@@ -55,7 +54,8 @@ public class ServiceHPKC009 extends ServiceBase {
* @param inInfo
* @param inInfo
* @return
* @return
*/
*/
@OperationLogAnnotation
(
operModul
=
"库存收发存"
,
operType
=
"查询"
,
operDesc
=
"初始化"
)
@Override
@OperationLogAnnotation
(
operModul
=
"库存收发存"
,
operType
=
"查询"
,
operDesc
=
"初始化"
)
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
try
{
try
{
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
WH_RECORD_BLOCK_ID
),
null
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
WH_RECORD_BLOCK_ID
),
null
);
...
@@ -75,8 +75,8 @@ public class ServiceHPKC009 extends ServiceBase {
...
@@ -75,8 +75,8 @@ public class ServiceHPKC009 extends ServiceBase {
* @param inInfo
* @param inInfo
* @return
* @return
*/
*/
@OperationLogAnnotation
(
operModul
=
"库存收发存"
,
operType
=
"查询"
,
operDesc
=
"查询"
)
@Override
@Override
@OperationLogAnnotation
(
operModul
=
"库存收发存"
,
operType
=
"查询"
,
operDesc
=
"查询"
)
public
EiInfo
query
(
EiInfo
inInfo
)
{
public
EiInfo
query
(
EiInfo
inInfo
)
{
try
{
try
{
Map
queryRow
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
Map
queryRow
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
...
@@ -146,6 +146,7 @@ public class ServiceHPKC009 extends ServiceBase {
...
@@ -146,6 +146,7 @@ public class ServiceHPKC009 extends ServiceBase {
queryMap
.
put
(
"yesterTo"
,
yesterMonth
.
with
(
TemporalAdjusters
.
lastDayOfMonth
())
queryMap
.
put
(
"yesterTo"
,
yesterMonth
.
with
(
TemporalAdjusters
.
lastDayOfMonth
())
.
format
(
DateUtils
.
SHORT_DATE
));
.
format
(
DateUtils
.
SHORT_DATE
));
queryMap
.
put
(
"yesterDate"
,
yesterMonth
.
format
(
DateUtils
.
SHORT_MONTH
));
queryMap
.
put
(
"yesterDate"
,
yesterMonth
.
format
(
DateUtils
.
SHORT_MONTH
));
// 期初库存查询条件需要取前两个月的收发存记录
queryMap
.
put
(
"beforeDate"
,
nowDate
.
minusMonths
(
2
).
format
(
DateUtils
.
SHORT_MONTH
));
queryMap
.
put
(
"beforeDate"
,
nowDate
.
minusMonths
(
2
).
format
(
DateUtils
.
SHORT_MONTH
));
queryMap
.
put
(
"dateType"
,
CommonConstant
.
DateType
.
MONTH
);
queryMap
.
put
(
"dateType"
,
CommonConstant
.
DateType
.
MONTH
);
// 0.清除数据
// 0.清除数据
...
@@ -168,61 +169,48 @@ public class ServiceHPKC009 extends ServiceBase {
...
@@ -168,61 +169,48 @@ public class ServiceHPKC009 extends ServiceBase {
/**
/**
* 统计库存收发存
* 统计库存收发存
*
*
* @param queryMap
* @return
* @return
*/
*/
@OperationLogAnnotation
(
operModul
=
"库存收发存"
,
operType
=
"插入"
,
operDesc
=
"统计库存收发存"
)
private
List
<
HPKC009
>
statData
(
Map
queryMap
)
{
private
List
<
HPKC009
>
statData
(
Map
queryMap
)
{
List
<
HPKC009
>
newKc009s
=
new
ArrayList
<>();
// 1.1、期末库存
// 1.1、期末库存
queryMap
.
put
(
"dateProc"
,
queryMap
.
get
(
"yesterTo"
));
Map
<
String
,
HPKC010A
>
endKcs
=
this
.
listInvData
(
queryMap
,
HPKC010A
.
QUERY
);
List
<
HPKC010A
>
endKcs
=
dao
.
query
(
HPKC010A
.
QUERY
,
queryMap
);
// 1.2、采购入库
// 1.2、采购入库
queryMap
.
put
(
"createdTimeFrom"
,
queryMap
.
get
(
"yesterFrom"
)
+
"000000"
);
Map
<
String
,
HPKC001
>
cgRkMap
=
this
.
listInvData
(
queryMap
,
HPSqlConstant
.
HPKC001
.
STAT_DATE
);
queryMap
.
put
(
"createdTimeTo"
,
queryMap
.
get
(
"yesterTo"
)
+
"235959"
);
List
<
HPKC001
>
cgRks
=
dao
.
query
(
HPSqlConstant
.
HPKC001
.
STAT_DATE
,
queryMap
);
Map
<
String
,
HPKC001
>
cgRkMap
=
cgRks
.
stream
().
collect
(
Collectors
.
toMap
(
item
->
buildKey
(
item
.
getCompanyCode
(),
item
.
getDepCode
(),
item
.
getInventType
(),
item
.
getInventCode
(),
item
.
getWhCode
(),
item
.
getInventRecordId
()),
item
->
item
));
// 1.3、生产入库
// List<HPKC003> scRks = dao.query(HPSqlConstant.HPKC003.STAT_DATE, queryMap);
// Map<String, HPKC003> scRkMap = scRks.stream().collect(Collectors.toMap(item ->
// buildKey(item.getCompanyCode(), item.getDepCode(), item.getPartType(), item.getPartCode(),
// item.getWhCode(), null), item -> item));
// 1.4、其他入库
// 1.4、其他入库
List
<
HPKC006
>
qtRks
=
dao
.
query
(
HPSqlConstant
.
HPKC006
.
STAT_DATE
,
queryMap
);
Map
<
String
,
HPKC006
>
qtRkMap
=
this
.
listInvData
(
queryMap
,
HPSqlConstant
.
HPKC006
.
STAT_DATE
);
Map
<
String
,
HPKC006
>
qtRkMap
=
qtRks
.
stream
().
collect
(
Collectors
.
toMap
(
item
->
buildKey
(
item
.
getCompanyCode
(),
item
.
getDepCode
(),
item
.
getInventType
(),
item
.
getInventCode
(),
item
.
getWhCode
(),
item
.
getInventRecordId
()),
item
->
item
));
// 1.5、生产领料
// 1.5、生产领料
List
<
HPKC002
>
scCks
=
dao
.
query
(
HPSqlConstant
.
HPKC002
.
STAT_DATE
,
queryMap
);
Map
<
String
,
HPKC002
>
scCkMap
=
this
.
listInvData
(
queryMap
,
HPSqlConstant
.
HPKC002
.
STAT_DATE
);
Map
<
String
,
HPKC002
>
scCkMap
=
scCks
.
stream
().
collect
(
Collectors
.
toMap
(
item
->
buildKey
(
item
.
getCompanyCode
(),
item
.
getDepCode
(),
item
.
getInventType
(),
item
.
getInventCode
(),
item
.
getWhCode
(),
item
.
getInventRecordId
()),
item
->
item
));
// 1.6、销售出库
// List<HPKC004> xsCks = dao.query(HPSqlConstant.HPKC004.STAT_DATE, queryMap);
// Map<String, HPKC004> xsCkMap = xsCks.stream().collect(Collectors.toMap(item ->
// buildKey(item.getCompanyCode(), item.getDepCode(), item.getInventCode(), item.getSubInventCode(),
// item.getWhCode(), ""), item -> item));
// 1.7、其它出库
// 1.7、其它出库
List
<
HPKC007
>
qtCks
=
dao
.
query
(
HPSqlConstant
.
HPKC007
.
STAT_DATE
,
queryMap
);
Map
<
String
,
HPKC007
>
qtCkMap
=
this
.
listInvData
(
queryMap
,
HPSqlConstant
.
HPKC007
.
STAT_DATE
);
Map
<
String
,
HPKC007
>
qtCkMap
=
qtCks
.
stream
().
collect
(
Collectors
.
toMap
(
item
->
buildKey
(
item
.
getCompanyCode
(),
item
.
getDepCode
(),
item
.
getInventType
(),
item
.
getInventCode
(),
item
.
getWhCode
(),
item
.
getInventRecordId
()),
item
->
item
));
// 1.8、盘点差异数量
// 1.8、盘点差异数量
List
<
HPKC005
>
pdDiffs
=
dao
.
query
(
HPSqlConstant
.
HPKC005
.
STAT_DATE
,
queryMap
);
Map
<
String
,
HPKC005
>
pdDiffMap
=
this
.
listInvData
(
queryMap
,
HPSqlConstant
.
HPKC005
.
STAT_DATE
);
Map
<
String
,
HPKC005
>
pdDiffMap
=
pdDiffs
.
stream
().
collect
(
Collectors
.
toMap
(
item
->
buildKey
(
item
.
getCompanyCode
(),
item
.
getDepCode
(),
item
.
getInventType
(),
item
.
getInventCode
(),
item
.
getWhCode
(),
item
.
getInventRecordId
()),
item
->
item
));
// 1.9、期初库存
// 1.9、期初库存
queryMap
.
put
(
"dateProc"
,
queryMap
.
get
(
"beforeDate"
));
Map
<
String
,
HPKC009
>
initKcMap
=
this
.
listInvData
(
queryMap
,
HPKC009
.
QUERY
);
List
<
HPKC009
>
initKcs
=
dao
.
query
(
HPKC009
.
QUERY
,
new
HashMap
<>());
Map
<
String
,
HPKC009
>
initKcMap
=
initKcs
.
stream
().
collect
(
Collectors
.
toMap
(
item
->
buildKey
(
item
.
getCompanyCode
(),
item
.
getDepCode
(),
item
.
getInventType
(),
item
.
getInventCode
(),
item
.
getWhCode
(),
item
.
getInventRecordId
()),
item
->
item
));
// 根据期末库存生成收发存对象
// 根据期末库存生成收发存对象
for
(
HPKC010A
endKc
:
endKcs
)
{
return
buildKcBean
(
queryMap
,
endKcs
,
cgRkMap
,
qtRkMap
,
scCkMap
,
qtCkMap
,
pdDiffMap
,
initKcMap
);
String
key
=
buildKey
(
endKc
.
getCompanyCode
(),
endKc
.
getDepCode
(),
endKc
.
getInventType
(),
}
endKc
.
getInventCode
(),
endKc
.
getWhCode
(),
endKc
.
getInventRecordId
());
/**
* 构建库存收发存对象
*
* @param queryMap
* @param endKcs
* @param cgRkMap
* @param qtCkMap
* @param scCkMap
* @param qtRkMap
* @param pdDiffMap
* @param initKcMap
* @return
*/
private
List
<
HPKC009
>
buildKcBean
(
Map
queryMap
,
Map
<
String
,
HPKC010A
>
endKcs
,
Map
<
String
,
HPKC001
>
cgRkMap
,
Map
<
String
,
HPKC006
>
qtRkMap
,
Map
<
String
,
HPKC002
>
scCkMap
,
Map
<
String
,
HPKC007
>
qtCkMap
,
Map
<
String
,
HPKC005
>
pdDiffMap
,
Map
<
String
,
HPKC009
>
initKcMap
)
{
List
<
HPKC009
>
newKc009s
=
new
ArrayList
<>();
for
(
Map
.
Entry
<
String
,
HPKC010A
>
entry
:
endKcs
.
entrySet
())
{
String
key
=
entry
.
getKey
();
HPKC010A
endKc
=
entry
.
getValue
();
HPKC009
kc009
=
BeanUtils
.
copy
(
endKc
,
HPKC009
.
class
);
HPKC009
kc009
=
BeanUtils
.
copy
(
endKc
,
HPKC009
.
class
);
kc009
.
setDateType
(
queryMap
.
get
(
"dateType"
).
toString
());
kc009
.
setDateType
(
queryMap
.
get
(
"dateType"
).
toString
());
kc009
.
setDateProc
(
queryMap
.
get
(
"yesterDate"
).
toString
());
kc009
.
setDateProc
(
queryMap
.
get
(
"yesterDate"
).
toString
());
...
@@ -233,10 +221,6 @@ public class ServiceHPKC009 extends ServiceBase {
...
@@ -233,10 +221,6 @@ public class ServiceHPKC009 extends ServiceBase {
HPKC001
cgRk
=
cgRkMap
.
get
(
key
);
HPKC001
cgRk
=
cgRkMap
.
get
(
key
);
kc009
.
setCgEnterAmount
(
cgRk
==
null
?
BigDecimal
.
ZERO
:
cgRk
.
getAmount
());
kc009
.
setCgEnterAmount
(
cgRk
==
null
?
BigDecimal
.
ZERO
:
cgRk
.
getAmount
());
kc009
.
setCgEnterWeight
(
cgRk
==
null
?
BigDecimal
.
ZERO
:
cgRk
.
getWeight
());
kc009
.
setCgEnterWeight
(
cgRk
==
null
?
BigDecimal
.
ZERO
:
cgRk
.
getWeight
());
// 1.3、生产入库
HPKC003
scRk
=
null
;
//scRkMap.get(key);
kc009
.
setScEnterAmount
(
scRk
==
null
?
BigDecimal
.
ZERO
:
scRk
.
getAmount
());
kc009
.
setScEnterWeight
(
scRk
==
null
?
BigDecimal
.
ZERO
:
scRk
.
getWeight
());
// 1.3、其他入库
// 1.3、其他入库
HPKC006
qtRk
=
qtRkMap
.
get
(
key
);
HPKC006
qtRk
=
qtRkMap
.
get
(
key
);
kc009
.
setQtEnterAmount
(
qtRk
==
null
?
BigDecimal
.
ZERO
:
qtRk
.
getAmount
());
kc009
.
setQtEnterAmount
(
qtRk
==
null
?
BigDecimal
.
ZERO
:
qtRk
.
getAmount
());
...
@@ -250,10 +234,6 @@ public class ServiceHPKC009 extends ServiceBase {
...
@@ -250,10 +234,6 @@ public class ServiceHPKC009 extends ServiceBase {
HPKC002
scCk
=
scCkMap
.
get
(
key
);
HPKC002
scCk
=
scCkMap
.
get
(
key
);
kc009
.
setScOuterAmount
(
scCk
==
null
?
BigDecimal
.
ZERO
:
scCk
.
getAmount
());
kc009
.
setScOuterAmount
(
scCk
==
null
?
BigDecimal
.
ZERO
:
scCk
.
getAmount
());
kc009
.
setScOuterWeight
(
scCk
==
null
?
BigDecimal
.
ZERO
:
scCk
.
getWeight
());
kc009
.
setScOuterWeight
(
scCk
==
null
?
BigDecimal
.
ZERO
:
scCk
.
getWeight
());
// 1.6、销售出库
HPKC004
xsCk
=
null
;
//xsCkMap.get(key);
kc009
.
setXsOuterAmount
(
xsCk
==
null
?
BigDecimal
.
ZERO
:
xsCk
.
getAmount
());
kc009
.
setXsOuterWeight
(
xsCk
==
null
?
BigDecimal
.
ZERO
:
xsCk
.
getWeight
());
// 1.7、其他出库
// 1.7、其他出库
HPKC007
qtCk
=
qtCkMap
.
get
(
key
);
HPKC007
qtCk
=
qtCkMap
.
get
(
key
);
kc009
.
setQtOuterAmount
(
qtCk
==
null
?
BigDecimal
.
ZERO
:
qtCk
.
getAmount
());
kc009
.
setQtOuterAmount
(
qtCk
==
null
?
BigDecimal
.
ZERO
:
qtCk
.
getAmount
());
...
@@ -269,26 +249,45 @@ public class ServiceHPKC009 extends ServiceBase {
...
@@ -269,26 +249,45 @@ public class ServiceHPKC009 extends ServiceBase {
kc009
.
setPdDiffWeight
(
pdDiff
==
null
?
BigDecimal
.
ZERO
:
pdDiff
.
getDiffWeight
());
kc009
.
setPdDiffWeight
(
pdDiff
==
null
?
BigDecimal
.
ZERO
:
pdDiff
.
getDiffWeight
());
// 1.9、期初
// 1.9、期初
HPKC009
initKc
=
initKcMap
.
get
(
key
);
HPKC009
initKc
=
initKcMap
.
get
(
key
);
if
(
initKc
!=
null
)
{
kc009
.
setInitAmount
(
initKc
!=
null
?
initKc
.
getEndAmount
()
:
kc009
.
getEndAmount
()
kc009
.
setInitAmount
(
initKc
.
getEndAmount
());
.
subtract
(
kc009
.
getPdDiffAmount
()).
add
(
kc009
.
getOuterAmount
()).
subtract
(
kc009
.
getEnterAmount
()));
kc009
.
setInitWeight
(
initKc
.
getEndWeight
());
kc009
.
setInitWeight
(
initKc
!=
null
?
initKc
.
getEndWeight
()
:
kc009
.
getEndWeight
()
}
else
{
.
subtract
(
kc009
.
getPdDiffWeight
()).
add
(
kc009
.
getOuterWeight
()).
subtract
(
kc009
.
getEnterWeight
()));
kc009
.
setInitAmount
(
kc009
.
getEndAmount
().
subtract
(
kc009
.
getPdDiffAmount
())
.
add
(
kc009
.
getOuterAmount
()).
subtract
(
kc009
.
getEnterAmount
()));
kc009
.
setInitWeight
(
kc009
.
getEndWeight
().
subtract
(
kc009
.
getPdDiffWeight
())
.
add
(
kc009
.
getOuterWeight
()).
subtract
(
kc009
.
getEnterWeight
()));
}
newKc009s
.
add
(
kc009
);
newKc009s
.
add
(
kc009
);
}
}
return
newKc009s
;
return
newKc009s
;
}
}
/**
/**
* 查询库存数据
*
* @param DataMap
* @param sqlId
* @param <T>
* @return
*/
private
<
T
extends
DaoEPBase
>
Map
<
String
,
T
>
listInvData
(
Map
DataMap
,
String
sqlId
)
{
Map
queryMap
=
new
HashMap
();
if
(
HPKC010A
.
QUERY
.
equals
(
sqlId
))
{
// 期末库存
queryMap
.
put
(
"dateProc"
,
DataMap
.
get
(
"yesterTo"
));
}
else
if
(
HPKC009
.
QUERY
.
equals
(
sqlId
))
{
// 期初库存
queryMap
.
put
(
"dateProc"
,
DataMap
.
get
(
"beforeDate"
));
}
else
{
queryMap
.
put
(
"createdTimeFrom"
,
DataMap
.
get
(
"yesterFrom"
)
+
"000000"
);
queryMap
.
put
(
"createdTimeTo"
,
DataMap
.
get
(
"yesterTo"
)
+
"235959"
);
}
List
<
T
>
results
=
dao
.
query
(
sqlId
,
queryMap
);
if
(
CollectionUtils
.
isEmpty
(
results
))
{
return
new
HashMap
<>();
}
return
results
.
stream
().
collect
(
Collectors
.
toMap
(
item
->
buildKey
(
item
.
toMap
()),
item
->
item
));
}
/**
* 设置基础信息
* 设置基础信息
*
*
* @param kc009s
* @param kc009s
*/
*/
@OperationLogAnnotation
(
operModul
=
"库存收发存"
,
operType
=
"设置"
,
operDesc
=
"设置基础信息"
)
private
void
setBaseInfo
(
List
<
HPKC009
>
kc009s
)
{
private
void
setBaseInfo
(
List
<
HPKC009
>
kc009s
)
{
// 仓库名称
// 仓库名称
List
<
String
>
whCodes
=
kc009s
.
stream
().
map
(
HPKC009:
:
getWhCode
).
collect
(
Collectors
.
toList
());
List
<
String
>
whCodes
=
kc009s
.
stream
().
map
(
HPKC009:
:
getWhCode
).
collect
(
Collectors
.
toList
());
...
@@ -315,6 +314,17 @@ public class ServiceHPKC009 extends ServiceBase {
...
@@ -315,6 +314,17 @@ public class ServiceHPKC009 extends ServiceBase {
/**
/**
* 构建KEY
* 构建KEY
*
*
* @param dataMap
* @return
*/
private
String
buildKey
(
Map
dataMap
)
{
return
buildKey
(
dataMap
.
get
(
"companyCode"
),
dataMap
.
get
(
"depCode"
),
dataMap
.
get
(
"inventType"
),
dataMap
.
get
(
"inventCode"
),
dataMap
.
get
(
"whCode"
),
dataMap
.
get
(
"inventRecordId"
));
}
/**
* 构建KEY
*
* @param companyCode
* @param companyCode
* @param depCode
* @param depCode
* @param inventType
* @param inventType
...
@@ -323,7 +333,6 @@ public class ServiceHPKC009 extends ServiceBase {
...
@@ -323,7 +333,6 @@ public class ServiceHPKC009 extends ServiceBase {
* @param inventRecordId
* @param inventRecordId
* @return
* @return
*/
*/
@OperationLogAnnotation
(
operModul
=
"库存收发存"
,
operType
=
"设置"
,
operDesc
=
"构建KEY"
)
private
String
buildKey
(
Object
companyCode
,
Object
depCode
,
Object
inventType
,
Object
inventCode
,
private
String
buildKey
(
Object
companyCode
,
Object
depCode
,
Object
inventType
,
Object
inventCode
,
Object
whCode
,
Object
inventRecordId
)
{
Object
whCode
,
Object
inventRecordId
)
{
return
ObjectUtils
.
trimToEmpty
(
companyCode
)
+
"#"
return
ObjectUtils
.
trimToEmpty
(
companyCode
)
+
"#"
...
...
src/main/java/com/baosight/hpjx/hp/pz/service/ServiceHPPZ006.java
View file @
442edf6f
...
@@ -105,7 +105,6 @@ public class ServiceHPPZ006 extends ServiceBase {
...
@@ -105,7 +105,6 @@ public class ServiceHPPZ006 extends ServiceBase {
*
*
* @param resultRows
* @param resultRows
*/
*/
@OperationLogAnnotation
(
operModul
=
"存货档案"
,
operType
=
"校验"
,
operDesc
=
"校验保存的数据"
)
private
void
checkSaveData
(
List
<
Map
>
resultRows
)
{
private
void
checkSaveData
(
List
<
Map
>
resultRows
)
{
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++)
{
HPPZ006
fPz006
=
new
HPPZ006
();
HPPZ006
fPz006
=
new
HPPZ006
();
...
...
src/main/java/com/baosight/hpjx/hp/pz/service/ServiceHPPZ009.java
View file @
442edf6f
...
@@ -7,7 +7,6 @@ import com.baosight.hpjx.hp.constant.HPConstant;
...
@@ -7,7 +7,6 @@ import com.baosight.hpjx.hp.constant.HPConstant;
import
com.baosight.hpjx.hp.pz.domain.HPPZ009
;
import
com.baosight.hpjx.hp.pz.domain.HPPZ009
;
import
com.baosight.hpjx.hp.xs.tools.HPXSTools
;
import
com.baosight.hpjx.hp.xs.tools.HPXSTools
;
import
com.baosight.hpjx.util.AssertUtils
;
import
com.baosight.hpjx.util.AssertUtils
;
import
com.baosight.hpjx.util.DateUtils
;
import
com.baosight.hpjx.util.LogUtils
;
import
com.baosight.hpjx.util.LogUtils
;
import
com.baosight.hpjx.util.RsaUtils
;
import
com.baosight.hpjx.util.RsaUtils
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
...
@@ -15,7 +14,6 @@ import com.baosight.iplat4j.core.ei.EiInfo;
...
@@ -15,7 +14,6 @@ import com.baosight.iplat4j.core.ei.EiInfo;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.core.service.soa.XLocalManager
;
import
com.baosight.iplat4j.core.service.soa.XLocalManager
;
import
com.baosight.iplat4j.core.web.threadlocal.UserSession
;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
import
com.baosight.xservices.xs.constants.LoginConstants
;
import
com.baosight.xservices.xs.constants.LoginConstants
;
...
@@ -37,7 +35,8 @@ public class ServiceHPPZ009 extends ServiceBase {
...
@@ -37,7 +35,8 @@ public class ServiceHPPZ009 extends ServiceBase {
* @param inInfo
* @param inInfo
* @return
* @return
*/
*/
@OperationLogAnnotation
(
operModul
=
"企业管理"
,
operType
=
"查询"
,
operDesc
=
"初始化"
)
@Override
@OperationLogAnnotation
(
operModul
=
"企业管理"
,
operType
=
"查询"
,
operDesc
=
"初始化"
)
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
try
{
try
{
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HPPZ009
().
eiMetadata
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HPPZ009
().
eiMetadata
);
...
@@ -53,8 +52,8 @@ public class ServiceHPPZ009 extends ServiceBase {
...
@@ -53,8 +52,8 @@ public class ServiceHPPZ009 extends ServiceBase {
* @param inInfo
* @param inInfo
* @return
* @return
*/
*/
@OperationLogAnnotation
(
operModul
=
"企业管理"
,
operType
=
"查询"
,
operDesc
=
"查询"
)
@Override
@Override
@OperationLogAnnotation
(
operModul
=
"企业管理"
,
operType
=
"查询"
,
operDesc
=
"查询"
)
public
EiInfo
query
(
EiInfo
inInfo
)
{
public
EiInfo
query
(
EiInfo
inInfo
)
{
try
{
try
{
inInfo
=
super
.
query
(
inInfo
,
"HPPZ009.query"
,
new
HPPZ009
());
inInfo
=
super
.
query
(
inInfo
,
"HPPZ009.query"
,
new
HPPZ009
());
...
@@ -123,10 +122,7 @@ public class ServiceHPPZ009 extends ServiceBase {
...
@@ -123,10 +122,7 @@ public class ServiceHPPZ009 extends ServiceBase {
// 生成企业编码
// 生成企业编码
fPz009
.
setCompanyCode
(
SequenceGenerator
.
getNextSequence
(
HPConstant
.
SequenceId
.
COMPANY_CODE
));
fPz009
.
setCompanyCode
(
SequenceGenerator
.
getNextSequence
(
HPConstant
.
SequenceId
.
COMPANY_CODE
));
fPz009
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
NO_0
);
fPz009
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
NO_0
);
fPz009
.
setCreatedBy
(
UserSession
.
getLoginName
());
DaoUtils
.
insert
(
HPPZ009
.
INSERT
,
fPz009
);
fPz009
.
setCreatedName
(
UserSession
.
getLoginCName
());
fPz009
.
setCreatedTime
(
DateUtils
.
shortDateTime
());
dao
.
insert
(
HPPZ009
.
INSERT
,
fPz009
);
// 默认新增企业管理员账号
// 默认新增企业管理员账号
this
.
initUser
(
fPz009
);
this
.
initUser
(
fPz009
);
// 关联企业管理员角色
// 关联企业管理员角色
...
@@ -149,8 +145,8 @@ public class ServiceHPPZ009 extends ServiceBase {
...
@@ -149,8 +145,8 @@ public class ServiceHPPZ009 extends ServiceBase {
* @param inInfo
* @param inInfo
* @return
* @return
*/
*/
@OperationLogAnnotation
(
operModul
=
"配置管理"
,
operType
=
"新增"
,
operDesc
=
"新增"
)
@Override
@Override
@OperationLogAnnotation
(
operModul
=
"配置管理"
,
operType
=
"新增"
,
operDesc
=
"新增"
)
public
EiInfo
insert
(
EiInfo
inInfo
)
{
public
EiInfo
insert
(
EiInfo
inInfo
)
{
try
{
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
...
@@ -240,7 +236,7 @@ public class ServiceHPPZ009 extends ServiceBase {
...
@@ -240,7 +236,7 @@ public class ServiceHPPZ009 extends ServiceBase {
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++)
{
HPPZ009
hppz009
=
new
HPPZ009
();
HPPZ009
hppz009
=
new
HPPZ009
();
hppz009
.
fromMap
(
resultRows
.
get
(
i
));
hppz009
.
fromMap
(
resultRows
.
get
(
i
));
DaoUtils
.
update
(
"HPPZ009.update"
,
hppz009
);
DaoUtils
.
update
(
HPPZ009
.
UPDATE
,
hppz009
);
}
}
inInfo
=
this
.
query
(
inInfo
);
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
...
@@ -270,7 +266,7 @@ public class ServiceHPPZ009 extends ServiceBase {
...
@@ -270,7 +266,7 @@ public class ServiceHPPZ009 extends ServiceBase {
throw
new
PlatException
(
String
.
format
(
"企业[%s]已关联用户,请先解除用户"
,
throw
new
PlatException
(
String
.
format
(
"企业[%s]已关联用户,请先解除用户"
,
fPz009
.
getCompanyName
()));
fPz009
.
getCompanyName
()));
}
}
DaoUtils
.
update
(
"HPPZ009.delete"
,
fPz009
);
DaoUtils
.
update
(
HPPZ009
.
DELETE
,
fPz009
);
}
}
inInfo
=
this
.
query
(
inInfo
);
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
...
...
src/main/java/com/baosight/xservices/xs/og/service/ServiceXSOG0801.java
View file @
442edf6f
package
com
.
baosight
.
xservices
.
xs
.
og
.
service
;
package
com
.
baosight
.
xservices
.
xs
.
og
.
service
;
import
com.baosight.hpjx.core.security.UserSessionUtils
;
import
com.baosight.hpjx.core.security.UserSessionUtils
;
import
com.baosight.hpjx.hp.pz.domain.HPPZ009
;
import
com.baosight.hpjx.hp.pz.tools.HPPZTools
;
import
com.baosight.iplat4j.common.ed.domain.TEDCM01
;
import
com.baosight.iplat4j.common.ed.domain.TEDCM01
;
import
com.baosight.iplat4j.core.data.dao.DaoFactory
;
import
com.baosight.iplat4j.core.data.dao.DaoFactory
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
...
@@ -24,6 +26,7 @@ import com.baosight.xservices.xs.service.ServiceXSTreeNode;
...
@@ -24,6 +26,7 @@ import com.baosight.xservices.xs.service.ServiceXSTreeNode;
import
com.baosight.xservices.xs.up.utils.XSExcelUtils
;
import
com.baosight.xservices.xs.up.utils.XSExcelUtils
;
import
com.baosight.xservices.xs.util.LoginUserDetails
;
import
com.baosight.xservices.xs.util.LoginUserDetails
;
import
org.apache.commons.io.FileUtils
;
import
org.apache.commons.io.FileUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.poi.xssf.streaming.SXSSFWorkbook
;
import
org.apache.poi.xssf.streaming.SXSSFWorkbook
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
...
@@ -257,8 +260,8 @@ public class ServiceXSOG0801 extends ServiceBase {
...
@@ -257,8 +260,8 @@ public class ServiceXSOG0801 extends ServiceBase {
}
}
// 非管理员组织机构编码前缀增加企业编码 added by songx at 2024-01-15
// 非管理员组织机构编码前缀增加企业编码 added by songx at 2024-01-15
String
companyCode
=
UserSessionUtils
.
getCompanyCode
();
String
companyCode
=
UserSessionUtils
.
getCompanyCode
();
final
String
companyPrefix
=
LoginUserDetails
.
isUserAdmin
(
UserSessionUtils
.
getLoginName
())
HPPZ009
dbPz009
=
StringUtils
.
isBlank
(
companyCode
)
?
null
:
HPPZTools
.
HpPz009
.
getByCode
(
companyCode
);
?
""
:
"["
+
companyCode
+
"]"
;
final
String
companyPrefix
=
dbPz009
==
null
?
""
:
"["
+
dbPz009
.
getLoginPrefix
()
+
"]"
;
resultBlock
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
);
resultBlock
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
);
List
rows
=
resultBlock
.
getRows
();
List
rows
=
resultBlock
.
getRows
();
rows
.
forEach
((
m
)
->
{
rows
.
forEach
((
m
)
->
{
...
...
src/main/java/com/baosight/xservices/xs/service/ServiceXS40.java
View file @
442edf6f
package
com
.
baosight
.
xservices
.
xs
.
service
;
package
com
.
baosight
.
xservices
.
xs
.
service
;
import
com.baosight.hpjx.core.security.UserSessionUtils
;
import
com.baosight.hpjx.core.security.UserSessionUtils
;
import
com.baosight.hpjx.hp.pz.domain.HPPZ009
;
import
com.baosight.hpjx.hp.pz.tools.HPPZTools
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
...
@@ -225,9 +227,9 @@ public class ServiceXS40 extends ServiceEPBase {
...
@@ -225,9 +227,9 @@ public class ServiceXS40 extends ServiceEPBase {
eiBlock
.
setRows
(
r1Block
.
getRows
());
eiBlock
.
setRows
(
r1Block
.
getRows
());
// 非管理员组织机构编码前缀增加企业编码 added by songx at 2024-01-15
// 非管理员组织机构编码前缀增加企业编码 added by songx at 2024-01-15
String
companyCode
=
UserSessionUtils
.
getCompanyCode
();
String
companyCode
=
UserSessionUtils
.
getCompanyCode
();
final
String
companyPrefix
=
LoginUserDetails
.
isUserAdmin
(
UserSessionUtils
.
getLoginName
())
HPPZ009
dbPz009
=
StringUtils
.
isBlank
(
companyCode
)
?
null
:
HPPZTools
.
HpPz009
.
getByCode
(
companyCode
);
?
""
:
"["
+
companyCode
+
"]"
;
final
String
companyPrefix
=
dbPz009
==
null
?
""
:
"["
+
dbPz009
.
getLoginPrefix
()
+
"]"
;
for
(
int
i
=
0
;
i
<
eiBlock
.
getRowCount
();
++
i
)
{
for
(
int
i
=
0
;
i
<
eiBlock
.
getRowCount
();
++
i
)
{
Map
<
String
,
Object
>
inInfoRowMap
=
eiBlock
.
getRow
(
i
);
Map
<
String
,
Object
>
inInfoRowMap
=
eiBlock
.
getRow
(
i
);
inInfoRowMap
.
remove
(
"groupId"
);
inInfoRowMap
.
remove
(
"groupId"
);
inInfoRowMap
.
put
(
"groupEname"
,
companyPrefix
+
inInfoRowMap
.
get
(
"groupEname"
));
inInfoRowMap
.
put
(
"groupEname"
,
companyPrefix
+
inInfoRowMap
.
get
(
"groupEname"
));
...
...
src/main/webapp/XS/XS3001.js
View file @
442edf6f
...
@@ -38,6 +38,12 @@ $(function () {
...
@@ -38,6 +38,12 @@ $(function () {
result4Grid
.
dataSource
.
page
(
1
);
result4Grid
.
dataSource
.
page
(
1
);
});
});
/**
* 查询锁定用户
*/
$
(
"#QUERY_LOCK"
).
on
(
"click"
,
function
()
{
result9Region
.
dataSource
.
page
(
1
);
});
$
(
window
).
load
(
function
()
{
$
(
window
).
load
(
function
()
{
resultGrid
.
dataSource
.
page
(
1
)
resultGrid
.
dataSource
.
page
(
1
)
...
@@ -663,4 +669,4 @@ $(document).ready(function () {
...
@@ -663,4 +669,4 @@ $(document).ready(function () {
}
else
{
}
else
{
$
(
"#resetPasswordBtn"
).
hide
()
$
(
"#resetPasswordBtn"
).
hide
()
}
}
});
});
\ 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