ソースを参照

+ 交通强国小程序变更

chen.cheng 9 ヶ月 前
コミット
ad70c83741

+ 2 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/CpsUsrApply.java

@@ -3,6 +3,7 @@ package com.ruoyi.system.domain;
 import com.alibaba.fastjson2.JSONArray;
 import com.ruoyi.common.annotation.Excel;
 import com.ruoyi.common.core.domain.BaseEntity;
+import com.ruoyi.system.excel.impl.FollowsJsonHandle;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 
@@ -84,6 +85,7 @@ public class CpsUsrApply extends BaseEntity {
 
     Long themeId;
 
+    @Excel(name = "随行人员" , handler = FollowsJsonHandle.class)
     String followsJson;
 
     @Excel(name = "与会主题")

+ 32 - 0
ruoyi-system/src/main/java/com/ruoyi/system/excel/JSONHandle.java

@@ -0,0 +1,32 @@
+package com.ruoyi.system.excel;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONArray;
+import com.ruoyi.common.utils.poi.ExcelHandlerAdapter;
+import org.apache.commons.lang3.ObjectUtils;
+import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.CellStyle;
+import org.apache.poi.ss.usermodel.HorizontalAlignment;
+import org.apache.poi.ss.usermodel.VerticalAlignment;
+import org.apache.poi.ss.usermodel.Workbook;
+
+public abstract class JSONHandle implements ExcelHandlerAdapter {
+
+    @Override
+    public Object format(Object value, String[] args, Cell cell, Workbook wb) {
+        if (ObjectUtils.isNotEmpty(value)) {
+            // 自定义用户名为若依/单元格文字设置为红色
+            CellStyle style = wb.createCellStyle();
+            style.setAlignment(HorizontalAlignment.LEFT);
+            style.setVerticalAlignment(VerticalAlignment.CENTER);
+            // 设置换行属性
+            style.setWrapText(true);
+            JSONArray objects = JSON.parseArray(value.toString());
+            value = formatJSON(objects);
+            cell.setCellStyle(style);
+        }
+        return value;
+    }
+
+    public abstract String formatJSON(JSONArray value);
+}

+ 21 - 0
ruoyi-system/src/main/java/com/ruoyi/system/excel/impl/FollowsJsonHandle.java

@@ -0,0 +1,21 @@
+package com.ruoyi.system.excel.impl;
+
+import com.alibaba.fastjson2.JSONArray;
+import com.alibaba.fastjson2.JSONObject;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.system.excel.JSONHandle;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class FollowsJsonHandle extends JSONHandle {
+    @Override
+    public String formatJSON(JSONArray value) {
+        List<String> result = new ArrayList<>(value.size());
+        for (Object object : value) {
+            JSONObject jsonObject = (JSONObject) object;
+            result.add(String.format("姓名:%s \n手机号:%s" , jsonObject.getString("usrName"), jsonObject.getString("tel")));
+        }
+        return StringUtils.join(result, "\n");
+    }
+}

+ 2 - 2
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CpsMeetingUsrServiceImpl.java

@@ -192,11 +192,11 @@ public class CpsMeetingUsrServiceImpl implements ICpsMeetingUsrService {
         user.setUsrWechatId(loginUser.getUserId());
         user.setApplyType(MeetingType.MEETING.getCode());
         user.setDeptId(appCfg.getRoleTopDeptId());
-        if (SysYesNo.YES.getCode().equals(user.getConferenceFlag())) {
+        if (SysYesNo.YES.getCode().equals(user.getConferenceFlag()) && ObjectUtils.isNotEmpty(user.getContentId())) {
             CpsContentInfo cpsContentInfo = contentInfoMapper.selectCpsContentInfoById(user.getContentId());
             user.setContentTitle(cpsContentInfo.getTitle());
         }
-        if (SysYesNo.YES.getCode().equals(user.getThemeFlag())) {
+        if (SysYesNo.YES.getCode().equals(user.getThemeFlag())&& ObjectUtils.isNotEmpty(user.getThemeId())) {
             CpsContentInfo cpsContentInfo = contentInfoMapper.selectCpsContentInfoById(user.getThemeId());
             user.setThemeTitle(cpsContentInfo.getTitle());
         }

+ 1 - 1
ruoyi-ui/.env.development

@@ -7,6 +7,6 @@ ENV = 'development'
 # 若依管理系统/开发环境
 VUE_APP_BASE_API = '/dev-api'
 
-VUE_APP_BASE_URL = 'http://127.0.0.1:18080/tfc'
+VUE_APP_BASE_URL = 'https://www.lj-info.com:8090/prod-api'
 # 路由懒加载
 VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 18 - 3
ruoyi-ui/src/views/cp/usrApply/index.vue

@@ -68,7 +68,6 @@
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
       </el-form-item>
     </el-form>
-
     <el-row :gutter="10" class="mb8">
       <el-col :span="1.5">
         <el-button
@@ -155,11 +154,27 @@
           <dict-tag :options="dict.type.met_usr_type" :value="scope.row.usrType" />
         </template>
       </el-table-column>
-      <el-table-column label="现场调研" align="center" prop="conferenceFlag" width="80" v-if="this.applyType == 1">
+      <el-table-column label="现场调研" align="center" prop="conferenceFlag" width="80">
         <template slot-scope="scope">
           <dict-tag :options="dict.type.conference_flag" :value="scope.row.conferenceFlag" />
         </template>
       </el-table-column>
+      <el-table-column label="会场信息" align="center" prop="contentTitle" width="150" />
+      <el-table-column label="主题调研" align="center" prop="themeFlag" width="80">
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.conference_flag" :value="scope.row.themeFlag" />
+        </template>
+      </el-table-column>
+      <el-table-column label="随行人员" align="left" prop="follows" width="180">
+        <template slot-scope="scope">
+          <div v-for="(item,index) in JSON.parse(scope.row.followsJson)" :key="index">
+            <span>姓名:{{ item.usrName }}</span>
+            <br />
+            <span>手机号:{{ item.tel }}</span>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column label="调研主题" align="center" prop="themeTile" width="150" />
       <el-table-column label="申请类型" align="center" prop="applyType" width="100">
         <template slot-scope="scope">
           <dict-tag :options="dict.type.apply_type" :value="scope.row.applyType" />
@@ -184,7 +199,7 @@
         </template>
       </el-table-column>
       <el-table-column label="审核信息" align="center" prop="reviewMsg" width="150" show-overflow-tooltip />
-      <el-table-column label="与会内容" align="center" prop="contentTitle" width="150" />
+      <el-table-column label="会场信息" align="center" prop="contentTitle" width="150" />
       <el-table-column label="来程方式" align="center" prop="wayComing" width="100">
         <template slot-scope="scope">
           <dict-tag :options="dict.type.tfc_type" :value="scope.row.wayComing" />