|
@@ -9,7 +9,9 @@ import com.bowintek.smartsearch.model.CfApplyFormReviewer;
|
|
|
import com.bowintek.smartsearch.model.CfApplyFormReviewerExample;
|
|
|
import com.bowintek.smartsearch.model.CfApplyFormWellFile;
|
|
|
import com.bowintek.smartsearch.services.service.ApplyFormService;
|
|
|
+import com.bowintek.smartsearch.services.service.WellInfoService;
|
|
|
import com.bowintek.smartsearch.services.service.system.RoleService;
|
|
|
+import com.bowintek.smartsearch.util.StringUtils;
|
|
|
import com.bowintek.smartsearch.vo.user.UserInfoModel;
|
|
|
import com.github.pagehelper.PageHelper;
|
|
|
import com.github.pagehelper.PageInfo;
|
|
@@ -18,10 +20,7 @@ import org.springframework.stereotype.Component;
|
|
|
import org.springframework.transaction.annotation.Propagation;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
-import java.util.Date;
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.List;
|
|
|
-import java.util.UUID;
|
|
|
+import java.util.*;
|
|
|
|
|
|
@Component
|
|
|
public class ApplyFormServiceImpl implements ApplyFormService {
|
|
@@ -35,7 +34,11 @@ public class ApplyFormServiceImpl implements ApplyFormService {
|
|
|
@Autowired
|
|
|
private CfApplyFormWellFileMapper wellFileMapper;
|
|
|
@Autowired
|
|
|
+ private WellInfoService wellInfoService;
|
|
|
+ @Autowired
|
|
|
private RoleService roleService;
|
|
|
+ @Autowired
|
|
|
+ private StringUtils stringUtils;
|
|
|
|
|
|
@Override
|
|
|
public PageInfo<HashMap<String, Object>> selectApplyFormList(int page, int rows, String userID, String applyUserName, String reviewerUserId, String beginDate, String endDate) {
|
|
@@ -93,6 +96,25 @@ public class ApplyFormServiceImpl implements ApplyFormService {
|
|
|
@Override
|
|
|
public List<HashMap<String, Object>> selectApplyFormFileList( String applyId,Integer status,String applyUserId) {
|
|
|
List<HashMap<String, Object>> dataList = applyFormCQuery.selectApplyFormFileList(applyId,status,applyUserId);
|
|
|
+
|
|
|
+ String well_common_name = "";
|
|
|
+ List<HashMap<String, Object>> urlList = new ArrayList<>();
|
|
|
+ for(HashMap<String, Object> obj: dataList){
|
|
|
+ if(stringUtils.isNullOrBlank(obj.get("well_common_name")))
|
|
|
+ continue;
|
|
|
+
|
|
|
+ if(!well_common_name.equals(stringUtils.objectToString(obj.get("well_common_name")))){
|
|
|
+ well_common_name = stringUtils.objectToString(obj.get("well_common_name"));
|
|
|
+ urlList = wellInfoService.selectDataIndexListByWellCommonName(well_common_name);
|
|
|
+ }
|
|
|
+
|
|
|
+ if(urlList.size()>0){
|
|
|
+ HashMap<String, Object> item = urlList.stream().filter(x-> stringUtils.objectToString(obj.get("well_common_name")).equals(stringUtils.objectToString(x.get("well_common_name")))
|
|
|
+ && stringUtils.objectToString(obj.get("file_name")).equals(stringUtils.objectToString(x.get("file_name")))).findFirst().orElse(null);
|
|
|
+ if(item!=null)
|
|
|
+ obj.put("storage_path", stringUtils.objectToString(item.get("storage_path")));
|
|
|
+ }
|
|
|
+ }
|
|
|
return dataList;
|
|
|
}
|
|
|
}
|