Browse Source

增加根据统一代码查询企业上报详细情况

nahida 1 năm trước cách đây
mục cha
commit
6c7a5a9e6e

+ 6 - 0
zksy-admin/src/main/java/com/zksy/web/controller/basicData/OwSelfReportingController.java

@@ -101,5 +101,11 @@ public class OwSelfReportingController extends BaseController {
     public void getUploadTemplate(HttpServletResponse response) throws IOException {
         DowntemplateUtil.downloadTemplate(response,"怀化高新区企业信用综合评价材料清单");
     }
+
+    @GetMapping("/checkInformationByUnicode")
+    @ApiOperation(value = "官网自主上报信息检查", notes = "官网自主上报信息检查")
+    public AjaxResult checkInformationByUnicode(String unicode) {
+        return service.checkInformationByUnicode(unicode);
+    }
 }
 

+ 2 - 1
zksy-framework/src/main/java/com/zksy/framework/config/SecurityConfig.java

@@ -132,7 +132,8 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
                         "/crmBusinessLicenseInformation/findByPage",
                         "/crmBusinessLicenseInformation/getById/{borrowId}",
                         "/commonFile/deleteFileById",
-                        "/owSelfReporting/downloadTemplateWord"
+                        "/owSelfReporting/downloadTemplateWord",
+                        "/owSelfReporting/checkInformationByUnicode"
                 ).permitAll()
                 .antMatchers(
                         HttpMethod.POST,

+ 2 - 0
zksy-system/src/main/java/com/zksy/system/basicData/service/OwSelfReportingService.java

@@ -42,4 +42,6 @@ public interface OwSelfReportingService extends IService<OwSelfReporting> {
      * @date 2024/5/21 09:28:14
      */
     AjaxResult removeOwSelfReporting(List<String> ids);
+
+    AjaxResult checkInformationByUnicode(String unicode);
 }

+ 18 - 0
zksy-system/src/main/java/com/zksy/system/basicData/service/impl/OwSelfReportingServiceImpl.java

@@ -1,7 +1,9 @@
 package com.zksy.system.basicData.service.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.zksy.common.core.domain.AjaxResult;
+import com.zksy.common.utils.StringUtil;
 import com.zksy.system.basicData.domain.CrmFile;
 import com.zksy.system.basicData.domain.OwSelfReporting;
 import com.zksy.system.basicData.mapper.OwSelfReportingMapper;
@@ -100,4 +102,20 @@ public class OwSelfReportingServiceImpl extends ServiceImpl<OwSelfReportingMappe
         mapper.deleteBatchIds(ids);
         return AjaxResult.success("删除文件成功");
     }
+
+    @Override
+    public AjaxResult checkInformationByUnicode(String unicode) {
+        if(StringUtil.isBlank(unicode)){
+            return AjaxResult.error("企业代码不能为空");
+        }
+        LambdaQueryWrapper<OwSelfReporting> wrapper = new LambdaQueryWrapper<>();
+        wrapper.eq(OwSelfReporting::getUnifiedSocialCreditCode,unicode);
+        List<OwSelfReporting> selfReportingList = mapper.selectList(wrapper);
+        selfReportingList.stream().forEach(q -> {
+            List<CrmFile> files = crmFileService.selectByFid(q.getId());
+            q.setFiles(files);
+            q.setContacts(q.getContacts().charAt(0)+"****");
+        });
+        return AjaxResult.success("查询成功",selfReportingList);
+    }
 }