fanzherong_v 1 hónapja
szülő
commit
c6a20ebf56

+ 13 - 2
snowy-admin-web/src/views/biz/bizconfig/form.vue

@@ -10,9 +10,9 @@
 			<a-form-item label="排队时效:" name="queueEfficiency">
 				<a-input-number v-model:value="formData.queueEfficiency" style="width:90%"  :precision="0" :min="1" :max="99999" placeholder="请输入排队时效" allow-clear /><span style="margin-left:10px;">分钟</span>
 			</a-form-item>
-			<a-form-item label="时段下拉个数:" name="pullNumber">
+<!--			<a-form-item label="时段下拉个数:" name="pullNumber">
 				<a-input-number v-model:value="formData.pullNumber" style="width:90%"  :precision="0" :min="1" :max="99999" placeholder="请输入时段下拉个数" allow-clear /><span style="margin-left:10px;">个</span>
-			</a-form-item>
+			</a-form-item>-->
 			<a-form-item label="停留时长:" name="stopDuration">
 				<a-input-number v-model:value="formData.stopDuration" style="width:90%" :precision="0" :min="1" :max="99999" placeholder="请输入停留时长" allow-clear /><span style="margin-left:10px;">分钟</span>
 			</a-form-item>
@@ -52,6 +52,16 @@
 					</a-radio-button>
 				</a-radio-group>
 			</a-form-item>
+			<a-form-item label="排队通知开关:" name="lineNoticeSwitch">
+				<a-radio-group button-style="solid" v-model:value="formData.lineNoticeSwitch">
+					<a-radio-button value="1">
+						开启
+					</a-radio-button>
+					<a-radio-button value="2">
+						关闭
+					</a-radio-button>
+				</a-radio-group>
+			</a-form-item>
 		</a-form>
 		<template #footer>
 			<a-button style="margin-right: 8px" @click="onClose">关闭</a-button>
@@ -104,6 +114,7 @@
 		accessControlSwitch: [required('请输入门禁强制校验开关')],
 		lossWarn: [required('请输入装卸损耗预警值')],
 		applyCount: [required('请输入预约申请数量')],
+		lineNoticeSwitch: [required('请选择排队通知开关')],
 	}
 	// 验证并提交数据
 	const onSubmit = () => {

+ 10 - 2
snowy-admin-web/src/views/biz/bizconfig/index.vue

@@ -47,6 +47,9 @@
 				<template v-if="column.dataIndex === 'applyCount'">
 					{{record.applyCount}}个
 				</template>
+				<template v-if="column.dataIndex === 'lineNoticeSwitch'">
+					{{ $TOOL.dictTypeData('biz_switch', record.lineNoticeSwitch) }}
+				</template>
 			</template>
 		</s-table>
 	</a-card>
@@ -72,11 +75,11 @@
 			dataIndex: 'queueEfficiency',
 			align:'center'
 		},
-		{
+		/*{
 			title: '时段下拉个数',
 			dataIndex: 'pullNumber',
 			align:'center'
-		},
+		},*/
 		{
 			title: '停留时长',
 			dataIndex: 'stopDuration',
@@ -107,6 +110,11 @@
 			dataIndex: 'applyCount',
 			align:'center'
 		},
+		{
+			title: '排队通知开关',
+			dataIndex: 'lineNoticeSwitch',
+			align:'center'
+		},
 	]
 	// 操作栏通过权限判断是否显示
 	columns.push({

+ 3 - 1
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/mapper/mapping/BizAppointmentRecordMapper.xml

@@ -50,7 +50,9 @@
             bar.driver_name,
             bar.driver_mobile,
             bar.STATUS,
-            bar.appointment_reason
+            bar.appointment_reason,
+            bar.create_user,
+            bar.queue_number
         FROM
             biz_appointment_record bar
         LEFT JOIN biz_goods_conf bgc ON bgc.id = bar.time_id

+ 2 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/service/BizAppointmentRecordService.java

@@ -102,4 +102,6 @@ public interface BizAppointmentRecordService extends IService<BizAppointmentReco
 
     /**车辆执行状态分析*/
     List<Map<String,Object>> gerVehicleTotal(BizAppointmentRecordPageParam bizAppointmentRecordPageParam);
+
+    void sendAccount(BizAppointmentRecord bizAppointmentRecord);
 }

+ 5 - 5
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizappointmentrecord/service/impl/BizAppointmentRecordServiceImpl.java

@@ -193,9 +193,9 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
             bizOrderConfigService.updateById(bizAppointmentTime);
         }
 
-        if(StringUtils.equals(bizAppointmentRecord.getStatus(),"3")){
+        /*if(StringUtils.equals(bizAppointmentRecord.getStatus(),"3")){
             sendAccount(bizAppointmentRecord,null);
-        }
+        }*/
     }
 
     public void saveRecord(BizAppointmentRecord bizAppointmentRecord){
@@ -423,9 +423,9 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
             //this.updateById(bizAppointmentRecord);
             this.update(updateWrapper);
 
-            if(StringUtils.equals(status,"3")){
+            /*if(StringUtils.equals(status,"3")){
                 sendAccount(bizAppointmentRecord,null);
-            }
+            }*/
         }
     }
 
@@ -648,7 +648,7 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
 
 
     /** 发送微信公众号推送消息*/
-    public void sendAccount(BizAppointmentRecord bizAppointmentRecord,String accountSwitch){
+    public void sendAccount(BizAppointmentRecord bizAppointmentRecord){
         BizUser bizUser = bizUserService.queryEntity(bizAppointmentRecord.getCreateUser());
         if(ObjectUtil.isNotEmpty(bizUser.getUnionId())){
             log.info("当前用户:"+bizUser.getName()+"存在unionId");

+ 3 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizconfig/entity/BizConfig.java

@@ -66,4 +66,7 @@ public class BizConfig extends CommonEntity {
 
     /**预约申请次数*/
     private Integer applyCount;
+
+    /**排队通知开关*/
+    private String lineNoticeSwitch;
 }

+ 3 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizconfig/param/BizConfigAddParam.java

@@ -67,4 +67,7 @@ public class BizConfigAddParam {
     /**预约申请次数*/
     private Integer applyCount;
 
+    /**排队通知开关*/
+    private String lineNoticeSwitch;
+
 }

+ 3 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizconfig/param/BizConfigEditParam.java

@@ -72,4 +72,7 @@ public class BizConfigEditParam {
     /**预约申请次数*/
     private Integer applyCount;
 
+    /**排队通知开关*/
+    private String lineNoticeSwitch;
+
 }

+ 5 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/task/AppointmentCallTask.java

@@ -54,6 +54,11 @@ public class AppointmentCallTask implements CommonTimerTaskRunner {
                 }
                 bizAppointmentRecordService.updateById(record);
                 log.info("车牌号:"+record.getLicenseNumber()+"在("+record.getBeginTime()+"~"+record.getEndTime()+")时间段内叫号成功!");
+
+                if(StringUtils.equals(bizConfig.getLineNoticeSwitch(),"1")){
+                    bizAppointmentRecordService.sendAccount(record);
+                }
+
             }
         }