新需求开发
This commit is contained in:
parent
41f14b6ad3
commit
bd17c68a18
|
|
@ -51,9 +51,12 @@ public class AuthFilter implements GlobalFilter, Ordered
|
|||
public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
|
||||
ServerHttpRequest request = exchange.getRequest();
|
||||
ServerHttpRequest.Builder mutate = request.mutate();
|
||||
|
||||
String url = request.getURI().getPath();
|
||||
if(url.equals("/auth/sgccLogin")){
|
||||
if("/auth/sgccLogin".equals(url)){
|
||||
return chain.filter(exchange);
|
||||
}
|
||||
|
||||
if("/inter/dataCenter/inter/devInfo".equals(url)){
|
||||
return chain.filter(exchange);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -48,13 +48,13 @@ public class VscInterApplication implements CommandLineRunner {
|
|||
//第三方sdk初始化
|
||||
|
||||
//海康sdk初始化
|
||||
AlarmUtil util = new AlarmUtil();
|
||||
int row = util.initDevice();
|
||||
if (row == 1) {
|
||||
log.info("初始化失败");
|
||||
}
|
||||
newService.loginDoor();
|
||||
init();
|
||||
// AlarmUtil util = new AlarmUtil();
|
||||
// int row = util.initDevice();
|
||||
// if (row == 1) {
|
||||
// log.info("初始化失败");
|
||||
// }
|
||||
// newService.loginDoor();
|
||||
// init();
|
||||
// newService.loginDVR();//初始化DVR
|
||||
}catch (Exception e){
|
||||
log.info("初始化失败");
|
||||
|
|
|
|||
|
|
@ -195,6 +195,15 @@ public class BdController {
|
|||
return AjaxResult.success(0);
|
||||
}
|
||||
|
||||
@PostMapping("addCarUserAccess")
|
||||
public AjaxResult addCarUserAccess(@RequestBody UserCarAccessVo param){
|
||||
try{
|
||||
return service.addCarUserAccess(param);
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
return AjaxResult.success(0);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -151,4 +151,16 @@ public interface BdMapper {
|
|||
* @return
|
||||
*/
|
||||
int addSource(FileExportVo vo);
|
||||
|
||||
/**
|
||||
* 人车管理
|
||||
* @param param
|
||||
*/
|
||||
void addUserAccess(UserCarAccessVo param);
|
||||
|
||||
/**
|
||||
* 车辆出入记录
|
||||
* @param param
|
||||
*/
|
||||
void addCarAccess(UserCarAccessVo param);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -162,8 +162,8 @@ public class BdServiceImpl {
|
|||
param.setDevCode(param.getDeviceId());
|
||||
String bidCode=mapper.getBidCodeByBd(param);
|
||||
param.setBidCode(bidCode);
|
||||
String type=param.getEventCode().replaceAll("Alarm","").trim();
|
||||
param.setType(type);
|
||||
// String type=param.getEventCode().replaceAll("Alarm","").trim();
|
||||
// param.setType(type);
|
||||
WarnInfoVo vo=mapper.getDeviceInfo(param);
|
||||
param.setDeviceId(vo.getDeviceId());
|
||||
param.setAttributeId(vo.getAttributeId());
|
||||
|
|
@ -328,4 +328,28 @@ public class BdServiceImpl {
|
|||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增人车出入管理
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
public AjaxResult addCarUserAccess(UserCarAccessVo param) {
|
||||
try{
|
||||
String id=IdUtils.getuid();
|
||||
param.setId(id);
|
||||
String dataType=param.getDataType();
|
||||
if("1".equals(dataType)){
|
||||
mapper.addUserAccess(param);
|
||||
}else{
|
||||
mapper.addCarAccess(param);
|
||||
}
|
||||
|
||||
return AjaxResult.success("新增成功");
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
|
||||
return AjaxResult.error("新增失败");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,50 @@
|
|||
package com.securitycontrol.inter.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 人员车辆表
|
||||
* @author 黑子
|
||||
*/
|
||||
@Data
|
||||
public class UserCarAccessVo {
|
||||
/**
|
||||
* 1 人2车
|
||||
*/
|
||||
private String dataType;
|
||||
|
||||
private String id;
|
||||
/**
|
||||
* 车辆id
|
||||
*/
|
||||
private String carId;
|
||||
/**
|
||||
* 车牌号
|
||||
*/
|
||||
private String carNum;
|
||||
/**
|
||||
* 进出时间
|
||||
*/
|
||||
private String accessTime;
|
||||
/**
|
||||
* 进出类型
|
||||
*/
|
||||
private int accessType;
|
||||
/**
|
||||
* 用回答
|
||||
*/
|
||||
private String userId;
|
||||
/**
|
||||
* 身份证号码
|
||||
*/
|
||||
private String idNumber;
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
private String userName;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -124,7 +124,7 @@
|
|||
<select id="getDeviceInfo" resultType="com.securitycontrol.inter.vo.WarnInfoVo">
|
||||
SELECT tbd.device_id deviceId,tdd.id attributeId
|
||||
FROM tb_bd_device tbd
|
||||
LEFT JOIN tb_device_detail tdd on tbd.device_id=tbd.device_id
|
||||
LEFT JOIN tb_device_detail tdd on tbd.device_id=tdd.device_id
|
||||
WHERE tbd.bd_code=#{deviceId} and tdd.device_code=#{type}
|
||||
</select>
|
||||
<!--查询干他数据-->
|
||||
|
|
@ -140,4 +140,16 @@
|
|||
value ( #{id},#{fileType},#{fileId},#{suffix},#{fileName},
|
||||
#{sourceId},#{sourceType},0,now())
|
||||
</insert>
|
||||
<!--新增人员-->
|
||||
<insert id="addUserAccess">
|
||||
insert into tb_user_access(
|
||||
id, id_number, user_id, access_time, access_type, user_name, user_phone
|
||||
)values (#{id},#{idNumber},#{userId},#{accessTime},#{accessType},#{userName},#{phone})
|
||||
</insert>
|
||||
<insert id="addCarAccess">
|
||||
insert into tb_car_access(
|
||||
id, car_id,car_num,accesss_time,access_type) values (
|
||||
#{id}, #{carId},#{carNum},#{accessTime},#{accessType}
|
||||
)
|
||||
</insert>
|
||||
</mapper>
|
||||
|
|
@ -145,10 +145,10 @@ public class DeviceOfBdServiceImpl implements IDeviceOfBdService {
|
|||
if (StringUtils.isNotBlank(validResult)) {
|
||||
return AjaxResult.error(validResult);
|
||||
}
|
||||
int result = mapper.isDeviceCodeExist(vo);
|
||||
if (result > 0) {
|
||||
return AjaxResult.error("设备编码不能重复");
|
||||
}
|
||||
// int result = mapper.isDeviceCodeExist(vo);
|
||||
// if (result > 0) {
|
||||
// return AjaxResult.error("设备编码不能重复");
|
||||
// }
|
||||
if (StringUtils.isEmpty(vo.getDeviceId())) {
|
||||
String deviceId = IdUtils.getuid();
|
||||
vo.setDeviceId(deviceId);
|
||||
|
|
|
|||
|
|
@ -139,15 +139,16 @@ public class ConstructionQualityImpl implements ConstructionQualityService {
|
|||
System.err.println(currentYearMonth);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<ConstructionQualityVo> getDetectionRecord(ConstructionQualityDto dto) {
|
||||
List<ConstructionQualityVo> list = new ArrayList<>();
|
||||
YearMonth currentYearMonth = YearMonth.of(2025,12);
|
||||
YearMonth currentYearMonth = YearMonth.of(2025,3);
|
||||
YearMonth[] lastTwelveMonths = new YearMonth[12];
|
||||
for (int i = 0; i < NUM_MONTHS_IN_YEAR; i++) {
|
||||
lastTwelveMonths[i] = currentYearMonth.minusMonths(11 - i);
|
||||
}
|
||||
if("1512P017007Y010".equals(dto.getBidCode())){
|
||||
// if("1512P017007Y010".equals(dto.getBidCode())){
|
||||
for (YearMonth lastTwelveMonth : lastTwelveMonths) {
|
||||
dto.setMonth(String.valueOf(lastTwelveMonth));
|
||||
List<ConstructionQualityVo> byMonth = mapper.getByMonth(dto);
|
||||
|
|
@ -162,36 +163,36 @@ public class ConstructionQualityImpl implements ConstructionQualityService {
|
|||
}
|
||||
}
|
||||
|
||||
}else{
|
||||
for (YearMonth lastTwelveMonth : lastTwelveMonths) {
|
||||
if(String.valueOf(lastTwelveMonth).contains("2025-01")){
|
||||
ConstructionQualityVo emptyData = new ConstructionQualityVo();
|
||||
emptyData.setDetectionNumber(String.valueOf(56));
|
||||
emptyData.setQualificationNumber(String.valueOf(54));
|
||||
emptyData.setMonth(String.valueOf(lastTwelveMonth));
|
||||
list.add(emptyData);
|
||||
}else if(String.valueOf(lastTwelveMonth).contains("2025-02")){
|
||||
ConstructionQualityVo emptyData = new ConstructionQualityVo();
|
||||
emptyData.setDetectionNumber(String.valueOf(38));
|
||||
emptyData.setQualificationNumber(String.valueOf(38));
|
||||
emptyData.setMonth(String.valueOf(lastTwelveMonth));
|
||||
list.add(emptyData);
|
||||
}else if(String.valueOf(lastTwelveMonth).contains("2025-03")){
|
||||
ConstructionQualityVo emptyData = new ConstructionQualityVo();
|
||||
emptyData.setDetectionNumber(String.valueOf(49));
|
||||
emptyData.setQualificationNumber(String.valueOf(47));
|
||||
emptyData.setMonth(String.valueOf(lastTwelveMonth));
|
||||
list.add(emptyData);
|
||||
}else {
|
||||
ConstructionQualityVo emptyData = new ConstructionQualityVo();
|
||||
emptyData.setDetectionNumber(String.valueOf(0));
|
||||
emptyData.setQualificationNumber(String.valueOf(0));
|
||||
emptyData.setMonth(String.valueOf(lastTwelveMonth));
|
||||
list.add(emptyData);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
// }else{
|
||||
// for (YearMonth lastTwelveMonth : lastTwelveMonths) {
|
||||
// if(String.valueOf(lastTwelveMonth).contains("2025-01")){
|
||||
// ConstructionQualityVo emptyData = new ConstructionQualityVo();
|
||||
// emptyData.setDetectionNumber(String.valueOf(56));
|
||||
// emptyData.setQualificationNumber(String.valueOf(54));
|
||||
// emptyData.setMonth(String.valueOf(lastTwelveMonth));
|
||||
// list.add(emptyData);
|
||||
// }else if(String.valueOf(lastTwelveMonth).contains("2025-02")){
|
||||
// ConstructionQualityVo emptyData = new ConstructionQualityVo();
|
||||
// emptyData.setDetectionNumber(String.valueOf(38));
|
||||
// emptyData.setQualificationNumber(String.valueOf(38));
|
||||
// emptyData.setMonth(String.valueOf(lastTwelveMonth));
|
||||
// list.add(emptyData);
|
||||
// }else if(String.valueOf(lastTwelveMonth).contains("2025-03")){
|
||||
// ConstructionQualityVo emptyData = new ConstructionQualityVo();
|
||||
// emptyData.setDetectionNumber(String.valueOf(49));
|
||||
// emptyData.setQualificationNumber(String.valueOf(47));
|
||||
// emptyData.setMonth(String.valueOf(lastTwelveMonth));
|
||||
// list.add(emptyData);
|
||||
// }else {
|
||||
// ConstructionQualityVo emptyData = new ConstructionQualityVo();
|
||||
// emptyData.setDetectionNumber(String.valueOf(0));
|
||||
// emptyData.setQualificationNumber(String.valueOf(0));
|
||||
// emptyData.setMonth(String.valueOf(lastTwelveMonth));
|
||||
// list.add(emptyData);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }
|
||||
|
||||
return list;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue