给接口移除角色类型的参数逻辑

This commit is contained in:
季圣华
2023-11-18 21:22:17 +08:00
parent 8ccb855472
commit 2efb0894fe
11 changed files with 64 additions and 96 deletions

View File

@@ -107,7 +107,6 @@ public class DepotHeadController {
@RequestParam(value = "depotId", required = false) Long depotId, @RequestParam(value = "depotId", required = false) Long depotId,
@RequestParam("beginTime") String beginTime, @RequestParam("beginTime") String beginTime,
@RequestParam("endTime") String endTime, @RequestParam("endTime") String endTime,
@RequestParam(value = "roleType", required = false) String roleType,
@RequestParam("type") String type, @RequestParam("type") String type,
@RequestParam(value = "creator", required = false) Long creator, @RequestParam(value = "creator", required = false) Long creator,
@RequestParam("remark") String remark, @RequestParam("remark") String remark,
@@ -127,7 +126,7 @@ public class DepotHeadController {
} }
} }
List<DepotHeadVo4InDetail> resList = new ArrayList<DepotHeadVo4InDetail>(); List<DepotHeadVo4InDetail> resList = new ArrayList<DepotHeadVo4InDetail>();
String [] creatorArray = depotHeadService.getCreatorArray(roleType); String [] creatorArray = depotHeadService.getCreatorArray();
String subType = "出库".equals(type)? "销售" : ""; String subType = "出库".equals(type)? "销售" : "";
String [] organArray = depotHeadService.getOrganArray(subType, ""); String [] organArray = depotHeadService.getOrganArray(subType, "");
beginTime = Tools.parseDayToTime(beginTime, BusinessConstants.DAY_FIRST_TIME); beginTime = Tools.parseDayToTime(beginTime, BusinessConstants.DAY_FIRST_TIME);
@@ -178,7 +177,6 @@ public class DepotHeadController {
@RequestParam("beginTime") String beginTime, @RequestParam("beginTime") String beginTime,
@RequestParam("endTime") String endTime, @RequestParam("endTime") String endTime,
@RequestParam("type") String type, @RequestParam("type") String type,
@RequestParam(value = "roleType", required = false) String roleType,
HttpServletRequest request)throws Exception { HttpServletRequest request)throws Exception {
BaseResponseInfo res = new BaseResponseInfo(); BaseResponseInfo res = new BaseResponseInfo();
Map<String, Object> map = new HashMap<String, Object>(); Map<String, Object> map = new HashMap<String, Object>();
@@ -198,9 +196,9 @@ public class DepotHeadController {
endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME); endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME);
Boolean forceFlag = systemConfigService.getForceApprovalFlag(); Boolean forceFlag = systemConfigService.getForceApprovalFlag();
List<DepotHeadVo4InOutMCount> list = depotHeadService.findInOutMaterialCount(beginTime, endTime, type, forceFlag, StringUtil.toNull(materialParam), List<DepotHeadVo4InOutMCount> list = depotHeadService.findInOutMaterialCount(beginTime, endTime, type, forceFlag, StringUtil.toNull(materialParam),
depotList, oId, roleType, (currentPage-1)*pageSize, pageSize); depotList, oId, (currentPage-1)*pageSize, pageSize);
int total = depotHeadService.findInOutMaterialCountTotal(beginTime, endTime, type, forceFlag, StringUtil.toNull(materialParam), int total = depotHeadService.findInOutMaterialCountTotal(beginTime, endTime, type, forceFlag, StringUtil.toNull(materialParam),
depotList, oId, roleType); depotList, oId);
map.put("total", total); map.put("total", total);
map.put("rows", list); map.put("rows", list);
res.code = 200; res.code = 200;
@@ -238,7 +236,6 @@ public class DepotHeadController {
@RequestParam("beginTime") String beginTime, @RequestParam("beginTime") String beginTime,
@RequestParam("endTime") String endTime, @RequestParam("endTime") String endTime,
@RequestParam("subType") String subType, @RequestParam("subType") String subType,
@RequestParam(value = "roleType", required = false) String roleType,
@RequestParam("remark") String remark, @RequestParam("remark") String remark,
HttpServletRequest request)throws Exception { HttpServletRequest request)throws Exception {
BaseResponseInfo res = new BaseResponseInfo(); BaseResponseInfo res = new BaseResponseInfo();
@@ -266,7 +263,7 @@ public class DepotHeadController {
depotFList.add(object.getLong("id")); depotFList.add(object.getLong("id"));
} }
} }
String [] creatorArray = depotHeadService.getCreatorArray(roleType); String [] creatorArray = depotHeadService.getCreatorArray();
beginTime = Tools.parseDayToTime(beginTime, BusinessConstants.DAY_FIRST_TIME); beginTime = Tools.parseDayToTime(beginTime, BusinessConstants.DAY_FIRST_TIME);
endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME); endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME);
Boolean forceFlag = systemConfigService.getForceApprovalFlag(); Boolean forceFlag = systemConfigService.getForceApprovalFlag();
@@ -464,8 +461,7 @@ public class DepotHeadController {
*/ */
@GetMapping(value = "/getBuyAndSaleStatistics") @GetMapping(value = "/getBuyAndSaleStatistics")
@ApiOperation(value = "统计今日采购额、昨日采购额、本月采购额、今年采购额|销售额|零售额") @ApiOperation(value = "统计今日采购额、昨日采购额、本月采购额、今年采购额|销售额|零售额")
public BaseResponseInfo getBuyAndSaleStatistics(@RequestParam(value = "roleType", required = false) String roleType, public BaseResponseInfo getBuyAndSaleStatistics(HttpServletRequest request) {
HttpServletRequest request) {
BaseResponseInfo res = new BaseResponseInfo(); BaseResponseInfo res = new BaseResponseInfo();
try { try {
String today = Tools.getNow() + BusinessConstants.DAY_FIRST_TIME; String today = Tools.getNow() + BusinessConstants.DAY_FIRST_TIME;
@@ -475,7 +471,7 @@ public class DepotHeadController {
String yearBegin = Tools.getYearBegin() + BusinessConstants.DAY_FIRST_TIME; String yearBegin = Tools.getYearBegin() + BusinessConstants.DAY_FIRST_TIME;
String yearEnd = Tools.getYearEnd() + BusinessConstants.DAY_LAST_TIME; String yearEnd = Tools.getYearEnd() + BusinessConstants.DAY_LAST_TIME;
Map<String, Object> map = depotHeadService.getBuyAndSaleStatistics(today, monthFirstDay, Map<String, Object> map = depotHeadService.getBuyAndSaleStatistics(today, monthFirstDay,
yesterdayBegin, yesterdayEnd, yearBegin, yearEnd, roleType, request); yesterdayBegin, yesterdayEnd, yearBegin, yearEnd, request);
res.code = 200; res.code = 200;
res.data = map; res.data = map;
} catch(Exception e){ } catch(Exception e){
@@ -494,15 +490,10 @@ public class DepotHeadController {
*/ */
@GetMapping(value = "/getCreatorByCurrentUser") @GetMapping(value = "/getCreatorByCurrentUser")
@ApiOperation(value = "根据当前用户获取操作员数组") @ApiOperation(value = "根据当前用户获取操作员数组")
public BaseResponseInfo getCreatorByRoleType(HttpServletRequest request) { public BaseResponseInfo getCreatorByCurrentUser(HttpServletRequest request) {
BaseResponseInfo res = new BaseResponseInfo(); BaseResponseInfo res = new BaseResponseInfo();
Map<String, Object> map = new HashMap<String, Object>();
try { try {
String creator = ""; String creator = depotHeadService.getCreatorByCurrentUser();
String roleType = redisService.getObjectFromSessionByKey(request,"roleType").toString();
if(StringUtil.isNotEmpty(roleType)) {
creator = depotHeadService.getCreatorByRoleType(roleType);
}
res.code = 200; res.code = 200;
res.data = creator; res.data = creator;
} catch (Exception e) { } catch (Exception e) {
@@ -533,11 +524,10 @@ public class DepotHeadController {
String number = StringUtil.getInfo(search, "number"); String number = StringUtil.getInfo(search, "number");
String beginTime = StringUtil.getInfo(search, "beginTime"); String beginTime = StringUtil.getInfo(search, "beginTime");
String endTime = StringUtil.getInfo(search, "endTime"); String endTime = StringUtil.getInfo(search, "endTime");
String roleType = StringUtil.getInfo(search, "roleType");
String status = StringUtil.getInfo(search, "status"); String status = StringUtil.getInfo(search, "status");
List<DepotHeadVo4List> list = depotHeadService.debtList(organId, materialParam, number, beginTime, endTime, roleType, List<DepotHeadVo4List> list = depotHeadService.debtList(organId, materialParam, number, beginTime, endTime,
status, (currentPage-1)*pageSize, pageSize); status, (currentPage-1)*pageSize, pageSize);
int total = depotHeadService.debtListCount(organId, materialParam, number, beginTime, endTime, roleType, status); int total = depotHeadService.debtListCount(organId, materialParam, number, beginTime, endTime, status);
if (list != null) { if (list != null) {
objectMap.put("rows", list); objectMap.put("rows", list);
objectMap.put("total", total); objectMap.put("total", total);
@@ -558,7 +548,6 @@ public class DepotHeadController {
* @param subType * @param subType
* @param beginTime * @param beginTime
* @param endTime * @param endTime
* @param roleType
* @param status * @param status
* @param mpList * @param mpList
* @param request * @param request
@@ -574,12 +563,11 @@ public class DepotHeadController {
@RequestParam(value = "subType", required = false) String subType, @RequestParam(value = "subType", required = false) String subType,
@RequestParam(value = "beginTime", required = false) String beginTime, @RequestParam(value = "beginTime", required = false) String beginTime,
@RequestParam(value = "endTime", required = false) String endTime, @RequestParam(value = "endTime", required = false) String endTime,
@RequestParam(value = "roleType", required = false) String roleType,
@RequestParam(value = "status", required = false) String status, @RequestParam(value = "status", required = false) String status,
@RequestParam(value = "mpList", required = false) String mpList, @RequestParam(value = "mpList", required = false) String mpList,
HttpServletRequest request, HttpServletResponse response)throws Exception { HttpServletRequest request, HttpServletResponse response)throws Exception {
try { try {
depotHeadService.debtExport(organId, materialParam, number, type, subType, beginTime, endTime, roleType, depotHeadService.debtExport(organId, materialParam, number, type, subType, beginTime, endTime,
status, mpList, request, response); status, mpList, request, response);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();

View File

@@ -481,14 +481,13 @@ public class DepotItemController {
@RequestParam(value = "depotId", required = false) Long depotId, @RequestParam(value = "depotId", required = false) Long depotId,
@RequestParam("materialParam") String materialParam, @RequestParam("materialParam") String materialParam,
@RequestParam("mpList") String mpList, @RequestParam("mpList") String mpList,
@RequestParam(value = "roleType", required = false) String roleType,
HttpServletRequest request)throws Exception { HttpServletRequest request)throws Exception {
BaseResponseInfo res = new BaseResponseInfo(); BaseResponseInfo res = new BaseResponseInfo();
Map<String, Object> map = new HashMap<String, Object>(); Map<String, Object> map = new HashMap<String, Object>();
beginTime = Tools.parseDayToTime(beginTime, BusinessConstants.DAY_FIRST_TIME); beginTime = Tools.parseDayToTime(beginTime, BusinessConstants.DAY_FIRST_TIME);
endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME); endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME);
try { try {
String [] creatorArray = depotHeadService.getCreatorArray(roleType); String [] creatorArray = depotHeadService.getCreatorArray();
String [] organArray = null; String [] organArray = null;
List<Long> depotList = depotService.parseDepotList(depotId); List<Long> depotList = depotService.parseDepotList(depotId);
Boolean forceFlag = systemConfigService.getForceApprovalFlag(); Boolean forceFlag = systemConfigService.getForceApprovalFlag();
@@ -562,14 +561,13 @@ public class DepotItemController {
@RequestParam(value = "depotId", required = false) Long depotId, @RequestParam(value = "depotId", required = false) Long depotId,
@RequestParam("materialParam") String materialParam, @RequestParam("materialParam") String materialParam,
@RequestParam("mpList") String mpList, @RequestParam("mpList") String mpList,
@RequestParam(value = "roleType", required = false) String roleType,
HttpServletRequest request)throws Exception { HttpServletRequest request)throws Exception {
BaseResponseInfo res = new BaseResponseInfo(); BaseResponseInfo res = new BaseResponseInfo();
Map<String, Object> map = new HashMap<String, Object>(); Map<String, Object> map = new HashMap<String, Object>();
beginTime = Tools.parseDayToTime(beginTime, BusinessConstants.DAY_FIRST_TIME); beginTime = Tools.parseDayToTime(beginTime, BusinessConstants.DAY_FIRST_TIME);
endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME); endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME);
try { try {
String [] creatorArray = depotHeadService.getCreatorArray(roleType); String [] creatorArray = depotHeadService.getCreatorArray();
String [] organArray = null; String [] organArray = null;
List<Long> depotList = depotService.parseDepotList(depotId); List<Long> depotList = depotService.parseDepotList(depotId);
Boolean forceFlag = systemConfigService.getForceApprovalFlag(); Boolean forceFlag = systemConfigService.getForceApprovalFlag();
@@ -644,14 +642,13 @@ public class DepotItemController {
@RequestParam(value = "depotId", required = false) Long depotId, @RequestParam(value = "depotId", required = false) Long depotId,
@RequestParam("materialParam") String materialParam, @RequestParam("materialParam") String materialParam,
@RequestParam("mpList") String mpList, @RequestParam("mpList") String mpList,
@RequestParam(value = "roleType", required = false) String roleType,
HttpServletRequest request)throws Exception { HttpServletRequest request)throws Exception {
BaseResponseInfo res = new BaseResponseInfo(); BaseResponseInfo res = new BaseResponseInfo();
Map<String, Object> map = new HashMap<String, Object>(); Map<String, Object> map = new HashMap<String, Object>();
beginTime = Tools.parseDayToTime(beginTime, BusinessConstants.DAY_FIRST_TIME); beginTime = Tools.parseDayToTime(beginTime, BusinessConstants.DAY_FIRST_TIME);
endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME); endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME);
try { try {
String [] creatorArray = depotHeadService.getCreatorArray(roleType); String [] creatorArray = depotHeadService.getCreatorArray();
String [] organArray = depotHeadService.getOrganArray("销售", ""); String [] organArray = depotHeadService.getOrganArray("销售", "");
List<Long> depotList = depotService.parseDepotList(depotId); List<Long> depotList = depotService.parseDepotList(depotId);
Boolean forceFlag = systemConfigService.getForceApprovalFlag(); Boolean forceFlag = systemConfigService.getForceApprovalFlag();
@@ -789,8 +786,8 @@ public class DepotItemController {
*/ */
@GetMapping(value = "/buyOrSalePrice") @GetMapping(value = "/buyOrSalePrice")
@ApiOperation(value = "统计采购、销售、零售的总金额") @ApiOperation(value = "统计采购、销售、零售的总金额")
public BaseResponseInfo buyOrSalePrice(@RequestParam(value = "roleType", required = false) String roleType, public BaseResponseInfo buyOrSalePrice(HttpServletRequest request,
HttpServletRequest request, HttpServletResponse response)throws Exception { HttpServletResponse response)throws Exception {
BaseResponseInfo res = new BaseResponseInfo(); BaseResponseInfo res = new BaseResponseInfo();
Map<String, Object> map = new HashMap<String, Object>(); Map<String, Object> map = new HashMap<String, Object>();
try { try {
@@ -800,8 +797,8 @@ public class DepotItemController {
JSONArray buyPriceList = new JSONArray(); JSONArray buyPriceList = new JSONArray();
for(String month: list) { for(String month: list) {
JSONObject obj = new JSONObject(); JSONObject obj = new JSONObject();
BigDecimal outPrice = depotItemService.inOrOutPrice("入库", "采购", month, roleType); BigDecimal outPrice = depotItemService.inOrOutPrice("入库", "采购", month);
BigDecimal inPrice = depotItemService.inOrOutPrice("出库", "采购退货", month, roleType); BigDecimal inPrice = depotItemService.inOrOutPrice("出库", "采购退货", month);
obj.put("x", month); obj.put("x", month);
obj.put("y", roleService.parseHomePriceByLimit(outPrice.subtract(inPrice), "buy", priceLimit, "***", request)); obj.put("y", roleService.parseHomePriceByLimit(outPrice.subtract(inPrice), "buy", priceLimit, "***", request));
buyPriceList.add(obj); buyPriceList.add(obj);
@@ -810,8 +807,8 @@ public class DepotItemController {
JSONArray salePriceList = new JSONArray(); JSONArray salePriceList = new JSONArray();
for(String month: list) { for(String month: list) {
JSONObject obj = new JSONObject(); JSONObject obj = new JSONObject();
BigDecimal outPrice = depotItemService.inOrOutPrice("出库", "销售", month, roleType); BigDecimal outPrice = depotItemService.inOrOutPrice("出库", "销售", month);
BigDecimal inPrice = depotItemService.inOrOutPrice("入库", "销售退货", month, roleType); BigDecimal inPrice = depotItemService.inOrOutPrice("入库", "销售退货", month);
obj.put("x", month); obj.put("x", month);
obj.put("y", roleService.parseHomePriceByLimit(outPrice.subtract(inPrice), "sale", priceLimit, "***", request)); obj.put("y", roleService.parseHomePriceByLimit(outPrice.subtract(inPrice), "sale", priceLimit, "***", request));
salePriceList.add(obj); salePriceList.add(obj);
@@ -820,8 +817,8 @@ public class DepotItemController {
JSONArray retailPriceList = new JSONArray(); JSONArray retailPriceList = new JSONArray();
for(String month: list) { for(String month: list) {
JSONObject obj = new JSONObject(); JSONObject obj = new JSONObject();
BigDecimal outPrice = depotItemService.inOrOutRetailPrice("出库", "零售", month, roleType); BigDecimal outPrice = depotItemService.inOrOutRetailPrice("出库", "零售", month);
BigDecimal inPrice = depotItemService.inOrOutRetailPrice("入库", "零售退货", month, roleType); BigDecimal inPrice = depotItemService.inOrOutRetailPrice("入库", "零售退货", month);
obj.put("x", month); obj.put("x", month);
obj.put("y", roleService.parseHomePriceByLimit(outPrice.subtract(inPrice), "retail", priceLimit, "***", request)); obj.put("y", roleService.parseHomePriceByLimit(outPrice.subtract(inPrice), "retail", priceLimit, "***", request));
retailPriceList.add(obj); retailPriceList.add(obj);

View File

@@ -152,7 +152,6 @@ public class UserController {
BaseResponseInfo res = new BaseResponseInfo(); BaseResponseInfo res = new BaseResponseInfo();
try { try {
redisService.deleteObjectBySession(request,"userId"); redisService.deleteObjectBySession(request,"userId");
redisService.deleteObjectBySession(request,"roleType");
redisService.deleteObjectBySession(request,"clientIp"); redisService.deleteObjectBySession(request,"clientIp");
} catch(Exception e){ } catch(Exception e){
e.printStackTrace(); e.printStackTrace();
@@ -375,7 +374,8 @@ public class UserController {
BaseResponseInfo res = new BaseResponseInfo(); BaseResponseInfo res = new BaseResponseInfo();
try { try {
Map<String, Object> data = new HashMap<String, Object>(); Map<String, Object> data = new HashMap<String, Object>();
String roleType = redisService.getObjectFromSessionByKey(request,"roleType").toString(); Long userId = userService.getUserId(request);
String roleType = userService.getRoleTypeByUserId(userId).getType(); //角色类型
data.put("roleType", roleType); data.put("roleType", roleType);
res.code = 200; res.code = 200;
res.data = data; res.data = data;
@@ -453,7 +453,6 @@ public class UserController {
if(tenant.getExpireTime()!=null && tenant.getExpireTime().getTime()<System.currentTimeMillis()){ if(tenant.getExpireTime()!=null && tenant.getExpireTime().getTime()<System.currentTimeMillis()){
//租户已经过期移除token //租户已经过期移除token
redisService.deleteObjectBySession(request,"userId"); redisService.deleteObjectBySession(request,"userId");
redisService.deleteObjectBySession(request,"roleType");
redisService.deleteObjectBySession(request,"clientIp"); redisService.deleteObjectBySession(request,"clientIp");
} }
data.put("type", tenant.getType()); //租户类型0免费租户1付费租户 data.put("type", tenant.getType()); //租户类型0免费租户1付费租户

View File

@@ -32,7 +32,6 @@ public class AccountHeadComponent implements ICommonQuery {
private List<?> getAccountHeadList(Map<String, String> map)throws Exception { private List<?> getAccountHeadList(Map<String, String> map)throws Exception {
String search = map.get(Constants.SEARCH); String search = map.get(Constants.SEARCH);
String type = StringUtil.getInfo(search, "type"); String type = StringUtil.getInfo(search, "type");
String roleType = StringUtil.getInfo(search, "roleType");
String billNo = StringUtil.getInfo(search, "billNo"); String billNo = StringUtil.getInfo(search, "billNo");
String beginTime = StringUtil.getInfo(search, "beginTime"); String beginTime = StringUtil.getInfo(search, "beginTime");
String endTime = StringUtil.getInfo(search, "endTime"); String endTime = StringUtil.getInfo(search, "endTime");
@@ -43,7 +42,7 @@ public class AccountHeadComponent implements ICommonQuery {
String status = StringUtil.getInfo(search, "status"); String status = StringUtil.getInfo(search, "status");
String remark = StringUtil.getInfo(search, "remark"); String remark = StringUtil.getInfo(search, "remark");
String number = StringUtil.getInfo(search, "number"); String number = StringUtil.getInfo(search, "number");
return accountHeadService.select(type, roleType, billNo, beginTime, endTime, organId, creator, handsPersonId, return accountHeadService.select(type, billNo, beginTime, endTime, organId, creator, handsPersonId,
accountId, status, remark, number, QueryUtils.offset(map), QueryUtils.rows(map)); accountId, status, remark, number, QueryUtils.offset(map), QueryUtils.rows(map));
} }
@@ -51,7 +50,6 @@ public class AccountHeadComponent implements ICommonQuery {
public Long counts(Map<String, String> map)throws Exception { public Long counts(Map<String, String> map)throws Exception {
String search = map.get(Constants.SEARCH); String search = map.get(Constants.SEARCH);
String type = StringUtil.getInfo(search, "type"); String type = StringUtil.getInfo(search, "type");
String roleType = StringUtil.getInfo(search, "roleType");
String billNo = StringUtil.getInfo(search, "billNo"); String billNo = StringUtil.getInfo(search, "billNo");
String beginTime = StringUtil.getInfo(search, "beginTime"); String beginTime = StringUtil.getInfo(search, "beginTime");
String endTime = StringUtil.getInfo(search, "endTime"); String endTime = StringUtil.getInfo(search, "endTime");
@@ -62,7 +60,7 @@ public class AccountHeadComponent implements ICommonQuery {
String status = StringUtil.getInfo(search, "status"); String status = StringUtil.getInfo(search, "status");
String remark = StringUtil.getInfo(search, "remark"); String remark = StringUtil.getInfo(search, "remark");
String number = StringUtil.getInfo(search, "number"); String number = StringUtil.getInfo(search, "number");
return accountHeadService.countAccountHead(type, roleType, billNo, beginTime, endTime, organId, creator, handsPersonId, return accountHeadService.countAccountHead(type, billNo, beginTime, endTime, organId, creator, handsPersonId,
accountId, status, remark, number); accountId, status, remark, number);
} }

View File

@@ -89,12 +89,12 @@ public class AccountHeadService {
return list; return list;
} }
public List<AccountHeadVo4ListEx> select(String type, String roleType, String billNo, String beginTime, String endTime, public List<AccountHeadVo4ListEx> select(String type, String billNo, String beginTime, String endTime,
Long organId, Long creator, Long handsPersonId, Long accountId, String status, Long organId, Long creator, Long handsPersonId, Long accountId, String status,
String remark, String number, int offset, int rows) throws Exception{ String remark, String number, int offset, int rows) throws Exception{
List<AccountHeadVo4ListEx> resList = new ArrayList<>(); List<AccountHeadVo4ListEx> resList = new ArrayList<>();
try{ try{
String [] creatorArray = getCreatorArray(roleType); String [] creatorArray = getCreatorArray();
beginTime = Tools.parseDayToTime(beginTime,BusinessConstants.DAY_FIRST_TIME); beginTime = Tools.parseDayToTime(beginTime,BusinessConstants.DAY_FIRST_TIME);
endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME); endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME);
List<AccountHeadVo4ListEx> list = accountHeadMapperEx.selectByConditionAccountHead(type, creatorArray, billNo, List<AccountHeadVo4ListEx> list = accountHeadMapperEx.selectByConditionAccountHead(type, creatorArray, billNo,
@@ -131,12 +131,12 @@ public class AccountHeadService {
return resList; return resList;
} }
public Long countAccountHead(String type, String roleType, String billNo, String beginTime, String endTime, public Long countAccountHead(String type, String billNo, String beginTime, String endTime,
Long organId, Long creator, Long handsPersonId, Long accountId, String status, Long organId, Long creator, Long handsPersonId, Long accountId, String status,
String remark, String number) throws Exception{ String remark, String number) throws Exception{
Long result=null; Long result=null;
try{ try{
String [] creatorArray = getCreatorArray(roleType); String [] creatorArray = getCreatorArray();
beginTime = Tools.parseDayToTime(beginTime,BusinessConstants.DAY_FIRST_TIME); beginTime = Tools.parseDayToTime(beginTime,BusinessConstants.DAY_FIRST_TIME);
endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME); endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME);
result = accountHeadMapperEx.countsByAccountHead(type, creatorArray, billNo, result = accountHeadMapperEx.countsByAccountHead(type, creatorArray, billNo,
@@ -149,17 +149,13 @@ public class AccountHeadService {
/** /**
* 根据角色类型获取操作员数组 * 根据角色类型获取操作员数组
* @param roleType
* @return * @return
* @throws Exception * @throws Exception
*/ */
private String[] getCreatorArray(String roleType) throws Exception { private String[] getCreatorArray() throws Exception {
String creator = ""; String creator = "";
User user = userService.getCurrentUser(); User user = userService.getCurrentUser();
//再从后端获取一次角色类型,防止前端关闭了缓存功能 String roleType = userService.getRoleTypeByUserId(user.getId()).getType(); //角色类型
if(StringUtil.isEmpty(roleType)) {
roleType = userService.getRoleTypeByUserId(user.getId()).getType(); //角色类型
}
if(BusinessConstants.ROLE_TYPE_PRIVATE.equals(roleType)) { if(BusinessConstants.ROLE_TYPE_PRIVATE.equals(roleType)) {
creator = user.getId().toString(); creator = user.getId().toString();
} else if(BusinessConstants.ROLE_TYPE_THIS_ORG.equals(roleType)) { } else if(BusinessConstants.ROLE_TYPE_THIS_ORG.equals(roleType)) {

View File

@@ -33,7 +33,6 @@ public class DepotHeadComponent implements ICommonQuery {
String search = map.get(Constants.SEARCH); String search = map.get(Constants.SEARCH);
String type = StringUtil.getInfo(search, "type"); String type = StringUtil.getInfo(search, "type");
String subType = StringUtil.getInfo(search, "subType"); String subType = StringUtil.getInfo(search, "subType");
String roleType = StringUtil.getInfo(search, "roleType");
String hasDebt = StringUtil.getInfo(search, "hasDebt"); String hasDebt = StringUtil.getInfo(search, "hasDebt");
String status = StringUtil.getInfo(search, "status"); String status = StringUtil.getInfo(search, "status");
String purchaseStatus = StringUtil.getInfo(search, "purchaseStatus"); String purchaseStatus = StringUtil.getInfo(search, "purchaseStatus");
@@ -47,7 +46,7 @@ public class DepotHeadComponent implements ICommonQuery {
Long depotId = StringUtil.parseStrLong(StringUtil.getInfo(search, "depotId")); Long depotId = StringUtil.parseStrLong(StringUtil.getInfo(search, "depotId"));
Long accountId = StringUtil.parseStrLong(StringUtil.getInfo(search, "accountId")); Long accountId = StringUtil.parseStrLong(StringUtil.getInfo(search, "accountId"));
String remark = StringUtil.getInfo(search, "remark"); String remark = StringUtil.getInfo(search, "remark");
return depotHeadService.select(type, subType, roleType, hasDebt, status, purchaseStatus, number, linkNumber, return depotHeadService.select(type, subType, hasDebt, status, purchaseStatus, number, linkNumber,
beginTime, endTime, materialParam, organId, creator, depotId, accountId, remark, QueryUtils.offset(map), QueryUtils.rows(map)); beginTime, endTime, materialParam, organId, creator, depotId, accountId, remark, QueryUtils.offset(map), QueryUtils.rows(map));
} }
@@ -56,7 +55,6 @@ public class DepotHeadComponent implements ICommonQuery {
String search = map.get(Constants.SEARCH); String search = map.get(Constants.SEARCH);
String type = StringUtil.getInfo(search, "type"); String type = StringUtil.getInfo(search, "type");
String subType = StringUtil.getInfo(search, "subType"); String subType = StringUtil.getInfo(search, "subType");
String roleType = StringUtil.getInfo(search, "roleType");
String hasDebt = StringUtil.getInfo(search, "hasDebt"); String hasDebt = StringUtil.getInfo(search, "hasDebt");
String status = StringUtil.getInfo(search, "status"); String status = StringUtil.getInfo(search, "status");
String purchaseStatus = StringUtil.getInfo(search, "purchaseStatus"); String purchaseStatus = StringUtil.getInfo(search, "purchaseStatus");
@@ -70,7 +68,7 @@ public class DepotHeadComponent implements ICommonQuery {
Long depotId = StringUtil.parseStrLong(StringUtil.getInfo(search, "depotId")); Long depotId = StringUtil.parseStrLong(StringUtil.getInfo(search, "depotId"));
Long accountId = StringUtil.parseStrLong(StringUtil.getInfo(search, "accountId")); Long accountId = StringUtil.parseStrLong(StringUtil.getInfo(search, "accountId"));
String remark = StringUtil.getInfo(search, "remark"); String remark = StringUtil.getInfo(search, "remark");
return depotHeadService.countDepotHead(type, subType, roleType, hasDebt, status, purchaseStatus, number, linkNumber, return depotHeadService.countDepotHead(type, subType, hasDebt, status, purchaseStatus, number, linkNumber,
beginTime, endTime, materialParam, organId, creator, depotId, accountId, remark); beginTime, endTime, materialParam, organId, creator, depotId, accountId, remark);
} }

View File

@@ -109,7 +109,7 @@ public class DepotHeadService {
return list; return list;
} }
public List<DepotHeadVo4List> select(String type, String subType, String roleType, String hasDebt, String status, String purchaseStatus, String number, String linkNumber, public List<DepotHeadVo4List> select(String type, String subType, String hasDebt, String status, String purchaseStatus, String number, String linkNumber,
String beginTime, String endTime, String materialParam, Long organId, Long creator, Long depotId, Long accountId, String remark, int offset, int rows) throws Exception { String beginTime, String endTime, String materialParam, Long organId, Long creator, Long depotId, Long accountId, String remark, int offset, int rows) throws Exception {
List<DepotHeadVo4List> resList = new ArrayList<>(); List<DepotHeadVo4List> resList = new ArrayList<>();
try{ try{
@@ -118,7 +118,7 @@ public class DepotHeadService {
String priceLimit = userService.getRoleTypeByUserId(userId).getPriceLimit(); String priceLimit = userService.getRoleTypeByUserId(userId).getPriceLimit();
String billCategory = getBillCategory(subType); String billCategory = getBillCategory(subType);
String [] depotArray = getDepotArray(subType); String [] depotArray = getDepotArray(subType);
String [] creatorArray = getCreatorArray(roleType); String [] creatorArray = getCreatorArray();
String [] statusArray = StringUtil.isNotEmpty(status) ? status.split(",") : null; String [] statusArray = StringUtil.isNotEmpty(status) ? status.split(",") : null;
String [] purchaseStatusArray = StringUtil.isNotEmpty(purchaseStatus) ? purchaseStatus.split(",") : null; String [] purchaseStatusArray = StringUtil.isNotEmpty(purchaseStatus) ? purchaseStatus.split(",") : null;
String [] organArray = getOrganArray(subType, purchaseStatus); String [] organArray = getOrganArray(subType, purchaseStatus);
@@ -221,12 +221,12 @@ public class DepotHeadService {
return resList; return resList;
} }
public Long countDepotHead(String type, String subType, String roleType, String hasDebt, String status, String purchaseStatus, String number, String linkNumber, public Long countDepotHead(String type, String subType, String hasDebt, String status, String purchaseStatus, String number, String linkNumber,
String beginTime, String endTime, String materialParam, Long organId, Long creator, Long depotId, Long accountId, String remark) throws Exception{ String beginTime, String endTime, String materialParam, Long organId, Long creator, Long depotId, Long accountId, String remark) throws Exception{
Long result=null; Long result=null;
try{ try{
String [] depotArray = getDepotArray(subType); String [] depotArray = getDepotArray(subType);
String [] creatorArray = getCreatorArray(roleType); String [] creatorArray = getCreatorArray();
String [] statusArray = StringUtil.isNotEmpty(status) ? status.split(",") : null; String [] statusArray = StringUtil.isNotEmpty(status) ? status.split(",") : null;
String [] purchaseStatusArray = StringUtil.isNotEmpty(purchaseStatus) ? purchaseStatus.split(",") : null; String [] purchaseStatusArray = StringUtil.isNotEmpty(purchaseStatus) ? purchaseStatus.split(",") : null;
String [] organArray = getOrganArray(subType, purchaseStatus); String [] organArray = getOrganArray(subType, purchaseStatus);
@@ -257,12 +257,11 @@ public class DepotHeadService {
/** /**
* 根据角色类型获取操作员数组 * 根据角色类型获取操作员数组
* @param roleType
* @return * @return
* @throws Exception * @throws Exception
*/ */
public String[] getCreatorArray(String roleType) throws Exception { public String[] getCreatorArray() throws Exception {
String creator = getCreatorByRoleType(roleType); String creator = getCreatorByCurrentUser();
String [] creatorArray=null; String [] creatorArray=null;
if(StringUtil.isNotEmpty(creator)){ if(StringUtil.isNotEmpty(creator)){
creatorArray = creator.split(","); creatorArray = creator.split(",");
@@ -305,17 +304,13 @@ public class DepotHeadService {
/** /**
* 根据角色类型获取操作员 * 根据角色类型获取操作员
* @param roleType
* @return * @return
* @throws Exception * @throws Exception
*/ */
public String getCreatorByRoleType(String roleType) throws Exception { public String getCreatorByCurrentUser() throws Exception {
String creator = ""; String creator = "";
User user = userService.getCurrentUser(); User user = userService.getCurrentUser();
//再从后端获取一次角色类型,防止前端关闭了缓存功能 String roleType = userService.getRoleTypeByUserId(user.getId()).getType(); //角色类型
if(StringUtil.isEmpty(roleType)) {
roleType = userService.getRoleTypeByUserId(user.getId()).getType(); //角色类型
}
if(BusinessConstants.ROLE_TYPE_PRIVATE.equals(roleType)) { if(BusinessConstants.ROLE_TYPE_PRIVATE.equals(roleType)) {
creator = user.getId().toString(); creator = user.getId().toString();
} else if(BusinessConstants.ROLE_TYPE_THIS_ORG.equals(roleType)) { } else if(BusinessConstants.ROLE_TYPE_THIS_ORG.equals(roleType)) {
@@ -677,10 +672,10 @@ public class DepotHeadService {
} }
public List<DepotHeadVo4InOutMCount> findInOutMaterialCount(String beginTime, String endTime, String type, Boolean forceFlag, String materialParam, public List<DepotHeadVo4InOutMCount> findInOutMaterialCount(String beginTime, String endTime, String type, Boolean forceFlag, String materialParam,
List<Long> depotList, Integer oId, String roleType, Integer offset, Integer rows)throws Exception { List<Long> depotList, Integer oId, Integer offset, Integer rows)throws Exception {
List<DepotHeadVo4InOutMCount> list = null; List<DepotHeadVo4InOutMCount> list = null;
try{ try{
String [] creatorArray = getCreatorArray(roleType); String [] creatorArray = getCreatorArray();
String subType = "出库".equals(type)? "销售" : ""; String subType = "出库".equals(type)? "销售" : "";
String [] organArray = getOrganArray(subType, ""); String [] organArray = getOrganArray(subType, "");
list =depotHeadMapperEx.findInOutMaterialCount(beginTime, endTime, type, forceFlag, materialParam, depotList, oId, list =depotHeadMapperEx.findInOutMaterialCount(beginTime, endTime, type, forceFlag, materialParam, depotList, oId,
@@ -692,10 +687,10 @@ public class DepotHeadService {
} }
public int findInOutMaterialCountTotal(String beginTime, String endTime, String type, Boolean forceFlag, String materialParam, public int findInOutMaterialCountTotal(String beginTime, String endTime, String type, Boolean forceFlag, String materialParam,
List<Long> depotList, Integer oId, String roleType)throws Exception { List<Long> depotList, Integer oId)throws Exception {
int result = 0; int result = 0;
try{ try{
String [] creatorArray = getCreatorArray(roleType); String [] creatorArray = getCreatorArray();
String subType = "出库".equals(type)? "销售" : ""; String subType = "出库".equals(type)? "销售" : "";
String [] organArray = getOrganArray(subType, ""); String [] organArray = getOrganArray(subType, "");
result =depotHeadMapperEx.findInOutMaterialCountTotal(beginTime, endTime, type, forceFlag, materialParam, depotList, oId, result =depotHeadMapperEx.findInOutMaterialCountTotal(beginTime, endTime, type, forceFlag, materialParam, depotList, oId,
@@ -1132,10 +1127,10 @@ public class DepotHeadService {
} }
public Map<String, Object> getBuyAndSaleStatistics(String today, String monthFirstDay, String yesterdayBegin, String yesterdayEnd, public Map<String, Object> getBuyAndSaleStatistics(String today, String monthFirstDay, String yesterdayBegin, String yesterdayEnd,
String yearBegin, String yearEnd, String roleType, HttpServletRequest request) throws Exception { String yearBegin, String yearEnd, HttpServletRequest request) throws Exception {
Long userId = userService.getUserId(request); Long userId = userService.getUserId(request);
String priceLimit = userService.getRoleTypeByUserId(userId).getPriceLimit(); String priceLimit = userService.getRoleTypeByUserId(userId).getPriceLimit();
String [] creatorArray = getCreatorArray(roleType); String [] creatorArray = getCreatorArray();
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
//今日 //今日
BigDecimal todayBuy = getBuyAndSaleBasicStatistics("入库", "采购", BigDecimal todayBuy = getBuyAndSaleBasicStatistics("入库", "采购",
@@ -1232,12 +1227,12 @@ public class DepotHeadService {
} }
public List<DepotHeadVo4List> debtList(Long organId, String materialParam, String number, String beginTime, String endTime, public List<DepotHeadVo4List> debtList(Long organId, String materialParam, String number, String beginTime, String endTime,
String roleType, String status, Integer offset, Integer rows) { String status, Integer offset, Integer rows) {
List<DepotHeadVo4List> resList = new ArrayList<>(); List<DepotHeadVo4List> resList = new ArrayList<>();
try{ try{
String depotIds = depotService.findDepotStrByCurrentUser(); String depotIds = depotService.findDepotStrByCurrentUser();
String [] depotArray=depotIds.split(","); String [] depotArray=depotIds.split(",");
String [] creatorArray = getCreatorArray(roleType); String [] creatorArray = getCreatorArray();
beginTime = Tools.parseDayToTime(beginTime,BusinessConstants.DAY_FIRST_TIME); beginTime = Tools.parseDayToTime(beginTime,BusinessConstants.DAY_FIRST_TIME);
endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME); endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME);
List<DepotHeadVo4List> list=depotHeadMapperEx.debtList(organId, creatorArray, status, number, List<DepotHeadVo4List> list=depotHeadMapperEx.debtList(organId, creatorArray, status, number,
@@ -1252,12 +1247,12 @@ public class DepotHeadService {
} }
public int debtListCount(Long organId, String materialParam, String number, String beginTime, String endTime, public int debtListCount(Long organId, String materialParam, String number, String beginTime, String endTime,
String roleType, String status) { String status) {
int total = 0; int total = 0;
try { try {
String depotIds = depotService.findDepotStrByCurrentUser(); String depotIds = depotService.findDepotStrByCurrentUser();
String[] depotArray = depotIds.split(","); String[] depotArray = depotIds.split(",");
String[] creatorArray = getCreatorArray(roleType); String[] creatorArray = getCreatorArray();
beginTime = Tools.parseDayToTime(beginTime, BusinessConstants.DAY_FIRST_TIME); beginTime = Tools.parseDayToTime(beginTime, BusinessConstants.DAY_FIRST_TIME);
endTime = Tools.parseDayToTime(endTime, BusinessConstants.DAY_LAST_TIME); endTime = Tools.parseDayToTime(endTime, BusinessConstants.DAY_LAST_TIME);
total = depotHeadMapperEx.debtListCount(organId, creatorArray, status, number, total = depotHeadMapperEx.debtListCount(organId, creatorArray, status, number,
@@ -1269,7 +1264,7 @@ public class DepotHeadService {
} }
public void debtExport(Long organId, String materialParam, String number, String type, String subType, public void debtExport(Long organId, String materialParam, String number, String type, String subType,
String beginTime, String endTime, String roleType, String status, String mpList, String beginTime, String endTime, String status, String mpList,
HttpServletRequest request, HttpServletResponse response) { HttpServletRequest request, HttpServletResponse response) {
try { try {
Long userId = userService.getUserId(request); Long userId = userService.getUserId(request);
@@ -1277,7 +1272,7 @@ public class DepotHeadService {
String billCategory = getBillCategory(subType); String billCategory = getBillCategory(subType);
String depotIds = depotService.findDepotStrByCurrentUser(); String depotIds = depotService.findDepotStrByCurrentUser();
String[] depotArray = depotIds.split(","); String[] depotArray = depotIds.split(",");
String[] creatorArray = getCreatorArray(roleType); String[] creatorArray = getCreatorArray();
status = StringUtil.isNotEmpty(status) ? status : null; status = StringUtil.isNotEmpty(status) ? status : null;
beginTime = Tools.parseDayToTime(beginTime, BusinessConstants.DAY_FIRST_TIME); beginTime = Tools.parseDayToTime(beginTime, BusinessConstants.DAY_FIRST_TIME);
endTime = Tools.parseDayToTime(endTime, BusinessConstants.DAY_LAST_TIME); endTime = Tools.parseDayToTime(endTime, BusinessConstants.DAY_LAST_TIME);

View File

@@ -365,10 +365,10 @@ public class DepotItemService {
* @return * @return
* @throws Exception * @throws Exception
*/ */
public BigDecimal inOrOutPrice(String type, String subType, String month, String roleType) throws Exception{ public BigDecimal inOrOutPrice(String type, String subType, String month) throws Exception{
BigDecimal result= BigDecimal.ZERO; BigDecimal result= BigDecimal.ZERO;
try{ try{
String [] creatorArray = depotHeadService.getCreatorArray(roleType); String [] creatorArray = depotHeadService.getCreatorArray();
Boolean forceFlag = systemConfigService.getForceApprovalFlag(); Boolean forceFlag = systemConfigService.getForceApprovalFlag();
String beginTime = Tools.firstDayOfMonth(month) + BusinessConstants.DAY_FIRST_TIME; String beginTime = Tools.firstDayOfMonth(month) + BusinessConstants.DAY_FIRST_TIME;
String endTime = Tools.lastDayOfMonth(month) + BusinessConstants.DAY_LAST_TIME; String endTime = Tools.lastDayOfMonth(month) + BusinessConstants.DAY_LAST_TIME;
@@ -387,10 +387,10 @@ public class DepotItemService {
* @return * @return
* @throws Exception * @throws Exception
*/ */
public BigDecimal inOrOutRetailPrice(String type, String subType, String month, String roleType) throws Exception{ public BigDecimal inOrOutRetailPrice(String type, String subType, String month) throws Exception{
BigDecimal result= BigDecimal.ZERO; BigDecimal result= BigDecimal.ZERO;
try{ try{
String [] creatorArray = depotHeadService.getCreatorArray(roleType); String [] creatorArray = depotHeadService.getCreatorArray();
Boolean forceFlag = systemConfigService.getForceApprovalFlag(); Boolean forceFlag = systemConfigService.getForceApprovalFlag();
String beginTime = Tools.firstDayOfMonth(month) + BusinessConstants.DAY_FIRST_TIME; String beginTime = Tools.firstDayOfMonth(month) + BusinessConstants.DAY_FIRST_TIME;
String endTime = Tools.lastDayOfMonth(month) + BusinessConstants.DAY_LAST_TIME; String endTime = Tools.lastDayOfMonth(month) + BusinessConstants.DAY_LAST_TIME;

View File

@@ -37,8 +37,7 @@ public class SupplierComponent implements ICommonQuery {
String type = StringUtil.getInfo(search, "type"); String type = StringUtil.getInfo(search, "type");
String phonenum = StringUtil.getInfo(search, "phonenum"); String phonenum = StringUtil.getInfo(search, "phonenum");
String telephone = StringUtil.getInfo(search, "telephone"); String telephone = StringUtil.getInfo(search, "telephone");
String roleType = StringUtil.getInfo(search, "roleType"); return supplierService.select(supplier, type, phonenum, telephone, QueryUtils.offset(map), QueryUtils.rows(map));
return supplierService.select(supplier, type, phonenum, telephone, roleType, QueryUtils.offset(map), QueryUtils.rows(map));
} }
@Override @Override
@@ -48,8 +47,7 @@ public class SupplierComponent implements ICommonQuery {
String type = StringUtil.getInfo(search, "type"); String type = StringUtil.getInfo(search, "type");
String phonenum = StringUtil.getInfo(search, "phonenum"); String phonenum = StringUtil.getInfo(search, "phonenum");
String telephone = StringUtil.getInfo(search, "telephone"); String telephone = StringUtil.getInfo(search, "telephone");
String roleType = StringUtil.getInfo(search, "roleType"); return supplierService.countSupplier(supplier, type, phonenum, telephone);
return supplierService.countSupplier(supplier, type, phonenum, telephone, roleType);
} }
@Override @Override

View File

@@ -96,10 +96,10 @@ public class SupplierService {
return list; return list;
} }
public List<Supplier> select(String supplier, String type, String phonenum, String telephone, String roleType, int offset, int rows) throws Exception{ public List<Supplier> select(String supplier, String type, String phonenum, String telephone, int offset, int rows) throws Exception{
List<Supplier> resList = new ArrayList<Supplier>(); List<Supplier> resList = new ArrayList<Supplier>();
try{ try{
String [] creatorArray = depotHeadService.getCreatorArray(roleType); String [] creatorArray = depotHeadService.getCreatorArray();
List<Supplier> list = supplierMapperEx.selectByConditionSupplier(supplier, type, phonenum, telephone, creatorArray, offset, rows); List<Supplier> list = supplierMapperEx.selectByConditionSupplier(supplier, type, phonenum, telephone, creatorArray, offset, rows);
for(Supplier s : list) { for(Supplier s : list) {
Integer supplierId = s.getId().intValue(); Integer supplierId = s.getId().intValue();
@@ -152,10 +152,10 @@ public class SupplierService {
return resList; return resList;
} }
public Long countSupplier(String supplier, String type, String phonenum, String telephone, String roleType) throws Exception{ public Long countSupplier(String supplier, String type, String phonenum, String telephone) throws Exception{
Long result=null; Long result=null;
try{ try{
String [] creatorArray = depotHeadService.getCreatorArray(roleType); String [] creatorArray = depotHeadService.getCreatorArray();
result=supplierMapperEx.countsBySupplier(supplier, type, phonenum, telephone, creatorArray); result=supplierMapperEx.countsBySupplier(supplier, type, phonenum, telephone, creatorArray);
}catch(Exception e){ }catch(Exception e){
JshException.readFail(logger, e); JshException.readFail(logger, e);

View File

@@ -350,7 +350,6 @@ public class UserService {
data.put("msgTip", msgTip); data.put("msgTip", msgTip);
if(user!=null){ if(user!=null){
String roleType = getRoleTypeByUserId(user.getId()).getType(); //角色类型 String roleType = getRoleTypeByUserId(user.getId()).getType(); //角色类型
redisService.storageObjectBySession(token,"roleType",roleType);
redisService.storageObjectBySession(token,"clientIp", Tools.getLocalIp(request)); redisService.storageObjectBySession(token,"clientIp", Tools.getLocalIp(request));
logService.insertLogWithUserId(user.getId(), user.getTenantId(), "用户", logService.insertLogWithUserId(user.getId(), user.getTenantId(), "用户",
new StringBuffer(BusinessConstants.LOG_OPERATION_TYPE_LOGIN).append(user.getLoginName()).toString(), new StringBuffer(BusinessConstants.LOG_OPERATION_TYPE_LOGIN).append(user.getLoginName()).toString(),