diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighOrderController.java b/hai-bweb/src/main/java/com/bweb/controller/HighOrderController.java index 1651da61..4dfc4e1e 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/HighOrderController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/HighOrderController.java @@ -835,9 +835,12 @@ public class HighOrderController { @RequestMapping(value = "/TyOrderStatistics", method = RequestMethod.POST) @ResponseBody @ApiOperation(value = "团油订单统计") - public ResponseData TyOrderStatistics(@RequestBody JSONObject object) { + public ResponseData TyOrderStatistics(@RequestBody JSONObject object,HttpServletRequest request) { try { + SessionObject sessionObject = userCenter.getSessionObject(request); + UserInfoModel userInfoModel = (UserInfoModel) sessionObject.getObject(); + Map map = new HashMap<>(); Map mapSam = new HashMap<>(); Map mapOrg = new HashMap<>(); @@ -866,7 +869,7 @@ public class HighOrderController { salesmanIds.setLength(0); // 查询业务员 mapOrg.put("tyAgentId" , object.getInteger("agentId")); - List salesmanList = highTySalesmanService.getSalesmanList(mapSam); + List salesmanList = highTySalesmanService.getSalesmanList(mapOrg); for (HighTySalesman salesman: salesmanList) { salesmanIds.append(salesman.getId()).append(","); } @@ -877,6 +880,8 @@ public class HighOrderController { salesmanIds.setLength(0); salesmanIds.append(object.getInteger("gasSalesmanId")); + } else if (!(userInfoModel.getSecRole().getRoleType() == 5 && userInfoModel.getSecUser().getAdminFlag() ==1)){ + salesmanIds.append(0); } if (salesmanIds.length() == 0) {