Merge remote-tracking branch 'origin/develop_master' into develop_3
This commit is contained in:
+13
@@ -161,4 +161,17 @@ public class SarStandAttrDetailsController extends BaseController<SarStandAttrDe
|
||||
public ResponseMessage<List<SelectionResult>> selectFileFieldForSel1(){
|
||||
return Result.success(sarStandAttrDetailsEOService.selectFileFieldForSel1(null));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "|SarStandAttrDetailsEO|查询标准中所有文件类型")
|
||||
@GetMapping("/getListData")
|
||||
// @RequiresPermissions("lawss:sarStandAttrDetails:get")
|
||||
public ResponseMessage<List<SarStandAttrDetails>> getListData(){
|
||||
QueryWrapper<SarStandAttrDetails> queryWrapper=new QueryWrapper<>();
|
||||
queryWrapper.eq("ATTR_TYPE","file");
|
||||
List<SarStandAttrDetails> sarStandAttrDetails=sarStandAttrDetailsEOService.list(queryWrapper);
|
||||
return Result.success(sarStandAttrDetails);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.adc.da.slrs.sarStandAttrDetails.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class listDTO {
|
||||
|
||||
private String key;
|
||||
|
||||
private String value;
|
||||
|
||||
}
|
||||
+12
@@ -1,6 +1,8 @@
|
||||
package com.adc.da.slrs.sarStandardComplianceAssessResult.controller;
|
||||
|
||||
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.sarStandItems.entity.SarStandItems;
|
||||
import com.adc.da.slrs.sarStandardComplianceAssessResult.service.impl.SarInterpretationNationalStandardServiceImpl;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -37,4 +39,14 @@ public class SarInterpretationNationalStandardController extends BaseController<
|
||||
return sarInterpretationNationalStandardService.saveBath(findStandDto);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "修改技术评估结果")
|
||||
@PostMapping("/updateById")
|
||||
public ResponseMessage<String> updateById(@RequestBody SarInterpretationNationalStandard findStandDto){
|
||||
if (sarInterpretationNationalStandardService.updateData(findStandDto)) {
|
||||
return Result.success("success");
|
||||
}else {
|
||||
return Result.error("error");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+3
@@ -2,6 +2,7 @@ package com.adc.da.slrs.sarStandardComplianceAssessResult.dao;
|
||||
|
||||
import com.adc.da.slrs.sarStandardComplianceAssessResult.entity.SarInterpretationNationalStandard;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -13,4 +14,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
*/
|
||||
public interface SarInterpretationNationalStandardDao extends BaseMapper<SarInterpretationNationalStandard> {
|
||||
|
||||
boolean updateData(@Param("find") SarInterpretationNationalStandard findStandDto);
|
||||
|
||||
}
|
||||
|
||||
+2
@@ -16,4 +16,6 @@ import java.util.List;
|
||||
public interface ISarInterpretationNationalStandardService extends IService<SarInterpretationNationalStandard> {
|
||||
|
||||
String saveBath(List<SarInterpretationNationalStandard> sarInterpretationNationalStandards);
|
||||
|
||||
boolean updateData(SarInterpretationNationalStandard findStandDto);
|
||||
}
|
||||
|
||||
+7
-2
@@ -24,8 +24,8 @@ import java.util.List;
|
||||
@Service
|
||||
public class SarInterpretationNationalStandardServiceImpl extends ServiceImpl<SarInterpretationNationalStandardDao, SarInterpretationNationalStandard> implements ISarInterpretationNationalStandardService {
|
||||
|
||||
// @Autowired
|
||||
// SarStandardComplianceProductAssessDao sarStandardComplianceProductAssessDao;
|
||||
@Autowired
|
||||
SarInterpretationNationalStandardDao sarInterpretationNationalStandardDao;
|
||||
|
||||
@Override
|
||||
public String saveBath(List<SarInterpretationNationalStandard> sarInterpretationNationalStandards) {
|
||||
@@ -50,4 +50,9 @@ public class SarInterpretationNationalStandardServiceImpl extends ServiceImpl<Sa
|
||||
String res = flag ? "1":"0";
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateData(SarInterpretationNationalStandard findStandDto) {
|
||||
return sarInterpretationNationalStandardDao.updateData(findStandDto);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -190,7 +190,7 @@ public class SarFileSplitItemsEOController extends BaseController<SarFileSplitIt
|
||||
nowFile.mkdirs();
|
||||
String fileName = fileOriName + ".xls";
|
||||
HSSFSheet sheetItems = workbook.createSheet("条款内容");
|
||||
String[] headers = {"条款号","条款名称","内容简介","责任部门","FO","责任工程师","SVPPS","适用车辆类型","要求类型","企标覆盖关系"};
|
||||
String[] headers = {"条款号","条款名称","内容简介"};
|
||||
HSSFCellStyle cellStyle =workbook.createCellStyle();
|
||||
cellStyle.setWrapText(true);
|
||||
// cellStyle.setAlignment(HSSFCellStyle.ALIGN_CENTER);
|
||||
|
||||
+15
-3
@@ -4,6 +4,7 @@ import com.adc.da.base.web.BaseController;
|
||||
import com.adc.da.http.PageInfo;
|
||||
import com.adc.da.person.dao.PersonCollectEODao;
|
||||
import com.adc.da.person.dao.PersonShareEODao;
|
||||
import com.adc.da.slrs.standardSplit.dao.SarStandCompareHisEODao;
|
||||
import com.adc.da.slrs.standardSplit.entity.SarStandCompareHisEO;
|
||||
import com.adc.da.slrs.standardSplit.entity.SarStandCompareHisEOPage;
|
||||
import com.adc.da.slrs.standardSplit.service.SarItemsCompareHisEOService;
|
||||
@@ -18,6 +19,7 @@ import io.swagger.annotations.ApiOperation;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
@@ -46,6 +48,9 @@ public class SarStandCompareHisEOController extends BaseController<SarStandCompa
|
||||
@Autowired
|
||||
private PersonCollectEODao personCollectEODao;
|
||||
|
||||
@Autowired
|
||||
private SarStandCompareHisEODao dao;
|
||||
|
||||
@ApiOperation(value = "|SarStandCompareHisEO|分页查询")
|
||||
@GetMapping("/page")
|
||||
// @RequiresPermissions("lawss:sarStandCompareHis:page")
|
||||
@@ -126,8 +131,15 @@ public class SarStandCompareHisEOController extends BaseController<SarStandCompa
|
||||
|
||||
@ApiOperation(value = "全文比对")
|
||||
@PostMapping("/fullTextComparison")
|
||||
public ResponseMessage<Map<String,Object>> fullTextComparison(String leftStandard, String rightStandard) throws Exception {
|
||||
Map<String,Object> resultMap = sarStandCompareHisEOService.fullTextComparison(leftStandard,rightStandard);
|
||||
return Result.success(resultMap);
|
||||
public ResponseMessage<String> fullTextComparison(String leftStandard, String rightStandard) throws Exception {
|
||||
String id=UUIDUtils.randomUUID(32);
|
||||
SarStandCompareHisEO sarStandCompareHisEO =new SarStandCompareHisEO();
|
||||
sarStandCompareHisEO.setId(id);
|
||||
sarStandCompareHisEO.setCompareStatus("比对中");
|
||||
sarStandCompareHisEO.setCompareType("全文比对");
|
||||
sarStandCompareHisEO.setCreateTime(new Date());
|
||||
dao.insertSelective(sarStandCompareHisEO);
|
||||
Map<String,Object> resultMap = sarStandCompareHisEOService.fullTextComparison(leftStandard,rightStandard,id);
|
||||
return Result.success("标准正在比对中请稍后查看结果");
|
||||
}
|
||||
}
|
||||
|
||||
+5
-1
@@ -3,6 +3,10 @@ package com.adc.da.slrs.standardSplit.controller;
|
||||
import com.adc.da.att.service.IAttFileEOService;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
import com.adc.da.http.PageInfo;
|
||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
||||
import com.adc.da.slrs.sarBussionessStand.service.ISarBussionessStandService;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
|
||||
import com.adc.da.slrs.sarStandardsInfo.service.ISarStandardsInfoService;
|
||||
import com.adc.da.slrs.standardSplit.entity.SarFileSplitItemsEO;
|
||||
import com.adc.da.slrs.standardSplit.entity.SarStandFileEO;
|
||||
import com.adc.da.slrs.standardSplit.entity.SarStandFileEOPage;
|
||||
@@ -146,7 +150,7 @@ public class SarStandFileEOController extends BaseController<SarStandFileEO> {
|
||||
|
||||
@ApiOperation(value = "查询文本信息")
|
||||
@GetMapping("/queryFileInfoNew")
|
||||
public ResponseMessage<List<SarStandFileEO>> queryFileInfoNew(@RequestParam("standId") String standId,@RequestParam("type") String type){
|
||||
public ResponseMessage<List<SarStandFileEO>> queryFileInfoNew(@RequestParam("standId") String standId,@RequestParam("type") String type) throws Exception {
|
||||
|
||||
List<SarStandFileEO> sarStandFileEOS = sarStandFileEOService.selectFileByStandIdOCR(standId,type);
|
||||
return Result.success(sarStandFileEOS);
|
||||
|
||||
+3
@@ -2,6 +2,7 @@ package com.adc.da.slrs.standardSplit.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
@@ -13,6 +14,7 @@ import java.util.List;
|
||||
* <b>日期:</b> 2020-02-24 <br>
|
||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
||||
*/
|
||||
@Data
|
||||
public class SarStandCompareHisEO extends BaseEntity {
|
||||
|
||||
private String compareType;
|
||||
@@ -36,6 +38,7 @@ public class SarStandCompareHisEO extends BaseEntity {
|
||||
private String newFileTypeShow;
|
||||
private String newSarType;
|
||||
private String collectId;
|
||||
private String compareStatus;
|
||||
|
||||
private List<SarStandItemsCompareHisEO> resLeftMapList = new ArrayList<>();
|
||||
|
||||
|
||||
+3
@@ -1,6 +1,7 @@
|
||||
package com.adc.da.slrs.standardSplit.entity;
|
||||
|
||||
import com.adc.da.base.page.BasePage;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* <b>功能:</b>SAR_STAND_COMPARE_HIS SarStandCompareHisEOPage<br>
|
||||
@@ -8,6 +9,7 @@ import com.adc.da.base.page.BasePage;
|
||||
* <b>日期:</b> 2020-02-24 <br>
|
||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
||||
*/
|
||||
@Data
|
||||
public class SarStandCompareHisEOPage extends BasePage {
|
||||
|
||||
private String compareType;
|
||||
@@ -50,6 +52,7 @@ public class SarStandCompareHisEOPage extends BasePage {
|
||||
private String oldNumOrName;
|
||||
|
||||
private String newNumOrName;
|
||||
private String compareStatus;
|
||||
|
||||
private String shunxu;
|
||||
|
||||
|
||||
+1
-1
@@ -21,5 +21,5 @@ public interface SarStandCompareHisEOService {
|
||||
|
||||
Map<String,Object> clauseComparison(String oldItemId, String newItemId, String standHisId);
|
||||
|
||||
Map<String,Object> fullTextComparison(String leftStandard, String rightStandard) throws Exception;
|
||||
Map<String,Object> fullTextComparison(String leftStandard, String rightStandard,String id) throws Exception;
|
||||
}
|
||||
|
||||
+1
-1
@@ -25,6 +25,6 @@ public interface SarStandFileEOService {
|
||||
|
||||
List<SarStandFileEO> selectFileByStandId(String standId);
|
||||
|
||||
List<SarStandFileEO> selectFileByStandIdOCR(String standId,String type);
|
||||
List<SarStandFileEO> selectFileByStandIdOCR(String standId,String type) throws Exception;
|
||||
|
||||
}
|
||||
|
||||
+7
-6
@@ -245,9 +245,9 @@ public class SarStandCompareHisEOServiceImpl implements SarStandCompareHisEOServ
|
||||
}
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
@Async
|
||||
@Override
|
||||
public Map<String, Object> fullTextComparison(String leftStandard, String rightStandard) throws Exception{
|
||||
public Map<String, Object> fullTextComparison(String leftStandard, String rightStandard,String id) throws Exception{
|
||||
Map<String,Object> resultMap = new HashMap<String,Object>();
|
||||
List<Map<String,Object>> leftMapList = fullTextComparePackageData(leftStandard);
|
||||
List<Map<String,Object>> rightMapList = fullTextComparePackageData(rightStandard);
|
||||
@@ -281,7 +281,7 @@ public class SarStandCompareHisEOServiceImpl implements SarStandCompareHisEOServ
|
||||
resultMap.put("resRightMapList",resRightMapList);
|
||||
}
|
||||
//往全文比对历史表中添加数据
|
||||
addStandCompareHis(leftStandard,rightStandard,"全文比对",resLeftMapList,resRightMapList);
|
||||
addStandCompareHis(leftStandard,rightStandard,"全文比对",resLeftMapList,resRightMapList,id);
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
@@ -319,12 +319,12 @@ public class SarStandCompareHisEOServiceImpl implements SarStandCompareHisEOServ
|
||||
**/
|
||||
@Async
|
||||
public void addStandCompareHis(String leftStandId,String rightStandId,String compareType,
|
||||
List<Map<String,Object>> resLeftMapList,List<Map<String,Object>> resRightMapList) throws Exception{
|
||||
List<Map<String,Object>> resLeftMapList,List<Map<String,Object>> resRightMapList,String id) throws Exception{
|
||||
SarFileSplitInfoEO leftInfo = sarFileSplitInfoEOService.selectByPrimaryKey(leftStandId);
|
||||
SarFileSplitInfoEO rightInfo = sarFileSplitInfoEOService.selectByPrimaryKey(rightStandId);
|
||||
//保存标准比对历史表数据
|
||||
SarStandCompareHisEO sarStandCompareHisEO = new SarStandCompareHisEO();
|
||||
String id = UUIDUtils.randomUUID20();
|
||||
// String id = UUIDUtils.randomUUID20();
|
||||
sarStandCompareHisEO.setId(id);
|
||||
sarStandCompareHisEO.setOldStandId(leftStandId);
|
||||
sarStandCompareHisEO.setNewStandId(rightStandId);
|
||||
@@ -341,7 +341,8 @@ public class SarStandCompareHisEOServiceImpl implements SarStandCompareHisEOServ
|
||||
sarStandCompareHisEO.setCreateUser(LoginUserUtil.getUserId());
|
||||
sarStandCompareHisEO.setModifyUser(LoginUserUtil.getUserId());
|
||||
sarStandCompareHisEO.setCompareType(compareType);
|
||||
dao.insertSelective(sarStandCompareHisEO);
|
||||
sarStandCompareHisEO.setCompareStatus("比对完成");
|
||||
dao.updateByPrimaryKeySelective(sarStandCompareHisEO);
|
||||
//保存标准的所有条款比对的历史数据
|
||||
if(resLeftMapList!=null && !resLeftMapList.isEmpty()) {
|
||||
setStandCompareHisEO(resLeftMapList, id, "LEFT");
|
||||
|
||||
+32
-2
@@ -1,5 +1,9 @@
|
||||
package com.adc.da.slrs.standardSplit.service.impl;
|
||||
|
||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
||||
import com.adc.da.slrs.sarBussionessStand.service.ISarBussionessStandService;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
|
||||
import com.adc.da.slrs.sarStandardsInfo.service.ISarStandardsInfoService;
|
||||
import com.adc.da.slrs.standardSplit.dao.SarStandFileEODao;
|
||||
import com.adc.da.slrs.standardSplit.entity.SarStandFileEO;
|
||||
import com.adc.da.slrs.standardSplit.entity.SarStandFileEOPage;
|
||||
@@ -13,6 +17,7 @@ import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
|
||||
@@ -20,6 +25,10 @@ public class SarStandFileEOServiceImpl implements SarStandFileEOService {
|
||||
|
||||
@Autowired
|
||||
private SarStandFileEODao sarStandFileEODao;
|
||||
@Autowired
|
||||
private ISarStandardsInfoService sarStandardsInfoEOService;
|
||||
@Autowired
|
||||
private ISarBussionessStandService sarBussionessStandEOService;
|
||||
|
||||
|
||||
@Override
|
||||
@@ -81,10 +90,30 @@ public class SarStandFileEOServiceImpl implements SarStandFileEOService {
|
||||
}
|
||||
//type == 0 是pdf type==1 是doc
|
||||
@Override
|
||||
public List<SarStandFileEO> selectFileByStandIdOCR(String standId , String type) {
|
||||
public List<SarStandFileEO> selectFileByStandIdOCR(String standId , String type) throws Exception {
|
||||
QueryWrapper<SarStandFileEO> queryWrapper= new QueryWrapper<>();
|
||||
List<String> choose=new ArrayList<>();
|
||||
SarStandardsInfo result = sarStandardsInfoEOService.selectStandardsInfoByKey(standId);
|
||||
SarBussionessStand result2 = sarBussionessStandEOService.selectStandardsInfoUpdateByKey(standId);
|
||||
if (null!=result.getAttrInfoCaseMap()){
|
||||
Map map=result.getAttrInfoCaseMap();
|
||||
for (String key:result.getAttrInfoCaseMap().keySet()) {
|
||||
if (null!=result.getAttrInfoCaseMap().get(key) && !"".equals(result.getAttrInfoCaseMap().get(key))){
|
||||
if (result.getAttrInfoCaseMap().get(key).toString().contains(",")){
|
||||
choose.add(result.getAttrInfoCaseMap().get(key).toString().replace(",",""));
|
||||
}else {
|
||||
choose.add(result.getAttrInfoCaseMap().get(key).toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (null!=result2){
|
||||
|
||||
}
|
||||
|
||||
queryWrapper.eq("STAND_ID",standId);
|
||||
queryWrapper.eq("USE_MODEL","SOURCE_FILE");
|
||||
queryWrapper.in("ATT_ID",choose);
|
||||
List<SarStandFileEO> sarStandFileEOS = sarStandFileEODao.selectList(queryWrapper);
|
||||
|
||||
if ("0".equals(type)){
|
||||
@@ -98,7 +127,8 @@ public class SarStandFileEOServiceImpl implements SarStandFileEOService {
|
||||
}else {
|
||||
List<SarStandFileEO> remove=new ArrayList<>();
|
||||
sarStandFileEOS.forEach(sarStandFileEO -> {
|
||||
if (!sarStandFileEO.getFileName().contains(".DOC") && !sarStandFileEO.getFileName().contains(".doc") ){
|
||||
if (!sarStandFileEO.getFileName().contains(".DOC") && !sarStandFileEO.getFileName().contains(".doc") &&
|
||||
!sarStandFileEO.getFileName().contains(".DOCX") && !sarStandFileEO.getFileName().contains(".docx")){
|
||||
remove.add(sarStandFileEO);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user