Commit 9329cca5 authored by lcl's avatar lcl

u

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