|
|
@@ -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;
|
|
|
}
|
|
|
|
|
|
/**
|