Commit b65c3d2f authored by danfuman's avatar danfuman

Merge branch 'dev20230707' of http://192.168.60.201/root/dsk-operate-sys into dev20230707

parents fb59b474 cb5dbac7
......@@ -250,28 +250,32 @@ public class EnterpriseService {
}
ArrayList<String> uipIds = new ArrayList<>();
ArrayList<Long> cIds = new ArrayList<>();
for (Object dataMap : list) {
uipIds.add(MapUtils.getString(CommonUtils.assertAsMap(dataMap), "uipId"));
cIds.add(MapUtils.getLong(CommonUtils.assertAsMap(dataMap), "companyId"));
}
List<CustomerStatusListVo> claimStatusList = iCustomerService.selectStatusList(uipIds);
Map<String, Object> bondCreditRatingBatchMap = new HashMap<>(1);
bondCreditRatingBatchMap.put("cIds", cIds);
Map<String, Object> bondCreditRatingMap = dskOpenApiUtil.requestBody("/operate/enterprise/bondCreditRatingBatch", bondCreditRatingBatchMap);
Integer codeRating = MapUtils.getInteger(bondCreditRatingMap, "code", 300);
ArrayList<Map<String, Object>> objArrayList = new ArrayList(1);
if (codeRating.equals(HttpStatus.OK.value())) {
Object object = bondCreditRatingMap.get("data");
if (ObjectUtil.isNotEmpty(object)) {
objArrayList = (ArrayList)object;
}
}
//按照城投企业id合并两个list
for (Object companyObj : list) {
Map<String, Object> companyMap = CommonUtils.assertAsMap(companyObj);
companyMap.put("cid", MapUtils.getString(companyMap, "companyId"));
companyMap.put("bratingSubjectLevel", null);
Map<String, Object> bondCreditRatingMap = dskOpenApiUtil.requestBody("/operate/enterprise/bondCreditRating", companyMap);
Integer codeRating = MapUtils.getInteger(bondCreditRatingMap, "code", 300);
if (codeRating.equals(HttpStatus.OK.value())) {
Object object = bondCreditRatingMap.get("data");
if (ObjectUtil.isNotEmpty(object)) {
ArrayList obj = (ArrayList)object;
Map<String, Object> bondCreditRating = (Map<String, Object>)obj.get(0);
companyMap.put("bratingSubjectLevel", bondCreditRating.get("bratingSubjectLevel"));
}
}
String uipId = MapUtils.getString(companyMap, "uipId");
Long companyId = MapUtils.getLong(companyMap, "companyId");
companyMap.put("bondBalance",MapUtils.getDouble(companyMap, "bondBalance")==null?null:String.format("%.2f", MapUtils.getDouble(companyMap, "bondBalance")));
companyMap.put("totalAssets",MapUtils.getDouble(companyMap, "totalAssets")==null?null:String.format("%.2f", MapUtils.getDouble(companyMap, "totalAssets")));
companyMap.put("belongNetAssets",MapUtils.getDouble(companyMap, "belongNetAssets")==null?null:String.format("%.2f", MapUtils.getDouble(companyMap, "belongNetAssets")));
......@@ -314,6 +318,12 @@ public class EnterpriseService {
companyMap.put("claimStatus", 1);
}
}
for (Map<String, Object> m : objArrayList) {
Long companyIdCredit = MapUtils.getLong(m, "companyId", 0L);
if (companyIdCredit.equals(companyId)) {
companyMap.put("bratingSubjectLevel", m.get("bratingSubjectLevel"));
}
}
}
return new TableDataInfo(list, MapUtils.getInteger(data, "totalCount", 0));
......
......@@ -139,24 +139,27 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
@Override
public List<BusinessLikeProjectNameListVo> selectProjectName(BusinessListDto dto) {
List<BusinessLikeProjectNameListVo> vos = businessInfoMapper.selectProjectName(dto);
// List<BusinessLikeProjectNameListVo> vos = new ArrayList<>();
// Map<String, Object> result = dskOpenApiUtil.requestBody("/company/bidding/newZhaoBiao/list", toRequestMap(dto));
// if ("200".equals(result.get("code")) && ObjectUtil.isNotEmpty(result.get("data"))
// && ObjectUtil.isNotEmpty(BeanUtil.beanToMap(result.get("data")).get("list"))) {
// List<Map<String, Object>> list = (List<Map<String, Object>>) BeanUtil.beanToMap(result.get("data")).get("list");
// if (!CollectionUtils.isEmpty(list)) {
// for (Map<String, Object> map : list) {
// BusinessLikeProjectNameListVo vo = new BusinessLikeProjectNameListVo();
// vo.setProjectName(MapUtil.getStr(map, "projectName").replace(dto.getProjectName(), "<font color='#FF204E'>" + dto.getProjectName() + "</font>"));
// vo.setInvestmentAmount(MapUtil.getDouble(map, "bidMoney"));
// vo.setProjectLevel(MapUtil.getStr(map, "bidMoney"));
// vo.setProjectStage(MapUtil.getStr(map, "tenderStage"));
// vo.setProjectType(MapUtil.getStr(map, "projectType"));
// vo.setProjectCategory(MapUtil.getStr(map, "projectType"));
// }
// }
// }
// List<BusinessLikeProjectNameListVo> vos = businessInfoMapper.selectProjectName(dto);
List<BusinessLikeProjectNameListVo> vos = new ArrayList<>();
try {
Map<String, Object> result = dskOpenApiUtil.requestBody("/nationzj/jskBid/news/findByName", toRequestMap(dto));
if (ObjectUtil.isNotEmpty(result.get("data"))) {
List<Map<String, Object>> list = (List<Map<String, Object>>) BeanUtil.beanToMap(result.get("data")).get("list");
if (!CollectionUtils.isEmpty(list)) {
for (Map<String, Object> map : list) {
BusinessLikeProjectNameListVo vo = new BusinessLikeProjectNameListVo();
vo.setProjectName(MapUtil.getStr(map, "projectName").replace(dto.getProjectName(), "<font color='#FF204E'>" + dto.getProjectName() + "</font>"));
vo.setInvestmentAmount(Double.parseDouble(MapUtil.getStr(map, "projectContractAmount")));
vo.setProjectType(MapUtil.getStr(map, "projectType"));
vo.setProjectCategory(MapUtil.getStr(map, "projectPurposes"));
vos.add(vo);
}
}
}
}catch (Exception e) {
log.error("模糊查询项目名称调用失败!");
}
return vos;
}
......
......@@ -50,34 +50,46 @@ public class UrbanInvestmentPlatformServiceImpl implements UrbanInvestmentPlatfo
}
ArrayList<String> uipIds = new ArrayList<>();
ArrayList<Long> cIds = new ArrayList<>();
for (Object dataMap : list) {
uipIds.add(MapUtils.getString(CommonUtils.assertAsMap(dataMap), "uipId"));
cIds.add(MapUtils.getLong(CommonUtils.assertAsMap(dataMap), "companyId"));
}
// List<String> claimStatusList = iCustomerService.selectUipIdList(uipIds);
List<CustomerStatusListVo> customerStatusListVos = iCustomerService.selectStatusList(uipIds);
Map<String, Object> bondCreditRatingBatchMap = new HashMap<>(1);
bondCreditRatingBatchMap.put("cIds", cIds);
Map<String, Object> bondCreditRatingMap = dskOpenApiUtil.requestBody("/operate/enterprise/bondCreditRatingBatch", bondCreditRatingBatchMap);
Integer codeRating = MapUtils.getInteger(bondCreditRatingMap, "code", 300);
ArrayList<Map<String, Object>> objArrayList = new ArrayList(1);
if (codeRating.equals(HttpStatus.OK.value())) {
Object object = bondCreditRatingMap.get("data");
if (ObjectUtil.isNotEmpty(object)) {
objArrayList = (ArrayList)object;
}
}
//按照城投企业id合并两个list
//按照城投企业id合并两个list
for (Object companyObj : list) {
Map<String, Object> companyMap = CommonUtils.assertAsMap(companyObj);
companyMap.put("bratingSubjectLevel", null);
companyMap.put("cid", MapUtils.getString(companyMap, "companyId"));
Map<String, Object> bondCreditRatingMap = dskOpenApiUtil.requestBody("/operate/enterprise/bondCreditRating", companyMap);
Integer codeRating = MapUtils.getInteger(bondCreditRatingMap, "code", 300);
if (codeRating.equals(HttpStatus.OK.value())) {
Object object = bondCreditRatingMap.get("data");
if (ObjectUtil.isNotEmpty(object)) {
ArrayList obj = (ArrayList)object;
Map<String, Object> bondCreditRating = (Map<String, Object>)obj.get(0);
companyMap.put("bratingSubjectLevel", bondCreditRating.get("bratingSubjectLevel"));
}
}
Long companyId = MapUtils.getLong(companyMap, "companyId");
String uipId = MapUtils.getString(companyMap, "uipId");
companyMap.put("claimStatus", 0);
companyMap.put("bratingSubjectLevel", null);
for (CustomerStatusListVo vo : customerStatusListVos) {
if (uipId.equals(vo.getUipId())) {
companyMap.put("claimStatus", 1);
}
}
for (Map<String, Object> m : objArrayList) {
Long companyIdCredit = MapUtils.getLong(m, "companyId", 0L);
if (companyIdCredit.equals(companyId)) {
companyMap.put("bratingSubjectLevel", m.get("bratingSubjectLevel"));
}
}
}
// for (Object companyObj : list) {
......
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