|
@@ -1,11 +1,13 @@
|
|
|
package com.usky.fire.service.impl;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
|
|
|
|
|
|
+import com.usky.agbox.RemotePatrolAgboxService;
|
|
|
import com.usky.common.core.exception.BusinessException;
|
|
|
import com.usky.common.core.util.StringUtils;
|
|
|
import com.usky.common.security.utils.SecurityUtils;
|
|
@@ -50,6 +52,9 @@ public class PatrolInspectionAttendanceServiceImpl extends AbstractCrudService<P
|
|
|
|
|
|
@Autowired
|
|
|
private PatrolInspectionPersonnelMapper patrolInspectionPersonnelMapper;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private RemotePatrolAgboxService remotePatrolAgboxService;
|
|
|
@Override
|
|
|
public IPage<Map<String, Object>> pageList(Integer pageNum, Integer pageSize, String operateCode, String operator, LocalDateTime startTime, LocalDateTime endTime) {
|
|
|
IPage<PatrolInspectionAttendance> page = new Page<>(pageNum, pageSize);
|
|
@@ -127,6 +132,19 @@ public class PatrolInspectionAttendanceServiceImpl extends AbstractCrudService<P
|
|
|
patrolInspectionAttendance.setDeviceCode(patrolInspectionAttendance.getDeviceCode());
|
|
|
baseMapper.insert(patrolInspectionAttendance);
|
|
|
patrolInspectionPersonnelService.updateSignStatus(patrolInspectionAttendance.getSignInType());
|
|
|
+ JSONObject jsonObj = new JSONObject();
|
|
|
+ jsonObj.put("deviceId", patrolInspectionAttendance.getDeviceCode());
|
|
|
+ jsonObj.put("triggerTime", LocalDateTime.now());
|
|
|
+ Integer eventCode = 17;
|
|
|
+ if(patrolInspectionAttendance.getSignInType().equals(0)){
|
|
|
+ eventCode=1;
|
|
|
+ }else {
|
|
|
+ eventCode=2;
|
|
|
+ }
|
|
|
+ jsonObj.put("eventCode", eventCode);
|
|
|
+ jsonObj.put("name", SecurityUtils.getUsername());
|
|
|
+ jsonObj.put("certifiedNo", patrolInspectionAttendance.getIdentificationNumber());
|
|
|
+ JSONObject a = remotePatrolAgboxService.addEvent(jsonObj.toJSONString());
|
|
|
}
|
|
|
|
|
|
/**
|