package jnpf.limsController;
|
|
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
import jnpf.limsService.LimsWendingxingKaocaJihuaZhouqiService;
|
import jnpf.util.R;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.util.StringUtils;
|
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.Map;
|
|
@Tag(name = "lims稳定性考察计划检测执行接口", description = "稳定性考察计划周期检测执行")
|
@RestController
|
@RequestMapping("/lims/biz/wendingxing/kaoca/jiance")
|
public class LimsWendingxingKaocaJianceZhixingController {
|
|
@Autowired
|
private LimsWendingxingKaocaJihuaZhouqiService zhouqiService;
|
|
/**
|
* 执行稳定性考察计划周期检测并生成请验单。
|
*/
|
@Operation(summary = "稳定性考察计划检测执行")
|
@PostMapping("/zhixing")
|
public R<String> execute(@RequestBody Map<String, String> params) {
|
String jihuaZhouqiId = params == null ? null : params.get("jihua_zhouqi_id");
|
String zhixingBizSign = params == null ? null : params.get("zhixing_biz_sign");
|
if (!StringUtils.hasText(jihuaZhouqiId)) {
|
return R.error("计划周期ID(jihua_zhouqi_id)不能为空");
|
}
|
if (!StringUtils.hasText(zhixingBizSign)) {
|
return R.error("执行签名(zhixing_biz_sign)不能为空");
|
}
|
|
String qingyandanId = zhouqiService.executeJiance(
|
jihuaZhouqiId.trim(), zhixingBizSign.trim());
|
return R.success("执行成功", qingyandanId);
|
}
|
}
|