|
|
@@ -713,20 +713,20 @@ public class SmartUserController implements SmartUserControllerAPI {
|
|
|
boolean resultBool = smartUserService.saveBatch(studentDatas);
|
|
|
if (!resultBool) {
|
|
|
return CommonResult.fail("导入失败");
|
|
|
- }
|
|
|
+ }else {
|
|
|
// 需添加到海康平台
|
|
|
- ArrayList<SmartOperationUser> operationUsers = new ArrayList<>();
|
|
|
- for (SmartUser studentData : studentDatas) {
|
|
|
- Integer id = studentData.getId();
|
|
|
- SmartOperationUser smartOperationUser = new SmartOperationUser();
|
|
|
- smartOperationUser.setOperationId(id);
|
|
|
- smartOperationUser.setOperationMode("1");
|
|
|
- smartOperationUser.setStatus(1);
|
|
|
- smartOperationUser.setType(2);
|
|
|
- operationUsers.add(smartOperationUser);
|
|
|
+ ArrayList<SmartOperationUser> operationUsers = new ArrayList<>();
|
|
|
+ for (SmartUser studentData : studentDatas) {
|
|
|
+ Integer id = studentData.getId();
|
|
|
+ SmartOperationUser smartOperationUser = new SmartOperationUser();
|
|
|
+ smartOperationUser.setOperationId(id);
|
|
|
+ smartOperationUser.setOperationMode("1");
|
|
|
+ smartOperationUser.setStatus(1);
|
|
|
+ smartOperationUser.setType(studentData.getIdentityId());
|
|
|
+ operationUsers.add(smartOperationUser);
|
|
|
+ }
|
|
|
+ smartOperationUserService.saveBatch(operationUsers);
|
|
|
}
|
|
|
- smartOperationUserService.saveBatch(operationUsers);
|
|
|
-
|
|
|
List<SmartFamilyIndex> familyIndexs = new ArrayList<>();
|
|
|
//region 希沃新增编辑学生家长信息
|
|
|
if (useXw == 1) {
|
|
|
@@ -999,21 +999,20 @@ public class SmartUserController implements SmartUserControllerAPI {
|
|
|
boolean resultBool = smartUserService.saveBatch(teacherDatas);
|
|
|
if (!resultBool) {
|
|
|
return CommonResult.fail("导入失败");
|
|
|
+ }else {
|
|
|
+ // 需添加到海康平台
|
|
|
+ ArrayList<SmartOperationUser> operationUsers = new ArrayList<>();
|
|
|
+ for (SmartUser teacherData : teacherDatas) {
|
|
|
+ Integer id = teacherData.getId();
|
|
|
+ SmartOperationUser smartOperationUser = new SmartOperationUser();
|
|
|
+ smartOperationUser.setOperationId(id);
|
|
|
+ smartOperationUser.setOperationMode("1");
|
|
|
+ smartOperationUser.setStatus(1);
|
|
|
+ smartOperationUser.setType(teacherData.getIdentityId());
|
|
|
+ operationUsers.add(smartOperationUser);
|
|
|
+ }
|
|
|
+ smartOperationUserService.saveBatch(operationUsers);
|
|
|
}
|
|
|
-
|
|
|
- // 需添加到海康平台
|
|
|
- ArrayList<SmartOperationUser> operationUsers = new ArrayList<>();
|
|
|
- for (SmartUser teacherData : teacherDatas) {
|
|
|
- Integer id = teacherData.getId();
|
|
|
- SmartOperationUser smartOperationUser = new SmartOperationUser();
|
|
|
- smartOperationUser.setOperationId(id);
|
|
|
- smartOperationUser.setOperationMode("1");
|
|
|
- smartOperationUser.setStatus(1);
|
|
|
- smartOperationUser.setType(3);
|
|
|
- operationUsers.add(smartOperationUser);
|
|
|
- }
|
|
|
- smartOperationUserService.saveBatch(operationUsers);
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -5362,6 +5361,20 @@ public class SmartUserController implements SmartUserControllerAPI {
|
|
|
int result = smartUserService.deleteSmartUserByIds(ur.getUserIds());
|
|
|
if (result <= 0) {
|
|
|
return CommonResult.fail("删除失败");
|
|
|
+ }else {
|
|
|
+// 删除同步到海康平台
|
|
|
+ for (SmartUser user : users) {
|
|
|
+ Integer identityId = user.getIdentityId();
|
|
|
+ if (2==identityId || identityId==3) {
|
|
|
+ Integer id = user.getId();
|
|
|
+ SmartOperationUser smartOperationUser = new SmartOperationUser();
|
|
|
+ smartOperationUser.setOperationId(id);
|
|
|
+ smartOperationUser.setOperationMode("3");
|
|
|
+ smartOperationUser.setStatus(1);
|
|
|
+ smartOperationUser.setType(identityId);
|
|
|
+ smartOperationUserService.save(smartOperationUser);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
List<deleteUserVo> deleteUsers = new ArrayList<>();
|