Merge branch 'test' of https://git.will-way.cn/zgty/zt-qms into test
This commit is contained in:
@@ -103,6 +103,16 @@ public class ReportDocumentMainController extends AbstractFileUploadController i
|
||||
return reportDocumentMainService.execRemoveData(vo);
|
||||
}
|
||||
|
||||
@PutMapping("/doSave")
|
||||
@Operation(summary = "更新检测报告业务")
|
||||
//@PreAuthorize("@ss.hasPermission('qms:report-document-main:update')")
|
||||
public CommonResult<Boolean> doSave(@Valid @RequestBody ReportDocumentMainSaveReqVO updateReqVO) {
|
||||
updateReqVO.setCancelFlag("0");
|
||||
reportDocumentMainService.doSave(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新检测报告业务")
|
||||
//@PreAuthorize("@ss.hasPermission('qms:report-document-main:update')")
|
||||
|
||||
@@ -6,6 +6,7 @@ import jakarta.validation.constraints.NotEmpty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 检测报告业务新增/修改 Request VO")
|
||||
@Data
|
||||
@@ -94,5 +95,7 @@ public class ReportDocumentMainSaveReqVO {
|
||||
@Schema(description = "委托id,支持多值")
|
||||
private String businessSampleEntrustRegistrationIds;
|
||||
|
||||
@Schema(description = "报表数据明细,用于保存【备注】等数据")
|
||||
private List<ReportDocumentDataSaveReqVO> reportDocumentDataList;
|
||||
|
||||
}
|
||||
@@ -60,7 +60,7 @@ public class ReportDocumentDataDO extends BusinessBaseDO {
|
||||
/**
|
||||
* 附加内容
|
||||
*/
|
||||
@TableField("DOC_CNTT")
|
||||
@TableField("EXT_CNTT")
|
||||
private String externalContent;
|
||||
|
||||
//样品编号
|
||||
|
||||
@@ -44,6 +44,8 @@ public interface ReportDocumentDataService {
|
||||
*/
|
||||
void updateReportDocumentData(@Valid ReportDocumentDataSaveReqVO updateReqVO);
|
||||
|
||||
void updateBatch(List<ReportDocumentDataSaveReqVO> list);
|
||||
|
||||
/**
|
||||
* 删除检测报告明细
|
||||
*
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -30,6 +30,9 @@ public interface ReportDocumentMainService {
|
||||
|
||||
void updateCommonField(ReportDocumentMainDO reportDocumentMainDO);
|
||||
|
||||
//保存报告
|
||||
void doSave(@Valid ReportDocumentMainSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 创建检测报告业务
|
||||
*
|
||||
@@ -45,6 +48,7 @@ public interface ReportDocumentMainService {
|
||||
*/
|
||||
void updateReportDocumentMain(@Valid ReportDocumentMainSaveReqVO updateReqVO);
|
||||
|
||||
|
||||
/**
|
||||
* 删除检测报告业务
|
||||
*
|
||||
|
||||
@@ -176,6 +176,19 @@ public class ReportDocumentMainServiceImpl implements ReportDocumentMainService,
|
||||
return reportDocumentDataService.removeByMainIdAndDetailIds(id, reportDocumentDataIdsList);
|
||||
}
|
||||
|
||||
//保存报告
|
||||
@Override
|
||||
public void doSave(ReportDocumentMainSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateReportDocumentMainExists(updateReqVO.getId());
|
||||
// 更新
|
||||
ReportDocumentMainDO updateObj = BeanUtils.toBean(updateReqVO, ReportDocumentMainDO.class);
|
||||
reportDocumentMainMapper.updateById(updateObj);
|
||||
List<ReportDocumentDataSaveReqVO> reportDocumentDataList = updateReqVO.getReportDocumentDataList();
|
||||
if(!reportDocumentDataList.isEmpty())
|
||||
reportDocumentDataService.updateBatch(reportDocumentDataList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReportDocumentMainRespVO createReportDocumentMain(ReportDocumentMainSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
|
||||
Reference in New Issue
Block a user