|
@@ -140,6 +140,19 @@ public class CustomerGradeController {
|
|
|
params.put("grade", memberGrade);
|
|
|
}
|
|
|
if(discountPlanType.equals("1")){
|
|
|
+ //此处判断用于当该站由其他优惠改为等级直降时 (先使用其他优惠不存在等级时再改为直降方式)
|
|
|
+ if(memberGrade == null){
|
|
|
+ Map map = new HashMap();
|
|
|
+ map.put("stationId", existCustomer.getStationId());
|
|
|
+ map.put("oilName", existCustomer.getOilName());
|
|
|
+ List<Map> customerGradeInfo = customerGradeServices.getCustomerGradeList(map); //直降
|
|
|
+ for (Map m: customerGradeInfo){
|
|
|
+ if(Double.valueOf(customerManage.getAmt().toString()) >= Double.valueOf(m.get("memberConditStart").toString()) && Double.valueOf(customerManage.getAmt().toString()) < Double.valueOf(m.get("memberConditEnd").toString())){
|
|
|
+ params.put("grade", m.get("id").toString());
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
//如果该油站使用是直降
|
|
|
List<Map<String, Object>> customerGradeInfoList = customerGradeServices.getCustomerGradeInfo(params);
|
|
|
resultData = ResultData.success(customerGradeInfoList);
|