18482106067 2 лет назад
Родитель
Сommit
3f0601dda9

+ 9 - 4
sckw-modules/sckw-contract/src/main/java/com/sckw/contract/service/CommonBusinessService.java

@@ -5,12 +5,11 @@ import com.alibaba.fastjson.JSONObject;
 import com.sckw.contract.dao.KwcContractLogisticsMapper;
 import com.sckw.contract.dao.KwcContractTradeMapper;
 import com.sckw.contract.model.dto.req.EsignGetFlowReqDto;
+import com.sckw.contract.model.dto.res.ESignSubmitResDto;
 import com.sckw.contract.model.entity.KwcContractLogistics;
 import com.sckw.contract.model.entity.KwcContractTrade;
-import com.sckw.contract.model.vo.req.ContractLogisticsReqVo;
 import com.sckw.contract.model.vo.req.ESignCallBackReqVo;
 import com.sckw.core.exception.SystemException;
-import com.sckw.core.model.enums.ContractTrackEnum;
 import com.sckw.core.utils.BeanUtils;
 import com.sckw.core.utils.OkHttpUtils;
 import com.sckw.core.web.constant.HttpStatus;
@@ -21,6 +20,7 @@ import com.sckw.system.api.model.dto.res.EntCacheResDto;
 import com.sckw.system.api.model.dto.res.UserCacheResDto;
 import org.apache.dubbo.config.annotation.DubboReference;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -61,6 +61,9 @@ public class CommonBusinessService {
     @Autowired
     private KwcContractTradeTrackService kwcContractTradeTrackService;
 
+    @Value("${eSignUrl}")
+    private String eSignUrl;
+
     /**
      * @return Map
      * @desc: 查企业
@@ -148,8 +151,10 @@ public class CommonBusinessService {
         esignGetFlowReqDto.setOrgSecondName(longListMap.get(orgSeconId).getFirmName());
         esignGetFlowReqDto.setPsnSecondAccount(secondAccount);
         Map<String, Object> map = BeanUtils.convertToMap(esignGetFlowReqDto);
-        String res = OkHttpUtils.doPostUploadFile("http://10.10.10.224:8840/v1/sign/getFlow", map);
+        String res = OkHttpUtils.doPostUploadFile(eSignUrl, map);
         //todo 解析返参,返参有流程id返回,表需要新加字段来存储
+        JSONObject.parseObject(res, ESignSubmitResDto.class);
+
     }
 
     public static File getFileByHttpURL(String newUrl, String fileName) {
@@ -159,7 +164,7 @@ public class CommonBusinessService {
         InputStream inputStream = null;
         OutputStream outputStream = null;
         try {
-            file = File.createTempFile("", fileName);
+            file = File.createTempFile("1", fileName);
             URL urlFile = new URL(newUrl);
             inputStream = urlFile.openStream();
             outputStream = new FileOutputStream(file);

+ 4 - 2
sckw-modules/sckw-manage/src/main/java/com/sckw/manage/service/CommonBusinessService.java

@@ -159,11 +159,13 @@ public class CommonBusinessService {
         //dubbo接口查用户和企业
         Long entId = LoginUserHolder.getEntId();
         List<Long> userIds = list.stream().map(CooperateManageQueryResDto::getCreateBy).distinct().toList();
+        List<Long> allEntIds = new ArrayList<>();
         List<Long> targetEntIds = list.stream().map(CooperateManageQueryResDto::getTargetEntId).distinct().toList();
         List<Long> ourEntIds = list.stream().map(CooperateManageQueryResDto::getOurEntId).distinct().toList();
-        targetEntIds.addAll(ourEntIds);
+        allEntIds.addAll(targetEntIds);
+        allEntIds.addAll(ourEntIds);
         List<UserCacheResDto> userCacheResDtos = remoteSystemService.queryUserCacheByIds(userIds);
-        List<EntCacheResDto> entCacheResDtos = remoteSystemService.queryEntCacheByIds(targetEntIds);
+        List<EntCacheResDto> entCacheResDtos = remoteSystemService.queryEntCacheByIds(allEntIds);
         Map<Long, String> userMap = new HashMap<>();
         Map<Long, String> entMap = new HashMap<>();
         if (!CollectionUtils.isEmpty(userCacheResDtos)) {

+ 4 - 2
sckw-modules/sckw-manage/src/main/java/com/sckw/manage/service/KwmCooperateApplyService.java

@@ -95,11 +95,13 @@ public class KwmCooperateApplyService {
         //dubbo接口查用户和企业
         Long entId = LoginUserHolder.getEntId();
         List<Long> userIds = list.stream().map(CooperateManageQueryResDto::getCreateBy).distinct().toList();
+        List<Long> allEntIds = new ArrayList<>();
         List<Long> targetEntIds = list.stream().map(CooperateManageQueryResDto::getTargetEntId).distinct().toList();
         List<Long> ourEntIds = list.stream().map(CooperateManageQueryResDto::getOurEntId).distinct().toList();
-        targetEntIds.addAll(ourEntIds);
+        allEntIds.addAll(ourEntIds);
+        allEntIds.addAll(targetEntIds);
         List<UserCacheResDto> userCacheResDtos = remoteSystemService.queryUserCacheByIds(userIds);
-        List<EntCacheResDto> entCacheResDtos = remoteSystemService.queryEntCacheByIds(targetEntIds);
+        List<EntCacheResDto> entCacheResDtos = remoteSystemService.queryEntCacheByIds(allEntIds);
         Map<Long, String> userMap = new HashMap<>();
         Map<Long, String> entMap = new HashMap<>();
         if (!CollectionUtils.isEmpty(userCacheResDtos)) {