| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alibaba.fastjson.serializer.SerializerFeature; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.entity.*; |
| | |
| | | |
| | | } |
| | | if (basDualCrnpService != null) { |
| | | BasDualCrnp basDualCrnp = basDualCrnpService.selectOne(new EntityWrapper<BasDualCrnp>().eq("crn_no", deviceConfig.getDeviceNo())); |
| | | BasDualCrnp basDualCrnp = basDualCrnpService.getOne(new QueryWrapper<BasDualCrnp>().eq("crn_no", deviceConfig.getDeviceNo())); |
| | | if(basDualCrnp == null) { |
| | | basDualCrnp = new BasDualCrnp(); |
| | | basDualCrnp.setCrnNo(deviceConfig.getDeviceNo()); |
| | |
| | | basDualCrnp.setMaxInTask(5); |
| | | basDualCrnp.setMaxOutTask(5); |
| | | basDualCrnp.setCreateTime(new Date()); |
| | | basDualCrnpService.insert(basDualCrnp); |
| | | basDualCrnpService.save(basDualCrnp); |
| | | } |
| | | } |
| | | } |
| | |
| | | log.setStatus(1); |
| | | log.setCreateTime(new Date()); |
| | | log.setSystemStatus(JSON.toJSONString(crnProtocol)); |
| | | errLogService.insert(log); |
| | | errLogService.save(log); |
| | | if (log.getId() != null) { |
| | | redisUtil.set(errFlagKey, log.getId(), 60 * 60 * 24); |
| | | } |
| | |
| | | JSON.toJSONString(response) |
| | | ); |
| | | if (bean != null) { |
| | | bean.insert(basDualCrnpOpt); |
| | | bean.save(basDualCrnpOpt); |
| | | } |
| | | } |
| | | } |