Преглед изворни кода

fix 新增首页统计数据

Administrator пре 3 година
родитељ
комит
9ee9cf0763

+ 2 - 0
ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java

@@ -3,6 +3,7 @@ package com.ruoyi;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
+import org.springframework.context.annotation.ComponentScan;
 
 /**
  * 启动程序
@@ -10,6 +11,7 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
  * @author ruoyi
  */
 @SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
+@ComponentScan(value = {"com.ruoyi", "org.jeecg.modules.jmreport"})
 public class RuoYiApplication
 {
     public static void main(String[] args)

+ 1 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/BmProjectReportController.java

@@ -83,7 +83,7 @@ public class BmProjectReportController extends BaseController
     {
         List<BmProjectReport> list = bmProjectReportService.selectBmProjectReportList(bmProjectReport);
         ExcelUtil<BmProjectReport> util = new ExcelUtil<BmProjectReport>(BmProjectReport.class);
-        return util.exportExcel(list, "report");
+        return util.exportExcel(list, "项目上报");
     }
 
     /**

+ 4 - 4
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java

@@ -133,11 +133,11 @@ public class SysUserController extends BaseController
         {
             return AjaxResult.error("新增用户'" + user.getUserName() + "'失败,登录账号已存在");
         }
-        else if (StringUtils.isNotEmpty(user.getPhonenumber())
+/*        else if (StringUtils.isNotEmpty(user.getPhonenumber())
                 && UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user)))
         {
             return AjaxResult.error("新增用户'" + user.getUserName() + "'失败,手机号码已存在");
-        }
+        }*/
 /*        else if (StringUtils.isNotEmpty(user.getEmail())
                 && UserConstants.NOT_UNIQUE.equals(userService.checkEmailUnique(user)))
         {
@@ -158,11 +158,11 @@ public class SysUserController extends BaseController
     public AjaxResult edit(@Validated @RequestBody SysUser user)
     {
         userService.checkUserAllowed(user);
-        if (StringUtils.isNotEmpty(user.getPhonenumber())
+/*        if (StringUtils.isNotEmpty(user.getPhonenumber())
                 && UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user)))
         {
             return AjaxResult.error("修改用户'" + user.getUserName() + "'失败,手机号码已存在");
-        }
+        }*/
 /*        else if (StringUtils.isNotEmpty(user.getEmail())
                 && UserConstants.NOT_UNIQUE.equals(userService.checkEmailUnique(user)))
         {

+ 2 - 2
ruoyi-admin/src/main/resources/application.yml

@@ -9,8 +9,8 @@ ruoyi:
   # 实例演示开关
   demoEnabled: true
   # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
-#  profile: D:/ruoyi/uploadPath
-  profile: /usr/local/zhaoshang/upload
+  profile: D:/ruoyi/uploadPath
+#  profile: /usr/local/zhaoshang/upload
   # 获取ip地址开关
   addressEnabled: false
   # 验证码类型 math 数组计算 char 字符验证

+ 24 - 0
ruoyi-common/pom.xml

@@ -28,6 +28,30 @@
             <artifactId>aliyun-java-sdk-dysmsapi</artifactId>
             <version>1.0.0</version>
         </dependency>
+
+<!--        &lt;!&ndash;hutool&ndash;&gt;
+        <dependency>
+            <groupId>cn.hutool</groupId>
+            <artifactId>hutool-all</artifactId>
+            <version>5.7.8</version>
+        </dependency>-->
+        <!--积木-->
+        <dependency>
+            <groupId>org.jeecgframework.jimureport</groupId>
+            <artifactId>jimureport-spring-boot-starter</artifactId>
+            <version>1.3.75</version>
+        </dependency>
+        <!--宋体字体-->
+        <dependency>
+            <groupId>org.jeecgframework.jimureport</groupId>
+            <artifactId>jimureport-font</artifactId>
+            <version>1.1.0</version>
+        </dependency>
+<!--        <dependency>
+            <groupId>com.boman</groupId>
+            <artifactId>boman-report</artifactId>
+            <version>2.5.0-SNAPSHOT</version>
+        </dependency>-->
         <!-- Spring框架基本的核心工具 -->
         <dependency>
             <groupId>org.springframework</groupId>

+ 1 - 0
ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java

@@ -116,6 +116,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
                 .antMatchers("/common/upload").anonymous()
                 .antMatchers("/common/uploadBase").anonymous()
                 .antMatchers("/bmProjectReport/report").anonymous()
+                .antMatchers("/jmreport/**").anonymous()
                 /*以下为测试新增,上线删除*/
 
                 // 除上面外的所有请求全部需要鉴权认证

+ 8 - 7
ruoyi-system/src/main/java/com/ruoyi/system/domain/project/BmDeptPlanArea.java

@@ -20,13 +20,18 @@ public class BmDeptPlanArea extends BaseEntity
     private Long id;
 
     /** 部门id* */
-    @Excel(name = "部门id*")
+    //@Excel(name = "部门id*")
     private Long sysDeptId;
 
     /** 是否删除(0未删除、1已删除)* */
-    @Excel(name = "是否删除(0未删除、1已删除)*")
+    //@Excel(name = "是否删除(0未删除、1已删除)*")
     private Long isDel;
 
+    /**
+     * 部门名称
+     */
+    @Excel(name = "部门名称")
+    private String deptName;
     /** 年份 */
     @Excel(name = "年份")
     private String year;
@@ -95,11 +100,7 @@ public class BmDeptPlanArea extends BaseEntity
     @Excel(name = "新入规(个数)")
     private Integer projectNewNum;
 
-    /**
-     * 部门名称
-     */
-    @Excel(name = "部门名称")
-    private String deptName;
+
 
     public String getDeptName() {
         return deptName;

+ 20 - 18
ruoyi-system/src/main/java/com/ruoyi/system/domain/project/BmProjectReport.java

@@ -17,6 +17,11 @@ public class BmProjectReport extends BaseEntity
 
     /** 项目上报id */
     private Long id;
+    /**
+     * 投资方
+     */
+    @Excel(name = "投资方")
+    private String ivestor;
 
     /** 项目名称 */
     @Excel(name = "项目名称")
@@ -27,15 +32,25 @@ public class BmProjectReport extends BaseEntity
     private String investmentQuota;
 
     /** 联系人 */
-    @Excel(name = "联系人")
+    @Excel(name = "投资方联系人")
     private String contactsName;
 
     /** 联系方式 */
-    @Excel(name = "联系方式")
+    @Excel(name = "投资方联系方式")
     private String contactsPhone;
+    /**
+     * 引荐单位
+     */
+    @Excel(name = "项目引荐单位")
+    private String recommendCompany;
+    /**
+     * 引荐方联系方式
+     */
+    @Excel(name = "引荐方联系方式")
+    private String recommendPhone;
 
     /** 项目介绍 */
-    @Excel(name = "项目介绍")
+    //@Excel(name = "项目介绍")
     private String projectIntroduction;
 
     /** 上报状态 */
@@ -43,24 +58,11 @@ public class BmProjectReport extends BaseEntity
     private String reportStatus;
 
     /** 附件url */
-    @Excel(name = "附件url")
+    //@Excel(name = "附件url")
     private String url;
 
-    /**
-     * 投资方
-     */
-    private String ivestor;
-    /**
-     * 引荐单位
-     */
-    private String recommendCompany;
-    /**
-     * 引荐方联系方式
-     */
-    private String recommendPhone;
-
     /** 项目id* */
-    @Excel(name = "项目id*")
+    //@Excel(name = "项目id*")
     private Long bmProjectId;
 
 

+ 6 - 3
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/project/BmProjectInfoServiceImpl.java

@@ -3,6 +3,7 @@ package com.ruoyi.system.service.impl.project;
 import java.util.List;
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.SecurityUtils;
+import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.system.domain.project.BmProjectInfo;
 import com.ruoyi.system.domain.project.BmProjectReferral;
 import com.ruoyi.system.mapper.project.BmProjectInfoMapper;
@@ -66,9 +67,11 @@ public class BmProjectInfoServiceImpl implements IBmProjectInfoService
         List<BmProjectReferral> referralList = bmProjectInfo.getReferralList();
         if (referralList != null && referralList.size()> 0){
             for (BmProjectReferral bmProjectReferral : referralList) {
-                bmProjectReferral.setCreateBy(SecurityUtils.getUsername());
-                bmProjectReferral.setCreateTime(DateUtils.getNowDate());
-                bmProjectReferralMapper.insertBmProjectReferral(bmProjectReferral);
+                if (StringUtils.isNotBlank(bmProjectReferral.getSysDeptId())){
+                    bmProjectReferral.setCreateBy(SecurityUtils.getUsername());
+                    bmProjectReferral.setCreateTime(DateUtils.getNowDate());
+                    bmProjectReferralMapper.insertBmProjectReferral(bmProjectReferral);
+                }
             }
         }
         return bmProjectInfoMapper.insertBmProjectInfo(bmProjectInfo);

+ 2 - 2
ruoyi-ui/src/settings.js

@@ -1,7 +1,7 @@
 module.exports = {
   title: '招商引资管理系统',
-  urls: 'http://47.99.82.249:80',
-  // urls: 'http://192.168.101.11:8010',
+  //urls: 'http://47.99.82.249:80',
+   urls: 'http://192.168.101.11:8010',
 
   /**
    * 侧边栏主题 深色主题theme-dark,浅色主题theme-light

+ 11 - 9
ruoyi-ui/src/views/system/user/index.vue

@@ -634,14 +634,16 @@ export default {
     handleExport() {
       const queryParams = this.queryParams;
       this.$confirm('是否确认导出所有用户数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return exportUser(queryParams);
-        }).then(response => {
-          this.download(response.msg);
-        })
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        this.exportLoading = true;
+        return exportUser(queryParams);
+      }).then(response => {
+        this.download(response.msg);
+        this.exportLoading = false;
+      }).catch(() => {});
     },
     /** 导入按钮操作 */
     handleImport() {
@@ -672,4 +674,4 @@ export default {
     }
   }
 };
-</script>
+</script>

+ 5 - 5
ruoyi-ui/src/views/under/index.vue

@@ -161,7 +161,7 @@
             clearable
             :disabled="disfal"
             size="small"
-            style="width: 223px" 
+            style="width: 223px"
           />
         </el-form-item>
         <el-form-item label="投资方联系方式:" prop="phone" class="weiru">
@@ -259,7 +259,7 @@
           />
           <span class="souu">%</span>
         </el-form-item>
-        <el-form-item label="引荐方联系人:" prop="referral" style="width: 21%;margin-right: 0;">  
+        <el-form-item label="引荐方联系人:" prop="referral" style="width: 21%;margin-right: 0;">
           <el-input
             v-model="queryParams.referralList[1].referral"
             placeholder="请输入"
@@ -1431,10 +1431,10 @@ export default {
             //   this.queryParams.referralList[1].sysDeptId = this.queryParams.referralList[1].sysDeptId.pop()
             // }
             // this.queryParams.bmProjectId = this.bmProjectId
-            console.log(this.queryParams, 87);
+            //console.log(this.queryParams, 87);
             addConfigalking(this.queryParams).then((response) => {
-              console.log(response);
-              this.msgSuccess("新增成功");
+              //console.log(response);
+              //this.msgSuccess("新增成功");
               this.submitCtion();
             });
           }