重构异常打印的方式

This commit is contained in:
季圣华
2019-09-05 18:20:12 +08:00
parent 59156e5f74
commit 083c870950
26 changed files with 439 additions and 1541 deletions

View File

@@ -0,0 +1,27 @@
package com.jsh.erp.exception;
import com.jsh.erp.constants.ExceptionConstants;
import org.slf4j.Logger;
/**
* 封装日志打印,收集日志
* author: ji shenghua, qq 752718 920
*/
public class JshException {
public static void readFail(Logger logger, Exception e) {
logger.error("异常码[{}],异常提示[{}],异常[{}]",
ExceptionConstants.DATA_READ_FAIL_CODE, ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
}
public static void writeFail(Logger logger, Exception e) {
logger.error("异常码[{}],异常提示[{}],异常[{}]",
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
}
}

View File

@@ -9,6 +9,7 @@ import com.jsh.erp.datasource.mappers.*;
import com.jsh.erp.datasource.vo.AccountVo4InOutList; import com.jsh.erp.datasource.vo.AccountVo4InOutList;
import com.jsh.erp.datasource.vo.AccountVo4List; import com.jsh.erp.datasource.vo.AccountVo4List;
import com.jsh.erp.exception.BusinessRunTimeException; import com.jsh.erp.exception.BusinessRunTimeException;
import com.jsh.erp.exception.JshException;
import com.jsh.erp.service.log.LogService; import com.jsh.erp.service.log.LogService;
import com.jsh.erp.service.user.UserService; import com.jsh.erp.service.user.UserService;
import com.jsh.erp.utils.StringUtil; import com.jsh.erp.utils.StringUtil;
@@ -69,10 +70,7 @@ public class AccountService {
try{ try{
list=accountMapper.selectByExample(example); list=accountMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
@@ -84,10 +82,7 @@ public class AccountService {
try{ try{
list = accountMapperEx.selectByConditionAccount(name, serialNo, remark, offset, rows); list = accountMapperEx.selectByConditionAccount(name, serialNo, remark, offset, rows);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
String timeStr = Tools.getCurrentMonth(); String timeStr = Tools.getCurrentMonth();
if (null != list && null !=timeStr) { if (null != list && null !=timeStr) {
@@ -112,10 +107,7 @@ public class AccountService {
try{ try{
result=accountMapperEx.countsByAccount(name, serialNo, remark); result=accountMapperEx.countsByAccount(name, serialNo, remark);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -131,10 +123,7 @@ public class AccountService {
try{ try{
result = accountMapper.insertSelective(account); result = accountMapper.insertSelective(account);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -147,10 +136,7 @@ public class AccountService {
try{ try{
result = accountMapper.updateByPrimaryKeySelective(account); result = accountMapper.updateByPrimaryKeySelective(account);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -161,10 +147,7 @@ public class AccountService {
try{ try{
result = accountMapper.deleteByPrimaryKey(id); result = accountMapper.deleteByPrimaryKey(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -178,10 +161,7 @@ public class AccountService {
try{ try{
result = accountMapper.deleteByExample(example); result = accountMapper.deleteByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -193,10 +173,7 @@ public class AccountService {
try{ try{
list = accountMapper.selectByExample(example); list = accountMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list==null?0:list.size(); return list==null?0:list.size();
} }
@@ -209,10 +186,7 @@ public class AccountService {
try{ try{
list = accountMapper.selectByExample(example); list = accountMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -247,10 +221,7 @@ public class AccountService {
try{ try{
dataList = depotHeadMapper.selectByExample(example); dataList = depotHeadMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
if (dataList != null) { if (dataList != null) {
for (DepotHead depotHead : dataList) { for (DepotHead depotHead : dataList) {
@@ -296,10 +267,7 @@ public class AccountService {
try{ try{
dataList = accountHeadMapper.selectByExample(example); dataList = accountHeadMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
if (dataList != null) { if (dataList != null) {
for (AccountHead accountHead : dataList) { for (AccountHead accountHead : dataList) {
@@ -340,10 +308,7 @@ public class AccountService {
try{ try{
dataList = accountHeadMapper.selectByExample(example); dataList = accountHeadMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
if (dataList != null) { if (dataList != null) {
String ids = ""; String ids = "";
@@ -411,10 +376,7 @@ public class AccountService {
try{ try{
dataList = depotHeadMapper.selectByExample(example); dataList = depotHeadMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
if (dataList != null) { if (dataList != null) {
for (DepotHead depotHead : dataList) { for (DepotHead depotHead : dataList) {
@@ -442,10 +404,7 @@ public class AccountService {
try{ try{
list = accountMapperEx.findAccountInOutList(accountId, offset, rows); list = accountMapperEx.findAccountInOutList(accountId, offset, rows);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -455,10 +414,7 @@ public class AccountService {
try{ try{
result = accountMapperEx.findAccountInOutListCount(accountId); result = accountMapperEx.findAccountInOutListCount(accountId);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -475,10 +431,7 @@ public class AccountService {
try{ try{
result = accountMapper.updateByExampleSelective(account, example); result = accountMapper.updateByExampleSelective(account, example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -493,10 +446,7 @@ public class AccountService {
try{ try{
result = accountMapperEx.batchDeleteAccountByIds(new Date(),userInfo==null?null:userInfo.getId(),idArray); result = accountMapperEx.batchDeleteAccountByIds(new Date(),userInfo==null?null:userInfo.getId(),idArray);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -530,10 +480,7 @@ public class AccountService {
try{ try{
accountHeadList = accountHeadMapperEx.getAccountHeadListByAccountIds(idArray); accountHeadList = accountHeadMapperEx.getAccountHeadListByAccountIds(idArray);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
if(accountHeadList!=null&&accountHeadList.size()>0){ if(accountHeadList!=null&&accountHeadList.size()>0){
logger.error("异常码[{}],异常提示[{}],参数,AccountIds[{}]", logger.error("异常码[{}],异常提示[{}],参数,AccountIds[{}]",
@@ -548,10 +495,7 @@ public class AccountService {
try{ try{
accountItemList = accountItemMapperEx.getAccountItemListByAccountIds(idArray); accountItemList = accountItemMapperEx.getAccountItemListByAccountIds(idArray);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
if(accountItemList!=null&&accountItemList.size()>0){ if(accountItemList!=null&&accountItemList.size()>0){
logger.error("异常码[{}],异常提示[{}],参数,AccountIds[{}]", logger.error("异常码[{}],异常提示[{}],参数,AccountIds[{}]",
@@ -566,10 +510,7 @@ public class AccountService {
try{ try{
depotHeadList = depotHeadMapperEx.getDepotHeadListByAccountIds(idArray); depotHeadList = depotHeadMapperEx.getDepotHeadListByAccountIds(idArray);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
if(depotHeadList!=null&&depotHeadList.size()>0){ if(depotHeadList!=null&&depotHeadList.size()>0){
logger.error("异常码[{}],异常提示[{}],参数,AccountIds[{}]", logger.error("异常码[{}],异常提示[{}],参数,AccountIds[{}]",

View File

@@ -9,6 +9,7 @@ import com.jsh.erp.datasource.mappers.AccountHeadMapper;
import com.jsh.erp.datasource.mappers.AccountHeadMapperEx; import com.jsh.erp.datasource.mappers.AccountHeadMapperEx;
import com.jsh.erp.datasource.mappers.AccountItemMapperEx; import com.jsh.erp.datasource.mappers.AccountItemMapperEx;
import com.jsh.erp.exception.BusinessRunTimeException; import com.jsh.erp.exception.BusinessRunTimeException;
import com.jsh.erp.exception.JshException;
import com.jsh.erp.service.log.LogService; import com.jsh.erp.service.log.LogService;
import com.jsh.erp.service.user.UserService; import com.jsh.erp.service.user.UserService;
import com.jsh.erp.utils.StringUtil; import com.jsh.erp.utils.StringUtil;
@@ -47,10 +48,7 @@ public class AccountHeadService {
try{ try{
result=accountHeadMapper.selectByPrimaryKey(id); result=accountHeadMapper.selectByPrimaryKey(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -61,10 +59,7 @@ public class AccountHeadService {
try{ try{
list=accountHeadMapper.selectByExample(example); list=accountHeadMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -75,10 +70,7 @@ public class AccountHeadService {
try{ try{
list = accountHeadMapperEx.selectByConditionAccountHead(type, billNo, beginTime, endTime, offset, rows); list = accountHeadMapperEx.selectByConditionAccountHead(type, billNo, beginTime, endTime, offset, rows);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
if (null != list) { if (null != list) {
for (AccountHeadVo4ListEx ah : list) { for (AccountHeadVo4ListEx ah : list) {
@@ -99,10 +91,7 @@ public class AccountHeadService {
try{ try{
result = accountHeadMapperEx.countsByAccountHead(type, billNo, beginTime, endTime); result = accountHeadMapperEx.countsByAccountHead(type, billNo, beginTime, endTime);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -114,10 +103,7 @@ public class AccountHeadService {
try{ try{
result = accountHeadMapper.insertSelective(accountHead); result = accountHeadMapper.insertSelective(accountHead);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -130,10 +116,7 @@ public class AccountHeadService {
try{ try{
result = accountHeadMapper.updateByPrimaryKeySelective(accountHead); result = accountHeadMapper.updateByPrimaryKeySelective(accountHead);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -144,10 +127,7 @@ public class AccountHeadService {
try{ try{
result = accountHeadMapper.deleteByPrimaryKey(id); result = accountHeadMapper.deleteByPrimaryKey(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -161,10 +141,7 @@ public class AccountHeadService {
try{ try{
result = accountHeadMapper.deleteByExample(example); result = accountHeadMapper.deleteByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -176,10 +153,7 @@ public class AccountHeadService {
try{ try{
list = accountHeadMapper.selectByExample(example); list = accountHeadMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list==null?0:list.size(); return list==null?0:list.size();
} }
@@ -189,10 +163,7 @@ public class AccountHeadService {
try{ try{
result = accountHeadMapperEx.getMaxId(); result = accountHeadMapperEx.getMaxId();
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -208,10 +179,7 @@ public class AccountHeadService {
try{ try{
result = accountHeadMapperEx.findAllMoney(supplierId, type, modeName, endTime); result = accountHeadMapperEx.findAllMoney(supplierId, type, modeName, endTime);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -272,10 +240,7 @@ public class AccountHeadService {
try{ try{
list = accountHeadMapperEx.getDetailByNumber(billNo); list = accountHeadMapperEx.getDetailByNumber(billNo);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
if (null != list) { if (null != list) {
for (AccountHeadVo4ListEx ah : list) { for (AccountHeadVo4ListEx ah : list) {
@@ -301,10 +266,7 @@ public class AccountHeadService {
try{ try{
result = accountHeadMapperEx.batchDeleteAccountHeadByIds(new Date(),userInfo==null?null:userInfo.getId(),idArray); result = accountHeadMapperEx.batchDeleteAccountHeadByIds(new Date(),userInfo==null?null:userInfo.getId(),idArray);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -336,10 +298,7 @@ public class AccountHeadService {
try{ try{
accountItemList = accountItemMapperEx.getAccountItemListByHeaderIds(idArray); accountItemList = accountItemMapperEx.getAccountItemListByHeaderIds(idArray);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
if(accountItemList!=null&&accountItemList.size()>0){ if(accountItemList!=null&&accountItemList.size()>0){
logger.error("异常码[{}],异常提示[{}],参数,HeaderIds[{}]", logger.error("异常码[{}],异常提示[{}],参数,HeaderIds[{}]",

View File

@@ -12,6 +12,7 @@ import com.jsh.erp.datasource.mappers.AccountItemMapper;
import com.jsh.erp.datasource.mappers.AccountItemMapperEx; import com.jsh.erp.datasource.mappers.AccountItemMapperEx;
import com.jsh.erp.datasource.vo.AccountItemVo4List; import com.jsh.erp.datasource.vo.AccountItemVo4List;
import com.jsh.erp.exception.BusinessRunTimeException; import com.jsh.erp.exception.BusinessRunTimeException;
import com.jsh.erp.exception.JshException;
import com.jsh.erp.service.log.LogService; import com.jsh.erp.service.log.LogService;
import com.jsh.erp.service.user.UserService; import com.jsh.erp.service.user.UserService;
import com.jsh.erp.utils.ErpInfo; import com.jsh.erp.utils.ErpInfo;
@@ -51,10 +52,7 @@ public class AccountItemService {
try{ try{
result=accountItemMapper.selectByPrimaryKey(id); result=accountItemMapper.selectByPrimaryKey(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -66,10 +64,7 @@ public class AccountItemService {
try{ try{
list=accountItemMapper.selectByExample(example); list=accountItemMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -79,10 +74,7 @@ public class AccountItemService {
try{ try{
list = accountItemMapperEx.selectByConditionAccountItem(name, type, remark, offset, rows); list = accountItemMapperEx.selectByConditionAccountItem(name, type, remark, offset, rows);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -92,10 +84,7 @@ public class AccountItemService {
try{ try{
result = accountItemMapperEx.countsByAccountItem(name, type, remark); result = accountItemMapperEx.countsByAccountItem(name, type, remark);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -107,10 +96,7 @@ public class AccountItemService {
try{ try{
result = accountItemMapper.insertSelective(accountItem); result = accountItemMapper.insertSelective(accountItem);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -123,10 +109,7 @@ public class AccountItemService {
try{ try{
result = accountItemMapper.updateByPrimaryKeySelective(accountItem); result = accountItemMapper.updateByPrimaryKeySelective(accountItem);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -137,10 +120,7 @@ public class AccountItemService {
try{ try{
result = accountItemMapper.deleteByPrimaryKey(id); result = accountItemMapper.deleteByPrimaryKey(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -154,10 +134,7 @@ public class AccountItemService {
try{ try{
result = accountItemMapper.deleteByExample(example); result = accountItemMapper.deleteByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -169,10 +146,7 @@ public class AccountItemService {
try{ try{
list = accountItemMapper.selectByExample(example); list = accountItemMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list==null?0:list.size(); return list==null?0:list.size();
} }
@@ -183,10 +157,7 @@ public class AccountItemService {
try{ try{
result = accountItemMapper.insertSelective(accountItem); result = accountItemMapper.insertSelective(accountItem);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -197,10 +168,7 @@ public class AccountItemService {
try{ try{
result = accountItemMapper.updateByPrimaryKeySelective(accountItem); result = accountItemMapper.updateByPrimaryKeySelective(accountItem);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -210,10 +178,7 @@ public class AccountItemService {
try{ try{
list = accountItemMapperEx.getDetailList(headerId); list = accountItemMapperEx.getDetailList(headerId);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -301,10 +266,7 @@ public class AccountItemService {
try{ try{
result = accountItemMapperEx.batchDeleteAccountItemByIds(new Date(),userInfo==null?null:userInfo.getId(),idArray); result = accountItemMapperEx.batchDeleteAccountItemByIds(new Date(),userInfo==null?null:userInfo.getId(),idArray);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }

View File

@@ -10,6 +10,7 @@ import com.jsh.erp.datasource.entities.UserBusiness;
import com.jsh.erp.datasource.mappers.AppMapper; import com.jsh.erp.datasource.mappers.AppMapper;
import com.jsh.erp.datasource.mappers.AppMapperEx; import com.jsh.erp.datasource.mappers.AppMapperEx;
import com.jsh.erp.exception.BusinessRunTimeException; import com.jsh.erp.exception.BusinessRunTimeException;
import com.jsh.erp.exception.JshException;
import com.jsh.erp.service.log.LogService; import com.jsh.erp.service.log.LogService;
import com.jsh.erp.service.user.UserService; import com.jsh.erp.service.user.UserService;
import com.jsh.erp.service.userBusiness.UserBusinessService; import com.jsh.erp.service.userBusiness.UserBusinessService;
@@ -50,10 +51,7 @@ public class AppService {
try{ try{
list=appMapper.selectByExample(example); list=appMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -73,10 +71,7 @@ public class AppService {
try{ try{
list=appMapper.selectByExample(example); list=appMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -86,10 +81,7 @@ public class AppService {
try{ try{
result=appMapper.selectByPrimaryKey(id); result=appMapper.selectByPrimaryKey(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -101,10 +93,7 @@ public class AppService {
try{ try{
list=appMapper.selectByExample(example); list=appMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -114,10 +103,7 @@ public class AppService {
try{ try{
list=appMapperEx.selectByConditionApp(name, type, offset, rows); list=appMapperEx.selectByConditionApp(name, type, offset, rows);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -127,10 +113,7 @@ public class AppService {
try{ try{
result=appMapperEx.countsByApp(name, type); result=appMapperEx.countsByApp(name, type);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -142,10 +125,7 @@ public class AppService {
try{ try{
result=appMapper.insertSelective(app); result=appMapper.insertSelective(app);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -158,10 +138,7 @@ public class AppService {
try{ try{
result=appMapper.updateByPrimaryKeySelective(app); result=appMapper.updateByPrimaryKeySelective(app);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -172,10 +149,7 @@ public class AppService {
try{ try{
result=appMapper.deleteByPrimaryKey(id); result=appMapper.deleteByPrimaryKey(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -189,10 +163,7 @@ public class AppService {
try{ try{
result=appMapper.deleteByExample(example); result=appMapper.deleteByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -205,10 +176,7 @@ public class AppService {
try{ try{
list=appMapper.selectByExample(example); list=appMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -223,10 +191,7 @@ public class AppService {
try{ try{
list=appMapper.selectByExample(example); list=appMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -241,10 +206,7 @@ public class AppService {
try{ try{
result=appMapperEx.batchDeleteAppByIds(new Date(),userInfo==null?null:userInfo.getId(),idArray); result=appMapperEx.batchDeleteAppByIds(new Date(),userInfo==null?null:userInfo.getId(),idArray);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -285,10 +247,7 @@ public class AppService {
try{ try{
list=appMapper.selectByExample(example); list=appMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }

View File

@@ -7,6 +7,7 @@ import com.jsh.erp.constants.ExceptionConstants;
import com.jsh.erp.datasource.entities.*; import com.jsh.erp.datasource.entities.*;
import com.jsh.erp.datasource.mappers.*; import com.jsh.erp.datasource.mappers.*;
import com.jsh.erp.exception.BusinessRunTimeException; import com.jsh.erp.exception.BusinessRunTimeException;
import com.jsh.erp.exception.JshException;
import com.jsh.erp.service.log.LogService; import com.jsh.erp.service.log.LogService;
import com.jsh.erp.service.user.UserService; import com.jsh.erp.service.user.UserService;
import com.jsh.erp.utils.StringUtil; import com.jsh.erp.utils.StringUtil;
@@ -46,10 +47,7 @@ public class DepotService {
try{ try{
result=depotMapper.selectByPrimaryKey(id); result=depotMapper.selectByPrimaryKey(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -61,10 +59,7 @@ public class DepotService {
try{ try{
list=depotMapper.selectByExample(example); list=depotMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -77,10 +72,7 @@ public class DepotService {
try{ try{
list=depotMapper.selectByExample(example); list=depotMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -90,10 +82,7 @@ public class DepotService {
try{ try{
list=depotMapperEx.selectByConditionDepot(name, type, remark, offset, rows); list=depotMapperEx.selectByConditionDepot(name, type, remark, offset, rows);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -103,10 +92,7 @@ public class DepotService {
try{ try{
result=depotMapperEx.countsByDepot(name, type, remark); result=depotMapperEx.countsByDepot(name, type, remark);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -118,10 +104,7 @@ public class DepotService {
try{ try{
result=depotMapper.insertSelective(depot); result=depotMapper.insertSelective(depot);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -134,10 +117,7 @@ public class DepotService {
try{ try{
result= depotMapper.updateByPrimaryKeySelective(depot); result= depotMapper.updateByPrimaryKeySelective(depot);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -148,10 +128,7 @@ public class DepotService {
try{ try{
result= depotMapper.deleteByPrimaryKey(id); result= depotMapper.deleteByPrimaryKey(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -165,10 +142,7 @@ public class DepotService {
try{ try{
result= depotMapper.deleteByExample(example); result= depotMapper.deleteByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -180,10 +154,7 @@ public class DepotService {
try{ try{
list= depotMapper.selectByExample(example); list= depotMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list==null?0:list.size(); return list==null?0:list.size();
} }
@@ -196,10 +167,7 @@ public class DepotService {
try{ try{
list= depotMapper.selectByExample(example); list= depotMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -212,10 +180,7 @@ public class DepotService {
try{ try{
list= depotMapper.selectByExample(example); list= depotMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -225,10 +190,7 @@ public class DepotService {
try{ try{
list= depotMapperEx.getDepotList(parameterMap); list= depotMapperEx.getDepotList(parameterMap);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -243,10 +205,7 @@ public class DepotService {
try{ try{
result= depotMapperEx.batchDeleteDepotByIds(new Date(),userInfo==null?null:userInfo.getId(),idArray); result= depotMapperEx.batchDeleteDepotByIds(new Date(),userInfo==null?null:userInfo.getId(),idArray);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -280,10 +239,7 @@ public class DepotService {
try{ try{
depotHeadList= depotHeadMapperEx.getDepotHeadListByDepotIds(idArray); depotHeadList= depotHeadMapperEx.getDepotHeadListByDepotIds(idArray);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
if(depotHeadList!=null&&depotHeadList.size()>0){ if(depotHeadList!=null&&depotHeadList.size()>0){
logger.error("异常码[{}],异常提示[{}],参数,DepotIds[{}]", logger.error("异常码[{}],异常提示[{}],参数,DepotIds[{}]",
@@ -298,10 +254,7 @@ public class DepotService {
try{ try{
depotItemList= depotItemMapperEx.getDepotItemListListByDepotIds(idArray); depotItemList= depotItemMapperEx.getDepotItemListListByDepotIds(idArray);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
if(depotItemList!=null&&depotItemList.size()>0){ if(depotItemList!=null&&depotItemList.size()>0){
logger.error("异常码[{}],异常提示[{}],参数,DepotIds[{}]", logger.error("异常码[{}],异常提示[{}],参数,DepotIds[{}]",
@@ -329,10 +282,7 @@ public class DepotService {
try{ try{
result = depotMapper.updateByExampleSelective(depot, example); result = depotMapper.updateByExampleSelective(depot, example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }

View File

@@ -15,6 +15,7 @@ import com.jsh.erp.datasource.vo.DepotHeadVo4InOutMCount;
import com.jsh.erp.datasource.vo.DepotHeadVo4List; import com.jsh.erp.datasource.vo.DepotHeadVo4List;
import com.jsh.erp.datasource.vo.DepotHeadVo4StatementAccount; import com.jsh.erp.datasource.vo.DepotHeadVo4StatementAccount;
import com.jsh.erp.exception.BusinessRunTimeException; import com.jsh.erp.exception.BusinessRunTimeException;
import com.jsh.erp.exception.JshException;
import com.jsh.erp.service.depotItem.DepotItemService; import com.jsh.erp.service.depotItem.DepotItemService;
import com.jsh.erp.service.log.LogService; import com.jsh.erp.service.log.LogService;
import com.jsh.erp.service.serialNumber.SerialNumberService; import com.jsh.erp.service.serialNumber.SerialNumberService;
@@ -65,10 +66,7 @@ public class DepotHeadService {
try{ try{
result=depotHeadMapper.selectByPrimaryKey(id); result=depotHeadMapper.selectByPrimaryKey(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -80,10 +78,7 @@ public class DepotHeadService {
try{ try{
list=depotHeadMapper.selectByExample(example); list=depotHeadMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -95,10 +90,7 @@ public class DepotHeadService {
try{ try{
list=depotHeadMapperEx.selectByConditionDepotHead(type, subType, number, beginTime, endTime, materialParam, depotIds, offset, rows); list=depotHeadMapperEx.selectByConditionDepotHead(type, subType, number, beginTime, endTime, materialParam, depotIds, offset, rows);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
if (null != list) { if (null != list) {
for (DepotHeadVo4List dh : list) { for (DepotHeadVo4List dh : list) {
@@ -134,10 +126,7 @@ public class DepotHeadService {
try{ try{
result=depotHeadMapperEx.countsByDepotHead(type, subType, number, beginTime, endTime, materialParam, depotIds); result=depotHeadMapperEx.countsByDepotHead(type, subType, number, beginTime, endTime, materialParam, depotIds);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -158,10 +147,7 @@ public class DepotHeadService {
try{ try{
result=depotHeadMapper.insert(depotHead); result=depotHeadMapper.insert(depotHead);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -172,10 +158,7 @@ public class DepotHeadService {
try{ try{
dh = depotHeadMapper.selectByPrimaryKey(id); dh = depotHeadMapper.selectByPrimaryKey(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
DepotHead depotHead = JSONObject.parseObject(beanJson, DepotHead.class); DepotHead depotHead = JSONObject.parseObject(beanJson, DepotHead.class);
depotHead.setId(id); depotHead.setId(id);
@@ -186,10 +169,7 @@ public class DepotHeadService {
try{ try{
result = depotHeadMapper.updateByPrimaryKey(depotHead); result = depotHeadMapper.updateByPrimaryKey(depotHead);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -200,10 +180,7 @@ public class DepotHeadService {
try{ try{
result = depotHeadMapper.deleteByPrimaryKey(id); result = depotHeadMapper.deleteByPrimaryKey(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -217,10 +194,7 @@ public class DepotHeadService {
try{ try{
result = depotHeadMapper.deleteByExample(example); result = depotHeadMapper.deleteByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -232,10 +206,7 @@ public class DepotHeadService {
try{ try{
list = depotHeadMapper.selectByExample(example); list = depotHeadMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list==null?0:list.size(); return list==null?0:list.size();
} }
@@ -254,10 +225,7 @@ public class DepotHeadService {
try{ try{
result = depotHeadMapper.updateByExampleSelective(depotHead, example); result = depotHeadMapper.updateByExampleSelective(depotHead, example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -272,10 +240,7 @@ public class DepotHeadService {
depotHeadMapperEx.updateBuildOnlyNumber(); //编号+1 depotHeadMapperEx.updateBuildOnlyNumber(); //编号+1
buildOnlyNumber= depotHeadMapperEx.getBuildOnlyNumber(BusinessConstants.DEPOT_NUMBER_SEQ); buildOnlyNumber= depotHeadMapperEx.getBuildOnlyNumber(BusinessConstants.DEPOT_NUMBER_SEQ);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
} }
if(buildOnlyNumber<BusinessConstants.SEQ_TO_STRING_MIN_LENGTH){ if(buildOnlyNumber<BusinessConstants.SEQ_TO_STRING_MIN_LENGTH){
@@ -295,10 +260,7 @@ public class DepotHeadService {
try{ try{
result = depotHeadMapperEx.getMaxId(); result = depotHeadMapperEx.getMaxId();
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -308,10 +270,7 @@ public class DepotHeadService {
try{ try{
result = depotHeadMapperEx.findMaterialsListByHeaderId(id); result = depotHeadMapperEx.findMaterialsListByHeaderId(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -325,10 +284,7 @@ public class DepotHeadService {
try{ try{
list = depotHeadMapper.selectByExample(example); list = depotHeadMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -342,10 +298,7 @@ public class DepotHeadService {
try{ try{
list =depotHeadMapper.selectByExample(example); list =depotHeadMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -355,10 +308,7 @@ public class DepotHeadService {
try{ try{
list =depotHeadMapperEx.findByAll(beginTime, endTime, type, pid, dids, oId, offset, rows); list =depotHeadMapperEx.findByAll(beginTime, endTime, type, pid, dids, oId, offset, rows);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -368,10 +318,7 @@ public class DepotHeadService {
try{ try{
result =depotHeadMapperEx.findByAllCount(beginTime, endTime, type, pid, dids, oId); result =depotHeadMapperEx.findByAllCount(beginTime, endTime, type, pid, dids, oId);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -381,10 +328,7 @@ public class DepotHeadService {
try{ try{
list =depotHeadMapperEx.findInOutMaterialCount(beginTime, endTime, type, pid, dids, oId, offset, rows); list =depotHeadMapperEx.findInOutMaterialCount(beginTime, endTime, type, pid, dids, oId, offset, rows);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -394,10 +338,7 @@ public class DepotHeadService {
try{ try{
result =depotHeadMapperEx.findInOutMaterialCountTotal(beginTime, endTime, type, pid, dids, oId); result =depotHeadMapperEx.findInOutMaterialCountTotal(beginTime, endTime, type, pid, dids, oId);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -407,10 +348,7 @@ public class DepotHeadService {
try{ try{
list =depotHeadMapperEx.findStatementAccount(beginTime, endTime, organId, supType, offset, rows); list =depotHeadMapperEx.findStatementAccount(beginTime, endTime, organId, supType, offset, rows);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -420,10 +358,7 @@ public class DepotHeadService {
try{ try{
result =depotHeadMapperEx.findStatementAccountCount(beginTime, endTime, organId, supType); result =depotHeadMapperEx.findStatementAccountCount(beginTime, endTime, organId, supType);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -439,10 +374,7 @@ public class DepotHeadService {
try{ try{
result =depotHeadMapperEx.findAllMoney(supplierId, type, subType, modeName, endTime); result =depotHeadMapperEx.findAllMoney(supplierId, type, subType, modeName, endTime);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -503,10 +435,7 @@ public class DepotHeadService {
try{ try{
list = depotHeadMapperEx.getDetailByNumber(number); list = depotHeadMapperEx.getDetailByNumber(number);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
if (null != list) { if (null != list) {
for (DepotHeadVo4List dh : list) { for (DepotHeadVo4List dh : list) {
@@ -558,10 +487,7 @@ public class DepotHeadService {
try{ try{
depotHeadMapperEx.adddepotHead(depotHead); depotHeadMapperEx.adddepotHead(depotHead);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
/**入库和出库处理预付款信息*/ /**入库和出库处理预付款信息*/
@@ -581,10 +507,7 @@ public class DepotHeadService {
try{ try{
depotHeadMapper.updateByExampleSelective(depotHeadOrders, example); depotHeadMapper.updateByExampleSelective(depotHeadOrders, example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
} }
} }
@@ -616,10 +539,7 @@ public class DepotHeadService {
try{ try{
depotHeadMapperEx.updatedepotHead(depotHead); depotHeadMapperEx.updatedepotHead(depotHead);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
/**入库和出库处理预付款信息*/ /**入库和出库处理预付款信息*/
if(BusinessConstants.PAY_TYPE_PREPAID.equals(depotHead.getPaytype())){ if(BusinessConstants.PAY_TYPE_PREPAID.equals(depotHead.getPaytype())){
@@ -655,10 +575,7 @@ public class DepotHeadService {
try{ try{
depotItemList = depotItemMapperEx.findDepotItemListBydepotheadId(id,BusinessConstants.ENABLE_SERIAL_NUMBER_ENABLED); depotItemList = depotItemMapperEx.findDepotItemListBydepotheadId(id,BusinessConstants.ENABLE_SERIAL_NUMBER_ENABLED);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
/**回收序列号*/ /**回收序列号*/
@@ -673,10 +590,7 @@ public class DepotHeadService {
try{ try{
depotItemMapperEx.batchDeleteDepotItemByDepotHeadIds(new Long []{id}); depotItemMapperEx.batchDeleteDepotItemByDepotHeadIds(new Long []{id});
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
/**删除单据主表信息*/ /**删除单据主表信息*/
@@ -713,10 +627,7 @@ public class DepotHeadService {
try{ try{
result = depotHeadMapperEx.batchDeleteDepotHeadByIds(new Date(),userInfo==null?null:userInfo.getId(),idArray); result = depotHeadMapperEx.batchDeleteDepotHeadByIds(new Date(),userInfo==null?null:userInfo.getId(),idArray);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }

View File

@@ -11,6 +11,7 @@ import com.jsh.erp.datasource.mappers.DepotItemMapperEx;
import com.jsh.erp.datasource.mappers.SerialNumberMapperEx; import com.jsh.erp.datasource.mappers.SerialNumberMapperEx;
import com.jsh.erp.datasource.vo.DepotItemStockWarningCount; import com.jsh.erp.datasource.vo.DepotItemStockWarningCount;
import com.jsh.erp.exception.BusinessRunTimeException; import com.jsh.erp.exception.BusinessRunTimeException;
import com.jsh.erp.exception.JshException;
import com.jsh.erp.service.log.LogService; import com.jsh.erp.service.log.LogService;
import com.jsh.erp.service.material.MaterialService; import com.jsh.erp.service.material.MaterialService;
import com.jsh.erp.service.serialNumber.SerialNumberService; import com.jsh.erp.service.serialNumber.SerialNumberService;
@@ -62,10 +63,7 @@ public class DepotItemService {
try{ try{
result=depotItemMapper.selectByPrimaryKey(id); result=depotItemMapper.selectByPrimaryKey(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -77,10 +75,7 @@ public class DepotItemService {
try{ try{
list=depotItemMapper.selectByExample(example); list=depotItemMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -90,10 +85,7 @@ public class DepotItemService {
try{ try{
list=depotItemMapperEx.selectByConditionDepotItem(name, type, remark, offset, rows); list=depotItemMapperEx.selectByConditionDepotItem(name, type, remark, offset, rows);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -103,10 +95,7 @@ public class DepotItemService {
try{ try{
result=depotItemMapperEx.countsByDepotItem(name, type, remark); result=depotItemMapperEx.countsByDepotItem(name, type, remark);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -118,10 +107,7 @@ public class DepotItemService {
try{ try{
result=depotItemMapper.insertSelective(depotItem); result=depotItemMapper.insertSelective(depotItem);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -134,10 +120,7 @@ public class DepotItemService {
try{ try{
result=depotItemMapper.updateByPrimaryKeySelective(depotItem); result=depotItemMapper.updateByPrimaryKeySelective(depotItem);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -148,10 +131,7 @@ public class DepotItemService {
try{ try{
result=depotItemMapper.deleteByPrimaryKey(id); result=depotItemMapper.deleteByPrimaryKey(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -165,10 +145,7 @@ public class DepotItemService {
try{ try{
result=depotItemMapper.deleteByExample(example); result=depotItemMapper.deleteByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -180,10 +157,7 @@ public class DepotItemService {
try{ try{
list=depotItemMapper.selectByExample(example); list=depotItemMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list==null?0:list.size(); return list==null?0:list.size();
} }
@@ -198,10 +172,7 @@ public class DepotItemService {
try{ try{
list = depotItemMapperEx.findDetailByTypeAndMaterialIdList(mId, QueryUtils.offset(map), QueryUtils.rows(map)); list = depotItemMapperEx.findDetailByTypeAndMaterialIdList(mId, QueryUtils.offset(map), QueryUtils.rows(map));
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -216,10 +187,7 @@ public class DepotItemService {
try{ try{
result = depotItemMapperEx.findDetailByTypeAndMaterialIdCounts(mId); result = depotItemMapperEx.findDetailByTypeAndMaterialIdCounts(mId);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -235,10 +203,7 @@ public class DepotItemService {
try{ try{
list = depotItemMapperEx.findStockNumByMaterialIdList(mId, monthTime, QueryUtils.offset(map), QueryUtils.rows(map)); list = depotItemMapperEx.findStockNumByMaterialIdList(mId, monthTime, QueryUtils.offset(map), QueryUtils.rows(map));
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -254,10 +219,7 @@ public class DepotItemService {
try{ try{
result = depotItemMapperEx.findStockNumByMaterialIdCounts(mId, monthTime); result = depotItemMapperEx.findStockNumByMaterialIdCounts(mId, monthTime);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -268,10 +230,7 @@ public class DepotItemService {
try{ try{
result = depotItemMapper.insertSelective(depotItem); result = depotItemMapper.insertSelective(depotItem);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -282,12 +241,9 @@ public class DepotItemService {
try{ try{
result = depotItemMapper.updateByPrimaryKeySelective(depotItem); result = depotItemMapper.updateByPrimaryKeySelective(depotItem);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return depotItemMapper.updateByPrimaryKeySelective(depotItem); return result;
} }
public Long findByTypeAndMaterialId(String type, Long mId) throws Exception{ public Long findByTypeAndMaterialId(String type, Long mId) throws Exception{
@@ -299,10 +255,7 @@ public class DepotItemService {
result= depotItemMapperEx.findByTypeAndMaterialIdOut(mId); result= depotItemMapperEx.findByTypeAndMaterialIdOut(mId);
} }
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -320,10 +273,7 @@ public class DepotItemService {
try{ try{
list = depotItemMapperEx.getDetailList(headerId); list = depotItemMapperEx.getDetailList(headerId);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -333,10 +283,7 @@ public class DepotItemService {
try{ try{
list = depotItemMapperEx.findByAll(headIds, materialIds, offset, rows); list = depotItemMapperEx.findByAll(headIds, materialIds, offset, rows);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -346,10 +293,7 @@ public class DepotItemService {
try{ try{
result = depotItemMapperEx.findByAllCount(headIds, materialIds); result = depotItemMapperEx.findByAllCount(headIds, materialIds);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -371,10 +315,7 @@ public class DepotItemService {
} }
} }
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
@@ -397,10 +338,7 @@ public class DepotItemService {
} }
} }
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
@@ -415,10 +353,7 @@ public class DepotItemService {
result= depotItemMapperEx.findAssembleIsNotPrev(subType, mType, ProjectId, MId, MonthTime); result= depotItemMapperEx.findAssembleIsNotPrev(subType, mType, ProjectId, MId, MonthTime);
} }
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
@@ -433,10 +368,7 @@ public class DepotItemService {
result= depotItemMapperEx.buyOrSalePrice(type, subType, MId, MonthTime, sumType); result= depotItemMapperEx.buyOrSalePrice(type, subType, MId, MonthTime, sumType);
} }
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
@@ -457,10 +389,7 @@ public class DepotItemService {
try{ try{
depotHead =depotHeadMapper.selectByPrimaryKey(headerId); depotHead =depotHeadMapper.selectByPrimaryKey(headerId);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
//获得当前操作人 //获得当前操作人
User userInfo=userService.getCurrentUser(); User userInfo=userService.getCurrentUser();
@@ -780,10 +709,7 @@ public class DepotItemService {
try{ try{
result =depotItemMapperEx.batchDeleteDepotItemByIds(new Date(),userInfo==null?null:userInfo.getId(),idArray); result =depotItemMapperEx.batchDeleteDepotItemByIds(new Date(),userInfo==null?null:userInfo.getId(),idArray);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -795,10 +721,7 @@ public class DepotItemService {
try{ try{
list =depotItemMapperEx.findStockWarningCount( offset, rows, pid); list =depotItemMapperEx.findStockWarningCount( offset, rows, pid);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -808,10 +731,7 @@ public class DepotItemService {
try{ try{
result =depotItemMapperEx.findStockWarningCountTotal(pid); result =depotItemMapperEx.findStockWarningCountTotal(pid);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }

View File

@@ -10,6 +10,7 @@ import com.jsh.erp.datasource.entities.User;
import com.jsh.erp.datasource.mappers.FunctionsMapper; import com.jsh.erp.datasource.mappers.FunctionsMapper;
import com.jsh.erp.datasource.mappers.FunctionsMapperEx; import com.jsh.erp.datasource.mappers.FunctionsMapperEx;
import com.jsh.erp.exception.BusinessRunTimeException; import com.jsh.erp.exception.BusinessRunTimeException;
import com.jsh.erp.exception.JshException;
import com.jsh.erp.service.log.LogService; import com.jsh.erp.service.log.LogService;
import com.jsh.erp.service.user.UserService; import com.jsh.erp.service.user.UserService;
import com.jsh.erp.utils.StringUtil; import com.jsh.erp.utils.StringUtil;
@@ -44,10 +45,7 @@ public class FunctionsService {
try{ try{
result=functionsMapper.selectByPrimaryKey(id); result=functionsMapper.selectByPrimaryKey(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -59,10 +57,7 @@ public class FunctionsService {
try{ try{
list=functionsMapper.selectByExample(example); list=functionsMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -72,10 +67,7 @@ public class FunctionsService {
try{ try{
list=functionsMapperEx.selectByConditionFunctions(name, type, offset, rows); list=functionsMapperEx.selectByConditionFunctions(name, type, offset, rows);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -85,10 +77,7 @@ public class FunctionsService {
try{ try{
result=functionsMapperEx.countsByFunctions(name, type); result=functionsMapperEx.countsByFunctions(name, type);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -100,10 +89,7 @@ public class FunctionsService {
try{ try{
result=functionsMapper.insertSelective(depot); result=functionsMapper.insertSelective(depot);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -116,10 +102,7 @@ public class FunctionsService {
try{ try{
result=functionsMapper.updateByPrimaryKeySelective(depot); result=functionsMapper.updateByPrimaryKeySelective(depot);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -130,10 +113,7 @@ public class FunctionsService {
try{ try{
result=functionsMapper.deleteByPrimaryKey(id); result=functionsMapper.deleteByPrimaryKey(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -147,10 +127,7 @@ public class FunctionsService {
try{ try{
result=functionsMapper.deleteByExample(example); result=functionsMapper.deleteByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -162,10 +139,7 @@ public class FunctionsService {
try{ try{
list = functionsMapper.selectByExample(example); list = functionsMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list==null?0:list.size(); return list==null?0:list.size();
} }
@@ -179,10 +153,7 @@ public class FunctionsService {
try{ try{
list = functionsMapper.selectByExample(example); list = functionsMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -196,10 +167,7 @@ public class FunctionsService {
try{ try{
list =functionsMapper.selectByExample(example); list =functionsMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -214,10 +182,7 @@ public class FunctionsService {
try{ try{
list =functionsMapper.selectByExample(example); list =functionsMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -233,10 +198,7 @@ public class FunctionsService {
try{ try{
result =functionsMapperEx.batchDeleteFunctionsByIds(new Date(),userInfo==null?null:userInfo.getId(),idArray); result =functionsMapperEx.batchDeleteFunctionsByIds(new Date(),userInfo==null?null:userInfo.getId(),idArray);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }

View File

@@ -9,6 +9,7 @@ import com.jsh.erp.datasource.mappers.AccountItemMapperEx;
import com.jsh.erp.datasource.mappers.InOutItemMapper; import com.jsh.erp.datasource.mappers.InOutItemMapper;
import com.jsh.erp.datasource.mappers.InOutItemMapperEx; import com.jsh.erp.datasource.mappers.InOutItemMapperEx;
import com.jsh.erp.exception.BusinessRunTimeException; import com.jsh.erp.exception.BusinessRunTimeException;
import com.jsh.erp.exception.JshException;
import com.jsh.erp.service.log.LogService; import com.jsh.erp.service.log.LogService;
import com.jsh.erp.service.user.UserService; import com.jsh.erp.service.user.UserService;
import com.jsh.erp.utils.StringUtil; import com.jsh.erp.utils.StringUtil;
@@ -45,10 +46,7 @@ public class InOutItemService {
try{ try{
result=inOutItemMapper.selectByPrimaryKey(id); result=inOutItemMapper.selectByPrimaryKey(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -60,10 +58,7 @@ public class InOutItemService {
try{ try{
list=inOutItemMapper.selectByExample(example); list=inOutItemMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -73,10 +68,7 @@ public class InOutItemService {
try{ try{
list=inOutItemMapperEx.selectByConditionInOutItem(name, type, remark, offset, rows); list=inOutItemMapperEx.selectByConditionInOutItem(name, type, remark, offset, rows);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -86,10 +78,7 @@ public class InOutItemService {
try{ try{
result=inOutItemMapperEx.countsByInOutItem(name, type, remark); result=inOutItemMapperEx.countsByInOutItem(name, type, remark);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -101,10 +90,7 @@ public class InOutItemService {
try{ try{
result=inOutItemMapper.insertSelective(depot); result=inOutItemMapper.insertSelective(depot);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -117,10 +103,7 @@ public class InOutItemService {
try{ try{
result=inOutItemMapper.updateByPrimaryKeySelective(depot); result=inOutItemMapper.updateByPrimaryKeySelective(depot);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -131,10 +114,7 @@ public class InOutItemService {
try{ try{
result=inOutItemMapper.deleteByPrimaryKey(id); result=inOutItemMapper.deleteByPrimaryKey(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -148,10 +128,7 @@ public class InOutItemService {
try{ try{
result=inOutItemMapper.deleteByExample(example); result=inOutItemMapper.deleteByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -163,10 +140,7 @@ public class InOutItemService {
try{ try{
list=inOutItemMapper.selectByExample(example); list=inOutItemMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list==null?0:list.size(); return list==null?0:list.size();
@@ -184,10 +158,7 @@ public class InOutItemService {
try{ try{
list=inOutItemMapper.selectByExample(example); list=inOutItemMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -202,10 +173,7 @@ public class InOutItemService {
try{ try{
result=inOutItemMapperEx.batchDeleteInOutItemByIds(new Date(),userInfo==null?null:userInfo.getId(),idArray); result=inOutItemMapperEx.batchDeleteInOutItemByIds(new Date(),userInfo==null?null:userInfo.getId(),idArray);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -237,10 +205,7 @@ public class InOutItemService {
try{ try{
accountItemList=accountItemMapperEx.getAccountItemListByInOutItemIds(idArray); accountItemList=accountItemMapperEx.getAccountItemListByInOutItemIds(idArray);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
if(accountItemList!=null&&accountItemList.size()>0){ if(accountItemList!=null&&accountItemList.size()>0){
logger.error("异常码[{}],异常提示[{}],参数,InOutItemIds[{}]", logger.error("异常码[{}],异常提示[{}],参数,InOutItemIds[{}]",

View File

@@ -10,6 +10,7 @@ import com.jsh.erp.datasource.mappers.LogMapper;
import com.jsh.erp.datasource.mappers.LogMapperEx; import com.jsh.erp.datasource.mappers.LogMapperEx;
import com.jsh.erp.datasource.vo.LogVo4List; import com.jsh.erp.datasource.vo.LogVo4List;
import com.jsh.erp.exception.BusinessRunTimeException; import com.jsh.erp.exception.BusinessRunTimeException;
import com.jsh.erp.exception.JshException;
import com.jsh.erp.utils.StringUtil; import com.jsh.erp.utils.StringUtil;
import com.jsh.erp.utils.Tools; import com.jsh.erp.utils.Tools;
import org.slf4j.Logger; import org.slf4j.Logger;
@@ -38,10 +39,7 @@ public class LogService {
try{ try{
result=logMapper.selectByPrimaryKey(id); result=logMapper.selectByPrimaryKey(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -52,10 +50,7 @@ public class LogService {
try{ try{
list=logMapper.selectByExample(example); list=logMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -72,10 +67,7 @@ public class LogService {
} }
} }
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -86,10 +78,7 @@ public class LogService {
try{ try{
result=logMapperEx.countsByLog(operation, usernameID, clientIp, status, beginTime, endTime, contentdetails); result=logMapperEx.countsByLog(operation, usernameID, clientIp, status, beginTime, endTime, contentdetails);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -101,10 +90,7 @@ public class LogService {
try{ try{
result=logMapper.insertSelective(log); result=logMapper.insertSelective(log);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -117,10 +103,7 @@ public class LogService {
try{ try{
result=logMapper.updateByPrimaryKeySelective(log); result=logMapper.updateByPrimaryKeySelective(log);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -131,10 +114,7 @@ public class LogService {
try{ try{
result=logMapper.deleteByPrimaryKey(id); result=logMapper.deleteByPrimaryKey(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -148,10 +128,7 @@ public class LogService {
try{ try{
result=logMapper.deleteByExample(example); result=logMapper.deleteByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -233,10 +210,7 @@ public class LogService {
try{ try{
logMapper.insertSelective(log); logMapper.insertSelective(log);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
} }

View File

@@ -9,6 +9,7 @@ import com.jsh.erp.datasource.mappers.DepotItemMapperEx;
import com.jsh.erp.datasource.mappers.MaterialMapper; import com.jsh.erp.datasource.mappers.MaterialMapper;
import com.jsh.erp.datasource.mappers.MaterialMapperEx; import com.jsh.erp.datasource.mappers.MaterialMapperEx;
import com.jsh.erp.exception.BusinessRunTimeException; import com.jsh.erp.exception.BusinessRunTimeException;
import com.jsh.erp.exception.JshException;
import com.jsh.erp.service.depotItem.DepotItemService; import com.jsh.erp.service.depotItem.DepotItemService;
import com.jsh.erp.service.log.LogService; import com.jsh.erp.service.log.LogService;
import com.jsh.erp.service.user.UserService; import com.jsh.erp.service.user.UserService;
@@ -47,10 +48,7 @@ public class MaterialService {
try{ try{
result=materialMapper.selectByPrimaryKey(id); result=materialMapper.selectByPrimaryKey(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -62,10 +60,7 @@ public class MaterialService {
try{ try{
list=materialMapper.selectByExample(example); list=materialMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -78,10 +73,7 @@ public class MaterialService {
try{ try{
list= materialMapperEx.selectByConditionMaterial(name, model,categoryIds,mpList, offset, rows); list= materialMapperEx.selectByConditionMaterial(name, model,categoryIds,mpList, offset, rows);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
if (null != list) { if (null != list) {
for (MaterialVo4Unit m : list) { for (MaterialVo4Unit m : list) {
@@ -122,10 +114,7 @@ public class MaterialService {
try{ try{
result= materialMapperEx.countsByMaterial(name, model,categoryIds,mpList); result= materialMapperEx.countsByMaterial(name, model,categoryIds,mpList);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -138,10 +127,7 @@ public class MaterialService {
try{ try{
result= materialMapper.insertSelective(material); result= materialMapper.insertSelective(material);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -160,10 +146,7 @@ public class MaterialService {
materialMapperEx.updateUnitIdNullByPrimaryKey(id); //将多单位置空 materialMapperEx.updateUnitIdNullByPrimaryKey(id); //将多单位置空
} }
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return res; return res;
@@ -175,10 +158,7 @@ public class MaterialService {
try{ try{
result= materialMapper.deleteByPrimaryKey(id); result= materialMapper.deleteByPrimaryKey(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -192,10 +172,7 @@ public class MaterialService {
try{ try{
result= materialMapper.deleteByExample(example); result= materialMapper.deleteByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -207,10 +184,7 @@ public class MaterialService {
try{ try{
list= materialMapper.selectByExample(example); list= materialMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list==null?0:list.size(); return list==null?0:list.size();
} }
@@ -235,10 +209,7 @@ public class MaterialService {
try{ try{
list= materialMapper.selectByExample(example); list= materialMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list==null?0:list.size(); return list==null?0:list.size();
} }
@@ -257,10 +228,7 @@ public class MaterialService {
try{ try{
result= materialMapper.updateByExampleSelective(material, example); result= materialMapper.updateByExampleSelective(material, example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -270,10 +238,7 @@ public class MaterialService {
try{ try{
result= materialMapperEx.findUnitName(mId); result= materialMapperEx.findUnitName(mId);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -283,10 +248,7 @@ public class MaterialService {
try{ try{
list= materialMapperEx.findById(id); list= materialMapperEx.findById(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -296,10 +258,7 @@ public class MaterialService {
try{ try{
list= materialMapperEx.findBySelect(); list= materialMapperEx.findBySelect();
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -312,10 +271,7 @@ public class MaterialService {
try{ try{
list= materialMapper.selectByExample(example); list= materialMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -326,10 +282,7 @@ public class MaterialService {
try{ try{
list= materialMapperEx.findByAll(name, model, categoryIds); list= materialMapperEx.findByAll(name, model, categoryIds);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
if (null != list) { if (null != list) {
for (MaterialVo4Unit m : list) { for (MaterialVo4Unit m : list) {
@@ -352,8 +305,7 @@ public class MaterialService {
info.code = 200; info.code = 200;
data.put("message", "成功"); data.put("message", "成功");
} catch (Exception e) { } catch (Exception e) {
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
e.printStackTrace(); e.printStackTrace();
info.code = 500; info.code = 500;
data.put("message", e.getMessage()); data.put("message", e.getMessage());
@@ -367,10 +319,7 @@ public class MaterialService {
try{ try{
list= materialMapperEx.getMaterialEnableSerialNumberList(parameterMap); list= materialMapperEx.getMaterialEnableSerialNumberList(parameterMap);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -385,10 +334,7 @@ public class MaterialService {
try{ try{
result= materialMapperEx.batchDeleteMaterialByIds(new Date(),userInfo==null?null:userInfo.getId(),idArray); result= materialMapperEx.batchDeleteMaterialByIds(new Date(),userInfo==null?null:userInfo.getId(),idArray);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -421,10 +367,7 @@ public class MaterialService {
try{ try{
depotItemList= depotItemMapperEx.getDepotItemListListByMaterialIds(idArray); depotItemList= depotItemMapperEx.getDepotItemListListByMaterialIds(idArray);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
if(depotItemList!=null&&depotItemList.size()>0){ if(depotItemList!=null&&depotItemList.size()>0){
logger.error("异常码[{}],异常提示[{}],参数,MaterialIds[{}]", logger.error("异常码[{}],异常提示[{}],参数,MaterialIds[{}]",

View File

@@ -10,6 +10,7 @@ import com.jsh.erp.datasource.mappers.MaterialCategoryMapperEx;
import com.jsh.erp.datasource.mappers.MaterialMapperEx; import com.jsh.erp.datasource.mappers.MaterialMapperEx;
import com.jsh.erp.datasource.vo.TreeNode; import com.jsh.erp.datasource.vo.TreeNode;
import com.jsh.erp.exception.BusinessRunTimeException; import com.jsh.erp.exception.BusinessRunTimeException;
import com.jsh.erp.exception.JshException;
import com.jsh.erp.service.log.LogService; import com.jsh.erp.service.log.LogService;
import com.jsh.erp.service.user.UserService; import com.jsh.erp.service.user.UserService;
import com.jsh.erp.utils.StringUtil; import com.jsh.erp.utils.StringUtil;
@@ -46,10 +47,7 @@ public class MaterialCategoryService {
try{ try{
result=materialCategoryMapper.selectByPrimaryKey(id); result=materialCategoryMapper.selectByPrimaryKey(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -60,10 +58,7 @@ public class MaterialCategoryService {
try{ try{
list=materialCategoryMapper.selectByExample(example); list=materialCategoryMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -73,10 +68,7 @@ public class MaterialCategoryService {
try{ try{
list = getMCList(parentId); list = getMCList(parentId);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -105,10 +97,7 @@ public class MaterialCategoryService {
try{ try{
list=materialCategoryMapperEx.selectByConditionMaterialCategory(name, parentId, offset, rows); list=materialCategoryMapperEx.selectByConditionMaterialCategory(name, parentId, offset, rows);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -118,10 +107,7 @@ public class MaterialCategoryService {
try{ try{
result=materialCategoryMapperEx.countsByMaterialCategory(name, parentId); result=materialCategoryMapperEx.countsByMaterialCategory(name, parentId);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -133,10 +119,7 @@ public class MaterialCategoryService {
try{ try{
result=materialCategoryMapper.insertSelective(materialCategory); result=materialCategoryMapper.insertSelective(materialCategory);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -149,10 +132,7 @@ public class MaterialCategoryService {
try{ try{
result=materialCategoryMapper.updateByPrimaryKeySelective(materialCategory); result=materialCategoryMapper.updateByPrimaryKeySelective(materialCategory);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -163,10 +143,7 @@ public class MaterialCategoryService {
try{ try{
result=materialCategoryMapper.deleteByPrimaryKey(id); result=materialCategoryMapper.deleteByPrimaryKey(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -180,10 +157,7 @@ public class MaterialCategoryService {
try{ try{
result=materialCategoryMapper.deleteByExample(example); result=materialCategoryMapper.deleteByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -199,10 +173,7 @@ public class MaterialCategoryService {
try{ try{
list=materialCategoryMapper.selectByExample(example); list=materialCategoryMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -219,10 +190,7 @@ public class MaterialCategoryService {
try{ try{
list=materialCategoryMapperEx.getNodeTree(id); list=materialCategoryMapperEx.getNodeTree(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -264,10 +232,7 @@ public class MaterialCategoryService {
try{ try{
result=materialCategoryMapperEx.addMaterialCategory(mc); result=materialCategoryMapperEx.addMaterialCategory(mc);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -289,10 +254,7 @@ public class MaterialCategoryService {
try{ try{
result=materialCategoryMapperEx.batchDeleteMaterialCategoryByIds(updateDate,updater,strArray); result=materialCategoryMapperEx.batchDeleteMaterialCategoryByIds(updateDate,updater,strArray);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -317,10 +279,7 @@ public class MaterialCategoryService {
try{ try{
result= materialCategoryMapperEx.editMaterialCategory(mc); result= materialCategoryMapperEx.editMaterialCategory(mc);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -339,10 +298,7 @@ public class MaterialCategoryService {
try{ try{
mList= materialCategoryMapperEx.getMaterialCategoryBySerialNo(mc.getSerialNo()); mList= materialCategoryMapperEx.getMaterialCategoryBySerialNo(mc.getSerialNo());
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
if(mList==null||mList.size()<1){ if(mList==null||mList.size()<1){
//未查询到对应数据,编号可用 //未查询到对应数据,编号可用
@@ -397,10 +353,7 @@ public class MaterialCategoryService {
try{ try{
materialList= materialMapperEx.getMaterialListByCategoryIds(idArray); materialList= materialMapperEx.getMaterialListByCategoryIds(idArray);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
if(materialList!=null&&materialList.size()>0){ if(materialList!=null&&materialList.size()>0){
logger.error("异常码[{}],异常提示[{}],参数,CategoryIds[{}]", logger.error("异常码[{}],异常提示[{}],参数,CategoryIds[{}]",
@@ -415,10 +368,7 @@ public class MaterialCategoryService {
try{ try{
materialCategoryList= materialCategoryMapperEx.getMaterialCategoryListByCategoryIds(idArray); materialCategoryList= materialCategoryMapperEx.getMaterialCategoryListByCategoryIds(idArray);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
if(materialCategoryList!=null&&materialCategoryList.size()>0){ if(materialCategoryList!=null&&materialCategoryList.size()>0){
logger.error("异常码[{}],异常提示[{}],参数,CategoryIds[{}]", logger.error("异常码[{}],异常提示[{}],参数,CategoryIds[{}]",

View File

@@ -9,6 +9,7 @@ import com.jsh.erp.datasource.entities.User;
import com.jsh.erp.datasource.mappers.MaterialPropertyMapper; import com.jsh.erp.datasource.mappers.MaterialPropertyMapper;
import com.jsh.erp.datasource.mappers.MaterialPropertyMapperEx; import com.jsh.erp.datasource.mappers.MaterialPropertyMapperEx;
import com.jsh.erp.exception.BusinessRunTimeException; import com.jsh.erp.exception.BusinessRunTimeException;
import com.jsh.erp.exception.JshException;
import com.jsh.erp.service.log.LogService; import com.jsh.erp.service.log.LogService;
import com.jsh.erp.service.user.UserService; import com.jsh.erp.service.user.UserService;
import com.jsh.erp.utils.StringUtil; import com.jsh.erp.utils.StringUtil;
@@ -43,10 +44,7 @@ public class MaterialPropertyService {
try{ try{
result=materialPropertyMapper.selectByPrimaryKey(id); result=materialPropertyMapper.selectByPrimaryKey(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -58,10 +56,7 @@ public class MaterialPropertyService {
try{ try{
list=materialPropertyMapper.selectByExample(example); list=materialPropertyMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -71,10 +66,7 @@ public class MaterialPropertyService {
try{ try{
list=materialPropertyMapperEx.selectByConditionMaterialProperty(name, offset, rows); list=materialPropertyMapperEx.selectByConditionMaterialProperty(name, offset, rows);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -84,10 +76,7 @@ public class MaterialPropertyService {
try{ try{
result=materialPropertyMapperEx.countsByMaterialProperty(name); result=materialPropertyMapperEx.countsByMaterialProperty(name);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -99,10 +88,7 @@ public class MaterialPropertyService {
try{ try{
result=materialPropertyMapper.insertSelective(materialProperty); result=materialPropertyMapper.insertSelective(materialProperty);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -115,10 +101,7 @@ public class MaterialPropertyService {
try{ try{
result=materialPropertyMapper.updateByPrimaryKeySelective(materialProperty); result=materialPropertyMapper.updateByPrimaryKeySelective(materialProperty);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -129,10 +112,7 @@ public class MaterialPropertyService {
try{ try{
result=materialPropertyMapper.deleteByPrimaryKey(id); result=materialPropertyMapper.deleteByPrimaryKey(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -146,10 +126,7 @@ public class MaterialPropertyService {
try{ try{
result=materialPropertyMapper.deleteByExample(example); result=materialPropertyMapper.deleteByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -168,10 +145,7 @@ public class MaterialPropertyService {
try{ try{
result=materialPropertyMapperEx.batchDeleteMaterialPropertyByIds(new Date(),userInfo==null?null:userInfo.getId(),idArray); result=materialPropertyMapperEx.batchDeleteMaterialPropertyByIds(new Date(),userInfo==null?null:userInfo.getId(),idArray);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;

View File

@@ -9,6 +9,7 @@ import com.jsh.erp.datasource.entities.User;
import com.jsh.erp.datasource.mappers.OrgaUserRelMapper; import com.jsh.erp.datasource.mappers.OrgaUserRelMapper;
import com.jsh.erp.datasource.mappers.OrgaUserRelMapperEx; import com.jsh.erp.datasource.mappers.OrgaUserRelMapperEx;
import com.jsh.erp.exception.BusinessRunTimeException; import com.jsh.erp.exception.BusinessRunTimeException;
import com.jsh.erp.exception.JshException;
import com.jsh.erp.service.log.LogService; import com.jsh.erp.service.log.LogService;
import com.jsh.erp.service.organization.OrganizationService; import com.jsh.erp.service.organization.OrganizationService;
import com.jsh.erp.service.user.UserService; import com.jsh.erp.service.user.UserService;
@@ -53,10 +54,7 @@ public class OrgaUserRelService {
try{ try{
result=orgaUserRelMapper.insertSelective(orgaUserRel); result=orgaUserRelMapper.insertSelective(orgaUserRel);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -68,10 +66,7 @@ public class OrgaUserRelService {
try{ try{
result=orgaUserRelMapper.updateByPrimaryKeySelective(orgaUserRel); result=orgaUserRelMapper.updateByPrimaryKeySelective(orgaUserRel);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -81,10 +76,7 @@ public class OrgaUserRelService {
try{ try{
result=orgaUserRelMapper.deleteByPrimaryKey(id); result=orgaUserRelMapper.deleteByPrimaryKey(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -97,10 +89,7 @@ public class OrgaUserRelService {
try{ try{
result=orgaUserRelMapper.deleteByExample(example); result=orgaUserRelMapper.deleteByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -137,10 +126,7 @@ public class OrgaUserRelService {
try{ try{
result=orgaUserRelMapperEx.addOrgaUserRel(orgaUserRel); result=orgaUserRelMapperEx.addOrgaUserRel(orgaUserRel);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
if(result>0){ if(result>0){
return orgaUserRel; return orgaUserRel;
@@ -170,10 +156,7 @@ public class OrgaUserRelService {
try{ try{
result=orgaUserRelMapperEx.updateOrgaUserRel(orgaUserRel); result=orgaUserRelMapperEx.updateOrgaUserRel(orgaUserRel);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
if(result>0){ if(result>0){
return orgaUserRel; return orgaUserRel;

View File

@@ -11,6 +11,7 @@ import com.jsh.erp.datasource.mappers.OrganizationMapper;
import com.jsh.erp.datasource.mappers.OrganizationMapperEx; import com.jsh.erp.datasource.mappers.OrganizationMapperEx;
import com.jsh.erp.datasource.vo.TreeNode; import com.jsh.erp.datasource.vo.TreeNode;
import com.jsh.erp.exception.BusinessRunTimeException; import com.jsh.erp.exception.BusinessRunTimeException;
import com.jsh.erp.exception.JshException;
import com.jsh.erp.service.log.LogService; import com.jsh.erp.service.log.LogService;
import com.jsh.erp.service.user.UserService; import com.jsh.erp.service.user.UserService;
import com.jsh.erp.utils.StringUtil; import com.jsh.erp.utils.StringUtil;
@@ -56,10 +57,7 @@ public class OrganizationService {
try{ try{
result=organizationMapper.insertSelective(organization); result=organizationMapper.insertSelective(organization);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -71,10 +69,7 @@ public class OrganizationService {
try{ try{
result=organizationMapper.updateByPrimaryKeySelective(organization); result=organizationMapper.updateByPrimaryKeySelective(organization);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -84,10 +79,7 @@ public class OrganizationService {
try{ try{
result=organizationMapper.deleteByPrimaryKey(id); result=organizationMapper.deleteByPrimaryKey(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -100,10 +92,7 @@ public class OrganizationService {
try{ try{
result=organizationMapper.deleteByExample(example); result=organizationMapper.deleteByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -138,10 +127,7 @@ public class OrganizationService {
try{ try{
result=organizationMapperEx.addOrganization(org); result=organizationMapperEx.addOrganization(org);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -171,10 +157,7 @@ public class OrganizationService {
try{ try{
result=organizationMapperEx.editOrganization(org); result=organizationMapperEx.editOrganization(org);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -184,10 +167,7 @@ public class OrganizationService {
try{ try{
list=organizationMapperEx.getNodeTree(id); list=organizationMapperEx.getNodeTree(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -199,10 +179,7 @@ public class OrganizationService {
try{ try{
list=organizationMapper.selectByExample(example); list=organizationMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -214,10 +191,7 @@ public class OrganizationService {
try{ try{
list=organizationMapper.selectByExample(example); list=organizationMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -269,10 +243,7 @@ public class OrganizationService {
result=organizationMapperEx.batchDeleteOrganizationByIds( result=organizationMapperEx.batchDeleteOrganizationByIds(
new Date(),userInfo==null?null:userInfo.getId(),idArray); new Date(),userInfo==null?null:userInfo.getId(),idArray);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }

View File

@@ -10,6 +10,7 @@ import com.jsh.erp.datasource.mappers.DepotHeadMapperEx;
import com.jsh.erp.datasource.mappers.PersonMapper; import com.jsh.erp.datasource.mappers.PersonMapper;
import com.jsh.erp.datasource.mappers.PersonMapperEx; import com.jsh.erp.datasource.mappers.PersonMapperEx;
import com.jsh.erp.exception.BusinessRunTimeException; import com.jsh.erp.exception.BusinessRunTimeException;
import com.jsh.erp.exception.JshException;
import com.jsh.erp.service.log.LogService; import com.jsh.erp.service.log.LogService;
import com.jsh.erp.service.user.UserService; import com.jsh.erp.service.user.UserService;
import com.jsh.erp.utils.StringUtil; import com.jsh.erp.utils.StringUtil;
@@ -48,10 +49,7 @@ public class PersonService {
try{ try{
result=personMapper.selectByPrimaryKey(id); result=personMapper.selectByPrimaryKey(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -63,10 +61,7 @@ public class PersonService {
try{ try{
list=personMapper.selectByExample(example); list=personMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -76,10 +71,7 @@ public class PersonService {
try{ try{
list=personMapperEx.selectByConditionPerson(name, type, offset, rows); list=personMapperEx.selectByConditionPerson(name, type, offset, rows);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -89,10 +81,7 @@ public class PersonService {
try{ try{
result=personMapperEx.countsByPerson(name, type); result=personMapperEx.countsByPerson(name, type);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -104,10 +93,7 @@ public class PersonService {
try{ try{
result=personMapper.insertSelective(person); result=personMapper.insertSelective(person);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -120,10 +106,7 @@ public class PersonService {
try{ try{
result=personMapper.updateByPrimaryKeySelective(person); result=personMapper.updateByPrimaryKeySelective(person);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -134,10 +117,7 @@ public class PersonService {
try{ try{
result=personMapper.deleteByPrimaryKey(id); result=personMapper.deleteByPrimaryKey(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -151,10 +131,7 @@ public class PersonService {
try{ try{
result=personMapper.deleteByExample(example); result=personMapper.deleteByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -166,10 +143,7 @@ public class PersonService {
try{ try{
list=personMapper.selectByExample(example); list=personMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list==null?0:list.size(); return list==null?0:list.size();
} }
@@ -183,10 +157,7 @@ public class PersonService {
try{ try{
list=personMapper.selectByExample(example); list=personMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
StringBuffer sb = new StringBuffer(); StringBuffer sb = new StringBuffer();
if (null != list) { if (null != list) {
@@ -205,10 +176,7 @@ public class PersonService {
try{ try{
list=personMapper.selectByExample(example); list=personMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -224,10 +192,7 @@ public class PersonService {
try{ try{
result=personMapperEx.batchDeletePersonByIds(new Date(),userInfo==null?null:userInfo.getId(),idArray); result=personMapperEx.batchDeletePersonByIds(new Date(),userInfo==null?null:userInfo.getId(),idArray);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -260,10 +225,7 @@ public class PersonService {
try{ try{
accountHeadList=accountHeadMapperEx.getAccountHeadListByHandsPersonIds(idArray); accountHeadList=accountHeadMapperEx.getAccountHeadListByHandsPersonIds(idArray);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
if(accountHeadList!=null&&accountHeadList.size()>0){ if(accountHeadList!=null&&accountHeadList.size()>0){
logger.error("异常码[{}],异常提示[{}],参数,HandsPersonIds[{}]", logger.error("异常码[{}],异常提示[{}],参数,HandsPersonIds[{}]",
@@ -278,10 +240,7 @@ public class PersonService {
try{ try{
depotHeadList=depotHeadMapperEx.getDepotHeadListByHandsPersonIds(idArray); depotHeadList=depotHeadMapperEx.getDepotHeadListByHandsPersonIds(idArray);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
if(depotHeadList!=null&&depotHeadList.size()>0){ if(depotHeadList!=null&&depotHeadList.size()>0){
logger.error("异常码[{}],异常提示[{}],参数,HandsPersonIds[{}]", logger.error("异常码[{}],异常提示[{}],参数,HandsPersonIds[{}]",

View File

@@ -9,6 +9,7 @@ import com.jsh.erp.datasource.entities.User;
import com.jsh.erp.datasource.mappers.RoleMapper; import com.jsh.erp.datasource.mappers.RoleMapper;
import com.jsh.erp.datasource.mappers.RoleMapperEx; import com.jsh.erp.datasource.mappers.RoleMapperEx;
import com.jsh.erp.exception.BusinessRunTimeException; import com.jsh.erp.exception.BusinessRunTimeException;
import com.jsh.erp.exception.JshException;
import com.jsh.erp.service.log.LogService; import com.jsh.erp.service.log.LogService;
import com.jsh.erp.service.user.UserService; import com.jsh.erp.service.user.UserService;
import com.jsh.erp.utils.StringUtil; import com.jsh.erp.utils.StringUtil;
@@ -42,10 +43,7 @@ public class RoleService {
try{ try{
result=roleMapper.selectByPrimaryKey(id); result=roleMapper.selectByPrimaryKey(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -57,10 +55,7 @@ public class RoleService {
try{ try{
list=roleMapper.selectByExample(example); list=roleMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -70,10 +65,7 @@ public class RoleService {
try{ try{
list=roleMapperEx.selectByConditionRole(name, offset, rows); list=roleMapperEx.selectByConditionRole(name, offset, rows);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -83,10 +75,7 @@ public class RoleService {
try{ try{
result=roleMapperEx.countsByRole(name); result=roleMapperEx.countsByRole(name);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -98,10 +87,7 @@ public class RoleService {
try{ try{
result=roleMapper.insertSelective(role); result=roleMapper.insertSelective(role);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -114,10 +100,7 @@ public class RoleService {
try{ try{
result=roleMapper.updateByPrimaryKeySelective(role); result=roleMapper.updateByPrimaryKeySelective(role);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -128,10 +111,7 @@ public class RoleService {
try{ try{
result=roleMapper.deleteByPrimaryKey(id); result=roleMapper.deleteByPrimaryKey(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -145,10 +125,7 @@ public class RoleService {
try{ try{
result=roleMapper.deleteByExample(example); result=roleMapper.deleteByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -161,10 +138,7 @@ public class RoleService {
try{ try{
list=roleMapper.selectByExample(example); list=roleMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -188,10 +162,7 @@ public class RoleService {
try{ try{
result=roleMapperEx.batchDeleteRoleByIds(new Date(),userInfo==null?null:userInfo.getId(),idArray); result=roleMapperEx.batchDeleteRoleByIds(new Date(),userInfo==null?null:userInfo.getId(),idArray);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }

View File

@@ -6,6 +6,7 @@ import com.jsh.erp.constants.ExceptionConstants;
import com.jsh.erp.datasource.entities.*; import com.jsh.erp.datasource.entities.*;
import com.jsh.erp.datasource.mappers.*; import com.jsh.erp.datasource.mappers.*;
import com.jsh.erp.exception.BusinessRunTimeException; import com.jsh.erp.exception.BusinessRunTimeException;
import com.jsh.erp.exception.JshException;
import com.jsh.erp.service.depotItem.DepotItemService; import com.jsh.erp.service.depotItem.DepotItemService;
import com.jsh.erp.service.log.LogService; import com.jsh.erp.service.log.LogService;
import com.jsh.erp.service.material.MaterialService; import com.jsh.erp.service.material.MaterialService;
@@ -53,10 +54,7 @@ public class SerialNumberService {
try{ try{
result=serialNumberMapper.selectByPrimaryKey(id); result=serialNumberMapper.selectByPrimaryKey(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -67,10 +65,7 @@ public class SerialNumberService {
try{ try{
list=serialNumberMapper.selectByExample(example); list=serialNumberMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -80,10 +75,7 @@ public class SerialNumberService {
try{ try{
list=serialNumberMapperEx.selectByConditionSerialNumber(serialNumber, materialName,offset, rows); list=serialNumberMapperEx.selectByConditionSerialNumber(serialNumber, materialName,offset, rows);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
@@ -94,10 +86,7 @@ public class SerialNumberService {
try{ try{
result=serialNumberMapperEx.countSerialNumber(serialNumber, materialName); result=serialNumberMapperEx.countSerialNumber(serialNumber, materialName);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -110,10 +99,7 @@ public class SerialNumberService {
try{ try{
result=serialNumberMapper.insertSelective(serialNumber); result=serialNumberMapper.insertSelective(serialNumber);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -126,10 +112,7 @@ public class SerialNumberService {
try{ try{
result=serialNumberMapper.updateByPrimaryKeySelective(serialNumber); result=serialNumberMapper.updateByPrimaryKeySelective(serialNumber);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -140,10 +123,7 @@ public class SerialNumberService {
try{ try{
result=serialNumberMapper.deleteByPrimaryKey(id); result=serialNumberMapper.deleteByPrimaryKey(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -157,10 +137,7 @@ public class SerialNumberService {
try{ try{
result=serialNumberMapper.deleteByExample(example); result=serialNumberMapper.deleteByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -172,10 +149,7 @@ public class SerialNumberService {
try{ try{
list=serialNumberMapper.selectByExample(example); list=serialNumberMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list==null?0:list.size(); return list==null?0:list.size();
} }
@@ -192,10 +166,7 @@ public class SerialNumberService {
try{ try{
result=serialNumberMapper.updateByExampleSelective(serialNumber, example); result=serialNumberMapper.updateByExampleSelective(serialNumber, example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -206,10 +177,7 @@ public class SerialNumberService {
try{ try{
list=serialNumberMapperEx.findById(id); list=serialNumberMapperEx.findById(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -226,10 +194,7 @@ public class SerialNumberService {
try{ try{
mlist = materialMapperEx.findByMaterialName(materialName); mlist = materialMapperEx.findByMaterialName(materialName);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
if(mlist==null||mlist.size()<1){ if(mlist==null||mlist.size()<1){
@@ -250,10 +215,7 @@ public class SerialNumberService {
try{ try{
list = serialNumberMapperEx.findBySerialNumber(serialNumber); list = serialNumberMapperEx.findBySerialNumber(serialNumber);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
if(list!=null&&list.size()>0){ if(list!=null&&list.size()>0){
if(list.size()>1){ if(list.size()>1){
@@ -305,10 +267,7 @@ public class SerialNumberService {
try{ try{
result = serialNumberMapperEx.addSerialNumber(serialNumberEx); result = serialNumberMapperEx.addSerialNumber(serialNumberEx);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
if(result>0){ if(result>0){
return serialNumberEx; return serialNumberEx;
@@ -333,10 +292,7 @@ public class SerialNumberService {
try{ try{
result = serialNumberMapperEx.updateSerialNumber(serialNumberEx); result = serialNumberMapperEx.updateSerialNumber(serialNumberEx);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
if(result>0){ if(result>0){
return serialNumberEx; return serialNumberEx;
@@ -357,10 +313,7 @@ public class SerialNumberService {
try{ try{
mlist = materialMapperEx.findByMaterialName(materialName); mlist = materialMapperEx.findByMaterialName(materialName);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
if (mlist == null || mlist.size() < 1) { if (mlist == null || mlist.size() < 1) {
//商品名称不存在 //商品名称不存在
@@ -461,10 +414,7 @@ public class SerialNumberService {
try{ try{
result = serialNumberMapperEx.sellSerialNumber(materialId,depotheadId,count,new Date(),user==null?null:user.getId()); result = serialNumberMapperEx.sellSerialNumber(materialId,depotheadId,count,new Date(),user==null?null:user.getId());
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -486,10 +436,7 @@ public class SerialNumberService {
try{ try{
result = serialNumberMapperEx.cancelSerialNumber(materialId,depotheadId,count,new Date(),user==null?null:user.getId()); result = serialNumberMapperEx.cancelSerialNumber(materialId,depotheadId,count,new Date(),user==null?null:user.getId());
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -543,10 +490,7 @@ public class SerialNumberService {
try{ try{
serialNumberMapperEx.batAddSerialNumber(list); serialNumberMapperEx.batAddSerialNumber(list);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
} }
} }
@@ -570,10 +514,7 @@ public class SerialNumberService {
try{ try{
result = serialNumberMapperEx.batchDeleteSerialNumberByIds(new Date(),userInfo==null?null:userInfo.getId(),idArray); result = serialNumberMapperEx.batchDeleteSerialNumberByIds(new Date(),userInfo==null?null:userInfo.getId(),idArray);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;

View File

@@ -10,6 +10,7 @@ import com.jsh.erp.datasource.mappers.DepotHeadMapperEx;
import com.jsh.erp.datasource.mappers.SupplierMapper; import com.jsh.erp.datasource.mappers.SupplierMapper;
import com.jsh.erp.datasource.mappers.SupplierMapperEx; import com.jsh.erp.datasource.mappers.SupplierMapperEx;
import com.jsh.erp.exception.BusinessRunTimeException; import com.jsh.erp.exception.BusinessRunTimeException;
import com.jsh.erp.exception.JshException;
import com.jsh.erp.service.accountHead.AccountHeadService; import com.jsh.erp.service.accountHead.AccountHeadService;
import com.jsh.erp.service.depotHead.DepotHeadService; import com.jsh.erp.service.depotHead.DepotHeadService;
import com.jsh.erp.service.log.LogService; import com.jsh.erp.service.log.LogService;
@@ -57,10 +58,7 @@ public class SupplierService {
try{ try{
result=supplierMapper.selectByPrimaryKey(id); result=supplierMapper.selectByPrimaryKey(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -72,10 +70,7 @@ public class SupplierService {
try{ try{
list=supplierMapper.selectByExample(example); list=supplierMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -117,10 +112,7 @@ public class SupplierService {
resList.add(s); resList.add(s);
} }
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return resList; return resList;
} }
@@ -130,10 +122,7 @@ public class SupplierService {
try{ try{
result=supplierMapperEx.countsBySupplier(supplier, type, phonenum, telephone, description); result=supplierMapperEx.countsBySupplier(supplier, type, phonenum, telephone, description);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -145,10 +134,7 @@ public class SupplierService {
try{ try{
result=supplierMapper.insertSelective(supplier); result=supplierMapper.insertSelective(supplier);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -167,10 +153,7 @@ public class SupplierService {
try{ try{
result=supplierMapper.updateByPrimaryKeySelective(supplier); result=supplierMapper.updateByPrimaryKeySelective(supplier);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -181,10 +164,7 @@ public class SupplierService {
try{ try{
result=supplierMapper.deleteByPrimaryKey(id); result=supplierMapper.deleteByPrimaryKey(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return supplierMapper.deleteByPrimaryKey(id); return supplierMapper.deleteByPrimaryKey(id);
} }
@@ -198,10 +178,7 @@ public class SupplierService {
try{ try{
result=supplierMapper.deleteByExample(example); result=supplierMapper.deleteByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -213,10 +190,7 @@ public class SupplierService {
try{ try{
list= supplierMapper.selectByExample(example); list= supplierMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return list==null?0:list.size(); return list==null?0:list.size();
} }
@@ -230,10 +204,7 @@ public class SupplierService {
try{ try{
supplier = supplierMapper.selectByPrimaryKey(supplierId); supplier = supplierMapper.selectByPrimaryKey(supplierId);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
int result=0; int result=0;
try{ try{
@@ -242,10 +213,7 @@ public class SupplierService {
result=supplierMapper.updateByPrimaryKeySelective(supplier); result=supplierMapper.updateByPrimaryKeySelective(supplier);
} }
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -258,10 +226,7 @@ public class SupplierService {
try{ try{
list = supplierMapper.selectByExample(example); list = supplierMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -275,10 +240,7 @@ public class SupplierService {
try{ try{
list = supplierMapper.selectByExample(example); list = supplierMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -292,10 +254,7 @@ public class SupplierService {
try{ try{
list = supplierMapper.selectByExample(example); list = supplierMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -309,10 +268,7 @@ public class SupplierService {
try{ try{
list = supplierMapper.selectByExample(example); list = supplierMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -331,10 +287,7 @@ public class SupplierService {
try{ try{
result = supplierMapper.updateByExampleSelective(supplier, example); result = supplierMapper.updateByExampleSelective(supplier, example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -348,10 +301,7 @@ public class SupplierService {
try{ try{
list = supplierMapper.selectByExample(example); list = supplierMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -362,10 +312,7 @@ public class SupplierService {
try{ try{
list = supplierMapperEx.findByAll(supplier, type, phonenum, telephone, description); list = supplierMapperEx.findByAll(supplier, type, phonenum, telephone, description);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -383,8 +330,6 @@ public class SupplierService {
info.code = 200; info.code = 200;
data.put("message", "成功"); data.put("message", "成功");
} catch (Exception e) { } catch (Exception e) {
logger.error("异常码[{}],异常提示[{}],异常[{}]",
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
e.printStackTrace(); e.printStackTrace();
info.code = 500; info.code = 500;
data.put("message", e.getMessage()); data.put("message", e.getMessage());
@@ -403,10 +348,7 @@ public class SupplierService {
try{ try{
result = supplierMapperEx.batchDeleteSupplierByIds(new Date(),userInfo==null?null:userInfo.getId(),idArray); result = supplierMapperEx.batchDeleteSupplierByIds(new Date(),userInfo==null?null:userInfo.getId(),idArray);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -439,10 +381,7 @@ public class SupplierService {
try{ try{
accountHeadList = accountHeadMapperEx.getAccountHeadListByOrganIds(idArray); accountHeadList = accountHeadMapperEx.getAccountHeadListByOrganIds(idArray);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
if(accountHeadList!=null&&accountHeadList.size()>0){ if(accountHeadList!=null&&accountHeadList.size()>0){
logger.error("异常码[{}],异常提示[{}],参数,OrganIds[{}]", logger.error("异常码[{}],异常提示[{}],参数,OrganIds[{}]",
@@ -457,10 +396,7 @@ public class SupplierService {
try{ try{
depotHeadList = depotHeadMapperEx.getDepotHeadListByOrganIds(idArray); depotHeadList = depotHeadMapperEx.getDepotHeadListByOrganIds(idArray);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
if(depotHeadList!=null&&depotHeadList.size()>0){ if(depotHeadList!=null&&depotHeadList.size()>0){
logger.error("异常码[{}],异常提示[{}],参数,OrganIds[{}]", logger.error("异常码[{}],异常提示[{}],参数,OrganIds[{}]",

View File

@@ -10,6 +10,7 @@ import com.jsh.erp.datasource.entities.User;
import com.jsh.erp.datasource.mappers.SystemConfigMapper; import com.jsh.erp.datasource.mappers.SystemConfigMapper;
import com.jsh.erp.datasource.mappers.SystemConfigMapperEx; import com.jsh.erp.datasource.mappers.SystemConfigMapperEx;
import com.jsh.erp.exception.BusinessRunTimeException; import com.jsh.erp.exception.BusinessRunTimeException;
import com.jsh.erp.exception.JshException;
import com.jsh.erp.service.log.LogService; import com.jsh.erp.service.log.LogService;
import com.jsh.erp.service.user.UserService; import com.jsh.erp.service.user.UserService;
import com.jsh.erp.utils.StringUtil; import com.jsh.erp.utils.StringUtil;
@@ -44,10 +45,7 @@ public class SystemConfigService {
try{ try{
result=systemConfigMapper.selectByPrimaryKey(id); result=systemConfigMapper.selectByPrimaryKey(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -59,10 +57,7 @@ public class SystemConfigService {
try{ try{
list=systemConfigMapper.selectByExample(example); list=systemConfigMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -71,10 +66,7 @@ public class SystemConfigService {
try{ try{
list=systemConfigMapperEx.selectByConditionSystemConfig(companyName, offset, rows); list=systemConfigMapperEx.selectByConditionSystemConfig(companyName, offset, rows);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -84,10 +76,7 @@ public class SystemConfigService {
try{ try{
result=systemConfigMapperEx.countsBySystemConfig(companyName); result=systemConfigMapperEx.countsBySystemConfig(companyName);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -99,10 +88,7 @@ public class SystemConfigService {
try{ try{
result=systemConfigMapper.insertSelective(systemConfig); result=systemConfigMapper.insertSelective(systemConfig);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -115,10 +101,7 @@ public class SystemConfigService {
try{ try{
result=systemConfigMapper.updateByPrimaryKeySelective(systemConfig); result=systemConfigMapper.updateByPrimaryKeySelective(systemConfig);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -129,10 +112,7 @@ public class SystemConfigService {
try{ try{
result=systemConfigMapper.deleteByPrimaryKey(id); result=systemConfigMapper.deleteByPrimaryKey(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -146,10 +126,7 @@ public class SystemConfigService {
try{ try{
result=systemConfigMapper.deleteByExample(example); result=systemConfigMapper.deleteByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -161,10 +138,7 @@ public class SystemConfigService {
try{ try{
list=systemConfigMapper.selectByExample(example); list=systemConfigMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list==null?0:list.size(); return list==null?0:list.size();
} }
@@ -180,10 +154,7 @@ public class SystemConfigService {
try{ try{
result=systemConfigMapperEx.batchDeleteSystemConfigByIds(new Date(),userInfo==null?null:userInfo.getId(),idArray); result=systemConfigMapperEx.batchDeleteSystemConfigByIds(new Date(),userInfo==null?null:userInfo.getId(),idArray);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }

View File

@@ -6,6 +6,7 @@ import com.jsh.erp.datasource.entities.*;
import com.jsh.erp.datasource.mappers.TenantMapper; import com.jsh.erp.datasource.mappers.TenantMapper;
import com.jsh.erp.datasource.mappers.TenantMapperEx; import com.jsh.erp.datasource.mappers.TenantMapperEx;
import com.jsh.erp.exception.BusinessRunTimeException; import com.jsh.erp.exception.BusinessRunTimeException;
import com.jsh.erp.exception.JshException;
import com.jsh.erp.utils.StringUtil; import com.jsh.erp.utils.StringUtil;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@@ -30,10 +31,7 @@ public class TenantService {
try{ try{
result=tenantMapper.selectByPrimaryKey(id); result=tenantMapper.selectByPrimaryKey(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -44,10 +42,7 @@ public class TenantService {
try{ try{
list=tenantMapper.selectByExample(example); list=tenantMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -57,10 +52,7 @@ public class TenantService {
try{ try{
list=tenantMapperEx.selectByConditionTenant(loginName, offset, rows); list=tenantMapperEx.selectByConditionTenant(loginName, offset, rows);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -70,10 +62,7 @@ public class TenantService {
try{ try{
result=tenantMapperEx.countsByTenant(loginName); result=tenantMapperEx.countsByTenant(loginName);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -88,10 +77,7 @@ public class TenantService {
tenant.setCreateTime(new Date()); tenant.setCreateTime(new Date());
result=tenantMapper.insertSelective(tenant); result=tenantMapper.insertSelective(tenant);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -104,10 +90,7 @@ public class TenantService {
tenant.setId(id); tenant.setId(id);
result=tenantMapper.updateByPrimaryKeySelective(tenant); result=tenantMapper.updateByPrimaryKeySelective(tenant);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -118,10 +101,7 @@ public class TenantService {
try{ try{
result= tenantMapper.deleteByPrimaryKey(id); result= tenantMapper.deleteByPrimaryKey(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -135,10 +115,7 @@ public class TenantService {
try{ try{
result= tenantMapper.deleteByExample(example); result= tenantMapper.deleteByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -150,10 +127,7 @@ public class TenantService {
try{ try{
list= tenantMapper.selectByExample(example); list= tenantMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list==null?0:list.size(); return list==null?0:list.size();
} }

View File

@@ -9,6 +9,7 @@ import com.jsh.erp.datasource.mappers.MaterialMapperEx;
import com.jsh.erp.datasource.mappers.UnitMapper; import com.jsh.erp.datasource.mappers.UnitMapper;
import com.jsh.erp.datasource.mappers.UnitMapperEx; import com.jsh.erp.datasource.mappers.UnitMapperEx;
import com.jsh.erp.exception.BusinessRunTimeException; import com.jsh.erp.exception.BusinessRunTimeException;
import com.jsh.erp.exception.JshException;
import com.jsh.erp.service.log.LogService; import com.jsh.erp.service.log.LogService;
import com.jsh.erp.service.user.UserService; import com.jsh.erp.service.user.UserService;
import com.jsh.erp.utils.StringUtil; import com.jsh.erp.utils.StringUtil;
@@ -45,10 +46,7 @@ public class UnitService {
try{ try{
result=unitMapper.selectByPrimaryKey(id); result=unitMapper.selectByPrimaryKey(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -60,10 +58,7 @@ public class UnitService {
try{ try{
list=unitMapper.selectByExample(example); list=unitMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -73,10 +68,7 @@ public class UnitService {
try{ try{
list=unitMapperEx.selectByConditionUnit(name, offset, rows); list=unitMapperEx.selectByConditionUnit(name, offset, rows);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -86,10 +78,7 @@ public class UnitService {
try{ try{
result=unitMapperEx.countsByUnit(name); result=unitMapperEx.countsByUnit(name);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -101,10 +90,7 @@ public class UnitService {
try{ try{
result=unitMapper.insertSelective(unit); result=unitMapper.insertSelective(unit);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -117,10 +103,7 @@ public class UnitService {
try{ try{
result=unitMapper.updateByPrimaryKeySelective(unit); result=unitMapper.updateByPrimaryKeySelective(unit);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -131,10 +114,7 @@ public class UnitService {
try{ try{
result=unitMapper.deleteByPrimaryKey(id); result=unitMapper.deleteByPrimaryKey(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -148,10 +128,7 @@ public class UnitService {
try{ try{
result=unitMapper.deleteByExample(example); result=unitMapper.deleteByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -163,10 +140,7 @@ public class UnitService {
try{ try{
list=unitMapper.selectByExample(example); list=unitMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list==null?0:list.size(); return list==null?0:list.size();
} }
@@ -181,10 +155,7 @@ public class UnitService {
try{ try{
result=unitMapperEx.batchDeleteUnitByIds(new Date(),userInfo==null?null:userInfo.getId(),idArray); result=unitMapperEx.batchDeleteUnitByIds(new Date(),userInfo==null?null:userInfo.getId(),idArray);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -217,10 +188,7 @@ public class UnitService {
try{ try{
materialList=materialMapperEx.getMaterialListByUnitIds(idArray); materialList=materialMapperEx.getMaterialListByUnitIds(idArray);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
if(materialList!=null&&materialList.size()>0){ if(materialList!=null&&materialList.size()>0){
logger.error("异常码[{}],异常提示[{}],参数,UnitIds[{}]", logger.error("异常码[{}],异常提示[{}],参数,UnitIds[{}]",

View File

@@ -13,12 +13,12 @@ import com.jsh.erp.datasource.mappers.UserMapper;
import com.jsh.erp.datasource.mappers.UserMapperEx; import com.jsh.erp.datasource.mappers.UserMapperEx;
import com.jsh.erp.datasource.vo.TreeNodeEx; import com.jsh.erp.datasource.vo.TreeNodeEx;
import com.jsh.erp.exception.BusinessRunTimeException; import com.jsh.erp.exception.BusinessRunTimeException;
import com.jsh.erp.exception.JshException;
import com.jsh.erp.service.log.LogService; import com.jsh.erp.service.log.LogService;
import com.jsh.erp.service.orgaUserRel.OrgaUserRelService; import com.jsh.erp.service.orgaUserRel.OrgaUserRelService;
import com.jsh.erp.service.tenant.TenantService; import com.jsh.erp.service.tenant.TenantService;
import com.jsh.erp.service.userBusiness.UserBusinessService; import com.jsh.erp.service.userBusiness.UserBusinessService;
import com.jsh.erp.utils.ExceptionCodeConstants; import com.jsh.erp.utils.ExceptionCodeConstants;
import com.jsh.erp.utils.JshException;
import com.jsh.erp.utils.StringUtil; import com.jsh.erp.utils.StringUtil;
import com.jsh.erp.utils.Tools; import com.jsh.erp.utils.Tools;
import org.slf4j.Logger; import org.slf4j.Logger;
@@ -61,10 +61,7 @@ public class UserService {
try{ try{
result=userMapper.selectByPrimaryKey(id); result=userMapper.selectByPrimaryKey(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -75,10 +72,7 @@ public class UserService {
try{ try{
list=userMapper.selectByExample(example); list=userMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -88,10 +82,7 @@ public class UserService {
try{ try{
list=userMapperEx.selectByConditionUser(userName, loginName, offset, rows); list=userMapperEx.selectByConditionUser(userName, loginName, offset, rows);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -101,10 +92,7 @@ public class UserService {
try{ try{
result=userMapperEx.countsByUser(userName, loginName); result=userMapperEx.countsByUser(userName, loginName);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -133,10 +121,7 @@ public class UserService {
try{ try{
result=userMapper.insertSelective(user); result=userMapper.insertSelective(user);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -157,10 +142,7 @@ public class UserService {
try{ try{
result=userMapper.updateByPrimaryKeySelective(user); result=userMapper.updateByPrimaryKeySelective(user);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -181,10 +163,7 @@ public class UserService {
try{ try{
result=userMapper.updateByPrimaryKeySelective(user); result=userMapper.updateByPrimaryKeySelective(user);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -209,10 +188,7 @@ public class UserService {
try{ try{
result=userMapper.updateByPrimaryKeySelective(user); result=userMapper.updateByPrimaryKeySelective(user);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -223,10 +199,7 @@ public class UserService {
try{ try{
result= userMapper.deleteByPrimaryKey(id); result= userMapper.deleteByPrimaryKey(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -240,49 +213,40 @@ public class UserService {
try{ try{
result= userMapper.deleteByExample(example); result= userMapper.deleteByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
public int validateUser(String username, String password) throws JshException { public int validateUser(String username, String password) throws Exception {
/**默认是可以登录的*/
List<User> list = null;
try { try {
/**默认是可以登录的*/ UserExample example = new UserExample();
List<User> list = null; example.createCriteria().andLoginameEqualTo(username);
try { list = userMapper.selectByExample(example);
UserExample example = new UserExample();
example.createCriteria().andLoginameEqualTo(username);
list = userMapper.selectByExample(example);
} catch (Exception e) {
logger.error("异常码[{}],异常提示[{}],异常[{}]",
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
logger.error(">>>>>>>>访问验证用户姓名是否存在后台信息异常", e);
return ExceptionCodeConstants.UserExceptionCode.USER_ACCESS_EXCEPTION;
}
if (null != list && list.size() == 0) {
return ExceptionCodeConstants.UserExceptionCode.USER_NOT_EXIST;
}
try {
UserExample example = new UserExample();
example.createCriteria().andLoginameEqualTo(username).andPasswordEqualTo(password);
list = userMapper.selectByExample(example);
} catch (Exception e) {
logger.error(">>>>>>>>>>访问验证用户密码后台信息异常", e);
return ExceptionCodeConstants.UserExceptionCode.USER_ACCESS_EXCEPTION;
}
if (null != list && list.size() == 0) {
return ExceptionCodeConstants.UserExceptionCode.USER_PASSWORD_ERROR;
}
return ExceptionCodeConstants.UserExceptionCode.USER_CONDITION_FIT;
} catch (Exception e) { } catch (Exception e) {
throw new JshException("unknown exception", e); logger.error(">>>>>>>>访问验证用户姓名是否存在后台信息异常", e);
return ExceptionCodeConstants.UserExceptionCode.USER_ACCESS_EXCEPTION;
} }
if (null != list && list.size() == 0) {
return ExceptionCodeConstants.UserExceptionCode.USER_NOT_EXIST;
}
try {
UserExample example = new UserExample();
example.createCriteria().andLoginameEqualTo(username).andPasswordEqualTo(password);
list = userMapper.selectByExample(example);
} catch (Exception e) {
logger.error(">>>>>>>>>>访问验证用户密码后台信息异常", e);
return ExceptionCodeConstants.UserExceptionCode.USER_ACCESS_EXCEPTION;
}
if (null != list && list.size() == 0) {
return ExceptionCodeConstants.UserExceptionCode.USER_PASSWORD_ERROR;
}
return ExceptionCodeConstants.UserExceptionCode.USER_CONDITION_FIT;
} }
public User getUserByUserName(String username)throws Exception { public User getUserByUserName(String username)throws Exception {
@@ -292,10 +256,7 @@ public class UserService {
try{ try{
list= userMapper.selectByExample(example); list= userMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
User user =null; User user =null;
if(list!=null&&list.size()>0){ if(list!=null&&list.size()>0){
@@ -314,10 +275,7 @@ public class UserService {
try{ try{
list= userMapper.selectByExample(example); list= userMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list==null?0:list.size(); return list==null?0:list.size();
} }
@@ -339,10 +297,7 @@ public class UserService {
try{ try{
list= userMapperEx.getUserList(parameterMap); list= userMapperEx.getUserList(parameterMap);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -406,10 +361,7 @@ public class UserService {
try{ try{
result= userMapperEx.addUser(ue); result= userMapperEx.addUser(ue);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
if(result>0){ if(result>0){
return ue; return ue;
@@ -440,10 +392,7 @@ public class UserService {
try{ try{
result= userMapperEx.addUser(ue); result= userMapperEx.addUser(ue);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
//更新租户id //更新租户id
User user = new User(); User user = new User();
@@ -479,10 +428,7 @@ public class UserService {
try{ try{
userMapper.updateByPrimaryKeySelective(user); userMapper.updateByPrimaryKeySelective(user);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
} }
@@ -540,10 +486,7 @@ public class UserService {
try{ try{
result=userMapperEx.updateUser(ue); result=userMapperEx.updateUser(ue);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
if(result>0){ if(result>0){
return ue; return ue;
@@ -622,10 +565,7 @@ public class UserService {
try{ try{
list=userMapperEx.getUserListByUserNameOrLoginName(userName,null); list=userMapperEx.getUserListByUserNameOrLoginName(userName,null);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -637,10 +577,7 @@ public class UserService {
try{ try{
list=userMapperEx.getUserListByUserNameOrLoginName(null,loginName); list=userMapperEx.getUserListByUserNameOrLoginName(null,loginName);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -657,10 +594,7 @@ public class UserService {
try{ try{
result=userMapperEx.batDeleteOrUpdateUser(idsArray,BusinessConstants.USER_STATUS_DELETE); result=userMapperEx.batDeleteOrUpdateUser(idsArray,BusinessConstants.USER_STATUS_DELETE);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
if(result<1){ if(result<1){
logger.error("异常码[{}],异常提示[{}],参数,ids:[{}]", logger.error("异常码[{}],异常提示[{}],参数,ids:[{}]",
@@ -675,10 +609,7 @@ public class UserService {
try{ try{
list=userMapperEx.getNodeTree(); list=userMapperEx.getNodeTree();
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }

View File

@@ -7,6 +7,7 @@ import com.jsh.erp.datasource.entities.*;
import com.jsh.erp.datasource.mappers.UserBusinessMapper; import com.jsh.erp.datasource.mappers.UserBusinessMapper;
import com.jsh.erp.datasource.mappers.UserBusinessMapperEx; import com.jsh.erp.datasource.mappers.UserBusinessMapperEx;
import com.jsh.erp.exception.BusinessRunTimeException; import com.jsh.erp.exception.BusinessRunTimeException;
import com.jsh.erp.exception.JshException;
import com.jsh.erp.service.CommonQueryManager; import com.jsh.erp.service.CommonQueryManager;
import com.jsh.erp.service.app.AppService; import com.jsh.erp.service.app.AppService;
import com.jsh.erp.service.functions.FunctionsService; import com.jsh.erp.service.functions.FunctionsService;
@@ -52,10 +53,7 @@ public class UserBusinessService {
try{ try{
result=userBusinessMapper.selectByPrimaryKey(id); result=userBusinessMapper.selectByPrimaryKey(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return result; return result;
} }
@@ -67,10 +65,7 @@ public class UserBusinessService {
try{ try{
list=userBusinessMapper.selectByExample(example); list=userBusinessMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -82,10 +77,7 @@ public class UserBusinessService {
try{ try{
result=userBusinessMapper.insertSelective(userBusiness); result=userBusinessMapper.insertSelective(userBusiness);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
// 更新应用权限 // 更新应用权限
if (BusinessConstants.TYPE_NAME_ROLE_FUNCTIONS.equals(userBusiness.getType()) && result > 0) { if (BusinessConstants.TYPE_NAME_ROLE_FUNCTIONS.equals(userBusiness.getType()) && result > 0) {
@@ -102,10 +94,7 @@ public class UserBusinessService {
try{ try{
result=userBusinessMapper.updateByPrimaryKeySelective(userBusiness); result=userBusinessMapper.updateByPrimaryKeySelective(userBusiness);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
// 更新应用权限 // 更新应用权限
if (BusinessConstants.TYPE_NAME_ROLE_FUNCTIONS.equals(userBusiness.getType()) && result > 0) { if (BusinessConstants.TYPE_NAME_ROLE_FUNCTIONS.equals(userBusiness.getType()) && result > 0) {
@@ -120,10 +109,7 @@ public class UserBusinessService {
try{ try{
result=userBusinessMapper.deleteByPrimaryKey(id); result=userBusinessMapper.deleteByPrimaryKey(id);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -137,10 +123,7 @@ public class UserBusinessService {
try{ try{
result=userBusinessMapper.deleteByExample(example); result=userBusinessMapper.deleteByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -157,10 +140,7 @@ public class UserBusinessService {
try{ try{
list= userBusinessMapper.selectByExample(example); list= userBusinessMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -173,10 +153,7 @@ public class UserBusinessService {
try{ try{
list= userBusinessMapper.selectByExample(example); list= userBusinessMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
Long id = null; Long id = null;
if(list!=null&&list.size() > 0) { if(list!=null&&list.size() > 0) {
@@ -199,10 +176,7 @@ public class UserBusinessService {
try{ try{
list= userBusinessMapper.selectByExample(example); list= userBusinessMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
if(list!=null&&list.size() > 0) { if(list!=null&&list.size() > 0) {
return true; return true;
@@ -224,10 +198,7 @@ public class UserBusinessService {
try{ try{
result= userBusinessMapper.updateByExampleSelective(userBusiness, example); result= userBusinessMapper.updateByExampleSelective(userBusiness, example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -240,10 +211,7 @@ public class UserBusinessService {
try{ try{
list= userBusinessMapper.selectByExample(example); list= userBusinessMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -257,10 +225,7 @@ public class UserBusinessService {
try{ try{
list= userBusinessMapper.selectByExample(example); list= userBusinessMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.readFail(logger, e);
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
} }
return list; return list;
} }
@@ -276,10 +241,7 @@ public class UserBusinessService {
try{ try{
result= userBusinessMapperEx.batchDeleteUserBusinessByIds(new Date(),userInfo==null?null:userInfo.getId(),idArray); result= userBusinessMapperEx.batchDeleteUserBusinessByIds(new Date(),userInfo==null?null:userInfo.getId(),idArray);
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
return result; return result;
} }
@@ -324,10 +286,7 @@ public class UserBusinessService {
result = userBusinessMapper.insertSelective(userBusiness); result = userBusinessMapper.insertSelective(userBusiness);
} }
}catch(Exception e){ }catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]", JshException.writeFail(logger, e);
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
} }
} }
} }

View File

@@ -1,63 +0,0 @@
package com.jsh.erp.utils;
/**
* @author jishenghua
* @title: 平台异常基类
* @description: 用于包装一些异常信息,打印日志等服务
* @qq 7 5 2 7 1 8 9 2 0
* @since: 2014-02-24
*/
@SuppressWarnings("serial")
public class JshException extends Exception {
public long errorCode = -1;
public String message;
public JshException() {
super();
}
public JshException(String message) {
super(message);
this.message = message;
}
public JshException(String message, Throwable cause) {
super(message, cause);
this.message = message;
}
public JshException(Throwable cause) {
super(cause);
}
public JshException(long errorCode) {
super();
this.errorCode = errorCode;
}
public JshException(String message, long errorCode) {
super(message);
this.errorCode = errorCode;
this.message = message;
}
public JshException(String message, long errorCode, Throwable cause) {
super(message, cause);
this.errorCode = errorCode;
this.message = message;
}
public JshException(long errorCode, Throwable cause) {
super(cause);
this.errorCode = errorCode;
}
public long getErrorCode() {
return errorCode;
}
public String getMessage() {
return message;
}
}