diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/phonedialrecord/PhoneDialRecordController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/phonedialrecord/PhoneDialRecordController.java index 4df8be9a..2929c708 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/phonedialrecord/PhoneDialRecordController.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/phonedialrecord/PhoneDialRecordController.java @@ -9,6 +9,8 @@ import com.xinelu.common.utils.poi.ExcelUtil; import com.xinelu.manage.domain.phonedialrecord.PhoneDialRecord; import com.xinelu.manage.service.phonedialrecord.IPhoneDialRecordService; import com.xinelu.manage.vo.phonedialrecord.BillPhoneDialVo; +import com.xinelu.manage.vo.shortmessagesendrecord.RecordSummary; +import com.xinelu.manage.vo.shortmessagesendrecord.ShortMessageSendRecordVo; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; @@ -97,4 +99,16 @@ public class PhoneDialRecordController extends BaseController { public AjaxResult phoneCount() { return phoneDialRecordService.phoneCount(); } + + /** + * 导出短信发送结果汇总 + */ + @PreAuthorize("@ss.hasPermi('system:shortMessageSendRecord:summaryExport')") + @Log(title = "短信发送结果汇总", businessType = BusinessType.EXPORT) + @PostMapping("/phoneSummaryExport") + public void summaryExport(HttpServletResponse response, BillPhoneDialVo phoneDialRecord) { + List list = phoneDialRecordService.selectPhoneRecordSummary(phoneDialRecord); + ExcelUtil util = new ExcelUtil<>(RecordSummary.class); + util.exportExcel(response, list, "电话拨打记录汇总"); + } } \ No newline at end of file diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/shortmessagesendrecord/ShortMessageSendRecordController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/shortmessagesendrecord/ShortMessageSendRecordController.java index da87f619..6a092e14 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/shortmessagesendrecord/ShortMessageSendRecordController.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/shortmessagesendrecord/ShortMessageSendRecordController.java @@ -8,6 +8,7 @@ import com.xinelu.common.enums.BusinessType; import com.xinelu.common.utils.poi.ExcelUtil; import com.xinelu.manage.domain.shortmessagesendrecord.ShortMessageSendRecord; import com.xinelu.manage.service.shortmessagesendrecord.IShortMessageSendRecordService; +import com.xinelu.manage.vo.shortmessagesendrecord.RecordSummary; import com.xinelu.manage.vo.shortmessagesendrecord.ShortMessageSendRecordVo; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; @@ -97,4 +98,16 @@ public class ShortMessageSendRecordController extends BaseController { public AjaxResult messageCount() { return shortMessageSendRecordService.messageCount(); } + + /** + * 导出短信发送结果汇总列表 + */ + @PreAuthorize("@ss.hasPermi('system:shortMessageSendRecord:summaryExport')") + @Log(title = "短信发送结果汇总", businessType = BusinessType.EXPORT) + @PostMapping("/summaryExport") + public void summaryExport(HttpServletResponse response, ShortMessageSendRecordVo shortMessageSendRecord) { + List list = shortMessageSendRecordService.selectRecordSummary(shortMessageSendRecord); + ExcelUtil util = new ExcelUtil<>(RecordSummary.class); + util.exportExcel(response, list, "短信发送结果记录汇总"); + } } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/phonedialrecord/PhoneDialRecordMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/phonedialrecord/PhoneDialRecordMapper.java index 63f74ec0..16a11d9a 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/phonedialrecord/PhoneDialRecordMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/phonedialrecord/PhoneDialRecordMapper.java @@ -6,6 +6,7 @@ import com.xinelu.manage.dto.phonedialrecord.PhoneDialRecordDto; import com.xinelu.manage.dto.statistics.FollowUpRateDto; import com.xinelu.manage.vo.phonedialrecord.BillPhoneDialVo; import com.xinelu.manage.vo.phonedialrecord.PhoneDialRecordVo; +import com.xinelu.manage.vo.shortmessagesendrecord.RecordSummary; import com.xinelu.manage.vo.statistics.PushCount; import org.apache.ibatis.annotations.Param; @@ -131,4 +132,12 @@ public interface PhoneDialRecordMapper { * @return int */ int updatePhoneDialRecordByIds(@Param("ids") List ids, @Param("billId") Long billId); + + /** + * 电话发送结果汇总 + * + * @param billPhoneDialVo 时间 + * @return RecordSummary + */ + RecordSummary selectPhoneRecordSummary(BillPhoneDialVo billPhoneDialVo); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/shortmessagesendrecord/ShortMessageSendRecordMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/shortmessagesendrecord/ShortMessageSendRecordMapper.java index 53ac98c2..fed5128d 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/shortmessagesendrecord/ShortMessageSendRecordMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/shortmessagesendrecord/ShortMessageSendRecordMapper.java @@ -3,6 +3,7 @@ package com.xinelu.manage.mapper.shortmessagesendrecord; import com.xinelu.manage.domain.shortmessagesendrecord.ShortMessageSendRecord; import com.xinelu.manage.dto.billinfo.BillInfoDto; import com.xinelu.manage.dto.statistics.FollowUpRateDto; +import com.xinelu.manage.vo.shortmessagesendrecord.RecordSummary; import com.xinelu.manage.vo.shortmessagesendrecord.ShortMessageSendRecordVo; import com.xinelu.manage.vo.statistics.MessageSendVo; import com.xinelu.manage.vo.statistics.PushCount; @@ -131,4 +132,12 @@ public interface ShortMessageSendRecordMapper { * @return int */ int selectSendRecordCountByNodeId(Long nodeId); + + /** + * 短信发送结果汇总 + * + * @param shortMessageSendRecord 时间 + * @return RecordSummary + */ + RecordSummary selectRecordSummary(ShortMessageSendRecordVo shortMessageSendRecord); } \ No newline at end of file diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/phonedialrecord/IPhoneDialRecordService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/phonedialrecord/IPhoneDialRecordService.java index 35c2bb0d..09fc1c2f 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/phonedialrecord/IPhoneDialRecordService.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/phonedialrecord/IPhoneDialRecordService.java @@ -3,6 +3,7 @@ package com.xinelu.manage.service.phonedialrecord; import com.xinelu.common.core.domain.AjaxResult; import com.xinelu.manage.domain.phonedialrecord.PhoneDialRecord; import com.xinelu.manage.vo.phonedialrecord.BillPhoneDialVo; +import com.xinelu.manage.vo.shortmessagesendrecord.RecordSummary; import java.util.List; @@ -65,4 +66,12 @@ public interface IPhoneDialRecordService { * 电话推送统计 */ AjaxResult phoneCount(); + + /** + * 电话发送结果汇总 + * + * @param billPhoneDialVo 时间 + * @return RecordSummary + */ + List selectPhoneRecordSummary(BillPhoneDialVo billPhoneDialVo); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/phonedialrecord/impl/PhoneDialRecordServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/phonedialrecord/impl/PhoneDialRecordServiceImpl.java index 4cef4767..57e5c060 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/phonedialrecord/impl/PhoneDialRecordServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/phonedialrecord/impl/PhoneDialRecordServiceImpl.java @@ -5,6 +5,7 @@ import com.xinelu.manage.domain.phonedialrecord.PhoneDialRecord; import com.xinelu.manage.mapper.phonedialrecord.PhoneDialRecordMapper; import com.xinelu.manage.service.phonedialrecord.IPhoneDialRecordService; import com.xinelu.manage.vo.phonedialrecord.BillPhoneDialVo; +import com.xinelu.manage.vo.shortmessagesendrecord.RecordSummary; import com.xinelu.manage.vo.statistics.PushCount; import org.springframework.stereotype.Service; @@ -12,6 +13,7 @@ import javax.annotation.Resource; import java.math.BigDecimal; import java.math.RoundingMode; import java.time.LocalDateTime; +import java.util.ArrayList; import java.util.List; import java.util.Objects; @@ -45,7 +47,7 @@ public class PhoneDialRecordServiceImpl implements IPhoneDialRecordService { */ @Override public List selectPhoneDialRecordList(BillPhoneDialVo phoneDialRecord) { - if (Objects.nonNull(phoneDialRecord.getDialTimeEnd())){ + if (Objects.nonNull(phoneDialRecord.getDialTimeEnd())) { phoneDialRecord.setDialTimeEnd(phoneDialRecord.getDialTimeEnd().plusDays(1)); } return phoneDialRecordMapper.selectPhoneDialRecords(phoneDialRecord); @@ -111,4 +113,19 @@ public class PhoneDialRecordServiceImpl implements IPhoneDialRecordService { } return AjaxResult.success(pushCount); } + + /** + * 电话发送结果汇总 + * + * @param billPhoneDialVo 时间 + * @return RecordSummary + */ + @Override + public List selectPhoneRecordSummary(BillPhoneDialVo billPhoneDialVo) { + RecordSummary recordSummary = phoneDialRecordMapper.selectPhoneRecordSummary(billPhoneDialVo); + recordSummary.setDateRange(billPhoneDialVo.getDialTimeStart() + "——————" + billPhoneDialVo.getDialTimeEnd()); + List recordSummaries = new ArrayList<>(); + recordSummaries.add(recordSummary); + return recordSummaries; + } } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/shortmessagesendrecord/IShortMessageSendRecordService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/shortmessagesendrecord/IShortMessageSendRecordService.java index bcf77a74..4a51b6eb 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/shortmessagesendrecord/IShortMessageSendRecordService.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/shortmessagesendrecord/IShortMessageSendRecordService.java @@ -2,6 +2,7 @@ package com.xinelu.manage.service.shortmessagesendrecord; import com.xinelu.common.core.domain.AjaxResult; import com.xinelu.manage.domain.shortmessagesendrecord.ShortMessageSendRecord; +import com.xinelu.manage.vo.shortmessagesendrecord.RecordSummary; import com.xinelu.manage.vo.shortmessagesendrecord.ShortMessageSendRecordVo; import java.util.List; @@ -65,4 +66,12 @@ public interface IShortMessageSendRecordService { * 短信推送统计 */ AjaxResult messageCount(); + + /** + * 短信发送结果汇总 + * + * @param shortMessageSendRecord 时间 + * @return RecordSummary + */ + List selectRecordSummary(ShortMessageSendRecordVo shortMessageSendRecord); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/shortmessagesendrecord/impl/ShortMessageSendRecordServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/shortmessagesendrecord/impl/ShortMessageSendRecordServiceImpl.java index 06df9f36..b0f3299d 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/shortmessagesendrecord/impl/ShortMessageSendRecordServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/shortmessagesendrecord/impl/ShortMessageSendRecordServiceImpl.java @@ -4,6 +4,7 @@ import com.xinelu.common.core.domain.AjaxResult; import com.xinelu.manage.domain.shortmessagesendrecord.ShortMessageSendRecord; import com.xinelu.manage.mapper.shortmessagesendrecord.ShortMessageSendRecordMapper; import com.xinelu.manage.service.shortmessagesendrecord.IShortMessageSendRecordService; +import com.xinelu.manage.vo.shortmessagesendrecord.RecordSummary; import com.xinelu.manage.vo.shortmessagesendrecord.ShortMessageSendRecordVo; import com.xinelu.manage.vo.statistics.PushCount; import org.springframework.stereotype.Service; @@ -12,6 +13,7 @@ import javax.annotation.Resource; import java.math.BigDecimal; import java.math.RoundingMode; import java.time.LocalDateTime; +import java.util.ArrayList; import java.util.List; import java.util.Objects; @@ -111,4 +113,13 @@ public class ShortMessageSendRecordServiceImpl implements IShortMessageSendRecor } return AjaxResult.success(pushCount); } + + @Override + public List selectRecordSummary(ShortMessageSendRecordVo shortMessageSendRecord) { + RecordSummary recordSummary = shortMessageSendRecordMapper.selectRecordSummary(shortMessageSendRecord); + recordSummary.setDateRange(shortMessageSendRecord.getSendTimeStart() + "——————" + shortMessageSendRecord.getSendTimeEnd()); + List recordSummaries = new ArrayList<>(); + recordSummaries.add(recordSummary); + return recordSummaries; + } } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/shortmessagesendrecord/RecordSummary.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/shortmessagesendrecord/RecordSummary.java new file mode 100644 index 00000000..6055de6e --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/shortmessagesendrecord/RecordSummary.java @@ -0,0 +1,30 @@ +package com.xinelu.manage.vo.shortmessagesendrecord; + +import lombok.Data; + +/** + * 电话短信推送记录汇总 + */ +@Data +public class RecordSummary { + + /** + * 时间范围 + */ + private String dateRange; + + /** + * 总数 + */ + private Integer totalCount; + + /** + * 成功数量 + */ + private Integer successCount; + + /** + * 失败数量 + */ + private Integer failCount; +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/shortmessagesendrecord/ShortMessageSendRecordVo.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/shortmessagesendrecord/ShortMessageSendRecordVo.java index dc9ce95b..9ad51862 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/shortmessagesendrecord/ShortMessageSendRecordVo.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/shortmessagesendrecord/ShortMessageSendRecordVo.java @@ -78,28 +78,28 @@ public class ShortMessageSendRecordVo { * 短信长度 */ @ApiModelProperty(value = "短信长度") - @Excel(name = "短信长度") + @Excel(name = "短信长度", cellType = Excel.ColumnType.NUMERIC) private Long messageLength; /** * 短信数量 */ @ApiModelProperty(value = "短信数量") - @Excel(name = "短信数量") + @Excel(name = "短信数量", cellType = Excel.ColumnType.NUMERIC) private Long messageQuantity; /** * 短信单价 */ @ApiModelProperty(value = "短信单价") - @Excel(name = "短信单价") + @Excel(name = "短信单价", cellType = Excel.ColumnType.NUMERIC) private BigDecimal messageUnitPrice; /** * 短信价格 */ @ApiModelProperty(value = "短信价格") - @Excel(name = "短信价格") + @Excel(name = "短信价格", cellType = Excel.ColumnType.NUMERIC) private BigDecimal messageExpense; /** diff --git a/postdischarge-manage/src/main/resources/mapper/manage/phonedialrecord/PhoneDialRecordMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/phonedialrecord/PhoneDialRecordMapper.xml index 5747959a..ba227f34 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/phonedialrecord/PhoneDialRecordMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/phonedialrecord/PhoneDialRecordMapper.xml @@ -410,4 +410,17 @@ #{id} + + \ No newline at end of file diff --git a/postdischarge-manage/src/main/resources/mapper/manage/shortmessagesendrecord/ShortMessageSendRecordMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/shortmessagesendrecord/ShortMessageSendRecordMapper.xml index 10a54c7a..ca1bdb13 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/shortmessagesendrecord/ShortMessageSendRecordMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/shortmessagesendrecord/ShortMessageSendRecordMapper.xml @@ -462,4 +462,19 @@ from short_message_send_record where manage_route_node_id = #{nodeId} + + \ No newline at end of file