Bladeren bron

OrderDoc纵表变横表

sakuya 3 jaren geleden
bovenliggende
commit
aec6e14f00

+ 1 - 1
eladmin-system/src/main/java/me/zhengjie/appapi/service/impl/UserAXQInfoServiceImpl.java

@@ -154,7 +154,7 @@ public class UserAXQInfoServiceImpl extends ServiceImpl<IUserAXQInfoDao, UserAXQ
 		//
 		List<OrderFileEntity> orderFileList = orderFileRepository.getOrderFileListByCodes(contractId, "1,2,3,4,5,6,7,8,9".split(","));
 		CFCACertUtil.proxySwitchOn = "dev".equals(systemEnv);
-		String orderType = StepStatusEnum.getType(Integer.valueOf(contractId));
+		String orderType = StepStatusEnum.getType(contractId);
 		String uplaodPath = orderFileList.get(0).getBusinessNo() + "/" + orderType + "/";
 		String path = uplaodPath + "signed-doc-" + entity.getIdCard() + "/";
 		for (OrderFileEntity orderFile : orderFileList) {

+ 10 - 3
eladmin-system/src/main/java/me/zhengjie/dao/OrderFileRepository.java

@@ -25,7 +25,7 @@ public class OrderFileRepository {
         QueryWrapper<OrderFileEntity> qw = new QueryWrapper<>();
         qw.eq("contract_id", contractId);
         qw.in("code", codes);
-        qw.orderByAsc("sord_num");
+        qw.orderByAsc("sort_num");
         return orderFileMapper.selectList(qw);
     }
 
@@ -39,7 +39,10 @@ public class OrderFileRepository {
     public OrderFileEntity getOrderFileByCode(String contractId, String code) {
         String[] codes = {code};
         List<OrderFileEntity> orderFileList = getOrderFileListByCodes(contractId, codes);
-        return orderFileList.get(0);
+        if (orderFileList != null && orderFileList.size() > 0) {
+            return orderFileList.get(0);
+        }
+        return null;
     }
 
     /**
@@ -65,7 +68,11 @@ public class OrderFileRepository {
      * @return
      */
     public OrderFileEntity getOrderNote(String contractId) {
-        return getOrderFileListByCodes(contractId, "6,7,8,9".split(",")).get(0);
+        List<OrderFileEntity> orderFileList = getOrderFileListByCodes(contractId, "6,7,8,9".split(","));
+        if (orderFileList != null && orderFileList.size() > 0) {
+            return orderFileList.get(0);
+        }
+        return null;
     }
 
     /**

+ 3 - 2
eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/NotaryOrderServiceImpl.java

@@ -721,8 +721,9 @@ public class NotaryOrderServiceImpl extends ServiceImpl<NotaryOrderMapper, Notar
 		for (OrderFileEntity orderFile : orderFileList) {
 			Map<String, String> content = new HashMap<>();
 			String fileUrl = StringUtils.isEmpty(orderFile.getSignedPdfUrl()) ? orderFile.getPdfUrl() : orderFile.getSignedPdfUrl();
-			map.put("name", map.get(orderFile.getCode()));
-			map.put("value", getPreviewUrl(fileUrl));
+			content.put("name", map.get(orderFile.getCode()));
+			content.put("value", getPreviewUrl(fileUrl));
+			fileList.add(content);
 		}
 		response.setData(new ResultData(fileList));
 		return response;