项目库-法规清单表-流程调用 处理法规清单数据 接口。
This commit is contained in:
+14
@@ -5,6 +5,8 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
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.project.entity.ProjectLawsInventoryEO;
|
||||
@@ -192,4 +194,16 @@ public class ProjectLawsInventoryEOController extends JeroController<ProjectLaws
|
||||
return this.projectLawsInventoryEOService.matchRelevantPeople(params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 流程调用接口
|
||||
* @param jsonObject
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库-法规清单表-流程调用")
|
||||
@ApiOperation(value="项目库-法规清单表-流程调用", notes="项目库-法规清单表-流程调用")
|
||||
@PostMapping(value = "/processCall")
|
||||
public Result<?> processCall(@RequestBody JSONObject jsonObject){
|
||||
return this.projectLawsInventoryEOService.processCall(jsonObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+2
-2
@@ -326,12 +326,12 @@ public class ProjectLawsInventoryEO implements Serializable {
|
||||
|
||||
/**法规工程师提交状态 :0通过 1驳回 */
|
||||
@ApiModelProperty(value = "法规工程师提交状态")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
// @TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private String regulationOwnerSubmitStatus;
|
||||
//这两个只要有一个是拒绝 那么该数据的清单确认状态就为拒绝
|
||||
/**认证工程师提交状态 :0通过 1驳回 */
|
||||
@ApiModelProperty(value = "认证工程师提交状态")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
// @TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private String homologationEngineerSubmitStatus;
|
||||
|
||||
@TableField(exist = false)
|
||||
|
||||
+8
@@ -6,6 +6,14 @@ package com.jero.modules.project.enums;
|
||||
public enum OperatorTypeEnum {
|
||||
INVENTORY_AFFIRM("清单确认,studio工程师发起","0"),
|
||||
SUBMIT_OR_REJECTED("法规、认证工程师提交或拒绝","1"),
|
||||
|
||||
/**
|
||||
* 工作流调用后台操作类型
|
||||
*/
|
||||
ADD("添加","add"),
|
||||
UPDATE_STATUS("修改状态","updateStatus"),
|
||||
DELETE("删除","delete"),
|
||||
QUERY("查询","query"),
|
||||
;
|
||||
|
||||
String name;
|
||||
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
package com.jero.modules.project.enums;
|
||||
|
||||
/**
|
||||
* 请求来源枚举类
|
||||
*/
|
||||
public enum RequestSourceEnum {
|
||||
WORK_FLOW("工作流后台","workFlow"),
|
||||
;
|
||||
|
||||
String name;
|
||||
String value;
|
||||
|
||||
private RequestSourceEnum(String name, String value) {
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public static String getTextByValue(String value) {
|
||||
RequestSourceEnum[] values = values();
|
||||
for (RequestSourceEnum requestSourceEnum : values) {
|
||||
if (requestSourceEnum.value.equals(value)) {
|
||||
return requestSourceEnum.name;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -78,7 +78,7 @@ public class InventoryAffirmJob implements Job {
|
||||
for (ProjectLibraryBase projectLibraryBase : projectLibraryBaseList) {
|
||||
|
||||
QueryWrapper<ProjectNameInfoEO> projectNameInfoEOQueryWrapper = new QueryWrapper<>();
|
||||
projectNameInfoEOQueryWrapper.lambda().eq(ProjectNameInfoEO::getId,projectLibraryBase.getProjectName());
|
||||
projectNameInfoEOQueryWrapper.lambda().eq(ProjectNameInfoEO::getId,projectLibraryBase.getProjectNameId());
|
||||
ProjectNameInfoEO projectNameInfoEO = projectNameInfoEOMapper.selectOne(projectNameInfoEOQueryWrapper);
|
||||
|
||||
List<String> threeDaysUserIdList = new ArrayList<>();
|
||||
|
||||
+8
@@ -1,5 +1,6 @@
|
||||
package com.jero.modules.project.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
@@ -78,4 +79,11 @@ public interface IProjectLawsInventoryEOService extends IService<ProjectLawsInve
|
||||
* @return
|
||||
*/
|
||||
Result<?> matchRelevantPeople(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 流程调用
|
||||
* @param jsonObject
|
||||
* @return
|
||||
*/
|
||||
Result<?> processCall(JSONObject jsonObject);
|
||||
}
|
||||
|
||||
+38
-1
@@ -571,7 +571,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
userIdList = userIdList.stream().distinct().collect(Collectors.toList());
|
||||
|
||||
QueryWrapper<ProjectNameInfoEO> projectNameInfoEOQueryWrapper = new QueryWrapper<>();
|
||||
projectNameInfoEOQueryWrapper.lambda().eq(ProjectNameInfoEO::getId,projectLibraryBase.getProjectName());
|
||||
projectNameInfoEOQueryWrapper.lambda().eq(ProjectNameInfoEO::getId,projectLibraryBase.getProjectNameId());
|
||||
ProjectNameInfoEO projectNameInfoEO = projectNameInfoEOMapper.selectOne(projectNameInfoEOQueryWrapper);
|
||||
|
||||
//消息内容
|
||||
@@ -865,4 +865,41 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
}
|
||||
return resultUserId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 流程调用
|
||||
* @param jsonObject
|
||||
* @return
|
||||
*/
|
||||
@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.UPDATE_STATUS.getValue())){
|
||||
ProjectLawsInventoryEO projectLawsInventoryEO = JSONObject.parseObject(jsonObject.toString(), ProjectLawsInventoryEO.class);
|
||||
this.baseMapper.updateById(projectLawsInventoryEO);
|
||||
}
|
||||
if(StringUtils.equals(operatorType,OperatorTypeEnum.ADD.getValue())){
|
||||
|
||||
}
|
||||
if(StringUtils.equals(operatorType,OperatorTypeEnum.DELETE.getValue())){
|
||||
|
||||
}
|
||||
if(StringUtils.equals(operatorType,OperatorTypeEnum.QUERY.getValue())){
|
||||
|
||||
}
|
||||
|
||||
return new Result<>().success("调用成功!");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user