优化日志模块
This commit is contained in:
@@ -141,9 +141,9 @@ public class BusinessConstants {
|
|||||||
* */
|
* */
|
||||||
public static final String LOG_OPERATION_TYPE_ADD = "新增";
|
public static final String LOG_OPERATION_TYPE_ADD = "新增";
|
||||||
public static final String LOG_OPERATION_TYPE_BATCH_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_EDIT = "修改";
|
||||||
public static final String LOG_OPERATION_TYPE_DELETE = "删除,id:";
|
public static final String LOG_OPERATION_TYPE_DELETE = "删除";
|
||||||
public static final String LOG_OPERATION_TYPE_LOGIN = "登录,id:";
|
public static final String LOG_OPERATION_TYPE_LOGIN = "登录";
|
||||||
public static final String LOG_OPERATION_TYPE_IMPORT = "导入";
|
public static final String LOG_OPERATION_TYPE_IMPORT = "导入";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ public class UserController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
logService.insertLog("用户",
|
logService.insertLog("用户",
|
||||||
new StringBuffer(BusinessConstants.LOG_OPERATION_TYPE_LOGIN).append(user.getId()).toString(),
|
new StringBuffer(BusinessConstants.LOG_OPERATION_TYPE_LOGIN).append(user.getLoginName()).toString(),
|
||||||
((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest());
|
((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|||||||
@@ -120,7 +120,8 @@ public class AccountService {
|
|||||||
int result=0;
|
int result=0;
|
||||||
try{
|
try{
|
||||||
result = accountMapper.insertSelective(account);
|
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){
|
}catch(Exception e){
|
||||||
JshException.writeFail(logger, e);
|
JshException.writeFail(logger, e);
|
||||||
}
|
}
|
||||||
@@ -135,7 +136,7 @@ public class AccountService {
|
|||||||
try{
|
try{
|
||||||
result = accountMapper.updateByPrimaryKeySelective(account);
|
result = accountMapper.updateByPrimaryKeySelective(account);
|
||||||
logService.insertLog("账户",
|
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){
|
}catch(Exception e){
|
||||||
JshException.writeFail(logger, e);
|
JshException.writeFail(logger, e);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -105,7 +105,8 @@ public class AccountHeadService {
|
|||||||
int result=0;
|
int result=0;
|
||||||
try{
|
try{
|
||||||
result = accountHeadMapper.insertSelective(accountHead);
|
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){
|
}catch(Exception e){
|
||||||
JshException.writeFail(logger, e);
|
JshException.writeFail(logger, e);
|
||||||
}
|
}
|
||||||
@@ -120,7 +121,7 @@ public class AccountHeadService {
|
|||||||
try{
|
try{
|
||||||
result = accountHeadMapper.updateByPrimaryKeySelective(accountHead);
|
result = accountHeadMapper.updateByPrimaryKeySelective(accountHead);
|
||||||
logService.insertLog("财务",
|
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){
|
}catch(Exception e){
|
||||||
JshException.writeFail(logger, e);
|
JshException.writeFail(logger, e);
|
||||||
}
|
}
|
||||||
@@ -131,9 +132,10 @@ public class AccountHeadService {
|
|||||||
public int deleteAccountHead(Long id, HttpServletRequest request)throws Exception {
|
public int deleteAccountHead(Long id, HttpServletRequest request)throws Exception {
|
||||||
int result=0;
|
int result=0;
|
||||||
try{
|
try{
|
||||||
|
AccountHead accountHead = accountHeadMapper.selectByPrimaryKey(id);
|
||||||
result = accountHeadMapper.deleteByPrimaryKey(id);
|
result = accountHeadMapper.deleteByPrimaryKey(id);
|
||||||
logService.insertLog("财务",
|
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){
|
}catch(Exception e){
|
||||||
JshException.writeFail(logger, e);
|
JshException.writeFail(logger, e);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -103,7 +103,8 @@ public class DepotService {
|
|||||||
int result=0;
|
int result=0;
|
||||||
try{
|
try{
|
||||||
result=depotMapper.insertSelective(depot);
|
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){
|
}catch(Exception e){
|
||||||
JshException.writeFail(logger, e);
|
JshException.writeFail(logger, e);
|
||||||
}
|
}
|
||||||
@@ -118,7 +119,7 @@ public class DepotService {
|
|||||||
try{
|
try{
|
||||||
result= depotMapper.updateByPrimaryKeySelective(depot);
|
result= depotMapper.updateByPrimaryKeySelective(depot);
|
||||||
logService.insertLog("仓库",
|
logService.insertLog("仓库",
|
||||||
new StringBuffer(BusinessConstants.LOG_OPERATION_TYPE_EDIT).append(id).toString(), request);
|
new StringBuffer(BusinessConstants.LOG_OPERATION_TYPE_EDIT).append(depot.getName()).toString(), request);
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
JshException.writeFail(logger, e);
|
JshException.writeFail(logger, e);
|
||||||
}
|
}
|
||||||
@@ -129,9 +130,10 @@ public class DepotService {
|
|||||||
public int deleteDepot(Long id, HttpServletRequest request)throws Exception {
|
public int deleteDepot(Long id, HttpServletRequest request)throws Exception {
|
||||||
int result=0;
|
int result=0;
|
||||||
try{
|
try{
|
||||||
|
Depot depot = depotMapper.selectByPrimaryKey(id);
|
||||||
result= depotMapper.deleteByPrimaryKey(id);
|
result= depotMapper.deleteByPrimaryKey(id);
|
||||||
logService.insertLog("仓库",
|
logService.insertLog("仓库",
|
||||||
new StringBuffer(BusinessConstants.LOG_OPERATION_TYPE_DELETE).append(id).toString(), request);
|
new StringBuffer(BusinessConstants.LOG_OPERATION_TYPE_DELETE).append(depot.getName()).toString(), request);
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
JshException.writeFail(logger, e);
|
JshException.writeFail(logger, e);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -223,9 +223,6 @@ public class DepotHeadService {
|
|||||||
|
|
||||||
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
||||||
public int batchSetStatus(String status, String depotHeadIDs)throws Exception {
|
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);
|
List<Long> ids = StringUtil.strToLongList(depotHeadIDs);
|
||||||
DepotHead depotHead = new DepotHead();
|
DepotHead depotHead = new DepotHead();
|
||||||
depotHead.setStatus(status);
|
depotHead.setStatus(status);
|
||||||
@@ -237,6 +234,9 @@ public class DepotHeadService {
|
|||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
JshException.writeFail(logger, e);
|
JshException.writeFail(logger, e);
|
||||||
}
|
}
|
||||||
|
logService.insertLog("单据",
|
||||||
|
new StringBuffer(BusinessConstants.LOG_OPERATION_TYPE_EDIT).append(depotHeadIDs).toString(),
|
||||||
|
((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -456,9 +456,6 @@ public class DepotHeadService {
|
|||||||
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
||||||
public void addDepotHeadAndDetail(String beanJson, String inserted, String deleted, String updated,Long tenantId,
|
public void addDepotHeadAndDetail(String beanJson, String inserted, String deleted, String updated,Long tenantId,
|
||||||
HttpServletRequest request) throws Exception {
|
HttpServletRequest request) throws Exception {
|
||||||
logService.insertLog("单据",
|
|
||||||
BusinessConstants.LOG_OPERATION_TYPE_ADD,
|
|
||||||
((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest());
|
|
||||||
/**处理单据主表数据*/
|
/**处理单据主表数据*/
|
||||||
DepotHead depotHead = JSONObject.parseObject(beanJson, DepotHead.class);
|
DepotHead depotHead = JSONObject.parseObject(beanJson, DepotHead.class);
|
||||||
//判断用户是否已经登录过,登录过不再处理
|
//判断用户是否已经登录过,登录过不再处理
|
||||||
@@ -499,6 +496,9 @@ public class DepotHeadService {
|
|||||||
JshException.writeFail(logger, e);
|
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)
|
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
||||||
public void updateDepotHeadAndDetail(Long id, String beanJson, String inserted, String deleted, String updated,
|
public void updateDepotHeadAndDetail(Long id, String beanJson, String inserted, String deleted, String updated,
|
||||||
BigDecimal preTotalPrice, Long tenantId,HttpServletRequest request)throws Exception {
|
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);
|
DepotHead depotHead = JSONObject.parseObject(beanJson, DepotHead.class);
|
||||||
//判断用户是否已经登录过,登录过不再处理
|
//判断用户是否已经登录过,登录过不再处理
|
||||||
@@ -538,6 +535,9 @@ public class DepotHeadService {
|
|||||||
}
|
}
|
||||||
/**入库和出库处理单据子表信息*/
|
/**入库和出库处理单据子表信息*/
|
||||||
depotItemService.saveDetials(inserted,deleted,updated,depotHead.getId(),tenantId,request);
|
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)
|
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
||||||
public void deleteDepotHeadAndDetail(Long id) throws Exception {
|
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);
|
DepotHead depotHead =getDepotHead(id);
|
||||||
User userInfo=userService.getCurrentUser();
|
User userInfo=userService.getCurrentUser();
|
||||||
@@ -581,6 +578,9 @@ public class DepotHeadService {
|
|||||||
|
|
||||||
/**删除单据主表信息*/
|
/**删除单据主表信息*/
|
||||||
batchDeleteDepotHeadByIds(id.toString());
|
batchDeleteDepotHeadByIds(id.toString());
|
||||||
|
logService.insertLog("单据",
|
||||||
|
new StringBuffer(BusinessConstants.LOG_OPERATION_TYPE_DELETE).append(depotHead.getNumber()).toString(),
|
||||||
|
((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -97,13 +97,13 @@ public class FunctionsService {
|
|||||||
|
|
||||||
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
||||||
public int updateFunctions(String beanJson, Long id, HttpServletRequest request) throws Exception{
|
public int updateFunctions(String beanJson, Long id, HttpServletRequest request) throws Exception{
|
||||||
Functions depot = JSONObject.parseObject(beanJson, Functions.class);
|
Functions functions = JSONObject.parseObject(beanJson, Functions.class);
|
||||||
depot.setId(id);
|
functions.setId(id);
|
||||||
int result=0;
|
int result=0;
|
||||||
try{
|
try{
|
||||||
result=functionsMapper.updateByPrimaryKeySelective(depot);
|
result=functionsMapper.updateByPrimaryKeySelective(functions);
|
||||||
logService.insertLog("功能",
|
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){
|
}catch(Exception e){
|
||||||
JshException.writeFail(logger, e);
|
JshException.writeFail(logger, e);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,11 +85,12 @@ public class InOutItemService {
|
|||||||
|
|
||||||
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
||||||
public int insertInOutItem(String beanJson, HttpServletRequest request)throws Exception {
|
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;
|
int result=0;
|
||||||
try{
|
try{
|
||||||
result=inOutItemMapper.insertSelective(depot);
|
result=inOutItemMapper.insertSelective(inOutItem);
|
||||||
logService.insertLog("收支项目", BusinessConstants.LOG_OPERATION_TYPE_ADD, request);
|
logService.insertLog("收支项目",
|
||||||
|
new StringBuffer(BusinessConstants.LOG_OPERATION_TYPE_ADD).append(inOutItem.getName()).toString(), request);
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
JshException.writeFail(logger, e);
|
JshException.writeFail(logger, e);
|
||||||
}
|
}
|
||||||
@@ -98,13 +99,13 @@ public class InOutItemService {
|
|||||||
|
|
||||||
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
||||||
public int updateInOutItem(String beanJson, Long id, HttpServletRequest request)throws Exception {
|
public int updateInOutItem(String beanJson, Long id, HttpServletRequest request)throws Exception {
|
||||||
InOutItem depot = JSONObject.parseObject(beanJson, InOutItem.class);
|
InOutItem inOutItem = JSONObject.parseObject(beanJson, InOutItem.class);
|
||||||
depot.setId(id);
|
inOutItem.setId(id);
|
||||||
int result=0;
|
int result=0;
|
||||||
try{
|
try{
|
||||||
result=inOutItemMapper.updateByPrimaryKeySelective(depot);
|
result=inOutItemMapper.updateByPrimaryKeySelective(inOutItem);
|
||||||
logService.insertLog("收支项目",
|
logService.insertLog("收支项目",
|
||||||
new StringBuffer(BusinessConstants.LOG_OPERATION_TYPE_EDIT).append(id).toString(), request);
|
new StringBuffer(BusinessConstants.LOG_OPERATION_TYPE_EDIT).append(inOutItem.getName()).toString(), request);
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
JshException.writeFail(logger, e);
|
JshException.writeFail(logger, e);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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{
|
try{
|
||||||
Long userId = getUserId(request);
|
Long userId = getUserId(request);
|
||||||
if(userId!=null) {
|
if(userId!=null) {
|
||||||
@@ -159,7 +159,7 @@ public class LogService {
|
|||||||
log.setCreatetime(new Date());
|
log.setCreatetime(new Date());
|
||||||
Byte status = 0;
|
Byte status = 0;
|
||||||
log.setStatus(status);
|
log.setStatus(status);
|
||||||
log.setContentdetails(type + moduleName);
|
log.setContentdetails(content);
|
||||||
logMapper.insertSelective(log);
|
logMapper.insertSelective(log);
|
||||||
}
|
}
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
|
|||||||
@@ -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;
|
return 1;
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
JshException.writeFail(logger, e);
|
JshException.writeFail(logger, e);
|
||||||
@@ -197,7 +198,7 @@ public class MaterialService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
logService.insertLog("商品",
|
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;
|
return 1;
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
JshException.writeFail(logger, e);
|
JshException.writeFail(logger, e);
|
||||||
|
|||||||
@@ -118,7 +118,8 @@ public class MaterialCategoryService {
|
|||||||
int result=0;
|
int result=0;
|
||||||
try{
|
try{
|
||||||
result=materialCategoryMapper.insertSelective(materialCategory);
|
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){
|
}catch(Exception e){
|
||||||
JshException.writeFail(logger, e);
|
JshException.writeFail(logger, e);
|
||||||
}
|
}
|
||||||
@@ -133,7 +134,7 @@ public class MaterialCategoryService {
|
|||||||
try{
|
try{
|
||||||
result=materialCategoryMapper.updateByPrimaryKeySelective(materialCategory);
|
result=materialCategoryMapper.updateByPrimaryKeySelective(materialCategory);
|
||||||
logService.insertLog("商品类型",
|
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){
|
}catch(Exception e){
|
||||||
JshException.writeFail(logger, e);
|
JshException.writeFail(logger, e);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,7 +87,8 @@ public class MaterialPropertyService {
|
|||||||
int result=0;
|
int result=0;
|
||||||
try{
|
try{
|
||||||
result=materialPropertyMapper.insertSelective(materialProperty);
|
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){
|
}catch(Exception e){
|
||||||
JshException.writeFail(logger, e);
|
JshException.writeFail(logger, e);
|
||||||
}
|
}
|
||||||
@@ -102,7 +103,7 @@ public class MaterialPropertyService {
|
|||||||
try{
|
try{
|
||||||
result=materialPropertyMapper.updateByPrimaryKeySelective(materialProperty);
|
result=materialPropertyMapper.updateByPrimaryKeySelective(materialProperty);
|
||||||
logService.insertLog("商品属性",
|
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){
|
}catch(Exception e){
|
||||||
JshException.writeFail(logger, e);
|
JshException.writeFail(logger, e);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -102,7 +102,8 @@ public class MsgService {
|
|||||||
int result=0;
|
int result=0;
|
||||||
try{
|
try{
|
||||||
result=msgMapper.insertSelective(msg);
|
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){
|
}catch(Exception e){
|
||||||
logger.error("异常码[{}],异常提示[{}],异常[{}]",
|
logger.error("异常码[{}],异常提示[{}],异常[{}]",
|
||||||
ExceptionConstants.DATA_WRITE_FAIL_CODE, ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
|
ExceptionConstants.DATA_WRITE_FAIL_CODE, ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
|
||||||
@@ -120,7 +121,7 @@ public class MsgService {
|
|||||||
try{
|
try{
|
||||||
result=msgMapper.updateByPrimaryKeySelective(msg);
|
result=msgMapper.updateByPrimaryKeySelective(msg);
|
||||||
logService.insertLog("消息",
|
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){
|
}catch(Exception e){
|
||||||
logger.error("异常码[{}],异常提示[{}],异常[{}]",
|
logger.error("异常码[{}],异常提示[{}],异常[{}]",
|
||||||
ExceptionConstants.DATA_WRITE_FAIL_CODE, ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
|
ExceptionConstants.DATA_WRITE_FAIL_CODE, ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
|
||||||
|
|||||||
@@ -56,7 +56,8 @@ public class OrganizationService {
|
|||||||
int result=0;
|
int result=0;
|
||||||
try{
|
try{
|
||||||
result=organizationMapper.insertSelective(organization);
|
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){
|
}catch(Exception e){
|
||||||
JshException.writeFail(logger, e);
|
JshException.writeFail(logger, e);
|
||||||
}
|
}
|
||||||
@@ -70,7 +71,7 @@ public class OrganizationService {
|
|||||||
try{
|
try{
|
||||||
result=organizationMapper.updateByPrimaryKeySelective(organization);
|
result=organizationMapper.updateByPrimaryKeySelective(organization);
|
||||||
logService.insertLog("机构",
|
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){
|
}catch(Exception e){
|
||||||
JshException.writeFail(logger, e);
|
JshException.writeFail(logger, e);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,7 +92,8 @@ public class PersonService {
|
|||||||
int result=0;
|
int result=0;
|
||||||
try{
|
try{
|
||||||
result=personMapper.insertSelective(person);
|
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){
|
}catch(Exception e){
|
||||||
JshException.writeFail(logger, e);
|
JshException.writeFail(logger, e);
|
||||||
}
|
}
|
||||||
@@ -107,7 +108,7 @@ public class PersonService {
|
|||||||
try{
|
try{
|
||||||
result=personMapper.updateByPrimaryKeySelective(person);
|
result=personMapper.updateByPrimaryKeySelective(person);
|
||||||
logService.insertLog("经手人",
|
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){
|
}catch(Exception e){
|
||||||
JshException.writeFail(logger, e);
|
JshException.writeFail(logger, e);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -86,7 +86,8 @@ public class RoleService {
|
|||||||
int result=0;
|
int result=0;
|
||||||
try{
|
try{
|
||||||
result=roleMapper.insertSelective(role);
|
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){
|
}catch(Exception e){
|
||||||
JshException.writeFail(logger, e);
|
JshException.writeFail(logger, e);
|
||||||
}
|
}
|
||||||
@@ -101,7 +102,7 @@ public class RoleService {
|
|||||||
try{
|
try{
|
||||||
result=roleMapper.updateByPrimaryKeySelective(role);
|
result=roleMapper.updateByPrimaryKeySelective(role);
|
||||||
logService.insertLog("角色",
|
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){
|
}catch(Exception e){
|
||||||
JshException.writeFail(logger, e);
|
JshException.writeFail(logger, e);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -94,11 +94,11 @@ public class SerialNumberService {
|
|||||||
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
||||||
public int insertSerialNumber(String beanJson, HttpServletRequest request)throws Exception {
|
public int insertSerialNumber(String beanJson, HttpServletRequest request)throws Exception {
|
||||||
SerialNumber serialNumber = JSONObject.parseObject(beanJson, SerialNumber.class);
|
SerialNumber serialNumber = JSONObject.parseObject(beanJson, SerialNumber.class);
|
||||||
logService.insertLog("序列号", BusinessConstants.LOG_OPERATION_TYPE_ADD, request);
|
|
||||||
int result=0;
|
int result=0;
|
||||||
try{
|
try{
|
||||||
result=serialNumberMapper.insertSelective(serialNumber);
|
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){
|
}catch(Exception e){
|
||||||
JshException.writeFail(logger, e);
|
JshException.writeFail(logger, e);
|
||||||
}
|
}
|
||||||
@@ -113,7 +113,7 @@ public class SerialNumberService {
|
|||||||
try{
|
try{
|
||||||
result=serialNumberMapper.updateByPrimaryKeySelective(serialNumber);
|
result=serialNumberMapper.updateByPrimaryKeySelective(serialNumber);
|
||||||
logService.insertLog("序列号",
|
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){
|
}catch(Exception e){
|
||||||
JshException.writeFail(logger, e);
|
JshException.writeFail(logger, e);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -133,7 +133,8 @@ public class SupplierService {
|
|||||||
int result=0;
|
int result=0;
|
||||||
try{
|
try{
|
||||||
result=supplierMapper.insertSelective(supplier);
|
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){
|
}catch(Exception e){
|
||||||
JshException.writeFail(logger, e);
|
JshException.writeFail(logger, e);
|
||||||
}
|
}
|
||||||
@@ -154,7 +155,7 @@ public class SupplierService {
|
|||||||
try{
|
try{
|
||||||
result=supplierMapper.updateByPrimaryKeySelective(supplier);
|
result=supplierMapper.updateByPrimaryKeySelective(supplier);
|
||||||
logService.insertLog("商家",
|
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){
|
}catch(Exception e){
|
||||||
JshException.writeFail(logger, e);
|
JshException.writeFail(logger, e);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,7 +87,8 @@ public class SystemConfigService {
|
|||||||
int result=0;
|
int result=0;
|
||||||
try{
|
try{
|
||||||
result=systemConfigMapper.insertSelective(systemConfig);
|
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){
|
}catch(Exception e){
|
||||||
JshException.writeFail(logger, e);
|
JshException.writeFail(logger, e);
|
||||||
}
|
}
|
||||||
@@ -102,7 +103,7 @@ public class SystemConfigService {
|
|||||||
try{
|
try{
|
||||||
result=systemConfigMapper.updateByPrimaryKeySelective(systemConfig);
|
result=systemConfigMapper.updateByPrimaryKeySelective(systemConfig);
|
||||||
logService.insertLog("系统配置",
|
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){
|
}catch(Exception e){
|
||||||
JshException.writeFail(logger, e);
|
JshException.writeFail(logger, e);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -89,7 +89,8 @@ public class UnitService {
|
|||||||
int result=0;
|
int result=0;
|
||||||
try{
|
try{
|
||||||
result=unitMapper.insertSelective(unit);
|
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){
|
}catch(Exception e){
|
||||||
JshException.writeFail(logger, e);
|
JshException.writeFail(logger, e);
|
||||||
}
|
}
|
||||||
@@ -104,7 +105,7 @@ public class UnitService {
|
|||||||
try{
|
try{
|
||||||
result=unitMapper.updateByPrimaryKeySelective(unit);
|
result=unitMapper.updateByPrimaryKeySelective(unit);
|
||||||
logService.insertLog("计量单位",
|
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){
|
}catch(Exception e){
|
||||||
JshException.writeFail(logger, e);
|
JshException.writeFail(logger, e);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -121,7 +121,8 @@ public class UserService {
|
|||||||
int result=0;
|
int result=0;
|
||||||
try{
|
try{
|
||||||
result=userMapper.insertSelective(user);
|
result=userMapper.insertSelective(user);
|
||||||
logService.insertLog("用户", BusinessConstants.LOG_OPERATION_TYPE_ADD, request);
|
logService.insertLog("用户",
|
||||||
|
new StringBuffer(BusinessConstants.LOG_OPERATION_TYPE_ADD).append(user.getLoginName()).toString(), request);
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
JshException.writeFail(logger, e);
|
JshException.writeFail(logger, e);
|
||||||
}
|
}
|
||||||
@@ -144,7 +145,7 @@ public class UserService {
|
|||||||
try{
|
try{
|
||||||
result=userMapper.updateByPrimaryKeySelective(user);
|
result=userMapper.updateByPrimaryKeySelective(user);
|
||||||
logService.insertLog("用户",
|
logService.insertLog("用户",
|
||||||
new StringBuffer(BusinessConstants.LOG_OPERATION_TYPE_EDIT).append(id).toString(), request);
|
new StringBuffer(BusinessConstants.LOG_OPERATION_TYPE_EDIT).append(user.getLoginName()).toString(), request);
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
JshException.writeFail(logger, e);
|
JshException.writeFail(logger, e);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -86,8 +86,7 @@ public class UserBusinessService {
|
|||||||
int result=0;
|
int result=0;
|
||||||
try{
|
try{
|
||||||
result=userBusinessMapper.updateByPrimaryKeySelective(userBusiness);
|
result=userBusinessMapper.updateByPrimaryKeySelective(userBusiness);
|
||||||
logService.insertLog("关联关系",
|
logService.insertLog("关联关系", BusinessConstants.LOG_OPERATION_TYPE_EDIT, request);
|
||||||
new StringBuffer(BusinessConstants.LOG_OPERATION_TYPE_EDIT).append(id).toString(), request);
|
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
JshException.writeFail(logger, e);
|
JshException.writeFail(logger, e);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user