法规意见收集流程相关开发。
This commit is contained in:
+15
-1
@@ -4,6 +4,8 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.lawsOpinionGather.entity.LawsOpinionGatherEO;
|
||||
@@ -35,7 +37,7 @@ import com.jero.common.aspect.annotation.AutoLog;
|
||||
public class LawsOpinionGatherEOController extends JeroController<LawsOpinionGatherEO, ILawsOpinionGatherEOService> {
|
||||
@Autowired
|
||||
private ILawsOpinionGatherEOService lawsOpinionGatherEOService;
|
||||
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
@@ -167,4 +169,16 @@ public class LawsOpinionGatherEOController extends JeroController<LawsOpinionGat
|
||||
return super.importExcel(request, response, LawsOpinionGatherEO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 流程调用接口
|
||||
* @param jsonObject
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "法规意见收集表-流程调用")
|
||||
@ApiOperation(value="法规意见收集表-流程调用", notes="法规意见收集表-流程调用")
|
||||
@PostMapping(value = "/processCall")
|
||||
public Result<?> processCall(@RequestBody JSONObject jsonObject){
|
||||
return this.lawsOpinionGatherEOService.processCall(jsonObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+16
-2
@@ -4,6 +4,8 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.lawsOpinionGather.entity.LawsProcessHistoryEO;
|
||||
@@ -35,7 +37,7 @@ import com.jero.common.aspect.annotation.AutoLog;
|
||||
public class LawsProcessHistoryEOController extends JeroController<LawsProcessHistoryEO, ILawsProcessHistoryEOService> {
|
||||
@Autowired
|
||||
private ILawsProcessHistoryEOService lawsProcessHistoryEOService;
|
||||
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
@@ -167,4 +169,16 @@ public class LawsProcessHistoryEOController extends JeroController<LawsProcessHi
|
||||
return super.importExcel(request, response, LawsProcessHistoryEO.class);
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* 流程调用接口
|
||||
* @param jsonObject
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "法规-流程历史表-流程调用")
|
||||
@ApiOperation(value="法规-流程历史表-流程调用", notes="法规-流程历史表-流程调用")
|
||||
@PostMapping(value = "/processCall")
|
||||
public Result<?> processCall(@RequestBody JSONObject jsonObject){
|
||||
return this.lawsProcessHistoryEOService.processCall(jsonObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+9
@@ -1,5 +1,7 @@
|
||||
package com.jero.modules.lawsOpinionGather.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.modules.lawsOpinionGather.entity.LawsOpinionGatherEO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.List;
|
||||
@@ -58,4 +60,11 @@ public interface ILawsOpinionGatherEOService extends IService<LawsOpinionGatherE
|
||||
* @return
|
||||
*/
|
||||
List<LawsOpinionGatherEO> queryList();
|
||||
|
||||
/**
|
||||
* 流程调用
|
||||
* @param jsonObject
|
||||
* @return
|
||||
*/
|
||||
Result<?> processCall(JSONObject jsonObject);
|
||||
}
|
||||
|
||||
+9
@@ -1,5 +1,7 @@
|
||||
package com.jero.modules.lawsOpinionGather.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.modules.lawsOpinionGather.entity.LawsProcessHistoryEO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.List;
|
||||
@@ -58,4 +60,11 @@ public interface ILawsProcessHistoryEOService extends IService<LawsProcessHistor
|
||||
* @return
|
||||
*/
|
||||
List<LawsProcessHistoryEO> queryList();
|
||||
|
||||
/**
|
||||
* 流程调用
|
||||
* @param jsonObject
|
||||
* @return
|
||||
*/
|
||||
Result<?> processCall(JSONObject jsonObject);
|
||||
}
|
||||
|
||||
+38
@@ -1,8 +1,14 @@
|
||||
package com.jero.modules.lawsOpinionGather.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.modules.lawsOpinionGather.entity.LawsOpinionGatherEO;
|
||||
import com.jero.modules.lawsOpinionGather.mapper.LawsOpinionGatherEOMapper;
|
||||
import com.jero.modules.lawsOpinionGather.service.ILawsOpinionGatherEOService;
|
||||
import com.jero.modules.project.enums.OperatorTypeEnum;
|
||||
import com.jero.modules.project.enums.RequestSourceEnum;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
@@ -86,4 +92,36 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl<LawsOpinionGathe
|
||||
public List<LawsOpinionGatherEO> queryList() {
|
||||
return list();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<?> processCall(JSONObject jsonObject) {
|
||||
String requestSource = jsonObject.getString("requestSource");
|
||||
if(StringUtils.isEmpty(requestSource)){
|
||||
throw new JeroBootException("请求来源不能为空!");
|
||||
}
|
||||
if(!StringUtils.equals(requestSource, RequestSourceEnum.WORK_FLOW.getValue())){
|
||||
throw new JeroBootException("来源有误,没有权限调用该接口!");
|
||||
}
|
||||
|
||||
String operatorType = jsonObject.getString("operatorType");
|
||||
if(StringUtils.isEmpty(operatorType)){
|
||||
throw new JeroBootException("操作类型不能为空!");
|
||||
}
|
||||
|
||||
if(StringUtils.equals(operatorType, OperatorTypeEnum.ADD_LAWS_OPINION_GATHER.getValue())){
|
||||
Object lawsOpinionGatherInfoJson = jsonObject.get("lawsOpinionGatherInfo");
|
||||
LawsOpinionGatherEO lawsOpinionGatherEO = JSONObject.parseObject(
|
||||
JSONObject.toJSONString(lawsOpinionGatherInfoJson),LawsOpinionGatherEO.class
|
||||
);
|
||||
this.baseMapper.insert(lawsOpinionGatherEO);
|
||||
}
|
||||
|
||||
if(StringUtils.equals(operatorType, OperatorTypeEnum.UPDATE_LAWS_OPINION_GATHER_GATHER_RESULT.getValue())){
|
||||
LawsOpinionGatherEO lawsOpinionGatherEO = new LawsOpinionGatherEO();
|
||||
lawsOpinionGatherEO.setId(jsonObject.getString("id"));
|
||||
lawsOpinionGatherEO.setGatherResult(jsonObject.getString("gatherResult"));
|
||||
this.baseMapper.updateById(lawsOpinionGatherEO);
|
||||
}
|
||||
return new Result<>().success("调用成功!");
|
||||
}
|
||||
}
|
||||
|
||||
+37
@@ -1,9 +1,18 @@
|
||||
package com.jero.modules.lawsOpinionGather.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.modules.lawsOpinionGather.entity.LawsProcessHistoryEO;
|
||||
import com.jero.modules.lawsOpinionGather.mapper.LawsProcessHistoryEOMapper;
|
||||
import com.jero.modules.lawsOpinionGather.service.ILawsProcessHistoryEOService;
|
||||
import com.jero.modules.project.enums.OperatorTypeEnum;
|
||||
import com.jero.modules.project.enums.RequestSourceEnum;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@@ -86,4 +95,32 @@ public class LawsProcessHistoryEOServiceImpl extends ServiceImpl<LawsProcessHist
|
||||
public List<LawsProcessHistoryEO> queryList() {
|
||||
return list();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<?> processCall(JSONObject jsonObject) {
|
||||
String requestSource = jsonObject.getString("requestSource");
|
||||
if(StringUtils.isEmpty(requestSource)){
|
||||
throw new JeroBootException("请求来源不能为空!");
|
||||
}
|
||||
if(!StringUtils.equals(requestSource, RequestSourceEnum.WORK_FLOW.getValue())){
|
||||
throw new JeroBootException("来源有误,没有权限调用该接口!");
|
||||
}
|
||||
|
||||
String operatorType = jsonObject.getString("operatorType");
|
||||
if(StringUtils.isEmpty(operatorType)){
|
||||
throw new JeroBootException("操作类型不能为空!");
|
||||
}
|
||||
if(StringUtils.equals(operatorType, OperatorTypeEnum.ADD.getValue())){
|
||||
JSONArray lawsProcessHistoryEOArray = jsonObject.getJSONArray("lawsProcessHistoryEOList");
|
||||
List<LawsProcessHistoryEO> lawsProcessHistoryEOList = new ArrayList<>();
|
||||
LawsProcessHistoryEO lawsProcessHistoryEO = null;
|
||||
for (Object lawsProcessHistory : lawsProcessHistoryEOArray) {
|
||||
lawsProcessHistoryEO = JSONObject.parseObject(JSONObject.toJSONString(lawsProcessHistory),LawsProcessHistoryEO.class);
|
||||
lawsProcessHistoryEOList.add(lawsProcessHistoryEO);
|
||||
}
|
||||
this.saveBatch(lawsProcessHistoryEOList);
|
||||
}
|
||||
|
||||
return new Result<>().success("调用成功!");
|
||||
}
|
||||
}
|
||||
|
||||
+3
@@ -36,6 +36,9 @@ public enum OperatorTypeEnum {
|
||||
QUERY_PREHOMO_STATISTICS("查询prehomo统计","queryPrehomoStatistics"),
|
||||
QUERY_VERIFY_STATISTICS("查询验证符合性统计","queryVerifyStatistics"),
|
||||
QUERY_CERTIFICATION_PROGRESS_STATISTICS("查询认证进度统计","queryCertificationProgressStatistics"),
|
||||
|
||||
ADD_LAWS_OPINION_GATHER("添加法规意见收集数据","addLawsOpinionGather"),
|
||||
UPDATE_LAWS_OPINION_GATHER_GATHER_RESULT("更新法规意见收集数据收集结果","updateLawsOpinionGatherGatherResult"),
|
||||
;
|
||||
|
||||
String name;
|
||||
|
||||
+3
@@ -68,6 +68,9 @@ public class workFlowController {
|
||||
jsonObject.put("id", FlowTypeEnum.YZFHXSCLC.getProcessDefinitionKey());
|
||||
initConditionAssessmentEO(jsonObject);
|
||||
return this.activiti_define_start(jsonObject);
|
||||
}else if(StringUtils.equals(type,FlowTypeEnum.FGYJSJLC.getValue())){
|
||||
jsonObject.put("id", FlowTypeEnum.FGYJSJLC.getProcessDefinitionKey());
|
||||
return this.activiti_define_start(jsonObject);
|
||||
}else{
|
||||
return null;
|
||||
}
|
||||
|
||||
+1
@@ -9,6 +9,7 @@ public enum FlowTypeEnum {
|
||||
SJFHXSHLC("2","设计符合性审查流程","SJFHXSHLC","设计符合性审查流程","sjfhxlc"),
|
||||
PREHOMOQRLC("3","prehomo确认流程","PREHOMOQRLC","prehomo确认流程","prehomoqrlc"),
|
||||
YZFHXSCLC("4","验证符合性审查流程","YZFHXSCLC","验证符合性审查流程","yzfhxsclc"),
|
||||
FGYJSJLC("5","法规意见收集流程","FGYJSJLC","法规意见收集流程","fgyjsjlc"),
|
||||
;
|
||||
|
||||
private String value;
|
||||
|
||||
Reference in New Issue
Block a user