Merge remote-tracking branch 'origin/master'
This commit is contained in:
+5
-2
@@ -4,6 +4,7 @@ import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.modules.activiti.process.common.entity.CenterQueryVO;
|
||||
import com.jero.modules.activiti.process.common.service.ActFlowCommonService;
|
||||
import com.jero.modules.activiti.process.common.service.ProcessDraftService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -23,6 +24,9 @@ import javax.validation.Valid;
|
||||
@RequestMapping("/process/center")
|
||||
public class ProcessCenterController {
|
||||
|
||||
@Resource
|
||||
private ProcessDraftService draftService;
|
||||
|
||||
@Resource
|
||||
private ActFlowCommonService actFlowCommonService;
|
||||
|
||||
@@ -83,7 +87,6 @@ public class ProcessCenterController {
|
||||
@ApiOperation(value="流程中心-草稿", notes="流程中心-草稿")
|
||||
@GetMapping("/draftList")
|
||||
public Result<?> draftList(@Valid CenterQueryVO centerQueryVO) {
|
||||
// TODO
|
||||
return Result.OK();
|
||||
return Result.OK(draftService.getDraftList(centerQueryVO));
|
||||
}
|
||||
}
|
||||
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.jero.modules.activiti.process.common.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author: Mzaxd
|
||||
* @Date: 2023/10/12 13:52
|
||||
*/
|
||||
@Data
|
||||
public class ProcessCenterListVO {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
+1
@@ -57,6 +57,7 @@ public class ActFlowCommonService {
|
||||
Map<String, Object> variables = customService.setVariables(businessId);
|
||||
// 第一个节点默认通过
|
||||
variables.put("pass", true);
|
||||
variables.put("createUser", UserUtils.getUserId());
|
||||
// 启动流程
|
||||
ProcessInstance processInstance = runtimeService.startProcessInstanceById(latestProcessDefinition.getId(), variables);
|
||||
// 流程实例ID
|
||||
|
||||
+5
@@ -1,8 +1,12 @@
|
||||
package com.jero.modules.activiti.process.common.service;
|
||||
|
||||
import com.jero.modules.activiti.process.common.entity.CenterQueryVO;
|
||||
import com.jero.modules.activiti.process.common.entity.ProcessCenterListVO;
|
||||
import com.jero.modules.activiti.process.common.entity.ProcessDraft;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author ThinkBook
|
||||
* @description 针对表【process_draft】的数据库操作Service
|
||||
@@ -10,4 +14,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
*/
|
||||
public interface ProcessDraftService extends IService<ProcessDraft> {
|
||||
|
||||
List<ProcessCenterListVO> getDraftList(CenterQueryVO centerQueryVO);
|
||||
}
|
||||
|
||||
+14
@@ -1,11 +1,17 @@
|
||||
package com.jero.modules.activiti.process.common.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.modules.activiti.process.common.entity.CenterQueryVO;
|
||||
import com.jero.modules.activiti.process.common.entity.ProcessCenterListVO;
|
||||
import com.jero.modules.activiti.process.common.entity.ProcessDraft;
|
||||
import com.jero.modules.activiti.process.common.service.ProcessDraftService;
|
||||
import com.jero.modules.activiti.process.common.mapper.ProcessDraftMapper;
|
||||
import com.jero.modules.sys.utils.UserUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author ThinkBook
|
||||
* @description 针对表【process_draft】的数据库操作Service实现
|
||||
@@ -15,6 +21,14 @@ import org.springframework.stereotype.Service;
|
||||
public class ProcessDraftServiceImpl extends ServiceImpl<ProcessDraftMapper, ProcessDraft>
|
||||
implements ProcessDraftService {
|
||||
|
||||
@Override
|
||||
public List<ProcessCenterListVO> getDraftList(CenterQueryVO centerQueryVO) {
|
||||
String userId = UserUtils.getUserId();
|
||||
LambdaQueryWrapper<ProcessDraft> draftWrapper = new LambdaQueryWrapper<>();
|
||||
draftWrapper.eq(ProcessDraft::getCreateBy, userId);
|
||||
List<ProcessDraft> list = list(draftWrapper);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
+3
-3
@@ -12,7 +12,6 @@ import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -40,7 +39,7 @@ public class ProcessESInitChangeController {
|
||||
@AutoLog(value = "企标立项变更流程-生成企标编号并返回")
|
||||
@ApiOperation(value="企标立项变更流程-生成企标编号并返回", notes="企标立项变更流程-生成企标编号并返回")
|
||||
@PostMapping("/getStandardNo")
|
||||
public Result<?> getStandardNo(@Valid @RequestBody ProcessEsInitChange esInitChange) {
|
||||
public Result<?> getStandardNo(@RequestBody ProcessEsInitChange esInitChange) {
|
||||
// 生成企标编号并返回
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put(FieldCommon.ENTERPRISE_STANDARD_CODE, esInitChange.getEnStandardCode());
|
||||
@@ -62,8 +61,9 @@ public class ProcessESInitChangeController {
|
||||
@RequestBody List<ProcessEsInitChange> esInitChangeList) {
|
||||
if (StrUtil.isBlank(taskId)) {
|
||||
initChangeService.saveToDraft(esInitChangeList);
|
||||
} else {
|
||||
initChangeService.saveToWait(taskId, esInitChangeList);
|
||||
}
|
||||
initChangeService.saveToWait(taskId, esInitChangeList);
|
||||
return Result.OK();
|
||||
}
|
||||
|
||||
|
||||
+22
-5
@@ -7,13 +7,13 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
/**
|
||||
* 企标计划
|
||||
@@ -74,6 +74,8 @@ public class ProcessEsInitChange implements Serializable {
|
||||
/**
|
||||
* 截止日期
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date deadlineDate;
|
||||
|
||||
/**
|
||||
@@ -124,7 +126,6 @@ public class ProcessEsInitChange implements Serializable {
|
||||
/**
|
||||
* 企业标准代号
|
||||
*/
|
||||
@NotBlank
|
||||
private String enStandardCode;
|
||||
|
||||
/**
|
||||
@@ -135,13 +136,11 @@ public class ProcessEsInitChange implements Serializable {
|
||||
/**
|
||||
* 标准类别代号
|
||||
*/
|
||||
@NotBlank
|
||||
private String standardCategoryCode;
|
||||
|
||||
/**
|
||||
* 年代号
|
||||
*/
|
||||
@NotBlank
|
||||
private String decadeCode;
|
||||
|
||||
/**
|
||||
@@ -157,16 +156,22 @@ public class ProcessEsInitChange implements Serializable {
|
||||
/**
|
||||
* 草稿计划完成日期
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date draftPlannedCompleteDate;
|
||||
|
||||
/**
|
||||
* 征求意见稿计划完成日期
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date solicitationDraftPlanCompleteDate;
|
||||
|
||||
/**
|
||||
* 计划报批日期
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date planApprovalDate;
|
||||
|
||||
/**
|
||||
@@ -207,11 +212,15 @@ public class ProcessEsInitChange implements Serializable {
|
||||
/**
|
||||
* 草稿完成日期
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date draftCompletionDate;
|
||||
|
||||
/**
|
||||
* 提交草稿日期
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date draftSubmissionDate;
|
||||
|
||||
/**
|
||||
@@ -222,21 +231,29 @@ public class ProcessEsInitChange implements Serializable {
|
||||
/**
|
||||
* 征求意见稿完成日期
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date solicitationDraftCompletionDate;
|
||||
|
||||
/**
|
||||
* 评审日期
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date reviewDate;
|
||||
|
||||
/**
|
||||
* 报批日期
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date approvalDate;
|
||||
|
||||
/**
|
||||
* 发布日期
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date releaseDate;
|
||||
|
||||
/**
|
||||
|
||||
+1
-2
@@ -54,7 +54,6 @@ public class ProcessEsInitChangeServiceImpl extends ServiceImpl<ProcessEsInitCha
|
||||
private Map<String, Object> setVariables(ProcessEsInitChange initChange) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
// 设置流程中各个节点的人
|
||||
map.put("createUser", initChange.getCreateBy());
|
||||
map.put("contactUser", initChange.getContactUser());
|
||||
map.put("standardExpertList", Optional.ofNullable(initChange.getStandardExpert()).map(s -> Arrays.asList(s.split(","))).orElse(Collections.emptyList()));
|
||||
map.put("mainDraftUserLeader", initChange.getMainDraftUserLeader());
|
||||
@@ -94,7 +93,7 @@ public class ProcessEsInitChangeServiceImpl extends ServiceImpl<ProcessEsInitCha
|
||||
ProcessEsInitChange initChange = esInitChangeList.get(0);
|
||||
|
||||
// 对数据进行其他操作
|
||||
String beanName = "initChangeService";
|
||||
String beanName = "processEsInitChangeServiceImpl";
|
||||
|
||||
ProcessInstance processInstance = actFlowCommonService.startProcess(processDefinitionKey, beanName, initChange.getId());
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ public class SarFileSplitInfoEO implements Serializable {
|
||||
|
||||
/**文本状态*/
|
||||
@Excel(name = "文本状态", width = 15, dicCode = "file_type")
|
||||
// @Dict(dicCode = "file_type")
|
||||
@Dict(dicCode = "file_type")
|
||||
@ApiModelProperty(value = "文本状态")
|
||||
private String fileType;
|
||||
|
||||
@@ -95,7 +95,6 @@ public class SarFileSplitInfoEO implements Serializable {
|
||||
/**编辑人*/
|
||||
@Excel(name = "编辑人", width = 15)
|
||||
@ApiModelProperty(value = "编辑人")
|
||||
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "realname")
|
||||
private String author;
|
||||
|
||||
/**拆分结果*/
|
||||
|
||||
+7
-26
@@ -34,8 +34,10 @@ import com.jero.modules.split.service.ISarFileSplitInfoService;
|
||||
import com.jero.modules.split.service.ISarFileSplitMenuEOService;
|
||||
import com.jero.modules.split.vo.SplitFilePageInfoParam;
|
||||
import com.jero.modules.system.entity.SysDictItem;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.service.ISysDictItemService;
|
||||
import com.jero.modules.system.service.ISysDictService;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -81,6 +83,8 @@ public class SarFileSplitInfoServiceImpl extends ServiceImpl<SarFileSplitInfoMap
|
||||
private ILawsEnterpriseStandardService ILawsEnterpriseStandardService; //企业标准
|
||||
@Autowired
|
||||
private ISysDictService sysDictService;
|
||||
@Autowired
|
||||
private ISysUserService sysUserService;
|
||||
|
||||
|
||||
/**
|
||||
@@ -263,33 +267,10 @@ public class SarFileSplitInfoServiceImpl extends ServiceImpl<SarFileSplitInfoMap
|
||||
|
||||
// 处理数据中所有下拉字典值
|
||||
for (SarFileSplitInfoEO splitInfoEO : sarFileSplitInfoEOList){
|
||||
String fileType = null;
|
||||
OnlCgformField fileTypeField = onlCgformFieldService.queryById(splitInfoEO.getFileType());
|
||||
if (ObjectUtil.isNotEmpty(fileTypeField)) {
|
||||
if (LanguageEnum.CN.getValue().equals(cut)) {
|
||||
fileType = fileTypeField.getDbFieldTxt();
|
||||
} else {
|
||||
fileType = fileTypeField.getDbFieldEnName();
|
||||
}
|
||||
}
|
||||
|
||||
// if (LanguageEnum.CN.getValue().equals(cut)) {
|
||||
// Map<String, String> cnMap = dictItemListAll.stream()
|
||||
// .filter(e-> e.getItemValue().equals(splitInfoEO.getSplitResult()))
|
||||
// .collect(Collectors.toMap(SysDictItem::getItemValue, SysDictItem::getItemText)); // 优化
|
||||
// splitInfoEO.setSplitResult(cnMap.get(splitInfoEO.getSplitResult()));
|
||||
// } else {
|
||||
// Map<String, String> enMap = dictItemListAll.stream()
|
||||
// .filter(e-> e.getItemValue().equals(splitInfoEO.getSplitResult()))
|
||||
// .collect(Collectors.toMap(SysDictItem::getItemValue, SysDictItem::getEnName)); // 优化
|
||||
// splitInfoEO.setSplitResult(enMap.get(splitInfoEO.getSplitResult()));
|
||||
// }
|
||||
splitInfoEO.setFileType(fileType);
|
||||
SysUser sysUser = sysUserService.getById(splitInfoEO.getAuthor());
|
||||
splitInfoEO.setAuthor(sysUser.calcNameWorkNo());
|
||||
splitInfoEO.setFileType(sysDictService.queryDictTextByKey("process_manuscript", splitInfoEO.getFileType()));
|
||||
// 处理文档库id字段 根据编号和标题查询
|
||||
// List<Map<String, Object>> bussDocumentLibraryEOList = bussDocumentLibraryEOService.getListBySerialNumber(splitInfoEO.getSerialNumber());
|
||||
// if (CollectionUtil.isNotEmpty(bussDocumentLibraryEOList)) {
|
||||
// splitInfoEO.setDocumentId(bussDocumentLibraryEOList.get(0).get("id").toString());
|
||||
// }
|
||||
if(StringUtils.isNotEmpty(splitInfoEO.getFileId())) {
|
||||
splitInfoEO.setFlag("1");
|
||||
}else{
|
||||
|
||||
Reference in New Issue
Block a user