10-21-修复
This commit is contained in:
		| @ -31,6 +31,11 @@ public class XzdSpykpSjsqdBo extends BaseEntity { | ||||
| //    @NotNull(message = "id不能为空", groups = { EditGroup.class }) | ||||
|     private Long id; | ||||
|  | ||||
|     /** | ||||
|      * 类型id | ||||
|      */ | ||||
|     private Long type; | ||||
|  | ||||
|     /** | ||||
|      * 部门id | ||||
|      */ | ||||
|  | ||||
| @ -39,6 +39,16 @@ public class XzdSpykpSjsqdVo implements Serializable { | ||||
|     @ExcelProperty(value = "id") | ||||
|     private Long id; | ||||
|  | ||||
|     /** | ||||
|      *  类型 | ||||
|      */ | ||||
|     private Long type; | ||||
|  | ||||
|     /** | ||||
|      * 类型名称 | ||||
|      */ | ||||
|     private String typeName; | ||||
|  | ||||
|     /** | ||||
|      * 部门id | ||||
|      */ | ||||
|  | ||||
| @ -22,9 +22,11 @@ import org.dromara.system.service.impl.SysUserServiceImpl; | ||||
| import org.dromara.xzd.domain.dto.QuerCorrespondentDto; | ||||
| import org.dromara.xzd.domain.vo.XzdContractDetailsVo; | ||||
| import org.dromara.xzd.domain.vo.XzdProjectVo; | ||||
| import org.dromara.xzd.domain.vo.XzdSolutionSelectionVo; | ||||
| import org.dromara.xzd.service.IXzdCorrespondentList; | ||||
| import org.dromara.xzd.service.impl.XzdContractDetailsServiceImpl; | ||||
| import org.dromara.xzd.service.impl.XzdProjectServiceImpl; | ||||
| import org.dromara.xzd.service.impl.XzdSolutionSelectionServiceImpl; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.stereotype.Service; | ||||
| import org.dromara.xzd.spykp.sjsqd.domain.bo.XzdSpykpSjsqdBo; | ||||
| @ -61,6 +63,8 @@ public class XzdSpykpSjsqdServiceImpl extends ServiceImpl<XzdSpykpSjsqdMapper, X | ||||
|     private IXzdCorrespondentList iXzdCorrespondentList; | ||||
|     @Autowired | ||||
|     private SysDeptServiceImpl sysDeptService; | ||||
|     @Autowired | ||||
|     private XzdSolutionSelectionServiceImpl xzdSolutionSelectionService; | ||||
|  | ||||
|     /** | ||||
|      * 查询收据申请单 | ||||
| @ -257,6 +261,13 @@ public class XzdSpykpSjsqdServiceImpl extends ServiceImpl<XzdSpykpSjsqdMapper, X | ||||
|                     } | ||||
|                 } | ||||
|             } | ||||
|             //类型名称 | ||||
|             if (vo.getType() != null){ | ||||
|                 XzdSolutionSelectionVo solutionSelectionVo = xzdSolutionSelectionService.queryById(vo.getType()); | ||||
|                 if (solutionSelectionVo != null){ | ||||
|                     vo.setTypeName(solutionSelectionVo.getName()); | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|     } | ||||
|  | ||||
|  | ||||
| @ -0,0 +1,105 @@ | ||||
| package org.dromara.xzd.spykp.spdj.controller; | ||||
|  | ||||
| import java.util.List; | ||||
|  | ||||
| import lombok.RequiredArgsConstructor; | ||||
| import jakarta.servlet.http.HttpServletResponse; | ||||
| import jakarta.validation.constraints.*; | ||||
| import cn.dev33.satoken.annotation.SaCheckPermission; | ||||
| import org.springframework.web.bind.annotation.*; | ||||
| import org.springframework.validation.annotation.Validated; | ||||
| import org.dromara.common.idempotent.annotation.RepeatSubmit; | ||||
| import org.dromara.common.log.annotation.Log; | ||||
| import org.dromara.common.web.core.BaseController; | ||||
| import org.dromara.common.mybatis.core.page.PageQuery; | ||||
| import org.dromara.common.core.domain.R; | ||||
| import org.dromara.common.core.validate.AddGroup; | ||||
| import org.dromara.common.core.validate.EditGroup; | ||||
| import org.dromara.common.log.enums.BusinessType; | ||||
| import org.dromara.common.excel.utils.ExcelUtil; | ||||
| import org.dromara.xzd.spykp.spdj.domain.vo.XzdSpykpSpdjVo; | ||||
| import org.dromara.xzd.spykp.spdj.domain.bo.XzdSpykpSpdjBo; | ||||
| import org.dromara.xzd.spykp.spdj.service.IXzdSpykpSpdjService; | ||||
| import org.dromara.common.mybatis.core.page.TableDataInfo; | ||||
|  | ||||
| /** | ||||
|  * 收票登记 | ||||
|  * | ||||
|  * @author Lion Li | ||||
|  * @date 2025-10-21 | ||||
|  */ | ||||
| @Validated | ||||
| @RequiredArgsConstructor | ||||
| @RestController | ||||
| @RequestMapping("/spdj/spdj") | ||||
| public class XzdSpykpSpdjController extends BaseController { | ||||
|  | ||||
|     private final IXzdSpykpSpdjService xzdSpykpSpdjService; | ||||
|  | ||||
|     /** | ||||
|      * 查询收票登记列表 | ||||
|      */ | ||||
|     @SaCheckPermission("spdj:spdj:list") | ||||
|     @GetMapping("/list") | ||||
|     public TableDataInfo<XzdSpykpSpdjVo> list(XzdSpykpSpdjBo bo, PageQuery pageQuery) { | ||||
|         return xzdSpykpSpdjService.queryPageList(bo, pageQuery); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 导出收票登记列表 | ||||
|      */ | ||||
|     @SaCheckPermission("spdj:spdj:export") | ||||
|     @Log(title = "收票登记", businessType = BusinessType.EXPORT) | ||||
|     @PostMapping("/export") | ||||
|     public void export(XzdSpykpSpdjBo bo, HttpServletResponse response) { | ||||
|         List<XzdSpykpSpdjVo> list = xzdSpykpSpdjService.queryList(bo); | ||||
|         ExcelUtil.exportExcel(list, "收票登记", XzdSpykpSpdjVo.class, response); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 获取收票登记详细信息 | ||||
|      * | ||||
|      * @param id 主键 | ||||
|      */ | ||||
|     @SaCheckPermission("spdj:spdj:query") | ||||
|     @GetMapping("/{id}") | ||||
|     public R<XzdSpykpSpdjVo> getInfo(@NotNull(message = "主键不能为空") | ||||
|                                      @PathVariable Long id) { | ||||
|         return R.ok(xzdSpykpSpdjService.queryById(id)); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 新增收票登记 | ||||
|      */ | ||||
|     @SaCheckPermission("spdj:spdj:add") | ||||
|     @Log(title = "收票登记", businessType = BusinessType.INSERT) | ||||
|     @RepeatSubmit() | ||||
|     @PostMapping() | ||||
|     public R<Void> add(@Validated(AddGroup.class) @RequestBody XzdSpykpSpdjBo bo) { | ||||
|         return toAjax(xzdSpykpSpdjService.insertByBo(bo)); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 修改收票登记 | ||||
|      */ | ||||
|     @SaCheckPermission("spdj:spdj:edit") | ||||
|     @Log(title = "收票登记", businessType = BusinessType.UPDATE) | ||||
|     @RepeatSubmit() | ||||
|     @PutMapping() | ||||
|     public R<Void> edit(@Validated(EditGroup.class) @RequestBody XzdSpykpSpdjBo bo) { | ||||
|         return toAjax(xzdSpykpSpdjService.updateByBo(bo)); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 删除收票登记 | ||||
|      * | ||||
|      * @param ids 主键串 | ||||
|      */ | ||||
|     @SaCheckPermission("spdj:spdj:remove") | ||||
|     @Log(title = "收票登记", businessType = BusinessType.DELETE) | ||||
|     @DeleteMapping("/{ids}") | ||||
|     public R<Void> remove(@NotEmpty(message = "主键不能为空") | ||||
|                           @PathVariable Long[] ids) { | ||||
|         return toAjax(xzdSpykpSpdjService.deleteWithValidByIds(List.of(ids), true)); | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user