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
d1321201
Commit
d1321201
authored
Oct 30, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.fixBug:解决公共方法中下拉框组装值错误的问题
parent
fedb0d16
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
16 deletions
+32
-16
ServiceHGSC004A.java
...java/com/baosight/hggp/hg/sc/service/ServiceHGSC004A.java
+21
-5
HGSCTools.java
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
+1
-1
CommonMethod.java
src/main/java/com/baosight/hggp/util/CommonMethod.java
+10
-10
No files found.
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC004A.java
View file @
d1321201
package
com
.
baosight
.
hggp
.
hg
.
sc
.
service
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.baosight.hggp.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.common.ProductTypeEnum
;
...
...
@@ -10,9 +9,18 @@ import com.baosight.hggp.core.security.UserSessionUtils;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.pz.domain.HGPZ005
;
import
com.baosight.hggp.hg.pz.tools.HGPZTools
;
import
com.baosight.hggp.hg.sc.domain.*
;
import
com.baosight.hggp.hg.sc.domain.HGSC003
;
import
com.baosight.hggp.hg.sc.domain.HGSC004
;
import
com.baosight.hggp.hg.sc.domain.HGSC004A
;
import
com.baosight.hggp.hg.sc.domain.HGSC005
;
import
com.baosight.hggp.hg.sc.domain.HGSC005A
;
import
com.baosight.hggp.hg.sc.tools.HGSCTools
;
import
com.baosight.hggp.util.*
;
import
com.baosight.hggp.util.AssertUtils
;
import
com.baosight.hggp.util.CommonMethod
;
import
com.baosight.hggp.util.EiInfoUtils
;
import
com.baosight.hggp.util.ErrorCodeUtils
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.hggp.util.MapUtils
;
import
com.baosight.hggp.util.contants.ACConstants
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
...
...
@@ -24,9 +32,17 @@ import com.baosight.iplat4j.core.util.StringUtils;
import
org.springframework.util.CollectionUtils
;
import
java.math.BigDecimal
;
import
java.util.*
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.LinkedList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Objects
;
import
java.util.stream.Collectors
;
import
cn.hutool.core.bean.BeanUtil
;
/**
* @Author jhs
...
...
@@ -384,7 +400,7 @@ public class ServiceHGSC004A extends ServiceBase {
mapA
.
put
(
"notId"
,
hgsc004a
.
getId
());
}
List
<
HGSC004A
>
hgsc004AList
=
dao
.
query
(
HGSC004A
.
QUERY
,
mapA
,
0
,
-
999999
);
AssertUtils
.
isTrue
(!
CollectionUtils
.
isEmpty
(
hgsc004AList
),
"已存在构
建
"
+
hgsc004a
.
getProductCode
()+
"-"
+
hgsc004a
.
getProductName
());
AssertUtils
.
isTrue
(!
CollectionUtils
.
isEmpty
(
hgsc004AList
),
"已存在构
件
"
+
hgsc004a
.
getProductCode
()+
"-"
+
hgsc004a
.
getProductName
());
}
AssertUtils
.
isEmpty
(
UserSessionUtils
.
getAccountCode
(),
"当前用户未绑定公司,无法操作数据,请联系管理员!"
);
AssertUtils
.
isEmpty
(
UserSessionUtils
.
getOrgId
(),
"当前用户未绑定部门,无法操作数据,请联系管理员!"
);
...
...
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
View file @
d1321201
...
...
@@ -592,7 +592,7 @@ public class HGSCTools {
mapA
.
put
(
HGSC004A
.
FIELD_parent_prod_code
,
hgsc004a
.
getParentProdCode
());
mapA
.
put
(
HGSC004A
.
FIELD_product_code
,
hgsc004a
.
getProductCode
());
List
<
HGSC004A
>
hgsc004AList
=
list
(
mapA
);
AssertUtils
.
isTrue
(!
CollectionUtils
.
isEmpty
(
hgsc004AList
),
String
.
format
(
"已存在构
建
%s-%s"
,
hgsc004a
.
getProductCode
(),
hgsc004a
.
getProductName
()));
AssertUtils
.
isTrue
(!
CollectionUtils
.
isEmpty
(
hgsc004AList
),
String
.
format
(
"已存在构
件
%s-%s"
,
hgsc004a
.
getProductCode
(),
hgsc004a
.
getProductName
()));
}
AssertUtils
.
isEmpty
(
UserSessionUtils
.
getAccountCode
(),
"当前用户未绑定公司,无法操作数据,请联系管理员!"
);
//AssertUtils.isEmpty(UserSessionUtils.getOrgId(), "当前用户未绑定部门,无法操作数据,请联系管理员!");
...
...
src/main/java/com/baosight/hggp/util/CommonMethod.java
View file @
d1321201
...
...
@@ -93,16 +93,16 @@ public class CommonMethod {
row
.
put
(
HGConstants
.
VALUE_FIELD
,
String
.
valueOf
(
tryValue
.
get
(
tableParam
.
getValue
())));
if
(
isSplicingSymbol
)
{
row
.
put
(
HGConstants
.
TEXT_FIELD
,
(
tryValue
.
get
(
tableParam
.
getValue
())
+
HGConstants
.
SPLICING_SYMBOL
+
tryValue
.
get
(
tableParam
.
getText
())));
row
.
put
(
HGConstants
.
PARAM1_FIELD
,
(
tryValue
.
get
(
tableParam
.
getValue
())
+
HGConstants
.
SPLICING_SYMBOL
+
tryValue
.
get
(
tableParam
.
getParam1
())));
row
.
put
(
HGConstants
.
PARAM2_FIELD
,
(
tryValue
.
get
(
tableParam
.
getValue
())
+
HGConstants
.
SPLICING_SYMBOL
+
tryValue
.
get
(
tableParam
.
getParam2
())));
row
.
put
(
HGConstants
.
PARAM3_FIELD
,
(
tryValue
.
get
(
tableParam
.
getValue
())
+
HGConstants
.
SPLICING_SYMBOL
+
tryValue
.
get
(
tableParam
.
getParam3
())));
row
.
put
(
HGConstants
.
PARAM4_FIELD
,
(
tryValue
.
get
(
tableParam
.
getValue
())
+
HGConstants
.
SPLICING_SYMBOL
+
tryValue
.
get
(
tableParam
.
getParam4
())));
row
.
put
(
HGConstants
.
PARAM5_FIELD
,
(
tryValue
.
get
(
tableParam
.
getValue
())
+
HGConstants
.
SPLICING_SYMBOL
+
tryValue
.
get
(
tableParam
.
getParam5
())));
row
.
put
(
HGConstants
.
PARAM6_FIELD
,
(
tryValue
.
get
(
tableParam
.
getValue
())
+
HGConstants
.
SPLICING_SYMBOL
+
tryValue
.
get
(
tableParam
.
getParam6
())));
row
.
put
(
HGConstants
.
PARAM7_FIELD
,
(
tryValue
.
get
(
tableParam
.
getValue
())
+
HGConstants
.
SPLICING_SYMBOL
+
tryValue
.
get
(
tableParam
.
getParam7
())));
row
.
put
(
HGConstants
.
PARAM8_FIELD
,
(
tryValue
.
get
(
tableParam
.
getValue
())
+
HGConstants
.
SPLICING_SYMBOL
+
tryValue
.
get
(
tableParam
.
getParam8
())));
row
.
put
(
HGConstants
.
PARAM9_FIELD
,
(
tryValue
.
get
(
tableParam
.
getValue
())
+
HGConstants
.
SPLICING_SYMBOL
+
tryValue
.
get
(
tableParam
.
getParam9
())));
row
.
put
(
HGConstants
.
PARAM10_FIELD
,
(
tryValue
.
get
(
tableParam
.
getValue
())
+
HGConstants
.
SPLICING_SYMBOL
+
tryValue
.
get
(
tableParam
.
getParam10
())));
row
.
put
(
HGConstants
.
PARAM1_FIELD
,
String
.
valueOf
(
tryValue
.
get
(
tableParam
.
getParam1
())));
row
.
put
(
HGConstants
.
PARAM2_FIELD
,
String
.
valueOf
(
tryValue
.
get
(
tableParam
.
getParam2
())));
row
.
put
(
HGConstants
.
PARAM3_FIELD
,
String
.
valueOf
(
tryValue
.
get
(
tableParam
.
getParam3
())));
row
.
put
(
HGConstants
.
PARAM4_FIELD
,
String
.
valueOf
(
tryValue
.
get
(
tableParam
.
getParam4
())));
row
.
put
(
HGConstants
.
PARAM5_FIELD
,
String
.
valueOf
(
tryValue
.
get
(
tableParam
.
getParam5
())));
row
.
put
(
HGConstants
.
PARAM6_FIELD
,
String
.
valueOf
(
tryValue
.
get
(
tableParam
.
getParam6
())));
row
.
put
(
HGConstants
.
PARAM7_FIELD
,
String
.
valueOf
(
tryValue
.
get
(
tableParam
.
getParam7
())));
row
.
put
(
HGConstants
.
PARAM8_FIELD
,
String
.
valueOf
(
tryValue
.
get
(
tableParam
.
getParam8
())));
row
.
put
(
HGConstants
.
PARAM9_FIELD
,
String
.
valueOf
(
tryValue
.
get
(
tableParam
.
getParam9
())));
row
.
put
(
HGConstants
.
PARAM10_FIELD
,
String
.
valueOf
(
tryValue
.
get
(
tableParam
.
getParam10
())));
}
else
{
row
.
put
(
HGConstants
.
TEXT_FIELD
,
String
.
valueOf
(
tryValue
.
get
(
tableParam
.
getText
())));
row
.
put
(
HGConstants
.
PARAM1_FIELD
,
String
.
valueOf
(
tryValue
.
get
(
tableParam
.
getParam1
())));
...
...
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