更新代码
This commit is contained in:
parent
447cabba03
commit
a267846b0b
@ -112,6 +112,22 @@ public class EnterpriseOfGridOperatorController extends AbstractController {
|
||||
return enterpriseOfGridOperatorService.listPageEnterpriseOfGridOperator(page);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "网格员的企业分页列表", notes = "网格员的企业分页列表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "page", value = "当前页码", paramType = "form", dataType = "Integer", defaultValue = "1"),
|
||||
@ApiImplicitParam(name = "rows", value = "显示数量", paramType = "form", dataType = "Integer", defaultValue = "20"),
|
||||
@ApiImplicitParam(name = "keywords", value = "关键字", paramType = "form", dataType = "String"),
|
||||
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "form", dataType = "String"),
|
||||
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "form", dataType = "String")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("listpageenterpriseofgridoperatorofmine")
|
||||
public SuccessResultList<List<EnterpriseOfGridOperatorDTO>> listPageEnterpriseOfGridOperatorOfMine(ListPage page) throws SearchException {
|
||||
Map<String, Object> params = requestParams();
|
||||
page.setParams(params);
|
||||
return enterpriseOfGridOperatorService.listPageEnterpriseOfGridOperatorOfMine(page);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "网格员的企业分页列表(通过用户ID)", notes = "网格员的企业分页列表(通过用户ID)接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "userId", value = "用户ID", paramType = "path"),
|
||||
|
@ -1,118 +0,0 @@
|
||||
package com.cm.inspection.controller.deploy;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.cm.common.constants.ISystemConstant;
|
||||
import com.cm.common.result.SuccessResult;
|
||||
import com.cm.common.result.SuccessResultData;
|
||||
import com.cm.inspection.service.deploy.IDeployProcessService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* When you feel like quitting. Think about why you started
|
||||
* 当你想要放弃的时候,想想当初你为何开始
|
||||
*
|
||||
* @ClassName: DemoController
|
||||
* @Description:
|
||||
* @Author: WangGeng
|
||||
* @Date: 2020/3/24 9:41 上午
|
||||
* @Version: 1.0
|
||||
**/
|
||||
@RestController
|
||||
@RequestMapping(ISystemConstant.API_PREFIX + "/deploy")
|
||||
public class DeployController {
|
||||
|
||||
@Autowired
|
||||
private IDeployProcessService deployProcessService;
|
||||
|
||||
/**
|
||||
* 部署流程
|
||||
*
|
||||
* @param processName
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("getdeployprocess/{processName}")
|
||||
public SuccessResult getDeployProcess(@PathVariable("processName") String processName) {
|
||||
return deployProcessService.deployProcess(processName);
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行流程
|
||||
*
|
||||
* @param processId
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("getstartprocess/{processId}")
|
||||
public SuccessResult getStartProcess(@PathVariable("processId") String processId) {
|
||||
return deployProcessService.startProcess(processId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过代理人查看任务
|
||||
*
|
||||
* @param assignee
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("listtaskbyassignee")
|
||||
public JSONArray listTaskByAssignee(String assignee) {
|
||||
return deployProcessService.listTaskByAssignee(assignee);
|
||||
}
|
||||
|
||||
/**
|
||||
* 完成任务
|
||||
*
|
||||
* @param taskId
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("gettaskcompletebytaskid/{taskId}")
|
||||
public SuccessResult getTaskCompleteByTaskId(@PathVariable("taskId") String taskId) {
|
||||
return deployProcessService.saveTaskCompleteByTaskId(taskId);
|
||||
}
|
||||
|
||||
@PostMapping("saveleavefulltaskcompletebytaskidanddays/{taskId}")
|
||||
public SuccessResult saveLeaveFullTaskCompleteByTaskIdAndDays(@PathVariable("taskId") String taskId, @RequestParam("days") Integer days) {
|
||||
return deployProcessService.saveLeaveFullTaskCompleteByTaskIdAndDays(taskId, days);
|
||||
}
|
||||
|
||||
/**
|
||||
* 正在运行的任务
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("listtask")
|
||||
public JSONArray listTask() {
|
||||
return deployProcessService.listTask();
|
||||
}
|
||||
|
||||
/**
|
||||
* 实例状态
|
||||
*
|
||||
* @param processId
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("getinstancestatus/{processId}")
|
||||
public SuccessResultData<Integer> getInstanceStatus(@PathVariable("processId") String processId) {
|
||||
return deployProcessService.getInstanceStatus(processId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 历史流程
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("listhistoryprocess")
|
||||
public JSONArray listHistoryProcess() {
|
||||
return deployProcessService.listHistoryProcess();
|
||||
}
|
||||
|
||||
/**
|
||||
* 历史任务
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("listhistorytask")
|
||||
public JSONArray listHistoryTask() {
|
||||
return deployProcessService.listHistoryTask();
|
||||
}
|
||||
|
||||
}
|
@ -4,7 +4,6 @@ import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
*
|
||||
* @ClassName: CheckDTO
|
||||
* @Description: 检查表
|
||||
* @Author: WenG
|
||||
@ -22,6 +21,8 @@ public class CheckDTO {
|
||||
private String nameJoinByEnterpriseId;
|
||||
@ApiModelProperty(name = "typeJoinByEnterpriseId", value = "企业ID的类型")
|
||||
private String typeJoinByEnterpriseId;
|
||||
@ApiModelProperty(name = "typeDictionaryName", value = "类型字典名称")
|
||||
private String typeDictionaryName;
|
||||
@ApiModelProperty(name = "area1JoinByEnterpriseId", value = "企业ID的1级地区")
|
||||
private String area1JoinByEnterpriseId;
|
||||
@ApiModelProperty(name = "area2JoinByEnterpriseId", value = "企业ID的2级区域")
|
||||
@ -36,10 +37,14 @@ public class CheckDTO {
|
||||
private String addressJoinByEnterpriseId;
|
||||
@ApiModelProperty(name = "industryJoinByEnterpriseId", value = "企业ID的管理行业")
|
||||
private String industryJoinByEnterpriseId;
|
||||
@ApiModelProperty(name = "industryDictionaryName", value = "管理行业字典名称")
|
||||
private String industryDictionaryName;
|
||||
@ApiModelProperty(name = "engagedCountJoinByEnterpriseId", value = "企业ID的从业人数")
|
||||
private String engagedCountJoinByEnterpriseId;
|
||||
@ApiModelProperty(name = "riskOperationJoinByEnterpriseId", value = "企业ID的风险作业")
|
||||
private String riskOperationJoinByEnterpriseId;
|
||||
@ApiModelProperty(name = "riskOperationDictionaryName", value = "风险作业字典名称")
|
||||
private String riskOperationDictionaryName;
|
||||
@ApiModelProperty(name = "masterJoinByEnterpriseId", value = "企业ID的负责人")
|
||||
private String masterJoinByEnterpriseId;
|
||||
@ApiModelProperty(name = "phoneJoinByEnterpriseId", value = "企业ID的联系电话")
|
||||
@ -52,14 +57,15 @@ public class CheckDTO {
|
||||
private Integer isComplete;
|
||||
|
||||
public String getCheckId() {
|
||||
return checkId == null ? "" : checkId;
|
||||
return checkId == null ? "" : checkId.trim();
|
||||
}
|
||||
|
||||
public void setCheckId(String checkId) {
|
||||
this.checkId = checkId;
|
||||
}
|
||||
|
||||
public String getEnterpriseId() {
|
||||
return enterpriseId == null ? "" : enterpriseId;
|
||||
return enterpriseId == null ? "" : enterpriseId.trim();
|
||||
}
|
||||
|
||||
public void setEnterpriseId(String enterpriseId) {
|
||||
@ -67,7 +73,7 @@ public class CheckDTO {
|
||||
}
|
||||
|
||||
public String getNameJoinByEnterpriseId() {
|
||||
return nameJoinByEnterpriseId == null ? "" : nameJoinByEnterpriseId;
|
||||
return nameJoinByEnterpriseId == null ? "" : nameJoinByEnterpriseId.trim();
|
||||
}
|
||||
|
||||
public void setNameJoinByEnterpriseId(String nameJoinByEnterpriseId) {
|
||||
@ -75,15 +81,23 @@ public class CheckDTO {
|
||||
}
|
||||
|
||||
public String getTypeJoinByEnterpriseId() {
|
||||
return typeJoinByEnterpriseId == null ? "" : typeJoinByEnterpriseId;
|
||||
return typeJoinByEnterpriseId == null ? "" : typeJoinByEnterpriseId.trim();
|
||||
}
|
||||
|
||||
public void setTypeJoinByEnterpriseId(String typeJoinByEnterpriseId) {
|
||||
this.typeJoinByEnterpriseId = typeJoinByEnterpriseId;
|
||||
}
|
||||
|
||||
public String getTypeDictionaryName() {
|
||||
return typeDictionaryName == null ? "" : typeDictionaryName.trim();
|
||||
}
|
||||
|
||||
public void setTypeDictionaryName(String typeDictionaryName) {
|
||||
this.typeDictionaryName = typeDictionaryName;
|
||||
}
|
||||
|
||||
public String getArea1JoinByEnterpriseId() {
|
||||
return area1JoinByEnterpriseId == null ? "" : area1JoinByEnterpriseId;
|
||||
return area1JoinByEnterpriseId == null ? "" : area1JoinByEnterpriseId.trim();
|
||||
}
|
||||
|
||||
public void setArea1JoinByEnterpriseId(String area1JoinByEnterpriseId) {
|
||||
@ -91,7 +105,7 @@ public class CheckDTO {
|
||||
}
|
||||
|
||||
public String getArea2JoinByEnterpriseId() {
|
||||
return area2JoinByEnterpriseId == null ? "" : area2JoinByEnterpriseId;
|
||||
return area2JoinByEnterpriseId == null ? "" : area2JoinByEnterpriseId.trim();
|
||||
}
|
||||
|
||||
public void setArea2JoinByEnterpriseId(String area2JoinByEnterpriseId) {
|
||||
@ -99,7 +113,7 @@ public class CheckDTO {
|
||||
}
|
||||
|
||||
public String getArea3JoinByEnterpriseId() {
|
||||
return area3JoinByEnterpriseId == null ? "" : area3JoinByEnterpriseId;
|
||||
return area3JoinByEnterpriseId == null ? "" : area3JoinByEnterpriseId.trim();
|
||||
}
|
||||
|
||||
public void setArea3JoinByEnterpriseId(String area3JoinByEnterpriseId) {
|
||||
@ -107,7 +121,7 @@ public class CheckDTO {
|
||||
}
|
||||
|
||||
public String getArea4JoinByEnterpriseId() {
|
||||
return area4JoinByEnterpriseId == null ? "" : area4JoinByEnterpriseId;
|
||||
return area4JoinByEnterpriseId == null ? "" : area4JoinByEnterpriseId.trim();
|
||||
}
|
||||
|
||||
public void setArea4JoinByEnterpriseId(String area4JoinByEnterpriseId) {
|
||||
@ -115,7 +129,7 @@ public class CheckDTO {
|
||||
}
|
||||
|
||||
public String getArea5JoinByEnterpriseId() {
|
||||
return area5JoinByEnterpriseId == null ? "" : area5JoinByEnterpriseId;
|
||||
return area5JoinByEnterpriseId == null ? "" : area5JoinByEnterpriseId.trim();
|
||||
}
|
||||
|
||||
public void setArea5JoinByEnterpriseId(String area5JoinByEnterpriseId) {
|
||||
@ -123,7 +137,7 @@ public class CheckDTO {
|
||||
}
|
||||
|
||||
public String getAddressJoinByEnterpriseId() {
|
||||
return addressJoinByEnterpriseId == null ? "" : addressJoinByEnterpriseId;
|
||||
return addressJoinByEnterpriseId == null ? "" : addressJoinByEnterpriseId.trim();
|
||||
}
|
||||
|
||||
public void setAddressJoinByEnterpriseId(String addressJoinByEnterpriseId) {
|
||||
@ -131,15 +145,23 @@ public class CheckDTO {
|
||||
}
|
||||
|
||||
public String getIndustryJoinByEnterpriseId() {
|
||||
return industryJoinByEnterpriseId == null ? "" : industryJoinByEnterpriseId;
|
||||
return industryJoinByEnterpriseId == null ? "" : industryJoinByEnterpriseId.trim();
|
||||
}
|
||||
|
||||
public void setIndustryJoinByEnterpriseId(String industryJoinByEnterpriseId) {
|
||||
this.industryJoinByEnterpriseId = industryJoinByEnterpriseId;
|
||||
}
|
||||
|
||||
public String getIndustryDictionaryName() {
|
||||
return industryDictionaryName == null ? "" : industryDictionaryName.trim();
|
||||
}
|
||||
|
||||
public void setIndustryDictionaryName(String industryDictionaryName) {
|
||||
this.industryDictionaryName = industryDictionaryName;
|
||||
}
|
||||
|
||||
public String getEngagedCountJoinByEnterpriseId() {
|
||||
return engagedCountJoinByEnterpriseId == null ? "" : engagedCountJoinByEnterpriseId;
|
||||
return engagedCountJoinByEnterpriseId == null ? "" : engagedCountJoinByEnterpriseId.trim();
|
||||
}
|
||||
|
||||
public void setEngagedCountJoinByEnterpriseId(String engagedCountJoinByEnterpriseId) {
|
||||
@ -147,15 +169,23 @@ public class CheckDTO {
|
||||
}
|
||||
|
||||
public String getRiskOperationJoinByEnterpriseId() {
|
||||
return riskOperationJoinByEnterpriseId == null ? "" : riskOperationJoinByEnterpriseId;
|
||||
return riskOperationJoinByEnterpriseId == null ? "" : riskOperationJoinByEnterpriseId.trim();
|
||||
}
|
||||
|
||||
public void setRiskOperationJoinByEnterpriseId(String riskOperationJoinByEnterpriseId) {
|
||||
this.riskOperationJoinByEnterpriseId = riskOperationJoinByEnterpriseId;
|
||||
}
|
||||
|
||||
public String getRiskOperationDictionaryName() {
|
||||
return riskOperationDictionaryName == null ? "" : riskOperationDictionaryName.trim();
|
||||
}
|
||||
|
||||
public void setRiskOperationDictionaryName(String riskOperationDictionaryName) {
|
||||
this.riskOperationDictionaryName = riskOperationDictionaryName;
|
||||
}
|
||||
|
||||
public String getMasterJoinByEnterpriseId() {
|
||||
return masterJoinByEnterpriseId == null ? "" : masterJoinByEnterpriseId;
|
||||
return masterJoinByEnterpriseId == null ? "" : masterJoinByEnterpriseId.trim();
|
||||
}
|
||||
|
||||
public void setMasterJoinByEnterpriseId(String masterJoinByEnterpriseId) {
|
||||
@ -163,7 +193,7 @@ public class CheckDTO {
|
||||
}
|
||||
|
||||
public String getPhoneJoinByEnterpriseId() {
|
||||
return phoneJoinByEnterpriseId == null ? "" : phoneJoinByEnterpriseId;
|
||||
return phoneJoinByEnterpriseId == null ? "" : phoneJoinByEnterpriseId.trim();
|
||||
}
|
||||
|
||||
public void setPhoneJoinByEnterpriseId(String phoneJoinByEnterpriseId) {
|
||||
@ -171,7 +201,7 @@ public class CheckDTO {
|
||||
}
|
||||
|
||||
public Integer getCheckType() {
|
||||
return checkType == null ? 0 : checkType;
|
||||
return checkType;
|
||||
}
|
||||
|
||||
public void setCheckType(Integer checkType) {
|
||||
@ -179,7 +209,7 @@ public class CheckDTO {
|
||||
}
|
||||
|
||||
public Integer getIsCoordination() {
|
||||
return isCoordination == null ? 0 : isCoordination;
|
||||
return isCoordination;
|
||||
}
|
||||
|
||||
public void setIsCoordination(Integer isCoordination) {
|
||||
@ -187,12 +217,59 @@ public class CheckDTO {
|
||||
}
|
||||
|
||||
public Integer getIsComplete() {
|
||||
return isComplete == null ? 0 : isComplete;
|
||||
return isComplete;
|
||||
}
|
||||
|
||||
public void setIsComplete(Integer isComplete) {
|
||||
this.isComplete = isComplete;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
final StringBuilder sb = new StringBuilder("{");
|
||||
sb.append("\"checkId\":")
|
||||
.append("\"").append(checkId).append("\"");
|
||||
sb.append(",\"enterpriseId\":")
|
||||
.append("\"").append(enterpriseId).append("\"");
|
||||
sb.append(",\"nameJoinByEnterpriseId\":")
|
||||
.append("\"").append(nameJoinByEnterpriseId).append("\"");
|
||||
sb.append(",\"typeJoinByEnterpriseId\":")
|
||||
.append("\"").append(typeJoinByEnterpriseId).append("\"");
|
||||
sb.append(",\"typeDictionaryName\":")
|
||||
.append("\"").append(typeDictionaryName).append("\"");
|
||||
sb.append(",\"area1JoinByEnterpriseId\":")
|
||||
.append("\"").append(area1JoinByEnterpriseId).append("\"");
|
||||
sb.append(",\"area2JoinByEnterpriseId\":")
|
||||
.append("\"").append(area2JoinByEnterpriseId).append("\"");
|
||||
sb.append(",\"area3JoinByEnterpriseId\":")
|
||||
.append("\"").append(area3JoinByEnterpriseId).append("\"");
|
||||
sb.append(",\"area4JoinByEnterpriseId\":")
|
||||
.append("\"").append(area4JoinByEnterpriseId).append("\"");
|
||||
sb.append(",\"area5JoinByEnterpriseId\":")
|
||||
.append("\"").append(area5JoinByEnterpriseId).append("\"");
|
||||
sb.append(",\"addressJoinByEnterpriseId\":")
|
||||
.append("\"").append(addressJoinByEnterpriseId).append("\"");
|
||||
sb.append(",\"industryJoinByEnterpriseId\":")
|
||||
.append("\"").append(industryJoinByEnterpriseId).append("\"");
|
||||
sb.append(",\"industryDictionaryName\":")
|
||||
.append("\"").append(industryDictionaryName).append("\"");
|
||||
sb.append(",\"engagedCountJoinByEnterpriseId\":")
|
||||
.append("\"").append(engagedCountJoinByEnterpriseId).append("\"");
|
||||
sb.append(",\"riskOperationJoinByEnterpriseId\":")
|
||||
.append("\"").append(riskOperationJoinByEnterpriseId).append("\"");
|
||||
sb.append(",\"riskOperationDictionaryName\":")
|
||||
.append("\"").append(riskOperationDictionaryName).append("\"");
|
||||
sb.append(",\"masterJoinByEnterpriseId\":")
|
||||
.append("\"").append(masterJoinByEnterpriseId).append("\"");
|
||||
sb.append(",\"phoneJoinByEnterpriseId\":")
|
||||
.append("\"").append(phoneJoinByEnterpriseId).append("\"");
|
||||
sb.append(",\"checkType\":")
|
||||
.append(checkType);
|
||||
sb.append(",\"isCoordination\":")
|
||||
.append(isCoordination);
|
||||
sb.append(",\"isComplete\":")
|
||||
.append(isComplete);
|
||||
sb.append('}');
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
package com.cm.inspection.service.check.impl;
|
||||
|
||||
import com.cm.common.exception.RemoveException;
|
||||
import com.cm.common.exception.SaveException;
|
||||
import com.cm.common.exception.SearchException;
|
||||
import com.cm.common.pojo.ListPage;
|
||||
import com.cm.common.result.SuccessResult;
|
||||
@ -61,6 +60,8 @@ public class CheckServiceImpl extends BaseService implements ICheckService {
|
||||
setSaveInfo(params);
|
||||
}
|
||||
checkDao.saveCheck(params);
|
||||
// 开启流程
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1,43 +0,0 @@
|
||||
package com.cm.inspection.service.deploy;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.cm.common.result.SuccessResult;
|
||||
import com.cm.common.result.SuccessResultData;
|
||||
import org.activiti.engine.task.Task;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* When you feel like quitting. Think about why you started
|
||||
* 当你想要放弃的时候,想想当初你为何开始
|
||||
*
|
||||
* @ClassName: IDeployProcessService
|
||||
* @Description: 部署流程
|
||||
* @Author: WangGeng
|
||||
* @Date: 2020/3/23 18:36
|
||||
* @Version: 1.0
|
||||
**/
|
||||
public interface IDeployProcessService {
|
||||
|
||||
void deployProcess();
|
||||
|
||||
SuccessResult deployProcess(String processName);
|
||||
|
||||
SuccessResult startProcess(String processId);
|
||||
|
||||
JSONArray listTaskByAssignee(String assignee);
|
||||
|
||||
SuccessResult saveTaskCompleteByTaskId(String taskId);
|
||||
|
||||
SuccessResult saveLeaveFullTaskCompleteByTaskIdAndDays(String taskId, Integer days);
|
||||
|
||||
JSONArray listTask();
|
||||
|
||||
SuccessResultData<Integer> getInstanceStatus(String processId);
|
||||
|
||||
JSONArray listHistoryProcess();
|
||||
|
||||
JSONArray listHistoryTask();
|
||||
|
||||
|
||||
}
|
@ -1,152 +0,0 @@
|
||||
package com.cm.inspection.service.deploy.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cm.common.result.SuccessResult;
|
||||
import com.cm.common.result.SuccessResultData;
|
||||
import com.cm.inspection.service.deploy.IDeployProcessService;
|
||||
import org.activiti.engine.*;
|
||||
import org.activiti.engine.history.HistoricProcessInstance;
|
||||
import org.activiti.engine.history.HistoricTaskInstance;
|
||||
import org.activiti.engine.repository.Deployment;
|
||||
import org.activiti.engine.runtime.ProcessInstance;
|
||||
import org.activiti.engine.task.Task;
|
||||
import org.activiti.engine.task.TaskQuery;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* When you feel like quitting. Think about why you started
|
||||
* 当你想要放弃的时候,想想当初你为何开始
|
||||
*
|
||||
* @ClassName: DeployProcess
|
||||
* @Description:
|
||||
* @Author: WangGeng
|
||||
* @Date: 2020/3/23 18:35
|
||||
* @Version: 1.0
|
||||
**/
|
||||
@Service
|
||||
public class DeployProcessServiceImpl implements IDeployProcessService {
|
||||
|
||||
@Autowired
|
||||
private RuntimeService runtimeService;
|
||||
@Autowired
|
||||
private TaskService taskService;
|
||||
@Autowired
|
||||
private ProcessEngine processEngine;
|
||||
@Autowired
|
||||
private RepositoryService repositoryService;
|
||||
@Autowired
|
||||
private HistoryService historyService;
|
||||
|
||||
@Override
|
||||
public void deployProcess() {
|
||||
repositoryService.createDeployment().addClasspathResource("bpmn/leave.bpmn").name("test").deploy();
|
||||
}
|
||||
|
||||
@Override
|
||||
public SuccessResult deployProcess(String processName) {
|
||||
Deployment deployment = repositoryService.createDeployment()
|
||||
.disableSchemaValidation()
|
||||
.addClasspathResource("bpmn/" + processName + ".bpmn").name("请假").deploy();
|
||||
System.out.println("部署ID:" + deployment.getId());
|
||||
System.out.println("部署Name:" + deployment.getName());
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@Override
|
||||
public SuccessResult startProcess(String processId) {
|
||||
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(processId);
|
||||
System.out.println("流程实例id:" + processInstance.getId());
|
||||
System.out.println("流程定义id:" + processInstance.getProcessDefinitionId());
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONArray listTaskByAssignee(String assignee) {
|
||||
TaskQuery taskQuery = taskService.createTaskQuery();
|
||||
List<Task> taskList = taskQuery.taskAssignee(assignee).list();
|
||||
JSONArray jsonArray = new JSONArray();
|
||||
for (Task task : taskList) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("assignee", task.getAssignee());
|
||||
jsonObject.put("id", task.getId());
|
||||
jsonObject.put("name", task.getName());
|
||||
jsonArray.add(jsonObject);
|
||||
}
|
||||
return jsonArray;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SuccessResult saveTaskCompleteByTaskId(String taskId) {
|
||||
taskService.complete(taskId);
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@Override
|
||||
public SuccessResult saveLeaveFullTaskCompleteByTaskIdAndDays(String taskId, Integer days) {
|
||||
Map<String, Object> params = new HashMap<>(1);
|
||||
params.put("days", days);
|
||||
taskService.complete(taskId, params);
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONArray listTask() {
|
||||
TaskQuery taskQuery = taskService.createTaskQuery();
|
||||
List<Task> taskList = taskQuery.list();
|
||||
JSONArray jsonArray = new JSONArray();
|
||||
for (Task task : taskList) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("assignee", task.getAssignee());
|
||||
jsonObject.put("id", task.getId());
|
||||
jsonObject.put("name", task.getName());
|
||||
jsonArray.add(jsonObject);
|
||||
}
|
||||
return jsonArray;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SuccessResultData<Integer> getInstanceStatus(String processId) {
|
||||
ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().processDefinitionKey(processId).singleResult();
|
||||
return new SuccessResultData<>(processInstance == null ? 1 : 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONArray listHistoryProcess() {
|
||||
List<HistoricProcessInstance> list = historyService.createHistoricProcessInstanceQuery().list();
|
||||
JSONArray jsonArray = new JSONArray();
|
||||
for (HistoricProcessInstance historicProcessInstance : list) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("id", historicProcessInstance.getId());
|
||||
jsonObject.put("name", historicProcessInstance.getName());
|
||||
jsonObject.put("startTime", historicProcessInstance.getStartTime());
|
||||
jsonObject.put("endTime", historicProcessInstance.getEndTime());
|
||||
jsonArray.add(jsonObject);
|
||||
}
|
||||
return jsonArray;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONArray listHistoryTask() {
|
||||
List<HistoricTaskInstance> taskInstanceList = historyService.createHistoricTaskInstanceQuery().list();
|
||||
JSONArray jsonArray = new JSONArray();
|
||||
for (HistoricTaskInstance historicTaskInstance : taskInstanceList) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("id", historicTaskInstance.getId());
|
||||
jsonObject.put("name", historicTaskInstance.getName());
|
||||
jsonObject.put("startTime", historicTaskInstance.getStartTime());
|
||||
jsonObject.put("endTime", historicTaskInstance.getEndTime());
|
||||
jsonObject.put("processId", historicTaskInstance.getProcessDefinitionId());
|
||||
jsonObject.put("assignee", historicTaskInstance.getAssignee());
|
||||
jsonObject.put("executionId", historicTaskInstance.getExecutionId());
|
||||
jsonObject.put("parentTaskId", historicTaskInstance.getParentTaskId());
|
||||
jsonArray.add(jsonObject);
|
||||
}
|
||||
return jsonArray;
|
||||
}
|
||||
}
|
@ -125,4 +125,20 @@ public interface IEnterpriseOfGridOperatorService {
|
||||
*/
|
||||
SuccessResultList<List<EnterpriseOfGridOperatorDTO>> listPageEnterpriseOfGridOperatorByUserId(String userId, ListPage page);
|
||||
|
||||
/**
|
||||
* 网格员的企业分页列表(我的)
|
||||
*
|
||||
* @param page
|
||||
* @return
|
||||
*/
|
||||
SuccessResultList<List<EnterpriseOfGridOperatorDTO>> listPageEnterpriseOfGridOperatorOfMine(ListPage page);
|
||||
|
||||
/**
|
||||
* 网格员的企业分页列表(我的)
|
||||
*
|
||||
* @param token
|
||||
* @param page
|
||||
* @return
|
||||
*/
|
||||
SuccessResultList<List<EnterpriseOfGridOperatorDTO>> listPageEnterpriseOfGridOperatorOfMine(String token, ListPage page);
|
||||
}
|
||||
|
@ -1,11 +1,13 @@
|
||||
package com.cm.inspection.service.enterpriseofgridoperator.impl;
|
||||
|
||||
import com.cm.common.component.SecurityComponent;
|
||||
import com.cm.common.exception.RemoveException;
|
||||
import com.cm.common.exception.SaveException;
|
||||
import com.cm.common.exception.SearchException;
|
||||
import com.cm.common.pojo.ListPage;
|
||||
import com.cm.common.result.SuccessResult;
|
||||
import com.cm.common.result.SuccessResultList;
|
||||
import com.cm.common.token.app.AppTokenManager;
|
||||
import com.cm.common.utils.HashMapUtil;
|
||||
import com.cm.common.utils.UUIDUtil;
|
||||
import com.cm.inspection.dao.enterpriseofgridoperator.IEnterpriseOfGridOperatorDao;
|
||||
@ -15,6 +17,7 @@ import com.cm.inspection.service.BaseService;
|
||||
import com.cm.inspection.service.enterpriseofgridoperator.IEnterpriseOfGridOperatorService;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@ -32,6 +35,8 @@ public class EnterpriseOfGridOperatorServiceImpl extends BaseService implements
|
||||
|
||||
@Autowired
|
||||
private IEnterpriseOfGridOperatorDao enterpriseOfGridOperatorDao;
|
||||
@Autowired
|
||||
private SecurityComponent securityComponent;
|
||||
|
||||
@Override
|
||||
public SuccessResult saveEnterpriseOfGridOperator(EnterpriseOfGridOperatorVO enterpriseOfGridOperatorVO) throws Exception {
|
||||
@ -159,4 +164,30 @@ public class EnterpriseOfGridOperatorServiceImpl extends BaseService implements
|
||||
return new SuccessResultList<>(enterpriseOfGridOperatorDTOs, pageInfo.getPageNum(), pageInfo.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public SuccessResultList<List<EnterpriseOfGridOperatorDTO>> listPageEnterpriseOfGridOperatorOfMine(ListPage page) {
|
||||
return listPageEnterpriseOfGridOperatorOfUser(null, page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SuccessResultList<List<EnterpriseOfGridOperatorDTO>> listPageEnterpriseOfGridOperatorOfMine(String token, ListPage page) {
|
||||
return listPageEnterpriseOfGridOperatorOfUser(token, page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 网格员的企业分页列表(通过用户)
|
||||
*
|
||||
* @param token
|
||||
* @param page
|
||||
* @return
|
||||
*/
|
||||
private SuccessResultList<List<EnterpriseOfGridOperatorDTO>> listPageEnterpriseOfGridOperatorOfUser(String token, ListPage page) {
|
||||
if (StringUtils.isBlank(token)) {
|
||||
page.getParams().put("userId", securityComponent.getCurrentUser().getUserId());
|
||||
} else {
|
||||
page.getParams().put("userId", AppTokenManager.getInstance().getToken(token).getAppTokenUser().getId());
|
||||
}
|
||||
return listPageEnterpriseOfGridOperator(page);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,29 @@
|
||||
package com.cm.inspection.service.process;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.cm.common.result.SuccessResult;
|
||||
import com.cm.common.result.SuccessResultData;
|
||||
|
||||
/**
|
||||
* When you feel like quitting. Think about why you started
|
||||
* 当你想要放弃的时候,想想当初你为何开始
|
||||
*
|
||||
* @ClassName: IDeployProcessService
|
||||
* @Description: 部署流程
|
||||
* @Author: WangGeng
|
||||
* @Date: 2020/3/23 18:36
|
||||
* @Version: 1.0
|
||||
**/
|
||||
public interface IProcessService {
|
||||
|
||||
/**
|
||||
* 部署流程
|
||||
*
|
||||
* @param processName 流程名称
|
||||
* @param processSummary 流程说明
|
||||
*/
|
||||
void deployProcess(String processName, String processSummary);
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
package com.cm.inspection.service.process.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cm.common.result.SuccessResult;
|
||||
import com.cm.common.result.SuccessResultData;
|
||||
import com.cm.inspection.service.process.IProcessService;
|
||||
import org.activiti.engine.*;
|
||||
import org.activiti.engine.history.HistoricProcessInstance;
|
||||
import org.activiti.engine.history.HistoricTaskInstance;
|
||||
import org.activiti.engine.repository.Deployment;
|
||||
import org.activiti.engine.runtime.ProcessInstance;
|
||||
import org.activiti.engine.task.Task;
|
||||
import org.activiti.engine.task.TaskQuery;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* When you feel like quitting. Think about why you started
|
||||
* 当你想要放弃的时候,想想当初你为何开始
|
||||
*
|
||||
* @ClassName: DeployProcess
|
||||
* @Description:
|
||||
* @Author: WangGeng
|
||||
* @Date: 2020/3/23 18:35
|
||||
* @Version: 1.0
|
||||
**/
|
||||
@Service
|
||||
public class ProcessServiceImpl implements IProcessService {
|
||||
|
||||
@Autowired
|
||||
private RuntimeService runtimeService;
|
||||
@Autowired
|
||||
private TaskService taskService;
|
||||
@Autowired
|
||||
private ProcessEngine processEngine;
|
||||
@Autowired
|
||||
private RepositoryService repositoryService;
|
||||
@Autowired
|
||||
private HistoryService historyService;
|
||||
|
||||
@Override
|
||||
public void deployProcess(String processName, String processSummary) {
|
||||
repositoryService.createDeployment().addClasspathResource("bpmn/"+ processName +".bpmn").name(processSummary).deploy();
|
||||
}
|
||||
|
||||
}
|
@ -7,6 +7,7 @@
|
||||
<result column="enterprise_id" property="enterpriseId"/>
|
||||
<result column="name_join_by_enterprise_id" property="nameJoinByEnterpriseId"/>
|
||||
<result column="type_join_by_enterprise_id" property="typeJoinByEnterpriseId"/>
|
||||
<result column="type_dictionary_name" property="typeDictionaryName"/>
|
||||
<result column="area1_join_by_enterprise_id" property="area1JoinByEnterpriseId"/>
|
||||
<result column="area2_join_by_enterprise_id" property="area2JoinByEnterpriseId"/>
|
||||
<result column="area3_join_by_enterprise_id" property="area3JoinByEnterpriseId"/>
|
||||
@ -14,8 +15,10 @@
|
||||
<result column="area5_join_by_enterprise_id" property="area5JoinByEnterpriseId"/>
|
||||
<result column="address_join_by_enterprise_id" property="addressJoinByEnterpriseId"/>
|
||||
<result column="industry_join_by_enterprise_id" property="industryJoinByEnterpriseId"/>
|
||||
<result column="industry_dictionary_name" property="industryDictionaryName"/>
|
||||
<result column="engaged_count_join_by_enterprise_id" property="engagedCountJoinByEnterpriseId"/>
|
||||
<result column="risk_operation_join_by_enterprise_id" property="riskOperationJoinByEnterpriseId"/>
|
||||
<result column="risk_operation_dictionary_name" property="riskOperationDictionaryName"/>
|
||||
<result column="master_join_by_enterprise_id" property="masterJoinByEnterpriseId"/>
|
||||
<result column="phone_join_by_enterprise_id" property="phoneJoinByEnterpriseId"/>
|
||||
<result column="check_type" property="checkType"/>
|
||||
@ -112,6 +115,7 @@
|
||||
t1.enterprise_id,
|
||||
jt1.name name_join_by_enterprise_id,
|
||||
jt1.type type_join_by_enterprise_id,
|
||||
dt1.dictionary_name type_dictionary_name,
|
||||
jt1.area1 area1_join_by_enterprise_id,
|
||||
jt1.area2 area2_join_by_enterprise_id,
|
||||
jt1.area3 area3_join_by_enterprise_id,
|
||||
@ -119,8 +123,10 @@
|
||||
jt1.area5 area5_join_by_enterprise_id,
|
||||
jt1.address address_join_by_enterprise_id,
|
||||
jt1.industry industry_join_by_enterprise_id,
|
||||
dt2.dictionary_name industry_dictionary_name,
|
||||
jt1.engaged_count engaged_count_join_by_enterprise_id,
|
||||
jt1.risk_operation risk_operation_join_by_enterprise_id,
|
||||
dt3.dictionary_name risk_operation_dictionary_name,
|
||||
jt1.master master_join_by_enterprise_id,
|
||||
jt1.phone phone_join_by_enterprise_id,
|
||||
t1.check_type,
|
||||
@ -135,10 +141,29 @@
|
||||
t1.enterprise_id = jt1.enterprise_id
|
||||
AND
|
||||
jt1.is_delete = 0
|
||||
LEFT JOIN
|
||||
data_dictionary dt1
|
||||
ON
|
||||
dt1.dictionary_id = jt1.type
|
||||
AND
|
||||
dt1.is_delete = 0
|
||||
LEFT JOIN
|
||||
data_dictionary dt2
|
||||
ON
|
||||
dt2.dictionary_id = jt1.industry
|
||||
AND
|
||||
dt2.is_delete = 0
|
||||
LEFT JOIN
|
||||
data_dictionary dt3
|
||||
ON
|
||||
dt3.dictionary_id = jt1.risk_operation
|
||||
AND
|
||||
dt3.is_delete = 0
|
||||
WHERE
|
||||
t1.is_delete = 0
|
||||
<if test="keywords != null and keywords != ''">
|
||||
<!-- 这里添加检索关键字 -->
|
||||
AND
|
||||
jt1.name LIKE CONCAT('%', #{keywords}, '%')
|
||||
</if>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
AND
|
||||
@ -148,6 +173,26 @@
|
||||
AND
|
||||
LEFT(t1.gmt_create, 10) <![CDATA[ <= ]]> #{endTime}
|
||||
</if>
|
||||
<if test="area1 != null and area1 != ''">
|
||||
AND
|
||||
jt1.area1 = #{area1}
|
||||
</if>
|
||||
<if test="area2 != null and area2 != ''">
|
||||
AND
|
||||
jt1.area2 = #{area2}
|
||||
</if>
|
||||
<if test="area3 != null and area3 != ''">
|
||||
AND
|
||||
jt1.area3 = #{area3}
|
||||
</if>
|
||||
<if test="area4 != null and area4 != ''">
|
||||
AND
|
||||
jt1.area4 = #{area4}
|
||||
</if>
|
||||
<if test="area5 != null and area5 != ''">
|
||||
AND
|
||||
jt1.area5 = #{area5}
|
||||
</if>
|
||||
<if test="checkIds != null and checkIds.size > 0">
|
||||
AND
|
||||
t1.check_id IN
|
||||
@ -155,25 +200,6 @@
|
||||
#{checkIds[${index}]}
|
||||
</foreach>
|
||||
</if>
|
||||
GROUP BY
|
||||
t1.enterprise_id,
|
||||
jt1.name,
|
||||
jt1.type,
|
||||
jt1.area1,
|
||||
jt1.area2,
|
||||
jt1.area3,
|
||||
jt1.area4,
|
||||
jt1.area5,
|
||||
jt1.address,
|
||||
jt1.industry,
|
||||
jt1.engaged_count,
|
||||
jt1.risk_operation,
|
||||
jt1.master,
|
||||
jt1.phone,
|
||||
t1.check_type,
|
||||
t1.is_coordination,
|
||||
t1.is_complete,
|
||||
t1.check_id
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -118,15 +118,7 @@
|
||||
t1.enterprise_id,
|
||||
jt1.name name_join_by_enterprise_id,
|
||||
jt1.type type_join_by_enterprise_id,
|
||||
jt1.area1 area1_join_by_enterprise_id,
|
||||
jt1.area2 area2_join_by_enterprise_id,
|
||||
jt1.area3 area3_join_by_enterprise_id,
|
||||
jt1.area4 area4_join_by_enterprise_id,
|
||||
jt1.area5 area5_join_by_enterprise_id,
|
||||
jt1.address address_join_by_enterprise_id,
|
||||
jt1.industry industry_join_by_enterprise_id,
|
||||
jt1.engaged_count engaged_count_join_by_enterprise_id,
|
||||
jt1.risk_operation risk_operation_join_by_enterprise_id,
|
||||
jt1.master master_join_by_enterprise_id,
|
||||
jt1.phone phone_join_by_enterprise_id,
|
||||
t1.enterprise_of_grid_operator_id
|
||||
@ -141,7 +133,8 @@
|
||||
WHERE
|
||||
t1.is_delete = 0
|
||||
<if test="keywords != null and keywords != ''">
|
||||
<!-- 这里添加检索关键字 -->
|
||||
AND
|
||||
jt1.name LIKE CONCAT('%', #{keywords}, '%')
|
||||
</if>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
AND
|
||||
@ -158,6 +151,30 @@
|
||||
#{enterpriseOfGridOperatorIds[${index}]}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="userId != null and userId != ''">
|
||||
AND
|
||||
t1.user_id = #{userId}
|
||||
</if>
|
||||
<if test="area1 != null and area1 != ''">
|
||||
AND
|
||||
jt1.area1 = #{area1}
|
||||
</if>
|
||||
<if test="area2 != null and area2 != ''">
|
||||
AND
|
||||
jt1.area2 = #{area2}
|
||||
</if>
|
||||
<if test="area3 != null and area3 != ''">
|
||||
AND
|
||||
jt1.area3 = #{area3}
|
||||
</if>
|
||||
<if test="area4 != null and area4 != ''">
|
||||
AND
|
||||
jt1.area4 = #{area4}
|
||||
</if>
|
||||
<if test="area5 != null and area5 != ''">
|
||||
AND
|
||||
jt1.area5 = #{area5}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 网格员的企业列表(通过用户ID) -->
|
||||
|
@ -193,16 +193,11 @@
|
||||
dt5.dictionary_id = t1.area5
|
||||
AND
|
||||
dt5.is_delete = 0
|
||||
LEFT JOIN
|
||||
gen_grid_personnel jt1
|
||||
ON
|
||||
t1.leader_user_id = jt1.user_id
|
||||
AND
|
||||
jt1.is_delete = 0
|
||||
WHERE
|
||||
t1.is_delete = 0
|
||||
<if test="keywords != null and keywords != ''">
|
||||
|
||||
AND
|
||||
SUBSTRING_INDEX(t1.user_id, '|', 3) LIKE CONCAT('%', #{keywords}, '%')
|
||||
</if>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
AND
|
||||
|
@ -79,7 +79,7 @@
|
||||
cols: [[
|
||||
{type:'checkbox', fixed: 'left'},
|
||||
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
||||
{field: 'enterpriseId', width: 200, title: '企业ID', align:'center',
|
||||
{field: 'nameJoinByEnterpriseId', width: 200, title: '企业名称', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
@ -88,7 +88,7 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'nameJoinByEnterpriseId', width: 200, title: '企业ID的名称', align:'center',
|
||||
{field: 'typeDictionaryName', width: 200, title: '类型', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
@ -97,7 +97,7 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'typeJoinByEnterpriseId', width: 200, title: '企业ID的类型', align:'center',
|
||||
{field: 'addressJoinByEnterpriseId', width: 200, title: '详细地址', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
@ -106,7 +106,7 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'area1JoinByEnterpriseId', width: 150, title: '企业ID的1级地区', align:'center',
|
||||
{field: 'industryDictionaryName', width: 200, title: '管理行业', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
@ -115,7 +115,7 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'area2JoinByEnterpriseId', width: 150, title: '企业ID的2级区域', align:'center',
|
||||
{field: 'engagedCountJoinByEnterpriseId', width: 100, title: '从业人数', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
@ -124,7 +124,7 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'area3JoinByEnterpriseId', width: 150, title: '企业ID的3级区域', align:'center',
|
||||
{field: 'riskOperationDictionaryName', width: 200, title: '风险作业', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
@ -133,7 +133,7 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'area4JoinByEnterpriseId', width: 150, title: '企业ID的4级区域', align:'center',
|
||||
{field: 'masterJoinByEnterpriseId', width: 150, title: '负责人', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
@ -142,61 +142,7 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'area5JoinByEnterpriseId', width: 150, title: '企业ID的5级区域', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'addressJoinByEnterpriseId', width: 200, title: '企业ID的详细地址', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'industryJoinByEnterpriseId', width: 200, title: '企业ID的管理行业', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'engagedCountJoinByEnterpriseId', width: 100, title: '企业ID的从业人数', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'riskOperationJoinByEnterpriseId', width: 200, title: '企业ID的风险作业', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'masterJoinByEnterpriseId', width: 150, title: '企业ID的负责人', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'phoneJoinByEnterpriseId', width: 150, title: '企业ID的联系电话', align:'center',
|
||||
{field: 'phoneJoinByEnterpriseId', width: 150, title: '联系电话', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
|
@ -214,12 +214,12 @@
|
||||
searchKey: 'keywords',
|
||||
searchPlaceholder: '关键词搜索',
|
||||
table: {
|
||||
url: top.restAjax.path('api/enterprise/listpageenterprise?area1={area1}&area2={area2}&area3={area3}&area4={area4}&area5={area5}', [$('#area1').val(), $('#area2').val(), $('#area3').val(), $('#area4').val(), $('#area5').val()]),
|
||||
url: top.restAjax.path('api/enterpriseofgridoperator/listpageenterpriseofgridoperatorofmine?area1={area1}&area2={area2}&area3={area3}&area4={area4}&area5={area5}', [$('#area1').val(), $('#area2').val(), $('#area3').val(), $('#area4').val(), $('#area5').val()]),
|
||||
limit: 20,
|
||||
limits: [20, 40, 60, 80, 100, 200],
|
||||
cols: [[
|
||||
{type:'radio', fixed: 'left'},
|
||||
{field: 'name', width: 200, title: '名称', align:'center',
|
||||
{field: 'nameJoinByEnterpriseId', width: 200, title: '名称', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
@ -228,7 +228,7 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'address', width: 200, title: '详细地址', align:'center',
|
||||
{field: 'addressJoinByEnterpriseId', width: 200, title: '详细地址', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
@ -237,7 +237,7 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'master', width: 80, title: '负责人', align:'center',
|
||||
{field: 'masterJoinByEnterpriseId', width: 80, title: '负责人', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
@ -246,7 +246,7 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'phone', width: 120, title: '联系电话', align:'center',
|
||||
{field: 'phoneJoinByEnterpriseId', width: 120, title: '联系电话', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
@ -267,7 +267,7 @@
|
||||
},
|
||||
done: function (elem, data) {
|
||||
if(data.data.length > 0) {
|
||||
elem.val(data.data[0].name);
|
||||
elem.val(data.data[0].nameJoinByEnterpriseId);
|
||||
$('#enterpriseId').val(data.data[0].enterpriseId);
|
||||
} else {
|
||||
elem.val('');
|
||||
@ -328,20 +328,20 @@
|
||||
// area1 选择事件
|
||||
form.on('select(area1)', function(data) {
|
||||
initArea2Select(data.value);
|
||||
initArea3Select(data.value);
|
||||
initArea4Select(data.value);
|
||||
initArea5Select(data.value);
|
||||
initArea3Select();
|
||||
initArea4Select();
|
||||
initArea5Select();
|
||||
});
|
||||
// area2 选择事件
|
||||
form.on('select(area2)', function(data) {
|
||||
initArea3Select(data.value);
|
||||
initArea4Select(data.value);
|
||||
initArea5Select(data.value);
|
||||
initArea4Select();
|
||||
initArea5Select();
|
||||
});
|
||||
// area3 选择事件
|
||||
form.on('select(area3)', function(data) {
|
||||
initArea4Select(data.value);
|
||||
initArea5Select(data.value);
|
||||
initArea5Select();
|
||||
});
|
||||
// area4 选择事件
|
||||
form.on('select(area4)', function(data) {
|
||||
|
Loading…
Reference in New Issue
Block a user