| | |
| | | package com.zy.common.web; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.core.common.Cools; |
| | |
| | | import com.zy.asrs.entity.result.KeyValueVo; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.common.CodeRes; |
| | | import com.zy.common.config.WebSocketServer; |
| | | import com.zy.common.model.LocTypeDto; |
| | | import com.zy.common.model.StartupDto; |
| | | import com.zy.common.service.CommonService; |
| | |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | private WorkService workService; |
| | | @Autowired |
| | | private StaDescService staDescService; |
| | | @Autowired |
| | | private WebSocketServer webSocketServer; |
| | | |
| | | @PostMapping("/led/getError") |
| | | @ResponseBody |
| | | public synchronized R getLocNo(@RequestBody Map<String, String> param) { |
| | | String sta = param.get("sta"); |
| | | String message = param.get("msg"); |
| | | if (Cools.isEmpty(sta) || Cools.isEmpty(message)) { |
| | | return R.error(); |
| | | } |
| | | Map<String,Object> map=new HashMap<String, Object>(); |
| | | |
| | | map.put("to",sta); |
| | | map.put("message",Cools.add("type", "error").add("errMsg",message)); |
| | | webSocketServer.onMessage(JSONObject.toJSONString(map),null,sta); |
| | | |
| | | |
| | | return R.ok(); |
| | | |
| | | } |
| | | |
| | | |
| | | @Transactional |