Commit ac6ec0c8 authored by tianbo's avatar tianbo

排查统计筛选调整

parent 5bcdf5f0
......@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.tcm.api.service;
import com.yeejoin.amos.boot.module.tcm.api.entity.ThreeSystems;
import java.text.ParseException;
import java.util.LinkedHashMap;
import java.util.List;
......@@ -14,5 +15,5 @@ import java.util.List;
*/
public interface IThreeSystemsService {
List<ThreeSystems> getStatisticsMessage(List<LinkedHashMap> list, String planType, String startDate, String endDate);
List<ThreeSystems> getStatisticsMessage(List<LinkedHashMap> list, String planType, String startDate, String endDate) throws ParseException;
}
......@@ -18,6 +18,7 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
......@@ -45,7 +46,11 @@ public class ThreeSystemsController<string> extends BaseController {
ArrayList<LinkedHashMap> result = new ArrayList<>();
List<LinkedHashMap> list = tzsUserInfoServiceImpl.screenData(result, data, sequenceNbr);
Page<ThreeSystems> threeSystemsPage = new Page<>();
threeSystemsPage.setRecords(iThreeSystemsService.getStatisticsMessage(list, planType, startDate, endDate));
try {
threeSystemsPage.setRecords(iThreeSystemsService.getStatisticsMessage(list, planType, startDate, endDate));
} catch (ParseException e) {
e.printStackTrace();
}
return ResponseHelper.buildResponse(threeSystemsPage);
}
......
package com.yeejoin.amos.boot.module.tcm.biz.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import com.yeejoin.amos.boot.module.tcm.api.dto.ThreeSystemsDto;
import com.yeejoin.amos.boot.module.tcm.api.entity.ThreeSystems;
import com.yeejoin.amos.boot.module.tcm.api.enums.SupervisoryEnum;
......@@ -15,6 +16,7 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.DecimalFormat;
import java.text.ParseException;
import java.util.Date;
import java.util.LinkedHashMap;
import java.util.List;
......@@ -32,7 +34,7 @@ public class ThreeSystemsServiceImpl extends BaseService<ThreeSystemsDto,ThreeSy
* 列表查询
*/
@Override
public List<ThreeSystems> getStatisticsMessage(List<LinkedHashMap> list, String planType, String startDate, String endDate) {
public List<ThreeSystems> getStatisticsMessage(List<LinkedHashMap> list, String planType, String startDate, String endDate) throws ParseException {
String orgCode = null;
String nextLevel = null;
SupervisoryEnum enumByLevel = null;
......@@ -50,8 +52,9 @@ public class ThreeSystemsServiceImpl extends BaseService<ThreeSystemsDto,ThreeSy
queryWrapper.like(ThreeSystems::getSupervisoryUnitOrgcode, orgCode);
queryWrapper.eq(ThreeSystems::getIsDelete, false);
queryWrapper.eq(ThreeSystems::getPlanType, planType);
queryWrapper.between(ThreeSystems::getCheckDate, ValidationUtil.isEmpty(startDate) ? new Date() :
startDate + " 00:00:00", ValidationUtil.isEmpty(endDate) ? new Date() : endDate + " 23:59:59");
queryWrapper.between(ThreeSystems::getCheckDate, ValidationUtil.isEmpty(startDate) ?
DateUtils.dateFormat(new Date(), DateUtils.DATE_PATTERN) :
startDate, ValidationUtil.isEmpty(endDate) ? DateUtils.dateFormat(new Date(), DateUtils.DATE_PATTERN) : endDate);
queryWrapper.eq(ThreeSystems::getSupervisoryUnitLevel, nextLevel);
List<ThreeSystems> listByOrgCode = this.getBaseMapper().selectList(queryWrapper);
ThreeSystems summary = new ThreeSystems();
......
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