Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
manager
Project
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
reyun
manager
Commits
a9f0f9a4
Commit
a9f0f9a4
authored
Jun 06, 2019
by
kangxiaoshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
操作日志
parent
41e3309d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
90 additions
and
9 deletions
+90
-9
ContractController.java
src/main/java/common/controller/ContractController.java
+3
-0
UserLogController.java
src/main/java/common/controller/UserLogController.java
+8
-0
ChangeDelInfo.java
src/main/java/common/model/ChangeDelInfo.java
+18
-0
ContractService.java
src/main/java/common/service/ContractService.java
+3
-0
ContractServiceImpl.java
src/main/java/common/service/impl/ContractServiceImpl.java
+58
-9
No files found.
src/main/java/common/controller/ContractController.java
View file @
a9f0f9a4
...
@@ -357,4 +357,7 @@ public class ContractController {
...
@@ -357,4 +357,7 @@ public class ContractController {
}
}
src/main/java/common/controller/UserLogController.java
View file @
a9f0f9a4
...
@@ -51,4 +51,12 @@ public class UserLogController
...
@@ -51,4 +51,12 @@ public class UserLogController
return
ResultModel
.
OK
(
service
.
getChangeDelDetailData
(
loginAccount
,
pid
));
return
ResultModel
.
OK
(
service
.
getChangeDelDetailData
(
loginAccount
,
pid
));
}
}
@RequestMapping
(
value
=
"change/del/recover"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
ResultModel
changesDelRecover
(
@PathVariable
String
platform
,
@CurrentAccount
User
loginAccount
,
HttpServletRequest
request
,
String
id
,
String
type
)
{
return
ResultModel
.
OK
(
service
.
changesDelRecover
(
platform
,
id
,
type
,
loginAccount
));
}
}
}
src/main/java/common/model/ChangeDelInfo.java
View file @
a9f0f9a4
...
@@ -20,6 +20,8 @@ public class ChangeDelInfo {
...
@@ -20,6 +20,8 @@ public class ChangeDelInfo {
private
Date
creatTime
;
private
Date
creatTime
;
private
String
ds
;
private
String
ds
;
private
String
ip
;
private
String
ip
;
private
Long
sourceId
;
private
String
original
;
@Id
@Id
@GeneratedValue
@GeneratedValue
...
@@ -110,4 +112,20 @@ public class ChangeDelInfo {
...
@@ -110,4 +112,20 @@ public class ChangeDelInfo {
public
void
setDs
(
String
ds
)
{
public
void
setDs
(
String
ds
)
{
this
.
ds
=
ds
;
this
.
ds
=
ds
;
}
}
public
Long
getSourceId
()
{
return
sourceId
;
}
public
void
setSourceId
(
Long
sourceId
)
{
this
.
sourceId
=
sourceId
;
}
public
String
getOriginal
()
{
return
original
;
}
public
void
setOriginal
(
String
original
)
{
this
.
original
=
original
;
}
}
}
src/main/java/common/service/ContractService.java
View file @
a9f0f9a4
...
@@ -68,4 +68,6 @@ public interface ContractService {
...
@@ -68,4 +68,6 @@ public interface ContractService {
List
<
ChangeDelInfo
>
getChangeDelData
(
User
loginAccount
,
String
contranctCode
,
String
startDate
,
String
endDate
);
List
<
ChangeDelInfo
>
getChangeDelData
(
User
loginAccount
,
String
contranctCode
,
String
startDate
,
String
endDate
);
List
<
ChangeDelDetail
>
getChangeDelDetailData
(
User
loginAccount
,
String
pid
);
List
<
ChangeDelDetail
>
getChangeDelDetailData
(
User
loginAccount
,
String
pid
);
ChangeDelInfo
changesDelRecover
(
String
platform
,
String
id
,
String
type
,
User
loginAccount
);
}
}
\ No newline at end of file
src/main/java/common/service/impl/ContractServiceImpl.java
View file @
a9f0f9a4
...
@@ -55,7 +55,6 @@ public class ContractServiceImpl implements ContractService {
...
@@ -55,7 +55,6 @@ public class ContractServiceImpl implements ContractService {
put
(
"2"
,
"合同变更记录"
);
put
(
"2"
,
"合同变更记录"
);
put
(
"3"
,
"收款/开票记录"
);
put
(
"3"
,
"收款/开票记录"
);
put
(
"4"
,
"合同管理"
);
put
(
"4"
,
"合同管理"
);
}};
}};
@Autowired
@Autowired
...
@@ -1168,13 +1167,13 @@ public class ContractServiceImpl implements ContractService {
...
@@ -1168,13 +1167,13 @@ public class ContractServiceImpl implements ContractService {
this
.
saveChangeDelInfo
(
changeDelInfo
,
4
,
2
,
ip
,
loginUser
);
// type 2 修改
this
.
saveChangeDelInfo
(
changeDelInfo
,
4
,
2
,
ip
,
loginUser
);
// type 2 修改
}
else
{
}
else
{
contract
.
setStatus
(
ContractStatusEnum
.
DELETE
.
getKey
());
changeDelInfo
.
setDetail
(
"删除合同"
);
changeDelInfo
.
setDetail
(
"删除合同"
);
changeDelInfo
.
setOriginal
(
contract
.
getStatus
());
this
.
saveChangeDelInfo
(
changeDelInfo
,
4
,
1
,
ip
,
loginUser
);
this
.
saveChangeDelInfo
(
changeDelInfo
,
4
,
1
,
ip
,
loginUser
);
contract
.
setStatus
(
ContractStatusEnum
.
DELETE
.
getKey
());
}
}
return
contractRepository
.
save
(
contract
);
return
contractRepository
.
save
(
contract
);
}
}
...
@@ -1334,6 +1333,7 @@ public class ContractServiceImpl implements ContractService {
...
@@ -1334,6 +1333,7 @@ public class ContractServiceImpl implements ContractService {
ChangeDelInfo
changeDelInfo
=
new
ChangeDelInfo
();
ChangeDelInfo
changeDelInfo
=
new
ChangeDelInfo
();
changeDelInfo
.
setContractCode
(
change
.
getContractCode
());
changeDelInfo
.
setContractCode
(
change
.
getContractCode
());
changeDelInfo
.
setEmail
(
change
.
getEmail
());
changeDelInfo
.
setEmail
(
change
.
getEmail
());
changeDelInfo
.
setSourceId
(
change
.
getId
());
changeDelInfo
.
setDetail
(
"赠送时长:"
+
change
.
getDiscountTimeLong
()+
"天 — 赠送流量"
+
change
.
getDiscountFlow
());
changeDelInfo
.
setDetail
(
"赠送时长:"
+
change
.
getDiscountTimeLong
()+
"天 — 赠送流量"
+
change
.
getDiscountFlow
());
this
.
saveChangeDelInfo
(
changeDelInfo
,
1
,
1
,
ip
,
loginUser
);
this
.
saveChangeDelInfo
(
changeDelInfo
,
1
,
1
,
ip
,
loginUser
);
...
@@ -1349,10 +1349,12 @@ public class ContractServiceImpl implements ContractService {
...
@@ -1349,10 +1349,12 @@ public class ContractServiceImpl implements ContractService {
changeDelInfo
.
setContractCode
(
contractChange
.
getContractCode
());
changeDelInfo
.
setContractCode
(
contractChange
.
getContractCode
());
changeDelInfo
.
setDetail
(
"套餐变更"
);
changeDelInfo
.
setDetail
(
"套餐变更"
);
changeDelInfo
.
setEmail
(
contractChange
.
getEmail
());
changeDelInfo
.
setEmail
(
contractChange
.
getEmail
());
changeDelInfo
.
setSourceId
(
contractChange
.
getId
());
this
.
saveChangeDelInfo
(
changeDelInfo
,
2
,
1
,
ip
,
loginUser
);
this
.
saveChangeDelInfo
(
changeDelInfo
,
2
,
1
,
ip
,
loginUser
);
return
contractChange
;
return
contractChange
;
}
else
{
}
else
{
ContractMoney
contractMoney
=
contractMoneyRepository
.
findOne
(
Long
.
parseLong
(
id
));
ContractMoney
contractMoney
=
contractMoneyRepository
.
findOne
(
Long
.
parseLong
(
id
));
contractMoney
.
setDelFlag
(
1
);
contractMoney
.
setDelFlag
(
1
);
contractMoneyRepository
.
save
(
contractMoney
);
contractMoneyRepository
.
save
(
contractMoney
);
...
@@ -1362,12 +1364,10 @@ public class ContractServiceImpl implements ContractService {
...
@@ -1362,12 +1364,10 @@ public class ContractServiceImpl implements ContractService {
changeDelInfo
.
setEmail
(
contractMoney
.
getEmail
());
changeDelInfo
.
setEmail
(
contractMoney
.
getEmail
());
if
(
"pay"
.
equals
(
contractMoney
.
getType
())){
if
(
"pay"
.
equals
(
contractMoney
.
getType
())){
// 删除收款记录 修改相应收款金额
Contract
contract
=
contractRepository
.
findByCode
(
contractMoney
.
getContractCode
());
contract
.
setPayMoney
(
contract
.
getPayMoney
()-
contractMoney
.
getMoney
());
contractRepository
.
save
(
contract
);
this
.
dealPayMoneyByContractMoney
(
contractMoney
,-
1
);
changeDelInfo
.
setDetail
(
"收款记录-金额:"
+
contractMoney
.
getMoney
());
changeDelInfo
.
setDetail
(
"收款记录-金额:"
+
contractMoney
.
getMoney
());
}
else
{
}
else
{
changeDelInfo
.
setDetail
(
"开票记录-金额:"
+
contractMoney
.
getMoney
());
changeDelInfo
.
setDetail
(
"开票记录-金额:"
+
contractMoney
.
getMoney
());
}
}
...
@@ -1379,6 +1379,16 @@ public class ContractServiceImpl implements ContractService {
...
@@ -1379,6 +1379,16 @@ public class ContractServiceImpl implements ContractService {
}
}
private
void
dealPayMoneyByContractMoney
(
ContractMoney
contractMoney
,
int
addOr
){
// 删除收款记录 修改相应收款金额
// 恢复收款记录 修改相应合同收款金额
Contract
contract
=
contractRepository
.
findByCode
(
contractMoney
.
getContractCode
());
contract
.
setPayMoney
(
contract
.
getPayMoney
()
+
contractMoney
.
getMoney
()*
addOr
);
contractRepository
.
save
(
contract
);
}
@Override
@Override
public
List
<
ChangeDelInfo
>
getChangeDelData
(
User
loginAccount
,
String
contranctCode
,
String
startDate
,
String
endDate
)
{
public
List
<
ChangeDelInfo
>
getChangeDelData
(
User
loginAccount
,
String
contranctCode
,
String
startDate
,
String
endDate
)
{
...
@@ -1394,6 +1404,47 @@ public class ContractServiceImpl implements ContractService {
...
@@ -1394,6 +1404,47 @@ public class ContractServiceImpl implements ContractService {
return
datas
;
return
datas
;
}
}
@Override
public
ChangeDelInfo
changesDelRecover
(
String
platform
,
String
id
,
String
type
,
User
loginAccount
)
{
// 恢复删除
ChangeDelInfo
changeDelInfo
=
changeDelInfoRepository
.
findOne
(
Long
.
parseLong
(
id
));
if
(
changeDelInfo
.
getModifyType
()==
1
){
// put("1","流量赠送");
// put("2","合同变更记录");
// put("3","收款/开票记录");
// put("4","合同管理");
if
(
changeDelInfo
.
getFunction
()==
1
){
FlowChange
change
=
flowChangeRepository
.
findOne
(
changeDelInfo
.
getSourceId
());
change
.
setDelFlag
(
0
);
flowChangeRepository
.
save
(
change
);
}
else
if
(
changeDelInfo
.
getFunction
()==
2
){
ContractChange
contractChange
=
contractChangeRepository
.
findOne
(
changeDelInfo
.
getSourceId
());
contractChange
.
setDelFlag
(
0
);
contractChangeRepository
.
save
(
contractChange
);
}
else
if
(
changeDelInfo
.
getFunction
()==
3
){
//
ContractMoney
money
=
contractMoneyRepository
.
findOne
(
changeDelInfo
.
getSourceId
());
String
detail
=
changeDelInfo
.
getDetail
();
if
(
detail
!=
null
&&
detail
.
startsWith
(
"收款"
)){
//恢复收款记录 修改相应合同收款金额
dealPayMoneyByContractMoney
(
money
,
1
);
}
money
.
setDelFlag
(
0
);
contractMoneyRepository
.
save
(
money
);
}
else
if
(
changeDelInfo
.
getFunction
()==
4
){
// 合同恢复
Contract
contract
=
contractRepository
.
findOne
(
changeDelInfo
.
getSourceId
());
contract
.
setStatus
(
changeDelInfo
.
getOriginal
());
contractRepository
.
save
(
contract
);
}
}
return
null
;
}
public
void
saveChangeDelInfo
(
ChangeDelInfo
changeDelInfo
,
int
function
,
int
type
,
String
ip
,
User
loginUser
){
public
void
saveChangeDelInfo
(
ChangeDelInfo
changeDelInfo
,
int
function
,
int
type
,
String
ip
,
User
loginUser
){
changeDelInfo
.
setCreatTime
(
new
Date
());
changeDelInfo
.
setCreatTime
(
new
Date
());
...
@@ -1407,8 +1458,6 @@ public class ContractServiceImpl implements ContractService {
...
@@ -1407,8 +1458,6 @@ public class ContractServiceImpl implements ContractService {
}
}
@Override
@Override
public
List
<
ContractMoney
>
findPay
(
String
startDate
,
String
endDate
,
String
code
)
{
public
List
<
ContractMoney
>
findPay
(
String
startDate
,
String
endDate
,
String
code
)
{
List
<
User
>
sales
=
userRepository
.
findAll
();
List
<
User
>
sales
=
userRepository
.
findAll
();
...
...
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