Commit 9329cca5 authored by lcl's avatar lcl

u

parent 87ca1f4c
...@@ -52,7 +52,7 @@ public class CheckUtils { ...@@ -52,7 +52,7 @@ public class CheckUtils {
* @return * @return
*/ */
public static int checkIntegerPlaces(Double number) { public static int checkIntegerPlaces(Double number) {
BigDecimal bigDecimal = new BigDecimal(number); BigDecimal bigDecimal = new BigDecimal(String.valueOf(number));
String strNumber = bigDecimal.toString(); String strNumber = bigDecimal.toString();
int integerPlaces = strNumber.indexOf('.'); int integerPlaces = strNumber.indexOf('.');
if (integerPlaces == -1) { if (integerPlaces == -1) {
...@@ -68,7 +68,7 @@ public class CheckUtils { ...@@ -68,7 +68,7 @@ public class CheckUtils {
* @return * @return
*/ */
public static int checkDecimalPlaces(Double number) { public static int checkDecimalPlaces(Double number) {
BigDecimal bigDecimal = new BigDecimal(number); BigDecimal bigDecimal = new BigDecimal(String.valueOf(number));
String strNumber = bigDecimal.toString(); String strNumber = bigDecimal.toString();
int decimalPlaces = 0; int decimalPlaces = 0;
int index = strNumber.indexOf('.'); int index = strNumber.indexOf('.');
......
...@@ -43,10 +43,7 @@ import org.springframework.transaction.annotation.Transactional; ...@@ -43,10 +43,7 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.ArrayList; import java.util.*;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
/** /**
* 项目详情Service业务层处理 * 项目详情Service业务层处理
...@@ -143,14 +140,36 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService { ...@@ -143,14 +140,36 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
@Override @Override
public List<BusinessLikeProjectNameListVo> selectProjectName(BusinessListDto dto) { public List<BusinessLikeProjectNameListVo> selectProjectName(BusinessListDto dto) {
List<BusinessLikeProjectNameListVo> vos = businessInfoMapper.selectProjectName(dto); List<BusinessLikeProjectNameListVo> vos = businessInfoMapper.selectProjectName(dto);
if (!CollectionUtils.isEmpty(vos)) { // List<BusinessLikeProjectNameListVo> vos = new ArrayList<>();
for (BusinessLikeProjectNameListVo vo : vos) { // Map<String, Object> result = dskOpenApiUtil.requestBody("/company/bidding/newZhaoBiao/list", toRequestMap(dto));
vo.setProjectName(vo.getProjectName().replace(dto.getProjectName(), "<font color='#FF204E'>" + dto.getProjectName() + "</font>")); // 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"));
// }
// }
// }
return vos; return vos;
} }
private Map<String, Object> toRequestMap(BusinessListDto dto) {
Map<String, Object> page = new HashMap<>();
page.put("page", 1);
page.put("limit", 20);
Map<String, Object> map = new HashMap<>();
map.put("keyword", dto.getProjectName());
map.put("page", page);
return map;
}
@Override @Override
public AjaxResult batchUpload(MultipartFile file) { public AjaxResult batchUpload(MultipartFile file) {
//获取当前登录用户id //获取当前登录用户id
......
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