|
|
@@ -5,7 +5,6 @@ import com.alibaba.fastjson.JSONObject;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import me.zhengjie.annotation.rest.AnonymousPostMapping;
|
|
|
-import me.zhengjie.application.bank.service.ApiBankService;
|
|
|
import me.zhengjie.application.bank.service.BankNotarizeService;
|
|
|
import me.zhengjie.application.bank.service.UserAXQInfoService;
|
|
|
import me.zhengjie.base.ResponseDTO;
|
|
|
@@ -29,21 +28,23 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
public class BankNotarizeController {
|
|
|
private final OrderFileRepository orderFileRepository;
|
|
|
private final UserAXQInfoService userAXQInfoService;
|
|
|
- private final ApiBankService apiBankService;
|
|
|
private final BankNotarizeService bankNotarizeService;
|
|
|
private final TencentHumanFaceVerify faceVerify;
|
|
|
|
|
|
- // 得到公证书
|
|
|
+ /**
|
|
|
+ * 获取签名公证书URL
|
|
|
+ *
|
|
|
+ * @param json
|
|
|
+ * @return
|
|
|
+ */
|
|
|
@RequestMapping("/getNotarization")
|
|
|
public ResponseDTO<?> getNotarization(@RequestBody String json) {
|
|
|
JSONObject jsonObj = JSONObject.parseObject(json);
|
|
|
String businessNo = jsonObj.getString("businessNo");
|
|
|
- String prodId = jsonObj.getString("prodId");
|
|
|
- if (StringUtils.isEmpty(businessNo) || StringUtils.isEmpty(prodId)) {
|
|
|
+ if (StringUtils.isEmpty(businessNo)) {
|
|
|
return ResponseDTO.error(ResultCode.PARAM_IS_BLANK);
|
|
|
}
|
|
|
- OrderFileEntity orderFile = orderFileRepository.getOrderNotarization(prodId, businessNo);
|
|
|
- //
|
|
|
+ OrderFileEntity orderFile = orderFileRepository.getOrderNotarization(businessNo);
|
|
|
return ResponseDTO.success(FileUploadUtil.getPreviewUrl(orderFile.getSignedPdfUrl()));
|
|
|
}
|
|
|
|
|
|
@@ -84,11 +85,10 @@ public class BankNotarizeController {
|
|
|
|
|
|
JSONObject jsonObj = JSONObject.parseObject(json);
|
|
|
String businessNo = jsonObj.getString("businessNo");
|
|
|
- String prodId = jsonObj.getString("prodId");
|
|
|
- if (StringUtils.isEmpty(businessNo) || StringUtils.isEmpty(prodId)) {
|
|
|
+ if (StringUtils.isEmpty(businessNo)) {
|
|
|
return ResponseDTO.error(ResultCode.PARAM_IS_BLANK);
|
|
|
}
|
|
|
- ResponseDTO<?> order = this.apiBankService.getOrderPDF(businessNo,prodId);
|
|
|
+ ResponseDTO<?> order = bankNotarizeService.getOrderPDF(businessNo);
|
|
|
|
|
|
return order;
|
|
|
}
|
|
|
@@ -98,12 +98,11 @@ public class BankNotarizeController {
|
|
|
|
|
|
JSONObject jsonObj = JSONObject.parseObject(json);
|
|
|
String businessNo = jsonObj.getString("businessNo");
|
|
|
- String prodId = jsonObj.getString("prodId");
|
|
|
- if (StringUtils.isEmpty(businessNo) || StringUtils.isEmpty(prodId)) {
|
|
|
+ if (StringUtils.isEmpty(businessNo)) {
|
|
|
return ResponseDTO.error(ResultCode.PARAM_IS_BLANK);
|
|
|
}
|
|
|
//
|
|
|
- OrderFileEntity orderFile = orderFileRepository.getOrderNote(businessNo,prodId);
|
|
|
+ OrderFileEntity orderFile = orderFileRepository.getOrderNote(businessNo);
|
|
|
// pdf的地址预览
|
|
|
String noteUrl = FileUploadUtil.getPreviewUrl(orderFile.getHtmlUrl());
|
|
|
|
|
|
@@ -145,11 +144,10 @@ public class BankNotarizeController {
|
|
|
public ResponseDTO<?> uploadSeal(@RequestBody String json) {
|
|
|
JSONObject jsonObj = JSONObject.parseObject(json);
|
|
|
String businessNo = jsonObj.getString("businessNo");
|
|
|
- String contractNo = jsonObj.getString("contractNo");
|
|
|
JSONArray jsonArray = jsonObj.getJSONArray("signInfo");
|
|
|
if (StringUtils.isEmpty(businessNo) || jsonArray == null) {
|
|
|
return ResponseDTO.error(ResultCode.PARAM_IS_BLANK);
|
|
|
}
|
|
|
- return userAXQInfoService.uploadSeal(businessNo, contractNo, jsonArray);
|
|
|
+ return userAXQInfoService.uploadSeal(businessNo, jsonArray);
|
|
|
}
|
|
|
}
|