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
b993f965
Commit
b993f965
authored
Aug 29, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.采购合同BUG修复
parent
294bfa0c
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
30 additions
and
24 deletions
+30
-24
ServiceHGCG002A.java
...java/com/baosight/hggp/hg/cg/service/ServiceHGCG002A.java
+19
-13
HGCG002.js
src/main/webapp/HG/CG/HGCG002.js
+1
-1
HGCG002.jsp
src/main/webapp/HG/CG/HGCG002.jsp
+1
-1
HGCG002A.jsp
src/main/webapp/HG/CG/HGCG002A.jsp
+5
-5
HGCG003.js
src/main/webapp/HG/CG/HGCG003.js
+2
-2
HGCG003.jsp
src/main/webapp/HG/CG/HGCG003.jsp
+1
-1
HGCG003A.jsp
src/main/webapp/HG/CG/HGCG003A.jsp
+1
-1
No files found.
src/main/java/com/baosight/hggp/hg/cg/service/ServiceHGCG002A.java
View file @
b993f965
...
@@ -5,7 +5,10 @@ import com.baosight.hggp.common.DdynamicEnum;
...
@@ -5,7 +5,10 @@ import com.baosight.hggp.common.DdynamicEnum;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.enums.DeleteFlagEnum
;
import
com.baosight.hggp.core.enums.DeleteFlagEnum
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.cg.domain.*
;
import
com.baosight.hggp.hg.cg.domain.HGCG001
;
import
com.baosight.hggp.hg.cg.domain.HGCG001A
;
import
com.baosight.hggp.hg.cg.domain.HGCG002
;
import
com.baosight.hggp.hg.cg.domain.HGCG002B
;
import
com.baosight.hggp.hg.cg.tools.HGCGTools
;
import
com.baosight.hggp.hg.cg.tools.HGCGTools
;
import
com.baosight.hggp.hg.cg.utils.HGCGUtils
;
import
com.baosight.hggp.hg.cg.utils.HGCGUtils
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.constant.HGConstant
;
...
@@ -123,6 +126,8 @@ public class ServiceHGCG002A extends ServiceBase {
...
@@ -123,6 +126,8 @@ public class ServiceHGCG002A extends ServiceBase {
Long
id
=
fCg001A
.
getId
();
Long
id
=
fCg001A
.
getId
();
HGCG001A
dbCg001A
=
dbCg001AMap
.
get
(
id
);
HGCG001A
dbCg001A
=
dbCg001AMap
.
get
(
id
);
AssertUtils
.
isNull
(
dbCg001A
,
String
.
format
(
"计划明细[%s]不存在"
,
id
));
AssertUtils
.
isNull
(
dbCg001A
,
String
.
format
(
"计划明细[%s]不存在"
,
id
));
AssertUtils
.
isGe
(
BigDecimal
.
ZERO
,
fCg001A
.
getPurQty
(),
"采购数量不能小于等于0"
);
AssertUtils
.
isGt
(
BigDecimal
.
ZERO
,
fCg001A
.
getPurWeight
(),
"采购总量不能小于0"
);
AssertUtils
.
isTrue
(
fCg001A
.
getTaxRate
().
compareTo
(
BigDecimal
.
ZERO
)
<=
0
,
"税率不能小于等于0"
);
AssertUtils
.
isTrue
(
fCg001A
.
getTaxRate
().
compareTo
(
BigDecimal
.
ZERO
)
<=
0
,
"税率不能小于等于0"
);
AssertUtils
.
isTrue
(
fCg001A
.
getPrice
().
compareTo
(
BigDecimal
.
ZERO
)
<=
0
,
"单价不能小于等于0"
);
AssertUtils
.
isTrue
(
fCg001A
.
getPrice
().
compareTo
(
BigDecimal
.
ZERO
)
<=
0
,
"单价不能小于等于0"
);
}
}
...
@@ -130,13 +135,13 @@ public class ServiceHGCG002A extends ServiceBase {
...
@@ -130,13 +135,13 @@ public class ServiceHGCG002A extends ServiceBase {
/**
/**
* 数据保存
* 数据保存
* @param
resultRow
s
* @param
fCg001A
s
* @param dbCg001Map
* @param dbCg001Map
* @param hgcg001Map
* @param hgcg001Map
*/
*/
private
void
confirmData
(
List
<
HGCG001A
>
resultRow
s
,
Map
<
Long
,
HGCG001A
>
dbCg001Map
,
Map
<
String
,
HGCG001
>
hgcg001Map
)
{
private
void
confirmData
(
List
<
HGCG001A
>
fCg001A
s
,
Map
<
Long
,
HGCG001A
>
dbCg001Map
,
Map
<
String
,
HGCG001
>
hgcg001Map
)
{
//取一条主表数据,用于拷贝合同主表信息
//取一条主表数据,用于拷贝合同主表信息
HGCG001A
oneCg001A
=
resultRow
s
.
get
(
0
);
HGCG001A
oneCg001A
=
fCg001A
s
.
get
(
0
);
HGCG001
oneCG001
=
hgcg001Map
.
get
(
oneCg001A
.
getPlanNo
());
HGCG001
oneCG001
=
hgcg001Map
.
get
(
oneCg001A
.
getPlanNo
());
HGCG002
newCg002
=
new
HGCG002
();
HGCG002
newCg002
=
new
HGCG002
();
BeanUtils
.
copyProperties
(
oneCG001
,
newCg002
,
"id"
,
"createdBy"
,
"createdName"
,
"createdTime"
,
"updatedBy"
,
"updatedName"
,
"updatedTime"
);
BeanUtils
.
copyProperties
(
oneCG001
,
newCg002
,
"id"
,
"createdBy"
,
"createdName"
,
"createdTime"
,
"updatedBy"
,
"updatedName"
,
"updatedTime"
);
...
@@ -146,30 +151,31 @@ public class ServiceHGCG002A extends ServiceBase {
...
@@ -146,30 +151,31 @@ public class ServiceHGCG002A extends ServiceBase {
newCg002
.
setDeleteFlag
(
DeleteFlagEnum
.
UN_REMOVE
.
getCode
());
newCg002
.
setDeleteFlag
(
DeleteFlagEnum
.
UN_REMOVE
.
getCode
());
newCg002
.
setSource
(
HGConstant
.
CgSource
.
DEFAULT
);
newCg002
.
setSource
(
HGConstant
.
CgSource
.
DEFAULT
);
DaoUtils
.
insert
(
HGCG002
.
INSERT
,
newCg002
);
DaoUtils
.
insert
(
HGCG002
.
INSERT
,
newCg002
);
for
(
HGCG001A
hgcg001A
:
resultRow
s
)
{
for
(
HGCG001A
fCg001A
:
fCg001A
s
)
{
//新增子表信息
//新增子表信息
insertDetails
(
hgcg001A
,
newCg002
);
insertDetails
(
fCg001A
,
newCg002
);
HGCG001
cg001
=
hgcg001Map
.
get
(
hgc
g001A
.
getPlanNo
());
HGCG001
cg001
=
hgcg001Map
.
get
(
fC
g001A
.
getPlanNo
());
// 更新计划状态
// 更新计划状态
HGCGTools
.
HgCg001
.
updateStatus
(
cg001
.
getPlanNo
(),
HGConstant
.
CgPlanStatus
.
S_4
);
HGCGTools
.
HgCg001
.
updateStatus
(
cg001
.
getPlanNo
(),
HGConstant
.
CgPlanStatus
.
S_4
);
// 更新计划状态
// 更新计划状态
HGCGTools
.
HgCg001A
.
updateStatus
(
hgc
g001A
.
getId
(),
HGConstant
.
CgPlanStatus
.
S_4
);
HGCGTools
.
HgCg001A
.
updateStatus
(
fC
g001A
.
getId
(),
HGConstant
.
CgPlanStatus
.
S_4
);
}
}
//修改主表信息
//修改主表信息
HGCGTools
.
HgCg002
.
updateCg002Pur
(
newCg002
);
HGCGTools
.
HgCg002
.
updateCg002Pur
(
newCg002
);
}
}
private
void
insertDetails
(
HGCG001A
db
Cg001A
,
HGCG002
newCg002
)
{
private
void
insertDetails
(
HGCG001A
f
Cg001A
,
HGCG002
newCg002
)
{
//获取采购计划明细
//获取采购计划明细
List
<
HGCG002B
>
cg002BList
=
new
LinkedList
<>();
List
<
HGCG002B
>
cg002BList
=
new
LinkedList
<>();
HGCG002B
cg002B
=
new
HGCG002B
();
HGCG002B
cg002B
=
new
HGCG002B
();
//拷贝明细信息
//拷贝明细信息
BeanUtils
.
copyProperties
(
dbCg001A
,
cg002B
,
"id"
,
"createdBy"
,
"createdName"
,
"createdTime"
,
"updatedBy"
,
"updatedName"
,
"updatedTime"
);
BeanUtils
.
copyProperties
(
fCg001A
,
cg002B
,
"id"
,
"createdBy"
,
"createdName"
,
"createdTime"
,
"updatedBy"
,
"updatedName"
,
"updatedTime"
);
cg002B
.
setDeleteFlag
(
DeleteFlagEnum
.
UN_REMOVE
.
getCode
());
cg002B
.
setDeleteFlag
(
DeleteFlagEnum
.
UN_REMOVE
.
getCode
());
cg002B
.
setPrimaryId
(
newCg002
.
getId
());
cg002B
.
setPrimaryId
(
newCg002
.
getId
());
cg002B
.
setPlanDetailId
(
db
Cg001A
.
getId
());
cg002B
.
setPlanDetailId
(
f
Cg001A
.
getId
());
cg002BList
.
add
(
cg002B
);
cg002BList
.
add
(
cg002B
);
DaoUtils
.
insertBatch
(
HGCG002B
.
INSERT
,
cg002BList
);
DaoUtils
.
insertBatch
(
HGCG002B
.
INSERT
,
cg002BList
);
}
}
/**
/**
...
...
src/main/webapp/HG/CG/HGCG002.js
View file @
b993f965
...
@@ -381,7 +381,7 @@ let selectPlan = function () {
...
@@ -381,7 +381,7 @@ let selectPlan = function () {
href
:
"HGCG002A?methodName=initLoad"
,
href
:
"HGCG002A?methodName=initLoad"
,
title
:
"<div style='text-align: center;'>计划查询</div>"
,
title
:
"<div style='text-align: center;'>计划查询</div>"
,
width
:
"80%"
,
width
:
"80%"
,
height
:
"
8
0%"
,
height
:
"
9
0%"
,
callbackName
:
selectPlanCallback
callbackName
:
selectPlanCallback
});
});
}
}
...
...
src/main/webapp/HG/CG/HGCG002.jsp
View file @
b993f965
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
</EF:EFRegion>
</EF:EFRegion>
<EF:EFRegion
id=
"result"
title=
"明细信息"
>
<EF:EFRegion
id=
"result"
title=
"明细信息"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"override"
isFloat=
"true"
checkMode=
"row"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"override"
isFloat=
"true"
checkMode=
"row"
height=
"65vh"
>
<EF:EFColumn
ename=
"id"
cname=
"内码"
hidden=
"true"
/>
<EF:EFColumn
ename=
"id"
cname=
"内码"
hidden=
"true"
/>
<EF:EFColumn
ename=
"operator"
cname=
"操作"
locked=
"true"
enable=
"false"
width=
"80"
align=
"center"
/>
<EF:EFColumn
ename=
"operator"
cname=
"操作"
locked=
"true"
enable=
"false"
width=
"80"
align=
"center"
/>
<EF:EFComboColumn
ename=
"source"
cname=
"数据来源"
enable=
"false"
width=
"80"
align=
"center"
defaultValue=
"1"
>
<EF:EFComboColumn
ename=
"source"
cname=
"数据来源"
enable=
"false"
width=
"80"
align=
"center"
defaultValue=
"1"
>
...
...
src/main/webapp/HG/CG/HGCG002A.jsp
View file @
b993f965
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
</EF:EFRegion>
</EF:EFRegion>
<EF:EFRegion
id=
"result"
title=
"记录集"
>
<EF:EFRegion
id=
"result"
title=
"记录集"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"override"
isFloat=
"true"
checkMode=
"row"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"override"
isFloat=
"true"
checkMode=
"row"
height=
"67vh"
>
<EF:EFColumn
ename=
"id"
cname=
"内码"
hidden=
"true"
/>
<EF:EFColumn
ename=
"id"
cname=
"内码"
hidden=
"true"
/>
<EF:EFColumn
ename=
"companyCode"
cname=
"公司编码"
enable=
"false"
width=
"100"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"companyCode"
cname=
"公司编码"
enable=
"false"
width=
"100"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"companyName"
cname=
"公司名称"
enable=
"false"
width=
"130"
align=
"center"
/>
<EF:EFColumn
ename=
"companyName"
cname=
"公司名称"
enable=
"false"
width=
"130"
align=
"center"
/>
...
@@ -33,15 +33,15 @@
...
@@ -33,15 +33,15 @@
<EF:EFColumn
ename=
"inventCode"
cname=
"存货编码"
enable=
"false"
width=
"100"
align=
"center"
/>
<EF:EFColumn
ename=
"inventCode"
cname=
"存货编码"
enable=
"false"
width=
"100"
align=
"center"
/>
<EF:EFColumn
ename=
"inventName"
cname=
"存货名称"
enable=
"false"
width=
"100"
align=
"center"
/>
<EF:EFColumn
ename=
"inventName"
cname=
"存货名称"
enable=
"false"
width=
"100"
align=
"center"
/>
<EF:EFColumn
ename=
"spec"
cname=
"规格"
enable=
"false"
width=
"120"
align=
"center"
/>
<EF:EFColumn
ename=
"spec"
cname=
"规格"
enable=
"false"
width=
"120"
align=
"center"
/>
<EF:EFColumn
ename=
"purQty"
cname=
"采购数量"
width=
"120"
align=
"right"
format=
"{0:N3}"
enable=
"false"
sumType=
"page"
/>
<EF:EFColumn
ename=
"purWeight"
cname=
"采购重量"
width=
"120"
align=
"right"
format=
"{0:N3}"
enable=
"false"
sumType=
"page"
/>
<EF:EFColumn
ename=
"material"
cname=
"材质"
enable=
"false"
width=
"80"
align=
"center"
/>
<EF:EFColumn
ename=
"material"
cname=
"材质"
enable=
"false"
width=
"80"
align=
"center"
/>
<EF:EFColumn
ename=
"unit"
cname=
"单位"
enable=
"false"
width=
"80"
align=
"center"
/>
<EF:EFColumn
ename=
"unit"
cname=
"单位"
enable=
"false"
width=
"80"
align=
"center"
/>
<EF:EFColumn
ename=
"length"
cname=
"长(MM)"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"length"
cname=
"长(MM)"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"width"
cname=
"宽(MM)"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"width"
cname=
"宽(MM)"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"thick"
cname=
"厚(MM)"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"thick"
cname=
"厚(MM)"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"purQty"
cname=
"采购数量"
width=
"120"
align=
"right"
format=
"{0:N3}"
sumType=
"page"
required=
"true"
/>
<EF:EFColumn
ename=
"purWeight"
cname=
"采购重量"
width=
"120"
align=
"right"
format=
"{0:N3}"
sumType=
"page"
required=
"true"
/>
<EF:EFColumn
ename=
"price"
cname=
"单价"
width=
"80"
align=
"right"
format=
"{0:N3}"
required=
"true"
/>
<EF:EFColumn
ename=
"price"
cname=
"单价"
width=
"80"
align=
"right"
format=
"{0:N3}"
required=
"true"
/>
<EF:EFComboColumn
ename=
"taxRate"
cname=
"税率(%)"
enable=
"true"
width=
"100"
align=
"center"
required=
"true"
<EF:EFComboColumn
ename=
"taxRate"
cname=
"税率(%)"
enable=
"true"
width=
"100"
align=
"center"
required=
"true"
copy=
"true"
>
copy=
"true"
>
...
...
src/main/webapp/HG/CG/HGCG003.js
View file @
b993f965
...
@@ -320,7 +320,7 @@ let selectContract = function () {
...
@@ -320,7 +320,7 @@ let selectContract = function () {
href
:
"HGCG003A?methodName=initLoad"
,
href
:
"HGCG003A?methodName=initLoad"
,
title
:
"<div style='text-align: center;'>合同查询</div>"
,
title
:
"<div style='text-align: center;'>合同查询</div>"
,
width
:
"80%"
,
width
:
"80%"
,
height
:
"
8
0%"
,
height
:
"
9
0%"
,
callbackName
:
selectContractCallback
callbackName
:
selectContractCallback
});
});
}
}
...
@@ -364,7 +364,7 @@ function showDetail(id,status,source) {
...
@@ -364,7 +364,7 @@ function showDetail(id,status,source) {
href
:
"HGCG003B?methodName=initLoad&inqu_status-0-primaryId="
+
id
+
"&status="
+
status
+
"&source="
+
source
,
href
:
"HGCG003B?methodName=initLoad&inqu_status-0-primaryId="
+
id
+
"&status="
+
status
+
"&source="
+
source
,
title
:
"<div style='text-align: center;'>详情</div>"
,
title
:
"<div style='text-align: center;'>详情</div>"
,
width
:
"80%"
,
width
:
"80%"
,
height
:
"
8
0%"
,
height
:
"
9
0%"
,
callbackName
:
windowCallback
callbackName
:
windowCallback
});
});
}
}
...
...
src/main/webapp/HG/CG/HGCG003.jsp
View file @
b993f965
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
</EF:EFRegion>
</EF:EFRegion>
<EF:EFRegion
id=
"result"
title=
"明细信息"
>
<EF:EFRegion
id=
"result"
title=
"明细信息"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"override"
isFloat=
"true"
checkMode=
"row"
copyToAdd=
"false"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"override"
isFloat=
"true"
checkMode=
"row"
copyToAdd=
"false"
height=
"63vh"
>
<EF:EFColumn
ename=
"id"
cname=
"内码"
hidden=
"true"
/>
<EF:EFColumn
ename=
"id"
cname=
"内码"
hidden=
"true"
/>
<EF:EFColumn
ename=
"operator"
cname=
"操作"
locked=
"true"
enable=
"false"
width=
"120"
align=
"center"
/>
<EF:EFColumn
ename=
"operator"
cname=
"操作"
locked=
"true"
enable=
"false"
width=
"120"
align=
"center"
/>
<EF:EFComboColumn
ename=
"source"
cname=
"数据来源"
enable=
"false"
width=
"80"
align=
"center"
>
<EF:EFComboColumn
ename=
"source"
cname=
"数据来源"
enable=
"false"
width=
"80"
align=
"center"
>
...
...
src/main/webapp/HG/CG/HGCG003A.jsp
View file @
b993f965
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
</EF:EFRegion>
</EF:EFRegion>
<EF:EFRegion
id=
"result"
title=
"记录集"
>
<EF:EFRegion
id=
"result"
title=
"记录集"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"override"
isFloat=
"true"
checkMode=
"row"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"override"
isFloat=
"true"
checkMode=
"row"
height=
"60vh"
>
<EF:EFColumn
ename=
"id"
cname=
"内码"
hidden=
"true"
/>
<EF:EFColumn
ename=
"id"
cname=
"内码"
hidden=
"true"
/>
<EF:EFColumn
ename=
"companyCode"
cname=
"公司编码"
enable=
"false"
width=
"100"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"companyCode"
cname=
"公司编码"
enable=
"false"
width=
"100"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"companyName"
cname=
"公司名称"
enable=
"false"
width=
"130"
align=
"center"
/>
<EF:EFColumn
ename=
"companyName"
cname=
"公司名称"
enable=
"false"
width=
"130"
align=
"center"
/>
...
...
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