bug修复

This commit is contained in:
guo 2024-04-03 17:18:01 +08:00
parent d0bbecbf0e
commit c999aef306
14 changed files with 72 additions and 53 deletions

View File

@ -202,31 +202,43 @@ public class AsyncHikvision {
indexCodes.add(videoItem.getSerialNumber());
if ((i + 1) % 20 == 0) {
//20一次发生http请求
JSONObject requestParam = new JSONObject();
requestParam.put("pageNo", 1);
requestParam.put("pageSize", 20);
requestParam.put("indexCodes", indexCodes);
JSONObject jo = hikvisionCall.getVqdForHikvision(projectVideoConfig, requestParam);
if (jo != null) {
//插入结果
JSONArray listJa = jo.getJSONArray("list");
if (CollUtil.isEmpty(listJa)) {
continue;
}
for (int j = 0; j < listJa.size(); j++) {
JSONObject lJo = listJa.getJSONObject(j);
ProjectVideoHkVqd vqd = new ProjectVideoHkVqd();
BeanUtil.copyProperties(lJo, vqd);
vqd.setProjectSn(projectVideoConfig.getProjectSn());
projectVideoHkVqdMapper.insert(vqd);
}
}
addVqdForHikvisionBatch(projectVideoConfig, indexCodes);
indexCodes = new ArrayList<>();
} else if (i == videoItems.size() - 1) {
//最后一次
addVqdForHikvisionBatch(projectVideoConfig, indexCodes);
indexCodes = new ArrayList<>();
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* 批量插入视频质量诊断结果
*
* @param projectVideoConfig
* @param indexCodes
*/
private void addVqdForHikvisionBatch(ProjectVideoConfig projectVideoConfig, ArrayList<String> indexCodes) {
JSONObject requestParam = new JSONObject();
requestParam.put("pageNo", 1);
requestParam.put("pageSize", 20);
requestParam.put("indexCodes", indexCodes);
JSONObject jo = hikvisionCall.getVqdForHikvision(projectVideoConfig, requestParam);
if (jo != null) {
//插入结果
JSONArray listJa = jo.getJSONArray("list");
if (CollUtil.isNotEmpty(listJa)) {
for (int j = 0; j < listJa.size(); j++) {
JSONObject lJo = listJa.getJSONObject(j);
ProjectVideoHkVqd vqd = new ProjectVideoHkVqd();
BeanUtil.copyProperties(lJo, vqd);
vqd.setProjectSn(projectVideoConfig.getProjectSn());
projectVideoHkVqdMapper.insert(vqd);
}
}
}
}
}

View File

@ -156,12 +156,13 @@ public class SafetyHatWSClient {
//纬度(坐标系高德地图 GCJ-02)
Double xPoint = jo.getDouble("x_point");
Double yPoint = jo.getDouble("y_point");
Long time = jo.getLong("time");
Long ctime = joData.getLong("c_time");
Integer sosType = jo.getInteger("sos_type");
SafetyHatAlarm alarm = new SafetyHatAlarm();
alarm.setWorkerInfoId(dev.getWorkerInfoId());
alarm.setDevSn(dev.getDevSn());
alarm.setAlarmTime(new Date(ctime * 1000L));
alarm.setAlarmTime(new Date(time * 1000L));
alarm.setProjectSn(dev.getProjectSn());
alarm.setAlarmType(sosType);
alarm.setLatitude(yPoint);

View File

@ -174,5 +174,7 @@ public class SystemUser implements Serializable {
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date registryTime;
@TableField(exist = false)
@ApiModelProperty(value = "旧密码")
private java.lang.String oldPassword;
}

View File

@ -1130,6 +1130,13 @@ public class SystemUserServiceImpl extends ServiceImpl<SystemUserMapper, SystemU
@Override
public void xzUpdatePw(SystemUser systemUser) {
SystemUser su = systemUserMapper.selectById(systemUser.getUserId());
if (su == null) {
throw new OpenAlertException("userId不存在");
}
if (StringUtils.isBlank(systemUser.getGraphValidateCodeUuid())) {
throw new OpenAlertException("graphValidateCodeUuid不能为空");
}
Object o = redisRepository.get(systemUser.getGraphValidateCodeUuid());
if (o == null) {
throw new OpenAlertException("验证码已过期");
@ -1138,6 +1145,9 @@ public class SystemUserServiceImpl extends ServiceImpl<SystemUserMapper, SystemU
if (!Objects.equals(code, systemUser.getGraphValidateCode())) {
throw new OpenAlertException("验证码不正确");
}
if (!Objects.equals(su.getOldPassword(), systemUser.getShowPassword())) {
throw new OpenAlertException("原密码不正确");
}
systemUser.setPassword(null);
String showPassword = systemUser.getShowPassword();
if (StringUtils.isNotEmpty(showPassword)) {

View File

@ -31,7 +31,7 @@ public class ProjectUfaceConfig implements Serializable {
@Excel(name = "项目SN", width = 15)
@ApiModelProperty(value="项目SN")
private java.lang.String projectSn;
@ApiModelProperty(value = "1杭州宇泛智能科技,2用jdpush推送,3.mqtt,4.芊熠智能,5佳信捷,6佳信捷新设备,7海康门禁")
@ApiModelProperty(value = "1杭州宇泛智能科技,2用jdpush推送,3.mqtt,4.芊熠智能,5佳信捷,6佳信捷新设备,7海康门禁8弹弓")
private java.lang.Integer supplierType;
/**项目应用Id*/
@Excel(name = "项目应用Id", width = 15)

View File

@ -1,6 +1,5 @@
package com.zhgd.xmgl.modules.xz.controller;
import com.zhgd.xmgl.modules.xz.entity.XzSupplier;
import com.zhgd.xmgl.modules.xz.entity.XzSupplierRecord;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
@ -127,13 +126,13 @@ public class XzSupplierRecordController {
return result;
}
@ApiOperation(value = "通过用户id查询星纵-供应商记录信息", notes = "通过用户id查询星纵-供应商记录信息", httpMethod = "POST")
@ApiImplicitParams({
@ApiImplicitParam(name = "userId", value = "用户id", paramType = "body", required = true, dataType = "String"),
})
@PostMapping(value = "/getXzSupplierByUserId")
public Result<XzSupplierRecord> getXzSupplierByUserId(@RequestBody Map<String, Object> map) {
return Result.success(xzSupplierRecordService.getXzSupplierByUserId(map));
}
@ApiOperation(value = "通过星纵-供应商-资质申请id查询星纵-供应商记录信息", notes = "通过星纵-供应商-资质申请id查询星纵-供应商记录信息", httpMethod = "POST")
@ApiImplicitParams({
@ApiImplicitParam(name = "xzSupplierQualificationApplyId", value = "星纵-供应商-资质申请id", paramType = "body", required = true, dataType = "String"),
})
@PostMapping(value = "/getXzSupplierByXzSupplierQualificationApplyId")
public Result<XzSupplierRecord> getXzSupplierByXzSupplierQualificationApplyId(@RequestBody Map<String, Object> map) {
return Result.success(xzSupplierRecordService.getXzSupplierByXzSupplierQualificationApplyId(map));
}
}

View File

@ -99,9 +99,4 @@ public class XzSupplierQualificationApply implements Serializable {
@ApiModelProperty(value = "用户id")
private java.lang.Long userId;
@TableField(exist = false)
@ApiModelProperty(value = "1审批通过2审批拒绝")
private java.lang.Integer type;
}

View File

@ -32,11 +32,11 @@ public class XzSupplierQualificationRecord implements Serializable {
@ApiModelProperty(value = "id")
private java.lang.Long id;
/**
* 星纵-供应商记录id
* 星纵-供应商-资质申请id
*/
@Excel(name = "星纵-供应商记录id", width = 15)
@ApiModelProperty(value = "星纵-供应商记录id")
private java.lang.Long xzSupplierRecordId;
@Excel(name = "星纵-供应商-资质申请id", width = 15)
@ApiModelProperty(value = "星纵-供应商-资质申请id")
private java.lang.Long xzSupplierQualificationApplyId;
/**
* 资质文件名称
*/

View File

@ -25,5 +25,5 @@ public interface XzSupplierRecordMapper extends BaseMapper<XzSupplierRecord> {
List<XzSupplierRecord> queryList(@Param(Constants.WRAPPER) QueryWrapper<XzSupplierRecord> queryWrapper);
XzSupplierRecord getXzSupplierByUserId(Map<String, Object> map);
XzSupplierRecord getXzSupplierByXzSupplierQualificationApplyId(Map<String, Object> map);
}

View File

@ -7,11 +7,14 @@
${ew.customSqlSegment}
</select>
<select id="getXzSupplierByUserId" resultType="com.zhgd.xmgl.modules.xz.entity.XzSupplierRecord">
<select id="getXzSupplierByXzSupplierQualificationApplyId"
resultType="com.zhgd.xmgl.modules.xz.entity.XzSupplierRecord">
SELECT
a.*,b.user_id,c.company_type_name,b.xz_supplier_type_id,b.project_director_name,b.project_director_phone
from xz_supplier_record a INNER JOIN xz_user_to_supplier b ON a.id=b.xz_supplier_id
from xz_supplier_record a
join xz_supplier_qualification_apply xsqa on a.id = xsqa.xz_supplier_record_id
INNER JOIN xz_user_to_supplier b ON xsqa.apply_user_id=b.user_id
LEFT JOIN xz_supplier_type c ON b.xz_supplier_type_id=c.id
WHERE b.user_id=#{userId}
WHERE xsqa.id=#{xzSupplierQualificationApplyId}
</select>
</mapper>

View File

@ -1,6 +1,5 @@
package com.zhgd.xmgl.modules.xz.service;
import com.zhgd.xmgl.modules.xz.entity.XzSupplier;
import com.zhgd.xmgl.modules.xz.entity.XzSupplierRecord;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.core.metadata.IPage;
@ -27,5 +26,5 @@ public interface IXzSupplierRecordService extends IService<XzSupplierRecord> {
void delete(String id);
XzSupplierRecord getXzSupplierByUserId(Map<String, Object> map);
XzSupplierRecord getXzSupplierByXzSupplierQualificationApplyId(Map<String, Object> map);
}

View File

@ -145,7 +145,7 @@ public class XzSupplierQualificationApplyServiceImpl extends ServiceImpl<XzSuppl
.eq(XzSupplierQualification::getUserId, userId));
for (XzSupplierQualification xzSupplierQualification : xzSupplierQualifications) {
XzSupplierQualificationRecord qualificationRecord = new XzSupplierQualificationRecord();
qualificationRecord.setXzSupplierRecordId(supplierRecord.getId());
qualificationRecord.setXzSupplierQualificationApplyId(xzSupplierQualificationApply.getId());
BeanUtil.copyProperties(xzSupplierQualification, qualificationRecord);
qualificationRecord.setId(null);
xzSupplierQualificationRecordMapper.insert(qualificationRecord);

View File

@ -79,8 +79,8 @@ public class XzSupplierRecordServiceImpl extends ServiceImpl<XzSupplierRecordMap
}
@Override
public XzSupplierRecord getXzSupplierByUserId(Map<String, Object> map) {
return baseMapper.getXzSupplierByUserId(map);
public XzSupplierRecord getXzSupplierByXzSupplierQualificationApplyId(Map<String, Object> map) {
return baseMapper.getXzSupplierByXzSupplierQualificationApplyId(map);
}

View File

@ -22,9 +22,7 @@ video.alarm.newUrl=223.82.100.80:6040
wx-appid=
wx-AppSecret=
mqtt-scope=zjsjTopic
serverUrl=http://192.168.34.221:30002
#serverUrl=http://182.90.224.237:7000
#serverUrl=http://127.0.0.1:6023
serverUrl=http://182.90.224.237:51234
#\u89C6\u9891\u5206\u6790url
video-analysis-url=
server.ssl.enabled=false