Browse Source

执法检查统计

v6
yanyan 1 year ago
parent
commit
515fae99e8
  1. 1
      lib/EmergencyService/zdxtEmergencyAuthService/src/main/java/com/zdxt/auth/project/system/user/service/UserServiceImpl.java
  2. 71
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnforcementRegistrationController.java
  3. 4
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnforcementRegistrationServiceImpl.java
  4. 13
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementRegistrationMapper.xml

1
lib/EmergencyService/zdxtEmergencyAuthService/src/main/java/com/zdxt/auth/project/system/user/service/UserServiceImpl.java

@ -286,6 +286,7 @@ public class UserServiceImpl implements IUserService {
// user.setCreateBy(ShiroUtils.getLoginName());
//新增用户默认不删除标记
user.setDelFlag("0");
user.setUserSource(0);
// 新增用户信息
int rows = userMapper.insertUser(user);

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

@ -90,7 +90,8 @@ public class EnforcementRegistrationController extends BaseController
LocalDate endTime = localDate.withYear(Integer.valueOf(localDate.getYear())).withMonth(12).with(TemporalAdjusters.lastDayOfMonth());
enforcementRegistration.setBeginTime(str.format(beginTime));
enforcementRegistration.setEndTime(str.format(endTime));
List<EnforcementRegistration> list = enforcementRegistrationService.selectEnforcementRegistrationList1(enforcementRegistration);
// List<EnforcementRegistration> list = enforcementRegistrationService.selectEnforcementRegistrationList1(enforcementRegistration);
List<EnforcementRegistration> list = enforcementRegistrationService.selectEnforcementRegistrationAndAddressList(enforcementRegistration);
List<EnforcementRegistration> uniteList=list.stream().filter(item->item.getUniteCheck()!=null&&!"".equals(item.getUniteCheck())).collect(Collectors.toList());
List<EnforcementRegistration> checkList=list.stream().filter(item->item.getCheckCategory()!=null&&!"".equals(item.getCheckCategory())&&item.getCheckCategory().equals("01")).collect(Collectors.toList());
String checkName=iDictDataService.selectDictLabel("check_category","01");
@ -138,28 +139,36 @@ public class EnforcementRegistrationController extends BaseController
@ResponseBody
public TableDataInfo list(EnforcementRegistration enforcementRegistration)
{
List<EnforcementRegistration> returnList = new ArrayList<>();
returnList = getEnforcementRegistrations(enforcementRegistration);
return getDataTable(returnList);
}
private List<EnforcementRegistration> getEnforcementRegistrations(EnforcementRegistration enforcementRegistration) {
List<EnforcementRegistration> returnList;
if(enforcementRegistration.getQy()!=null&&!"".equals(enforcementRegistration.getQy())){
if(enforcementRegistration.getJd()!=null&&!"".equals(enforcementRegistration.getJd())){
String qy=iDictDataService.selectDictLabel("address_Type",enforcementRegistration.getQy());
String jd=iDictDataService.selectDictLabel(enforcementRegistration.getQy(),enforcementRegistration.getJd());
String qy=iDictDataService.selectDictLabel("address_Type", enforcementRegistration.getQy());
String jd=iDictDataService.selectDictLabel(enforcementRegistration.getQy(), enforcementRegistration.getJd());
enforcementRegistration.setJd(jd);
enforcementRegistration.setQy(qy);
List<EnforcementRegistration> list = enforcementRegistrationService.selectEnforcementRegistrationAndAddressList(enforcementRegistration);
//注释为过滤开发环境无预约工单情况,正式环境可开启,此代码用于执法记录列表中对联合执法的记录标注牵头单位以及联合单位
list=enforcementRegistrationService.untieCheck1Make(list);
list=enforcementRegistrationService.untieCheck1Make(list);
for(int i=0;i<list.size();i++){
list.get(i).setQy(qy);
list.get(i).setJd(jd);
}
return getDataTable(list);
returnList = list;
//return getDataTable(list);
}else {
List<EnforcementRegistration> enforcementRegistrationList=new ArrayList<>();
String qy=iDictDataService.selectDictLabel("address_Type",enforcementRegistration.getQy());
String qy=iDictDataService.selectDictLabel("address_Type", enforcementRegistration.getQy());
List<DictData> jdList=iDictDataService.selectDictDataByType(enforcementRegistration.getQy());
enforcementRegistration.setQy(qy);
List<EnforcementRegistration> list = enforcementRegistrationService.selectEnforcementRegistrationAndAddressList(enforcementRegistration);
//注释为过滤开发环境无预约工单情况,正式环境可开启,此代码用于执法记录列表中对联合执法的记录标注牵头单位以及联合单位
list=enforcementRegistrationService.untieCheck1Make(list);
//注释为过滤开发环境无预约工单情况,正式环境可开启,此代码用于执法记录列表中对联合执法的记录标注牵头单位以及联合单位
list=enforcementRegistrationService.untieCheck1Make(list);
/*List<String> jdStrings=new ArrayList<>();
for(DictData dictData:jdList){
jdStrings.add(dictData.getDictLabel());
@ -181,7 +190,8 @@ public class EnforcementRegistrationController extends BaseController
}
enforcementRegistrationList.addAll(qtjdList);
}
return getDataTable(enforcementRegistrationList);
returnList = enforcementRegistrationList;
//return getDataTable(enforcementRegistrationList);
}
}else {
List<DictData> qyList=iDictDataService.selectDictDataByType("address_Type");
@ -225,9 +235,12 @@ public class EnforcementRegistrationController extends BaseController
if(qtqyList.size()>0){
enforcementRegistrationsList.addAll(qtqyList);
}
return getDataTable(enforcementRegistrationsList);
returnList = enforcementRegistrationsList;
//return getDataTable(enforcementRegistrationsList);
}
return returnList;
}
public Boolean qyMake(List<String> strings,String s){
for (String string : strings) {
if (s.startsWith("深圳市" + string.substring(0, string.indexOf("区")) + "区")||s.startsWith("深圳市" + string.substring(0, string.indexOf("区")) + "新区")) {
@ -291,24 +304,22 @@ public class EnforcementRegistrationController extends BaseController
@GetMapping("/searchType")
public String searchType(EnforcementRegistration enforcementRegistration,Model model)
{
EnforcementRegistration eTotal=new EnforcementRegistration();
eTotal.setYear(enforcementRegistration.getYear());
List<EnforcementRegistration> totalList=enforcementRegistrationService.selectEnforcementRegistrationAndAddressList(eTotal);
model.addAttribute("total",totalList.size());
if(enforcementRegistration.getQy()!=null&&!"".equals(enforcementRegistration.getQy())){
if(enforcementRegistration.getJd()!=null&&!"".equals(enforcementRegistration.getJd())){
enforcementRegistration.setJd(iDictDataService.selectDictLabel(enforcementRegistration.getQy(),enforcementRegistration.getJd()));
}
enforcementRegistration.setQy(iDictDataService.selectDictLabel("address_Type",enforcementRegistration.getQy()));
}
DecimalFormat str1=new DecimalFormat("0.00%");
// if(enforcementRegistration.getYear()==null||"".equals(enforcementRegistration.getYear())) {
// model.addAttribute("year","-");
// }else {
// model.addAttribute("year", enforcementRegistration.getYear());
// EnforcementRegistration eTotal=new EnforcementRegistration();
// eTotal.setYear(enforcementRegistration.getYear());
// List<EnforcementRegistration> totalList=enforcementRegistrationService.selectEnforcementRegistrationAndAddressList(eTotal);
// model.addAttribute("total",totalList.size());
// if(enforcementRegistration.getQy()!=null&&!"".equals(enforcementRegistration.getQy())){
// if(enforcementRegistration.getJd()!=null&&!"".equals(enforcementRegistration.getJd())){
// enforcementRegistration.setJd(iDictDataService.selectDictLabel(enforcementRegistration.getQy(),enforcementRegistration.getJd()));
// }
// enforcementRegistration.setQy(iDictDataService.selectDictLabel("address_Type",enforcementRegistration.getQy()));
// }
List<EnforcementRegistration> list = enforcementRegistrationService.selectEnforcementRegistrationAndAddressList(enforcementRegistration);
System.out.println(1);
List<EnforcementRegistration> list = getEnforcementRegistrations(enforcementRegistration);
model.addAttribute("total",list.size());
DecimalFormat str1=new DecimalFormat("0.00%");
//List<EnforcementRegistration> list = enforcementRegistrationService.selectEnforcementRegistrationAndAddressList(enforcementRegistration);
List<EnforcementRegistration> uniteList=list.stream().filter(item->item.getUniteCheck()!=null&&!"".equals(item.getUniteCheck())).collect(Collectors.toList());
List<EnforcementRegistration> checkList=new ArrayList<>();
String checkName;
@ -394,9 +405,9 @@ public class EnforcementRegistrationController extends BaseController
public List<StatisticsIndicator> echarts1(EnforcementRegistration enforcementRegistration){
List<StatisticsIndicator> statisticsIndicatorList=new ArrayList<>();
Map<String,DictData> dictDataMap=iDictDataService.selectDictDataByType("check_category").stream().collect(Collectors.toMap(DictData::getDictValue,Function.identity()));
// List<EnforcementRegistration> list = enforcementRegistrationService.selectEnforcementRegistrationList1(enforcementRegistration);
List<EnforcementRegistration> list =
enforcementRegistrationService.selectEnforcementRegistrationList2(enforcementRegistration);
List<EnforcementRegistration> list = enforcementRegistrationService.selectEnforcementRegistrationList1(enforcementRegistration);
// List<EnforcementRegistration> list =
// enforcementRegistrationService.selectEnforcementRegistrationList2(enforcementRegistration);
Map<String,Long> checkMap=list.stream().collect(Collectors.groupingBy(item->item.getCheckCategory()==null||"".equals(item.getCheckCategory())?"空":item.getCheckCategory(),Collectors.counting()));
for(String s:checkMap.keySet()){
StatisticsIndicator statisticsIndicator=new StatisticsIndicator();

4
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnforcementRegistrationServiceImpl.java

@ -215,7 +215,7 @@ public class EnforcementRegistrationServiceImpl implements IEnforcementRegistrat
}
@Override
@DataScope
@DataScope(deptField = "bureau_dept_id")
public List<EnforcementRegistration> selectEnforcementRegistrationList2(EnforcementRegistration enforcementRegistration)
{
List<EnforcementRegistration> enforcementRegistrations =
@ -233,7 +233,7 @@ public class EnforcementRegistrationServiceImpl implements IEnforcementRegistrat
}
@Override
@DataScope
@DataScope(deptField = "bureau_dept_id")
public List<EnforcementRegistration> selectEnforcementRegistrationList1(EnforcementRegistration enforcementRegistration)
{
DateTimeFormatter str=DateTimeFormatter.ofPattern("yyyy-MM-dd");

13
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementRegistrationMapper.xml

@ -469,15 +469,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="month != null and month != '' ">
AND DATE_FORMAT(enforcement_time, '%m') = #{month}
</if>
<choose>
<when test="params.dataScope != null and params.dataScope != ''">
and dept_id IN ( SELECT dept_id FROM sys_dept WHERE dept_id = #{deptId} or find_in_set( #{deptId} , ancestors ) <![CDATA[ <> ]]> 0 )
</when>
<!--默认开启权限搜索 -->
<otherwise>
${params.dataScope}
</otherwise>
</choose>
<if test="params.dataScope != null and params.dataScope != ''">
<!-- 数据范围过滤 -->
${params.dataScope}
</if>
</where>
order by create_time desc
</select>

Loading…
Cancel
Save