日志添加

This commit is contained in:
zc
2026-06-12 14:18:39 +08:00
parent 09f0ac43fa
commit 6f2f2095fd
2 changed files with 14 additions and 9 deletions

View File

@@ -294,6 +294,7 @@ public class SysPeopleController extends BaseController
List<SysEquipment> list = equipmentService.selectSysEquipmentList(equipment); List<SysEquipment> list = equipmentService.selectSysEquipmentList(equipment);
for (SysEquipment e : list) { for (SysEquipment e : list) {
String data = sdkService.personDelete(admitGuids, e.getIp(), e.getPassword()); String data = sdkService.personDelete(admitGuids, e.getIp(), e.getPassword());
log.info("remove-宇泛设备删除人员结果:{}", data);
JSONObject jsons = JSONObject.parseObject(data); JSONObject jsons = JSONObject.parseObject(data);
if (jsons == null || !jsons.containsKey("code") || !StrUtil.equals("LAN_SUS-0", jsons.getString("code"))) { if (jsons == null || !jsons.containsKey("code") || !StrUtil.equals("LAN_SUS-0", jsons.getString("code"))) {
throw new ServiceException("人员删除失败:设备" + e.getIp() + "删除异常"); throw new ServiceException("人员删除失败:设备" + e.getIp() + "删除异常");
@@ -740,19 +741,20 @@ public class SysPeopleController extends BaseController
SysEquipment equipment=new SysEquipment(); SysEquipment equipment=new SysEquipment();
equipment.setFlag("0"); equipment.setFlag("0");
equipment.setProductId(3L);
List<SysEquipment> list = equipmentService.selectSysEquipmentList(equipment); List<SysEquipment> list = equipmentService.selectSysEquipmentList(equipment);
if(list.size()>0){ if (CollUtil.isNotEmpty(list)) {
for(Long id:ids){//下发到设备上 for (Long id : ids) {//下发到设备上
SysPeople people=sysPeopleService.selectSysPeopleById(id); SysPeople people = sysPeopleService.selectSysPeopleById(id);
//下发设备 //下发设备
if(people.getBranchId()!=null){ if (people.getBranchId() != null) {
SysBranch branch=sysBranchService.selectSysBranchById(people.getBranchId()); SysBranch branch = sysBranchService.selectSysBranchById(people.getBranchId());
if (branch.getRuleId()!= null) { if (branch.getRuleId() != null) {
//添加人员授权信息 //添加人员授权信息
SysRule rule=sysRuleService.selectSysRuleById(branch.getRuleId()); SysRule rule = sysRuleService.selectSysRuleById(branch.getRuleId());
String data=sdkService.authDeviceNew(rule,people); String data = sdkService.authDeviceNew(rule, people);
people.setDown(1L); people.setDown(1L);
if("".equals(data)){ if ("".equals(data)) {
return AjaxResult.error("该规则未绑定设备!"); return AjaxResult.error("该规则未绑定设备!");
} }
} }

View File

@@ -729,6 +729,7 @@ public class SysSdkServiceImpl implements ISysSdkService {
//删除人员信息 //删除人员信息
if (operType == 1) { if (operType == 1) {
String data = this.personDelete(person.getId(), e.getIp(), e.getPassword()); String data = this.personDelete(person.getId(), e.getIp(), e.getPassword());
log.info("authDeviceAddUpdate-宇泛设备删除人员结果:{}", data);
if (!verifyResult(data, sysEqDownRecord)) { if (!verifyResult(data, sysEqDownRecord)) {
i++; i++;
continue; continue;
@@ -737,12 +738,14 @@ public class SysSdkServiceImpl implements ISysSdkService {
//新增人员信息 //新增人员信息
String data = this.personCreate(person, e.getIp(), e.getPassword()); String data = this.personCreate(person, e.getIp(), e.getPassword());
log.info("authDeviceAddUpdate-宇泛设备新增人员结果:{}", data);
if (!verifyResult(data, sysEqDownRecord)) { if (!verifyResult(data, sysEqDownRecord)) {
i++; i++;
continue; continue;
} }
if (StringUtils.isNotEmpty(people.getFaceGuid())) { if (StringUtils.isNotEmpty(people.getFaceGuid())) {
String dataImg = this.imageCreateUrl(people.getGuid(), people.getFaceGuid(), people.getAvatar(), e.getIp(), e.getPassword()); String dataImg = this.imageCreateUrl(people.getGuid(), people.getFaceGuid(), people.getAvatar(), e.getIp(), e.getPassword());
log.info("authDeviceAddUpdate-宇泛设备新增人员人脸结果:{}", dataImg);
if (!verifyResult(dataImg, sysEqDownRecord)) { if (!verifyResult(dataImg, sysEqDownRecord)) {
i++; i++;
sysEqDownRecord.setFaceDownResult(1); sysEqDownRecord.setFaceDownResult(1);