From d2ccca3bf4ddaf0628c61faf01c998bd48d46c86 Mon Sep 17 00:00:00 2001 From: wanggeng <450292408@qq.com> Date: Mon, 20 Feb 2023 15:42:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E7=BD=91=E6=A0=BC=E5=91=98?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 46 +++++++ .../BindingDepartmentServiceServiceImpl.java | 126 +++++++++--------- .../impl/CommunityBossServiceImpl.java | 48 ++++--- src/main/resources/application-btgxq.yml | 4 +- .../route/bigdata/list-case-info-ajlx.html | 20 +-- .../reportcase/list_community_assign.html | 14 ++ .../route/reportcase/select-N-person.html | 23 +++- 7 files changed, 182 insertions(+), 99 deletions(-) diff --git a/pom.xml b/pom.xml index d705730..db1bbc0 100644 --- a/pom.xml +++ b/pom.xml @@ -175,8 +175,54 @@ + org.springframework.boot spring-boot-maven-plugin + + ZIP + + + non-exists + non-exists + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + copy-dependencies + package + + copy-dependencies + + + + target/lib + false + false + runtime + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + **/*.properties + **/*.xml + **/*.yml + static/** + templates/** + mybatis/** + + diff --git a/src/main/java/com/cm/systemcity/service/bindingdepartment/impl/BindingDepartmentServiceServiceImpl.java b/src/main/java/com/cm/systemcity/service/bindingdepartment/impl/BindingDepartmentServiceServiceImpl.java index 3ec3a41..0b805be 100644 --- a/src/main/java/com/cm/systemcity/service/bindingdepartment/impl/BindingDepartmentServiceServiceImpl.java +++ b/src/main/java/com/cm/systemcity/service/bindingdepartment/impl/BindingDepartmentServiceServiceImpl.java @@ -22,7 +22,6 @@ import com.cm.systemcity.pojo.dtos.areapoints.GridAndPointsDTO; import com.cm.systemcity.pojo.dtos.bindingdepartment.BindingDepartmentDTO; import com.cm.systemcity.pojo.dtos.bindingdepartment.DepartmentDTO; import com.cm.systemcity.pojo.dtos.community.CommunityDTO; -import com.cm.systemcity.pojo.dtos.communityboss.CommunityBossDTO; import com.cm.systemcity.pojo.dtos.dict.DictDTO; import com.cm.systemcity.pojo.dtos.reportcase.ReportCaseDTO; import com.cm.systemcity.pojo.dtos.userpoints.UserDTO; @@ -41,6 +40,7 @@ import java.util.*; /** * 案件类型绑定部门Impl + * * @author xwangs * @create 2020-10-27 16:52 * @description @@ -50,10 +50,10 @@ public class BindingDepartmentServiceServiceImpl extends BaseService implements @Autowired private IBindingDepartmentDao bindingDepartmentDao; - + @Autowired private IDepartmentService departmentService; - + @Autowired private IUserService userService; @Autowired @@ -72,14 +72,14 @@ public class BindingDepartmentServiceServiceImpl extends BaseService implements PageHelper.startPage(page.getPage(), page.getRows()); List dtos = bindingDepartmentDao.listBindingDepartment(page.getParams()); Map params = new HashMap<>(4); - for(BindingDepartmentDTO item : dtos){ + for (BindingDepartmentDTO item : dtos) { params.put("departmentIds", item.getDepartmentId()); List> deptList = bindingDepartmentDao.listDepartment(params); item.setDepartmentName(deptList == null ? "" : deptList.get(0).get("departmentName").toString()); - if(item.getAreaId() != null){ + if (item.getAreaId() != null) { String[] areaIds = item.getAreaId().split(","); String areaNames = ""; - for (String str : areaIds){ + for (String str : areaIds) { params.clear(); params.put("dictId", str); DictDTO dict = dictService.getDict(params); @@ -89,15 +89,15 @@ public class BindingDepartmentServiceServiceImpl extends BaseService implements } } PageInfo pageInfo = new PageInfo<>(dtos); - return new SuccessResultList(dtos,pageInfo.getPageNum(),pageInfo.getTotal()); + return new SuccessResultList(dtos, pageInfo.getPageNum(), pageInfo.getTotal()); } @Override public List listAllDepartment(Map params) { - params.put("parentId","0"); + params.put("parentId", "0"); JSONArray array = departmentService.listDepartments(params); List dtos = new ArrayList<>(); - for(int i = 0; i < array.size(); i++){ + for (int i = 0; i < array.size(); i++) { DepartmentDTO dto = new DepartmentDTO(); JSONObject obj = array.getJSONObject(i); dto.setDepartmentId(obj.getString("id")); @@ -111,7 +111,7 @@ public class BindingDepartmentServiceServiceImpl extends BaseService implements public SuccessResult save(BindingDepartmentDTO dto) throws Exception { Map param = HashMapUtil.beanToMap(dto); String bindingDepartmentId = UUIDUtil.getUUID(); - param.put("bindingDepartmentId",bindingDepartmentId); + param.put("bindingDepartmentId", bindingDepartmentId); setSaveInfo(param); bindingDepartmentDao.save(param); return new SuccessResult(); @@ -129,7 +129,7 @@ public class BindingDepartmentServiceServiceImpl extends BaseService implements @Override public BindingDepartmentDTO getBindingDepartmentByCaseType(String caseTypeId) { Map params = getHashMap(4); - params.put("caseType",caseTypeId); + params.put("caseType", caseTypeId); return bindingDepartmentDao.getBindingDepartment(params); } @@ -140,16 +140,16 @@ public class BindingDepartmentServiceServiceImpl extends BaseService implements } @Override - public UserDTO getDepartmentUserReturnOne(String departmentId,String token) { + public UserDTO getDepartmentUserReturnOne(String departmentId, String token) { List roles = new ArrayList<>(); //N员角色 roles.add("bc405346-8714-4ded-89ac-9cc4d755f66a"); List userDepartmentResourceBOS = userService.listUserDepartmentResourceByRoleIds(roles); List userDTOList = new ArrayList<>(); - for(UserDepartmentResourceBO bo : userDepartmentResourceBOS){ + for (UserDepartmentResourceBO bo : userDepartmentResourceBOS) { List departmentList = bo.getDepartments(); - for(DepartmentResourceBO departmentItem : departmentList){ - if(departmentId.equals(departmentItem.getDepartmentId())){ + for (DepartmentResourceBO departmentItem : departmentList) { + if (departmentId.equals(departmentItem.getDepartmentId())) { UserDTO item = new UserDTO(); item.setUserId(bo.getUserId()); item.setUserName(bo.getUserName()); @@ -158,10 +158,10 @@ public class BindingDepartmentServiceServiceImpl extends BaseService implements } } } - if(userDTOList.size() == 0){ + if (userDTOList.size() == 0) { return null; } - if(userDTOList.size() > 1){ + if (userDTOList.size() > 1) { Random r = new Random(); int randNum = r.nextInt(userDTOList.size()); return userDTOList.get(randNum); @@ -173,7 +173,7 @@ public class BindingDepartmentServiceServiceImpl extends BaseService implements public List getCaseTypeDepartmentUsers(Map params) { String caseTypeId = params.get("caseTypeId").toString(); BindingDepartmentDTO departmentDTO = getBindingDepartmentByCaseType(caseTypeId); - if(departmentDTO == null){ + if (departmentDTO == null) { return new ArrayList<>(); } //N员角色 @@ -181,10 +181,10 @@ public class BindingDepartmentServiceServiceImpl extends BaseService implements roles.add("bc405346-8714-4ded-89ac-9cc4d755f66a"); List userDepartmentResourceBOS = userService.listUserDepartmentResourceByRoleIds(roles); List userDTOList = new ArrayList<>(); - for(UserDepartmentResourceBO bo : userDepartmentResourceBOS){ + for (UserDepartmentResourceBO bo : userDepartmentResourceBOS) { List departmentList = bo.getDepartments(); - for(DepartmentResourceBO departmentItem : departmentList){ - if(departmentDTO.getDepartmentId().equals(departmentItem.getDepartmentId())){ + for (DepartmentResourceBO departmentItem : departmentList) { + if (departmentDTO.getDepartmentId().equals(departmentItem.getDepartmentId())) { UserDTO item = new UserDTO(); item.setUserId(bo.getUserId()); item.setUserName(bo.getUserName()); @@ -200,11 +200,11 @@ public class BindingDepartmentServiceServiceImpl extends BaseService implements public List listDepartmentForMainPanel(Map query) { List list = bindingDepartmentDao.listDepartmentForMainPanel(query); List resList = new ArrayList<>(); - for (DepartmentSortDTO item : list){ + for (DepartmentSortDTO item : list) { // 剔除街道 剔除委办局中网格办 - if( !"f0bf2d8a-e736-4895-a9c8-80f530068c3a".equals(item.getDepartmentId()) + if (!"f0bf2d8a-e736-4895-a9c8-80f530068c3a".equals(item.getDepartmentId()) && !"52fecef4-f0f5-4077-999c-39db09872718".equals(item.getDepartmentId()) - && !"1a9b5a0c-d842-46ff-b0c5-36a29b9055df".equals(item.getDepartmentId())){ + && !"1a9b5a0c-d842-46ff-b0c5-36a29b9055df".equals(item.getDepartmentId())) { resList.add(item); } } @@ -237,17 +237,17 @@ public class BindingDepartmentServiceServiceImpl extends BaseService implements // 先查找部门 List> deptList = bindingDepartmentDao.listDepartment(params); List> nPersonDept = new ArrayList<>(); - for (Map item : deptList){ - if(!"f0bf2d8a-e736-4895-a9c8-80f530068c3a".equals(item.get("departmentId")) + for (Map item : deptList) { + if (!"f0bf2d8a-e736-4895-a9c8-80f530068c3a".equals(item.get("departmentId")) && !"52fecef4-f0f5-4077-999c-39db09872718".equals(item.get("departmentId")) && !"1a9b5a0c-d842-46ff-b0c5-36a29b9055df".equals(item.get("departmentId")) - && !"1066b4d1-8d72-4b35-ba1a-f59c54eba021".equals(item.get("departmentId"))){ + && !"1066b4d1-8d72-4b35-ba1a-f59c54eba021".equals(item.get("departmentId"))) { nPersonDept.add(item); } } // 处理职能部门 List zTreeDTOS = new ArrayList<>(); - for (Map item : nPersonDept){ + for (Map item : nPersonDept) { ZTreeDTO zTreeDTO = new ZTreeDTO(); zTreeDTO.setpId("0"); zTreeDTO.setId(item.get("departmentId").toString()); @@ -256,17 +256,17 @@ public class BindingDepartmentServiceServiceImpl extends BaseService implements zTreeDTOS.add(zTreeDTO); } // 根据当前案件类型匹配职能部门优先情况 - if(params.get("reportCaseId") != null && !"".equals(params.get("reportCaseId").toString())){ + if (params.get("reportCaseId") != null && !"".equals(params.get("reportCaseId").toString())) { Map query = new HashMap<>(0); query.put("reportCaseId", params.get("reportCaseId").toString()); ReportCaseDTO reportCase = reportCaseDao.getReportCase(query); query.put("caseType", reportCase.getCaseTypeId()); query.put("areaId", reportCase.getAreaId()); List list = bindingDepartmentDao.listBindingDepartmentByCaseType(query); - for(BindingDepartmentDTO item : list){ + for (BindingDepartmentDTO item : list) { String departmentId = item.getDepartmentId(); - for(ZTreeDTO treeNode : zTreeDTOS){ - if(departmentId.equals(treeNode.getId())){ + for (ZTreeDTO treeNode : zTreeDTOS) { + if (departmentId.equals(treeNode.getId())) { treeNode.setName(treeNode.getName() + "---->【优先分派】"); break; } @@ -310,26 +310,26 @@ public class BindingDepartmentServiceServiceImpl extends BaseService implements public List listAreaCommunityTree(Map params) { List zTreeDTOS = new ArrayList<>(); ReportCaseDTO reportCase = null; - if(params.get("reportCaseId") !=null && !"".equals(params.get("reportCaseId").toString())){ + if (params.get("reportCaseId") != null && !"".equals(params.get("reportCaseId").toString())) { Map query = new HashMap<>(4); String reportCaseId = params.get("reportCaseId").toString(); query.put("reportCaseId", reportCaseId); reportCase = reportCaseDao.getReportCase(query); } - if(params.get("id") == null && reportCase != null){ + if (params.get("id") == null && reportCase != null) { // 从字典表中查询街镇 params.put("dictParentId", "9d179f05-3ea0-48f7-853c-d3b7124b791c"); List dictDTOS = dictService.listDict(params); - for (DictDTO item : dictDTOS){ + for (DictDTO item : dictDTOS) { // 剔除掉画网格添加的专管员区域节点 - if("e64a0a05-45ca-4452-a869-a4dcbff74593".equals(item.getDictId())){ + if ("e64a0a05-45ca-4452-a869-a4dcbff74593".equals(item.getDictId())) { continue; } ZTreeDTO zTreeDTO = new ZTreeDTO(); zTreeDTO.setpId("0"); zTreeDTO.setId(item.getDictId()); zTreeDTO.setName(item.getDictName()); - if(reportCase.getAreaId().equals(item.getDictId())){ + if (reportCase.getAreaId().equals(item.getDictId())) { zTreeDTO.setName(item.getDictName() + "---->【优先分派】"); } zTreeDTO.setIsParent(true); @@ -337,17 +337,17 @@ public class BindingDepartmentServiceServiceImpl extends BaseService implements } return zTreeDTOS; } - if(params.get("id") != null && params.get("id").toString().length() > 0){ + if (params.get("id") != null && params.get("id").toString().length() > 0) { // 从社区表中查询社区列表 Map query = new HashMap<>(4); query.put("areaId", params.get("id").toString()); List communityDTOS = communityService.listCommunity(query); - for(CommunityDTO item : communityDTOS){ + for (CommunityDTO item : communityDTOS) { ZTreeDTO zTreeDTO = new ZTreeDTO(); zTreeDTO.setpId(params.get("id").toString()); zTreeDTO.setId(item.getCommunityId()); zTreeDTO.setName(item.getCommunityName()); - if(reportCase.getCommunityId().equals(item.getCommunityId())){ + if (reportCase.getCommunityId().equals(item.getCommunityId())) { zTreeDTO.setName(item.getCommunityName() + "---->【优先分派】"); } zTreeDTO.setIsParent(false); @@ -362,44 +362,44 @@ public class BindingDepartmentServiceServiceImpl extends BaseService implements public List listGridUser(Map params) { List userDTOList = new ArrayList<>(); // 查询四级网格长 - params.put("communityBossLevel","3"); + params.put("communityBossLevel", "3"); List> userList4 = reportCaseDao.listUserFromCommunityBoss(params); - for (Map u : userList4){ + for (Map u : userList4) { UserDTO userDTO = new UserDTO(); userDTO.setPrefixUserName("(4级网格长) "); userDTO.setUserId(u.get("userId").toString()); userDTO.setUserName(u.get("userName").toString()); userDTO.setPhone(u.get("userPhone") == null ? "" : u.get("userPhone").toString()); - if(u.get("userPhone") == null || "".equals(u.get("userPhone").toString())){ + if (u.get("userPhone") == null || "".equals(u.get("userPhone").toString())) { userDTO.setPhone(u.get("userUsername") == null ? "" : u.get("userUsername").toString()); } userDTO.setUserAvatar(u.get("userAvatar") == null ? "" : u.get("userAvatar").toString()); userDTOList.add(userDTO); } // 查询五级网格员 - params.put("communityBossLevel","4"); + params.put("communityBossLevel", "4"); List> userList5 = reportCaseDao.listUserFromCommunityBoss(params); - for (Map u : userList5){ + for (Map u : userList5) { UserDTO userDTO = new UserDTO(); userDTO.setPrefixUserName("(5级网格员) "); userDTO.setUserId(u.get("userId").toString()); userDTO.setUserName(u.get("userName").toString()); userDTO.setPhone(u.get("userPhone") == null ? "" : u.get("userPhone").toString()); - if(u.get("userPhone") == null || "".equals(u.get("userPhone").toString())){ + if (u.get("userPhone") == null || "".equals(u.get("userPhone").toString())) { userDTO.setPhone(u.get("userUsername") == null ? "" : u.get("userUsername").toString()); } userDTO.setUserAvatar(u.get("userAvatar") == null ? "" : u.get("userAvatar").toString()); userDTOList.add(userDTO); } // 根据当前案件定位 匹配网格人员优先情况 - if(params.get("reportCaseId") != null && !"".equals(params.get("reportCaseId").toString())) { + if (params.get("reportCaseId") != null && !"".equals(params.get("reportCaseId").toString())) { Map query = new HashMap<>(0); String reportCaseId = params.get("reportCaseId").toString(); query.put("reportCaseId", reportCaseId); ReportCaseDTO reportCase = reportCaseDao.getReportCase(query); // 查询网格员片区 List userLinkList = new LinkedList<>(); - for(UserDTO item : userDTOList){ + for (UserDTO item : userDTOList) { query.put("userId", item.getUserId()); List gridList = userPointsService.listUserGrid(query); if (gridList.isEmpty()) { @@ -408,7 +408,7 @@ public class BindingDepartmentServiceServiceImpl extends BaseService implements } boolean addFirst = false; for (GridAndPointsDTO pointItem : gridList) { - if(pointItem.getAreaPoints().size() == 0){ + if (pointItem.getAreaPoints().size() == 0) { continue; } boolean flag = isOverstep(Double.parseDouble(reportCase.getCaseLongitude()), @@ -420,7 +420,7 @@ public class BindingDepartmentServiceServiceImpl extends BaseService implements break; } } - if(addFirst){ + if (addFirst) { ((LinkedList) userLinkList).addFirst(item); } else { userLinkList.add(item); @@ -436,7 +436,7 @@ public class BindingDepartmentServiceServiceImpl extends BaseService implements List userList = new ArrayList<>(); // 查询部门所有专管员 List> nPersonList = reportCaseDao.listUserByDeptId(params.get("id").toString()); - for(Map u : nPersonList){ + for (Map u : nPersonList) { UserDTO userDTO = new UserDTO(); userDTO.setUserId(u.get("userId") == null ? "" : u.get("userId").toString()); userDTO.setUserName(u.get("userName") == null ? "" : u.get("userName").toString()); @@ -446,14 +446,14 @@ public class BindingDepartmentServiceServiceImpl extends BaseService implements userList.add(userDTO); } // 根据当前案件定位 匹配专管员优先情况 - if(params.get("reportCaseId") != null && !"".equals(params.get("reportCaseId").toString())){ - Map query = new HashMap<>(0); + if (params.get("reportCaseId") != null && !"".equals(params.get("reportCaseId").toString())) { String reportCaseId = params.get("reportCaseId").toString(); - query.put("reportCaseId",reportCaseId); + Map query = new HashMap<>(0); + query.put("reportCaseId", reportCaseId); ReportCaseDTO reportCase = reportCaseDao.getReportCase(query); // 查询专管员片区 List userLinkList = new LinkedList<>(); - for(UserDTO item : userList){ + for (UserDTO item : userList) { query.put("userId", item.getUserId()); List gridList = userPointsService.listUserGrid(query); if (gridList.isEmpty()) { @@ -462,7 +462,7 @@ public class BindingDepartmentServiceServiceImpl extends BaseService implements } boolean addFirst = false; for (GridAndPointsDTO pointItem : gridList) { - if(pointItem.getAreaPoints().size() == 0){ + if (pointItem.getAreaPoints().size() == 0) { continue; } boolean flag = isOverstep(Double.parseDouble(reportCase.getCaseLongitude()), @@ -474,7 +474,7 @@ public class BindingDepartmentServiceServiceImpl extends BaseService implements break; } } - if(addFirst){ + if (addFirst) { ((LinkedList) userLinkList).addFirst(item); } else { userLinkList.add(item); @@ -538,27 +538,27 @@ public class BindingDepartmentServiceServiceImpl extends BaseService implements public SuccessResultList>> listPageNPerson(ListPage page) { Map params = page.getParams(); String departmentId = "0"; - if(params.get("departmentId") != null){ + if (params.get("departmentId") != null) { departmentId = params.get("departmentId").toString(); } PageHelper.startPage(page.getPage(), page.getRows()); List> nPersonList = reportCaseDao.listUserByDeptId(departmentId); PageInfo> pageInfo = new PageInfo<>(nPersonList); - return new SuccessResultList(nPersonList,pageInfo.getPageNum(),pageInfo.getTotal()); + return new SuccessResultList(nPersonList, pageInfo.getPageNum(), pageInfo.getTotal()); } @Override public List> listNPerson(Map params) { String departmentId = ""; - if(params.get("departmentId") != null - && params.get("departmentId").toString().length() > 0){ + if (params.get("departmentId") != null + && params.get("departmentId").toString().length() > 0) { departmentId = params.get("departmentId").toString(); } Map query = new HashMap<>(8); query.put("departmentId", departmentId); List> list = bindingDepartmentDao.listNPerson(params); - for(Map item : list){ - if(item.get("relationId") != null && item.get("relationId").toString().length() > 0){ + for (Map item : list) { + if (item.get("relationId") != null && item.get("relationId").toString().length() > 0) { item.put("userName", "[有网格] " + item.get("userName").toString()); } } diff --git a/src/main/java/com/cm/systemcity/service/communityboss/impl/CommunityBossServiceImpl.java b/src/main/java/com/cm/systemcity/service/communityboss/impl/CommunityBossServiceImpl.java index e2efc34..dfd350a 100755 --- a/src/main/java/com/cm/systemcity/service/communityboss/impl/CommunityBossServiceImpl.java +++ b/src/main/java/com/cm/systemcity/service/communityboss/impl/CommunityBossServiceImpl.java @@ -17,7 +17,6 @@ import com.cm.common.utils.UUIDUtil; import com.cm.plugin.map.service.IGridService; import com.cm.systemcity.dao.bindingdepartment.IBindingDepartmentDao; import com.cm.systemcity.dao.communityboss.ICommunityBossDao; -import com.cm.systemcity.dao.userlocation.IUserLocationDao; import com.cm.systemcity.dao.userpoints.IUserPointsDao; import com.cm.systemcity.enums.MongoCollections; import com.cm.systemcity.pojo.dtos.citybuilding.CityBuildingDTO; @@ -26,7 +25,6 @@ import com.cm.systemcity.pojo.dtos.community.CommunityDTO; import com.cm.systemcity.pojo.dtos.communityboss.CommunityBossAreaDTO; import com.cm.systemcity.pojo.dtos.communityboss.CommunityBossDTO; import com.cm.systemcity.pojo.pos.communityboss.CommunityBossPO; -import com.cm.systemcity.service.bindingdepartment.IBindingDepartmentService; import com.cm.systemcity.service.citybuilding.ICityBuildingService; import com.cm.systemcity.service.citydistrict.ICityDistrictService; import com.cm.systemcity.service.community.ICommunityService; @@ -40,7 +38,6 @@ import org.springframework.data.mongodb.core.MongoTemplate; import org.springframework.data.mongodb.core.query.Query; import org.springframework.stereotype.Service; -import java.nio.channels.SelectableChannel; import java.util.*; /** @@ -88,12 +85,12 @@ public class CommunityBossServiceImpl extends AbstractService implements ICommun Map saveMap = new HashMap<>(8); saveMap.put("communityBossId", communityBossId); saveMap.put("communityBossUserId", params.get("communityBossUserId").toString()); - saveMap.put("communityBossParentId",params.get("communityBossParentId").toString()); - saveMap.put("communityBossParentUserId",params.get("communityBossParentUserId").toString()); - saveMap.put("communityBossLevel",params.get("communityBossLevel").toString()); - saveMap.put("areaId",params.get("areaId").toString()); - saveMap.put("areaName",params.get("areaName").toString()); - saveMap.put("gridSummary",params.get("gridSummary").toString()); + saveMap.put("communityBossParentId", params.get("communityBossParentId").toString()); + saveMap.put("communityBossParentUserId", params.get("communityBossParentUserId").toString()); + saveMap.put("communityBossLevel", params.get("communityBossLevel").toString()); + saveMap.put("areaId", params.get("areaId").toString()); + saveMap.put("areaName", params.get("areaName").toString()); + saveMap.put("gridSummary", params.get("gridSummary").toString()); setSaveInfo(saveMap); communityBossDao.saveCommunityBoss(saveMap); // 三级网格长开始需要绑定社区关系 @@ -119,7 +116,7 @@ public class CommunityBossServiceImpl extends AbstractService implements ICommun List list = Arrays.asList(params.get("communityBossIds").toString().split("_")); Map query = new HashMap<>(8); // 查询当前删除的人是否还有其他网格身份,如果没有,将该人员下所有片区删除 - for (String communityBossId : list){ + for (String communityBossId : list) { // 查询用户ID query.clear(); query.put("communityBossId", communityBossId); @@ -139,7 +136,7 @@ public class CommunityBossServiceImpl extends AbstractService implements ICommun communityBossUserIds.add(communityBossUserId); query.put("communityBossUserIds", communityBossUserIds); List communityBossDTOS = communityBossService.listCommunityBoss(query); - if(communityBossDTOS == null || communityBossDTOS.size() == 0){ + if (communityBossDTOS == null || communityBossDTOS.size() == 0) { // 若没有其他网格身份,删除所有片区 List userIds = new ArrayList<>(); userIds.add(communityBoss.getCommunityBossId()); @@ -149,7 +146,7 @@ public class CommunityBossServiceImpl extends AbstractService implements ICommun List> gridList = userPointsDao.listMapGrid(query); // 将查询到的所有网格删掉 List delArray = new ArrayList<>(); - for(Map delItem : gridList ){ + for (Map delItem : gridList) { String delGridId = delItem.get("grid_id").toString(); delArray.add(delGridId); gridService.deleteGridByGridIds(delArray); @@ -166,13 +163,13 @@ public class CommunityBossServiceImpl extends AbstractService implements ICommun setUpdateInfo(params); communityBossDao.updateCommunityBoss(params); // 处理网格人员社区绑定关系 - if(params.get("communityId") != null && params.get("communityId").toString().length() > 0){ + if (params.get("communityId") != null && params.get("communityId").toString().length() > 0) { Map query = new HashMap<>(8); query.put("communityBossId", params.get("communityBossId").toString()); query.put("communityId", params.get("communityId").toString()); // 先查询 查不到新增,查得到修改 Map bindInfo = bindDao.getCommunityAndGridUserBind(params); - if(bindInfo == null && bindInfo.get("community_boss_id") == null){ + if (bindInfo == null && bindInfo.get("community_boss_id") == null) { bindDao.saveCommunityAndGridUserBind(query); } else { bindDao.updateCommunityAndGridUserBind(query); @@ -337,8 +334,15 @@ public class CommunityBossServiceImpl extends AbstractService implements ICommun @Override public List listCommunityBoss(Map params) throws SearchException { List list = communityBossDao.listCommunityBoss(params); - for(CommunityBossDTO item : list){ + for (int i = 0; i < list.size(); i++) { + CommunityBossDTO item = list.get(i); Map currentUser = bindDao.getSysUserById(item.getCommunityBossUserId()); + if (currentUser == null) { + LOG.error("网格员不存在,username, 【{}】, userId【{}】", item.getCommunityBossName(), item.getCommunityBossPhone(), item.getCommunityBossId()); + list.remove(i); + i--; + continue; + } item.setCommunityBossName(currentUser.get("user_name").toString()); item.setCommunityBossUsername(currentUser.get("user_username").toString()); item.setCommunityBossPhone(currentUser.get("user_phone").toString()); @@ -346,7 +350,7 @@ public class CommunityBossServiceImpl extends AbstractService implements ICommun Map parentUser = bindDao.getSysUserById(item.getCommunityBossParentUserId()); item.setCommunityBossParentName(parentUser == null ? "" : parentUser.get("user_name").toString()); // 设置社区(村) - if(item.getCommunityId() != null && item.getCommunityId().length() > 0){ + if (item.getCommunityId() != null && item.getCommunityId().length() > 0) { params.clear(); params.put("communityId", item.getCommunityId()); CommunityDTO community = communityService.getCommunity(params); @@ -395,13 +399,13 @@ public class CommunityBossServiceImpl extends AbstractService implements ICommun String areaId = ""; String communityId = ""; String communityBossLevel = ""; - if(params.get("areaId") != null && params.get("areaId").toString().length() != 0){ + if (params.get("areaId") != null && params.get("areaId").toString().length() != 0) { areaId = params.get("areaId").toString(); } - if(params.get("communityId") != null && params.get("communityId").toString().length() != 0){ + if (params.get("communityId") != null && params.get("communityId").toString().length() != 0) { communityId = params.get("communityId").toString(); } - if(params.get("communityBossLevel") != null && params.get("communityBossLevel").toString().length() != 0){ + if (params.get("communityBossLevel") != null && params.get("communityBossLevel").toString().length() != 0) { communityBossLevel = params.get("communityBossLevel").toString(); } Map query = new HashMap<>(); @@ -409,17 +413,17 @@ public class CommunityBossServiceImpl extends AbstractService implements ICommun query.put("communityId", communityId); query.put("communityBossLevel", communityBossLevel); List> gridUserList = communityBossDao.listGridUser(query); - if(gridUserList == null || gridUserList.size() == 0){ + if (gridUserList == null || gridUserList.size() == 0) { return new ArrayList<>(0); } List list = new ArrayList<>(); - for (Map item : gridUserList){ + for (Map item : gridUserList) { query.put("userId", item.get("community_boss_user_id").toString()); List> relationGridList = userPointsDao.listUserGrid(query); CommunityBossDTO gridUser = new CommunityBossDTO(); gridUser.setCommunityBossName(item.get("user_name").toString()); - if(relationGridList != null && relationGridList.size() > 0){ + if (relationGridList != null && relationGridList.size() > 0) { gridUser.setCommunityBossName("[有网格] " + item.get("user_name").toString()); } gridUser.setCommunityBossUserId(item.get("community_boss_user_id").toString()); diff --git a/src/main/resources/application-btgxq.yml b/src/main/resources/application-btgxq.yml index 95ff0b3..6c3721e 100644 --- a/src/main/resources/application-btgxq.yml +++ b/src/main/resources/application-btgxq.yml @@ -24,7 +24,7 @@ spring: max-request-size: 1GB datasource: druid: - url: jdbc:mysql://127.0.0.1:3306/db_btgxq_usercenter?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&autoReconnect=true&failOverReadOnly=false&useSSL=false + url: jdbc:mysql://192.168.0.103:3306/db_btgxq_city?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&autoReconnect=true&failOverReadOnly=false&useSSL=false db-type: mysql driver-class-name: com.mysql.jdbc.Driver username: root @@ -55,7 +55,7 @@ spring: config: classpath:ehcache.xml data: mongodb: - uri: mongodb://city:city@127.0.0.1:27017/systemcity + uri: mongodb://city:city@192.168.0.103:27017/systemcity # 数据库 mybatis: diff --git a/src/main/resources/static/route/bigdata/list-case-info-ajlx.html b/src/main/resources/static/route/bigdata/list-case-info-ajlx.html index dd59a49..89215b8 100644 --- a/src/main/resources/static/route/bigdata/list-case-info-ajlx.html +++ b/src/main/resources/static/route/bigdata/list-case-info-ajlx.html @@ -144,14 +144,18 @@ initCommunity(''); initCaseType(); initChildCaseType(''); - restAjax.get('app/data-external-release/get-report-case-by-number/' + caseNumber, {}, null, function(code, data) { - if(typeof (data['caseFlowType']) != 'undefined' && data['caseFlowType'] != ''){ - $('#caseFlowType').val(data['caseFlowType']); - initTable(); - } - form.render('select'); - }, function(code, data) { - }); + if(caseNumber) { + restAjax.get('app/data-external-release/get-report-case-by-number/' + caseNumber, {}, null, function(code, data) { + if(typeof (data['caseFlowType']) != 'undefined' && data['caseFlowType'] != ''){ + $('#caseFlowType').val(data['caseFlowType']); + initTable(); + } + form.render('select'); + }, function(code, data) { + }); + } else { + initTable(); + } } init(); diff --git a/src/main/resources/static/route/reportcase/list_community_assign.html b/src/main/resources/static/route/reportcase/list_community_assign.html index 825c935..6b608fb 100644 --- a/src/main/resources/static/route/reportcase/list_community_assign.html +++ b/src/main/resources/static/route/reportcase/list_community_assign.html @@ -112,6 +112,20 @@ $('#areaId').val(areaId); $('#areaName').val(areaName); + layer.open({ + type: 2, + title: '案件转派', + closeBtn: 1, + area: ['50%', '80%'], + shadeClose: false, + shade : 0.3, + anim: 2, + content: top.restAjax.path('route/reportcase/case_assign.html?reportCaseId=0208cfb8-07fa-478c-8c65-80a944371e04', []), + end: function() { + reloadTable(); + } + }); + // 初始化表格 function initTable() { dataLoading = true; diff --git a/src/main/resources/static/route/reportcase/select-N-person.html b/src/main/resources/static/route/reportcase/select-N-person.html index 05b517d..a4f62b1 100644 --- a/src/main/resources/static/route/reportcase/select-N-person.html +++ b/src/main/resources/static/route/reportcase/select-N-person.html @@ -22,6 +22,12 @@ background-color: #009688; border-color: #009688; } + .selector-tree-wrapper { + overflow: auto; + } + .selector-body-wrapper { + overflow: auto; + } @@ -43,7 +49,7 @@ -
+
@@ -56,8 +62,10 @@ +