新增接口
This commit is contained in:
parent
25da0b36eb
commit
1700e03892
|
|
@ -55,7 +55,7 @@ public class ImageDownloader {
|
||||||
outputStream.write(buffer, 0, len);
|
outputStream.write(buffer, 0, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
System.out.println("图片下载成功: " + file.getAbsolutePath());
|
// System.out.println("图片下载成功: " + file.getAbsolutePath());
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ public class IUploadFileServiceImpl implements IUploadFileService {
|
||||||
@Override
|
@Override
|
||||||
public boolean delFile(String path) {
|
public boolean delFile(String path) {
|
||||||
try{
|
try{
|
||||||
File file=new File(RuoYiConfig.getUploadUserImage()+path);
|
File file=new File(RuoYiConfig.getUploadPath()+path);
|
||||||
return file.delete();
|
return file.delete();
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
log.error(e.toString(),e);
|
log.error(e.toString(),e);
|
||||||
|
|
|
||||||
|
|
@ -240,7 +240,7 @@ public class RobotEventXmlServiceImpl implements IRobotEventXmlService {
|
||||||
if(imageUrl!=null){
|
if(imageUrl!=null){
|
||||||
double value= ImageSimilarityUtils.compareImages(filePath+lastPath,filePath+imageUrl.getImage());
|
double value= ImageSimilarityUtils.compareImages(filePath+lastPath,filePath+imageUrl.getImage());
|
||||||
String formattedValue = String.format("%.2f", value*100);
|
String formattedValue = String.format("%.2f", value*100);
|
||||||
vo=new RobotTaskImageVo(uuid,taskId,positionId,taskTime,lastPath,imageUrl.getImage(),imageUrl.getLastImage(),formattedValue);
|
vo=new RobotTaskImageVo(uuid,taskId,positionId,taskTime,lastPath,imageUrl.getImage(),imageUrl.getTaskTime(),formattedValue);
|
||||||
}else{
|
}else{
|
||||||
vo=new RobotTaskImageVo(uuid,taskId,positionId,taskTime,lastPath,null,null,null);
|
vo=new RobotTaskImageVo(uuid,taskId,positionId,taskTime,lastPath,null,null,null);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ public class RobotImageServiceImpl implements IRobotImageService {
|
||||||
map.put("allTask",allTask);
|
map.put("allTask",allTask);
|
||||||
//巡检照片
|
//巡检照片
|
||||||
int dayImage=mapper.getTaskImage("day");
|
int dayImage=mapper.getTaskImage("day");
|
||||||
int allImage=mapper.getTaskNum(null);
|
int allImage=mapper.getTaskImage(null);
|
||||||
map.put("dayImage",dayImage);
|
map.put("dayImage",dayImage);
|
||||||
map.put("allImage",allImage);
|
map.put("allImage",allImage);
|
||||||
//对比次数
|
//对比次数
|
||||||
|
|
|
||||||
|
|
@ -74,6 +74,8 @@ public class SbdUserServiceImpl implements ISbdUserService {
|
||||||
}
|
}
|
||||||
user.setImage(path);
|
user.setImage(path);
|
||||||
|
|
||||||
|
}else{
|
||||||
|
user.setImage(vo.getImage());
|
||||||
}
|
}
|
||||||
int num= mapper.updateSbdUser(user);
|
int num= mapper.updateSbdUser(user);
|
||||||
if(num>0){
|
if(num>0){
|
||||||
|
|
|
||||||
|
|
@ -56,9 +56,9 @@ public class RobotUserInfoVo {
|
||||||
*/
|
*/
|
||||||
private String workType;
|
private String workType;
|
||||||
|
|
||||||
private String startTime;
|
private String startDay;
|
||||||
|
|
||||||
private String endTime;
|
private String endDay;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,9 @@ import lombok.Data;
|
||||||
|
|
||||||
import javax.validation.constraints.Size;
|
import javax.validation.constraints.Size;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 黑子
|
||||||
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class SbdUserVo {
|
public class SbdUserVo {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
select user_name userName, sex ,post,image,work_type workType,mobile,create_time createTime,data_source dataSource,
|
select user_name userName, sex ,post,image,work_type workType,mobile,create_time createTime,data_source dataSource,
|
||||||
age,id_card idCard
|
age,id_card idCard
|
||||||
from robot_sbd_user
|
from robot_sbd_user
|
||||||
WHERE del_flag=0
|
WHERE id=#{id}
|
||||||
</select>
|
</select>
|
||||||
<select id="getDeviceList" resultType="com.bonus.business.vo.RobotVo">
|
<select id="getDeviceList" resultType="com.bonus.business.vo.RobotVo">
|
||||||
SELECT td.id,td.dev_name devName,td.mac_id macId,td.puid puId,td.indexs
|
SELECT td.id,td.dev_name devName,td.mac_id macId,td.puid puId,td.indexs
|
||||||
|
|
@ -33,7 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</select>
|
</select>
|
||||||
<!--查询人员集合列表-->
|
<!--查询人员集合列表-->
|
||||||
<select id="getList" resultType="com.bonus.business.vo.SbdUserVo">
|
<select id="getList" resultType="com.bonus.business.vo.SbdUserVo">
|
||||||
select user_name userName, sex ,post,image,work_type workType,mobile,
|
select id,user_name userName, sex ,post,image,work_type workType,mobile,
|
||||||
create_time createTime,data_source dataSource,
|
create_time createTime,data_source dataSource,
|
||||||
age,id_card idCard
|
age,id_card idCard
|
||||||
from robot_sbd_user
|
from robot_sbd_user
|
||||||
|
|
@ -57,8 +57,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="userName!=null and userName!=''">
|
<if test="userName!=null and userName!=''">
|
||||||
and rui.user_name like concat('%',#{userName},'%')
|
and rui.user_name like concat('%',#{userName},'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="startTime!=null and startTime!='' and endTime!='' and endTime!=''">
|
<if test="startDay!=null and startDay!='' and endDay!='' and endDay!=''">
|
||||||
and rui.create_day between #{startTime} and #{endTime}
|
and rui.create_day between #{startDay} and #{endDay}
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
order by rui.create_time desc
|
order by rui.create_time desc
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue