Commit b9c9cf98 authored by lisong's avatar lisong

代码完善

parent 22a72833
...@@ -11,16 +11,13 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisUtils; ...@@ -11,16 +11,13 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.tcm.api.dto.TzsEquipListDto; 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.dto.TzsUserInfoDto;
import com.yeejoin.amos.boot.module.tcm.api.entity.TzsUserInfo; import com.yeejoin.amos.boot.module.tcm.api.entity.TzsUserInfo;
import com.yeejoin.amos.boot.module.tcm.api.entity.TzsUserQualifications;
import com.yeejoin.amos.boot.module.tcm.api.service.ITzsUserInfoService; import com.yeejoin.amos.boot.module.tcm.api.service.ITzsUserInfoService;
import com.yeejoin.amos.boot.module.tcm.biz.service.impl.TzsUserInfoServiceImpl; import com.yeejoin.amos.boot.module.tcm.biz.service.impl.TzsUserInfoServiceImpl;
import com.yeejoin.amos.component.feign.utils.FeignUtil; import com.yeejoin.amos.component.feign.utils.FeignUtil;
import com.yeejoin.amos.feign.privilege.Privilege; import com.yeejoin.amos.feign.privilege.Privilege;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import com.yeejoin.amos.feign.privilege.model.CompanyModel; import com.yeejoin.amos.feign.privilege.model.CompanyModel;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
......
...@@ -513,24 +513,26 @@ public class TzBaseEnterpriseInfoServiceImpl ...@@ -513,24 +513,26 @@ public class TzBaseEnterpriseInfoServiceImpl
List<TzsUserInfo> tzsUserInfos = tzsUserInfoMapper.selectList(lambda); List<TzsUserInfo> tzsUserInfos = tzsUserInfoMapper.selectList(lambda);
tzsUserInfos.forEach(item -> { tzsUserInfos.forEach(item -> {
boolean update = false; boolean update = false;
JSONArray objects = JSON.parseArray(item.getEquipType()); if (!ObjectUtils.isEmpty(item.getEquipType())) {
ArrayList<String> oldDate = new ArrayList<>(); JSONArray objects = JSON.parseArray(item.getEquipType());
objects.forEach(itemTpe -> { ArrayList<String> oldDate = new ArrayList<>();
oldDate.add(itemTpe.toString()); objects.forEach(itemTpe -> {
}); oldDate.add(itemTpe.toString());
for (Object object : objects) { });
if (!newDate.contains(object)) { for (Object object : objects) {
update = true; if (!newDate.contains(object)) {
oldDate.remove(object.toString()); update = true;
oldDate.remove(object.toString());
}
} }
} if (update) {
if (update) { if (!ObjectUtils.isEmpty(oldDate)) {
if (!ObjectUtils.isEmpty(oldDate)) { item.setEquipType(JSON.toJSONString(oldDate));
item.setEquipType(JSON.toJSONString(oldDate)); } else {
} else { item.setEquipType(null);
item.setEquipType(null); }
tzsUserInfoMapper.updateById(item);
} }
tzsUserInfoMapper.updateById(item);
} }
}); });
} }
......
...@@ -406,11 +406,11 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI ...@@ -406,11 +406,11 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
@Override @Override
public List<Map<String, Object>> getUserType(String unitType) { public List<Map<String, Object>> getUserType(String unitType) {
if (unitType.equals("pro")){ if (unitType.equals("pro")) {
return tzsUserInfoMapper.getUserType("QYRYGW-SCDW"); return tzsUserInfoMapper.getUserType("QYRYGW-SCDW");
}else if (unitType.equals("use")){ } else if (unitType.equals("use")) {
return tzsUserInfoMapper.getUserType("QYRYGW-SYDW"); return tzsUserInfoMapper.getUserType("QYRYGW-SYDW");
}else { } else {
return tzsUserInfoMapper.getUserType(null); return tzsUserInfoMapper.getUserType(null);
} }
......
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