Commit c6edc020 authored by tianyiming's avatar tianyiming

两员配备相关bug修改

parent 38f0d238
...@@ -27,4 +27,6 @@ public interface IDataDictionaryService { ...@@ -27,4 +27,6 @@ public interface IDataDictionaryService {
List<DataDictionary> getChildList(String type, String group); List<DataDictionary> getChildList(String type, String group);
List<DataDictionary> getByParent(String parent); List<DataDictionary> getByParent(String parent);
List<DataDictionary> getByTypeAndDesc(String type, String group);
} }
...@@ -176,4 +176,12 @@ public class DataDictionaryServiceImpl extends BaseService<DataDictionaryDto, Da ...@@ -176,4 +176,12 @@ public class DataDictionaryServiceImpl extends BaseService<DataDictionaryDto, Da
queryWrapper.orderByAsc("sort_num"); queryWrapper.orderByAsc("sort_num");
return this.list(queryWrapper); return this.list(queryWrapper);
} }
@Override
public List<DataDictionary> getByTypeAndDesc(String type, String typeDesc) {
LambdaQueryWrapper<DataDictionary> wrapper = new LambdaQueryWrapper<>();
wrapper.likeRight(DataDictionary::getType,type);
wrapper.likeRight(DataDictionary::getTypeDesc,typeDesc);
return this.list(wrapper);
}
} }
...@@ -130,8 +130,8 @@ ...@@ -130,8 +130,8 @@
<if test="dto.code96333 != '' and dto.code96333 != null"> <if test="dto.code96333 != '' and dto.code96333 != null">
and "CODE96333" like concat('%',#{dto.code96333},'%') and "CODE96333" like concat('%',#{dto.code96333},'%')
</if> </if>
<if test="dto.userSeq != '' and dto.userSeq != null"> <if test="dto.safety != '' and dto.safety != null">
AND tue.user_seq = #{userSeq} AND tue.user_seq = #{dto.safety}
</if> </if>
<if test="dto.isNotBind != '' and dto.isNotBind != null and dto.isNotBind == 1"> <if test="dto.isNotBind != '' and dto.isNotBind != null and dto.isNotBind == 1">
AND ibjui."SEQUENCE_NBR" IN ( SELECT DISTINCT equip_id FROM tzs_user_equip WHERE credit_code = #{companyCode} ) AND ibjui."SEQUENCE_NBR" IN ( SELECT DISTINCT equip_id FROM tzs_user_equip WHERE credit_code = #{companyCode} )
......
...@@ -61,10 +61,6 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI ...@@ -61,10 +61,6 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
@Autowired @Autowired
private RedisUtils redisUtils; private RedisUtils redisUtils;
@Autowired
RegUnitInfoServiceImpl regUnitInfoService;
@Autowired @Autowired
TzBaseEnterpriseInfoServiceImpl baseEnterpriseInfoService; TzBaseEnterpriseInfoServiceImpl baseEnterpriseInfoService;
...@@ -106,7 +102,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI ...@@ -106,7 +102,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
} }
LambdaQueryWrapper<DataDictionary> lambda = new QueryWrapper<DataDictionary>().lambda(); LambdaQueryWrapper<DataDictionary> lambda = new QueryWrapper<DataDictionary>().lambda();
lambda.in(DataDictionary::getSequenceNbr, dictIds); lambda.in(DataDictionary::getSequenceNbr, dictIds);
List<DataDictionary> dataDictionaries = regUnitInfoService.initAllDataDictionaryList(); List<DataDictionary> dataDictionaries = iDataDictionaryService.getByTypeAndDesc("QYRYGW","两员配备");
List<DataDictionary> postDataList = dataDictionaries.stream().filter(d -> dictIds.stream().anyMatch(id -> id.toString().equals(d.getSequenceNbr().toString()))).collect(Collectors.toList()); List<DataDictionary> postDataList = dataDictionaries.stream().filter(d -> dictIds.stream().anyMatch(id -> id.toString().equals(d.getSequenceNbr().toString()))).collect(Collectors.toList());
return postDataList.stream().map(DataDictionary::getName).collect(Collectors.joining(",")); return postDataList.stream().map(DataDictionary::getName).collect(Collectors.joining(","));
} }
......
...@@ -23,15 +23,14 @@ import com.yeejoin.amos.boot.module.tcm.api.dto.TzsBaseInstitutionDto; ...@@ -23,15 +23,14 @@ import com.yeejoin.amos.boot.module.tcm.api.dto.TzsBaseInstitutionDto;
import com.yeejoin.amos.boot.module.tcm.api.entity.BaseUnitLicence; import com.yeejoin.amos.boot.module.tcm.api.entity.BaseUnitLicence;
import com.yeejoin.amos.boot.module.tcm.api.entity.TzBaseEnterpriseInfo; import com.yeejoin.amos.boot.module.tcm.api.entity.TzBaseEnterpriseInfo;
import com.yeejoin.amos.boot.module.tcm.api.entity.TzsBaseInstitution; import com.yeejoin.amos.boot.module.tcm.api.entity.TzsBaseInstitution;
import com.yeejoin.amos.boot.module.tcm.api.entity.TzsUserInfo;
import com.yeejoin.amos.boot.module.tcm.api.enums.CompanyLevelEnum; import com.yeejoin.amos.boot.module.tcm.api.enums.CompanyLevelEnum;
import com.yeejoin.amos.boot.module.tcm.api.enums.EnterpriseEnums; import com.yeejoin.amos.boot.module.tcm.api.enums.EnterpriseEnums;
import com.yeejoin.amos.boot.module.tcm.api.mapper.TzBaseEnterpriseInfoMapper; import com.yeejoin.amos.boot.module.tcm.api.mapper.TzBaseEnterpriseInfoMapper;
import com.yeejoin.amos.boot.module.tcm.api.mapper.TzsBaseIndividualityMapper; import com.yeejoin.amos.boot.module.tcm.api.mapper.TzsBaseIndividualityMapper;
import com.yeejoin.amos.boot.module.tcm.api.mapper.TzsBaseInstitutionMapper; import com.yeejoin.amos.boot.module.tcm.api.mapper.TzsBaseInstitutionMapper;
import com.yeejoin.amos.boot.module.tcm.biz.service.impl.BaseUnitLicenceServiceImpl; import com.yeejoin.amos.boot.module.tcm.api.mapper.TzsUserInfoMapper;
import com.yeejoin.amos.boot.module.tcm.biz.service.impl.EquipmentCategoryServiceImpl; import com.yeejoin.amos.boot.module.tcm.biz.service.impl.*;
import com.yeejoin.amos.boot.module.tcm.biz.service.impl.StartPlatformTokenService;
import com.yeejoin.amos.boot.module.tcm.biz.service.impl.TzBaseEnterpriseInfoServiceImpl;
import com.yeejoin.amos.boot.module.tcm.biz.utils.RedisUtil; import com.yeejoin.amos.boot.module.tcm.biz.utils.RedisUtil;
import com.yeejoin.amos.boot.module.tcm.flc.api.dto.RegUnitIcDto; import com.yeejoin.amos.boot.module.tcm.flc.api.dto.RegUnitIcDto;
import com.yeejoin.amos.boot.module.tcm.flc.api.dto.RegUnitInfoDto; import com.yeejoin.amos.boot.module.tcm.flc.api.dto.RegUnitInfoDto;
...@@ -144,6 +143,9 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI ...@@ -144,6 +143,9 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
@Autowired @Autowired
TzsBaseInstitutionMapper tzsBaseInstitutionMapper; TzsBaseInstitutionMapper tzsBaseInstitutionMapper;
@Autowired
TzsUserInfoServiceImpl tzsUserInfoService;
private final Logger logger = LogManager.getLogger(RegUnitInfoServiceImpl.class); private final Logger logger = LogManager.getLogger(RegUnitInfoServiceImpl.class);
/** /**
...@@ -833,6 +835,19 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI ...@@ -833,6 +835,19 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
if (userResult == null || userResult.getResult() == null) { if (userResult == null || userResult.getResult() == null) {
throw new BadRequest("单位注册失败"); throw new BadRequest("单位注册失败");
} }
//同步创建为当前注册管理员添加两员配备人员信息
if (userResult.getStatus() == 200) {
TzsUserInfo tzsUserInfo = new TzsUserInfo();
tzsUserInfo.setName(regUnitInfo.getAdminName());
tzsUserInfo.setCertificateType("344");
tzsUserInfo.setCertificateNum(regUnitInfo.getAdminIdNumber());
tzsUserInfo.setUnitName(regUnitInfo.getName());
tzsUserInfo.setUnitCode(regUnitInfo.getUnitCode());
tzsUserInfo.setPhone(regUnitInfo.getAdminTel());
tzsUserInfo.setAmosUserId(userResult.getResult().getUserId());
tzsUserInfo.setAmosUserName(regUnitInfo.getAdminLoginName());
tzsUserInfoService.save(tzsUserInfo);
}
regUnitInfo.setAdminUserId(userResult.getResult().getUserId()); regUnitInfo.setAdminUserId(userResult.getResult().getUserId());
regUnitInfo.setAmosCompanySeq(companyInfo.getSequenceNbr().toString()); regUnitInfo.setAmosCompanySeq(companyInfo.getSequenceNbr().toString());
// 3.3 org_user 创建组织机构 // 3.3 org_user 创建组织机构
......
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