法规-流程历史表-列表查询接口开发。
This commit is contained in:
+5
-2
@@ -68,8 +68,11 @@ public class LawsProcessHistoryEOController extends JeroController<LawsProcessHi
|
||||
@AutoLog(value = "法规-流程历史表-列表查询")
|
||||
@ApiOperation(value="法规-流程历史表-列表查询", notes="法规-流程历史表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<LawsProcessHistoryEO>> queryList() {
|
||||
List<LawsProcessHistoryEO> list = lawsProcessHistoryEOService.queryList();
|
||||
public Result<List<LawsProcessHistoryEO>> queryList(LawsProcessHistoryEO lawsProcessHistoryEO,
|
||||
HttpServletRequest req,
|
||||
@RequestParam(value = "cut",defaultValue = "cn") String cut) {
|
||||
List<LawsProcessHistoryEO> list = lawsProcessHistoryEOService.queryList(lawsProcessHistoryEO,req,cut);
|
||||
this.lawsProcessHistoryEOService.disposeData(list,cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
|
||||
+7
@@ -4,6 +4,7 @@ import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
@@ -67,6 +68,9 @@ public class LawsProcessHistoryEO implements Serializable {
|
||||
@Excel(name = "操作节点", width = 15)
|
||||
@ApiModelProperty(value = "操作节点")
|
||||
private String taskDefinitionKey;
|
||||
//操作节点展示字段
|
||||
@TableField(exist = false)
|
||||
private String taskDefinitionKeyName;
|
||||
|
||||
/**操作人id*/
|
||||
@Excel(name = "操作人id", width = 15)
|
||||
@@ -77,6 +81,9 @@ public class LawsProcessHistoryEO implements Serializable {
|
||||
@Excel(name = "操作角色编码", width = 15)
|
||||
@ApiModelProperty(value = "操作角色编码")
|
||||
private String operatorRoleCode;
|
||||
//操作角色展示字段
|
||||
@TableField(exist = false)
|
||||
private String operatorRoleName;
|
||||
|
||||
/**操作时间*/
|
||||
@Excel(name = "操作时间", width = 15, format = "yyyy-MM-dd")
|
||||
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.jero.modules.lawsOpinionGather.enums;
|
||||
|
||||
import com.alibaba.druid.util.StringUtils;
|
||||
|
||||
/**
|
||||
* 法规意见收集 节点枚举类
|
||||
*/
|
||||
public enum LawsOpinionGatherNodeEnum {
|
||||
|
||||
ENGINEER_INITIATED("gcsfq","工程师发起","Engineer initiated"),
|
||||
APPRAISERS_EVALUATION("pgrpg","评估人评估","Appraiser's evaluation"),
|
||||
;
|
||||
|
||||
String key;
|
||||
String cnName;
|
||||
String enName;
|
||||
|
||||
private LawsOpinionGatherNodeEnum(String key, String cnName, String enName) {
|
||||
this.key = key;
|
||||
this.cnName = cnName;
|
||||
this.enName = enName;
|
||||
}
|
||||
|
||||
public String getKey() {
|
||||
return key;
|
||||
}
|
||||
|
||||
public void setKey(String key) {
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
public String getCnName() {
|
||||
return cnName;
|
||||
}
|
||||
|
||||
public void setCnName(String cnName) {
|
||||
this.cnName = cnName;
|
||||
}
|
||||
|
||||
public String getEnName() {
|
||||
return enName;
|
||||
}
|
||||
|
||||
public void setEnName(String enName) {
|
||||
this.enName = enName;
|
||||
}
|
||||
|
||||
public static String getTextByValue(String key,String cut) {
|
||||
LawsOpinionGatherNodeEnum[] values = values();
|
||||
for (LawsOpinionGatherNodeEnum lawsOpinionGatherNodeEnum : values) {
|
||||
if (lawsOpinionGatherNodeEnum.key.equals(key)) {
|
||||
if(StringUtils.equals(cut, CutEnum.CN.getValue())){
|
||||
return lawsOpinionGatherNodeEnum.cnName;
|
||||
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||
return lawsOpinionGatherNodeEnum.enName;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
package com.jero.modules.lawsOpinionGather.enums;
|
||||
|
||||
import com.ydw.bat.wkflow.business_main.datas.constant.CutEnum;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
/**
|
||||
* 法规意见收集/法规技术评估流程使用
|
||||
* 操作角色枚举类
|
||||
*/
|
||||
public enum OperatorRoleCodeEnum {
|
||||
|
||||
INITIATOR("发起人","Initiator","Initiator"),
|
||||
EVALUATOR("评估人","Evaluator","Evaluator"),
|
||||
;
|
||||
|
||||
|
||||
String cnName;
|
||||
String enName;
|
||||
String value;
|
||||
|
||||
private OperatorRoleCodeEnum(String cnName, String value, String enName) {
|
||||
this.cnName = cnName;
|
||||
this.value = value;
|
||||
this.enName = enName;
|
||||
}
|
||||
|
||||
public String getCnName() {
|
||||
return cnName;
|
||||
}
|
||||
|
||||
public void setCnName(String cnName) {
|
||||
this.cnName = cnName;
|
||||
}
|
||||
|
||||
public String getEnName() {
|
||||
return enName;
|
||||
}
|
||||
|
||||
public void setEnName(String enName) {
|
||||
this.enName = enName;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public static String getTextByValue(String value,String cut) {
|
||||
OperatorRoleCodeEnum[] values = values();
|
||||
for (OperatorRoleCodeEnum operatorRoleCodeEnum : values) {
|
||||
if (operatorRoleCodeEnum.value.equals(value)) {
|
||||
if(StringUtils.equals(cut, CutEnum.CN.getValue())){
|
||||
return operatorRoleCodeEnum.cnName;
|
||||
}else if(StringUtils.equals(cut, CutEnum.EN.getValue())){
|
||||
return operatorRoleCodeEnum.enName;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+5
-1
@@ -4,6 +4,8 @@ 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 javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -59,7 +61,9 @@ public interface ILawsProcessHistoryEOService extends IService<LawsProcessHistor
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<LawsProcessHistoryEO> queryList();
|
||||
List<LawsProcessHistoryEO> queryList(LawsProcessHistoryEO lawsProcessHistoryEO, HttpServletRequest req,String cut);
|
||||
|
||||
public void disposeData(List<LawsProcessHistoryEO> datas,String cut);
|
||||
|
||||
/**
|
||||
* 流程调用
|
||||
|
||||
+26
-2
@@ -2,13 +2,18 @@ package com.jero.modules.lawsOpinionGather.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.lawsOpinionGather.entity.LawsProcessHistoryEO;
|
||||
import com.jero.modules.lawsOpinionGather.enums.LawsOpinionGatherNodeEnum;
|
||||
import com.jero.modules.lawsOpinionGather.enums.OperatorRoleCodeEnum;
|
||||
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.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -17,6 +22,8 @@ import java.util.List;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* @Description: 法规-流程历史表
|
||||
* @Author: jero-boot
|
||||
@@ -92,10 +99,27 @@ public class LawsProcessHistoryEOServiceImpl extends ServiceImpl<LawsProcessHist
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<LawsProcessHistoryEO> queryList() {
|
||||
return list();
|
||||
public List<LawsProcessHistoryEO> queryList(LawsProcessHistoryEO lawsProcessHistoryEO, HttpServletRequest req,String cut) {
|
||||
QueryWrapper<LawsProcessHistoryEO> queryWrapper = QueryGenerator.initQueryWrapper(lawsProcessHistoryEO, req.getParameterMap());
|
||||
List<LawsProcessHistoryEO> lawsProcessHistoryEOList = this.baseMapper.selectList(queryWrapper);
|
||||
return lawsProcessHistoryEOList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disposeData(List<LawsProcessHistoryEO> datas, String cut){
|
||||
if(CollectionUtils.isNotEmpty(datas)){
|
||||
datas.forEach(data -> {
|
||||
if(StringUtils.isNotEmpty(data.getOperatorRoleCode())){
|
||||
data.setOperatorRoleName(OperatorRoleCodeEnum.getTextByValue(data.getOperatorRoleCode(),cut));
|
||||
}
|
||||
|
||||
if(StringUtils.isNotEmpty(data.getTaskDefinitionKey())){
|
||||
data.setTaskDefinitionKeyName(LawsOpinionGatherNodeEnum.getTextByValue(data.getTaskDefinitionKey(),cut));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<?> processCall(JSONObject jsonObject) {
|
||||
String requestSource = jsonObject.getString("requestSource");
|
||||
|
||||
Reference in New Issue
Block a user