fix(watch): 最近一次代码合并
This commit is contained in:
+1
-1
@@ -99,7 +99,7 @@ public enum AnYanApiEnum {
|
||||
/**
|
||||
* 18.查询关爱联络员信息及急救人员查询接口
|
||||
*/
|
||||
QUERY_EMPLOYEE_CARE_PERSON("/aygc-znhpt-sys/0/api/empCareEmp/findPageByIdNo", "", HttpMethod.POST),
|
||||
QUERY_EMPLOYEE_CARE_PERSON("/aygc-znhpt-sys/0/api/empCareEmp/findPage", "", HttpMethod.POST),
|
||||
|
||||
/**
|
||||
* 19.批量更新员工关键信息接口
|
||||
|
||||
+12
-10
@@ -18,9 +18,14 @@ public class DeptStatData {
|
||||
/**
|
||||
* 已分配设备数
|
||||
*/
|
||||
@Excel(name = "分配设备数", width = 15,orderNum = "4")
|
||||
@Excel(name = "已分配设备数", width = 15,orderNum = "4")
|
||||
private Integer assignedDeviceNums;
|
||||
|
||||
/**
|
||||
* 未分配设备数(入库设备数 - 已分配设备数,仅一、二级部门有值)
|
||||
*/
|
||||
@Excel(name = "未分配设备数", width = 15,orderNum = "5")
|
||||
private Integer undistributedDeviceNums;
|
||||
|
||||
@Excel(name = "入库设备数", width = 15,orderNum = "3")
|
||||
private Integer totalAssignedDeviceNums;
|
||||
@@ -28,25 +33,22 @@ public class DeptStatData {
|
||||
/**
|
||||
* 佩戴人员数
|
||||
*/
|
||||
@Excel(name = "佩戴人员数", width = 15,orderNum = "5")
|
||||
@Excel(name = "佩戴人员数", width = 15,orderNum = "6")
|
||||
private Integer assignedUserNums;
|
||||
/**
|
||||
* 未佩戴人员数
|
||||
*/
|
||||
@Excel(name = "未佩戴人员数", width = 15,orderNum = "6")
|
||||
@Excel(name = "未佩戴人员数", width = 15,orderNum = "7")
|
||||
private Integer undistributedUserNums;
|
||||
|
||||
@Excel(name = "心率异常人数", width = 15,orderNum = "7")
|
||||
@Excel(name = "心率异常人数", width = 15,orderNum = "8")
|
||||
private Integer heartRateNums;
|
||||
@Excel(name = "血氧异常人数", width = 15,orderNum = "8")
|
||||
@Excel(name = "血氧异常人数", width = 15,orderNum = "9")
|
||||
private Integer spo2Nums;
|
||||
@Excel(name = "压力异常人数", width = 15,orderNum = "9")
|
||||
@Excel(name = "压力异常人数", width = 15,orderNum = "10")
|
||||
private Integer stressNums;
|
||||
@Excel(name = "体温异常人数", width = 15,orderNum = "10")
|
||||
@Excel(name = "体温异常人数", width = 15,orderNum = "11")
|
||||
private Integer tempNums;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
+2
-3
@@ -212,7 +212,6 @@ public class WatchDeviceController extends JeecgController<WatchDevice, IWatchDe
|
||||
// return watchDeviceService.unbundleDevice(watchNo);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 设置上传频次
|
||||
*
|
||||
@@ -440,9 +439,9 @@ public class WatchDeviceController extends JeecgController<WatchDevice, IWatchDe
|
||||
return Result.error("已存在执行中的导入任务,请稍后导入或点击【查看导入任务】查看任务导出进度!");
|
||||
}
|
||||
if (!StringUtils.hasLength(deptId) || "undefined".equals(deptId)) {
|
||||
// throw new JeecgBootException("部门不能为空");
|
||||
throw new JeecgBootException("部门不能为空");
|
||||
//可为空,空则算入新疆油田公司
|
||||
deptId = sysCache.getDepartIdByOrgCode("A01");
|
||||
// deptId = sysCache.getDepartIdByOrgCode("A01");
|
||||
}
|
||||
String sheetName = "设备导入";
|
||||
String fileName = sheetName + "_" + DateUtils.getDate("yyyyMMddHHmmss");
|
||||
|
||||
+6
@@ -707,6 +707,12 @@ public class DeptStatisticDataServiceImpl extends ServiceImpl<DeptStatisticDataM
|
||||
:
|
||||
transfer.departBindAndWearNumMap().getOrDefault(orgCode, new DepartDeviceNum())
|
||||
);
|
||||
// 未分配设备数 = 入库设备数 - 已分配设备数,仅一、二级部门有入库数据
|
||||
if (deptStatData.getTotalAssignedDeviceNums() != null) {
|
||||
deptStatData.setUndistributedDeviceNums(
|
||||
deptStatData.getTotalAssignedDeviceNums() - deptStatData.getAssignedDeviceNums()
|
||||
);
|
||||
}
|
||||
fillWarningNums(
|
||||
deptStatData,
|
||||
(!allSecond && (isFirst || isSecond))
|
||||
|
||||
+14
-11
@@ -152,6 +152,7 @@ public class WatchDeviceServiceImpl extends ServiceImpl<WatchDeviceMapper, Watch
|
||||
private AsyncTaskExecutor asyncTaskExecutor;
|
||||
|
||||
|
||||
|
||||
private RequestAttributes requestAttributes = null;
|
||||
private final ToolExportHandler toolExportHandler = new ToolExportHandler();
|
||||
@Autowired
|
||||
@@ -300,11 +301,11 @@ public class WatchDeviceServiceImpl extends ServiceImpl<WatchDeviceMapper, Watch
|
||||
// 新增手表只能绑定给本单位的人
|
||||
LoginUser userById = sysBaseAPI.getUserById(dto.getBindUserId());
|
||||
|
||||
// if (userById.getOrgCode() == null || watchDevice.getOrgCode() == null ||
|
||||
// userById.getOrgCode().length() < 6 || watchDevice.getOrgCode().length() < 6 ||
|
||||
// !userById.getOrgCode().substring(0, 6).equals(watchDevice.getOrgCode().substring(0, 6))) {
|
||||
// return Result.error("手表只能绑定给本单位人员");
|
||||
// }
|
||||
if (userById.getOrgCode() == null || watchDevice.getOrgCode() == null ||
|
||||
userById.getOrgCode().length() < 6 || watchDevice.getOrgCode().length() < 6 ||
|
||||
!userById.getOrgCode().substring(0, 6).equals(watchDevice.getOrgCode().substring(0, 6))) {
|
||||
return Result.error("手表只能绑定给本单位人员");
|
||||
}
|
||||
|
||||
if (isDeviceAlreadyBound(watchDevice, dto)) {
|
||||
return Result.error("该设备已被绑定");
|
||||
@@ -442,11 +443,13 @@ public class WatchDeviceServiceImpl extends ServiceImpl<WatchDeviceMapper, Watch
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Result unbundleDevice(String watchNo){
|
||||
BindUserDTO dto = new BindUserDTO();
|
||||
dto.setBindUserId(GlobalUtils.getLoginUser().getId());
|
||||
dto.setWatchNo(watchNo);
|
||||
dto.setBindDate(new Date());
|
||||
return unbundleUser(dto);
|
||||
// BindUserDTO dto = new BindUserDTO();
|
||||
// dto.setBindUserId(GlobalUtils.getLoginUser().getId());
|
||||
// dto.setWatchNo(watchNo);
|
||||
// dto.setBindDate(new Date());
|
||||
// return unbundleUser(dto);
|
||||
// 2026.04.09 说 不能从移动端解绑了
|
||||
return Result.error("请联系管理员解绑");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -861,7 +864,7 @@ public class WatchDeviceServiceImpl extends ServiceImpl<WatchDeviceMapper, Watch
|
||||
binHisQueryWrapper.isNull(WatchBindHis::getBindEndDate);
|
||||
binHisQueryWrapper.eq(WatchBindHis::getWatchNo, watchDevice.getWatchNo());
|
||||
binHisQueryWrapper.orderByDesc(WatchBindHis::getCreateDate);
|
||||
binHisQueryWrapper.last("FETCH FIRST 1 ROWS ONLY");
|
||||
binHisQueryWrapper.last("limit 1");
|
||||
WatchBindHis watchBindHis = watchBindHisService.getOne(binHisQueryWrapper);
|
||||
if (watchBindHis == null) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user