|
|
|
@ -173,11 +173,33 @@ public class HighGasController { |
|
|
|
|
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); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} else if (userInfoModel.getSecUser().getObjectType().equals(3)) { |
|
|
|
|
param.put("storeId", userInfoModel.getMerchantStore().getId()); |
|
|
|
|
|
|
|
|
|
} else if (userInfoModel.getSecUser().getObjectType().equals(8)) { |
|
|
|
|
param.put("storeId", userInfoModel.getMerchantStore().getId()); |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
log.error("HighGasController -> disabledOil() error!",""); |
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMPETENCE_INSUFFICIENT, ""); |
|
|
|
@ -237,17 +259,51 @@ public class HighGasController { |
|
|
|
|
@ResponseBody |
|
|
|
|
@ApiOperation(value = "导出油站订单") |
|
|
|
|
public ResponseData exportGasOrder(@RequestParam(name = "orderNo", required = false) String orderNo, |
|
|
|
|
@RequestParam(name = "storeId", required = false) Long storeId, |
|
|
|
|
@RequestParam(name = "status", required = false) Integer status, |
|
|
|
|
@RequestParam(name = "createTimeS", required = false) Long createTimeS, |
|
|
|
|
@RequestParam(name = "createTimeE", required = false) Long createTimeE) { |
|
|
|
|
try { |
|
|
|
|
UserInfoModel userInfoModel = userCenter.getSessionModel(UserInfoModel.class); |
|
|
|
|
if (userInfoModel == null || userInfoModel.getMerchantStore() == null) { |
|
|
|
|
if (userInfoModel == null) { |
|
|
|
|
log.error("HighGasController -> disabledOil() error!",""); |
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMPETENCE_INSUFFICIENT, ""); |
|
|
|
|
} |
|
|
|
|
Map<String, Object> param = new HashMap<>();; |
|
|
|
|
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); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} else if (userInfoModel.getSecUser().getObjectType().equals(3)) { |
|
|
|
|
param.put("storeId", userInfoModel.getMerchantStore().getId()); |
|
|
|
|
|
|
|
|
|
} else if (userInfoModel.getSecUser().getObjectType().equals(8)) { |
|
|
|
|
param.put("storeId", userInfoModel.getMerchantStore().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); |
|
|
|
|