| | |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.dingTalk.DingTalk; |
| | | import com.doumee.core.dingTalk.DingTalkStream; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.haikang.model.HKConstants; |
| | | import com.doumee.core.jiandaoyun.api.arch.DeptApiClient; |
| | |
| | | |
| | | @Autowired |
| | | private JkKeysMapper jkKeysMapper; |
| | | |
| | | @Autowired |
| | | private CarsMapper carsMapper; |
| | | |
| | | @Autowired |
| | | private SystemUserMapper systemUserMapper; |
| | |
| | | param.setEntry_id(entryId); |
| | | param.setIs_start_trigger(false); |
| | | param.setIs_start_trigger(true); |
| | | log.error("简道云发送通知[getJDYData]请求入参====>" + JSONObject.toJSONString(param) ); |
| | | Map<String, Object> response = apiClient.singleDataCreate(param,apiClient.getDefaultVersion()); |
| | | /* |
| | | Map<String,Object> map = new HashMap<>(); |
| | |
| | | .addHeader("Content-Type", "application/json") |
| | | .build(); |
| | | Response response = client.newCall(request).execute();*/ |
| | | log.error("简道云发送通知返回信息" + JSONObject.toJSONString(response)); |
| | | log.error("简道云发送通知[getJDYData]返回信息" + JSONObject.toJSONString(response)); |
| | | }catch (Exception e){ |
| | | log.error("简道云发送通知返回信息异常:" + e.getMessage()); |
| | | } |
| | |
| | | .selectAs(JkKeys::getCarCode,JkCabinetGrid::getCarCode) |
| | | .selectAs(JkKeys::getRfidLable,JkCabinetGrid::getKeyCode) |
| | | .selectAs(JkKeys::getStatus,JkCabinetGrid::getKeyStatus) |
| | | .selectAs(JkKeys::getCarId,JkCabinetGrid::getCarId) |
| | | .leftJoin(JkKeys.class,JkKeys::getId,JkCabinetGrid::getKeyId) |
| | | .leftJoin(JkCabinet.class,JkCabinet::getId,JkCabinetGrid::getCabinetId) |
| | | .eq(JkCabinet::getCode,dto.getCode()) |
| | |
| | | .eq(JkKeys::getId,jkCabinetGrid.getKeyId()) |
| | | ); |
| | | log.error("钥匙柜信息推送实际钥匙变化:"+jkCabinetGrid.getKeyCode()); |
| | | JkCabinetLog cabinetLog = new JkCabinetLog(); |
| | | cabinetLog.setKeyInfo(jkCabinetGrid.getCarCode() + " " + jkCabinetGrid.getKeyCode()); |
| | | JkKeys jkKeys = jkKeysMapper.selectById(jkCabinetGrid.getKeyId()); |
| | | if(Objects.nonNull(jkKeys)){ |
| | | cabinetLog.setKeyInfo(jkCabinetGrid.getCarCode() + " " + jkKeys.getCode()); |
| | | Cars cars = carsMapper.selectById(jkCabinetGrid.getCarId()); |
| | | if(Objects.nonNull(cars)){ |
| | | cabinetLog.setMemberId(cars.getMemberId()); |
| | | } |
| | | } |
| | | cabinetLog.setCabinetId(jkCabinetGrid.getCabinetId()); |
| | | cabinetLog.setGridId(jkCabinetGrid.getId()); |
| | | cabinetLog.setKeyId(jkCabinetGrid.getKeyId()); |
| | | cabinetLog.setCarId(jkCabinetGrid.getCarId()); |
| | | cabinetLog.setType(Constants.ONE); |
| | | cabinetLog.setStatus(Constants.ZERO); |
| | | cabinetLog.setAuthType(3); |
| | | cabinetLog.setKeyStatus(Constants.TWO); |
| | | cabinetLog.setIsNotice(Constants.ZERO); |
| | | cabinetLog.setInfo("硬件同步-钥匙不在位"); |
| | | cabinetLog.setIsdeleted(Constants.ZERO); |
| | | cabinetLog.setCreateDate(new Date()); |
| | | jkCabinetLogMapper.insert(cabinetLog); |
| | | } |
| | | }else{ |
| | | if(!Constants.equalsInteger(jkCabinetGrid.getKeyStatus(),Constants.ONE)){ |
| | |
| | | .eq(JkKeys::getId,jkCabinetGrid.getKeyId()) |
| | | ); |
| | | log.error("钥匙柜信息推送实际钥匙变化:"+jkCabinetGrid.getKeyCode()); |
| | | JkCabinetLog cabinetLog = new JkCabinetLog(); |
| | | cabinetLog.setKeyInfo(jkCabinetGrid.getCarCode() + " " + jkCabinetGrid.getKeyCode()); |
| | | JkKeys jkKeys = jkKeysMapper.selectById(jkCabinetGrid.getKeyId()); |
| | | if(Objects.nonNull(jkKeys)){ |
| | | cabinetLog.setKeyInfo(jkCabinetGrid.getCarCode() + " " + jkKeys.getCode()); |
| | | Cars cars = carsMapper.selectById(jkCabinetGrid.getCarId()); |
| | | if(Objects.nonNull(cars)){ |
| | | cabinetLog.setMemberId(cars.getMemberId()); |
| | | } |
| | | } |
| | | cabinetLog.setCabinetId(jkCabinetGrid.getCabinetId()); |
| | | cabinetLog.setGridId(jkCabinetGrid.getId()); |
| | | cabinetLog.setKeyId(jkCabinetGrid.getKeyId()); |
| | | cabinetLog.setCarId(jkCabinetGrid.getCarId()); |
| | | cabinetLog.setType(Constants.ONE); |
| | | cabinetLog.setStatus(Constants.ZERO); |
| | | cabinetLog.setAuthType(3); |
| | | cabinetLog.setKeyStatus(Constants.ONE); |
| | | cabinetLog.setIsNotice(Constants.ZERO); |
| | | cabinetLog.setInfo("硬件同步-钥匙在位"); |
| | | cabinetLog.setIsdeleted(Constants.ZERO); |
| | | cabinetLog.setCreateDate(new Date()); |
| | | jkCabinetLogMapper.insert(cabinetLog); |
| | | |
| | | jkCabinetLogMapper.update(null,new UpdateWrapper<JkCabinetLog>().lambda() |
| | | .set(JkCabinetLog::getCloseLogId,cabinetLog.getId()) |
| | | .eq(JkCabinetLog::getKeyId,cabinetLog.getKeyId()) |
| | | .eq(JkCabinetLog::getType,Constants.ONE) |
| | | .eq(JkCabinetLog::getKeyStatus,Constants.TWO) |
| | | .isNull(JkCabinetLog::getCloseLogId)); |
| | | |
| | | } |
| | | } |
| | | // if(StringUtils.isBlank(jkCabinetGrid.getKeyCode()) |