同分复评bug修复

dev
王家东 10 months ago
parent ae71672fef
commit 0f8397fe03
  1. 12
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/TongfenComp/controller/TongfenCompController.java
  2. 21
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/TongfenCompinfo/controller/TongfenCompinfoController.java
  3. 4
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/TongfenCompinfo/mapper/TongfenCompinfoMapper.java
  4. 2
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/TongfenCompinfo/service/ITongfenCompinfoService.java
  5. 5
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/TongfenCompinfo/service/impl/TongfenCompinfoServiceImpl.java
  6. 8
      jeecgboot-vue3-master/src/views/TongfenCompinfo/components/TongfenCompinfoForm.vue

@ -81,7 +81,7 @@ public class TongfenCompController extends JeecgController<TongfenComp, ITongfen
*/ */
@AutoLog(value = "同分复评-添加") @AutoLog(value = "同分复评-添加")
@ApiOperation(value="同分复评-添加", notes="同分复评-添加") @ApiOperation(value="同分复评-添加", notes="同分复评-添加")
@RequiresPermissions("TongfenComp:tongfen_comp:add") /*@RequiresPermissions("TongfenComp:tongfen_comp:add")*/
@PostMapping(value = "/add") @PostMapping(value = "/add")
public Result<String> add(@RequestBody TongfenComp tongfenComp) { public Result<String> add(@RequestBody TongfenComp tongfenComp) {
tongfenCompService.save(tongfenComp); tongfenCompService.save(tongfenComp);
@ -96,7 +96,7 @@ public class TongfenCompController extends JeecgController<TongfenComp, ITongfen
*/ */
@AutoLog(value = "同分复评-编辑") @AutoLog(value = "同分复评-编辑")
@ApiOperation(value="同分复评-编辑", notes="同分复评-编辑") @ApiOperation(value="同分复评-编辑", notes="同分复评-编辑")
@RequiresPermissions("TongfenComp:tongfen_comp:edit") /*@RequiresPermissions("TongfenComp:tongfen_comp:edit")*/
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody TongfenComp tongfenComp) { public Result<String> edit(@RequestBody TongfenComp tongfenComp) {
tongfenCompService.updateById(tongfenComp); tongfenCompService.updateById(tongfenComp);
@ -111,7 +111,7 @@ public class TongfenCompController extends JeecgController<TongfenComp, ITongfen
*/ */
@AutoLog(value = "同分复评-通过id删除") @AutoLog(value = "同分复评-通过id删除")
@ApiOperation(value="同分复评-通过id删除", notes="同分复评-通过id删除") @ApiOperation(value="同分复评-通过id删除", notes="同分复评-通过id删除")
@RequiresPermissions("TongfenComp:tongfen_comp:delete") /*@RequiresPermissions("TongfenComp:tongfen_comp:delete")*/
@DeleteMapping(value = "/delete") @DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) { public Result<String> delete(@RequestParam(name="id",required=true) String id) {
tongfenCompService.removeById(id); tongfenCompService.removeById(id);
@ -126,7 +126,7 @@ public class TongfenCompController extends JeecgController<TongfenComp, ITongfen
*/ */
@AutoLog(value = "同分复评-批量删除") @AutoLog(value = "同分复评-批量删除")
@ApiOperation(value="同分复评-批量删除", notes="同分复评-批量删除") @ApiOperation(value="同分复评-批量删除", notes="同分复评-批量删除")
@RequiresPermissions("TongfenComp:tongfen_comp:deleteBatch") /* @RequiresPermissions("TongfenComp:tongfen_comp:deleteBatch")*/
@DeleteMapping(value = "/deleteBatch") @DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.tongfenCompService.removeByIds(Arrays.asList(ids.split(","))); this.tongfenCompService.removeByIds(Arrays.asList(ids.split(",")));
@ -156,7 +156,7 @@ public class TongfenCompController extends JeecgController<TongfenComp, ITongfen
* @param request * @param request
* @param tongfenComp * @param tongfenComp
*/ */
@RequiresPermissions("TongfenComp:tongfen_comp:exportXls") /* @RequiresPermissions("TongfenComp:tongfen_comp:exportXls")*/
@RequestMapping(value = "/exportXls") @RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, TongfenComp tongfenComp) { public ModelAndView exportXls(HttpServletRequest request, TongfenComp tongfenComp) {
return super.exportXls(request, tongfenComp, TongfenComp.class, "同分复评"); return super.exportXls(request, tongfenComp, TongfenComp.class, "同分复评");
@ -169,7 +169,7 @@ public class TongfenCompController extends JeecgController<TongfenComp, ITongfen
* @param response * @param response
* @return * @return
*/ */
@RequiresPermissions("TongfenComp:tongfen_comp:importExcel") /*@RequiresPermissions("TongfenComp:tongfen_comp:importExcel")*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST) @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, TongfenComp.class); return super.importExcel(request, response, TongfenComp.class);

@ -81,7 +81,7 @@ public class TongfenCompinfoController extends JeecgController<TongfenCompinfo,
*/ */
@AutoLog(value = "同分情况详情-添加") @AutoLog(value = "同分情况详情-添加")
@ApiOperation(value="同分情况详情-添加", notes="同分情况详情-添加") @ApiOperation(value="同分情况详情-添加", notes="同分情况详情-添加")
@RequiresPermissions("TongfenCompinfo:tongfen_compinfo:add") /* @RequiresPermissions("TongfenCompinfo:tongfen_compinfo:add")*/
@PostMapping(value = "/add") @PostMapping(value = "/add")
public Result<String> add(@RequestBody TongfenCompinfo tongfenCompinfo) { public Result<String> add(@RequestBody TongfenCompinfo tongfenCompinfo) {
tongfenCompinfoService.save(tongfenCompinfo); tongfenCompinfoService.save(tongfenCompinfo);
@ -96,11 +96,18 @@ public class TongfenCompinfoController extends JeecgController<TongfenCompinfo,
*/ */
@AutoLog(value = "同分情况详情-编辑") @AutoLog(value = "同分情况详情-编辑")
@ApiOperation(value="同分情况详情-编辑", notes="同分情况详情-编辑") @ApiOperation(value="同分情况详情-编辑", notes="同分情况详情-编辑")
@RequiresPermissions("TongfenCompinfo:tongfen_compinfo:edit") /*@RequiresPermissions("TongfenCompinfo:tongfen_compinfo:edit")*/
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody TongfenCompinfo tongfenCompinfo) { public Result<String> edit(@RequestBody TongfenCompinfo tongfenCompinfo) {
tongfenCompinfoService.updateById(tongfenCompinfo); /*tongfenCompinfoService.updateById(tongfenCompinfo);*/
Integer a = tongfenCompinfoService.updateScore(tongfenCompinfo.getScore(),tongfenCompinfo.getCcode());
if (a>0){
tongfenCompinfoService.removeById(tongfenCompinfo.getId());
}else {
return Result.error("成绩表存在数据缺失");
}
return Result.OK("编辑成功!"); return Result.OK("编辑成功!");
} }
/** /**
@ -111,7 +118,7 @@ public class TongfenCompinfoController extends JeecgController<TongfenCompinfo,
*/ */
@AutoLog(value = "同分情况详情-通过id删除") @AutoLog(value = "同分情况详情-通过id删除")
@ApiOperation(value="同分情况详情-通过id删除", notes="同分情况详情-通过id删除") @ApiOperation(value="同分情况详情-通过id删除", notes="同分情况详情-通过id删除")
@RequiresPermissions("TongfenCompinfo:tongfen_compinfo:delete") /* @RequiresPermissions("TongfenCompinfo:tongfen_compinfo:delete")*/
@DeleteMapping(value = "/delete") @DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) { public Result<String> delete(@RequestParam(name="id",required=true) String id) {
tongfenCompinfoService.removeById(id); tongfenCompinfoService.removeById(id);
@ -126,7 +133,7 @@ public class TongfenCompinfoController extends JeecgController<TongfenCompinfo,
*/ */
@AutoLog(value = "同分情况详情-批量删除") @AutoLog(value = "同分情况详情-批量删除")
@ApiOperation(value="同分情况详情-批量删除", notes="同分情况详情-批量删除") @ApiOperation(value="同分情况详情-批量删除", notes="同分情况详情-批量删除")
@RequiresPermissions("TongfenCompinfo:tongfen_compinfo:deleteBatch") /*@RequiresPermissions("TongfenCompinfo:tongfen_compinfo:deleteBatch")*/
@DeleteMapping(value = "/deleteBatch") @DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.tongfenCompinfoService.removeByIds(Arrays.asList(ids.split(","))); this.tongfenCompinfoService.removeByIds(Arrays.asList(ids.split(",")));
@ -156,7 +163,7 @@ public class TongfenCompinfoController extends JeecgController<TongfenCompinfo,
* @param request * @param request
* @param tongfenCompinfo * @param tongfenCompinfo
*/ */
@RequiresPermissions("TongfenCompinfo:tongfen_compinfo:exportXls") /*@RequiresPermissions("TongfenCompinfo:tongfen_compinfo:exportXls")*/
@RequestMapping(value = "/exportXls") @RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, TongfenCompinfo tongfenCompinfo) { public ModelAndView exportXls(HttpServletRequest request, TongfenCompinfo tongfenCompinfo) {
return super.exportXls(request, tongfenCompinfo, TongfenCompinfo.class, "同分情况详情"); return super.exportXls(request, tongfenCompinfo, TongfenCompinfo.class, "同分情况详情");
@ -169,7 +176,7 @@ public class TongfenCompinfoController extends JeecgController<TongfenCompinfo,
* @param response * @param response
* @return * @return
*/ */
@RequiresPermissions("TongfenCompinfo:tongfen_compinfo:importExcel") /*@RequiresPermissions("TongfenCompinfo:tongfen_compinfo:importExcel")*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST) @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, TongfenCompinfo.class); return super.importExcel(request, response, TongfenCompinfo.class);

@ -3,6 +3,7 @@ package org.jeecg.modules.demo.TongfenCompinfo.mapper;
import java.util.List; import java.util.List;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.jeecg.modules.demo.TongfenCompinfo.entity.TongfenCompinfo; import org.jeecg.modules.demo.TongfenCompinfo.entity.TongfenCompinfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.demo.scorepersion.entity.ScorePersion; import org.jeecg.modules.demo.scorepersion.entity.ScorePersion;
@ -20,4 +21,7 @@ public interface TongfenCompinfoMapper extends BaseMapper<TongfenCompinfo> {
@Select("select url from upfile_persion where apply_code=#{enrollCode}") @Select("select url from upfile_persion where apply_code=#{enrollCode}")
String geturl(String enrollCode); String geturl(String enrollCode);
@Update("UPDATE score_persion SET score=#{score} where enroll_code =#{ccode}")
Integer updateScore(String score, String ccode);
} }

@ -17,4 +17,6 @@ public interface ITongfenCompinfoService extends IService<TongfenCompinfo> {
List<ScorePersion> getscorePersionList(String id); List<ScorePersion> getscorePersionList(String id);
String geturl(String enrollCode); String geturl(String enrollCode);
Integer updateScore(String score, String ccode);
} }

@ -45,4 +45,9 @@ public class TongfenCompinfoServiceImpl extends ServiceImpl<TongfenCompinfoMappe
public String geturl(String enrollCode) { public String geturl(String enrollCode) {
return tongfenCompinfoMapper.geturl(enrollCode); return tongfenCompinfoMapper.geturl(enrollCode);
} }
@Override
public Integer updateScore(String score, String ccode) {
return tongfenCompinfoMapper.updateScore(score,ccode);
}
} }

@ -4,17 +4,17 @@
<a-row> <a-row>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="年度比赛项目" v-bind="validateInfos.anncomppid"> <a-form-item label="年度比赛项目" v-bind="validateInfos.anncomppid">
<a-input v-model:value="formData.anncomppid" placeholder="请输入年度比赛项目" :disabled="disabled"></a-input> <a-input v-model:value="formData.anncomppid" placeholder="请输入年度比赛项目" disabled></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="比赛编号" v-bind="validateInfos.ccode"> <a-form-item label="比赛编号" v-bind="validateInfos.ccode">
<j-dict-select-tag v-model:value="formData.ccode" dictCode="" placeholder="请选择比赛编号" :disabled="disabled"/> <j-dict-select-tag v-model:value="formData.ccode" dictCode="" placeholder="请选择比赛编号" disabled/>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="团队/个人" v-bind="validateInfos.istd"> <a-form-item label="团队/个人" v-bind="validateInfos.istd">
<a-input v-model:value="formData.istd" placeholder="请输入团队/个人" :disabled="disabled"></a-input> <a-input v-model:value="formData.istd" placeholder="请输入团队/个人" disabled></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
@ -24,7 +24,7 @@
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="作品文件" v-bind="validateInfos.zpfile"> <a-form-item label="作品文件" v-bind="validateInfos.zpfile">
<j-upload v-model:value="formData.zpfile" :disabled="disabled" ></j-upload> <j-upload v-model:value="formData.zpfile" disabled ></j-upload>
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>

Loading…
Cancel
Save