|
|
|
@ -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()); |
|
|
|
|