From 4d2afc775d59b4d67bc14e12d93e6c5df7653154 Mon Sep 17 00:00:00 2001 From: TS-QD1 Date: Tue, 4 Apr 2023 18:50:48 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BD=91=E6=A0=BC=E5=91=98=EF=BC=8C=E4=B8=93?= =?UTF-8?q?=E7=AE=A1=E5=91=98=E7=AD=BE=E5=88=B0=E3=80=81=E7=AD=BE=E9=80=80?= =?UTF-8?q?=E3=80=81=E6=A1=88=E4=BB=B6=E4=B8=8B=E9=92=BB=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/cm/bigdata/config/db/Db1Config.java | 18 +- .../com/cm/bigdata/config/db/Db2Config.java | 16 +- .../controller/apis/kpi/KpiController.java | 89 +++++- .../dao2/kpi/IBasePopulationInfoDao.java | 3 + .../cm/bigdata/dao2/kpi/IReportCaseDao.java | 4 + .../com/cm/bigdata/dao2/kpi/IUserGridDao.java | 16 ++ .../com/cm/bigdata/dao2/kpi/IUserSignDao.java | 6 + .../pojo/dtos/kpi/BasePopulationInfoDTO.java | 68 +++++ .../kpi/CommunityBossCaseDayCountDTO.java | 9 + .../bigdata/pojo/dtos/kpi/ReportCaseDTO.java | 248 +++++++++++++++++ .../pojo/dtos/kpi/UserLocationDTO.java | 77 ++++++ .../bigdata/pojo/dtos/kpi/UserSigninDTO.java | 87 ++++++ .../bigdata/pojo/dtos/kpi/UserSignoutDTO.java | 86 ++++++ .../com/cm/bigdata/pojo/pos/kpi/CasePO.java | 54 ++++ .../cm/bigdata/pojo/pos/kpi/ReportCasePO.java | 18 ++ .../cm/bigdata/pojo/vos/kpi/CaseListPage.java | 70 +++++ .../kpi/IBasePopulationInfoService.java | 8 +- .../service/kpi/IReportCaseService.java | 4 + .../bigdata/service/kpi/IUserGridService.java | 9 + .../bigdata/service/kpi/IUserSignService.java | 8 + .../impl/BasePopulationInfoServiceImpl.java | 31 ++- .../service/kpi/impl/KpiServiceImpl.java | 35 ++- .../kpi/impl/ReportCaseServiceImpl.java | 22 ++ .../service/kpi/impl/UserGridServiceImpl.java | 33 +++ .../service/kpi/impl/UserSignService.java | 35 --- .../service/kpi/impl/UserSignServiceImpl.java | 67 +++++ .../db2-mapper/kpi/base-population-mapper.xml | 51 +++- .../db2-mapper/kpi/report-case-mapper.xml | 110 +++++++- .../db2-mapper/kpi/user-grid-mapper.xml | 54 ++++ .../db2-mapper/kpi/user-sign-mapper.xml | 113 ++++++++ .../mybatis/mapper/kpi/kpi-mapper.xml | 53 +++- .../route/kpi/community-boss-day-count.html | 100 ++++++- .../route/kpi/detail/map/user-sign-map.html | 93 +++++++ .../static/route/kpi/detail/user-case.html | 253 ++++++++++++++++++ .../kpi/detail/user-population-save.html | 117 ++++++++ .../kpi/detail/user-population-update.html | 117 ++++++++ .../static/route/kpi/detail/user-signin.html | 145 ++++++++++ .../static/route/kpi/detail/user-signout.html | 145 ++++++++++ .../static/route/kpi/n-person-day-count.html | 80 +++++- 39 files changed, 2455 insertions(+), 97 deletions(-) create mode 100644 src/main/java/com/cm/bigdata/dao2/kpi/IUserGridDao.java create mode 100644 src/main/java/com/cm/bigdata/pojo/dtos/kpi/BasePopulationInfoDTO.java create mode 100644 src/main/java/com/cm/bigdata/pojo/dtos/kpi/ReportCaseDTO.java create mode 100644 src/main/java/com/cm/bigdata/pojo/dtos/kpi/UserLocationDTO.java create mode 100644 src/main/java/com/cm/bigdata/pojo/dtos/kpi/UserSigninDTO.java create mode 100644 src/main/java/com/cm/bigdata/pojo/dtos/kpi/UserSignoutDTO.java create mode 100644 src/main/java/com/cm/bigdata/pojo/vos/kpi/CaseListPage.java create mode 100644 src/main/java/com/cm/bigdata/service/kpi/IUserGridService.java create mode 100644 src/main/java/com/cm/bigdata/service/kpi/impl/UserGridServiceImpl.java delete mode 100644 src/main/java/com/cm/bigdata/service/kpi/impl/UserSignService.java create mode 100644 src/main/java/com/cm/bigdata/service/kpi/impl/UserSignServiceImpl.java create mode 100644 src/main/resources/mybatis/db2-mapper/kpi/user-grid-mapper.xml create mode 100644 src/main/resources/static/route/kpi/detail/map/user-sign-map.html create mode 100644 src/main/resources/static/route/kpi/detail/user-case.html create mode 100644 src/main/resources/static/route/kpi/detail/user-population-save.html create mode 100644 src/main/resources/static/route/kpi/detail/user-population-update.html create mode 100644 src/main/resources/static/route/kpi/detail/user-signin.html create mode 100644 src/main/resources/static/route/kpi/detail/user-signout.html diff --git a/src/main/java/com/cm/bigdata/config/db/Db1Config.java b/src/main/java/com/cm/bigdata/config/db/Db1Config.java index 66bb886..2651f84 100644 --- a/src/main/java/com/cm/bigdata/config/db/Db1Config.java +++ b/src/main/java/com/cm/bigdata/config/db/Db1Config.java @@ -3,7 +3,11 @@ package com.cm.bigdata.config.db; import com.alibaba.druid.pool.DruidDataSource; import com.cm.bigdata.config.properties.db.Db1Properties; import com.cm.bigdata.config.properties.db.DbCommonProperties; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInterceptor; +import org.apache.ibatis.plugin.Interceptor; import org.apache.ibatis.session.SqlSessionFactory; +import org.apache.poi.ss.formula.functions.Intercept; import org.mybatis.spring.SqlSessionFactoryBean; import org.mybatis.spring.SqlSessionTemplate; import org.mybatis.spring.annotation.MapperScan; @@ -17,6 +21,7 @@ import org.springframework.jdbc.datasource.DataSourceTransactionManager; import javax.sql.DataSource; import java.sql.SQLException; +import java.util.Properties; @Configuration @MapperScan(basePackages = {"com.cm.**.dao"}, sqlSessionFactoryRef = "db1SqlSessionFactory") @@ -71,16 +76,27 @@ public class Db1Config { return new DataSourceTransactionManager(db1DataSource()); } + public Interceptor pageHelper() { + Interceptor pageHelper = new PageInterceptor(); + Properties p = new Properties(); + p.setProperty("offsetAsPageNum", "true"); + p.setProperty("rowBoundsWithCount", "true"); + p.setProperty("reasonable", "true"); + pageHelper.setProperties(p); + return pageHelper; + } + @Bean(name = "db1SqlSessionFactory") public SqlSessionFactory db1SqlSessionFactory(@Qualifier("db1DataSource") DataSource dataSource) throws Exception { final SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean(); sessionFactory.setDataSource(dataSource); // 设置数据源bean + sessionFactory.setPlugins(new Interceptor[]{pageHelper()}); sessionFactory.setMapperLocations(new PathMatchingResourcePatternResolver().getResources(db1Properties.getMapperLocations())); // 设置mapper文件路径 return sessionFactory.getObject(); } @Bean("db1SqlSessionTemplate") - public SqlSessionTemplate db1SqlSessionTemplate(@Qualifier("db1SqlSessionFactory") SqlSessionFactory sqlSessionFactory){ + public SqlSessionTemplate db1SqlSessionTemplate(@Qualifier("db1SqlSessionFactory") SqlSessionFactory sqlSessionFactory) { return new SqlSessionTemplate(sqlSessionFactory); } diff --git a/src/main/java/com/cm/bigdata/config/db/Db2Config.java b/src/main/java/com/cm/bigdata/config/db/Db2Config.java index 52713c4..ec4f820 100644 --- a/src/main/java/com/cm/bigdata/config/db/Db2Config.java +++ b/src/main/java/com/cm/bigdata/config/db/Db2Config.java @@ -3,6 +3,8 @@ package com.cm.bigdata.config.db; import com.alibaba.druid.pool.DruidDataSource; import com.cm.bigdata.config.properties.db.Db2Properties; import com.cm.bigdata.config.properties.db.DbCommonProperties; +import com.github.pagehelper.PageInterceptor; +import org.apache.ibatis.plugin.Interceptor; import org.apache.ibatis.session.SqlSessionFactory; import org.mybatis.spring.SqlSessionFactoryBean; import org.mybatis.spring.SqlSessionTemplate; @@ -18,6 +20,7 @@ import org.springframework.jdbc.datasource.DataSourceTransactionManager; import javax.sql.DataSource; import java.sql.SQLException; +import java.util.Properties; @Configuration @MapperScan(basePackages = {"com.cm.**.dao2"}, sqlSessionFactoryRef = "db2SqlSessionFactory") @@ -71,16 +74,27 @@ public class Db2Config { return new DataSourceTransactionManager(db2DataSource()); } + public Interceptor pageHelper() { + Interceptor pageHelper = new PageInterceptor(); + Properties p = new Properties(); + p.setProperty("offsetAsPageNum", "true"); + p.setProperty("rowBoundsWithCount", "true"); + p.setProperty("reasonable", "true"); + pageHelper.setProperties(p); + return pageHelper; + } + @Bean(name = "db2SqlSessionFactory") public SqlSessionFactory db2SqlSessionFactory(@Qualifier("db2DataSource") DataSource dataSource) throws Exception { final SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean(); sessionFactory.setDataSource(dataSource); // 设置数据源bean + sessionFactory.setPlugins(new Interceptor[]{pageHelper()}); sessionFactory.setMapperLocations(new PathMatchingResourcePatternResolver().getResources(db2Properties.getMapperLocations())); // 设置mapper文件路径 return sessionFactory.getObject(); } @Bean("db2SqlSessionTemplate") - public SqlSessionTemplate db2SqlSessionTemplate(@Qualifier("db2SqlSessionFactory") SqlSessionFactory sqlSessionFactory){ + public SqlSessionTemplate db2SqlSessionTemplate(@Qualifier("db2SqlSessionFactory") SqlSessionFactory sqlSessionFactory) { return new SqlSessionTemplate(sqlSessionFactory); } diff --git a/src/main/java/com/cm/bigdata/controller/apis/kpi/KpiController.java b/src/main/java/com/cm/bigdata/controller/apis/kpi/KpiController.java index 784411b..cd0f67f 100644 --- a/src/main/java/com/cm/bigdata/controller/apis/kpi/KpiController.java +++ b/src/main/java/com/cm/bigdata/controller/apis/kpi/KpiController.java @@ -1,18 +1,21 @@ package com.cm.bigdata.controller.apis.kpi; +import com.cm.bigdata.pojo.dtos.grid.GridDTO; import com.cm.bigdata.pojo.dtos.kpi.*; -import com.cm.bigdata.service.kpi.ICommunityService; -import com.cm.bigdata.service.kpi.IDepartmentService; -import com.cm.bigdata.service.kpi.IDictService; -import com.cm.bigdata.service.kpi.IKpiService; +import com.cm.bigdata.pojo.vos.kpi.CaseListPage; +import com.cm.bigdata.service.kpi.*; import com.cm.common.base.AbstractController; import com.cm.common.constants.ISystemConstant; +import com.cm.common.pojo.ListPage; import com.cm.common.result.SuccessResultData; +import com.cm.common.result.SuccessResultList; import io.swagger.annotations.Api; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; +import java.util.HashMap; import java.util.List; +import java.util.Map; @Api(tags = ISystemConstant.API_TAGS_SYSTEM_PREFIX + "KPI接口") @RestController @@ -27,6 +30,14 @@ public class KpiController extends AbstractController { private ICommunityService communityService; @Autowired private IDepartmentService departmentService; + @Autowired + private IUserSignService userSignService; + @Autowired + private IUserGridService userGridService; + @Autowired + private IBasePopulationInfoService basePopulationInfoService; + @Autowired + private IReportCaseService reportCaseService; @GetMapping("update-community-boss-day-count/{level}") public SuccessResultData updateCommunityBossDayCount(@PathVariable("level") Integer level, @@ -87,25 +98,79 @@ public class KpiController extends AbstractController { @GetMapping("list-n-person-count") public List listNPersonCaseCount(@RequestParam(name = "departmentId", required = false) String departmentId, - @RequestParam(name = "startTime", required = false) String startTime, - @RequestParam(name = "endTime", required = false) String endTime) { + @RequestParam(name = "startTime", required = false) String startTime, + @RequestParam(name = "endTime", required = false) String endTime) { return kpiService.listNPersonCaseCount(departmentId, startTime, endTime); } @GetMapping("list-community-boss-case-day-count") public List listCommunityBossCaseDayCount(@RequestParam(name = "areaId", required = false) String areaId, - @RequestParam(name = "communityId", required = false) String communityId, - @RequestParam(name = "startTime", required = false) String startTime, - @RequestParam(name = "endTime", required = false) String endTime, - @RequestParam(name = "communityBossLevel") Integer communityBossLevel) { + @RequestParam(name = "communityId", required = false) String communityId, + @RequestParam(name = "startTime", required = false) String startTime, + @RequestParam(name = "endTime", required = false) String endTime, + @RequestParam(name = "communityBossLevel") Integer communityBossLevel) { return kpiService.listCommunityBossCaseDayCount(areaId, communityId, startTime, endTime, communityBossLevel); } @GetMapping("list-n-person-day-count") public List listNPersonCaseDayCount(@RequestParam(name = "departmentId", required = false) String departmentId, - @RequestParam(name = "startTime", required = false) String startTime, - @RequestParam(name = "endTime", required = false) String endTime) { + @RequestParam(name = "startTime", required = false) String startTime, + @RequestParam(name = "endTime", required = false) String endTime) { return kpiService.listNPersonCaseDayCount(departmentId, startTime, endTime); } + @GetMapping("listpage-user-signin/user-id/{userId}") + public SuccessResultList> listUserSignin(@PathVariable("userId") String userId, + @RequestParam(name = "startTime", required = false) String startTime, + @RequestParam(name = "endTime", required = false) String endTime, + @RequestParam(name = "isLate", required = false) Integer isLate, + ListPage page) { + Map params = requestParams(); + page.setParams(params); + return userSignService.listInByUserIdAndStartTimeAndEndTimeAndIsLate(userId, startTime, endTime, isLate, page); + } + + @GetMapping("listpage-user-signout/user-id/{userId}") + public SuccessResultList> listUserSignout(@PathVariable("userId") String userId, + @RequestParam(name = "startTime", required = false) String startTime, + @RequestParam(name = "endTime", required = false) String endTime, + @RequestParam(name = "isEarly", required = false) Integer isEarly, + ListPage page) { + Map params = requestParams(); + page.setParams(params); + return userSignService.listOutByUserIdAndStartTimeAndEndTimeAndIsEarly(userId, startTime, endTime, isEarly, page); + } + + @GetMapping("list-user-grid/user-id/{userId}") + public List listUserGrid(@PathVariable("userId") String userId) { + return userGridService.listUserGrid(userId); + } + + @GetMapping("listpage-population-save/user-id/{userId}") + public SuccessResultList> listPopulationSave(@PathVariable("userId") String userId, + @RequestParam(name = "startTime", required = false) String startTime, + @RequestParam(name = "endTime", required = false) String endTime, + ListPage page) { + Map params = requestParams(); + page.setParams(params); + return basePopulationInfoService.listPagePopulationSaveByUserIdAndStartTimeAndEndTime(userId, startTime, endTime, page); + } + + @GetMapping("listpage-population-update/user-id/{userId}") + public SuccessResultList> listPagePopulationUpdate(@PathVariable("userId") String userId, + @RequestParam(name = "startTime", required = false) String startTime, + @RequestParam(name = "endTime", required = false) String endTime, + ListPage page) { + Map params = requestParams(); + page.setParams(params); + return basePopulationInfoService.listPagePopulationUpdateByUserIdAndStartTimeAndEndTime(userId, startTime, endTime, page); + } + + @GetMapping("listpage-case") + public SuccessResultList> listPageCase(CaseListPage caseListPage) { + Map params = new HashMap<>(); + caseListPage.setParams(params); + return reportCaseService.listPage(caseListPage); + } + } diff --git a/src/main/java/com/cm/bigdata/dao2/kpi/IBasePopulationInfoDao.java b/src/main/java/com/cm/bigdata/dao2/kpi/IBasePopulationInfoDao.java index 24e90fd..e1395e3 100644 --- a/src/main/java/com/cm/bigdata/dao2/kpi/IBasePopulationInfoDao.java +++ b/src/main/java/com/cm/bigdata/dao2/kpi/IBasePopulationInfoDao.java @@ -1,5 +1,6 @@ package com.cm.bigdata.dao2.kpi; +import com.cm.bigdata.pojo.dtos.kpi.BasePopulationInfoDTO; import com.cm.bigdata.pojo.pos.kpi.BasePopulationInfoCountPO; import org.springframework.stereotype.Repository; @@ -13,4 +14,6 @@ public interface IBasePopulationInfoDao { List listPopulationUpdateCount(Map params); + List list(Map params); + } diff --git a/src/main/java/com/cm/bigdata/dao2/kpi/IReportCaseDao.java b/src/main/java/com/cm/bigdata/dao2/kpi/IReportCaseDao.java index 889a6f8..8b00c85 100644 --- a/src/main/java/com/cm/bigdata/dao2/kpi/IReportCaseDao.java +++ b/src/main/java/com/cm/bigdata/dao2/kpi/IReportCaseDao.java @@ -1,5 +1,6 @@ package com.cm.bigdata.dao2.kpi; +import com.cm.bigdata.pojo.dtos.kpi.ReportCaseDTO; import com.cm.bigdata.pojo.pos.kpi.*; import org.springframework.stereotype.Repository; @@ -17,4 +18,7 @@ public interface IReportCaseDao { List listHandlePO(Map params); List listInspectPO(Map params); + + List list(Map params); + } diff --git a/src/main/java/com/cm/bigdata/dao2/kpi/IUserGridDao.java b/src/main/java/com/cm/bigdata/dao2/kpi/IUserGridDao.java new file mode 100644 index 0000000..8444578 --- /dev/null +++ b/src/main/java/com/cm/bigdata/dao2/kpi/IUserGridDao.java @@ -0,0 +1,16 @@ +package com.cm.bigdata.dao2.kpi; + +import com.cm.bigdata.pojo.dtos.grid.GridDTO; +import com.cm.bigdata.pojo.dtos.grid.GridPointDTO; +import org.springframework.stereotype.Repository; + +import java.util.List; +import java.util.Map; + +@Repository +public interface IUserGridDao { + List list(Map params); + + List listPoint(Map params); + +} diff --git a/src/main/java/com/cm/bigdata/dao2/kpi/IUserSignDao.java b/src/main/java/com/cm/bigdata/dao2/kpi/IUserSignDao.java index 75ababd..b7a8c7f 100644 --- a/src/main/java/com/cm/bigdata/dao2/kpi/IUserSignDao.java +++ b/src/main/java/com/cm/bigdata/dao2/kpi/IUserSignDao.java @@ -1,5 +1,7 @@ package com.cm.bigdata.dao2.kpi; +import com.cm.bigdata.pojo.dtos.kpi.UserSigninDTO; +import com.cm.bigdata.pojo.dtos.kpi.UserSignoutDTO; import com.cm.bigdata.pojo.pos.kpi.UserSigninPO; import com.cm.bigdata.pojo.pos.kpi.UserSignoutPO; import org.springframework.stereotype.Repository; @@ -14,4 +16,8 @@ public interface IUserSignDao { List listOutPO(Map params); + List listInDTO(Map params); + + List listOutDTO(Map params); + } diff --git a/src/main/java/com/cm/bigdata/pojo/dtos/kpi/BasePopulationInfoDTO.java b/src/main/java/com/cm/bigdata/pojo/dtos/kpi/BasePopulationInfoDTO.java new file mode 100644 index 0000000..ed25ef3 --- /dev/null +++ b/src/main/java/com/cm/bigdata/pojo/dtos/kpi/BasePopulationInfoDTO.java @@ -0,0 +1,68 @@ +package com.cm.bigdata.pojo.dtos.kpi; + +public class BasePopulationInfoDTO { + + private String basePopulationInfoId; + private String idCardNumber; + private String fullName; + private String gender; + private String birthDate; + private String gmtCreate; + private String gmtModified; + + public String getBasePopulationInfoId() { + return basePopulationInfoId; + } + + public void setBasePopulationInfoId(String basePopulationInfoId) { + this.basePopulationInfoId = basePopulationInfoId; + } + + public String getIdCardNumber() { + return idCardNumber; + } + + public void setIdCardNumber(String idCardNumber) { + this.idCardNumber = idCardNumber; + } + + public String getFullName() { + return fullName; + } + + public void setFullName(String fullName) { + this.fullName = fullName; + } + + public String getGender() { + return gender; + } + + public void setGender(String gender) { + this.gender = gender; + } + + public String getBirthDate() { + return birthDate; + } + + public void setBirthDate(String birthDate) { + this.birthDate = birthDate; + } + + public String getGmtCreate() { + return gmtCreate; + } + + public void setGmtCreate(String gmtCreate) { + this.gmtCreate = gmtCreate; + } + + public String getGmtModified() { + return gmtModified; + } + + public void setGmtModified(String gmtModified) { + this.gmtModified = gmtModified; + } +} diff --git a/src/main/java/com/cm/bigdata/pojo/dtos/kpi/CommunityBossCaseDayCountDTO.java b/src/main/java/com/cm/bigdata/pojo/dtos/kpi/CommunityBossCaseDayCountDTO.java index 4cda036..fd27fcb 100644 --- a/src/main/java/com/cm/bigdata/pojo/dtos/kpi/CommunityBossCaseDayCountDTO.java +++ b/src/main/java/com/cm/bigdata/pojo/dtos/kpi/CommunityBossCaseDayCountDTO.java @@ -6,6 +6,7 @@ public class CommunityBossCaseDayCountDTO implements Comparable listPopulationUpdateCountByUserIdsAndDay(List userIds, String date); + SuccessResultList> listPagePopulationSaveByUserIdAndStartTimeAndEndTime(String userId, String startTime, String endTime, ListPage page); + + SuccessResultList> listPagePopulationUpdateByUserIdAndStartTimeAndEndTime(String userId, String startTime, String endTime, ListPage page); + } diff --git a/src/main/java/com/cm/bigdata/service/kpi/IReportCaseService.java b/src/main/java/com/cm/bigdata/service/kpi/IReportCaseService.java index f1aaffe..75e62fe 100644 --- a/src/main/java/com/cm/bigdata/service/kpi/IReportCaseService.java +++ b/src/main/java/com/cm/bigdata/service/kpi/IReportCaseService.java @@ -1,6 +1,9 @@ package com.cm.bigdata.service.kpi; +import com.cm.bigdata.pojo.dtos.kpi.ReportCaseDTO; import com.cm.bigdata.pojo.pos.kpi.*; +import com.cm.bigdata.pojo.vos.kpi.CaseListPage; +import com.cm.common.result.SuccessResultList; import java.util.List; import java.util.Map; @@ -16,4 +19,5 @@ public interface IReportCaseService { List listInspectPO(Map params); + SuccessResultList> listPage(CaseListPage caseListPage); } diff --git a/src/main/java/com/cm/bigdata/service/kpi/IUserGridService.java b/src/main/java/com/cm/bigdata/service/kpi/IUserGridService.java new file mode 100644 index 0000000..e18e52d --- /dev/null +++ b/src/main/java/com/cm/bigdata/service/kpi/IUserGridService.java @@ -0,0 +1,9 @@ +package com.cm.bigdata.service.kpi; + +import com.cm.bigdata.pojo.dtos.grid.GridDTO; + +import java.util.List; + +public interface IUserGridService { + List listUserGrid(String userId); +} diff --git a/src/main/java/com/cm/bigdata/service/kpi/IUserSignService.java b/src/main/java/com/cm/bigdata/service/kpi/IUserSignService.java index 4f8e70c..70099ef 100644 --- a/src/main/java/com/cm/bigdata/service/kpi/IUserSignService.java +++ b/src/main/java/com/cm/bigdata/service/kpi/IUserSignService.java @@ -1,7 +1,11 @@ package com.cm.bigdata.service.kpi; +import com.cm.bigdata.pojo.dtos.kpi.UserSigninDTO; +import com.cm.bigdata.pojo.dtos.kpi.UserSignoutDTO; import com.cm.bigdata.pojo.pos.kpi.UserSigninPO; import com.cm.bigdata.pojo.pos.kpi.UserSignoutPO; +import com.cm.common.pojo.ListPage; +import com.cm.common.result.SuccessResultList; import java.util.List; @@ -9,4 +13,8 @@ public interface IUserSignService { List listInPOByUserIdsAndDay(List userIds, String day); List listOutPOByUserIdsAndDay(List userIds, String day); + + SuccessResultList> listInByUserIdAndStartTimeAndEndTimeAndIsLate(String userId, String startTime, String endTime, Integer isLate, ListPage page); + + SuccessResultList> listOutByUserIdAndStartTimeAndEndTimeAndIsEarly(String userId, String startTime, String endTime, Integer isEarly, ListPage page); } diff --git a/src/main/java/com/cm/bigdata/service/kpi/impl/BasePopulationInfoServiceImpl.java b/src/main/java/com/cm/bigdata/service/kpi/impl/BasePopulationInfoServiceImpl.java index f6b1f77..5e3e254 100644 --- a/src/main/java/com/cm/bigdata/service/kpi/impl/BasePopulationInfoServiceImpl.java +++ b/src/main/java/com/cm/bigdata/service/kpi/impl/BasePopulationInfoServiceImpl.java @@ -1,9 +1,14 @@ package com.cm.bigdata.service.kpi.impl; import com.cm.bigdata.dao2.kpi.IBasePopulationInfoDao; +import com.cm.bigdata.pojo.dtos.kpi.BasePopulationInfoDTO; import com.cm.bigdata.pojo.pos.kpi.BasePopulationInfoCountPO; -import com.cm.bigdata.pojo.pos.kpi.BasePopulationInfoPO; import com.cm.bigdata.service.kpi.IBasePopulationInfoService; +import com.cm.common.plugin.pojo.dtos.dynamic.config.form.DynamicConfigFormDTO; +import com.cm.common.pojo.ListPage; +import com.cm.common.result.SuccessResultList; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -39,4 +44,28 @@ public class BasePopulationInfoServiceImpl implements IBasePopulationInfoService params.put("userIds", userIds); return basePopulationInfoDao.listPopulationUpdateCount(params); } + + @Override + public SuccessResultList> listPagePopulationSaveByUserIdAndStartTimeAndEndTime(String userId, String startTime, String endTime, ListPage page) { + Map params = page.getParams(); + params.put("creator", userId); + params.put("createStartTime", startTime); + params.put("createEndTime", endTime); + PageHelper.startPage(page.getPage(), page.getRows()); + List basePopulationInfoDTOS = basePopulationInfoDao.list(params); + PageInfo pageInfo = new PageInfo<>(basePopulationInfoDTOS); + return new SuccessResultList<>(basePopulationInfoDTOS, pageInfo.getPageNum(), pageInfo.getTotal()); + } + + @Override + public SuccessResultList> listPagePopulationUpdateByUserIdAndStartTimeAndEndTime(String userId, String startTime, String endTime, ListPage page) { + Map params = page.getParams(); + params.put("modifier", userId); + params.put("modifiedStartTime", startTime); + params.put("modifiedEndTime", endTime); + PageHelper.startPage(page.getPage(), page.getRows()); + List basePopulationInfoDTOS = basePopulationInfoDao.list(params); + PageInfo pageInfo = new PageInfo<>(basePopulationInfoDTOS); + return new SuccessResultList<>(basePopulationInfoDTOS, pageInfo.getPageNum(), pageInfo.getTotal()); + } } diff --git a/src/main/java/com/cm/bigdata/service/kpi/impl/KpiServiceImpl.java b/src/main/java/com/cm/bigdata/service/kpi/impl/KpiServiceImpl.java index 5f082a4..fcb8618 100644 --- a/src/main/java/com/cm/bigdata/service/kpi/impl/KpiServiceImpl.java +++ b/src/main/java/com/cm/bigdata/service/kpi/impl/KpiServiceImpl.java @@ -148,6 +148,24 @@ public class KpiServiceImpl implements IKpiService { params.put("reportUserId", reportCasePO.getCreator()); params.put("inspectScore", reportCasePO.getGrade()); params.put("isDelete", reportCasePO.getIsDelete()); + params.put("caseStatus", reportCasePO.getCaseStatus()); + params.put("caseSource", reportCasePO.getCaseSource()); + params.put("isAccept", 0); + params.put("isAssign", 0); + params.put("isHandle", 0); + params.put("isInspect", 0); + if (reportCasePO.getCaseStatus() > 0) { + params.put("isAccept", 1); + } + if (reportCasePO.getCaseStatus() > 2) { + params.put("isAssign", 1); + } + if (reportCasePO.getCaseStatus() > 3) { + params.put("isHandle", 1); + } + if (reportCasePO.getCaseStatus() > 4) { + params.put("isInspect", 1); + } if (reportCasePO.getIsDelete() == 1) { params.put("gmtDelete", reportCasePO.getGmtModified()); params.put("deleteUserId", reportCasePO.getModifier()); @@ -231,13 +249,13 @@ public class KpiServiceImpl implements IKpiService { // 总数 Integer total = countCase(queryParams); // 已受理 - queryParams.put("gmtAccept", "isNotNull"); + queryParams.put("isAccept", 1); Integer acceptTotal = countCase(queryParams); // 已处理 - queryParams.put("gmtHandle", "isNotNull"); + queryParams.put("isHandle", 1); Integer handleTotal = countCase(queryParams); // 已检查 - queryParams.put("gmtInspect", "isNotNull"); + queryParams.put("isInspect", 1); Integer inspectTotal = countCase(queryParams); // 已归档和检查一致 communityCaseCountDTO.setCaseTotal(total); @@ -312,8 +330,9 @@ public class KpiServiceImpl implements IKpiService { params.put("areaId", areaId); params.put("communityId", communityId); params.put("communityBossLevel", communityBossLevel); - return communityBossService.list(params).stream().map(communityBossDTO -> { + return Collections.synchronizedCollection(communityBossService.list(params)).parallelStream().map(communityBossDTO -> { CommunityBossCaseDayCountDTO communityBossCaseCountDTO = new CommunityBossCaseDayCountDTO(); + communityBossCaseCountDTO.setUserId(communityBossDTO.getCommunityBossUserId()); BeanUtils.copyProperties(communityBossDTO, communityBossCaseCountDTO); Map queryParams = new HashMap<>(); queryParams.put("userId", communityBossDTO.getCommunityBossUserId()); @@ -350,12 +369,12 @@ public class KpiServiceImpl implements IKpiService { // 总数 Integer total = countCase(queryParams); // 已受理 - queryParams.put("gmtAccept", "isNotNull"); + queryParams.put("isAccept", 1); // 已处理 - queryParams.put("gmtHandle", "isNotNull"); + queryParams.put("isHandle", 1); Integer handleTotal = countCase(queryParams); // 已检查 - queryParams.put("gmtInspect", "isNotNull"); + queryParams.put("isInspect", 1); Integer inspectTotal = countCase(queryParams); // 已归档和检查一致 communityBossCaseCountDTO.setCaseTotal(total); @@ -371,7 +390,7 @@ public class KpiServiceImpl implements IKpiService { Map params = new HashMap<>(); params.put("departmentParentId", "0"); params.put("departmentId", departmentId); - return departmentService.listUserPO(params).stream().map(departmentUserPO -> { + return Collections.synchronizedCollection(departmentService.listUserPO(params)).parallelStream().map(departmentUserPO -> { NPersonCaseDayCountDTO nPersonCaseDayCountDTO = new NPersonCaseDayCountDTO(); BeanUtils.copyProperties(departmentUserPO, nPersonCaseDayCountDTO); Map queryParams = new HashMap<>(); diff --git a/src/main/java/com/cm/bigdata/service/kpi/impl/ReportCaseServiceImpl.java b/src/main/java/com/cm/bigdata/service/kpi/impl/ReportCaseServiceImpl.java index 65fa0ba..6f05734 100644 --- a/src/main/java/com/cm/bigdata/service/kpi/impl/ReportCaseServiceImpl.java +++ b/src/main/java/com/cm/bigdata/service/kpi/impl/ReportCaseServiceImpl.java @@ -1,8 +1,14 @@ package com.cm.bigdata.service.kpi.impl; import com.cm.bigdata.dao2.kpi.IReportCaseDao; +import com.cm.bigdata.pojo.dtos.kpi.ReportCaseDTO; +import com.cm.bigdata.pojo.dtos.kpi.UserSignoutDTO; import com.cm.bigdata.pojo.pos.kpi.*; +import com.cm.bigdata.pojo.vos.kpi.CaseListPage; import com.cm.bigdata.service.kpi.IReportCaseService; +import com.cm.common.result.SuccessResultList; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -45,4 +51,20 @@ public class ReportCaseServiceImpl implements IReportCaseService { params = params == null ? new HashMap<>() : params; return reportCaseDao.listInspectPO(params); } + + @Override + public SuccessResultList> listPage(CaseListPage caseListPage) { + Map params = caseListPage.getParams(); + params.put("userId", caseListPage.getUserId()); + params.put("handleUserId", caseListPage.getHandleUserId()); + params.put("startTime", caseListPage.getStartTime()); + params.put("endTime", caseListPage.getEndTime()); + params.put("isHandle", caseListPage.getIsHandle()); + params.put("isInspect", caseListPage.getIsInspect()); + params.put("isOnfile", caseListPage.getIsOnfile()); + PageHelper.startPage(caseListPage.getPage(), caseListPage.getRows()); + List reportCaseDTOS = reportCaseDao.list(params); + PageInfo pageInfo = new PageInfo<>(reportCaseDTOS); + return new SuccessResultList<>(reportCaseDTOS, pageInfo.getPageNum(), pageInfo.getTotal()); + } } diff --git a/src/main/java/com/cm/bigdata/service/kpi/impl/UserGridServiceImpl.java b/src/main/java/com/cm/bigdata/service/kpi/impl/UserGridServiceImpl.java new file mode 100644 index 0000000..c72f457 --- /dev/null +++ b/src/main/java/com/cm/bigdata/service/kpi/impl/UserGridServiceImpl.java @@ -0,0 +1,33 @@ +package com.cm.bigdata.service.kpi.impl; + +import com.cm.bigdata.dao2.kpi.IUserGridDao; +import com.cm.bigdata.pojo.dtos.grid.GridDTO; +import com.cm.bigdata.pojo.dtos.grid.GridPointDTO; +import com.cm.bigdata.service.kpi.IUserGridService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@Service +public class UserGridServiceImpl implements IUserGridService { + + @Autowired + private IUserGridDao userGridDao; + + @Override + public List listUserGrid(String userId) { + Map params = new HashMap<>(); + params.put("relationId", userId); + List gridDTOS = userGridDao.list(params); + gridDTOS.forEach(gridDTO -> { + Map queryParams = new HashMap<>(); + queryParams.put("gridId", gridDTO.getGridId()); + List gridPointDTOS = userGridDao.listPoint(queryParams); + gridDTO.setPointArray(gridPointDTOS); + }); + return gridDTOS; + } +} diff --git a/src/main/java/com/cm/bigdata/service/kpi/impl/UserSignService.java b/src/main/java/com/cm/bigdata/service/kpi/impl/UserSignService.java deleted file mode 100644 index 8a90997..0000000 --- a/src/main/java/com/cm/bigdata/service/kpi/impl/UserSignService.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.cm.bigdata.service.kpi.impl; - -import com.cm.bigdata.dao2.kpi.IUserSignDao; -import com.cm.bigdata.pojo.pos.kpi.UserSigninPO; -import com.cm.bigdata.pojo.pos.kpi.UserSignoutPO; -import com.cm.bigdata.service.kpi.IUserSignService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -@Service -public class UserSignService implements IUserSignService { - - @Autowired - private IUserSignDao userSignDao; - - @Override - public List listInPOByUserIdsAndDay(List userIds, String day) { - Map params = new HashMap<>(); - params.put("creators", userIds); - params.put("day", day); - return userSignDao.listInPO(params); - } - - @Override - public List listOutPOByUserIdsAndDay(List userIds, String day) { - Map params = new HashMap<>(); - params.put("creators", userIds); - params.put("day", day); - return userSignDao.listOutPO(params); - } -} diff --git a/src/main/java/com/cm/bigdata/service/kpi/impl/UserSignServiceImpl.java b/src/main/java/com/cm/bigdata/service/kpi/impl/UserSignServiceImpl.java new file mode 100644 index 0000000..0daa987 --- /dev/null +++ b/src/main/java/com/cm/bigdata/service/kpi/impl/UserSignServiceImpl.java @@ -0,0 +1,67 @@ +package com.cm.bigdata.service.kpi.impl; + +import com.cm.bigdata.dao2.kpi.IUserSignDao; +import com.cm.bigdata.pojo.dtos.kpi.UserSigninDTO; +import com.cm.bigdata.pojo.dtos.kpi.UserSignoutDTO; +import com.cm.bigdata.pojo.pos.kpi.UserSigninPO; +import com.cm.bigdata.pojo.pos.kpi.UserSignoutPO; +import com.cm.bigdata.service.kpi.IUserSignService; +import com.cm.common.pojo.ListPage; +import com.cm.common.result.SuccessResultList; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@Service +public class UserSignServiceImpl implements IUserSignService { + + @Autowired + private IUserSignDao userSignDao; + + @Override + public List listInPOByUserIdsAndDay(List userIds, String day) { + Map params = new HashMap<>(); + params.put("creators", userIds); + params.put("day", day); + return userSignDao.listInPO(params); + } + + @Override + public List listOutPOByUserIdsAndDay(List userIds, String day) { + Map params = new HashMap<>(); + params.put("creators", userIds); + params.put("day", day); + return userSignDao.listOutPO(params); + } + + @Override + public SuccessResultList> listInByUserIdAndStartTimeAndEndTimeAndIsLate(String userId, String startTime, String endTime, Integer isLate, ListPage page) { + Map params = new HashMap<>(); + params.put("creator", userId); + params.put("startTime", startTime); + params.put("endTime", endTime); + params.put("isLate", isLate); + PageHelper.startPage(page.getPage(), page.getRows()); + List userSigninDTOS = userSignDao.listInDTO(params); + PageInfo pageInfo = new PageInfo<>(userSigninDTOS); + return new SuccessResultList<>(userSigninDTOS, pageInfo.getPageNum(), pageInfo.getTotal()); + } + + @Override + public SuccessResultList> listOutByUserIdAndStartTimeAndEndTimeAndIsEarly(String userId, String startTime, String endTime, Integer isEarly, ListPage page) { + Map params = new HashMap<>(); + params.put("creator", userId); + params.put("startTime", startTime); + params.put("endTime", endTime); + params.put("isEarly", isEarly); + PageHelper.startPage(page.getPage(), page.getRows()); + List userSignoutDTOS = userSignDao.listOutDTO(params); + PageInfo pageInfo = new PageInfo<>(userSignoutDTOS); + return new SuccessResultList<>(userSignoutDTOS, pageInfo.getPageNum(), pageInfo.getTotal()); + } +} diff --git a/src/main/resources/mybatis/db2-mapper/kpi/base-population-mapper.xml b/src/main/resources/mybatis/db2-mapper/kpi/base-population-mapper.xml index 49ef323..8a8e7af 100644 --- a/src/main/resources/mybatis/db2-mapper/kpi/base-population-mapper.xml +++ b/src/main/resources/mybatis/db2-mapper/kpi/base-population-mapper.xml @@ -2,7 +2,7 @@ - + @@ -35,6 +35,16 @@ + + + + + + + + + + @@ -86,5 +96,44 @@ modifier + + \ No newline at end of file diff --git a/src/main/resources/mybatis/db2-mapper/kpi/report-case-mapper.xml b/src/main/resources/mybatis/db2-mapper/kpi/report-case-mapper.xml index 68d414a..b249251 100644 --- a/src/main/resources/mybatis/db2-mapper/kpi/report-case-mapper.xml +++ b/src/main/resources/mybatis/db2-mapper/kpi/report-case-mapper.xml @@ -17,6 +17,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -68,7 +100,9 @@ creator, gmt_modified, modifier, - is_delete + is_delete, + case_status, + case_source FROM city_report_case @@ -119,4 +153,78 @@ city_report_case_inspect + + \ No newline at end of file diff --git a/src/main/resources/mybatis/db2-mapper/kpi/user-grid-mapper.xml b/src/main/resources/mybatis/db2-mapper/kpi/user-grid-mapper.xml new file mode 100644 index 0000000..3ddee7f --- /dev/null +++ b/src/main/resources/mybatis/db2-mapper/kpi/user-grid-mapper.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/db2-mapper/kpi/user-sign-mapper.xml b/src/main/resources/mybatis/db2-mapper/kpi/user-sign-mapper.xml index b909969..b74645d 100644 --- a/src/main/resources/mybatis/db2-mapper/kpi/user-sign-mapper.xml +++ b/src/main/resources/mybatis/db2-mapper/kpi/user-sign-mapper.xml @@ -28,6 +28,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/kpi/kpi-mapper.xml b/src/main/resources/mybatis/mapper/kpi/kpi-mapper.xml index b1e70ae..29551d9 100644 --- a/src/main/resources/mybatis/mapper/kpi/kpi-mapper.xml +++ b/src/main/resources/mybatis/mapper/kpi/kpi-mapper.xml @@ -45,6 +45,12 @@ + + + + + + @@ -131,14 +137,20 @@ community_name, case_type_id, case_type_name, + case_status, + case_source, gmt_report, gmt_accept, + is_accept, gmt_assign, + is_assign, handle_end_time_long, handle_end_time, gmt_handle, + is_handle, is_timeout, gmt_inspect, + is_inspect, is_self, report_user_id, handle_user_id, @@ -157,14 +169,20 @@ #{communityName}, #{caseTypeId}, #{caseTypeName}, + #{caseStatus}, + #{caseSource}, #{gmtReport}, #{gmtAccept}, + #{isAccept}, #{gmtAssign}, + #{isAssign}, #{handleEndTimeLong}, #{handleEndTime}, #{gmtHandle}, + #{isHandle}, #{isTimeout}, #{gmtInspect}, + #{isInspect}, #{isSelf}, #{reportUserId}, #{handleUserId}, @@ -205,7 +223,13 @@ gmt_delete = #{gmtDelete}, delete_user_id = #{deleteUserId}, total_urge = #{totalUrge}, - total_back = #{totalBack} + total_back = #{totalBack}, + case_status = #{caseStatus}, + case_source = #{caseSource}, + is_accept = #{isAccept}, + is_assign = #{isAssign}, + is_handle = #{isHandle}, + is_inspect = #{isInspect} WHERE case_id = #{caseId} @@ -237,7 +261,13 @@ gmt_delete, delete_user_id, total_urge, - total_back + total_back, + case_status, + case_source, + is_accept, + is_assign, + is_handle, + is_inspect FROM kpi_case WHERE @@ -276,6 +306,7 @@ FROM kpi_case + is_delete = 0 AND report_user_id = #{reportUserId} @@ -292,23 +323,17 @@ AND community_id = #{communityId} - - + AND - gmt_accept IS NOT NULL - + is_accept = #{isAccept} - - + AND - gmt_handle IS NOT NULL - + is_handle = #{isHandle} - - + AND - gmt_inspect IS NOT NULL - + is_inspect = #{isInspect} AND diff --git a/src/main/resources/static/route/kpi/community-boss-day-count.html b/src/main/resources/static/route/kpi/community-boss-day-count.html index 6be0d3e..e290124 100644 --- a/src/main/resources/static/route/kpi/community-boss-day-count.html +++ b/src/main/resources/static/route/kpi/community-boss-day-count.html @@ -10,7 +10,9 @@ - +
@@ -156,25 +158,25 @@ {field:'isSigninTotal', width:100, title: '签到次数', align:'center', templet: function(row) { var rowData = row[this.field]; - return rowData + '次'; + return `${rowData}次`; } }, {field:'isSigninLateTotal', width:100, title: '迟到次数', align:'center', templet: function(row) { var rowData = row[this.field]; - return rowData + '次'; + return `${rowData}次`; } }, {field:'isSignoutTotal', width:100, title: '签退次数', align:'center', templet: function(row) { var rowData = row[this.field]; - return rowData + '次'; + return `${rowData}次`; } }, {field:'isSignoutEarlyTotal', width:100, title: '早退次数', align:'center', templet: function(row) { var rowData = row[this.field]; - return rowData + '次'; + return `${rowData}次`; } }, {field:'workDistanceTotal', width:120, title: '移动距离', align:'center', @@ -186,31 +188,31 @@ {field:'savePopulationCountTotal', width:120, title: '新增人口', align:'center', templet: function(row) { var rowData = row[this.field]; - return rowData + '位'; + return `${rowData}位`; } }, {field:'updatePopulationCountTotal', width:120, title: '维护人口', align:'center', templet: function(row) { var rowData = row[this.field]; - return rowData + '位'; + return `${rowData}位`; } }, {field:'caseTotal', width:120, title: '案件总数', align:'center', templet: function(row) { var rowData = row[this.field]; - return rowData + '件'; + return `${rowData}件`; } }, {field:'caseHandleTotal', width:120, title: '已处理案件', align:'center', templet: function(row) { var rowData = row[this.field]; - return rowData + '件'; + return `${rowData}件`; } }, {field:'caseInspectTotal', width:120, title: '已检查案件', align:'center', templet: function(row) { var rowData = row[this.field]; - return rowData + '件'; + return `${rowData}件`; } }, {field:'caseOnfileTotal', width:120, title: '已归档案件', align:'center', @@ -254,6 +256,84 @@ }); } + table.on('tool(dataTable)', function(obj) { + var event = obj.event; + var data = obj.data; + if(event === 'signinEvent') { + top.dialog.open({ + title: `${data.userName} 签到列表`, + url: top.restAjax.path('route/kpi/detail/user-signin.html?userId={userId}&startTime={startTime}&endTime={endTime}', [data.userId, $('#startTime').val(), $('#endTime').val()]), + width: '800px', + height: '80%', + onClose: function() {} + }) + } else if(event === 'signinLateEvent') { + top.dialog.open({ + title: `${data.userName} 迟到列表`, + url: top.restAjax.path('route/kpi/detail/user-signin.html?userId={userId}&isLate=1&startTime={startTime}&endTime={endTime}', [data.userId, $('#startTime').val(), $('#endTime').val()]), + width: '800px', + height: '80%', + onClose: function() {} + }) + } else if(event === 'signoutEvent') { + top.dialog.open({ + title: `${data.userName} 签退列表`, + url: top.restAjax.path('route/kpi/detail/user-signout.html?userId={userId}&startTime={startTime}&endTime={endTime}', [data.userId, $('#startTime').val(), $('#endTime').val()]), + width: '800px', + height: '80%', + onClose: function() {} + }) + } else if(event === 'signoutEarlyEvent') { + top.dialog.open({ + title: `${data.userName} 早退列表`, + url: top.restAjax.path('route/kpi/detail/user-signout.html?userId={userId}&isEarly=1&startTime={startTime}&endTime={endTime}', [data.userId, $('#startTime').val(), $('#endTime').val()]), + width: '800px', + height: '80%', + onClose: function() {} + }) + } else if(event === 'savePopulationEvent') { + top.dialog.open({ + title: `${data.userName} 新增人员列表`, + url: top.restAjax.path('route/kpi/detail/user-population-save.html?userId={userId}&startTime={startTime}&endTime={endTime}', [data.userId, $('#startTime').val(), $('#endTime').val()]), + width: '880px', + height: '80%', + onClose: function() {} + }) + } else if(event === 'updatePopulationEvent') { + top.dialog.open({ + title: `${data.userName} 维护人员列表`, + url: top.restAjax.path('route/kpi/detail/user-population-update.html?userId={userId}&startTime={startTime}&endTime={endTime}', [data.userId, $('#startTime').val(), $('#endTime').val()]), + width: '880px', + height: '80%', + onClose: function() {} + }) + } else if(event === 'caseEvent') { + top.dialog.open({ + title: `${data.userName} 案件总数`, + url: top.restAjax.path('route/kpi/detail/user-case.html?userId={userId}&startTime={startTime}&endTime={endTime}', [data.userId, $('#startTime').val(), $('#endTime').val()]), + width: '80%', + height: '80%', + onClose: function() {} + }) + } else if(event === 'caseHandleEvent') { + top.dialog.open({ + title: `${data.userName} 案件处理总数`, + url: top.restAjax.path('route/kpi/detail/user-case.html?userId={userId}&isHandle=1&startTime={startTime}&endTime={endTime}', [data.userId, $('#startTime').val(), $('#endTime').val()]), + width: '80%', + height: '80%', + onClose: function() {} + }) + } else if(event === 'caseInspectEvent') { + top.dialog.open({ + title: `${data.userName} 案件检查总数`, + url: top.restAjax.path('route/kpi/detail/user-case.html?userId={userId}&isInspect=1&startTime={startTime}&endTime={endTime}', [data.userId, $('#startTime').val(), $('#endTime').val()]), + width: '80%', + height: '80%', + onClose: function() {} + }) + } + }); + $(document).on('click', '#search', function() { if(dataLoading){ layer.msg('数据加载中,请稍等...'); diff --git a/src/main/resources/static/route/kpi/detail/map/user-sign-map.html b/src/main/resources/static/route/kpi/detail/map/user-sign-map.html new file mode 100644 index 0000000..fda7103 --- /dev/null +++ b/src/main/resources/static/route/kpi/detail/map/user-sign-map.html @@ -0,0 +1,93 @@ + + + + + + + + + + + + +
+
+
+ + + + + \ No newline at end of file diff --git a/src/main/resources/static/route/kpi/detail/user-case.html b/src/main/resources/static/route/kpi/detail/user-case.html new file mode 100644 index 0000000..fe212a5 --- /dev/null +++ b/src/main/resources/static/route/kpi/detail/user-case.html @@ -0,0 +1,253 @@ + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + \ No newline at end of file diff --git a/src/main/resources/static/route/kpi/detail/user-population-save.html b/src/main/resources/static/route/kpi/detail/user-population-save.html new file mode 100644 index 0000000..8229433 --- /dev/null +++ b/src/main/resources/static/route/kpi/detail/user-population-save.html @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + +
+
+
+
+
+
+
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/src/main/resources/static/route/kpi/detail/user-population-update.html b/src/main/resources/static/route/kpi/detail/user-population-update.html new file mode 100644 index 0000000..c6f0cb8 --- /dev/null +++ b/src/main/resources/static/route/kpi/detail/user-population-update.html @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + +
+
+
+
+
+
+
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/src/main/resources/static/route/kpi/detail/user-signin.html b/src/main/resources/static/route/kpi/detail/user-signin.html new file mode 100644 index 0000000..3bf7161 --- /dev/null +++ b/src/main/resources/static/route/kpi/detail/user-signin.html @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + +
+
+
+
+
+
+
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/src/main/resources/static/route/kpi/detail/user-signout.html b/src/main/resources/static/route/kpi/detail/user-signout.html new file mode 100644 index 0000000..d734fcc --- /dev/null +++ b/src/main/resources/static/route/kpi/detail/user-signout.html @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + +
+
+
+
+
+
+
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/src/main/resources/static/route/kpi/n-person-day-count.html b/src/main/resources/static/route/kpi/n-person-day-count.html index 4d8c087..fa0ac72 100644 --- a/src/main/resources/static/route/kpi/n-person-day-count.html +++ b/src/main/resources/static/route/kpi/n-person-day-count.html @@ -10,7 +10,9 @@ - +
@@ -109,40 +111,40 @@ {field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '{{d.LAY_INDEX}}'}, {field:'departmentName', width:140, title: '职能部门', fixed: 'left', align:'center'}, {field:'userName', width:120, title: '姓名', fixed: 'left', align:'center'}, - {field:'caseReportTotal', width:160, title: '上报案件总数', align:'center', - templet: function(row) { - var rowData = row[this.field]; - return rowData + '件'; - } - }, {field:'isSigninTotal', width:100, title: '签到次数', align:'center', templet: function(row) { var rowData = row[this.field]; - return rowData + '次'; + return `${rowData}次`; } }, {field:'isSigninLateTotal', width:100, title: '迟到次数', align:'center', templet: function(row) { var rowData = row[this.field]; - return rowData + '次'; + return `${rowData}次`; } }, {field:'isSignoutTotal', width:100, title: '签退次数', align:'center', templet: function(row) { var rowData = row[this.field]; - return rowData + '次'; + return `${rowData}次`; } }, {field:'isSignoutEarlyTotal', width:100, title: '早退次数', align:'center', templet: function(row) { var rowData = row[this.field]; - return rowData + '次'; + return `${rowData}次`; + } + }, + {field:'caseReportTotal', width:160, title: '上报案件总数', align:'center', + templet: function(row) { + var rowData = row[this.field]; + return `${rowData}件`; } }, {field:'caseHandleTotal', width:160, title: '处理案件总数', align:'center', templet: function(row) { var rowData = row[this.field]; - return rowData + '件'; + return `${rowData}件`; } }, ]], @@ -178,6 +180,60 @@ }); } + table.on('tool(dataTable)', function(obj) { + var event = obj.event; + var data = obj.data; + if(event === 'signinEvent') { + top.dialog.open({ + title: `${data.userName} 签到列表`, + url: top.restAjax.path('route/kpi/detail/user-signin.html?userId={userId}&startTime={startTime}&endTime={endTime}', [data.userId, $('#startTime').val(), $('#endTime').val()]), + width: '800px', + height: '80%', + onClose: function() {} + }) + } else if(event === 'signinLateEvent') { + top.dialog.open({ + title: `${data.userName} 迟到列表`, + url: top.restAjax.path('route/kpi/detail/user-signin.html?userId={userId}&isLate=1&startTime={startTime}&endTime={endTime}', [data.userId, $('#startTime').val(), $('#endTime').val()]), + width: '800px', + height: '80%', + onClose: function() {} + }) + } else if(event === 'signoutEvent') { + top.dialog.open({ + title: `${data.userName} 签退列表`, + url: top.restAjax.path('route/kpi/detail/user-signout.html?userId={userId}&startTime={startTime}&endTime={endTime}', [data.userId, $('#startTime').val(), $('#endTime').val()]), + width: '800px', + height: '80%', + onClose: function() {} + }) + } else if(event === 'signoutEarlyEvent') { + top.dialog.open({ + title: `${data.userName} 早退列表`, + url: top.restAjax.path('route/kpi/detail/user-signout.html?userId={userId}&isEarly=1&startTime={startTime}&endTime={endTime}', [data.userId, $('#startTime').val(), $('#endTime').val()]), + width: '800px', + height: '80%', + onClose: function() {} + }) + } else if(event === 'caseEvent') { + top.dialog.open({ + title: `${data.userName} 案件上报总数`, + url: top.restAjax.path('route/kpi/detail/user-case.html?userId={userId}&startTime={startTime}&endTime={endTime}', [data.userId, $('#startTime').val(), $('#endTime').val()]), + width: '80%', + height: '80%', + onClose: function() {} + }) + } else if(event === 'caseHandleEvent') { + top.dialog.open({ + title: `${data.userName} 案件处理总数`, + url: top.restAjax.path('route/kpi/detail/user-case.html?handleUserId={userId}&startTime={startTime}&endTime={endTime}', [data.userId, $('#startTime').val(), $('#endTime').val()]), + width: '80%', + height: '80%', + onClose: function() {} + }) + } + }); + $(document).on('click', '#search', function() { if(dataLoading){ layer.msg('数据加载中,请稍等...');