From eb582339ce743bfebdb4ae7f8be1a2776c337b00 Mon Sep 17 00:00:00 2001 From: TS-QD1 Date: Thu, 23 Mar 2023 18:14:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BD=91=E6=A0=BC=E5=91=98?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=92=8C=E9=80=89=E6=8B=A9=E7=9A=84=E4=B8=80?= =?UTF-8?q?=E4=BA=9B=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 6 - .../controller/apis/kpi/KpiController.java | 29 -- .../com/cm/systemcity/dao/kpi/IKpiDao.java | 19 -- .../pojo/pos/kpi/CommunityBossDayCountPO.java | 21 -- .../BindingDepartmentServiceServiceImpl.java | 4 +- .../impl/CommunityBossServiceImpl.java | 44 +-- .../systemcity/service/kpi/IKpiService.java | 15 - .../service/kpi/impl/KpiServiceImpl.java | 99 ------ .../java/com/cm/systemcity/utils/KpiUtil.java | 89 ------ .../mybatis/mapper/kpi/kpi-mapper.xml | 90 ------ .../route/communityboss/list_level2.html | 17 +- .../route/communityboss/list_level3.html | 27 +- .../route/communityboss/list_level4.html | 2 +- .../route/communityboss/save-level2.html | 1 - .../route/communityboss/save-level3.html | 13 +- .../route/communityboss/save-level4.html | 11 +- .../route/communityboss/update-level2.html | 277 +++++++++++++++++ .../route/communityboss/update-level3.html | 288 ++++++++++++++++++ .../route/communityboss/update-level4.html | 38 +-- .../reportcase/case_community_assign.html | 9 +- .../reportcase/list_community_assign.html | 26 +- .../reportcase/select-street-person.html | 13 +- 22 files changed, 651 insertions(+), 487 deletions(-) delete mode 100644 src/main/java/com/cm/systemcity/controller/apis/kpi/KpiController.java delete mode 100644 src/main/java/com/cm/systemcity/dao/kpi/IKpiDao.java delete mode 100644 src/main/java/com/cm/systemcity/pojo/pos/kpi/CommunityBossDayCountPO.java delete mode 100644 src/main/java/com/cm/systemcity/service/kpi/IKpiService.java delete mode 100644 src/main/java/com/cm/systemcity/service/kpi/impl/KpiServiceImpl.java delete mode 100644 src/main/java/com/cm/systemcity/utils/KpiUtil.java delete mode 100644 src/main/resources/mybatis/mapper/kpi/kpi-mapper.xml create mode 100644 src/main/resources/static/route/communityboss/update-level2.html create mode 100644 src/main/resources/static/route/communityboss/update-level3.html diff --git a/pom.xml b/pom.xml index 841ce6e..db1bbc0 100644 --- a/pom.xml +++ b/pom.xml @@ -170,12 +170,6 @@ junit test - - com.alibaba - tools - 1.8.0 - compile - diff --git a/src/main/java/com/cm/systemcity/controller/apis/kpi/KpiController.java b/src/main/java/com/cm/systemcity/controller/apis/kpi/KpiController.java deleted file mode 100644 index 0456914..0000000 --- a/src/main/java/com/cm/systemcity/controller/apis/kpi/KpiController.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.cm.systemcity.controller.apis.kpi; - -import com.cm.common.base.AbstractController; -import com.cm.common.constants.ISystemConstant; -import com.cm.common.result.SuccessResult; -import com.cm.common.result.SuccessResultData; -import com.cm.systemcity.service.kpi.IKpiService; -import io.swagger.annotations.Api; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -@Api(tags = ISystemConstant.API_TAGS_SYSTEM_PREFIX + "网格员接口") -@RestController -@RequestMapping(ISystemConstant.API_PREFIX + "/kpi") -public class KpiController extends AbstractController { - - @Autowired - private IKpiService kpiService; - - @GetMapping("update-community-boss-day-count/{level}") - public SuccessResultData updateCommunityBossDayCount(@PathVariable("level") Integer level, - @RequestParam("dayDate") String dayDate) { - long startTime = System.currentTimeMillis(); - kpiService.updateCommunityBossDayCount(dayDate, level); - long endTime = System.currentTimeMillis(); - return new SuccessResultData<>("used "+ (endTime - startTime) +" ms"); - } - -} diff --git a/src/main/java/com/cm/systemcity/dao/kpi/IKpiDao.java b/src/main/java/com/cm/systemcity/dao/kpi/IKpiDao.java deleted file mode 100644 index 6196ac7..0000000 --- a/src/main/java/com/cm/systemcity/dao/kpi/IKpiDao.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.cm.systemcity.dao.kpi; - -import com.cm.systemcity.pojo.pos.kpi.CommunityBossDayCountPO; -import org.springframework.stereotype.Repository; - -import java.util.Map; - -@Repository -public interface IKpiDao { - - void saveCommunityBossDayCount(Map params); - - void deleteCommunityBossDayCount(Map params); - - void updateCommunityBossDayCount(Map params); - - CommunityBossDayCountPO getCommunityBossDayCountPO(Map params); - -} diff --git a/src/main/java/com/cm/systemcity/pojo/pos/kpi/CommunityBossDayCountPO.java b/src/main/java/com/cm/systemcity/pojo/pos/kpi/CommunityBossDayCountPO.java deleted file mode 100644 index e12b460..0000000 --- a/src/main/java/com/cm/systemcity/pojo/pos/kpi/CommunityBossDayCountPO.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.cm.systemcity.pojo.pos.kpi; - -import lombok.Data; -import lombok.ToString; - -@Data -@ToString -public class CommunityBossDayCountPO { - - private Long id; - private String userId; - private String dayDate; - private Integer isSignin; - private Integer isSigninLate; - private Integer isSignout; - private Integer isSignoutEarly; - private Double workDistance; - private Integer savePopulationCount; - private Integer updatePopulationCount; - -} 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 0b805be..85ba24a 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 @@ -330,7 +330,7 @@ public class BindingDepartmentServiceServiceImpl extends BaseService implements zTreeDTO.setId(item.getDictId()); zTreeDTO.setName(item.getDictName()); if (reportCase.getAreaId().equals(item.getDictId())) { - zTreeDTO.setName(item.getDictName() + "---->【优先分派】"); + zTreeDTO.setName("【优先】" + item.getDictName()); } zTreeDTO.setIsParent(true); zTreeDTOS.add(zTreeDTO); @@ -348,7 +348,7 @@ public class BindingDepartmentServiceServiceImpl extends BaseService implements zTreeDTO.setId(item.getCommunityId()); zTreeDTO.setName(item.getCommunityName()); if (reportCase.getCommunityId().equals(item.getCommunityId())) { - zTreeDTO.setName(item.getCommunityName() + "---->【优先分派】"); + zTreeDTO.setName("【优先】" + item.getCommunityName()); } zTreeDTO.setIsParent(false); zTreeDTOS.add(zTreeDTO); 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 10d4b0e..8632909 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 @@ -115,46 +115,10 @@ public class CommunityBossServiceImpl extends AbstractService implements ICommun public SuccessResult removeCommunityBoss(Map params) throws RemoveException { List list = Arrays.asList(params.get("communityBossIds").toString().split("_")); Map query = new HashMap<>(8); - // 查询当前删除的人是否还有其他网格身份,如果没有,将该人员下所有片区删除 - for (String communityBossId : list) { - // 查询用户ID - query.clear(); - query.put("communityBossId", communityBossId); - CommunityBossDTO communityBoss = communityBossDao.getCommunityBoss(query); - // 执行删除 - query.clear(); - List communityBossIds = new ArrayList<>(); - communityBossIds.add(communityBossId); - query.put("communityBossIds", communityBossIds); - setUpdateInfo(query); - communityBossDao.removeCommunityBoss(query); - communityBossDao.deleteCommunityAndGridUserBind(query); - // 其他网格身份 - query.clear(); - String communityBossUserId = communityBoss.getCommunityBossUserId(); - List communityBossUserIds = new ArrayList<>(); - communityBossUserIds.add(communityBossUserId); - query.put("communityBossUserIds", communityBossUserIds); - List communityBossDTOS = communityBossService.listCommunityBoss(query); - if (communityBossDTOS == null || communityBossDTOS.size() == 0) { - // 若没有其他网格身份,删除所有片区 - List userIds = new ArrayList<>(); - userIds.add(communityBoss.getCommunityBossId()); - userIds.add(communityBoss.getCommunityBossUserId()); - query.clear(); - query.put("userIds", StringUtils.join(userIds, ",")); - List> gridList = userPointsDao.listMapGrid(query); - // 将查询到的所有网格删掉 - List delArray = new ArrayList<>(); - for (Map delItem : gridList) { - String delGridId = delItem.get("grid_id").toString(); - delArray.add(delGridId); - gridService.deleteGridByGridIds(delArray); - } - } - } - // TODO mongoDb缓存 - // clearCommunityBossCollection(); + query.put("communityBossIds", list); + setUpdateInfo(query); + // 不删除网格 + removeCommunityBoss(query); return new SuccessResult(); } diff --git a/src/main/java/com/cm/systemcity/service/kpi/IKpiService.java b/src/main/java/com/cm/systemcity/service/kpi/IKpiService.java deleted file mode 100644 index 71689fa..0000000 --- a/src/main/java/com/cm/systemcity/service/kpi/IKpiService.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.cm.systemcity.service.kpi; - -/** - * 绩效考核 - */ -public interface IKpiService { - - /** - * 更新4、5级网格员日统计 - * @param date - */ - void updateCommunityBossDayCount(String date, int level); - - -} diff --git a/src/main/java/com/cm/systemcity/service/kpi/impl/KpiServiceImpl.java b/src/main/java/com/cm/systemcity/service/kpi/impl/KpiServiceImpl.java deleted file mode 100644 index 73c3cc4..0000000 --- a/src/main/java/com/cm/systemcity/service/kpi/impl/KpiServiceImpl.java +++ /dev/null @@ -1,99 +0,0 @@ -package com.cm.systemcity.service.kpi.impl; - -import com.cm.systemcity.dao.kpi.IKpiDao; -import com.cm.systemcity.pojo.dtos.communityboss.CommunityBossDTO; -import com.cm.systemcity.pojo.dtos.usersignin.UserSigninDTO; -import com.cm.systemcity.pojo.dtos.usersignout.UserSignoutDTO; -import com.cm.systemcity.pojo.pos.kpi.CommunityBossDayCountPO; -import com.cm.systemcity.pojo.pos.userlocation.UserLocationPO; -import com.cm.systemcity.service.communityboss.ICommunityBossService; -import com.cm.systemcity.service.kpi.IKpiService; -import com.cm.systemcity.service.userlocation.IUserLocationService; -import com.cm.systemcity.service.usersignin.IUserSigninService; -import com.cm.systemcity.service.usersignout.IUserSignoutService; -import com.cm.systemcity.utils.KpiUtil; -import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; - -@Service -public class KpiServiceImpl implements IKpiService { - - @Autowired - private IKpiDao kpiDao; - @Autowired - private ICommunityBossService communityBossService; - @Autowired - private IUserSigninService userSigninService; - @Autowired - private IUserSignoutService userSignoutService; - @Autowired - private IUserLocationService userLocationService; - - @Override - public void updateCommunityBossDayCount(String date, int level) { - // communityBoss表中的level位1-4,对应的是2-5级网格员 - final int communityBossLevel = level - 1; - List communityBoss4DTOList = communityBossService.listCommunityBossByLevel(communityBossLevel); - List userIds = communityBoss4DTOList.stream().map(CommunityBossDTO::getCommunityBossUserId).filter(StringUtils::isNotBlank).collect(Collectors.toList()); - Map> userSigninMap = KpiUtil.mapSignIn(userSigninService, userIds, date); - Map> userSignoutMap = KpiUtil.mapSignOut(userSignoutService, userIds, date); - // 删除当日数据 - deleteCommunityBossDayCount(date, communityBossLevel); - communityBoss4DTOList.forEach(communityBossDTO -> { - String userId = communityBossDTO.getCommunityBossUserId(); - List userSigninDTOS = userSigninMap.get(userId); - int isSignin = userSigninDTOS == null || userSigninDTOS.size() == 0 ? 0 : 1; - int isSigninLate = userSigninDTOS == null || userSigninDTOS.size() == 0 ? 0 : Integer.parseInt(userSigninDTOS.get(0).getIsLate()); - List userSignoutDTOS = userSignoutMap.get(userId); - int isSignout = userSignoutDTOS == null || userSignoutDTOS.size() == 0 ? 0 : 1; - int isSignoutEarly = userSignoutDTOS == null || userSignoutDTOS.size() == 0 ? 0 : Integer.parseInt(userSignoutDTOS.get(0).getIsEarly()); - double workDistance = KpiUtil.calculateWorkDistance(userLocationService, userId, date); - double savePopulationCount = 0; - double updatePopulationCount = 0; - // 新增 - Map params = new HashMap<>(); - params.put("userId", userId); - params.put("dayDate", date); - params.put("isSignin", isSignin); - params.put("isSigninLate", isSigninLate); - params.put("isSignout", isSignout); - params.put("isSignoutEarly", isSignoutEarly); - params.put("workDistance", workDistance); - params.put("savePopulationCount", savePopulationCount); - params.put("updatePopulationCount", updatePopulationCount); - params.put("level", communityBossLevel); - kpiDao.saveCommunityBossDayCount(params); - }); - } - - private void deleteCommunityBossDayCount(String date, int level) { - Map params = new HashMap<>(4); - params.put("dayDate", date); - params.put("level", level); - kpiDao.deleteCommunityBossDayCount(params); - } - - /** - * 网格员日统计 - * - * @param userId - * @param date - * @param level - * @return - */ - private CommunityBossDayCountPO getCommunityBossDayCountPO(String userId, String date, int level) { - Map params = new HashMap<>(8); - params.put("userId", userId); - params.put("dayDate", date); - params.put("level", level); - return kpiDao.getCommunityBossDayCountPO(params); - } - - -} diff --git a/src/main/java/com/cm/systemcity/utils/KpiUtil.java b/src/main/java/com/cm/systemcity/utils/KpiUtil.java deleted file mode 100644 index cd56e3c..0000000 --- a/src/main/java/com/cm/systemcity/utils/KpiUtil.java +++ /dev/null @@ -1,89 +0,0 @@ -package com.cm.systemcity.utils; - -import com.cm.common.utils.point.Point; -import com.cm.common.utils.point.PointUtil; -import com.cm.systemcity.pojo.dtos.usersignin.UserSigninDTO; -import com.cm.systemcity.pojo.dtos.usersignout.UserSignoutDTO; -import com.cm.systemcity.pojo.pos.userlocation.UserLocationPO; -import com.cm.systemcity.service.userlocation.IUserLocationService; -import com.cm.systemcity.service.usersignin.IUserSigninService; -import com.cm.systemcity.service.usersignout.IUserSignoutService; -import org.apache.commons.lang3.StringUtils; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class KpiUtil { - - /** - * 签到map - * - * @param userSigninService - * @param userIds - * @return - */ - public static Map> mapSignIn(IUserSigninService userSigninService, List userIds, String day) { - List userSigninDTOS = userSigninService.listUserSignInByUserIdsAndDay(userIds, day); - Map> userSigninMap = new HashMap<>(); - userSigninDTOS.forEach(userSigninDTO -> { - List userSigninDTOList = userSigninMap.get(userSigninDTO.getUserId()); - if (userSigninDTOList == null) { - userSigninDTOList = new ArrayList<>(); - } - userSigninDTOList.add(userSigninDTO); - userSigninMap.put(userSigninDTO.getCreator(), userSigninDTOList); - }); - return userSigninMap; - } - - /** - * 签退map - * - * @param userSignoutService - * @param userIds - * @return - */ - public static Map> mapSignOut(IUserSignoutService userSignoutService, List userIds, String day) { - List userSignoutDTOS = userSignoutService.listUserSignOutByUserIdsAndDay(userIds, day); - Map> userSigninMap = new HashMap<>(); - userSignoutDTOS.forEach(userSignoutDTO -> { - List userSignoutDTOList = userSigninMap.get(userSignoutDTO.getUserId()); - if (userSignoutDTOList == null) { - userSignoutDTOList = new ArrayList<>(); - } - userSignoutDTOList.add(userSignoutDTO); - userSigninMap.put(userSignoutDTO.getCreator(), userSignoutDTOList); - }); - return userSigninMap; - } - - /** - * 计算工作距离 - * - * @param userLocationService - * @param userId - * @param day af535c78-f0ba-4ccf-891b-cf7c6e42e9e8 - * @return - */ - public static Double calculateWorkDistance(IUserLocationService userLocationService, String userId, String day) { - double workDistance = 0D; - if(!StringUtils.equals(userId, "af535c78-f0ba-4ccf-891b-cf7c6e42e9e8")) { - return workDistance; - } - List userLocationPOS = userLocationService.listUserLocationPOByUserIdAndDate(userId, day); - Point tempPoint = null; - for (UserLocationPO userLocationPO : userLocationPOS) { - Point point = new Point(Double.parseDouble(userLocationPO.getUserLatitude()), Double.parseDouble(userLocationPO.getUserLongitude())); - if (tempPoint == null) { - tempPoint = point; - continue; - } - workDistance += PointUtil.getDistance(tempPoint, point); - tempPoint = point; - } - return workDistance; - } - -} diff --git a/src/main/resources/mybatis/mapper/kpi/kpi-mapper.xml b/src/main/resources/mybatis/mapper/kpi/kpi-mapper.xml deleted file mode 100644 index 0f37265..0000000 --- a/src/main/resources/mybatis/mapper/kpi/kpi-mapper.xml +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - - - - - - - - - - - - - - INSERT INTO kpi_community_boss_${level}_day_count( - user_id, - day_date, - is_signin, - is_signin_late, - is_signout, - is_signout_early, - work_distance, - save_population_count, - update_population_count - ) VALUES ( - #{userId}, - #{dayDate}, - #{isSignin}, - #{isSigninLate}, - #{isSignout}, - #{isSignoutEarly}, - #{workDistance}, - #{savePopulationCount}, - #{updatePopulationCount} - ) - - - - - DELETE FROM - kpi_community_boss_${level}_day_count - WHERE - day_date = #{dayDate} - - - - - UPDATE - kpi_community_boss_${level}_day_count - SET - is_signin = #{isSignin}, - is_signin_late = #{isSigninLate}, - is_signout = #{isSignout}, - is_signout_early = #{isSignoutEarly}, - work_distance = #{workDistance}, - save_population_count = #{savePopulationCount}, - update_population_count = #{updatePopulationCount} - WHERE - user_id = #{userId} - AND - day_date = #{dayDate} - - - - - - \ No newline at end of file diff --git a/src/main/resources/static/route/communityboss/list_level2.html b/src/main/resources/static/route/communityboss/list_level2.html index e84db39..50c297a 100755 --- a/src/main/resources/static/route/communityboss/list_level2.html +++ b/src/main/resources/static/route/communityboss/list_level2.html @@ -27,8 +27,7 @@
- +
+ + @@ -201,12 +206,12 @@ function update(id) { layer.open({ type: 2, - title: false, + title: '修改三级网格长', closeBtn: 0, - area: ['100%', '100%'], - shadeClose: true, + area: ['50%', '70%'], + shadeClose: false, anim: 2, - content: top.restAjax.path('route/communityboss/update.html?communityBossId={id}', [id]), + content: top.restAjax.path('route/communityboss/update-level2.html?communityBossId={id}', [id]), end: function() { reloadTable(1); } diff --git a/src/main/resources/static/route/communityboss/list_level3.html b/src/main/resources/static/route/communityboss/list_level3.html index cf0aa30..6d65cfd 100755 --- a/src/main/resources/static/route/communityboss/list_level3.html +++ b/src/main/resources/static/route/communityboss/list_level3.html @@ -41,9 +41,9 @@ - + @@ -92,18 +92,6 @@ } initArea(); - // 社区列表格式化 - function communitiesFormatter(val, row) { - var value = ''; - for(var i = 0, item = val[i]; item = val[i++];) { - if(value.length > 0) { - value += ',' - } - value += item.communityName; - } - return value; - } - // 新增 function save() { layer.open({ @@ -124,12 +112,12 @@ function update(id) { layer.open({ type: 2, - title: false, + title: '修改四级网格长', closeBtn: 0, - area: ['100%', '100%'], - shadeClose: true, + area: ['50%', '70%'], + shadeClose: false, anim: 2, - content: top.restAjax.path('route/communityboss/update.html?communityBossId={id}', [id]), + content: top.restAjax.path('route/communityboss/update-level3.html?communityBossId={id}', [id]), end: function() { reloadTable(1); } @@ -230,13 +218,12 @@ return rowData; } }, - {field: 'communities', width: 200, title: '社区', align:'center', + {field: 'communityNames', width: 200, title: '社区', align:'center', templet: function(row) { var rowData = row[this.field]; if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { return '-'; } - rowData = communitiesFormatter(rowData); return rowData; } }, diff --git a/src/main/resources/static/route/communityboss/list_level4.html b/src/main/resources/static/route/communityboss/list_level4.html index ec605d4..8e311e9 100644 --- a/src/main/resources/static/route/communityboss/list_level4.html +++ b/src/main/resources/static/route/communityboss/list_level4.html @@ -31,7 +31,7 @@ diff --git a/src/main/resources/static/route/communityboss/save-level2.html b/src/main/resources/static/route/communityboss/save-level2.html index ee461b5..f21c5ec 100644 --- a/src/main/resources/static/route/communityboss/save-level2.html +++ b/src/main/resources/static/route/communityboss/save-level2.html @@ -195,7 +195,6 @@ document.getElementById('parentGridBox').innerHTML = html; }); form.render(); - console.log(data); }, function(code, data) { top.dialog.msg(data.msg); }); diff --git a/src/main/resources/static/route/communityboss/save-level3.html b/src/main/resources/static/route/communityboss/save-level3.html index 030a9f5..81fdbb8 100644 --- a/src/main/resources/static/route/communityboss/save-level3.html +++ b/src/main/resources/static/route/communityboss/save-level3.html @@ -9,6 +9,9 @@ +
@@ -174,12 +177,13 @@ // 选择社区 form.on('select(communityChange)', function(data) { formObject.communityId = data.value; - initCommunityBossParentSelect(data.value == '' ? '' : data.value); + initCommunityBossParentSelect(data.value); }); // 初始化上级网格长 function initCommunityBossParentSelect(selectValue) { - if(typeof (selectValue) === 'undefined' || selectValue == ''){ + var areaId = $('#areaId').val() + if(!areaId){ laytpl(document.getElementById('parentGridTemplate').innerHTML).render([], function(html) { document.getElementById('parentGridBox').innerHTML = html; }); @@ -188,15 +192,14 @@ } top.restAjax.get(top.restAjax.path('api/communityboss/listcommunityboss', []), { - areaId: formObject.areaId, - communityId: selectValue, + areaId: areaId, + communityId: selectValue ? selectValue : '', communityBossLevel: communityBossLevel -1 }, null, function(code, data, args) { laytpl(document.getElementById('parentGridTemplate').innerHTML).render(data, function(html) { document.getElementById('parentGridBox').innerHTML = html; }); form.render(); - console.log(data); }, function(code, data) { top.dialog.msg(data.msg); }); diff --git a/src/main/resources/static/route/communityboss/save-level4.html b/src/main/resources/static/route/communityboss/save-level4.html index b8a2e6f..d810bfb 100644 --- a/src/main/resources/static/route/communityboss/save-level4.html +++ b/src/main/resources/static/route/communityboss/save-level4.html @@ -179,24 +179,23 @@ // 初始化上级网格长 function initCommunityBossParentSelect(selectValue) { - if(typeof (selectValue) === 'undefined' || selectValue == ''){ + var areaId = $('#areaId').val(); + if(!areaId) { laytpl(document.getElementById('parentGridTemplate').innerHTML).render([], function(html) { document.getElementById('parentGridBox').innerHTML = html; }); form.render(); return; } - top.restAjax.get(top.restAjax.path('api/communityboss/listcommunityboss', []), - { - areaId: formObject.areaId, - communityId: selectValue, + top.restAjax.get(top.restAjax.path('api/communityboss/listcommunityboss', []), { + areaId: areaId, + communityId: selectValue ? selectValue : '', communityBossLevel: communityBossLevel -1 }, null, function(code, data, args) { laytpl(document.getElementById('parentGridTemplate').innerHTML).render(data, function(html) { document.getElementById('parentGridBox').innerHTML = html; }); form.render(); - console.log(data); }, function(code, data) { top.dialog.msg(data.msg); }); diff --git a/src/main/resources/static/route/communityboss/update-level2.html b/src/main/resources/static/route/communityboss/update-level2.html new file mode 100644 index 0000000..31f7982 --- /dev/null +++ b/src/main/resources/static/route/communityboss/update-level2.html @@ -0,0 +1,277 @@ + + + + + + + + + + + + + + +
+
+
+
+
+
+ +
+
+
+ +
+ +
+ +
+ + +
+
+ +
+
+ +
+ +
+ +
+ +
+
+ +
+
+ +
+
+
+
+
+
+ + + + \ No newline at end of file diff --git a/src/main/resources/static/route/communityboss/update-level3.html b/src/main/resources/static/route/communityboss/update-level3.html new file mode 100644 index 0000000..69d6498 --- /dev/null +++ b/src/main/resources/static/route/communityboss/update-level3.html @@ -0,0 +1,288 @@ + + + + + + + + + + + + + + +
+
+
+
+
+
+ +
+ +
+
+ +
+
+
+ +
+ +
+ +
+ + +
+
+ +
+ +
+ +
+
+ +
+
+ +
+
+
+
+
+
+ + + + \ No newline at end of file diff --git a/src/main/resources/static/route/communityboss/update-level4.html b/src/main/resources/static/route/communityboss/update-level4.html index e5eaacf..29dae2d 100644 --- a/src/main/resources/static/route/communityboss/update-level4.html +++ b/src/main/resources/static/route/communityboss/update-level4.html @@ -132,12 +132,12 @@ for(var i in data) { dataFormData[i] = data[i]; } - formObject.areaId = dataFormData['areaId']; - formObject.communityId = dataFormData['communityId']; - initAreaSelect(formObject.areaId); - initCommunitySelect(formObject.areaId, formObject.communityId); + initAreaSelect(dataFormData['areaId'], function() { + initCommunitySelect(dataFormData['areaId'], dataFormData['communityId'], function () { + initCommunityBossParentSelect(dataFormData['communityId'], dataFormData['communityBossParentId']); + }); + }); form.val('dataForm', dataFormData); - initCommunityBossParentSelect(formObject.communityId, dataFormData['communityBossParentId']); form.render(); }, function(code, data) { top.dialog.msg(data.msg); @@ -146,13 +146,14 @@ init(); // 初始化街镇 - function initAreaSelect(selectValue) { + function initAreaSelect(selectValue, callback) { top.restAjax.get(top.restAjax.path('api/dict/listdict/9d179f05-3ea0-48f7-853c-d3b7124b791c', []), {}, null, function(code, data, args) { laytpl(document.getElementById('areaSelectTemplate').innerHTML).render(data, function(html) { document.getElementById('areaSelectBox').innerHTML = html; }); - form.val('dataForm', {areaId : selectValue}); + form.val('dataForm', {areaId: selectValue}); form.render(); + callback(); }, function(code, data) { top.dialog.msg(data.msg); }); @@ -160,15 +161,13 @@ // 选择街道 form.on('select(areaChange)', function(data) { - formObject.areaId = data.value; - initCommunitySelect(data.value == '' ? '' : data.value, ''); - formObject.communityId = ''; + initCommunitySelect(data.value); initCommunityBossParentSelect('',''); }); // 初始化社区 - function initCommunitySelect(areaId, selectValue) { - if(typeof (areaId) === 'undefined' || areaId == ''){ + function initCommunitySelect(areaId, selectValue, callback) { + if(!areaId){ laytpl(document.getElementById('communityTemplate').innerHTML).render([], function(html) { document.getElementById('communityBox').innerHTML = html; }); @@ -179,8 +178,9 @@ laytpl(document.getElementById('communityTemplate').innerHTML).render(data, function(html) { document.getElementById('communityBox').innerHTML = html; }); - form.val('dataForm', {communityId : selectValue}); + form.val('dataForm', {communityId: selectValue}); form.render(); + callback(); }, function(code, data) { top.dialog.msg(data.msg); }); @@ -189,22 +189,22 @@ // 选择社区 form.on('select(communityChange)', function(data) { formObject.communityId = data.value; - initCommunityBossParentSelect(data.value == '' ? '' : data.value, ''); + initCommunityBossParentSelect(data.value); }); // 初始化上级网格长 function initCommunityBossParentSelect(communityId, selectValue) { - if(typeof (communityId) === 'undefined' || communityId == ''){ + var areaId = $('#areaId').val(); + if(!areaId){ laytpl(document.getElementById('parentGridTemplate').innerHTML).render([], function(html) { document.getElementById('parentGridBox').innerHTML = html; }); form.render(); return; } - top.restAjax.get(top.restAjax.path('api/communityboss/listcommunityboss', []), - { - areaId: formObject.areaId, - communityId: communityId, + top.restAjax.get(top.restAjax.path('api/communityboss/listcommunityboss', []), { + areaId: areaId, + communityId: communityId ? communityId : '', communityBossLevel: communityBossLevel -1 }, null, function(code, data, args) { laytpl(document.getElementById('parentGridTemplate').innerHTML).render(data, function(html) { diff --git a/src/main/resources/static/route/reportcase/case_community_assign.html b/src/main/resources/static/route/reportcase/case_community_assign.html index 829034f..6e3426e 100644 --- a/src/main/resources/static/route/reportcase/case_community_assign.html +++ b/src/main/resources/static/route/reportcase/case_community_assign.html @@ -54,8 +54,7 @@
- +
@@ -127,7 +126,7 @@ } initData(); - $(document).on('click', '#handleUserName', function(){ + $(document).on('click', '#handleUserName', function() { selectNPerson(); }); @@ -140,8 +139,8 @@ shadeClose: false, closeBtn: 1, shade: 0.3, - area: ['60%', '90%'], - content: 'route/reportcase/select-street-person.html?single=false&selectedUserIds=' + handleUserId, + area: ['80%', '88%'], + content: 'route/reportcase/select-street-person.html?reportCaseId='+ reportCaseId +'&single=false&selectedUserIds=' + handleUserId, end: function () { handleUserId = ''; handleUserName = ''; 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 6b608fb..469b067 100644 --- a/src/main/resources/static/route/reportcase/list_community_assign.html +++ b/src/main/resources/static/route/reportcase/list_community_assign.html @@ -112,19 +112,19 @@ $('#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(); - } - }); + // 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() { diff --git a/src/main/resources/static/route/reportcase/select-street-person.html b/src/main/resources/static/route/reportcase/select-street-person.html index 20adc39..7dec1cd 100644 --- a/src/main/resources/static/route/reportcase/select-street-person.html +++ b/src/main/resources/static/route/reportcase/select-street-person.html @@ -22,6 +22,12 @@ background-color: #009688; border-color: #009688; } + .dept-selector .selector-tree .selector-tree-wrapper { + overflow: auto; + } + .list-group { + margin-bottom: 0; + } @@ -64,6 +70,7 @@ var hrefParams = top.restAjax.params(window.location.href); var selectedUserIds = hrefParams.selectedUserIds; var reportCaseId = hrefParams.reportCaseId; + var $win = $(window); if(typeof (selectedUserIds) === 'undefined'){ selectedUserIds = ''; } @@ -78,6 +85,10 @@ $(function() { $('#app').fadeTo(1000, 1); + $('#users').css({ + height: ($win.height() - 158) +'px', + overflow: 'auto' + }) initThree(); initSelectedUsers(); top.dialog.dialogData.selectedDepartmentUsers = null; @@ -141,7 +152,7 @@ } else { avatarDom = ' '; } - userDom += ''+ avatarDom + item.userName +' ['+ item.phone + ']' + item.prefixUserName + ''; + userDom += ''+ avatarDom + item.userName + '['+ item.phone + ']
' + item.prefixUserName + '
'; } $('#users').append(userDom); }, function(code, data) {