|
|
|
@ -24,6 +24,7 @@ import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
import javax.validation.Valid;
|
|
|
|
|
import java.io.File;
|
|
|
|
|
import java.util.Arrays;
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
@ -47,6 +48,9 @@ public class SysPdfTemplateController {
|
|
|
|
|
List<SystemPDFTemplateResponse> systemPDFTemplateResponseList = systemPDFTemplateEntityList.stream().map(item -> {
|
|
|
|
|
SystemPDFTemplateResponse systemPDFTemplateResponse = new SystemPDFTemplateResponse();
|
|
|
|
|
BeanUtils.copyProperties(item, systemPDFTemplateResponse);
|
|
|
|
|
if(item.getBussinessStatus()!=null){
|
|
|
|
|
systemPDFTemplateResponse.setBussinessStatusList(Arrays.asList(item.getBussinessStatus().split(",")));
|
|
|
|
|
}
|
|
|
|
|
return systemPDFTemplateResponse;
|
|
|
|
|
}).collect(Collectors.toList());
|
|
|
|
|
|
|
|
|
@ -115,7 +119,10 @@ public class SysPdfTemplateController {
|
|
|
|
|
|
|
|
|
|
SystemPDFTemplateEntity systemPDFTemplateEntity = new SystemPDFTemplateEntity();
|
|
|
|
|
BeanUtils.copyProperties(sysPdfTemplateSaveRequest, systemPDFTemplateEntity);
|
|
|
|
|
|
|
|
|
|
if(sysPdfTemplateSaveRequest.getBussinessStatusList().size()>0){
|
|
|
|
|
String bussinessStatus = String.join(",", sysPdfTemplateSaveRequest.getBussinessStatusList());
|
|
|
|
|
systemPDFTemplateEntity.setBussinessStatus(bussinessStatus);
|
|
|
|
|
}
|
|
|
|
|
systemPDFTemplateEntity.setCreate_time(new Date());
|
|
|
|
|
systemPDFTemplateEntity.setUpdate_time(new Date());
|
|
|
|
|
|
|
|
|
@ -131,6 +138,10 @@ public class SysPdfTemplateController {
|
|
|
|
|
@PostMapping("/system/pdf/template/update")
|
|
|
|
|
public BaseResponse update(@RequestBody SysPdfTemplateSaveRequest sysPdfTemplateSaveRequest) {
|
|
|
|
|
// systemPDFTemplateSaveRequest.setId(1);
|
|
|
|
|
if(sysPdfTemplateSaveRequest.getBussinessStatusList().size()>0){
|
|
|
|
|
String bussinessStatus = String.join(",", sysPdfTemplateSaveRequest.getBussinessStatusList());
|
|
|
|
|
sysPdfTemplateSaveRequest.setBussinessStatus(bussinessStatus);
|
|
|
|
|
}
|
|
|
|
|
sysPdfTemplateSaveRequest.setUpdate_time(new Date());
|
|
|
|
|
systemPDFTemplateService.updateById(sysPdfTemplateSaveRequest);
|
|
|
|
|
|
|
|
|
|