添加街道管理员案件功能
This commit is contained in:
parent
f7cfc4d14b
commit
9079d6ff1d
@ -132,4 +132,18 @@ public class Check2Controller extends AbstractController {
|
|||||||
return check2Service.listCheckItem(checkId);
|
return check2Service.listCheckItem(checkId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "我的街道案件列表", notes = "我的街道案件列表接口")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "Integer", defaultValue = "1"),
|
||||||
|
@ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "Integer", defaultValue = "20"),
|
||||||
|
@ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"),
|
||||||
|
})
|
||||||
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
|
@GetMapping("listpage-street-of-mine")
|
||||||
|
public SuccessResultList<List<Check2DTO>> listPageStreetOfMine(ListPage page) {
|
||||||
|
Map<String, Object> params = requestParams();
|
||||||
|
page.setParams(params);
|
||||||
|
return check2Service.listPageStreetOfMine(page);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -112,4 +112,12 @@ public interface ICheck2Service {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<HiddenDangerReportDTO> listCheckItem(String checkId);
|
List<HiddenDangerReportDTO> listCheckItem(String checkId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 我的街道案件列表
|
||||||
|
*
|
||||||
|
* @param page
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
SuccessResultList<List<Check2DTO>> listPageStreetOfMine(ListPage page);
|
||||||
}
|
}
|
||||||
|
@ -154,6 +154,18 @@ public class Check2ServiceImpl extends BaseService implements ICheck2Service {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SuccessResultList<List<Check2DTO>> listPageStreetOfMine(ListPage page) {
|
||||||
|
String userId = securityComponent.getCurrentUser().getUserId();
|
||||||
|
List<Task> tasks = processService.listTaskByAssigneeAndVariableKey(GridPersonnelTypeEnum.STREET.getValue(), userId);
|
||||||
|
List<String> checkIds = listLastCheckId(tasks);
|
||||||
|
if (checkIds.isEmpty()) {
|
||||||
|
return new SuccessResultList<>(new ArrayList<>(), 1, 0L);
|
||||||
|
}
|
||||||
|
page.getParams().put("checkIds", checkIds);
|
||||||
|
return listPage(page);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 开启检查流程
|
* 开启检查流程
|
||||||
*
|
*
|
||||||
@ -308,4 +320,33 @@ public class Check2ServiceImpl extends BaseService implements ICheck2Service {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最新的检查ID列表
|
||||||
|
*
|
||||||
|
* @param tasks
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private List<String> listLastCheckId(List<Task> tasks) {
|
||||||
|
if (tasks == null || tasks.isEmpty()) {
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
List<String> lastCheckIds = new ArrayList<>();
|
||||||
|
for (Task task : tasks) {
|
||||||
|
Map<String, Object> taskVariableMap = task.getTaskLocalVariables();
|
||||||
|
if (taskVariableMap == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
Object lastCheckIdObj = taskVariableMap.get(CheckProcessParamsEnum.LAST_CHECK_ID.getValue());
|
||||||
|
if (lastCheckIdObj == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
String lastCheckId = lastCheckIdObj.toString();
|
||||||
|
if (StringUtils.isBlank(lastCheckId)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
lastCheckIds.add(lastCheckId);
|
||||||
|
}
|
||||||
|
return lastCheckIds;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
server:
|
server:
|
||||||
port: 7006
|
port: 7006
|
||||||
url: http://192.168.0.103:7006/inspection
|
url: http://192.168.0.101:7006/inspection
|
||||||
title: 隐患上报系统
|
title: 隐患上报系统
|
||||||
servlet:
|
servlet:
|
||||||
context-path: /inspection
|
context-path: /inspection
|
||||||
@ -20,14 +20,14 @@ spring:
|
|||||||
max-request-size: 1GB
|
max-request-size: 1GB
|
||||||
datasource:
|
datasource:
|
||||||
druid:
|
druid:
|
||||||
url: jdbc:mysql://49.233.36.36:6688/db_cloud_inspection?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&autoReconnect=true&failOverReadOnly=false&useSSL=false
|
# url: jdbc:mysql://49.233.36.36:6688/db_cloud_inspection?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&autoReconnect=true&failOverReadOnly=false&useSSL=false
|
||||||
# url: jdbc:mysql://127.0.0.1:3306/db_cloud_inspection?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&autoReconnect=true&failOverReadOnly=false&useSSL=false
|
url: jdbc:mysql://127.0.0.1:3306/db_cloud_inspection?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: wanggeng
|
# username: wanggeng
|
||||||
# username: root
|
username: root
|
||||||
password: WenG>2132997
|
# password: WenG>2132997
|
||||||
# password: root
|
password: root
|
||||||
initial-size: 2
|
initial-size: 2
|
||||||
min-idle: 2
|
min-idle: 2
|
||||||
max-active: 5
|
max-active: 5
|
||||||
@ -71,7 +71,7 @@ swagger:
|
|||||||
|
|
||||||
# 文件
|
# 文件
|
||||||
file:
|
file:
|
||||||
uploadPath: /Users/wanggeng/Desktop/UploadFiles/
|
uploadPath: C:\Users\wenc0\Desktop\UploadFiles\
|
||||||
imageTypes: png,jpg,jpeg,gif,blob
|
imageTypes: png,jpg,jpeg,gif,blob
|
||||||
videoTypes: mp4,rmvb
|
videoTypes: mp4,rmvb
|
||||||
audioTypes: mp3,wmv
|
audioTypes: mp3,wmv
|
||||||
@ -81,13 +81,13 @@ file:
|
|||||||
# 安全
|
# 安全
|
||||||
security:
|
security:
|
||||||
oauth2:
|
oauth2:
|
||||||
oauth-server: http://192.168.0.103:7001/usercenter
|
oauth-server: http://192.168.0.101:7001/usercenter
|
||||||
oauth-logout: ${security.oauth2.oauth-server}/logout?redirect_uri=${server.url}
|
oauth-logout: ${security.oauth2.oauth-server}/logout?redirect_uri=${server.url}
|
||||||
client:
|
client:
|
||||||
client-id: 44a8dc867f7f4465b7ba6065d87e30d7
|
# client-id: 44a8dc867f7f4465b7ba6065d87e30d7
|
||||||
# client-id: 32ec344a5fd04fd9911586df5d1dc36b
|
client-id: 32ec344a5fd04fd9911586df5d1dc36b
|
||||||
client-secret: bTRCTEw1TEZkL284bVhLOXJ2NDYrSUlGdU1DSlNGaGdLTWhEb1l1VHZHMG1ac2wwZTJHWk5NbXh3L3h3U2c4Rg==
|
# client-secret: bTRCTEw1TEZkL284bVhLOXJ2NDYrSUlGdU1DSlNGaGdLTWhEb1l1VHZHMG1ac2wwZTJHWk5NbXh3L3h3U2c4Rg==
|
||||||
# client-secret: a2NORTAyZmthdTNtVHNwLytGVVo0ckFhNktHQU9JWVFmUks0TGw5L2hQRW1ac2wwZTJHWk5NbXh3L3h3U2c4Rg==
|
client-secret: a2NORTAyZmthdTNtVHNwLytGVVo0ckFhNktHQU9JWVFmUks0TGw5L2hQRW1ac2wwZTJHWk5NbXh3L3h3U2c4Rg==
|
||||||
user-authorization-uri: ${security.oauth2.oauth-server}/oauth_client/authorize
|
user-authorization-uri: ${security.oauth2.oauth-server}/oauth_client/authorize
|
||||||
access-token-uri: ${security.oauth2.oauth-server}/oauth_client/token
|
access-token-uri: ${security.oauth2.oauth-server}/oauth_client/token
|
||||||
grant-type: authorization_code
|
grant-type: authorization_code
|
||||||
|
Loading…
Reference in New Issue
Block a user