Browse Source

BUG修复

master
wxc 2 years ago
parent
commit
a9f19c1bb1
  1. 5
      mailbox-lan/src/main/java/com/biutag/lan/domain/vo/MailVo.java
  2. 5
      mailbox-lan/src/main/java/com/biutag/lan/service/MailService.java
  3. 4
      mailbox-lan/src/main/java/com/biutag/lan/service/impl/HolidayServiceImpl.java
  4. 8
      mailbox-lan/src/main/resources/mapper/DataScreenMapper.xml

5
mailbox-lan/src/main/java/com/biutag/lan/domain/vo/MailVo.java

@ -272,6 +272,11 @@ public class MailVo {
*/
private Integer extensionDays;
/**
* 是否申请延期
*/
private Boolean extensionFlag;
/**
* 延期理由
*/

5
mailbox-lan/src/main/java/com/biutag/lan/service/MailService.java

@ -142,7 +142,10 @@ public class MailService extends ServiceImpl<MailMapper, Mail> {
FlowNode flowNode = flow.getFlowNode();
int limitedTime = flowNode.getLimitedTime().intValue();
// 剩余时间
long flowRemainingTime = holidayService.getFlowRemainingTime(limitedTime, mail.getFlowLimitedLastHandlerTime(), mail.getExtensionFlag(), mail.getExtensionDays());
long flowRemainingTime = holidayService.getFlowRemainingTime(limitedTime,
FlowNodeEnum.lessInterviewWriter(mail.getFlowKey()) ? mail.getFlowLimitedLastHandlerTime(): mail.getMailTime(),
mail.getExtensionFlag(),
mail.getExtensionDays());
if (Objects.nonNull(mail.getExtensionFlag()) && mail.getExtensionFlag()) {
limitedTime += mail.getExtensionDays() * 86400;
}

4
mailbox-lan/src/main/java/com/biutag/lan/service/impl/HolidayServiceImpl.java

@ -177,9 +177,9 @@ public class HolidayServiceImpl implements IHolidayService {
}
List<Holiday> list = list(dates);
long holidays = list.stream().filter(item -> item.getHolidayFlag().equals(AppConstants.YES) && !item.getDate().equals(nowDate)).count();
long todaySeconds = list.stream().anyMatch(item -> item.getHolidayFlag().equals(AppConstants.YES) && item.getDate().equals(nowDate)) ? 0 :
long todaySeconds = list.stream().anyMatch(item -> item.getHolidayFlag().equals(AppConstants.YES) && item.getDate().equals(nowDate)) ?
// 当天的时间差
Duration.between(now, now.toLocalDate().atStartOfDay()).getSeconds();
Duration.between(now, now.toLocalDate().atStartOfDay()).getSeconds() : 0;
limitedTime += 86400 * holidays + todaySeconds;
return limitedTime - Duration.between(flowLimitedLastHandlerTime, LocalDateTime.now()).getSeconds();
}

8
mailbox-lan/src/main/resources/mapper/DataScreenMapper.xml

@ -41,10 +41,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getSatisfiedRate" resultType="java.util.Map">
select a.name,
ROUND(sum(COALESCE(b.satisfied, 0))*100/count(1),0) rateNumber,
CONCAT(rateNumber,'%') rate,
SUM(COALESCE(b.satisfied, 0)) satisfied,count(1) sum
-- from dept a left join mail_mark b on a.id=b.second_dept_id where a.category='2' GROUP BY a.name order by rateNumber desc limit 10
SUM(COALESCE(b.satisfied, 0)) satisfied,
SUM(CASE WHEN b.completed = '1' THEN 1 ELSE 0 END) sum,
CASE WHEN sum = 0 THEN 0 ELSE ROUND(sum(COALESCE(b.satisfied, 0))*100/sum,0) END rateNumber,
CONCAT(rateNumber,'%') rate
from dept a left join mail_mark b on a.id = b.second_dept_id
where ((a.category = '2' and a.name like '%局') or a.name='交警支队')and a.name != '公交分局' and a.name != '森林公安局' and a.name != '经开区分局'
group by a.name

Loading…
Cancel
Save