Merge remote-tracking branch 'origin/dev_third_stage' into dev_third_stage
This commit is contained in:
+3
@@ -127,4 +127,7 @@ public class DocTranslationEO implements Serializable {
|
||||
@ApiModelProperty(value = "目标文件id")
|
||||
private java.lang.String targetFileId;
|
||||
|
||||
/**翻译后文件名称*/
|
||||
@TableField(exist = false)
|
||||
private String targetFileName;
|
||||
}
|
||||
|
||||
+16
@@ -20,6 +20,7 @@ import com.jero.modules.docTranslation.service.IDocTranslationEOService;
|
||||
import com.jero.modules.docTranslation.utils.TranslationDocumentUtils;
|
||||
import com.jero.modules.document.enums.FieldTypeEnum;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import me.zhyd.oauth.utils.StringUtils;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
@@ -47,6 +48,8 @@ public class DocTranslationEOServiceImpl extends ServiceImpl<DocTranslationEOMap
|
||||
|
||||
@Autowired
|
||||
private OnlCgformFieldServiceImpl onlCgformFieldService;
|
||||
@Autowired
|
||||
private IOSSFileService iOSSFileService;
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
@@ -155,6 +158,8 @@ public class DocTranslationEOServiceImpl extends ServiceImpl<DocTranslationEOMap
|
||||
*/
|
||||
public void disposeData(List<DocTranslationEO> datas,String cut){
|
||||
if(CollectionUtils.isNotEmpty(datas)){
|
||||
String targetFileIds = datas.stream().map(DocTranslationEO::getTargetFileId).distinct().collect(Collectors.joining(","));
|
||||
List<OSSFile> targetFileList = this.iOSSFileService.getFileInfos(targetFileIds);
|
||||
for (DocTranslationEO data : datas) {
|
||||
String textStatus_dictText = "";
|
||||
OnlCgformField fileTypeField = this.onlCgformFieldService.queryById(data.getTextStatus());
|
||||
@@ -166,6 +171,17 @@ public class DocTranslationEOServiceImpl extends ServiceImpl<DocTranslationEOMap
|
||||
}
|
||||
}
|
||||
data.setTextStatus_dictText(textStatus_dictText);
|
||||
|
||||
if(StringUtils.isNotEmpty(data.getTargetFileId())){
|
||||
String targetFileName = targetFileList.stream().filter(targetFile -> {
|
||||
boolean flag = false;
|
||||
if (org.apache.commons.lang3.StringUtils.equals(data.getTargetFileId(), targetFile.getId())) {
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).map(OSSFile::getFileName).collect(Collectors.joining(","));
|
||||
data.setTargetFileName(targetFileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
-2
@@ -115,8 +115,9 @@ public class TranslationDocumentUtils {
|
||||
|
||||
//翻译后的文件路径
|
||||
String translateAfterFilePath = uploadpath + "/tempZip/translationTempFile";
|
||||
String translateAfterFileName = sourceOssFile.getFileName().substring(0, sourceOssFile.getFileName().lastIndexOf("."));
|
||||
try {
|
||||
translateAfterFile = createTranslateAfterFile(translateAfterFilePath, translateAfterSb.toString(),sourceOssFile.getFileName());
|
||||
translateAfterFile = createTranslateAfterFile(translateAfterFilePath, translateAfterSb.toString(),translateAfterFileName);
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
logger.error("翻译文档-写入文档失败:" + ex.getMessage());
|
||||
@@ -137,7 +138,7 @@ public class TranslationDocumentUtils {
|
||||
if (!newFilePath.exists()) {
|
||||
newFilePath.mkdirs();
|
||||
}
|
||||
translateAfterFilePath = translateAfterFilePath + "/" + fileName;
|
||||
translateAfterFilePath = translateAfterFilePath + "/" + fileName + ".doc";
|
||||
File newFile = new File(translateAfterFilePath);
|
||||
if (!newFile.exists()) {
|
||||
newFile.createNewFile();
|
||||
|
||||
+8
-2
@@ -127,8 +127,8 @@ public class LawsOpinionGatherEOController extends JeroController<LawsOpinionGat
|
||||
@AutoLog(value = "法规意见收集表-批量删除")
|
||||
@ApiOperation(value="法规意见收集表-批量删除", notes="法规意见收集表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.lawsOpinionGatherEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids,@RequestParam(name="cut",required=true) String cut) {
|
||||
this.lawsOpinionGatherEOService.deleteByIds(Arrays.asList(ids.split(",")),cut);
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
@@ -184,4 +184,10 @@ public class LawsOpinionGatherEOController extends JeroController<LawsOpinionGat
|
||||
return this.lawsOpinionGatherEOService.processCall(jsonObject);
|
||||
}
|
||||
|
||||
@AutoLog(value = "法规意见收集表-批量完成任务")
|
||||
@ApiOperation(value="法规意见收集表-批量完成任务", notes="法规意见收集表-批量完成任务")
|
||||
@PostMapping(value = "/batchCompleteTask")
|
||||
public Result<?> batchCompleteTask(@RequestBody JSONObject jsonObject){
|
||||
return this.lawsOpinionGatherEOService.batchCompleteTask(jsonObject);
|
||||
}
|
||||
}
|
||||
|
||||
+3
-2
@@ -34,7 +34,8 @@ public class LawsOpinionGatherJob implements Job {
|
||||
@Override
|
||||
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
||||
log.info("法规意见收集流程,定时任务开启 =====================================================");
|
||||
QueryWrapper<LawsOpinionGatherEO> lawsOpinionGatherEOQueryWrapper = new QueryWrapper<>();
|
||||
//TODO 2022-09-29 该功能被手动按钮替代 对应禅道bug编号 59979
|
||||
/*QueryWrapper<LawsOpinionGatherEO> lawsOpinionGatherEOQueryWrapper = new QueryWrapper<>();
|
||||
lawsOpinionGatherEOQueryWrapper.lambda().eq(LawsOpinionGatherEO::getGatherResult, GatherResultEnum.UNDERWAY.getValue());
|
||||
List<LawsOpinionGatherEO> lawsOpinionGatherEOList = this.lawsOpinionGatherEOService.list(lawsOpinionGatherEOQueryWrapper);
|
||||
if (CollectionUtils.isNotEmpty(lawsOpinionGatherEOList)) {
|
||||
@@ -58,7 +59,7 @@ public class LawsOpinionGatherJob implements Job {
|
||||
this.lawsOpinionGatherEOService.updateBatchById(updateLawsOpinionGatherEOList);
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
log.info("法规意见收集流程,定时任务结束 =====================================================");
|
||||
}
|
||||
}
|
||||
|
||||
+3
-1
@@ -44,7 +44,7 @@ public interface ILawsOpinionGatherEOService extends IService<LawsOpinionGatherE
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
void deleteByIds(List<String> ids,String cut);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
@@ -75,4 +75,6 @@ public interface ILawsOpinionGatherEOService extends IService<LawsOpinionGatherE
|
||||
void disposeData(List<LawsOpinionGatherEO> lawsOpinionGatherEOList,String cut);
|
||||
|
||||
void workFlowSendMsg(JSONObject jsonObject);
|
||||
|
||||
Result<?> batchCompleteTask(JSONObject jsonObject);
|
||||
}
|
||||
|
||||
+56
-5
@@ -28,8 +28,10 @@ import com.jero.modules.system.entity.SysCategory;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import com.jero.modules.system.service.impl.SysCategoryServiceImpl;
|
||||
import com.jero.modules.wkflow.feginClient.WorkFlowFeignClient;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.jeecg.modules.jmreport.common.constant.CommonConstant;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -64,6 +66,9 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl<LawsOpinionGathe
|
||||
|
||||
@Autowired
|
||||
private ILawsOpinionAssessmentResultEOService lawsOpinionAssessmentResultEOService;
|
||||
@Autowired
|
||||
private WorkFlowFeignClient workFlowFeignClient;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
@@ -109,12 +114,26 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl<LawsOpinionGathe
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
public void deleteByIds(List<String> ids,String cut) {
|
||||
QueryWrapper<LawsOpinionGatherEO> lawsOpinionGatherEOQueryWrapper = new QueryWrapper<>();
|
||||
lawsOpinionGatherEOQueryWrapper.lambda().in(LawsOpinionGatherEO::getId, ids);
|
||||
List<LawsOpinionGatherEO> lawsOpinionGatherEOList = this.list(lawsOpinionGatherEOQueryWrapper);
|
||||
|
||||
QueryWrapper deleteWrapper = new QueryWrapper();
|
||||
deleteWrapper.in("laws_opinion_gather_id",ids);
|
||||
this.lawsOpinionAssessmentResultEOService.remove(deleteWrapper);
|
||||
List<String> actiProcInstIdList = lawsOpinionGatherEOList.stream().map(LawsOpinionGatherEO::getActiProcInstId).distinct().collect(Collectors.toList());
|
||||
String prcIds = org.apache.commons.lang.StringUtils.join(actiProcInstIdList,",");
|
||||
Result<String> result = this.workFlowFeignClient.deleteProcessInstanceByPrcIds(prcIds);
|
||||
if(result.getCode().equals(CommonConstant.SC_OK_200)){
|
||||
removeByIds(ids);
|
||||
QueryWrapper deleteWrapper = new QueryWrapper();
|
||||
deleteWrapper.in("laws_opinion_gather_id",ids);
|
||||
this.lawsOpinionAssessmentResultEOService.remove(deleteWrapper);
|
||||
}else {
|
||||
if(StringUtils.equals(cut,CutEnum.CN.getValue())){
|
||||
throw new JeroBootException("删除失败,请联系管理员!");
|
||||
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||
throw new JeroBootException("Delete failed, please contact the administrator!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -283,4 +302,36 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl<LawsOpinionGathe
|
||||
|
||||
SendMessageUtils.sendMessage(msgTitle,msgContentEN,userIdList,lawsOpinionGatherId,sendMessageMap,null,MessageTypeEnum.COLLECTION_OF_LEGISLATIVE_COMMENTS,initiator);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<?> batchCompleteTask(JSONObject jsonObject) {
|
||||
String ids = jsonObject.getString("ids");
|
||||
String cut = jsonObject.getString("cut");
|
||||
if(StringUtils.isEmpty(ids)){
|
||||
if(StringUtils.equals(cut,CutEnum.CN.getValue())){
|
||||
throw new JeroBootException("至少选择一条数据进行手动结束!");
|
||||
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||
throw new JeroBootException("Select at least one piece of data for manual termination!");
|
||||
}
|
||||
}
|
||||
|
||||
List<String> lawsOpinionGatherIdList = Arrays.asList(ids.split(","));
|
||||
QueryWrapper<LawsOpinionGatherEO> lawsOpinionGatherEOQueryWrapper = new QueryWrapper<>();
|
||||
lawsOpinionGatherEOQueryWrapper.lambda().eq(LawsOpinionGatherEO::getGatherResult, GatherResultEnum.UNDERWAY.getValue());
|
||||
lawsOpinionGatherEOQueryWrapper.lambda().in(LawsOpinionGatherEO::getId, lawsOpinionGatherIdList);
|
||||
List<LawsOpinionGatherEO> lawsOpinionGatherEOList = this.list(lawsOpinionGatherEOQueryWrapper);
|
||||
if (CollectionUtils.isNotEmpty(lawsOpinionGatherEOList)) {
|
||||
List<String> actiProcInstIdList = lawsOpinionGatherEOList.stream().map(LawsOpinionGatherEO::getActiProcInstId).distinct().collect(Collectors.toList());
|
||||
String actiProcInstIds = org.apache.commons.lang.StringUtils.join(actiProcInstIdList,",");
|
||||
//将这些流程实例下的待办任务提交
|
||||
Result<String> result = this.workFlowFeignClient.completeTaskByPids(actiProcInstIds);
|
||||
if(result.getCode().equals(CommonConstant.SC_OK_200)){
|
||||
lawsOpinionGatherEOList.forEach(lawsOpinionGatherEO -> {
|
||||
lawsOpinionGatherEO.setGatherResult(GatherResultEnum.COMPLETED.getValue());
|
||||
});
|
||||
this.updateBatchById(lawsOpinionGatherEOList);
|
||||
}
|
||||
}
|
||||
return new Result<>().success("手动结束成功!");
|
||||
}
|
||||
}
|
||||
|
||||
+11
-4
@@ -130,8 +130,8 @@ public class LawsTechnologyEvaluationEOController extends JeroController<LawsTec
|
||||
@AutoLog(value = "法规技术评估-批量删除")
|
||||
@ApiOperation(value="法规技术评估-批量删除", notes="法规技术评估-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.lawsTechnologyEvaluationEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids,@RequestParam(name="cut",required=true) String cut) {
|
||||
this.lawsTechnologyEvaluationEOService.deleteByIds(Arrays.asList(ids.split(",")),cut);
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
@@ -180,8 +180,8 @@ public class LawsTechnologyEvaluationEOController extends JeroController<LawsTec
|
||||
* @param jsonObject
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "法规意见收集表-流程调用")
|
||||
@ApiOperation(value="法规意见收集表-流程调用", notes="法规意见收集细表-流程调用")
|
||||
@AutoLog(value = "法规技术评估-流程调用")
|
||||
@ApiOperation(value="法规技术评估-流程调用", notes="法规技术评估-流程调用")
|
||||
@PostMapping(value = "/processCall")
|
||||
public Result<?> processCall(@RequestBody JSONObject jsonObject){
|
||||
return this.lawsTechnologyEvaluationEOService.processCall(jsonObject);
|
||||
@@ -218,4 +218,11 @@ public class LawsTechnologyEvaluationEOController extends JeroController<LawsTec
|
||||
List<Map<String, Object>> result = this.lawsTechnologyEvaluationEOService.queryPageDummyById(parameter);
|
||||
return Result.OK(result);
|
||||
}
|
||||
|
||||
@AutoLog(value = "法规技术评估-批量完成任务")
|
||||
@ApiOperation(value="法规技术评估-批量完成任务", notes="法规技术评估-批量完成任务")
|
||||
@PostMapping(value = "/batchCompleteTask")
|
||||
public Result<?> batchCompleteTask(@RequestBody JSONObject jsonObject){
|
||||
return this.lawsTechnologyEvaluationEOService.batchCompleteTask(jsonObject);
|
||||
}
|
||||
}
|
||||
|
||||
+3
-2
@@ -38,7 +38,8 @@ public class LawsTechnologyEvaluationJob implements Job {
|
||||
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
||||
log.info("法规技术评估流程,定时任务开启 =====================================================");
|
||||
|
||||
QueryWrapper<LawsTechnologyEvaluationEO> queryWrapper = new QueryWrapper<>();
|
||||
//TODO 2022-09-29 该功能被手动按钮替代 对应禅道bug编号 59979
|
||||
/*QueryWrapper<LawsTechnologyEvaluationEO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().eq(LawsTechnologyEvaluationEO::getFlowStatus, GatherResultEnum.UNDERWAY.getValue());
|
||||
List<LawsTechnologyEvaluationEO> lawsTechnologyEvaluationEOList = this.lawsTechnologyEvaluationEOService.list(queryWrapper);
|
||||
|
||||
@@ -73,7 +74,7 @@ public class LawsTechnologyEvaluationJob implements Job {
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
log.info("法规技术评估流程,定时任务结束 =====================================================");
|
||||
}
|
||||
|
||||
+3
-1
@@ -50,7 +50,7 @@ public interface ILawsTechnologyEvaluationEOService extends IService<LawsTechnol
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
void deleteByIds(List<String> ids,String cut);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
@@ -90,4 +90,6 @@ public interface ILawsTechnologyEvaluationEOService extends IService<LawsTechnol
|
||||
List<Map<String, Object>> queryPageDummyById(Map<String, Object> parameter);
|
||||
|
||||
void workFlowSendMsg(JSONObject jsonObject);
|
||||
|
||||
Result<?> batchCompleteTask(JSONObject jsonObject);
|
||||
}
|
||||
|
||||
+75
-8
@@ -16,6 +16,7 @@ import com.jero.modules.document.mapper.BussDocumentLibraryEOMapper;
|
||||
import com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl;
|
||||
import com.jero.modules.lawsOpinionGather.enums.GatherResultEnum;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationEO;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationFlowDetailEO;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.mapper.LawsTechnologyEvaluationEOMapper;
|
||||
import com.jero.modules.lawsTechnologyEvaluation.service.*;
|
||||
import com.jero.modules.project.enums.JumpLinkEnum;
|
||||
@@ -31,12 +32,14 @@ import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import com.jero.modules.system.service.impl.SysCategoryServiceImpl;
|
||||
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
|
||||
import com.jero.modules.wkflow.feginClient.WorkFlowFeignClient;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.poi.hssf.usermodel.HSSFSheet;
|
||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
import org.jeecg.modules.jmreport.common.constant.CommonConstant;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -90,6 +93,8 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
||||
private ILawsTechnologyEvaluationItemResultEOService lawsTechnologyEvaluationItemResultEOService;
|
||||
@Autowired
|
||||
private ILawsTechnologyEvaluationComplianceResultEOService lawsTechnologyEvaluationComplianceResultEOService;
|
||||
@Autowired
|
||||
private WorkFlowFeignClient workFlowFeignClient;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
@@ -136,18 +141,41 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
public void deleteByIds(List<String> ids,String cut) {
|
||||
QueryWrapper<LawsTechnologyEvaluationEO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().in(LawsTechnologyEvaluationEO::getId, ids);
|
||||
List<LawsTechnologyEvaluationEO> lawsTechnologyEvaluationEOList = this.list(queryWrapper);
|
||||
|
||||
QueryWrapper deleteWrapper = new QueryWrapper();
|
||||
deleteWrapper.in("laws_technology_evaluation_id",ids);
|
||||
this.lawsTechnologyEvaluationFlowDetailEOService.remove(deleteWrapper);
|
||||
List<String> lawsTechnologyEvaluationIdList = lawsTechnologyEvaluationEOList.stream().map(LawsTechnologyEvaluationEO::getId).distinct().collect(Collectors.toList());
|
||||
|
||||
this.lawsTechnologyEvaluationItemResultEOService.remove(deleteWrapper);
|
||||
//获取这些法规技术评估数据的下级流程明细数据。
|
||||
QueryWrapper<LawsTechnologyEvaluationFlowDetailEO> flowDetailEOQueryWrapper = new QueryWrapper<>();
|
||||
flowDetailEOQueryWrapper.lambda().in(LawsTechnologyEvaluationFlowDetailEO::getLawsTechnologyEvaluationId,lawsTechnologyEvaluationIdList);
|
||||
List<LawsTechnologyEvaluationFlowDetailEO> lawsTechnologyEvaluationFlowDetailEOList = lawsTechnologyEvaluationFlowDetailEOService.list(flowDetailEOQueryWrapper);
|
||||
|
||||
this.lawsTechnologyEvaluationResultEOService.remove(deleteWrapper);
|
||||
if(CollectionUtils.isNotEmpty(lawsTechnologyEvaluationFlowDetailEOList)){
|
||||
String prcIds = lawsTechnologyEvaluationFlowDetailEOList.stream().map(LawsTechnologyEvaluationFlowDetailEO::getActiProcInstId).distinct().collect(Collectors.joining(","));
|
||||
Result<String> result = this.workFlowFeignClient.deleteProcessInstanceByPrcIds(prcIds);
|
||||
if(result.getCode().equals(CommonConstant.SC_OK_200)){
|
||||
removeByIds(ids);
|
||||
|
||||
this.lawsTechnologyEvaluationComplianceResultEOService.remove(deleteWrapper);
|
||||
QueryWrapper deleteWrapper = new QueryWrapper();
|
||||
deleteWrapper.in("laws_technology_evaluation_id",ids);
|
||||
this.lawsTechnologyEvaluationFlowDetailEOService.remove(deleteWrapper);
|
||||
|
||||
this.lawsTechnologyEvaluationItemResultEOService.remove(deleteWrapper);
|
||||
|
||||
this.lawsTechnologyEvaluationResultEOService.remove(deleteWrapper);
|
||||
|
||||
this.lawsTechnologyEvaluationComplianceResultEOService.remove(deleteWrapper);
|
||||
}else {
|
||||
if(StringUtils.equals(cut,CutEnum.CN.getValue())){
|
||||
throw new JeroBootException("删除失败,请联系管理员!");
|
||||
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||
throw new JeroBootException("Delete failed, please contact the administrator!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -629,6 +657,45 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
||||
SendMessageUtils.sendMessage(msgTitle,msgContentEN,userIdList,lawsTechnologyEvaluationId,sendMessageMap,null, MessageTypeEnum.REGULATORY_AND_TECHNICAL_ASSESSMENT,initiator);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<?> batchCompleteTask(JSONObject jsonObject) {
|
||||
String ids = jsonObject.getString("ids");
|
||||
String cut = jsonObject.getString("cut");
|
||||
if(StringUtils.isEmpty(ids)){
|
||||
if(StringUtils.equals(cut,CutEnum.CN.getValue())){
|
||||
throw new JeroBootException("至少选择一条数据进行手动结束!");
|
||||
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||
throw new JeroBootException("Select at least one piece of data for manual termination!");
|
||||
}
|
||||
}
|
||||
|
||||
QueryWrapper<LawsTechnologyEvaluationEO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().eq(LawsTechnologyEvaluationEO::getFlowStatus, GatherResultEnum.UNDERWAY.getValue());
|
||||
queryWrapper.lambda().in(LawsTechnologyEvaluationEO::getId, Arrays.asList(ids.split(",")));
|
||||
List<LawsTechnologyEvaluationEO> lawsTechnologyEvaluationEOList = this.list(queryWrapper);
|
||||
|
||||
if (CollectionUtils.isNotEmpty(lawsTechnologyEvaluationEOList)) {
|
||||
List<String> lawsTechnologyEvaluationIdList = lawsTechnologyEvaluationEOList.stream().map(LawsTechnologyEvaluationEO::getId).distinct().collect(Collectors.toList());
|
||||
|
||||
//获取这些法规技术评估数据的下级流程明细数据。
|
||||
QueryWrapper<LawsTechnologyEvaluationFlowDetailEO> flowDetailEOQueryWrapper = new QueryWrapper<>();
|
||||
flowDetailEOQueryWrapper.lambda().in(LawsTechnologyEvaluationFlowDetailEO::getLawsTechnologyEvaluationId,lawsTechnologyEvaluationIdList);
|
||||
List<LawsTechnologyEvaluationFlowDetailEO> lawsTechnologyEvaluationFlowDetailEOList = lawsTechnologyEvaluationFlowDetailEOService.list(flowDetailEOQueryWrapper);
|
||||
|
||||
if(CollectionUtils.isNotEmpty(lawsTechnologyEvaluationFlowDetailEOList)){
|
||||
String actiProcInstIds = lawsTechnologyEvaluationFlowDetailEOList.stream().map(LawsTechnologyEvaluationFlowDetailEO::getActiProcInstId).distinct().collect(Collectors.joining(","));
|
||||
Result<String> result = this.workFlowFeignClient.completeLawsTechnologyEvaluationTaskByPids(actiProcInstIds);
|
||||
if(result.getCode().equals(CommonConstant.SC_OK_200)){
|
||||
lawsTechnologyEvaluationEOList.forEach(lawsTechnologyEvaluationEO -> {
|
||||
lawsTechnologyEvaluationEO.setFlowStatus(GatherResultEnum.COMPLETED.getValue());
|
||||
});
|
||||
this.updateBatchById(lawsTechnologyEvaluationEOList);
|
||||
}
|
||||
}
|
||||
}
|
||||
return new Result<>().success("手动结束成功!");
|
||||
}
|
||||
|
||||
private String getTreeName(String cut, List<SysCategory> categoryList, List<String> technologyTerritoryList) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (String technologyTerritory : technologyTerritoryList) {
|
||||
|
||||
+2
-2
@@ -267,10 +267,10 @@ public class LawsTechnologyEvaluationItemResultEOServiceImpl extends ServiceImpl
|
||||
String fileName = "";
|
||||
if(StringUtils.equals(cut, CutEnum.CN.getValue())){
|
||||
title = "条款号,条款名称,条款内容,评估人,评估方式,技术文件名称,章节,符合性结果,意见,附件,反馈时间";
|
||||
fileName = "条款评估结果 " + ".xlsx";
|
||||
fileName = "条款评估结果" + ".xls";
|
||||
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||
title = "Item No.,Item Name,Item Content,Assessor,Evaluation method,Name of technical document,Chapter,Compliance Results,Opinion,Enclosure,Feedback Time";
|
||||
fileName = "Item Evaluation results " + ".xlsx";
|
||||
fileName = "Item Evaluation results" + ".xls";
|
||||
}
|
||||
|
||||
OutputStream os = null;
|
||||
|
||||
+15
-4
@@ -40,6 +40,8 @@ import com.jero.modules.system.util.StringUtils;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jsoup.Jsoup;
|
||||
import org.jsoup.nodes.Document;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -117,10 +119,11 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
//如果该条问题知识库的展示权限为私密,则创建权限表数据
|
||||
if(StringUtils.equals(problemKnowledgeBaseEO.getShowPermissions(), ShowPermissionsEnum.PRIVACY.getValue())){
|
||||
this.batchInsertProblemKnowledgeBaseUserEO(problemKnowledgeBaseEO);
|
||||
}else {
|
||||
}
|
||||
/*else {
|
||||
//如果展示权限是公开,则把该数据插入到搜索中心中。
|
||||
this.addOrUpdateElasticsearch(problemKnowledgeBaseEO);
|
||||
}
|
||||
}*/
|
||||
this.addOrUpdateElasticsearch(problemKnowledgeBaseEO);
|
||||
}
|
||||
|
||||
@@ -300,8 +303,12 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
}*/
|
||||
|
||||
if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getContent())){
|
||||
//处理内容,将富文本标签去掉,搜索中心的时候不要富文本标签样式
|
||||
String content = problemKnowledgeBaseEO.getContent();
|
||||
Document document = Jsoup.parse(content);
|
||||
content = document.text();
|
||||
sbCn.append("</br>");
|
||||
sbCn.append("正文" + ":" + problemKnowledgeBaseEO.getContent() + " ");
|
||||
sbCn.append("正文" + ":" + content + " ");
|
||||
}else {
|
||||
sbCn.append("</br>");
|
||||
sbCn.append("正文" + ":" + "-- ");
|
||||
@@ -363,8 +370,12 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
}*/
|
||||
|
||||
if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getContent())){
|
||||
//处理内容,将富文本标签去掉,搜索中心的时候不要富文本标签样式
|
||||
String content = problemKnowledgeBaseEO.getContent();
|
||||
Document document = Jsoup.parse(content);
|
||||
content = document.text();
|
||||
sbEn.append("</br>");
|
||||
sbEn.append("Text" + ":" + problemKnowledgeBaseEO.getContent() + " ");
|
||||
sbEn.append("Text" + ":" + content + " ");
|
||||
}else {
|
||||
sbEn.append("</br>");
|
||||
sbEn.append("Text" + ":" + "-- ");
|
||||
|
||||
+2
-1
@@ -51,7 +51,8 @@
|
||||
pti.prehomo_person_charge_feedback as "prehomoPersonChargeFeedback",
|
||||
pti.verify_person_charge_feedback as "verifyPersonChargeFeedback",
|
||||
plb.studio_engineer as "studioEngineer",
|
||||
plb.target_market as "targetMarket"
|
||||
plb.target_market as "targetMarket",
|
||||
pti.id as "projectTaskInventoryId"
|
||||
FROM
|
||||
project_laws_inventory pli
|
||||
LEFT JOIN project_task_inventory pti ON ( pli.id = pti.project_laws_inventory_id )
|
||||
|
||||
+4
@@ -886,6 +886,8 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
false, false, "Blue Sky Noto Regular",null,null,flag);
|
||||
WordUtil.exportWord(document, moth+"\r\n", null, ParagraphAlignment.CENTER, 0, 12,
|
||||
false, true, "Blue Sky Noto Regular",null,null,flag);
|
||||
//添加下一页
|
||||
document.createParagraph().createRun().addBreak(BreakType.PAGE);
|
||||
}
|
||||
//封面
|
||||
private void coverEn(List<LawsMonthlyReportWriteEO> lawsMonthlyReportWriteEOS,
|
||||
@@ -900,6 +902,8 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
false, false, "Blue Sky Noto Regular",null,null,flag);
|
||||
WordUtil.exportWord(document, moth+"\r\n", null, ParagraphAlignment.CENTER, 0, 12,
|
||||
false, true, "Blue Sky Noto Regular",null,null,flag);
|
||||
//添加下一页
|
||||
document.createParagraph().createRun().addBreak(BreakType.PAGE);
|
||||
}
|
||||
private void wordContent(List<LawsMonthlyReportWriteEO> lawsMonthlyReportWriteEOS,
|
||||
List<LawsMonthlyReportTitleTemplateEO> lawsMonthlyReportTitleTemplateEOS,
|
||||
|
||||
+11
-10
@@ -42,6 +42,7 @@ import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTPageSz;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTR;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTRPr;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSectPr;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSpacing;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTString;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTStyle;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblLayoutType;
|
||||
@@ -107,17 +108,17 @@ public class WordUtil {
|
||||
|
||||
|
||||
//设置行间距
|
||||
// if(!"cover".equals(flag) && !"oneTitle".equals(flag)){
|
||||
// CTP ctp = titleParagraph.getCTP();
|
||||
// CTPPr ppr = ctp.isSetPPr() ? ctp.getPPr() : ctp.addNewPPr();
|
||||
// CTSpacing spacing = ppr.isSetSpacing()? ppr.getSpacing() : ppr.addNewSpacing();
|
||||
// spacing.setAfter(BigInteger.valueOf(0));
|
||||
// spacing.setBefore(BigInteger.valueOf(0));
|
||||
if(!"cover".equals(flag) && !"oneTitle".equals(flag)){
|
||||
CTP ctp = titleParagraph.getCTP();
|
||||
CTPPr ppr = ctp.isSetPPr() ? ctp.getPPr() : ctp.addNewPPr();
|
||||
CTSpacing spacing = ppr.isSetSpacing()? ppr.getSpacing() : ppr.addNewSpacing();
|
||||
spacing.setAfter(BigInteger.valueOf(120));//行间距后段为6磅
|
||||
spacing.setBefore(BigInteger.valueOf(300));//行间距前段为15磅, 300是通过单位换算来的
|
||||
// //设置行距类型为 EXACT
|
||||
// spacing.setLineRule(STLineSpacingRule.EXACT);
|
||||
// //1磅数是20
|
||||
// spacing.setLine(BigInteger.valueOf(40*20));
|
||||
// }
|
||||
// spacing.setLine(BigInteger.valueOf(1*20));
|
||||
}
|
||||
|
||||
//设置段落左对齐
|
||||
if (align == null) {
|
||||
@@ -1079,7 +1080,7 @@ public class WordUtil {
|
||||
run.setText(text);
|
||||
}
|
||||
//设置字体样式,大小
|
||||
run.setFontSize(10);
|
||||
run.setFontSize(11);
|
||||
run.setFontFamily("Blue Sky Noto Regular");
|
||||
|
||||
}
|
||||
@@ -1134,7 +1135,7 @@ public class WordUtil {
|
||||
}
|
||||
|
||||
//设置字体样式,大小
|
||||
run.setFontSize(10);
|
||||
run.setFontSize(11);
|
||||
run.setFontFamily("Blue Sky Noto Regular");
|
||||
|
||||
}
|
||||
|
||||
+39
-13
@@ -338,7 +338,6 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
||||
queryMap.put(key, queryMapTemp);
|
||||
map.put("match",queryMap);
|
||||
}
|
||||
|
||||
must.add(map);
|
||||
}
|
||||
}
|
||||
@@ -350,11 +349,18 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
||||
String key = entry.getKey();
|
||||
String value = (String) entry.getValue();
|
||||
if("technology_territory".equals(key) && ObjectUtils.isNotEmpty(value)){
|
||||
Map<String, Object> queryMapNew = new HashMap<>();
|
||||
Map<String, Object> queryMapTempNew = new HashMap<>();
|
||||
queryMapTempNew.put(key, "*"+value.replaceAll(",","*")+"*");
|
||||
queryMapNew.put("wildcard", queryMapTempNew);
|
||||
must.add(queryMapNew);
|
||||
JSONArray should = new JSONArray();
|
||||
|
||||
List<Map<String,Object>> mapList = new ArrayList<>();
|
||||
for (String s : value.split(",")) {
|
||||
Map<String,Object> map = new HashMap();
|
||||
map.put(key,"*"+s+"*");
|
||||
Map<String,Object> map1 = new HashMap<>();
|
||||
map1.put("wildcard",map);
|
||||
should.add(map1);
|
||||
}
|
||||
JSONObject jsonObject = jeroElasticsearchTemplate.buildBoolQuery(null, null, should);
|
||||
must.add(jsonObject);
|
||||
}else{
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
Map<String, Object> queryMap = new HashMap<>();
|
||||
@@ -520,6 +526,7 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
||||
}
|
||||
|
||||
JSONObject sort = new JSONObject();
|
||||
// JSONObject sort = new JSONObject(new LinkedHashMap<>());
|
||||
if(StringUtils.isEmpty(selectValue) || StringUtils.equals(selectValue,SEARCH_FLAG)){
|
||||
Map<String,Object> createTime = new HashMap<>();
|
||||
Map<String,Object> createTime1 = new HashMap<>();
|
||||
@@ -531,7 +538,12 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
||||
Map<String,Object> score1 = new HashMap<>();
|
||||
score.put("order","desc");
|
||||
score1.put("_score",score);
|
||||
// Map<String,Object> score2 = new HashMap<>();
|
||||
// Map<String,Object> score3 = new HashMap<>();
|
||||
// score2.put("order","desc");
|
||||
// score3.put("_id",score2);
|
||||
sort.putAll(score1);
|
||||
// sort.putAll(score3);
|
||||
}
|
||||
log.info("搜索中心-全部索引,排序方式为:" + sort.toJSONString());
|
||||
|
||||
@@ -557,13 +569,13 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
||||
if("serial_number".equals(field)){
|
||||
map31.put("boost",10);
|
||||
}else if("title".equals(field)){
|
||||
map31.put("boost",10);
|
||||
map31.put("boost",8);
|
||||
}else if("file_text".equals(field)){
|
||||
map31.put("boost",0.01);
|
||||
}else if("content".equals(field)){
|
||||
map31.put("boost",0.01);
|
||||
}else if("file_name".equals(field)){
|
||||
map31.put("boost",10);
|
||||
map31.put("boost",5);
|
||||
}
|
||||
map31.put("value", selectValue);
|
||||
map21.put(field + ".keyword", map31);
|
||||
@@ -577,13 +589,13 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
||||
if("serial_number".equals(field)){
|
||||
map32.put("boost",10);
|
||||
}else if("title".equals(field)){
|
||||
map32.put("boost",10);
|
||||
map32.put("boost",8);
|
||||
}else if("file_text".equals(field)){
|
||||
map32.put("boost",0.01);
|
||||
}else if("content".equals(field)){
|
||||
map32.put("boost",0.01);
|
||||
}else if("file_name".equals(field)){
|
||||
map32.put("boost",10);
|
||||
map32.put("boost",5);
|
||||
}
|
||||
map32.put("query", selectValue);
|
||||
map22.put(field, map32);
|
||||
@@ -598,13 +610,13 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
||||
if("serial_number".equals(field)){
|
||||
map33.put("boost",10);
|
||||
}else if("title".equals(field)){
|
||||
map33.put("boost",10);
|
||||
map33.put("boost",8);
|
||||
}else if("file_text".equals(field)){
|
||||
map33.put("boost",0.01);
|
||||
}else if("content".equals(field)){
|
||||
map33.put("boost",0.01);
|
||||
}else if("file_name".equals(field)){
|
||||
map33.put("boost",10);
|
||||
map33.put("boost",5);
|
||||
}
|
||||
map33.put("query", selectValue);
|
||||
map23.put(field, map33);
|
||||
@@ -615,7 +627,21 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
||||
//情况举例:用户只记得中间那段字
|
||||
Map<String, Object> map24 = new HashMap<>();
|
||||
Map<String, Object> map44 = new HashMap<>();
|
||||
map24.put(field, "*" + selectValue + "*");
|
||||
Map<String, Object> map55 = new HashMap<>();
|
||||
map55.put("value","*" + selectValue + "*");
|
||||
if("serial_number".equals(field)){
|
||||
map55.put("boost",10);
|
||||
}else if("title".equals(field)){
|
||||
map55.put("boost",8);
|
||||
}else if("file_text".equals(field)){
|
||||
map55.put("boost",0.01);
|
||||
}else if("content".equals(field)){
|
||||
map55.put("boost",0.01);
|
||||
}else if("file_name".equals(field)){
|
||||
map55.put("boost",5);
|
||||
}
|
||||
|
||||
map24.put(field, map55);
|
||||
map44.put("wildcard",map24);
|
||||
queryMapJson.add(map44);
|
||||
}
|
||||
|
||||
+8
@@ -575,6 +575,14 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
entry.setValue(value);
|
||||
}
|
||||
}
|
||||
//如果value中包含英文单、双引号,替换成中文的。 英文的符号影响到法规技术评估流程了。
|
||||
if(entry.getValue() != null){
|
||||
if(StringUtils.contains(entry.getValue().toString(),"'") || StringUtils.contains(entry.getValue().toString(),"\"")){
|
||||
String key = entry.getKey();
|
||||
String value = entry.getValue().toString().replaceAll("'", "‘").replaceAll("\"", "”");
|
||||
record1.put(key,value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 拼接文件名
|
||||
|
||||
+3
@@ -178,4 +178,7 @@ public interface WorkFlowFeignClient {
|
||||
|
||||
@RequestMapping(value = "/bat-wkflow/task/getTaskAssigneeListByPrcIds",method = RequestMethod.GET)
|
||||
List<String> getTaskAssigneeListByPrcIds(@RequestParam("actiProcInstIds") String actiProcInstIds);
|
||||
|
||||
@RequestMapping(value = "/bat-wkflow/deleteProcessInstanceByPrcIds",method = RequestMethod.GET)
|
||||
Result<String> deleteProcessInstanceByPrcIds(@RequestParam("prcIds") String prcIds);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user