New file |
| | |
| | | package com.ruoyi.cwgl.controller; |
| | | |
| | | import java.util.List; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.ruoyi.common.utils.file.DownloadExportUtil; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.cwgl.domain.EstimatedReceivableBillLog; |
| | | import com.ruoyi.cwgl.service.IEstimatedReceivableBillLogService; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | |
| | | /** |
| | | * 预估应收账单日志Controller |
| | | * |
| | | * @author ruoyi |
| | | * @date 2025-08-13 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/cwgl/estimatedReceivableBillLog") |
| | | public class EstimatedReceivableBillLogController extends BaseController |
| | | { |
| | | @Autowired |
| | | private IEstimatedReceivableBillLogService estimatedReceivableBillLogService; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询预估应收账单日志列表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('cwgl:estimatedReceivableBillLog:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(EstimatedReceivableBillLog estimatedReceivableBillLog) |
| | | { |
| | | startPage(); |
| | | List<EstimatedReceivableBillLog> list = estimatedReceivableBillLogService.selectEstimatedReceivableBillLogList(estimatedReceivableBillLog); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导出预估应收账单日志列表 |
| | | * @param estimatedReceivableBillLog 查询条件对象 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('cwgl:estimatedReceivableBillLog:export')") |
| | | @Log(title = "预估应收账单日志", businessType = BusinessType.EXPORT) |
| | | @GetMapping("/export") |
| | | public AjaxResult export(EstimatedReceivableBillLog estimatedReceivableBillLog,String exportKey) |
| | | { |
| | | estimatedReceivableBillLogService.export(estimatedReceivableBillLog,exportKey); |
| | | return AjaxResult.success("导出请求成功,请稍后点击下载...!"); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 获取预估应收账单日志详细信息 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('cwgl:estimatedReceivableBillLog:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Integer id) |
| | | { |
| | | return AjaxResult.success(estimatedReceivableBillLogService.selectEstimatedReceivableBillLogById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 新增预估应收账单日志 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('cwgl:estimatedReceivableBillLog:add')") |
| | | @Log(title = "预估应收账单日志", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody EstimatedReceivableBillLog estimatedReceivableBillLog) |
| | | { |
| | | return toAjax(estimatedReceivableBillLogService.insertEstimatedReceivableBillLog(estimatedReceivableBillLog)); |
| | | } |
| | | |
| | | /** |
| | | * 修改预估应收账单日志 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('cwgl:estimatedReceivableBillLog:edit')") |
| | | @Log(title = "预估应收账单日志", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody EstimatedReceivableBillLog estimatedReceivableBillLog) |
| | | { |
| | | return toAjax(estimatedReceivableBillLogService.updateEstimatedReceivableBillLog(estimatedReceivableBillLog)); |
| | | } |
| | | |
| | | /** |
| | | * 删除预估应收账单日志 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('cwgl:estimatedReceivableBillLog:remove')") |
| | | @Log(title = "预估应收账单日志", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Integer[] ids) |
| | | { |
| | | return toAjax(estimatedReceivableBillLogService.deleteEstimatedReceivableBillLogByIds(ids)); |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * 确认 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('cwgl:estimatedReceivable:confirm')") |
| | | @GetMapping(value = "confirm/{id}") |
| | | public AjaxResult confirm(@PathVariable("id") Integer id) |
| | | { |
| | | return toAjax(estimatedReceivableService.confirm(id)); |
| | | } |
| | | |
| | | /** |
| | | * 取消 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('cwgl:estimatedReceivable:cancel')") |
| | | @GetMapping(value = "cancel/{id}") |
| | | public AjaxResult cancel(@PathVariable("id") Integer id) |
| | | { |
| | | return toAjax(estimatedReceivableService.cancel(id)); |
| | | } |
| | | |
| | | /** |
| | | * 作废 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('cwgl:estimatedReceivable:invalid')") |
| | | @GetMapping(value = "invalid/{id}") |
| | | public AjaxResult invalid(@PathVariable("id") Integer id) |
| | | { |
| | | return toAjax(estimatedReceivableService.invalid(id)); |
| | | } |
| | | |
| | | /** |
| | | * 新增预估应收管理 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('cwgl:estimatedReceivable:add')") |
New file |
| | |
| | | package com.ruoyi.cwgl.controller; |
| | | |
| | | import java.util.List; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.ruoyi.common.utils.file.DownloadExportUtil; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.cwgl.domain.EstimatedReceivableLog; |
| | | import com.ruoyi.cwgl.service.IEstimatedReceivableLogService; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | |
| | | /** |
| | | * 预估应收管理日志Controller |
| | | * |
| | | * @author ruoyi |
| | | * @date 2025-08-13 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/cwgl/estimatedReceivableLog") |
| | | public class EstimatedReceivableLogController extends BaseController |
| | | { |
| | | @Autowired |
| | | private IEstimatedReceivableLogService estimatedReceivableLogService; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询预估应收管理日志列表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('cwgl:estimatedReceivableLog:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(EstimatedReceivableLog estimatedReceivableLog) |
| | | { |
| | | startPage(); |
| | | List<EstimatedReceivableLog> list = estimatedReceivableLogService.selectEstimatedReceivableLogList(estimatedReceivableLog); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导出预估应收管理日志列表 |
| | | * @param estimatedReceivableLog 查询条件对象 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('cwgl:estimatedReceivableLog:export')") |
| | | @Log(title = "预估应收管理日志", businessType = BusinessType.EXPORT) |
| | | @GetMapping("/export") |
| | | public AjaxResult export(EstimatedReceivableLog estimatedReceivableLog,String exportKey) |
| | | { |
| | | estimatedReceivableLogService.export(estimatedReceivableLog,exportKey); |
| | | return AjaxResult.success("导出请求成功,请稍后点击下载...!"); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 获取预估应收管理日志详细信息 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('cwgl:estimatedReceivableLog:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Integer id) |
| | | { |
| | | return AjaxResult.success(estimatedReceivableLogService.selectEstimatedReceivableLogById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 新增预估应收管理日志 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('cwgl:estimatedReceivableLog:add')") |
| | | @Log(title = "预估应收管理日志", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody EstimatedReceivableLog estimatedReceivableLog) |
| | | { |
| | | return toAjax(estimatedReceivableLogService.insertEstimatedReceivableLog(estimatedReceivableLog)); |
| | | } |
| | | |
| | | /** |
| | | * 修改预估应收管理日志 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('cwgl:estimatedReceivableLog:edit')") |
| | | @Log(title = "预估应收管理日志", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody EstimatedReceivableLog estimatedReceivableLog) |
| | | { |
| | | return toAjax(estimatedReceivableLogService.updateEstimatedReceivableLog(estimatedReceivableLog)); |
| | | } |
| | | |
| | | /** |
| | | * 删除预估应收管理日志 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('cwgl:estimatedReceivableLog:remove')") |
| | | @Log(title = "预估应收管理日志", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Integer[] ids) |
| | | { |
| | | return toAjax(estimatedReceivableLogService.deleteEstimatedReceivableLogByIds(ids)); |
| | | } |
| | | } |
New file |
| | |
| | | package com.ruoyi.cwgl.domain; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.common.annotation.Excel; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.util.Date; |
| | | import lombok.Data; |
| | | /** |
| | | * 预估应收账单日志对象 estimated_receivable_bill_log |
| | | * |
| | | * @author ruoyi |
| | | * @date 2025-08-13 |
| | | */ |
| | | @Data |
| | | public class EstimatedReceivableBillLog{ |
| | | |
| | | |
| | | /** 主键 */ |
| | | @TableField("id") |
| | | private Integer id; |
| | | |
| | | |
| | | /** 账单id */ |
| | | @Excel(name = "账单id") |
| | | |
| | | @TableField("bill_id") |
| | | private Integer billId; |
| | | |
| | | |
| | | /** 创建者 */ |
| | | @TableField("create_by") |
| | | private String createBy; |
| | | |
| | | |
| | | /** 创建时间 */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @TableField("create_time") |
| | | private Date createTime; |
| | | |
| | | |
| | | /** 操作说明 */ |
| | | @Excel(name = "操作说明") |
| | | |
| | | @TableField("operation") |
| | | private String operation; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.cwgl.domain; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.common.annotation.Excel; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.util.Date; |
| | | import lombok.Data; |
| | | /** |
| | | * 预估应收管理日志对象 estimated_receivable_log |
| | | * |
| | | * @author ruoyi |
| | | * @date 2025-08-13 |
| | | */ |
| | | @Data |
| | | public class EstimatedReceivableLog{ |
| | | |
| | | |
| | | /** 主键 */ |
| | | @TableField("id") |
| | | private Integer id; |
| | | |
| | | |
| | | /** 预估应收管理表id */ |
| | | @Excel(name = "预估应收管理表id") |
| | | |
| | | @TableField("estimated_id") |
| | | private Integer estimatedId; |
| | | |
| | | |
| | | /** 创建者 */ |
| | | @TableField("create_by") |
| | | private String createBy; |
| | | |
| | | |
| | | /** 创建时间 */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @TableField("create_time") |
| | | private Date createTime; |
| | | |
| | | |
| | | /** 操作说明 */ |
| | | @Excel(name = "操作说明") |
| | | |
| | | @TableField("operation") |
| | | private String operation; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.cwgl.mapper; |
| | | |
| | | import java.util.List; |
| | | import com.ruoyi.cwgl.domain.EstimatedReceivableBillLog; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | |
| | | /** |
| | | * 预估应收账单日志Mapper接口 |
| | | * |
| | | * @author ruoyi |
| | | * @date 2025-08-13 |
| | | */ |
| | | public interface EstimatedReceivableBillLogMapper extends BaseMapper<EstimatedReceivableBillLog> |
| | | { |
| | | /** |
| | | * 查询预估应收账单日志 |
| | | * |
| | | * @param id 预估应收账单日志ID |
| | | * @return 预估应收账单日志 |
| | | */ |
| | | public EstimatedReceivableBillLog selectEstimatedReceivableBillLogById(Integer id); |
| | | |
| | | /** |
| | | * 查询预估应收账单日志 记录数 |
| | | * |
| | | * @param estimatedReceivableBillLog 预估应收账单日志 |
| | | * @return 预估应收账单日志集合 |
| | | */ |
| | | public int selectEstimatedReceivableBillLogCount(EstimatedReceivableBillLog estimatedReceivableBillLog); |
| | | |
| | | /** |
| | | * 查询预估应收账单日志列表 |
| | | * |
| | | * @param estimatedReceivableBillLog 预估应收账单日志 |
| | | * @return 预估应收账单日志集合 |
| | | */ |
| | | public List<EstimatedReceivableBillLog> selectEstimatedReceivableBillLogList(EstimatedReceivableBillLog estimatedReceivableBillLog); |
| | | |
| | | /** |
| | | * 新增预估应收账单日志 |
| | | * |
| | | * @param estimatedReceivableBillLog 预估应收账单日志 |
| | | * @return 结果 |
| | | */ |
| | | public int insertEstimatedReceivableBillLog(EstimatedReceivableBillLog estimatedReceivableBillLog); |
| | | |
| | | /** |
| | | * 新增预估应收账单日志[批量] |
| | | * |
| | | * @param estimatedReceivableBillLogs 预估应收账单日志 |
| | | * @return 结果 |
| | | */ |
| | | public int insertEstimatedReceivableBillLogBatch(List<EstimatedReceivableBillLog> estimatedReceivableBillLogs); |
| | | |
| | | /** |
| | | * 修改预估应收账单日志 |
| | | * |
| | | * @param estimatedReceivableBillLog 预估应收账单日志 |
| | | * @return 结果 |
| | | */ |
| | | public int updateEstimatedReceivableBillLog(EstimatedReceivableBillLog estimatedReceivableBillLog); |
| | | |
| | | /** |
| | | * 修改预估应收账单日志[批量] |
| | | * |
| | | * @param estimatedReceivableBillLogs 预估应收账单日志 |
| | | * @return 结果 |
| | | */ |
| | | public int updateEstimatedReceivableBillLogBatch(List<EstimatedReceivableBillLog> estimatedReceivableBillLogs); |
| | | |
| | | /** |
| | | * 删除预估应收账单日志 |
| | | * |
| | | * @param id 预估应收账单日志ID |
| | | * @return 结果 |
| | | */ |
| | | public int deleteEstimatedReceivableBillLogById(Integer id); |
| | | |
| | | /** |
| | | * 批量删除预估应收账单日志 |
| | | * |
| | | * @param ids 需要删除的数据ID |
| | | * @return 结果 |
| | | */ |
| | | public int deleteEstimatedReceivableBillLogByIds(Integer[] ids); |
| | | } |
New file |
| | |
| | | package com.ruoyi.cwgl.mapper; |
| | | |
| | | import java.util.List; |
| | | import com.ruoyi.cwgl.domain.EstimatedReceivableLog; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | |
| | | /** |
| | | * 预估应收管理日志Mapper接口 |
| | | * |
| | | * @author ruoyi |
| | | * @date 2025-08-13 |
| | | */ |
| | | public interface EstimatedReceivableLogMapper extends BaseMapper<EstimatedReceivableLog> |
| | | { |
| | | /** |
| | | * 查询预估应收管理日志 |
| | | * |
| | | * @param id 预估应收管理日志ID |
| | | * @return 预估应收管理日志 |
| | | */ |
| | | public EstimatedReceivableLog selectEstimatedReceivableLogById(Integer id); |
| | | |
| | | /** |
| | | * 查询预估应收管理日志 记录数 |
| | | * |
| | | * @param estimatedReceivableLog 预估应收管理日志 |
| | | * @return 预估应收管理日志集合 |
| | | */ |
| | | public int selectEstimatedReceivableLogCount(EstimatedReceivableLog estimatedReceivableLog); |
| | | |
| | | /** |
| | | * 查询预估应收管理日志列表 |
| | | * |
| | | * @param estimatedReceivableLog 预估应收管理日志 |
| | | * @return 预估应收管理日志集合 |
| | | */ |
| | | public List<EstimatedReceivableLog> selectEstimatedReceivableLogList(EstimatedReceivableLog estimatedReceivableLog); |
| | | |
| | | /** |
| | | * 新增预估应收管理日志 |
| | | * |
| | | * @param estimatedReceivableLog 预估应收管理日志 |
| | | * @return 结果 |
| | | */ |
| | | public int insertEstimatedReceivableLog(EstimatedReceivableLog estimatedReceivableLog); |
| | | |
| | | /** |
| | | * 新增预估应收管理日志[批量] |
| | | * |
| | | * @param estimatedReceivableLogs 预估应收管理日志 |
| | | * @return 结果 |
| | | */ |
| | | public int insertEstimatedReceivableLogBatch(List<EstimatedReceivableLog> estimatedReceivableLogs); |
| | | |
| | | /** |
| | | * 修改预估应收管理日志 |
| | | * |
| | | * @param estimatedReceivableLog 预估应收管理日志 |
| | | * @return 结果 |
| | | */ |
| | | public int updateEstimatedReceivableLog(EstimatedReceivableLog estimatedReceivableLog); |
| | | |
| | | /** |
| | | * 修改预估应收管理日志[批量] |
| | | * |
| | | * @param estimatedReceivableLogs 预估应收管理日志 |
| | | * @return 结果 |
| | | */ |
| | | public int updateEstimatedReceivableLogBatch(List<EstimatedReceivableLog> estimatedReceivableLogs); |
| | | |
| | | /** |
| | | * 删除预估应收管理日志 |
| | | * |
| | | * @param id 预估应收管理日志ID |
| | | * @return 结果 |
| | | */ |
| | | public int deleteEstimatedReceivableLogById(Integer id); |
| | | |
| | | /** |
| | | * 批量删除预估应收管理日志 |
| | | * |
| | | * @param ids 需要删除的数据ID |
| | | * @return 结果 |
| | | */ |
| | | public int deleteEstimatedReceivableLogByIds(Integer[] ids); |
| | | } |
New file |
| | |
| | | package com.ruoyi.cwgl.service; |
| | | |
| | | import java.util.List; |
| | | import com.ruoyi.cwgl.domain.EstimatedReceivableBillLog; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | /** |
| | | * 预估应收账单日志Service接口 |
| | | * |
| | | * @author ruoyi |
| | | * @date 2025-08-13 |
| | | */ |
| | | public interface IEstimatedReceivableBillLogService extends IService<EstimatedReceivableBillLog> |
| | | { |
| | | /** |
| | | * 查询预估应收账单日志 |
| | | * |
| | | * @param id 预估应收账单日志ID |
| | | * @return 预估应收账单日志 |
| | | */ |
| | | public EstimatedReceivableBillLog selectEstimatedReceivableBillLogById(Integer id); |
| | | |
| | | /** |
| | | * 查询预估应收账单日志 记录数 |
| | | * |
| | | * @param estimatedReceivableBillLog 预估应收账单日志 |
| | | * @return 预估应收账单日志集合 |
| | | */ |
| | | public int selectEstimatedReceivableBillLogCount(EstimatedReceivableBillLog estimatedReceivableBillLog); |
| | | |
| | | /** |
| | | * 查询预估应收账单日志列表 |
| | | * |
| | | * @param estimatedReceivableBillLog 预估应收账单日志 |
| | | * @return 预估应收账单日志集合 |
| | | */ |
| | | public List<EstimatedReceivableBillLog> selectEstimatedReceivableBillLogList(EstimatedReceivableBillLog estimatedReceivableBillLog); |
| | | |
| | | /** |
| | | * 查询预估应收账单日志列表 异步 导出 |
| | | * |
| | | * @param estimatedReceivableBillLog 预估应收账单日志 |
| | | * @param exportKey 导出功能的唯一标识 |
| | | * @return 预估应收账单日志集合 |
| | | */ |
| | | public void export(EstimatedReceivableBillLog estimatedReceivableBillLog, String exportKey) ; |
| | | |
| | | |
| | | /** |
| | | * 新增预估应收账单日志 |
| | | * |
| | | * @param estimatedReceivableBillLog 预估应收账单日志 |
| | | * @return 结果 |
| | | */ |
| | | public int insertEstimatedReceivableBillLog(EstimatedReceivableBillLog estimatedReceivableBillLog); |
| | | |
| | | /** |
| | | * 新增预估应收账单日志[批量] |
| | | * |
| | | * @param estimatedReceivableBillLogs 预估应收账单日志 |
| | | * @return 结果 |
| | | */ |
| | | public int insertEstimatedReceivableBillLogBatch(List<EstimatedReceivableBillLog> estimatedReceivableBillLogs); |
| | | |
| | | /** |
| | | * 修改预估应收账单日志 |
| | | * |
| | | * @param estimatedReceivableBillLog 预估应收账单日志 |
| | | * @return 结果 |
| | | */ |
| | | public int updateEstimatedReceivableBillLog(EstimatedReceivableBillLog estimatedReceivableBillLog); |
| | | |
| | | /** |
| | | * 修改预估应收账单日志[批量] |
| | | * |
| | | * @param estimatedReceivableBillLogs 预估应收账单日志 |
| | | * @return 结果 |
| | | */ |
| | | public int updateEstimatedReceivableBillLogBatch(List<EstimatedReceivableBillLog> estimatedReceivableBillLogs); |
| | | /** |
| | | * 批量删除预估应收账单日志 |
| | | * |
| | | * @param ids 需要删除的数据ID |
| | | * @return 结果 |
| | | */ |
| | | public int deleteEstimatedReceivableBillLogByIds(String ids); |
| | | |
| | | /** |
| | | * 批量删除预估应收账单日志 |
| | | * |
| | | * @param ids 需要删除的数据ID |
| | | * @return 结果 |
| | | */ |
| | | public int deleteEstimatedReceivableBillLogByIds(Integer[] ids); |
| | | |
| | | /** |
| | | * 删除预估应收账单日志信息 |
| | | * |
| | | * @param id 预估应收账单日志ID |
| | | * @return 结果 |
| | | */ |
| | | public int deleteEstimatedReceivableBillLogById(Integer id); |
| | | } |
New file |
| | |
| | | package com.ruoyi.cwgl.service; |
| | | |
| | | import java.util.List; |
| | | import com.ruoyi.cwgl.domain.EstimatedReceivableLog; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | /** |
| | | * 预估应收管理日志Service接口 |
| | | * |
| | | * @author ruoyi |
| | | * @date 2025-08-13 |
| | | */ |
| | | public interface IEstimatedReceivableLogService extends IService<EstimatedReceivableLog> |
| | | { |
| | | /** |
| | | * 查询预估应收管理日志 |
| | | * |
| | | * @param id 预估应收管理日志ID |
| | | * @return 预估应收管理日志 |
| | | */ |
| | | public EstimatedReceivableLog selectEstimatedReceivableLogById(Integer id); |
| | | |
| | | /** |
| | | * 查询预估应收管理日志 记录数 |
| | | * |
| | | * @param estimatedReceivableLog 预估应收管理日志 |
| | | * @return 预估应收管理日志集合 |
| | | */ |
| | | public int selectEstimatedReceivableLogCount(EstimatedReceivableLog estimatedReceivableLog); |
| | | |
| | | /** |
| | | * 查询预估应收管理日志列表 |
| | | * |
| | | * @param estimatedReceivableLog 预估应收管理日志 |
| | | * @return 预估应收管理日志集合 |
| | | */ |
| | | public List<EstimatedReceivableLog> selectEstimatedReceivableLogList(EstimatedReceivableLog estimatedReceivableLog); |
| | | |
| | | /** |
| | | * 查询预估应收管理日志列表 异步 导出 |
| | | * |
| | | * @param estimatedReceivableLog 预估应收管理日志 |
| | | * @param exportKey 导出功能的唯一标识 |
| | | * @return 预估应收管理日志集合 |
| | | */ |
| | | public void export(EstimatedReceivableLog estimatedReceivableLog, String exportKey) ; |
| | | |
| | | |
| | | /** |
| | | * 新增预估应收管理日志 |
| | | * |
| | | * @param estimatedReceivableLog 预估应收管理日志 |
| | | * @return 结果 |
| | | */ |
| | | public int insertEstimatedReceivableLog(EstimatedReceivableLog estimatedReceivableLog); |
| | | |
| | | /** |
| | | * 新增预估应收管理日志[批量] |
| | | * |
| | | * @param estimatedReceivableLogs 预估应收管理日志 |
| | | * @return 结果 |
| | | */ |
| | | public int insertEstimatedReceivableLogBatch(List<EstimatedReceivableLog> estimatedReceivableLogs); |
| | | |
| | | /** |
| | | * 修改预估应收管理日志 |
| | | * |
| | | * @param estimatedReceivableLog 预估应收管理日志 |
| | | * @return 结果 |
| | | */ |
| | | public int updateEstimatedReceivableLog(EstimatedReceivableLog estimatedReceivableLog); |
| | | |
| | | /** |
| | | * 修改预估应收管理日志[批量] |
| | | * |
| | | * @param estimatedReceivableLogs 预估应收管理日志 |
| | | * @return 结果 |
| | | */ |
| | | public int updateEstimatedReceivableLogBatch(List<EstimatedReceivableLog> estimatedReceivableLogs); |
| | | /** |
| | | * 批量删除预估应收管理日志 |
| | | * |
| | | * @param ids 需要删除的数据ID |
| | | * @return 结果 |
| | | */ |
| | | public int deleteEstimatedReceivableLogByIds(String ids); |
| | | |
| | | /** |
| | | * 批量删除预估应收管理日志 |
| | | * |
| | | * @param ids 需要删除的数据ID |
| | | * @return 结果 |
| | | */ |
| | | public int deleteEstimatedReceivableLogByIds(Integer[] ids); |
| | | |
| | | /** |
| | | * 删除预估应收管理日志信息 |
| | | * |
| | | * @param id 预估应收管理日志ID |
| | | * @return 结果 |
| | | */ |
| | | public int deleteEstimatedReceivableLogById(Integer id); |
| | | |
| | | void insertEstimatedReceivableLog(String operation, Integer id,String userName); |
| | | } |
| | |
| | | * @return 结果 |
| | | */ |
| | | public int deleteEstimatedReceivableById(Integer id); |
| | | |
| | | /** |
| | | * 确认 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | int confirm(Integer id); |
| | | |
| | | /** |
| | | * 取消 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | int cancel(Integer id); |
| | | |
| | | /** |
| | | * 作废 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | int invalid(Integer id); |
| | | } |
New file |
| | |
| | | package com.ruoyi.cwgl.service.impl; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import javax.annotation.Resource; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.scheduling.annotation.Async; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.common.constant.Constants; |
| | | import com.ruoyi.common.annotation.DataSource; |
| | | import com.ruoyi.common.enums.DataSourceType; |
| | | import com.ruoyi.common.core.service.BaseService; |
| | | |
| | | import com.ruoyi.cwgl.mapper.EstimatedReceivableBillLogMapper; |
| | | import com.ruoyi.cwgl.domain.EstimatedReceivableBillLog; |
| | | import com.ruoyi.cwgl.service.IEstimatedReceivableBillLogService; |
| | | import com.ruoyi.common.core.text.Convert; |
| | | |
| | | /** |
| | | * 预估应收账单日志Service业务层处理 |
| | | * |
| | | * @author ruoyi |
| | | * @date 2025-08-13 |
| | | */ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class EstimatedReceivableBillLogServiceImpl extends BaseService<EstimatedReceivableBillLogMapper, EstimatedReceivableBillLog> implements IEstimatedReceivableBillLogService |
| | | { |
| | | protected final Logger logger = LoggerFactory.getLogger(getClass()); |
| | | @Resource |
| | | private EstimatedReceivableBillLogMapper estimatedReceivableBillLogMapper; |
| | | |
| | | |
| | | /** |
| | | * 查询预估应收账单日志 |
| | | * |
| | | * @param id 预估应收账单日志ID |
| | | * @return 预估应收账单日志 |
| | | */ |
| | | @DataSource(DataSourceType.SLAVE) |
| | | @Override |
| | | public EstimatedReceivableBillLog selectEstimatedReceivableBillLogById(Integer id) |
| | | { |
| | | return estimatedReceivableBillLogMapper.selectEstimatedReceivableBillLogById(id); |
| | | } |
| | | |
| | | /** |
| | | * 查询预估应收账单日志 记录数 |
| | | * |
| | | * @param estimatedReceivableBillLog 预估应收账单日志 |
| | | * @return 预估应收账单日志集合 |
| | | */ |
| | | @DataSource(DataSourceType.SLAVE) |
| | | @Override |
| | | public int selectEstimatedReceivableBillLogCount(EstimatedReceivableBillLog estimatedReceivableBillLog) |
| | | { |
| | | return estimatedReceivableBillLogMapper.selectEstimatedReceivableBillLogCount(estimatedReceivableBillLog); |
| | | } |
| | | |
| | | /** |
| | | * 查询预估应收账单日志列表 |
| | | * |
| | | * @param estimatedReceivableBillLog 预估应收账单日志 |
| | | * @return 预估应收账单日志 |
| | | */ |
| | | @DataSource(DataSourceType.SLAVE) |
| | | @Override |
| | | public List<EstimatedReceivableBillLog> selectEstimatedReceivableBillLogList(EstimatedReceivableBillLog estimatedReceivableBillLog) |
| | | { |
| | | return estimatedReceivableBillLogMapper.selectEstimatedReceivableBillLogList(estimatedReceivableBillLog); |
| | | } |
| | | |
| | | /** |
| | | * 查询预估应收账单日志列表 异步 导出 |
| | | * |
| | | * @param estimatedReceivableBillLog 预估应收账单日志 |
| | | * @param exportKey 导出功能的唯一标识 |
| | | * @return 预估应收账单日志集合 |
| | | */ |
| | | @DataSource(DataSourceType.SLAVE) |
| | | @Async |
| | | @Override |
| | | public void export(EstimatedReceivableBillLog estimatedReceivableBillLog,String exportKey) { |
| | | |
| | | super.export(EstimatedReceivableBillLog.class,exportKey,"estimatedReceivableBillLogData",(pageNum)->{ |
| | | PageUtils.startPage(pageNum, Constants.EXPORT_PATE_SIZE); |
| | | return selectEstimatedReceivableBillLogList(estimatedReceivableBillLog); |
| | | }); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 新增预估应收账单日志 |
| | | * |
| | | * @param estimatedReceivableBillLog 预估应收账单日志 |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int insertEstimatedReceivableBillLog(EstimatedReceivableBillLog estimatedReceivableBillLog) |
| | | { |
| | | estimatedReceivableBillLog.setCreateTime(DateUtils.getNowDate()); |
| | | return estimatedReceivableBillLogMapper.insertEstimatedReceivableBillLog(estimatedReceivableBillLog); |
| | | } |
| | | |
| | | /** |
| | | * 新增预估应收账单日志[批量] |
| | | * |
| | | * @param estimatedReceivableBillLogs 预估应收账单日志 |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int insertEstimatedReceivableBillLogBatch(List<EstimatedReceivableBillLog> estimatedReceivableBillLogs) |
| | | { |
| | | int rows = estimatedReceivableBillLogMapper.insertEstimatedReceivableBillLogBatch(estimatedReceivableBillLogs); |
| | | return rows; |
| | | } |
| | | |
| | | /** |
| | | * 修改预估应收账单日志 |
| | | * |
| | | * @param estimatedReceivableBillLog 预估应收账单日志 |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int updateEstimatedReceivableBillLog(EstimatedReceivableBillLog estimatedReceivableBillLog) |
| | | { |
| | | return estimatedReceivableBillLogMapper.updateEstimatedReceivableBillLog(estimatedReceivableBillLog); |
| | | } |
| | | |
| | | /** |
| | | * 修改预估应收账单日志[批量] |
| | | * |
| | | * @param estimatedReceivableBillLogs 预估应收账单日志 |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int updateEstimatedReceivableBillLogBatch(List<EstimatedReceivableBillLog> estimatedReceivableBillLogs){ |
| | | return estimatedReceivableBillLogMapper.updateEstimatedReceivableBillLogBatch(estimatedReceivableBillLogs); |
| | | } |
| | | |
| | | /** |
| | | * 删除预估应收账单日志对象 |
| | | * |
| | | * @param ids 需要删除的数据ID |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int deleteEstimatedReceivableBillLogByIds(String ids) |
| | | { |
| | | return deleteEstimatedReceivableBillLogByIds(Convert.toIntArray(ids)); |
| | | } |
| | | |
| | | /** |
| | | * 删除预估应收账单日志对象 |
| | | * |
| | | * |
| | | * @param ids 需要删除的数据ID |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int deleteEstimatedReceivableBillLogByIds(Integer[] ids) |
| | | { |
| | | return estimatedReceivableBillLogMapper.deleteEstimatedReceivableBillLogByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * 删除预估应收账单日志信息 |
| | | * |
| | | * @param id 预估应收账单日志ID |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int deleteEstimatedReceivableBillLogById(Integer id) |
| | | { |
| | | return estimatedReceivableBillLogMapper.deleteEstimatedReceivableBillLogById(id); |
| | | } |
| | | } |
New file |
| | |
| | | package com.ruoyi.cwgl.service.impl; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.scheduling.annotation.Async; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.common.constant.Constants; |
| | | import com.ruoyi.common.annotation.DataSource; |
| | | import com.ruoyi.common.enums.DataSourceType; |
| | | import com.ruoyi.common.core.service.BaseService; |
| | | |
| | | import com.ruoyi.cwgl.mapper.EstimatedReceivableLogMapper; |
| | | import com.ruoyi.cwgl.domain.EstimatedReceivableLog; |
| | | import com.ruoyi.cwgl.service.IEstimatedReceivableLogService; |
| | | import com.ruoyi.common.core.text.Convert; |
| | | |
| | | /** |
| | | * 预估应收管理日志Service业务层处理 |
| | | * |
| | | * @author ruoyi |
| | | * @date 2025-08-13 |
| | | */ |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class EstimatedReceivableLogServiceImpl extends BaseService<EstimatedReceivableLogMapper, EstimatedReceivableLog> implements IEstimatedReceivableLogService |
| | | { |
| | | protected final Logger logger = LoggerFactory.getLogger(getClass()); |
| | | @Resource |
| | | private EstimatedReceivableLogMapper estimatedReceivableLogMapper; |
| | | |
| | | |
| | | /** |
| | | * 查询预估应收管理日志 |
| | | * |
| | | * @param id 预估应收管理日志ID |
| | | * @return 预估应收管理日志 |
| | | */ |
| | | @DataSource(DataSourceType.SLAVE) |
| | | @Override |
| | | public EstimatedReceivableLog selectEstimatedReceivableLogById(Integer id) |
| | | { |
| | | return estimatedReceivableLogMapper.selectEstimatedReceivableLogById(id); |
| | | } |
| | | |
| | | /** |
| | | * 查询预估应收管理日志 记录数 |
| | | * |
| | | * @param estimatedReceivableLog 预估应收管理日志 |
| | | * @return 预估应收管理日志集合 |
| | | */ |
| | | @DataSource(DataSourceType.SLAVE) |
| | | @Override |
| | | public int selectEstimatedReceivableLogCount(EstimatedReceivableLog estimatedReceivableLog) |
| | | { |
| | | return estimatedReceivableLogMapper.selectEstimatedReceivableLogCount(estimatedReceivableLog); |
| | | } |
| | | |
| | | /** |
| | | * 查询预估应收管理日志列表 |
| | | * |
| | | * @param estimatedReceivableLog 预估应收管理日志 |
| | | * @return 预估应收管理日志 |
| | | */ |
| | | @DataSource(DataSourceType.SLAVE) |
| | | @Override |
| | | public List<EstimatedReceivableLog> selectEstimatedReceivableLogList(EstimatedReceivableLog estimatedReceivableLog) |
| | | { |
| | | return estimatedReceivableLogMapper.selectEstimatedReceivableLogList(estimatedReceivableLog); |
| | | } |
| | | |
| | | /** |
| | | * 查询预估应收管理日志列表 异步 导出 |
| | | * |
| | | * @param estimatedReceivableLog 预估应收管理日志 |
| | | * @param exportKey 导出功能的唯一标识 |
| | | * @return 预估应收管理日志集合 |
| | | */ |
| | | @DataSource(DataSourceType.SLAVE) |
| | | @Async |
| | | @Override |
| | | public void export(EstimatedReceivableLog estimatedReceivableLog,String exportKey) { |
| | | |
| | | super.export(EstimatedReceivableLog.class,exportKey,"estimatedReceivableLogData",(pageNum)->{ |
| | | PageUtils.startPage(pageNum, Constants.EXPORT_PATE_SIZE); |
| | | return selectEstimatedReceivableLogList(estimatedReceivableLog); |
| | | }); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 新增预估应收管理日志 |
| | | * |
| | | * @param estimatedReceivableLog 预估应收管理日志 |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int insertEstimatedReceivableLog(EstimatedReceivableLog estimatedReceivableLog) |
| | | { |
| | | estimatedReceivableLog.setCreateTime(DateUtils.getNowDate()); |
| | | return estimatedReceivableLogMapper.insertEstimatedReceivableLog(estimatedReceivableLog); |
| | | } |
| | | |
| | | /** |
| | | * 新增预估应收管理日志[批量] |
| | | * |
| | | * @param estimatedReceivableLogs 预估应收管理日志 |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int insertEstimatedReceivableLogBatch(List<EstimatedReceivableLog> estimatedReceivableLogs) |
| | | { |
| | | int rows = estimatedReceivableLogMapper.insertEstimatedReceivableLogBatch(estimatedReceivableLogs); |
| | | return rows; |
| | | } |
| | | |
| | | /** |
| | | * 修改预估应收管理日志 |
| | | * |
| | | * @param estimatedReceivableLog 预估应收管理日志 |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int updateEstimatedReceivableLog(EstimatedReceivableLog estimatedReceivableLog) |
| | | { |
| | | return estimatedReceivableLogMapper.updateEstimatedReceivableLog(estimatedReceivableLog); |
| | | } |
| | | |
| | | /** |
| | | * 修改预估应收管理日志[批量] |
| | | * |
| | | * @param estimatedReceivableLogs 预估应收管理日志 |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int updateEstimatedReceivableLogBatch(List<EstimatedReceivableLog> estimatedReceivableLogs){ |
| | | return estimatedReceivableLogMapper.updateEstimatedReceivableLogBatch(estimatedReceivableLogs); |
| | | } |
| | | |
| | | /** |
| | | * 删除预估应收管理日志对象 |
| | | * |
| | | * @param ids 需要删除的数据ID |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int deleteEstimatedReceivableLogByIds(String ids) |
| | | { |
| | | return deleteEstimatedReceivableLogByIds(Convert.toIntArray(ids)); |
| | | } |
| | | |
| | | /** |
| | | * 删除预估应收管理日志对象 |
| | | * |
| | | * |
| | | * @param ids 需要删除的数据ID |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int deleteEstimatedReceivableLogByIds(Integer[] ids) |
| | | { |
| | | return estimatedReceivableLogMapper.deleteEstimatedReceivableLogByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * 删除预估应收管理日志信息 |
| | | * |
| | | * @param id 预估应收管理日志ID |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int deleteEstimatedReceivableLogById(Integer id) |
| | | { |
| | | return estimatedReceivableLogMapper.deleteEstimatedReceivableLogById(id); |
| | | } |
| | | |
| | | @Override |
| | | public void insertEstimatedReceivableLog(String operation, Integer id,String userName ) { |
| | | EstimatedReceivableLog estimatedReceivableLog = new EstimatedReceivableLog(); |
| | | estimatedReceivableLog.setCreateBy(userName); |
| | | estimatedReceivableLog.setCreateTime(new Date()); |
| | | estimatedReceivableLog.setEstimatedId(id); |
| | | estimatedReceivableLog.setOperation(operation); |
| | | estimatedReceivableLogMapper.insertEstimatedReceivableLog(estimatedReceivableLog); |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.cwgl.service.impl; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.cwgl.mapper.EstimatedReceivableLogMapper; |
| | | import com.ruoyi.cwgl.service.IEstimatedReceivableLogService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.scheduling.annotation.Async; |
| | |
| | | protected final Logger logger = LoggerFactory.getLogger(getClass()); |
| | | @Resource |
| | | private EstimatedReceivableMapper estimatedReceivableMapper; |
| | | |
| | | @Autowired |
| | | private IEstimatedReceivableLogService logService; |
| | | |
| | | /** |
| | | * 查询预估应收管理 |
| | |
| | | public int updateEstimatedReceivable(EstimatedReceivable estimatedReceivable) |
| | | { |
| | | estimatedReceivable.setUpdateTime(DateUtils.getNowDate()); |
| | | String username = SecurityUtils.getUsername(); |
| | | logService.insertEstimatedReceivableLog("修改应收",estimatedReceivable.getId(),username); |
| | | return estimatedReceivableMapper.updateEstimatedReceivable(estimatedReceivable); |
| | | } |
| | | |
| | |
| | | { |
| | | return estimatedReceivableMapper.deleteEstimatedReceivableById(id); |
| | | } |
| | | |
| | | @Override |
| | | public int confirm(Integer id) { |
| | | EstimatedReceivable estimatedReceivable = estimatedReceivableMapper.selectEstimatedReceivableById(id); |
| | | if (estimatedReceivable==null){ |
| | | throw new ServiceException("数据不存在"); |
| | | } |
| | | if (estimatedReceivable.getIsConfirmed().equals(2)) { |
| | | throw new ServiceException("该数据已作废"); |
| | | |
| | | } |
| | | if (estimatedReceivable.getIsConfirmed().equals(1)) { |
| | | throw new ServiceException("无需重复确认"); |
| | | |
| | | } |
| | | String username = SecurityUtils.getUsername(); |
| | | |
| | | logService.insertEstimatedReceivableLog("确认应收",id,username); |
| | | estimatedReceivable.setIsConfirmed(1); |
| | | estimatedReceivable.setConfirmBy(username); |
| | | estimatedReceivable.setConfirmTime(new Date()); |
| | | return estimatedReceivableMapper.updateEstimatedReceivable(estimatedReceivable); |
| | | } |
| | | |
| | | @Override |
| | | public int cancel(Integer id) { |
| | | EstimatedReceivable estimatedReceivable = estimatedReceivableMapper.selectEstimatedReceivableById(id); |
| | | if (estimatedReceivable==null){ |
| | | throw new ServiceException("数据不存在"); |
| | | } |
| | | if (estimatedReceivable.getIsConfirmed().equals(2)) { |
| | | throw new ServiceException("该数据已作废"); |
| | | |
| | | } |
| | | if (estimatedReceivable.getIsConfirmed().equals(0)) { |
| | | throw new ServiceException("无需重复取消"); |
| | | |
| | | } |
| | | String username = SecurityUtils.getUsername(); |
| | | |
| | | logService.insertEstimatedReceivableLog("取消应收",id,username); |
| | | estimatedReceivable.setIsConfirmed(0); |
| | | return estimatedReceivableMapper.updateEstimatedReceivable(estimatedReceivable); |
| | | } |
| | | |
| | | @Override |
| | | public int invalid(Integer id) { |
| | | EstimatedReceivable estimatedReceivable = estimatedReceivableMapper.selectEstimatedReceivableById(id); |
| | | if (estimatedReceivable==null){ |
| | | throw new ServiceException("数据不存在"); |
| | | } |
| | | if (estimatedReceivable.getIsConfirmed().equals(2)) { |
| | | throw new ServiceException("无需重复作废"); |
| | | |
| | | } |
| | | String username = SecurityUtils.getUsername(); |
| | | |
| | | logService.insertEstimatedReceivableLog("作废应收",id,username); |
| | | estimatedReceivable.setIsConfirmed(2); |
| | | return estimatedReceivableMapper.updateEstimatedReceivable(estimatedReceivable); |
| | | } |
| | | } |
New file |
| | |
| | | <?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="com.ruoyi.cwgl.mapper.EstimatedReceivableBillLogMapper"> |
| | | |
| | | <resultMap type="com.ruoyi.cwgl.domain.EstimatedReceivableBillLog" id="EstimatedReceivableBillLogResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="billId" column="bill_id" /> |
| | | <result property="createBy" column="create_by" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="operation" column="operation" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectEstimatedReceivableBillLogVo"> |
| | | select thisTab.id, thisTab.bill_id, thisTab.create_by, thisTab.create_time, thisTab.operation from estimated_receivable_bill_log AS thisTab |
| | | </sql> |
| | | <sql id="selectEstimatedReceivableBillLogVoCount"> |
| | | select count(0) from estimated_receivable_bill_log as thisTab |
| | | </sql> |
| | | |
| | | <sql id="whereCondition"> |
| | | <if test="billId != null "> and thisTab.bill_id = #{billId}</if> |
| | | <if test="operation != null and operation != ''"> and thisTab.operation = #{operation}</if> |
| | | </sql> |
| | | |
| | | <!--查询--> |
| | | <select id="selectEstimatedReceivableBillLogById" parameterType="Integer" resultMap="EstimatedReceivableBillLogResult"> |
| | | <include refid="selectEstimatedReceivableBillLogVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <select id="selectEstimatedReceivableBillLogCount" parameterType="com.ruoyi.cwgl.domain.EstimatedReceivableBillLog" resultType="int"> |
| | | <include refid="selectEstimatedReceivableBillLogVoCount"/> |
| | | <where> |
| | | <include refid="whereCondition"/> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectEstimatedReceivableBillLogList" parameterType="com.ruoyi.cwgl.domain.EstimatedReceivableBillLog" resultMap="EstimatedReceivableBillLogResult"> |
| | | <include refid="selectEstimatedReceivableBillLogVo"/> |
| | | <where> |
| | | <include refid="whereCondition"/> |
| | | </where> |
| | | order by thisTab.id desc |
| | | </select> |
| | | |
| | | <!-- 新增 --> |
| | | <insert id="insertEstimatedReceivableBillLog" parameterType="com.ruoyi.cwgl.domain.EstimatedReceivableBillLog" useGeneratedKeys="true" keyProperty="id"> |
| | | insert into estimated_receivable_bill_log |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="billId != null">bill_id,</if> |
| | | <if test="createBy != null">create_by,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="operation != null">operation,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="billId != null">#{billId},</if> |
| | | <if test="createBy != null">#{createBy},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="operation != null">#{operation},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <insert id="insertEstimatedReceivableBillLogBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id"> |
| | | insert into estimated_receivable_bill_log |
| | | <trim prefix="(" suffix=") values" suffixOverrides=","> |
| | | id,bill_id,create_by,create_time,operation, |
| | | </trim> |
| | | <foreach item="item" index="index" collection="list" separator=","> |
| | | <trim prefix="(" suffix=") " suffixOverrides=","> |
| | | #{item.id},#{item.billId},#{item.createBy},#{item.createTime},#{item.operation}, |
| | | </trim> |
| | | </foreach> |
| | | </insert> |
| | | |
| | | <!-- 修改 --> |
| | | <update id="updateEstimatedReceivableBillLog" parameterType="com.ruoyi.cwgl.domain.EstimatedReceivableBillLog"> |
| | | update estimated_receivable_bill_log |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="billId != null">bill_id = #{billId},</if> |
| | | <if test="createBy != null">create_by = #{createBy},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="operation != null">operation = #{operation},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | <!-- 修改 --> |
| | | <update id="updateEstimatedReceivableBillLogBatch" parameterType="java.util.List"> |
| | | <foreach collection="list" item="item" index="index" separator=";"> |
| | | update estimated_receivable_bill_log |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="item.billId != null">bill_id = #{item.billId},</if> |
| | | <if test="item.createBy != null">create_by = #{item.createBy},</if> |
| | | <if test="item.createTime != null">create_time = #{item.createTime},</if> |
| | | <if test="item.operation != null">operation = #{item.operation},</if> |
| | | </trim> |
| | | where id = #{item.id} |
| | | </foreach> |
| | | </update> |
| | | |
| | | <!--删除--> |
| | | <delete id="deleteEstimatedReceivableBillLogById" parameterType="Integer"> |
| | | delete from estimated_receivable_bill_log where id = #{id} |
| | | </delete> |
| | | <delete id="deleteEstimatedReceivableBillLogByIds" parameterType="Integer"> |
| | | delete from estimated_receivable_bill_log where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?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="com.ruoyi.cwgl.mapper.EstimatedReceivableLogMapper"> |
| | | |
| | | <resultMap type="com.ruoyi.cwgl.domain.EstimatedReceivableLog" id="EstimatedReceivableLogResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="estimatedId" column="estimated_id" /> |
| | | <result property="createBy" column="create_by" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="operation" column="operation" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectEstimatedReceivableLogVo"> |
| | | select thisTab.id, thisTab.estimated_id, thisTab.create_by, thisTab.create_time, thisTab.operation from estimated_receivable_log AS thisTab |
| | | </sql> |
| | | <sql id="selectEstimatedReceivableLogVoCount"> |
| | | select count(0) from estimated_receivable_log as thisTab |
| | | </sql> |
| | | |
| | | <sql id="whereCondition"> |
| | | <if test="estimatedId != null "> and thisTab.estimated_id = #{estimatedId}</if> |
| | | <if test="operation != null and operation != ''"> and thisTab.operation = #{operation}</if> |
| | | </sql> |
| | | |
| | | <!--查询--> |
| | | <select id="selectEstimatedReceivableLogById" parameterType="Integer" resultMap="EstimatedReceivableLogResult"> |
| | | <include refid="selectEstimatedReceivableLogVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <select id="selectEstimatedReceivableLogCount" parameterType="com.ruoyi.cwgl.domain.EstimatedReceivableLog" resultType="int"> |
| | | <include refid="selectEstimatedReceivableLogVoCount"/> |
| | | <where> |
| | | <include refid="whereCondition"/> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectEstimatedReceivableLogList" parameterType="com.ruoyi.cwgl.domain.EstimatedReceivableLog" resultMap="EstimatedReceivableLogResult"> |
| | | <include refid="selectEstimatedReceivableLogVo"/> |
| | | <where> |
| | | <include refid="whereCondition"/> |
| | | </where> |
| | | order by thisTab.id desc |
| | | </select> |
| | | |
| | | <!-- 新增 --> |
| | | <insert id="insertEstimatedReceivableLog" parameterType="com.ruoyi.cwgl.domain.EstimatedReceivableLog" useGeneratedKeys="true" keyProperty="id"> |
| | | insert into estimated_receivable_log |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="estimatedId != null">estimated_id,</if> |
| | | <if test="createBy != null">create_by,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="operation != null">operation,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="estimatedId != null">#{estimatedId},</if> |
| | | <if test="createBy != null">#{createBy},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="operation != null">#{operation},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <insert id="insertEstimatedReceivableLogBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id"> |
| | | insert into estimated_receivable_log |
| | | <trim prefix="(" suffix=") values" suffixOverrides=","> |
| | | id,estimated_id,create_by,create_time,operation, |
| | | </trim> |
| | | <foreach item="item" index="index" collection="list" separator=","> |
| | | <trim prefix="(" suffix=") " suffixOverrides=","> |
| | | #{item.id},#{item.estimatedId},#{item.createBy},#{item.createTime},#{item.operation}, |
| | | </trim> |
| | | </foreach> |
| | | </insert> |
| | | |
| | | <!-- 修改 --> |
| | | <update id="updateEstimatedReceivableLog" parameterType="com.ruoyi.cwgl.domain.EstimatedReceivableLog"> |
| | | update estimated_receivable_log |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="estimatedId != null">estimated_id = #{estimatedId},</if> |
| | | <if test="createBy != null">create_by = #{createBy},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="operation != null">operation = #{operation},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | <!-- 修改 --> |
| | | <update id="updateEstimatedReceivableLogBatch" parameterType="java.util.List"> |
| | | <foreach collection="list" item="item" index="index" separator=";"> |
| | | update estimated_receivable_log |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="item.estimatedId != null">estimated_id = #{item.estimatedId},</if> |
| | | <if test="item.createBy != null">create_by = #{item.createBy},</if> |
| | | <if test="item.createTime != null">create_time = #{item.createTime},</if> |
| | | <if test="item.operation != null">operation = #{item.operation},</if> |
| | | </trim> |
| | | where id = #{item.id} |
| | | </foreach> |
| | | </update> |
| | | |
| | | <!--删除--> |
| | | <delete id="deleteEstimatedReceivableLogById" parameterType="Integer"> |
| | | delete from estimated_receivable_log where id = #{id} |
| | | </delete> |
| | | <delete id="deleteEstimatedReceivableLogByIds" parameterType="Integer"> |
| | | delete from estimated_receivable_log where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | | </mapper> |
New file |
| | |
| | | import request,{download,requestType} from "@/utils/request"; |
| | | import {BaseEntityInterface} from "@/utils/globalInterface"; |
| | | export interface EstimatedReceivableBillLogI extends BaseEntityInterface{ |
| | | id ?: number , billId ?: number , createBy ?: string , createTime ?: string , operation ?: string } |
| | | |
| | | |
| | | /** |
| | | * 查询预估应收账单日志列表 |
| | | */ |
| | | export const listEstimatedReceivableBillLog:requestType = (query) => { |
| | | return request({ |
| | | url: '/cwgl/estimatedReceivableBillLog/list', |
| | | method:'get', |
| | | params:query |
| | | }) |
| | | } |
| | | /** |
| | | * 查询预估应收账单日志详细 |
| | | */ |
| | | export const getEstimatedReceivableBillLog:requestType = (id) => { |
| | | return request({ |
| | | url: '/cwgl/estimatedReceivableBillLog/' + id, |
| | | method:'get' |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * 新增预估应收账单日志 |
| | | */ |
| | | export const addEstimatedReceivableBillLog:requestType = (data) => { |
| | | return request({ |
| | | url: '/cwgl/estimatedReceivableBillLog', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * 修改预估应收账单日志 |
| | | */ |
| | | export const updateEstimatedReceivableBillLog:requestType = (data) => { |
| | | return request({ |
| | | url: '/cwgl/estimatedReceivableBillLog', |
| | | method: 'put', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * 删除预估应收账单日志 |
| | | */ |
| | | export const delEstimatedReceivableBillLog:requestType = (id) => { |
| | | return request({ |
| | | url: '/cwgl/estimatedReceivableBillLog/' + id, |
| | | method: 'delete' |
| | | }) |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 导出预估应收账单日志 |
| | | */ |
| | | export const exportEstimatedReceivableBillLog:requestType = (query) => { |
| | | return new Promise<any>(()=>{ |
| | | download('/cwgl/estimatedReceivableBillLog/export',query); |
| | | }) |
| | | } |
New file |
| | |
| | | import request,{download,requestType} from "@/utils/request"; |
| | | import {BaseEntityInterface} from "@/utils/globalInterface"; |
| | | export interface EstimatedReceivableLogI extends BaseEntityInterface{ |
| | | id ?: number , estimatedId ?: number , createBy ?: string , createTime ?: string , operation ?: string } |
| | | |
| | | |
| | | /** |
| | | * 查询预估应收管理日志列表 |
| | | */ |
| | | export const listEstimatedReceivableLog:requestType = (query) => { |
| | | return request({ |
| | | url: '/cwgl/estimatedReceivableLog/list', |
| | | method:'get', |
| | | params:query |
| | | }) |
| | | } |
| | | /** |
| | | * 查询预估应收管理日志详细 |
| | | */ |
| | | export const getEstimatedReceivableLog:requestType = (id) => { |
| | | return request({ |
| | | url: '/cwgl/estimatedReceivableLog/' + id, |
| | | method:'get' |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * 新增预估应收管理日志 |
| | | */ |
| | | export const addEstimatedReceivableLog:requestType = (data) => { |
| | | return request({ |
| | | url: '/cwgl/estimatedReceivableLog', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * 修改预估应收管理日志 |
| | | */ |
| | | export const updateEstimatedReceivableLog:requestType = (data) => { |
| | | return request({ |
| | | url: '/cwgl/estimatedReceivableLog', |
| | | method: 'put', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * 删除预估应收管理日志 |
| | | */ |
| | | export const delEstimatedReceivableLog:requestType = (id) => { |
| | | return request({ |
| | | url: '/cwgl/estimatedReceivableLog/' + id, |
| | | method: 'delete' |
| | | }) |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 导出预估应收管理日志 |
| | | */ |
| | | export const exportEstimatedReceivableLog:requestType = (query) => { |
| | | return new Promise<any>(()=>{ |
| | | download('/cwgl/estimatedReceivableLog/export',query); |
| | | }) |
| | | } |
New file |
| | |
| | | <template> |
| | | <basicContainer > |
| | | <avue-crud |
| | | :option="option" |
| | | :table-loading="pageF.loading" |
| | | :data="tableData" |
| | | :page="page" |
| | | :permission="permissionList" |
| | | :before-open="beforeOpen" |
| | | v-model="form" |
| | | ref="crudRef" |
| | | @row-update="rowUpdate" |
| | | @row-save="rowSave" |
| | | @refresh-change="refreshChange" |
| | | @row-del="rowDel" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @on-load="onLoad" |
| | | > |
| | | <template #menu-left> |
| | | <el-button |
| | | type="success" |
| | | icon="Edit" |
| | | :disabled="pageF.single" |
| | | v-hasPermi="['cwgl:estimatedReceivableBillLog:edit']" |
| | | @click="handleUpdate">修改 |
| | | </el-button> |
| | | <el-button |
| | | type="danger" |
| | | icon="Delete" |
| | | :disabled="pageF.multiple" |
| | | @click="handleDelete" |
| | | v-hasPermi="['cwgl:estimatedReceivableBillLog:remove']" |
| | | >删除 |
| | | </el-button> |
| | | <el-button |
| | | type="warning" |
| | | plain |
| | | icon="Download" |
| | | @click="handleExport" |
| | | v-hasPermi="['cwgl:estimatedReceivableBillLog:export']" |
| | | >导出 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </basicContainer> |
| | | </template> |
| | | |
| | | <script setup name="estimatedReceivableBillLog" lang="ts"> |
| | | import {EstimatedReceivableBillLogI,addEstimatedReceivableBillLog, delEstimatedReceivableBillLog, exportEstimatedReceivableBillLog, getEstimatedReceivableBillLog, listEstimatedReceivableBillLog, updateEstimatedReceivableBillLog} from "@/api/cwgl/estimatedReceivableBillLog"; |
| | | import useCurrentInstance from "@/utils/useCurrentInstance"; |
| | | import {computed,reactive, ref, toRefs} from "vue"; |
| | | import {PagesInterface, PageQueryInterface} from "@/utils/globalInterface"; |
| | | import {usePagePlus} from "@/hooks/usePagePlus"; |
| | | import {hasPermission} from "@/utils/permissionUtils"; |
| | | |
| | | const { proxy } = useCurrentInstance(); |
| | | const crudRef = ref(); |
| | | |
| | | const permissionList = computed(()=>{ |
| | | return { |
| | | addBtn: hasPermission(["cwgl:estimatedReceivableBillLog:add"]), |
| | | delBtn: hasPermission(["cwgl:estimatedReceivableBillLog:remove"]), |
| | | editBtn: hasPermission(["cwgl:estimatedReceivableBillLog:edit"]), |
| | | viewBtn: hasPermission(["cwgl:estimatedReceivableBillLog:query"]), |
| | | } |
| | | }) |
| | | |
| | | const data = reactive({ |
| | | form:<EstimatedReceivableBillLogI>{}, |
| | | queryParams:<EstimatedReceivableBillLogI&PageQueryInterface>{}, |
| | | page: <PagesInterface>{ |
| | | pageSize: 10, |
| | | total: 0, |
| | | currentPage: 1, |
| | | }, |
| | | selectionList:[], |
| | | }) |
| | | const {queryParams,form,page,selectionList} = toRefs(data); |
| | | const option = ref({ |
| | | pageKey: 'EstimatedReceivableBillLog', |
| | | rowKey: 'id', |
| | | column: { |
| | | id: { |
| | | label: '主键', |
| | | }, |
| | | billId: { |
| | | label: '账单id', |
| | | }, |
| | | createBy: { |
| | | label: '创建者', |
| | | }, |
| | | createTime: { |
| | | label: '创建时间', |
| | | }, |
| | | operation: { |
| | | label: '操作说明', |
| | | }, |
| | | } |
| | | }) |
| | | |
| | | const { tableData,pageF,rowSave,rowUpdate,rowDel,beforeOpen,searchChange, |
| | | searchReset,selectionChange,onLoad,currentChange,sizeChange,handleDelete,handleExport,handleUpdate,refreshChange} = usePagePlus({ |
| | | form:form, |
| | | option:option, |
| | | queryParams:queryParams, |
| | | idKey:'id', |
| | | page:page.value, |
| | | getListApi:listEstimatedReceivableBillLog, |
| | | getDetailApi:getEstimatedReceivableBillLog, |
| | | exportApi:exportEstimatedReceivableBillLog, |
| | | deleteApi:delEstimatedReceivableBillLog, |
| | | addApi:addEstimatedReceivableBillLog, |
| | | updateApi:updateEstimatedReceivableBillLog, |
| | | handleUpdateFunc:()=>{ |
| | | crudRef.value.rowEdit(selectionList.value[0]); |
| | | }, |
| | | handleSelectionChangeFunc:(selection:any)=>{ |
| | | selectionList.value = selection; |
| | | } |
| | | }) |
| | | |
| | | |
| | | </script> |
New file |
| | |
| | | <template> |
| | | <basicContainer > |
| | | <avue-crud |
| | | :option="option" |
| | | :table-loading="pageF.loading" |
| | | :data="tableData" |
| | | :page="page" |
| | | :permission="permissionList" |
| | | :before-open="beforeOpen" |
| | | v-model="form" |
| | | ref="crudRef" |
| | | @row-update="rowUpdate" |
| | | @row-save="rowSave" |
| | | @refresh-change="refreshChange" |
| | | @row-del="rowDel" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @on-load="onLoad" |
| | | > |
| | | <template #menu-left> |
| | | <el-button |
| | | type="success" |
| | | icon="Edit" |
| | | :disabled="pageF.single" |
| | | v-hasPermi="['cwgl:estimatedReceivableLog:edit']" |
| | | @click="handleUpdate">修改 |
| | | </el-button> |
| | | <el-button |
| | | type="danger" |
| | | icon="Delete" |
| | | :disabled="pageF.multiple" |
| | | @click="handleDelete" |
| | | v-hasPermi="['cwgl:estimatedReceivableLog:remove']" |
| | | >删除 |
| | | </el-button> |
| | | <el-button |
| | | type="warning" |
| | | plain |
| | | icon="Download" |
| | | @click="handleExport" |
| | | v-hasPermi="['cwgl:estimatedReceivableLog:export']" |
| | | >导出 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </basicContainer> |
| | | </template> |
| | | |
| | | <script setup name="estimatedReceivableLog" lang="ts"> |
| | | import {EstimatedReceivableLogI,addEstimatedReceivableLog, delEstimatedReceivableLog, exportEstimatedReceivableLog, getEstimatedReceivableLog, listEstimatedReceivableLog, updateEstimatedReceivableLog} from "@/api/cwgl/estimatedReceivableLog"; |
| | | import useCurrentInstance from "@/utils/useCurrentInstance"; |
| | | import {computed,reactive, ref, toRefs} from "vue"; |
| | | import {PagesInterface, PageQueryInterface} from "@/utils/globalInterface"; |
| | | import {usePagePlus} from "@/hooks/usePagePlus"; |
| | | import {hasPermission} from "@/utils/permissionUtils"; |
| | | |
| | | const { proxy } = useCurrentInstance(); |
| | | const crudRef = ref(); |
| | | |
| | | const permissionList = computed(()=>{ |
| | | return { |
| | | addBtn: hasPermission(["cwgl:estimatedReceivableLog:add"]), |
| | | delBtn: hasPermission(["cwgl:estimatedReceivableLog:remove"]), |
| | | editBtn: hasPermission(["cwgl:estimatedReceivableLog:edit"]), |
| | | viewBtn: hasPermission(["cwgl:estimatedReceivableLog:query"]), |
| | | } |
| | | }) |
| | | |
| | | const data = reactive({ |
| | | form:<EstimatedReceivableLogI>{}, |
| | | queryParams:<EstimatedReceivableLogI&PageQueryInterface>{}, |
| | | page: <PagesInterface>{ |
| | | pageSize: 10, |
| | | total: 0, |
| | | currentPage: 1, |
| | | }, |
| | | selectionList:[], |
| | | }) |
| | | const {queryParams,form,page,selectionList} = toRefs(data); |
| | | const option = ref({ |
| | | pageKey: 'EstimatedReceivableLog', |
| | | rowKey: 'id', |
| | | column: { |
| | | id: { |
| | | label: '主键', |
| | | }, |
| | | estimatedId: { |
| | | label: '预估应收管理表id', |
| | | }, |
| | | createBy: { |
| | | label: '创建者', |
| | | }, |
| | | createTime: { |
| | | label: '创建时间', |
| | | }, |
| | | operation: { |
| | | label: '操作说明', |
| | | }, |
| | | } |
| | | }) |
| | | |
| | | const { tableData,pageF,rowSave,rowUpdate,rowDel,beforeOpen,searchChange, |
| | | searchReset,selectionChange,onLoad,currentChange,sizeChange,handleDelete,handleExport,handleUpdate,refreshChange} = usePagePlus({ |
| | | form:form, |
| | | option:option, |
| | | queryParams:queryParams, |
| | | idKey:'id', |
| | | page:page.value, |
| | | getListApi:listEstimatedReceivableLog, |
| | | getDetailApi:getEstimatedReceivableLog, |
| | | exportApi:exportEstimatedReceivableLog, |
| | | deleteApi:delEstimatedReceivableLog, |
| | | addApi:addEstimatedReceivableLog, |
| | | updateApi:updateEstimatedReceivableLog, |
| | | handleUpdateFunc:()=>{ |
| | | crudRef.value.rowEdit(selectionList.value[0]); |
| | | }, |
| | | handleSelectionChangeFunc:(selection:any)=>{ |
| | | selectionList.value = selection; |
| | | } |
| | | }) |
| | | |
| | | |
| | | </script> |