|
@@ -3,16 +3,11 @@ package com.ruoyi.powerdistribution.controller;
|
|
import com.ruoyi.common.core.controller.BaseController;
|
|
import com.ruoyi.common.core.controller.BaseController;
|
|
import com.ruoyi.common.utils.DateUtils;
|
|
import com.ruoyi.common.utils.DateUtils;
|
|
import com.ruoyi.common.utils.uuid.UUID;
|
|
import com.ruoyi.common.utils.uuid.UUID;
|
|
-import com.ruoyi.powerdistribution.domain.PdmReportAppointmentDay;
|
|
+import com.ruoyi.powerdistribution.domain.*;
|
|
-import com.ruoyi.powerdistribution.domain.PdmReportIllegalDay;
|
|
+import com.ruoyi.powerdistribution.domain.dto.PdmWorkPlanDTO;
|
|
-import com.ruoyi.powerdistribution.domain.PdmReportPlanDay;
|
|
|
|
-import com.ruoyi.powerdistribution.domain.PdmReportPlanNextDay;
|
|
|
|
import com.ruoyi.powerdistribution.domain.vo.SupRiskTeam;
|
|
import com.ruoyi.powerdistribution.domain.vo.SupRiskTeam;
|
|
import com.ruoyi.powerdistribution.domain.vo.TaskRiskPlan;
|
|
import com.ruoyi.powerdistribution.domain.vo.TaskRiskPlan;
|
|
-import com.ruoyi.powerdistribution.service.IPdmReportAppointmentDayService;
|
|
+import com.ruoyi.powerdistribution.service.*;
|
|
-import com.ruoyi.powerdistribution.service.IPdmReportIllegalDayService;
|
|
|
|
-import com.ruoyi.powerdistribution.service.IPdmReportPlanDayService;
|
|
|
|
-import com.ruoyi.powerdistribution.service.IPdmReportPlanNextDayService;
|
|
|
|
import com.ruoyi.powerdistribution.util.GenerateWordUtil;
|
|
import com.ruoyi.powerdistribution.util.GenerateWordUtil;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -47,7 +42,8 @@ public class DailyReportController extends BaseController {
|
|
private IPdmReportAppointmentDayService pdmReportAppointmentDayService;
|
|
private IPdmReportAppointmentDayService pdmReportAppointmentDayService;
|
|
@Autowired
|
|
@Autowired
|
|
private IPdmReportPlanNextDayService pdmReportPlanNextDayService;
|
|
private IPdmReportPlanNextDayService pdmReportPlanNextDayService;
|
|
-
|
|
+ @Autowired
|
|
|
|
+ private IPdmWorkPlanService pdmWorkPlanService;
|
|
|
|
|
|
@PostMapping("/export")
|
|
@PostMapping("/export")
|
|
@ApiOperation(value = "日报导出")
|
|
@ApiOperation(value = "日报导出")
|
|
@@ -56,84 +52,154 @@ public class DailyReportController extends BaseController {
|
|
pdmReportIllegalDay.setStartDate(beingDate);
|
|
pdmReportIllegalDay.setStartDate(beingDate);
|
|
pdmReportIllegalDay.setEndDate(endDate);
|
|
pdmReportIllegalDay.setEndDate(endDate);
|
|
Map<String,Object> dataMap = new HashMap();
|
|
Map<String,Object> dataMap = new HashMap();
|
|
- dataMap.put("rptDate", DateUtils.dateTimeNow("yyyy年MM月dd日"));
|
|
+
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
|
|
Date cvrtFirstDate = sdf.parse(beingDate);
|
|
Date cvrtFirstDate = sdf.parse(beingDate);
|
|
Date cvrtEndDate = sdf.parse(endDate);
|
|
Date cvrtEndDate = sdf.parse(endDate);
|
|
|
|
|
|
|
|
+ dataMap.put("rptDate", DateUtils.parseDateToStr("yyyy年MM月dd日",cvrtEndDate));
|
|
dataMap.put("month",new SimpleDateFormat("MM").format(cvrtFirstDate));
|
|
dataMap.put("month",new SimpleDateFormat("MM").format(cvrtFirstDate));
|
|
dataMap.put("beginDay",new SimpleDateFormat("dd").format(cvrtFirstDate));
|
|
dataMap.put("beginDay",new SimpleDateFormat("dd").format(cvrtFirstDate));
|
|
dataMap.put("endDay",new SimpleDateFormat("dd").format(cvrtEndDate));
|
|
dataMap.put("endDay",new SimpleDateFormat("dd").format(cvrtEndDate));
|
|
|
|
|
|
- dataMap.put("provinceInvestPunishRecNum",0);
|
|
+ long provinceInvestPunishRecNum=0;
|
|
- dataMap.put("provinceInvestSeriousRecNum",0);
|
|
+ long provinceInvestSeriousRecNum=0;
|
|
- dataMap.put("cityInvestPunishRecNum",0);
|
|
+ long cityInvestPunishRecNum=0;
|
|
- dataMap.put("cityInvestSeriousRecNum",0);
|
|
+ long cityInvestSeriousRecNum=0;
|
|
- dataMap.put("countySelfInvestPunishRecNum",0);
|
|
+ long countySelfInvestPunishRecNum=0;
|
|
- dataMap.put("countySelfInvestSeriousRecNum",0);
|
|
+ long countySelfInvestSeriousRecNum=0;
|
|
- dataMap.put("guaraSelfIssuesRecNum",0);
|
|
+ long guaraSelfIssuesRecNum=0;
|
|
- dataMap.put("guaraCityIssuesRecNum",0);
|
|
|
|
List<PdmReportIllegalDay> illegalList = pdmReportIllegalDayService.selectPdmReportIllegalDayList(pdmReportIllegalDay); File descFile=null;
|
|
List<PdmReportIllegalDay> illegalList = pdmReportIllegalDayService.selectPdmReportIllegalDayList(pdmReportIllegalDay); File descFile=null;
|
|
|
|
+ if(illegalList!=null && illegalList.size()>1){
|
|
|
|
+ pdmReportIllegalDay=illegalList.get(illegalList.size()-1);
|
|
|
|
+ provinceInvestPunishRecNum=pdmReportIllegalDay.getProvinceNum1()+pdmReportIllegalDay.getProvinceNum2();
|
|
|
|
+ provinceInvestSeriousRecNum=pdmReportIllegalDay.getProvinceNum1();
|
|
|
|
+ cityInvestPunishRecNum=pdmReportIllegalDay.getCityNum1()+pdmReportIllegalDay.getCityNum2();
|
|
|
|
+ cityInvestSeriousRecNum=pdmReportIllegalDay.getCityNum1();
|
|
|
|
+ countySelfInvestPunishRecNum=pdmReportIllegalDay.getCountyNum1()+pdmReportIllegalDay.getCountyNum2();
|
|
|
|
+ countySelfInvestSeriousRecNum=pdmReportIllegalDay.getCountyNum1();
|
|
|
|
+ guaraSelfIssuesRecNum=pdmReportIllegalDay.getCheckNum();
|
|
|
|
+ }
|
|
|
|
|
|
dataMap.put("illegalList",illegalList);
|
|
dataMap.put("illegalList",illegalList);
|
|
|
|
+ dataMap.put("provinceInvestPunishRecNum",provinceInvestPunishRecNum);
|
|
|
|
+ dataMap.put("provinceInvestSeriousRecNum",provinceInvestSeriousRecNum);
|
|
|
|
+ dataMap.put("cityInvestPunishRecNum",cityInvestPunishRecNum);
|
|
|
|
+ dataMap.put("cityInvestSeriousRecNum",cityInvestSeriousRecNum);
|
|
|
|
+ dataMap.put("countySelfInvestPunishRecNum",countySelfInvestPunishRecNum);
|
|
|
|
+ dataMap.put("countySelfInvestSeriousRecNum",countySelfInvestSeriousRecNum);
|
|
|
|
+ dataMap.put("guaraSelfIssuesRecNum",guaraSelfIssuesRecNum);
|
|
|
|
+ dataMap.put("guaraCityIssuesRecNum",0);
|
|
|
|
+
|
|
|
|
|
|
- dataMap.put("jobRecNum",0);
|
|
+ long jobRecNum=0;
|
|
- dataMap.put("exceRecNum",0);
|
|
+ long exceRecNum=0;
|
|
- dataMap.put("cancelRecNum",0);
|
|
+ long cancelRecNum=0;
|
|
- dataMap.put("implementationRate",0);
|
|
+ String implementationRate="0%";
|
|
- dataMap.put("tmpPlanRecNum",0);
|
|
+ long tmpPlanRecNum=0;
|
|
- dataMap.put("cancelTmpPlanRecNum",0);
|
|
+ String tmpPlanRate="0%";
|
|
- dataMap.put("tmpPlanRate",0);
|
|
+ long temporaryCancelSum=0;
|
|
- dataMap.put("repairRecNum",0);
|
|
|
|
- dataMap.put("operateRecNum",0);
|
|
|
|
PdmReportPlanDay pdmReportPlanDay = new PdmReportPlanDay();
|
|
PdmReportPlanDay pdmReportPlanDay = new PdmReportPlanDay();
|
|
pdmReportPlanDay.setReportDate(beingDate);
|
|
pdmReportPlanDay.setReportDate(beingDate);
|
|
List<PdmReportPlanDay> planlist = pdmReportPlanDayService.selectPdmReportPlanDayList(pdmReportPlanDay);
|
|
List<PdmReportPlanDay> planlist = pdmReportPlanDayService.selectPdmReportPlanDayList(pdmReportPlanDay);
|
|
-
|
|
+ if(planlist!=null && planlist.size()>1){
|
|
|
|
+ pdmReportPlanDay=planlist.get(planlist.size()-1);
|
|
|
|
+ jobRecNum=pdmReportPlanDay.getWeekSum();
|
|
|
|
+ exceRecNum=pdmReportPlanDay.getWeekSum()-pdmReportPlanDay.getWeekCancelSum();
|
|
|
|
+ cancelRecNum=pdmReportPlanDay.getWeekCancelSum();
|
|
|
|
+ implementationRate=pdmReportPlanDay.getWeekRatio();
|
|
|
|
+ tmpPlanRecNum=pdmReportPlanDay.getTemporarySum();
|
|
|
|
+ temporaryCancelSum=pdmReportPlanDay.getTemporaryCancelSum();
|
|
|
|
+ tmpPlanRate=pdmReportPlanDay.getTemporaryPlanRatio();
|
|
|
|
+ }
|
|
|
|
+ dataMap.put("jobRecNum",jobRecNum);
|
|
|
|
+ dataMap.put("exceRecNum",exceRecNum);
|
|
|
|
+ dataMap.put("cancelRecNum",cancelRecNum);
|
|
|
|
+ dataMap.put("implementationRate",implementationRate);
|
|
|
|
+ dataMap.put("tmpPlanRecNum",tmpPlanRecNum);
|
|
|
|
+ dataMap.put("cancelTmpPlanRecNum",temporaryCancelSum);
|
|
|
|
+ dataMap.put("tmpPlanRate",tmpPlanRate);
|
|
|
|
+ dataMap.put("repairRecNum",0);
|
|
|
|
+ dataMap.put("operateRecNum",0);
|
|
dataMap.put("planlist",planlist);
|
|
dataMap.put("planlist",planlist);
|
|
|
|
+
|
|
|
|
|
|
- dataMap.put("supervTimes",0);
|
|
+ long supervTimes=0;
|
|
- dataMap.put("leaderSupervTimes",0);
|
|
+ long leaderSupervTimes=0;
|
|
- dataMap.put("manageSupervTimes",0);
|
|
+ long manageSupervTimes=0;
|
|
- dataMap.put("nonfulfilmentNum",0);
|
|
+ long nonfulfilmentNum=0;
|
|
- dataMap.put("derelictionDutyNum",0);
|
|
+ long derelictionDutyNum=0;
|
|
PdmReportAppointmentDay pdmReportAppointmentDay = new PdmReportAppointmentDay();
|
|
PdmReportAppointmentDay pdmReportAppointmentDay = new PdmReportAppointmentDay();
|
|
pdmReportAppointmentDay.setReportDate(beingDate);
|
|
pdmReportAppointmentDay.setReportDate(beingDate);
|
|
List<PdmReportAppointmentDay> appointmentlist = pdmReportAppointmentDayService.selectPdmReportAppointmentDayList(pdmReportAppointmentDay);
|
|
List<PdmReportAppointmentDay> appointmentlist = pdmReportAppointmentDayService.selectPdmReportAppointmentDayList(pdmReportAppointmentDay);
|
|
-
|
|
+ if(appointmentlist!=null && appointmentlist.size()>1){
|
|
|
|
+ pdmReportAppointmentDay=appointmentlist.get(appointmentlist.size()-1);
|
|
|
|
+ supervTimes=pdmReportAppointmentDay.getBossSum()+pdmReportAppointmentDay.getManageSum();
|
|
|
|
+ leaderSupervTimes=pdmReportAppointmentDay.getBossSum();
|
|
|
|
+ manageSupervTimes=pdmReportAppointmentDay.getManageSum();
|
|
|
|
+ nonfulfilmentNum=pdmReportAppointmentDay.getAbsentSum();
|
|
|
|
+ derelictionDutyNum= pdmReportAppointmentDay.getAbsentBadSum();
|
|
|
|
+ }
|
|
|
|
+ dataMap.put("supervTimes",supervTimes);
|
|
|
|
+ dataMap.put("leaderSupervTimes",leaderSupervTimes);
|
|
|
|
+ dataMap.put("manageSupervTimes",manageSupervTimes);
|
|
|
|
+ dataMap.put("nonfulfilmentNum",nonfulfilmentNum);
|
|
|
|
+ dataMap.put("derelictionDutyNum",derelictionDutyNum);
|
|
dataMap.put("appointmentlist",appointmentlist);
|
|
dataMap.put("appointmentlist",appointmentlist);
|
|
|
|
|
|
|
|
|
|
- dataMap.put("distNetworkProfesRecNum",0);
|
|
+ long distNetworkProfesRecNum=0;
|
|
- dataMap.put("switchOperatNum",0);
|
|
+ long switchOperatNum=0;
|
|
- dataMap.put("distNetworkProjectNum",0);
|
|
+ long distNetworkProjectNum=0;
|
|
- dataMap.put("expanRelocationNum",0);
|
|
+ long expanRelocationNum=0;
|
|
- dataMap.put("maintenanceNum",0);
|
|
+ long maintenanceNum=0;
|
|
- dataMap.put("other",0);
|
|
+ long other=0;
|
|
- dataMap.put("tempPlanNum",0);
|
|
+ long tempPlanNum=0;
|
|
|
|
+ long liveWorkingNum=0;
|
|
|
|
+ String threeRiskNum="0";
|
|
|
|
+ String fourRiskNum="0";
|
|
|
|
+ String fiveRiskNum="0";
|
|
|
|
+ PdmReportPlanNextDay nextDay = new PdmReportPlanNextDay();
|
|
|
|
+ nextDay.setReportDate(DateUtils.getNextDateStr(beingDate,DateUtils.YYYYMMDD,1));
|
|
|
|
+ List<PdmReportPlanNextDay> nextDayList = pdmReportPlanNextDayService.selectPdmReportPlanNextDayList(nextDay);
|
|
|
|
+ if(nextDayList!=null&& nextDayList.size()>1){
|
|
|
|
+ nextDay=nextDayList.get(nextDayList.size()-1);
|
|
|
|
+ distNetworkProfesRecNum=nextDay.getWorkTotal();
|
|
|
|
+ switchOperatNum=nextDay.getWorkType1Sum();
|
|
|
|
+ distNetworkProjectNum=nextDay.getWorkType2Sum();
|
|
|
|
+ expanRelocationNum=nextDay.getWorkType3Sum();
|
|
|
|
+ maintenanceNum=nextDay.getWorkType4Sum();
|
|
|
|
+ other=nextDay.getWorkType5Sum();
|
|
|
|
+ tempPlanNum=nextDay.getTemporaryPlanSum();
|
|
|
|
+ liveWorkingNum=nextDay.getElePlanSum();
|
|
|
|
+ threeRiskNum=nextDay.getPlanLeve3();
|
|
|
|
+ fourRiskNum=nextDay.getPlanLeve4();
|
|
|
|
+ fiveRiskNum=nextDay.getPlanLeve5();
|
|
|
|
+ }
|
|
|
|
+ dataMap.put("distNetworkProfesRecNum",distNetworkProfesRecNum);
|
|
|
|
+ dataMap.put("switchOperatNum",switchOperatNum);
|
|
|
|
+ dataMap.put("distNetworkProjectNum",distNetworkProjectNum);
|
|
|
|
+ dataMap.put("expanRelocationNum",expanRelocationNum);
|
|
|
|
+ dataMap.put("maintenanceNum",maintenanceNum);
|
|
|
|
+ dataMap.put("other",other);
|
|
|
|
+ dataMap.put("tempPlanNum",tempPlanNum);
|
|
dataMap.put("operateNum",0);
|
|
dataMap.put("operateNum",0);
|
|
dataMap.put("kv10Num",0);
|
|
dataMap.put("kv10Num",0);
|
|
dataMap.put("zeroPointFourKvNum",0);
|
|
dataMap.put("zeroPointFourKvNum",0);
|
|
- dataMap.put("liveWorkingNum",0);
|
|
+ dataMap.put("liveWorkingNum",liveWorkingNum);
|
|
dataMap.put("liveDisconnectLeadNum",0);
|
|
dataMap.put("liveDisconnectLeadNum",0);
|
|
dataMap.put("assemDeviceNum",0);
|
|
dataMap.put("assemDeviceNum",0);
|
|
- dataMap.put("threeRiskNum",0);
|
|
+ dataMap.put("threeRiskNum",threeRiskNum);
|
|
- dataMap.put("fourRiskNum",0);
|
|
+ dataMap.put("fourRiskNum",fourRiskNum);
|
|
- dataMap.put("fiveRiskNum",0);
|
|
+ dataMap.put("fiveRiskNum",fiveRiskNum);
|
|
dataMap.put("liftingOperationNum",0);
|
|
dataMap.put("liftingOperationNum",0);
|
|
dataMap.put("verticalPoleNum",0);
|
|
dataMap.put("verticalPoleNum",0);
|
|
dataMap.put("chgeDeviceNum",0);
|
|
dataMap.put("chgeDeviceNum",0);
|
|
dataMap.put("keyAssignments",0);
|
|
dataMap.put("keyAssignments",0);
|
|
-
|
|
|
|
- PdmReportPlanNextDay nextDay = new PdmReportPlanNextDay();
|
|
|
|
- nextDay.setReportDate(DateUtils.getNextDateStr(beingDate,DateUtils.YYYYMMDD,1));
|
|
|
|
- List<PdmReportPlanNextDay> nextDayList = pdmReportPlanNextDayService.selectPdmReportPlanNextDayList(nextDay);
|
|
|
|
-
|
|
|
|
dataMap.put("nextDayList",nextDayList);
|
|
dataMap.put("nextDayList",nextDayList);
|
|
|
|
|
|
List<String> morrowExistSupRiskCompList=new ArrayList<>();
|
|
List<String> morrowExistSupRiskCompList=new ArrayList<>();
|
|
dataMap.put("morrowExistSupRiskComp",morrowExistSupRiskCompList==null||morrowExistSupRiskCompList.size()==0?"无":String.join(",",morrowExistSupRiskCompList));
|
|
dataMap.put("morrowExistSupRiskComp",morrowExistSupRiskCompList==null||morrowExistSupRiskCompList.size()==0?"无":String.join(",",morrowExistSupRiskCompList));
|
|
-
|
|
|
|
List<SupRiskTeam> supRiskTeamList=new ArrayList<>();
|
|
List<SupRiskTeam> supRiskTeamList=new ArrayList<>();
|
|
StringBuilder builder=new StringBuilder();
|
|
StringBuilder builder=new StringBuilder();
|
|
for(int i=0;i<supRiskTeamList.size();i++){
|
|
for(int i=0;i<supRiskTeamList.size();i++){
|
|
@@ -145,17 +211,22 @@ public class DailyReportController extends BaseController {
|
|
SimpleDateFormat formatter = new SimpleDateFormat("MM月dd日");
|
|
SimpleDateFormat formatter = new SimpleDateFormat("MM月dd日");
|
|
SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd");
|
|
SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd");
|
|
dataMap.put("tomorrow",formatter.format(format.parse(DateUtils.getNextDateStr(endDate,"yyyyMMdd",1))));
|
|
dataMap.put("tomorrow",formatter.format(format.parse(DateUtils.getNextDateStr(endDate,"yyyyMMdd",1))));
|
|
- List<TaskRiskPlan> taskRiskPlanList=new ArrayList<>();
|
|
+ dataMap.put("cityThreeRiskPlanNum",threeRiskNum);
|
|
- dataMap.put("cityThreeRiskPlanNum",taskRiskPlanList==null?0:taskRiskPlanList.size());
|
|
|
|
- StringBuilder riskPlanBuilder=new StringBuilder();
|
|
|
|
- for(int i=0;i<taskRiskPlanList.size();i++){
|
|
|
|
- TaskRiskPlan taskRiskPlan=taskRiskPlanList.get(i);
|
|
|
|
- riskPlanBuilder.append((i+1)).append(".").append(taskRiskPlan.getCompName()).append(":").append(String.join(",",taskRiskPlan.getHandlingMatters())).append(taskRiskPlan.getLeader()).append(".")
|
|
|
|
- .append("把关领导:").append("\r\n")
|
|
|
|
- ;
|
|
|
|
- }
|
|
|
|
- dataMap.put("cityThreeRiskPlan",taskRiskPlanList==null||taskRiskPlanList.size()==0?"":riskPlanBuilder.toString());
|
|
|
|
|
|
|
|
|
|
+ PdmWorkPlanDTO workPlan = new PdmWorkPlanDTO();
|
|
|
|
+ workPlan.setStartDate(beingDate);
|
|
|
|
+ workPlan.setEndDate(endDate);
|
|
|
|
+ workPlan.setLevel3Flag("1");
|
|
|
|
+ List<PdmWorkPlan> workList = pdmWorkPlanService.selectPdmWorkPlanList(workPlan);
|
|
|
|
+ List<String > cityThreeRiskPlanList=new ArrayList<>();
|
|
|
|
+ for(int i=0;i<workList.size();i++){
|
|
|
|
+ StringBuilder riskPlanBuilder=new StringBuilder();
|
|
|
|
+ PdmWorkPlan taskRiskPlan=workList.get(i);
|
|
|
|
+ riskPlanBuilder.append((i+1)).append(".").append(taskRiskPlan.getSubmitOrgNm()).append(":").append(taskRiskPlan.getOpContent()).append("。")
|
|
|
|
+ .append("把关领导:").append(taskRiskPlan.getWorkPrincipNm()).append("/").append(taskRiskPlan.getWorkPrincipContactMode());
|
|
|
|
+ cityThreeRiskPlanList.add(riskPlanBuilder.toString());
|
|
|
|
+ }
|
|
|
|
+ dataMap.put("cityThreeRiskPlanList",cityThreeRiskPlanList);
|
|
try {
|
|
try {
|
|
String fileN = UUID.randomUUID().toString();
|
|
String fileN = UUID.randomUUID().toString();
|
|
File fileFold = new File(printReplenishmentPath+"/temp_print/");
|
|
File fileFold = new File(printReplenishmentPath+"/temp_print/");
|