diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualScore/controller/PersonalCompTotalScoreController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualScore/controller/PersonalCompTotalScoreController.java new file mode 100644 index 00000000..c6774685 --- /dev/null +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualScore/controller/PersonalCompTotalScoreController.java @@ -0,0 +1,152 @@ +package org.jeecg.modules.demo.annualScore.controller; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.aspect.annotation.AutoLog; +import org.jeecg.common.system.base.controller.JeecgController; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.modules.demo.annualScore.entity.PersonalCompTotalScore; +import org.jeecg.modules.demo.annualScore.service.IPersonalCompTotalScoreService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.util.Arrays; + +/** + * @Description: 个人总积分 + * @Author: jeecg-boot + * @Date: 2023-11-01 + * @Version: V1.0 + */ +@Api(tags = "个人总积分") +@RestController +@RequestMapping("/annualScore/personalCompTotalScore") +@Slf4j +public class PersonalCompTotalScoreController extends JeecgController { + @Autowired + private IPersonalCompTotalScoreService personalCompTotalScoreService; + + /** + * 分页列表查询 + * + * @param personalCompTotalScore + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "个人总积分-分页列表查询") + @ApiOperation(value = "个人总积分-分页列表查询", notes = "个人总积分-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(PersonalCompTotalScore personalCompTotalScore, + @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(personalCompTotalScore, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = personalCompTotalScoreService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param personalCompTotalScore + * @return + */ + @ApiOperation(value = "个人总积分-添加", notes = "个人总积分-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody PersonalCompTotalScore personalCompTotalScore) { + personalCompTotalScoreService.save(personalCompTotalScore); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param personalCompTotalScore + * @return + */ + @ApiOperation(value = "个人总积分-编辑", notes = "个人总积分-编辑") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST}) + public Result edit(@RequestBody PersonalCompTotalScore personalCompTotalScore) { + personalCompTotalScoreService.updateById(personalCompTotalScore); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @ApiOperation(value = "个人总积分-通过id删除", notes = "个人总积分-通过id删除") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name = "id", required = true) String id) { + personalCompTotalScoreService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @ApiOperation(value = "个人总积分-批量删除", notes = "个人总积分-批量删除") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name = "ids", required = true) String ids) { + this.personalCompTotalScoreService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "个人总积分-通过id查询") + @ApiOperation(value = "个人总积分-通过id查询", notes = "个人总积分-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name = "id", required = true) String id) { + PersonalCompTotalScore personalCompTotalScore = personalCompTotalScoreService.getById(id); + if (personalCompTotalScore == null) { + return Result.error("未找到对应数据"); + } + return Result.OK(personalCompTotalScore); + } + + /** + * 导出excel + * + * @param request + * @param personalCompTotalScore + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, PersonalCompTotalScore personalCompTotalScore) { + return super.exportXls(request, personalCompTotalScore, PersonalCompTotalScore.class, "个人总积分"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, PersonalCompTotalScore.class); + } + +} diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualScore/entity/PersonalCompTotalScore.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualScore/entity/PersonalCompTotalScore.java new file mode 100644 index 00000000..f559ec4a --- /dev/null +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualScore/entity/PersonalCompTotalScore.java @@ -0,0 +1,75 @@ +package org.jeecg.modules.demo.annualScore.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-11-01 + * @Version: V1.0 + */ +@Data +@TableName("personal_comp_total_score") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="personal_comp_total_score对象", description="个人总积分") +public class PersonalCompTotalScore implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private String id; + /**创建人*/ + @ApiModelProperty(value = "创建人") + private String createBy; + /**创建日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "创建日期") + private Date createTime; + /**更新人*/ + @ApiModelProperty(value = "更新人") + private String updateBy; + /**更新日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "更新日期") + private Date updateTime; + /**院系*/ + @Excel(name = "院系", width = 15) + @ApiModelProperty(value = "院系") + private String depet; + /**学号*/ + @Excel(name = "学号", width = 15) + @ApiModelProperty(value = "学号") + private String workOn; + /**姓名*/ + @Excel(name = "姓名", width = 15) + @ApiModelProperty(value = "姓名") + private String name; + /**总积分*/ + @Excel(name = "总积分", width = 15) + @ApiModelProperty(value = "总积分") + private Double score; + /**描述*/ + @Excel(name = "描述", width = 15) + @ApiModelProperty(value = "描述") + private String remark; +} diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualScore/mapper/PersonalCompTotalScoreMapper.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualScore/mapper/PersonalCompTotalScoreMapper.java new file mode 100644 index 00000000..d1162335 --- /dev/null +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualScore/mapper/PersonalCompTotalScoreMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.demo.annualScore.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.demo.annualScore.entity.PersonalCompTotalScore; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 个人总积分 + * @Author: jeecg-boot + * @Date: 2023-11-01 + * @Version: V1.0 + */ +public interface PersonalCompTotalScoreMapper extends BaseMapper { + +} diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualScore/mapper/xml/PersonalCompTotalScoreMapper.xml b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualScore/mapper/xml/PersonalCompTotalScoreMapper.xml new file mode 100644 index 00000000..aa58f91b --- /dev/null +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualScore/mapper/xml/PersonalCompTotalScoreMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualScore/service/IPersonalCompTotalScoreService.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualScore/service/IPersonalCompTotalScoreService.java new file mode 100644 index 00000000..4077f92f --- /dev/null +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualScore/service/IPersonalCompTotalScoreService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.demo.annualScore.service; + +import org.jeecg.modules.demo.annualScore.entity.PersonalCompTotalScore; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 个人总积分 + * @Author: jeecg-boot + * @Date: 2023-11-01 + * @Version: V1.0 + */ +public interface IPersonalCompTotalScoreService extends IService { + +} diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualScore/service/impl/PersonalCompTotalScoreServiceImpl.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualScore/service/impl/PersonalCompTotalScoreServiceImpl.java new file mode 100644 index 00000000..e8aedbef --- /dev/null +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualScore/service/impl/PersonalCompTotalScoreServiceImpl.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.demo.annualScore.service.impl; + +import org.jeecg.modules.demo.annualScore.entity.PersonalCompTotalScore; +import org.jeecg.modules.demo.annualScore.mapper.PersonalCompTotalScoreMapper; +import org.jeecg.modules.demo.annualScore.service.IPersonalCompTotalScoreService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 个人总积分 + * @Author: jeecg-boot + * @Date: 2023-11-01 + * @Version: V1.0 + */ +@Service +public class PersonalCompTotalScoreServiceImpl extends ServiceImpl implements IPersonalCompTotalScoreService { + +} diff --git a/jeecgboot-vue3-master/src/views/annualScore/PersonalCompScore.data.ts b/jeecgboot-vue3-master/src/views/annualScore/PersonalCompScore.data.ts deleted file mode 100644 index 2091902f..00000000 --- a/jeecgboot-vue3-master/src/views/annualScore/PersonalCompScore.data.ts +++ /dev/null @@ -1,145 +0,0 @@ -import {BasicColumn} from '/@/components/Table'; -import {FormSchema} from '/@/components/Table'; -import { rules} from '/@/utils/helper/validator'; -import { render } from '/@/utils/common/renderUtils'; -//列表数据 -export const columns: BasicColumn[] = [ - { - title: '所属院系', - align:"center", - dataIndex: 'depet_dictText' - }, - { - title: '学号', - align:"center", - dataIndex: 'workOn' - }, - { - title: '姓名', - align:"center", - dataIndex: 'name' - }, - { - title: '年度', - align:"center", - dataIndex: 'annualId_dictText' - }, - { - title: '年度比赛', - align:"center", - dataIndex: 'annualCompId_dictText' - }, - { - title: '年度比赛项目', - align:"center", - dataIndex: 'annualCompP_dictText' - }, - { - title: '个人积分', - align: "center", - dataIndex: 'score', - }, - // { - // title: '备注', - // align:"center", - // dataIndex: 'remark' - // }, -]; -//查询数据 -export const searchFormSchema: FormSchema[] = [ - { - label: "所属院系", - field: 'depet', - component: 'Input', - colProps: {span: 6}, - }, - { - label: "学号", - field: 'workOn', - component: 'Input', - colProps: {span: 6}, - }, - { - label: "姓名", - field: 'name', - component: 'Input', - colProps: {span: 6}, - }, - { - label: "年度", - field: 'annualId', - component: 'Input', - colProps: {span: 6}, - }, - { - label: "年度比赛", - field: 'annualCompId', - component: 'Input', - colProps: {span: 6}, - }, - { - label: "年度比赛项目", - field: 'annualCompP', - component: 'Input', - colProps: {span: 6}, - }, -]; -//表单数据 -export const formSchema: FormSchema[] = [ - { - label: '学号', - field: 'workOn', - component: 'Input', - // readonly:true - }, - { - label: '姓名', - field: 'name', - component: 'Input', - }, - { - label: '年度', - field: 'annualId', - component: 'Input', - }, - { - label: '年度比赛', - field: 'annualCompId', - component: 'Input', - }, - { - label: '年度比赛项目', - field: 'annualCompP', - component: 'Input', - // componentProps: { readOnly: true }, - }, - { - label: '个人积分', - field: 'score', - component: 'InputNumber', - // isFieldEditable: false, - }, - { - label: '备注', - field: 'remark', - component: 'Input', - }, - // TODO 主键隐藏字段,目前写死为ID - { - label: '', - field: 'id', - component: 'Input', - show: false - }, -]; - - - -/** -* 流程表单调用这个方法获取formSchema -* @param param -*/ -export function getBpmFormSchema(_formData): FormSchema[]{ - // 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema - return formSchema; -} diff --git a/jeecgboot-vue3-master/src/views/annualScore/PersonalCompScore.api.ts b/jeecgboot-vue3-master/src/views/annualScore/persoanlCompScore/PersonalCompScore.api.ts similarity index 100% rename from jeecgboot-vue3-master/src/views/annualScore/PersonalCompScore.api.ts rename to jeecgboot-vue3-master/src/views/annualScore/persoanlCompScore/PersonalCompScore.api.ts diff --git a/jeecgboot-vue3-master/src/views/annualScore/persoanlCompScore/PersonalCompScore.data.ts b/jeecgboot-vue3-master/src/views/annualScore/persoanlCompScore/PersonalCompScore.data.ts new file mode 100644 index 00000000..9c6c803a --- /dev/null +++ b/jeecgboot-vue3-master/src/views/annualScore/persoanlCompScore/PersonalCompScore.data.ts @@ -0,0 +1,156 @@ +import {BasicColumn, FormSchema} from '/@/components/Table'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '所属院系', + align: "center", + dataIndex: 'depet_dictText' + }, + { + title: '年度', + align: "center", + dataIndex: 'annualId_dictText' + }, + { + title: '年度比赛', + align: "center", + dataIndex: 'annualCompId_dictText' + }, + { + title: '年度比赛项目', + align: "center", + dataIndex: 'annualCompP_dictText' + }, + { + title: '学号', + align: "center", + dataIndex: 'workOn' + }, + { + title: '姓名', + align: "center", + dataIndex: 'name' + }, + { + title: '个人积分', + align: "center", + dataIndex: 'score', + }, + // { + // title: '备注', + // align:"center", + // dataIndex: 'remark' + // }, +]; +//查询数据 +export const searchFormSchema: FormSchema[] = [ + { + label: "院系", + field: 'depet', + component: 'JDictSelectTag', + componentProps: { + dictCode: "sys_depart,depart_name,id" + }, + colProps: {span: 6}, + }, + { + label: "学号", + field: 'workOn', + component: 'JDictSelectTag', + componentProps: { + dictCode: "sys_user,work_no,work_no" + }, + colProps: {span: 6}, + }, + { + label: "姓名", + field: 'name', + component: 'Input', + colProps: {span: 6}, + }, + { + label: "年度", + field: 'annualId', + component: 'JDictSelectTag', + componentProps: { + dictCode: "annual,annual_name,id" + }, + colProps: {span: 6}, + }, + // { + // label: "年度比赛", + // field: 'annualCompId', + // component: 'JDictSelectTag', + // componentProps: { + // dictCode: "annual_comp,name,id" + // }, + // colProps: {span: 6}, + // }, + { + label: "年度比赛项目", + field: 'annualCompP', + component: 'JDictSelectTag', + componentProps: { + dictCode: "annual_comp_point,obj_name,id" + }, + colProps: {span: 6}, + }, +]; +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '学号', + field: 'workOn', + component: 'Input', + // readonly:true + }, + { + label: '姓名', + field: 'name', + component: 'Input', + }, + { + label: '年度', + field: 'annualId', + component: 'Input', + }, + { + label: '年度比赛', + field: 'annualCompId', + component: 'Input', + }, + { + label: '年度比赛项目', + field: 'annualCompP', + component: 'Input', + // componentProps: { readOnly: true }, + }, + { + label: '个人积分', + field: 'score', + component: 'InputNumber', + // isFieldEditable: false, + }, + { + label: '备注', + field: 'remark', + component: 'Input', + }, + // TODO 主键隐藏字段,目前写死为ID + { + label: '', + field: 'id', + component: 'Input', + show: false + }, +]; + + +/** + * 流程表单调用这个方法获取formSchema + * @param param + */ +export function getBpmFormSchema(_formData): FormSchema[] { + // 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema + return formSchema; +} diff --git a/jeecgboot-vue3-master/src/views/annualScore/PersonalCompScoreList.vue b/jeecgboot-vue3-master/src/views/annualScore/persoanlCompScore/PersonalCompScoreList.vue similarity index 100% rename from jeecgboot-vue3-master/src/views/annualScore/PersonalCompScoreList.vue rename to jeecgboot-vue3-master/src/views/annualScore/persoanlCompScore/PersonalCompScoreList.vue diff --git a/jeecgboot-vue3-master/src/views/annualScore/components/PersonalCompScoreForm.vue b/jeecgboot-vue3-master/src/views/annualScore/persoanlCompScore/components/PersonalCompScoreForm.vue similarity index 97% rename from jeecgboot-vue3-master/src/views/annualScore/components/PersonalCompScoreForm.vue rename to jeecgboot-vue3-master/src/views/annualScore/persoanlCompScore/components/PersonalCompScoreForm.vue index c916345c..6722077b 100644 --- a/jeecgboot-vue3-master/src/views/annualScore/components/PersonalCompScoreForm.vue +++ b/jeecgboot-vue3-master/src/views/annualScore/persoanlCompScore/components/PersonalCompScoreForm.vue @@ -8,7 +8,7 @@ + + diff --git a/jeecgboot-vue3-master/src/views/annualScore/personalCompTotalScore/components/PersonalCompTotalScoreForm.vue b/jeecgboot-vue3-master/src/views/annualScore/personalCompTotalScore/components/PersonalCompTotalScoreForm.vue new file mode 100644 index 00000000..5112b89c --- /dev/null +++ b/jeecgboot-vue3-master/src/views/annualScore/personalCompTotalScore/components/PersonalCompTotalScoreForm.vue @@ -0,0 +1,70 @@ + + + \ No newline at end of file diff --git a/jeecgboot-vue3-master/src/views/annualScore/personalCompTotalScore/components/PersonalCompTotalScoreModal.vue b/jeecgboot-vue3-master/src/views/annualScore/personalCompTotalScore/components/PersonalCompTotalScoreModal.vue new file mode 100644 index 00000000..ed4dd110 --- /dev/null +++ b/jeecgboot-vue3-master/src/views/annualScore/personalCompTotalScore/components/PersonalCompTotalScoreModal.vue @@ -0,0 +1,66 @@ + + + + + \ No newline at end of file