流程监管相关功能

This commit is contained in:
ly19960718 2021-12-03 10:08:47 +08:00
parent 9401f098ae
commit fa521a315e
38 changed files with 978 additions and 418 deletions

View File

@ -45,6 +45,29 @@ public class CountAreaController extends DefaultBaseController {
@Autowired
private UserUtil userUtil;
@ApiOperation(value = "区域未完成事件统计", notes = "区域未完成事件统计接口")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("count-case-nocomplete")
SuccessResultData<Integer> countAreaNoComplete(){
UserExpandBO expandData = securityComponent.getExpandData(UserExpandBO.class);
if(expandData == null || StringUtils.isBlank(expandData.getAreaCode())){
return new SuccessResultData<>(0);
}
String s = userUtil.areaCodeFormat(expandData.getAreaCode());
return new SuccessResultData<>(countAreaService.countAreaNoComplete(s));
}
@ApiOperation(value = "区域完成事件统计", notes = "区域完成事件统计接口")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("count-case-complete")
SuccessResultData<Integer> countAreaComplete(){
UserExpandBO expandData = securityComponent.getExpandData(UserExpandBO.class);
if(expandData == null || StringUtils.isBlank(expandData.getAreaCode())){
return new SuccessResultData<>(0);
}
String s = userUtil.areaCodeFormat(expandData.getAreaCode());
return new SuccessResultData<>(countAreaService.countAreaComplete(s));
}
@ApiOperation(value = "区域案件统计", notes = "区域案件统计接口")

View File

@ -34,6 +34,18 @@ public class EvaluateController extends DefaultBaseController {
@Autowired
private IEvaluateService evaluateService;
@ApiOperation(value = "事件评价详情", notes = "事件评价详情接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "evaluateId", value = "事件评价ID", paramType = "path")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("get-byreportid/{reportId}")
public EvaluateDTO getByReportId(@PathVariable("reportId") String reportId) {
return evaluateService.getByReportId(reportId);
}
@ApiOperation(value = "新增事件评价", notes = "新增事件评价接口")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PostMapping("save")

View File

@ -36,6 +36,18 @@ public class HandleController extends DefaultBaseController {
private IHandleService handleService;
@ApiOperation(value = "事件处理详情(根据任务ID)", notes = "事件处理详情接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "handleId", value = "事件处理ID", paramType = "path")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("get-bytaskid/{taskId}")
public HandleDTO getByTaskId(@PathVariable("taskId") String taskId) {
return handleService.getByTaskId(taskId);
}
@ApiOperation(value = "新增事件处理", notes = "新增事件处理接口")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PostMapping("save")

View File

@ -2,7 +2,9 @@ package cn.com.tenlion.controller.api.report;
import cn.com.tenlion.enums.report.HandleStatusEnum;
import cn.com.tenlion.enums.report.ReportSourceEnum;
import cn.com.tenlion.pojo.bos.userexpand.UserExpandBO;
import cn.com.tenlion.pojo.vos.report.HandleStatusVO;
import cn.com.tenlion.service.activitibase.IActivitiBaseService;
import cn.com.tenlion.service.reportlog.IReportLogService;
import ink.wgink.annotation.CheckRequestBodyAnnotation;
import ink.wgink.common.base.DefaultBaseController;
@ -39,6 +41,21 @@ public class ReportController extends DefaultBaseController {
@Autowired
private IReportService reportService;
@Autowired
private SecurityComponent securityComponent;
@Autowired
private IActivitiBaseService activitiBaseService;
@ApiOperation(value = "获取事件的实例ID", notes = "获取事件的实例ID接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "reportId", value = "事件上报ID", paramType = "path")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("getbuinessid/{reportId}")
public SuccessResultData<String> getBuinessId(@PathVariable("reportId") String reportId) {
return new SuccessResultData<>(activitiBaseService.getProcessInstanceId(reportId));
}
@ApiOperation(value = "新增事件上报", notes = "新增事件上报接口")
@ -69,7 +86,6 @@ public class ReportController extends DefaultBaseController {
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("get/{reportId}")
public ReportDTO get(@PathVariable("reportId") String reportId) {
return reportService.get(reportId);
}
@ -106,9 +122,50 @@ public class ReportController extends DefaultBaseController {
}
@ApiOperation(value = "区域完成事件分页列表", notes = "区域完成事件分页列表接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"),
@ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"),
@ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("listpage-area-complete")
public SuccessResultList<List<ReportDTO>> listPageAreaComplete(ListPage page) {
UserExpandBO expandData = securityComponent.getExpandData(UserExpandBO.class);
Map<String, Object> params = requestParams();
page.setParams(params);
List<String> handleStatuss = new ArrayList<>();
handleStatuss.add(HandleStatusEnum.CASE_CLOSED.getValue());
handleStatuss.add(HandleStatusEnum.FORCED_END.getValue());
params.put("handleStatuss",handleStatuss);
return reportService.listPageArea(page,expandData == null ? "-1" : expandData.getAreaCode());
}
@ApiOperation(value = "区域未完成事件分页列表", notes = "区域未完成事件分页列表接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"),
@ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"),
@ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("listpage-area-nocomplete")
public SuccessResultList<List<ReportDTO>> listPageAreaNoComplete(ListPage page) {
UserExpandBO expandData = securityComponent.getExpandData(UserExpandBO.class);
Map<String, Object> params = requestParams();
page.setParams(params);
List<String> handleStatuss = new ArrayList<>();
handleStatuss.add(HandleStatusEnum.REGISTER.getValue());
handleStatuss.add(HandleStatusEnum.DISPATCH.getValue());
handleStatuss.add(HandleStatusEnum.TREATMENT.getValue());
handleStatuss.add(HandleStatusEnum.EXAMINE.getValue());
params.put("handleStatuss",handleStatuss);
return reportService.listPageArea(page,expandData == null ? "-1" : expandData.getAreaCode());
}

View File

@ -34,37 +34,34 @@ public class TaskCompleteBaseController {
@ApiOperation(value = "事件受理", notes = "事件受理接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "null", value = "null", paramType = "header"),
@ApiImplicitParam(name = "reportId", value = "事件ID", paramType = "path")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PutMapping("update-accept/{reportId}")
public SuccessResult accept(@PathVariable("reportId") String reportId, @RequestBody CompleteVO completeVO) {
public SuccessResult saveAccept(@PathVariable("reportId") String reportId, @RequestBody CompleteVO completeVO) {
taskCompleteBase.saveAccept(null,completeVO,reportId);
return new SuccessResult();
}
@ApiOperation(value = "事件不予受理", notes = "事件不予受理接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "null", value = "null", paramType = "header"),
@ApiImplicitParam(name = "reportId", value = "事件ID", paramType = "path")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PutMapping("update-noaccept/{reportId}")
public SuccessResult noAccept( @PathVariable("reportId") String reportId, @RequestBody CompleteVO completeVO) {
public SuccessResult saveNoAccept( @PathVariable("reportId") String reportId, @RequestBody CompleteVO completeVO) {
taskCompleteBase.saveNoAccept(null,completeVO,reportId);
return new SuccessResult();
}
@ApiOperation(value = "事件上报", notes = "事件上报接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "null", value = "null", paramType = "header"),
@ApiImplicitParam(name = "reportId", value = "事件ID", paramType = "path")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PutMapping("update-report/{reportId}")
public SuccessResult report(@PathVariable("reportId") String reportId, @RequestBody CompleteVO completeVO) {
public SuccessResult saveReport(@PathVariable("reportId") String reportId, @RequestBody CompleteVO completeVO) {
taskCompleteBase.saveReport(null,completeVO,reportId);
return new SuccessResult();
}
@ -72,12 +69,11 @@ public class TaskCompleteBaseController {
@ApiOperation(value = "事件分拨", notes = "事件分拨接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "null", value = "null", paramType = "header"),
@ApiImplicitParam(name = "reportId", value = "事件ID", paramType = "path")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PostMapping("save-allocate/{reportId}")
public SuccessResult allocate( @PathVariable("reportId") String reportId, @RequestBody DistributionVO distributionVO){
public SuccessResult saveAllocate( @PathVariable("reportId") String reportId, @RequestBody DistributionVO distributionVO){
taskCompleteBase.saveAllocate(null,reportId,distributionVO);
return new SuccessResult();
}
@ -85,24 +81,22 @@ public class TaskCompleteBaseController {
@ApiOperation(value = "事件分拨确认受理", notes = "事件分拨确认受理接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
@ApiImplicitParam(name = "distributionUserId", value = "distributionUserId", paramType = "分拨用户ID")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PutMapping("update-allocatesure-accept/{reportId}")
public SuccessResult allocateSureAccept(@PathVariable("reportId") String reportId, @RequestBody CompleteVO completeVO) {
public SuccessResult saveAllocateSureAccept(@PathVariable("reportId") String reportId, @RequestBody CompleteVO completeVO) {
taskCompleteBase.saveAllocateSureAccept(null,reportId,completeVO);
return new SuccessResult();
}
@ApiOperation(value = "事件分拨确认不受理", notes = "事件分拨确认不受理接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
@ApiImplicitParam(name = "distributionUserId", value = "distributionUserId", paramType = "分拨用户ID")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PutMapping("update-allocatesure-noaccept/{reportId}")
public SuccessResult allocateSureNoAccept(@PathVariable("reportId") String reportId, @RequestBody CompleteVO completeVO) {
public SuccessResult saveAllocateSureNoAccept(@PathVariable("reportId") String reportId, @RequestBody CompleteVO completeVO) {
taskCompleteBase.saveAllocateSureNoAccept(null,reportId,completeVO);
return new SuccessResult();
}
@ -112,12 +106,11 @@ public class TaskCompleteBaseController {
@ApiOperation(value = "事件派遣", notes = "事件派遣接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
@ApiImplicitParam(name = "RequestHeader", value = "分拨用户ID", paramType = "path")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PostMapping("save-dispatch/{reportId}")
public SuccessResult dispatch(@PathVariable("reportId") String reportId, @RequestBody DispatchVO dispatchVO){
public SuccessResult saveDispatch(@PathVariable("reportId") String reportId, @RequestBody DispatchVO dispatchVO){
taskCompleteBase.saveDispatch(null,reportId,dispatchVO);
return new SuccessResult();
}
@ -125,12 +118,11 @@ public class TaskCompleteBaseController {
@ApiOperation(value = "事件派遣处理", notes = "事件派遣处理接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
@ApiImplicitParam(name = "dispatchId", value = "派遣ID", paramType = "path")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PostMapping("save-dispatch-handle/{reportId}")
public SuccessResult dispatchHandle(@PathVariable("reportId") String reportId, @RequestBody HandleVO handleVO){
public SuccessResult saveDispatchHandle(@PathVariable("reportId") String reportId, @RequestBody HandleVO handleVO){
taskCompleteBase.saveDispatchHandle(null,reportId,handleVO);
return new SuccessResult();
}
@ -138,24 +130,22 @@ public class TaskCompleteBaseController {
@ApiOperation(value = "事件派遣回退", notes = "事件派遣回退接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
@ApiImplicitParam(name = "dispatchId", value = "派遣ID", paramType = "path")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PutMapping("update-dispatch-handle/{reportId}")
public SuccessResult dispatchRollBack(@PathVariable("reportId") String reportId, @RequestBody CompleteVO completeVO){
public SuccessResult saveDispatchRollBack(@PathVariable("reportId") String reportId, @RequestBody CompleteVO completeVO){
taskCompleteBase.saveDispatchRollBack(null,reportId,completeVO);
return new SuccessResult();
}
@ApiOperation(value = "事件派遣延期申请", notes = "事件派遣延期申请接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
@ApiImplicitParam(name = "dispatchId", value = "派遣ID", paramType = "path")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PutMapping("update-dispatch-delayapply/{reportId}")
public SuccessResult disparchDelayApply(@PathVariable("reportId") String reportId, @RequestBody DelayApplyVO delayApplyVO){
public SuccessResult saveDisparchDelayApply(@PathVariable("reportId") String reportId, @RequestBody DelayApplyVO delayApplyVO){
taskCompleteBase.saveDisparchDelayApply(null,reportId,delayApplyVO);
return new SuccessResult();
}
@ -163,12 +153,11 @@ public class TaskCompleteBaseController {
@ApiOperation(value = "事件派遣核查通过", notes = "事件派遣核查通过接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
@ApiImplicitParam(name = "dispatchId", value = "派遣ID", paramType = "path")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PutMapping("update-dispatch-he-pass/{reportId}")
public SuccessResult dispatchHEPass(@PathVariable("reportId") String reportId, @RequestBody CompleteVO completeVO){
public SuccessResult saveDispatchHEPass(@PathVariable("reportId") String reportId, @RequestBody CompleteVO completeVO){
taskCompleteBase.saveDispatchHEPass(null,reportId,completeVO);
return new SuccessResult();
}
@ -176,12 +165,11 @@ public class TaskCompleteBaseController {
@ApiOperation(value = "事件派遣核查不通过", notes = "事件派遣核查不通过接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
@ApiImplicitParam(name = "dispatchId", value = "派遣ID", paramType = "path")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PutMapping("update-dispatch-he-nopass/{reportId}")
public SuccessResult dispatchHENoPass(@PathVariable("reportId") String reportId,
public SuccessResult saveDispatchHENoPass(@PathVariable("reportId") String reportId,
@RequestBody CompleteVO completeVO){
taskCompleteBase.saveDispatchHENoPass(null,reportId,completeVO);
return new SuccessResult();
@ -192,12 +180,11 @@ public class TaskCompleteBaseController {
@ApiOperation(value = "事件核查通过", notes = "事件核查通过")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
@ApiImplicitParam(name = "reportId", value = "事件ID", paramType = "path")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PostMapping("save-examinepass/{reportId}")
public SuccessResult examinePass(@PathVariable("reportId") String reportId, @RequestBody CheckVO checkVO){
public SuccessResult saveExaminePass(@PathVariable("reportId") String reportId, @RequestBody CheckVO checkVO){
taskCompleteBase.saveExaminePass(null,reportId,checkVO);
return new SuccessResult();
}
@ -206,21 +193,27 @@ public class TaskCompleteBaseController {
@ApiOperation(value = "事件核查不通过", notes = "事件核查不通过")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
@ApiImplicitParam(name = "reportId", value = "事件ID", paramType = "path")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PostMapping("save-examinenopass/{reportId}")
public SuccessResult examineNoPass(@PathVariable("reportId") String reportId, @RequestBody CheckVO checkVO){
public SuccessResult saveExamineNoPass(@PathVariable("reportId") String reportId, @RequestBody CheckVO checkVO){
taskCompleteBase.saveExamineNoPass(null,reportId,checkVO);
return new SuccessResult();
}
@ApiOperation(value = "强制结束实例", notes = "强制结束实例")
@ApiImplicitParams({
@ApiImplicitParam(name = "instanceld", value = "实例ID", paramType = "path")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PutMapping("over-instance/{instanceld}")
public SuccessResult updateInstanceOver(@PathVariable("instanceld") String instanceld,@RequestBody String overExplain){
taskCompleteBase.updateInstanceOver(null,instanceld,overExplain);
return new SuccessResult();
}

View File

@ -9,7 +9,8 @@ public enum HandleStatusEnum {
DISPATCH("DISPATCH","派遣阶段"),
TREATMENT("TREATMENT","处置阶段"),
EXAMINE("EXAMINE","核查阶段"),
CASE_CLOSED("CASE_CLOSED","结案");
CASE_CLOSED("CASE_CLOSED","结案"),
FORCED_END("FORCED_END","强制结束");

View File

@ -12,6 +12,8 @@ public class ReportLogActivityDTO {
private String nodeId;
@ApiModelProperty(name = "nodeName", value = "节点名称")
private String nodeName;
@ApiModelProperty(name = "nodeType", value = "节点类型")
private String nodeType;
@ApiModelProperty(name = "nodeUserName", value = "节点处理用户")
private String nodeUserName;
@ApiModelProperty(name = "nodeUserDeptName", value = "节点处理用户部门名称")
@ -55,6 +57,14 @@ public class ReportLogActivityDTO {
this.nodeName = nodeName;
}
public String getNodeType() {
return nodeType;
}
public void setNodeType(String nodeType) {
this.nodeType = nodeType;
}
public String getNodeUserName() {
return nodeUserName;
}

View File

@ -105,8 +105,6 @@ public class ActivitiBaseServiceImpl extends DefaultBaseService implements IActi
public ProcessInstance getInstance(String instanceId){
ProcessInstance pi = runtimeService.createProcessInstanceQuery().processInstanceId(instanceId).singleResult();
return pi;
}

View File

@ -10,8 +10,8 @@ import ink.wgink.common.component.SecurityComponent;
import ink.wgink.exceptions.SearchException;
import ink.wgink.interfaces.department.IDepartmentBaseService;
import ink.wgink.module.dictionary.pojo.dtos.AreaDTO;
import ink.wgink.module.dictionary.service.IAreaService;
import ink.wgink.module.oauth2.manager.OAuth2ClientTokenManager;
import ink.wgink.mongo.module.dictionary.service.IMongoAreaService;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.dtos.department.DepartmentDTO;
import ink.wgink.pojo.result.SuccessResultData;
@ -36,7 +36,7 @@ import java.util.Map;
public class ICaseStatisticsServiceImpl extends DefaultBaseService implements ICaseStatisticsService {
@Autowired
private IAreaService areaService;
private IMongoAreaService areaService;
@Autowired
private IDepartmentBaseService iDepartmentBaseService;
@Autowired

View File

@ -24,6 +24,8 @@ import java.util.Map;
**/
public interface IDistributionService {
void saveByTask(String token,String distributionId,String reportId,DistributionVO distributionVO);
/**
*

View File

@ -160,6 +160,19 @@ public class DistributionServiceImpl extends DefaultBaseService implements IDist
return distributionId;
}
public void saveByTask(String token,String distributionId,String reportId,DistributionVO distributionVO){
Map<String, Object> params = HashMapUtil.beanToMap(distributionVO);
params.put("distributionId", distributionId);
params.put("reportId", reportId);
if (StringUtils.isBlank(token)) {
setSaveInfo(params);
} else {
setAppSaveInfo(token, params);
}
distributionDao.save(params);
}
@Override
public void remove(List<String> ids) {
remove(null, ids);

View File

@ -3,7 +3,7 @@ package cn.com.tenlion.service.efficiencyarea.impl;
import cn.com.tenlion.service.report.IReportService;
import ink.wgink.common.base.DefaultBaseService;
import ink.wgink.module.dictionary.pojo.dtos.AreaDTO;
import ink.wgink.module.dictionary.service.IAreaService;
import ink.wgink.mongo.module.dictionary.service.IMongoAreaService;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultList;
@ -37,7 +37,7 @@ public class EfficiencyAreaServiceImpl extends DefaultBaseService implements IEf
@Autowired
private IEfficiencyAreaDao efficiencyAreaDao;
@Autowired
private IAreaService areaService;
private IMongoAreaService areaService;
@Autowired
private IReportService reportService;

View File

@ -130,6 +130,8 @@ public class EvaluateServiceImpl extends DefaultBaseService implements IEvaluate
return evaluateDao.get(params);
}
@Override
public EvaluateDTO get(String evaluateId) {
Map<String, Object> params = super.getHashMap(2);

View File

@ -3,7 +3,7 @@ package cn.com.tenlion.service.gridmember.impl;
import ink.wgink.common.base.DefaultBaseService;
import ink.wgink.exceptions.SaveException;
import ink.wgink.module.dictionary.pojo.dtos.AreaDTO;
import ink.wgink.module.dictionary.service.IAreaService;
import ink.wgink.mongo.module.dictionary.service.IMongoAreaService;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultList;
@ -36,7 +36,7 @@ public class GridMemberServiceImpl extends DefaultBaseService implements IGridMe
@Autowired
private IGridMemberDao gridMemberDao;
@Autowired
private IAreaService areaService;
private IMongoAreaService areaService;

View File

@ -7,10 +7,8 @@ import cn.com.tenlion.service.caseparts.ICasePartsService;
import ink.wgink.common.base.DefaultBaseService;
import ink.wgink.exceptions.ParamsException;
import ink.wgink.exceptions.SaveException;
import ink.wgink.module.dictionary.pojo.dtos.AreaDTO;
import ink.wgink.module.dictionary.service.IAreaService;
import ink.wgink.mongo.module.dictionary.service.IMongoAreaService;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultList;
import ink.wgink.util.date.DateUtil;
import ink.wgink.util.map.HashMapUtil;
@ -42,7 +40,7 @@ public class PartsServiceImpl extends DefaultBaseService implements IPartsServic
@Autowired
private IPartsDao partsDao;
@Autowired
private IAreaService areaService;
private IMongoAreaService areaService;
@Autowired
private ICasePartsService casePartsService;

View File

@ -36,6 +36,15 @@ public interface IReportService {
SuccessResultList<List<ReportDTO>> listPageArchive(ListPage page);
/**
* 区域事件列表
* @param page
* @param areaCode
* @return
*/
SuccessResultList<List<ReportDTO>> listPageArea(ListPage page,String areaCode);
/**
* 设置回显参数
* @param reportDTO

View File

@ -6,9 +6,7 @@ import cn.com.tenlion.enums.report.HandleStatusEnum;
import cn.com.tenlion.enums.report.ReportResultEnum;
import cn.com.tenlion.enums.report.ReportSourceEnum;
import cn.com.tenlion.enums.report.ReportTagEnum;
import cn.com.tenlion.pojo.bos.userexpand.UserExpandBO;
import cn.com.tenlion.pojo.vos.dispatch.DispatchVO;
import cn.com.tenlion.pojo.vos.taskmsg.SocketVO;
import cn.com.tenlion.service.activitibase.IActivitiBaseService;
import cn.com.tenlion.service.collect.ICollectService;
import cn.com.tenlion.service.difficult.IDifficultService;
@ -17,13 +15,14 @@ import cn.com.tenlion.service.evaluate.IEvaluateService;
import cn.com.tenlion.service.remotebase.IRemoteBaseService;
import cn.com.tenlion.service.sample.ISampleService;
import cn.com.tenlion.service.warning.IWarningService;
import cn.com.tenlion.util.UserUtil;
import ink.wgink.common.base.DefaultBaseService;
import ink.wgink.exceptions.SaveException;
import ink.wgink.exceptions.SearchException;
import ink.wgink.exceptions.UpdateException;
import ink.wgink.interfaces.user.IUserBaseService;
import ink.wgink.module.dictionary.pojo.dtos.AreaDTO;
import ink.wgink.module.dictionary.service.IAreaService;
import ink.wgink.mongo.module.dictionary.service.IMongoAreaService;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.app.AppTokenUser;
import ink.wgink.pojo.dtos.user.UserDTO;
@ -77,7 +76,9 @@ public class ReportServiceImpl extends DefaultBaseService implements IReportServ
@Autowired
private CaseInfoConfig caseInfoConfig;
@Autowired
private IAreaService areaService;
private IMongoAreaService areaService;
@Autowired
private UserUtil userUtil;
@ -249,7 +250,43 @@ public class ReportServiceImpl extends DefaultBaseService implements IReportServ
if(StringUtils.isBlank(type2Code)){
throw new SearchException("未获取到事件类型编码");
}
return areaCode.substring(0,6)+type1Code+type2Code;
Map<String,Object> countCaseNum = new HashMap<>();
countCaseNum.put("reportAreaCode",areaCode);
countCaseNum.put("caseTypeCode1",type1Code);
countCaseNum.put("caseTypeCode2",type2Code);
Integer count = this.count(countCaseNum);
String reportCode = areaCode.substring(0,6)+type1Code+type2Code+ getNextSequence(count.toString(),6);
//效验编码
Map<String,Object> checkParams = new HashMap<>();
checkParams.put("reportCode",reportCode);
Integer checkCount = this.count(checkParams);
if(checkCount > 0){
throw new SaveException("编码异常,请重新上报");
}
return reportCode;
}
/**
* 生成下位流水号
* @param currSequence 当前号码
* @param len 长度
* @return
*/
private static String getNextSequence(String currSequence,int len){
Integer curr = Integer.parseInt(currSequence);
curr++;
String currStr = curr.toString();
StringBuffer result = new StringBuffer();
for(int i=0;i<len-currStr.length();i++){
result.append("0");
}
result.append(currStr);
if(result.length() > 6){
throw new SaveException("生成事件编号出错");
}
return result.toString();
}
@ -261,6 +298,10 @@ public class ReportServiceImpl extends DefaultBaseService implements IReportServ
private List<Map<String,Object>> setAcceptedUser(String areaCode){
List<Map<String, Object>> list = remoteBaseService.getAreaCaseAdmin(areaCode);
if(list.size() == 0){
throw new SearchException("为获取到事件受理人员");
}
//自动找上级管理员逻辑 暂时取消
/*if(list.size() == 0){
AreaDTO byCode = areaService.getByCode(areaCode);
if(byCode == null){
throw new SearchException("系统异常");
@ -271,7 +312,7 @@ public class ReportServiceImpl extends DefaultBaseService implements IReportServ
throw new SaveException("未获取到案件受理人员");
}
return setAcceptedUser(areaParentDTO.getAreaCode());
}
}*/
return list;
}
@ -395,6 +436,20 @@ public class ReportServiceImpl extends DefaultBaseService implements IReportServ
PageInfo<ReportDTO> pageInfo = new PageInfo<>(reportDTOs);
return new SuccessResultList<>(reportDTOs, pageInfo.getPageNum(), pageInfo.getTotal());
}
public SuccessResultList<List<ReportDTO>> listPageArea(ListPage page,String areaCode){
page.getParams().put("areaCode",userUtil.areaCodeFormat(areaCode));
PageHelper.startPage(page.getPage(),page.getRows());
List<ReportDTO> reportDTOS = list(page.getParams());
PageInfo<ReportDTO> pageInfo = new PageInfo<>(reportDTOS);
return new SuccessResultList<>(reportDTOS,pageInfo.getPageNum(),pageInfo.getTotal());
}
@Override
public Integer count(Map<String, Object> params) {
Integer count = reportDao.count(params);

View File

@ -53,6 +53,8 @@ public class ReportLogServiceImpl extends DefaultBaseService implements IReportL
/**
* 获取流程
* @param businessId
@ -64,6 +66,7 @@ public class ReportLogServiceImpl extends DefaultBaseService implements IReportL
List<HistoricTaskInstance> historicTaskInstances=processEngine.getHistoryService()
.createHistoricTaskInstanceQuery() // 创建历史任务实例查询
.processInstanceId(businessId) // 用流程实例id查询
.includeTaskLocalVariables()
.finished() // 查询已经完成的任务
.list();
for (HistoricTaskInstance historicTaskInstance : historicTaskInstances) {
@ -71,6 +74,7 @@ public class ReportLogServiceImpl extends DefaultBaseService implements IReportL
dto.setNodeId(historicTaskInstance.getId());
dto.setNodeName(historicTaskInstance.getName());
String assignee = historicTaskInstance.getAssignee();
Map<String, Object> taskLocalVariables = historicTaskInstance.getTaskLocalVariables();
if(!StringUtils.isBlank(assignee)){
UserDTO userDTO = userBaseService.get(assignee);
dto.setNodeUserName(userDTO.getUserName());
@ -91,6 +95,19 @@ public class ReportLogServiceImpl extends DefaultBaseService implements IReportL
for (Comment comment : taskComments) {
dto.setNodeSummary(comment.getFullMessage());
}
//查询实例是否强制结束
String deleteReason = historicTaskInstance.getDeleteReason();
if(!StringUtils.isBlank(deleteReason)){
dto.setNodeSummary(deleteReason);
}else{
if(taskLocalVariables != null){
//设置流程类型
Object taskType = taskLocalVariables.get("taskType");
dto.setNodeType(taskType == null ? "":taskType.toString());
}
}
dto.setNodeState("1");
list.add(dto);
}

View File

@ -302,9 +302,14 @@ public class TaskBaseServiceImpl extends DefaultBaseService implements ITaskBas
PageHelper.startPage(page.getPage(), page.getRows());
List<ReportDTO> list = new ArrayList<>();
HistoricTaskInstanceQuery historicTaskInstanceQuery = historyService.createHistoricTaskInstanceQuery();
Object keyWords = page.getParams().get("keywords");
if(keyWords != null){
historicTaskInstanceQuery.processVariableValueLike("reportCode",keyWords.toString());
}
List<HistoricTaskInstance> historicTaskInstances = historicTaskInstanceQuery
.taskAssignee(this.setUserId(token))//(pageNum - 1) * pageSize, pageSize
.orderByTaskCreateTime().desc().listPage((page.getPage() - 1) * page.getRows(), page.getRows());
.orderByHistoricTaskInstanceEndTime()
.desc().listPage((page.getPage() - 1) * page.getRows(), page.getRows());
for (HistoricTaskInstance historicTaskInstance : historicTaskInstances) {
HistoricProcessInstance historicProcessInstance = historyService.createHistoricProcessInstanceQuery()
.processInstanceId(historicTaskInstance.getProcessInstanceId())

View File

@ -132,6 +132,12 @@ public interface ITaskCompleteBase {
/**
* 强制结束实例
* @param token
* @param instanceId
* @param overExplain
*/
void updateInstanceOver(String token,String instanceId,String overExplain);
}

View File

@ -1,14 +1,11 @@
package cn.com.tenlion.service.taskcompletebase.impl;
import cn.com.tenlion.config.CaseInfoConfig;
import cn.com.tenlion.enums.audit.AuditStatusEnum;
import cn.com.tenlion.enums.audit.TaskTypeEnum;
import cn.com.tenlion.enums.check.CheckStatusEnum;
import cn.com.tenlion.enums.distributionuser.UserStatusEnum;
import cn.com.tenlion.enums.distributionuser.UserTypeEnum;
import cn.com.tenlion.enums.report.HandleStatusEnum;
import cn.com.tenlion.enums.report.ReportResultEnum;
import cn.com.tenlion.pojo.dtos.caseadmin.CaseAdminDTO;
import cn.com.tenlion.pojo.dtos.dispatch.DispatchDTO;
import cn.com.tenlion.pojo.dtos.distribution.DistributionDTO;
import cn.com.tenlion.pojo.dtos.report.ReportDTO;
@ -21,7 +18,7 @@ import cn.com.tenlion.pojo.vos.distribution.DistributionVO;
import cn.com.tenlion.pojo.vos.distributionuser.DistributionUserVO;
import cn.com.tenlion.pojo.vos.handle.HandleVO;
import cn.com.tenlion.pojo.vos.taskcompletebase.CompleteVO;
import cn.com.tenlion.remote.IRestBaseUrl;
import cn.com.tenlion.service.activitibase.IActivitiBaseService;
import cn.com.tenlion.service.caseadmin.ICaseAdminService;
import cn.com.tenlion.service.check.ICheckService;
import cn.com.tenlion.service.delayapply.IDelayApplyService;
@ -32,23 +29,25 @@ import cn.com.tenlion.service.handle.IHandleService;
import cn.com.tenlion.service.remotebase.IRemoteBaseService;
import cn.com.tenlion.service.report.IReportService;
import cn.com.tenlion.service.taskcompletebase.ITaskCompleteBase;
import cn.com.tenlion.service.timeout.ITimeoutService;
import cn.com.tenlion.service.warning.IWarningService;
import ink.wgink.common.base.DefaultBaseService;
import ink.wgink.exceptions.ParamsException;
import ink.wgink.exceptions.SaveException;
import ink.wgink.exceptions.SearchException;
import ink.wgink.interfaces.department.IDepartmentBaseService;
import ink.wgink.interfaces.department.IDepartmentUserBaseService;
import ink.wgink.exceptions.UpdateException;
import ink.wgink.interfaces.role.IRoleDepartmentUserBaseService;
import ink.wgink.module.dictionary.pojo.dtos.AreaDTO;
import ink.wgink.module.dictionary.service.IAreaService;
import ink.wgink.mongo.module.dictionary.service.IMongoAreaService;
import ink.wgink.pojo.app.AppTokenUser;
import ink.wgink.pojo.dtos.department.DepartmentUserDTO;
import ink.wgink.util.UUIDUtil;
import ink.wgink.util.map.HashMapUtil;
import org.activiti.engine.RuntimeService;
import org.activiti.engine.TaskService;
import org.activiti.engine.task.Task;
import org.activiti.engine.task.TaskQuery;
import org.apache.commons.lang3.StringUtils;
import org.checkerframework.checker.units.qual.A;
import org.apache.poi.util.StringUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -84,7 +83,15 @@ public class TaskCompleteBaseImpl extends DefaultBaseService implements ITaskCom
@Autowired
private IRemoteBaseService remoteBaseService;
@Autowired
private IAreaService areaService;
private IMongoAreaService areaService;
@Autowired
private RuntimeService runtimeService;
@Autowired
private IActivitiBaseService activitiBaseService;
@Autowired
private ITimeoutService timeoutService;
@Autowired
private IWarningService warningService;
@ -197,10 +204,8 @@ public class TaskCompleteBaseImpl extends DefaultBaseService implements ITaskCom
* @param distributionVO
*/
public void saveAllocate(String token, String reportId,DistributionVO distributionVO){
/**
* 保存分拨信息
*/
String distributionId = distributionService.saveReturnId(token,reportId,distributionVO);
String distributionId = UUIDUtil.getUUID();
/**
* 查询分拨单位案件管理员
*/
@ -230,7 +235,6 @@ public class TaskCompleteBaseImpl extends DefaultBaseService implements ITaskCom
*/
if(distributionDeptType.equals("ma")){//主协办
//主办
Set<String> list1 = this.getDeptCaseAdmin(distributionVO.getMasterDeptId());;
if(list1.size() <= 0){
throw new SearchException("未获取到主办单位-"+distributionVO.getMasterDeptName()+"案件管理员");
@ -297,12 +301,20 @@ public class TaskCompleteBaseImpl extends DefaultBaseService implements ITaskCom
distributionInfo.add(params);
}
/**
* 保存分拨信息
*/
distributionService.saveByTask(token,distributionId,reportId,distributionVO);
Map<String,Object> params = new HashMap<>();
params.put("distributionUserInfoList",distributionInfo);
//params.put("distributionId",distributionId);
//params.put("taskType", TaskTypeEnum.TASK_ALLOCATE_SURE.getValue());
this.addComment(distributionVO.getTaskId(),"事件分拨");
taskService.complete(distributionVO.getTaskId(),params);
}
@ -625,6 +637,36 @@ public class TaskCompleteBaseImpl extends DefaultBaseService implements ITaskCom
}
/**
* 强制结束实例
* @param token
* @param instanceId
* @param overExplain
*/
public void updateInstanceOver(String token,String instanceId,String overExplain){
String businessKey = activitiBaseService.getBusinessKey(instanceId);
if(StringUtils.isBlank(businessKey)){
throw new UpdateException("系统异常");
}
String userName = this.getUserName(token);
String explanin = userName + "强制终结事件原因:" + overExplain;
//更新业务表
reportService.updateHandleStatus(businessKey,HandleStatusEnum.FORCED_END.getValue());
//终结实例
runtimeService.deleteProcessInstance(instanceId,explanin);
//更新超时
timeoutService.updateByReportId(businessKey);
//更新预警
warningService.updateByReportId(businessKey);
}
/**
* 获取责任单位案件管理员
* @param deptId
@ -677,5 +719,17 @@ public class TaskCompleteBaseImpl extends DefaultBaseService implements ITaskCom
}
private String getUserName(String token){
String userName = "";
if(StringUtils.isBlank(token)){
userName = securityComponent.getCurrentUser().getUserName();
}else{
AppTokenUser appTokenUser = getAppTokenUser(token);
userName = appTokenUser.getUsername();
}
return userName;
}
}

View File

@ -20,6 +20,13 @@ import java.util.Map;
public interface ITimeoutService {
/**
* 根据事件ID修改
* @param reportId
*/
void updateByReportId(String reportId);
/**
* 区域超时事件列表
* @param page

View File

@ -89,6 +89,18 @@ public class TimeoutServiceImpl extends DefaultBaseService implements ITimeoutSe
}
}
public void updateByReportId(String reportId){
if(!StringUtils.isBlank(reportId)){
Map<String,Object> params = new HashMap<>();
params.put("reportId",reportId);
params.put("status","1");
params.put("gmtModified",DateUtil.getTime());
timeoutDao.updateStatus(params);
}
}

View File

@ -33,6 +33,14 @@ public interface IWarningService {
SuccessResultList<List<WarningDTO>> listPageArea(ListPage page,String areaCode);
/**
* 根据事件ID更新
* @param reportId
*/
void updateByReportId(String reportId);
/**
* 根据任务ID更新
* @param taksId

View File

@ -124,6 +124,13 @@ public class WarningServiceImpl extends DefaultBaseService implements IWarningSe
}
public void updateByReportId(String reportId){
Map<String,Object> params = new HashMap<>();
params.put("reportId",reportId);
params.put("warningStatus","1");
warningDao.updateByTaskId(params);
}

View File

@ -458,6 +458,10 @@
AND
t1.is_archive = #{isArchive}
</if>
<if test="areaCode != null and areaCode != ''">
AND
t1.report_area_code LIKE CONCAT('%', #{areaCode} , '%')
</if>
ORDER BY t1.gmt_create DESC
</select>
@ -587,6 +591,19 @@
case_report t1
WHERE
t1.is_delete = 0
<if test="reportAreaCode != null and reportAreaCode != ''">
AND t1.report_area_code = #{reportAreaCode}
</if>
<if test="reportCode != null and reportCode != ''">
AND t1.report_code = #{reportCode}
</if>
<if test="caseTypeCode1 != null and caseTypeCode1 != ''">
AND t1.case_type_code1 = #{caseTypeCode1}
</if>
<if test="caseTypeCode2 != null and caseTypeCode2 != ''">
AND t1.case_type_code2 = #{caseTypeCode2}
</if>
</select>
</mapper>

View File

@ -347,7 +347,29 @@
</select>
<!--统计区域超时事件-->
<!--修改区域超时事件-->
<update id="updateStatus" parameterType="map">
UPDATE
case_timeout
SET
status = #{status},
gmt_modified = #{gmtModified}
WHERE
<if test="reportId != '' and reportId != null">
report_id = #{reportId}
</if>
<if test="timeoutId != '' and timeoutId != null">
timeout_id = #{timeoutId}
</if>
</update>
<!-- 修改超时状态 -->
<select id="countByAreaCode" parameterType="map" resultType="Integer">
SELECT
COUNT(t1.id)
@ -365,20 +387,4 @@
t2.report_area_code LIKE CONCAT('%', #{areaCode}, '%')
</select>
<!-- 修改超时状态 -->
<update id="updateStatus" parameterType="map">
UPDATE
case_timeout
SET
status = #{status},
gmt_modified = #{gmtModified}
WHERE
timeout_id = #{timeoutId}
</update>
</mapper>

View File

@ -171,7 +171,13 @@
gmt_modified = #{gmtModified},
modifier = #{modifier}
WHERE
task_id = #{taskId}
<if test="taskId != '' and taskId != null">
task_id = #{taskId}
</if>
<if test="reportId != '' and reportId != null">
report_id = #{reportId}
</if>
</update>
<!-- 案件预警详情 -->

View File

@ -221,7 +221,7 @@
// 初始化1级区域下拉选择
function initArea1Select() {
top.restAjax.get(top.restAjax.path('api/area/listallbyparentid/{areaParentId}', [0]), {}, null, function(code, data, args) {
top.restAjax.get(top.restAjax.path('api/mongo/area/list-all/parent-id/{areaParentId}', [0]), {}, null, function(code, data, args) {
initSelectRadioCheckboxTemplate('area1SelectTemplate', 'area1SelectTemplateBox', data);
}, function(code, data) {
top.dialog.msg(data.msg);
@ -235,7 +235,7 @@
callback ? callback() : null;
return;
}
top.restAjax.get(top.restAjax.path('api/area/listallbyparentid/{areaParentId}', [area1]), {}, null, function(code, data, args) {
top.restAjax.get(top.restAjax.path('api/mongo/area/list-all/parent-id/{areaParentId}', [area1]), {}, null, function(code, data, args) {
initSelectRadioCheckboxTemplate('area2SelectTemplate', 'area2SelectTemplateBox', data);
callback ? callback() : null;
}, function(code, data) {
@ -251,7 +251,7 @@
callback ? callback() : null;
return;
}
top.restAjax.get(top.restAjax.path('api/area/listallbyparentid/{areaParentId}', [area2]), {}, null, function(code, data, args) {
top.restAjax.get(top.restAjax.path('api/mongo/area/list-all/parent-id/{areaParentId}', [area2]), {}, null, function(code, data, args) {
initSelectRadioCheckboxTemplate('area3SelectTemplate', 'area3SelectTemplateBox', data);
callback ? callback() : null;
}, function(code, data) {
@ -267,7 +267,7 @@
callback ? callback() : null;
return;
}
top.restAjax.get(top.restAjax.path('api/area/listallbyparentid/{areaParentId}', [area3]), {}, null, function(code, data, args) {
top.restAjax.get(top.restAjax.path('api/mongo/area/list-all/parent-id/{areaParentId}', [area3]), {}, null, function(code, data, args) {
initSelectRadioCheckboxTemplate('area4SelectTemplate', 'area4SelectTemplateBox', data);
callback ? callback() : null;
}, function(code, data) {
@ -283,7 +283,7 @@
callback ? callback() : null;
return;
}
top.restAjax.get(top.restAjax.path('api/area/listallbyparentid/{areaParentId}', [area4]), {}, null, function(code, data, args) {
top.restAjax.get(top.restAjax.path('api/mongo/area/list-all/parent-id/{areaParentId}', [area4]), {}, null, function(code, data, args) {
initSelectRadioCheckboxTemplate('area5SelectTemplate', 'area5SelectTemplateBox', data);
callback ? callback() : null;
}, function(code, data) {

View File

@ -208,7 +208,7 @@
// 初始化1级区域下拉选择
function initArea1Select(selectValue, callback) {
top.restAjax.get(top.restAjax.path('api/area/listallbyparentid/{areaParentId}', [0]), {}, null, function(code, data, args) {
top.restAjax.get(top.restAjax.path('api/mongo/area/list-all/parent-id/{areaParentId}', [0]), {}, null, function(code, data, args) {
initSelectRadioCheckboxTemplate('area1SelectTemplate', 'area1SelectTemplateBox', data, function() {
var selectObj = {};
selectObj['area1'] = selectValue;
@ -231,7 +231,7 @@
});
return;
}
top.restAjax.get(top.restAjax.path('api/area/listallbyparentid/{areaParentId}', [area1]), {}, null, function(code, data, args) {
top.restAjax.get(top.restAjax.path('api/mongo/area/list-all/parent-id/{areaParentId}', [area1]), {}, null, function(code, data, args) {
initSelectRadioCheckboxTemplate('area2SelectTemplate', 'area2SelectTemplateBox', data, function() {
var selectObj = {};
selectObj['area2'] = selectValue;
@ -255,7 +255,7 @@
});
return;
}
top.restAjax.get(top.restAjax.path('api/area/listallbyparentid/{areaParentId}', [area2]), {}, null, function(code, data, args) {
top.restAjax.get(top.restAjax.path('api/mongo/area/list-all/parent-id/{areaParentId}', [area2]), {}, null, function(code, data, args) {
initSelectRadioCheckboxTemplate('area3SelectTemplate', 'area3SelectTemplateBox', data, function() {
var selectObj = {};
selectObj['area3'] = selectValue;
@ -279,7 +279,7 @@
});
return;
}
top.restAjax.get(top.restAjax.path('api/area/listallbyparentid/{areaParentId}', [area3]), {}, null, function(code, data, args) {
top.restAjax.get(top.restAjax.path('api/mongo/area/list-all/parent-id/{areaParentId}', [area3]), {}, null, function(code, data, args) {
initSelectRadioCheckboxTemplate('area4SelectTemplate', 'area4SelectTemplateBox', data, function() {
var selectObj = {};
selectObj['area4'] = selectValue;
@ -303,7 +303,7 @@
callback ? callback() : null;
return;
}
top.restAjax.get(top.restAjax.path('api/area/listallbyparentid/{areaParentId}', [area4]), {}, null, function(code, data, args) {
top.restAjax.get(top.restAjax.path('api/mongo/area/list-all/parent-id/{areaParentId}', [area4]), {}, null, function(code, data, args) {
initSelectRadioCheckboxTemplate('area5SelectTemplate', 'area5SelectTemplateBox', data, function() {
var selectObj = {};
selectObj['area5'] = selectValue;

View File

@ -0,0 +1,290 @@
<!doctype html>
<html lang="en">
<head>
<base href="/case/">
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=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">
<div class="test-table-reload-btn" style="margin-bottom: 10px;">
<div class="layui-inline">
<input type="text" id="keywords" class="layui-input search-item" placeholder="输入关键字">
</div>
<div class="layui-inline">
<input type="text" id="startTime" class="layui-input search-item" placeholder="开始时间" readonly>
</div>
<div class="layui-inline">
<input type="text" id="endTime" class="layui-input search-item" placeholder="结束时间" readonly>
</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>
<!-- 表头按钮组 -->
<script type="text/html" id="headerToolBar">
<div class="layui-btn-group">
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="showEvent">
<i class="fa fa-lg fa-edit"></i> 查看
</button>
<!-- <button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="updateEvent">
<i class="fa fa-lg fa-edit"></i> 编辑
</button>
<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="removeEvent">
<i class="fa fa-lg fa-trash"></i> 删除
</button>-->
</div>
</script>
</div>
</div>
</div>
</div>
</div>
<script src="assets/layuiadmin/layui/layui.js"></script>
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
<script>
layui.config({
base: 'assets/layuiadmin/'
}).extend({
index: 'lib/index'
}).use(['index', 'table', 'laydate', 'common'], function() {
var $ = layui.$;
var $win = $(window);
var table = layui.table;
var admin = layui.admin;
var laydate = layui.laydate;
var common = layui.common;
var resizeTimeout = null;
var tableUrl = 'api/pary/listpage/{reportId}';
var reportId = top.restAjax.params(window.location.href).reportId;
// 初始化表格
function initTable() {
table.render({
elem: '#dataTable',
id: 'dataTable',
url: top.restAjax.path(tableUrl, [reportId]),
width: admin.screen() > 1 ? '100%' : '',
height: $win.height() - 90,
limit: 20,
limits: [20, 40, 60, 80, 100, 200],
toolbar: '#headerToolBar',
request: {
pageName: 'page',
limitName: 'rows'
},
cols: [
[
{type:'checkbox', fixed: 'left'},
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
{field: 'paryWayText', width: 180, title: '回访途径', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'paryDate', width: 180, title: '回访时间', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'paryContent', width: 180, title: '回访内容', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'isSatisfaction', width: 180, title: '是否满意', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
if(rowData == 0){
return '否'
}
if(rowData == 1){
return '是'
}
return rowData;
}
},
{field: 'gmtCreate', width: 180, title: '记录时间', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
}
]
],
page: true,
parseData: function(data) {
return {
'code': 0,
'msg': '',
'count': data.total,
'data': data.rows
};
}
});
}
// 重载表格
function reloadTable(currentPage) {
table.reload('dataTable', {
url: top.restAjax.path(tableUrl, [reportId]),
where: {
keywords: $('#keywords').val(),
startTime: $('#startTime').val(),
endTime: $('#endTime').val()
},
page: {
curr: currentPage
},
height: $win.height() - 90,
});
}
// 初始化日期
function initDate() {
// 日期选择
laydate.render({
elem: '#startTime',
format: 'yyyy-MM-dd'
});
laydate.render({
elem: '#endTime',
format: 'yyyy-MM-dd'
});
}
// 删除
function removeData(ids) {
top.dialog.msg(top.dataMessage.delete, {
time: 0,
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
shade: 0.3,
yes: function (index) {
top.dialog.close(index);
var layIndex;
top.restAjax.delete(top.restAjax.path('api/pary/remove/{ids}', [ids]), {}, null, function (code, data) {
top.dialog.msg(top.dataMessage.deleteSuccess, {time: 1000});
reloadTable();
}, function (code, data) {
top.dialog.msg(data.msg);
}, function () {
layIndex = top.dialog.msg(top.dataMessage.deleting, {icon: 16, time: 0, shade: 0.3});
}, function () {
top.dialog.close(layIndex);
});
}
});
}
initTable();
initDate();
// 事件 - 页面变化
$win.on('resize', function() {
clearTimeout(resizeTimeout);
resizeTimeout = setTimeout(function() {
reloadTable();
}, 500);
});
// 事件 - 搜索
$(document).on('click', '#search', function() {
reloadTable(1);
});
// 事件 - 增删改
table.on('toolbar(dataTable)', function(obj) {
var layEvent = obj.event;
var checkStatus = table.checkStatus('dataTable');
var checkDatas = checkStatus.data;
if(layEvent === 'saveEvent') {
layer.open({
type: 2,
title: false,
closeBtn: 0,
area: ['100%', '100%'],
shadeClose: true,
anim: 2,
content: top.restAjax.path('route/pary/save.html?reportId={reportId}', [reportId]),
end: function() {
reloadTable();
}
});
} else if(layEvent === 'updateEvent') {
if(checkDatas.length === 0) {
top.dialog.msg(top.dataMessage.table.selectEdit);
} else if(checkDatas.length > 1) {
top.dialog.msg(top.dataMessage.table.selectOneEdit);
} else {
layer.open({
type: 2,
title: false,
closeBtn: 0,
area: ['100%', '100%'],
shadeClose: true,
anim: 2,
content: top.restAjax.path('route/pary/update.html?paryId={paryId}', [checkDatas[0].paryId]),
end: function() {
reloadTable();
}
});
}
} else if(layEvent === 'removeEvent') {
if(checkDatas.length === 0) {
top.dialog.msg(top.dataMessage.table.selectDelete);
} else {
var ids = '';
for(var i = 0, item; item = checkDatas[i++];) {
if(i > 1) {
ids += '_';
}
ids += item['paryId'];
}
removeData(ids);
}
} else if(layEvent === 'showEvent'){
if(checkDatas.length === 0) {
top.dialog.msg(top.dataMessage.table.selectEdit);
} else if(checkDatas.length > 1) {
top.dialog.msg(top.dataMessage.table.selectOneEdit);
} else {
layer.open({
type: 2,
title: false,
closeBtn: 0,
area: ['100%', '100%'],
shadeClose: true,
anim: 2,
content: top.restAjax.path('route/pary/show.html?paryId={paryId}', [checkDatas[0].paryId]),
end: function() {
reloadTable();
}
});
}
}
});
});
</script>
</body>
</html>

View File

@ -472,7 +472,7 @@
id = 110889
}
var loadLayerIndex;
top.restAjax.get(top.restAjax.path('api/area/listbyparentid/{areaParentId}}', [id]), {}, null, function(code, data) {
top.restAjax.get(top.restAjax.path('api/mongo/area/list/parent-id/{areaParentId}', [id]), {}, null, function(code, data) {
var dataFormData = [];
data.forEach(function (e) {
var arr = {};
@ -499,8 +499,15 @@
var label = node.path.map(function (node) {
return node.label;
}).join(separator);
$('#reportAreaCode').val(node.data.code);
$('#reportAreaName').val(label);
if($('#reportAreaCode').val() != node.data.code){
$('#reportAreaCode').val(node.data.code);
$('#reportAreaName').val('内蒙古自治区'+ separator + '乌兰察布市'+ separator + label);
$('#bGId').val("")
$('#bGName').val("")
}
});
}
//初始化事件类型

View File

@ -14,6 +14,7 @@
<body>
<div class="layui-anim layui-anim-fadein">
<div class="layui-card">
<input type="hidden" id="businessId" value="">
<div class="layui-card-body" style="padding: 15px;">
<div class="layui-tab">
<ul class="layui-tab-title">
@ -44,7 +45,7 @@
<tr>
<th>节点名称</th>
<th>处理人</th>
<th>处理部门</th>
<!--<th>处理部门</th>-->
<th>开始时间</th>
<th>结束时间</th>
<th>耗时</th>
@ -56,7 +57,7 @@
<tr>
<td>{{ item.nodeName }}</td>
<td>{{ item.nodeUserName }}</td>
<td>{{ item.nodeUserDeptName }}</td>
<!--<td>{{ item.nodeUserDeptName }}</td>-->
<td>{{ item.nodeStateTime }}</td>
<td>{{ item.nodeEndTime }}</td>
<td>{{ item.nodeTimeConsuming }}</td>
@ -139,6 +140,7 @@
</div>
</div>
</div>
</div>
<script src="assets/js/vendor/wangEditor/wangEditor.min.js"></script>
<script src="assets/js/vendor/ckplayer/ckplayer/ckplayer.js"></script>
@ -155,9 +157,36 @@
var form = layui.form;
var element = layui.element;
var businessId = top.restAjax.params(window.location.href).businessId;
var reportId = top.restAjax.params(window.location.href).reportId;
if(businessId == undefined || businessId == ''){
var loadLayerIndex;
top.restAjax.get(top.restAjax.path('api/report/getbuinessid/{reportId}', [reportId]), {}, null, function(code, data) {
var businessId = data.data;
initUrl(businessId);
initData(businessId)
}, function(code, data) {
top.dialog.msg(data.msg);
}, function() {
loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
}, function() {
top.dialog.close(loadLayerIndex);
});
}else{
initUrl(businessId);
initData(businessId)
}
function initUrl(businessId){
$('#processFlow').attr('src',"route/activiti/get-runtime-process-image/"+ businessId)
$('#distributionLog').attr('src',"route/distribution/show-history.html?businessId="+ businessId)
}
$('#processFlow').attr('src',"route/activiti/get-runtime-process-image/"+ businessId)
$('#distributionLog').attr('src',"route/distribution/show-history.html?businessId="+ businessId)
function closeBox() {
parent.layer.close(parent.layer.getFrameIndex(window.name));
@ -165,9 +194,9 @@
// 初始化内容
function initData() {
function initData(id) {
var loadLayerIndex;
top.restAjax.get(top.restAjax.path('api/reportlog/list-activity/{reportId}', [businessId]), {}, null, function(code, data) {
top.restAjax.get(top.restAjax.path('api/reportlog/list-activity/{businessId}', [id]), {}, null, function(code, data) {
laytpl(document.getElementById('logTemplate').innerHTML).render(data, function(html) {
document.getElementById('logTemplateView').innerHTML = html;
form.render(null, 'dataForm');
@ -180,7 +209,6 @@
top.dialog.close(loadLayerIndex);
});
}
initData();

View File

@ -30,13 +30,14 @@
</div>
</div>
<div class="layui-form-item" pane>
<input type="hidden" name="distributionType" value="department" lay-filter="distributionType" title="责任主体" checked>
<!-- <div class="layui-form-item" pane>
<label class="layui-form-label" >指派范围</label>
<div class="layui-input-block">
<!--<input type="radio" name="distributionType" value="area" lay-filter="distributionType" title="区域" checked >-->
&lt;!&ndash;<input type="radio" name="distributionType" value="area" lay-filter="distributionType" title="区域" checked >&ndash;&gt;
<input type="radio" name="distributionType" value="department" lay-filter="distributionType" title="责任主体" checked>
</div>
</div>
</div>-->
<div class="layui-form-item" pane>
<label class="layui-form-label">指派类型</label>
<div class="layui-input-block">
@ -158,7 +159,6 @@
});
function selectSpecialUser(){
top.dialog.dialogData.selectedUserIds = $('#specialUserId').val();
top.dialog.open({
url: top.restAjax.path('route/taskbase/allocate/select-dept.html', []),
title: '选择专办单位',
@ -174,11 +174,11 @@
$('#specialDeptId').val(selectedTypeRBArray[0].id);
$('#specialDeptName').val(selectedTypeRBArray[0].name);
}
top.dialog.dialogTreeData.selectedNodes = [];
}
})
}
function selectMasterUser(){
top.dialog.dialogData.selectedUserIds = $('#specialUserId').val();
top.dialog.open({
url: top.restAjax.path('route/taskbase/allocate/select-dept.html', []),
title: '选择主办单位',
@ -199,7 +199,6 @@
})
}
function selectAssistUser(){
top.dialog.dialogData.selectedUserIds = $('#specialUserId').val();
top.dialog.open({
url: top.restAjax.path('route/taskbase/allocate/select-dept.html', []),
title: '选择协办单位',

View File

@ -155,13 +155,14 @@
return rowData;
}
},
{field: 'cz', width: 300, title: '操作', align:'center',fixed: 'right',
{field: 'cz', width: 500, title: '操作', align:'center',fixed: 'right',
templet: function(row) {
var level = row['taskLevel'];
var rowData = '<div class="layui-btn-group">';
rowData += '<button type="button" class="layui-btn layui-btn-sm" lay-event="showEvent">详情</button>';
rowData += '<button type="button" class="layui-btn layui-btn-sm layui-btn-normal" lay-event="logEvent">日志</button>';
rowData += '<button type="button" class="layui-btn layui-btn-sm layui-btn-normal" lay-event="partEvent">回访记录</button>';
rowData += '<button type="button" class="layui-btn layui-btn-sm layui-btn-normal" lay-event="handleEvent">处理结果</button>';
rowData += '<button type="button" class="layui-btn layui-btn-sm layui-btn-normal" lay-event="evaluateEvent">评价记录</button>';
rowData += '</div>';
return rowData;
@ -262,15 +263,15 @@
shadeClose: false,
anim: 2,
maxmin:false,
content: top.restAjax.path('route/pary/list.html?reportId={reportId}', [data.reportId]),
content: top.restAjax.path('route/pary/list-show.html?reportId={reportId}', [data.reportId]),
end: function() {
reloadTable();
}
});
}else if(layEvent === 'partEvent'){
}else if(layEvent === 'evaluateEvent'){
layer.open({
type: 2,
title: '回访记录',
title: '评价结果',
closeBtn: 1,
area: ['90%', '90%'],
shadeClose: false,

View File

@ -80,7 +80,6 @@
function initTask() {
var loadLayerIndex;
top.restAjax.get(top.restAjax.path('api/distributionuser/get-bytaskId/{taskId}', [taskId]), {}, null, function(code, data) {
console.log(data)
initFrame();
initThree(data.userDeptId , data.userDeptName);
}, function(code, data) {
@ -171,6 +170,8 @@
userDom += '<a id="user_'+ item.userId +'" href="javascript:void(0);" class="users list-group-item '+ (isUserSelected(item.userId) ? 'user-selected' : '') +'" lay-click-user data-userid="'+ item.userId +'" data-username="'+ item.userName +'"data-departmentId="'+item.departmentId+'">'+ avatarDom + item.userName +' ['+ item.userUsername +']</a>';
}
$('#userWrapper').append(userDom);
$('.layui-flow-more').remove();
}
function addSearchUserDom(data) {
if(data.length < 1) {

View File

@ -163,6 +163,7 @@
rowData += '<button type="button" class="layui-btn layui-btn-sm" lay-event="showEvent">案件详情</button>';
rowData += '<button type="button" class="layui-btn layui-btn-sm layui-btn-normal" lay-event="logEvent">日志</button>';
rowData += '<button type="button" class="layui-btn layui-btn-sm layui-btn-warm" lay-event="pass">通过</button>';
rowData += '<button type="button" class="layui-btn layui-btn-sm layui-btn-warm" lay-event="check">核查</button>';
rowData += '<button type="button" class="layui-btn layui-btn-sm layui-btn-warm" lay-event="noPass">退回</button>';
rowData += '</div>';
return rowData;
@ -253,7 +254,24 @@
reloadTable();
}
});
}else if(layEvent === 'pass'){
}else if(layEvent === 'check'){
layer.open({
type: 2,
title: '核查',
closeBtn: 1,
area: ['90%', '90%'],
shadeClose: false,
anim: 2,
maxmin:false,
content: top.restAjax.path('route/taskbase/dispatchexamine/save-dispatchexamine.html?taskId={taskId}', [data.taskId]),
end: function() {
reloadTable();
}
});
}
else if(layEvent === 'pass'){
top.dialog.msg('处理结果核查通过,该案件处理流程结束?', {
time: 0,
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],

View File

@ -10,11 +10,6 @@
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
<link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
<style>
.layui-form-pane .layui-form-label{width:116px !important;}
.layui-form-pane .layui-input-block{margin-left: 116px !important;}
</style>
</head>
<body>
<div class="layui-fluid layui-anim layui-anim-fadein">
@ -22,131 +17,115 @@
<div class="layui-card-header">
<span class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
<a class="close" href="javascript:void(0);">上级列表</a><span lay-separator="">/</span>
<a href="javascript:void(0);"><cite>事件详情</cite></a>
<a href="javascript:void(0);"><cite>核查详情</cite></a>
</span>
</div>
<div class="layui-card-body" style="padding: 15px;">
<form class="layui-form layui-form-pane" lay-filter="dataForm">
<blockquote class="layui-elem-quote">派遣信息</blockquote>
<div class="layui-row layui-col-space10">
<div class="layui-col-md6">
<div class="layui-form-item">
<label class="layui-form-label">事件上报</label>
<label class="layui-form-label">派遣</label>
<div class="layui-input-block">
<input type="text" id="creatorName" name="creatorName" class="layui-input" value="" placeholder="暂无" readonly="readonly"/>
<input type="text" id="creatorName" name="creatorName" class="layui-input" value="" placeholder="暂无" readonly="readonly">
</div>
</div>
</div>
<div class="layui-col-md6">
<div class="layui-form-item">
<label class="layui-form-label">事件上报时间</label>
<div class="layui-input-block" >
<input type="text" id="gmtCreate" name="gmtCreate" class="layui-input" value="" placeholder="暂无" readonly="readonly"/>
<label class="layui-form-label">派遣时间</label>
<div class="layui-input-block">
<input type="input" id="gmtCreate" name="gmtCreate" class="layui-input" value="" placeholder="暂无" readonly="readonly">
</div>
</div>
</div>
</div>
<div class="layui-row layui-col-space10">
<div class="layui-col-md6">
<div class="layui-form-item">
<label class="layui-form-label">事件来源</label>
<div class="layui-input-block" >
<input type="text" id="reportSourceText" name="reportSourceText" class="layui-input" value="" placeholder="暂无" readonly="readonly"/>
</div>
</div>
</div>
<div class="layui-col-md6">
<div class="layui-form-item">
<label class="layui-form-label">是否自处理</label>
<div class="layui-input-block" >
<input class="layui-input" type="text" id="isSelfText" name="isSelfText" value="" placeholder="暂无" readonly="readonly"/>
</div>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-form-item">
<label class="layui-form-label">事件地区</label>
<div class="layui-input-block">
<input type="text" id="reportAreaName" name="reportAreaName" class="layui-input" value="" placeholder="暂无" maxlength="255" readonly="readonly">
</div>
</div>
</div>
<div class="layui-row layui-col-space10">
<div class="layui-col-md6">
<div class="layui-form-item">
<label class="layui-form-label">所在网格</label>
<div class="layui-input-block">
<input type="text" id="bGId" name="bGId" class="layui-input" value="" placeholder="暂无" readonly="readonly">
</div>
</div>
</div>
<div class="layui-col-md6">
<div class="layui-form-item">
<label class="layui-form-label">事件类型</label>
<div class="layui-input-block">
<input type="input" id="caseTypeName" name="caseTypeName" class="layui-input" value="" placeholder="暂无" readonly="readonly">
</div>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-form-item">
<label class="layui-form-label">部件名称</label>
<div class="layui-input-block">
<div class="layui-col-md6">
<input type="text" id="casePartsObjName" name="casePartsObjName" class="layui-input" value="" placeholder="暂无" readonly="readonly">
<input type="hidden" id="casePartsObjId" name="casePartsObjId">
</div>
<div class="layui-col-md3">
<button type="button" class="layui-btn" id="showCasePars">部件详情</button>
</div>
<div class="layui-form-item layui-form-text">
<label class="layui-form-label" >派遣说明</label>
<div class="layui-input-block" >
<textarea readonly id="dispatchSummary" name="dispatchSummary" class="layui-textarea"></textarea>
</div>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label" >事发位置</label>
<label class="layui-form-label" >处理时间</label>
<div class="layui-input-block" >
<input type="text" id="reportAddress" name="reportAddress" class="layui-input" value="" placeholder="暂无" readonly="readonly">
<input type="text" id="dispatchHandleTime" name="dispatchHandleTime" class="layui-input" value="" placeholder="暂无" readonly="readonly">
</div>
</div>
<div class="layui-form-item layui-form-text">
<label class="layui-form-label" style="width:100%!important;">事件说明</label>
<div class="layui-input-block" style="margin-left: 0!important;">
<textarea readonly id="reportContent" name="reportContent" class="layui-textarea" placeholder="暂无" lay-verify="required"></textarea>
<div class="layui-row layui-col-space10">
<div class="layui-col-md6">
<div class="layui-form-item">
<label class="layui-form-label" >处理人</label>
<div class="layui-input-block" >
<input type="text" id="dispatchUserName" name="dispatchUserName" class="layui-input" value="" placeholder="暂无" readonly="readonly">
</div>
</div>
</div>
<div class="layui-col-md6">
<div class="layui-form-item">
<label class="layui-form-label" >处理部门</label>
<div class="layui-input-block" >
<input type="text" id="dispatchUserDeptName" name="dispatchUserDeptName" class="layui-input" value="" placeholder="暂无" readonly="readonly">
</div>
</div>
</div>
</div>
<div class="layui-row layui-col-space10">
<div class="layui-col-md6">
<div class="layui-form-item">
<label class="layui-form-label">事发位置经度</label>
<div class="layui-input-block">
<input type="text" id="reportLng" name="reportLng" class="layui-input" value="" placeholder="暂无" readonly="readonly">
<label class="layui-form-label" >是否延期</label>
<div class="layui-input-block" >
<input type="text" id="isAllowDelay" name="isAllowDelay" class="layui-input" value="" placeholder="暂无" readonly="readonly">
</div>
</div>
</div>
<div class="layui-col-md6">
<div class="layui-form-item">
<label class="layui-form-label">事发位置纬度</label>
<div class="layui-input-block">
<input type="text" id="reportLat" name="reportLat" class="layui-input" value="" placeholder="暂无" readonly="readonly">
<label class="layui-form-label" >延期时间</label>
<div class="layui-input-block" >
<input type="text" id="delayExpireTime" name="delayExpireTime" class="layui-input" value="" placeholder="暂无" readonly="readonly">
</div>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-col-md12 layui-col-sm12" style="padding: 0 0px;">
<div id="mapContainer" style="width: 100%;height: 350px;"></div>
<blockquote class="layui-elem-quote">处理信息</blockquote>
<div class="layui-row layui-col-space10">
<div class="layui-col-md6">
<div class="layui-form-item">
<label class="layui-form-label">处理人</label>
<div class="layui-input-block" >
<input class="layui-input" id="handleCreator" name="handleCreator">
</div>
</div>
</div>
<div class="layui-col-md6">
<div class="layui-form-item">
<label class="layui-form-label">处理时间</label>
<div class="layui-input-block" >
<input class="layui-input" id="handleGmtCreate" name="handleGmtCreate">
</div>
</div>
</div>
</div>
<div class="layui-row layui-col-space10">
<div class="layui-form-item layui-form-text">
<label class="layui-form-label">处理说明</label>
<div class="layui-input-block" >
<textarea id="handleSummary" name="handleSummary" class="layui-textarea"></textarea>
</div>
</div>
</div>
<div class="layui-form-item layui-form-text">
<label class="layui-form-label" style="width:100%!important;">事件图片</label>
<label class="layui-form-label" style="width:100%!important;">处理图片</label>
<div class="layui-input-block" style="margin-left: 0!important;">
<input type="hidden" id="reportPhotos" name="reportPhotos">
<div class="layui-btn-container" id="reportPhotosFileBox" style="border: 1px solid #e6e6e6;"></div>
<script id="reportPhotosFileDownload" type="text/html">
{{# var fileName = 'reportPhotos'; }}
<input type="hidden" id="handlePhotos" name="handlePhotos">
<div class="layui-btn-container" id="handlePhotosFileBox" style="border: 1px solid #e6e6e6;"></div>
<script id="handlePhotosFileDownload" type="text/html">
{{# var fileName = 'handlePhotos'; }}
{{# if(d[fileName].length > 0) { }}
{{# var files = d[fileName];}}
{{# for(var i = 0, item = files[i]; item = files[i++];) { }}
@ -164,12 +143,11 @@
<div class="layui-form-item layui-layout-admin">
<div class="layui-input-block">
<div class="layui-footer" style="left: 0;">
<button type="button" class="layui-btn layui-btn-normal sample">
<i class="layui-icon layui-icon-note">标杆事件</i>
<button type="button" class="layui-btn layui-btn-normal pass">
<i class="layui-icon layui-icon-note">处理完成</i>
</button>
<button type="button" class="layui-btn layui-btn-warm collect">
<i class="layui-icon layui-icon-rate">收藏</i>
<button type="button" class="layui-btn layui-btn-warm nopass">
<i class="layui-icon layui-icon-rate">重新处理</i>
</button>
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
</div>
@ -179,7 +157,6 @@
</div>
</div>
</div>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=3.0&ak=oWU9RD4ihDHAafexgI6XOrTK8lDatRju"></script>
<script src="assets/js/vendor/wangEditor/wangEditor.min.js"></script>
<script src="assets/js/vendor/ckplayer/ckplayer/ckplayer.js"></script>
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
@ -193,11 +170,7 @@
var $ = layui.$;
var form = layui.form;
var laytpl = layui.laytpl;
var laydate = layui.laydate;
var reportId = top.restAjax.params(window.location.href).reportId;
var wangEditor = window.wangEditor;
var wangEditorObj = {};
var taskId = top.restAjax.params(window.location.href).taskId;
var viewerObj = {};
function closeBox() {
@ -239,30 +212,15 @@
});
}
// 初始化视频
function initVideo(fileName, data) {
for(var i = 0, item; item = data[i++];) {
var player = new ckplayer({
container: '#'+ fileName + i,
variable: 'player',
flashplayer: false,
video: {
file: 'route/file/download/true/'+ item.fileId,
type: 'video/mp4'
}
});
}
}
// 初始化上报图片图片上传
function initReportPhotosUploadFile() {
var files = $('#reportPhotos').val();
initFileList('reportPhotos', files, function(fileName) {
function initHandlePhotosUploadFile() {
var files = $('#handlePhotos').val();
initFileList('handlePhotos', files, function(fileName) {
var viewer = new Viewer(document.getElementById(fileName +'FileBox'), {navbar: false});
viewerObj[fileName] = viewer;
});
form.on('button(reportPhotosUploadFile)', function(obj) {
form.on('button(handlePhotosUploadFile)', function(obj) {
var name = this.dataset.name;
var explain = this.dataset.explain;
top.dialog.file({
@ -289,7 +247,7 @@
});
});
form.on('button(reportPhotosRemoveFile)', function(obj) {
form.on('button(handlePhotosRemoveFile)', function(obj) {
var name = this.dataset.name;
var id = this.dataset.id;
var files = $('#'+ name).val().replace(id, '');
@ -305,139 +263,108 @@
});
});
}
// 初始化上报音频音频上传
function initReportAudioUploadFile() {
var files = $('#reportAudio').val();
initFileList('reportAudio', files);
form.on('button(reportAudioUploadFile)', function(obj) {
var name = this.dataset.name;
var explain = this.dataset.explain;
top.dialog.file({
type: 'audio',
title: '上传'+ explain,
width: '400px',
height: '420px',
maxFileCount: '1',
onClose: function() {
var uploadFileArray = top.dialog.dialogData.uploadFileArray;
if(typeof(uploadFileArray) != 'undefined' && uploadFileArray.length > 0) {
var files = $('#'+ name).val();
for(var j = 0, file = uploadFileArray[j]; file = uploadFileArray[j++];) {
if(files.length > 0) {
files += ',';
}
files += file.data;
}
initFileList(name, files);
$('.close').on('click', function() {
closeBox();
});
//通过
$('.pass').on('click', function() {
var reportId = $('#reportId').val();
layer.prompt({
formType: 2,
title: '请输入核查说明',
maxlength:200,
area: ['600px', '300px'] //自定义文本域宽高
}, function(value, index, elem){
layer.close(index);
var loadLayerIndex;
var formData={};
formData.taskId = taskId;
formData.explain = value;
top.restAjax.put(top.restAjax.path('api/taskcompetebase/update-dispatch-he-pass/{reportId}', [reportId]), formData, null, function(code, data) {
var layerIndex = top.dialog.msg('成功!', {
time: 0,
btn: [top.dataMessage.button.yes],
shade: 0.3,
yes: function(index) {
top.dialog.close(index);
closeBox();
}
}
});
}, function(code, data) {
top.dialog.msg(data.msg);
}, function() {
loadLayerIndex = top.dialog.msg(top.dataMessage.committing, {icon: 16, time: 0, shade: 0.3});
}, function() {
top.dialog.close(loadLayerIndex);
});
});
});
form.on('button(reportAudioRemoveFile)', function(obj) {
var name = this.dataset.name;
var id = this.dataset.id;
var files = $('#'+ name).val().replace(id, '');
files = files.replace(/\,+/g, ',');
if(files.charAt(0) == ',') {
files = files.substring(1);
}
if(files.charAt(files.length - 1) == ',') {
files = files.substring(0, files.length - 1);
}
initFileList(name, files);
});
}
// 初始化上报视频视频上传
function initReportVideoUploadFile() {
var files = $('#reportVideo').val();
initFileList('reportVideo', files, initVideo);
form.on('button(reportVideoUploadFile)', function(obj) {
var name = this.dataset.name;
var explain = this.dataset.explain;
top.dialog.file({
type: 'video',
title: '上传'+ explain,
width: '400px',
height: '420px',
maxFileCount: '1',
onClose: function() {
var uploadFileArray = top.dialog.dialogData.uploadFileArray;
if(typeof(uploadFileArray) != 'undefined' && uploadFileArray.length > 0) {
var files = $('#'+ name).val();
for(var j = 0, file = uploadFileArray[j]; file = uploadFileArray[j++];) {
if(files.length > 0) {
files += ',';
}
files += file.data;
}
initFileList(name, files, initVideo);
//不通过
$('.nopass').on('click', function() {
var reportId = $('#reportId').val();
layer.prompt({
formType: 2,
title: '请输入核查说明',
maxlength:200,
area: ['600px', '300px'] //自定义文本域宽高
}, function(value, index, elem){
layer.close(index);
var loadLayerIndex;
var formData={};
formData.taskId = taskId;
formData.explain = value;
top.restAjax.put(top.restAjax.path('api/taskcompetebase/update-dispatch-he-nopass/{reportId}', [reportId]), formData, null, function(code, data) {
var layerIndex = top.dialog.msg('成功,已退回到处理人重新处理!', {
time: 0,
btn: [top.dataMessage.button.yes],
shade: 0.3,
yes: function(index) {
top.dialog.close(index);
closeBox();
}
}
});
}, function(code, data) {
top.dialog.msg(data.msg);
}, function() {
loadLayerIndex = top.dialog.msg(top.dataMessage.committing, {icon: 16, time: 0, shade: 0.3});
}, function() {
top.dialog.close(loadLayerIndex);
});
});
form.on('button(reportVideoRemoveFile)', function(obj) {
var name = this.dataset.name;
var id = this.dataset.id;
var files = $('#'+ name).val().replace(id, '');
files = files.replace(/\,+/g, ',');
if(files.charAt(0) == ',') {
files = files.substring(1);
}
if(files.charAt(files.length - 1) == ',') {
files = files.substring(0, files.length - 1);
}
initFileList(name, files, initVideo);
});
}
//初始化百度地图
function initMap(longitude, latitude) {
map = new BMap.Map("mapContainer", {enableMapClick: false,});
var point = new BMap.Point(longitude, latitude);
map.centerAndZoom(point, 12);
map.disableDoubleClickZoom();
map.addControl(new BMap.NavigationControl());
map.addControl(new BMap.ScaleControl());
map.addControl(new BMap.OverviewMapControl());
map.addControl(new BMap.MapTypeControl());
map.enableScrollWheelZoom();//启用地图滚轮放大缩小
map.enableContinuousZoom();//开启缩放平滑
var geocoder= new BMap.Geocoder();
mapMarkPoint(map, point);
}
//地图标点
function mapMarkPoint(map, point) {
var marker = new BMap.Marker(point);
map.addOverlay(marker);
});
function initData(){
initDispatchInfo();
initHandleInfo();
}
function initCaseTypeName(type1Name,type2Name) {
return type1Name + ' / ' + type2Name;
}
// 初始化内容
function initData() {
// 初始化派遣信息
function initDispatchInfo() {
var loadLayerIndex;
top.restAjax.get(top.restAjax.path('api/report/get/{reportId}', [reportId]), {}, null, function(code, data) {
top.restAjax.get(top.restAjax.path('api/dispatch/get-bytaskId/{taskId}', [taskId]), {}, null, function(code, data) {
var dataFormData = {};
for(var i in data) {
dataFormData[i] = data[i] +'';
}
dataFormData['caseTypeName'] = initCaseTypeName(data['caseTypeName1'],data['caseTypeName2']);
dataFormData['isAllowDelay'] = dataFormData['isAllowDelay'] == '0' ? '否':'是'
form.val('dataForm', dataFormData);
form.render(null, 'dataForm');
initReportPhotosUploadFile();
initReportAudioUploadFile();
initReportVideoUploadFile();
initMap(data.reportLng,data.reportLat)
}, function(code, data) {
top.dialog.msg(data.msg);
}, function() {
@ -446,76 +373,35 @@
top.dialog.close(loadLayerIndex);
});
}
// 初始化处理信息
function initHandleInfo() {
var loadLayerIndex;
top.restAjax.get(top.restAjax.path('api/handle/get-bytaskid/{taskId}', [taskId]), {}, null, function(code, data) {
var dataFormData = {};
for(var i in data) {
dataFormData[i] = data[i] +'';
}
dataFormData['handleGmtCreate'] = dataFormData['gmtCreate']
dataFormData['handleCreatorName'] = dataFormData['creatorName']
delete dataFormData.gmtCreate
delete dataFormData.creator
form.val('dataForm', dataFormData);
form.render(null, 'dataForm');
initHandlePhotosUploadFile();
}, function(code, data) {
top.dialog.msg(data.msg);
}, function() {
loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
}, function() {
top.dialog.close(loadLayerIndex);
});
}
initData();
$('.close').on('click', function() {
closeBox();
});
//收藏
$('.collect').on('click', function() {
var field = {};
field.reportId = reportId;
top.dialog.confirm('确定收藏该案件?', function(index) {
top.dialog.close(index);
var loadLayerIndex;
top.restAjax.post(top.restAjax.path('api/collect/save', []), field, null, function(code, data) {
top.dialog.msg('成功!');
}, function(code, data) {
top.dialog.msg(data.msg);
}, function() {
loadLayerIndex = top.dialog.msg(top.dataMessage.committing, {icon: 16, time: 0, shade: 0.3});
}, function() {
top.dialog.close(loadLayerIndex);
});
});
});
//标杆
$('.sample').on('click', function() {
var field = {};
field.reportId = reportId;
top.dialog.confirm('确定将该案件设为标杆案件?', function(index) {
top.dialog.close(index);
var loadLayerIndex;
top.restAjax.post(top.restAjax.path('api/sample/save', []), field, null, function(code, data) {
top.dialog.msg('成功!');
}, function(code, data) {
top.dialog.msg(data.msg);
}, function() {
loadLayerIndex = top.dialog.msg(top.dataMessage.committing, {icon: 16, time: 0, shade: 0.3});
}, function() {
top.dialog.close(loadLayerIndex);
});
});
});
$('#showCasePars').on('click',function () {
var casePartsObjId = $('#casePartsObjId').val();
if(casePartsObjId == '' || casePartsObjId == null){
top.dialog.msg('未选择部件');
return;
}
layer.open({
type: 2,
title: '部件详情',
closeBtn: 1,
area: ['70%', '70%'],
shadeClose: false,
anim: 2,
maxmin:false,
content: top.restAjax.path('route/parts/show-orgid.html?objId={objId}', [casePartsObjId]),
end: function() {
}
});
});
// 校验
form.verify({
});