JayChou 4 months ago
commit e4dadea0ca
  1. 2
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java
  2. 6
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/awardpersion/controller/AwardPersionController.java
  3. 9
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/chooseTopicPersion/controller/ChaoseTopicPersionController.java
  4. 7
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/homepage/controller/UserHomePageController.java
  5. 36
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/homepage/service/UserHomePageServiceImpl.java
  6. 12
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/topic/controller/TopicController.java
  7. 14
      jeecgboot-vue3-master/src/views/annualcompetitionprojectregistration/student/AnnualCompetitionProjectRegistration.data.ts
  8. 6
      jeecgboot-vue3-master/src/views/annualcompetitionprojectregistration/student/AnnualCompetitionProjectRegistrationList.vue
  9. 27
      jeecgboot-vue3-master/src/views/awardpersion/AwardPersionList.vue
  10. 8
      jeecgboot-vue3-master/src/views/topic/Topic.api.ts
  11. 31
      jeecgboot-vue3-master/src/views/topic/components/TopicForm.vue

@ -595,7 +595,7 @@ public class AnnualCompetitionProjectRegistrationController {
//设置报名编号 //设置报名编号
management.setEnrollCode(enrollCode); management.setEnrollCode(enrollCode);
//根据名称查用户id(如果前端传的只是姓名的话) //根据名称查用户id(如果前端传的只是姓名的话)
SysUser user = sysUserService.query().eq("realname", management.getUserId()).one(); SysUser user = sysUserService.query().eq("id", management.getUserId()).one();
management.setUserId(user.getId()); management.setUserId(user.getId());
//补全用户未输入信息 -- 是否队长 //补全用户未输入信息 -- 是否队长
if (management.getCaptain() == null) if (management.getCaptain() == null)

@ -152,7 +152,7 @@ public class AwardPersionController extends JeecgController<AwardPersion, IAward
//学院(上传和查询)(根据部门查询数据,该学院下所有学生的获奖信息) //学院(上传和查询)(根据部门查询数据,该学院下所有学生的获奖信息)
Page<AwardPersion> page = new Page<AwardPersion>(pageNo, pageSize); Page<AwardPersion> page = new Page<AwardPersion>(pageNo, pageSize);
QueryWrapper<AwardPersion> queryWrapper = QueryGenerator.initQueryWrapper(awardPersion, req.getParameterMap()); QueryWrapper<AwardPersion> queryWrapper = QueryGenerator.initQueryWrapper(awardPersion, req.getParameterMap());
queryWrapper.eq("studentorg",sysDepartService.queryDepartsByUsername(user.getUsername()).get(0).getOrgCode()); queryWrapper.eq("studentorg",sysDepartService.queryDepartsByUsername(user.getUsername()).get(0).getId());
IPage<AwardPersion> pageList = awardPersionService.page(page, queryWrapper); IPage<AwardPersion> pageList = awardPersionService.page(page, queryWrapper);
return Result.OK(pageList); return Result.OK(pageList);
}else { }else {
@ -225,7 +225,7 @@ public class AwardPersionController extends JeecgController<AwardPersion, IAward
SysUser sysUser = sysUserService.getById(listtm.get(l).getUserId()); SysUser sysUser = sysUserService.getById(listtm.get(l).getUserId());
awardPersion.setStudentname(sysUser.getRealname()); awardPersion.setStudentname(sysUser.getRealname());
awardPersion.setStudentcode(sysUser.getUsername()); awardPersion.setStudentcode(sysUser.getUsername());
awardPersion.setStudentorg(sysDepartService.queryDepartsByUsername(sysUser.getUsername()).get(0).getOrgCode()); awardPersion.setStudentorg(sysDepartService.queryDepartsByUsername(sysUser.getUsername()).get(0).getId());
awardPersionService.save(awardPersion); awardPersionService.save(awardPersion);
} }
AnnualCompPoint annualCompPoint = annualCompPointService.getById(awardPersion.getAnnualCompP()); AnnualCompPoint annualCompPoint = annualCompPointService.getById(awardPersion.getAnnualCompP());
@ -511,7 +511,7 @@ public class AwardPersionController extends JeecgController<AwardPersion, IAward
List<TeamManagement> listtm = teamManagementService.list(queryWrappertm); List<TeamManagement> listtm = teamManagementService.list(queryWrappertm);
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).getOrgCode()); list.get(i).setStudentorg(sysDepartService.queryDepartsByUsername(sysUser.getUsername()).get(0).getId());
if(listaca.get(0).getFirstPrize().equals(list.get(i).getAwardname())){ if(listaca.get(0).getFirstPrize().equals(list.get(i).getAwardname())){
list.get(i).setAwardsort(1); list.get(i).setAwardsort(1);
list.get(i).setAwardid(listaca.get(0).getId()); list.get(i).setAwardid(listaca.get(0).getId());

@ -197,6 +197,15 @@ public class ChaoseTopicPersionController extends JeecgController<ChaoseTopicPer
@GetMapping(value = "/bmbhadd") @GetMapping(value = "/bmbhadd")
public Result<String> bmbhadd(@RequestParam(name="ids",required=true) String ids,@RequestParam(name="xmtmid",required=true) String xmtmid,HttpServletRequest req) { public Result<String> bmbhadd(@RequestParam(name="ids",required=true) String ids,@RequestParam(name="xmtmid",required=true) String xmtmid,HttpServletRequest req) {
String strs[] = ids.split(","); String strs[] = ids.split(",");
for (int o = 0 ; o < strs.length ; o++){
UpfilePersion upfilePersion = upfilePersionService.getById(strs[o]);
QueryWrapper<ChaoseTopicPersion> queryWrapperctp1 = new QueryWrapper<>();
queryWrapperctp1.eq("bmcode",upfilePersion.getApplyCode());
List<ChaoseTopicPersion> listctp1 = chaoseTopicPersionService.list(queryWrapperctp1);
if(listctp1.size()==0){
return Result.error(upfilePersion.getTopicName()+"未选题,绑定失败!");
}
}
AnnComGroTop annComGroTop = new AnnComGroTop(); AnnComGroTop annComGroTop = new AnnComGroTop();
QueryWrapper<AnnComGroTop> queryWrapper = QueryGenerator.initQueryWrapper(annComGroTop, req.getParameterMap()); QueryWrapper<AnnComGroTop> queryWrapper = QueryGenerator.initQueryWrapper(annComGroTop, req.getParameterMap());
queryWrapper.eq("ann_com_p_g",xmtmid); queryWrapper.eq("ann_com_p_g",xmtmid);

@ -48,4 +48,11 @@ public class UserHomePageController {
Map<String, Object> result = homePageService.report4School(); Map<String, Object> result = homePageService.report4School();
return Result.ok(result); return Result.ok(result);
} }
@ApiOperation(value = "河南机电-部门综合报告", notes = "河南机电-部门综合报告")
@GetMapping(value = "/report4Depart")
public Result report4Depart(String orgCode) {
Map<String, Object> result = homePageService.report4Depart(orgCode);
return Result.ok(result);
}
} }

@ -392,12 +392,11 @@ public class UserHomePageServiceImpl implements UserHomePageService {
} else { } else {
countMap.put("已完成比赛比率", 0); countMap.put("已完成比赛比率", 0);
} }
resultMap.putAll(countMap);
List<PersonalAbilityEvaluationCollect> evaluationCollects = iPersonalAbilityEvaluationCollectService List<PersonalAbilityEvaluationCollect> evaluationCollects = iPersonalAbilityEvaluationCollectService
.list(new LambdaQueryWrapper<PersonalAbilityEvaluationCollect>() .list(new LambdaQueryWrapper<PersonalAbilityEvaluationCollect>());
.orderByDesc(PersonalAbilityEvaluationCollect::getCreateTime) // resultMap.put("前60名学生能力值", evaluationCollects);
.last(" limit 60"));
resultMap.put("前60名学生能力值", evaluationCollects);
List<PersonalAbilityEvaluationCollect> vos = new LinkedList<>(); List<PersonalAbilityEvaluationCollect> vos = new LinkedList<>();
Map<String, List<PersonalAbilityEvaluationCollect>> capacityIdListMap = Optional.ofNullable(evaluationCollects).orElse(new LinkedList<>()).stream() Map<String, List<PersonalAbilityEvaluationCollect>> capacityIdListMap = Optional.ofNullable(evaluationCollects).orElse(new LinkedList<>()).stream()
@ -416,7 +415,7 @@ public class UserHomePageServiceImpl implements UserHomePageService {
vo.setCapacityName(departAbilityEvaluationList.get(0).getCapacityName()); vo.setCapacityName(departAbilityEvaluationList.get(0).getCapacityName());
vos.add(vo); vos.add(vo);
}); });
resultMap.put("前60名学生能力平均值", vos); resultMap.put("学生能力平均值", vos);
List<Map<String, Object>> abilityList = new LinkedList<>(); List<Map<String, Object>> abilityList = new LinkedList<>();
List<Integer> years = DateUtils.getLastxYear(2); List<Integer> years = DateUtils.getLastxYear(2);
@ -635,13 +634,12 @@ public class UserHomePageServiceImpl implements UserHomePageService {
} else { } else {
countMap.put("已完成比赛比率", 0); countMap.put("已完成比赛比率", 0);
} }
resultMap.putAll(countMap);
List<PersonalAbilityEvaluationCollect> evaluationCollects = iPersonalAbilityEvaluationCollectService List<PersonalAbilityEvaluationCollect> evaluationCollects = iPersonalAbilityEvaluationCollectService
.list(new LambdaQueryWrapper<PersonalAbilityEvaluationCollect>() .list(new LambdaQueryWrapper<PersonalAbilityEvaluationCollect>()
.eq(PersonalAbilityEvaluationCollect::getDepetId, departId) .eq(PersonalAbilityEvaluationCollect::getDepetId, departId));
.orderByDesc(PersonalAbilityEvaluationCollect::getCreateTime) // resultMap.put("学生综合能力值分析", evaluationCollects);
.last(" limit 60"));
resultMap.put("前60名学生能力值", evaluationCollects);
List<PersonalAbilityEvaluationCollect> vos = new LinkedList<>(); List<PersonalAbilityEvaluationCollect> vos = new LinkedList<>();
Map<String, List<PersonalAbilityEvaluationCollect>> capacityIdListMap = Optional.ofNullable(evaluationCollects).orElse(new LinkedList<>()).stream() Map<String, List<PersonalAbilityEvaluationCollect>> capacityIdListMap = Optional.ofNullable(evaluationCollects).orElse(new LinkedList<>()).stream()
@ -660,7 +658,7 @@ public class UserHomePageServiceImpl implements UserHomePageService {
vo.setCapacityName(departAbilityEvaluationList.get(0).getCapacityName()); vo.setCapacityName(departAbilityEvaluationList.get(0).getCapacityName());
vos.add(vo); vos.add(vo);
}); });
resultMap.put("前60名学生能力平均值", vos); resultMap.put("学生能力平均值", vos);
List<Map<String, Object>> abilityList = new LinkedList<>(); List<Map<String, Object>> abilityList = new LinkedList<>();
List<Integer> years = DateUtils.getLastxYear(2); List<Integer> years = DateUtils.getLastxYear(2);
@ -852,22 +850,4 @@ public class UserHomePageServiceImpl implements UserHomePageService {
return map; return map;
} }
List<CompVo> getCompList() {
List<AnnualCompPoint> annualCompPointList = iAnnualCompPointService.list(new LambdaQueryWrapper<AnnualCompPoint>()
.eq(AnnualCompPoint::getRequireApply, "Y"));
List<CompVo> compVoList = new LinkedList<>();
Optional.ofNullable(annualCompPointList).orElse(new LinkedList<>()).stream().forEach(p -> {
CompVo compVo = new CompVo();
BeanUtils.copyProperties(p, compVo);
List<AnnualCompetitionProjectRegistration> list = iAnnualCompetitionProjectRegistrationService.list(new LambdaQueryWrapper<AnnualCompetitionProjectRegistration>()
.eq(AnnualCompetitionProjectRegistration::getAnnualCompid, p.getId()));
if (!ObjectUtils.isEmpty(list)) {
Set<String> entryFormats = list.stream().map(bo -> bo.getEnrollCode()).collect(Collectors.toSet());
Long count = iTeamManagementService.count(new LambdaQueryWrapper<TeamManagement>().in(TeamManagement::getEnrollCode, entryFormats));
compVo.setNumber(count.intValue());
}
});
return compVoList;
}
} }

@ -273,6 +273,18 @@ public class TopicController extends JeecgController<Topic, ITopicService> {
} }
return Result.OK(); return Result.OK();
} }
//用于查询根据id获取的年度比赛项目
@GetMapping(value = "/getdate")
public Result<String> getdate(@RequestParam(name="annualCompid",required=true) String annualCompid) {
QueryWrapper<AnnualCompPoint> queryWrapper= new QueryWrapper<>();
queryWrapper.eq("id",annualCompid);
AnnualCompPoint annualCompPoint =annualCompPointService.getOne(queryWrapper);
return Result.OK(annualCompPoint.getObjName());
}
/** /**
* 添加 * 添加
* *

@ -114,15 +114,25 @@ export const formSchema: FormSchema[] = [
export const teamManagementColumns: JVxeColumn[] = [ export const teamManagementColumns: JVxeColumn[] = [
{ {
title: '用户', title: '用户',
key: 'userId', key: 'realname',
type: JVxeTypes.popup, type: JVxeTypes.popup,
popupCode: 'user_code', popupCode: 'user_code',
fieldConfig: [{source: 'realname', target: 'userId'}], fieldConfig: [
{source: 'id', target: 'userId'},
{ source: 'realname', target: 'realname' }
],
width: '200px', width: '200px',
placeholder: '请输入${title}', placeholder: '请输入${title}',
defaultValue: '', defaultValue: '',
}, },
{
label: '',
field: 'userId',
component: 'Input',
show: false,
},
{ {
title: '是否队长', title: '是否队长',
key: 'captain', key: 'captain',

@ -203,6 +203,12 @@ function getTableAction(record) {
label: '选题', label: '选题',
onClick: chooseTopic.bind(null, record), onClick: chooseTopic.bind(null, record),
}, },
{
label: '编辑',
onClick: handleEdit.bind(null, record),
},
{ {
label: '详情', label: '详情',
onClick: handleDetail.bind(null, record), onClick: handleDetail.bind(null, record),

@ -11,21 +11,40 @@
dictCode="annual,annual_name,id" /> dictCode="annual,annual_name,id" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :lg="8">
<a-form-item label="年度比赛" name="annalComp">
<j-dict-select-tag placeholder="请选择年度比赛" v-model:value="queryParam.annalComp"
dictCode="annual_comp,name,id" />
</a-form-item>
</a-col>
<a-col :lg="8">
<a-form-item label="年度比赛项目" name="annualCompP">
<j-dict-select-tag placeholder="请选择年度比赛项目" v-model:value="queryParam.annualCompP"
dictCode="annual_comp_point,obj_name,id" />
</a-form-item>
</a-col>
<a-col :lg="8">
<a-form-item label="奖项名称" name="awardname">
<a-input placeholder="请输入奖项名称" v-model:value="queryParam.awardname"></a-input>
</a-form-item>
</a-col>
<a-col :lg="8"> <a-col :lg="8">
<a-form-item label="报名编号" name="enrollCode"> <a-form-item label="报名编号" name="enrollCode">
<a-input placeholder="请输入报名编号" v-model:value="queryParam.enrollCode"></a-input> <a-input placeholder="请输入报名编号" v-model:value="queryParam.enrollCode"></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :lg="8">
<a-form-item label="所属部门" name="studentorg">
<j-dict-select-tag placeholder="请选择所属部门" v-model:value="queryParam.studentorg"
dictCode="sys_depart,depart_name,id" />
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons"> <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-col :lg="6"> <a-col :lg="6">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button> <a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" <a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset"
style="margin-left: 8px">重置</a-button> style="margin-left: 8px">重置</a-button>
<a @click="toggleSearchStatus = !toggleSearchStatus" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<Icon :icon="toggleSearchStatus ? 'ant-design:up-outlined' : 'ant-design:down-outlined'" />
</a>
</a-col> </a-col>
</span> </span>
</a-col> </a-col>

@ -17,6 +17,7 @@ enum Api {
importExcel = '/topic/topic/importExcel', importExcel = '/topic/topic/importExcel',
exportXls = '/topic/topic/exportXls', exportXls = '/topic/topic/exportXls',
addScoreSta = '/scoresta/scoreSta/addScoreSta', addScoreSta = '/scoresta/scoreSta/addScoreSta',
getdate = '/topic/topic/getdate',
} }
export const addScoreSta = (params, isUpdate) => { export const addScoreSta = (params, isUpdate) => {
@ -46,6 +47,13 @@ export const list3 = (params) => defHttp.get({url: Api.list3, params});
export const list5 = (params) => defHttp.get({url: Api.list5, params}); export const list5 = (params) => defHttp.get({url: Api.list5, params});
export const Update = (params) => defHttp.post({url: Api.edit, params}); export const Update = (params) => defHttp.post({url: Api.edit, params});
export const select = (params) => defHttp.post({url: Api.select, params}); export const select = (params) => defHttp.post({url: Api.select, params});
/*export const getdate = (params) => defHttp.get({url: Api.getdate, params});*/
export const getdate = (params) =>
defHttp.get({
url: Api.getdate,
params
});
/** /**
* *

@ -56,8 +56,14 @@ import JSwitch from '/@/components/Form/src/jeecg/components/JSwitch.vue';
import JPopup from '/@/components/Form/src/jeecg/components/JPopup.vue'; import JPopup from '/@/components/Form/src/jeecg/components/JPopup.vue';
import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue'; import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue';
import { getValueType } from '/@/utils'; import { getValueType } from '/@/utils';
import { saveOrUpdate,select } from '../Topic.api'; import { saveOrUpdate,select,getdate } from '../Topic.api';
import { Form } from 'ant-design-vue'; import { Form } from 'ant-design-vue';
import {useRoute} from "vue-router";
import {demoArticleListApi} from "/@/api/demo/mainHome";
const $Route = useRoute()
//
const props = defineProps({ const props = defineProps({
formDisabled: { type: Boolean, default: false }, formDisabled: { type: Boolean, default: false },
@ -101,12 +107,32 @@ const disabled = computed(()=>{
} }
return props.formDisabled; return props.formDisabled;
}); });
function routrtodate() {
const annualCompid = $Route.query.annualCompid;
formData.annualCompid = annualCompid;
console.log( formData.annualCompid,annualCompid,'111')
};
routrtodate();
let compName = ''
function getData() {
return new Promise((resovle,rej) => {
const annualCompid = $Route.query.annualCompid;
getdate({ annualCompid:annualCompid }).then(res => {
console.log(res,'2222')
compName = res
resovle(res)
})
})
};
// getData();
/** /**
* 新增 * 新增
*/ */
function add() { async function add() {
const res = await getData()
setFieldsValue({annualCompid:formData.annualCompid,annualCompid_dictText:res})
edit({}); edit({});
} }
function change(record){ function change(record){
@ -166,6 +192,7 @@ async function submitForm() {
* popup组件值改变事件 * popup组件值改变事件
*/ */
function setFieldsValue(map) { function setFieldsValue(map) {
console.log(map)
Object.keys(map).map((key) => { Object.keys(map).map((key) => {
formData[key] = map[key]; formData[key] = map[key];
}); });

Loading…
Cancel
Save