package jnpf.dmsController;
|
|
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
import jnpf.base.ActionResult;
|
import jnpf.dmsEntity.form.DmsDanganCundangDanganhePrintCallbackForm;
|
import jnpf.dmsService.DmsDanganCundangDanganhePrintCallbackService;
|
import jnpf.exception.DataException;
|
import lombok.RequiredArgsConstructor;
|
import lombok.extern.slf4j.Slf4j;
|
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RestController;
|
|
import java.util.List;
|
|
@Slf4j
|
@Tag(name = "DMS档案盒打印回调接口", description = "档案盒打印完成后的状态更新")
|
@RestController
|
@RequestMapping("/biz/dangan/cundang/danganhe")
|
@RequiredArgsConstructor
|
public class DmsDanganCundangDanganhePrintCallbackController {
|
|
private final DmsDanganCundangDanganhePrintCallbackService printCallbackService;
|
|
@Operation(summary = "档案盒打印回调")
|
@PostMapping("/print-callback")
|
public ActionResult<String> printCallback(
|
@RequestBody(required = false) List<DmsDanganCundangDanganhePrintCallbackForm> danganheList) {
|
try {
|
printCallbackService.markPrinted(danganheList);
|
return ActionResult.success("档案盒打印状态更新成功", "档案盒打印状态更新成功");
|
} catch (DataException e) {
|
log.warn("档案盒打印回调失败:{}", e.getMessage());
|
return ActionResult.fail(e.getMessage());
|
}
|
}
|
}
|