Commit 9e280787 authored by 赵啸非's avatar 赵啸非

添加消息发送

parent b8f5d925
......@@ -103,9 +103,9 @@ public class SyncAppointWaitAndFinTaskImpl implements ITaskExcuteService {
log.info("同步今天等待用户任务");
syncWaitAndFinQueue();
log.info("关怀用户任务");
// updateWaitQueueTime();
// updateWaitQueueTime();
log.info("关怀服务完成任务");
// clearWaitQueueTime();
// clearWaitQueueTime();
//todo 办理完成同步
log.info("同步办理完成业务");
......@@ -117,216 +117,215 @@ public class SyncAppointWaitAndFinTaskImpl implements ITaskExcuteService {
private void syncWaitAndFinQueue() {
RedisTemplate<String, String> redisTemplate = cacheService.selectDbRedisTemplate(redisDb);
// cacheService.select(redisDb);//
Thread thread = new Thread(() -> {
List<WaitPersonInfo> waitPersonInfos = new ArrayList<>();
List<FinPersonInfo> finPersonInfos = new ArrayList<>();
List<EndPersonInfo> endPersonInfos = new ArrayList<>();
while (true) {
String value = redisTemplate.opsForList().leftPop(RedisKey.KEY_WAITNUM_LIST_CACHE, 5, TimeUnit.SECONDS);
WaitPersonInfo waitPersonInfo = JSON.parseObject(value, WaitPersonInfo.class);
// WaitPersonInfo waitPersonInfo = cacheService.blpop(RedisKey.KEY_WAITNUM_LIST_CACHE,10, WaitPersonInfo.class);
if (ObjectUtils.isEmpty(waitPersonInfo)) {
break;
} else {
waitPersonInfos.add(waitPersonInfo);
}
List<WaitPersonInfo> waitPersonInfos = new ArrayList<>();
List<FinPersonInfo> finPersonInfos = new ArrayList<>();
List<EndPersonInfo> endPersonInfos = new ArrayList<>();
while (true) {
String value = redisTemplate.opsForList().leftPop(RedisKey.KEY_WAITNUM_LIST_CACHE, 5, TimeUnit.SECONDS);
WaitPersonInfo waitPersonInfo = JSON.parseObject(value, WaitPersonInfo.class);
// WaitPersonInfo waitPersonInfo = cacheService.blpop(RedisKey.KEY_WAITNUM_LIST_CACHE,10, WaitPersonInfo.class);
if (ObjectUtils.isEmpty(waitPersonInfo)) {
break;
} else {
waitPersonInfos.add(waitPersonInfo);
}
}
while (true) {
String value = redisTemplate.opsForList().leftPop(RedisKey.KEY_FIN_LIST_CACHE, 5, TimeUnit.SECONDS);
FinPersonInfo finPersonInfo = JSON.parseObject(value, FinPersonInfo.class);
// FinPersonInfo finPersonInfo = cacheService.blpop(RedisKey.KEY_FIN_LIST_CACHE,10, FinPersonInfo.class);
if (ObjectUtils.isEmpty(finPersonInfo)) {
break;
} else {
finPersonInfos.add(finPersonInfo);
}
while (true) {
String value = redisTemplate.opsForList().leftPop(RedisKey.KEY_FIN_LIST_CACHE, 5, TimeUnit.SECONDS);
FinPersonInfo finPersonInfo = JSON.parseObject(value, FinPersonInfo.class);
// FinPersonInfo finPersonInfo = cacheService.blpop(RedisKey.KEY_FIN_LIST_CACHE,10, FinPersonInfo.class);
if (ObjectUtils.isEmpty(finPersonInfo)) {
break;
} else {
finPersonInfos.add(finPersonInfo);
}
}
while (true) {
String value = redisTemplate.opsForList().leftPop(RedisKey.KEY_FIN_DOWORK_LIST_CACHE, 5, TimeUnit.SECONDS);
EndPersonInfo endPersonInfo = JSON.parseObject(value, EndPersonInfo.class);
// FinPersonInfo finPersonInfo = cacheService.blpop(RedisKey.KEY_FIN_LIST_CACHE,10, FinPersonInfo.class);
if (ObjectUtils.isEmpty(endPersonInfo)) {
break;
} else {
endPersonInfos.add(endPersonInfo);
}
while (true) {
String value = redisTemplate.opsForList().leftPop(RedisKey.KEY_FIN_DOWORK_LIST_CACHE, 5, TimeUnit.SECONDS);
EndPersonInfo endPersonInfo = JSON.parseObject(value, EndPersonInfo.class);
// FinPersonInfo finPersonInfo = cacheService.blpop(RedisKey.KEY_FIN_LIST_CACHE,10, FinPersonInfo.class);
if (ObjectUtils.isEmpty(endPersonInfo)) {
break;
} else {
endPersonInfos.add(endPersonInfo);
}
}
List<CpPersonInfo> cpPersonInfos = new ArrayList<>();
while (true) {
String value = redisTemplate.opsForList().leftPop(RedisKey.KEY_CP_LIST_CACHE, 5, TimeUnit.SECONDS);
log.info("cp:{}", value);
CpPersonInfo cpPersonInfo = JSON.parseObject(value, CpPersonInfo.class);
log.info("cp obj:{}", JSON.toJSONString(cpPersonInfo));
if (ObjectUtils.isEmpty(cpPersonInfo)) {
break;
} else {
cpPersonInfos.add(cpPersonInfo);
}
List<CpPersonInfo> cpPersonInfos = new ArrayList<>();
while (true) {
String value = redisTemplate.opsForList().leftPop(RedisKey.KEY_CP_LIST_CACHE, 5, TimeUnit.SECONDS);
log.info("cp:{}", value);
CpPersonInfo cpPersonInfo = JSON.parseObject(value, CpPersonInfo.class);
log.info("cp obj:{}", JSON.toJSONString(cpPersonInfo));
if (ObjectUtils.isEmpty(cpPersonInfo)) {
break;
} else {
cpPersonInfos.add(cpPersonInfo);
}
}
if (!ObjectUtils.isEmpty(waitPersonInfos)) {
// log.info("waitPersonInfos:{}", JSON.toJSONString(waitPersonInfos));
List<CareRecordsEntity> recordsEntityList = waitPersonInfos.stream().map(item -> {
CareRecordsEntity careRecordsEntity = new CareRecordsEntity();
careRecordsEntity.initAttrValue();
careRecordsEntity.setName(item.getIdcardName());
careRecordsEntity.setContact(item.getPhone());
careRecordsEntity.setIdCard(item.getIdcardIDCardNo());
careRecordsEntity.setBussinessId(item.getBusinessId());
careRecordsEntity.setBussinessName(item.getBusinessName());
careRecordsEntity.setService(item.getBusinessName());
careRecordsEntity.setQueueNo(item.getFlowNum());
careRecordsEntity.setMonitorTime(new Date());
careRecordsEntity.setTakeTime(item.getTakeTime() == null ? new Date() : item.getTakeTime());
careRecordsEntity.setPersonId(DataUtil.converStr2Long(item.getPeopleId(), 0));
careRecordsEntity.setWaitId(item.getWaitId());
careRecordsEntity.setProcessStatus(ProcessStatusEnum.排队中.getValue());
careRecordsEntity.setCreateTime(new Date());
careRecordsEntity.setCreateUserName("system");
careRecordsEntity.setCreateUserId(1L);
return careRecordsEntity;
}).collect(Collectors.toList());
if (!ObjectUtils.isEmpty(recordsEntityList)) {
log.info("保存关怀记录数量,size:{}", recordsEntityList.size());
careRecordsService.save(recordsEntityList);
}
}
if (!ObjectUtils.isEmpty(waitPersonInfos)) {
// log.info("waitPersonInfos:{}", JSON.toJSONString(waitPersonInfos));
List<CareRecordsEntity> recordsEntityList = waitPersonInfos.stream().map(item -> {
CareRecordsEntity careRecordsEntity = new CareRecordsEntity();
careRecordsEntity.initAttrValue();
careRecordsEntity.setName(item.getIdcardName());
careRecordsEntity.setContact(item.getPhone());
careRecordsEntity.setIdCard(item.getIdcardIDCardNo());
careRecordsEntity.setBussinessId(item.getBusinessId());
careRecordsEntity.setBussinessName(item.getBusinessName());
careRecordsEntity.setService(item.getBusinessName());
careRecordsEntity.setQueueNo(item.getFlowNum());
careRecordsEntity.setMonitorTime(new Date());
careRecordsEntity.setTakeTime(item.getTakeTime() == null ? new Date() : item.getTakeTime());
careRecordsEntity.setPersonId(DataUtil.converStr2Long(item.getPeopleId(), 0));
careRecordsEntity.setWaitId(item.getWaitId());
careRecordsEntity.setProcessStatus(ProcessStatusEnum.排队中.getValue());
careRecordsEntity.setCreateTime(new Date());
careRecordsEntity.setCreateUserName("system");
careRecordsEntity.setCreateUserId(1L);
return careRecordsEntity;
}).collect(Collectors.toList());
if (!ObjectUtils.isEmpty(finPersonInfos)) {
log.info("finPersonInfos:{}", JSON.toJSONString(finPersonInfos));
List<Long> waitIdList = finPersonInfos.stream().map(item -> item.getWaitId()).collect(Collectors.toList());
Map<Long, FinPersonInfo> waitMap = finPersonInfos.stream().collect(Collectors.toMap(x -> x.getWaitId(), y -> y, (o, n) -> n));
if (!ObjectUtils.isEmpty(recordsEntityList)) {
log.info("保存关怀记录数量,size:{}", recordsEntityList.size());
careRecordsService.save(recordsEntityList);
}
}
CareRecordsQuery careRecordsQuery = new CareRecordsQuery();
careRecordsQuery.setWaitIdList(waitIdList);
List<CareRecordsEntity> careRecordsEntities = careRecordsService.find(careRecordsQuery);
if (!ObjectUtils.isEmpty(careRecordsEntities)) {
careRecordsEntities.forEach(item -> {
FinPersonInfo finPersonInfo = waitMap.get(item.getWaitId());
item.setProcessStatus(ProcessStatusEnum.接件结束.getValue());
item.setCallTime(finPersonInfo.getCalltime());
Long diff = DateUtil.between(item.getTakeTime(), finPersonInfo.getCalltime(), DateUnit.SECOND);
if (!ObjectUtils.isEmpty(finPersonInfo.getAvgWaitTime())) {
int avgWait = finPersonInfo.getAvgWaitTime();
if (avgWait > 0
&& diff > avgWait) {
//todo 构造发送消息。
AlarmRecordsEntity recordsEntity = new AlarmRecordsEntity();
recordsEntity.initAttrValue();
double doTime = NumberUtil.div(Double.parseDouble((diff) + ""), 60, 1); // 保留1位小数,四舍五入
double upTime = NumberUtil.div(Double.parseDouble((diff - avgWait) + ""), 60, 1); // 保留1位小数,四舍五入
String alarmContent = String.format("排队编号:%s:,%s业务叫号等待时间为%d分钟,超过了平均等待时长%d分钟!",
item.getQueueNo(), item.getBussinessName(), doTime, upTime);
recordsEntity.setAlarmContent(alarmContent);
recordsEntity.setAlarmTime(new Date());
recordsEntity.setCreateTime(new Date());
recordsEntity.setCreateUserId(1L);
alarmRecordsService.save(recordsEntity);
}
if (!ObjectUtils.isEmpty(finPersonInfos)) {
log.info("finPersonInfos:{}", JSON.toJSONString(finPersonInfos));
List<Long> waitIdList = finPersonInfos.stream().map(item -> item.getWaitId()).collect(Collectors.toList());
Map<Long, FinPersonInfo> waitMap = finPersonInfos.stream().collect(Collectors.toMap(x -> x.getWaitId(), y -> y, (o, n) -> n));
CareRecordsQuery careRecordsQuery = new CareRecordsQuery();
careRecordsQuery.setWaitIdList(waitIdList);
List<CareRecordsEntity> careRecordsEntities = careRecordsService.find(careRecordsQuery);
if (!ObjectUtils.isEmpty(careRecordsEntities)) {
careRecordsEntities.forEach(item -> {
FinPersonInfo finPersonInfo = waitMap.get(item.getWaitId());
item.setProcessStatus(ProcessStatusEnum.接件结束.getValue());
item.setCallTime(finPersonInfo.getCalltime());
Long diff = DateUtil.between(item.getTakeTime(), finPersonInfo.getCalltime(), DateUnit.SECOND);
if (!ObjectUtils.isEmpty(finPersonInfo.getAvgWaitTime())) {
int avgWait = finPersonInfo.getAvgWaitTime();
if (avgWait > 0
&& diff > avgWait) {
//todo 构造发送消息。
AlarmRecordsEntity recordsEntity = new AlarmRecordsEntity();
recordsEntity.initAttrValue();
double doTime = NumberUtil.div(Double.parseDouble((diff) + ""), 60, 1); // 保留1位小数,四舍五入
double upTime = NumberUtil.div(Double.parseDouble((diff - avgWait) + ""), 60, 1); // 保留1位小数,四舍五入
String alarmContent = String.format("排队编号:%s:,%s业务叫号等待时间为%d分钟,超过了平均等待时长%d分钟!",
item.getQueueNo(), item.getBussinessName(), doTime, upTime);
recordsEntity.setAlarmContent(alarmContent);
recordsEntity.setAlarmTime(new Date());
recordsEntity.setCreateTime(new Date());
recordsEntity.setCreateUserId(1L);
alarmRecordsService.save(recordsEntity);
}
//判断是否大于平均等待时间,如果大于 则预警消息
item.setWaitTime(diff.intValue());
item.setUpdateTime(new Date());
item.setUpdateUserId(1L);
item.setUpdateUserName("system");
});
if (!ObjectUtils.isEmpty(careRecordsEntities)) {
log.info("更新关怀记录数量,size:{}", careRecordsEntities.size());
careRecordsService.update(careRecordsEntities);
}
//判断是否大于平均等待时间,如果大于 则预警消息
item.setWaitTime(diff.intValue());
item.setUpdateTime(new Date());
item.setUpdateUserId(1L);
item.setUpdateUserName("system");
});
if (!ObjectUtils.isEmpty(careRecordsEntities)) {
log.info("更新关怀记录数量,size:{}", careRecordsEntities.size());
careRecordsService.update(careRecordsEntities);
}
}
}
if (!ObjectUtils.isEmpty(endPersonInfos)) {
log.info("endPersonInfos:{}", JSON.toJSONString(endPersonInfos));
List<Long> endIdList = endPersonInfos.stream().map(item -> item.getEndId()).collect(Collectors.toList());
Map<Long, EndPersonInfo> endMap = endPersonInfos.stream().collect(Collectors.toMap(x -> x.getEndId(), y -> y, (o, n) -> n));
CareRecordsQuery careRecordsQuery = new CareRecordsQuery();
careRecordsQuery.setWaitIdList(endIdList);
List<CareRecordsEntity> careRecordsEntities = careRecordsService.find(careRecordsQuery);
if (!ObjectUtils.isEmpty(careRecordsEntities)) {
careRecordsEntities.forEach(item -> {
EndPersonInfo endPersonInfo = endMap.get(item.getWaitId());
item.setProcessStatus(ProcessStatusEnum.办理结束.getValue());
item.setEndTime(endPersonInfo.getEndtime());
Long diff = DateUtil.between(item.getCallTime(), endPersonInfo.getEndtime(), DateUnit.MINUTE);
if (!ObjectUtils.isEmpty(endPersonInfo.getAvgHandleTime())) {
int avgWait = endPersonInfo.getAvgHandleTime();
if (avgWait > 0
&& diff > avgWait) {
//todo 构造发送消息。
AlarmRecordsEntity recordsEntity = new AlarmRecordsEntity();
recordsEntity.initAttrValue();
double doTime = NumberUtil.div(Double.parseDouble((diff) + ""), 60, 1); // 保留1位小数,四舍五入
double upTime = NumberUtil.div(Double.parseDouble((diff - avgWait) + ""), 60, 1); // 保留1位小数,四舍五入
String alarmContent = String.format("编号:%s:,%s业务办理时间为%d分钟,超过了平均办理时长%d分钟!", item.getBussinessName(), doTime, upTime);
recordsEntity.setAlarmContent(alarmContent);
recordsEntity.setAlarmTime(new Date());
recordsEntity.setCreateTime(new Date());
recordsEntity.setCreateUserId(1L);
alarmRecordsService.save(recordsEntity);
}
if (!ObjectUtils.isEmpty(endPersonInfos)) {
log.info("endPersonInfos:{}", JSON.toJSONString(endPersonInfos));
List<Long> endIdList = endPersonInfos.stream().map(item -> item.getEndId()).collect(Collectors.toList());
Map<Long, EndPersonInfo> endMap = endPersonInfos.stream().collect(Collectors.toMap(x -> x.getEndId(), y -> y, (o, n) -> n));
CareRecordsQuery careRecordsQuery = new CareRecordsQuery();
careRecordsQuery.setWaitIdList(endIdList);
List<CareRecordsEntity> careRecordsEntities = careRecordsService.find(careRecordsQuery);
if (!ObjectUtils.isEmpty(careRecordsEntities)) {
careRecordsEntities.forEach(item -> {
EndPersonInfo endPersonInfo = endMap.get(item.getWaitId());
item.setProcessStatus(ProcessStatusEnum.办理结束.getValue());
item.setEndTime(endPersonInfo.getEndtime());
Long diff = DateUtil.between(item.getCallTime(), endPersonInfo.getEndtime(), DateUnit.MINUTE);
if (!ObjectUtils.isEmpty(endPersonInfo.getAvgHandleTime())) {
int avgWait = endPersonInfo.getAvgHandleTime();
if (avgWait > 0
&& diff > avgWait) {
//todo 构造发送消息。
AlarmRecordsEntity recordsEntity = new AlarmRecordsEntity();
recordsEntity.initAttrValue();
double doTime = NumberUtil.div(Double.parseDouble((diff) + ""), 60, 1); // 保留1位小数,四舍五入
double upTime = NumberUtil.div(Double.parseDouble((diff - avgWait) + ""), 60, 1); // 保留1位小数,四舍五入
String alarmContent = String.format("编号:%s:,%s业务办理时间为%d分钟,超过了平均办理时长%d分钟!", item.getBussinessName(), doTime, upTime);
recordsEntity.setAlarmContent(alarmContent);
recordsEntity.setAlarmTime(new Date());
recordsEntity.setCreateTime(new Date());
recordsEntity.setCreateUserId(1L);
alarmRecordsService.save(recordsEntity);
}
item.setEndDureTime(diff.intValue());
item.setUpdateTime(new Date());
item.setUpdateUserId(1L);
item.setUpdateUserName("system");
});
if (!ObjectUtils.isEmpty(careRecordsEntities)) {
log.info("更新办理结束记录数量,size:{}", careRecordsEntities.size());
careRecordsService.update(careRecordsEntities);
}
item.setEndDureTime(diff.intValue());
item.setUpdateTime(new Date());
item.setUpdateUserId(1L);
item.setUpdateUserName("system");
});
if (!ObjectUtils.isEmpty(careRecordsEntities)) {
log.info("更新办理结束记录数量,size:{}", careRecordsEntities.size());
careRecordsService.update(careRecordsEntities);
}
}
}
if (!ObjectUtils.isEmpty(cpPersonInfos)) {
log.info("cpPersonInfos:{}", JSON.toJSONString(cpPersonInfos));
for (CpPersonInfo cpPersonInfo : cpPersonInfos) {
CareCpRecordsEntity careCpRecordsEntity = new CareCpRecordsEntity();
careCpRecordsEntity.initAttrValue();
careCpRecordsEntity.setSiteId(cpPersonInfo.getSiteId());
careCpRecordsEntity.setPersonId(cpPersonInfo.getPeopleId());
careCpRecordsEntity.setPjId(cpPersonInfo.getPjId());
careCpRecordsEntity.setWindowName(cpPersonInfo.getWindowName());
careCpRecordsEntity.setSection(cpPersonInfo.getSection());
careCpRecordsEntity.setFlounum(cpPersonInfo.getFlounum());
careCpRecordsEntity.setAssessment(cpPersonInfo.getOptionId());
careCpRecordsEntity.setType(cpPersonInfo.getType());
careCpRecordsEntity.setContent(cpPersonInfo.getContent());
careCpRecordsEntity.setSource(cpPersonInfo.getSource());
careCpRecordsEntity.setPjTime(cpPersonInfo.getCpTime());
careCpRecordsEntity.setName(cpPersonInfo.getWorkmanName());
careCpRecordsEntity.setCreateTime(new Date());
careCpRecordsEntity.setCreateUserId(1L);
careCpRecordsService.save(careCpRecordsEntity);
//发送差评消息
AlarmRecordsEntity recordsEntity = new AlarmRecordsEntity();
recordsEntity.initAttrValue();
String alarmContent = String.format(
"客户对窗口:%s:,工作人员%s 发起评价:%s,评价内容:%s!",
careCpRecordsEntity.getWindowName(), cpPersonInfo.getWorkmanName(), cpPersonInfo.getOptionId(), cpPersonInfo.getContent());
recordsEntity.setAlarmContent(alarmContent);
recordsEntity.setAlarmTime(new Date());
recordsEntity.setCreateTime(new Date());
recordsEntity.setCreateUserId(1L);
alarmRecordsService.save(recordsEntity);
}
if (!ObjectUtils.isEmpty(cpPersonInfos)) {
log.info("cpPersonInfos:{}", JSON.toJSONString(cpPersonInfos));
for (CpPersonInfo cpPersonInfo : cpPersonInfos) {
CareCpRecordsEntity careCpRecordsEntity = new CareCpRecordsEntity();
careCpRecordsEntity.initAttrValue();
careCpRecordsEntity.setSiteId(cpPersonInfo.getSiteId());
careCpRecordsEntity.setPersonId(cpPersonInfo.getPeopleId());
careCpRecordsEntity.setPjId(cpPersonInfo.getPjId());
careCpRecordsEntity.setWindowName(cpPersonInfo.getWindowName());
careCpRecordsEntity.setSection(cpPersonInfo.getSection());
careCpRecordsEntity.setFlounum(cpPersonInfo.getFlounum());
careCpRecordsEntity.setAssessment(cpPersonInfo.getOptionId());
careCpRecordsEntity.setType(cpPersonInfo.getType());
careCpRecordsEntity.setContent(cpPersonInfo.getContent());
careCpRecordsEntity.setSource(cpPersonInfo.getSource());
careCpRecordsEntity.setPjTime(cpPersonInfo.getCpTime());
careCpRecordsEntity.setName(cpPersonInfo.getWorkmanName());
careCpRecordsEntity.setCreateTime(new Date());
careCpRecordsEntity.setCreateUserId(1L);
careCpRecordsService.save(careCpRecordsEntity);
//发送差评消息
AlarmRecordsEntity recordsEntity = new AlarmRecordsEntity();
recordsEntity.initAttrValue();
String alarmContent = String.format(
"客户对窗口:%s:,工作人员%s 发起评价:%s,评价内容:%s!",
careCpRecordsEntity.getWindowName(), cpPersonInfo.getWorkmanName(), cpPersonInfo.getOptionId(), cpPersonInfo.getContent());
recordsEntity.setAlarmContent(alarmContent);
recordsEntity.setAlarmTime(new Date());
recordsEntity.setCreateTime(new Date());
recordsEntity.setCreateUserId(1L);
alarmRecordsService.save(recordsEntity);
}
});
ThreadPool.getInstance().execute(thread);
}
}
......@@ -495,15 +494,14 @@ public class SyncAppointWaitAndFinTaskImpl implements ITaskExcuteService {
System.out.println(isIn);*/
String value="{\"id\":\"76007\",\"peopleid\":\"0\",\"idcardData_PhotoFileName\":\"\",\"option_id\":\"不满意\",\"content_ids\":\"6,22\",\"pic_url\":\"\",\"sectionid\":\"424\",\"source\":\"安卓评价\",\"opinion\":\"\",\"siteid\":\"1\",\"windowid\":\"205\",\"queueid\":\"752197\",\"create_time\":\"2025-04-08 09:45:46\",\"update_time\":\"2025-04-08 09:45:46\",\"pjxt\":\"1\",\"workman_id\":\"1062\",\"device_id\":\"226\",\"evaluatestatus\":\"2\",\"evaluatetype\":\"1\",\"photobefor\":\"\",\"photoautograph\":\"\",\"picture\":\"\",\"process\":\"\",\"eyevaluate\":\"0\",\"type\":\"phpj\",\"hallid\":\"8\",\"devicenum\":\"08-00-27-E1-42-F7\",\"window_name\":\"行政审批窗口\",\"window_fronum\":\"2E32\",\"workman_name\":\"陈莹\",\"workman_number\":\"RS107\",\"section\":\"市人力资源社会保障局\",\"flounum\":\"EP005\",\"content\":\"等待时间长,服务态度差\",\"idcard_Name\":\"\",\"idcard_IDCardNo\":\"\",\"phone\":\"\"}";
String value = "{\"id\":\"76007\",\"peopleid\":\"0\",\"idcardData_PhotoFileName\":\"\",\"option_id\":\"不满意\",\"content_ids\":\"6,22\",\"pic_url\":\"\",\"sectionid\":\"424\",\"source\":\"安卓评价\",\"opinion\":\"\",\"siteid\":\"1\",\"windowid\":\"205\",\"queueid\":\"752197\",\"create_time\":\"2025-04-08 09:45:46\",\"update_time\":\"2025-04-08 09:45:46\",\"pjxt\":\"1\",\"workman_id\":\"1062\",\"device_id\":\"226\",\"evaluatestatus\":\"2\",\"evaluatetype\":\"1\",\"photobefor\":\"\",\"photoautograph\":\"\",\"picture\":\"\",\"process\":\"\",\"eyevaluate\":\"0\",\"type\":\"phpj\",\"hallid\":\"8\",\"devicenum\":\"08-00-27-E1-42-F7\",\"window_name\":\"行政审批窗口\",\"window_fronum\":\"2E32\",\"workman_name\":\"陈莹\",\"workman_number\":\"RS107\",\"section\":\"市人力资源社会保障局\",\"flounum\":\"EP005\",\"content\":\"等待时间长,服务态度差\",\"idcard_Name\":\"\",\"idcard_IDCardNo\":\"\",\"phone\":\"\"}";
log.info("cp:{}",value);
log.info("cp:{}", value);
CpPersonInfo cpPersonInfo = JSON.parseObject(value, CpPersonInfo.class);
log.info("cp obj:{}",JSON.toJSONString(cpPersonInfo));
log.info("cp obj:{}", JSON.toJSONString(cpPersonInfo));
double result = NumberUtil.div(Double.parseDouble((63-53)+""), 60, 1); // 保留1位小数,四舍五入
double result = NumberUtil.div(Double.parseDouble((63 - 53) + ""), 60, 1); // 保留1位小数,四舍五入
System.out.println(result);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment