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
563bec86
Commit
563bec86
authored
Apr 19, 2022
by
yanHeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[修改] 演示bug修改,增加日志记录
parent
8f36a65a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
71 additions
and
4 deletions
+71
-4
ShipQuantityServiceImpl.java
...dinas/sales/internal/service/ShipQuantityServiceImpl.java
+24
-0
VehicleAmountPartyServiceImpl.java
...sales/internal/service/VehicleAmountPartyServiceImpl.java
+25
-0
ShipQuantityController.java
...java/com/xyst/dinas/sales/web/ShipQuantityController.java
+20
-2
ShipQuantityPrice.mk
...main/model/com/xyst/dinas/sales/auth/ShipQuantityPrice.mk
+1
-1
ShipQuantityPrice.jmx
...resources/com/xyst/dinas/sales/auth/ShipQuantityPrice.jmx
+1
-1
No files found.
backend/xyst.dinas.sales/src/main/java/com/xyst/dinas/sales/internal/service/ShipQuantityServiceImpl.java
View file @
563bec86
package
com
.
xyst
.
dinas
.
sales
.
internal
.
service
;
package
com
.
xyst
.
dinas
.
sales
.
internal
.
service
;
import
com.beecode.amino.core.Amino
;
import
com.beecode.bap.attachment.common.Page
;
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.KObject
;
import
com.beecode.inz.basis.team.pojo.ResponseObj
;
import
com.beecode.inz.basis.team.pojo.ResponseObj
;
import
com.beecode.inz.common.exception.BusinessException
;
import
com.beecode.inz.common.exception.BusinessException
;
...
@@ -10,6 +14,7 @@ import com.xyst.dinas.contract.internal.dao.ContractDao;
...
@@ -10,6 +14,7 @@ import com.xyst.dinas.contract.internal.dao.ContractDao;
import
com.xyst.dinas.contract.service.ContractService
;
import
com.xyst.dinas.contract.service.ContractService
;
import
com.xyst.dinas.project.dao.ProjectFiledDao
;
import
com.xyst.dinas.project.dao.ProjectFiledDao
;
import
com.xyst.dinas.project.dao.PurchaseSandCompanyDao
;
import
com.xyst.dinas.project.dao.PurchaseSandCompanyDao
;
import
com.xyst.dinas.sales.constant.ShipQuantityConstant
;
import
com.xyst.dinas.sales.dao.ShipQuantityDao
;
import
com.xyst.dinas.sales.dao.ShipQuantityDao
;
import
com.xyst.dinas.sales.enumeration.VehicleAmountPartyErrorCodeEnum
;
import
com.xyst.dinas.sales.enumeration.VehicleAmountPartyErrorCodeEnum
;
import
com.xyst.dinas.sales.service.ShipQuantityService
;
import
com.xyst.dinas.sales.service.ShipQuantityService
;
...
@@ -47,6 +52,9 @@ public class ShipQuantityServiceImpl implements ShipQuantityService {
...
@@ -47,6 +52,9 @@ public class ShipQuantityServiceImpl implements ShipQuantityService {
@Autowired
@Autowired
private
ShipInfoDao
shipInfoDao
;
private
ShipInfoDao
shipInfoDao
;
@Autowired
private
LogService
logService
;
/**
/**
* @Author yanHeng
* @Author yanHeng
* @Date 2022/4/6 11:36
* @Date 2022/4/6 11:36
...
@@ -70,6 +78,14 @@ public class ShipQuantityServiceImpl implements ShipQuantityService {
...
@@ -70,6 +78,14 @@ public class ShipQuantityServiceImpl implements ShipQuantityService {
kObject
.
set
(
"dinasType"
,
dinasTypeDao
.
load
(
dinasTypeId
));
kObject
.
set
(
"dinasType"
,
dinasTypeDao
.
load
(
dinasTypeId
));
UUID
uuid
=
shipQuantityDao
.
create
(
kObject
);
UUID
uuid
=
shipQuantityDao
.
create
(
kObject
);
//记录操作日志
KObject
log
=
Amino
.
getApplicationContext
()
.
getBean
(
LogConstants
.
LOG_ENTIY_NAME
,
KClass
.
class
).
newInstance
();
log
.
set
(
"module"
,
ShipQuantityConstant
.
ENTITY
);
log
.
set
(
"businessObjectId"
,
uuid
);
log
.
set
(
"logContent"
,
"新增了这条运船量方数据"
);
logService
.
addLog
(
log
);
//扣减预付款余额 ,取得总价 进行扣减
//扣减预付款余额 ,取得总价 进行扣减
//查询合同余额,如果预付款小于总价,不允许交易
//查询合同余额,如果预付款小于总价,不允许交易
BigDecimal
amount
;
BigDecimal
amount
;
...
@@ -123,6 +139,14 @@ public class ShipQuantityServiceImpl implements ShipQuantityService {
...
@@ -123,6 +139,14 @@ public class ShipQuantityServiceImpl implements ShipQuantityService {
}
else
{
}
else
{
shipQuantityDao
.
deleteById
(
id
);
shipQuantityDao
.
deleteById
(
id
);
}
}
//记录操作日志
KObject
log
=
Amino
.
getApplicationContext
()
.
getBean
(
LogConstants
.
LOG_ENTIY_NAME
,
KClass
.
class
).
newInstance
();
log
.
set
(
"module"
,
ShipQuantityConstant
.
ENTITY
);
log
.
set
(
"businessObjectId"
,
id
);
log
.
set
(
"logContent"
,
"删除了这条运船量方数据"
);
logService
.
addLog
(
log
);
return
ResponseObj
.
success
(
"删除成功"
);
return
ResponseObj
.
success
(
"删除成功"
);
}
}
}
}
backend/xyst.dinas.sales/src/main/java/com/xyst/dinas/sales/internal/service/VehicleAmountPartyServiceImpl.java
View file @
563bec86
package
com
.
xyst
.
dinas
.
sales
.
internal
.
service
;
package
com
.
xyst
.
dinas
.
sales
.
internal
.
service
;
import
com.beecode.amino.core.Amino
;
import
com.beecode.bap.attachment.common.Page
;
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.KObject
;
import
com.beecode.inz.basis.team.pojo.ResponseObj
;
import
com.beecode.inz.basis.team.pojo.ResponseObj
;
import
com.beecode.inz.common.exception.BusinessException
;
import
com.beecode.inz.common.exception.BusinessException
;
...
@@ -10,6 +14,7 @@ import com.xyst.dinas.contract.internal.dao.ContractDao;
...
@@ -10,6 +14,7 @@ import com.xyst.dinas.contract.internal.dao.ContractDao;
import
com.xyst.dinas.contract.service.ContractService
;
import
com.xyst.dinas.contract.service.ContractService
;
import
com.xyst.dinas.project.dao.ProjectFiledDao
;
import
com.xyst.dinas.project.dao.ProjectFiledDao
;
import
com.xyst.dinas.project.dao.PurchaseSandCompanyDao
;
import
com.xyst.dinas.project.dao.PurchaseSandCompanyDao
;
import
com.xyst.dinas.sales.constant.VehicleAmountPartyConstant
;
import
com.xyst.dinas.sales.dao.VehicleAmountPartyDao
;
import
com.xyst.dinas.sales.dao.VehicleAmountPartyDao
;
import
com.xyst.dinas.sales.enumeration.VehicleAmountPartyErrorCodeEnum
;
import
com.xyst.dinas.sales.enumeration.VehicleAmountPartyErrorCodeEnum
;
import
com.xyst.dinas.sales.service.VehicleAmountPartyService
;
import
com.xyst.dinas.sales.service.VehicleAmountPartyService
;
...
@@ -47,6 +52,9 @@ public class VehicleAmountPartyServiceImpl implements VehicleAmountPartyService
...
@@ -47,6 +52,9 @@ public class VehicleAmountPartyServiceImpl implements VehicleAmountPartyService
@Autowired
@Autowired
ContractService
contractService
;
ContractService
contractService
;
@Autowired
private
LogService
logService
;
/**
/**
* @Author yanHeng
* @Author yanHeng
* @Date 2022/4/6 11:36
* @Date 2022/4/6 11:36
...
@@ -73,6 +81,14 @@ public class VehicleAmountPartyServiceImpl implements VehicleAmountPartyService
...
@@ -73,6 +81,14 @@ public class VehicleAmountPartyServiceImpl implements VehicleAmountPartyService
kObject
.
set
(
"dinasType"
,
dinasTypeDao
.
load
(
dinasTypeId
));
kObject
.
set
(
"dinasType"
,
dinasTypeDao
.
load
(
dinasTypeId
));
UUID
uuid
=
vehicleAmountPartyDao
.
create
(
kObject
);
UUID
uuid
=
vehicleAmountPartyDao
.
create
(
kObject
);
//记录操作日志
KObject
log
=
Amino
.
getApplicationContext
()
.
getBean
(
LogConstants
.
LOG_ENTIY_NAME
,
KClass
.
class
).
newInstance
();
log
.
set
(
"module"
,
VehicleAmountPartyConstant
.
ENTITY
);
log
.
set
(
"businessObjectId"
,
uuid
);
log
.
set
(
"logContent"
,
"新增了这条车辆量方数据"
);
logService
.
addLog
(
log
);
//扣减预付款余额 ,取得总价 进行扣减
//扣减预付款余额 ,取得总价 进行扣减
//查询合同余额,如果预付款小于总价,不允许交易
//查询合同余额,如果预付款小于总价,不允许交易
BigDecimal
amount
;
BigDecimal
amount
;
...
@@ -90,6 +106,7 @@ public class VehicleAmountPartyServiceImpl implements VehicleAmountPartyService
...
@@ -90,6 +106,7 @@ public class VehicleAmountPartyServiceImpl implements VehicleAmountPartyService
throw
new
BusinessException
(
"预付款余额扣减失败"
,
VehicleAmountPartyErrorCodeEnum
.
VEHICLE_AMOUNT_PARTY_ADVANCE_BALANCE
);
throw
new
BusinessException
(
"预付款余额扣减失败"
,
VehicleAmountPartyErrorCodeEnum
.
VEHICLE_AMOUNT_PARTY_ADVANCE_BALANCE
);
}
}
return
uuid
;
return
uuid
;
}
}
...
@@ -126,6 +143,14 @@ public class VehicleAmountPartyServiceImpl implements VehicleAmountPartyService
...
@@ -126,6 +143,14 @@ public class VehicleAmountPartyServiceImpl implements VehicleAmountPartyService
}
else
{
}
else
{
vehicleAmountPartyDao
.
deleteById
(
id
);
vehicleAmountPartyDao
.
deleteById
(
id
);
}
}
//记录操作日志
KObject
log
=
Amino
.
getApplicationContext
()
.
getBean
(
LogConstants
.
LOG_ENTIY_NAME
,
KClass
.
class
).
newInstance
();
log
.
set
(
"module"
,
VehicleAmountPartyConstant
.
ENTITY
);
log
.
set
(
"businessObjectId"
,
id
);
log
.
set
(
"logContent"
,
"删除了这条车辆量方数据"
);
logService
.
addLog
(
log
);
return
ResponseObj
.
success
(
"删除成功"
);
return
ResponseObj
.
success
(
"删除成功"
);
}
}
}
}
backend/xyst.dinas.sales/src/main/java/com/xyst/dinas/sales/web/ShipQuantityController.java
View file @
563bec86
...
@@ -2,6 +2,8 @@ package com.xyst.dinas.sales.web;
...
@@ -2,6 +2,8 @@ package com.xyst.dinas.sales.web;
import
com.beecode.amino.core.Amino
;
import
com.beecode.amino.core.Amino
;
import
com.beecode.bap.attachment.common.Page
;
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.KClass
;
import
com.beecode.bcp.type.KObject
;
import
com.beecode.bcp.type.KObject
;
import
com.beecode.bcp.type.json.JSONObjectUtils
;
import
com.beecode.bcp.type.json.JSONObjectUtils
;
...
@@ -28,7 +30,8 @@ public class ShipQuantityController {
...
@@ -28,7 +30,8 @@ public class ShipQuantityController {
@Autowired
@Autowired
private
ShipQuantityService
shipQuantity
;
private
ShipQuantityService
shipQuantity
;
@Autowired
private
LogService
logService
;
/**
/**
* 新建运船量方
* 新建运船量方
*
*
...
@@ -148,10 +151,25 @@ public class ShipQuantityController {
...
@@ -148,10 +151,25 @@ public class ShipQuantityController {
if
(
id
==
null
){
if
(
id
==
null
){
return
ResponseObj
.
error
(
400
,
"'id' must be not null!"
);
return
ResponseObj
.
error
(
400
,
"'id' must be not null!"
);
}
}
return
shipQuantity
.
deleteById
(
id
);
return
shipQuantity
.
deleteById
(
id
);
}
}
@PostMapping
(
"/addLog"
)
public
ResponseObj
addLog
(
@RequestParam
(
"id"
)
UUID
id
,
@RequestParam
(
"module"
)
String
module
,
@RequestParam
(
"logContent"
)
String
logContent
)
{
//记录操作日志
KObject
log
=
Amino
.
getApplicationContext
()
.
getBean
(
LogConstants
.
LOG_ENTIY_NAME
,
KClass
.
class
).
newInstance
();
log
.
set
(
"module"
,
module
);
log
.
set
(
"businessObjectId"
,
id
);
log
.
set
(
"logContent"
,
logContent
);
logService
.
addLog
(
log
);
return
ResponseObj
.
success
(
"保存成功"
,
id
);
}
@GetMapping
(
"/test"
)
@GetMapping
(
"/test"
)
public
ResponseObj
init
(
@RequestParam
(
"id"
)
String
id
)
{
public
ResponseObj
init
(
@RequestParam
(
"id"
)
String
id
)
{
System
.
out
.
println
(
"testok"
);
System
.
out
.
println
(
"testok"
);
...
...
backend/xyst.dinas.sales/src/main/model/com/xyst/dinas/sales/auth/ShipQuantityPrice.mk
View file @
563bec86
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<type>bcp.authz.Privilege</type>
<type>bcp.authz.Privilege</type>
<package>com.xyst.dinas.sales.auth</package>
<package>com.xyst.dinas.sales.auth</package>
<name>ShipQuantityPrice</name>
<name>ShipQuantityPrice</name>
<title>
折方
单价配置</title>
<title>
船运
单价配置</title>
<tags></tags>
<tags></tags>
<description></description>
<description></description>
</header>
</header>
...
...
backend/xyst.dinas.sales/src/main/resources/com/xyst/dinas/sales/auth/ShipQuantityPrice.jmx
View file @
563bec86
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<specification>
1.0
</specification>
<specification>
1.0
</specification>
<id>
22357852-7323-4b8f-abca-e0638ea0f8fa
</id>
<id>
22357852-7323-4b8f-abca-e0638ea0f8fa
</id>
<name>
com.xyst.dinas.sales.auth.ShipQuantityPrice
</name>
<name>
com.xyst.dinas.sales.auth.ShipQuantityPrice
</name>
<title>
折方
单价配置
</title>
<title>
船运
单价配置
</title>
<define>
bcp.authz.privilege
</define>
<define>
bcp.authz.privilege
</define>
<define-version>
1.0.0
</define-version>
<define-version>
1.0.0
</define-version>
<content>
<content>
...
...
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