处理网格员编辑报错问题

This commit is contained in:
wanggeng 2023-02-20 15:42:43 +08:00
parent 1af0a498aa
commit d2ccca3bf4
7 changed files with 182 additions and 99 deletions

46
pom.xml
View File

@ -175,8 +175,54 @@
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
<!-- 打包时去除第三方依赖 -->
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId> <artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<layout>ZIP</layout>
<includes>
<include>
<groupId>non-exists</groupId>
<artifactId>non-exists</artifactId>
</include>
</includes>
</configuration>
</plugin>
<!-- 拷贝第三方依赖文件到指定目录 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<!-- target/lib 是依赖jar包的输出目录根据自己喜好配置 -->
<outputDirectory>target/lib</outputDirectory>
<excludeTransitive>false</excludeTransitive>
<stripVersion>false</stripVersion>
<includeScope>runtime</includeScope>
</configuration>
</execution>
</executions>
</plugin>
<!-- 排除静态资源,静态资源自行拷贝 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/*.properties</exclude>
<exclude>**/*.xml</exclude>
<exclude>**/*.yml</exclude>
<exclude>static/**</exclude>
<exclude>templates/**</exclude>
<exclude>mybatis/**</exclude>
</excludes>
</configuration>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>

View File

@ -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.BindingDepartmentDTO;
import com.cm.systemcity.pojo.dtos.bindingdepartment.DepartmentDTO; import com.cm.systemcity.pojo.dtos.bindingdepartment.DepartmentDTO;
import com.cm.systemcity.pojo.dtos.community.CommunityDTO; 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.dict.DictDTO;
import com.cm.systemcity.pojo.dtos.reportcase.ReportCaseDTO; import com.cm.systemcity.pojo.dtos.reportcase.ReportCaseDTO;
import com.cm.systemcity.pojo.dtos.userpoints.UserDTO; import com.cm.systemcity.pojo.dtos.userpoints.UserDTO;
@ -41,6 +40,7 @@ import java.util.*;
/** /**
* 案件类型绑定部门Impl * 案件类型绑定部门Impl
*
* @author xwangs * @author xwangs
* @create 2020-10-27 16:52 * @create 2020-10-27 16:52
* @description * @description
@ -447,8 +447,8 @@ public class BindingDepartmentServiceServiceImpl extends BaseService implements
} }
// 根据当前案件定位 匹配专管员优先情况 // 根据当前案件定位 匹配专管员优先情况
if (params.get("reportCaseId") != null && !"".equals(params.get("reportCaseId").toString())) { if (params.get("reportCaseId") != null && !"".equals(params.get("reportCaseId").toString())) {
Map<String, Object> query = new HashMap<>(0);
String reportCaseId = params.get("reportCaseId").toString(); String reportCaseId = params.get("reportCaseId").toString();
Map<String, Object> query = new HashMap<>(0);
query.put("reportCaseId", reportCaseId); query.put("reportCaseId", reportCaseId);
ReportCaseDTO reportCase = reportCaseDao.getReportCase(query); ReportCaseDTO reportCase = reportCaseDao.getReportCase(query);
// 查询专管员片区 // 查询专管员片区

View File

@ -17,7 +17,6 @@ import com.cm.common.utils.UUIDUtil;
import com.cm.plugin.map.service.IGridService; import com.cm.plugin.map.service.IGridService;
import com.cm.systemcity.dao.bindingdepartment.IBindingDepartmentDao; import com.cm.systemcity.dao.bindingdepartment.IBindingDepartmentDao;
import com.cm.systemcity.dao.communityboss.ICommunityBossDao; 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.dao.userpoints.IUserPointsDao;
import com.cm.systemcity.enums.MongoCollections; import com.cm.systemcity.enums.MongoCollections;
import com.cm.systemcity.pojo.dtos.citybuilding.CityBuildingDTO; 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.CommunityBossAreaDTO;
import com.cm.systemcity.pojo.dtos.communityboss.CommunityBossDTO; import com.cm.systemcity.pojo.dtos.communityboss.CommunityBossDTO;
import com.cm.systemcity.pojo.pos.communityboss.CommunityBossPO; 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.citybuilding.ICityBuildingService;
import com.cm.systemcity.service.citydistrict.ICityDistrictService; import com.cm.systemcity.service.citydistrict.ICityDistrictService;
import com.cm.systemcity.service.community.ICommunityService; 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.data.mongodb.core.query.Query;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.nio.channels.SelectableChannel;
import java.util.*; import java.util.*;
/** /**
@ -337,8 +334,15 @@ public class CommunityBossServiceImpl extends AbstractService implements ICommun
@Override @Override
public List<CommunityBossDTO> listCommunityBoss(Map<String, Object> params) throws SearchException { public List<CommunityBossDTO> listCommunityBoss(Map<String, Object> params) throws SearchException {
List<CommunityBossDTO> list = communityBossDao.listCommunityBoss(params); List<CommunityBossDTO> list = communityBossDao.listCommunityBoss(params);
for(CommunityBossDTO item : list){ for (int i = 0; i < list.size(); i++) {
CommunityBossDTO item = list.get(i);
Map<String, Object> currentUser = bindDao.getSysUserById(item.getCommunityBossUserId()); Map<String, Object> 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.setCommunityBossName(currentUser.get("user_name").toString());
item.setCommunityBossUsername(currentUser.get("user_username").toString()); item.setCommunityBossUsername(currentUser.get("user_username").toString());
item.setCommunityBossPhone(currentUser.get("user_phone").toString()); item.setCommunityBossPhone(currentUser.get("user_phone").toString());

View File

@ -24,7 +24,7 @@ spring:
max-request-size: 1GB max-request-size: 1GB
datasource: datasource:
druid: 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 db-type: mysql
driver-class-name: com.mysql.jdbc.Driver driver-class-name: com.mysql.jdbc.Driver
username: root username: root
@ -55,7 +55,7 @@ spring:
config: classpath:ehcache.xml config: classpath:ehcache.xml
data: data:
mongodb: mongodb:
uri: mongodb://city:city@127.0.0.1:27017/systemcity uri: mongodb://city:city@192.168.0.103:27017/systemcity
# 数据库 # 数据库
mybatis: mybatis:

View File

@ -144,6 +144,7 @@
initCommunity(''); initCommunity('');
initCaseType(); initCaseType();
initChildCaseType(''); initChildCaseType('');
if(caseNumber) {
restAjax.get('app/data-external-release/get-report-case-by-number/' + caseNumber, {}, null, function(code, data) { restAjax.get('app/data-external-release/get-report-case-by-number/' + caseNumber, {}, null, function(code, data) {
if(typeof (data['caseFlowType']) != 'undefined' && data['caseFlowType'] != ''){ if(typeof (data['caseFlowType']) != 'undefined' && data['caseFlowType'] != ''){
$('#caseFlowType').val(data['caseFlowType']); $('#caseFlowType').val(data['caseFlowType']);
@ -152,6 +153,9 @@
form.render('select'); form.render('select');
}, function(code, data) { }, function(code, data) {
}); });
} else {
initTable();
}
} }
init(); init();

View File

@ -112,6 +112,20 @@
$('#areaId').val(areaId); $('#areaId').val(areaId);
$('#areaName').val(areaName); $('#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() { function initTable() {
dataLoading = true; dataLoading = true;

View File

@ -22,6 +22,12 @@
background-color: #009688; background-color: #009688;
border-color: #009688; border-color: #009688;
} }
.selector-tree-wrapper {
overflow: auto;
}
.selector-body-wrapper {
overflow: auto;
}
</style> </style>
</head> </head>
<body> <body>
@ -43,7 +49,7 @@
<div class="selector-body-search"> <div class="selector-body-search">
<input type="text" class="form-control" id="name" placeholder="检索用户名" oninput="searchUser()"/> <input type="text" class="form-control" id="name" placeholder="检索用户名" oninput="searchUser()"/>
</div> </div>
<div id="users" class="selector-body-content list-group"></div> <div id="users" class="selector-body-content"></div>
</div> </div>
</div> </div>
<div class="edit-button-footer2"> <div class="edit-button-footer2">
@ -56,8 +62,10 @@
<script type="text/javascript" src="assets/js/easyui/jquery.easyui.min.js"></script> <script type="text/javascript" src="assets/js/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="assets/js/easyui/locale/easyui-lang-zh_CN.js"></script> <script type="text/javascript" src="assets/js/easyui/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="assets/js/vendor/zTree3/js/jquery.ztree.all.js"></script> <script type="text/javascript" src="assets/js/vendor/zTree3/js/jquery.ztree.all.js"></script>
<script type="text/javascript" src="assets/js/vendor/layer/layer.js"></script>
<script type="text/javascript" src="assets/js/common.js"></script> <script type="text/javascript" src="assets/js/common.js"></script>
<script type="text/javascript"> <script type="text/javascript">
var $win = $(window);
var hrefParams = top.restAjax.params(window.location.href); var hrefParams = top.restAjax.params(window.location.href);
var selectedUserIds = hrefParams.selectedUserIds; var selectedUserIds = hrefParams.selectedUserIds;
var reportCaseId = hrefParams.reportCaseId; var reportCaseId = hrefParams.reportCaseId;
@ -74,6 +82,7 @@
var selectDepartmentUserArray = []; var selectDepartmentUserArray = [];
$(function() { $(function() {
$('#users').css({height: ($win.height() - 155) +'px', overflow: 'auto'})
$('#app').fadeTo(1000, 1); $('#app').fadeTo(1000, 1);
initThree(); initThree();
initSelectedUsers(); initSelectedUsers();
@ -126,8 +135,10 @@
// 初始化人员列表 // 初始化人员列表
function initUsers(parentId, id) { function initUsers(parentId, id) {
top.restAjax.get(top.restAjax.path('api/bindingdepartment/list-org-community-grid-user/{parentId}/{id}', let layerIndex;
[parentId, id]), {reportCaseId : reportCaseId}, null, function(code, data) { top.restAjax.get(top.restAjax.path('api/bindingdepartment/list-org-community-grid-user/{parentId}/{id}', [parentId, id]), {
reportCaseId : reportCaseId
}, null, function(code, data) {
$('#users').empty(); $('#users').empty();
var userDom = ''; var userDom = '';
for(var i = 0, item; item = data[i++];) { for(var i = 0, item; item = data[i++];) {
@ -142,6 +153,10 @@
$('#users').append(userDom); $('#users').append(userDom);
}, function(code, data) { }, function(code, data) {
top.dialog.msg(data.msg); top.dialog.msg(data.msg);
}, function() {
layerIndex = layer.msg('正在加载', {icon: 16, shade: 0.01, time: 0})
}, function() {
layer.close(layerIndex);
}); });
} }