significative 4 months ago
commit 4214855c29
  1. 65
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualCompPoint/controller/AnnualCompPointController.java
  2. 4
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcomp/controller/AnnualCompController.java
  3. 7
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/awardpersion/controller/AwardPersionController.java
  4. 65
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/chooseTopicPersion/controller/ChaoseTopicPersionController.java
  5. 7
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/controller/CompController.java
  6. 2
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/mapper/CompMapper.java
  7. 2
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/service/ICompService.java
  8. 4
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/service/impl/CompServiceImpl.java
  9. 9
      jeecgboot-vue3-master/src/views/annualCompPoint/superAdmin/AnnualCompPoint.api.ts
  10. 12
      jeecgboot-vue3-master/src/views/annualCompPoint/superAdmin/AnnualCompPoint.data.ts
  11. 5
      jeecgboot-vue3-master/src/views/annualCompPoint/superAdmin/AnnualCompPointListAwaitPass.vue
  12. 5
      jeecgboot-vue3-master/src/views/annualCompPoint/superAdmin/AnnualCompPointListAwaitReject.vue
  13. 5
      jeecgboot-vue3-master/src/views/annualCompPoint/superAdmin/AnnualCompPointListPass.vue

@ -198,6 +198,71 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
return Result.OK(pageList); return Result.OK(pageList);
} }
/**
* 组委会 待审核
* @param annualCompPoint
* @param pageNo
* @param pageSize
* @param req
* @return {@link Result}<{@link IPage}<{@link AnnualCompPoint}>>
*/
@GetMapping(value = "/listdsh")
public Result<IPage<AnnualCompPoint>> listdsh(AnnualCompPoint annualCompPoint,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<AnnualCompPoint> queryWrapper = QueryGenerator.initQueryWrapper(annualCompPoint, req.getParameterMap());
queryWrapper.eq("annual_comp_state","1");
Page<AnnualCompPoint> page = new Page<AnnualCompPoint>(pageNo, pageSize);
IPage<AnnualCompPoint> pageList = annualCompPointService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 组委会 已审核
* @param annualCompPoint
* @param pageNo
* @param pageSize
* @param req
* @return {@link Result}<{@link IPage}<{@link AnnualCompPoint}>>
*/
@GetMapping(value = "/listysh")
public Result<IPage<AnnualCompPoint>> listysh(AnnualCompPoint annualCompPoint,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<AnnualCompPoint> queryWrapper = QueryGenerator.initQueryWrapper(annualCompPoint, req.getParameterMap());
queryWrapper.eq("annual_comp_state","2");
Page<AnnualCompPoint> page = new Page<AnnualCompPoint>(pageNo, pageSize);
IPage<AnnualCompPoint> pageList = annualCompPointService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
*
* 组委会 带驳回
* @param annualCompPoint
* @param pageNo
* @param pageSize
* @param req
* @return {@link Result}<{@link IPage}<{@link AnnualCompPoint}>>
*/
@GetMapping(value = "/listdbh")
public Result<IPage<AnnualCompPoint>> listdbh(AnnualCompPoint annualCompPoint,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<AnnualCompPoint> queryWrapper = QueryGenerator.initQueryWrapper(annualCompPoint, req.getParameterMap());
queryWrapper.eq("annual_comp_state","3");
Page<AnnualCompPoint> page = new Page<AnnualCompPoint>(pageNo, pageSize);
IPage<AnnualCompPoint> pageList = annualCompPointService.page(page, queryWrapper);
return Result.OK(pageList);
}
/** /**
* 专家 显示所有 * 专家 显示所有

@ -369,8 +369,8 @@ public class AnnualCompController extends JeecgController<AnnualComp, IAnnualCom
if (annualCompVo.getEndtime() != null) { if (annualCompVo.getEndtime() != null) {
end = annualCompVo.getEndtime().getTime(); end = annualCompVo.getEndtime().getTime();
} }
if (start < end) { if (start > end) {
Result.error("开始时间不能于结束时间"); return Result.error("开始时间不能于结束时间");
} }
String compname = annualCompVo.getCompname(); String compname = annualCompVo.getCompname();
String annualname = annualCompVo.getAnnualname(); String annualname = annualCompVo.getAnnualname();

@ -514,10 +514,14 @@ public class AwardPersionController extends JeecgController<AwardPersion, IAward
QueryWrapper<AnnualCompAward> queryWrapperaca = QueryGenerator.initQueryWrapper(annualCompAward, request.getParameterMap()); QueryWrapper<AnnualCompAward> queryWrapperaca = QueryGenerator.initQueryWrapper(annualCompAward, request.getParameterMap());
queryWrapperaca.eq("annucompid",list.get(i).getAnnualCompP()); queryWrapperaca.eq("annucompid",list.get(i).getAnnualCompP());
List<AnnualCompAward> listaca = annualCompAwardService.list(queryWrapperaca); List<AnnualCompAward> listaca = annualCompAwardService.list(queryWrapperaca);
if(listaca.size()==0){
return Result.error("未设置年度比赛奖项");
}
TeamManagement teamManagement = new TeamManagement(); TeamManagement teamManagement = new TeamManagement();
QueryWrapper<TeamManagement> queryWrappertm = QueryGenerator.initQueryWrapper(teamManagement, request.getParameterMap()); QueryWrapper<TeamManagement> queryWrappertm = QueryGenerator.initQueryWrapper(teamManagement, request.getParameterMap());
queryWrappertm.eq("enroll_code",list.get(i).getEnrollCode()); queryWrappertm.eq("enroll_code",list.get(i).getEnrollCode());
List<TeamManagement> listtm = teamManagementService.list(queryWrappertm); List<TeamManagement> listtm = teamManagementService.list(queryWrappertm);
try {
for (int l = 0 ; l < listtm.size() ; l++){ for (int l = 0 ; l < listtm.size() ; l++){
SysUser sysUser = sysUserService.getById(listtm.get(l).getUserId()); SysUser sysUser = sysUserService.getById(listtm.get(l).getUserId());
list.get(i).setStudentorg(sysDepartService.queryDepartsByUsername(sysUser.getUsername()).get(0).getId()); list.get(i).setStudentorg(sysDepartService.queryDepartsByUsername(sysUser.getUsername()).get(0).getId());
@ -555,6 +559,9 @@ public class AwardPersionController extends JeecgController<AwardPersion, IAward
return Result.error("文件导入失败:第"+(i+1)+"行奖项名称不存在"); return Result.error("文件导入失败:第"+(i+1)+"行奖项名称不存在");
} }
} }
}catch (Exception e){
return Result.error("年度比赛奖项设置中的奖项名称为空,请先设置对应等级的奖项名称");
}
} }
//update-begin-author:taoyan date:20190528 for:批量插入数据 //update-begin-author:taoyan date:20190528 for:批量插入数据
long start = System.currentTimeMillis(); long start = System.currentTimeMillis();

@ -11,16 +11,21 @@ import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.apache.shiro.SecurityUtils;
import org.jeecg.common.api.CommonAPI; import org.jeecg.common.api.CommonAPI;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.vo.DictModel; import org.jeecg.common.system.vo.DictModel;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.util.oConvertUtils; import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.demo.anncomgrotop.entity.AnnComGroTop; import org.jeecg.modules.demo.anncomgrotop.entity.AnnComGroTop;
import org.jeecg.modules.demo.anncomgrotop.service.IAnnComGroTopService; import org.jeecg.modules.demo.anncomgrotop.service.IAnnComGroTopService;
import org.jeecg.modules.demo.anncomgrotopp.entity.AnnComGroTopP; import org.jeecg.modules.demo.anncomgrotopp.entity.AnnComGroTopP;
import org.jeecg.modules.demo.anncomgrotopp.service.IAnnComGroTopPService; import org.jeecg.modules.demo.anncomgrotopp.service.IAnnComGroTopPService;
import org.jeecg.modules.demo.annualCompPoint.entity.AnnualCompPoint;
import org.jeecg.modules.demo.annualCompPoint.service.IAnnualCompPointService; import org.jeecg.modules.demo.annualCompPoint.service.IAnnualCompPointService;
import org.jeecg.modules.demo.annualcomp.entity.AnnualComp;
import org.jeecg.modules.demo.annualcomp.service.IAnnualCompService;
import org.jeecg.modules.demo.annualcompetitionprojectregistration.entity.AnnualCompetitionProjectRegistration; import org.jeecg.modules.demo.annualcompetitionprojectregistration.entity.AnnualCompetitionProjectRegistration;
import org.jeecg.modules.demo.annualcompetitionprojectregistration.service.IAnnualCompetitionProjectRegistrationService; import org.jeecg.modules.demo.annualcompetitionprojectregistration.service.IAnnualCompetitionProjectRegistrationService;
import org.jeecg.modules.demo.chooseTopicPersion.entity.ChaoseTopicPersion; import org.jeecg.modules.demo.chooseTopicPersion.entity.ChaoseTopicPersion;
@ -33,6 +38,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.demo.comp.entity.Comp;
import org.jeecg.modules.demo.comp.service.ICompService;
import org.jeecg.modules.demo.topic.entity.Topic;
import org.jeecg.modules.demo.topic.service.ITopicService; import org.jeecg.modules.demo.topic.service.ITopicService;
import org.jeecg.modules.demo.upfile_persion.entity.UpfilePersion; import org.jeecg.modules.demo.upfile_persion.entity.UpfilePersion;
import org.jeecg.modules.demo.upfile_persion.service.IUpfilePersionService; import org.jeecg.modules.demo.upfile_persion.service.IUpfilePersionService;
@ -80,6 +88,10 @@ public class ChaoseTopicPersionController extends JeecgController<ChaoseTopicPer
private IAnnComGroTopPService annComGroTopPService; private IAnnComGroTopPService annComGroTopPService;
@Autowired @Autowired
private IUpfilePersionService upfilePersionService; private IUpfilePersionService upfilePersionService;
@Autowired
private IAnnualCompService annualCompService;
@Autowired
private ICompService compService;
/** /**
* 分页列表查询 * 分页列表查询
@ -98,6 +110,12 @@ public class ChaoseTopicPersionController extends JeecgController<ChaoseTopicPer
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) { HttpServletRequest req) {
QueryWrapper<ChaoseTopicPersion> queryWrapper = QueryGenerator.initQueryWrapper(chaoseTopicPersion, req.getParameterMap()); QueryWrapper<ChaoseTopicPersion> queryWrapper = QueryGenerator.initQueryWrapper(chaoseTopicPersion, req.getParameterMap());
//根据当前登录信息查询题目id,用list去接受
List<String> topicid =gettopicid();
if (topicid.isEmpty()){
return Result.error("请检查比赛流程,未发现选题信息。");
}
queryWrapper.in("timul",topicid);
Page<ChaoseTopicPersion> page = new Page<>(pageNo, pageSize); Page<ChaoseTopicPersion> page = new Page<>(pageNo, pageSize);
IPage<ChaoseTopicPersion> pageList = chaoseTopicPersionService.page(page, queryWrapper); IPage<ChaoseTopicPersion> pageList = chaoseTopicPersionService.page(page, queryWrapper);
List<ChooseDto> chooseDtos = new ArrayList<>(); List<ChooseDto> chooseDtos = new ArrayList<>();
@ -131,6 +149,53 @@ public class ChaoseTopicPersionController extends JeecgController<ChaoseTopicPer
return Result.OK(chooseDtos); return Result.OK(chooseDtos);
} }
//根据当前登录信息获取题目id,返回list
private List<String> gettopicid() {
List<String> topicids = new ArrayList<>();
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
//根据登录信息查询负责比赛
List<Comp> compList =compService.query().eq("comp_admin",loginUser.getUsername()).list();
//判空
if (compList.isEmpty()){
return topicids;
}
//将比赛的id放进一个list里面
List<String> compIds = compList.stream()
.map(Comp::getId) // 使用方法引用获取每个Comp对象的id
.collect(Collectors.toList()); // 收集到List中
//根据比赛的id查询年度比赛id,这里没有去卡年度
List<AnnualComp> annualCompList = annualCompService.query().in("compid",compIds).list();
//判空
if (annualCompList.isEmpty()){
return topicids;
}
//将年度比赛id存放到一个list里面
List<String> anncompIds = annualCompList.stream()
.map(AnnualComp::getId) // 使用方法引用获取每个Comp对象的id
.collect(Collectors.toList()); // 收集到List中
List<AnnualCompPoint> annualCompPointList = annualCompPointService.query().in("annual_comp_id", anncompIds).list();
//判空
if (annualCompPointList.isEmpty()){
return topicids;
}
//将年度比赛项目id存放到一个list里面
List<String> anncomppointIds = annualCompPointList.stream()
.map(AnnualCompPoint::getId) // 使用方法引用获取每个Comp对象的id
.collect(Collectors.toList()); // 收集到List中
//根据年度比赛项目id查询题目
List<Topic> topicList = topicService.query().in("annual_compid",anncomppointIds).list();
if (topicList.isEmpty()){
return topicids;
}
topicids =topicList.stream()
.map(Topic::getId) // 使用方法引用获取每个Comp对象的id
.collect(Collectors.toList()); // 收集到List中
return topicids;
}
@GetMapping(value = "/watch") @GetMapping(value = "/watch")
public Result<ChaoseTopicPersion> watch(String enrollCode) { public Result<ChaoseTopicPersion> watch(String enrollCode) {
QueryWrapper<ChaoseTopicPersion> queryWrapper = new QueryWrapper<>(); QueryWrapper<ChaoseTopicPersion> queryWrapper = new QueryWrapper<>();

@ -205,6 +205,11 @@ public class CompController extends JeecgController<Comp, ICompService> {
Integer compOrder = comp.getCompOrder(); Integer compOrder = comp.getCompOrder();
String departIds = comp.getCompOrgan(); String departIds = comp.getCompOrgan();
List<Comp> compListsss = compService.query().eq("comp_name",comp.getCompName()).list();
if (compListsss.size()>0){
return Result.error("这个比赛名称已存在,请确定比赛名称是否正确");
}
List<String> list = Arrays.asList(comp.getCompAdmin().split(",")); List<String> list = Arrays.asList(comp.getCompAdmin().split(","));
/* List list1 = new ArrayList<>(); /* List list1 = new ArrayList<>();
@ -266,7 +271,7 @@ public class CompController extends JeecgController<Comp, ICompService> {
System.out.println(compList.get(i).getCompOrder()); System.out.println(compList.get(i).getCompOrder());
int rankold = insertAndRank(parlint, String.valueOf(compList.get(i).getCompOrder())); int rankold = insertAndRank(parlint, String.valueOf(compList.get(i).getCompOrder()));
int scoreold = (int) (( rankold+1) * b + compTypeService.getById(comp.getCompTypeId()).getScorel()); int scoreold = (int) (( rankold+1) * b + compTypeService.getById(comp.getCompTypeId()).getScorel());
compService.updatedate(compList.get(i).getId(),scoreold); compService.updatedatework(compList.get(i).getId(),scoreold);
} }
} }
/*--------------------------王家东添加开始============================*/ /*--------------------------王家东添加开始============================*/

@ -30,5 +30,5 @@ public interface CompMapper extends BaseMapper<Comp> {
List<Comp> getAllCompByType(String compTypeId); List<Comp> getAllCompByType(String compTypeId);
@Update("UPDATE comp SET compweight = #{scoreold} WHERE id=#{id}") @Update("UPDATE comp SET compweight = #{scoreold} WHERE id=#{id}")
void updatedate(String id, int scoreold); void updatedatework(String id, int scoreold);
} }

@ -22,5 +22,5 @@ public interface ICompService extends IService<Comp> {
List<Comp> getAllCompByType(String compTypeId); List<Comp> getAllCompByType(String compTypeId);
void updatedate(String id, int scoreold); void updatedatework(String id, int scoreold);
} }

@ -42,7 +42,7 @@ public class CompServiceImpl extends ServiceImpl<CompMapper, Comp> implements IC
} }
@Override @Override
public void updatedate(String id, int scoreold) { public void updatedatework(String id, int scoreold) {
compMapper.updatedate(id,scoreold); compMapper.updatedatework(id,scoreold);
} }
} }

@ -6,6 +6,9 @@ const {createConfirm} = useMessage();
enum Api { enum Api {
listZJ = '/AnnualCompPoint/annualCompPoint/listZJ', listZJ = '/AnnualCompPoint/annualCompPoint/listZJ',
list = '/AnnualCompPoint/annualCompPoint/listAdmin', list = '/AnnualCompPoint/annualCompPoint/listAdmin',
listdsh = '/AnnualCompPoint/annualCompPoint/listdsh',
listdbh = '/AnnualCompPoint/annualCompPoint/listdbh',
listysh = '/AnnualCompPoint/annualCompPoint/listysh',
save = '/AnnualCompPoint/annualCompPoint/add', save = '/AnnualCompPoint/annualCompPoint/add',
edit = '/AnnualCompPoint/annualCompPoint/edit', edit = '/AnnualCompPoint/annualCompPoint/edit',
deleteOne = '/AnnualCompPoint/annualCompPoint/delete', deleteOne = '/AnnualCompPoint/annualCompPoint/delete',
@ -15,6 +18,12 @@ enum Api {
updatePass = '/AnnualCompPoint/annualCompPoint/updatePass', updatePass = '/AnnualCompPoint/annualCompPoint/updatePass',
} }
//待审核
export const listdsh = (params) => defHttp.get({ url: Api.listdsh, params });
//带驳回
export const listdbh = (params) => defHttp.get({ url: Api.listdbh, params });
//带已审核
export const listysh = (params) => defHttp.get({ url: Api.listysh, params });
/** /**
* api * api
* @param params * @param params

@ -59,6 +59,18 @@ export const columns: BasicColumn[] = [
return '待驳回'; return '待驳回';
case "4": case "4":
return '已驳回'; return '已驳回';
case "5":
return '已报名';
case "6":
return '已选题';
case "7":
return '已上传作品';
case "8":
return '已评分';
case "9":
return '已评奖';
case "10":
return '积分已汇总';
default: default:
return annualCompState.value; return annualCompState.value;
} }

@ -63,7 +63,7 @@ import {BasicTable, useTable, TableAction} from '/@/components/Table';
import {useListPage} from '/@/hooks/system/useListPage'; import {useListPage} from '/@/hooks/system/useListPage';
import {columns} from './AnnualCompPoint.data'; import {columns} from './AnnualCompPoint.data';
import { import {
list, listdsh,
deleteOne, deleteOne,
batchDelete, batchDelete,
getImportUrl, getImportUrl,
@ -87,7 +87,7 @@ const registerModal = ref();
const {prefixCls, tableContext, onExportXls, onImportXls} = useListPage({ const {prefixCls, tableContext, onExportXls, onImportXls} = useListPage({
tableProps: { tableProps: {
title: '年度比赛项目管理', title: '年度比赛项目管理',
api: list, api: listdsh,
columns, columns,
canResize: false, canResize: false,
useSearchForm: false, useSearchForm: false,
@ -96,7 +96,6 @@ const {prefixCls, tableContext, onExportXls, onImportXls} = useListPage({
fixed: 'right', fixed: 'right',
}, },
beforeFetch: (params) => { beforeFetch: (params) => {
queryParam.annualCompState=1;
return Object.assign(params, queryParam); return Object.assign(params, queryParam);
}, },
}, },

@ -64,7 +64,7 @@ import {BasicTable, useTable, TableAction} from '/@/components/Table';
import {useListPage} from '/@/hooks/system/useListPage'; import {useListPage} from '/@/hooks/system/useListPage';
import {columns} from './AnnualCompPoint.data'; import {columns} from './AnnualCompPoint.data';
import { import {
list, listdbh,
deleteOne, deleteOne,
batchDelete, batchDelete,
getImportUrl, getImportUrl,
@ -90,7 +90,7 @@ const registerModal1 = ref();
const {prefixCls, tableContext, onExportXls, onImportXls} = useListPage({ const {prefixCls, tableContext, onExportXls, onImportXls} = useListPage({
tableProps: { tableProps: {
title: '年度比赛项目管理', title: '年度比赛项目管理',
api: list, api: listdbh,
columns, columns,
canResize: false, canResize: false,
useSearchForm: false, useSearchForm: false,
@ -99,7 +99,6 @@ const {prefixCls, tableContext, onExportXls, onImportXls} = useListPage({
fixed: 'right', fixed: 'right',
}, },
beforeFetch: (params) => { beforeFetch: (params) => {
queryParam.annualCompState=3;
return Object.assign(params, queryParam); return Object.assign(params, queryParam);
}, },
}, },

@ -63,7 +63,7 @@ import {BasicTable, useTable, TableAction} from '/@/components/Table';
import {useListPage} from '/@/hooks/system/useListPage'; import {useListPage} from '/@/hooks/system/useListPage';
import {columns} from './AnnualCompPoint.data'; import {columns} from './AnnualCompPoint.data';
import { import {
list, listysh,
deleteOne, deleteOne,
batchDelete, batchDelete,
getImportUrl, getImportUrl,
@ -87,7 +87,7 @@ const registerModal = ref();
const {prefixCls, tableContext, onExportXls, onImportXls} = useListPage({ const {prefixCls, tableContext, onExportXls, onImportXls} = useListPage({
tableProps: { tableProps: {
title: '年度比赛项目管理', title: '年度比赛项目管理',
api: list, api: listysh,
// api: () => list({ ...params, compStatus: compStatus }), // api: () => list({ ...params, compStatus: compStatus }),
columns, columns,
canResize: false, canResize: false,
@ -97,7 +97,6 @@ const {prefixCls, tableContext, onExportXls, onImportXls} = useListPage({
fixed: 'right', fixed: 'right',
}, },
beforeFetch: (params) => { beforeFetch: (params) => {
queryParam.annualCompState=2;
return Object.assign(params, queryParam); return Object.assign(params, queryParam);
}, },
}, },

Loading…
Cancel
Save