Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
5168a11b
"sql/ry_20220613.sql" did not exist on "478fae0d28938739a0b27c21f25178fd197dee6a"
Commit
5168a11b
authored
Jun 09, 2020
by
季圣华
Browse files
优化日志模块
parent
b6f79820
Changes
22
Show whitespace changes
Inline
Side-by-side
src/main/java/com/jsh/erp/constants/BusinessConstants.java
View file @
5168a11b
...
...
@@ -141,9 +141,9 @@ public class BusinessConstants {
* */
public
static
final
String
LOG_OPERATION_TYPE_ADD
=
"新增"
;
public
static
final
String
LOG_OPERATION_TYPE_BATCH_ADD
=
"批量新增"
;
public
static
final
String
LOG_OPERATION_TYPE_EDIT
=
"修改
,id:
"
;
public
static
final
String
LOG_OPERATION_TYPE_DELETE
=
"删除
,id:
"
;
public
static
final
String
LOG_OPERATION_TYPE_LOGIN
=
"登录
,id:
"
;
public
static
final
String
LOG_OPERATION_TYPE_EDIT
=
"修改"
;
public
static
final
String
LOG_OPERATION_TYPE_DELETE
=
"删除"
;
public
static
final
String
LOG_OPERATION_TYPE_LOGIN
=
"登录"
;
public
static
final
String
LOG_OPERATION_TYPE_IMPORT
=
"导入"
;
/**
...
...
src/main/java/com/jsh/erp/controller/UserController.java
View file @
5168a11b
...
...
@@ -144,7 +144,7 @@ public class UserController {
}
}
logService
.
insertLog
(
"用户"
,
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_LOGIN
).
append
(
user
.
get
Id
()).
toString
(),
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_LOGIN
).
append
(
user
.
get
LoginName
()).
toString
(),
((
ServletRequestAttributes
)
RequestContextHolder
.
getRequestAttributes
()).
getRequest
());
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
...
...
src/main/java/com/jsh/erp/service/account/AccountService.java
View file @
5168a11b
...
...
@@ -120,7 +120,8 @@ public class AccountService {
int
result
=
0
;
try
{
result
=
accountMapper
.
insertSelective
(
account
);
logService
.
insertLog
(
"账户"
,
BusinessConstants
.
LOG_OPERATION_TYPE_ADD
,
request
);
logService
.
insertLog
(
"账户"
,
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_ADD
).
append
(
account
.
getName
()).
toString
(),
request
);
}
catch
(
Exception
e
){
JshException
.
writeFail
(
logger
,
e
);
}
...
...
@@ -135,7 +136,7 @@ public class AccountService {
try
{
result
=
accountMapper
.
updateByPrimaryKeySelective
(
account
);
logService
.
insertLog
(
"账户"
,
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_EDIT
).
append
(
id
).
toString
(),
request
);
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_EDIT
).
append
(
account
.
getName
()
).
toString
(),
request
);
}
catch
(
Exception
e
){
JshException
.
writeFail
(
logger
,
e
);
}
...
...
src/main/java/com/jsh/erp/service/accountHead/AccountHeadService.java
View file @
5168a11b
...
...
@@ -105,7 +105,8 @@ public class AccountHeadService {
int
result
=
0
;
try
{
result
=
accountHeadMapper
.
insertSelective
(
accountHead
);
logService
.
insertLog
(
"财务"
,
BusinessConstants
.
LOG_OPERATION_TYPE_ADD
,
request
);
logService
.
insertLog
(
"财务"
,
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_ADD
).
append
(
accountHead
.
getBillno
()).
toString
(),
request
);
}
catch
(
Exception
e
){
JshException
.
writeFail
(
logger
,
e
);
}
...
...
@@ -120,7 +121,7 @@ public class AccountHeadService {
try
{
result
=
accountHeadMapper
.
updateByPrimaryKeySelective
(
accountHead
);
logService
.
insertLog
(
"财务"
,
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_EDIT
).
append
(
id
).
toString
(),
request
);
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_EDIT
).
append
(
accountHead
.
getBillno
()
).
toString
(),
request
);
}
catch
(
Exception
e
){
JshException
.
writeFail
(
logger
,
e
);
}
...
...
@@ -131,9 +132,10 @@ public class AccountHeadService {
public
int
deleteAccountHead
(
Long
id
,
HttpServletRequest
request
)
throws
Exception
{
int
result
=
0
;
try
{
AccountHead
accountHead
=
accountHeadMapper
.
selectByPrimaryKey
(
id
);
result
=
accountHeadMapper
.
deleteByPrimaryKey
(
id
);
logService
.
insertLog
(
"财务"
,
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_DELETE
).
append
(
id
).
toString
(),
request
);
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_DELETE
).
append
(
accountHead
.
getBillno
()
).
toString
(),
request
);
}
catch
(
Exception
e
){
JshException
.
writeFail
(
logger
,
e
);
}
...
...
src/main/java/com/jsh/erp/service/depot/DepotService.java
View file @
5168a11b
...
...
@@ -103,7 +103,8 @@ public class DepotService {
int
result
=
0
;
try
{
result
=
depotMapper
.
insertSelective
(
depot
);
logService
.
insertLog
(
"仓库"
,
BusinessConstants
.
LOG_OPERATION_TYPE_ADD
,
request
);
logService
.
insertLog
(
"仓库"
,
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_ADD
).
append
(
depot
.
getName
()).
toString
(),
request
);
}
catch
(
Exception
e
){
JshException
.
writeFail
(
logger
,
e
);
}
...
...
@@ -118,7 +119,7 @@ public class DepotService {
try
{
result
=
depotMapper
.
updateByPrimaryKeySelective
(
depot
);
logService
.
insertLog
(
"仓库"
,
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_EDIT
).
append
(
i
d
).
toString
(),
request
);
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_EDIT
).
append
(
d
epot
.
getName
()
).
toString
(),
request
);
}
catch
(
Exception
e
){
JshException
.
writeFail
(
logger
,
e
);
}
...
...
@@ -129,9 +130,10 @@ public class DepotService {
public
int
deleteDepot
(
Long
id
,
HttpServletRequest
request
)
throws
Exception
{
int
result
=
0
;
try
{
Depot
depot
=
depotMapper
.
selectByPrimaryKey
(
id
);
result
=
depotMapper
.
deleteByPrimaryKey
(
id
);
logService
.
insertLog
(
"仓库"
,
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_DELETE
).
append
(
i
d
).
toString
(),
request
);
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_DELETE
).
append
(
d
epot
.
getName
()
).
toString
(),
request
);
}
catch
(
Exception
e
){
JshException
.
writeFail
(
logger
,
e
);
}
...
...
src/main/java/com/jsh/erp/service/depotHead/DepotHeadService.java
View file @
5168a11b
...
...
@@ -223,9 +223,6 @@ public class DepotHeadService {
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
public
int
batchSetStatus
(
String
status
,
String
depotHeadIDs
)
throws
Exception
{
logService
.
insertLog
(
"单据"
,
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_EDIT
).
append
(
depotHeadIDs
).
toString
(),
((
ServletRequestAttributes
)
RequestContextHolder
.
getRequestAttributes
()).
getRequest
());
List
<
Long
>
ids
=
StringUtil
.
strToLongList
(
depotHeadIDs
);
DepotHead
depotHead
=
new
DepotHead
();
depotHead
.
setStatus
(
status
);
...
...
@@ -237,6 +234,9 @@ public class DepotHeadService {
}
catch
(
Exception
e
){
JshException
.
writeFail
(
logger
,
e
);
}
logService
.
insertLog
(
"单据"
,
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_EDIT
).
append
(
depotHeadIDs
).
toString
(),
((
ServletRequestAttributes
)
RequestContextHolder
.
getRequestAttributes
()).
getRequest
());
return
result
;
}
/**
...
...
@@ -456,9 +456,6 @@ public class DepotHeadService {
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
public
void
addDepotHeadAndDetail
(
String
beanJson
,
String
inserted
,
String
deleted
,
String
updated
,
Long
tenantId
,
HttpServletRequest
request
)
throws
Exception
{
logService
.
insertLog
(
"单据"
,
BusinessConstants
.
LOG_OPERATION_TYPE_ADD
,
((
ServletRequestAttributes
)
RequestContextHolder
.
getRequestAttributes
()).
getRequest
());
/**处理单据主表数据*/
DepotHead
depotHead
=
JSONObject
.
parseObject
(
beanJson
,
DepotHead
.
class
);
//判断用户是否已经登录过,登录过不再处理
...
...
@@ -499,6 +496,9 @@ public class DepotHeadService {
JshException
.
writeFail
(
logger
,
e
);
}
}
logService
.
insertLog
(
"单据"
,
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_ADD
).
append
(
depotHead
.
getNumber
()).
toString
(),
((
ServletRequestAttributes
)
RequestContextHolder
.
getRequestAttributes
()).
getRequest
());
}
/**
...
...
@@ -516,9 +516,6 @@ public class DepotHeadService {
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
public
void
updateDepotHeadAndDetail
(
Long
id
,
String
beanJson
,
String
inserted
,
String
deleted
,
String
updated
,
BigDecimal
preTotalPrice
,
Long
tenantId
,
HttpServletRequest
request
)
throws
Exception
{
logService
.
insertLog
(
"单据"
,
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_EDIT
).
append
(
id
).
toString
(),
((
ServletRequestAttributes
)
RequestContextHolder
.
getRequestAttributes
()).
getRequest
());
/**更新单据主表信息*/
DepotHead
depotHead
=
JSONObject
.
parseObject
(
beanJson
,
DepotHead
.
class
);
//判断用户是否已经登录过,登录过不再处理
...
...
@@ -538,6 +535,9 @@ public class DepotHeadService {
}
/**入库和出库处理单据子表信息*/
depotItemService
.
saveDetials
(
inserted
,
deleted
,
updated
,
depotHead
.
getId
(),
tenantId
,
request
);
logService
.
insertLog
(
"单据"
,
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_EDIT
).
append
(
depotHead
.
getNumber
()).
toString
(),
((
ServletRequestAttributes
)
RequestContextHolder
.
getRequestAttributes
()).
getRequest
());
}
/**
...
...
@@ -547,9 +547,6 @@ public class DepotHeadService {
*/
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
public
void
deleteDepotHeadAndDetail
(
Long
id
)
throws
Exception
{
logService
.
insertLog
(
"单据"
,
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_DELETE
).
append
(
id
).
toString
(),
((
ServletRequestAttributes
)
RequestContextHolder
.
getRequestAttributes
()).
getRequest
());
//查询单据主表信息
DepotHead
depotHead
=
getDepotHead
(
id
);
User
userInfo
=
userService
.
getCurrentUser
();
...
...
@@ -581,6 +578,9 @@ public class DepotHeadService {
/**删除单据主表信息*/
batchDeleteDepotHeadByIds
(
id
.
toString
());
logService
.
insertLog
(
"单据"
,
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_DELETE
).
append
(
depotHead
.
getNumber
()).
toString
(),
((
ServletRequestAttributes
)
RequestContextHolder
.
getRequestAttributes
()).
getRequest
());
}
/**
...
...
src/main/java/com/jsh/erp/service/functions/FunctionsService.java
View file @
5168a11b
...
...
@@ -97,13 +97,13 @@ public class FunctionsService {
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
public
int
updateFunctions
(
String
beanJson
,
Long
id
,
HttpServletRequest
request
)
throws
Exception
{
Functions
depot
=
JSONObject
.
parseObject
(
beanJson
,
Functions
.
class
);
depot
.
setId
(
id
);
Functions
functions
=
JSONObject
.
parseObject
(
beanJson
,
Functions
.
class
);
functions
.
setId
(
id
);
int
result
=
0
;
try
{
result
=
functionsMapper
.
updateByPrimaryKeySelective
(
depot
);
result
=
functionsMapper
.
updateByPrimaryKeySelective
(
functions
);
logService
.
insertLog
(
"功能"
,
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_EDIT
).
append
(
id
).
toString
(),
request
);
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_EDIT
).
append
(
functions
.
getName
()
).
toString
(),
request
);
}
catch
(
Exception
e
){
JshException
.
writeFail
(
logger
,
e
);
}
...
...
src/main/java/com/jsh/erp/service/inOutItem/InOutItemService.java
View file @
5168a11b
...
...
@@ -85,11 +85,12 @@ public class InOutItemService {
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
public
int
insertInOutItem
(
String
beanJson
,
HttpServletRequest
request
)
throws
Exception
{
InOutItem
depot
=
JSONObject
.
parseObject
(
beanJson
,
InOutItem
.
class
);
InOutItem
inOutItem
=
JSONObject
.
parseObject
(
beanJson
,
InOutItem
.
class
);
int
result
=
0
;
try
{
result
=
inOutItemMapper
.
insertSelective
(
depot
);
logService
.
insertLog
(
"收支项目"
,
BusinessConstants
.
LOG_OPERATION_TYPE_ADD
,
request
);
result
=
inOutItemMapper
.
insertSelective
(
inOutItem
);
logService
.
insertLog
(
"收支项目"
,
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_ADD
).
append
(
inOutItem
.
getName
()).
toString
(),
request
);
}
catch
(
Exception
e
){
JshException
.
writeFail
(
logger
,
e
);
}
...
...
@@ -98,13 +99,13 @@ public class InOutItemService {
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
public
int
updateInOutItem
(
String
beanJson
,
Long
id
,
HttpServletRequest
request
)
throws
Exception
{
InOutItem
depot
=
JSONObject
.
parseObject
(
beanJson
,
InOutItem
.
class
);
depot
.
setId
(
id
);
InOutItem
inOutItem
=
JSONObject
.
parseObject
(
beanJson
,
InOutItem
.
class
);
inOutItem
.
setId
(
id
);
int
result
=
0
;
try
{
result
=
inOutItemMapper
.
updateByPrimaryKeySelective
(
depot
);
result
=
inOutItemMapper
.
updateByPrimaryKeySelective
(
inOutItem
);
logService
.
insertLog
(
"收支项目"
,
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_EDIT
).
append
(
i
d
).
toString
(),
request
);
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_EDIT
).
append
(
i
nOutItem
.
getName
()
).
toString
(),
request
);
}
catch
(
Exception
e
){
JshException
.
writeFail
(
logger
,
e
);
}
...
...
src/main/java/com/jsh/erp/service/log/LogService.java
View file @
5168a11b
...
...
@@ -148,7 +148,7 @@ public class LogService {
}
}
public
void
insertLog
(
String
moduleName
,
String
type
,
HttpServletRequest
request
)
throws
Exception
{
public
void
insertLog
(
String
moduleName
,
String
content
,
HttpServletRequest
request
)
throws
Exception
{
try
{
Long
userId
=
getUserId
(
request
);
if
(
userId
!=
null
)
{
...
...
@@ -159,7 +159,7 @@ public class LogService {
log
.
setCreatetime
(
new
Date
());
Byte
status
=
0
;
log
.
setStatus
(
status
);
log
.
setContentdetails
(
type
+
moduleName
);
log
.
setContentdetails
(
content
);
logMapper
.
insertSelective
(
log
);
}
}
catch
(
Exception
e
){
...
...
src/main/java/com/jsh/erp/service/material/MaterialService.java
View file @
5168a11b
...
...
@@ -162,7 +162,8 @@ public class MaterialService {
}
}
}
logService
.
insertLog
(
"商品"
,
BusinessConstants
.
LOG_OPERATION_TYPE_ADD
,
request
);
logService
.
insertLog
(
"商品"
,
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_ADD
).
append
(
m
.
getName
()).
toString
(),
request
);
return
1
;
}
catch
(
Exception
e
){
JshException
.
writeFail
(
logger
,
e
);
...
...
@@ -197,7 +198,7 @@ public class MaterialService {
}
}
logService
.
insertLog
(
"商品"
,
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_EDIT
).
append
(
id
).
toString
(),
request
);
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_EDIT
).
append
(
material
.
getName
()
).
toString
(),
request
);
return
1
;
}
catch
(
Exception
e
){
JshException
.
writeFail
(
logger
,
e
);
...
...
src/main/java/com/jsh/erp/service/materialCategory/MaterialCategoryService.java
View file @
5168a11b
...
...
@@ -118,7 +118,8 @@ public class MaterialCategoryService {
int
result
=
0
;
try
{
result
=
materialCategoryMapper
.
insertSelective
(
materialCategory
);
logService
.
insertLog
(
"商品类型"
,
BusinessConstants
.
LOG_OPERATION_TYPE_ADD
,
request
);
logService
.
insertLog
(
"商品类型"
,
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_ADD
).
append
(
materialCategory
.
getName
()).
toString
(),
request
);
}
catch
(
Exception
e
){
JshException
.
writeFail
(
logger
,
e
);
}
...
...
@@ -133,7 +134,7 @@ public class MaterialCategoryService {
try
{
result
=
materialCategoryMapper
.
updateByPrimaryKeySelective
(
materialCategory
);
logService
.
insertLog
(
"商品类型"
,
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_EDIT
).
append
(
id
).
toString
(),
request
);
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_EDIT
).
append
(
materialCategory
.
getName
()
).
toString
(),
request
);
}
catch
(
Exception
e
){
JshException
.
writeFail
(
logger
,
e
);
}
...
...
src/main/java/com/jsh/erp/service/materialProperty/MaterialPropertyService.java
View file @
5168a11b
...
...
@@ -87,7 +87,8 @@ public class MaterialPropertyService {
int
result
=
0
;
try
{
result
=
materialPropertyMapper
.
insertSelective
(
materialProperty
);
logService
.
insertLog
(
"商品属性"
,
BusinessConstants
.
LOG_OPERATION_TYPE_ADD
,
request
);
logService
.
insertLog
(
"商品属性"
,
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_ADD
).
append
(
materialProperty
.
getNativename
()).
toString
(),
request
);
}
catch
(
Exception
e
){
JshException
.
writeFail
(
logger
,
e
);
}
...
...
@@ -102,7 +103,7 @@ public class MaterialPropertyService {
try
{
result
=
materialPropertyMapper
.
updateByPrimaryKeySelective
(
materialProperty
);
logService
.
insertLog
(
"商品属性"
,
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_EDIT
).
append
(
id
).
toString
(),
request
);
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_EDIT
).
append
(
materialProperty
.
getNativename
()
).
toString
(),
request
);
}
catch
(
Exception
e
){
JshException
.
writeFail
(
logger
,
e
);
}
...
...
src/main/java/com/jsh/erp/service/msg/MsgService.java
View file @
5168a11b
...
...
@@ -102,7 +102,8 @@ public class MsgService {
int
result
=
0
;
try
{
result
=
msgMapper
.
insertSelective
(
msg
);
logService
.
insertLog
(
"消息"
,
BusinessConstants
.
LOG_OPERATION_TYPE_ADD
,
request
);
logService
.
insertLog
(
"消息"
,
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_ADD
).
append
(
msg
.
getMsgTitle
()).
toString
(),
request
);
}
catch
(
Exception
e
){
logger
.
error
(
"异常码[{}],异常提示[{}],异常[{}]"
,
ExceptionConstants
.
DATA_WRITE_FAIL_CODE
,
ExceptionConstants
.
DATA_WRITE_FAIL_MSG
,
e
);
...
...
@@ -120,7 +121,7 @@ public class MsgService {
try
{
result
=
msgMapper
.
updateByPrimaryKeySelective
(
msg
);
logService
.
insertLog
(
"消息"
,
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_EDIT
).
append
(
id
).
toString
(),
request
);
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_EDIT
).
append
(
msg
.
getMsgTitle
()
).
toString
(),
request
);
}
catch
(
Exception
e
){
logger
.
error
(
"异常码[{}],异常提示[{}],异常[{}]"
,
ExceptionConstants
.
DATA_WRITE_FAIL_CODE
,
ExceptionConstants
.
DATA_WRITE_FAIL_MSG
,
e
);
...
...
src/main/java/com/jsh/erp/service/organization/OrganizationService.java
View file @
5168a11b
...
...
@@ -56,7 +56,8 @@ public class OrganizationService {
int
result
=
0
;
try
{
result
=
organizationMapper
.
insertSelective
(
organization
);
logService
.
insertLog
(
"机构"
,
BusinessConstants
.
LOG_OPERATION_TYPE_ADD
,
request
);
logService
.
insertLog
(
"机构"
,
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_ADD
).
append
(
organization
.
getOrgFullName
()).
toString
(),
request
);
}
catch
(
Exception
e
){
JshException
.
writeFail
(
logger
,
e
);
}
...
...
@@ -70,7 +71,7 @@ public class OrganizationService {
try
{
result
=
organizationMapper
.
updateByPrimaryKeySelective
(
organization
);
logService
.
insertLog
(
"机构"
,
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_EDIT
).
append
(
id
).
toString
(),
request
);
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_EDIT
).
append
(
organization
.
getOrgFullName
()
).
toString
(),
request
);
}
catch
(
Exception
e
){
JshException
.
writeFail
(
logger
,
e
);
}
...
...
src/main/java/com/jsh/erp/service/person/PersonService.java
View file @
5168a11b
...
...
@@ -92,7 +92,8 @@ public class PersonService {
int
result
=
0
;
try
{
result
=
personMapper
.
insertSelective
(
person
);
logService
.
insertLog
(
"经手人"
,
BusinessConstants
.
LOG_OPERATION_TYPE_ADD
,
request
);
logService
.
insertLog
(
"经手人"
,
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_ADD
).
append
(
person
.
getName
()).
toString
(),
request
);
}
catch
(
Exception
e
){
JshException
.
writeFail
(
logger
,
e
);
}
...
...
@@ -107,7 +108,7 @@ public class PersonService {
try
{
result
=
personMapper
.
updateByPrimaryKeySelective
(
person
);
logService
.
insertLog
(
"经手人"
,
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_EDIT
).
append
(
id
).
toString
(),
request
);
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_EDIT
).
append
(
person
.
getName
()
).
toString
(),
request
);
}
catch
(
Exception
e
){
JshException
.
writeFail
(
logger
,
e
);
}
...
...
src/main/java/com/jsh/erp/service/role/RoleService.java
View file @
5168a11b
...
...
@@ -86,7 +86,8 @@ public class RoleService {
int
result
=
0
;
try
{
result
=
roleMapper
.
insertSelective
(
role
);
logService
.
insertLog
(
"角色"
,
BusinessConstants
.
LOG_OPERATION_TYPE_ADD
,
request
);
logService
.
insertLog
(
"角色"
,
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_ADD
).
append
(
role
.
getName
()).
toString
(),
request
);
}
catch
(
Exception
e
){
JshException
.
writeFail
(
logger
,
e
);
}
...
...
@@ -101,7 +102,7 @@ public class RoleService {
try
{
result
=
roleMapper
.
updateByPrimaryKeySelective
(
role
);
logService
.
insertLog
(
"角色"
,
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_EDIT
).
append
(
id
).
toString
(),
request
);
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_EDIT
).
append
(
role
.
getName
()
).
toString
(),
request
);
}
catch
(
Exception
e
){
JshException
.
writeFail
(
logger
,
e
);
}
...
...
src/main/java/com/jsh/erp/service/serialNumber/SerialNumberService.java
View file @
5168a11b
...
...
@@ -94,11 +94,11 @@ public class SerialNumberService {
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
public
int
insertSerialNumber
(
String
beanJson
,
HttpServletRequest
request
)
throws
Exception
{
SerialNumber
serialNumber
=
JSONObject
.
parseObject
(
beanJson
,
SerialNumber
.
class
);
logService
.
insertLog
(
"序列号"
,
BusinessConstants
.
LOG_OPERATION_TYPE_ADD
,
request
);
int
result
=
0
;
try
{
result
=
serialNumberMapper
.
insertSelective
(
serialNumber
);
logService
.
insertLog
(
"序列号"
,
BusinessConstants
.
LOG_OPERATION_TYPE_ADD
,
request
);
logService
.
insertLog
(
"序列号"
,
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_ADD
).
append
(
serialNumber
.
getSerialNumber
()).
toString
(),
request
);
}
catch
(
Exception
e
){
JshException
.
writeFail
(
logger
,
e
);
}
...
...
@@ -113,7 +113,7 @@ public class SerialNumberService {
try
{
result
=
serialNumberMapper
.
updateByPrimaryKeySelective
(
serialNumber
);
logService
.
insertLog
(
"序列号"
,
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_EDIT
).
append
(
id
).
toString
(),
request
);
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_EDIT
).
append
(
serialNumber
.
getSerialNumber
()
).
toString
(),
request
);
}
catch
(
Exception
e
){
JshException
.
writeFail
(
logger
,
e
);
}
...
...
src/main/java/com/jsh/erp/service/supplier/SupplierService.java
View file @
5168a11b
...
...
@@ -133,7 +133,8 @@ public class SupplierService {
int
result
=
0
;
try
{
result
=
supplierMapper
.
insertSelective
(
supplier
);
logService
.
insertLog
(
"商家"
,
BusinessConstants
.
LOG_OPERATION_TYPE_ADD
,
request
);
logService
.
insertLog
(
"商家"
,
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_ADD
).
append
(
supplier
.
getSupplier
()).
toString
(),
request
);
}
catch
(
Exception
e
){
JshException
.
writeFail
(
logger
,
e
);
}
...
...
@@ -154,7 +155,7 @@ public class SupplierService {
try
{
result
=
supplierMapper
.
updateByPrimaryKeySelective
(
supplier
);
logService
.
insertLog
(
"商家"
,
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_EDIT
).
append
(
id
).
toString
(),
request
);
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_EDIT
).
append
(
supplier
.
getSupplier
()
).
toString
(),
request
);
}
catch
(
Exception
e
){
JshException
.
writeFail
(
logger
,
e
);
}
...
...
src/main/java/com/jsh/erp/service/systemConfig/SystemConfigService.java
View file @
5168a11b
...
...
@@ -87,7 +87,8 @@ public class SystemConfigService {
int
result
=
0
;
try
{
result
=
systemConfigMapper
.
insertSelective
(
systemConfig
);
logService
.
insertLog
(
"系统配置"
,
BusinessConstants
.
LOG_OPERATION_TYPE_ADD
,
request
);
logService
.
insertLog
(
"系统配置"
,
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_ADD
).
append
(
systemConfig
.
getCompanyName
()).
toString
(),
request
);
}
catch
(
Exception
e
){
JshException
.
writeFail
(
logger
,
e
);
}
...
...
@@ -102,7 +103,7 @@ public class SystemConfigService {
try
{
result
=
systemConfigMapper
.
updateByPrimaryKeySelective
(
systemConfig
);
logService
.
insertLog
(
"系统配置"
,
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_EDIT
).
append
(
id
).
toString
(),
request
);
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_EDIT
).
append
(
systemConfig
.
getCompanyName
()
).
toString
(),
request
);
}
catch
(
Exception
e
){
JshException
.
writeFail
(
logger
,
e
);
}
...
...
src/main/java/com/jsh/erp/service/unit/UnitService.java
View file @
5168a11b
...
...
@@ -89,7 +89,8 @@ public class UnitService {
int
result
=
0
;
try
{
result
=
unitMapper
.
insertSelective
(
unit
);
logService
.
insertLog
(
"计量单位"
,
BusinessConstants
.
LOG_OPERATION_TYPE_ADD
,
request
);
logService
.
insertLog
(
"计量单位"
,
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_ADD
).
append
(
unit
.
getUname
()).
toString
(),
request
);
}
catch
(
Exception
e
){
JshException
.
writeFail
(
logger
,
e
);
}
...
...
@@ -104,7 +105,7 @@ public class UnitService {
try
{
result
=
unitMapper
.
updateByPrimaryKeySelective
(
unit
);
logService
.
insertLog
(
"计量单位"
,
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_EDIT
).
append
(
id
).
toString
(),
request
);
new
StringBuffer
(
BusinessConstants
.
LOG_OPERATION_TYPE_EDIT
).
append
(
unit
.
getUname
()
).
toString
(),
request
);
}
catch
(
Exception
e
){
JshException
.
writeFail
(
logger
,
e
);
}
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
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