Commit ed9503f4 authored by 刘林's avatar 刘林

fix(JG):监管履历信息功能开发,转义特殊字符

parent d4a3d7e9
......@@ -51,8 +51,8 @@ public class JgResumeInfoController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/saveBatchResume")
@ApiOperation(httpMethod = "POST", value = "批量新增", notes = "批量新增")
public boolean saveBatchResume(@RequestBody List<JgResumeInfoDto> jgResumeInfoDtoList) {
return jgResumeInfoServiceImpl.saveBatchResume(jgResumeInfoDtoList);
public void saveBatchResume(@RequestBody List<JgResumeInfoDto> jgResumeInfoDtoList) {
jgResumeInfoServiceImpl.saveBatchResume(jgResumeInfoDtoList);
}
/**
......
......@@ -79,6 +79,7 @@ import java.util.concurrent.TimeUnit;
import java.util.function.Function;
import java.util.stream.Collectors;
import static com.alibaba.fastjson.JSON.parseArray;
import static com.yeejoin.amos.boot.module.jg.biz.utils.WordTemplateUtils.escapeSpecialCharacters;
/**
* 服务实现类
......@@ -460,7 +461,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
// jgInstallationNotice.setNoticeReportUrl(url);
// this.updateById(jgInstallationNotice);
WordTemplateUtils.templateToPdfDownload(tempFileName, "installation-notification-report.ftl", placeholders, response);
WordTemplateUtils.templateToPdfDownload(tempFileName, "installation-notification-report.ftl", escapeSpecialCharacters(placeholders), response);
}
public Map<String, Object> fullFillTemplateObj(List<Map<String, Object>> informationList, String businessType) {
......
......@@ -7,7 +7,6 @@ import com.yeejoin.amos.boot.module.jg.api.mapper.JgResumeInfoMapper;
import com.yeejoin.amos.boot.module.jg.api.service.IJgResumeInfoService;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import java.util.Collection;
import java.util.List;
......@@ -35,8 +34,7 @@ public class JgResumeInfoServiceImpl extends BaseService<JgResumeInfoDto,JgResum
return this.queryForList("" , false);
}
@Transactional
public boolean saveBatchResume(List<JgResumeInfoDto> jgResumeInfoDtoList) {
public void saveBatchResume(List<JgResumeInfoDto> jgResumeInfoDtoList) {
Collection<JgResumeInfo> jgResumeInfoCollection = jgResumeInfoDtoList.stream()
.map(dto -> {
JgResumeInfo info = new JgResumeInfo();
......@@ -44,6 +42,6 @@ public class JgResumeInfoServiceImpl extends BaseService<JgResumeInfoDto,JgResum
return info;
})
.collect(Collectors.toList());
return this.saveBatch(jgResumeInfoCollection);
this.saveBatch(jgResumeInfoCollection);
}
}
\ No newline at end of file
......@@ -230,7 +230,7 @@ public class WordTemplateUtils {
/**
* 下载填充模板的字段,特殊符号转义
*/
private static Map<String, Object> escapeSpecialCharacters(Map<String, ?> inputMap) {
public static Map<String, Object> escapeSpecialCharacters(Map<String, ?> inputMap) {
Map<String, Object> escapedMap = new HashMap<>();
for (Map.Entry<String, ?> entry : inputMap.entrySet()) {
String key = entry.getKey();
......
......@@ -24,6 +24,6 @@ public interface JgFeignClient {
* 设备注册信息分页查询
* */
@RequestMapping(value = "/jg-resume-info/saveBatchResume", method = RequestMethod.POST)
FeignClientResult<Boolean> saveBatchResume(@RequestBody List<JgResumeInfoDto> jgResumeInfoDtoList);
FeignClientResult saveBatchResume(@RequestBody List<JgResumeInfoDto> jgResumeInfoDtoList);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment