zouyx 2 years ago
parent
commit
5d1af9c65a
  1. 2
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/StatisticsWarning/statisticsWarning.html
  2. 13
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/statisticalPanel.html
  3. 15
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnforcementInspectionProgramController.java
  4. 6
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnforcementRegistrationController.java

2
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/StatisticsWarning/statisticsWarning.html

@ -172,3 +172,5 @@
}
}
</script>
</body>
</html>

13
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/statisticalPanel.html

@ -186,8 +186,8 @@
</select>
</li>
<li>
<a class="btn btn-success btn-sm" onclick="searchW()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-reset btn-sm" onclick="restW()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
<a class="btn btn-success btn-sm" onclick="searchP()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-reset btn-sm" onclick="restP()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
<a class="btn btn-warning btn-sm" onclick="download1()"><i class="fa fa-download"></i>导出</a>
</li>
</ul>
@ -377,15 +377,14 @@
var prefix = ctx + "code/enforcementInspectionProgram";
var prefix2 = ctx + "code/statisticalPanel";
window.onload=function (){
// wTable();
$("#quarter").hide();
$("#month").hide();
this.initData();
};
function restW(){
function restP(){
$('form').eq(0).trigger("reset");
console.log($.common.formToJSON($('form').eq(0).attr('id')));
searchW();
this.initData();
timeType();
}
function timeType() {
@ -629,6 +628,10 @@
$("#" + hideTarget).hide();
}
function searchP(){
this.initData();
}
</script>
</body>
</html>

15
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnforcementInspectionProgramController.java

@ -1,5 +1,7 @@
package com.zdxt.code.controller;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.List;
import cn.hutool.core.bean.BeanUtil;
@ -14,6 +16,7 @@ import com.zdxt.common.util.TableDataInfo;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import com.zdxt.code.domain.EnforcementInspectionProgram;
@ -53,8 +56,9 @@ public class EnforcementInspectionProgramController extends BaseController
@GetMapping("/statisticalPanel")
public String statisticalPanel()
public String statisticalPanel(Model model)
{
model.addAttribute("yearList",yearMake());
return prefix2 + "/statisticalPanel";
}
@ -249,5 +253,12 @@ public class EnforcementInspectionProgramController extends BaseController
}
}
public List<Integer> yearMake(){
int current= LocalDate.now().getYear();
List<Integer> yearList=new ArrayList<>();
for(int i=current;i>=2023;i--){
yearList.add(i);
}
return yearList;
}
}

6
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnforcementRegistrationController.java

@ -148,6 +148,7 @@ public class EnforcementRegistrationController extends BaseController
@GetMapping("/searchType")
public String searchType(EnforcementRegistration enforcementRegistration,Model model)
{
DecimalFormat str1=new DecimalFormat("0.00%");
model.addAttribute("year",enforcementRegistration.getYear());
List<EnforcementRegistration> list = enforcementRegistrationService.selectEnforcementRegistrationList1(enforcementRegistration);
System.out.println(1);
@ -162,7 +163,7 @@ public class EnforcementRegistrationController extends BaseController
checkName = iDictDataService.selectDictLabel("check_category", "01");
}
model.addAttribute("unite",uniteList.size());
String uniteDouble=String.format("%.3f",((double)uniteList.size()/list.size()));
String uniteDouble=str1.format((double)uniteList.size()/list.size());
if(uniteDouble.equals("NaN")){
model.addAttribute("uniteDouble","-");
}else {
@ -170,7 +171,7 @@ public class EnforcementRegistrationController extends BaseController
}
model.addAttribute("check",checkName);
model.addAttribute("checkNumber",checkList.size());
String checkDouble=String.format("%.3f",((double)checkList.size()/list.size()));
String checkDouble=str1.format((double)checkList.size()/list.size());
if(checkDouble.equals("NaN")){
model.addAttribute("checkDouble","-");
}else {
@ -254,7 +255,6 @@ public class EnforcementRegistrationController extends BaseController
DateTimeFormatter str=DateTimeFormatter.ofPattern("yyyy-MM-dd");
DateTimeFormatter str3=DateTimeFormatter.ofPattern("MM");
LocalDate localDate=LocalDate.now();
localDate=localDate.minusMonths(3);
int quarter=(int)Math.ceil(Double.valueOf(str3.format(localDate))/3);
LocalDate beginTime=localDate.withMonth(quarter*3-2).withDayOfMonth(1);
LocalDate endTime=localDate.withMonth(quarter*3).with(TemporalAdjusters.lastDayOfMonth());

Loading…
Cancel
Save