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
c58e5856
Commit
c58e5856
authored
Aug 05, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-08-05 材料计划导入删除项目材料计划重复导入校验
parent
b52ebf7f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
HGSCTools.java
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
+9
-8
No files found.
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
View file @
c58e5856
...
@@ -1340,7 +1340,7 @@ public class HGSCTools {
...
@@ -1340,7 +1340,7 @@ public class HGSCTools {
}
}
public
static
class
THGSC009
{
public
static
class
THGSC009
{
/* public static void generatorOrder(List<HGSC005> hgsc005List, List<HGSC005A> hgsc005AList){
/* public static void generatorOrder(List<HGSC005> hgsc005List, List<HGSC005A> hgsc005AList){
Map<String, Optional<HGSC005>> hgsc005Map = hgsc005List.stream().collect(Collectors.groupingBy(HGSC005::getPlanCode,Collectors.maxBy(
Map<String, Optional<HGSC005>> hgsc005Map = hgsc005List.stream().collect(Collectors.groupingBy(HGSC005::getPlanCode,Collectors.maxBy(
Comparator.comparingLong(HGSC005::getId))));
Comparator.comparingLong(HGSC005::getId))));
Map<String,List<HGSC005A>> hgsc005aMap = hgsc005AList.stream().collect(Collectors.groupingBy(HGSC005A::getPlanCode));
Map<String,List<HGSC005A>> hgsc005aMap = hgsc005AList.stream().collect(Collectors.groupingBy(HGSC005A::getPlanCode));
...
@@ -1351,9 +1351,9 @@ public class HGSCTools {
...
@@ -1351,9 +1351,9 @@ public class HGSCTools {
DaoUtils.insert(HGSC006.INSERT,hgsc006);
DaoUtils.insert(HGSC006.INSERT,hgsc006);
DaoUtils.insert(HGSC006A.INSERT,hgsc006AList);
DaoUtils.insert(HGSC006A.INSERT,hgsc006AList);
});
});
}*/
}*/
/*public static HGSC006 constructObj(HGSC005 hgsc005){
/*public static HGSC006 constructObj(HGSC005 hgsc005){
HGSC006 hgsc006 = new HGSC006();
HGSC006 hgsc006 = new HGSC006();
hgsc006.setOrderCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.HGSC006_ORDER_CODE));
hgsc006.setOrderCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.HGSC006_ORDER_CODE));
hgsc006.setMatId(hgsc005.getMatId());
hgsc006.setMatId(hgsc005.getMatId());
...
@@ -1364,7 +1364,7 @@ public class HGSCTools {
...
@@ -1364,7 +1364,7 @@ public class HGSCTools {
hgsc006.setProjName(hgsc005.getProjName());
hgsc006.setProjName(hgsc005.getProjName());
hgsc006.setAssignStatus(UNASSIGN.getCode());
hgsc006.setAssignStatus(UNASSIGN.getCode());
return hgsc006;
return hgsc006;
}*/
}*/
public
static
HGSC009
getById
(
Long
taskId
){
public
static
HGSC009
getById
(
Long
taskId
){
AssertUtils
.
isTrue
(
Objects
.
isNull
(
taskId
)||
taskId
<=
0
,
"材料计划ID不能为空!"
);
AssertUtils
.
isTrue
(
Objects
.
isNull
(
taskId
)||
taskId
<=
0
,
"材料计划ID不能为空!"
);
HGSC009
results
=
(
HGSC009
)
DaoBase
.
getInstance
().
get
(
HGSC009
.
QUERY
,
HGSC009
.
FIELD_ID
,
taskId
);
HGSC009
results
=
(
HGSC009
)
DaoBase
.
getInstance
().
get
(
HGSC009
.
QUERY
,
HGSC009
.
FIELD_ID
,
taskId
);
...
@@ -1411,13 +1411,14 @@ public class HGSCTools {
...
@@ -1411,13 +1411,14 @@ public class HGSCTools {
for
(
HGSC009
hgsc009:
hgsc009List
)
{
for
(
HGSC009
hgsc009:
hgsc009List
)
{
HGSC001
hgsc001
=
Hgsc001
.
queryByCode
(
hgsc009
.
getProjCode
());
HGSC001
hgsc001
=
Hgsc001
.
queryByCode
(
hgsc009
.
getProjCode
());
AssertUtils
.
isNull
(
hgsc001
,
"项目不存在,添加失败!"
);
AssertUtils
.
isNull
(
hgsc001
,
"项目不存在,添加失败!"
);
HGSC009
sc009
=
queryByCode
(
hgsc009
.
getProjCode
());
//
HGSC009 sc009 = queryByCode(hgsc009.getProjCode());
AssertUtils
.
isNotNull
(
sc009
,
"材料计划项目已添加,添加失败!"
);
//
AssertUtils.isNotNull(sc009,"材料计划项目已添加,添加失败!");
if
(
hgsc001
.
getCompanyCode
()
!=
null
)
{
if
(
hgsc001
.
getCompanyCode
()
!=
null
)
{
hgsc009
.
setCompanyCode
(
hgsc001
.
getCompanyCode
());
hgsc009
.
setCompanyCode
(
hgsc001
.
getCompanyCode
());
hgsc009
.
setCompanyName
(
hgsc001
.
getCompanyName
());
hgsc009
.
setProjName
(
hgsc001
.
getProjName
());
}
}
hgsc009
.
setCompanyName
(
hgsc001
.
getCompanyName
());
hgsc009
.
setProjName
(
hgsc001
.
getProjName
());
hgsc009
.
setPlanMaterialCode
(
SequenceGenerator
.
getNextSequence
(
HGConstant
.
SequenceId
.
PLAN_MATERIAL_CODE
));
hgsc009
.
setPlanMaterialCode
(
SequenceGenerator
.
getNextSequence
(
HGConstant
.
SequenceId
.
PLAN_MATERIAL_CODE
));
DaoUtils
.
insert
(
HGSC009
.
INSERT
,
hgsc009
);
DaoUtils
.
insert
(
HGSC009
.
INSERT
,
hgsc009
);
for
(
HGSC009A
hgsc009a:
hgsc009aList
)
{
for
(
HGSC009A
hgsc009a:
hgsc009aList
)
{
...
...
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