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
c469a33b
Commit
c469a33b
authored
Jun 18, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://git.pseer.com:8800/platform/hg-smart
into dev-ly
parents
8460c00a
0c12b70f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
5 deletions
+16
-5
ServiceHGKC005A.java
...java/com/baosight/hggp/hg/kc/service/ServiceHGKC005A.java
+2
-1
HGKCTools.java
src/main/java/com/baosight/hggp/hg/kc/tools/HGKCTools.java
+2
-1
HGSCTools.java
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
+12
-3
No files found.
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC005A.java
View file @
c469a33b
...
...
@@ -13,6 +13,7 @@ import com.baosight.hggp.util.*;
import
com.baosight.hggp.util.contants.ACConstants
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.service.impl.ServiceEPBase
;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
...
...
@@ -147,7 +148,7 @@ public class ServiceHGKC005A extends ServiceEPBase {
newKc005
.
setInventRecordId
(
dbKc010
.
getSpecId
());
newKc005
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
NO_0
);
DaoUtils
.
insert
(
HGKC005
.
INSERT
,
newKc005
);
// 修改库存数量
HGKCTools
.
updateStock
(
newKc005
);
}
}
...
...
src/main/java/com/baosight/hggp/hg/kc/tools/HGKCTools.java
View file @
c469a33b
...
...
@@ -561,7 +561,8 @@ public class HGKCTools {
public
static
void
updateStock
(
HGKC005
hgKc005
)
{
if
(
hgKc005
.
getDiffAmount
().
compareTo
(
BigDecimal
.
ZERO
)
==
0
)
{
throw
new
PlatException
(
"入库数量不能为空"
);
// throw new PlatException("入库数量不能为空");
return
;
}
EiInfo
inInfo
=
new
EiInfo
();
inInfo
.
set
(
"companyCode"
,
hgKc005
.
getCompanyCode
());
...
...
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
View file @
c469a33b
...
...
@@ -267,6 +267,8 @@ public class HGSCTools {
put
(
HGSC001A
.
FIELD_proj_id
,
projId
);
put
(
"notIds"
,
notIds
);
}});
}
else
{
DaoUtils
.
update
(
HGSC001A
.
DELETE_BY_PROJID
,
new
HashMap
<
String
,
Object
>(){{
put
(
HGSC001A
.
FIELD_proj_id
,
projId
);}});
}
}
...
...
@@ -581,6 +583,8 @@ public class HGSCTools {
//基础工时
private
final
static
BigDecimal
baseWorkHour
=
new
BigDecimal
(
8
);
private
final
static
Integer
finishDateDiffDay
=
new
Integer
(-
3
);
public
static
int
schedule
(
String
planCode
)
{
List
<
HGSC005A
>
hgsc005AList
=
queryByPlanCode
(
planCode
);
// hgsc005AList.sort(Comparator.comparing(HGSC005A::getProductType).thenComparing(HGSC005A::getProcessOrder,Comparator.reverseOrder()));
...
...
@@ -618,12 +622,17 @@ public class HGSCTools {
return
hgsc005AList
.
size
();
}
private
static
String
handleEndDate
(
String
endDate
,
HGSC005A
planInfo
){
if
(
StringUtils
.
isBlank
(
endDate
)&&
StringUtils
.
isNotBlank
(
planInfo
.
getFinishDate
())){
endDate
=
DateUtil
.
toDateStr
(
DateUtils
.
addDays
(
DateUtil
.
toDate
(
planInfo
.
getFinishDate
(),
DateUtil
.
DATE10_PATTERN
),
finishDateDiffDay
.
intValue
()),
DateUtil
.
DATE10_PATTERN
);
}
return
endDate
;
}
private
static
BigDecimal
calculateWordHour
(
HGSC005A
planInfo
,
List
<
HGSJ001
>
hgsj001List
,
List
<
HGPZ005
>
hgpz005List
,
List
<
HGPZ005A
>
hgpz005AList
,
String
endDate
,
BigDecimal
remainder
){
if
(
StringUtils
.
isBlank
(
endDate
)){
endDate
=
planInfo
.
getFinishDate
();
}
endDate
=
handleEndDate
(
endDate
,
planInfo
);
planInfo
.
setPlanEndDate
(
endDate
);
AtomicReference
<
BigDecimal
>
workHour
=
new
AtomicReference
<>(
new
BigDecimal
(
0
));
BigDecimal
finalRemainder
=
remainder
;
...
...
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