|
@@ -1202,6 +1202,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
|
|
|
@Override
|
|
|
public R<Object> saveOrUpdateInfo(List<TableInfo> tableInfoList) {
|
|
|
+ String fileName1="";
|
|
|
if (ListUtils.isNotEmpty(tableInfoList)) {
|
|
|
//施工资料填报
|
|
|
String pkids = "";
|
|
@@ -1278,10 +1279,10 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
WbsTreeContract wbsTreeContractByP = wbsTreeContractService.getBaseMapper().selectOne(Wrappers.<WbsTreeContract>query().lambda()
|
|
|
.eq(WbsTreeContract::getId, wbsTreeContract.getParentId()).eq(WbsTreeContract::getContractId, wbsTreeContract.getContractId()));
|
|
|
//处理文件提名
|
|
|
- String fileName = this.wbsParamService.createFileTitle(wbsTreeContractByP);
|
|
|
+ fileName1= this.wbsParamService.createFileTitle(wbsTreeContractByP);
|
|
|
|
|
|
//huangjn 保存成功后调用生成资料查询列表数据
|
|
|
- this.informationQueryClient.saveOrUpdateInformationQueryData(wbsTreeContractByP.getPKeyId() + "", "首件使用字段", "业务ID(主要将来给首件使用)", fileName, Integer.parseInt(tableInfoList.get(0).getClassify()), 2, "false", "源文件(首件字段)", "pdf文件(首件字段)", "首件上传总结报告名称", new ArrayList<>());
|
|
|
+ this.informationQueryClient.saveOrUpdateInformationQueryData(wbsTreeContractByP.getPKeyId() + "", "首件使用字段", "业务ID(主要将来给首件使用)", fileName1, Integer.parseInt(tableInfoList.get(0).getClassify()), 2, "false", "源文件(首件字段)", "pdf文件(首件字段)", "首件上传总结报告名称", new ArrayList<>());
|
|
|
|
|
|
JSONObject json = new JSONObject();
|
|
|
json.put("operationObjIds", Func.toStrList(pkids));
|
|
@@ -1302,7 +1303,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
return R.fail(reason(log.toString()));
|
|
|
}
|
|
|
}
|
|
|
- return R.success("操作成功");
|
|
|
+ return R.success(fileName1);
|
|
|
}
|
|
|
|
|
|
public String reason(String log) {
|
|
@@ -1406,7 +1407,6 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
// 匹配关联
|
|
|
try {
|
|
|
InputStream inputStreamByUrl = FileUtils.getInputStreamByUrl(wbsTreeContract.getHtmlUrl());
|
|
|
-
|
|
|
String htmlString = IoUtil.readToString(inputStreamByUrl);
|
|
|
Document doc = Jsoup.parse(htmlString);
|
|
|
document = doc;
|
|
@@ -2082,6 +2082,9 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
Elements trs = table.select("tr");
|
|
|
if (ObjectUtil.isNotEmpty(DataInfo)) {
|
|
|
for (String val : DataInfo.keySet()) {
|
|
|
+ if(val.equals("key_23__12_1")){
|
|
|
+ System.out.println("");
|
|
|
+ }
|
|
|
Elements datas = doc.getElementsByAttributeValue("keyname", val);
|
|
|
Element data = null;
|
|
|
if (datas.size() >= 1) {
|
|
@@ -4474,7 +4477,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
* 试验 委托单获取填报信息 groupId和sampleId1必须传其中一个
|
|
|
*/
|
|
|
@Override
|
|
|
- public List<Map<String, Object>> getBussDataInfoTrialentrust(Long groupId, Long pkeyId, Long contractId,Long sampleId1,JSONObject jsonObject) {
|
|
|
+ public List<Map<String, Object>> getBussDataInfoTrialentrust(Long groupId, Long pkeyId, Long contractId,Long sampleId1,JSONObject jsonObject,Boolean isremove) {
|
|
|
String file_path = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
|
|
|
String sys_file_net_url = ParamCache.getValue(CommonConstant.SYS_FILE_NET_URL);
|
|
|
List<Map<String, Object>> list = new ArrayList<>();
|
|
@@ -4525,8 +4528,13 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
reData.put("loadDataId", loadDataId);
|
|
|
reData.put("sampleId", sampleId);
|
|
|
}
|
|
|
- String querySql1 = "select * from u_trial_sample_info where id=" + sampleId ;
|
|
|
- TrialSampleInfo sampleInfo = jdbcTemplate.queryForObject(querySql1, new BeanPropertyRowMapper<>(TrialSampleInfo.class));
|
|
|
+ TrialSampleInfo sampleInfo=null;
|
|
|
+ try {
|
|
|
+ String querySql1 = "select * from u_trial_sample_info where id=" + sampleId ;
|
|
|
+ sampleInfo= jdbcTemplate.queryForObject(querySql1, new BeanPropertyRowMapper<>(TrialSampleInfo.class));
|
|
|
+ } catch (Exception e) {
|
|
|
+ sampleInfo=null;
|
|
|
+ }
|
|
|
//用sampleId查询出关联的材料对象
|
|
|
String querySql2 = "select * from u_trial_material_mobilization where id =(select mobilization_id from u_trial_sampling_record where sample_info_id = "+sampleId+") ";
|
|
|
TrialMaterialMobilization trialMaterialMobilization = null;
|
|
@@ -4642,14 +4650,15 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- // 移除Id 和 p_key_id
|
|
|
- reData.remove("id");
|
|
|
- reData.remove("p_key_id");
|
|
|
- reData.remove("classify");
|
|
|
- reData.remove("contractId");
|
|
|
- reData.remove("pkeyId");
|
|
|
- reData.remove("projectId");
|
|
|
+ if(isremove){
|
|
|
+ // 移除Id 和 p_key_id
|
|
|
+ reData.remove("id");
|
|
|
+ reData.remove("p_key_id");
|
|
|
+ reData.remove("classify");
|
|
|
+ reData.remove("contractId");
|
|
|
+ reData.remove("pkeyId");
|
|
|
+ reData.remove("projectId");
|
|
|
+ }
|
|
|
chart(reData, wbsTreePrivate);
|
|
|
if(ObjectUtil.isNotEmpty(jsonObject)){
|
|
|
for (Map.Entry<String, Object> entry : jsonObject.entrySet()) {
|
|
@@ -4684,11 +4693,16 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
setFirstData(doc,"规格 型号",sampleInfo.getSpecificationModel(),reData);
|
|
|
setFirstData(doc,"规格型号",sampleInfo.getSpecificationModel(),reData);
|
|
|
setFirstData(doc,"材料规格",sampleInfo.getSpecificationModel(),reData);
|
|
|
+ setFirstData(doc,"规格(mm)",sampleInfo.getSpecificationModel(),reData);
|
|
|
setFirstData(doc,"试样 数量",sampleInfo.getMaterialCount(),reData);
|
|
|
setFirstData(doc,"试样数量",sampleInfo.getMaterialCount(),reData);
|
|
|
setFirstData(doc,"代表数量",sampleInfo.getMaterialCount(),reData);
|
|
|
setFirstData(doc,"拟用结构部 位",sampleInfo.getProposedPosition(),reData);
|
|
|
setFirstData(doc,"拟用结构部位",sampleInfo.getProposedPosition(),reData);
|
|
|
+ setFirstData(doc,"工程部位、构件编号",sampleInfo.getProposedPosition(),reData);
|
|
|
+ setFirstData(doc,"工程部位、高程桩号",sampleInfo.getProposedPosition(),reData);
|
|
|
+ setFirstData(doc,"设计强度 等级",sampleInfo.getDesignStrength(),reData);
|
|
|
+ setFirstData(doc,"设计强度等级",sampleInfo.getDesignStrength(),reData);
|
|
|
setFirstData(doc,"用途(使用在何工程部位)",sampleInfo.getProposedPosition(),reData);
|
|
|
setFirstData(doc,"进场日期代表数量",format+"/"+representativeCount+calculationUnit,reData);
|
|
|
setFirstData(doc,"材料进场日期",format,reData);
|
|
@@ -4754,7 +4768,6 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
}else {
|
|
|
//另一种方式找到后 获取id的值并赋值到map
|
|
|
Element textareaElement = select2.first();
|
|
|
-
|
|
|
if(textareaElement != null){//正常情况
|
|
|
String id = textareaElement.attr("id");
|
|
|
reData.put(id, value);
|