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
93f6895c
Commit
93f6895c
authored
Aug 30, 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
71c014dc
9519b5cd
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
54 additions
and
51 deletions
+54
-51
ServiceHGCG002A.java
...java/com/baosight/hggp/hg/cg/service/ServiceHGCG002A.java
+18
-12
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
HGCG003B.js
src/main/webapp/HG/CG/HGCG003B.js
+21
-24
HGCG003B.jsp
src/main/webapp/HG/CG/HGCG003B.jsp
+1
-1
HGSC101.jsp
src/main/webapp/HG/SC/HGSC101.jsp
+3
-3
No files found.
src/main/java/com/baosight/hggp/hg/cg/service/ServiceHGCG002A.java
View file @
93f6895c
...
...
@@ -5,7 +5,10 @@ import com.baosight.hggp.common.DdynamicEnum;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.enums.DeleteFlagEnum
;
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.utils.HGCGUtils
;
import
com.baosight.hggp.hg.constant.HGConstant
;
...
...
@@ -123,6 +126,8 @@ public class ServiceHGCG002A extends ServiceBase {
Long
id
=
fCg001A
.
getId
();
HGCG001A
dbCg001A
=
dbCg001AMap
.
get
(
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
.
getPrice
().
compareTo
(
BigDecimal
.
ZERO
)
<=
0
,
"单价不能小于等于0"
);
}
...
...
@@ -130,13 +135,13 @@ public class ServiceHGCG002A extends ServiceBase {
/**
* 数据保存
* @param
resultRow
s
* @param
fCg001A
s
* @param dbCg001Map
* @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
());
HGCG002
newCg002
=
new
HGCG002
();
BeanUtils
.
copyProperties
(
oneCG001
,
newCg002
,
"id"
,
"createdBy"
,
"createdName"
,
"createdTime"
,
"updatedBy"
,
"updatedName"
,
"updatedTime"
);
...
...
@@ -146,30 +151,31 @@ public class ServiceHGCG002A extends ServiceBase {
newCg002
.
setDeleteFlag
(
DeleteFlagEnum
.
UN_REMOVE
.
getCode
());
newCg002
.
setSource
(
HGConstant
.
CgSource
.
DEFAULT
);
DaoUtils
.
insert
(
HGCG002
.
INSERT
,
newCg002
);
for
(
HGCG001A
hgcg001A
:
resultRow
s
)
{
for
(
HGCG001A
fCg001A
:
fCg001A
s
)
{
//新增子表信息
insertDetails
(
hgcg001A
,
newCg002
);
HGCG001
cg001
=
hgcg001Map
.
get
(
hgc
g001A
.
getPlanNo
());
insertDetails
(
fCg001A
,
newCg002
);
HGCG001
cg001
=
hgcg001Map
.
get
(
fC
g001A
.
getPlanNo
());
// 更新计划状态
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
);
}
private
void
insertDetails
(
HGCG001A
db
Cg001A
,
HGCG002
newCg002
)
{
private
void
insertDetails
(
HGCG001A
f
Cg001A
,
HGCG002
newCg002
)
{
//获取采购计划明细
List
<
HGCG002B
>
cg002BList
=
new
LinkedList
<>();
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
.
setPrimaryId
(
newCg002
.
getId
());
cg002B
.
setPlanDetailId
(
db
Cg001A
.
getId
());
cg002B
.
setPlanDetailId
(
f
Cg001A
.
getId
());
cg002BList
.
add
(
cg002B
);
DaoUtils
.
insertBatch
(
HGCG002B
.
INSERT
,
cg002BList
);
DaoUtils
.
insertBatch
(
HGCG002B
.
INSERT
,
cg002BList
);
}
/**
...
...
src/main/webapp/HG/CG/HGCG002.js
View file @
93f6895c
...
...
@@ -381,7 +381,7 @@ let selectPlan = function () {
href
:
"HGCG002A?methodName=initLoad"
,
title
:
"<div style='text-align: center;'>计划查询</div>"
,
width
:
"80%"
,
height
:
"
8
0%"
,
height
:
"
9
0%"
,
callbackName
:
selectPlanCallback
});
}
...
...
src/main/webapp/HG/CG/HGCG002.jsp
View file @
93f6895c
...
...
@@ -37,7 +37,7 @@
</EF:EFRegion>
<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=
"operator"
cname=
"操作"
locked=
"true"
enable=
"false"
width=
"80"
align=
"center"
/>
<EF:EFComboColumn
ename=
"source"
cname=
"数据来源"
enable=
"false"
width=
"80"
align=
"center"
defaultValue=
"1"
>
...
...
src/main/webapp/HG/CG/HGCG002A.jsp
View file @
93f6895c
...
...
@@ -23,7 +23,7 @@
</EF:EFRegion>
<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=
"companyCode"
cname=
"公司编码"
enable=
"false"
width=
"100"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"companyName"
cname=
"公司名称"
enable=
"false"
width=
"130"
align=
"center"
/>
...
...
@@ -33,15 +33,15 @@
<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=
"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=
"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=
"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=
"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:EFComboColumn
ename=
"taxRate"
cname=
"税率(%)"
enable=
"true"
width=
"100"
align=
"center"
required=
"true"
copy=
"true"
>
...
...
src/main/webapp/HG/CG/HGCG003.js
View file @
93f6895c
...
...
@@ -320,7 +320,7 @@ let selectContract = function () {
href
:
"HGCG003A?methodName=initLoad"
,
title
:
"<div style='text-align: center;'>合同查询</div>"
,
width
:
"80%"
,
height
:
"
8
0%"
,
height
:
"
9
0%"
,
callbackName
:
selectContractCallback
});
}
...
...
@@ -364,7 +364,7 @@ function showDetail(id,status,source) {
href
:
"HGCG003B?methodName=initLoad&inqu_status-0-primaryId="
+
id
+
"&status="
+
status
+
"&source="
+
source
,
title
:
"<div style='text-align: center;'>详情</div>"
,
width
:
"80%"
,
height
:
"
8
0%"
,
height
:
"
9
0%"
,
callbackName
:
windowCallback
});
}
...
...
src/main/webapp/HG/CG/HGCG003.jsp
View file @
93f6895c
...
...
@@ -37,7 +37,7 @@
</EF:EFRegion>
<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=
"operator"
cname=
"操作"
locked=
"true"
enable=
"false"
width=
"120"
align=
"center"
/>
<EF:EFComboColumn
ename=
"source"
cname=
"数据来源"
enable=
"false"
width=
"80"
align=
"center"
>
...
...
src/main/webapp/HG/CG/HGCG003A.jsp
View file @
93f6895c
...
...
@@ -40,7 +40,7 @@
</EF:EFRegion>
<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=
"companyCode"
cname=
"公司编码"
enable=
"false"
width=
"100"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"companyName"
cname=
"公司名称"
enable=
"false"
width=
"130"
align=
"center"
/>
...
...
src/main/webapp/HG/CG/HGCG003B.js
View file @
93f6895c
$
(
function
()
{
var
inventRecordBoxBlockId
=
__eiInfo
.
getBlock
(
"invent_record_box_block_id"
).
getMappedRows
();
IPLATUI
.
EFGrid
=
{
"result"
:
{
exportGrid
:
false
,
// 隐藏右侧自定义导出按钮
...
...
@@ -7,16 +8,15 @@ $(function () {
pageSize
:
20
,
pageSizes
:
[
20
,
50
,
70
,
100
],
},
columns
:
[
{
columns
:
[{
field
:
"inventCode"
,
template
:
function
(
item
)
{
let
template
=
item
.
inventCode
;
if
(
item
.
inventCode
)
{
for
(
let
i
=
0
;
i
<
inventRecordBoxBlockId
.
length
;
i
++
)
{
if
(
item
.
inventCode
===
inventRecordBoxBlockId
[
i
][
'valueField'
])
{
if
(
item
.
inventCode
)
{
for
(
let
i
=
0
;
i
<
inventRecordBoxBlockId
.
length
;
i
++
)
{
if
(
item
.
inventCode
===
inventRecordBoxBlockId
[
i
][
'valueField'
])
{
template
=
inventRecordBoxBlockId
[
i
][
'valueField'
];
}
else
{
}
else
{
template
=
item
.
inventCode
;
}
}
...
...
@@ -49,22 +49,20 @@ $(function () {
filter
:
"contains"
});
}
},
{
},
{
field
:
"primaryId"
,
template
:
function
(
item
)
{
item
[
'primaryId'
]
=
$
(
"#inqu_status-0-primaryId"
).
val
();
item
[
'primaryId'
]
=
$
(
"#inqu_status-0-primaryId"
).
val
();
return
$
(
"#inqu_status-0-primaryId"
).
val
();
}
}
],
}],
beforeEdit
:
function
(
e
)
{
var
status
=
$
(
"#status"
).
val
();
if
(
status
!=
'0'
)
{
if
(
status
!=
'0'
)
{
e
.
preventDefault
();
}
var
source
=
$
(
"#source"
).
val
();
if
(
source
===
'0'
)
{
if
(
source
===
'0'
)
{
//选择合同的明细不能修改存货信息
for
(
let
i
=
0
;
i
<
e
.
sender
.
columns
.
length
;
i
++
)
{
//指定的列不让修改
...
...
@@ -77,7 +75,6 @@ $(function () {
}
}
}
},
loadComplete
:
function
(
grid
)
{
// 此grid对象
...
...
@@ -170,23 +167,23 @@ $(window).load(function () {
* @param coefficient
*/
let
calAmount
=
function
(
item
)
{
let
price
=
item
.
price
;
//计算方式为重量乘单价
if
(
item
.
calculationMethod
==
1
){
if
(
item
.
receiveWeight
&&
item
.
price
){
if
(
item
.
calculationMethod
==
1
)
{
let
receiveWeight
=
item
.
receiveWeight
;
if
(
!
isBlank
(
receiveWeight
)
&&
!
isBlank
(
price
))
{
// 重量*单价金额
let
totalAmount
=
item
.
receiveWeight
*
item
.
price
;
let
totalAmount
=
parseFloat
(
receiveWeight
)
*
parseFloat
(
price
)
;
resultGrid
.
setCellValue
(
item
,
'amount'
,
totalAmount
)
}
}
else
{
if
(
item
.
receiveQty
&&
item
.
price
){
if
(
item
.
receiveQty
&&
item
.
price
)
{
// 重
量*单价金额
let
totalAmount
=
item
.
receiveQty
*
item
.
price
;
}
else
{
let
receiveQty
=
item
.
receiveQty
;
if
(
!
isBlank
(
receiveQty
)
&&
!
isBlank
(
price
))
{
// 数
量*单价金额
let
totalAmount
=
parseFloat
(
receiveQty
)
*
parseFloat
(
price
)
;
resultGrid
.
setCellValue
(
item
,
'amount'
,
totalAmount
)
}
}
}
}
/**
...
...
src/main/webapp/HG/CG/HGCG003B.jsp
View file @
93f6895c
...
...
@@ -51,7 +51,7 @@
sumType=
"page"
/>
<EF:EFColumn
ename=
"receiveUnitWeight"
cname=
"收货单重"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N3}"
hidden=
"true"
/>
<EF:EFComboColumn
ename=
"calculationMethod"
cname=
"计算方式"
enable=
"true"
width=
"1
0
0"
align=
"center"
required=
"true"
>
<EF:EFComboColumn
ename=
"calculationMethod"
cname=
"计算方式"
enable=
"true"
width=
"1
2
0"
align=
"center"
required=
"true"
>
<EF:EFCodeOption
codeName=
"hggp.cg.calculationMethod"
/>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"price"
cname=
"单价"
width=
"120"
align=
"right"
format=
"{0:C3}"
required=
"true"
/>
...
...
src/main/webapp/HG/SC/HGSC101.jsp
View file @
93f6895c
...
...
@@ -14,9 +14,9 @@
<EF:EFGrid
blockId=
"result"
autoDraw=
"no"
isFloat=
"true"
copyToAdd=
"false"
>
<EF:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
<EF:EFColumn
ename=
"operator"
cname=
"操作"
locked=
"true"
enable=
"false"
width=
"100"
align=
"center"
/>
<EF:EFColumn
ename=
"companyName"
cname=
"公司名称"
enable=
"false"
width=
"120"
align=
"
center
"
/>
<EF:EFColumn
ename=
"projCode"
cname=
"项目编码"
enable=
"false"
width=
"120"
align=
"
center
"
/>
<EF:EFColumn
ename=
"projName"
cname=
"项目名称"
enable=
"false"
width=
"120"
align=
"
center
"
/>
<EF:EFColumn
ename=
"companyName"
cname=
"公司名称"
enable=
"false"
width=
"120"
align=
"
left
"
/>
<EF:EFColumn
ename=
"projCode"
cname=
"项目编码"
enable=
"false"
width=
"120"
align=
"
left
"
/>
<EF:EFColumn
ename=
"projName"
cname=
"项目名称"
enable=
"false"
width=
"120"
align=
"
left
"
/>
<EF:EFColumn
ename=
"createdBy"
cname=
"创建人"
enable=
"false"
width=
"100"
align=
"center"
/>
<EF:EFColumn
ename=
"createdTime"
cname=
"创建时间"
enable=
"false"
width=
"140"
align=
"center"
editType=
"datetime"
parseFormats=
"['yyyyMMddHHmmss','yyyy-MM-dd HH:mm:ss']"
/>
...
...
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