|
|
@@ -8,6 +8,7 @@ import me.zhengjie.appapi.entity.UserAXQInfoEntity;
|
|
|
import me.zhengjie.appapi.mapper.IUserAXQInfoDao;
|
|
|
import me.zhengjie.appapi.service.UserAXQInfoService;
|
|
|
import me.zhengjie.appapi.util.FileUploadUtil;
|
|
|
+import me.zhengjie.appapi.util.StatusEnum.StepStatusEnum;
|
|
|
import me.zhengjie.base.ResponseDTO;
|
|
|
import me.zhengjie.base.ResultCode;
|
|
|
import me.zhengjie.modules.system.entity.OrderDocEntity;
|
|
|
@@ -26,10 +27,10 @@ import java.util.Date;
|
|
|
@Service
|
|
|
public class UserAXQInfoServiceImpl extends ServiceImpl<IUserAXQInfoDao, UserAXQInfoEntity>
|
|
|
implements UserAXQInfoService {
|
|
|
- @Value("${app.upload.path}")
|
|
|
- private String uplaodPath;
|
|
|
- @Value("${app.image.url}")
|
|
|
- private String imageURL;
|
|
|
+// @Value("${app.upload.path}")
|
|
|
+// private String uplaodPath;
|
|
|
+// @Value("${app.image.url}")
|
|
|
+// private String imageURL;
|
|
|
@Value("${spring.profiles.active}")
|
|
|
private String systemEnv;
|
|
|
@Autowired
|
|
|
@@ -149,6 +150,11 @@ public class UserAXQInfoServiceImpl extends ServiceImpl<IUserAXQInfoDao, UserAXQ
|
|
|
OrderDocEntity saveDocEntity = new OrderDocEntity();
|
|
|
saveDocEntity.setId(orderDocEntity.getId());
|
|
|
CFCACertUtil.proxySwitchOn = "dev".equals(systemEnv);
|
|
|
+ //得到路径
|
|
|
+ String orderType = StepStatusEnum.getType(Integer.valueOf(orderDocEntity.getContractId()));
|
|
|
+ String uplaodPath = orderDocEntity.getBusinessNo() + "/" + orderType + "/" ;
|
|
|
+
|
|
|
+
|
|
|
String path = uplaodPath + "signed-doc-" + entity.getIdCard() + "/";
|
|
|
try{
|
|
|
//通过文件得到文件的流
|
|
|
@@ -158,8 +164,8 @@ public class UserAXQInfoServiceImpl extends ServiceImpl<IUserAXQInfoDao, UserAXQ
|
|
|
saveDocEntity.setApplyContractNo(applyContractNo);
|
|
|
//
|
|
|
String filePath = CFCACertUtil.download(path, applyContractNo);
|
|
|
- String fileUrl = filePath.replaceAll(uplaodPath, imageURL);
|
|
|
- saveDocEntity.setAuthApply(fileUrl);
|
|
|
+ // String fileUrl = filePath.replaceAll(uplaodPath, imageURL);
|
|
|
+ saveDocEntity.setAuthApply(filePath);
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
@@ -171,8 +177,8 @@ public class UserAXQInfoServiceImpl extends ServiceImpl<IUserAXQInfoDao, UserAXQ
|
|
|
String confirmationContractNo = CFCACertUtil.uploadSignContract(notartyUser, inputStream,fileName);
|
|
|
saveDocEntity.setConfirmationContractNo(confirmationContractNo);
|
|
|
String filePath = CFCACertUtil.download(path, confirmationContractNo);
|
|
|
- String fileUrl = filePath.replaceAll(uplaodPath, imageURL);
|
|
|
- saveDocEntity.setAuthConfirmation(fileUrl);
|
|
|
+// String fileUrl = filePath.replaceAll(uplaodPath, imageURL);
|
|
|
+ saveDocEntity.setAuthConfirmation(filePath);
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
@@ -186,8 +192,8 @@ public class UserAXQInfoServiceImpl extends ServiceImpl<IUserAXQInfoDao, UserAXQ
|
|
|
saveDocEntity.setNoteContractNo(noteContractNo);
|
|
|
//
|
|
|
String filePath = CFCACertUtil.download(path, noteContractNo);
|
|
|
- String fileUrl = filePath.replaceAll(uplaodPath, imageURL);
|
|
|
- saveDocEntity.setAuthNote(fileUrl);
|
|
|
+// String fileUrl = filePath.replaceAll(uplaodPath, imageURL);
|
|
|
+ saveDocEntity.setAuthNote(filePath);
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
@@ -199,8 +205,8 @@ public class UserAXQInfoServiceImpl extends ServiceImpl<IUserAXQInfoDao, UserAXQ
|
|
|
saveDocEntity.setNoticeContractNo(noticeContractNo);
|
|
|
//
|
|
|
String filePath = CFCACertUtil.download(path, noticeContractNo);
|
|
|
- String fileUrl = filePath.replaceAll(uplaodPath, imageURL);
|
|
|
- saveDocEntity.setAuthNotice(fileUrl);
|
|
|
+ // String fileUrl = filePath.replaceAll(uplaodPath, imageURL);
|
|
|
+ saveDocEntity.setAuthNotice(filePath);
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
@@ -212,8 +218,8 @@ public class UserAXQInfoServiceImpl extends ServiceImpl<IUserAXQInfoDao, UserAXQ
|
|
|
saveDocEntity.setPromiseContractNo(promiseContractNo);
|
|
|
//
|
|
|
String filePath = CFCACertUtil.download(path, promiseContractNo);
|
|
|
- String fileUrl = filePath.replaceAll(uplaodPath, imageURL);
|
|
|
- saveDocEntity.setAuthPromise(fileUrl);
|
|
|
+ // String fileUrl = filePath.replaceAll(uplaodPath, imageURL);
|
|
|
+ saveDocEntity.setAuthPromise(filePath);
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
@@ -225,8 +231,8 @@ public class UserAXQInfoServiceImpl extends ServiceImpl<IUserAXQInfoDao, UserAXQ
|
|
|
saveDocEntity.setNotificationContractNo(notificaitonContractNo);
|
|
|
//
|
|
|
String filePath = CFCACertUtil.download(path, notificaitonContractNo);
|
|
|
- String fileUrl = filePath.replaceAll(uplaodPath, imageURL);
|
|
|
- saveDocEntity.setAuthNotification(fileUrl);
|
|
|
+// String fileUrl = filePath.replaceAll(uplaodPath, imageURL);
|
|
|
+ saveDocEntity.setAuthNotification(filePath);
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
}
|