夏文涛 1 рік тому
батько
коміт
5bec141af6

+ 16 - 7
src/main/java/com/template/controller/SystemSettingController.java

@@ -108,8 +108,15 @@ public class SystemSettingController implements SystemSettingControllerAPI {
 
 
         if (ws != null && ws.size() > 0) {
         if (ws != null && ws.size() > 0) {
             WelcomeSetting wsData = ws.get(0);
             WelcomeSetting wsData = ws.get(0);
-            result.setCarNum(wsData.getCarNum());
-            result.setPhone(wsData.getPhone());
+            result.setMxhCarNum(wsData.getMxhCarNum());
+            result.setHjhCarNum(wsData.getHjhCarNum());
+            if (StringUtils.hasText(wsData.getPhone())) {
+                List<String> phones = Arrays.asList(wsData.getPhone().split(","));
+                result.setPhones(phones);
+            } else {
+                result.setPhones(new ArrayList<>());
+            }
+
             result.setSafetyNotice(wsData.getSafetyNotice());
             result.setSafetyNotice(wsData.getSafetyNotice());
             result.setBasicVerification(wsData.getBasicVerification());
             result.setBasicVerification(wsData.getBasicVerification());
             result.setFamilyInfo(wsData.getFamilyInfo());
             result.setFamilyInfo(wsData.getFamilyInfo());
@@ -136,8 +143,10 @@ public class SystemSettingController implements SystemSettingControllerAPI {
         if (ws != null && ws.size() > 0) {
         if (ws != null && ws.size() > 0) {
             result = ws.get(0);
             result = ws.get(0);
         }
         }
-        result.setCarNum(iussr.getCarNum());
-        result.setPhone(iussr.getPhone());
+        result.setMxhCarNum(iussr.getMxhCarNum());
+        result.setHjhCarNum(iussr.getHjhCarNum());
+        String phone = org.apache.commons.lang3.StringUtils.join(iussr.getPhones(), ',');
+        result.setPhone(phone);
         result.setSafetyNotice(iussr.getSafetyNotice());
         result.setSafetyNotice(iussr.getSafetyNotice());
         result.setBasicVerification(iussr.getBasicVerification());
         result.setBasicVerification(iussr.getBasicVerification());
         result.setFamilyInfo(iussr.getFamilyInfo());
         result.setFamilyInfo(iussr.getFamilyInfo());
@@ -195,7 +204,7 @@ public class SystemSettingController implements SystemSettingControllerAPI {
                 int deleteAll = welcomePaySettingService.deleteAll();
                 int deleteAll = welcomePaySettingService.deleteAll();
 
 
                 boolean saveBatch = welcomePaySettingService.saveBatch(wpss);
                 boolean saveBatch = welcomePaySettingService.saveBatch(wpss);
-                if(!saveBatch){
+                if (!saveBatch) {
                     logger.error("添加缴费设置信息失败,参数:" + JSON.toJSON(wpss));
                     logger.error("添加缴费设置信息失败,参数:" + JSON.toJSON(wpss));
                     throw new Exception("添加失败!");
                     throw new Exception("添加失败!");
                 }
                 }
@@ -205,7 +214,7 @@ public class SystemSettingController implements SystemSettingControllerAPI {
                 int deleteAll = welcomeOpenSettingService.deleteAll();
                 int deleteAll = welcomeOpenSettingService.deleteAll();
 
 
                 boolean saveBatch = welcomeOpenSettingService.saveBatch(woss);
                 boolean saveBatch = welcomeOpenSettingService.saveBatch(woss);
-                if(!saveBatch){
+                if (!saveBatch) {
                     logger.error("添加开放比例设置信息失败,参数:" + JSON.toJSON(woss));
                     logger.error("添加开放比例设置信息失败,参数:" + JSON.toJSON(woss));
                     throw new Exception("添加失败!");
                     throw new Exception("添加失败!");
                 }
                 }
@@ -215,7 +224,7 @@ public class SystemSettingController implements SystemSettingControllerAPI {
                 int deleteAll = welcomeArriveSettingService.deleteAll();
                 int deleteAll = welcomeArriveSettingService.deleteAll();
 
 
                 boolean saveBatch = welcomeArriveSettingService.saveBatch(wass);
                 boolean saveBatch = welcomeArriveSettingService.saveBatch(wass);
-                if(!saveBatch){
+                if (!saveBatch) {
                     logger.error("添加抵达时间段设置信息失败,参数:" + JSON.toJSON(wass));
                     logger.error("添加抵达时间段设置信息失败,参数:" + JSON.toJSON(wass));
                     throw new Exception("添加失败!");
                     throw new Exception("添加失败!");
                 }
                 }

+ 1 - 1
src/main/java/com/template/controller/WelcomeStudentController.java

@@ -1437,7 +1437,7 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
         DateTimeFormatter dateTimeFormatter1 = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
         DateTimeFormatter dateTimeFormatter1 = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
         Integer visitorTotal = welcomeVisitorService.countTotal(start, end);
         Integer visitorTotal = welcomeVisitorService.countTotal(start, end);
         List<WelcomeSetting> wss = welcomeSettingService.list(null);
         List<WelcomeSetting> wss = welcomeSettingService.list(null);
-        Integer carTotal = wss != null && wss.size() > 0 ? wss.get(0).getCarNum() : 0;
+        Integer carTotal = wss != null && wss.size() > 0 ? wss.get(0).getMxhCarNum() : 0;
 
 
         StudentOverviewVo vo = new StudentOverviewVo();
         StudentOverviewVo vo = new StudentOverviewVo();
         vo.setEnrollmentTotal(6532);
         vo.setEnrollmentTotal(6532);

+ 5 - 2
src/main/java/com/template/model/pojo/WelcomeSetting.java

@@ -34,8 +34,11 @@ public class WelcomeSetting implements Serializable {
     @TableId(value = "id", type = IdType.AUTO)
     @TableId(value = "id", type = IdType.AUTO)
     private Integer id;
     private Integer id;
 
 
-    @ApiModelProperty(value = "每天限制车位数")
-    private Integer carNum;
+    @ApiModelProperty(value = "黄家湖每天限制车位数")
+    private Integer hjhCarNum;
+
+    @ApiModelProperty(value = "墨轩湖每天限制车位数")
+    private Integer mxhCarNum;
 
 
     @ApiModelProperty(value = "联系电话")
     @ApiModelProperty(value = "联系电话")
     private String phone;
     private String phone;

+ 6 - 3
src/main/java/com/template/model/request/InsertOrUpdateSystemSettingRequest.java

@@ -24,15 +24,18 @@ public class InsertOrUpdateSystemSettingRequest {
     @ApiModelProperty(value = "宿舍开放比例设置集合")
     @ApiModelProperty(value = "宿舍开放比例设置集合")
     private List<OpenSettingVo> osvs;
     private List<OpenSettingVo> osvs;
 
 
-    @ApiModelProperty(value = "每天限制车位数")
-    private Integer carNum;
+    @ApiModelProperty(value = "黄家湖每天限制车位数")
+    private Integer hjhCarNum;
+
+    @ApiModelProperty(value = "墨轩湖每天限制车位数")
+    private Integer mxhCarNum;
 
 
     //到站时间段设置
     //到站时间段设置
     @ApiModelProperty(value = "到站时间段设置集合")
     @ApiModelProperty(value = "到站时间段设置集合")
     private List<ArriveSettingVo> asvs;
     private List<ArriveSettingVo> asvs;
 
 
     @ApiModelProperty(value = "联系电话")
     @ApiModelProperty(value = "联系电话")
-    private String phone;
+    private List<String> phones;
 
 
     @ApiModelProperty(value = "安全告知")
     @ApiModelProperty(value = "安全告知")
     private String safetyNotice;
     private String safetyNotice;

+ 6 - 3
src/main/java/com/template/model/vo/SystemSettingVo.java

@@ -21,15 +21,18 @@ public class SystemSettingVo {
     @ApiModelProperty(value = "宿舍开放比例设置集合")
     @ApiModelProperty(value = "宿舍开放比例设置集合")
     private List<OpenSettingVo> osvs;
     private List<OpenSettingVo> osvs;
 
 
-    @ApiModelProperty(value = "每天限制车位数")
-    private Integer carNum;
+    @ApiModelProperty(value = "墨轩湖每天限制车位数")
+    private Integer mxhCarNum;
+
+    @ApiModelProperty(value = "黄家湖每天限制车位数")
+    private Integer hjhCarNum;
 
 
     //到站时间段设置
     //到站时间段设置
     @ApiModelProperty(value = "到站时间段设置集合")
     @ApiModelProperty(value = "到站时间段设置集合")
     private List<ArriveSettingVo> asvs;
     private List<ArriveSettingVo> asvs;
 
 
     @ApiModelProperty(value = "联系电话")
     @ApiModelProperty(value = "联系电话")
-    private String phone;
+    private List<String> phones;
 
 
     @ApiModelProperty(value = "安全告知")
     @ApiModelProperty(value = "安全告知")
     private String safetyNotice;
     private String safetyNotice;

+ 7 - 1
src/main/java/com/template/services/impl/WelcomeVisitorServiceImpl.java

@@ -144,7 +144,13 @@ public class WelcomeVisitorServiceImpl extends ServiceImpl<WelcomeVisitorMapper,
 
 
         // 校验车牌数量  4 固定写法
         // 校验车牌数量  4 固定写法
         WelcomeSetting setting = settingService.getManageById("4");
         WelcomeSetting setting = settingService.getManageById("4");
-        Integer carNum = setting.getCarNum();
+        int carNum =0;
+        if(visitorRequest.getSchool().equals("墨轩湖校区")){
+            carNum = setting.getMxhCarNum();
+        }else{
+            carNum = setting.getHjhCarNum();
+        }
+
 
 
         // 判断两天是否为同一天,如果为同一天,则比较当天的车辆数量
         // 判断两天是否为同一天,如果为同一天,则比较当天的车辆数量
         if (DateUtil.isSameDay(startTime, endTime)) {
         if (DateUtil.isSameDay(startTime, endTime)) {