修改bug及添加 维护管理功能
This commit is contained in:
parent
6250379738
commit
e07c9419b0
|
|
@ -17,7 +17,6 @@ public class PageUtils extends PageHelper
|
|||
public static void startPage()
|
||||
{
|
||||
PageDomain pageDomain = TableSupport.buildPageRequest();
|
||||
|
||||
Integer pageNum = pageDomain.getPageNum();
|
||||
Integer pageSize = pageDomain.getPageSize();
|
||||
Boolean reasonable = pageDomain.getReasonable();
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ public class ValidateUtil {
|
|||
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.err.println(("admin@123456"));
|
||||
System.err.println(validatePassword("admin@123456"));
|
||||
System.err.println(("Admin@1234567"));
|
||||
System.err.println(validatePassword("Admin@123456"));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -0,0 +1,73 @@
|
|||
package com.securitycontrol.entity.background.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 数据维护u实体类
|
||||
* @author 黑子
|
||||
*/
|
||||
@Data
|
||||
public class DeviceDataVo {
|
||||
|
||||
/**
|
||||
* 关键字
|
||||
*/
|
||||
private String keyWord;
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private String id;
|
||||
/**
|
||||
* 标段编码
|
||||
*/
|
||||
private String bidCode;
|
||||
|
||||
private String bidName;
|
||||
/**
|
||||
* 工程状态
|
||||
*/
|
||||
private String proState;
|
||||
/**
|
||||
* 监测点名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 测点相对标高
|
||||
*/
|
||||
private String height;
|
||||
/**
|
||||
* 检测值
|
||||
*/
|
||||
private String val;
|
||||
/**
|
||||
* 累计沉降
|
||||
*/
|
||||
private String hisVal;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private String createTime;
|
||||
/**
|
||||
* 计量型号设备编码
|
||||
*/
|
||||
private String devCode;
|
||||
/**
|
||||
* 检测人
|
||||
*/
|
||||
private String jcUser;
|
||||
/**
|
||||
* 校核人
|
||||
*/
|
||||
private String jhUser;
|
||||
/**
|
||||
* 数据类型
|
||||
*/
|
||||
private String dataType;
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
private String unit;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -5,6 +5,8 @@ import com.google.code.kaptcha.util.Config;
|
|||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
|
||||
import static com.google.code.kaptcha.Constants.*;
|
||||
|
|
@ -46,8 +48,7 @@ public class CaptchaConfig
|
|||
}
|
||||
|
||||
@Bean(name = "captchaProducerMath")
|
||||
public DefaultKaptcha getKaptchaBeanMath()
|
||||
{
|
||||
public DefaultKaptcha getKaptchaBeanMath() {
|
||||
DefaultKaptcha defaultKaptcha = new DefaultKaptcha();
|
||||
Properties properties = new Properties();
|
||||
// 是否有边框 默认为true 我们可以自己设置yes,no
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import com.securitycontrol.common.log.enums.OperationType;
|
|||
import com.securitycontrol.entity.background.dto.DeviceBdDto;
|
||||
import com.securitycontrol.entity.background.dto.DeviceDto;
|
||||
import com.securitycontrol.entity.background.vo.DeviceBdVo;
|
||||
import com.securitycontrol.entity.background.vo.DeviceDataVo;
|
||||
import com.securitycontrol.entity.background.vo.DeviceVo;
|
||||
import com.securitycontrol.entity.system.vo.DictVo;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
|
@ -55,7 +56,7 @@ public class DeviceController extends BaseController {
|
|||
* @return
|
||||
*/
|
||||
@PostMapping("addDevice")
|
||||
@Log(title = "设备管理", menu = "设备管理->新增设备", grade = OperationType.ADD_BUSINESS, details = "查询设备列表", type = "业务日志")
|
||||
@Log(title = "设备管理", menu = "设备管理->设备管理", grade = OperationType.ADD_BUSINESS, details = "查询设备列表", type = "业务日志")
|
||||
public Result<String> addDevice(@RequestBody @Valid DeviceVo dto) {
|
||||
return service.addDevice(dto);
|
||||
}
|
||||
|
|
@ -68,7 +69,7 @@ public class DeviceController extends BaseController {
|
|||
* @return
|
||||
*/
|
||||
@PostMapping("updateDevice")
|
||||
@Log(title = "设备管理", menu = "设备管理->修改设备", grade = OperationType.UPDATE_BUSINESS, details = "查询设备列表", type = "业务日志")
|
||||
@Log(title = "设备管理", menu = "设备管理->设备管理", grade = OperationType.UPDATE_BUSINESS, details = "查询设备列表", type = "业务日志")
|
||||
public Result<String> updateDevice(@RequestBody @Valid DeviceVo dto) {
|
||||
return service.updateDevice(dto);
|
||||
}
|
||||
|
|
@ -80,7 +81,7 @@ public class DeviceController extends BaseController {
|
|||
* @return
|
||||
*/
|
||||
@PostMapping("deleteDevice")
|
||||
@Log(title = "设备管理", menu = "设备管理->注销设备", grade = OperationType.DELETE_BUSINESS, details = "查询设备列表", type = "业务日志")
|
||||
@Log(title = "注销设备", menu = "设备管理->设备管理", grade = OperationType.DELETE_BUSINESS, details = "注销设备", type = "业务日志")
|
||||
public Result<String> deleteDevice(@RequestBody @Valid DeviceVo dto) {
|
||||
return service.deleteDevice(dto);
|
||||
}
|
||||
|
|
@ -105,4 +106,67 @@ public class DeviceController extends BaseController {
|
|||
public Result<List<DeviceVo>> getDeviceListByType(DeviceDto dto) {
|
||||
return service.getDeviceListByType(dto);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ApiOperation(value = "获取设备列表")
|
||||
@GetMapping("getDavDataList")
|
||||
@Log(title = "设备管理", menu = "设备管理->数据维护", grade = OperationType.QUERY_BUSINESS, details = "查询数据维护列表", type = "业务日志")
|
||||
public TableDataInfo getDavDataList(DeviceDataVo dto) {
|
||||
try{
|
||||
startPage();
|
||||
List<DeviceDataVo> list = service.getDavDataList(dto);
|
||||
return getDataTable(list);
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
return getDataTableBad(new ArrayList<>(),"请求出错了");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("addDevData")
|
||||
@Log(title = "设备管理", menu = "设备管理->数据维护", grade = OperationType.ADD_BUSINESS, details = "新增检测数据", type = "业务日志")
|
||||
public Result<String> addDevData(@RequestBody DeviceDataVo dto) {
|
||||
return service.addDevData(dto);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增设备
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("updateDevData")
|
||||
@Log(title = "设备管理", menu = "设备管理->数据维护", grade = OperationType.UPDATE_BUSINESS, details = "更新数据", type = "业务日志")
|
||||
public Result<String> updateDevData(@RequestBody DeviceDataVo dto) {
|
||||
return service.updateDevData(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("deleteDevData")
|
||||
@Log(title = "设备管理", menu = "设备管理->数据维护", grade = OperationType.DELETE_BUSINESS, details = "删除数据", type = "业务日志")
|
||||
public Result<String> deleteDevData(@RequestBody @Valid DeviceDataVo dto) {
|
||||
return service.deleteDevData(dto);
|
||||
}
|
||||
/**
|
||||
* 新增设备
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("getDevDataById")
|
||||
public Result<DeviceDataVo> getDevDataById(@RequestBody @Valid DeviceDataVo dto) {
|
||||
return service.getDevDataById(dto);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,8 +23,7 @@ public class ScheduleController {
|
|||
|
||||
@Autowired
|
||||
private IDeviceOfBdMapper deviceOfBdMapper;
|
||||
@Scheduled(cron = "10 * * * * ?")
|
||||
@PostConstruct
|
||||
@Scheduled(cron = "0 0/30 * * * ?")
|
||||
public void getProInfo() {
|
||||
try {
|
||||
System.err.println("开始扫描不在线的设备----->");
|
||||
|
|
@ -34,7 +33,6 @@ public class ScheduleController {
|
|||
deviceOfBdMapper.updateDeviceState(id);
|
||||
});
|
||||
}
|
||||
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.securitycontrol.background.mapper;
|
|||
|
||||
import com.securitycontrol.common.core.domain.Result;
|
||||
import com.securitycontrol.entity.background.dto.DeviceDto;
|
||||
import com.securitycontrol.entity.background.vo.DeviceDataVo;
|
||||
import com.securitycontrol.entity.background.vo.DeviceVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
|
@ -64,4 +65,39 @@ public interface DeviceMapper {
|
|||
* @return
|
||||
*/
|
||||
List<DeviceVo> getDeviceListByType(@Param("code") int code);
|
||||
|
||||
/**
|
||||
* 查询维护us胡金
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<DeviceDataVo> getDavDataList(DeviceDataVo dto);
|
||||
|
||||
/**
|
||||
* 更新 维护数据数据
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
int updateDevData(DeviceDataVo dto);
|
||||
|
||||
/**
|
||||
* 新增维护数据
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
int addDevData(DeviceDataVo dto);
|
||||
|
||||
/**
|
||||
*查询数据详情
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
DeviceDataVo getDevDataById(DeviceDataVo dto);
|
||||
|
||||
/**
|
||||
* 删除维护数据
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
int deleteDevData(DeviceDataVo dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.securitycontrol.background.service;
|
|||
import com.securitycontrol.common.core.domain.Result;
|
||||
import com.securitycontrol.entity.background.dto.DeviceDto;
|
||||
import com.securitycontrol.entity.background.vo.DeviceBdVo;
|
||||
import com.securitycontrol.entity.background.vo.DeviceDataVo;
|
||||
import com.securitycontrol.entity.background.vo.DeviceVo;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -54,4 +55,39 @@ public interface DeviceService {
|
|||
* @return
|
||||
*/
|
||||
Result<List<DeviceVo>> getDeviceListByType(DeviceDto dto);
|
||||
|
||||
/**
|
||||
* 查询 维护数据
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<DeviceDataVo> getDavDataList(DeviceDataVo dto);
|
||||
|
||||
/**
|
||||
* 更新维护数据
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
Result<String> updateDevData(DeviceDataVo dto);
|
||||
|
||||
/**
|
||||
* 新增维护数据
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
Result<String> addDevData(DeviceDataVo dto);
|
||||
|
||||
/**
|
||||
* 删除维护数据
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
Result<String> deleteDevData(DeviceDataVo dto);
|
||||
|
||||
/**
|
||||
* 查询维护数据
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
Result<DeviceDataVo> getDevDataById(DeviceDataVo dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import com.securitycontrol.common.core.domain.Result;
|
|||
import com.securitycontrol.common.core.utils.aes.StringHelper;
|
||||
import com.securitycontrol.common.core.utils.uuid.IdUtils;
|
||||
import com.securitycontrol.entity.background.dto.DeviceDto;
|
||||
import com.securitycontrol.entity.background.vo.DeviceDataVo;
|
||||
import com.securitycontrol.entity.background.vo.DeviceVo;
|
||||
import com.securitycontrol.entity.system.SystemGlobal;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
|
@ -142,6 +143,84 @@ public class DeviceServiceImpl implements DeviceService {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询维护数据 按照类型
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<DeviceDataVo> getDavDataList(DeviceDataVo dto) {
|
||||
try{
|
||||
return mapper.getDavDataList(dto);
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
return new ArrayList<DeviceDataVo>();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新维护数据
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Result<String> updateDevData(DeviceDataVo dto) {
|
||||
try{
|
||||
int num= mapper.updateDevData(dto);
|
||||
if(num==SystemGlobal.SUCCESS_NUM){
|
||||
return Result.ok("修改成功","修改成功");
|
||||
}
|
||||
return Result.fail("修改失败,请联系管理员");
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
return Result.fail("系统升级中,请稍后重试");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增维护数据
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Result<String> addDevData(DeviceDataVo dto) {
|
||||
try{
|
||||
int num= mapper.addDevData(dto);
|
||||
if(num==SystemGlobal.SUCCESS_NUM){
|
||||
return Result.ok("新增成功","新增成功");
|
||||
}
|
||||
return Result.fail("新增失败,请联系管理员");
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
return Result.fail("系统升级中,请稍后重试");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<String> deleteDevData(DeviceDataVo dto) {
|
||||
try{
|
||||
int num= mapper.deleteDevData(dto);
|
||||
if(num==SystemGlobal.SUCCESS_NUM){
|
||||
return Result.ok("删除成功","删除成功");
|
||||
}
|
||||
return Result.fail("删除失败,请联系管理员");
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
return Result.fail("系统升级中,请稍后重试");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<DeviceDataVo> getDevDataById(DeviceDataVo dto) {
|
||||
try{
|
||||
DeviceDataVo vo= mapper.getDevDataById(dto);
|
||||
return Result.ok(vo);
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
return Result.fail("系统升级中,请稍后重试");
|
||||
}
|
||||
}
|
||||
|
||||
public String checkData(DeviceVo deviceVo){
|
||||
try{
|
||||
Integer num=mapper.getDeviceNumByQuery(deviceVo,"1");
|
||||
|
|
|
|||
|
|
@ -40,5 +40,6 @@ jasypt:
|
|||
file:
|
||||
upload_path: /data/zhgd/file
|
||||
temp_file_path: /data/zhgd/file
|
||||
|
||||
pagehelper:
|
||||
helper-dialect: mysql
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
#{macId},#{gbCode},#{deviceType},now(),0,#{manufacturer},#{onLine},#{tyCode},#{idx}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateData">
|
||||
update tb_device
|
||||
set device_name=#{deviceName},device_code=#{puId},mac_id=#{macId},
|
||||
|
|
@ -31,9 +32,31 @@
|
|||
on_line=#{onLine},t_code=#{tyCode},idx=#{idx},update_time=now()
|
||||
where device_id=#{deviceId}
|
||||
</update>
|
||||
|
||||
<insert id="addDevData">
|
||||
insert into tb_device_data(bid_code,bid_name,name,
|
||||
height,val,his_val,create_time,jc_user,
|
||||
dev_code,jh_user,data_type,unit) value (
|
||||
#{bidCode},#{bidName},#{name},
|
||||
#{height},#{val},#{hisVal},#{createTime},#{jcUser},
|
||||
#{devCode},#{jhUser},#{dataType},#{unit}
|
||||
)
|
||||
</insert>
|
||||
<!-- 修改维护数据 -->
|
||||
<update id="updateDevData">
|
||||
update tb_device_data
|
||||
set bid_code=#{bidCode},bid_name=#{bidName},name=#{name},
|
||||
height=#{height},val=#{val},his_val=#{hisVal},
|
||||
create_time=#{createTime},jc_user=#{jcUser},dev_code=#{devCode},
|
||||
jh_user=#{jhUser},data_type=#{dataType},unit=#{unit}
|
||||
where id=#{id}
|
||||
</update>
|
||||
<delete id="deleteDevice">
|
||||
update tb_device set del_flag=1 where device_id=#{deviceId} and del_flag=0
|
||||
</delete>
|
||||
<delete id="deleteDevData">
|
||||
delete from tb_device_data where id=#{id}
|
||||
</delete>
|
||||
|
||||
<select id="getDeviceList" resultMap="DevMap">
|
||||
select td.device_id,device_name,device_code,mac_id,
|
||||
|
|
@ -91,5 +114,38 @@
|
|||
left join tb_user_bind_cap ubc on ubc.device_id=td.device_id and ubc.bind_status=1
|
||||
WHERE ubc.id is null and td.device_type =#{code} and td.del_flag=0
|
||||
</select>
|
||||
<select id="getDavDataList" resultType="com.securitycontrol.entity.background.vo.DeviceDataVo">
|
||||
select jdd.id, jdd.bid_code bidCode, pro.pro_name bidName,jdd.name,jdd.height,jdd.val,
|
||||
jdd.his_val hisVal,jdd.create_time createTime,jdd.jc_user jcUser,jdd.dev_code devCode,
|
||||
jdd.jh_user jhUser,jdd.data_type dataType,jdd.unit,
|
||||
pro.`status` proState
|
||||
from tb_device_data jdd
|
||||
left join tb_project pro on pro.bid_code=jdd.bid_code
|
||||
<where>
|
||||
<if test="keyWord!=null and keyWord!=''">
|
||||
( pro.pro_name like concat('%',#{keyWord},'%') or
|
||||
jdd.create_time like concat('%',#{keyWord},'%') or
|
||||
jdd.jc_user like concat('%',#{keyWord},'%') or
|
||||
jdd.jh_user like concat('%',#{keyWord},'%') or
|
||||
jdd.name like concat('%',#{keyWord},'%') or
|
||||
jdd.dev_code like concat('%',#{keyWord},'%') or
|
||||
jdd.bid_code like concat('%',#{keyWord},'%')
|
||||
)
|
||||
</if>
|
||||
<if test="dataType!=null and dataType!=''">
|
||||
and jdd.data_type=#{dataType}
|
||||
</if>
|
||||
</where>
|
||||
order by jdd.id desc
|
||||
</select>
|
||||
<select id="getDevDataById" resultType="com.securitycontrol.entity.background.vo.DeviceDataVo">
|
||||
select jdd.id, jdd.bid_code bidCode, pro.pro_name bidName,jdd.name,jdd.height,jdd.val,
|
||||
jdd.his_val hisVal,jdd.create_time createTime,jdd.jc_user jcUser,jdd.dev_code devCode,
|
||||
jdd.jh_user jhUser,jdd.data_type dataType,jdd.unit,
|
||||
pro.`status` proState
|
||||
from tb_device_data jdd
|
||||
left join tb_project pro on pro.bid_code=jdd.bid_code
|
||||
where jdd.id=#{id}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -5,6 +5,7 @@ import com.securitycontrol.common.core.web.domain.AjaxResult;
|
|||
import com.securitycontrol.common.core.web.page.TableDataInfo;
|
||||
import com.securitycontrol.common.log.annotation.Log;
|
||||
import com.securitycontrol.common.log.enums.OperationType;
|
||||
import com.securitycontrol.entity.background.vo.DeviceDataVo;
|
||||
import com.securitycontrol.entity.screen.dto.AlarmMgeDto;
|
||||
import com.securitycontrol.entity.screen.dto.ConstructionQualityDto;
|
||||
import com.securitycontrol.entity.screen.vo.AlarmMgeVo;
|
||||
|
|
@ -98,4 +99,22 @@ public class ConstructionQualityController extends BaseController {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 检测记录拆线呢
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "施工质量-沉降点记录")
|
||||
@GetMapping("getDevDataList")
|
||||
@Log(title = "施工质量列表", menu = "施工质量列表->沉降点记录", grade = OperationType.QUERY_BUSINESS, details = "查询沉降点记录", type = "业务日志")
|
||||
public TableDataInfo getDevDataList(DeviceDataVo dto) {
|
||||
try{
|
||||
startLayPage();
|
||||
List<DeviceDataVo> list = service.getDevDataList(dto);
|
||||
return getDataTableLayui(list);
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
return getDataTableBadLayui(new ArrayList<DeviceDataVo>(),"请求出错了");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.securitycontrol.screen.mapper;
|
||||
|
||||
import com.securitycontrol.entity.background.vo.DeviceDataVo;
|
||||
import com.securitycontrol.entity.screen.dto.ConstructionQualityDto;
|
||||
import com.securitycontrol.entity.screen.vo.ConstructionQualityVo;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
|
@ -58,4 +59,11 @@ public interface ConstructionQualityMapper {
|
|||
* @return
|
||||
*/
|
||||
List<ConstructionQualityVo> getHistoryList(ConstructionQualityDto dto);
|
||||
|
||||
/**
|
||||
* 查询检测数据
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<DeviceDataVo> getDevDataList(DeviceDataVo dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.securitycontrol.screen.service;
|
||||
|
||||
import com.securitycontrol.entity.background.vo.DeviceDataVo;
|
||||
import com.securitycontrol.entity.screen.dto.ConstructionQualityDto;
|
||||
import com.securitycontrol.entity.screen.vo.ConstructionQualityVo;
|
||||
|
||||
|
|
@ -55,4 +56,11 @@ public interface ConstructionQualityService {
|
|||
* @return
|
||||
*/
|
||||
List<ConstructionQualityVo> getHistoryList(ConstructionQualityDto dto);
|
||||
|
||||
/**
|
||||
* 查询检测记录
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<DeviceDataVo> getDevDataList(DeviceDataVo dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.securitycontrol.screen.service.impl;
|
||||
|
||||
import com.securitycontrol.common.core.utils.aes.StringHelper;
|
||||
import com.securitycontrol.entity.background.vo.DeviceDataVo;
|
||||
import com.securitycontrol.entity.screen.dto.ConstructionQualityDto;
|
||||
import com.securitycontrol.entity.screen.vo.ConstructionQualityVo;
|
||||
import com.securitycontrol.screen.mapper.ConstructionQualityMapper;
|
||||
|
|
@ -99,6 +100,17 @@ public class ConstructionQualityImpl implements ConstructionQualityService {
|
|||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DeviceDataVo> getDevDataList(DeviceDataVo dto) {
|
||||
List<DeviceDataVo> list = new ArrayList<>();
|
||||
try{
|
||||
list = mapper.getDevDataList(dto);
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 施工质量-检测记录对比
|
||||
* @param dto
|
||||
|
|
|
|||
|
|
@ -93,6 +93,16 @@
|
|||
and tdv.create_time BETWEEN #{startTime} AND #{endTime}
|
||||
</if>
|
||||
</select>
|
||||
<select id="getDevDataList" resultType="com.securitycontrol.entity.background.vo.DeviceDataVo">
|
||||
select jdd.id, jdd.bid_code bidCode, pro.pro_name bidName,jdd.name,jdd.height,jdd.val,
|
||||
jdd.his_val hisVal,jdd.create_time createTime,jdd.jc_user jcUser,jdd.dev_code devCode,
|
||||
jdd.jh_user jhUser,jdd.data_type dataType,jdd.unit,
|
||||
pro.`status` proState
|
||||
from tb_device_data jdd
|
||||
left join tb_project pro on pro.bid_code=jdd.bid_code
|
||||
where jdd.bid_code=#{bidCode}
|
||||
order by jdd.id desc
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -73,14 +73,14 @@
|
|||
</select>
|
||||
<select id="getNewFenceList" resultType="com.securitycontrol.entity.screen.vo.PersonnelControlVo">
|
||||
SELECT
|
||||
tpf.id AS id,
|
||||
tpf.fence_name AS fenceName,
|
||||
sd.dict_name AS fenceType,
|
||||
tpf.create_time AS createTime,
|
||||
sd1.dict_name AS alarmType,
|
||||
sd2.dict_name AS alertType,
|
||||
tpf.color AS color,
|
||||
tpf.status AS status
|
||||
any_value( tpf.id) AS id,
|
||||
any_value(sd.dict_name) AS fenceType,
|
||||
any_value(tpf.create_time) AS createTime,
|
||||
any_value(sd1.dict_name) AS alarmType,
|
||||
any_value(sd2.dict_name) AS alertType,
|
||||
any_value(tpf.color) AS color,
|
||||
any_value(tpf.status) AS status
|
||||
FROM
|
||||
tb_pro_fence tpf
|
||||
LEFT JOIN sys_dict sd ON tpf.fence_type = sd.dict_id
|
||||
|
|
@ -103,10 +103,10 @@
|
|||
</select>
|
||||
<select id="personnelCoordinatePoint" resultType="com.securitycontrol.entity.screen.vo.PersonnelControlVo">
|
||||
SELECT
|
||||
GROUP_CONCAT(tdd.mode_name) AS modeName,
|
||||
GROUP_CONCAT(tdv.val) AS val,
|
||||
ttp.user_name AS userName,
|
||||
ttp.phone
|
||||
ANY_VALUE(GROUP_CONCAT(tdd.mode_name)) AS modeName,
|
||||
ANY_VALUE( GROUP_CONCAT(tdv.val)) AS val,
|
||||
ANY_VALUE( ttp.user_name)AS userName,
|
||||
ANY_VALUE(ttp.phone) phone
|
||||
FROM tb_bd_device tbd
|
||||
INNER JOIN tb_pro_bd tpb ON tbd.bd_id = tpb.id AND tpb.del_flag = 0 AND tpb.bid_code = #{bidCode}
|
||||
INNER JOIN tb_device_detail tdd ON tbd.device_id = tdd.device_id AND tdd.del_flag = 0
|
||||
|
|
@ -119,8 +119,8 @@
|
|||
<select id="personnelHistoricalCoordinates"
|
||||
resultType="com.securitycontrol.entity.screen.vo.PersonnelControlVo">
|
||||
SELECT
|
||||
his.val as val,
|
||||
GROUP_CONCAT(his2.val) aslatLon,
|
||||
ANY_VALUE(his.val) as val,
|
||||
ANY_VALUE( GROUP_CONCAT(his2.val)) aslatLon,
|
||||
his.source_type as sourceType
|
||||
from tb_his_device_value his
|
||||
left join tb_his_device_value his2 on his.source_type=his2.source_type AND his.id!=his2.id
|
||||
|
|
|
|||
|
|
@ -146,12 +146,12 @@ public class SysLogServiceImpl implements ISysLogService {
|
|||
return Result.fail("请输入数字");
|
||||
}
|
||||
}else{
|
||||
return Result.fail("日志容量最低是1024Mb");
|
||||
return Result.fail("日志容量最低是"+SystemGlobal.LOG_DEFEAT+"Mb");
|
||||
}
|
||||
|
||||
Double cap=Double.parseDouble(capacity);
|
||||
if(cap<SystemGlobal.LOG_DEFEAT){
|
||||
return Result.fail("日志容量最低是1024Mb");
|
||||
return Result.fail("日志容量最低是"+SystemGlobal.LOG_DEFEAT+"Mb");
|
||||
}
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.securitycontrol.system.service;
|
|||
|
||||
import com.securitycontrol.common.core.constant.Constant;
|
||||
import com.securitycontrol.common.core.utils.StringUtils;
|
||||
import com.securitycontrol.common.core.utils.ValidateUtil;
|
||||
import com.securitycontrol.common.core.utils.aes.DateTimeHelper;
|
||||
import com.securitycontrol.common.core.web.domain.AjaxResult;
|
||||
import com.securitycontrol.common.security.utils.SecurityUtils;
|
||||
|
|
@ -56,6 +57,10 @@ public class UserServiceImpl implements IUserService {
|
|||
vo.setType(2);
|
||||
} else {
|
||||
vo.setType(1);
|
||||
if(!ValidateUtil.validatePassword(vo.getPassword())){
|
||||
return AjaxResult.error("密码必须包含大写字母、小写字母、特殊字符、数字,长度在8-26位之间");
|
||||
}
|
||||
|
||||
vo.setPassword(SecurityUtils.encryptPassword(vo.getPassword()));
|
||||
vo.setCreateTime(DateTimeHelper.getNowTime());
|
||||
}
|
||||
|
|
@ -101,6 +106,8 @@ public class UserServiceImpl implements IUserService {
|
|||
if (vo.getUserId() == null || StringUtils.isBlank(vo.getPassword())) {
|
||||
return AjaxResult.error("参数不完整");
|
||||
}
|
||||
if(!ValidateUtil.validatePassword(vo.getPassword())){
|
||||
return AjaxResult.error("密码必须包含大写字母、小写字母、特殊字符、数字,长度在8-26位之间"); }
|
||||
vo.setPassword(SecurityUtils.encryptPassword(vo.getPassword()));
|
||||
mapper.editPwd(vo);
|
||||
} catch (Exception e) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue