From a6d22f16447c4b440b269fa8b43daf919e5a10c4 Mon Sep 17 00:00:00 2001 From: Lius <Lius2225@163.com> Date: 星期四, 12 十月 2023 10:11:25 +0800 Subject: [PATCH] update --- lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcEfficiencyReportServiceImpl.java | 21 +++++++++++---------- 1 files changed, 11 insertions(+), 10 deletions(-) diff --git a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcEfficiencyReportServiceImpl.java b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcEfficiencyReportServiceImpl.java index ea4a22a..95e1d70 100644 --- a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcEfficiencyReportServiceImpl.java +++ b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcEfficiencyReportServiceImpl.java @@ -1,9 +1,7 @@ package org.jeecg.modules.mdc.service.impl; -import com.alipay.api.domain.NewsfeedMediaGiftInfo; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import org.apache.commons.lang3.StringUtils; -import org.checkerframework.checker.units.qual.A; import org.jeecg.common.constant.CommonConstant; import org.jeecg.common.exception.JeecgBootException; import org.jeecg.modules.mdc.dto.*; @@ -11,8 +9,8 @@ import org.jeecg.modules.mdc.mapper.MdcEfficiencyReportMapper; import org.jeecg.modules.mdc.service.*; import org.jeecg.modules.mdc.util.DateUtils; -import org.jeecg.modules.mdc.vo.*; import org.jeecg.modules.mdc.vo.MdcUtilizationRateDto; +import org.jeecg.modules.mdc.vo.*; import org.jeecg.modules.system.entity.MdcProduction; import org.jeecg.modules.system.entity.SysDepart; import org.jeecg.modules.system.service.IMdcProductionService; @@ -21,8 +19,7 @@ import javax.annotation.Resource; import java.math.BigDecimal; -import java.text.ParseException; -import java.text.SimpleDateFormat; +import java.text.Collator; import java.time.LocalDate; import java.time.format.DateTimeFormatter; import java.time.temporal.ChronoUnit; @@ -110,7 +107,7 @@ // 閮ㄩ棬灞傜骇 List<MdcEquDepDto> equipmentList = mdcEquipmentService.findEquDepList(vo.getEquipmentIdList()); // 鏌ヨ鎵�鏈夐儴闂ㄤ俊鎭� - List<SysDepart> departList = sysDepartService.list(new LambdaQueryWrapper<SysDepart>().ne(SysDepart::getDelFlag, CommonConstant.DEL_FLAG_1.toString())); + List<SysDepart> departList = sysDepartService.list(new LambdaQueryWrapper<SysDepart>().ne(SysDepart::getDelFlag, CommonConstant.DEL_FLAG_1.toString()).orderByAsc(SysDepart::getDepartName)); for (MdcEquDepDto mdcEquDepDto : equipmentList) { MdcEfficiencyListDto mdcEfficiencyListDto = new MdcEfficiencyListDto(); @@ -230,7 +227,7 @@ listDtos.add(mdcEfficiencyListDto); } } - + listDtos.sort(((o1, o2) -> Collator.getInstance(Locale.TRADITIONAL_CHINESE).compare(o1.getLevel3(), o2.getLevel3()))); result.setMdcEfficiencyList(listDtos); } @@ -290,7 +287,7 @@ // 閮ㄩ棬灞傜骇 List<MdcEquDepDto> equipmentList = mdcEquipmentService.findEquDepList(vo.getEquipmentIdList()); // 鏌ヨ鎵�鏈夐儴闂ㄤ俊鎭� - List<SysDepart> departList = sysDepartService.list(new LambdaQueryWrapper<SysDepart>().ne(SysDepart::getDelFlag, CommonConstant.DEL_FLAG_1.toString())); + List<SysDepart> departList = sysDepartService.list(new LambdaQueryWrapper<SysDepart>().ne(SysDepart::getDelFlag, CommonConstant.DEL_FLAG_1.toString()).orderByAsc(SysDepart::getDepartName)); for (MdcEquDepDto mdcEquDepDto : equipmentList) { MdcEfficiencyListDto mdcEfficiencyListDto = new MdcEfficiencyListDto(); @@ -410,7 +407,7 @@ listDtos.add(mdcEfficiencyListDto); } } - + listDtos.sort(((o1, o2) -> Collator.getInstance(Locale.TRADITIONAL_CHINESE).compare(o1.getLevel3(), o2.getLevel3()))); result.setMdcEfficiencyList(listDtos); } @@ -470,7 +467,7 @@ // 閮ㄩ棬灞傜骇 List<MdcEquDepDto> equipmentList = mdcEquipmentService.findEquDepList(vo.getEquipmentIdList()); // 鏌ヨ鎵�鏈夐儴闂ㄤ俊鎭� - List<SysDepart> departList = sysDepartService.list(new LambdaQueryWrapper<SysDepart>().ne(SysDepart::getDelFlag, CommonConstant.DEL_FLAG_1.toString())); + List<SysDepart> departList = sysDepartService.list(new LambdaQueryWrapper<SysDepart>().ne(SysDepart::getDelFlag, CommonConstant.DEL_FLAG_1.toString()).orderByAsc(SysDepart::getDepartName)); // 鐝鍚嶇О鏄剧ず澶勭悊 String shiftSubName = ""; if (StringUtils.isBlank(vo.getShiftId())) { @@ -633,6 +630,7 @@ listDtos.add(mdcEfficiencyShiftListDto); } } + listDtos.sort(((o1, o2) -> Collator.getInstance(Locale.TRADITIONAL_CHINESE).compare(o1.getLevel3(), o2.getLevel3()))); result.setMdcEfficiencyList(listDtos); } return result; @@ -1246,6 +1244,9 @@ dto.setColor(mdcUtilizationRate.getRateParameterColor()); } } + if (StringUtils.isBlank(dto.getColor())) { + dto.setColor(mdcUtilizationRateList.get(mdcUtilizationRateList.size() - 1).getRateParameterColor()); + } return dto; } -- Gitblit v1.9.3