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
33e7b5aa
Commit
33e7b5aa
authored
Jul 23, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-07-23 采购开票删除逻辑bug修复
parent
a815ac35
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
11 deletions
+45
-11
HGCW013.java
src/main/java/com/baosight/hggp/hg/cw/domain/HGCW013.java
+1
-0
ServiceHGCW012.java
.../java/com/baosight/hggp/hg/cw/service/ServiceHGCW012.java
+32
-6
HGCW013.xml
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW013.xml
+5
-2
HGCW012A.js
src/main/webapp/HG/CW/HGCW012A.js
+7
-3
No files found.
src/main/java/com/baosight/hggp/hg/cw/domain/HGCW013.java
View file @
33e7b5aa
...
...
@@ -70,6 +70,7 @@ public class HGCW013 extends DaoEPBase {
public
static
final
String
INSERT
=
"HGCW013.insert"
;
public
static
final
String
UPDATE
=
"HGCW013.update"
;
public
static
final
String
DELETE
=
"HGCW013.delete"
;
public
static
final
String
DELETE_MAIN
=
"HGCW013.deleteMain"
;
private
Long
id
=
new
Long
(
0
);
private
Long
mainId
=
new
Long
(
0
);
/* 主表ID*/
...
...
src/main/java/com/baosight/hggp/hg/cw/service/ServiceHGCW012.java
View file @
33e7b5aa
...
...
@@ -3,10 +3,13 @@ package com.baosight.hggp.hg.cw.service;
import
com.baosight.eplat.utils.StringUtils
;
import
com.baosight.hggp.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.core.dao.DaoBase
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.cg.tools.HGCGTools
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.cw.domain.HGCW006
;
import
com.baosight.hggp.hg.cw.domain.HGCW008
;
import
com.baosight.hggp.hg.cw.domain.HGCW012
;
import
com.baosight.hggp.hg.cw.domain.HGCW013
;
import
com.baosight.hggp.hg.cw.tools.HGCWTools
;
...
...
@@ -23,10 +26,8 @@ import org.apache.commons.collections.CollectionUtils;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.text.DecimalFormat
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
* @author yukang
...
...
@@ -141,8 +142,29 @@ public class ServiceHGCW012 extends ServiceBase {
public
EiInfo
delete
(
EiInfo
inInfo
)
{
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++)
{
DaoUtils
.
update
(
HGCW012
.
DELETE
,
resultRows
.
get
(
i
));
for
(
Map
resultRow
:
resultRows
)
{
HGCW012
hgcw012
=
new
HGCW012
();
hgcw012
.
fromMap
(
resultRow
);
if
(
hgcw012
.
getReviewStatus
()
==
1
)
{
throw
new
PlatException
(
"该数据已审核,不能删除!"
);
}
String
[]
settlementNumbers
=
hgcw012
.
getSettlementNumber
().
split
(
","
);
List
<
HGCW013
>
results
=
HGCWTools
.
HgCw013
.
getMainId
(
hgcw012
.
getId
());
for
(
String
settlementNumber
:
settlementNumbers
)
{
Map
<
String
,
BigDecimal
>
parmap
=
results
.
stream
().
filter
(
item
->
Objects
.
equals
(
item
.
getSettlementNumber
(),
settlementNumber
)).
collect
(
Collectors
.
toMap
(
HGCW013:
:
getSettlementNumber
,
HGCW013:
:
getTotalContractPriceIncluding
,(
v1
,
v2
)
->
v2
));
if
(
hgcw012
.
getContractType
()
==
1
)
{
HGCGTools
.
HgCg003
.
updateIsInvoicing
(
settlementNumber
,
HGConstant
.
CgIsInvoicing
.
S_0
);
DaoUtils
.
update
(
HGCW013
.
DELETE_MAIN
,
hgcw012
);
}
else
if
(
hgcw012
.
getContractType
()
==
2
){
HGCWTools
.
HgCw008
.
deductionAmount
(
settlementNumber
,
parmap
.
get
(
settlementNumber
).
multiply
(
new
BigDecimal
(-
1
)));
}
else
if
(
hgcw012
.
getContractType
()
==
3
){
HGCWTools
.
HgCw006
.
deductionAmount
(
settlementNumber
,
parmap
.
get
(
settlementNumber
).
multiply
(
new
BigDecimal
(-
1
)));
}
}
DaoUtils
.
update
(
HGCW012
.
DELETE
,
hgcw012
);
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据删除成功!"
);
...
...
@@ -173,6 +195,8 @@ public class ServiceHGCW012 extends ServiceBase {
hgcw012
.
setCompanyName
(
userVO
.
getUsername
());
hgcw012
.
setReviewStatus
(
0
);
hgcw012
.
setBillState
(
1
);
hgcw012
.
setBillTybe
(
1
);
hgcw012
.
setContractType
(
2
);
//hgcw012.setSigningDate(DateUtils.shortDate());
hgcw012
.
setReceiveDate
(
DateUtils
.
shortDate
());
BigDecimal
totalContractPriceIncluding
=
BigDecimal
.
ZERO
;
...
...
@@ -271,6 +295,7 @@ public class ServiceHGCW012 extends ServiceBase {
hgcw012
.
setReviewStatus
(
0
);
hgcw012
.
setBillState
(
1
);
hgcw012
.
setBillTybe
(
1
);
hgcw012
.
setContractType
(
1
);
//hgcw012.setSigningDate(DateUtils.shortDate());
hgcw012
.
setReceiveDate
(
DateUtils
.
shortDate
());
hgcw012
.
setPartyA
(
hgcw013List
.
get
(
0
).
getPartyA
());
...
...
@@ -366,6 +391,7 @@ public class ServiceHGCW012 extends ServiceBase {
hgcw012
.
setReviewStatus
(
0
);
hgcw012
.
setBillState
(
1
);
hgcw012
.
setBillTybe
(
1
);
hgcw012
.
setContractType
(
3
);
//hgcw012.setSigningDate(DateUtils.shortDate());
hgcw012
.
setReceiveDate
(
DateUtils
.
shortDate
());
BigDecimal
totalContractPriceIncluding
=
BigDecimal
.
ZERO
;
...
...
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW013.xml
View file @
33e7b5aa
...
...
@@ -218,8 +218,11 @@
</insert>
<delete
id=
"delete"
>
DELETE FROM ${hggpSchema}.HGCW013 WHERE
ID = #id#
DELETE FROM ${hggpSchema}.HGCW013 WHERE ID = #id#
</delete>
<delete
id=
"deleteMain"
>
DELETE FROM ${hggpSchema}.HGCW013 WHERE MAIN_ID = #id#
</delete>
<update
id=
"update"
>
...
...
src/main/webapp/HG/CW/HGCW012A.js
View file @
33e7b5aa
...
...
@@ -229,9 +229,13 @@ $(function () {
headerTemplate
:
"<span style='color: '>收票总额 </span>"
,
format
:
"{0:N2}"
,
locked
:
false
,
template
:
function
(
date
)
{
date
.
thisSettlementAmount
=
date
.
amount
;
return
date
.
amount
template
:
function
(
item
)
{
if
(
isBlank
(
item
.
thisSettlementAmount
)){
item
.
thisSettlementAmount
=
item
.
amount
;
resultGrid
.
setCellValue
(
item
,
"thisSettlementAmount"
,
item
.
amount
)
}
return
item
.
thisSettlementAmount
}
}],
loadComplete
:
function
(
grid
)
{
...
...
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