网格员,专管员签到、签退、案件下钻功能完成

This commit is contained in:
TS-QD1 2023-04-04 18:50:48 +08:00
parent fa27fd7144
commit 4d2afc775d
39 changed files with 2455 additions and 97 deletions

View File

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

View File

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

View File

@ -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<String> updateCommunityBossDayCount(@PathVariable("level") Integer level,
@ -87,25 +98,79 @@ public class KpiController extends AbstractController {
@GetMapping("list-n-person-count")
public List<NPersonCaseCountDTO> 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<CommunityBossCaseDayCountDTO> 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<NPersonCaseDayCountDTO> 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<List<UserSigninDTO>> 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<String, Object> params = requestParams();
page.setParams(params);
return userSignService.listInByUserIdAndStartTimeAndEndTimeAndIsLate(userId, startTime, endTime, isLate, page);
}
@GetMapping("listpage-user-signout/user-id/{userId}")
public SuccessResultList<List<UserSignoutDTO>> 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<String, Object> params = requestParams();
page.setParams(params);
return userSignService.listOutByUserIdAndStartTimeAndEndTimeAndIsEarly(userId, startTime, endTime, isEarly, page);
}
@GetMapping("list-user-grid/user-id/{userId}")
public List<GridDTO> listUserGrid(@PathVariable("userId") String userId) {
return userGridService.listUserGrid(userId);
}
@GetMapping("listpage-population-save/user-id/{userId}")
public SuccessResultList<List<BasePopulationInfoDTO>> listPopulationSave(@PathVariable("userId") String userId,
@RequestParam(name = "startTime", required = false) String startTime,
@RequestParam(name = "endTime", required = false) String endTime,
ListPage page) {
Map<String, Object> params = requestParams();
page.setParams(params);
return basePopulationInfoService.listPagePopulationSaveByUserIdAndStartTimeAndEndTime(userId, startTime, endTime, page);
}
@GetMapping("listpage-population-update/user-id/{userId}")
public SuccessResultList<List<BasePopulationInfoDTO>> listPagePopulationUpdate(@PathVariable("userId") String userId,
@RequestParam(name = "startTime", required = false) String startTime,
@RequestParam(name = "endTime", required = false) String endTime,
ListPage page) {
Map<String, Object> params = requestParams();
page.setParams(params);
return basePopulationInfoService.listPagePopulationUpdateByUserIdAndStartTimeAndEndTime(userId, startTime, endTime, page);
}
@GetMapping("listpage-case")
public SuccessResultList<List<ReportCaseDTO>> listPageCase(CaseListPage caseListPage) {
Map<String, Object> params = new HashMap<>();
caseListPage.setParams(params);
return reportCaseService.listPage(caseListPage);
}
}

View File

@ -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<BasePopulationInfoCountPO> listPopulationUpdateCount(Map<String, Object> params);
List<BasePopulationInfoDTO> list(Map<String, Object> params);
}

View File

@ -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<ReportCaseHandlePO> listHandlePO(Map<String, Object> params);
List<ReportCaseInspectPO> listInspectPO(Map<String, Object> params);
List<ReportCaseDTO> list(Map<String, Object> params);
}

View File

@ -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<GridDTO> list(Map<String, Object> params);
List<GridPointDTO> listPoint(Map<String, Object> params);
}

View File

@ -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<UserSignoutPO> listOutPO(Map<String, Object> params);
List<UserSigninDTO> listInDTO(Map<String, Object> params);
List<UserSignoutDTO> listOutDTO(Map<String, Object> params);
}

View File

@ -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;
}
}

View File

@ -6,6 +6,7 @@ public class CommunityBossCaseDayCountDTO implements Comparable<CommunityBossCas
private String areaName;
private String communityId;
private String communityName;
private String userId;
private String userName;
private Integer isSigninTotal;
private Integer isSigninLateTotal;
@ -51,6 +52,14 @@ public class CommunityBossCaseDayCountDTO implements Comparable<CommunityBossCas
this.communityName = communityName;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getUserName() {
return userName;
}

View File

@ -0,0 +1,248 @@
package com.cm.bigdata.pojo.dtos.kpi;
public class ReportCaseDTO {
private String reportCaseId;
private String caseNumber;
private String areaId;
private String areaName;
private String casePhotos;
private String caseAudio;
private String communityId;
private String communityName;
private String caseSource;
private Integer caseStatus;
private String caseTypeId;
private String caseTypeName;
private String caseContent;
private String caseLongitude;
private String caseLatitude;
private String casePosition;
private Integer isAccept;
private Integer isDeny;
private Integer isSelf;
private Double grade;
private String caseReporter;
private String caseFlowType;
private String caseFlowForward;
private String creator;
private String gmtCreate;
private String modifier;
private String gmtModified;
public String getReportCaseId() {
return reportCaseId;
}
public void setReportCaseId(String reportCaseId) {
this.reportCaseId = reportCaseId;
}
public String getCaseNumber() {
return caseNumber;
}
public void setCaseNumber(String caseNumber) {
this.caseNumber = caseNumber;
}
public String getAreaId() {
return areaId;
}
public void setAreaId(String areaId) {
this.areaId = areaId;
}
public String getAreaName() {
return areaName;
}
public void setAreaName(String areaName) {
this.areaName = areaName;
}
public String getCasePhotos() {
return casePhotos;
}
public void setCasePhotos(String casePhotos) {
this.casePhotos = casePhotos;
}
public String getCaseAudio() {
return caseAudio;
}
public void setCaseAudio(String caseAudio) {
this.caseAudio = caseAudio;
}
public String getCommunityId() {
return communityId;
}
public void setCommunityId(String communityId) {
this.communityId = communityId;
}
public String getCommunityName() {
return communityName;
}
public void setCommunityName(String communityName) {
this.communityName = communityName;
}
public String getCaseSource() {
return caseSource;
}
public void setCaseSource(String caseSource) {
this.caseSource = caseSource;
}
public Integer getCaseStatus() {
return caseStatus;
}
public void setCaseStatus(Integer caseStatus) {
this.caseStatus = caseStatus;
}
public String getCaseTypeId() {
return caseTypeId;
}
public void setCaseTypeId(String caseTypeId) {
this.caseTypeId = caseTypeId;
}
public String getCaseTypeName() {
return caseTypeName;
}
public void setCaseTypeName(String caseTypeName) {
this.caseTypeName = caseTypeName;
}
public String getCaseContent() {
return caseContent;
}
public void setCaseContent(String caseContent) {
this.caseContent = caseContent;
}
public String getCaseLongitude() {
return caseLongitude;
}
public void setCaseLongitude(String caseLongitude) {
this.caseLongitude = caseLongitude;
}
public String getCaseLatitude() {
return caseLatitude;
}
public void setCaseLatitude(String caseLatitude) {
this.caseLatitude = caseLatitude;
}
public String getCasePosition() {
return casePosition;
}
public void setCasePosition(String casePosition) {
this.casePosition = casePosition;
}
public Integer getIsAccept() {
return isAccept;
}
public void setIsAccept(Integer isAccept) {
this.isAccept = isAccept;
}
public Integer getIsDeny() {
return isDeny;
}
public void setIsDeny(Integer isDeny) {
this.isDeny = isDeny;
}
public Integer getIsSelf() {
return isSelf;
}
public void setIsSelf(Integer isSelf) {
this.isSelf = isSelf;
}
public Double getGrade() {
return grade;
}
public void setGrade(Double grade) {
this.grade = grade;
}
public String getCaseReporter() {
return caseReporter;
}
public void setCaseReporter(String caseReporter) {
this.caseReporter = caseReporter;
}
public String getCaseFlowType() {
return caseFlowType;
}
public void setCaseFlowType(String caseFlowType) {
this.caseFlowType = caseFlowType;
}
public String getCaseFlowForward() {
return caseFlowForward;
}
public void setCaseFlowForward(String caseFlowForward) {
this.caseFlowForward = caseFlowForward;
}
public String getCreator() {
return creator;
}
public void setCreator(String creator) {
this.creator = creator;
}
public String getGmtCreate() {
return gmtCreate;
}
public void setGmtCreate(String gmtCreate) {
this.gmtCreate = gmtCreate;
}
public String getModifier() {
return modifier;
}
public void setModifier(String modifier) {
this.modifier = modifier;
}
public String getGmtModified() {
return gmtModified;
}
public void setGmtModified(String gmtModified) {
this.gmtModified = gmtModified;
}
}

View File

@ -0,0 +1,77 @@
package com.cm.bigdata.pojo.dtos.kpi;
public class UserLocationDTO {
private String userLocationId;
private String userLongitude;
private String userLatitude;
private String userLocation;
private Integer isOverstep;
private String userName;
private String creator;
private String gmtCreate;
public String getUserLocationId() {
return userLocationId;
}
public void setUserLocationId(String userLocationId) {
this.userLocationId = userLocationId;
}
public String getUserLongitude() {
return userLongitude;
}
public void setUserLongitude(String userLongitude) {
this.userLongitude = userLongitude;
}
public String getUserLatitude() {
return userLatitude;
}
public void setUserLatitude(String userLatitude) {
this.userLatitude = userLatitude;
}
public String getUserLocation() {
return userLocation;
}
public void setUserLocation(String userLocation) {
this.userLocation = userLocation;
}
public Integer getIsOverstep() {
return isOverstep;
}
public void setIsOverstep(Integer isOverstep) {
this.isOverstep = isOverstep;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getCreator() {
return creator;
}
public void setCreator(String creator) {
this.creator = creator;
}
public String getGmtCreate() {
return gmtCreate;
}
public void setGmtCreate(String gmtCreate) {
this.gmtCreate = gmtCreate;
}
}

View File

@ -0,0 +1,87 @@
package com.cm.bigdata.pojo.dtos.kpi;
public class UserSigninDTO {
private String userSigninId;
private String userName;
private String signinLongitude;
private String signinLatitude;
private Integer isLate;
private Integer isOutside;
private String amPm;
private String creator;
private String gmtCreate;
public String getUserSigninId() {
return userSigninId;
}
public void setUserSigninId(String userSigninId) {
this.userSigninId = userSigninId;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getSigninLongitude() {
return signinLongitude;
}
public void setSigninLongitude(String signinLongitude) {
this.signinLongitude = signinLongitude;
}
public String getSigninLatitude() {
return signinLatitude;
}
public void setSigninLatitude(String signinLatitude) {
this.signinLatitude = signinLatitude;
}
public Integer getIsLate() {
return isLate;
}
public void setIsLate(Integer isLate) {
this.isLate = isLate;
}
public Integer getIsOutside() {
return isOutside;
}
public void setIsOutside(Integer isOutside) {
this.isOutside = isOutside;
}
public String getAmPm() {
return amPm;
}
public void setAmPm(String amPm) {
this.amPm = amPm;
}
public String getCreator() {
return creator;
}
public void setCreator(String creator) {
this.creator = creator;
}
public String getGmtCreate() {
return gmtCreate;
}
public void setGmtCreate(String gmtCreate) {
this.gmtCreate = gmtCreate;
}
}

View File

@ -0,0 +1,86 @@
package com.cm.bigdata.pojo.dtos.kpi;
public class UserSignoutDTO {
private String userSignoutId;
private String userName;
private String signoutLongitude;
private String signoutLatitude;
private Integer isEarly;
private Integer isOutside;
private String amPm;
private String creator;
private String gmtCreate;
public String getUserSignoutId() {
return userSignoutId;
}
public void setUserSignoutId(String userSignoutId) {
this.userSignoutId = userSignoutId;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getSignoutLongitude() {
return signoutLongitude;
}
public void setSignoutLongitude(String signoutLongitude) {
this.signoutLongitude = signoutLongitude;
}
public String getSignoutLatitude() {
return signoutLatitude;
}
public void setSignoutLatitude(String signoutLatitude) {
this.signoutLatitude = signoutLatitude;
}
public Integer getIsEarly() {
return isEarly;
}
public void setIsEarly(Integer isEarly) {
this.isEarly = isEarly;
}
public Integer getIsOutside() {
return isOutside;
}
public void setIsOutside(Integer isOutside) {
this.isOutside = isOutside;
}
public String getAmPm() {
return amPm;
}
public void setAmPm(String amPm) {
this.amPm = amPm;
}
public String getCreator() {
return creator;
}
public void setCreator(String creator) {
this.creator = creator;
}
public String getGmtCreate() {
return gmtCreate;
}
public void setGmtCreate(String gmtCreate) {
this.gmtCreate = gmtCreate;
}
}

View File

@ -27,6 +27,12 @@ public class CasePO {
private String deleteUserId;
private String totalUrge;
private String totalBack;
private Integer caseStatus;
private Integer caseSource;
private Integer isAccept;
private Integer isAssign;
private Integer isHandle;
private Integer isInspect;
public String getCaseId() {
return caseId;
@ -227,4 +233,52 @@ public class CasePO {
public void setTotalBack(String totalBack) {
this.totalBack = totalBack;
}
public Integer getCaseStatus() {
return caseStatus;
}
public void setCaseStatus(Integer caseStatus) {
this.caseStatus = caseStatus;
}
public Integer getCaseSource() {
return caseSource;
}
public void setCaseSource(Integer caseSource) {
this.caseSource = caseSource;
}
public Integer getIsAccept() {
return isAccept;
}
public void setIsAccept(Integer isAccept) {
this.isAccept = isAccept;
}
public Integer getIsAssign() {
return isAssign;
}
public void setIsAssign(Integer isAssign) {
this.isAssign = isAssign;
}
public Integer getIsHandle() {
return isHandle;
}
public void setIsHandle(Integer isHandle) {
this.isHandle = isHandle;
}
public Integer getIsInspect() {
return isInspect;
}
public void setIsInspect(Integer isInspect) {
this.isInspect = isInspect;
}
}

View File

@ -16,6 +16,8 @@ public class ReportCasePO {
private String gmtModified;
private String modifier;
private Integer isDelete;
private Integer caseStatus;
private Integer caseSource;
public String getReportCaseId() {
return reportCaseId;
@ -128,4 +130,20 @@ public class ReportCasePO {
public void setIsDelete(Integer isDelete) {
this.isDelete = isDelete;
}
public Integer getCaseStatus() {
return caseStatus;
}
public void setCaseStatus(Integer caseStatus) {
this.caseStatus = caseStatus;
}
public Integer getCaseSource() {
return caseSource;
}
public void setCaseSource(Integer caseSource) {
this.caseSource = caseSource;
}
}

View File

@ -0,0 +1,70 @@
package com.cm.bigdata.pojo.vos.kpi;
import com.cm.common.pojo.ListPage;
public class CaseListPage extends ListPage {
private String userId;
private String handleUserId;
private String startTime;
private String endTime;
private Integer isHandle;
private Integer isInspect;
private Integer isOnfile;
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getHandleUserId() {
return handleUserId;
}
public void setHandleUserId(String handleUserId) {
this.handleUserId = handleUserId;
}
public String getStartTime() {
return startTime;
}
public void setStartTime(String startTime) {
this.startTime = startTime;
}
public String getEndTime() {
return endTime;
}
public void setEndTime(String endTime) {
this.endTime = endTime;
}
public Integer getIsHandle() {
return isHandle;
}
public void setIsHandle(Integer isHandle) {
this.isHandle = isHandle;
}
public Integer getIsInspect() {
return isInspect;
}
public void setIsInspect(Integer isInspect) {
this.isInspect = isInspect;
}
public Integer getIsOnfile() {
return isOnfile;
}
public void setIsOnfile(Integer isOnfile) {
this.isOnfile = isOnfile;
}
}

View File

@ -1,9 +1,11 @@
package com.cm.bigdata.service.kpi;
import com.cm.bigdata.pojo.dtos.kpi.BasePopulationInfoDTO;
import com.cm.bigdata.pojo.pos.kpi.BasePopulationInfoCountPO;
import com.cm.common.pojo.ListPage;
import com.cm.common.result.SuccessResultList;
import java.util.List;
import java.util.Map;
public interface IBasePopulationInfoService {
@ -13,4 +15,8 @@ public interface IBasePopulationInfoService {
List<BasePopulationInfoCountPO> listPopulationUpdateCountByUserIdsAndDay(List<String> userIds, String date);
SuccessResultList<List<BasePopulationInfoDTO>> listPagePopulationSaveByUserIdAndStartTimeAndEndTime(String userId, String startTime, String endTime, ListPage page);
SuccessResultList<List<BasePopulationInfoDTO>> listPagePopulationUpdateByUserIdAndStartTimeAndEndTime(String userId, String startTime, String endTime, ListPage page);
}

View File

@ -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<ReportCaseInspectPO> listInspectPO(Map<String, Object> params);
SuccessResultList<List<ReportCaseDTO>> listPage(CaseListPage caseListPage);
}

View File

@ -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<GridDTO> listUserGrid(String userId);
}

View File

@ -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<UserSigninPO> listInPOByUserIdsAndDay(List<String> userIds, String day);
List<UserSignoutPO> listOutPOByUserIdsAndDay(List<String> userIds, String day);
SuccessResultList<List<UserSigninDTO>> listInByUserIdAndStartTimeAndEndTimeAndIsLate(String userId, String startTime, String endTime, Integer isLate, ListPage page);
SuccessResultList<List<UserSignoutDTO>> listOutByUserIdAndStartTimeAndEndTimeAndIsEarly(String userId, String startTime, String endTime, Integer isEarly, ListPage page);
}

View File

@ -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<List<BasePopulationInfoDTO>> listPagePopulationSaveByUserIdAndStartTimeAndEndTime(String userId, String startTime, String endTime, ListPage page) {
Map<String, Object> params = page.getParams();
params.put("creator", userId);
params.put("createStartTime", startTime);
params.put("createEndTime", endTime);
PageHelper.startPage(page.getPage(), page.getRows());
List<BasePopulationInfoDTO> basePopulationInfoDTOS = basePopulationInfoDao.list(params);
PageInfo<BasePopulationInfoDTO> pageInfo = new PageInfo<>(basePopulationInfoDTOS);
return new SuccessResultList<>(basePopulationInfoDTOS, pageInfo.getPageNum(), pageInfo.getTotal());
}
@Override
public SuccessResultList<List<BasePopulationInfoDTO>> listPagePopulationUpdateByUserIdAndStartTimeAndEndTime(String userId, String startTime, String endTime, ListPage page) {
Map<String, Object> params = page.getParams();
params.put("modifier", userId);
params.put("modifiedStartTime", startTime);
params.put("modifiedEndTime", endTime);
PageHelper.startPage(page.getPage(), page.getRows());
List<BasePopulationInfoDTO> basePopulationInfoDTOS = basePopulationInfoDao.list(params);
PageInfo<BasePopulationInfoDTO> pageInfo = new PageInfo<>(basePopulationInfoDTOS);
return new SuccessResultList<>(basePopulationInfoDTOS, pageInfo.getPageNum(), pageInfo.getTotal());
}
}

View File

@ -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<String, Object> 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<String, Object> 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<String, Object> queryParams = new HashMap<>();

View File

@ -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<List<ReportCaseDTO>> listPage(CaseListPage caseListPage) {
Map<String, Object> 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<ReportCaseDTO> reportCaseDTOS = reportCaseDao.list(params);
PageInfo<ReportCaseDTO> pageInfo = new PageInfo<>(reportCaseDTOS);
return new SuccessResultList<>(reportCaseDTOS, pageInfo.getPageNum(), pageInfo.getTotal());
}
}

View File

@ -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<GridDTO> listUserGrid(String userId) {
Map<String, Object> params = new HashMap<>();
params.put("relationId", userId);
List<GridDTO> gridDTOS = userGridDao.list(params);
gridDTOS.forEach(gridDTO -> {
Map<String, Object> queryParams = new HashMap<>();
queryParams.put("gridId", gridDTO.getGridId());
List<GridPointDTO> gridPointDTOS = userGridDao.listPoint(queryParams);
gridDTO.setPointArray(gridPointDTOS);
});
return gridDTOS;
}
}

View File

@ -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<UserSigninPO> listInPOByUserIdsAndDay(List<String> userIds, String day) {
Map<String, Object> params = new HashMap<>();
params.put("creators", userIds);
params.put("day", day);
return userSignDao.listInPO(params);
}
@Override
public List<UserSignoutPO> listOutPOByUserIdsAndDay(List<String> userIds, String day) {
Map<String, Object> params = new HashMap<>();
params.put("creators", userIds);
params.put("day", day);
return userSignDao.listOutPO(params);
}
}

View File

@ -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<UserSigninPO> listInPOByUserIdsAndDay(List<String> userIds, String day) {
Map<String, Object> params = new HashMap<>();
params.put("creators", userIds);
params.put("day", day);
return userSignDao.listInPO(params);
}
@Override
public List<UserSignoutPO> listOutPOByUserIdsAndDay(List<String> userIds, String day) {
Map<String, Object> params = new HashMap<>();
params.put("creators", userIds);
params.put("day", day);
return userSignDao.listOutPO(params);
}
@Override
public SuccessResultList<List<UserSigninDTO>> listInByUserIdAndStartTimeAndEndTimeAndIsLate(String userId, String startTime, String endTime, Integer isLate, ListPage page) {
Map<String, Object> 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<UserSigninDTO> userSigninDTOS = userSignDao.listInDTO(params);
PageInfo<UserSigninDTO> pageInfo = new PageInfo<>(userSigninDTOS);
return new SuccessResultList<>(userSigninDTOS, pageInfo.getPageNum(), pageInfo.getTotal());
}
@Override
public SuccessResultList<List<UserSignoutDTO>> listOutByUserIdAndStartTimeAndEndTimeAndIsEarly(String userId, String startTime, String endTime, Integer isEarly, ListPage page) {
Map<String, Object> 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<UserSignoutDTO> userSignoutDTOS = userSignDao.listOutDTO(params);
PageInfo<UserSignoutDTO> pageInfo = new PageInfo<>(userSignoutDTOS);
return new SuccessResultList<>(userSignoutDTOS, pageInfo.getPageNum(), pageInfo.getTotal());
}
}

View File

@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cm.bigdata.dao2.kpi.IBasePopulationInfoDao">
<resultMap id="basePopulationInfo" type="com.cm.bigdata.pojo.pos.kpi.BasePopulationInfoPO">
<resultMap id="basePopulationInfoPO" type="com.cm.bigdata.pojo.pos.kpi.BasePopulationInfoPO">
<id column="id" property="id"/>
<result column="base_population_info_id" property="basePopulationInfoId"/>
<result column="id_card_number" property="idCardNumber"/>
@ -35,6 +35,16 @@
<result column="other_people_type" property="otherPeopleType"/>
</resultMap>
<resultMap id="basePopulationInfoDTO" type="com.cm.bigdata.pojo.dtos.kpi.BasePopulationInfoDTO">
<id column="base_population_info_id" property="basePopulationInfoId"/>
<result column="id_card_number" property="idCardNumber"/>
<result column="full_name" property="fullName"/>
<result column="gender" property="gender"/>
<result column="birth_date" property="birthDate"/>
<result column="gmt_create" property="gmtCreate"/>
<result column="gmt_modified" property="gmtModified"/>
</resultMap>
<resultMap id="basePopulationInfoCountPO" type="com.cm.bigdata.pojo.pos.kpi.BasePopulationInfoCountPO">
<result column="user_id" property="userId"/>
<result column="total" property="total"/>
@ -86,5 +96,44 @@
modifier
</select>
<!-- 人员列表 -->
<select id="list" parameterType="map" resultMap="basePopulationInfoDTO">
SELECT
base_population_info_id,
id_card_number,
full_name,
gender,
birth_date,
gmt_create,
gmt_modified
FROM
gen_base_population_info
WHERE
is_delete = 0
<if test="creator != null and creator != ''">
AND
creator = #{creator}
</if>
<if test="createStartTime != null and createStartTime != ''">
AND
LEFT(gmt_create, 10) <![CDATA[ >= ]]> #{createStartTime}
</if>
<if test="createEndTime != null and createEndTime != ''">
AND
LEFT(gmt_create, 10) <![CDATA[ <= ]]> #{createEndTime}
</if>
<if test="modifier != null and modifier != ''">
AND
modifier = #{modifier}
</if>
<if test="modifiedStartTime != null and modifiedStartTime != ''">
AND
LEFT(gmt_create, 10) <![CDATA[ >= ]]> #{modifiedStartTime}
</if>
<if test="modifiedEndTime != null and modifiedEndTime != ''">
AND
LEFT(gmt_modified, 10) <![CDATA[ <= ]]> #{modifiedEndTime}
</if>
</select>
</mapper>

View File

@ -17,6 +17,38 @@
<result column="gmt_modified" property="gmtModified"/>
<result column="modifier" property="modifier"/>
<result column="is_delete" property="isDelete"/>
<result column="case_status" property="caseStatus"/>
<result column="case_source" property="caseSource"/>
</resultMap>
<resultMap id="reportCaseDTO" type="com.cm.bigdata.pojo.dtos.kpi.ReportCaseDTO">
<id column="report_case_id" property="reportCaseId"/>
<result column="case_number" property="caseNumber"/>
<result column="area_id" property="areaId"/>
<result column="area_name" property="areaName"/>
<result column="case_photos" property="casePhotos"/>
<result column="case_audio" property="caseAudio"/>
<result column="community_id" property="communityId"/>
<result column="community_name" property="communityName"/>
<result column="case_source" property="caseSource"/>
<result column="case_status" property="caseStatus"/>
<result column="case_type_id" property="caseTypeId"/>
<result column="case_type_name" property="caseTypeName"/>
<result column="case_content" property="caseContent"/>
<result column="case_longitude" property="caseLongitude"/>
<result column="case_latitude" property="caseLatitude"/>
<result column="case_position" property="casePosition"/>
<result column="is_accept" property="isAccept"/>
<result column="is_deny" property="isDeny"/>
<result column="is_self" property="isSelf"/>
<result column="grade" property="grade"/>
<result column="case_reporter" property="caseReporter"/>
<result column="case_flow_type" property="caseFlowType"/>
<result column="case_flow_forward" property="caseFlowForward"/>
<result column="creator" property="creator"/>
<result column="gmt_create" property="gmtCreate"/>
<result column="modifier" property="modifier"/>
<result column="gmt_modified" property="gmtModified"/>
</resultMap>
<resultMap id="reportCaseAcceptPO" type="com.cm.bigdata.pojo.pos.kpi.ReportCaseAcceptPO">
@ -68,7 +100,9 @@
creator,
gmt_modified,
modifier,
is_delete
is_delete,
case_status,
case_source
FROM
city_report_case
</select>
@ -119,4 +153,78 @@
city_report_case_inspect
</select>
<select id="list" parameterType="map" resultMap="reportCaseDTO">
SELECT
crc.report_case_id,
crc.case_number,
crc.area_id,
crc.area_name,
crc.case_photos,
crc.case_audio,
crc.community_id,
crc.community_name,
crc.case_source,
crc.case_status,
crc.case_type_id,
crc.case_type_name,
crc.case_content,
crc.case_longitude,
crc.case_latitude,
crc.case_position,
crc.is_accept,
crc.is_deny,
crc.is_self,
crc.grade,
crc.case_reporter,
crc.case_flow_type,
crc.case_flow_forward,
crc.creator,
crc.gmt_create,
crc.modifier,
crc.gmt_modified
FROM
city_report_case crc
WHERE
crc.is_delete = 0
<if test="startTime != null and startTime != ''">
AND
LEFT(crc.gmt_create, 10) <![CDATA[ >= ]]> #{startTime}
</if>
<if test="endTime != null and endTime != ''">
AND
LEFT(crc.gmt_create, 10) <![CDATA[ <= ]]> #{endTime}
</if>
<if test="userId != null and userId != ''">
AND
crc.creator = #{userId}
</if>
<if test="handleUserId != null and handleUserId != ''">
AND
crc.report_case_id IN (
SELECT
crca.case_id
FROM
city_report_case_assign crca
WHERE
crca.is_delete = 0
AND
crca.handle_user_id = #{handleUserId}
)
</if>
<if test="isHandle != null and isHandle == 1">
AND
crc.case_status > 3
</if>
<if test="isInspect != null and isInspect == 1">
AND
crc.case_status > 4
</if>
<if test="isOnfile != null and isOnfile == 1">
AND
crc.case_status > 5
</if>
ORDER BY
crc.gmt_create DESC
</select>
</mapper>

View File

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cm.bigdata.dao2.kpi.IUserGridDao">
<resultMap id="gridDTO" type="com.cm.bigdata.pojo.dtos.grid.GridDTO">
<id column="grid_id" property="gridId"/>
<result column="fill_color" property="fillColor"/>
<result column="grid_name" property="gridName"/>
</resultMap>
<resultMap id="gridPointDTO" type="com.cm.bigdata.pojo.dtos.grid.GridPointDTO">
<id column="grid_id" property="gridId"/>
<result column="lng" property="lng"/>
<result column="lat" property="lat"/>
</resultMap>
<select id="list" parameterType="map" resultMap="gridDTO">
SELECT
mg.grid_id,
mg.grid_name,
mg.fill_color
FROM
map_grid mg
WHERE
mg.is_delete = 0
<if test="relationId != null and relationId != ''">
AND
mg.grid_id IN (
SELECT
mgr.grid_id
FROM
map_grid_relation mgr
WHERE
mgr.relation_id = #{relationId}
)
</if>
</select>
<select id="listPoint" parameterType="map" resultMap="gridPointDTO">
SELECT
mgp.grid_id,
mgp.lat,
mgp.lng
FROM
map_grid_point mgp
<where>
<if test="gridId != null and gridId != ''">
AND
mgp.grid_id = #{gridId}
</if>
</where>
</select>
</mapper>

View File

@ -28,6 +28,30 @@
<result column="gmt_create" property="gmtCreate"/>
</resultMap>
<resultMap id="userSigninDTO" type="com.cm.bigdata.pojo.dtos.kpi.UserSigninDTO">
<id column="user_signin_id" property="userSigninId"/>
<result column="user_name" property="userName"/>
<result column="signin_longitude" property="signinLongitude"/>
<result column="signin_latitude" property="signinLatitude"/>
<result column="is_late" property="isLate"/>
<result column="is_outside" property="isOutside"/>
<result column="am_pm" property="amPm"/>
<result column="creator" property="creator"/>
<result column="gmt_create" property="gmtCreate"/>
</resultMap>
<resultMap id="userSignoutDTO" type="com.cm.bigdata.pojo.dtos.kpi.UserSignoutDTO">
<id column="user_signout_id" property="userSignoutId"/>
<result column="user_name" property="userName"/>
<result column="signout_longitude" property="signoutLongitude"/>
<result column="signout_latitude" property="signoutLatitude"/>
<result column="is_early" property="isEarly"/>
<result column="is_outside" property="isOutside"/>
<result column="am_pm" property="amPm"/>
<result column="creator" property="creator"/>
<result column="gmt_create" property="gmtCreate"/>
</resultMap>
<select id="listInPO" parameterType="map" resultMap="userSigninPO">
SELECT
id,
@ -86,4 +110,93 @@
</if>
</select>
<select id="listInDTO" parameterType="map" resultMap="userSigninDTO">
SELECT
user_signin_id,
user_name,
signin_longitude,
signin_latitude,
is_late,
is_outside,
am_pm,
creator,
gmt_create
FROM
city_user_signin
WHERE
is_delete = 0
<if test="day != null and day != ''">
AND
LEFT(gmt_create, 10) = #{day}
</if>
<if test="startTime != null and startTime != ''">
AND
LEFT(gmt_create, 10) <![CDATA[ >= ]]> #{startTime}
</if>
<if test="endTime != null and endTime != ''">
AND
LEFT(gmt_create, 10) <![CDATA[ <= ]]> #{endTime}
</if>
<if test="isLate != null">
AND
is_late = #{isLate}
</if>
<if test="creator != null and creator != ''">
AND
creator = #{creator}
</if>
<if test="creators != null and creators.size > 0">
AND
creator IN
<foreach collection="creators" item="item" index="index" open="(" separator="," close=")">
#{creators[${index}]}
</foreach>
</if>
</select>
<select id="listOutDTO" parameterType="map" resultMap="userSignoutDTO">
SELECT
user_signout_id,
user_name,
signout_longitude,
signout_latitude,
is_early,
is_outside,
am_pm,
creator,
gmt_create
FROM
city_user_signout
WHERE
is_delete = 0
<if test="day != null and day != ''">
AND
LEFT(gmt_create, 10) = #{day}
</if>
<if test="startTime != null and startTime != ''">
AND
LEFT(gmt_create, 10) <![CDATA[ >= ]]> #{startTime}
</if>
<if test="endTime != null and endTime != ''">
AND
LEFT(gmt_create, 10) <![CDATA[ <= ]]> #{endTime}
</if>
<if test="isEarly != null">
AND
is_early = #{isEarly}
</if>
<if test="creator != null and creator != ''">
AND
creator = #{creator}
</if>
<if test="creators != null and creators.size > 0">
AND
creator IN
<foreach collection="creators" item="item" index="index" open="(" separator="," close=")">
#{creators[${index}]}
</foreach>
</if>
</select>
</mapper>

View File

@ -45,6 +45,12 @@
<result column="delete_user_id" property="deleteUserId"/>
<result column="total_urge" property="totalUrge"/>
<result column="total_back" property="totalBack"/>
<result column="case_status" property="caseStatus"/>
<result column="case_source" property="caseSource"/>
<result column="is_accept" property="isAccept"/>
<result column="is_assign" property="isAssign"/>
<result column="is_handle" property="isHandle"/>
<result column="is_inspect" property="isInspect"/>
</resultMap>
<!-- 保存网格员日统计 -->
@ -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}
</update>
@ -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
<where>
is_delete = 0
<if test="reportUserId != null and reportUserId != ''">
AND
report_user_id = #{reportUserId}
@ -292,23 +323,17 @@
AND
community_id = #{communityId}
</if>
<if test="gmtAccept != null and gmtAccept != ''">
<if test="gmtAccept == 'isNotNull'">
<if test="isAccept != null">
AND
gmt_accept IS NOT NULL
</if>
is_accept = #{isAccept}
</if>
<if test="gmtHandle != null and gmtHandle != ''">
<if test="gmtHandle == 'isNotNull'">
<if test="isHandle != null">
AND
gmt_handle IS NOT NULL
</if>
is_handle = #{isHandle}
</if>
<if test="gmtInspect != null and gmtInspect != ''">
<if test="gmtInspect == 'isNotNull'">
<if test="isInspect != null">
AND
gmt_inspect IS NOT NULL
</if>
is_inspect = #{isInspect}
</if>
<if test="startTime != null and startTime != ''">
AND

View File

@ -10,7 +10,9 @@
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
<style>
.layui-table-cell a {text-decoration: underline;}
</style>
</head>
<body>
<div class="layui-fluid layui-anim layui-anim-fadein">
@ -156,25 +158,25 @@
{field:'isSigninTotal', width:100, title: '签到次数', align:'center',
templet: function(row) {
var rowData = row[this.field];
return rowData + '次';
return `<a href="javascript:void(0)" lay-event="signinEvent">${rowData}次</a>`;
}
},
{field:'isSigninLateTotal', width:100, title: '迟到次数', align:'center',
templet: function(row) {
var rowData = row[this.field];
return rowData + '次';
return `<a href="javascript:void(0)" lay-event="signinLateEvent">${rowData}次</a>`;
}
},
{field:'isSignoutTotal', width:100, title: '签退次数', align:'center',
templet: function(row) {
var rowData = row[this.field];
return rowData + '次';
return `<a href="javascript:void(0)" lay-event="signoutEvent">${rowData}次</a>`;
}
},
{field:'isSignoutEarlyTotal', width:100, title: '早退次数', align:'center',
templet: function(row) {
var rowData = row[this.field];
return rowData + '次';
return `<a href="javascript:void(0)" lay-event="signoutEarlyEvent">${rowData}次</a>`;
}
},
{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 `<a href="javascript:void(0)" lay-event="savePopulationEvent">${rowData}位</a>`;
}
},
{field:'updatePopulationCountTotal', width:120, title: '维护人口', align:'center',
templet: function(row) {
var rowData = row[this.field];
return rowData + '位';
return `<a href="javascript:void(0)" lay-event="updatePopulationEvent">${rowData}位</a>`;
}
},
{field:'caseTotal', width:120, title: '案件总数', align:'center',
templet: function(row) {
var rowData = row[this.field];
return rowData + '件';
return `<a href="javascript:void(0)" lay-event="caseEvent">${rowData}件</a>`;
}
},
{field:'caseHandleTotal', width:120, title: '已处理案件', align:'center',
templet: function(row) {
var rowData = row[this.field];
return rowData + '件';
return `<a href="javascript:void(0)" lay-event="caseHandleEvent">${rowData}件</a>`;
}
},
{field:'caseInspectTotal', width:120, title: '已检查案件', align:'center',
templet: function(row) {
var rowData = row[this.field];
return rowData + '件';
return `<a href="javascript:void(0)" lay-event="caseInspectEvent">${rowData}件</a>`;
}
},
{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('数据加载中,请稍等...');

View File

@ -0,0 +1,93 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<base href="/bigdata/">
<meta http-equiv="X-UA-Compatible" content="IE=11,chrome=1"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
</head>
<body>
<div style="padding: 15px; background-color: #FFF">
<div id="container"></div>
</div>
<script type="text/javascript" src="https://api.map.baidu.com/api?v=1.0&&type=webgl&ak=oWU9RD4ihDHAafexgI6XOrTK8lDatRju"></script>
<script src="assets/layuiadmin/layui/layui.js"></script>
<script type="text/javascript">
layui.config({
base: 'assets/layuiadmin/'
}).extend({
index: 'lib/index'
}).use(['index', 'table', 'laytpl', 'form','laydate'], function() {
var $ = layui.$;
var $win = $(window);
var queryParams = top.restAjax.params(window.location.href);
var lat = queryParams.lat;
var lng = queryParams.lng;
var userId = queryParams.userId;
function init() {
var map;
function size() {
$('#container').css({
height: `${$win.height() - 30}px`
})
}
function grid() {
top.restAjax.get(top.restAjax.path('api/kpi/list-user-grid/user-id/{userId}', [userId]), {}, null, function(code, data) {
$.each(data, function(index, item) {
var pointArray = [];
$.each(item.pointArray, function(jItem, pointItem) {
pointArray.push(new BMapGL.Point(pointItem.lng, pointItem.lat));
});
// 画网格
var polygon = new BMapGL.Polygon(pointArray, {
fillColor: item.fillColor,
strokeStyle: 'dashed',
strokeColor: 'blue',
strokeWeight: 1,
strokeOpacity: 0.8,
});
map.addOverlay(polygon);
})
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
function map() {
var point = new BMapGL.Point(lng, lat);
var marker = new BMapGL.Marker(point);
// 添加比例尺控件
var scaleCtrl = new BMapGL.ScaleControl();
// 添加缩放控件
var zoomCtrl = new BMapGL.ZoomControl();
// 添加城市列表控件
var cityCtrl = new BMapGL.CityListControl();
var mapTypeCtrl = new BMapGL.MapTypeControl();
map = new BMapGL.Map("container");
map.centerAndZoom(point, 15);
map.addOverlay(marker);
//设置地图旋转角度
map.setHeading(64.5);
//设置地图的倾斜角度
map.setTilt(73);
map.addControl(scaleCtrl);
map.addControl(zoomCtrl);
map.addControl(cityCtrl);
map.addControl(mapTypeCtrl);
map.enableScrollWheelZoom();
grid()
}
size();
map();
}
init();
});
</script>
</body>
</html>

View File

@ -0,0 +1,253 @@
<!doctype html>
<html lang="zh-CN">
<head>
<base href="/bigdata/">
<meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11,chrome=1"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
<!-- 图片 -->
<link rel="stylesheet" type="text/css" href="assets/js/vendor/swiper3/css/swiper.min.css"/>
<link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
<style>
.layui-table-cell{
height: auto;
}
.layui-table-body td{
height: 210px;
}
.layui-table img{
max-width: 100%;
}
.info-row {border-bottom: 1px dotted;}
.info-row:last-child {border: none;}
.info-row .col-left {width:30%;height:28px;text-align:center;border-right:1px dotted;display:inline-block;padding:5px;vertical-align:top;}
.info-row .col-right {width:70%;display:inline-block;padding:5px;vertical-align:top;}
.info-row .col-line {width:100%;color:black;text-align:center;display:block;padding:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.info-row .col-line .fa {color: red; margin-right: 5px;}
.info-row .col-content {width:100%;display:inline-block;padding:5px;height:86px;overflow:auto;white-space:normal;word-break:break-all;word-wrap:break-word;vertical-align:top;}
</style>
</head>
<body>
<div class="layui-anim layui-anim-fadein">
<div class="layui-row">
<div class="layui-col-md12">
<div class="layui-card">
<div class="layui-card-body">
<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
</div>
</div>
</div>
</div>
</div>
<script src="assets/layuiadmin/layui/layui.js"></script>
<!-- 图片 -->
<script type="text/javascript" src="assets/js/vendor/swiper3/js/swiper.min.js"></script>
<script type="text/javascript" src="assets/js/vendor/viewer/viewer.min.js"></script>
<!-- 图片 -->
<script type="text/javascript">
layui.config({
base: 'assets/layuiadmin/'
}).extend({
index: 'lib/index'
}).use(['index', 'table', 'laytpl', 'form','laydate'], function() {
var $ = layui.$;
var $win = $(window);
var laytpl = layui.laytpl;
var table = layui.table;
var admin = layui.admin;
var form = layui.form;
var laydate = layui.laydate;
var queryParams = top.restAjax.params(window.location.href);
var userId = queryParams.userId;
var handleUserId = queryParams.handleUserId;
var startTime = queryParams.startTime;
var endTime = queryParams.endTime;
var isHandle = queryParams.isHandle;
var isInspect = queryParams.isInspect;
var isOnfile = queryParams.isOnfile;
var tableUrl = 'api/kpi/listpage-case';
var dataLoading = false;
// 初始化表格
function initTable() {
dataLoading = true;
table.render({
elem: '#dataTable',
id: 'dataTable',
url: top.restAjax.path(tableUrl, [userId]),
where :{
startTime : startTime ? startTime : '',
endTime : endTime ? endTime : '',
userId : userId ? userId : '',
handleUserId : handleUserId ? handleUserId : '',
isHandle: isHandle ? isHandle : '',
isInspect: isInspect ? isInspect : '',
isOnfile: isOnfile ? isOnfile : '',
},
width: admin.screen() > 1 ? '100%' : '',
height: $win.height() - 20,
toolbar: false,
defaultToolbar: ['print', 'exports'],
limit: 20,
limits: [20, 40, 60, 80, 100, 200],
request: {
pageName: 'page',
limitName: 'rows'
},
cols: [[
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
{width: 300, title: '案件图片', align:'center',
templet: function(row) {
var photos = row.casePhotos.split(',')
var value = '<div id="photo_'+ row.reportCaseId +'" class="swiper-container" style="width:100%;">' +
'<div class="swiper-wrapper" style="width:100%">';
for(var i = 0, item = photos[i]; item = photos[i++];) {
value += '<div class="swiper-slide" style="width:100%;">' +
'<img class="swiper-lazy" src="http://219.147.99.164:8082/servicecity/route/file/downloadfile/true/'+ item +'" style="width:270px;height:180px;cursor:pointer;"/>' +
'<div class="swiper-lazy-preloader"></div>' +
'</div>';
}
value += '</div><div id="photo_swiper_'+ row.reportCaseId +'" class="swiper-pagination"></div></div>';
setTimeout(function() {
new Swiper('#photo_'+ row.reportCaseId, {
lazyLoading: true,
autoplay: 3000,
pagination : '#photo_swiper_'+ row.reportCaseId,
paginationClickable :true,
});
new Viewer(document.getElementById('photo_'+ row.reportCaseId));
}, 50);
return value;
}
},
{width: 400, title: '案件信息', align: 'center',
templet: function (row) {
var value = '<div style="text-align: left">'+
'<div class="info-row"><span class="col-left">案件编号</span><span class="col-right">'+ row.caseNumber +'</span></div>'+
'<div class="info-row"><span class="col-left">所在地区</span><span class="col-right">'+ row.areaName +'</span></div>'+
'<div class="info-row"><span class="col-left">所在社区</span><span class="col-right">'+ row.communityName +'</span></div>'+
'<div class="info-row"><span class="col-left">案件类型</span><span class="col-right">'+ row.caseTypeName +'</span></div>'+
'</div>'+
'</div>'
return value;
}
},
{width: 300, title: '案件内容', align: 'center',
templet: function (row) {
var value = '<div style="text-align: left">'+
'<div class="info-row"><span class="col-left">案件来源</span><span class="col-right">'+ sourceFormatter(row.caseSource) +'</span></div>'+
'<div class="info-row"><a href="javascript:;" class="col-line" lay-event="showLocation"><i class="fa fa-map-marker"></i>'+ row.casePosition +'</a></div>'+
'<div class="info-row"><span class="col-content">'+ row.caseContent +'</span></div>'+
'</div>';
return value;
}
},
{width: 300, title: '案件状态', align: 'center',
templet: function (row) {
var value = '<div style="text-align: left">'+
'<div class="info-row"><span class="col-left">上报时间</span><span class="col-right">'+ row.gmtCreate.substring(0, row.gmtCreate.length - 2) +'</span></div>'+
'<div class="info-row"><span class="col-left">上报人员</span><span class="col-right">'+ row.caseReporter +'</span></div>'+
'<div class="info-row"><span class="col-left">案件状态</span><span class="col-right">'+ caseStatusFormatter(row.caseStatus) +'</span></div>'+
'<div class="info-row"><span class="col-left"></span><span class="col-right"></span></div>'+
'<div class="info-row"><span class="col-left"></span><span class="col-right"></span></div>'+
'</div>';
return value;
}
}
]],
page: true,
parseData: function(data) {
return {
'code': 0,
'msg': '',
'count': data.total,
'data': data.rows
};
},
done: function(){
dataLoading = false;
}
});
}
initTable();
function getParamsUrl(url) {
var areaId = $('#areaId').val();
var caseTypeId = typeof ($('#caseTypeId').val()) === 'undefined' ? '' : $('#caseTypeId').val();
var childCaseTypeId = $('#childCaseTypeId').val();
var startTime = $('#startTime').val();
var endTime = $('#endTime').val();
var params = '?t='+ new Date().getTime();
if('' != areaId && 'undefined' != typeof(areaId)) {
params += '&areaId='+ areaId;
}
if('' != caseTypeId && '' != childCaseTypeId) {
params += '&caseTypeId='+ childCaseTypeId;
} else {
params += '&caseTypeId='+ caseTypeId;
}
if('' != startTime) {
params += '&startTime='+ startTime;
}
if('' != endTime) {
params += '&endTime='+ endTime;
}
return url + params;
}
// 来源格式化
function sourceFormatter(val) {
if(val === '1') {
return '群众举报';
}
if(val === '2') {
return '巡检采集';
}
if(val === '3') {
return '专管员上报'
}
return '未知';
}
// 案件状态
function caseStatusFormatter(val) {
var value;
switch (val + '') {
case '0':
value = '待受理';
break;
case '1':
value = '待立案';
break;
case '2':
value = '待下派';
break;
case '3':
value = '待处理';
break;
case '4':
value = '待检查';
break;
case '5':
value = '待结案';
break;
case '6':
value = '已归档';
break;
default:
value = '异常';
}
return value;
}
})
</script>
</body>
</html>

View File

@ -0,0 +1,117 @@
<!doctype html>
<html lang="zh-CN">
<head>
<base href="/bigdata/">
<meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11,chrome=1"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
</head>
<body>
<div class="layui-anim layui-anim-fadein">
<div class="layui-row">
<div class="layui-col-md12">
<div class="layui-card">
<div class="layui-card-body">
<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
</div>
</div>
</div>
</div>
</div>
<script src="assets/layuiadmin/layui/layui.js"></script>
<script type="text/javascript">
layui.config({
base: 'assets/layuiadmin/'
}).extend({
index: 'lib/index'
}).use(['index', 'table', 'laytpl', 'form','laydate'], function() {
var $ = layui.$;
var $win = $(window);
var laytpl = layui.laytpl;
var table = layui.table;
var admin = layui.admin;
var form = layui.form;
var laydate = layui.laydate;
var queryParams = top.restAjax.params(window.location.href);
var userId = queryParams.userId;
var startTime = queryParams.startTime;
var endTime = queryParams.endTime;
var tableUrl = 'api/kpi/listpage-population-save/user-id/{userId}';
var dataLoading = false;
// 初始化表格
function initTable() {
dataLoading = true;
table.render({
elem: '#dataTable',
id: 'dataTable',
url: top.restAjax.path(tableUrl, [userId]),
where :{
startTime : startTime ? startTime : '',
endTime : endTime ? endTime : '',
},
width: admin.screen() > 1 ? '100%' : '',
height: $win.height() - 20,
toolbar: false,
defaultToolbar: ['print', 'exports'],
limit: 20,
limits: [20, 40, 60, 80, 100, 200],
request: {
pageName: 'page',
limitName: 'rows'
},
cols: [[
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
{field:'fullName', width:120, title: '姓名', fixed: 'left', align:'center'},
{field:'idCardNumber', width:180, title: '身份证', align:'center',
templet: function(row) {
var rowData = row[this.field];
return rowData;
}
},
{field:'gender', width:80, title: '性别', align:'center',
templet: function(row) {
var rowData = row[this.field];
return rowData;
}
},
{field:'birthDate', width:120, title: '生日', align:'center',
templet: function(row) {
var rowData = row[this.field];
return rowData;
}
},
{field:'gmtCreate', width:180, title: '新增时间', align:'center',
templet: function(row) {
var rowData = row[this.field];
return rowData.substring(0, rowData.length - 2);
}
},
]],
page: true,
parseData: function(data) {
return {
'code': 0,
'msg': '',
'count': data.total,
'data': data.rows
};
},
done: function(){
dataLoading = false;
}
});
}
initTable();
})
</script>
</body>
</html>

View File

@ -0,0 +1,117 @@
<!doctype html>
<html lang="zh-CN">
<head>
<base href="/bigdata/">
<meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11,chrome=1"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
</head>
<body>
<div class="layui-anim layui-anim-fadein">
<div class="layui-row">
<div class="layui-col-md12">
<div class="layui-card">
<div class="layui-card-body">
<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
</div>
</div>
</div>
</div>
</div>
<script src="assets/layuiadmin/layui/layui.js"></script>
<script type="text/javascript">
layui.config({
base: 'assets/layuiadmin/'
}).extend({
index: 'lib/index'
}).use(['index', 'table', 'laytpl', 'form','laydate'], function() {
var $ = layui.$;
var $win = $(window);
var laytpl = layui.laytpl;
var table = layui.table;
var admin = layui.admin;
var form = layui.form;
var laydate = layui.laydate;
var queryParams = top.restAjax.params(window.location.href);
var userId = queryParams.userId;
var startTime = queryParams.startTime;
var endTime = queryParams.endTime;
var tableUrl = 'api/kpi/listpage-population-update/user-id/{userId}';
var dataLoading = false;
// 初始化表格
function initTable() {
dataLoading = true;
table.render({
elem: '#dataTable',
id: 'dataTable',
url: top.restAjax.path(tableUrl, [userId]),
where :{
startTime : startTime ? startTime : '',
endTime : endTime ? endTime : '',
},
width: admin.screen() > 1 ? '100%' : '',
height: $win.height() - 20,
toolbar: false,
defaultToolbar: ['print', 'exports'],
limit: 20,
limits: [20, 40, 60, 80, 100, 200],
request: {
pageName: 'page',
limitName: 'rows'
},
cols: [[
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
{field:'fullName', width:120, title: '姓名', fixed: 'left', align:'center'},
{field:'idCardNumber', width:180, title: '身份证', align:'center',
templet: function(row) {
var rowData = row[this.field];
return rowData;
}
},
{field:'gender', width:80, title: '性别', align:'center',
templet: function(row) {
var rowData = row[this.field];
return rowData;
}
},
{field:'birthDate', width:120, title: '生日', align:'center',
templet: function(row) {
var rowData = row[this.field];
return rowData;
}
},
{field:'gmtModified', width:180, title: '维护时间', align:'center',
templet: function(row) {
var rowData = row[this.field];
return rowData.substring(0, rowData.length - 2);
}
},
]],
page: true,
parseData: function(data) {
return {
'code': 0,
'msg': '',
'count': data.total,
'data': data.rows
};
},
done: function(){
dataLoading = false;
}
});
}
initTable();
})
</script>
</body>
</html>

View File

@ -0,0 +1,145 @@
<!doctype html>
<html lang="zh-CN">
<head>
<base href="/bigdata/">
<meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11,chrome=1"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
</head>
<body>
<div class="layui-anim layui-anim-fadein">
<div class="layui-row">
<div class="layui-col-md12">
<div class="layui-card">
<div class="layui-card-body">
<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
</div>
</div>
</div>
</div>
</div>
<script src="assets/layuiadmin/layui/layui.js"></script>
<script type="text/javascript">
layui.config({
base: 'assets/layuiadmin/'
}).extend({
index: 'lib/index'
}).use(['index', 'table', 'laytpl', 'form','laydate'], function() {
var $ = layui.$;
var $win = $(window);
var laytpl = layui.laytpl;
var table = layui.table;
var admin = layui.admin;
var form = layui.form;
var laydate = layui.laydate;
var queryParams = top.restAjax.params(window.location.href);
var userId = queryParams.userId;
var isLate = queryParams.isLate;
var startTime = queryParams.startTime;
var endTime = queryParams.endTime;
var tableUrl = 'api/kpi/listpage-user-signin/user-id/{userId}';
var dataLoading = false;
// 初始化表格
function initTable() {
dataLoading = true;
table.render({
elem: '#dataTable',
id: 'dataTable',
url: top.restAjax.path(tableUrl, [userId]),
where :{
startTime : startTime ? startTime : '',
endTime : endTime ? endTime : '',
isLate: isLate ? isLate : ''
},
width: admin.screen() > 1 ? '100%' : '',
height: $win.height() - 20,
toolbar: false,
defaultToolbar: ['print', 'exports'],
limit: 20,
limits: [20, 40, 60, 80, 100, 200],
request: {
pageName: 'page',
limitName: 'rows'
},
cols: [[
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
{field:'userName', width:120, title: '姓名', fixed: 'left', align:'center'},
{field:'gmtCreate', width:180, title: '签到时间', align:'center',
templet: function(row) {
var rowData = row[this.field];
return rowData.substring(0, rowData.length - 2);
}
},
{field:'isLate', width:100, title: '是否迟到', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(rowData === 0) {
return '否';
}
if(rowData === 1) {
return '是';
}
return '错误';
}
},
{field:'isOutside', width:100, title: '是否越界', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(rowData === 0) {
return '否';
}
if(rowData === 1) {
return '是';
}
return '错误';
}
},
{field:'address', width:140, title: '签到位置', align:'center',
templet: function(row) {
var rowData = row[this.field];
return '<a href="javascript:void(0);" lay-event="addressEvent"><i class="fa fa-map-marker"></i> 查看位置</a>';
}
},
]],
page: true,
parseData: function(data) {
return {
'code': 0,
'msg': '',
'count': data.total,
'data': data.rows
};
},
done: function(){
dataLoading = false;
}
});
}
initTable();
table.on('tool(dataTable)', function(obj) {
var event = obj.event;
var data = obj.data;
if(event === 'addressEvent') {
top.dialog.open({
title: `${data.userName},【经度: ${data.signinLongitude},纬度: ${data.signinLatitude}】`,
url: top.restAjax.path('route/kpi/detail/map/user-sign-map.html?userId={userId}&lat={lat}&lng={lng}', [userId, data.signinLatitude, data.signinLongitude]),
width: '600px',
height: '80%',
onClose: function() {}
})
}
});
})
</script>
</body>
</html>

View File

@ -0,0 +1,145 @@
<!doctype html>
<html lang="zh-CN">
<head>
<base href="/bigdata/">
<meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11,chrome=1"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
</head>
<body>
<div class="layui-anim layui-anim-fadein">
<div class="layui-row">
<div class="layui-col-md12">
<div class="layui-card">
<div class="layui-card-body">
<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
</div>
</div>
</div>
</div>
</div>
<script src="assets/layuiadmin/layui/layui.js"></script>
<script type="text/javascript">
layui.config({
base: 'assets/layuiadmin/'
}).extend({
index: 'lib/index'
}).use(['index', 'table', 'laytpl', 'form','laydate'], function() {
var $ = layui.$;
var $win = $(window);
var laytpl = layui.laytpl;
var table = layui.table;
var admin = layui.admin;
var form = layui.form;
var laydate = layui.laydate;
var queryParams = top.restAjax.params(window.location.href);
var userId = queryParams.userId;
var isEarly = queryParams.isEarly;
var startTime = queryParams.startTime;
var endTime = queryParams.endTime;
var tableUrl = 'api/kpi/listpage-user-signout/user-id/{userId}';
var dataLoading = false;
// 初始化表格
function initTable() {
dataLoading = true;
table.render({
elem: '#dataTable',
id: 'dataTable',
url: top.restAjax.path(tableUrl, [userId]),
where :{
startTime : startTime ? startTime : '',
endTime : endTime ? endTime : '',
isEarly: isEarly ? isEarly : ''
},
width: admin.screen() > 1 ? '100%' : '',
height: $win.height() - 20,
toolbar: false,
defaultToolbar: ['print', 'exports'],
limit: 20,
limits: [20, 40, 60, 80, 100, 200],
request: {
pageName: 'page',
limitName: 'rows'
},
cols: [[
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
{field:'userName', width:120, title: '姓名', fixed: 'left', align:'center'},
{field:'gmtCreate', width:180, title: '签退时间', align:'center',
templet: function(row) {
var rowData = row[this.field];
return rowData.substring(0, rowData.length - 2);
}
},
{field:'isEarly', width:100, title: '是否早退', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(rowData === 0) {
return '否';
}
if(rowData === 1) {
return '是';
}
return '错误';
}
},
{field:'isOutside', width:100, title: '是否越界', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(rowData === 0) {
return '否';
}
if(rowData === 1) {
return '是';
}
return '错误';
}
},
{field:'address', width:140, title: '签到位置', align:'center',
templet: function(row) {
var rowData = row[this.field];
return '<a href="javascript:void(0);" lay-event="addressEvent"><i class="fa fa-map-marker"></i> 查看位置</a>';
}
},
]],
page: true,
parseData: function(data) {
return {
'code': 0,
'msg': '',
'count': data.total,
'data': data.rows
};
},
done: function(){
dataLoading = false;
}
});
}
initTable();
table.on('tool(dataTable)', function(obj) {
var event = obj.event;
var data = obj.data;
if(event === 'addressEvent') {
top.dialog.open({
title: `${data.userName},【经度: ${data.signoutLongitude},纬度: ${data.signoutLatitude}】`,
url: top.restAjax.path('route/kpi/detail/map/user-sign-map.html?userId={userId}&lng={lng}&lat={lat}', [userId, data.signoutLongitude, data.signoutLatitude]),
width: '600px',
height: '80%',
onClose: function() {}
})
}
});
})
</script>
</body>
</html>

View File

@ -10,7 +10,9 @@
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
<style>
.layui-table-cell a {text-decoration: underline;}
</style>
</head>
<body>
<div class="layui-fluid layui-anim layui-anim-fadein">
@ -109,40 +111,40 @@
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
{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 `<a href="javascript:void(0)" lay-event="signinEvent">${rowData}次</a>`;
}
},
{field:'isSigninLateTotal', width:100, title: '迟到次数', align:'center',
templet: function(row) {
var rowData = row[this.field];
return rowData + '次';
return `<a href="javascript:void(0)" lay-event="signinLateEvent">${rowData}次</a>`;
}
},
{field:'isSignoutTotal', width:100, title: '签退次数', align:'center',
templet: function(row) {
var rowData = row[this.field];
return rowData + '次';
return `<a href="javascript:void(0)" lay-event="signoutEvent">${rowData}次</a>`;
}
},
{field:'isSignoutEarlyTotal', width:100, title: '早退次数', align:'center',
templet: function(row) {
var rowData = row[this.field];
return rowData + '次';
return `<a href="javascript:void(0)" lay-event="signoutEarlyEvent">${rowData}次</a>`;
}
},
{field:'caseReportTotal', width:160, title: '上报案件总数', align:'center',
templet: function(row) {
var rowData = row[this.field];
return `<a href="javascript:void(0)" lay-event="caseEvent">${rowData}件</a>`;
}
},
{field:'caseHandleTotal', width:160, title: '处理案件总数', align:'center',
templet: function(row) {
var rowData = row[this.field];
return rowData + '件';
return `<a href="javascript:void(0)" lay-event="caseHandleEvent">${rowData}件</a>`;
}
},
]],
@ -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('数据加载中,请稍等...');