Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cloud-fb
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
王衍超
cloud-fb
Commits
a4e3fba0
Commit
a4e3fba0
authored
Jun 10, 2021
by
shiwenbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加一些操作的日志
parent
6966445f
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
60 additions
and
0 deletions
+60
-0
ContractServiceImpl.java
.../dinas/contract/internal/service/ContractServiceImpl.java
+37
-0
ContractService.java
...java/com/xyst/dinas/contract/service/ContractService.java
+5
-0
ContractController.java
.../java/com/xyst/dinas/contract/web/ContractController.java
+6
-0
PriceAdjustmentController.java
...a/com/xyst/dinas/price/web/PriceAdjustmentController.java
+12
-0
No files found.
backend/xyst.dinas.contract/src/main/java/com/xyst/dinas/contract/internal/service/ContractServiceImpl.java
View file @
a4e3fba0
...
...
@@ -16,7 +16,11 @@ import org.springframework.lang.Nullable;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.beecode.amino.core.Amino
;
import
com.beecode.bap.log.LogConstants
;
import
com.beecode.bap.log.service.LogService
;
import
com.beecode.bcp.core.context.AminoContextHolder
;
import
com.beecode.bcp.type.KClass
;
import
com.beecode.bcp.type.KObject
;
import
com.beecode.inz.basis.config.constants.CommonConstants
;
import
com.beecode.inz.basis.team.pojo.ResponseObj
;
...
...
@@ -66,6 +70,9 @@ public class ContractServiceImpl implements ContractService {
@Autowired
private
WarningService
warningSettingService
;
@Autowired
private
LogService
logService
;
@Override
@Transactional
public
UUID
create
(
KObject
kObject
)
{
...
...
@@ -129,6 +136,12 @@ public class ContractServiceImpl implements ContractService {
if
(
needSubmitFlow
(
ContractConstant
.
BIZ_TYPE
,
kobject
,
"SUBMIT"
))
{
inzWorkflowService
.
startWorkflow
(
"SUBMIT"
,
ContractConstant
.
BIZ_TYPE
,
kobject
.
getString
(
ContractConstant
.
CONTRACT_NAME
),
kobject
,
params
);
}
KObject
log
=
Amino
.
getApplicationContext
()
.
getBean
(
LogConstants
.
LOG_ENTIY_NAME
,
KClass
.
class
).
newInstance
();
log
.
set
(
"module"
,
ContractConstant
.
ENTITY_CONTRACT
);
log
.
set
(
"businessObjectId"
,
id
);
log
.
set
(
"logContent"
,
"提交了这个合同"
);
logService
.
addLog
(
log
);
// else{
// afterApprovedForInsert(kobject);
// }
...
...
@@ -175,6 +188,16 @@ public class ContractServiceImpl implements ContractService {
}
@Override
public
void
changelog
(
UUID
infoId
)
{
KObject
log
=
Amino
.
getApplicationContext
()
.
getBean
(
LogConstants
.
LOG_ENTIY_NAME
,
KClass
.
class
).
newInstance
();
log
.
set
(
"module"
,
ContractConstant
.
ENTITY_CONTRACT
);
log
.
set
(
"businessObjectId"
,
infoId
);
log
.
set
(
"logContent"
,
"变更了这个合同"
);
logService
.
addLog
(
log
);
}
@Override
public
Boolean
checkProjectAbled
(
UUID
id
)
{
List
<
KObject
>
onExecutingContractList
=
contractDao
.
getExecutingContractByProject
(
id
);
if
(
onExecutingContractList
.
size
()>
0
){
...
...
@@ -337,6 +360,13 @@ public class ContractServiceImpl implements ContractService {
KObject
contract
=
contractDao
.
load
(
id
);
contract
.
set
(
ContractConstant
.
CONTRACT_STATE
,
ContractStateEnum
.
COMPLETED
.
name
());
contractDao
.
update
(
contract
);
//记录操作日志
KObject
log
=
Amino
.
getApplicationContext
()
.
getBean
(
LogConstants
.
LOG_ENTIY_NAME
,
KClass
.
class
).
newInstance
();
log
.
set
(
"module"
,
ContractConstant
.
ENTITY_CONTRACT
);
log
.
set
(
"businessObjectId"
,
id
);
log
.
set
(
"logContent"
,
"完成了这个合同"
);
logService
.
addLog
(
log
);
//合同完成后,把该合同的所有预警设置全部清除
UUID
contractInfoId
=
contract
.
getUuid
(
ContractConstant
.
CONTRACT_ID
);
List
<
KObject
>
warnSettings
=
warnSettingDao
.
queryWarnSettings
(
ContractWarnConst
.
billType
,
contractInfoId
,
null
);
...
...
@@ -357,6 +387,13 @@ public class ContractServiceImpl implements ContractService {
}
kobject
.
set
(
CommonConstants
.
DISCARD
,
true
);
contractDao
.
update
(
kobject
);
//记录操作日志
KObject
log
=
Amino
.
getApplicationContext
()
.
getBean
(
LogConstants
.
LOG_ENTIY_NAME
,
KClass
.
class
).
newInstance
();
log
.
set
(
"module"
,
ContractConstant
.
ENTITY_CONTRACT
);
log
.
set
(
"businessObjectId"
,
id
);
log
.
set
(
"logContent"
,
"删除了这个合同"
);
logService
.
addLog
(
log
);
}
...
...
backend/xyst.dinas.contract/src/main/java/com/xyst/dinas/contract/service/ContractService.java
View file @
a4e3fba0
...
...
@@ -61,6 +61,11 @@ public interface ContractService {
KObject
getLastContractByInfoId
(
UUID
infoId
);
/**
* 记录变更操作日志
**/
void
changelog
(
UUID
infoId
);
/**
* 检查当前合同是否能变更
* @param id
*/
...
...
backend/xyst.dinas.contract/src/main/java/com/xyst/dinas/contract/web/ContractController.java
View file @
a4e3fba0
...
...
@@ -181,6 +181,12 @@ public class ContractController {
return
ResponseObj
.
success
(
"获取成功"
,
result
);
}
@PostMapping
(
"/contract/changelog"
)
public
void
changelog
(
@RequestBody
BaseEntity
contract
)
{
UUID
infoId
=
UUID
.
fromString
(
contract
.
getId
());
contractService
.
changelog
(
infoId
);
}
// 根据购砂单位ID 查询所有合同列表里的项目ID列表
@PostMapping
(
"/sand/user/projectList"
)
public
String
getProjectListByPurSandId
(
@RequestBody
ProjectListQuery
projectListQuery
)
{
...
...
backend/xyst.dinas.price/src/main/java/com/xyst/dinas/price/web/PriceAdjustmentController.java
View file @
a4e3fba0
...
...
@@ -2,6 +2,8 @@ package com.xyst.dinas.price.web;
import
com.beecode.amino.core.Amino
;
import
com.beecode.bap.attachment.common.Page
;
import
com.beecode.bap.log.LogConstants
;
import
com.beecode.bap.log.service.LogService
;
import
com.beecode.bcp.type.KClass
;
import
com.beecode.bcp.type.KObject
;
import
com.beecode.bcp.type.json.JSONObjectUtils
;
...
...
@@ -36,6 +38,9 @@ public class PriceAdjustmentController {
@Autowired
private
DinasTypeService
dinasTypeService
;
@Autowired
private
LogService
logService
;
@RequestMapping
(
value
=
"/list/page"
,
method
=
RequestMethod
.
GET
)
public
ResponseObj
getListPage
(
PriceAdjustmentSearchEntity
<
KObject
>
priceAdjustmentSearchEntity
)
throws
Exception
{
Page
<
KObject
>
objectPage
=
new
Page
<>();
...
...
@@ -128,6 +133,13 @@ public class PriceAdjustmentController {
}
KObject
byId
=
priceAdjustmentService
.
getById
(
id
);
byId
.
set
(
"applyStatus"
,
status
);
//记录审批日志
KObject
log
=
Amino
.
getApplicationContext
()
.
getBean
(
LogConstants
.
LOG_ENTIY_NAME
,
KClass
.
class
).
newInstance
();
log
.
set
(
"module"
,
PriceAdjustmentConstant
.
ENTITY
);
log
.
set
(
"businessObjectId"
,
id
);
log
.
set
(
"logContent"
,
status
==
2
?
"审批通过"
:
"审批不通过"
);
logService
.
addLog
(
log
);
if
(
StringUtils
.
isNotBlank
(
failureReason
)){
byId
.
set
(
"failureReason"
,
failureReason
);
}
...
...
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