|
|
|
@ -1,15 +1,12 @@ |
|
|
|
package org.springblade.desk.produce.controller; |
|
|
|
package org.springblade.desk.produce.controller; |
|
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.google.protobuf.ServiceException; |
|
|
|
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import io.swagger.v3.oas.annotations.Operation; |
|
|
|
import io.swagger.v3.oas.annotations.Operation; |
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag; |
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag; |
|
|
|
import jakarta.servlet.http.HttpServletRequest; |
|
|
|
|
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
import org.springblade.common.exception.BusinessException; |
|
|
|
|
|
|
|
import org.springblade.core.boot.ctrl.BladeController; |
|
|
|
import org.springblade.core.boot.ctrl.BladeController; |
|
|
|
import org.springblade.desk.oldv1.constant.Constant; |
|
|
|
import org.springblade.core.log.exception.ServiceException; |
|
|
|
import org.springblade.desk.oldv1.pojo.ResultInfo; |
|
|
|
import org.springblade.desk.oldv1.pojo.ResultInfo; |
|
|
|
import org.springblade.desk.produce.pojo.vo.*; |
|
|
|
import org.springblade.desk.produce.pojo.vo.*; |
|
|
|
import org.springblade.desk.quality.service.IReviewSheetService; |
|
|
|
import org.springblade.desk.quality.service.IReviewSheetService; |
|
|
|
@ -31,8 +28,8 @@ public class AiWebApiController extends BladeController { |
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/reviewResult") |
|
|
|
@PostMapping("/reviewResult") |
|
|
|
@Operation(summary = "审理结束回调接口") |
|
|
|
@Operation(summary = "审理结束回调接口") |
|
|
|
public ResultInfo reviewResult(HttpServletRequest request) throws Exception { |
|
|
|
public ResultInfo reviewResult(@RequestBody JSONObject params) { |
|
|
|
JSONObject params = (JSONObject) request.getAttribute(Constant.WEBAPI_REQUEST_PARAMETERS); |
|
|
|
log.info("审理结束回调接口 params = {}", params); |
|
|
|
if (params == null || params.isEmpty()) { |
|
|
|
if (params == null || params.isEmpty()) { |
|
|
|
throw new ServiceException("参数传递异常!"); |
|
|
|
throw new ServiceException("参数传递异常!"); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -46,7 +43,6 @@ public class AiWebApiController extends BladeController { |
|
|
|
Integer concedeQty = params.getInteger("concedeQty"); |
|
|
|
Integer concedeQty = params.getInteger("concedeQty"); |
|
|
|
String memo = params.getString("memo"); |
|
|
|
String memo = params.getString("memo"); |
|
|
|
qcReviewSheetService.reviewResult(trialId, resultStatus, reviewMan, liabilityPart, scrapQty, reworkQty, concedeQty, memo); |
|
|
|
qcReviewSheetService.reviewResult(trialId, resultStatus, reviewMan, liabilityPart, scrapQty, reworkQty, concedeQty, memo); |
|
|
|
log.error("审理结束回调接口{}", params.toJSONString()); |
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
log.error("审理结束回调接口{}", params.toJSONString(), e); |
|
|
|
log.error("审理结束回调接口{}", params.toJSONString(), e); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -54,13 +50,11 @@ public class AiWebApiController extends BladeController { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@PostMapping(value = "/deleteReviewOrder") |
|
|
|
@PostMapping(value = "/deleteReviewOrder") |
|
|
|
@Operation(summary = "审理结束回调接口") |
|
|
|
@Operation(summary = "审理单删除调用接口") |
|
|
|
public ResultInfo deleteReviewOrder(HttpServletRequest request) throws Exception { |
|
|
|
public ResultInfo deleteReviewOrder(@RequestBody JSONObject params) { |
|
|
|
JSONObject params = (JSONObject) request.getAttribute(Constant.WEBAPI_REQUEST_PARAMETERS); |
|
|
|
|
|
|
|
// 添加 调试log
|
|
|
|
|
|
|
|
log.info("审理单删除调用接口 params = {}", params); |
|
|
|
log.info("审理单删除调用接口 params = {}", params); |
|
|
|
if (params == null || params.size() == 0) { |
|
|
|
if (params == null || params.isEmpty()) { |
|
|
|
throw new BusinessException("参数传递异常!"); |
|
|
|
throw new ServiceException("参数传递异常!"); |
|
|
|
} |
|
|
|
} |
|
|
|
try { |
|
|
|
try { |
|
|
|
String trialId = params.getString("trialId"); |
|
|
|
String trialId = params.getString("trialId"); |
|
|
|
|