Commit ed83fa66 authored by 刘帅's avatar 刘帅

1.调整

parent 3bb3308e
...@@ -6,30 +6,22 @@ import com.github.pagehelper.PageHelper; ...@@ -6,30 +6,22 @@ import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.mall.domain.*;
import com.ruoyi.mall.domain.Bo.CheckOutReportBo; import com.ruoyi.mall.domain.Bo.CheckOutReportBo;
import com.ruoyi.mall.domain.Bo.CheckingOutParamBo; import com.ruoyi.mall.domain.Bo.CheckingOutParamBo;
import com.ruoyi.mall.domain.MallMemberUser;
import com.ruoyi.mall.domain.MemberReportIntelligence;
import com.ruoyi.mall.domain.ReportDraft;
import com.ruoyi.mall.domain.ReportIntelligence;
import com.ruoyi.mall.domain.Vo.*; import com.ruoyi.mall.domain.Vo.*;
import com.ruoyi.mall.mapper.MallAcceptPlanMapper;
import com.ruoyi.mall.mapper.MallAcceptRateSettingMapper;
import com.ruoyi.mall.mapper.MallMemberUserMapper; import com.ruoyi.mall.mapper.MallMemberUserMapper;
import com.ruoyi.mall.mapper.MallSchoolTagMapper;
import com.ruoyi.mall.service.*; import com.ruoyi.mall.service.*;
import com.ruoyi.mall.service.impl.MallCountMethodServiceImpl;
import com.sun.org.apache.xpath.internal.operations.Bool;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
import org.springframework.security.core.parameters.P;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/**志愿填报 自主选择*/ /**志愿填报 自主选择*/
......
...@@ -178,35 +178,35 @@ public class RandomUtil extends Random { ...@@ -178,35 +178,35 @@ public class RandomUtil extends Random {
super(seed); super(seed);
} }
public int[] nextInt(int n, int size) { // public int[] nextInt(int n, int size) {
if (size > n) { // if (size > n) {
size = n; // size = n;
} // }
//
Set set = new LinkedHashSet(); // Set set = new LinkedHashSet();
//
for (int i = 0; i < size; i++) { // for (int i = 0; i < size; i++) {
while (true) { // while (true) {
Integer value = new Integer(nextInt(n)); // Integer value = new Integer(nextInt(n));
//
if (!set.contains(value)) { // if (!set.contains(value)) {
set.add(value); // set.add(value);
//
break; // break;
} // }
} // }
} // }
//
int[] array = new int[set.size()]; // int[] array = new int[set.size()];
//
Iterator itr = set.iterator(); // Iterator itr = set.iterator();
//
for (int i = 0; i < array.length; i++) { // for (int i = 0; i < array.length; i++) {
array[i] = ((Integer)itr.next()).intValue(); // array[i] = (Integer) itr.next();
} // }
//
return array; // return array;
} // }
public void randomize(char[] array) { public void randomize(char[] array) {
int length = array.length; int length = array.length;
......
package com.ruoyi.mall.domain.Bo; package com.ruoyi.mall.domain.Bo;
import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.annotation.Excel;
import sun.awt.image.PixelConverter;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
......
package com.ruoyi.mall.service.impl; package com.ruoyi.mall.service.impl;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.mall.domain.BusinessBulletin;
import com.ruoyi.mall.domain.Vo.BusinessBulletinResponse; import com.ruoyi.mall.domain.Vo.BusinessBulletinResponse;
import com.ruoyi.mall.domain.Vo.BusinessBulletinVo; import com.ruoyi.mall.domain.Vo.BusinessBulletinVo;
import jdk.nashorn.internal.ir.annotations.Reference;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mall.mapper.BusinessBulletinMapper; import com.ruoyi.mall.mapper.BusinessBulletinMapper;
import com.ruoyi.mall.domain.BusinessBulletin;
import com.ruoyi.mall.service.IBusinessBulletinService; import com.ruoyi.mall.service.IBusinessBulletinService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
/** /**
* 公告Service业务层处理 * 公告Service业务层处理
* *
* @author ruoyi * @author ruoyi
* @date 2023-10-25 * @date 2023-10-25
*/ */
@Service @Service
public class BusinessBulletinServiceImpl implements IBusinessBulletinService public class BusinessBulletinServiceImpl implements IBusinessBulletinService
{ {
@Resource @Resource
private BusinessBulletinMapper businessBulletinMapper; private BusinessBulletinMapper businessBulletinMapper;
...@@ -57,7 +53,7 @@ public class BusinessBulletinServiceImpl implements IBusinessBulletinService ...@@ -57,7 +53,7 @@ public class BusinessBulletinServiceImpl implements IBusinessBulletinService
} }
/** /**
* 查询公告 * 查询公告
* *
* @param bulletinId 公告主键 * @param bulletinId 公告主键
* @return 公告 * @return 公告
*/ */
...@@ -69,7 +65,7 @@ public class BusinessBulletinServiceImpl implements IBusinessBulletinService ...@@ -69,7 +65,7 @@ public class BusinessBulletinServiceImpl implements IBusinessBulletinService
/** /**
* 查询公告列表 * 查询公告列表
* *
* @param businessBulletin 公告 * @param businessBulletin 公告
* @return 公告 * @return 公告
*/ */
...@@ -81,7 +77,7 @@ public class BusinessBulletinServiceImpl implements IBusinessBulletinService ...@@ -81,7 +77,7 @@ public class BusinessBulletinServiceImpl implements IBusinessBulletinService
/** /**
* 新增公告 * 新增公告
* *
* @param businessBulletin 公告 * @param businessBulletin 公告
* @return 结果 * @return 结果
*/ */
...@@ -94,7 +90,7 @@ public class BusinessBulletinServiceImpl implements IBusinessBulletinService ...@@ -94,7 +90,7 @@ public class BusinessBulletinServiceImpl implements IBusinessBulletinService
/** /**
* 修改公告 * 修改公告
* *
* @param businessBulletin 公告 * @param businessBulletin 公告
* @return 结果 * @return 结果
*/ */
...@@ -107,7 +103,7 @@ public class BusinessBulletinServiceImpl implements IBusinessBulletinService ...@@ -107,7 +103,7 @@ public class BusinessBulletinServiceImpl implements IBusinessBulletinService
/** /**
* 批量删除公告 * 批量删除公告
* *
* @param bulletinIds 需要删除的公告主键 * @param bulletinIds 需要删除的公告主键
* @return 结果 * @return 结果
*/ */
...@@ -119,7 +115,7 @@ public class BusinessBulletinServiceImpl implements IBusinessBulletinService ...@@ -119,7 +115,7 @@ public class BusinessBulletinServiceImpl implements IBusinessBulletinService
/** /**
* 删除公告信息 * 删除公告信息
* *
* @param bulletinId 公告主键 * @param bulletinId 公告主键
* @return 结果 * @return 结果
*/ */
......
package com.ruoyi.mall.service.impl; package com.ruoyi.mall.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.mall.domain.ContrastRecord;
import com.ruoyi.mall.domain.Vo.ContrastRecordVo; import com.ruoyi.mall.domain.Vo.ContrastRecordVo;
import com.ruoyi.mall.mapper.MallSchoolTagMapper;
import jdk.nashorn.internal.ir.annotations.Reference;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mall.mapper.ContrastRecordMapper; import com.ruoyi.mall.mapper.ContrastRecordMapper;
import com.ruoyi.mall.domain.ContrastRecord; import com.ruoyi.mall.mapper.MallSchoolTagMapper;
import com.ruoyi.mall.service.IContrastRecordService; import com.ruoyi.mall.service.IContrastRecordService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.List;
/** /**
* 添加对比记录Service业务层处理 * 添加对比记录Service业务层处理
* *
* @author ruoyi * @author ruoyi
* @date 2023-10-27 * @date 2023-10-27
*/ */
@Service @Service
public class ContrastRecordServiceImpl implements IContrastRecordService public class ContrastRecordServiceImpl implements IContrastRecordService
{ {
@Resource @Resource
private ContrastRecordMapper contrastRecordMapper; private ContrastRecordMapper contrastRecordMapper;
...@@ -29,7 +27,7 @@ public class ContrastRecordServiceImpl implements IContrastRecordService ...@@ -29,7 +27,7 @@ public class ContrastRecordServiceImpl implements IContrastRecordService
private MallSchoolTagMapper mallSchoolTagMapper; private MallSchoolTagMapper mallSchoolTagMapper;
/** /**
* 查询添加对比记录 * 查询添加对比记录
* *
* @param recordId 添加对比记录主键 * @param recordId 添加对比记录主键
* @return 添加对比记录 * @return 添加对比记录
*/ */
...@@ -41,7 +39,7 @@ public class ContrastRecordServiceImpl implements IContrastRecordService ...@@ -41,7 +39,7 @@ public class ContrastRecordServiceImpl implements IContrastRecordService
/** /**
* 查询添加对比记录列表 * 查询添加对比记录列表
* *
* @param contrastRecord 添加对比记录 * @param contrastRecord 添加对比记录
* @return 添加对比记录 * @return 添加对比记录
*/ */
...@@ -72,7 +70,7 @@ public class ContrastRecordServiceImpl implements IContrastRecordService ...@@ -72,7 +70,7 @@ public class ContrastRecordServiceImpl implements IContrastRecordService
/** /**
* 新增添加对比记录 * 新增添加对比记录
* *
* @param contrastRecord 添加对比记录 * @param contrastRecord 添加对比记录
* @return 结果 * @return 结果
*/ */
...@@ -85,7 +83,7 @@ public class ContrastRecordServiceImpl implements IContrastRecordService ...@@ -85,7 +83,7 @@ public class ContrastRecordServiceImpl implements IContrastRecordService
/** /**
* 修改添加对比记录 * 修改添加对比记录
* *
* @param contrastRecord 添加对比记录 * @param contrastRecord 添加对比记录
* @return 结果 * @return 结果
*/ */
...@@ -98,7 +96,7 @@ public class ContrastRecordServiceImpl implements IContrastRecordService ...@@ -98,7 +96,7 @@ public class ContrastRecordServiceImpl implements IContrastRecordService
/** /**
* 批量删除添加对比记录 * 批量删除添加对比记录
* *
* @param recordIds 需要删除的添加对比记录主键 * @param recordIds 需要删除的添加对比记录主键
* @return 结果 * @return 结果
*/ */
...@@ -110,7 +108,7 @@ public class ContrastRecordServiceImpl implements IContrastRecordService ...@@ -110,7 +108,7 @@ public class ContrastRecordServiceImpl implements IContrastRecordService
/** /**
* 删除添加对比记录信息 * 删除添加对比记录信息
* *
* @param recordId 添加对比记录主键 * @param recordId 添加对比记录主键
* @return 结果 * @return 结果
*/ */
......
package com.ruoyi.mall.service.impl; package com.ruoyi.mall.service.impl;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.mall.domain.*;
import com.ruoyi.mall.domain.Bo.CheckingOutParamBo; import com.ruoyi.mall.domain.Bo.CheckingOutParamBo;
import com.ruoyi.mall.domain.Bo.SchoolMajorLinkBO; import com.ruoyi.mall.domain.Bo.SchoolMajorLinkBO;
import com.ruoyi.mall.domain.*;
import com.ruoyi.mall.domain.Vo.MajorItemVo; import com.ruoyi.mall.domain.Vo.MajorItemVo;
import com.ruoyi.mall.mapper.*; import com.ruoyi.mall.mapper.*;
import jdk.nashorn.internal.ir.IfNode; import com.ruoyi.mall.service.IMallLinkMajorSchoolService;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.ruoyi.mall.service.IMallLinkMajorSchoolService;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.xml.bind.annotation.XmlRootElement; import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
/** /**
* 专业与学校关联Service业务层处理 * 专业与学校关联Service业务层处理
......
...@@ -118,6 +118,15 @@ ...@@ -118,6 +118,15 @@
v-hasPermi="['mall:mallSchool:export']" v-hasPermi="['mall:mallSchool:export']"
>导出</el-button> >导出</el-button>
</el-col> </el-col>
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="info"-->
<!-- plain-->
<!-- icon="el-icon-upload2"-->
<!-- size="mini"-->
<!-- @click="handleImport"-->
<!-- >导入</el-button>-->
<!-- </el-col>-->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
...@@ -482,6 +491,35 @@ ...@@ -482,6 +491,35 @@
</div> </div>
</el-dialog> </el-dialog>
<!-- 导入对话框 -->
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
<el-upload
ref="upload"
:limit="1"
accept=".xlsx, .xls"
:headers="upload.headers"
:action="upload.url + '?updateSupport=' + upload.updateSupport"
:disabled="upload.isUploading"
:on-progress="handleFileUploadProgress"
:on-success="handleFileSuccess"
:auto-upload="false"
drag
>
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
<div class="el-upload__tip text-center" slot="tip">
<div class="el-upload__tip" slot="tip">
<el-checkbox v-model="upload.updateSupport" /> 是否更新已经存在的用户数据
</div>
<span>仅允许导入xls、xlsx格式文件。</span>
</div>
</el-upload>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFileForm">确 定</el-button>
<el-button @click="upload.open = false">取 消</el-button>
</div>
</el-dialog>
<!-- 添加或修改学校对话框 --> <!-- 添加或修改学校对话框 -->
<el-dialog :title="title" :visible.sync="openAddSchoolUser" width="600px" append-to-body> <el-dialog :title="title" :visible.sync="openAddSchoolUser" width="600px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="110px"> <el-form ref="form" :model="form" :rules="rules" label-width="110px">
...@@ -601,6 +639,7 @@ import MallSchoolAccept from "@/views/mall/mallSchoolAccept"; ...@@ -601,6 +639,7 @@ import MallSchoolAccept from "@/views/mall/mallSchoolAccept";
import MallLinkMajorSchool from "@/views/mall/mallLinkMajorSchool"; import MallLinkMajorSchool from "@/views/mall/mallLinkMajorSchool";
import {selectTagList} from "@/api/mall/mallSchoolTag"; import {selectTagList} from "@/api/mall/mallSchoolTag";
import {selectLevelList} from "@/api/mall/mallConfigLevel"; import {selectLevelList} from "@/api/mall/mallConfigLevel";
import {getToken} from "@/utils/auth";
export default { export default {
name: "MallSchool", name: "MallSchool",
...@@ -673,6 +712,23 @@ export default { ...@@ -673,6 +712,23 @@ export default {
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
openAddSchoolUser: false, openAddSchoolUser: false,
// 导入参数
upload: {
// 是否显示弹出层
open: false,
// 弹出层标题
title: "",
// 是否禁用上传
isUploading: false,
// 是否更新已经存在的数据
updateSupport: 0,
// 是否更新已经存在的数据
communityId: undefined,
// 设置上传的请求头部
headers: { Authorization: "Bearer " + getToken() },
// 上传的地址
url: process.env.VUE_APP_BASE_API + "mall/mallSchool/importData"
},
// 查询参数 // 查询参数
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
...@@ -1137,7 +1193,28 @@ export default { ...@@ -1137,7 +1193,28 @@ export default {
selectSuggestList().then(response=>{ selectSuggestList().then(response=>{
this.suggestList = response.data this.suggestList = response.data
}) })
} },
/** 导入按钮操作 */
handleImport() {
this.upload.title = "学校导入";
this.upload.open = true;
},
// 文件上传中处理
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true;
},
// 文件上传成功处理
handleFileSuccess(response, file, fileList) {
this.upload.open = false;
this.upload.isUploading = false;
this.$refs.upload.clearFiles();
this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", { dangerouslyUseHTMLString: true });
this.getList();
},
// 提交上传文件
submitFileForm() {
this.$refs.upload.submit();
},
} }
}; };
</script> </script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment