|
@@ -34,6 +34,7 @@ import org.springblade.business.entity.*;
|
|
import org.springblade.business.feign.ContractLogClient;
|
|
import org.springblade.business.feign.ContractLogClient;
|
|
import org.springblade.business.feign.InformationQueryClient;
|
|
import org.springblade.business.feign.InformationQueryClient;
|
|
import org.springblade.business.feign.OperationLogClient;
|
|
import org.springblade.business.feign.OperationLogClient;
|
|
|
|
+import org.springblade.business.feign.TrialSelfInspectionRecordClient;
|
|
import org.springblade.business.vo.SaveContractLogVO;
|
|
import org.springblade.business.vo.SaveContractLogVO;
|
|
import org.springblade.common.constant.CommonConstant;
|
|
import org.springblade.common.constant.CommonConstant;
|
|
import org.springblade.common.utils.CommonUtil;
|
|
import org.springblade.common.utils.CommonUtil;
|
|
@@ -115,6 +116,8 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
private final IProjectInfoService projectInfoService;
|
|
private final IProjectInfoService projectInfoService;
|
|
private final OperationLogClient operationLogClient;
|
|
private final OperationLogClient operationLogClient;
|
|
private final TableInfoServiceImpl tableInfoService;
|
|
private final TableInfoServiceImpl tableInfoService;
|
|
|
|
+ private final TrialSelfInspectionRecordClient trialSelfInspectionRecordClient;
|
|
|
|
+
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
StringRedisTemplate RedisTemplate;
|
|
StringRedisTemplate RedisTemplate;
|
|
@@ -2418,13 +2421,13 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
* 试验 获取填报信息
|
|
* 试验 获取填报信息
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
- public List<Map<String, Object>> getBussDataInfoTrial(Long groupId, Long pkeyId, Long contractId, Long entrustId) {
|
|
|
|
|
|
+ public List<Map<String, Object>> getBussDataInfoTrial(Long groupId, Long pkeyId, Long contractId, Long entrustId, Integer type,Long nodeId) {
|
|
String file_path = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
|
|
String file_path = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
|
|
String sys_file_net_url = ParamCache.getValue(CommonConstant.SYS_FILE_NET_URL);
|
|
String sys_file_net_url = ParamCache.getValue(CommonConstant.SYS_FILE_NET_URL);
|
|
List<Map<String, Object>> list = new ArrayList<>();
|
|
List<Map<String, Object>> list = new ArrayList<>();
|
|
Map<String, Object> reData = new HashMap<>();
|
|
Map<String, Object> reData = new HashMap<>();
|
|
WbsTreePrivate wbsTreePrivate = wbsTreePrivateService.getBaseMapper().selectOne(Wrappers.<WbsTreePrivate>query().lambda()
|
|
WbsTreePrivate wbsTreePrivate = wbsTreePrivateService.getBaseMapper().selectOne(Wrappers.<WbsTreePrivate>query().lambda()
|
|
- .select(WbsTreePrivate::getInitTableName, WbsTreePrivate::getHtmlUrl, WbsTreePrivate::getPKeyId, WbsTreePrivate::getProjectId)
|
|
|
|
|
|
+ .select(WbsTreePrivate::getInitTableName, WbsTreePrivate::getHtmlUrl, WbsTreePrivate::getPKeyId, WbsTreePrivate::getProjectId, WbsTreePrivate::getParentId, WbsTreePrivate::getTableType)
|
|
.eq(WbsTreePrivate::getPKeyId, pkeyId));
|
|
.eq(WbsTreePrivate::getPKeyId, pkeyId));
|
|
if (wbsTreePrivate == null) {
|
|
if (wbsTreePrivate == null) {
|
|
return list;
|
|
return list;
|
|
@@ -2494,6 +2497,26 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
//通过html获取页面上的key值 返回key值对应的数据
|
|
//通过html获取页面上的key值 返回key值对应的数据
|
|
setBasicFormData(doc, reData, sampleInfo, trialMaterialMobilization,entrustInfo);
|
|
setBasicFormData(doc, reData, sampleInfo, trialMaterialMobilization,entrustInfo);
|
|
}
|
|
}
|
|
|
|
+ //第一次新增 回显系统生成的编号
|
|
|
|
+ if(type != null && nodeId != null){
|
|
|
|
+ TrialSelfInspectionRecordDTO trialSelfInspectionRecordDTO = new TrialSelfInspectionRecordDTO();
|
|
|
|
+ trialSelfInspectionRecordDTO.setTableType(wbsTreePrivate.getTableType().toString());
|
|
|
|
+ trialSelfInspectionRecordDTO.setProjectId(wbsTreePrivate.getProjectId());
|
|
|
|
+ trialSelfInspectionRecordDTO.setContractId(contractId);
|
|
|
|
+ trialSelfInspectionRecordDTO.setNodeId(nodeId);
|
|
|
|
+ trialSelfInspectionRecordDTO.setType(type);
|
|
|
|
+ HashMap<String, String> stringStringHashMap = trialSelfInspectionRecordClient.previewGeneratedReportOrRecordNum(trialSelfInspectionRecordDTO);
|
|
|
|
+ String mapType = stringStringHashMap.get("type");
|
|
|
|
+ if("报告单".equals(mapType)){
|
|
|
|
+ //获取页面上的key值
|
|
|
|
+ String bgbhKey = doc.select("el-input[placeholderxx~=报告编号.*]").attr("keyname");
|
|
|
|
+ reData.put(bgbhKey, stringStringHashMap.get("valueStr"));
|
|
|
|
+ }else {
|
|
|
|
+ //获取页面上的key值
|
|
|
|
+ String bgbhKey = doc.select("el-input[placeholderxx~=记录编号.*]").attr("keyname");
|
|
|
|
+ reData.put(bgbhKey, stringStringHashMap.get("valueStr"));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
//匹配
|
|
//匹配
|
|
@@ -2740,7 +2763,6 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
if (wbsTreePrivate.getHtmlUrl() == null) {
|
|
if (wbsTreePrivate.getHtmlUrl() == null) {
|
|
return list;
|
|
return list;
|
|
}
|
|
}
|
|
-
|
|
|
|
//表单是否存储在
|
|
//表单是否存储在
|
|
String tabName = wbsTreePrivate.getInitTableName();
|
|
String tabName = wbsTreePrivate.getInitTableName();
|
|
String isExitSql = "select * from information_schema.TABLES where TABLE_NAME='" + tabName + "'";
|
|
String isExitSql = "select * from information_schema.TABLES where TABLE_NAME='" + tabName + "'";
|
|
@@ -2899,7 +2921,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
}
|
|
}
|
|
|
|
|
|
//获取数据信息info
|
|
//获取数据信息info
|
|
- List<Map<String, Object>> bussDataInfoTrial = this.getBussDataInfoTrial(id, pkeyId, Long.parseLong(contractId),null);
|
|
|
|
|
|
+ List<Map<String, Object>> bussDataInfoTrial = this.getBussDataInfoTrial(id, pkeyId, Long.parseLong(contractId),null,null,null);
|
|
Map<String, Object> DataInfo = new HashMap<>();
|
|
Map<String, Object> DataInfo = new HashMap<>();
|
|
if (bussDataInfoTrial.size() > 0) {
|
|
if (bussDataInfoTrial.size() > 0) {
|
|
DataInfo.putAll(bussDataInfoTrial.stream().findAny().orElse(null));
|
|
DataInfo.putAll(bussDataInfoTrial.stream().findAny().orElse(null));
|
|
@@ -3908,8 +3930,16 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
newStyle.setFont(redFont);
|
|
newStyle.setFont(redFont);
|
|
newStyle.setShrinkToFit(true);
|
|
newStyle.setShrinkToFit(true);
|
|
cell.setCellStyle(newStyle);
|
|
cell.setCellStyle(newStyle);
|
|
- cell.setCellValue(dqid);
|
|
|
|
- sign.add(dqid);
|
|
|
|
|
|
+ if(dqid.contains("||")){
|
|
|
|
+ String[] split = dqid.split("\\|\\|");
|
|
|
|
+ for (String singleDqid : split) {
|
|
|
|
+ cell.setCellValue(singleDqid);
|
|
|
|
+ sign.add(singleDqid);
|
|
|
|
+ }
|
|
|
|
+ }else {
|
|
|
|
+ cell.setCellValue(dqid);
|
|
|
|
+ sign.add(dqid);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -3976,7 +4006,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
}
|
|
}
|
|
|
|
|
|
//获取数据信息info
|
|
//获取数据信息info
|
|
- List<Map<String, Object>> bussDataInfoTrial = this.getBussDataInfoTrial(groupId, pkeyId, Long.parseLong(contractId),null);
|
|
|
|
|
|
+ List<Map<String, Object>> bussDataInfoTrial = this.getBussDataInfoTrial(groupId, pkeyId, Long.parseLong(contractId),null,null,null);
|
|
Map<String, Object> DataInfo = new HashMap<>();
|
|
Map<String, Object> DataInfo = new HashMap<>();
|
|
if (bussDataInfoTrial.size() > 0) {
|
|
if (bussDataInfoTrial.size() > 0) {
|
|
DataInfo.putAll(bussDataInfoTrial.stream().findAny().orElse(null));
|
|
DataInfo.putAll(bussDataInfoTrial.stream().findAny().orElse(null));
|