巡查任务上报功能新增。
巡查任务app端对接。
This commit is contained in:
parent
891315595d
commit
4daebf5f12
@ -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<List<MatterDTO>> listpagematter(@RequestHeader("token") String token, ListPage page) {
|
||||
Map<String, Object> params = requestParams();
|
||||
params.put("token", token);
|
||||
page.setParams(params);
|
||||
return distributeService.listpagematter(page);
|
||||
}
|
||||
|
||||
}
|
@ -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;
|
||||
}
|
||||
}
|
@ -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();
|
||||
}
|
||||
|
@ -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{" +
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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<List<KeyAreaDTO>> saveKeyareaListpage(@RemoteServerParams String remotePath, @RemoteJsonBodyParams KeyAreaCheckRenovationPatrolVO keyAreaCheckRenovationPatrolVO, @RemoteQueryParams("access_token") String access_token);
|
||||
|
||||
|
||||
}
|
@ -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<Map<String, Object>> barCharts(Map<String, Object> params) throws ParseException;
|
||||
|
||||
/**
|
||||
* 事项列表
|
||||
* @param page
|
||||
* @return
|
||||
* @throws SearchException
|
||||
*/
|
||||
SuccessResultList<List<MatterDTO>> listpagematter(ListPage page) throws SearchException;
|
||||
}
|
@ -1116,6 +1116,14 @@ public class DistributeServiceImpl extends DefaultBaseService implements IDistri
|
||||
return new SuccessResultData<>(backMap);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SuccessResultList<List<MatterDTO>> listpagematter(ListPage page) throws SearchException {
|
||||
PageHelper.startPage(page.getPage(), page.getRows());
|
||||
List<MatterDTO> matterDTOS = matterService.list(page.getParams());
|
||||
PageInfo<MatterDTO> pageInfo = new PageInfo<>(matterDTOS);
|
||||
return new SuccessResultList<>(matterDTOS, pageInfo.getPageNum(), pageInfo.getTotal());
|
||||
}
|
||||
|
||||
/**
|
||||
* 按月份计算数据
|
||||
* @param date
|
||||
|
@ -106,10 +106,10 @@ public interface IMatterService {
|
||||
/**
|
||||
* 任务事项列表详情
|
||||
*
|
||||
* @param matterId
|
||||
* @param taskMatterId
|
||||
* @return
|
||||
*/
|
||||
MatterDTO get(String matterId);
|
||||
MatterDTO get(String taskMatterId);
|
||||
|
||||
/**
|
||||
* 任务事项列表列表
|
||||
|
@ -48,6 +48,8 @@ public class MatterServiceImpl extends DefaultBaseService implements IMatterServ
|
||||
@Override
|
||||
public String saveReturnId(String token, MatterVO matterVO) {
|
||||
Map<String, Object> 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<String, Object> params = super.getHashMap(2);
|
||||
params.put("matterId", matterId);
|
||||
params.put("taskMatterId", taskMatterId);
|
||||
return get(params);
|
||||
}
|
||||
|
||||
|
@ -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<String, Object> 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
|
||||
|
@ -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<String> ids) {
|
||||
remove(null, ids);
|
||||
|
@ -3,6 +3,7 @@
|
||||
<mapper namespace="cn.com.tenlion.systemtask.dao.matter.IMatterDao">
|
||||
|
||||
<resultMap id="matterDTO" type="cn.com.tenlion.systemtask.pojo.dtos.distribute.MatterDTO">
|
||||
<result column="task_matter_id" property="taskMatterId"/>
|
||||
<result column="matter_id" property="matterId"/>
|
||||
<result column="distribute_id" property="distributeId"/>
|
||||
<result column="name" property="name"/>
|
||||
@ -21,6 +22,7 @@
|
||||
<!-- 新增任务事项列表 -->
|
||||
<insert id="save" parameterType="map">
|
||||
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
|
||||
<foreach collection="matterIds" index="index" open="(" separator="," close=")">
|
||||
#{matterIds[${index}]}
|
||||
task_matter_id IN
|
||||
<foreach collection="taskMatterIds" index="index" open="(" separator="," close=")">
|
||||
#{taskMatterIds[${index}]}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
@ -83,9 +86,9 @@
|
||||
DELETE FROM
|
||||
task_matter
|
||||
WHERE
|
||||
matter_id IN
|
||||
<foreach collection="matterIds" index="index" open="(" separator="," close=")">
|
||||
#{matterIds[${index}]}
|
||||
task_matter_id IN
|
||||
<foreach collection="taskMatterIds" index="index" open="(" separator="," close=")">
|
||||
#{taskMatterIds[${index}]}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
@ -119,7 +122,7 @@
|
||||
modifier = #{modifier},
|
||||
matter_id = matter_id
|
||||
WHERE
|
||||
matter_id = #{matterId}
|
||||
task_matter_id = #{taskMatterId}
|
||||
</update>
|
||||
|
||||
<!-- 任务事项列表详情 -->
|
||||
@ -141,11 +144,16 @@
|
||||
AND
|
||||
t1.matter_id = #{matterId}
|
||||
</if>
|
||||
<if test="taskMatterId != null and taskMatterId != ''">
|
||||
AND
|
||||
t1.task_matter_id = #{matterId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 任务事项列表列表 -->
|
||||
<select id="list" parameterType="map" resultMap="matterDTO">
|
||||
SELECT
|
||||
t1.task_matter_id,
|
||||
t1.matter_id,
|
||||
t1.distribute_id,
|
||||
t1.name,
|
||||
@ -167,6 +175,9 @@
|
||||
<if test="distributeId != null and distributeId != ''">
|
||||
AND t1.distribute_id = #{distributeId}
|
||||
</if>
|
||||
<if test="matterIdx != null and matterIdx != ''">
|
||||
AND t1.matter_idx = #{matterIdx}
|
||||
</if>
|
||||
<if test="keywords != null and keywords != ''">
|
||||
AND (
|
||||
<!-- 这里添加其他条件 -->
|
||||
@ -181,11 +192,11 @@
|
||||
AND
|
||||
LEFT(t1.gmt_create, 10) <![CDATA[ <= ]]> #{endTime}
|
||||
</if>
|
||||
<if test="matterIds != null and matterIds.size > 0">
|
||||
<if test="taskMatterIds != null and taskMatterIds.size > 0">
|
||||
AND
|
||||
t1.matter_id IN
|
||||
<foreach collection="matterIds" index="index" open="(" separator="," close=")">
|
||||
#{matterIds[${index}]}
|
||||
t1.task_matter_id IN
|
||||
<foreach collection="taskMatterIds" index="index" open="(" separator="," close=")">
|
||||
#{taskMatterIds[${index}]}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
@ -27,6 +27,7 @@
|
||||
<result column="is_supervision" property="isSupervision"/>
|
||||
<result column="business" property="business"/>
|
||||
<result column="user_idx" property="userIdx"/>
|
||||
<result column="distribute_task_type" property="distributeTaskType"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="receiverUserBO" type="cn.com.tenlion.systemtask.pojo.bos.receiveruser.ReceiverUserBO">
|
||||
@ -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
|
||||
|
@ -11,6 +11,9 @@
|
||||
<result column="patrol_photo" property="patrolPhoto"/>
|
||||
<result column="patrol_video" property="patrolVideo"/>
|
||||
<result column="remake" property="remake"/>
|
||||
<result column="business" property="business"/>
|
||||
<result column="user_idx" property="userIdx"/>
|
||||
<result column="task_matter_id" property="taskMatterId"/>
|
||||
<result column="creator" property="creator"/>
|
||||
<result column="gmt_create" property="gmtCreate"/>
|
||||
<result column="modifier" property="modifier"/>
|
||||
@ -54,6 +57,7 @@
|
||||
<insert id="save" parameterType="map">
|
||||
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 @@
|
||||
</if>
|
||||
<if test="remake != null and remake != ''">
|
||||
remake = #{remake},
|
||||
</if>
|
||||
<if test="business != null and business != ''">
|
||||
business = #{business},
|
||||
</if>
|
||||
<if test="userIdx != null and userIdx != ''">
|
||||
user_idx = #{userIdx},
|
||||
</if>
|
||||
<if test="taskMatterId != null and taskMatterId != ''">
|
||||
task_matter_id = #{taskMatterId},
|
||||
</if>
|
||||
gmt_modified = #{gmtModified},
|
||||
modifier = #{modifier},
|
||||
@ -146,12 +164,15 @@
|
||||
<select id="get" parameterType="map" resultMap="receiverUserPatrolDTO">
|
||||
SELECT
|
||||
t1.receiver_user_id,
|
||||
t1.task_matter_id,
|
||||
t1.patrol_time,
|
||||
t1.patrol_content,
|
||||
t1.patrol_result,
|
||||
t1.patrol_photo,
|
||||
t1.patrol_video,
|
||||
t1.remake,
|
||||
t1.business,
|
||||
t1.user_idx,
|
||||
t1.receiver_user_patrol_id
|
||||
FROM
|
||||
task_receiver_user_patrol t1
|
||||
@ -219,6 +240,7 @@
|
||||
<select id="list" parameterType="map" resultMap="receiverUserPatrolDTO">
|
||||
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 @@
|
||||
<if test="receiverUserId != null and receiverUserId != ''">
|
||||
AND t1.receiver_user_id = #{receiverUserId}
|
||||
</if>
|
||||
<if test="business != null and business != ''">
|
||||
AND t1.business = #{business}
|
||||
</if>
|
||||
<if test="userIdx != null and userIdx != ''">
|
||||
AND t1.user_idx = #{userIdx}
|
||||
</if>
|
||||
<if test="taskMatterId != null and taskMatterId != ''">
|
||||
AND t1.task_matter_id = #{taskMatterId}
|
||||
</if>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
AND
|
||||
LEFT(t1.gmt_create, 10) <![CDATA[ >= ]]> #{startTime}
|
||||
|
@ -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));
|
||||
|
@ -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 @@
|
||||
'</div>';
|
||||
$('#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<matterListFor.length;matterIdx++) {
|
||||
matterListFor[matterIdx].matterIdx = index;
|
||||
}
|
||||
console.log(randomList.length)
|
||||
console.log(receiverUserList.length)
|
||||
if(randomList.length < receiverUserList.length) {
|
||||
randomList.push({
|
||||
business: businessDataList[index].businessId,
|
||||
matterList: matterListFor,
|
||||
receiveUserList: []
|
||||
})
|
||||
}else {
|
||||
var k = 0;
|
||||
for(;k < randomList.length; k++) {
|
||||
if(businessId == randomList[k].business) {
|
||||
break;
|
||||
}
|
||||
if(flag) {
|
||||
flag = false;
|
||||
top.dialog.open({
|
||||
title: '选择巡查数据',
|
||||
url: top.restAjax.path('route/business/' + summary, []),
|
||||
width: '1040px',
|
||||
height: '98%',
|
||||
id: 'id' + summary + Math.random() * 1000,
|
||||
onClose: function () {
|
||||
flag = true;
|
||||
var matterListFor = [];
|
||||
if (top.dialog.dialogData.selectedDataArray.length > 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<receiverUserList.length;userIdx++) {
|
||||
receiverUserList[userIdx].userIdx = index;
|
||||
for(var userIdx=0;userIdx<receiverUserListFor.length;userIdx++) {
|
||||
receiverUserListFor[userIdx].userIdx = index;
|
||||
}
|
||||
var businessId = businessDataList[index].businessId;
|
||||
var k = 0;
|
||||
@ -972,6 +1008,8 @@
|
||||
|
||||
// 页面显示任务接收人数据
|
||||
function businessUserFun() {
|
||||
randomList = [];
|
||||
$('#randomBusinessLegendDiv').empty();
|
||||
// randomBusinessUserDataDiv
|
||||
// randomBusinessUserLegendDiv
|
||||
// 先清空原有数据
|
||||
@ -980,18 +1018,18 @@
|
||||
$('#randomBusinessUserDataDiv').show();
|
||||
for (var index = 0; index < receiverUserList.length; index++) {
|
||||
var html =
|
||||
'<div class="layui-form-item" id="receiveUserDiv">\n' +
|
||||
'<div class="layui-form-item" id="receiveUserUserDiv">\n' +
|
||||
'<label class="layui-form-label">任务接收人</label>\n' +
|
||||
'<div class="layui-input-block">\n' +
|
||||
'<input type="text" id="receiveUser_' + index + '" name="receiveUser_' + index + '" class="layui-input" value="' + receiverUserList[index].userName + '" readonly>\n' +
|
||||
'<input type="text" id="receiveUserUser_' + index + '" name="receiveUserUser_' + index + '" class="layui-input" value="' + receiverUserList[index].userName + '" readonly>\n' +
|
||||
'</div>\n' +
|
||||
'</div>\n' +
|
||||
|
||||
'<div class="layui-form-item" id="businessDiv_'+index+'" style="display: none;">\n' +
|
||||
'<div class="layui-form-item" id="businessUserDiv_'+index+'" style="display: none;">\n' +
|
||||
'<label class="layui-form-label">巡查事项</label>\n' +
|
||||
'<div class="layui-input-block layui-form" id="businessSelectTemplateBox_'+index+'" lay-filter="businessSelectTemplateBox_'+index+'"></div>\n' +
|
||||
'<sc' + 'ript id="businessSelectTemplate_'+index+'" type="text/html">\n' +
|
||||
'<select id="business_'+index+'" name="business_'+index+'" lay-filter="business_'+index+'" lay-verify="required">\n' +
|
||||
'<div class="layui-input-block layui-form" id="businessUserSelectTemplateBox_'+index+'" lay-filter="businessUserSelectTemplateBox_'+index+'"></div>\n' +
|
||||
'<sc' + 'ript id="businessUserSelectTemplate_'+index+'" type="text/html">\n' +
|
||||
'<select id="businessUser_'+index+'" name="businessUser_'+index+'" lay-filter="businessUser_'+index+'" lay-verify="required">\n' +
|
||||
'<option value="">请选择巡查事项</option>\n' +
|
||||
'{{# for(var i = 0, item; item = d[i++];) { }}\n' +
|
||||
'<option value="{{item.businessId}},{{item.businessSummary}}">{{item.businessName}}</option>\n' +
|
||||
@ -1000,14 +1038,14 @@
|
||||
'</sc' + 'ript>\n' +
|
||||
'</div>\n' +
|
||||
|
||||
'<div class="layui-form-item" style="display: none;" id="businessDataDivDiv_'+index+'">\n' +
|
||||
'<div class="layui-form-item" style="display: none;" id="businessUserDataDivDiv_'+index+'">\n' +
|
||||
'<label class="layui-form-label">事项列表</label>\n' +
|
||||
'<div class="layui-input-block">\n' +
|
||||
'<input type="text" id="businessData_' + index + '" name="businessData_' + index + '" class="layui-input" value="" placeholder="点击选择事项列表" maxlength="20" readonly>\n' +
|
||||
'<input type="text" id="businessUserData_' + index + '" name="businessUserData_' + index + '" class="layui-input" value="" placeholder="点击选择事项列表" maxlength="20" readonly>\n' +
|
||||
'</div>\n' +
|
||||
'<div id="businessDataDiv_' + index + '">\n' +
|
||||
'<table class="layui-hide" id="businessDataTable_' + index + '" lay-data="{height: \'full-200\', cellMinWidth: 80, page: false\'}" lay-filter="businessDataTable_' + index + '"></table>\n' +
|
||||
'<sc' + 'ript type="text/html" id="businessDataDel_' + index + '">\n' +
|
||||
'<div id="businessUserDataDiv_' + index + '">\n' +
|
||||
'<table class="layui-hide" id="businessUserDataTable_' + index + '" lay-data="{height: \'full-200\', cellMinWidth: 80, page: false\'}" lay-filter="businessUserDataTable_' + index + '"></table>\n' +
|
||||
'<sc' + 'ript type="text/html" id="businessUserDataDel_' + index + '">\n' +
|
||||
'<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="delete">删除</a>\n' +
|
||||
'</sc' + 'ript>\n' +
|
||||
'</div>\n' +
|
||||
@ -1026,32 +1064,32 @@
|
||||
// 初始话巡查事项下拉列表
|
||||
function initBusinessSelectFor(userId) {
|
||||
top.restAjax.get(top.restAjax.path('api/business/list-business/{userId}', [userId]), {}, null, function(code, data, args) {
|
||||
laytpl(document.getElementById('businessSelectTemplate_' + index).innerHTML).render(data, function(html) {
|
||||
document.getElementById('businessSelectTemplateBox_' + index).innerHTML = html;
|
||||
laytpl(document.getElementById('businessUserSelectTemplate_' + index).innerHTML).render(data, function(html) {
|
||||
document.getElementById('businessUserSelectTemplateBox_' + index).innerHTML = html;
|
||||
});
|
||||
$('#businessDiv_' + index).show();
|
||||
form.render('select', 'businessSelectTemplateBox_' + index);
|
||||
$('#businessUserDiv_' + index).show();
|
||||
form.render('select', 'businessUserSelectTemplateBox_' + index);
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
// 治安突出问题change事件
|
||||
form.on('select(business_'+index+')', function(data){
|
||||
form.on('select(businessUser_'+index+')', function(data){
|
||||
if(!data.value) {
|
||||
$('#businessDataDivDiv_' + index).hide();
|
||||
$('#businessUserDataDivDiv_' + index).hide();
|
||||
}else {
|
||||
var valueArr = data.value.split(',');
|
||||
if(2 == valueArr.length) {
|
||||
$('#businessDataDivDiv_' + index).show();
|
||||
$('#businessUserDataDivDiv_' + index).show();
|
||||
}else {
|
||||
$('#businessDataDivDiv_' + index).hide();
|
||||
$('#businessUserDataDivDiv_' + index).hide();
|
||||
}
|
||||
}
|
||||
form.render("select");
|
||||
});
|
||||
|
||||
// 巡查数据点击事件
|
||||
$(document).on('click', '#businessData_' + index, function() {
|
||||
$(document).on('click', '#businessUserData_' + index, function() {
|
||||
/*if(receiverUserList.length > 0) {
|
||||
var userIds = '';
|
||||
for(var i=0, item; item = receiverUserList[i++];) {
|
||||
@ -1063,7 +1101,7 @@
|
||||
top.dialog.dialogData.selectedUserIds = userIds;
|
||||
}*/
|
||||
// 获取巡查事项的选中值
|
||||
var valueArr = $("#business_"+index+" option:selected").val().split(',');
|
||||
var valueArr = $("#businessUser_"+index+" option:selected").val().split(',');
|
||||
getDataListFor(valueArr[1]);
|
||||
});
|
||||
|
||||
@ -1082,14 +1120,14 @@
|
||||
for(var matterIdx=0;matterIdx<matterListFor.length;matterIdx++) {
|
||||
matterListFor[matterIdx].matterIdx = index;
|
||||
}
|
||||
var valueArr = $("#business_"+index+" option:selected").val();
|
||||
var valueArr = $("#businessUser_"+index+" option:selected").val();
|
||||
var userObj = {};
|
||||
userObj.userId = receiverUserList[index].userId;
|
||||
userObj.userName = receiverUserList[index].userName;
|
||||
userObj.userIdx = index;
|
||||
var receiverUserListFor = [];
|
||||
receiverUserListFor.push(userObj);
|
||||
if(randomList.length < receiverUserList.length) {
|
||||
if(0 == randomList.length || randomList.length < receiverUserList.length) {
|
||||
randomList.push({
|
||||
business: valueArr,
|
||||
matterList: matterListFor,
|
||||
@ -1113,7 +1151,7 @@
|
||||
console.log(randomList)
|
||||
$.unique(matterListFor);
|
||||
if(matterListFor.length > 0) {
|
||||
$('#businessDataDiv_' + index).show();
|
||||
$('#businessUserDataDiv_' + index).show();
|
||||
initMatterTableFor(matterListFor);
|
||||
}
|
||||
}
|
||||
@ -1122,7 +1160,7 @@
|
||||
|
||||
function initMatterTableFor(row) {
|
||||
table.render({
|
||||
elem: '#businessDataTable_' + index
|
||||
elem: '#businessUserDataTable_' + index
|
||||
,cols: [
|
||||
[
|
||||
,{field: 'matterId', title: 'matterId', hide: true}
|
||||
@ -1130,7 +1168,7 @@
|
||||
,{field: 'man', title: '负责人', width: 200}
|
||||
,{field: 'phone', title: '联系方式', width: 200}
|
||||
,{field: 'time', title: '时间', width: 200}
|
||||
,{fixed: '', title:'操作', width: 119, align:'center', toolbar: '#businessDataDel_' + index}
|
||||
,{fixed: '', title:'操作', width: 119, align:'center', toolbar: '#businessUserDataDel_' + index}
|
||||
]
|
||||
]
|
||||
,data: row
|
||||
@ -1139,13 +1177,13 @@
|
||||
}
|
||||
|
||||
function reloadMatterTableFor(matterListFor) {
|
||||
table.reload('businessDataTable_' + index, {});
|
||||
table.reload('businessUserDataTable_' + index, {});
|
||||
businessDel(matterListFor);
|
||||
}
|
||||
|
||||
function businessDel(matterListFor) {
|
||||
//监听行工具事件
|
||||
table.on('tool(businessDataTable_' + index + ')', function(obj){
|
||||
table.on('tool(businessUserDataTable_' + index + ')', function(obj){
|
||||
var data = obj.data
|
||||
,layEvent = obj.event;
|
||||
if(layEvent === 'delete'){
|
||||
@ -1172,7 +1210,7 @@
|
||||
}
|
||||
randomList[k].matterList = matterListFor;
|
||||
if(0 == matterListFor.length) {
|
||||
$('#businessDataDiv_' + index).hide();
|
||||
$('#businessUserDataDiv_' + index).hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -755,9 +755,11 @@
|
||||
var loadLayerIndex;
|
||||
top.restAjax.get(top.restAjax.path(url, [randomCount]), {}, null, function(code, data) {
|
||||
if(0 == randomType) {
|
||||
$('#randomBusinessUserDataDiv').hide();
|
||||
businessDataList = data;
|
||||
businessFun();
|
||||
}else {
|
||||
$('#randomBusinessDataDiv').hide();
|
||||
receiverUserList = data;
|
||||
businessUserFun();
|
||||
}
|
||||
|
@ -134,6 +134,7 @@
|
||||
var wangEditorObj = {};
|
||||
var viewerObj = {};
|
||||
var receiverUserId = top.restAjax.params(window.location.href).receiverUserId;
|
||||
var business = '6be1c56a-39f8-4254-88fd-b6d9d75b5361,list-keyarea';
|
||||
|
||||
function closeBox() {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
@ -361,6 +362,7 @@
|
||||
formData.field['patrolContent'] = wangEditorObj['patrolContent'].txt.html();
|
||||
formData.field['remake'] = wangEditorObj['remake'].txt.html();
|
||||
formData.field['receiverUserId'] = receiverUserId;
|
||||
formData.field['business'] = business;
|
||||
top.restAjax.post(top.restAjax.path('api/receiveruserpatrol/save', []), formData.field, null, function(code, data) {
|
||||
var layerIndex = top.dialog.msg(top.dataMessage.commitSuccess, {
|
||||
time: 0,
|
||||
|
Loading…
Reference in New Issue
Block a user