fix:细节调整

This commit is contained in:
FCL
2025-12-22 14:13:26 +08:00
parent 8977be538d
commit dd63f9e1dc
2 changed files with 6 additions and 1 deletions

View File

@@ -30,6 +30,7 @@ import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.validation.Valid;
import lombok.extern.slf4j.Slf4j;
import org.springframework.util.ObjectUtils;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@@ -46,6 +47,7 @@ import static com.zt.plat.module.qms.enums.ErrorCodeConstants.REPORT_DOCUMENT_TY
@RestController
@RequestMapping("/qms/report-document-main")
@Validated
@Slf4j
@FileUploadController(source = "qms.reportdocumentmain")
public class ReportDocumentMainController extends AbstractFileUploadController implements BusinessControllerMarker{

View File

@@ -120,7 +120,10 @@ public class ReportDocumentAssistService {
String templateContent = templateDO.getFormContent();
JSONObject templateData = new JSONObject();
JSONArray tableList = data.getJSONArray(0);
templateData.put("headerData", tableList.getJSONObject(0).clone());
JSONObject headerData = new JSONObject();
if(tableList != null && !tableList.isEmpty())
headerData = tableList.getJSONObject(0).clone();
templateData.put("headerData", headerData);
templateData.put("tableList", tableList);
templateData.put("formData", mainDO.getFormData());
templateData.put("signatureData", mainDO.getDocumentSignature());