Merge branch 'test' of https://git.will-way.cn/zgty/zt-qms into test

This commit is contained in:
2025-11-05 17:39:20 +08:00
3 changed files with 36 additions and 6 deletions

View File

@@ -107,6 +107,8 @@ public class ReportDocumentDataServiceImpl implements ReportDocumentDataService
* @param customConfig 报告配置项
* */
private List<JSONObject> assembleStep1(List<ConfigReportFieldDO> fieldList, List<ReportDocumentDataDO> dataList, String customConfig){
if(dataList.isEmpty())
return new ArrayList<>();
JSONObject jsonObject = JSONObject.parseObject(customConfig);
Integer dynamicColCount = 3;
Integer fixedColCount = 3;
@@ -117,8 +119,8 @@ public class ReportDocumentDataServiceImpl implements ReportDocumentDataService
String nameCodeType = jsonObject.getString("nameCodeType"); //名称、编号处理方式merge-合并, name-只显示名称, code-只显示编号, split-2列分开显示
String hasRemark = jsonObject.getString("hasRemark"); //是否有备注
String hasRange = jsonObject.getString("hasRange"); //是否有检出限
String align = jsonObject.getString("align"); //vertical-纵表, 否则为横表
if("vertical".equals(align)){
String verticalFlag = jsonObject.getString("verticalFlag"); //vertical-纵表, 否则为横表
if("1".equals(verticalFlag)){
return assembleVerticalData(fieldList, dataList, customConfig);
}
@@ -263,8 +265,10 @@ public class ReportDocumentDataServiceImpl implements ReportDocumentDataService
String colKey = colPrefix + "01";
t = new JSONObject();
t.put(colKey, "以下为空白");
int rowIndex = (dataLength + emptyRowCount) * (rowAssist) + 1;
rowList.set(rowIndex + 1, t.clone());
int rowIndex = (dataLength + emptyRowCount) * (rowAssist) + 2;
if(rowAssist == 1)
rowIndex = dataLength + emptyRowCount;
rowList.set(rowIndex, t.clone());
}
//前面的计数是从1开始移除第一个元素
if(!rowList.isEmpty())

View File

@@ -9,7 +9,10 @@ import com.zt.plat.framework.common.util.object.BeanUtils;
import com.zt.plat.framework.security.core.LoginUser;
import com.zt.plat.framework.security.core.util.SecurityFrameworkUtils;
import com.zt.plat.module.bpm.api.task.BpmProcessInstanceApi;
import com.zt.plat.module.bpm.api.task.BpmTaskApi;
import com.zt.plat.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO;
import com.zt.plat.module.bpm.api.task.dto.BpmTaskApproveReqDTO;
import com.zt.plat.module.bpm.api.task.dto.BpmTaskRespDTO;
import com.zt.plat.module.qms.api.task.BMPCallbackInterface;
import com.zt.plat.module.qms.api.task.dto.QmsBpmDTO;
import com.zt.plat.module.qms.business.bus.controller.vo.BusinessAssayReportDataPageReqVO;
@@ -57,6 +60,7 @@ public class ReportDocumentMainServiceImpl implements ReportDocumentMainService,
@Resource private BusinessAssayReportDataService businessAssayReportDataService;
@Resource private ReportDocumentDataService reportDocumentDataService;
@Resource private BpmProcessInstanceApi bpmProcessInstanceApi;
@Resource private BpmTaskApi bpmTaskApi;
@Resource private ReportDocumentMainCorrelationService reportDocumentMainCorrelationService;
@Resource private ConfigUserSignatureService configUserSignatureService;
/***
@@ -270,6 +274,27 @@ public class ReportDocumentMainServiceImpl implements ReportDocumentMainService,
String nickName = SecurityFrameworkUtils.getLoginUserNickname();
Long id = param.getId();
ReportDocumentMainDO entity = getReportDocumentMain(id);
String flowInsId = entity.getFlowInstanceId();
if(!ObjectUtils.isEmpty(flowInsId)){
CommonResult<List<BpmTaskRespDTO>> taskRet = bpmTaskApi.getTaskListByProcessInstanceId(flowInsId);
List<BpmTaskRespDTO> taskList = taskRet.getData();
if(taskList.isEmpty())
throw exception0(ERROR_CODE_MODULE_COMMON, "流程任务查询失败,请联系管理员处理");
String taskId = taskList.get(taskList.size() - 1).getId();
//驳回后重新提交
BpmTaskApproveReqDTO reqVO = new BpmTaskApproveReqDTO();
reqVO.setId(taskId);
CommonResult<Boolean> result = bpmProcessInstanceApi.approveTask(reqVO);
if(!result.isSuccess()){
throw exception0(ERROR_CODE_MODULE_COMMON, result.getMsg());
}
entity.setFlowStatus(QmsCommonConstant.IN_PROGRESS);
reportDocumentMainMapper.updateById(entity);
ReportDocumentMainRespVO respVO = BeanUtils.toBean(entity, ReportDocumentMainRespVO.class);
return CommonResult.success(respVO);
}
JSONObject formData = new JSONObject();
if(entity.getFormData() != null)
formData = JSONObject.parseObject(entity.getFormData());
@@ -336,7 +361,7 @@ public class ReportDocumentMainServiceImpl implements ReportDocumentMainService,
//"RETURN_FLAG_Activity_001": true 标识驳回到发起环节
if(variables.containsKey(returnFlagKey) && variables.getString(returnFlagKey).equals("true")){
//驳回。流程需要配置退回到发起节点
entity.setFlowStatus(QmsCommonConstant.VOID);
entity.setFlowStatus(QmsCommonConstant.REJECTED);
entity.setDocumentSignature("");
}else if("4".equals(PROCESS_STATUS)){
//作废

View File

@@ -1,6 +1,7 @@
package com.zt.plat.module.qms.framework.rpc.config;
import com.zt.plat.module.bpm.api.task.BpmProcessInstanceApi;
import com.zt.plat.module.bpm.api.task.BpmTaskApi;
import com.zt.plat.module.infra.api.file.FileApi;
import com.zt.plat.module.system.api.dept.DeptApi;
import com.zt.plat.module.system.api.sequence.SequenceApi;
@@ -10,6 +11,6 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Configuration;
@Configuration(value = "qmsRpcConfiguration", proxyBeanMethods = false)
@EnableFeignClients(clients = {FileApi.class, SequenceApi.class, AdminUserApi.class, DeptApi.class, BpmProcessInstanceApi.class})
@EnableFeignClients(clients = {FileApi.class, SequenceApi.class, AdminUserApi.class, DeptApi.class, BpmProcessInstanceApi.class, BpmTaskApi.class})
public class RpcConfiguration {
}