|
|
|
@ -268,6 +268,81 @@ public class HighGasController { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@RequestMapping(value="/getGasOrderCount",method = RequestMethod.GET) |
|
|
|
|
@ResponseBody |
|
|
|
|
@ApiOperation(value = "查询油站订单列表") |
|
|
|
|
public ResponseData getGasOrderCount(@RequestParam(name = "orderNo", required = false) String orderNo, |
|
|
|
|
@RequestParam(name = "storeId", required = false) Long storeId, |
|
|
|
|
@RequestParam(name = "staffId", required = false) Long staffId, |
|
|
|
|
@RequestParam(name = "status", required = false) Integer status, |
|
|
|
|
@RequestParam(name = "createTimeS", required = false) Long createTimeS, |
|
|
|
|
@RequestParam(name = "createTimeE", required = false) Long createTimeE, |
|
|
|
|
@RequestParam(name = "pageNum", required = true) Integer pageNum, |
|
|
|
|
@RequestParam(name = "pageSize", required = true) Integer pageSize) { |
|
|
|
|
try { |
|
|
|
|
UserInfoModel userInfoModel = userCenter.getSessionModel(UserInfoModel.class); |
|
|
|
|
if (userInfoModel == null) { |
|
|
|
|
log.error("HighGasController -> disabledOil() error!",""); |
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMPETENCE_INSUFFICIENT, ""); |
|
|
|
|
} |
|
|
|
|
Map<String, Object> param = new HashMap<>(); |
|
|
|
|
// 用户来源 0:超级管理员 1:公司 2:商户 3:门店 4. 代理商 5.充值后台工商 6.团油代理商 7.团油业务员 8. 加油站员工
|
|
|
|
|
if (userInfoModel.getSecUser().getObjectType().equals(2)) { |
|
|
|
|
if (storeId != null) { |
|
|
|
|
param.put("storeId", storeId); |
|
|
|
|
} else { |
|
|
|
|
String storeIdStr = ""; |
|
|
|
|
List<HighMerchantStore> storeList = merchantStoreService.getStoreListByMer(userInfoModel.getMerchant().getId()); |
|
|
|
|
for (HighMerchantStore store : storeList) { |
|
|
|
|
if (StringUtils.isBlank(storeIdStr)) { |
|
|
|
|
storeIdStr += store.getId().toString(); |
|
|
|
|
} else { |
|
|
|
|
storeIdStr += "," + store.getId().toString(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(storeIdStr)) { |
|
|
|
|
param.put("storeId", storeIdStr); |
|
|
|
|
} else { |
|
|
|
|
param.put("storeId", 0); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
param.put("gasStaffId", staffId); |
|
|
|
|
|
|
|
|
|
} else if (userInfoModel.getSecUser().getObjectType().equals(3)) { |
|
|
|
|
param.put("storeId", userInfoModel.getMerchantStore().getId()); |
|
|
|
|
param.put("gasStaffId", staffId); |
|
|
|
|
|
|
|
|
|
} else if (userInfoModel.getSecUser().getObjectType().equals(8)) { |
|
|
|
|
if (userInfoModel.getGasStaff().getPositionType().equals(GasPositionType.status1.getStatus())) { |
|
|
|
|
param.put("storeId", userInfoModel.getMerchantStore().getId()); |
|
|
|
|
} |
|
|
|
|
if (userInfoModel.getGasStaff().getPositionType().equals(GasPositionType.status2.getStatus())) { |
|
|
|
|
param.put("gasStaffId", userInfoModel.getGasStaff().getId()); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
log.error("HighGasController -> disabledOil() error!",""); |
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMPETENCE_INSUFFICIENT, ""); |
|
|
|
|
} |
|
|
|
|
param.put("orderNo", orderNo); |
|
|
|
|
param.put("createTimeS", createTimeS); |
|
|
|
|
param.put("createTimeE", createTimeE); |
|
|
|
|
|
|
|
|
|
if (status == null) { |
|
|
|
|
param.put("status", "2,3,4,6,7"); |
|
|
|
|
} else { |
|
|
|
|
param.put("status", status); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
return ResponseMsgUtil.success(map); |
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
log.error("HighGasController -> getGasOrderCount() error!",e); |
|
|
|
|
return ResponseMsgUtil.exception(e); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@RequestMapping(value="/getGasSelectList",method = RequestMethod.GET) |
|
|
|
|
@ResponseBody |
|
|
|
|
@ApiOperation(value = "查询油站选择列表") |
|
|
|
|