|
@@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
|
+import com.fasterxml.jackson.annotation.JsonProperty;
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
import com.google.gson.Gson;
|
|
import com.google.gson.Gson;
|
|
import com.spire.xls.*;
|
|
import com.spire.xls.*;
|
|
@@ -2685,6 +2686,9 @@ public class ExcelTabController extends BladeController {
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isNotEmpty(dataIds)) {
|
|
if (StringUtils.isNotEmpty(dataIds)) {
|
|
|
|
+ if(dataIds.startsWith(",")){
|
|
|
|
+ dataIds=dataIds.substring(1);
|
|
|
|
+ }
|
|
for (String dataId : dataIds.split(",")) {
|
|
for (String dataId : dataIds.split(",")) {
|
|
Map<String, Object> reData = new HashMap<>();
|
|
Map<String, Object> reData = new HashMap<>();
|
|
reData.put("",logId2);
|
|
reData.put("",logId2);
|
|
@@ -4300,8 +4304,9 @@ public class ExcelTabController extends BladeController {
|
|
@ApiImplicitParam(name = "id", value = "记录id-当做groupId", required = true),
|
|
@ApiImplicitParam(name = "id", value = "记录id-当做groupId", required = true),
|
|
@ApiImplicitParam(name = "contractId", value = "合同段id", required = true)
|
|
@ApiImplicitParam(name = "contractId", value = "合同段id", required = true)
|
|
})
|
|
})
|
|
- public R<List<Map<String, Object>>> getBussDataInfoTrialentrust(Long id, Long pkeyId, Long contractId, Long sampleId) {
|
|
|
|
- List<Map<String, Object>> bussDataInfoTrial = excelTabService.getBussDataInfoTrialentrust(id, pkeyId, contractId,sampleId);
|
|
|
|
|
|
+ public R<List<Map<String, Object>>> getBussDataInfoTrialentrust(Long id, Long pkeyId, Long contractId, Long sampleId, String formData) {
|
|
|
|
+ JSONObject jsonObject = JSONObject.parseObject(formData);
|
|
|
|
+ List<Map<String, Object>> bussDataInfoTrial = excelTabService.getBussDataInfoTrialentrust(id, pkeyId, contractId,sampleId,jsonObject);
|
|
return R.data(bussDataInfoTrial);
|
|
return R.data(bussDataInfoTrial);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -4462,4 +4467,31 @@ public class ExcelTabController extends BladeController {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ //@Scheduled(fixedDelay = 1000*60*60*24)
|
|
|
|
+ //检查excel路径有错的
|
|
|
|
+ public void cheackExcel() throws IOException {
|
|
|
|
+ String sql="Select * from m_excel_tab where parent_id=0 and is_deleted=0";
|
|
|
|
+ List<ExcelTab> query = jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(ExcelTab.class));
|
|
|
|
+ for (ExcelTab excelTab : query) {
|
|
|
|
+ String sql1="Select * from m_excel_tab where parent_id="+excelTab.getId()+" and is_deleted=0";
|
|
|
|
+ List<ExcelTab> query1 = jdbcTemplate.query(sql1, new BeanPropertyRowMapper<>(ExcelTab.class));
|
|
|
|
+ for (ExcelTab tab : query1) {
|
|
|
|
+ String sql2="Select * from m_excel_tab where parent_id="+tab.getId()+" and is_deleted=0";
|
|
|
|
+ List<ExcelTab> query2 = jdbcTemplate.query(sql2, new BeanPropertyRowMapper<>(ExcelTab.class));
|
|
|
|
+ List<String>names=new ArrayList<>();
|
|
|
|
+ for (ExcelTab excelTab1 : query2) {
|
|
|
|
+ if(excelTab1.getFileUrl()!=null){
|
|
|
|
+ if(excelTab1.getFileUrl().endsWith(".xlsx")||excelTab1.getFileUrl().endsWith(".xls")){
|
|
|
|
+ long resourceLength = CommonUtil.getResourceLength(excelTab1.getFileUrl());
|
|
|
|
+ if(resourceLength<=500){
|
|
|
|
+ names.add(excelTab1.getName());
|
|
|
|
+ System.out.println(excelTab.getName()+"--"+tab.getName()+"--"+excelTab1.getName());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ System.out.println("检查完毕");
|
|
|
|
+ }
|
|
}
|
|
}
|