提交部分二级页面
This commit is contained in:
parent
8a06963bcd
commit
8d8dd5918c
@ -175,7 +175,6 @@ public class BindingDepartmentController extends AbstractController {
|
||||
@GetMapping("list-all-sys-user")
|
||||
public List<Map<String, Object>> listAllSysUser() throws SearchException{
|
||||
Map<String, Object> params = requestParams();
|
||||
params.put("userType","2");
|
||||
params.put("weChat",false);
|
||||
return bindingDepartment.listAllSysUser(params);
|
||||
}
|
||||
|
@ -2,12 +2,14 @@ package com.cm.systemcity.controller.datarelease;
|
||||
|
||||
import com.cm.common.base.AbstractController;
|
||||
import com.cm.common.constants.ISystemConstant;
|
||||
import com.cm.common.exception.ParamsException;
|
||||
import com.cm.common.exception.SearchException;
|
||||
import com.cm.common.pojo.ListPage;
|
||||
import com.cm.common.result.ErrorResult;
|
||||
import com.cm.common.result.SuccessResultData;
|
||||
import com.cm.common.result.SuccessResultList;
|
||||
import com.cm.common.utils.DateUtil;
|
||||
import com.cm.plugin.map.pojo.dto.GridDTO;
|
||||
import com.cm.systemcity.dao.datarelease.IDataReleaseDao;
|
||||
import com.cm.systemcity.dao.reportcase.IReportCaseDao;
|
||||
import com.cm.systemcity.pojo.dtos.dict.DictDTO;
|
||||
@ -20,15 +22,16 @@ import com.cm.systemcity.service.dict.IDictService;
|
||||
import com.cm.systemcity.service.readstate.IReadStateService;
|
||||
import com.cm.systemcity.service.reportcase.IReportCaseService;
|
||||
import com.cm.systemcity.service.userlocation.IUserLocationService;
|
||||
import com.cm.systemcity.service.userpoints.IUserPointsService;
|
||||
import com.cm.systemcity.utils.BigDataResult;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import io.swagger.annotations.*;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||
import org.springframework.data.mongodb.core.query.Query;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.text.SimpleDateFormat;
|
||||
@ -48,11 +51,21 @@ public class DataReleaseController extends AbstractController {
|
||||
@Autowired
|
||||
private IDataReleaseDao dataReleaseDao;
|
||||
@Autowired
|
||||
private MongoTemplate mongoTemplate;
|
||||
@Autowired
|
||||
private IDictService dictService;
|
||||
@Autowired
|
||||
private IReportCaseService reportCaseService;
|
||||
@Autowired
|
||||
private IUserLocationService userLocationService;
|
||||
@Autowired
|
||||
private IUserPointsService userPointsService;
|
||||
|
||||
@GetMapping("repair-data")
|
||||
public void repairData(){
|
||||
// 更新地图左侧人员树缓存
|
||||
mongoTemplate.remove(new Query(), "INDEX_PANEL_GRID_TREE");
|
||||
}
|
||||
|
||||
@ApiOperation(value = "案件情况-数量", notes = "案件情况-数量")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@ -196,54 +209,56 @@ public class DataReleaseController extends AbstractController {
|
||||
@GetMapping("get-7day-report-case")
|
||||
public BigDataResult get7DayReportCase(){
|
||||
Map<String,Object> reqParams = requestParams();
|
||||
// {data:{},list:[{name:'受理',value:585},{name:'立案',value:25},{name:'下派',value:89},{name:'处理',value:856},
|
||||
// {name:'检查',value:856},{name:'归档',value:856}],msg:'加载成功',state:'200'}
|
||||
// 为了避免案件类型没传,单独处理
|
||||
if(reqParams.get("caseFlowType") == null || "".equals(reqParams.get("caseFlowType").toString().trim())){
|
||||
reqParams.put("caseFlowType", "1,2");
|
||||
}
|
||||
List<Map<String, Object>> resList = new ArrayList<>();
|
||||
Map<String, Object> itemMap;
|
||||
String nowDate = DateUtil.getDay();
|
||||
String last7Date = DateUtil.getBeforeDate(7,"yyyy-MM-dd");
|
||||
reqParams.put("modifiedStr",last7Date + " 00:00:00");
|
||||
reqParams.put("modifiedEnd", nowDate + " 00:00:00");
|
||||
String last7Date = DateUtil.getBeforeDate(6,"yyyy-MM-dd");
|
||||
reqParams.put("startTime",last7Date + " 00:00:00");
|
||||
reqParams.put("endTime", nowDate + " 23:59:59");
|
||||
// 受理
|
||||
reqParams.put("caseStatusCompareUp","1");
|
||||
/*reqParams.put("caseStatusCompareUp","1");
|
||||
List<Map<String, Object>> list1 = dataReleaseDao.listReportCase(reqParams);
|
||||
itemMap = new HashMap<>(4);
|
||||
itemMap.put("name", "受理");
|
||||
itemMap.put("value", list1 == null ? 0 : list1.size());
|
||||
resList.add(itemMap);
|
||||
resList.add(itemMap);*/
|
||||
// 立案
|
||||
reqParams.put("caseStatusCompareUp","2");
|
||||
/*reqParams.put("caseStatusCompareUp","2");
|
||||
List<Map<String, Object>> list2 = dataReleaseDao.listReportCase(reqParams);
|
||||
itemMap = new HashMap<>(4);
|
||||
itemMap.put("name", "立案");
|
||||
itemMap.put("value", list2 == null ? 0 : list2.size());
|
||||
resList.add(itemMap);
|
||||
// 下派
|
||||
reqParams.put("caseStatusCompareUp","3");
|
||||
resList.add(itemMap);*/
|
||||
// 待下中
|
||||
reqParams.put("caseStatus","2");
|
||||
List<Map<String, Object>> list3 = dataReleaseDao.listReportCase(reqParams);
|
||||
itemMap = new HashMap<>(4);
|
||||
itemMap.put("name", "下派");
|
||||
itemMap.put("name", "下派中");
|
||||
itemMap.put("value", list3 == null ? 0 : list3.size());
|
||||
resList.add(itemMap);
|
||||
// 处理
|
||||
reqParams.put("caseStatusCompareUp","4");
|
||||
reqParams.put("caseStatus","3");
|
||||
List<Map<String, Object>> list4 = dataReleaseDao.listReportCase(reqParams);
|
||||
itemMap = new HashMap<>(4);
|
||||
itemMap.put("name", "处理");
|
||||
itemMap.put("name", "处理中");
|
||||
itemMap.put("value", list4 == null ? 0 : list4.size());
|
||||
resList.add(itemMap);
|
||||
// 检查
|
||||
reqParams.put("caseStatusCompareUp","5");
|
||||
reqParams.put("caseStatus","4");
|
||||
List<Map<String, Object>> list5 = dataReleaseDao.listReportCase(reqParams);
|
||||
itemMap = new HashMap<>(4);
|
||||
itemMap.put("name", "检查");
|
||||
itemMap.put("name", "检查中");
|
||||
itemMap.put("value", list5 == null ? 0 : list5.size());
|
||||
resList.add(itemMap);
|
||||
// 归档
|
||||
reqParams.put("caseStatusCompareUp","6");
|
||||
reqParams.put("caseStatus","6");
|
||||
List<Map<String, Object>> list6 = dataReleaseDao.listReportCase(reqParams);
|
||||
itemMap = new HashMap<>(4);
|
||||
itemMap.put("name", "归档");
|
||||
itemMap.put("name", "已归档");
|
||||
itemMap.put("value", list6 == null ? 0 : list6.size());
|
||||
resList.add(itemMap);
|
||||
BigDataResult bdr = new BigDataResult();
|
||||
@ -271,6 +286,8 @@ public class DataReleaseController extends AbstractController {
|
||||
|| !"null".equals(gradeItem.get("grade").toString())
|
||||
){
|
||||
nowGrade += Integer.parseInt(gradeItem.get("grade").toString());
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
BigDecimal ratioBigDecimal = new BigDecimal(( nowGrade.doubleValue() / totalGrade.doubleValue() ) * 100)
|
||||
@ -285,33 +302,83 @@ public class DataReleaseController extends AbstractController {
|
||||
return bdr;
|
||||
}
|
||||
|
||||
@ApiOperation(value = "案件满意度二级列表", notes = "案件满意度二级列表")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("list-grade-ratio")
|
||||
public SuccessResultList<List<Map<String, Object>>> listGradeRatio(){
|
||||
Map<String,Object> params = requestParams();
|
||||
params.put("caseStatus","6");
|
||||
// 只显示近7天的情况
|
||||
String startTime = DateUtil.getBeforeDate(7, "yyyy-MM-dd");
|
||||
startTime += " 00:00:00";
|
||||
String endTime = DateUtil.getDay();
|
||||
endTime += " 23:59:59";
|
||||
params.put("startTime", startTime);
|
||||
params.put("endTime", endTime);
|
||||
List<Map<String, Object>> gradeList = dataReleaseDao.listReportCase(params);
|
||||
Integer totalGrade = 0;
|
||||
Integer nowGrade = 0;
|
||||
totalGrade = gradeList.size() * 5;
|
||||
for(Map<String, Object> item : gradeList){
|
||||
item.put("gmt_create", item.get("gmt_create").toString().substring(0,19));
|
||||
if(item.get("grade") == null
|
||||
|| "0".equals(item.get("grade").toString())
|
||||
|| "".equals(item.get("grade").toString())){
|
||||
nowGrade += 3;
|
||||
} else {
|
||||
nowGrade += Integer.parseInt(item.get("grade").toString());
|
||||
}
|
||||
}
|
||||
if(totalGrade == 0){
|
||||
return new SuccessResultList<>(new ArrayList<>(), 1, 0L);
|
||||
}
|
||||
Map<String, Object> totalInfoMap = new HashMap<>(8);
|
||||
totalInfoMap.put("case_reporter", "合计: " + gradeList.size() + "件");
|
||||
BigDecimal ratioBigDecimal = new BigDecimal(( nowGrade.doubleValue() / totalGrade.doubleValue() ) * 100)
|
||||
.setScale(2,BigDecimal.ROUND_HALF_UP);
|
||||
totalInfoMap.put("grade", "总体满意度: " + ratioBigDecimal.doubleValue());
|
||||
List<Map<String, Object>> resList = new LinkedList<>();
|
||||
resList.add(totalInfoMap);
|
||||
for(Map<String, Object> item : gradeList){
|
||||
resList.add(item);
|
||||
}
|
||||
return new SuccessResultList<>(resList, 1, 0L);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "各月份案件情况统计", notes = "各月份案件情况统计")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("get-month-report-case")
|
||||
public BigDataResult getMonthReportCase(){
|
||||
Map<String,Object> reqParams = requestParams();
|
||||
// {data:{},list:[{name:' 1月',value:22},{name:'2月',value:'968'},{name:'3月',value:6952},{name:'4月',value:5955},{name:'5月',
|
||||
// value:1204},{name:'6月',value:2054},{name:'7月',value:3250},{name:'8月',value:1048},
|
||||
// {name:'9月',value:458},{name:'10月',value:1520},{name:'11月',value:1952},{name:'12月',value:702},],msg:'加载成功',state:'200'}
|
||||
BigDataResult bdr = new BigDataResult();
|
||||
String year = DateUtil.getYear();
|
||||
Integer year = Integer.parseInt(DateUtil.getYear());
|
||||
Integer month;
|
||||
if(DateUtil.getMonth().length() > 1 || "0".equals(DateUtil.getMonth().substring(0,1))){
|
||||
month = Integer.parseInt(DateUtil.getMonth().replaceAll("0", ""));
|
||||
} else {
|
||||
month = Integer.parseInt(DateUtil.getMonth());
|
||||
}
|
||||
List<String> monthList = new ArrayList<>();
|
||||
List<Map<String, Object>> resList = new ArrayList<>();
|
||||
for(int i = 1;i <= 12; i++){
|
||||
if(i < 10){
|
||||
monthList.add(year + "-0" + i);
|
||||
for(int i = 0; i < 12; i++){
|
||||
if(month - i == 0){
|
||||
monthList.add((year - 1) + "-" + 12);
|
||||
continue;
|
||||
}
|
||||
monthList.add(year + "-" + i);
|
||||
if(month - i < 0){
|
||||
monthList.add((year -1) + "-" + (12 + (month - i)));
|
||||
continue;
|
||||
}
|
||||
monthList.add(year + "-" + (month - i));
|
||||
}
|
||||
for(int i = 0; i < monthList.size(); i++){
|
||||
reqParams.clear();
|
||||
reqParams.put("gmtCreateLike", monthList.get(i));
|
||||
Map<String, Object> itemMap = new HashMap<>(4);
|
||||
List<Map<String, Object>> resList = new ArrayList<>();
|
||||
for(String str : monthList){
|
||||
Map<String, Object> resMap = new HashMap<>(8);
|
||||
String queryTime = str.length() == 6 ? str.replace("-", "-0") : str;
|
||||
reqParams.put("gmtCreateLike", queryTime);
|
||||
List<Map<String, Object>> list = dataReleaseDao.listReportCase(reqParams);
|
||||
itemMap.put("name", (i+1) + "月");
|
||||
itemMap.put("value", list == null ? 0 : list.size());
|
||||
resList.add(itemMap);
|
||||
resMap.put("name", queryTime);
|
||||
resMap.put("value", list == null ? 0 : list.size());
|
||||
resList.add(resMap);
|
||||
}
|
||||
bdr.setList(resList);
|
||||
return bdr;
|
||||
@ -422,6 +489,33 @@ public class DataReleaseController extends AbstractController {
|
||||
return resList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 7日案件进展情况列表
|
||||
*/
|
||||
@GetMapping("list-page-7day-report-case")
|
||||
public SuccessResultList<List<ReportCaseDTO>> listPage7DayReportCase(ListPage page) throws SearchException {
|
||||
Map<String, Object> params = requestParams();
|
||||
// 为了避免案件类型没传,单独处理
|
||||
if(params.get("caseFlowType") == null || "".equals(params.get("caseFlowType").toString().trim())){
|
||||
params.put("caseFlowType", "1,2");
|
||||
}
|
||||
// 查询7天内的数据
|
||||
if(params.get("startTime") == null && params.get("endTime") == null){
|
||||
String startTime = DateUtil.getBeforeDate(6, "yyyy-MM-dd");
|
||||
String endTime = DateUtil.getDay();
|
||||
params.put("startTime", startTime);
|
||||
params.put("endTime", endTime);
|
||||
}
|
||||
// 案件状态没传情况
|
||||
if(params.get("caseStatus") == null || "".equals(params.get("caseStatus").toString())){
|
||||
params.put("caseStatus", "2,3,4,5,6");
|
||||
}
|
||||
page.setParams(params);
|
||||
|
||||
SuccessResultList<List<ReportCaseDTO>> resList = reportCaseService.listPageReportCase(page);
|
||||
return resList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看案件详情
|
||||
*/
|
||||
@ -460,6 +554,8 @@ public class DataReleaseController extends AbstractController {
|
||||
resObj.put("long", item.get("case_longitude").toString());
|
||||
resObj.put("lat", item.get("case_latitude").toString());
|
||||
resObj.put("text", item.get("case_content") == null ? "" : item.get("case_content").toString());
|
||||
resObj.put("reportCaseId", item.get("report_case_id") == null ? "" : item.get("report_case_id").toString());
|
||||
resObj.put("caseReporter", item.get("case_reporter") == null ? "" : item.get("case_reporter").toString());
|
||||
resList.add(resObj);
|
||||
}
|
||||
}
|
||||
@ -473,6 +569,76 @@ public class DataReleaseController extends AbstractController {
|
||||
return reportCaseService.listCaseStatisticRatio(params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 各月份案件统计情况 -大数据
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("list-report-case-month")
|
||||
public SuccessResultList<List<Map<String, Object>>> listReportCaseMonth(){
|
||||
Map<String, Object> params = requestParams();
|
||||
Integer year = Integer.parseInt(DateUtil.getYear());
|
||||
Integer month;
|
||||
if(DateUtil.getMonth().length() > 1 || "0".equals(DateUtil.getMonth().substring(0,1))){
|
||||
month = Integer.parseInt(DateUtil.getMonth().replaceAll("0", ""));
|
||||
} else {
|
||||
month = Integer.parseInt(DateUtil.getMonth());
|
||||
}
|
||||
List<String> monthList = new ArrayList<>();
|
||||
for(int i = 0; i < 12; i++){
|
||||
if(month - i == 0){
|
||||
monthList.add((year - 1) + "-" + 12);
|
||||
continue;
|
||||
}
|
||||
if(month - i < 0){
|
||||
monthList.add((year -1) + "-" + (12 + (month - i)));
|
||||
continue;
|
||||
}
|
||||
monthList.add(year + "-" + (month - i));
|
||||
}
|
||||
List<Map<String, Object>> resList = new ArrayList<>();
|
||||
for(String str : monthList){
|
||||
Map<String, Object> resMap = new HashMap<>(8);
|
||||
String queryTime = str.length() == 6 ? str.replace("-", "-0") : str;
|
||||
params.put("gmtCreateLike", queryTime);
|
||||
List<Map<String, Object>> list = dataReleaseDao.listReportCase(params);
|
||||
resMap.put("yearMonth", queryTime);
|
||||
resMap.put("totalCount", list.size());
|
||||
// 下派中
|
||||
Integer xiapai = 0;
|
||||
// 处理中
|
||||
Integer chuli = 0;
|
||||
// 检查中
|
||||
Integer jiancha = 0;
|
||||
// 已归档
|
||||
Integer guidang = 0;
|
||||
for(Map<String, Object> item : list){
|
||||
if(item.get("case_status") != null && "2".equals(item.get("case_status").toString())){
|
||||
xiapai++;
|
||||
}
|
||||
if(item.get("case_status") != null && "3".equals(item.get("case_status").toString())){
|
||||
chuli++;
|
||||
}
|
||||
if(item.get("case_status") != null && "4".equals(item.get("case_status").toString())){
|
||||
jiancha++;
|
||||
}
|
||||
if(item.get("case_status") != null && "6".equals(item.get("case_status").toString())){
|
||||
guidang++;
|
||||
}
|
||||
}
|
||||
resMap.put("xiapai", xiapai);
|
||||
resMap.put("chuli", chuli);
|
||||
resMap.put("jiancha", jiancha);
|
||||
resMap.put("guidang", guidang);
|
||||
resList.add(resMap);
|
||||
}
|
||||
return new SuccessResultList<>(resList, 1, 0L);
|
||||
}
|
||||
|
||||
/**
|
||||
* 大数据页面人员实施定位 二级弹窗列表页数据接口
|
||||
* @param page
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("list-page-user-location")
|
||||
public SuccessResultList<List<UserLocationDTO>> listPageUserLocation (ListPage page){
|
||||
Map<String, Object> params = requestParams();
|
||||
@ -492,12 +658,26 @@ public class DataReleaseController extends AbstractController {
|
||||
dto.setIsOverstep(temp.get("is_overstep") == null ? "" : temp.get("is_overstep").toString());
|
||||
dto.setUserName(temp.get("user_name") == null ? "" : temp.get("user_name").toString());
|
||||
dto.setCreator(temp.get("creator") == null ? "" : temp.get("creator").toString());
|
||||
dto.setGmtCreate(temp.get("gmt_create") == null ? "" : temp.get("gmt_create").toString());
|
||||
dto.setGmtCreate(temp.get("gmt_create") == null ? "" : temp.get("gmt_create").toString().substring(11,19));
|
||||
dto.setUserAvatar(temp.get("user_avatar") == null ? "" : temp.get("user_avatar").toString());
|
||||
dto.setUserPhone(temp.get("user_phone") == null ? "" : temp.get("user_phone").toString());
|
||||
// 如果取不到手机号 则使用登录账号
|
||||
if(temp.get("user_phone") == null){
|
||||
dto.setUserPhone(temp.get("user_username") == null ? "" : temp.get("user_username").toString());
|
||||
} else {
|
||||
dto.setUserPhone(temp.get("user_phone").toString());
|
||||
}
|
||||
resList.add(dto);
|
||||
}
|
||||
PageInfo<Map<String, Object>> pageInfo = new PageInfo<>(userLocationList);
|
||||
return new SuccessResultList<>(resList, pageInfo.getPageNum(), pageInfo.getTotal());
|
||||
}
|
||||
|
||||
@GetMapping("list-user-and-points-by-userids-by-grid-service")
|
||||
public List<GridDTO> listUserAndPointsByUserIdsByGridService () throws ParamsException, SearchException{
|
||||
Map<String, Object> params = requestParams();
|
||||
if (params.get("userIds") == null || StringUtils.isBlank(params.get("userIds").toString())) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return userPointsService.listUserAndPointsByUserIdsByGridService(params);
|
||||
}
|
||||
}
|
||||
|
@ -951,6 +951,7 @@ public class UserLocationServiceImpl extends BaseService implements IUserLocatio
|
||||
gridPointArray.add(gridPointDTO);
|
||||
}
|
||||
item.setPointArray(gridPointArray);
|
||||
|
||||
}
|
||||
resultDTO.addAll(gridDTOS);
|
||||
return resultDTO;
|
||||
|
@ -194,9 +194,6 @@
|
||||
t1.user_name LIKE CONCAT('%', CONCAT(#{keywords}, '%'))
|
||||
)
|
||||
</if>
|
||||
<if test="userType != null and userType !=''">
|
||||
AND t1.user_type = '2'
|
||||
</if>
|
||||
<if test="weChat == false">
|
||||
AND t1.user_username NOT LIKE 'WX%'
|
||||
</if>
|
||||
|
@ -27,8 +27,11 @@
|
||||
city_report_case
|
||||
WHERE
|
||||
is_delete = '0'
|
||||
<if test="caseFlowType != null and caseFlowType != ''">
|
||||
AND FIND_IN_SET(case_flow_type, #{caseFlowType})
|
||||
</if>
|
||||
<if test="caseStatus != null and caseStatus != ''">
|
||||
AND case_status = #{caseStatus}
|
||||
AND FIND_IN_SET(case_status, #{caseStatus})
|
||||
</if>
|
||||
<if test="dataCatalog != null and dataCatalog == 'dept'">
|
||||
AND case_flow_type = '1'
|
||||
@ -53,12 +56,19 @@
|
||||
<if test="caseStatusCompareUp != null and caseStatusCompareUp !=''">
|
||||
AND case_status <![CDATA[>=]]> #{caseStatusCompareUp}
|
||||
</if>
|
||||
<if test="startTime != null and startTime !=''">
|
||||
AND gmt_create <![CDATA[>=]]> #{startTime}
|
||||
</if>
|
||||
<if test="endTime != null and endTime !=''">
|
||||
AND gmt_create <![CDATA[<=]]> #{endTime}
|
||||
</if>
|
||||
<if test="modifiedStr != null and modifiedStr !=''">
|
||||
AND gmt_modified <![CDATA[>=]]> #{modifiedStr}
|
||||
</if>
|
||||
<if test="modifiedEnd != null and modifiedEnd !=''">
|
||||
AND gmt_modified <![CDATA[<=]]> #{modifiedEnd}
|
||||
</if>
|
||||
ORDER BY gmt_create DESC
|
||||
</select>
|
||||
|
||||
<select id="listSpecialReportCase" parameterType="map" resultType="map">
|
||||
@ -127,6 +137,8 @@
|
||||
|
||||
<select id="listCaseInMap" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
report_case_id,
|
||||
case_reporter,
|
||||
case_content,
|
||||
case_longitude,
|
||||
case_latitude,
|
||||
@ -134,7 +146,7 @@
|
||||
FROM
|
||||
city_report_case
|
||||
WHERE
|
||||
case_status = '3'
|
||||
case_status = '2'
|
||||
<if test="startTime != null and startTime != ''">
|
||||
AND LEFT(gmt_create, 10) <![CDATA[ >= ]]> #{startTime}
|
||||
</if>
|
||||
@ -164,7 +176,8 @@
|
||||
SELECT
|
||||
t1.*,
|
||||
t2.user_avatar,
|
||||
t2.user_phone
|
||||
t2.user_phone,
|
||||
t2.user_username
|
||||
FROM
|
||||
city_user_location t1
|
||||
INNER JOIN sys_user t2 ON t1.creator = t2.user_id
|
||||
|
@ -308,7 +308,7 @@
|
||||
AND t1.case_type_id = #{caseTypeId}
|
||||
</if>
|
||||
<if test="caseStatus != null and caseStatus != ''">
|
||||
AND t1.case_status = #{caseStatus}
|
||||
AND FIND_IN_SET(t1.case_status, #{caseStatus})
|
||||
</if>
|
||||
<if test="isAccept != null and isAccept != ''">
|
||||
AND t1.is_accept = #{isAccept}
|
||||
|
@ -5,7 +5,7 @@
|
||||
<configuration>
|
||||
|
||||
<settings>
|
||||
<setting name="cacheEnabled" value="true"/>
|
||||
<setting name="cacheEnabled" value="false"/>
|
||||
</settings>
|
||||
|
||||
<typeAliases>
|
||||
|
@ -302,9 +302,6 @@ BaiduMap.prototype.setLabelFontSize = function (size) {
|
||||
}
|
||||
label.show();
|
||||
label.setOffset(new BMap.Size(-label.content.length * size / 2, -size / 2));
|
||||
label.setStyle({
|
||||
fontSize: size + 'px'
|
||||
})
|
||||
}
|
||||
}
|
||||
// 获得Map对象
|
||||
@ -362,10 +359,16 @@ BaiduMap.prototype.setDefaultConfig = function () {
|
||||
// 缩放结束
|
||||
self.map.addEventListener('zoomend', function (event) {
|
||||
var zoom = this.getZoom();
|
||||
if (zoom < 16) {
|
||||
if (zoom < 13) {
|
||||
self.setLabelFontSize(0);
|
||||
} else {
|
||||
} else if (zoom < 15) {
|
||||
self.setLabelFontSize(12);
|
||||
} else if (zoom < 16) {
|
||||
self.setLabelFontSize(14);
|
||||
} else if (zoom < 17) {
|
||||
self.setLabelFontSize(16);
|
||||
} else {
|
||||
self.setLabelFontSize(18);
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -767,7 +770,7 @@ BaiduMap.prototype.initBackgroundGrid = function (option) {
|
||||
border: 'none',
|
||||
backgroundColor: 'transparent',
|
||||
textShadow: '1px 1px 1px #fff, -1px -1px 1px #fff, 1px -1px 1px #fff, -1px 1px 1px #fff',
|
||||
fontSize: '0px'
|
||||
fontSize: self.gridOption.const.LABEL_FONT_SIZE + 'px'
|
||||
});
|
||||
label.setOffset(new BMap.Size(-backgroundGrid.label.length * self.gridOption.const.LABEL_FONT_SIZE / 2, -self.gridOption.const.LABEL_FONT_SIZE / 2));
|
||||
label.setPosition(self.getCenterPoint(backgroundGrid.pointArray));
|
||||
|
@ -0,0 +1,434 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<base href="/servicecity/">
|
||||
<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" 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">
|
||||
<!-- 图片 -->
|
||||
<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{
|
||||
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-fluid layui-anim layui-anim-fadein">
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md12">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<div class="test-table-reload-btn layui-form" style="margin-bottom: 5px;">
|
||||
<div class="layui-inline" id="areaSelectTemplateBox" style="width: 150px;"></div>
|
||||
<script id="areaSelectTemplate" type="text/html">
|
||||
<select id="areaId" name="areaId" lay-filter="changeArea">
|
||||
<option value="">选择街镇</option>
|
||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||
<option value="{{item.dict_id}}">{{item.dict_name}}</option>
|
||||
{{# } }}
|
||||
</select>
|
||||
</script>
|
||||
<div class="layui-inline" id="communityBox" style="width: 150px;"></div>
|
||||
<script id="communityTemplate" type="text/html">
|
||||
<select id="communityId" name="communityId">
|
||||
<option value="">选择社区(村)</option>
|
||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||
<option value="{{item.community_id}}">{{item.community_name}}</option>
|
||||
{{# } }}
|
||||
</select>
|
||||
</script>
|
||||
<div class="layui-inline" id="caseTypeSelectTemplateBox" style="width: 100px;"></div>
|
||||
<script id="caseTypeSelectTemplate" type="text/html">
|
||||
<select id="caseTypeId" name="caseTypeId" lay-filter="changeCaseType">
|
||||
<option value="">案件类型</option>
|
||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||
<option value="{{item.dict_id}}">{{item.dict_name}}</option>
|
||||
{{# } }}
|
||||
</select>
|
||||
</script>
|
||||
<div class="layui-inline" id="childCaseTypeSelectTemplateBox" style="width: 150px;"></div>
|
||||
<script id="childCaseTypeSelectTemplate" type="text/html">
|
||||
<select id="childCaseTypeId" name="childCaseTypeId">
|
||||
<option value="">案件子类型</option>
|
||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||
<option value="{{item.dict_id}}">{{item.dict_name}}</option>
|
||||
{{# } }}
|
||||
</select>
|
||||
</script>
|
||||
<div class="layui-inline" style="width: 150px;">
|
||||
<select id="caseStatus" name="caseStatus">
|
||||
<option value="">案件进度</option>
|
||||
<option value="2">转派中</option>
|
||||
<option value="3">处理中</option>
|
||||
<option value="4">检查中</option>
|
||||
<option value="6">已归档</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<input type="text" id="startTime" class="layui-input search-item"
|
||||
readonly="readonly" placeholder="开始时间" style="height: 38px;width:150px;cursor: pointer" autocomplete="off">
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<input type="text" id="endTime" class="layui-input search-item"
|
||||
readonly="readonly" placeholder="结束时间" style="height: 38px;width:150px;cursor: pointer" autocomplete="off">
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<input type="text" id="caseNumber" class="layui-input search-item" placeholder="案件编号" style="height: 38px;width:150px;" autocomplete="off">
|
||||
</div>
|
||||
<button type="button" id="search" class="layui-btn layui-btn-sm">
|
||||
<i class="fa fa-lg fa-search"></i> 搜索
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<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/jquery-3.5.1.min.js"></script>
|
||||
<script type="text/javascript" src="assets/js/restajax.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', 'dialog'], 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 dialog = layui.dialog;
|
||||
var tableUrl = 'app/data-external-release/list-page-7day-report-case';
|
||||
|
||||
function init() {
|
||||
laydate.render({
|
||||
elem: '#startTime'
|
||||
,value: '',
|
||||
min : -6,
|
||||
max : 0
|
||||
});
|
||||
laydate.render({
|
||||
elem: '#endTime'
|
||||
,value: '',
|
||||
min : -6,
|
||||
max : 0
|
||||
});
|
||||
initArea();
|
||||
initCommunity('');
|
||||
initCaseType();
|
||||
initChildCaseType('');
|
||||
initTable();
|
||||
}
|
||||
init();
|
||||
|
||||
$(document).on('click', '#search', function() {
|
||||
reloadTable(1);
|
||||
});
|
||||
|
||||
// 初始化地区
|
||||
function initArea(){
|
||||
restAjax.get('app/data-external-release/get-area-info-city-dict', {dictParentId: '9d179f05-3ea0-48f7-853c-d3b7124b791c'}, null, function(code, data) {
|
||||
laytpl(document.getElementById('areaSelectTemplate').innerHTML).render(data, function(html) {
|
||||
document.getElementById('areaSelectTemplateBox').innerHTML = html;
|
||||
});
|
||||
form.render('select');
|
||||
}, function(code, data) {
|
||||
dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
|
||||
form.on('select(changeArea)', function(data){
|
||||
initCommunity(data.value);
|
||||
});
|
||||
|
||||
// 初始化社区村
|
||||
function initCommunity(areaId){
|
||||
if(typeof (areaId) === 'undefined' || areaId == ''){
|
||||
laytpl(document.getElementById('communityTemplate').innerHTML).render([], function(html) {
|
||||
document.getElementById('communityBox').innerHTML = html;
|
||||
});
|
||||
form.render('select');
|
||||
return;
|
||||
}
|
||||
restAjax.get('app/data-external-release/get-community-info', {areaId : areaId}, null, function(code, data) {
|
||||
laytpl(document.getElementById('communityTemplate').innerHTML).render(data, function(html) {
|
||||
document.getElementById('communityBox').innerHTML = html;
|
||||
});
|
||||
form.render('select');
|
||||
}, function(code, data) {
|
||||
dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化案件类型
|
||||
function initCaseType(){
|
||||
restAjax.get('app/data-external-release/get-area-info-city-dict', {dictParentId: '46d108b2-4ef9-4f6f-b30c-0c700e3ee852'}, null, function(code, data) {
|
||||
laytpl(document.getElementById('caseTypeSelectTemplate').innerHTML).render(data, function(html) {
|
||||
document.getElementById('caseTypeSelectTemplateBox').innerHTML = html;
|
||||
});
|
||||
form.render('select');
|
||||
}, function(code, data) {
|
||||
dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
|
||||
form.on('select(changeCaseType)',function(data){
|
||||
initChildCaseType(data.value);
|
||||
});
|
||||
|
||||
//初始化子案件类型
|
||||
function initChildCaseType(parentId){
|
||||
if(typeof(parentId) === 'undefined' || '' == parentId){
|
||||
laytpl(document.getElementById('childCaseTypeSelectTemplate').innerHTML).render([], function(html) {
|
||||
document.getElementById('childCaseTypeSelectTemplateBox').innerHTML = html;
|
||||
});
|
||||
form.render('select');
|
||||
return;
|
||||
}
|
||||
restAjax.get('app/data-external-release/get-area-info-city-dict', {dictParentId: parentId}, null, function(code, data) {
|
||||
laytpl(document.getElementById('childCaseTypeSelectTemplate').innerHTML).render(data, function(html) {
|
||||
document.getElementById('childCaseTypeSelectTemplateBox').innerHTML = html;
|
||||
});
|
||||
form.render('select');
|
||||
}, function(code, data) {
|
||||
dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化表格
|
||||
function initTable() {
|
||||
table.render({
|
||||
elem: '#dataTable',
|
||||
id: 'dataTable',
|
||||
url: restAjax.path(tableUrl, []),
|
||||
width: admin.screen() > 1 ? '100%' : '',
|
||||
height: $win.height() - 100,
|
||||
limit: 10,
|
||||
limits: [10, 20, 40, 80, 100, 200],
|
||||
request: {
|
||||
pageName: 'page',
|
||||
limitName: 'rows'
|
||||
},
|
||||
cols: [[
|
||||
{field:'rowNum', width:60, 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="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: 450, title: '案件信息', align: 'center',
|
||||
templet: function (row) {
|
||||
var caseFlowType = row.caseFlowType;
|
||||
if(caseFlowType == '1'){
|
||||
caseFlowType = '(职能部门案件)';
|
||||
} else {
|
||||
caseFlowType = '(街镇案件)'
|
||||
}
|
||||
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">'+ caseFlowType + row.caseTypeName +'</span></div>'+
|
||||
'<div class="info-row"><span class="col-left">操作</span>' +
|
||||
'<span class="col-right">'+
|
||||
'<div class="btn-group btn-group-xs">' +
|
||||
'<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="showEvent">详情</button>'+
|
||||
'<button type="button" class="layui-btn layui-btn-warm layui-btn-sm" lay-event="caseFlowEvent">流程查看</button>'+
|
||||
'</div>'+
|
||||
'</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">'+ 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: 250, 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.reportDate +'</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" style="color: red;">'+ ((row.overDays != null && row.overDays >= 1) ? '【超过'+ row.overDays +'天未处理】' : '') +'</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(){
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 重载表格
|
||||
function reloadTable(currentPage) {
|
||||
table.reload('dataTable', {
|
||||
url: restAjax.path(tableUrl, []),
|
||||
where:{
|
||||
areaId : $('#areaId').val(),
|
||||
communityId : $('#communityId').val(),
|
||||
caseTypeId : $('#childCaseTypeId').val(),
|
||||
caseTypeId : $('#childCaseTypeId').val(),
|
||||
caseStatus : $('#caseStatus').val(),
|
||||
startTime : $('#startTime').val(),
|
||||
endTime : $('#endTime').val(),
|
||||
caseNumber : $('#caseNumber').val()
|
||||
},
|
||||
page: {
|
||||
curr: currentPage
|
||||
},
|
||||
height: $win.height() - 100
|
||||
});
|
||||
}
|
||||
|
||||
// 来源格式化
|
||||
function sourceFormatter(val) {
|
||||
var value;
|
||||
switch (val) {
|
||||
case '1':
|
||||
value = '群众举报';
|
||||
break;
|
||||
case '2':
|
||||
value = '巡检采集';
|
||||
break;
|
||||
case '3':
|
||||
value = '专管员上报';
|
||||
break;
|
||||
default:
|
||||
value = '未知';
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
// 案件状态
|
||||
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;
|
||||
}
|
||||
|
||||
table.on('tool(dataTable)', function(obj) {
|
||||
if(obj.event === 'showEvent'){
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '详情',
|
||||
closeBtn: 1,
|
||||
area: ['70%', '80%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: restAjax.path('route/bigdata/show.html?reportCaseId={id}',
|
||||
[obj.data.reportCaseId]),
|
||||
end: function() {
|
||||
}
|
||||
});
|
||||
}
|
||||
if(obj.event === 'caseFlowEvent'){
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '案件流程',
|
||||
closeBtn: 1,
|
||||
area: ['70%', '80%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/bigdata/list_case_log.html?reportCaseId={id}',
|
||||
[obj.data.reportCaseId]),
|
||||
end: function() {
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,99 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<base href="/servicecity/">
|
||||
<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-fluid 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', 'dialog', 'restajax'], 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 dialog = layui.dialog;
|
||||
var restAjax = layui.restajax;
|
||||
var tableUrl = 'app/data-external-release/list-grade-ratio';
|
||||
|
||||
function init(){
|
||||
initTable();
|
||||
}
|
||||
init();
|
||||
|
||||
// 初始化表格
|
||||
function initTable() {
|
||||
table.render({
|
||||
elem: '#dataTable',
|
||||
id: 'dataTable',
|
||||
url: restAjax.path(tableUrl, []),
|
||||
width: admin.screen() > 1 ? '100%' : '',
|
||||
height: $win.height() - 50,
|
||||
toolbar: true,
|
||||
defaultToolbar: ['print', 'exports'],
|
||||
cols: [[
|
||||
{field:'case_reporter', width:180, title: '上报人', align:'center'},
|
||||
{field:'gmt_create', width:180, title: '处理时间', align:'center'},
|
||||
{field:'case_content', width:300, title: '上报内容', align:'left'},
|
||||
{width:300, title: '街道社区', align:'left',
|
||||
templet: function(row) {
|
||||
if(typeof (row['area_name']) === 'undefined' || row['area_name'] === ''){
|
||||
return '';
|
||||
}
|
||||
return row['area_name'] + '-' + row['community_name'];
|
||||
}
|
||||
},
|
||||
{field:'grade', width:180, title: '满意度(满5分)', align:'center',
|
||||
templet: function(row) {
|
||||
if(typeof (row['grade']) === 'undefined' || row['grade'] == '0'){
|
||||
return '3分';
|
||||
}
|
||||
if(row['grade'].length > 5){
|
||||
return row['grade'] + '%';
|
||||
}
|
||||
return row['grade'] + '分';
|
||||
}
|
||||
}
|
||||
]],
|
||||
page: false,
|
||||
parseData: function(data) {
|
||||
return {
|
||||
'code': 0,
|
||||
'msg': '',
|
||||
'count': data.total,
|
||||
'data': data.rows
|
||||
};
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -157,13 +157,12 @@
|
||||
return rowData;
|
||||
}
|
||||
},*/
|
||||
{field: 'gmtCreate', width: 190, title: '上报时间', align:'center',
|
||||
{field: 'gmtCreate', width: 190, title: '位置记录时间', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
rowData = gmtCreateFormatter(rowData, row);
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
@ -190,7 +189,7 @@
|
||||
|
||||
function showUserLocation(creator, lng, lat) {
|
||||
dialog.open({
|
||||
url: restAjax.path('route/userlocation/map_location.html?userId={userId}&lng={lng}&lat={lat}', [creator, lng, lat]),
|
||||
url: restAjax.path('route/bigdata/show_user_location.html?userId={userId}&lng={lng}&lat={lat}', [creator, lng, lat]),
|
||||
title: '查看位置',
|
||||
width: '600px',
|
||||
height: '550px',
|
||||
@ -214,43 +213,6 @@
|
||||
return value;
|
||||
}
|
||||
|
||||
// 操作栏格式
|
||||
function formatterOperation(val, row) {
|
||||
return '<div class="btn-group btn-group-xs">'+
|
||||
'<button type="button" class="btn btn-danger" onclick="remove(\''+ row.userLocationId +'\')">删除</button>'+
|
||||
'</div>';
|
||||
}
|
||||
function getTableUrl() {
|
||||
var url = restAjax.path('api/userlocation/listpageuserlocation', []);
|
||||
var keywords = $('#keywords').val();
|
||||
var params = '?t='+ new Date().getTime();
|
||||
if('' != keywords) {
|
||||
params += '&keywords='+ encodeURI(keywords);
|
||||
}
|
||||
if('' == $('#date').val()) {
|
||||
$('#date').val(formatterDate(new Date()));
|
||||
}
|
||||
if('' == $('#startTime').val()) {
|
||||
$('#startTime').val('00:00:00');
|
||||
}
|
||||
if('' == $('#endTime').val()) {
|
||||
$('#endTime').val('23:59:59');
|
||||
}
|
||||
var date = $('#date').val();
|
||||
var startTime = $('#startTime').val();
|
||||
var endTime = $('#endTime').val();
|
||||
if('' != date) {
|
||||
params += '&date='+ date;
|
||||
}
|
||||
if('' != startTime) {
|
||||
params += '&startTime='+ startTime;
|
||||
}
|
||||
if('' != endTime) {
|
||||
params += '&endTime='+ endTime;
|
||||
}
|
||||
return url + params;
|
||||
}
|
||||
|
||||
// 事件 - 搜索
|
||||
$(document).on('click', '#search', function() {
|
||||
loadTable(1);
|
||||
|
@ -0,0 +1,108 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<base href="/servicecity/">
|
||||
<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-fluid 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', 'dialog', 'restajax'], 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 dialog = layui.dialog;
|
||||
var restAjax = layui.restajax;
|
||||
var tableUrl = 'app/data-external-release/list-report-case-month';
|
||||
|
||||
function init(){
|
||||
initTable();
|
||||
}
|
||||
init();
|
||||
|
||||
// 初始化表格
|
||||
function initTable() {
|
||||
table.render({
|
||||
elem: '#dataTable',
|
||||
id: 'dataTable',
|
||||
url: restAjax.path(tableUrl, []),
|
||||
width: admin.screen() > 1 ? '100%' : '',
|
||||
height: $win.height() - 100,
|
||||
toolbar: true,
|
||||
defaultToolbar: ['print', 'exports'],
|
||||
cols: [[
|
||||
{field:'yearMonth', width:180, title: '年/月份', align:'center'},
|
||||
{field:'totalCount', width:100, title: '上报总数', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
return rowData + '件';
|
||||
}
|
||||
},
|
||||
{field:'xiapai', width:180, title: '下派中', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
return rowData + '件';
|
||||
}
|
||||
},
|
||||
{field:'chuli', width:180, title: '处理中', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
return rowData + '件';
|
||||
}
|
||||
},
|
||||
{field:'jiancha', width:180, title: '检查中', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
return rowData + '件';
|
||||
}
|
||||
},
|
||||
{field:'guidang', width:180, title: '已归档', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
return rowData + '件';
|
||||
}
|
||||
},
|
||||
]],
|
||||
page: false,
|
||||
parseData: function(data) {
|
||||
return {
|
||||
'code': 0,
|
||||
'msg': '',
|
||||
'count': data.total,
|
||||
'data': data.rows
|
||||
};
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
118
src/main/resources/static/route/bigdata/show_user_location.html
Normal file
118
src/main/resources/static/route/bigdata/show_user_location.html
Normal file
@ -0,0 +1,118 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<base href="/servicecity/">
|
||||
<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"/>
|
||||
<style type="text/css">
|
||||
html, body{width: 100%; height: 100%; margin: 0; padding: 0;}
|
||||
#app {width: 100%; height: 100%;}
|
||||
#mapContainer {width: 100%; height: 100%;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app">
|
||||
<div id="mapContainer"></div>
|
||||
</div>
|
||||
<script type="text/javascript" src="http://api.map.baidu.com/api?v=3.0&ak=oWU9RD4ihDHAafexgI6XOrTK8lDatRju"></script>
|
||||
<script type="text/javascript" src="assets/js/jquery-3.5.1.min.js"></script>
|
||||
<script type="text/javascript" src="assets/js/vue.min.js"></script>
|
||||
<script type="text/javascript" src="assets/js/common.js"></script>
|
||||
<script type="text/javascript" src="assets/js/baidu-map-0.0.1.min.js"></script>
|
||||
<script type="text/javascript" src="assets/js/restajax.js"></script>
|
||||
<script type="text/javascript">
|
||||
var hrefParams = restAjax.params(window.location.href);
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
map: null,
|
||||
userId: hrefParams.userId,
|
||||
center: {
|
||||
lng: hrefParams.lng,
|
||||
lat: hrefParams.lat
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
addAreaLabel: function(content, lng, lat) {
|
||||
var self = this;
|
||||
var label = new BMap.Label('<div>' + content + '</div>', {
|
||||
position: new BMap.Point(lng, lat),
|
||||
offset: new BMap.Size(-content.length * 6, -10)
|
||||
});
|
||||
label.setStyle({
|
||||
backgroundColor: 'none',
|
||||
border: 'none',
|
||||
color: 'black',
|
||||
fontSize: '12px',
|
||||
height: '20px',
|
||||
lineHeight: '20px',
|
||||
textShadow: '0 0 5px #FFF',
|
||||
fontWeight: 'bold'
|
||||
});
|
||||
self.map.map.addOverlay(label);
|
||||
},
|
||||
// 初始化人员地区
|
||||
initUserArea: function() {
|
||||
var self = this;
|
||||
restAjax.get(restAjax.path('app/data-external-release/list-user-and-points-by-userids-by-grid-service', []), {
|
||||
userIds: self.userId
|
||||
}, null, function(code, data) {
|
||||
if (data.length == 0) {
|
||||
return;
|
||||
}
|
||||
var allPoints = [];
|
||||
for(var i = 0, points = data[i]; points = data[i++];) {
|
||||
var pointArray = [];
|
||||
for (var j = 0, item = points.pointArray[j]; item = points.pointArray[j++];) {
|
||||
allPoints.push({
|
||||
lng: item.lng,
|
||||
lat: item.lat
|
||||
});
|
||||
pointArray.push(new BaiduMap.Point(item.lng, item.lat));
|
||||
}
|
||||
// 展示默认背景
|
||||
self.map.initBackgroundGrid({
|
||||
gridArray: [
|
||||
{
|
||||
id: points.gridId,
|
||||
label: points.gridName,
|
||||
fillColor: points.fillColor,
|
||||
pointArray: pointArray
|
||||
}
|
||||
]
|
||||
});
|
||||
self.addAreaLabel(points.gridName, points.lng, points.lat);
|
||||
}
|
||||
allPoints.push(self.center);
|
||||
self.map.map.setViewport(allPoints);
|
||||
}, function(code, data) {
|
||||
top.DialogBox.msg(data.msg);
|
||||
});
|
||||
},
|
||||
initMap: function() {
|
||||
// 初始化地图
|
||||
this.map = new BaiduMap('mapContainer', {
|
||||
|
||||
});
|
||||
this.map.setCenterAndZoom({
|
||||
lng: this.center.lng,
|
||||
lat: this.center.lat
|
||||
}, 15);
|
||||
// 必须
|
||||
this.map.setDefaultConfig();
|
||||
|
||||
this.initUserArea();
|
||||
|
||||
var marker = new BMap.Marker(new BMap.Point(this.center.lng, this.center.lat));
|
||||
this.map.map.addOverlay(marker);
|
||||
marker.setAnimation(BMAP_ANIMATION_BOUNCE);
|
||||
}
|
||||
},
|
||||
mounted: function() {
|
||||
this.initMap();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -28,8 +28,8 @@
|
||||
<button type="button" id="search" class="layui-btn layui-btn-sm">
|
||||
<i class="fa fa-lg fa-search"></i> 搜索
|
||||
</button>
|
||||
<button type="button" id="data-repair" class="layui-btn layui-btn-normal layui-btn-sm">
|
||||
<i class="fa fa-lg fa-exchange"></i> 数据同步
|
||||
<button type="button" id="repair-data" class="layui-btn layui-btn-normal layui-btn-sm">
|
||||
<i class="fa fa-lg fa-exchange"></i> 数据更新
|
||||
</button>
|
||||
</div>
|
||||
<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
|
||||
@ -165,11 +165,11 @@
|
||||
});
|
||||
|
||||
// 数据同步按钮事件
|
||||
$(document).on('click', '#data-repair', function(){
|
||||
$(document).on('click', '#repair-data', function(){
|
||||
var loadIndex = layer.load(1);
|
||||
top.restAjax.get('app/dev-test/release/data-repair', {}, null, function(code, data) {
|
||||
top.restAjax.get('app/data-external-release/repair-data', {}, null, function(code, data) {
|
||||
layer.close(loadIndex);
|
||||
layer.msg('同步完成');
|
||||
layer.msg('执行完成');
|
||||
}, function(code, data) {
|
||||
layer.close(loadIndex);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user