diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnforcementRegistrationController.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnforcementRegistrationController.java index 7fb0a257..2f9e788b 100644 --- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnforcementRegistrationController.java +++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnforcementRegistrationController.java @@ -118,14 +118,14 @@ public class EnforcementRegistrationController extends BaseController * @param enforcementRegistrationDto * @return */ - @PostMapping("/staticEnforcementRegistrationDetail") - @ResponseBody - public ZDResponse staticListDetail(EnforcementRegistrationDto enforcementRegistrationDto){ - List enforcementRegistrationDtos = enforcementRegistrationService. - staticEnforcementRegistrationDetail(enforcementRegistrationDto); - return ZDResponse.success("获取执法分析详细清单",enforcementRegistrationDtos); - } - /** + @PostMapping("/staticEnforcementRegistrationDetail") + @ResponseBody + public ZDResponse staticListDetail(EnforcementRegistrationDto enforcementRegistrationDto){ + List enforcementRegistrationDtos = enforcementRegistrationService. + staticEnforcementRegistrationDetail(enforcementRegistrationDto); + return ZDResponse.success("获取执法分析详细清单",enforcementRegistrationDtos); + } + /** * 查询执法端-执法登记列表 */ @RequiresPermissions("code:registration:list") diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/StatisticalPanelController.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/StatisticalPanelController.java index 6191c254..a93d2f3b 100644 --- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/StatisticalPanelController.java +++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/StatisticalPanelController.java @@ -18,7 +18,6 @@ public class StatisticalPanelController extends BaseController { private StatisticalPaneService statisticalPaneService; @RequestMapping("/") public ZDResponse home(){ - return ZDResponse.success(); } diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/StatisticsIndicatorPart.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/StatisticsIndicatorPart.java index 78666fb1..2d54bf33 100644 --- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/StatisticsIndicatorPart.java +++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/StatisticsIndicatorPart.java @@ -38,6 +38,11 @@ public class StatisticsIndicatorPart extends BaseDomain { */ private String month; + /** + * 机构统一信用代码 + */ + private String creditCode; + private String beginTime; private String endTime; diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/StatisticalPanelMapper.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/StatisticalPanelMapper.java index 0c11a134..54f442cb 100644 --- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/StatisticalPanelMapper.java +++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/StatisticalPanelMapper.java @@ -23,6 +23,20 @@ public interface StatisticalPanelMapper { * @param statisticsIndicatorPart * @return */ - Integer statisticalPanelOwerDept(StatisticsIndicatorPart statisticsIndicatorPart); + Integer statisticalPanelOneselfDeptUser(StatisticsIndicatorPart statisticsIndicatorPart); + + /** + * 查询检查计划总数量 + * @param statisticsIndicatorPart + * @return + */ + Integer statisticalPanelProgramTotal(StatisticsIndicatorPart statisticsIndicatorPart); + + /** + * 查询本单位检查计划数量 + * @param statisticsIndicatorPart + * @return + */ + Integer statisticalPanelProgramWithDept(StatisticsIndicatorPart statisticsIndicatorPart); } diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/statisticalPanelServiceImpl.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/statisticalPanelServiceImpl.java new file mode 100644 index 00000000..496af62f --- /dev/null +++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/statisticalPanelServiceImpl.java @@ -0,0 +1,74 @@ +package com.zdxt.code.service.impl; + +import com.zdxt.auth.dto.DeptBean; +import com.zdxt.auth.dto.UserBean; +import com.zdxt.auth.feign.DeptApi; +import com.zdxt.auth.feign.UserApi; +import com.zdxt.auth.project.system.dict.service.IDictDataService; +import com.zdxt.auth.project.system.user.service.IUserService; +import com.zdxt.code.domain.StatisticsIndicatorPart; +import com.zdxt.code.domain.Zfryjdm2405301; +import com.zdxt.code.mapper.StatisticalPanelMapper; +import com.zdxt.code.service.IZfryjdm2405301Service; +import com.zdxt.code.service.statisticalPanelService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.time.YearMonth; + +@Service +public class statisticalPanelServiceImpl implements statisticalPanelService { + + @Autowired + private StatisticalPanelMapper statisticalPanelMapper; + + @Autowired + private UserApi userApi; + @Autowired + private DeptApi deptApi; + + @Autowired + private IDictDataService dictDataService; + + @Autowired + private IUserService userService; + @Autowired + private IZfryjdm2405301Service iZfryjdm2405301Service; + + @Override + public void statisticalPanelDeptAndUser(StatisticsIndicatorPart statisticsIndicatorPart) { + //统计执法部门数量 + Integer deptTotal = statisticalPanelMapper.statisticalPanelDept(statisticsIndicatorPart); + //执法人员数量 + Integer userTotal = statisticalPanelMapper.statisticalPanelUser(statisticsIndicatorPart); + + UserBean user = userApi.getCurrentUser(); + //查询双系统执法人员信息 + Zfryjdm2405301 zfryjdm2405301 = + iZfryjdm2405301Service.selectZfryByZfCode(user.getLawCertificateNum()); + //通过机构代码查询执法主体信息 + statisticsIndicatorPart.setCreditCode(zfryjdm2405301.getZzjgdm()); + //本单位执法人员数量 + Integer oneselfUserTotal = statisticalPanelMapper.statisticalPanelOneselfDeptUser(statisticsIndicatorPart); + + //默认今年 同比 对比上一年 上一个季度 上一个月 + //TODO 没有选择 + + } + + public static YearMonth getPreviousQuarter(int year, int quarter) { + if (quarter == 1) { + return YearMonth.of(year - 1, 4); + } else { + return YearMonth.of(year, getFirstMonthOfQuarter(quarter - 1)); + } + } + + private static int getFirstMonthOfQuarter(int quarter) { + return 3 * (quarter - 1) + 1; + } + + public static void main(String[] args) { + System.out.println(getPreviousQuarter(2024, 4)); + } +} diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/statisticalPanelService.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/statisticalPanelService.java new file mode 100644 index 00000000..ad628bcb --- /dev/null +++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/statisticalPanelService.java @@ -0,0 +1,8 @@ +package com.zdxt.code.service; + +import com.zdxt.code.domain.StatisticsIndicatorPart; + +public interface statisticalPanelService { + + void statisticalPanelDeptAndUser(StatisticsIndicatorPart statisticsIndicatorPart); +} diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/StatisticalPanelMapper.xml b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/StatisticalPanelMapper.xml index bddb4093..b8f03547 100644 --- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/StatisticalPanelMapper.xml +++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/StatisticalPanelMapper.xml @@ -19,5 +19,44 @@ select count(id) from ZFRYJDM2405301 where CODE_STATE = '01' + + + + + + + \ No newline at end of file