扬尘躁声风向修改
This commit is contained in:
parent
bd38907f72
commit
93465924e0
@ -1,6 +1,7 @@
|
|||||||
package com.zhgd.xmgl.modules.worker.service.impl;
|
package com.zhgd.xmgl.modules.worker.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.io.FileUtil;
|
import cn.hutool.core.io.FileUtil;
|
||||||
|
import cn.xuyanwu.spring.file.storage.FileInfo;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.arcsoft.face.FaceFeature;
|
import com.arcsoft.face.FaceFeature;
|
||||||
import com.arcsoft.face.FaceInfo;
|
import com.arcsoft.face.FaceInfo;
|
||||||
@ -14,6 +15,7 @@ import com.zhgd.jeecg.common.mybatis.EntityMap;
|
|||||||
import com.zhgd.xmgl.async.AsyncSendAttendance;
|
import com.zhgd.xmgl.async.AsyncSendAttendance;
|
||||||
import com.zhgd.xmgl.modules.basicdata.service.ICompanyService;
|
import com.zhgd.xmgl.modules.basicdata.service.ICompanyService;
|
||||||
import com.zhgd.xmgl.modules.basicdata.service.UploadFileService;
|
import com.zhgd.xmgl.modules.basicdata.service.UploadFileService;
|
||||||
|
import com.zhgd.xmgl.modules.basicdata.service.impl.UploadFileServiceImpl;
|
||||||
import com.zhgd.xmgl.modules.govtapi.GovtOpenApiService;
|
import com.zhgd.xmgl.modules.govtapi.GovtOpenApiService;
|
||||||
import com.zhgd.xmgl.modules.project.entity.ProjectUfaceConfig;
|
import com.zhgd.xmgl.modules.project.entity.ProjectUfaceConfig;
|
||||||
import com.zhgd.xmgl.modules.project.mapper.ProjectUfaceConfigMapper;
|
import com.zhgd.xmgl.modules.project.mapper.ProjectUfaceConfigMapper;
|
||||||
@ -727,6 +729,11 @@ public class WorkerAttendanceServiceImpl extends ServiceImpl<WorkerAttendanceMap
|
|||||||
WorkerInfo info = workerInfoMapper.selectWorkWorkerInfoWithIDCard(idCard, projectSn);
|
WorkerInfo info = workerInfoMapper.selectWorkWorkerInfoWithIDCard(idCard, projectSn);
|
||||||
if (info != null) {
|
if (info != null) {
|
||||||
WorkerAttendance workerAttendance = new WorkerAttendance();
|
WorkerAttendance workerAttendance = new WorkerAttendance();
|
||||||
|
String imageBase64 = MapUtils.getString(map, "imageBase64");
|
||||||
|
if (StringUtils.isNotEmpty(imageBase64)) {
|
||||||
|
FileInfo fileInfo = uploadFileService.uploadFileBase64Image(imageBase64);
|
||||||
|
workerAttendance.setImageUrl(fileInfo.getFilename());
|
||||||
|
}
|
||||||
workerAttendance.setPersonSn(info.getPersonSn());
|
workerAttendance.setPersonSn(info.getPersonSn());
|
||||||
workerAttendance.setCreateTime(MapUtils.getString(map, "snapTime"));
|
workerAttendance.setCreateTime(MapUtils.getString(map, "snapTime"));
|
||||||
workerAttendance.setProjectSn(projectSn);
|
workerAttendance.setProjectSn(projectSn);
|
||||||
|
|||||||
@ -46,6 +46,8 @@ public class WindDirectionUtils {
|
|||||||
} else if ("N".equals(winddirection)) {
|
} else if ("N".equals(winddirection)) {
|
||||||
winddirectionName = "正北";
|
winddirectionName = "正北";
|
||||||
}
|
}
|
||||||
|
} else if (isChinese(winddirection)) {
|
||||||
|
winddirectionName = winddirection;
|
||||||
} else {
|
} else {
|
||||||
double winddirections = Double.parseDouble(winddirection);
|
double winddirections = Double.parseDouble(winddirection);
|
||||||
if (337.5 < winddirections || winddirections <= 22.5) {
|
if (337.5 < winddirections || winddirections <= 22.5) {
|
||||||
@ -72,4 +74,21 @@ public class WindDirectionUtils {
|
|||||||
|
|
||||||
return winddirectionName;
|
return winddirectionName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断该字符串是否为中文
|
||||||
|
*
|
||||||
|
* @param string
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static boolean isChinese(String string) {
|
||||||
|
int n = 0;
|
||||||
|
for (int i = 0; i < string.length(); i++) {
|
||||||
|
n = (int) string.charAt(i);
|
||||||
|
if (!(19968 <= n && n < 40869)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user