parent
51e0db66db
commit
bb06b8d220
13 changed files with 738 additions and 11 deletions
@ -0,0 +1,217 @@ |
||||
package org.jeecg.modules.demo.annualcompgroup.controller; |
||||
|
||||
import java.util.Arrays; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
import java.util.stream.Collectors; |
||||
import java.io.IOException; |
||||
import java.io.UnsupportedEncodingException; |
||||
import java.net.URLDecoder; |
||||
import javax.servlet.http.HttpServletRequest; |
||||
import javax.servlet.http.HttpServletResponse; |
||||
|
||||
import org.apache.shiro.SecurityUtils; |
||||
import org.jeecg.common.api.vo.Result; |
||||
import org.jeecg.common.system.query.QueryGenerator; |
||||
import org.jeecg.common.system.vo.LoginUser; |
||||
import org.jeecg.common.util.oConvertUtils; |
||||
import org.jeecg.modules.demo.annualcompgroup.entity.AnnualCompGroup; |
||||
import org.jeecg.modules.demo.annualcompgroup.service.IAnnualCompGroupService; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
|
||||
import org.jeecg.modules.demo.comp.entity.Comp; |
||||
import org.jeecg.modules.demo.comp.service.ICompService; |
||||
import org.jeecgframework.poi.excel.ExcelImportUtil; |
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants; |
||||
import org.jeecgframework.poi.excel.entity.ExportParams; |
||||
import org.jeecgframework.poi.excel.entity.ImportParams; |
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; |
||||
import org.jeecg.common.system.base.controller.JeecgController; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.web.bind.annotation.*; |
||||
import org.springframework.web.multipart.MultipartFile; |
||||
import org.springframework.web.multipart.MultipartHttpServletRequest; |
||||
import org.springframework.web.servlet.ModelAndView; |
||||
import com.alibaba.fastjson.JSON; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import org.jeecg.common.aspect.annotation.AutoLog; |
||||
import org.apache.shiro.authz.annotation.RequiresPermissions; |
||||
|
||||
/** |
||||
* @Description: 年度比赛项目专家小组 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2023-10-13 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Api(tags="年度比赛项目专家小组") |
||||
@RestController |
||||
@RequestMapping("/annualcompgroup/annualCompGroup") |
||||
@Slf4j |
||||
public class AnnualCompGroupController extends JeecgController<AnnualCompGroup, IAnnualCompGroupService> { |
||||
@Autowired |
||||
private IAnnualCompGroupService annualCompGroupService; |
||||
|
||||
@Autowired |
||||
private ICompService compService; |
||||
|
||||
|
||||
/** |
||||
* 分页列表查询 |
||||
* |
||||
* @param annualCompGroup |
||||
* @param pageNo |
||||
* @param pageSize |
||||
* @param req |
||||
* @return |
||||
*/ |
||||
//@AutoLog(value = "年度比赛项目专家小组-分页列表查询")
|
||||
@ApiOperation(value="年度比赛项目专家小组-分页列表查询", notes="年度比赛项目专家小组-分页列表查询") |
||||
@GetMapping(value = "/list") |
||||
public Result<IPage<AnnualCompGroup>> queryPageList(AnnualCompGroup annualCompGroup, |
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
||||
HttpServletRequest req) { |
||||
QueryWrapper<AnnualCompGroup> queryWrapper = QueryGenerator.initQueryWrapper(annualCompGroup, req.getParameterMap()); |
||||
Page<AnnualCompGroup> page = new Page<AnnualCompGroup>(pageNo, pageSize); |
||||
IPage<AnnualCompGroup> pageList = annualCompGroupService.page(page, queryWrapper); |
||||
return Result.OK(pageList); |
||||
} |
||||
|
||||
/** |
||||
* 添加 |
||||
* |
||||
* @param annualCompGroup |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "年度比赛项目专家小组-添加") |
||||
@ApiOperation(value="年度比赛项目专家小组-添加", notes="年度比赛项目专家小组-添加") |
||||
//@RequiresPermissions("annualcompgroup:annual_comp_group:add")
|
||||
@PostMapping(value = "/add") |
||||
public Result<String> add(@RequestBody AnnualCompGroup annualCompGroup) { |
||||
annualCompGroupService.save(annualCompGroup); |
||||
return Result.OK("添加成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 编辑 |
||||
* |
||||
* @param annualCompGroup |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "年度比赛项目专家小组-编辑") |
||||
@ApiOperation(value="年度比赛项目专家小组-编辑", notes="年度比赛项目专家小组-编辑") |
||||
//@RequiresPermissions("annualcompgroup:annual_comp_group:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
||||
public Result<String> edit(@RequestBody AnnualCompGroup annualCompGroup) { |
||||
annualCompGroupService.updateById(annualCompGroup); |
||||
return Result.OK("编辑成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 通过id删除 |
||||
* |
||||
* @param id |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "年度比赛项目专家小组-通过id删除") |
||||
@ApiOperation(value="年度比赛项目专家小组-通过id删除", notes="年度比赛项目专家小组-通过id删除") |
||||
//@RequiresPermissions("annualcompgroup:annual_comp_group:delete")
|
||||
@DeleteMapping(value = "/delete") |
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
||||
annualCompGroupService.removeById(id); |
||||
return Result.OK("删除成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 批量删除 |
||||
* |
||||
* @param ids |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "年度比赛项目专家小组-批量删除") |
||||
@ApiOperation(value="年度比赛项目专家小组-批量删除", notes="年度比赛项目专家小组-批量删除") |
||||
//@RequiresPermissions("annualcompgroup:annual_comp_group:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch") |
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
||||
this.annualCompGroupService.removeByIds(Arrays.asList(ids.split(","))); |
||||
return Result.OK("批量删除成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 获取当前登录用户对应的比赛id |
||||
* |
||||
* @return |
||||
*/ |
||||
@ApiOperation(value="获取当前登录用户对应的比赛id", notes="获取当前登录用户对应的比赛id") |
||||
@GetMapping(value = "/queryCompId") |
||||
public Result<String> queryCompId(HttpServletRequest req) { |
||||
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
||||
Comp comp = new Comp(); |
||||
QueryWrapper<Comp> queryWrapper = QueryGenerator.initQueryWrapper(comp, req.getParameterMap()); |
||||
queryWrapper.like("comp_admin",user.getId()); |
||||
List<Comp> list = compService.list(queryWrapper); |
||||
String str = ""; |
||||
for(int i = 0 ; i < list.size() ; i++){ |
||||
if(list.size()==1){ |
||||
str = "compid='"+list.get(i).getId()+"'"; |
||||
}else{ |
||||
if(i==list.size()-1){ |
||||
str = str + "compid='"+list.get(i).getId()+"'"; |
||||
}else { |
||||
str = "compid='"+list.get(i).getId()+"' or "+str; |
||||
} |
||||
|
||||
} |
||||
|
||||
} |
||||
return Result.OK(str); |
||||
} |
||||
|
||||
/** |
||||
* 通过id查询 |
||||
* |
||||
* @param id |
||||
* @return |
||||
*/ |
||||
//@AutoLog(value = "年度比赛项目专家小组-通过id查询")
|
||||
@ApiOperation(value="年度比赛项目专家小组-通过id查询", notes="年度比赛项目专家小组-通过id查询") |
||||
@GetMapping(value = "/queryById") |
||||
public Result<AnnualCompGroup> queryById(@RequestParam(name="id",required=true) String id) { |
||||
AnnualCompGroup annualCompGroup = annualCompGroupService.getById(id); |
||||
if(annualCompGroup==null) { |
||||
return Result.error("未找到对应数据"); |
||||
} |
||||
return Result.OK(annualCompGroup); |
||||
} |
||||
|
||||
/** |
||||
* 导出excel |
||||
* |
||||
* @param request |
||||
* @param annualCompGroup |
||||
*/ |
||||
//@RequiresPermissions("annualcompgroup:annual_comp_group:exportXls")
|
||||
@RequestMapping(value = "/exportXls") |
||||
public ModelAndView exportXls(HttpServletRequest request, AnnualCompGroup annualCompGroup) { |
||||
return super.exportXls(request, annualCompGroup, AnnualCompGroup.class, "年度比赛项目专家小组"); |
||||
} |
||||
|
||||
/** |
||||
* 通过excel导入数据 |
||||
* |
||||
* @param request |
||||
* @param response |
||||
* @return |
||||
*/ |
||||
//@RequiresPermissions("annualcompgroup:annual_comp_group:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
||||
return super.importExcel(request, response, AnnualCompGroup.class); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,77 @@ |
||||
package org.jeecg.modules.demo.annualcompgroup.entity; |
||||
|
||||
import java.io.Serializable; |
||||
import java.io.UnsupportedEncodingException; |
||||
import java.util.Date; |
||||
import java.math.BigDecimal; |
||||
import com.baomidou.mybatisplus.annotation.IdType; |
||||
import com.baomidou.mybatisplus.annotation.TableId; |
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import com.baomidou.mybatisplus.annotation.TableLogic; |
||||
import lombok.Data; |
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
import org.springframework.format.annotation.DateTimeFormat; |
||||
import org.jeecgframework.poi.excel.annotation.Excel; |
||||
import org.jeecg.common.aspect.annotation.Dict; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.EqualsAndHashCode; |
||||
import lombok.experimental.Accessors; |
||||
|
||||
/** |
||||
* @Description: 年度比赛项目专家小组 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2023-10-13 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Data |
||||
@TableName("annual_comp_group") |
||||
@Accessors(chain = true) |
||||
@EqualsAndHashCode(callSuper = false) |
||||
@ApiModel(value="annual_comp_group对象", description="年度比赛项目专家小组") |
||||
public class AnnualCompGroup implements Serializable { |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/**主键*/ |
||||
@TableId(type = IdType.ASSIGN_ID) |
||||
@ApiModelProperty(value = "主键") |
||||
private java.lang.String id; |
||||
/**创建人*/ |
||||
@ApiModelProperty(value = "创建人") |
||||
private java.lang.String createBy; |
||||
/**创建日期*/ |
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
||||
@ApiModelProperty(value = "创建日期") |
||||
private java.util.Date createTime; |
||||
/**更新人*/ |
||||
@ApiModelProperty(value = "更新人") |
||||
private java.lang.String updateBy; |
||||
/**更新日期*/ |
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
||||
@ApiModelProperty(value = "更新日期") |
||||
private java.util.Date updateTime; |
||||
/**所属部门*/ |
||||
@ApiModelProperty(value = "所属部门") |
||||
private java.lang.String sysOrgCode; |
||||
/**年度*/ |
||||
@Excel(name = "年度", width = 15, dictTable = "annual", dicText = "annual_name", dicCode = "id") |
||||
@Dict(dictTable = "annual", dicText = "annual_name", dicCode = "id") |
||||
@ApiModelProperty(value = "年度") |
||||
private java.lang.String annal; |
||||
/**年度比赛项目*/ |
||||
@Excel(name = "年度比赛项目", width = 15, dictTable = "annual_comp_point", dicText = "obj_name", dicCode = "id") |
||||
@Dict(dictTable = "annual_comp_point", dicText = "obj_name", dicCode = "id") |
||||
@ApiModelProperty(value = "年度比赛项目") |
||||
private java.lang.String annCompP; |
||||
/**小组名称*/ |
||||
@Excel(name = "小组名称", width = 15) |
||||
@ApiModelProperty(value = "小组名称") |
||||
private java.lang.String name; |
||||
/**年度比赛*/ |
||||
@Excel(name = "年度比赛", width = 15, dictTable = "annual_comp", dicText = "name", dicCode = "id") |
||||
@Dict(dictTable = "annual_comp", dicText = "name", dicCode = "id") |
||||
@ApiModelProperty(value = "年度比赛") |
||||
private java.lang.String annalComp; |
||||
} |
@ -0,0 +1,17 @@ |
||||
package org.jeecg.modules.demo.annualcompgroup.mapper; |
||||
|
||||
import java.util.List; |
||||
|
||||
import org.apache.ibatis.annotations.Param; |
||||
import org.jeecg.modules.demo.annualcompgroup.entity.AnnualCompGroup; |
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
||||
/** |
||||
* @Description: 年度比赛项目专家小组 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2023-10-13 |
||||
* @Version: V1.0 |
||||
*/ |
||||
public interface AnnualCompGroupMapper extends BaseMapper<AnnualCompGroup> { |
||||
|
||||
} |
@ -0,0 +1,5 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="org.jeecg.modules.demo.annualcompgroup.mapper.AnnualCompGroupMapper"> |
||||
|
||||
</mapper> |
@ -0,0 +1,14 @@ |
||||
package org.jeecg.modules.demo.annualcompgroup.service; |
||||
|
||||
import org.jeecg.modules.demo.annualcompgroup.entity.AnnualCompGroup; |
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
||||
/** |
||||
* @Description: 年度比赛项目专家小组 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2023-10-13 |
||||
* @Version: V1.0 |
||||
*/ |
||||
public interface IAnnualCompGroupService extends IService<AnnualCompGroup> { |
||||
|
||||
} |
@ -0,0 +1,19 @@ |
||||
package org.jeecg.modules.demo.annualcompgroup.service.impl; |
||||
|
||||
import org.jeecg.modules.demo.annualcompgroup.entity.AnnualCompGroup; |
||||
import org.jeecg.modules.demo.annualcompgroup.mapper.AnnualCompGroupMapper; |
||||
import org.jeecg.modules.demo.annualcompgroup.service.IAnnualCompGroupService; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
||||
/** |
||||
* @Description: 年度比赛项目专家小组 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2023-10-13 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Service |
||||
public class AnnualCompGroupServiceImpl extends ServiceImpl<AnnualCompGroupMapper, AnnualCompGroup> implements IAnnualCompGroupService { |
||||
|
||||
} |
@ -0,0 +1,208 @@ |
||||
package org.jeecg.modules.demo.expgroup.controller; |
||||
|
||||
import java.util.Arrays; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
import java.util.stream.Collectors; |
||||
import java.io.IOException; |
||||
import java.io.UnsupportedEncodingException; |
||||
import java.net.URLDecoder; |
||||
import javax.servlet.http.HttpServletRequest; |
||||
import javax.servlet.http.HttpServletResponse; |
||||
import org.jeecg.common.api.vo.Result; |
||||
import org.jeecg.common.system.query.QueryGenerator; |
||||
import org.jeecg.common.util.oConvertUtils; |
||||
import org.jeecg.modules.demo.expgroup.entity.ExpGroup; |
||||
import org.jeecg.modules.demo.expgroup.service.IExpGroupService; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil; |
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants; |
||||
import org.jeecgframework.poi.excel.entity.ExportParams; |
||||
import org.jeecgframework.poi.excel.entity.ImportParams; |
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; |
||||
import org.jeecg.common.system.base.controller.JeecgController; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.web.bind.annotation.*; |
||||
import org.springframework.web.multipart.MultipartFile; |
||||
import org.springframework.web.multipart.MultipartHttpServletRequest; |
||||
import org.springframework.web.servlet.ModelAndView; |
||||
import com.alibaba.fastjson.JSON; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import org.jeecg.common.aspect.annotation.AutoLog; |
||||
import org.apache.shiro.authz.annotation.RequiresPermissions; |
||||
|
||||
/** |
||||
* @Description: 专家组成员 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2023-10-16 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Api(tags="专家组成员") |
||||
@RestController |
||||
@RequestMapping("/expgroup/expGroup") |
||||
@Slf4j |
||||
public class ExpGroupController extends JeecgController<ExpGroup, IExpGroupService> { |
||||
@Autowired |
||||
private IExpGroupService expGroupService; |
||||
|
||||
/** |
||||
* 分页列表查询 |
||||
* |
||||
* @param expGroup |
||||
* @param pageNo |
||||
* @param pageSize |
||||
* @param req |
||||
* @return |
||||
*/ |
||||
//@AutoLog(value = "专家组成员-分页列表查询")
|
||||
@ApiOperation(value="专家组成员-分页列表查询", notes="专家组成员-分页列表查询") |
||||
@GetMapping(value = "/list") |
||||
public Result<IPage<ExpGroup>> queryPageList(ExpGroup expGroup, |
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
||||
HttpServletRequest req,@RequestParam(name="ndbsxzid",required=true) String ndbsxzid) { |
||||
QueryWrapper<ExpGroup> queryWrapper = QueryGenerator.initQueryWrapper(expGroup, req.getParameterMap()); |
||||
queryWrapper.eq("ann_comp_groupid",ndbsxzid); |
||||
Page<ExpGroup> page = new Page<ExpGroup>(pageNo, pageSize); |
||||
IPage<ExpGroup> pageList = expGroupService.page(page, queryWrapper); |
||||
return Result.OK(pageList); |
||||
} |
||||
|
||||
/** |
||||
* 添加 |
||||
* |
||||
* @param expGroup |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "专家组成员-添加") |
||||
@ApiOperation(value="专家组成员-添加", notes="专家组成员-添加") |
||||
//@RequiresPermissions("expgroup:exp_group:add")
|
||||
@PostMapping(value = "/add") |
||||
public Result<String> add(@RequestBody ExpGroup expGroup) { |
||||
expGroupService.save(expGroup); |
||||
return Result.OK("添加成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 编辑 |
||||
* |
||||
* @param expGroup |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "专家组成员-编辑") |
||||
@ApiOperation(value="专家组成员-编辑", notes="专家组成员-编辑") |
||||
//@RequiresPermissions("expgroup:exp_group:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
||||
public Result<String> edit(@RequestBody ExpGroup expGroup) { |
||||
expGroupService.updateById(expGroup); |
||||
return Result.OK("编辑成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 通过id删除 |
||||
* |
||||
* @param id |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "专家组成员-通过id删除") |
||||
@ApiOperation(value="专家组成员-通过id删除", notes="专家组成员-通过id删除") |
||||
//@RequiresPermissions("expgroup:exp_group:delete")
|
||||
@DeleteMapping(value = "/delete") |
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
||||
expGroupService.removeById(id); |
||||
return Result.OK("删除成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 批量删除 |
||||
* |
||||
* @param ids |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "专家组成员-批量删除") |
||||
@ApiOperation(value="专家组成员-批量删除", notes="专家组成员-批量删除") |
||||
//@RequiresPermissions("expgroup:exp_group:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch") |
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
||||
this.expGroupService.removeByIds(Arrays.asList(ids.split(","))); |
||||
return Result.OK("批量删除成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 设置队长 |
||||
* |
||||
* @param id,ndbsxzid |
||||
* @return |
||||
*/ |
||||
//@AutoLog(value = "设置队长")
|
||||
@ApiOperation(value="设置队长", notes="设置队长") |
||||
@GetMapping(value = "/szOne") |
||||
public Result<ExpGroup> szOne(@RequestParam(name="id",required=true) String id,@RequestParam(name="ndbsxzid",required=true) String ndbsxzid,HttpServletRequest req) { |
||||
ExpGroup expGroup = new ExpGroup(); |
||||
QueryWrapper<ExpGroup> queryWrapper = QueryGenerator.initQueryWrapper(expGroup, req.getParameterMap()); |
||||
queryWrapper.eq("ann_comp_groupid",ndbsxzid); |
||||
List<ExpGroup> list = expGroupService.list(queryWrapper); |
||||
for (int i = 0 ; i < list.size() ; i++){ |
||||
ExpGroup expGroup1 = list.get(i); |
||||
expGroup1.setIslead("N"); |
||||
expGroupService.updateById(expGroup1); |
||||
} |
||||
expGroup = expGroupService.getById(id); |
||||
if(expGroup==null) { |
||||
return Result.error("未找到对应数据"); |
||||
}else { |
||||
expGroup.setIslead("Y"); |
||||
expGroupService.updateById(expGroup); |
||||
} |
||||
return Result.OK("设置成功"); |
||||
} |
||||
|
||||
/** |
||||
* 通过id查询 |
||||
* |
||||
* @param id |
||||
* @return |
||||
*/ |
||||
//@AutoLog(value = "专家组成员-通过id查询")
|
||||
@ApiOperation(value="专家组成员-通过id查询", notes="专家组成员-通过id查询") |
||||
@GetMapping(value = "/queryById") |
||||
public Result<ExpGroup> queryById(@RequestParam(name="id",required=true) String id) { |
||||
ExpGroup expGroup = expGroupService.getById(id); |
||||
if(expGroup==null) { |
||||
return Result.error("未找到对应数据"); |
||||
} |
||||
return Result.OK(expGroup); |
||||
} |
||||
|
||||
/** |
||||
* 导出excel |
||||
* |
||||
* @param request |
||||
* @param expGroup |
||||
*/ |
||||
//@RequiresPermissions("expgroup:exp_group:exportXls")
|
||||
@RequestMapping(value = "/exportXls") |
||||
public ModelAndView exportXls(HttpServletRequest request, ExpGroup expGroup) { |
||||
return super.exportXls(request, expGroup, ExpGroup.class, "专家组成员"); |
||||
} |
||||
|
||||
/** |
||||
* 通过excel导入数据 |
||||
* |
||||
* @param request |
||||
* @param response |
||||
* @return |
||||
*/ |
||||
//@RequiresPermissions("expgroup:exp_group:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
||||
return super.importExcel(request, response, ExpGroup.class); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,72 @@ |
||||
package org.jeecg.modules.demo.expgroup.entity; |
||||
|
||||
import java.io.Serializable; |
||||
import java.io.UnsupportedEncodingException; |
||||
import java.util.Date; |
||||
import java.math.BigDecimal; |
||||
import com.baomidou.mybatisplus.annotation.IdType; |
||||
import com.baomidou.mybatisplus.annotation.TableId; |
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import com.baomidou.mybatisplus.annotation.TableLogic; |
||||
import lombok.Data; |
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
import org.springframework.format.annotation.DateTimeFormat; |
||||
import org.jeecgframework.poi.excel.annotation.Excel; |
||||
import org.jeecg.common.aspect.annotation.Dict; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.EqualsAndHashCode; |
||||
import lombok.experimental.Accessors; |
||||
|
||||
/** |
||||
* @Description: 专家组成员 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2023-10-16 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Data |
||||
@TableName("exp_group") |
||||
@Accessors(chain = true) |
||||
@EqualsAndHashCode(callSuper = false) |
||||
@ApiModel(value="exp_group对象", description="专家组成员") |
||||
public class ExpGroup implements Serializable { |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/**主键*/ |
||||
@TableId(type = IdType.ASSIGN_ID) |
||||
@ApiModelProperty(value = "主键") |
||||
private java.lang.String id; |
||||
/**创建人*/ |
||||
@ApiModelProperty(value = "创建人") |
||||
private java.lang.String createBy; |
||||
/**创建日期*/ |
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
||||
@ApiModelProperty(value = "创建日期") |
||||
private java.util.Date createTime; |
||||
/**更新人*/ |
||||
@ApiModelProperty(value = "更新人") |
||||
private java.lang.String updateBy; |
||||
/**更新日期*/ |
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
||||
@ApiModelProperty(value = "更新日期") |
||||
private java.util.Date updateTime; |
||||
/**所属部门*/ |
||||
@ApiModelProperty(value = "所属部门") |
||||
private java.lang.String sysOrgCode; |
||||
/**成员*/ |
||||
@Excel(name = "成员", width = 15, dictTable = "expert", dicText = "name", dicCode = "id") |
||||
@Dict(dictTable = "expert", dicText = "name", dicCode = "id") |
||||
@ApiModelProperty(value = "成员") |
||||
private java.lang.String grouid; |
||||
/**是否队长*/ |
||||
@Excel(name = "是否队长", width = 15) |
||||
@ApiModelProperty(value = "是否队长") |
||||
private java.lang.String islead; |
||||
/**年度比赛项目专家小组*/ |
||||
@Excel(name = "年度比赛项目专家小组", width = 15, dictTable = "annual_comp_group", dicText = "name", dicCode = "id") |
||||
@Dict(dictTable = "annual_comp_group", dicText = "name", dicCode = "id") |
||||
@ApiModelProperty(value = "年度比赛项目专家小组") |
||||
private java.lang.String annCompGroupid; |
||||
} |
@ -0,0 +1,17 @@ |
||||
package org.jeecg.modules.demo.expgroup.mapper; |
||||
|
||||
import java.util.List; |
||||
|
||||
import org.apache.ibatis.annotations.Param; |
||||
import org.jeecg.modules.demo.expgroup.entity.ExpGroup; |
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
||||
/** |
||||
* @Description: 专家组成员 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2023-10-16 |
||||
* @Version: V1.0 |
||||
*/ |
||||
public interface ExpGroupMapper extends BaseMapper<ExpGroup> { |
||||
|
||||
} |
@ -0,0 +1,5 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="org.jeecg.modules.demo.expgroup.mapper.ExpGroupMapper"> |
||||
|
||||
</mapper> |
@ -0,0 +1,14 @@ |
||||
package org.jeecg.modules.demo.expgroup.service; |
||||
|
||||
import org.jeecg.modules.demo.expgroup.entity.ExpGroup; |
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
||||
/** |
||||
* @Description: 专家组成员 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2023-10-16 |
||||
* @Version: V1.0 |
||||
*/ |
||||
public interface IExpGroupService extends IService<ExpGroup> { |
||||
|
||||
} |
@ -0,0 +1,19 @@ |
||||
package org.jeecg.modules.demo.expgroup.service.impl; |
||||
|
||||
import org.jeecg.modules.demo.expgroup.entity.ExpGroup; |
||||
import org.jeecg.modules.demo.expgroup.mapper.ExpGroupMapper; |
||||
import org.jeecg.modules.demo.expgroup.service.IExpGroupService; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
||||
/** |
||||
* @Description: 专家组成员 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2023-10-16 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Service |
||||
public class ExpGroupServiceImpl extends ServiceImpl<ExpGroupMapper, ExpGroup> implements IExpGroupService { |
||||
|
||||
} |
Loading…
Reference in new issue