From 4daebf5f12e700576a503ebfd32725fa4b5b7b67 Mon Sep 17 00:00:00 2001 From: Renpc-kilig <308442850@qq.com> Date: Wed, 10 Nov 2021 18:03:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A1=E6=9F=A5=E4=BB=BB=E5=8A=A1=E4=B8=8A?= =?UTF-8?q?=E6=8A=A5=E5=8A=9F=E8=83=BD=E6=96=B0=E5=A2=9E=E3=80=82=20?= =?UTF-8?q?=E5=B7=A1=E6=9F=A5=E4=BB=BB=E5=8A=A1app=E7=AB=AF=E5=AF=B9?= =?UTF-8?q?=E6=8E=A5=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../distribute/DistributeAppController.java | 19 ++ .../systemtask/matterenum/MatterEnum.java | 27 +++ .../pojo/dtos/distribute/MatterDTO.java | 10 + .../dtos/receiveruser/ReceiverUserDTO.java | 10 + .../ReceiverUserPatrolDTO.java | 28 +++ .../KeyAreaCheckRenovationPatrolVO.java | 91 ++++++++ .../pojo/vos/businesspagebus/LineCaseVO.java | 206 ++++++++++++++++++ .../ReceiverUserPatrolVO.java | 28 +++ .../systemtask/remote/IBusinessPageBus.java | 36 +++ .../distribute/IDistributeService.java | 10 + .../impl/DistributeServiceImpl.java | 8 + .../service/matter/IMatterService.java | 4 +- .../matter/impl/MatterServiceImpl.java | 6 +- .../impl/ReceiverUserServiceImpl.java | 20 +- .../impl/ReceiverUserPatrolServiceImpl.java | 73 +++++++ .../mybatis/mapper/matter/matter-mapper.xml | 33 ++- .../receiveruser/receiver-user-mapper.xml | 2 + .../receiver-user-patrol-mapper.xml | 33 +++ .../templates/business/list-user.html | 2 + .../templates/distribute/save-business.html | 174 +++++++++------ .../templates/distribute/update-business.html | 2 + .../templates/receiveruserpatrol/save.html | 2 + 22 files changed, 740 insertions(+), 84 deletions(-) create mode 100644 src/main/java/cn/com/tenlion/systemtask/matterenum/MatterEnum.java create mode 100644 src/main/java/cn/com/tenlion/systemtask/pojo/vos/businesspagebus/KeyAreaCheckRenovationPatrolVO.java create mode 100644 src/main/java/cn/com/tenlion/systemtask/pojo/vos/businesspagebus/LineCaseVO.java create mode 100644 src/main/java/cn/com/tenlion/systemtask/remote/IBusinessPageBus.java diff --git a/src/main/java/cn/com/tenlion/systemtask/controller/app/api/distribute/DistributeAppController.java b/src/main/java/cn/com/tenlion/systemtask/controller/app/api/distribute/DistributeAppController.java index b8726d8..20f89d2 100644 --- a/src/main/java/cn/com/tenlion/systemtask/controller/app/api/distribute/DistributeAppController.java +++ b/src/main/java/cn/com/tenlion/systemtask/controller/app/api/distribute/DistributeAppController.java @@ -1,6 +1,7 @@ package cn.com.tenlion.systemtask.controller.app.api.distribute; import cn.com.tenlion.systemtask.pojo.dtos.distribute.DistributeDTO; +import cn.com.tenlion.systemtask.pojo.dtos.distribute.MatterDTO; import cn.com.tenlion.systemtask.pojo.vos.distribute.DistributeVO; import cn.com.tenlion.systemtask.service.distribute.IDistributeService; import ink.wgink.annotation.CheckRequestBodyAnnotation; @@ -118,4 +119,22 @@ public class DistributeAppController extends DefaultBaseController { return new SuccessResultData<>(distributeService.count(params)); } + @ApiOperation(value = "任务下派分页列表", notes = "任务下派分页列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", paramType = "header"), + @ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"), + @ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"), + @ApiImplicitParam(name = "distributeId", value = "任务ID", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "matterIdx", value = "userIdx", paramType = "query", dataType = "int"), + @ApiImplicitParam(name = "business", value = "business", paramType = "query", dataType = "String") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("listpagematter") + public SuccessResultList> listpagematter(@RequestHeader("token") String token, ListPage page) { + Map params = requestParams(); + params.put("token", token); + page.setParams(params); + return distributeService.listpagematter(page); + } + } \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/systemtask/matterenum/MatterEnum.java b/src/main/java/cn/com/tenlion/systemtask/matterenum/MatterEnum.java new file mode 100644 index 0000000..89c1792 --- /dev/null +++ b/src/main/java/cn/com/tenlion/systemtask/matterenum/MatterEnum.java @@ -0,0 +1,27 @@ +package cn.com.tenlion.systemtask.matterenum; + +/** + * @ClassName: MatterEnum + * @Description: + * @Author: renpc + * @Date: 2021-11-10 10:11:34 + * @Version: 1.0 + **/ +public enum MatterEnum { + + // 重点地区排查整治 + KeyAreaCheckRenovation("keyarea"), + // 涉及线、路案(事)件 + LineCase("linecase"); + + + private String value; + + MatterEnum(String value) { + this.value = value; + } + + public void setValue(String value) { + this.value = value; + } +} diff --git a/src/main/java/cn/com/tenlion/systemtask/pojo/dtos/distribute/MatterDTO.java b/src/main/java/cn/com/tenlion/systemtask/pojo/dtos/distribute/MatterDTO.java index 1f98ddf..a08258f 100644 --- a/src/main/java/cn/com/tenlion/systemtask/pojo/dtos/distribute/MatterDTO.java +++ b/src/main/java/cn/com/tenlion/systemtask/pojo/dtos/distribute/MatterDTO.java @@ -14,6 +14,8 @@ import io.swagger.annotations.ApiModelProperty; @ApiModel public class MatterDTO { + @ApiModelProperty(name = "taskMatterId", value = "主键UUID") + private String taskMatterId; @ApiModelProperty(name = "matterId", value = "主键UUID") private String matterId; @ApiModelProperty(name = "distributeId", value = "任务ID") @@ -41,6 +43,14 @@ public class MatterDTO { @ApiModelProperty(name = "isDelete", value = "") private Integer isDelete; + public String getTaskMatterId() { + return taskMatterId; + } + + public void setTaskMatterId(String taskMatterId) { + this.taskMatterId = taskMatterId; + } + public String getMatterId() { return matterId == null ? "" : matterId.trim(); } diff --git a/src/main/java/cn/com/tenlion/systemtask/pojo/dtos/receiveruser/ReceiverUserDTO.java b/src/main/java/cn/com/tenlion/systemtask/pojo/dtos/receiveruser/ReceiverUserDTO.java index cace228..389c481 100644 --- a/src/main/java/cn/com/tenlion/systemtask/pojo/dtos/receiveruser/ReceiverUserDTO.java +++ b/src/main/java/cn/com/tenlion/systemtask/pojo/dtos/receiveruser/ReceiverUserDTO.java @@ -66,6 +66,8 @@ public class ReceiverUserDTO { private String business; @ApiModelProperty(name = "userIdx", value = "巡查事项") private Integer userIdx; + @ApiModelProperty(name = "distributeTaskType", value = "巡查事项") + private String distributeTaskType; public String getReceiverUserId() { return receiverUserId == null ? "" : receiverUserId.trim(); @@ -267,6 +269,14 @@ public class ReceiverUserDTO { this.userIdx = userIdx; } + public String getDistributeTaskType() { + return distributeTaskType; + } + + public void setDistributeTaskType(String distributeTaskType) { + this.distributeTaskType = distributeTaskType; + } + @Override public String toString() { return "ReceiverUserDTO{" + diff --git a/src/main/java/cn/com/tenlion/systemtask/pojo/dtos/receiveruserpatrol/ReceiverUserPatrolDTO.java b/src/main/java/cn/com/tenlion/systemtask/pojo/dtos/receiveruserpatrol/ReceiverUserPatrolDTO.java index c5b8e3c..f866460 100644 --- a/src/main/java/cn/com/tenlion/systemtask/pojo/dtos/receiveruserpatrol/ReceiverUserPatrolDTO.java +++ b/src/main/java/cn/com/tenlion/systemtask/pojo/dtos/receiveruserpatrol/ReceiverUserPatrolDTO.java @@ -40,6 +40,12 @@ public class ReceiverUserPatrolDTO { private String gmtModified; @ApiModelProperty(name = "isDelete", value = "") private Integer isDelete; + @ApiModelProperty(name = "business", value = "业务ID") + private String business; + @ApiModelProperty(name = "userIdx", value = "下标") + private String userIdx; + @ApiModelProperty(name = "taskMatterId", value = "事项ID") + private String taskMatterId; public String getReceiverUserPatrolId() { return receiverUserPatrolId; @@ -145,5 +151,27 @@ public class ReceiverUserPatrolDTO { this.isDelete = isDelete; } + public String getBusiness() { + return business; + } + public void setBusiness(String business) { + this.business = business; + } + + public String getUserIdx() { + return userIdx; + } + + public void setUserIdx(String userIdx) { + this.userIdx = userIdx; + } + + public String getTaskMatterId() { + return taskMatterId; + } + + public void setTaskMatterId(String taskMatterId) { + this.taskMatterId = taskMatterId; + } } diff --git a/src/main/java/cn/com/tenlion/systemtask/pojo/vos/businesspagebus/KeyAreaCheckRenovationPatrolVO.java b/src/main/java/cn/com/tenlion/systemtask/pojo/vos/businesspagebus/KeyAreaCheckRenovationPatrolVO.java new file mode 100644 index 0000000..fcc01b2 --- /dev/null +++ b/src/main/java/cn/com/tenlion/systemtask/pojo/vos/businesspagebus/KeyAreaCheckRenovationPatrolVO.java @@ -0,0 +1,91 @@ +package cn.com.tenlion.systemtask.pojo.vos.businesspagebus; + +import ink.wgink.annotation.CheckEmptyAnnotation; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * + * @ClassName: KeyAreaCheckRenovationPatrolVO + * @Description: 重点区域巡查记录 + * @Author: CodeFactory + * @Date: 2021-10-20 09:50:11 + * @Version: 3.0 + **/ +@ApiModel +public class KeyAreaCheckRenovationPatrolVO { + + @ApiModelProperty(name = "keyAreaCheckRenovationId", value = "重点区域ID") + private String keyAreaCheckRenovationId; + @ApiModelProperty(name = "patrolTime", value = "巡查时间") + @CheckEmptyAnnotation(name = "巡查时间", verifyType = "datetime") + private String patrolTime; + @ApiModelProperty(name = "patrolContent", value = "巡查内容") + private String patrolContent; + @ApiModelProperty(name = "patrolResult", value = "巡查结果") + private String patrolResult; + @ApiModelProperty(name = "patrolPhoto", value = "巡查照片") + private String patrolPhoto; + @ApiModelProperty(name = "patrolVideo", value = "巡查视频") + private String patrolVideo; + @ApiModelProperty(name = "remake", value = "备注") + private String remake; + + public String getKeyAreaCheckRenovationId() { + return keyAreaCheckRenovationId; + } + + public void setKeyAreaCheckRenovationId(String keyAreaCheckRenovationId) { + this.keyAreaCheckRenovationId = keyAreaCheckRenovationId; + } + + public String getPatrolTime() { + return patrolTime == null ? "" : patrolTime.trim(); + } + + public void setPatrolTime(String patrolTime) { + this.patrolTime = patrolTime; + } + + public String getPatrolContent() { + return patrolContent == null ? "" : patrolContent.trim(); + } + + public void setPatrolContent(String patrolContent) { + this.patrolContent = patrolContent; + } + + public String getPatrolResult() { + return patrolResult == null ? "" : patrolResult.trim(); + } + + public void setPatrolResult(String patrolResult) { + this.patrolResult = patrolResult; + } + + public String getPatrolPhoto() { + return patrolPhoto == null ? "" : patrolPhoto.trim(); + } + + public void setPatrolPhoto(String patrolPhoto) { + this.patrolPhoto = patrolPhoto; + } + + public String getPatrolVideo() { + return patrolVideo == null ? "" : patrolVideo.trim(); + } + + public void setPatrolVideo(String patrolVideo) { + this.patrolVideo = patrolVideo; + } + + public String getRemake() { + return remake == null ? "" : remake.trim(); + } + + public void setRemake(String remake) { + this.remake = remake; + } + + +} diff --git a/src/main/java/cn/com/tenlion/systemtask/pojo/vos/businesspagebus/LineCaseVO.java b/src/main/java/cn/com/tenlion/systemtask/pojo/vos/businesspagebus/LineCaseVO.java new file mode 100644 index 0000000..9907476 --- /dev/null +++ b/src/main/java/cn/com/tenlion/systemtask/pojo/vos/businesspagebus/LineCaseVO.java @@ -0,0 +1,206 @@ +package cn.com.tenlion.systemtask.pojo.vos.businesspagebus; + +import ink.wgink.annotation.CheckEmptyAnnotation; +import ink.wgink.annotation.CheckNumberAnnotation; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * + * @ClassName: LineCaseVO + * @Description: 涉及线、路案(事)件 + * @Author: CodeFactory + * @Date: 2021-10-13 14:58:15 + * @Version: 3.0 + **/ +@ApiModel +public class LineCaseVO { + + @ApiModelProperty(name = "caseCode", value = "案(事)件编号") + private String caseCode; + @ApiModelProperty(name = "caseName", value = "案(事)件名称") + private String caseName; + @ApiModelProperty(name = "happenTime", value = "发生日期") + @CheckEmptyAnnotation(name = "发生日期", verifyType = "date") + private String happenTime; + @ApiModelProperty(name = "happenAddress", value = "发生地点") + private String happenAddress; + @ApiModelProperty(name = "caseNature", value = "案(事)件性质字典表ID") + private String caseNature; + @ApiModelProperty(name = "caseNatureName", value = "案(事)件性质名称") + private String caseNatureName; + @ApiModelProperty(name = "caseNatureCode", value = "案(事)件性质编码") + private String caseNatureCode; + @ApiModelProperty(name = "caseSituation", value = "案(事)件情况") + private String caseSituation; + @ApiModelProperty(name = "principalCardCode", value = "主犯(嫌疑人)证件代码字典表ID") + private String principalCardCode; + @ApiModelProperty(name = "principalCardCodeName", value = "主犯(嫌疑人)证件代码名称") + private String principalCardCodeName; + @ApiModelProperty(name = "principalCardCodeCode", value = "主犯(嫌疑人)证件代码编码") + private String principalCardCodeCode; + @ApiModelProperty(name = "principalCardNum", value = "主犯(嫌疑人)证件号码") + private String principalCardNum; + @ApiModelProperty(name = "principalName", value = "主犯(嫌疑人)姓名") + private String principalName; + @ApiModelProperty(name = "isSolve", value = "是否破案") + @CheckNumberAnnotation(name = "是否破案") + private Integer isSolve; + @ApiModelProperty(name = "crimeCount", value = "作案人数") + @CheckNumberAnnotation(name = "作案人数") + private Integer crimeCount; + @ApiModelProperty(name = "atLargeCount", value = "在逃人数") + @CheckNumberAnnotation(name = "在逃人数") + private Integer atLargeCount; + @ApiModelProperty(name = "arrestCount", value = "抓捕人数") + @CheckNumberAnnotation(name = "抓捕人数") + private Integer arrestCount; + @ApiModelProperty(name = "caseSolve", value = "案件侦破情况") + private String caseSolve; + + public String getCaseCode() { + return caseCode == null ? "" : caseCode.trim(); + } + + public void setCaseCode(String caseCode) { + this.caseCode = caseCode; + } + + public String getCaseName() { + return caseName == null ? "" : caseName.trim(); + } + + public void setCaseName(String caseName) { + this.caseName = caseName; + } + + public String getHappenTime() { + return happenTime == null ? "" : happenTime.trim(); + } + + public void setHappenTime(String happenTime) { + this.happenTime = happenTime; + } + + public String getHappenAddress() { + return happenAddress == null ? "" : happenAddress.trim(); + } + + public void setHappenAddress(String happenAddress) { + this.happenAddress = happenAddress; + } + + public String getCaseNature() { + return caseNature == null ? "" : caseNature.trim(); + } + + public void setCaseNature(String caseNature) { + this.caseNature = caseNature; + } + + public String getCaseNatureName() { + return caseNatureName == null ? "" : caseNatureName.trim(); + } + + public void setCaseNatureName(String caseNatureName) { + this.caseNatureName = caseNatureName; + } + + public String getCaseNatureCode() { + return caseNatureCode == null ? "" : caseNatureCode.trim(); + } + + public void setCaseNatureCode(String caseNatureCode) { + this.caseNatureCode = caseNatureCode; + } + + public String getCaseSituation() { + return caseSituation == null ? "" : caseSituation.trim(); + } + + public void setCaseSituation(String caseSituation) { + this.caseSituation = caseSituation; + } + + public String getPrincipalCardCode() { + return principalCardCode == null ? "" : principalCardCode.trim(); + } + + public void setPrincipalCardCode(String principalCardCode) { + this.principalCardCode = principalCardCode; + } + + public String getPrincipalCardCodeName() { + return principalCardCodeName == null ? "" : principalCardCodeName.trim(); + } + + public void setPrincipalCardCodeName(String principalCardCodeName) { + this.principalCardCodeName = principalCardCodeName; + } + + public String getPrincipalCardCodeCode() { + return principalCardCodeCode == null ? "" : principalCardCodeCode.trim(); + } + + public void setPrincipalCardCodeCode(String principalCardCodeCode) { + this.principalCardCodeCode = principalCardCodeCode; + } + + public String getPrincipalCardNum() { + return principalCardNum == null ? "" : principalCardNum.trim(); + } + + public void setPrincipalCardNum(String principalCardNum) { + this.principalCardNum = principalCardNum; + } + + public String getPrincipalName() { + return principalName == null ? "" : principalName.trim(); + } + + public void setPrincipalName(String principalName) { + this.principalName = principalName; + } + + public Integer getIsSolve() { + return isSolve == null ? 0 : isSolve; + } + + public void setIsSolve(Integer isSolve) { + this.isSolve = isSolve; + } + + public Integer getCrimeCount() { + return crimeCount == null ? 0 : crimeCount; + } + + public void setCrimeCount(Integer crimeCount) { + this.crimeCount = crimeCount; + } + + public Integer getAtLargeCount() { + return atLargeCount == null ? 0 : atLargeCount; + } + + public void setAtLargeCount(Integer atLargeCount) { + this.atLargeCount = atLargeCount; + } + + public Integer getArrestCount() { + return arrestCount == null ? 0 : arrestCount; + } + + public void setArrestCount(Integer arrestCount) { + this.arrestCount = arrestCount; + } + + public String getCaseSolve() { + return caseSolve == null ? "" : caseSolve.trim(); + } + + public void setCaseSolve(String caseSolve) { + this.caseSolve = caseSolve; + } + + +} diff --git a/src/main/java/cn/com/tenlion/systemtask/pojo/vos/receiveruserpatrol/ReceiverUserPatrolVO.java b/src/main/java/cn/com/tenlion/systemtask/pojo/vos/receiveruserpatrol/ReceiverUserPatrolVO.java index 0aadcb2..50b8a6f 100644 --- a/src/main/java/cn/com/tenlion/systemtask/pojo/vos/receiveruserpatrol/ReceiverUserPatrolVO.java +++ b/src/main/java/cn/com/tenlion/systemtask/pojo/vos/receiveruserpatrol/ReceiverUserPatrolVO.java @@ -31,6 +31,12 @@ public class ReceiverUserPatrolVO { private String patrolVideo; @ApiModelProperty(name = "remake", value = "备注") private String remake; + @ApiModelProperty(name = "business", value = "业务ID") + private String business; + @ApiModelProperty(name = "userIdx", value = "下标") + private String userIdx; + @ApiModelProperty(name = "taskMatterId", value = "事项ID") + private String taskMatterId; public String getReceiverUserId() { return receiverUserId == null ? "" : receiverUserId.trim(); @@ -88,5 +94,27 @@ public class ReceiverUserPatrolVO { this.remake = remake; } + public String getBusiness() { + return business; + } + public void setBusiness(String business) { + this.business = business; + } + + public String getUserIdx() { + return userIdx; + } + + public void setUserIdx(String userIdx) { + this.userIdx = userIdx; + } + + public String getTaskMatterId() { + return taskMatterId; + } + + public void setTaskMatterId(String taskMatterId) { + this.taskMatterId = taskMatterId; + } } diff --git a/src/main/java/cn/com/tenlion/systemtask/remote/IBusinessPageBus.java b/src/main/java/cn/com/tenlion/systemtask/remote/IBusinessPageBus.java new file mode 100644 index 0000000..8036ebf --- /dev/null +++ b/src/main/java/cn/com/tenlion/systemtask/remote/IBusinessPageBus.java @@ -0,0 +1,36 @@ +package cn.com.tenlion.systemtask.remote; + +import cn.com.tenlion.systemtask.pojo.dtos.businesspage.KeyAreaDTO; +import cn.com.tenlion.systemtask.pojo.vos.businesspagebus.KeyAreaCheckRenovationPatrolVO; +import ink.wgink.annotation.rpc.rest.RemoteService; +import ink.wgink.annotation.rpc.rest.method.RemoteGetMethod; +import ink.wgink.annotation.rpc.rest.method.RemotePostMethod; +import ink.wgink.annotation.rpc.rest.method.RemotePutMethod; +import ink.wgink.annotation.rpc.rest.params.RemoteJsonBodyParams; +import ink.wgink.annotation.rpc.rest.params.RemoteQueryParams; +import ink.wgink.annotation.rpc.rest.params.RemoteServerParams; +import ink.wgink.pojo.result.SuccessResultList; + +import java.util.List; + +/** + * @ClassName: IBusinessPageBus + * @Description: 业务功能相关页面的业务功能 + * @Author: renpc + * @Date: 2021-11-04 10:53:00 + * @Version: 1.0 + **/ +@RemoteService +public interface IBusinessPageBus { + + /** + * 获取重点地区排查整治分页列表 + * @param remotePath + * @param access_token + * @return + */ + @RemotePostMethod("resource/keyareacheckrenovationpatrol/save") + SuccessResultList> saveKeyareaListpage(@RemoteServerParams String remotePath, @RemoteJsonBodyParams KeyAreaCheckRenovationPatrolVO keyAreaCheckRenovationPatrolVO, @RemoteQueryParams("access_token") String access_token); + + +} diff --git a/src/main/java/cn/com/tenlion/systemtask/service/distribute/IDistributeService.java b/src/main/java/cn/com/tenlion/systemtask/service/distribute/IDistributeService.java index 26745c3..400c379 100644 --- a/src/main/java/cn/com/tenlion/systemtask/service/distribute/IDistributeService.java +++ b/src/main/java/cn/com/tenlion/systemtask/service/distribute/IDistributeService.java @@ -4,8 +4,10 @@ import cn.com.tenlion.systemtask.pojo.bos.distribute.DistributeBO; import cn.com.tenlion.systemtask.pojo.dtos.distribute.ChartsDTO; import cn.com.tenlion.systemtask.pojo.dtos.distribute.DistributeDTO; import cn.com.tenlion.systemtask.pojo.dtos.distribute.DistributeListDTO; +import cn.com.tenlion.systemtask.pojo.dtos.distribute.MatterDTO; import cn.com.tenlion.systemtask.pojo.pos.distribute.DistributePO; import cn.com.tenlion.systemtask.pojo.vos.distribute.DistributeVO; +import ink.wgink.exceptions.SearchException; import ink.wgink.pojo.ListPage; import ink.wgink.pojo.result.SuccessResultData; import ink.wgink.pojo.result.SuccessResultList; @@ -291,4 +293,12 @@ public interface IDistributeService { * @return */ SuccessResultData> barCharts(Map params) throws ParseException; + + /** + * 事项列表 + * @param page + * @return + * @throws SearchException + */ + SuccessResultList> listpagematter(ListPage page) throws SearchException; } \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/systemtask/service/distribute/impl/DistributeServiceImpl.java b/src/main/java/cn/com/tenlion/systemtask/service/distribute/impl/DistributeServiceImpl.java index b5511d3..9a199cb 100644 --- a/src/main/java/cn/com/tenlion/systemtask/service/distribute/impl/DistributeServiceImpl.java +++ b/src/main/java/cn/com/tenlion/systemtask/service/distribute/impl/DistributeServiceImpl.java @@ -1116,6 +1116,14 @@ public class DistributeServiceImpl extends DefaultBaseService implements IDistri return new SuccessResultData<>(backMap); } + @Override + public SuccessResultList> listpagematter(ListPage page) throws SearchException { + PageHelper.startPage(page.getPage(), page.getRows()); + List matterDTOS = matterService.list(page.getParams()); + PageInfo pageInfo = new PageInfo<>(matterDTOS); + return new SuccessResultList<>(matterDTOS, pageInfo.getPageNum(), pageInfo.getTotal()); + } + /** * 按月份计算数据 * @param date diff --git a/src/main/java/cn/com/tenlion/systemtask/service/matter/IMatterService.java b/src/main/java/cn/com/tenlion/systemtask/service/matter/IMatterService.java index 226c03c..84b21b2 100644 --- a/src/main/java/cn/com/tenlion/systemtask/service/matter/IMatterService.java +++ b/src/main/java/cn/com/tenlion/systemtask/service/matter/IMatterService.java @@ -106,10 +106,10 @@ public interface IMatterService { /** * 任务事项列表详情 * - * @param matterId + * @param taskMatterId * @return */ - MatterDTO get(String matterId); + MatterDTO get(String taskMatterId); /** * 任务事项列表列表 diff --git a/src/main/java/cn/com/tenlion/systemtask/service/matter/impl/MatterServiceImpl.java b/src/main/java/cn/com/tenlion/systemtask/service/matter/impl/MatterServiceImpl.java index 85e2f63..e4d77cb 100644 --- a/src/main/java/cn/com/tenlion/systemtask/service/matter/impl/MatterServiceImpl.java +++ b/src/main/java/cn/com/tenlion/systemtask/service/matter/impl/MatterServiceImpl.java @@ -48,6 +48,8 @@ public class MatterServiceImpl extends DefaultBaseService implements IMatterServ @Override public String saveReturnId(String token, MatterVO matterVO) { Map params = HashMapUtil.beanToMap(matterVO); + String taskMatterId = UUIDUtil.getUUID(); + params.put("taskMatterId", taskMatterId); if (StringUtils.isBlank(token)) { setSaveInfo(params); } else { @@ -104,9 +106,9 @@ public class MatterServiceImpl extends DefaultBaseService implements IMatterServ } @Override - public MatterDTO get(String matterId) { + public MatterDTO get(String taskMatterId) { Map params = super.getHashMap(2); - params.put("matterId", matterId); + params.put("taskMatterId", taskMatterId); return get(params); } diff --git a/src/main/java/cn/com/tenlion/systemtask/service/receiveruser/impl/ReceiverUserServiceImpl.java b/src/main/java/cn/com/tenlion/systemtask/service/receiveruser/impl/ReceiverUserServiceImpl.java index 93ef661..1194124 100644 --- a/src/main/java/cn/com/tenlion/systemtask/service/receiveruser/impl/ReceiverUserServiceImpl.java +++ b/src/main/java/cn/com/tenlion/systemtask/service/receiveruser/impl/ReceiverUserServiceImpl.java @@ -2,6 +2,7 @@ package cn.com.tenlion.systemtask.service.receiveruser.impl; import cn.com.tenlion.systemtask.dao.receiveruser.IReceiverUserDao; import cn.com.tenlion.systemtask.pojo.bos.receiveruser.ReceiverUserBO; +import cn.com.tenlion.systemtask.pojo.dtos.distribute.DistributeDTO; import cn.com.tenlion.systemtask.pojo.dtos.distributesub.DistributeSubDTO; import cn.com.tenlion.systemtask.pojo.dtos.receiveruser.ReceiverUserDTO; import cn.com.tenlion.systemtask.pojo.pos.receiveruser.ReceiverUserPO; @@ -150,7 +151,24 @@ public class ReceiverUserServiceImpl extends DefaultBaseService implements IRece @Override public ReceiverUserDTO get(Map params) { - return receiverUserDao.get(params); + ReceiverUserDTO receiverUserDTO = receiverUserDao.get(params); + if(null != receiverUserDTO) { + DistributeDTO distributeDTO = distributeService.get(receiverUserDTO.getDistributeId()); + if(null != distributeDTO) { + receiverUserDTO.setDistributeTitle(distributeDTO.getDistributeTitle()); + receiverUserDTO.setDistributeSummary(distributeDTO.getDistributeSummary()); + receiverUserDTO.setDistributeTime(distributeDTO.getDistributeTime()); + receiverUserDTO.setDistributeDeadline(distributeDTO.getDistributeDeadline()); + } + if(!StringUtils.isEmpty(receiverUserDTO.getDistributeSubId())) { + DistributeSubDTO distributeSubDTO = distributeSubService.get(receiverUserDTO.getDistributeSubId()); + if(null != distributeSubDTO) { + receiverUserDTO.setDistributeDeadline(distributeSubDTO.getDeadTime()); + receiverUserDTO.setFrequency(distributeSubDTO.getFrequency()); + } + } + } + return receiverUserDTO; } @Override diff --git a/src/main/java/cn/com/tenlion/systemtask/service/receiveruserpatrol/impl/ReceiverUserPatrolServiceImpl.java b/src/main/java/cn/com/tenlion/systemtask/service/receiveruserpatrol/impl/ReceiverUserPatrolServiceImpl.java index 7b17cce..9f3a953 100644 --- a/src/main/java/cn/com/tenlion/systemtask/service/receiveruserpatrol/impl/ReceiverUserPatrolServiceImpl.java +++ b/src/main/java/cn/com/tenlion/systemtask/service/receiveruserpatrol/impl/ReceiverUserPatrolServiceImpl.java @@ -1,12 +1,21 @@ package cn.com.tenlion.systemtask.service.receiveruserpatrol.impl; import cn.com.tenlion.systemtask.dao.receiveruserpatrol.IReceiverUserPatrolDao; +import cn.com.tenlion.systemtask.matterenum.MatterEnum; import cn.com.tenlion.systemtask.pojo.bos.receiveruserpatrol.ReceiverUserPatrolBO; +import cn.com.tenlion.systemtask.pojo.dtos.distribute.MatterDTO; +import cn.com.tenlion.systemtask.pojo.dtos.receiveruser.ReceiverUserDTO; import cn.com.tenlion.systemtask.pojo.dtos.receiveruserpatrol.ReceiverUserPatrolDTO; import cn.com.tenlion.systemtask.pojo.pos.receiveruserpatrol.ReceiverUserPatrolPO; +import cn.com.tenlion.systemtask.pojo.vos.businesspagebus.KeyAreaCheckRenovationPatrolVO; +import cn.com.tenlion.systemtask.pojo.vos.businesspagebus.LineCaseVO; import cn.com.tenlion.systemtask.pojo.vos.receiveruserpatrol.ReceiverUserPatrolVO; +import cn.com.tenlion.systemtask.remote.IBusinessPageBus; +import cn.com.tenlion.systemtask.service.matter.IMatterService; +import cn.com.tenlion.systemtask.service.receiveruser.IReceiverUserService; import cn.com.tenlion.systemtask.service.receiveruserpatrol.IReceiverUserPatrolService; import ink.wgink.common.base.DefaultBaseService; +import ink.wgink.module.oauth2.manager.OAuth2ClientTokenManager; import ink.wgink.pojo.ListPage; import ink.wgink.pojo.result.SuccessResultList; import ink.wgink.util.map.HashMapUtil; @@ -31,6 +40,12 @@ public class ReceiverUserPatrolServiceImpl extends DefaultBaseService implements @Autowired private IReceiverUserPatrolDao receiverUserPatrolDao; + @Autowired + private IReceiverUserService receiverUserService; + @Autowired + private IMatterService matterService; + @Autowired + private IBusinessPageBus businessPageBus; @Override public void save(ReceiverUserPatrolVO receiverUserPatrolVO) { @@ -58,9 +73,67 @@ public class ReceiverUserPatrolServiceImpl extends DefaultBaseService implements setAppSaveInfo(token, params); } receiverUserPatrolDao.save(params); + getBusinessType(receiverUserPatrolVO); return receiverUserPatrolId; } + private void getBusinessType(ReceiverUserPatrolVO receiverUserPatrolVO) { + if(!StringUtils.isEmpty(receiverUserPatrolVO.getBusiness())) { + String[] businessArr = receiverUserPatrolVO.getBusiness().split("-"); + switch (businessArr[0]) { + case "keyarea": + saveKeyarea(null, receiverUserPatrolVO); + break; + case "linecase": + saveLinecase(null, receiverUserPatrolVO); + break; + } + } + } + + private MatterDTO getMatter(ReceiverUserPatrolVO receiverUserPatrolVO) { + MatterDTO matterDTO = matterService.get(receiverUserPatrolVO.getTaskMatterId()); + return matterDTO; + } + + private void saveKeyarea(String token, ReceiverUserPatrolVO receiverUserPatrolVO) { + MatterDTO matterDTO = getMatter(receiverUserPatrolVO); + if(null != matterDTO) { + String sendUrl = "http://192.168.0.111:8081/systembase/"; + // String sendUrl = "http://192.168.28.87:8081/systembase/"; + String accessToken = OAuth2ClientTokenManager.getInstance().getToken().getAccessToken(); + KeyAreaCheckRenovationPatrolVO keyAreaCheckRenovationPatrolVO = new KeyAreaCheckRenovationPatrolVO(); + String[] business = matterDTO.getBusiness().split(","); + keyAreaCheckRenovationPatrolVO.setKeyAreaCheckRenovationId(business[0]); + keyAreaCheckRenovationPatrolVO.setPatrolContent(receiverUserPatrolVO.getPatrolContent()); + keyAreaCheckRenovationPatrolVO.setPatrolPhoto(receiverUserPatrolVO.getPatrolPhoto()); + keyAreaCheckRenovationPatrolVO.setPatrolVideo(receiverUserPatrolVO.getPatrolVideo()); + keyAreaCheckRenovationPatrolVO.setPatrolResult(receiverUserPatrolVO.getPatrolResult()); + keyAreaCheckRenovationPatrolVO.setPatrolTime(receiverUserPatrolVO.getPatrolTime()); + keyAreaCheckRenovationPatrolVO.setRemake(receiverUserPatrolVO.getRemake()); + businessPageBus.saveKeyareaListpage(sendUrl, keyAreaCheckRenovationPatrolVO, accessToken); + } + } + + private void saveLinecase(String token, ReceiverUserPatrolVO receiverUserPatrolVO) { + MatterDTO matterDTO = getMatter(receiverUserPatrolVO); + /*if(null != matterDTO) { + String sendUrl = "http://192.168.0.111:8081/systembase/"; + // String sendUrl = "http://192.168.28.87:8081/systembase/"; + String accessToken = OAuth2ClientTokenManager.getInstance().getToken().getAccessToken(); + LineCaseVO lineCaseVO = new LineCaseVO(); + String[] business = matterDTOList.get(0).getBusiness().split(","); + LineCaseVO.setKeyAreaCheckRenovationId(business[0]); + LineCaseVO.setPatrolContent(receiverUserPatrolVO.getPatrolContent()); + LineCaseVO.setPatrolPhoto(receiverUserPatrolVO.getPatrolPhoto()); + LineCaseVO.setPatrolVideo(receiverUserPatrolVO.getPatrolVideo()); + LineCaseVO.setPatrolResult(receiverUserPatrolVO.getPatrolResult()); + LineCaseVO.setPatrolTime(receiverUserPatrolVO.getPatrolTime()); + LineCaseVO.setRemake(receiverUserPatrolVO.getRemake()); + businessPageBus.saveKeyareaListpage(sendUrl, keyAreaCheckRenovationPatrolVO, accessToken); + }*/ + } + @Override public void remove(List ids) { remove(null, ids); diff --git a/src/main/resources/mybatis/mapper/matter/matter-mapper.xml b/src/main/resources/mybatis/mapper/matter/matter-mapper.xml index 508ca6b..7693f2c 100644 --- a/src/main/resources/mybatis/mapper/matter/matter-mapper.xml +++ b/src/main/resources/mybatis/mapper/matter/matter-mapper.xml @@ -3,6 +3,7 @@ + @@ -21,6 +22,7 @@ INSERT INTO task_matter( + task_matter_id, matter_id, distribute_id, name, @@ -35,6 +37,7 @@ gmt_modified, is_delete ) VALUES( + #{taskMatterId}, #{matterId}, #{distributeId}, #{name}, @@ -60,9 +63,9 @@ modifier = #{modifier}, is_delete = 1 WHERE - matter_id IN - - #{matterIds[${index}]} + task_matter_id IN + + #{taskMatterIds[${index}]} @@ -83,9 +86,9 @@ DELETE FROM task_matter WHERE - matter_id IN - - #{matterIds[${index}]} + task_matter_id IN + + #{taskMatterIds[${index}]} @@ -119,7 +122,7 @@ modifier = #{modifier}, matter_id = matter_id WHERE - matter_id = #{matterId} + task_matter_id = #{taskMatterId} @@ -141,11 +144,16 @@ AND t1.matter_id = #{matterId} + + AND + t1.task_matter_id = #{matterId} + diff --git a/src/main/resources/mybatis/mapper/receiveruser/receiver-user-mapper.xml b/src/main/resources/mybatis/mapper/receiveruser/receiver-user-mapper.xml index a1056ce..0a71942 100644 --- a/src/main/resources/mybatis/mapper/receiveruser/receiver-user-mapper.xml +++ b/src/main/resources/mybatis/mapper/receiveruser/receiver-user-mapper.xml @@ -27,6 +27,7 @@ + @@ -365,6 +366,7 @@ t1.is_supervision, t1.business, t1.user_idx, + t2.distribute_task_type, 1 FROM task_receiver_user t1 LEFT JOIN task_distribute t2 ON t1.distribute_id = t2.distribute_id AND t2.is_delete = 0 diff --git a/src/main/resources/mybatis/mapper/receiveruserpatrol/receiver-user-patrol-mapper.xml b/src/main/resources/mybatis/mapper/receiveruserpatrol/receiver-user-patrol-mapper.xml index 72f54d2..2412326 100644 --- a/src/main/resources/mybatis/mapper/receiveruserpatrol/receiver-user-patrol-mapper.xml +++ b/src/main/resources/mybatis/mapper/receiveruserpatrol/receiver-user-patrol-mapper.xml @@ -11,6 +11,9 @@ + + + @@ -54,6 +57,7 @@ INSERT INTO task_receiver_user_patrol( receiver_user_patrol_id, + task_matter_id, receiver_user_id, patrol_time, patrol_content, @@ -61,6 +65,8 @@ patrol_photo, patrol_video, remake, + business, + user_idx, creator, gmt_create, modifier, @@ -68,6 +74,7 @@ is_delete ) VALUES( #{receiverUserPatrolId}, + #{taskMatterId}, #{receiverUserId}, #{patrolTime}, #{patrolContent}, @@ -75,6 +82,8 @@ #{patrolPhoto}, #{patrolVideo}, #{remake}, + #{business}, + #{userIdx}, #{creator}, #{gmtCreate}, #{modifier}, @@ -134,6 +143,15 @@ remake = #{remake}, + + + business = #{business}, + + + user_idx = #{userIdx}, + + + task_matter_id = #{taskMatterId}, gmt_modified = #{gmtModified}, modifier = #{modifier}, @@ -146,12 +164,15 @@ SELECT t1.receiver_user_patrol_id, + t1.task_matter_id, t1.receiver_user_id, t1.patrol_time, t1.patrol_content, @@ -226,6 +248,8 @@ t1.patrol_photo, t1.patrol_video, t1.remake, + t1.business, + t1.user_idx, t1.creator, t1.gmt_create, t1.modifier, @@ -244,6 +268,15 @@ AND t1.receiver_user_id = #{receiverUserId} + + AND t1.business = #{business} + + + AND t1.user_idx = #{userIdx} + + + AND t1.task_matter_id = #{taskMatterId} + AND LEFT(t1.gmt_create, 10) = ]]> #{startTime} diff --git a/src/main/resources/templates/business/list-user.html b/src/main/resources/templates/business/list-user.html index 16df52a..13a7822 100644 --- a/src/main/resources/templates/business/list-user.html +++ b/src/main/resources/templates/business/list-user.html @@ -56,6 +56,8 @@ var selectedUserArray = []; var selectedId = top.dialog.dialogData.selectedUserIds; + console.log(selectedId) + function closeBox() { top.dialog.dialogData.selectedUserArray = selectedUserArray; parent.layer.close(parent.layer.getFrameIndex(window.name)); diff --git a/src/main/resources/templates/distribute/save-business.html b/src/main/resources/templates/distribute/save-business.html index b80bd43..0495291 100644 --- a/src/main/resources/templates/distribute/save-business.html +++ b/src/main/resources/templates/distribute/save-business.html @@ -331,6 +331,8 @@ var matterList = []; // 随机事件数据集合 var randomList = []; + // 记录随机数量 + var randomCountCount = 0; form.verify({ integer: [ @@ -586,7 +588,9 @@ width: '1040px', height: '98%', onClose: function(data) { - templateObj = top.dialog.dialogData.templateObj; + if(!$.isEmptyObject(top.dialog.dialogData.templateObj)) { + templateObj = top.dialog.dialogData.templateObj; + } if(!$.isEmptyObject(templateObj)) { templateType = templateObj.templateType; // 通过模板类型控制页面 @@ -651,6 +655,8 @@ // 单随机任务按钮点击事件 $(document).on('click', '#startRandom', function() { + businessUnbind(); + // 先移除所有方法 var randomCount = $('#randomCount').val(); if('' == randomCount) { top.dialog.msg('随机数量不能为空'); @@ -683,12 +689,15 @@ } var loadLayerIndex; top.restAjax.get(top.restAjax.path(url, [randomCount]), {}, null, function(code, data) { + randomCountCount = randomCount; if(0 == randomType) { + $('#randomBusinessUserDataDiv').hide(); businessDataList = data; businessFun(); }else { + $('#randomBusinessDataDiv').hide(); + $('#randomBusinessLegendDiv').empty(); receiverUserList = data; - console.log(receiverUserList) businessUserFun(); } taskRate = data.rateType; @@ -703,6 +712,9 @@ // 页面显示巡查事项数据 function businessFun() { + randomList = []; + receiverUserList = []; + $('#randomBusinessUserLegendDiv').empty(); // 先清空原有数据 $('#randomBusinessLegendDiv').empty(); // randomBusinessDataDiv @@ -749,10 +761,22 @@ ''; $('#randomBusinessLegendDiv').append(html); + businessForEachData(index); } } + function businessUnbind() { + $("div#randomBusinessLegendDiv input,select").each(function(){ + console.log($(this).attr('id')) + $(document).off('click', '#'+$(this).attr('id')); + }) + $("div#randomBusinessUserLegendDiv input,select").each(function(){ + console.log($(this).attr('id')) + $(document).off('click', '#'+$(this).attr('id')); + }) + } + // 循环时创建每组数据对应的方法(当随机选择为巡查事项) function businessForEachData(index) { $(document).on('click', '#businessData_' + index, function() { @@ -771,45 +795,55 @@ }); function getDataListFor(summary) { + var flag = true; top.dialog.dialogData.selectedDataArray = []; - top.dialog.open({ - title: '选择巡查数据', - url: top.restAjax.path('route/business/' + summary, []), - width: '1040px', - height: '98%', - onClose: function () { - var matterListFor = []; - if(top.dialog.dialogData.selectedDataArray.length > 0) { - matterListFor = top.dialog.dialogData.selectedDataArray; - for(var matterIdx=0;matterIdx 0) { + matterListFor = top.dialog.dialogData.selectedDataArray; + for (var matterIdx = 0; matterIdx < matterListFor.length; matterIdx++) { + matterListFor[matterIdx].matterIdx = index; } - randomList[k].matterList = matterListFor; + console.log(randomList.length) + console.log(receiverUserList.length) + if (0 == randomList.length || randomList.length < businessDataList.length) { + randomList.push({ + business: businessDataList[index].businessId, + matterList: matterListFor, + receiveUserList: [] + }) + } else { + var businessId = businessDataList[index].businessId; + var k = 0; + for (; k < randomList.length; k++) { + if (businessId == randomList[k].business) { + break; + } + } + randomList[k].matterList = matterListFor; + } + $.unique(randomList); } - $.unique(randomList); + $.unique(matterListFor); + if (matterListFor.length > 0) { + $('#businessDataDiv_' + index).show(); + initReceiverMatterTable(matterListFor); + } + }, + cancel: function () { + flag = true; } - $.unique(matterListFor); - if(matterListFor.length > 0) { - $('#businessDataDiv_' + index).show(); - initReceiverMatterTable(matterListFor); - } - } - }) + }) + } } function initReceiverMatterTable(row) { @@ -878,6 +912,8 @@ userIds += item['userId']; } top.dialog.dialogData.selectedUserIds = userIds; + }else { + top.dialog.dialogData.selectedUserIds = []; } var businessId = $(this).next().val(); initBusinessUserFor(businessId); @@ -894,8 +930,8 @@ var receiverUserListFor = []; if(top.dialog.dialogData.selectedUserArray.length > 0) { receiverUserListFor = top.dialog.dialogData.selectedUserArray; - for(var userIdx=0;userIdx\n' + + '
\n' + '\n' + '
\n' + - '\n' + + '\n' + '
\n' + '
\n' + - '