fix:理事会bug
This commit is contained in:
+4
-2
@@ -164,7 +164,7 @@ public class PayCaseCommitteeController extends JeroController<PayCaseCommittee,
|
||||
LambdaQueryWrapper<PayCaseCommittee> queryWrapper2 = new LambdaQueryWrapper<>();
|
||||
queryWrapper2.eq(PayCaseCommittee::getAbbreviation,payCaseCommitteeDTO.getAbbreviation());
|
||||
PayCaseCommittee one2 = payCaseCommitteeService.getOne(queryWrapper2,false);
|
||||
if (ObjectUtils.isEmpty(one2)) {
|
||||
if (!ObjectUtils.isEmpty(one2)) {
|
||||
return Result.error("分标简称已存在");
|
||||
}
|
||||
PayCaseCommittee payCaseCommittee = new PayCaseCommittee();
|
||||
@@ -187,14 +187,16 @@ public class PayCaseCommitteeController extends JeroController<PayCaseCommittee,
|
||||
public Result<?> edit( @Valid @RequestBody PayCaseCommitteeUpdateDTO payCaseCommitteeUpdateDTO) {
|
||||
LambdaQueryWrapper<PayCaseCommittee> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(PayCaseCommittee::getName,payCaseCommitteeUpdateDTO.getName());
|
||||
queryWrapper.ne(PayCaseCommittee::getId,payCaseCommitteeUpdateDTO.getId());
|
||||
PayCaseCommittee one = payCaseCommitteeService.getOne(queryWrapper,false);
|
||||
if (!ObjectUtils.isEmpty(one)) {
|
||||
return Result.error("分标委名已存在");
|
||||
}
|
||||
LambdaQueryWrapper<PayCaseCommittee> queryWrapper2 = new LambdaQueryWrapper<>();
|
||||
queryWrapper2.eq(PayCaseCommittee::getAbbreviation,payCaseCommitteeUpdateDTO.getAbbreviation());
|
||||
queryWrapper2.ne(PayCaseCommittee::getId,payCaseCommitteeUpdateDTO.getId());
|
||||
PayCaseCommittee one2 = payCaseCommitteeService.getOne(queryWrapper2,false);
|
||||
if (ObjectUtils.isEmpty(one2)) {
|
||||
if (!ObjectUtils.isEmpty(one2)) {
|
||||
return Result.error("分标简称已存在");
|
||||
}
|
||||
PayCaseCommittee payCaseCommittee = new PayCaseCommittee();
|
||||
|
||||
+6
-4
@@ -14,6 +14,7 @@ import com.jero.data.entity.PayCaseCouncil;
|
||||
import com.jero.data.service.IPayCaseCouncilService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -42,7 +43,7 @@ public class PayCaseCouncilController extends JeroController<PayCaseCouncil, IPa
|
||||
*
|
||||
*/
|
||||
@Transactional
|
||||
// @RequiresPermissions("committee:add")
|
||||
@RequiresPermissions("council:add")
|
||||
@AutoLog(value = "理事会-添加")
|
||||
@ApiOperation(value="理事会-添加", notes="理事会-添加")
|
||||
@PostMapping(value = "/add")
|
||||
@@ -51,7 +52,7 @@ public class PayCaseCouncilController extends JeroController<PayCaseCouncil, IPa
|
||||
queryWrapper.eq(PayCaseCouncil::getName,payCaseCouncil.getName());
|
||||
PayCaseCouncil one = payCaseCouncilService.getOne(queryWrapper,false);
|
||||
if (!ObjectUtils.isEmpty(one)) {
|
||||
return Result.error("分标委名已存在");
|
||||
return Result.error("理事会名已存在");
|
||||
}
|
||||
PayCaseCouncil payCaseCouncil1 = new PayCaseCouncil();
|
||||
BeanUtils.copyProperties(payCaseCouncil, payCaseCouncil1);
|
||||
@@ -65,7 +66,7 @@ public class PayCaseCouncilController extends JeroController<PayCaseCouncil, IPa
|
||||
* 编辑
|
||||
*
|
||||
*/
|
||||
// @RequiresPermissions("committee:edit")
|
||||
@RequiresPermissions("committee:edit")
|
||||
@Transactional
|
||||
@AutoLog(value = "理事会-编辑")
|
||||
@ApiOperation(value="理事会-编辑", notes="理事会-编辑")
|
||||
@@ -76,9 +77,10 @@ public class PayCaseCouncilController extends JeroController<PayCaseCouncil, IPa
|
||||
}
|
||||
LambdaQueryWrapper<PayCaseCouncil> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(PayCaseCouncil::getName,payCaseCouncil.getName());
|
||||
queryWrapper.ne(PayCaseCouncil::getId,payCaseCouncil.getId());
|
||||
PayCaseCouncil one = payCaseCouncilService.getOne(queryWrapper,false);
|
||||
if (!ObjectUtils.isEmpty(one)) {
|
||||
return Result.error("分标委名已存在");
|
||||
return Result.error("理事会名已存在");
|
||||
}
|
||||
PayCaseCouncil payCaseCouncil1 = new PayCaseCouncil();
|
||||
BeanUtils.copyProperties(payCaseCouncil, payCaseCouncil1);
|
||||
|
||||
+19
-17
@@ -56,7 +56,7 @@ public class PayCaseCouncilSubitemController extends JeroController<PayCaseCounc
|
||||
* 理事会成员表
|
||||
*
|
||||
*/
|
||||
// @RequiresPermissions("committee:search")
|
||||
@RequiresPermissions("council:search")
|
||||
@ApiOperation(value="理事会成员表-搜索", notes="理事会成员表-搜索",response = FindByName.class)
|
||||
@GetMapping(value = "/find")
|
||||
public Result<?> find(@RequestParam(name="contactsName",required =false) String contactsName,
|
||||
@@ -109,10 +109,10 @@ public class PayCaseCouncilSubitemController extends JeroController<PayCaseCounc
|
||||
public Result<?> add(@Valid @RequestBody PayCaseCouncilSubitem payCaseCouncilSubitem) {
|
||||
PayCaseCouncilSubitem payCaseCouncilSubitem1 = new PayCaseCouncilSubitem();
|
||||
BeanUtils.copyProperties(payCaseCouncilSubitem,payCaseCouncilSubitem1);
|
||||
// 新增时校验重复
|
||||
// 新增时校验重复ne
|
||||
LambdaQueryWrapper<PayCaseCouncilSubitem> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(PayCaseCouncilSubitem::getContactsId, payCaseCouncilSubitem.getContactsId());
|
||||
lambdaQueryWrapper.eq(PayCaseCouncilSubitem::getCouncilId, payCaseCouncilSubitem.getCouncilId());
|
||||
lambdaQueryWrapper.ne(PayCaseCouncilSubitem::getCouncilId, payCaseCouncilSubitem.getCouncilId());
|
||||
int count = payCaseCouncilSubitemService.count(lambdaQueryWrapper);
|
||||
if (count > 0) {
|
||||
return Result.error("联系人重复,请重新选择");
|
||||
@@ -129,6 +129,7 @@ public class PayCaseCouncilSubitemController extends JeroController<PayCaseCounc
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("council:delete")
|
||||
@AutoLog(value = "理事会成员-通过id删除")
|
||||
@ApiOperation(value="理事会成员-通过id删除", notes="理事会成员-通过id删除")
|
||||
@GetMapping(value = "/delete")
|
||||
@@ -137,19 +138,20 @@ public class PayCaseCouncilSubitemController extends JeroController<PayCaseCounc
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "理事会成员-批量删除")
|
||||
@ApiOperation(value="理事会成员-批量删除", notes="理事会成员-批量删除")
|
||||
@GetMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.payCaseCouncilSubitemService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
// /**
|
||||
// * 批量删除
|
||||
// *
|
||||
// * @param ids
|
||||
// * @return
|
||||
// */
|
||||
// @RequiresPermissions("council:batchDel")
|
||||
// @AutoLog(value = "理事会成员-批量删除")
|
||||
// @ApiOperation(value="理事会成员-批量删除", notes="理事会成员-批量删除")
|
||||
// @GetMapping(value = "/deleteBatch")
|
||||
// public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
// this.payCaseCouncilSubitemService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
// return Result.OK("批量删除成功!");
|
||||
// }
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
@@ -175,7 +177,7 @@ public class PayCaseCouncilSubitemController extends JeroController<PayCaseCounc
|
||||
*
|
||||
*/
|
||||
|
||||
@RequiresPermissions("committee:export")
|
||||
@RequiresPermissions("council:export")
|
||||
@AutoLog(value = "分标委表导出-导出")
|
||||
@ApiOperation(value="分标委表导出-导出", notes="分标委表导出-导出")
|
||||
@GetMapping(value = "/exportXls",produces = "text/text;charset=utf-8")
|
||||
|
||||
Reference in New Issue
Block a user