Commit 0656308d authored by hanbing's avatar hanbing

[update] 快速特勤,自动解锁状态修改

parent f6a348b2
...@@ -134,6 +134,10 @@ public class ConsumerHandler implements KafkaListenerErrorHandler { ...@@ -134,6 +134,10 @@ public class ConsumerHandler implements KafkaListenerErrorHandler {
vo.setDuration(999); vo.setDuration(999);
vo.setPhaseList(new ArrayList<>()); vo.setPhaseList(new ArrayList<>());
utcFeignClients.lockControl(vo); utcFeignClients.lockControl(vo);
// 修改路口为非自动解锁路口,状态为已解锁
SpecialServicePO specialServicePO = specialServiceMapper.selectIdByPlateNum(picLicense);
Integer specialServiceId = specialServicePO.getId();
specialServiceCrossMapper.updateStatusFail(crossId, specialServiceId);
// 给前端推送WebSocket // 给前端推送WebSocket
Set<WebSocketServer> events = Set<WebSocketServer> events =
WebSocketServer.getWebSocketSet(Constant.WEBSOCKET_AUTO_UNLOCK); WebSocketServer.getWebSocketSet(Constant.WEBSOCKET_AUTO_UNLOCK);
......
...@@ -37,7 +37,7 @@ public interface SpecialServiceCrossMapper { ...@@ -37,7 +37,7 @@ public interface SpecialServiceCrossMapper {
void updateStatusSuccess(@Param("crossId") String crossId); void updateStatusSuccess(@Param("crossId") String crossId);
void updateStatusFail(@Param("crossId") String crossId); void updateStatusFail(String crossId, Integer specialServiceId);
void updateDir(@Param("specialServiceId") Integer specialServiceId, void updateDir(@Param("specialServiceId") Integer specialServiceId,
@Param("endCrossid")String endCrossid, @Param("endCrossid")String endCrossid,
...@@ -51,7 +51,7 @@ public interface SpecialServiceCrossMapper { ...@@ -51,7 +51,7 @@ public interface SpecialServiceCrossMapper {
void deleteGroup(Integer specialServiceId, String groupName); void deleteGroup(Integer specialServiceId, String groupName);
void updateAutoUnlock(String crossId, Integer autoUnlock, Integer specialServiceId); void updateAutoUnlock(String crossId, Integer autoUnlock, Integer specialServiceId, Integer status);
List<SpecialServiceCrossPO> selectByAutoUnlock(); List<SpecialServiceCrossPO> selectByAutoUnlock();
} }
...@@ -39,4 +39,6 @@ public interface SpecialServiceMapper { ...@@ -39,4 +39,6 @@ public interface SpecialServiceMapper {
SpecialServicePO selectByName(String specialServiceName); SpecialServicePO selectByName(String specialServiceName);
List<SpecialServicePO> selectExec(); List<SpecialServicePO> selectExec();
SpecialServicePO selectIdByPlateNum(String picLicense);
} }
...@@ -636,7 +636,7 @@ public class SpecialServiceServiceImpl implements SpecialServiceService { ...@@ -636,7 +636,7 @@ public class SpecialServiceServiceImpl implements SpecialServiceService {
// 将关联特勤改为执行中 // 将关联特勤改为执行中
specialServiceMapper.updateStatusEnable(specialServiceId); specialServiceMapper.updateStatusEnable(specialServiceId);
} else if (0 == command) { // 解锁 } else if (0 == command) { // 解锁
specialServiceCrossMapper.updateStatusFail(crossId); specialServiceCrossMapper.updateStatusFail(crossId, specialServiceId);
} }
} }
// 如果特勤路口都是解锁,则更新特勤状态为未执行 // 如果特勤路口都是解锁,则更新特勤状态为未执行
...@@ -709,7 +709,8 @@ public class SpecialServiceServiceImpl implements SpecialServiceService { ...@@ -709,7 +709,8 @@ public class SpecialServiceServiceImpl implements SpecialServiceService {
for (CrossListElement crossListElement : crossList) { for (CrossListElement crossListElement : crossList) {
String crossId = crossListElement.getCrossId(); String crossId = crossListElement.getCrossId();
Integer autoUnlock = crossListElement.getAutoUnlock(); Integer autoUnlock = crossListElement.getAutoUnlock();
specialServiceCrossMapper.updateAutoUnlock(crossId, autoUnlock, specialServiceId); Integer status = 1; // 将自动解锁路口的状态设为锁定
specialServiceCrossMapper.updateAutoUnlock(crossId, autoUnlock, specialServiceId, status);
} }
} }
} }
......
...@@ -46,8 +46,8 @@ ...@@ -46,8 +46,8 @@
<update id="updateStatusFail"> <update id="updateStatusFail">
update t_special_service_cross update t_special_service_cross
set status = 0 set status = 0, auto_unlock = 0
where cross_id = #{crossId} where cross_id = #{crossId} and special_service_id = #{specialServiceId}
</update> </update>
<update id="updateDir"> <update id="updateDir">
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
<update id="updateAutoUnlock"> <update id="updateAutoUnlock">
update t_special_service_cross update t_special_service_cross
set auto_unlock = #{autoUnlock} set auto_unlock = #{autoUnlock}, status = #{status}
where cross_id = #{crossId} and special_service_id = #{specialServiceId} where cross_id = #{crossId} and special_service_id = #{specialServiceId}
</update> </update>
......
...@@ -133,4 +133,10 @@ ...@@ -133,4 +133,10 @@
where status = 1 where status = 1
</select> </select>
<select id="selectIdByPlateNum" resultType="net.wanji.web.po.SpecialServicePO">
select <include refid="Base_Column_List"></include>
from t_special_service_info
where plate_num = #{picLicense}
</select>
</mapper> </mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment