Commit 597238ff authored by tianyiming's avatar tianyiming

两员配备删除人员bug修改

parent 7100ec6c
package com.yeejoin.amos.boot.module.tcm.api.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
import java.util.HashMap;
import java.util.Map;
@AllArgsConstructor
@Getter
public enum TwoStipulateGroupEnum {
/**
* 分组枚举
*
*/
AQY("安全员",1712372048442978305L),
AQZJ("安全总监",1712372007611428865L),
ZYFZR("主要负责人",1712372027123331074L),
ZLAQY("质量安全员",1712372116055158786L),
ZLAQZJ("质量安全总监",1712372080231608322L);
String name;
Long id;
public static Map<Long,String> getName=new HashMap<>();
public static Map<String,Long> getId=new HashMap<>();
static {
for (TwoStipulateGroupEnum e : TwoStipulateGroupEnum.values()){
getName.put(e.id, e.name);
getId.put(e.name, e.id);
}
}
}
......@@ -15,6 +15,7 @@ import com.yeejoin.amos.boot.module.tcm.api.dto.TzsEquipListDto;
import com.yeejoin.amos.boot.module.tcm.api.dto.TzsUserInfoDto;
import com.yeejoin.amos.boot.module.tcm.api.entity.*;
import com.yeejoin.amos.boot.module.tcm.api.enums.EquipmentClassifityEnum;
import com.yeejoin.amos.boot.module.tcm.api.enums.TwoStipulateGroupEnum;
import com.yeejoin.amos.boot.module.tcm.api.enums.UnitTypeEnum;
import com.yeejoin.amos.boot.module.tcm.api.mapper.TzsUserEquipMapper;
import com.yeejoin.amos.boot.module.tcm.api.mapper.TzsUserInfoMapper;
......@@ -161,14 +162,15 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
TzsUserInfo tzsUserInfo = new TzsUserInfo();
tzsUserInfo.setIsDelete(true);
tzsUserInfoMapper.update(tzsUserInfo, lambda);
for (Object id : ids1) {
tzsUserEquipMapper.delete(new QueryWrapper<TzsUserEquip>().eq("user_seq", id));
List<TzsUserInfo> tzsUserInfos = tzsUserInfoMapper.selectList(lambda);
for (TzsUserInfo userInfo : tzsUserInfos) {
tzsUserEquipMapper.delete(new QueryWrapper<TzsUserEquip>().eq("user_seq", userInfo.getSequenceNbr()));
Privilege.agencyUserClient.multDeleteUser(userInfo.getAmosUserId());
String[] split = userInfo.getPostName().split(",");
for (String s : split) {
Privilege.groupUserClient.deleteGroupUser(TwoStipulateGroupEnum.getId.get(s), userInfo.getAmosUserId());
}
}
// LambdaQueryWrapper<TzsUserQualifications> qualificationsLambda = new QueryWrapper<TzsUserQualifications>().lambda();
// qualificationsLambda.in(TzsUserQualifications::getUserInfoId, ids);
// TzsUserQualifications tzsUserQualifications = new TzsUserQualifications();
// tzsUserQualifications.setIsDelete(true);
// tzsUserQualificationsService.update(tzsUserQualifications, qualificationsLambda);
}
@Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment