Commit 7e2f7770 authored by 刘林's avatar 刘林

Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register

# Conflicts: # amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/CommonServiceImpl.java # amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
parents 3552c34d cc5ed809
...@@ -1627,6 +1627,32 @@ public class CommonServiceImpl implements ICommonService { ...@@ -1627,6 +1627,32 @@ public class CommonServiceImpl implements ICommonService {
return commonMapper.countEquipInUseTimesForDel(record); return commonMapper.countEquipInUseTimesForDel(record);
} }
/**
* string转化为jsonObject
* @param obj jsonobject/map对象
* @param jsonFields 要转化的字段数据
*/
public void convertStringToJsonobject(Object obj, String[] jsonFields) {
if (obj instanceof JSONObject) {
JSONObject jsonObject = (JSONObject) obj;
for (String field : jsonFields) {
if (jsonObject.get(field) != null && jsonObject.get(field) instanceof String) {
jsonObject.put(field, JSON.parse(jsonObject.get(field).toString()));
}
}
} else if (obj instanceof Map) {
Map<String, Object> map = (Map<String, Object>) obj;
for (String field : jsonFields) {
if (map.containsKey(field) && map.get(field) instanceof String) {
map.put(field, JSON.parse(map.get(field).toString()));
}
}
} else {
// 处理其他类型
System.out.println("Unsupported Object Type");
}
}
@Override @Override
public void fightUseFlagGenerate(UseFlagParamDto useFlagParamDto, HttpServletResponse response) { public void fightUseFlagGenerate(UseFlagParamDto useFlagParamDto, HttpServletResponse response) {
Objects.requireNonNull(useFlagParamDto, "参数不能为空"); Objects.requireNonNull(useFlagParamDto, "参数不能为空");
......
...@@ -312,5 +312,6 @@ public class TzBaseEnterpriseInfoDto extends BaseDto { ...@@ -312,5 +312,6 @@ public class TzBaseEnterpriseInfoDto extends BaseDto {
// 事业单位信息 // 事业单位信息
private TzsBaseInstitution regUnitMessage; private TzsBaseInstitution regUnitMessage;
// 工商和许可信息是否可编辑
private String canEdit;
} }
package com.yeejoin.amos.boot.module.tcm.api.dto; package com.yeejoin.amos.boot.module.tcm.api.dto;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import java.util.Date; import java.util.Date;
import java.util.List;
/** /**
*
*
* @author system_generator * @author system_generator
* @date 2023-08-31 * @date 2023-08-31
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@ApiModel(value="TzsBaseInstitutionDto", description="") @ApiModel(value = "TzsBaseInstitutionDto", description = "")
public class TzsBaseInstitutionDto extends BaseDto { public class TzsBaseInstitutionDto extends BaseDto {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "单位名称") @ApiModelProperty(value = "单位名称")
...@@ -45,4 +45,6 @@ public class TzsBaseInstitutionDto extends BaseDto { ...@@ -45,4 +45,6 @@ public class TzsBaseInstitutionDto extends BaseDto {
@ApiModelProperty(value = "单位统一信用代码") @ApiModelProperty(value = "单位统一信用代码")
private String useCode; private String useCode;
@ApiModelProperty(value = "单位地址")
private List<String> unitAddress;
} }
...@@ -82,4 +82,6 @@ public interface IRegUnitInfoService { ...@@ -82,4 +82,6 @@ public interface IRegUnitInfoService {
List<Menu> getDictionaryWithTreeFillId(String type) throws Exception; List<Menu> getDictionaryWithTreeFillId(String type) throws Exception;
List<DataDictionary> getDictionaryListByType(String type) throws Exception; List<DataDictionary> getDictionaryListByType(String type) throws Exception;
List<DataDictionary> getXkItemList(String type);
} }
...@@ -191,7 +191,7 @@ public class TzBaseEnterpriseInfoController { ...@@ -191,7 +191,7 @@ public class TzBaseEnterpriseInfoController {
if (companyModels.isEmpty()) { if (companyModels.isEmpty()) {
throw new BadRequest("未指定人员归属单位信息"); throw new BadRequest("未指定人员归属单位信息");
} }
return ResponseHelper.buildResponse(iTzBaseEnterpriseInfoService.page(pageParam, companyModels.get(0).getCompanyName())); return ResponseHelper.buildResponse(iTzBaseEnterpriseInfoService.page(pageParam, companyModels.get(0).getCompanyCode()));
} }
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false) @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
......
...@@ -112,7 +112,7 @@ public class TzsAppController { ...@@ -112,7 +112,7 @@ public class TzsAppController {
LambdaQueryWrapper<TzBaseEnterpriseInfo> objectLambdaQueryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<TzBaseEnterpriseInfo> objectLambdaQueryWrapper = new LambdaQueryWrapper<>();
objectLambdaQueryWrapper.eq(!ValidationUtil.isEmpty(unitCode),TzBaseEnterpriseInfo::getUseCode,unitCode); objectLambdaQueryWrapper.eq(!ValidationUtil.isEmpty(unitCode),TzBaseEnterpriseInfo::getUseCode,unitCode);
TzBaseEnterpriseInfo neInfo = iTzBaseEnterpriseInfoService.getOne(objectLambdaQueryWrapper, true); TzBaseEnterpriseInfo neInfo = iTzBaseEnterpriseInfoService.getOne(objectLambdaQueryWrapper, true);
return ResponseHelper.buildResponse(iTzBaseEnterpriseInfoService.page(pageParam, neInfo.getUseUnit())); return ResponseHelper.buildResponse(iTzBaseEnterpriseInfoService.page(pageParam, neInfo.getUseCode()));
} }
/** /**
......
...@@ -14,7 +14,9 @@ import com.yeejoin.amos.boot.biz.common.utils.DateUtils; ...@@ -14,7 +14,9 @@ import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import com.yeejoin.amos.boot.module.tcm.api.dto.BaseUnitLicenceDto; import com.yeejoin.amos.boot.module.tcm.api.dto.BaseUnitLicenceDto;
import com.yeejoin.amos.boot.module.tcm.api.dto.EquEnterDto; import com.yeejoin.amos.boot.module.tcm.api.dto.EquEnterDto;
import com.yeejoin.amos.boot.module.tcm.api.dto.TzBaseEnterpriseInfoDto; import com.yeejoin.amos.boot.module.tcm.api.dto.TzBaseEnterpriseInfoDto;
import com.yeejoin.amos.boot.module.tcm.api.dto.TzsBaseInstitutionDto;
import com.yeejoin.amos.boot.module.tcm.api.entity.*; import com.yeejoin.amos.boot.module.tcm.api.entity.*;
import com.yeejoin.amos.boot.module.tcm.api.enums.UnitTypeEnum;
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.TzsUserInfoMapper; import com.yeejoin.amos.boot.module.tcm.api.mapper.TzsUserInfoMapper;
import com.yeejoin.amos.boot.module.tcm.api.service.ITzBaseEnterpriseInfoService; import com.yeejoin.amos.boot.module.tcm.api.service.ITzBaseEnterpriseInfoService;
...@@ -184,7 +186,14 @@ public class TzBaseEnterpriseInfoServiceImpl ...@@ -184,7 +186,14 @@ public class TzBaseEnterpriseInfoServiceImpl
private TzBaseEnterpriseInfoDto getDetail(TzBaseEnterpriseInfo tzBaseEnterpriseInfo){ private TzBaseEnterpriseInfoDto getDetail(TzBaseEnterpriseInfo tzBaseEnterpriseInfo){
TzBaseEnterpriseInfoDto tzBaseEnterpriseInfoDto = detail(tzBaseEnterpriseInfo.getSequenceNbr()); TzBaseEnterpriseInfoDto tzBaseEnterpriseInfoDto = detail(tzBaseEnterpriseInfo.getSequenceNbr());
RegUnitIcDto regUnitIcDto = new RegUnitIcDto(); RegUnitIcDto regUnitIcDto = new RegUnitIcDto();
Map<String, Object> resultMap = accessFeignService.getData(tzBaseEnterpriseInfoDto.getUseCode()).getResult(); String creditCode = tzBaseEnterpriseInfoDto.getUseCode();
if (tzBaseEnterpriseInfo.getRegisterType().contains(UnitTypeEnum.grzt.getName())) {
// 个人主体时截取证件号码(eg. 6600_210423195703287959 证件类型_证件号码)
if (creditCode.split("_").length > 1) {
creditCode = creditCode.split("_")[1];
}
}
Map<String, Object> resultMap = accessFeignService.getData(creditCode).getResult();
if (!ValidationUtil.isEmpty(resultMap)) { if (!ValidationUtil.isEmpty(resultMap)) {
String area = String.valueOf(resultMap.get("area")); String area = String.valueOf(resultMap.get("area"));
String city = area.substring(0, area.indexOf("市") + 1); String city = area.substring(0, area.indexOf("市") + 1);
...@@ -235,6 +244,8 @@ public class TzBaseEnterpriseInfoServiceImpl ...@@ -235,6 +244,8 @@ public class TzBaseEnterpriseInfoServiceImpl
} else { } else {
regUnitIcDto = tzBaseEnterpriseInfoDto.getRegUnitIcDto(); regUnitIcDto = tzBaseEnterpriseInfoDto.getRegUnitIcDto();
regUnitIcDto.setIsNotAccess("0"); regUnitIcDto.setIsNotAccess("0");
// 判断是否可以让用户编辑工商及许可信息 事业单位、个人主体或省外企业都可编辑
tzBaseEnterpriseInfoDto.setCanEdit("1");
} }
tzBaseEnterpriseInfoDto.setRegUnitIcDto(regUnitIcDto); tzBaseEnterpriseInfoDto.setRegUnitIcDto(regUnitIcDto);
tzBaseEnterpriseInfoDto.setApprovalTime(regUnitIcDto.getApprovedDate()); tzBaseEnterpriseInfoDto.setApprovalTime(regUnitIcDto.getApprovedDate());
...@@ -242,16 +253,19 @@ public class TzBaseEnterpriseInfoServiceImpl ...@@ -242,16 +253,19 @@ public class TzBaseEnterpriseInfoServiceImpl
} }
@Override @Override
public IPage<TzBaseEnterpriseInfoDto> page(PageParam pageParam, String companyName) { public IPage<TzBaseEnterpriseInfoDto> page(PageParam pageParam, String companyCode) {
TzBaseEnterpriseInfo tzBaseEnterpriseInfo = tzBaseEnterpriseInfoMapper.selectOne(new QueryWrapper<TzBaseEnterpriseInfo>().eq("use_unit", companyName)); TzBaseEnterpriseInfo tzBaseEnterpriseInfo = tzBaseEnterpriseInfoMapper.selectOne(new LambdaQueryWrapper<TzBaseEnterpriseInfo>().eq(TzBaseEnterpriseInfo::getUseCode, companyCode));
Page<TzBaseEnterpriseInfoDto> page = new Page<>(pageParam.getCurrent(), pageParam.getSize());
ArrayList<TzBaseEnterpriseInfoDto> result = new ArrayList<>();
if (ValidationUtil.isEmpty(tzBaseEnterpriseInfo)) {
return page.setRecords(result);
}
TzBaseEnterpriseInfoDto tzBaseEnterpriseInfoDto = getDetail(tzBaseEnterpriseInfo); TzBaseEnterpriseInfoDto tzBaseEnterpriseInfoDto = getDetail(tzBaseEnterpriseInfo);
LambdaQueryWrapper<TzsBaseInstitution> lambda = new QueryWrapper<TzsBaseInstitution>().lambda(); LambdaQueryWrapper<TzsBaseInstitution> lambda = new QueryWrapper<TzsBaseInstitution>().lambda();
lambda.eq(TzsBaseInstitution::getEnterpriseId, tzBaseEnterpriseInfo.getSequenceNbr()); lambda.eq(TzsBaseInstitution::getEnterpriseId, tzBaseEnterpriseInfo.getSequenceNbr());
TzsBaseInstitution tzsBaseInstitution = tzsBaseInstitutionService.getBaseMapper().selectOne(lambda); TzsBaseInstitution tzsBaseInstitution = tzsBaseInstitutionService.getBaseMapper().selectOne(lambda);
tzBaseEnterpriseInfoDto.setRegUnitMessage(tzsBaseInstitution); tzBaseEnterpriseInfoDto.setRegUnitMessage(tzsBaseInstitution);
ArrayList<TzBaseEnterpriseInfoDto> result = new ArrayList<>();
result.add(tzBaseEnterpriseInfoDto); result.add(tzBaseEnterpriseInfoDto);
Page<TzBaseEnterpriseInfoDto> page = new Page<>(pageParam.getCurrent(), pageParam.getSize());
return page.setRecords(result); return page.setRecords(result);
} }
...@@ -445,6 +459,21 @@ public class TzBaseEnterpriseInfoServiceImpl ...@@ -445,6 +459,21 @@ public class TzBaseEnterpriseInfoServiceImpl
tzBaseEnterpriseInfo.setSuperviseOrgCode(ObjectUtils.isEmpty(map.get("superviseOrgCode")) ? null : String.valueOf(map.get("superviseOrgCode"))); tzBaseEnterpriseInfo.setSuperviseOrgCode(ObjectUtils.isEmpty(map.get("superviseOrgCode")) ? null : String.valueOf(map.get("superviseOrgCode")));
tzBaseEnterpriseInfo.setSuperviseOrgName(ObjectUtils.isEmpty(map.get("superviseOrgName")) ? null : String.valueOf(map.get("superviseOrgName"))); tzBaseEnterpriseInfo.setSuperviseOrgName(ObjectUtils.isEmpty(map.get("superviseOrgName")) ? null : String.valueOf(map.get("superviseOrgName")));
tzBaseEnterpriseInfo.setOtherAccessories(ObjectUtils.isEmpty(map.get("otherAccessories")) ? null : JSON.toJSONString(map.get("otherAccessories"))); tzBaseEnterpriseInfo.setOtherAccessories(ObjectUtils.isEmpty(map.get("otherAccessories")) ? null : JSON.toJSONString(map.get("otherAccessories")));
tzBaseEnterpriseInfo.setLegalPerson(ObjectUtils.isEmpty(map.get("legalPerson")) ? null : JSON.toJSONString(map.get("legalPerson")));
// 修改事业单位信息
TzsBaseInstitutionDto baseInstitutionDto = JSON.toJavaObject(JSON.parseObject(JSON.toJSONString(map.get("regUnitMessage"))), TzsBaseInstitutionDto.class);
if (!ValidationUtil.isEmpty(baseInstitutionDto)) {
TzsBaseInstitution baseInstitution = new TzsBaseInstitution();
BeanUtils.copyProperties(baseInstitutionDto, baseInstitution);
// 用"单位信息"更新以下字段
tzBaseEnterpriseInfo.setAddress(ObjectUtils.isEmpty(map.get("address")) ? null : JSON.toJSONString(map.get("address")));
tzBaseEnterpriseInfo.setProvince(baseInstitutionDto.getUnitAddress().get(0));
tzBaseEnterpriseInfo.setCity(baseInstitutionDto.getUnitAddress().get(1));
tzBaseEnterpriseInfo.setDistrict(baseInstitutionDto.getUnitAddress().get(2));
tzsBaseInstitutionService.saveOrUpdate(baseInstitution);
}
//修改工商信息 //修改工商信息
// RegUnitIc regUnitIc = new RegUnitIc(); // RegUnitIc regUnitIc = new RegUnitIc();
......
...@@ -268,5 +268,10 @@ public class RegUnitInfoController extends BaseController { ...@@ -268,5 +268,10 @@ public class RegUnitInfoController extends BaseController {
return ResponseHelper.buildResponse(iRegUnitInfoService.unitLogOut(unitCode)); return ResponseHelper.buildResponse(iRegUnitInfoService.unitLogOut(unitCode));
} }
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@GetMapping(value = "/xk/item")
@ApiOperation(httpMethod = "GET", value = "根据字典类型type和extend查询字典列表", notes = "根据字典类型type和extend查询字典列表")
public ResponseModel<List<DataDictionary>> getChildList(@RequestParam(value = "type") String type) {
return ResponseHelper.buildResponse(iRegUnitInfoService.getXkItemList(type));
}
} }
...@@ -1041,4 +1041,10 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI ...@@ -1041,4 +1041,10 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
private String dealNull2EmptyString(String t) { private String dealNull2EmptyString(String t) {
return StringUtils.isEmpty(t) ? "" : t; return StringUtils.isEmpty(t) ? "" : t;
} }
@Override
public List<DataDictionary> getXkItemList(String type) {
List<DataDictionary> dictionaries = this.initAllDataDictionaryList();
return dictionaries.stream().parallel().filter(d->("XK-"+type).equals(d.getExtend())).collect(Collectors.toList());
}
} }
\ No newline at end of file
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