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
8374a3d3
Commit
8374a3d3
authored
Sep 14, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.计划明细增加计划行号
parent
cb9ba8d3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
6 deletions
+35
-6
HGCG001A.java
src/main/java/com/baosight/hggp/hg/cg/domain/HGCG001A.java
+16
-0
ServiceHGCG001A.java
...java/com/baosight/hggp/hg/cg/service/ServiceHGCG001A.java
+15
-6
HGCG001A.xml
src/main/java/com/baosight/hggp/hg/cg/sql/HGCG001A.xml
+0
-0
HGConstant.java
src/main/java/com/baosight/hggp/hg/constant/HGConstant.java
+2
-0
ServiceHGSC009A.java
...java/com/baosight/hggp/hg/sc/service/ServiceHGSC009A.java
+2
-0
No files found.
src/main/java/com/baosight/hggp/hg/cg/domain/HGCG001A.java
View file @
8374a3d3
...
...
@@ -36,6 +36,7 @@ public class HGCG001A extends DaoEPBase {
public
static
final
String
FIELD_COMPANY_NAME
=
"companyName"
;
/* 公司名称*/
public
static
final
String
FIELD_PLAN_DATE
=
"planDate"
;
/* 计划日期*/
public
static
final
String
FIELD_PLAN_NO
=
"planNo"
;
/* 计划单号*/
public
static
final
String
FIELD_PLAN_LINE_NO
=
"planLineNo"
;
/* 计划单行号*/
public
static
final
String
FIELD_INVENT_TYPE
=
"inventType"
;
/* 存货类型*/
public
static
final
String
FIELD_INVENT_CODE
=
"inventCode"
;
/* 存货编码*/
public
static
final
String
FIELD_INVENT_NAME
=
"inventName"
;
/* 存货名称*/
...
...
@@ -122,6 +123,7 @@ public class HGCG001A extends DaoEPBase {
private
String
companyName
=
" "
;
/* 公司名称*/
private
String
planDate
=
" "
;
/* 计划日期*/
private
String
planNo
=
" "
;
/* 计划单号*/
private
String
planLineNo
=
" "
;
/* 计划单行号*/
private
String
inventType
=
" "
;
/* 存货类型*/
private
String
inventCode
=
" "
;
/* 存货编码*/
private
String
inventName
=
" "
;
/* 存货名称*/
...
...
@@ -217,6 +219,10 @@ public class HGCG001A extends DaoEPBase {
eiColumn
.
setDescName
(
"计划单号"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PLAN_LINE_NO
);
eiColumn
.
setDescName
(
"计划单行号"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INVENT_TYPE
);
eiColumn
.
setDescName
(
"存货类型"
);
eiMetadata
.
addMeta
(
eiColumn
);
...
...
@@ -984,6 +990,14 @@ public class HGCG001A extends DaoEPBase {
this
.
calculationMethod
=
calculationMethod
;
}
public
String
getPlanLineNo
()
{
return
planLineNo
;
}
public
void
setPlanLineNo
(
String
planLineNo
)
{
this
.
planLineNo
=
planLineNo
;
}
/**
* get the value from Map.
*
...
...
@@ -1006,6 +1020,7 @@ public class HGCG001A extends DaoEPBase {
setCompanyName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_COMPANY_NAME
)),
companyName
));
setPlanDate
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PLAN_DATE
)),
planDate
));
setPlanNo
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PLAN_NO
)),
planNo
));
setPlanLineNo
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PLAN_LINE_NO
)),
planLineNo
));
setInventType
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_TYPE
)),
inventType
));
setInventCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_CODE
)),
inventCode
));
setInventName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_NAME
)),
inventName
));
...
...
@@ -1059,6 +1074,7 @@ public class HGCG001A extends DaoEPBase {
map
.
put
(
FIELD_COMPANY_NAME
,
StringUtils
.
toString
(
companyName
,
eiMetadata
.
getMeta
(
FIELD_COMPANY_NAME
)));
map
.
put
(
FIELD_PLAN_DATE
,
StringUtils
.
toString
(
planDate
,
eiMetadata
.
getMeta
(
FIELD_PLAN_DATE
)));
map
.
put
(
FIELD_PLAN_NO
,
StringUtils
.
toString
(
planNo
,
eiMetadata
.
getMeta
(
FIELD_PLAN_NO
)));
map
.
put
(
FIELD_PLAN_LINE_NO
,
StringUtils
.
toString
(
planLineNo
,
eiMetadata
.
getMeta
(
FIELD_PLAN_LINE_NO
)));
map
.
put
(
FIELD_INVENT_TYPE
,
StringUtils
.
toString
(
inventType
,
eiMetadata
.
getMeta
(
FIELD_INVENT_TYPE
)));
map
.
put
(
FIELD_INVENT_CODE
,
StringUtils
.
toString
(
inventCode
,
eiMetadata
.
getMeta
(
FIELD_INVENT_CODE
)));
map
.
put
(
FIELD_INVENT_NAME
,
StringUtils
.
toString
(
inventName
,
eiMetadata
.
getMeta
(
FIELD_INVENT_NAME
)));
...
...
src/main/java/com/baosight/hggp/hg/cg/service/ServiceHGCG001A.java
View file @
8374a3d3
...
...
@@ -22,6 +22,7 @@ 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.service.impl.ServiceBase
;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
...
...
@@ -127,19 +128,27 @@ public class ServiceHGCG001A extends ServiceBase {
*
* @param fCg001s
*/
private
void
saveData
(
List
<
HGCG001A
>
fCg001s
,
HGCG001
c
g001
)
{
private
void
saveData
(
List
<
HGCG001A
>
fCg001s
,
HGCG001
dbC
g001
)
{
for
(
HGCG001A
fCg001a
:
fCg001s
)
{
fCg001a
.
setPurUnitWeight
(
fCg001a
.
getPurWeight
().
divide
(
fCg001a
.
getPurQty
(),
3
,
RoundingMode
.
HALF_UP
));
if
(
fCg001a
.
getId
()
==
null
||
fCg001a
.
getId
()
==
0
){
BeanUtils
.
copyProperties
(
cg001
,
fCg001a
,
"id"
,
"createdBy"
,
"createdName"
,
"createdTime"
,
"updatedBy"
,
"updatedName"
,
"updatedTime"
,
"inventType"
,
"inventTypeDetail"
,
"inventCode"
,
"inventName"
,
"spec"
,
"material"
,
"unit"
,
"length"
,
"width"
,
"thick"
,
"purQty"
,
"purUnitWeight"
,
"purWeight"
);
if
(
fCg001a
.
getId
()
==
null
||
fCg001a
.
getId
()
==
0
)
{
fCg001a
.
setPlanDate
(
dbCg001
.
getPlanDate
());
fCg001a
.
setPlanNo
(
dbCg001
.
getPlanNo
());
fCg001a
.
setPlanLineNo
(
SequenceGenerator
.
getNextSequence
(
HGConstant
.
SequenceId
.
CG_PLAN_LINE_NO
,
new
String
[]{
dbCg001
.
getPlanNo
()}));
fCg001a
.
setCompanyCode
(
dbCg001
.
getCompanyCode
());
fCg001a
.
setCompanyName
(
dbCg001
.
getCompanyName
());
fCg001a
.
setProjCode
(
dbCg001
.
getProjCode
());
fCg001a
.
setProjName
(
dbCg001
.
getProjName
());
fCg001a
.
setStatus
(
HGConstant
.
CgPlanStatus
.
S_0
);
fCg001a
.
setDeleteFlag
(
DeleteFlagEnum
.
UN_REMOVE
.
getCode
());
DaoUtils
.
insert
(
HGCG001A
.
INSERT
,
fCg001a
);
}
else
{
}
else
{
DaoUtils
.
update
(
HGCG001A
.
UPDATE
,
fCg001a
);
}
}
//修改主表数量
updateCg001Pur
(
c
g001
);
updateCg001Pur
(
dbC
g001
);
}
private
void
updateCg001Pur
(
HGCG001
cg001
)
{
...
...
src/main/java/com/baosight/hggp/hg/cg/sql/HGCG001A.xml
View file @
8374a3d3
This diff is collapsed.
Click to expand it.
src/main/java/com/baosight/hggp/hg/constant/HGConstant.java
View file @
8374a3d3
...
...
@@ -99,6 +99,8 @@ public class HGConstant {
public
static
final
String
APPLY_CODE
=
"APPLY_CODE"
;
// 采购计划号
public
static
final
String
CG_PLAN_NO
=
"CG_PLAN_NO"
;
// 采购计划行号
public
static
final
String
CG_PLAN_LINE_NO
=
"CG_PLAN_LINE_NO"
;
// 采购合同号
public
static
final
String
CG_CONTRACT_NO
=
"CG_CONTRACT_NO"
;
// 采购合同行号
...
...
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC009A.java
View file @
8374a3d3
...
...
@@ -268,6 +268,8 @@ public class ServiceHGSC009A extends ServiceBase {
cg001A
.
setPlanWeight
(
hgsc009A
.
getGrossAmount
());
cg001A
.
setPlanQty
(
hgsc009A
.
getQuantity
());
cg001A
.
setPlanNo
(
hgcg001
.
getPlanNo
());
cg001A
.
setPlanLineNo
(
SequenceGenerator
.
getNextSequence
(
HGConstant
.
SequenceId
.
CG_PLAN_LINE_NO
,
new
String
[]{
hgcg001
.
getPlanNo
()}));
cg001A
.
setUnit
(
finalPz005Map
.
get
(
hgsc009A
.
getInventCode
()).
getUnit
());
cg001A
.
setInventType
(
finalPz005Map
.
get
(
hgsc009A
.
getInventCode
()).
getInventType
());
DaoUtils
.
insert
(
HGCG001A
.
INSERT
,
cg001A
);
...
...
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