|
|
@@ -14,6 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
import java.time.LocalDate;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
@@ -35,12 +36,20 @@ public class ResumptionReportController {
|
|
|
public AjaxResult list(ResumptionDTO resumptionDTO) {
|
|
|
if (null == resumptionDTO.getSearchTime()) {
|
|
|
LocalDate currentDate = LocalDate.now();
|
|
|
- resumptionDTO.setSearchTime(currentDate.toString());
|
|
|
+ if (null == resumptionDTO.getCycle() || resumptionDTO.getCycle() == 1) {
|
|
|
+ resumptionDTO.setSearchTime(currentDate.toString());
|
|
|
+ } else {
|
|
|
+ resumptionDTO.setSearchTime(currentDate.getYear() + "-" + currentDate.getMonthValue());
|
|
|
+ }
|
|
|
}
|
|
|
AjaxResult ajaxResult = AjaxResult.success();
|
|
|
List<ResumptionDayVO> report = resumptionReportService.report(resumptionDTO);
|
|
|
ajaxResult.put(AjaxResult.DATA_TAG, report);
|
|
|
- ajaxResult.put("title", "日报表-营业网点每日安全保卫履职(" + resumptionDTO.getSearchTime() + ")");
|
|
|
+ if (null == resumptionDTO.getCycle() || resumptionDTO.getCycle() == 1) {
|
|
|
+ ajaxResult.put("title", "日报表-营业网点每日安全保卫履职(" + resumptionDTO.getSearchTime() + ")");
|
|
|
+ } else {
|
|
|
+ ajaxResult.put("title", "月报表-营业网点每日安全保卫履职(" + resumptionDTO.getSearchTime() + ")");
|
|
|
+ }
|
|
|
return ajaxResult;
|
|
|
}
|
|
|
|
|
|
@@ -50,7 +59,7 @@ public class ResumptionReportController {
|
|
|
public AjaxResult intrusionTest(ResumptionDTO resumptionDTO) {
|
|
|
if (null == resumptionDTO.getSearchTime()) {
|
|
|
LocalDate currentDate = LocalDate.now();
|
|
|
- resumptionDTO.setSearchTime(currentDate.getYear()+"-"+currentDate.getMonthValue());
|
|
|
+ resumptionDTO.setSearchTime(currentDate.getYear() + "-" + currentDate.getMonthValue());
|
|
|
}
|
|
|
AjaxResult ajaxResult = AjaxResult.success();
|
|
|
List<IntrusionTestReportVO> intrusionTestReportVOList = resumptionReportService.intrusionTest(resumptionDTO);
|
|
|
@@ -58,11 +67,12 @@ public class ResumptionReportController {
|
|
|
ajaxResult.put("title", "报警测试报表(" + resumptionDTO.getSearchTime() + ")");
|
|
|
return ajaxResult;
|
|
|
}
|
|
|
+
|
|
|
@ApiOperation(value = "备用电源维护报表")
|
|
|
@RequiresPermissions("core:resumptionReport:list")
|
|
|
@GetMapping("/standbyPower")
|
|
|
public AjaxResult standbyPower(ResumptionDTO resumptionDTO) {
|
|
|
- String time;
|
|
|
+ String time;
|
|
|
if (null == resumptionDTO.getSearchTime()) {
|
|
|
DateTime beginOfQuarter = DateUtil.beginOfQuarter(new java.util.Date());
|
|
|
DateTime endOfQuarter = DateUtil.endOfQuarter(new Date());
|
|
|
@@ -71,10 +81,10 @@ public class ResumptionReportController {
|
|
|
LocalDate currentDate = LocalDate.now();
|
|
|
int month = currentDate.getMonthValue();
|
|
|
int quarter = (month - 1) / 3 + 1;
|
|
|
- time=currentDate.getYear()+"年第"+quarter+"季度";
|
|
|
- }else {
|
|
|
+ time = currentDate.getYear() + "年第" + quarter + "季度";
|
|
|
+ } else {
|
|
|
String[] split = resumptionDTO.getSearchTime().split("-");
|
|
|
- time= split[0]+"年第"+split[1]+"季度";
|
|
|
+ time = split[0] + "年第" + split[1] + "季度";
|
|
|
}
|
|
|
AjaxResult ajaxResult = AjaxResult.success();
|
|
|
List<IntrusionTestReportVO> intrusionTestReportVOList = resumptionReportService.standbyPower(resumptionDTO);
|
|
|
@@ -82,13 +92,14 @@ public class ResumptionReportController {
|
|
|
ajaxResult.put("title", "备用电源维护报表(" + time + ")");
|
|
|
return ajaxResult;
|
|
|
}
|
|
|
+
|
|
|
@ApiOperation(value = "离行式自助银行巡检报表")
|
|
|
@RequiresPermissions("core:resumptionReport:list")
|
|
|
@GetMapping("/serviceBank")
|
|
|
public AjaxResult serviceBank(ResumptionDTO resumptionDTO) {
|
|
|
if (null == resumptionDTO.getSearchTime()) {
|
|
|
LocalDate currentDate = LocalDate.now();
|
|
|
- resumptionDTO.setSearchTime(currentDate.getYear()+"-"+currentDate.getMonthValue());
|
|
|
+ resumptionDTO.setSearchTime(currentDate.getYear() + "-" + currentDate.getMonthValue());
|
|
|
}
|
|
|
AjaxResult ajaxResult = AjaxResult.success();
|
|
|
List<IntrusionTestReportVO> intrusionTestReportVOList = resumptionReportService.serviceBank(resumptionDTO);
|