征求意见流程发起生成公开征求意见;
解决征求意见流程驳回bug
This commit is contained in:
@@ -4,6 +4,7 @@ import com.github.pagehelper.PageInfo;
|
||||
import com.tmsps.fk.common.wrapper.Wrapper;
|
||||
import com.ydw.bat.wkflow.business_main.datas.dto.*;
|
||||
import com.ydw.bat.wkflow.business_main.datas.entity.*;
|
||||
import com.ydw.bat.wkflow.business_slrs.dao.SarPublicIdea;
|
||||
import feign.Headers;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
@@ -17,7 +18,7 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
@Component
|
||||
@FeignClient(value = "FotonLAWSSystem454",path="/api",url="")
|
||||
@FeignClient(value = "FotonLAWSSystem-zj",path="/api",url="")
|
||||
@RequestMapping("/")
|
||||
public interface LawsUserInfoService {
|
||||
|
||||
@@ -101,6 +102,9 @@ public interface LawsUserInfoService {
|
||||
@RequestMapping(value = "sarLawsDetailedList/sar-laws-detailed-list/getStandById",method = RequestMethod.POST)
|
||||
public SarLawsDetailedList getStandById(@RequestParam("id") String id);
|
||||
|
||||
@PostMapping("/slrs/sar-public-idea/addSarPublicIdea")
|
||||
public com.ydw.bat.wkflow.util.http.ResponseMessage addSarPublicIdea(@RequestBody SarPublicIdea sarPublicIdea);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.ydw.bat.wkflow.business_slrs.dao;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
public class SarPublicIdea{
|
||||
|
||||
private String id;
|
||||
|
||||
private String category;
|
||||
|
||||
private String cid;
|
||||
|
||||
private String cname;
|
||||
|
||||
private Date startTime;
|
||||
|
||||
private Date endTime;
|
||||
|
||||
private String categoryFlag;
|
||||
|
||||
|
||||
}
|
||||
+15
@@ -36,6 +36,21 @@ public class MinisterAndDockerSignAfter implements TaskListener {
|
||||
if(delegateTask.getVariable("actionFlag",Integer.class)==0){
|
||||
if("1".equals(object.getString("actionFlag"))){
|
||||
delegateTask.setVariable("actionFlag",1);
|
||||
|
||||
BusProcessNew busProcessNewNext = new BusProcessNew();
|
||||
busProcessNewNext.setMsgType("clause");
|
||||
busProcessNewNext.setPId(delegateTask.getProcessInstanceId());
|
||||
busProcessNewNext.setMesg(object.toJSONString());
|
||||
busProcessNewNext.setFinishFlag("0");
|
||||
busProcessNewNext.setTaskInfo("标准法规工程师汇总填写处理意见");
|
||||
busProcessNewNext.setUserId(delegateTask.getVariable("startUser", String.class));
|
||||
|
||||
QueryWrapper qw = new QueryWrapper();
|
||||
qw.isNull("task_id");
|
||||
List<BusProcessNew> list = busBean.list(qw);
|
||||
if(list == null || list.isEmpty()){
|
||||
busBean.save(busProcessNewNext);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -115,7 +115,7 @@ public class ResponUserSignAfter implements TaskListener {
|
||||
busProcessNewNext.setPId(delegateTask.getProcessInstanceId());
|
||||
busProcessNewNext.setMesg(object.toJSONString());
|
||||
busProcessNewNext.setFinishFlag("0");
|
||||
busProcessNewNext.setTaskInfo("标准法规工程师调研汇总");
|
||||
busProcessNewNext.setTaskInfo("标准法规工程师汇总填写处理意见");
|
||||
busProcessNewNext.setUserId(delegateTask.getVariable("startUser", String.class));
|
||||
busBean.save(busProcessNewNext);
|
||||
}
|
||||
|
||||
+22
@@ -2,13 +2,17 @@ package com.ydw.bat.wkflow.listener.StandardCommentProcess;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.ydw.bat.wkflow.business_auth.LawsUserInfoService;
|
||||
import com.ydw.bat.wkflow.business_main.datas.entity.BusProcessName;
|
||||
import com.ydw.bat.wkflow.business_main.datas.entity.BusProcessNew;
|
||||
import com.ydw.bat.wkflow.business_main.datas.entity.Datas;
|
||||
import com.ydw.bat.wkflow.business_main.datas.service.IBusProcessNameService;
|
||||
import com.ydw.bat.wkflow.business_main.datas.service.IBusProcessNewService;
|
||||
import com.ydw.bat.wkflow.business_main.datas.service.IDatasService;
|
||||
import com.ydw.bat.wkflow.business_slrs.dao.SarPublicIdea;
|
||||
import com.ydw.bat.wkflow.util.SpringContextUtil;
|
||||
import com.ydw.bat.wkflow.util.http.ResponseMessage;
|
||||
import org.activiti.engine.ActivitiException;
|
||||
import org.activiti.engine.delegate.DelegateTask;
|
||||
import org.activiti.engine.delegate.TaskListener;
|
||||
|
||||
@@ -16,8 +20,12 @@ import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
public class StartSurveyAfter implements TaskListener {
|
||||
|
||||
LawsUserInfoService lawsUserInfoService = SpringContextUtil.getBean(LawsUserInfoService.class);
|
||||
|
||||
@Override
|
||||
public void notify(DelegateTask delegateTask) {
|
||||
IDatasService datasService = SpringContextUtil.getBean(IDatasService.class);
|
||||
@@ -113,5 +121,19 @@ public class StartSurveyAfter implements TaskListener {
|
||||
busProcessNewNext.setUserId(delegateTask.getVariable("dockUser",String.class));
|
||||
busBean.save(busProcessNewNext);
|
||||
}
|
||||
|
||||
//发起公开征求意见
|
||||
SarPublicIdea sarPublicIdea = SarPublicIdea.builder()
|
||||
.id(UUID.randomUUID().toString())
|
||||
.category("标准")
|
||||
.cid(object.getString("cid"))
|
||||
.cname(object.getString("cname"))
|
||||
.startTime(new Date())
|
||||
.endTime(new Date())
|
||||
.build();
|
||||
ResponseMessage result = lawsUserInfoService.addSarPublicIdea(sarPublicIdea);
|
||||
if(!result.isOk()){
|
||||
throw new ActivitiException("发起公开征求意见失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -23,7 +23,7 @@ public class SummarySurveyBefore implements TaskListener {
|
||||
if(!list.isEmpty()){
|
||||
BusProcessNew one1 = list.get(0);
|
||||
|
||||
JSONObject obj= JSON.parseObject(one1.getMesg());
|
||||
/*JSONObject obj= JSON.parseObject(one1.getMesg());
|
||||
|
||||
//看全局变量里有没有存Summary,有的话就直接走,没的话就就初始化
|
||||
JSONArray summaryList=JSON.parseArray(delegateTask.getVariable("summaryList",String.class));
|
||||
@@ -57,7 +57,7 @@ public class SummarySurveyBefore implements TaskListener {
|
||||
obj.put("summaryList",summaryList);
|
||||
delegateTask.setVariable("summaryList",summaryList.toJSONString());
|
||||
|
||||
one1.setMesg(obj.toJSONString());
|
||||
one1.setMesg(obj.toJSONString());*/
|
||||
one1.setTaskId(delegateTask.getId());
|
||||
one1.setTaskInfo(delegateTask.getName());
|
||||
busBean.saveOrUpdate(one1);
|
||||
|
||||
@@ -0,0 +1,168 @@
|
||||
package com.ydw.bat.wkflow.util.http;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class PageInfo<T> {
|
||||
private Integer pageNo;
|
||||
private Integer pageSize;
|
||||
private Long count;
|
||||
private Long pageCount;
|
||||
private List<T> list;
|
||||
private List<Map<String, Object>> title;
|
||||
private Map<String, String> ext;
|
||||
private String orderBy;
|
||||
|
||||
public PageInfo() {
|
||||
this.pageNo = 1;
|
||||
this.pageSize = 10;
|
||||
this.list = new ArrayList();
|
||||
this.title = new ArrayList();
|
||||
this.ext = new HashMap();
|
||||
this.orderBy = "";
|
||||
this.pageSize = 1;
|
||||
}
|
||||
|
||||
public PageInfo(HttpServletRequest request) {
|
||||
this.pageNo = 1;
|
||||
this.pageSize = 10;
|
||||
this.list = new ArrayList();
|
||||
this.title = new ArrayList();
|
||||
this.ext = new HashMap();
|
||||
this.orderBy = "";
|
||||
String no = request.getParameter("pageNo");
|
||||
if (StringUtils.isEmpty(no)) {
|
||||
this.setPageNo(1);
|
||||
} else if (StringUtils.isNumeric(no)) {
|
||||
this.setPageNo(Integer.parseInt(no));
|
||||
}
|
||||
|
||||
String size = request.getParameter("pageSize");
|
||||
if (StringUtils.isEmpty(size)) {
|
||||
this.setPageSize(10);
|
||||
}
|
||||
|
||||
if (StringUtils.isNumeric(size)) {
|
||||
this.setPageSize(Integer.parseInt(size));
|
||||
}
|
||||
|
||||
String orderByParam = request.getParameter("orderBy");
|
||||
if (StringUtils.isNotBlank(orderByParam)) {
|
||||
this.setOrderBy(orderByParam);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public PageInfo(Integer pageNo, Integer pageSize) {
|
||||
this(pageNo, pageSize, 0L);
|
||||
}
|
||||
|
||||
public PageInfo(Integer pageNo, Integer pageSize, Long count) {
|
||||
this(pageNo, pageSize, count, new ArrayList());
|
||||
}
|
||||
|
||||
public PageInfo(Integer pageNo, Integer pageSize, Long count, List<T> list) {
|
||||
this.pageNo = 1;
|
||||
this.pageSize = 10;
|
||||
this.list = new ArrayList();
|
||||
this.title = new ArrayList();
|
||||
this.ext = new HashMap();
|
||||
this.orderBy = "";
|
||||
if (pageNo == null) {
|
||||
pageNo = 1;
|
||||
}
|
||||
|
||||
if (pageSize == null) {
|
||||
pageSize = 10;
|
||||
}
|
||||
|
||||
this.setCount(count);
|
||||
this.setPageNo(Math.abs(pageNo));
|
||||
this.setPageSize(Math.abs(pageSize));
|
||||
this.setList(list);
|
||||
}
|
||||
|
||||
public Long getCount() {
|
||||
return this.count;
|
||||
}
|
||||
|
||||
public void setCount(Long count) {
|
||||
this.count = count;
|
||||
if ((long) this.pageSize >= count) {
|
||||
this.pageNo = 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public Integer getPageNo() {
|
||||
return this.pageNo;
|
||||
}
|
||||
|
||||
public void setPageNo(Integer pageNo) {
|
||||
this.pageNo = pageNo;
|
||||
}
|
||||
|
||||
public Integer getPageSize() {
|
||||
return this.pageSize;
|
||||
}
|
||||
|
||||
public void setPageSize(Integer pageSize) {
|
||||
this.pageSize = pageSize <= 0 ? 10 : pageSize;
|
||||
}
|
||||
|
||||
public List<T> getList() {
|
||||
return this.list;
|
||||
}
|
||||
|
||||
public PageInfo<T> setList(List<T> list) {
|
||||
this.list = list;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getOrderBy() {
|
||||
return this.orderBy;
|
||||
}
|
||||
|
||||
public void setOrderBy(String orderBy) {
|
||||
this.orderBy = orderBy;
|
||||
}
|
||||
|
||||
public Map<String, String> getExt() {
|
||||
return this.ext;
|
||||
}
|
||||
|
||||
public void setExt(Map<String, String> ext) {
|
||||
this.ext = ext;
|
||||
}
|
||||
|
||||
public Long getPageCount() {
|
||||
if (this.count % (long) this.pageSize != 0L) {
|
||||
this.pageCount = this.count / (long) this.pageSize + 1L;
|
||||
} else {
|
||||
this.pageCount = this.count / (long) this.pageSize;
|
||||
}
|
||||
|
||||
if (this.pageCount < 1L) {
|
||||
this.pageCount = 1L;
|
||||
}
|
||||
|
||||
return this.pageCount;
|
||||
}
|
||||
|
||||
public void setPageCount(Long pageCount) {
|
||||
this.pageCount = pageCount;
|
||||
}
|
||||
|
||||
public List<Map<String, Object>> getTitle() {
|
||||
return this.title;
|
||||
}
|
||||
|
||||
public void setTitle(List<Map<String, Object>> title) {
|
||||
this.title = title;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.ydw.bat.wkflow.util.http;
|
||||
|
||||
public class ResponseMessage<T> {
|
||||
private String respCode;
|
||||
private String respMsg;
|
||||
private T data;
|
||||
private boolean ok;
|
||||
|
||||
public ResponseMessage() {
|
||||
}
|
||||
|
||||
public ResponseMessage(String respCode, String message) {
|
||||
this.respCode = respCode;
|
||||
this.respMsg = message;
|
||||
}
|
||||
|
||||
public ResponseMessage(String respCode, String message, boolean ok) {
|
||||
this.respCode = respCode;
|
||||
this.respMsg = message;
|
||||
this.ok = ok;
|
||||
}
|
||||
|
||||
public ResponseMessage(String respCode, String message, boolean ok, T data) {
|
||||
this.respCode = respCode;
|
||||
this.respMsg = message;
|
||||
this.ok = ok;
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public String getRespCode() {
|
||||
return this.respCode;
|
||||
}
|
||||
|
||||
public void setRespCode(String respCode) {
|
||||
this.respCode = respCode;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return this.respMsg;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.respMsg = message;
|
||||
}
|
||||
|
||||
public T getData() {
|
||||
return this.data;
|
||||
}
|
||||
|
||||
public void setData(T data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public boolean isOk() {
|
||||
return this.ok;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.ydw.bat.wkflow.util.http;
|
||||
|
||||
public enum ResponseMessageCodeEnum {
|
||||
SUCCESS("0"),
|
||||
ERROR("-1"),
|
||||
VALID_ERROR("1000"),
|
||||
SAVE_SUCCESS("r0001"),
|
||||
UPDATE_SUCCESS("r0002"),
|
||||
REMOVE_SUCCESS("r0003");
|
||||
|
||||
private String code;
|
||||
|
||||
private ResponseMessageCodeEnum(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return this.code;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.ydw.bat.wkflow.util.http;
|
||||
|
||||
public class Result {
|
||||
public Result() {
|
||||
}
|
||||
|
||||
public static ResponseMessage success() {
|
||||
return new ResponseMessage(ResponseMessageCodeEnum.SUCCESS.getCode(), "", true);
|
||||
}
|
||||
|
||||
public static <T> ResponseMessage<T> success(String code, T t) {
|
||||
return new ResponseMessage(code, "", true, t);
|
||||
}
|
||||
|
||||
public static <T> ResponseMessage<T> success(String code, String message) {
|
||||
return new ResponseMessage(code, message);
|
||||
}
|
||||
|
||||
public static <T> ResponseMessage<T> success(String code, String message, T t) {
|
||||
return new ResponseMessage(code, message, true, t);
|
||||
}
|
||||
|
||||
public static <T> ResponseMessage<T> success(T t) {
|
||||
return new ResponseMessage(ResponseMessageCodeEnum.SUCCESS.getCode(), "", true, t);
|
||||
}
|
||||
|
||||
public static ResponseMessage error() {
|
||||
return error("");
|
||||
}
|
||||
|
||||
public static ResponseMessage error(String message) {
|
||||
return error(ResponseMessageCodeEnum.ERROR.getCode(), message);
|
||||
}
|
||||
|
||||
public static ResponseMessage error(String code, String message) {
|
||||
return error(code, message, (Object)null);
|
||||
}
|
||||
|
||||
public static <T> ResponseMessage<T> error(String code, String message, T t) {
|
||||
return new ResponseMessage(code, message, false, t);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user