JayChou 4 months ago
commit 62feae2c5e
  1. 148
      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/annualcompetitionprojectregistration/controller/AnnualCompetitionProjectRegistrationController.java
  3. 40
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/chooseTopicPersion/controller/ChaoseTopicPersionController.java
  4. 1
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/chooseTopicPersion/entity/ChooseEdit.java
  5. 4
      jeecgboot-vue3-master/src/views/annualCompPoint/committee/AnnualCompPointList.vue
  6. 35
      jeecgboot-vue3-master/src/views/annualCompPoint/student/AnnualCompPointList.vue
  7. 2
      jeecgboot-vue3-master/src/views/chooseTopicPersion/ChaoseTopicPersion.api.ts
  8. 4
      jeecgboot-vue3-master/src/views/chooseTopicPersion/ChaoseTopicPersionList.vue
  9. 5
      jeecgboot-vue3-master/src/views/chooseTopicPersion/components/ChaoseTopicPersionForm.vue

@ -68,10 +68,8 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.time.LocalDateTime;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
@ -1038,5 +1036,147 @@ public class AnnualCompPointController extends JeecgController<AnnualCompPoint,
}
/**
* 专家角色首页比赛数据接口
*
* @param req
* @return
*/
@ApiOperation(value="专家角色首页比赛数据接口", notes="专家角色首页比赛数据接口")
@GetMapping(value = "/zjsybsjs")
public Result<?> zjsybsjs( HttpServletRequest req) {
//获取当前登录用户
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
Map<String, Object> map = new HashMap<>();
QueryWrapper<Expert> exqueryWrapper = new QueryWrapper<>();
exqueryWrapper.eq("user_id", user.getId());
Expert expert = expertService.getOne(exqueryWrapper);
if(expert!=null){
QueryWrapper<CompExp> coexqueryWrapper = new QueryWrapper<>();
coexqueryWrapper.eq("expid", expert.getId());
List<CompExp> compExpList = compExpService.list(coexqueryWrapper);
if(compExpList.size()>0){
List<String> compids = compExpList.stream().map(CompExp::getCompid).collect(Collectors.toList());
QueryWrapper<AnnualComp> anncoqueryWrapper = new QueryWrapper<>();
anncoqueryWrapper.in("compid",compids);
List<AnnualComp> annualCompList = annualCompService.list(anncoqueryWrapper);
List<Map<String,Object>> jxzListMap = new ArrayList<>();
List<Map<String,Object>> lsListMap = new ArrayList<>();
if(annualCompList.size()>0){
List<String> ndbsids = annualCompList.stream().map(AnnualComp::getId).collect(Collectors.toList());
//进行中年度比赛项目
AnnualCompPoint annualCompPoint = new AnnualCompPoint();
QueryWrapper<AnnualCompPoint> queryWrapperacp = QueryGenerator.initQueryWrapper(annualCompPoint, req.getParameterMap());
queryWrapperacp.in("annual_comp_id",ndbsids);
queryWrapperacp.le("starttime",new Date());
queryWrapperacp.ge("endtime",new Date());
List<AnnualCompPoint> listacp = annualCompPointService.list(queryWrapperacp);
map.put("jxzndbsxmNumber",listacp.size());
if(listacp.size()>6){
for (int p = 0 ; p < 6 ; p++){
Map<String, Object> mapall1 = new HashMap<>();
mapall1.put("xh",p+1);
mapall1.put("ndbs",annualCompService.getById(listacp.get(p).getAnnualCompId()).getName());
mapall1.put("ndbsxm",listacp.get(p).getObjName());
jxzListMap.add(mapall1);
}
}else{
for (int o = 0 ; o < listacp.size() ; o++){
Map<String, Object> mapall2 = new HashMap<>();
mapall2.put("xh",o+1);
mapall2.put("ndbs",annualCompService.getById(listacp.get(o).getAnnualCompId()).getName());
mapall2.put("ndbsxm",listacp.get(o).getObjName());
jxzListMap.add(mapall2);
}
}
map.put("jxzndbsxmList",jxzListMap);
//历史年度比赛项目
QueryWrapper<AnnualCompPoint> queryWrapperacpls = QueryGenerator.initQueryWrapper(annualCompPoint, req.getParameterMap());
queryWrapperacpls.in("annual_comp_id",ndbsids);
queryWrapperacpls.lt("endtime",new Date());
List<AnnualCompPoint> listacpls = annualCompPointService.list(queryWrapperacpls);
map.put("lsndbsxmNumber",listacpls.size());
if(listacpls.size()>6){
for (int q = 0 ; q < 6 ; q++){
Map<String, Object> mapall3 = new HashMap<>();
mapall3.put("xh",q+1);
mapall3.put("ndbs",annualCompService.getById(listacpls.get(q).getAnnualCompId()).getName());
mapall3.put("ndbsxm",listacpls.get(q).getObjName());
lsListMap.add(mapall3);
}
}else{
for (int w = 0 ; w < listacpls.size() ; w++){
Map<String, Object> mapall4 = new HashMap<>();
mapall4.put("xh",w+1);
mapall4.put("ndbs",annualCompService.getById(listacpls.get(w).getAnnualCompId()).getName());
mapall4.put("ndbsxm",listacpls.get(w).getObjName());
lsListMap.add(mapall4);
}
}
map.put("lsndbsxmList",lsListMap);
//进行中 国 省 市 校
int gjj = 0;
int shengj = 0;
int shij = 0;
int xj = 0;
for (int i = 0 ; i < listacp.size() ; i++){
if(listacp.get(i).getObjLevel().equals("1809121223401168898")){
//国家
gjj = gjj+1;
}
if(listacp.get(i).getObjLevel().equals("1809121301201313793")){
//省
shengj = shengj+1;
}
if(listacp.get(i).getObjLevel().equals("1809121356582903809")){
//市
shij = shij+1;
}
if(listacp.get(i).getObjLevel().equals("1809121454654119937")){
//校
xj = xj+1;
}
}
map.put("gjj",gjj);
map.put("shengj",shengj);
map.put("shij",shij);
map.put("xj",xj);
//历史 国 省 市 校
int gjjls = 0;
int shengjls = 0;
int shijls = 0;
int xjls = 0;
for (int k = 0 ; k < listacpls.size() ; k++){
if(listacpls.get(k).getObjLevel().equals("1809121223401168898")){
//国家
gjjls = gjjls+1;
}
if(listacpls.get(k).getObjLevel().equals("1809121301201313793")){
//省
shengjls = shengjls+1;
}
if(listacpls.get(k).getObjLevel().equals("1809121356582903809")){
//市
shijls = shijls+1;
}
if(listacpls.get(k).getObjLevel().equals("1809121454654119937")){
//校
xjls = xjls+1;
}
}
map.put("gjjls",gjjls);
map.put("shengjls",shengjls);
map.put("shijls",shijls);
map.put("xjls",xjls);
}
}
}
return Result.OK(map);
}
}

@ -634,7 +634,7 @@ public class AnnualCompetitionProjectRegistrationController {
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
public Result<String> edit(@RequestBody AnnualCompetitionProjectRegistrationPage annualCompetitionProjectRegistrationPage) {
//判断是否为新增,以为前端访问的也是这个页面
if (annualCompetitionProjectRegistrationPage.getAnnualCompid().length() < 11) {//说明走的新增,判断有点儿问题
if (annualCompetitionProjectRegistrationPage.getEnrollCode() ==null) {//说明走的新增,判断有点儿问题
annualCompetitionProjectRegistrationPage.setAnnualCompid(annualCompetitionProjectRegistrationPage.getId());
annualCompetitionProjectRegistrationPage.setId(null);
String entryFormat = annualCompetitionProjectRegistrationPage.getEntryFormat();
@ -793,7 +793,7 @@ public class AnnualCompetitionProjectRegistrationController {
public Result<String> commitApplication(String id) {
AnnualCompetitionProjectRegistration compRegistration = annualCompetitionProjectRegistrationService.query().eq("id", id).one();
String enrollStatic = compRegistration.getEnrollStatic();
if (!enrollStatic.equals("0") && !enrollStatic.equals("3"))
if (!enrollStatic.equals("1") && !enrollStatic.equals("3") && !enrollStatic.equals("4"))
return Result.error("当前状态不需要提交");
compRegistration.setEnrollStatic("1");
compRegistration.setBackinfo("");

@ -113,17 +113,19 @@ public class ChaoseTopicPersionController extends JeecgController<ChaoseTopicPer
List<DictModel> newList = chooseTopicPersionStatus.get("choose_topic_persion_status");
DictModel dictModel = newList.get(0);
String value = dictModel.getText();
dto.setBmcode(bmcode);
dto.setTimul(topicPersion.getTimul());
dto.setTimul_dictText(topicService.getById(topicPersion.getTimul()).getName());
dto.setStatus(topicPersion.getStatus());
dto.setStatus_dictText(value);
dto.setBlack(topicPersion.getBlack());
dto.setAnnualCompid(one.getAnnualCompid());
dto.setAnnualCompid_dictText(annualCompPointService.getById(one.getAnnualCompid()).getObjName());
dto.setEntryFormat(one.getEntryFormat());
dto.setEntryFormat_dictText(one.getEntryFormat().equals("0") ? "个人" : "团队");
dto.setTeamName(one.getTeamName());
if (topicPersion.getTimul()!=null && topicPersion.getBmcode()!=null) {
dto.setBmcode(bmcode);
dto.setTimul(topicPersion.getTimul());
dto.setTimul_dictText(topicService.getById(topicPersion.getTimul()).getName());
dto.setStatus(topicPersion.getStatus());
dto.setStatus_dictText(value);
dto.setBlack(topicPersion.getBlack());
dto.setAnnualCompid(one.getAnnualCompid());
dto.setAnnualCompid_dictText(annualCompPointService.getById(one.getAnnualCompid()).getObjName());
dto.setEntryFormat(one.getEntryFormat());
dto.setEntryFormat_dictText(one.getEntryFormat().equals("0") ? "个人" : "团队");
dto.setTeamName(one.getTeamName());
}
chooseDtos.add(dto);
}
return Result.OK(chooseDtos);
@ -232,12 +234,18 @@ public class ChaoseTopicPersionController extends JeecgController<ChaoseTopicPer
@ApiOperation(value = "比赛选题-添加", notes = "比赛选题-添加")
// @RequiresPermissions("chooseTopicPersion:chaose_topic_persion:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody ChaoseTopicPersion chaoseTopicPersion) {
public Result<String> add(@RequestBody ChooseEdit chooseEdit) {
System.out.println(chooseEdit);
ChaoseTopicPersion chaoseTopicPersion = new ChaoseTopicPersion();
String enrollCode = chooseEdit.getEnrollCode();
chaoseTopicPersion.setBmcode(enrollCode);
chaoseTopicPersion.setTimul(chooseEdit.getTopicid());
chaoseTopicPersion.setStatus(chooseEdit.getStatus());
QueryWrapper<ChaoseTopicPersion> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("bmcode", chaoseTopicPersion.getBmcode());
ChaoseTopicPersion one = chaoseTopicPersionService.getOne(queryWrapper);
if (one != null) {
return Result.OK("添加失败!");
queryWrapper.eq("bmcode", enrollCode);
List<ChaoseTopicPersion> one = chaoseTopicPersionService.list(queryWrapper);
if (one.size()>0) {
return Result.OK("当前不可选题!");
}
chaoseTopicPersionService.save(chaoseTopicPersion);
return Result.OK("添加成功!");

@ -17,4 +17,5 @@ public class ChooseEdit {
private String enrollCode;
private String status;
private String black;
private String topicid;
}

@ -433,10 +433,10 @@
label: '作品管理',
onClick: workManage.bind(null, record),
});
/* actions.unshift({
actions.unshift({
label: '评分标准',
onClick: pfbz.bind(null, record),
});*/
});
actions.unshift({

@ -220,21 +220,22 @@
{
label: '详情',
onClick: handleDetail.bind(null, record),
},
{
label: '项目能力管理',
onClick: handleEditxmnl.bind(null, record),
},
{
label: '题目管理',
onClick: handleEdittopic.bind(null, record),
},
{
label: '比赛奖项管理',
onClick: handleEditbsjx.bind(null, record),
},
},
// {
// label: '',
// onClick: handleEditxmnl.bind(null, record),
// },
//
// {
// label: '',
// onClick: handleEdittopic.bind(null, record),
// },
//
// {
// label: '',
// onClick: handleEditbsjx.bind(null, record),
// },
];
@ -250,12 +251,12 @@
onClick: workManage.bind(null, record),
});
}
/*if (record.requireTopic === 'Y' && record.annualCompState === '2') {
if (record.requireTopic === 'Y' && record.annualCompState === '2') {
actions.unshift({
label: '选题',
onClick: handleSubmitandApply.bind(null, record),
});
}*/
}
return actions;
}

@ -66,7 +66,7 @@ export const batchDelete = (params, handleSuccess) => {
});
}
export const update = (params) => {
return defHttp.post({ url: Api.edit1, params });
return defHttp.post({ url: Api.save, params });
}
export const update1 = (params) => {
return defHttp.post({ url: Api.edit1, params }, { isTransformResponse: false });

@ -65,7 +65,7 @@ import {useListPage} from '/@/hooks/system/useListPage';
import {columns} from './ChaoseTopicPersion.data';
import {
list,
update,
update1,
deleteOne,
batchDelete,
getImportUrl,
@ -140,7 +140,7 @@ function handleAdd() {
*/
function handleEdit1(record: Recordable) {
console.log(record, "111112")
update({enrollCode: record.bmcode, status: 2})
update1({enrollCode: record.bmcode, status: 2})
reload()
}

@ -22,7 +22,7 @@
<!-- {{formData1}}-->
<a-select
v-if="isTimeSelect"
v-model:value="formData.id"
v-model:value="formData.timul"
style="width: 400px" :disabled="formData.status!=0&&formData.status!=3"
:default-value="formData.id"
@change="selectChange"
@ -124,7 +124,8 @@ function add(route) {
edit(route);
}
function click1(status1) {
update({enrollCode: formData.bmcode,status:status1})
console.log(formData)
update({enrollCode: formData.bmcode,status:status1,topicid : formData.timul})
emit('up');
}
/**

Loading…
Cancel
Save