Merge branch 'dev' of http://git.xayunmei.com/SH-Arbitrate/Arbitrate-Backend into wq
This commit is contained in:
@@ -55,4 +55,8 @@ public interface IDeptIdentifyService {
|
||||
List<FatchRule> getFatchRuleByTemplateid(TemplateManage templateManage);
|
||||
|
||||
AjaxResult saveFatchRules(TemplateManage templateManage);
|
||||
|
||||
List<FatchRule> selectColumnandComment();
|
||||
|
||||
FatchRule selectColumnbycomment(FatchRule fatchRule);
|
||||
}
|
||||
|
||||
+7
@@ -1397,6 +1397,12 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
arbitrateRecord.setCaseAppliId(caseApplication.getId());
|
||||
ArbitrateRecord arbitrateRecordselect = arbitrateRecordMapper.selectArbitrateRecord(arbitrateRecord);
|
||||
|
||||
ColumnValue columnValue = new ColumnValue();
|
||||
columnValue.setIsDefault(1);
|
||||
columnValue.setCaseId(caseApplication.getId());
|
||||
List<ColumnValue> columnValueList = columnValueMapper.queryColumnValueList(columnValue);
|
||||
caseApplicationselect.setColumnValues(columnValueList);
|
||||
|
||||
// CaseAttach caseAttachSelect = new CaseAttach();
|
||||
// caseAttachSelect.setCaseAppliId(caseApplication.getId());
|
||||
// caseAttachSelect.setAnnexType(2);
|
||||
@@ -1451,6 +1457,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
caseApplicationselect.setRespondentName(respondentName.toString());
|
||||
caseApplicationselect.setCaseAffiliates(caseAffiliatListeselect);
|
||||
caseApplicationselect.setArbitrateRecord(arbitrateRecordselect);
|
||||
|
||||
}
|
||||
return caseApplicationselect;
|
||||
}
|
||||
|
||||
+39
-1
@@ -12,6 +12,7 @@ import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
|
||||
import com.ruoyi.common.core.domain.entity.SysDept;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.exception.EsignDemoException;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.utils.SealUtil;
|
||||
import com.ruoyi.common.utils.file.FileUploadUtils;
|
||||
import com.ruoyi.system.domain.SysUserPost;
|
||||
@@ -36,6 +37,7 @@ import java.io.IOException;
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import static com.ruoyi.common.utils.PageUtils.startPage;
|
||||
import static com.ruoyi.common.utils.SecurityUtils.getUsername;
|
||||
@@ -558,10 +560,30 @@ public class DeptIdentifyServiceImpl implements IDeptIdentifyService {
|
||||
templateFatchRuleMapper.deleteTemplateFatchRule(templateManage.getId());
|
||||
|
||||
List<FatchRule> fatchRules = templateManage.getFatchRules();
|
||||
|
||||
Map<Object, Long> columnmap = fatchRules.stream().collect(Collectors.groupingBy(fatchRule -> fatchRule.getColumn(), Collectors.counting()));
|
||||
Stream<Object> columnStream = columnmap.entrySet().stream().filter(entry -> entry.getValue() > 1).map(entry -> entry.getKey());
|
||||
List<String> strlist1 = new ArrayList<>();
|
||||
columnStream.forEach(column -> {
|
||||
strlist1.add(column.toString());
|
||||
});
|
||||
if(strlist1!=null&&strlist1.size()>0){
|
||||
throw new ServiceException("字段' " + String.join(",", strlist1) + " '重复");
|
||||
}
|
||||
|
||||
Map<Object, Long> columnNamemap = fatchRules.stream().collect(Collectors.groupingBy(fatchRule -> fatchRule.getColumnName(), Collectors.counting()));
|
||||
Stream<Object> columnNameStream = columnNamemap.entrySet().stream().filter(entry -> entry.getValue() > 1).map(entry -> entry.getKey());
|
||||
List<String> strlist2 = new ArrayList<>();
|
||||
columnNameStream.forEach(column -> {
|
||||
strlist2.add(column.toString());
|
||||
});
|
||||
if(strlist2!=null&&strlist2.size()>0){
|
||||
throw new ServiceException("字段' " + String.join(",", strlist2) + " '重复");
|
||||
}
|
||||
|
||||
if(fatchRules!=null&&fatchRules.size()>0){
|
||||
for (FatchRule fatchRule : fatchRules) {
|
||||
//保存抓取规则数据
|
||||
fatchRule.setIsDefault(0);
|
||||
fatchRuleMapper.insertFatchRule(fatchRule);
|
||||
//保存模板抓取规则关联关系
|
||||
Long fatchRuleId = fatchRule.getId();
|
||||
@@ -575,6 +597,22 @@ public class DeptIdentifyServiceImpl implements IDeptIdentifyService {
|
||||
return AjaxResult.error();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FatchRule> selectColumnandComment() {
|
||||
List<FatchRule> fatchRules = new ArrayList<>();
|
||||
FatchRule fatchRuleselect = new FatchRule();
|
||||
fatchRuleselect.setDatabaseName("test_smart_arbitration");
|
||||
fatchRules = fatchRuleMapper.selectColumnandComment(fatchRuleselect);
|
||||
return fatchRules;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FatchRule selectColumnbycomment(FatchRule fatchRule) {
|
||||
fatchRule.setDatabaseName("test_smart_arbitration");
|
||||
FatchRule fatchRulesel = fatchRuleMapper.selectColumnbycomment(fatchRule);
|
||||
return fatchRulesel;
|
||||
}
|
||||
|
||||
private String getFileExtension(String fileName) {
|
||||
int lastDotIndex = fileName.lastIndexOf(".");
|
||||
if (lastDotIndex > 0 && lastDotIndex < fileName.length() - 1) {
|
||||
|
||||
Reference in New Issue
Block a user