From dbe34e6f7e928435d88f85dbe89e4c76d8e5b3e9 Mon Sep 17 00:00:00 2001 From: wujianwei <wjw@11.com> Date: 星期四, 07 八月 2025 14:24:32 +0800 Subject: [PATCH] 新增预估应收管理前后端 --- service/src/main/resources/mapper/cwgl/EstimatedReceivableMapper.xml | 200 ++++++++++ service/src/main/java/com/ruoyi/cwgl/controller/EstimatedReceivableController.java | 108 +++++ ui/admin-ui3/src/api/cwgl/estimatedReceivable.ts | 67 +++ service/src/main/java/com/ruoyi/cwgl/service/impl/EstimatedReceivableServiceImpl.java | 182 +++++++++ ui/admin-ui3/src/views/cwgl/estimatedReceivable/index.vue | 189 +++++++++ service/src/main/java/com/ruoyi/cwgl/service/IEstimatedReceivableService.java | 102 +++++ service/src/main/java/com/ruoyi/cwgl/domain/EstimatedReceivable.java | 153 ++++++++ service/src/main/java/com/ruoyi/cwgl/mapper/EstimatedReceivableMapper.java | 87 ++++ 8 files changed, 1,088 insertions(+), 0 deletions(-) diff --git a/service/src/main/java/com/ruoyi/cwgl/controller/EstimatedReceivableController.java b/service/src/main/java/com/ruoyi/cwgl/controller/EstimatedReceivableController.java new file mode 100644 index 0000000..736e2be --- /dev/null +++ b/service/src/main/java/com/ruoyi/cwgl/controller/EstimatedReceivableController.java @@ -0,0 +1,108 @@ +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.EstimatedReceivable; +import com.ruoyi.cwgl.service.IEstimatedReceivableService; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 棰勪及搴旀敹绠$悊Controller + * + * @author ruoyi + * @date 2025-08-07 + */ +@RestController +@RequestMapping("/cwgl/estimatedReceivable") +public class EstimatedReceivableController extends BaseController +{ + @Autowired + private IEstimatedReceivableService estimatedReceivableService; + + + + /** + * 鏌ヨ棰勪及搴旀敹绠$悊鍒楄〃 + */ + @PreAuthorize("@ss.hasPermi('cwgl:estimatedReceivable:list')") + @GetMapping("/list") + public TableDataInfo list(EstimatedReceivable estimatedReceivable) + { + startPage(); + List<EstimatedReceivable> list = estimatedReceivableService.selectEstimatedReceivableList(estimatedReceivable); + return getDataTable(list); + } + + /** + * 瀵煎嚭棰勪及搴旀敹绠$悊鍒楄〃 + * @param estimatedReceivable 鏌ヨ鏉′欢瀵硅薄 + */ + @PreAuthorize("@ss.hasPermi('cwgl:estimatedReceivable:export')") + @Log(title = "棰勪及搴旀敹绠$悊", businessType = BusinessType.EXPORT) + @GetMapping("/export") + public AjaxResult export(EstimatedReceivable estimatedReceivable,String exportKey) + { + estimatedReceivableService.export(estimatedReceivable,exportKey); + return AjaxResult.success("瀵煎嚭璇锋眰鎴愬姛锛岃绋嶅悗鐐瑰嚮涓嬭浇...!"); + } + + + + /** + * 鑾峰彇棰勪及搴旀敹绠$悊璇︾粏淇℃伅 + */ + @PreAuthorize("@ss.hasPermi('cwgl:estimatedReceivable:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Integer id) + { + return AjaxResult.success(estimatedReceivableService.selectEstimatedReceivableById(id)); + } + + /** + * 鏂板棰勪及搴旀敹绠$悊 + */ + @PreAuthorize("@ss.hasPermi('cwgl:estimatedReceivable:add')") + @Log(title = "棰勪及搴旀敹绠$悊", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody EstimatedReceivable estimatedReceivable) + { + return toAjax(estimatedReceivableService.insertEstimatedReceivable(estimatedReceivable)); + } + + /** + * 淇敼棰勪及搴旀敹绠$悊 + */ + @PreAuthorize("@ss.hasPermi('cwgl:estimatedReceivable:edit')") + @Log(title = "棰勪及搴旀敹绠$悊", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody EstimatedReceivable estimatedReceivable) + { + return toAjax(estimatedReceivableService.updateEstimatedReceivable(estimatedReceivable)); + } + + /** + * 鍒犻櫎棰勪及搴旀敹绠$悊 + */ + @PreAuthorize("@ss.hasPermi('cwgl:estimatedReceivable:remove')") + @Log(title = "棰勪及搴旀敹绠$悊", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Integer[] ids) + { + return toAjax(estimatedReceivableService.deleteEstimatedReceivableByIds(ids)); + } +} diff --git a/service/src/main/java/com/ruoyi/cwgl/domain/EstimatedReceivable.java b/service/src/main/java/com/ruoyi/cwgl/domain/EstimatedReceivable.java new file mode 100644 index 0000000..4e8b456 --- /dev/null +++ b/service/src/main/java/com/ruoyi/cwgl/domain/EstimatedReceivable.java @@ -0,0 +1,153 @@ +package com.ruoyi.cwgl.domain; + +import java.math.BigDecimal; +import java.util.Date; +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 + * + * @author ruoyi + * @date 2025-08-07 + */ +@Data +public class EstimatedReceivable{ + + + /** ID */ + @TableField("id") + private Integer id; + + + /** 璐圭敤绯荤粺缂栧彿 */ + @Excel(name = "璐圭敤绯荤粺缂栧彿") + + @TableField("fee_system_no") + private String feeSystemNo; + + + /** 璋冨害鍗曞彿 */ + @Excel(name = "璋冨害鍗曞彿") + + @TableField("dispatch_no") + private String dispatchNo; + + + /** 瀹㈡埛鍚嶇О */ + @Excel(name = "瀹㈡埛鍚嶇О") + + @TableField("customer_name") + private String customerName; + + + /** 椤圭洰鍚嶇О */ + @Excel(name = "椤圭洰鍚嶇О") + + @TableField("project_name") + private String projectName; + + + /** 涓嬪崟鏃ユ湡 */ + @Excel(name = "涓嬪崟鏃ユ湡", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @TableField("order_date") + private Date orderDate; + + + /** 璐圭敤鍚嶇О */ + @Excel(name = "璐圭敤鍚嶇О") + + @TableField("fee_name") + private String feeName; + + + /** 棰勪及璐圭敤閲戦 */ + @Excel(name = "棰勪及璐圭敤閲戦") + + @TableField("estimated_amount") + private BigDecimal estimatedAmount; + + + /** 甯佸埗 */ + @Excel(name = "甯佸埗") + + @TableField("currency") + private String currency; + + + /** 鍏宠仈璐﹀崟鍚嶇О */ + @Excel(name = "鍏宠仈璐﹀崟鍚嶇О") + + @TableField("related_bill_name") + private String relatedBillName; + + + /** 鍏宠仈璐﹀崟鐘舵�� */ + @Excel(name = "鍏宠仈璐﹀崟鐘舵��") + + @TableField("related_bill_status") + private Integer relatedBillStatus; + + + /** 鏄惁纭(0:鏈‘璁�;1:宸茬‘璁�) */ + @Excel(name = "鏄惁纭(0:鏈‘璁�;1:宸茬‘璁�)") + + @TableField("is_confirmed") + private Integer isConfirmed; + + + /** 纭浜� */ + @Excel(name = "纭浜�") + + @TableField("confirm_by") + private String confirmBy; + + + /** 纭鏃堕棿 */ + @Excel(name = "纭鏃堕棿", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @TableField("confirm_time") + private Date confirmTime; + + + /** 澶囨敞 */ + @Excel(name = "澶囨敞") + + @TableField("remark") + private String remark; + + + /** 鍒涘缓浜� */ + @TableField("create_by") + private String createBy; + + + /** 鏇存柊浜� */ + @TableField("update_by") + private String updateBy; + + + /** 鍒涘缓鏃堕棿 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @TableField("create_time") + private Date createTime; + + + /** 鏇存柊鏃堕棿 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @TableField("update_time") + private Date updateTime; + + + /** 鍒犻櫎鏍囪(0:姝e父;1:鍒犻櫎) */ + @Excel(name = "鍒犻櫎鏍囪(0:姝e父;1:鍒犻櫎)") + + @TableField("deleted") + private Integer deleted; + + +} diff --git a/service/src/main/java/com/ruoyi/cwgl/mapper/EstimatedReceivableMapper.java b/service/src/main/java/com/ruoyi/cwgl/mapper/EstimatedReceivableMapper.java new file mode 100644 index 0000000..362fbcc --- /dev/null +++ b/service/src/main/java/com/ruoyi/cwgl/mapper/EstimatedReceivableMapper.java @@ -0,0 +1,87 @@ +package com.ruoyi.cwgl.mapper; + +import java.util.List; +import com.ruoyi.cwgl.domain.EstimatedReceivable; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + + +/** + * 棰勪及搴旀敹绠$悊Mapper鎺ュ彛 + * + * @author ruoyi + * @date 2025-08-07 + */ +public interface EstimatedReceivableMapper extends BaseMapper<EstimatedReceivable> +{ + /** + * 鏌ヨ棰勪及搴旀敹绠$悊 + * + * @param id 棰勪及搴旀敹绠$悊ID + * @return 棰勪及搴旀敹绠$悊 + */ + public EstimatedReceivable selectEstimatedReceivableById(Integer id); + + /** + * 鏌ヨ棰勪及搴旀敹绠$悊 璁板綍鏁� + * + * @param estimatedReceivable 棰勪及搴旀敹绠$悊 + * @return 棰勪及搴旀敹绠$悊闆嗗悎 + */ + public int selectEstimatedReceivableCount(EstimatedReceivable estimatedReceivable); + + /** + * 鏌ヨ棰勪及搴旀敹绠$悊鍒楄〃 + * + * @param estimatedReceivable 棰勪及搴旀敹绠$悊 + * @return 棰勪及搴旀敹绠$悊闆嗗悎 + */ + public List<EstimatedReceivable> selectEstimatedReceivableList(EstimatedReceivable estimatedReceivable); + + /** + * 鏂板棰勪及搴旀敹绠$悊 + * + * @param estimatedReceivable 棰勪及搴旀敹绠$悊 + * @return 缁撴灉 + */ + public int insertEstimatedReceivable(EstimatedReceivable estimatedReceivable); + + /** + * 鏂板棰勪及搴旀敹绠$悊[鎵归噺] + * + * @param estimatedReceivables 棰勪及搴旀敹绠$悊 + * @return 缁撴灉 + */ + public int insertEstimatedReceivableBatch(List<EstimatedReceivable> estimatedReceivables); + + /** + * 淇敼棰勪及搴旀敹绠$悊 + * + * @param estimatedReceivable 棰勪及搴旀敹绠$悊 + * @return 缁撴灉 + */ + public int updateEstimatedReceivable(EstimatedReceivable estimatedReceivable); + + /** + * 淇敼棰勪及搴旀敹绠$悊[鎵归噺] + * + * @param estimatedReceivables 棰勪及搴旀敹绠$悊 + * @return 缁撴灉 + */ + public int updateEstimatedReceivableBatch(List<EstimatedReceivable> estimatedReceivables); + + /** + * 鍒犻櫎棰勪及搴旀敹绠$悊 + * + * @param id 棰勪及搴旀敹绠$悊ID + * @return 缁撴灉 + */ + public int deleteEstimatedReceivableById(Integer id); + + /** + * 鎵归噺鍒犻櫎棰勪及搴旀敹绠$悊 + * + * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁ID + * @return 缁撴灉 + */ + public int deleteEstimatedReceivableByIds(Integer[] ids); +} diff --git a/service/src/main/java/com/ruoyi/cwgl/service/IEstimatedReceivableService.java b/service/src/main/java/com/ruoyi/cwgl/service/IEstimatedReceivableService.java new file mode 100644 index 0000000..67f14d0 --- /dev/null +++ b/service/src/main/java/com/ruoyi/cwgl/service/IEstimatedReceivableService.java @@ -0,0 +1,102 @@ +package com.ruoyi.cwgl.service; + +import java.util.List; +import com.ruoyi.cwgl.domain.EstimatedReceivable; +import com.baomidou.mybatisplus.extension.service.IService; +/** + * 棰勪及搴旀敹绠$悊Service鎺ュ彛 + * + * @author ruoyi + * @date 2025-08-07 + */ +public interface IEstimatedReceivableService extends IService<EstimatedReceivable> +{ + /** + * 鏌ヨ棰勪及搴旀敹绠$悊 + * + * @param id 棰勪及搴旀敹绠$悊ID + * @return 棰勪及搴旀敹绠$悊 + */ + public EstimatedReceivable selectEstimatedReceivableById(Integer id); + + /** + * 鏌ヨ棰勪及搴旀敹绠$悊 璁板綍鏁� + * + * @param estimatedReceivable 棰勪及搴旀敹绠$悊 + * @return 棰勪及搴旀敹绠$悊闆嗗悎 + */ + public int selectEstimatedReceivableCount(EstimatedReceivable estimatedReceivable); + + /** + * 鏌ヨ棰勪及搴旀敹绠$悊鍒楄〃 + * + * @param estimatedReceivable 棰勪及搴旀敹绠$悊 + * @return 棰勪及搴旀敹绠$悊闆嗗悎 + */ + public List<EstimatedReceivable> selectEstimatedReceivableList(EstimatedReceivable estimatedReceivable); + + /** + * 鏌ヨ棰勪及搴旀敹绠$悊鍒楄〃 寮傛 瀵煎嚭 + * + * @param estimatedReceivable 棰勪及搴旀敹绠$悊 + * @param exportKey 瀵煎嚭鍔熻兘鐨勫敮涓�鏍囪瘑 + * @return 棰勪及搴旀敹绠$悊闆嗗悎 + */ + public void export(EstimatedReceivable estimatedReceivable, String exportKey) ; + + + /** + * 鏂板棰勪及搴旀敹绠$悊 + * + * @param estimatedReceivable 棰勪及搴旀敹绠$悊 + * @return 缁撴灉 + */ + public int insertEstimatedReceivable(EstimatedReceivable estimatedReceivable); + + /** + * 鏂板棰勪及搴旀敹绠$悊[鎵归噺] + * + * @param estimatedReceivables 棰勪及搴旀敹绠$悊 + * @return 缁撴灉 + */ + public int insertEstimatedReceivableBatch(List<EstimatedReceivable> estimatedReceivables); + + /** + * 淇敼棰勪及搴旀敹绠$悊 + * + * @param estimatedReceivable 棰勪及搴旀敹绠$悊 + * @return 缁撴灉 + */ + public int updateEstimatedReceivable(EstimatedReceivable estimatedReceivable); + + /** + * 淇敼棰勪及搴旀敹绠$悊[鎵归噺] + * + * @param estimatedReceivables 棰勪及搴旀敹绠$悊 + * @return 缁撴灉 + */ + public int updateEstimatedReceivableBatch(List<EstimatedReceivable> estimatedReceivables); + /** + * 鎵归噺鍒犻櫎棰勪及搴旀敹绠$悊 + * + * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁ID + * @return 缁撴灉 + */ + public int deleteEstimatedReceivableByIds(String ids); + + /** + * 鎵归噺鍒犻櫎棰勪及搴旀敹绠$悊 + * + * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁ID + * @return 缁撴灉 + */ + public int deleteEstimatedReceivableByIds(Integer[] ids); + + /** + * 鍒犻櫎棰勪及搴旀敹绠$悊淇℃伅 + * + * @param id 棰勪及搴旀敹绠$悊ID + * @return 缁撴灉 + */ + public int deleteEstimatedReceivableById(Integer id); +} diff --git a/service/src/main/java/com/ruoyi/cwgl/service/impl/EstimatedReceivableServiceImpl.java b/service/src/main/java/com/ruoyi/cwgl/service/impl/EstimatedReceivableServiceImpl.java new file mode 100644 index 0000000..765e21a --- /dev/null +++ b/service/src/main/java/com/ruoyi/cwgl/service/impl/EstimatedReceivableServiceImpl.java @@ -0,0 +1,182 @@ +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.EstimatedReceivableMapper; +import com.ruoyi.cwgl.domain.EstimatedReceivable; +import com.ruoyi.cwgl.service.IEstimatedReceivableService; +import com.ruoyi.common.core.text.Convert; + +/** + * 棰勪及搴旀敹绠$悊Service涓氬姟灞傚鐞� + * + * @author ruoyi + * @date 2025-08-07 + */ +@Service +@Transactional(rollbackFor = Exception.class) +public class EstimatedReceivableServiceImpl extends BaseService<EstimatedReceivableMapper, EstimatedReceivable> implements IEstimatedReceivableService +{ + protected final Logger logger = LoggerFactory.getLogger(getClass()); + @Resource + private EstimatedReceivableMapper estimatedReceivableMapper; + + + /** + * 鏌ヨ棰勪及搴旀敹绠$悊 + * + * @param id 棰勪及搴旀敹绠$悊ID + * @return 棰勪及搴旀敹绠$悊 + */ + @DataSource(DataSourceType.SLAVE) + @Override + public EstimatedReceivable selectEstimatedReceivableById(Integer id) + { + return estimatedReceivableMapper.selectEstimatedReceivableById(id); + } + + /** + * 鏌ヨ棰勪及搴旀敹绠$悊 璁板綍鏁� + * + * @param estimatedReceivable 棰勪及搴旀敹绠$悊 + * @return 棰勪及搴旀敹绠$悊闆嗗悎 + */ + @DataSource(DataSourceType.SLAVE) + @Override + public int selectEstimatedReceivableCount(EstimatedReceivable estimatedReceivable) + { + return estimatedReceivableMapper.selectEstimatedReceivableCount(estimatedReceivable); + } + + /** + * 鏌ヨ棰勪及搴旀敹绠$悊鍒楄〃 + * + * @param estimatedReceivable 棰勪及搴旀敹绠$悊 + * @return 棰勪及搴旀敹绠$悊 + */ + @DataSource(DataSourceType.SLAVE) + @Override + public List<EstimatedReceivable> selectEstimatedReceivableList(EstimatedReceivable estimatedReceivable) + { + return estimatedReceivableMapper.selectEstimatedReceivableList(estimatedReceivable); + } + + /** + * 鏌ヨ棰勪及搴旀敹绠$悊鍒楄〃 寮傛 瀵煎嚭 + * + * @param estimatedReceivable 棰勪及搴旀敹绠$悊 + * @param exportKey 瀵煎嚭鍔熻兘鐨勫敮涓�鏍囪瘑 + * @return 棰勪及搴旀敹绠$悊闆嗗悎 + */ + @DataSource(DataSourceType.SLAVE) + @Async + @Override + public void export(EstimatedReceivable estimatedReceivable,String exportKey) { + + super.export(EstimatedReceivable.class,exportKey,"estimatedReceivableData",(pageNum)->{ + PageUtils.startPage(pageNum, Constants.EXPORT_PATE_SIZE); + return selectEstimatedReceivableList(estimatedReceivable); + }); + } + + + /** + * 鏂板棰勪及搴旀敹绠$悊 + * + * @param estimatedReceivable 棰勪及搴旀敹绠$悊 + * @return 缁撴灉 + */ + @Override + public int insertEstimatedReceivable(EstimatedReceivable estimatedReceivable) + { + estimatedReceivable.setCreateTime(DateUtils.getNowDate()); + return estimatedReceivableMapper.insertEstimatedReceivable(estimatedReceivable); + } + + /** + * 鏂板棰勪及搴旀敹绠$悊[鎵归噺] + * + * @param estimatedReceivables 棰勪及搴旀敹绠$悊 + * @return 缁撴灉 + */ + @Override + public int insertEstimatedReceivableBatch(List<EstimatedReceivable> estimatedReceivables) + { + int rows = estimatedReceivableMapper.insertEstimatedReceivableBatch(estimatedReceivables); + return rows; + } + + /** + * 淇敼棰勪及搴旀敹绠$悊 + * + * @param estimatedReceivable 棰勪及搴旀敹绠$悊 + * @return 缁撴灉 + */ + @Override + public int updateEstimatedReceivable(EstimatedReceivable estimatedReceivable) + { + estimatedReceivable.setUpdateTime(DateUtils.getNowDate()); + return estimatedReceivableMapper.updateEstimatedReceivable(estimatedReceivable); + } + + /** + * 淇敼棰勪及搴旀敹绠$悊[鎵归噺] + * + * @param estimatedReceivables 棰勪及搴旀敹绠$悊 + * @return 缁撴灉 + */ + @Override + public int updateEstimatedReceivableBatch(List<EstimatedReceivable> estimatedReceivables){ + return estimatedReceivableMapper.updateEstimatedReceivableBatch(estimatedReceivables); + } + + /** + * 鍒犻櫎棰勪及搴旀敹绠$悊瀵硅薄 + * + * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁ID + * @return 缁撴灉 + */ + @Override + public int deleteEstimatedReceivableByIds(String ids) + { + return deleteEstimatedReceivableByIds(Convert.toIntArray(ids)); + } + + /** + * 鍒犻櫎棰勪及搴旀敹绠$悊瀵硅薄 + * + * + * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁ID + * @return 缁撴灉 + */ + @Override + public int deleteEstimatedReceivableByIds(Integer[] ids) + { + return estimatedReceivableMapper.deleteEstimatedReceivableByIds(ids); + } + + /** + * 鍒犻櫎棰勪及搴旀敹绠$悊淇℃伅 + * + * @param id 棰勪及搴旀敹绠$悊ID + * @return 缁撴灉 + */ + @Override + public int deleteEstimatedReceivableById(Integer id) + { + return estimatedReceivableMapper.deleteEstimatedReceivableById(id); + } +} diff --git a/service/src/main/resources/mapper/cwgl/EstimatedReceivableMapper.xml b/service/src/main/resources/mapper/cwgl/EstimatedReceivableMapper.xml new file mode 100644 index 0000000..dbe1a56 --- /dev/null +++ b/service/src/main/resources/mapper/cwgl/EstimatedReceivableMapper.xml @@ -0,0 +1,200 @@ +<?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.EstimatedReceivableMapper"> + + <resultMap type="com.ruoyi.cwgl.domain.EstimatedReceivable" id="EstimatedReceivableResult"> + <result property="id" column="id" /> + <result property="feeSystemNo" column="fee_system_no" /> + <result property="dispatchNo" column="dispatch_no" /> + <result property="customerName" column="customer_name" /> + <result property="projectName" column="project_name" /> + <result property="orderDate" column="order_date" /> + <result property="feeName" column="fee_name" /> + <result property="estimatedAmount" column="estimated_amount" /> + <result property="currency" column="currency" /> + <result property="relatedBillName" column="related_bill_name" /> + <result property="relatedBillStatus" column="related_bill_status" /> + <result property="isConfirmed" column="is_confirmed" /> + <result property="confirmBy" column="confirm_by" /> + <result property="confirmTime" column="confirm_time" /> + <result property="remark" column="remark" /> + <result property="createBy" column="create_by" /> + <result property="updateBy" column="update_by" /> + <result property="createTime" column="create_time" /> + <result property="updateTime" column="update_time" /> + <result property="deleted" column="deleted" /> + </resultMap> + + <sql id="selectEstimatedReceivableVo"> + select thisTab.id, thisTab.fee_system_no, thisTab.dispatch_no, thisTab.customer_name, thisTab.project_name, thisTab.order_date, thisTab.fee_name, thisTab.estimated_amount, thisTab.currency, thisTab.related_bill_name, thisTab.related_bill_status, thisTab.is_confirmed, thisTab.confirm_by, thisTab.confirm_time, thisTab.remark, thisTab.create_by, thisTab.update_by, thisTab.create_time, thisTab.update_time, thisTab.deleted from estimated_receivable AS thisTab + </sql> + <sql id="selectEstimatedReceivableVoCount"> + select count(0) from estimated_receivable as thisTab + </sql> + + <sql id="whereCondition"> + <if test="feeSystemNo != null and feeSystemNo != ''"> and thisTab.fee_system_no = #{feeSystemNo}</if> + <if test="dispatchNo != null and dispatchNo != ''"> and thisTab.dispatch_no = #{dispatchNo}</if> + <if test="customerName != null and customerName != ''"> and thisTab.customer_name like concat('%', #{customerName}, '%')</if> + <if test="projectName != null and projectName != ''"> and thisTab.project_name like concat('%', #{projectName}, '%')</if> + <if test="orderDate != null "> and thisTab.order_date = #{orderDate}</if> + <if test="feeName != null and feeName != ''"> and thisTab.fee_name like concat('%', #{feeName}, '%')</if> + <if test="estimatedAmount != null "> and thisTab.estimated_amount = #{estimatedAmount}</if> + <if test="currency != null and currency != ''"> and thisTab.currency = #{currency}</if> + <if test="relatedBillName != null and relatedBillName != ''"> and thisTab.related_bill_name like concat('%', #{relatedBillName}, '%')</if> + <if test="relatedBillStatus != null "> and thisTab.related_bill_status = #{relatedBillStatus}</if> + <if test="isConfirmed != null "> and thisTab.is_confirmed = #{isConfirmed}</if> + <if test="confirmBy != null and confirmBy != ''"> and thisTab.confirm_by = #{confirmBy}</if> + <if test="confirmTime != null "> and thisTab.confirm_time = #{confirmTime}</if> + <if test="deleted != null "> and thisTab.deleted = #{deleted}</if> + </sql> + + <!--鏌ヨ--> + <select id="selectEstimatedReceivableById" parameterType="Integer" resultMap="EstimatedReceivableResult"> + <include refid="selectEstimatedReceivableVo"/> + where id = #{id} + </select> + + <select id="selectEstimatedReceivableCount" parameterType="com.ruoyi.cwgl.domain.EstimatedReceivable" resultType="int"> + <include refid="selectEstimatedReceivableVoCount"/> + <where> + <include refid="whereCondition"/> + </where> + </select> + + <select id="selectEstimatedReceivableList" parameterType="com.ruoyi.cwgl.domain.EstimatedReceivable" resultMap="EstimatedReceivableResult"> + <include refid="selectEstimatedReceivableVo"/> + <where> + <include refid="whereCondition"/> + </where> + order by thisTab.id desc + </select> + + <!-- 鏂板 --> + <insert id="insertEstimatedReceivable" parameterType="com.ruoyi.cwgl.domain.EstimatedReceivable" useGeneratedKeys="true" keyProperty="id"> + insert into estimated_receivable + <trim prefix="(" suffix=")" suffixOverrides=","> + <if test="feeSystemNo != null and feeSystemNo != ''">fee_system_no,</if> + <if test="dispatchNo != null and dispatchNo != ''">dispatch_no,</if> + <if test="customerName != null and customerName != ''">customer_name,</if> + <if test="projectName != null">project_name,</if> + <if test="orderDate != null">order_date,</if> + <if test="feeName != null and feeName != ''">fee_name,</if> + <if test="estimatedAmount != null">estimated_amount,</if> + <if test="currency != null">currency,</if> + <if test="relatedBillName != null">related_bill_name,</if> + <if test="relatedBillStatus != null">related_bill_status,</if> + <if test="isConfirmed != null">is_confirmed,</if> + <if test="confirmBy != null">confirm_by,</if> + <if test="confirmTime != null">confirm_time,</if> + <if test="remark != null">remark,</if> + <if test="createBy != null">create_by,</if> + <if test="updateBy != null">update_by,</if> + <if test="createTime != null">create_time,</if> + <if test="updateTime != null">update_time,</if> + <if test="deleted != null">deleted,</if> + </trim> + <trim prefix="values (" suffix=")" suffixOverrides=","> + <if test="feeSystemNo != null and feeSystemNo != ''">#{feeSystemNo},</if> + <if test="dispatchNo != null and dispatchNo != ''">#{dispatchNo},</if> + <if test="customerName != null and customerName != ''">#{customerName},</if> + <if test="projectName != null">#{projectName},</if> + <if test="orderDate != null">#{orderDate},</if> + <if test="feeName != null and feeName != ''">#{feeName},</if> + <if test="estimatedAmount != null">#{estimatedAmount},</if> + <if test="currency != null">#{currency},</if> + <if test="relatedBillName != null">#{relatedBillName},</if> + <if test="relatedBillStatus != null">#{relatedBillStatus},</if> + <if test="isConfirmed != null">#{isConfirmed},</if> + <if test="confirmBy != null">#{confirmBy},</if> + <if test="confirmTime != null">#{confirmTime},</if> + <if test="remark != null">#{remark},</if> + <if test="createBy != null">#{createBy},</if> + <if test="updateBy != null">#{updateBy},</if> + <if test="createTime != null">#{createTime},</if> + <if test="updateTime != null">#{updateTime},</if> + <if test="deleted != null">#{deleted},</if> + </trim> + </insert> + + <insert id="insertEstimatedReceivableBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id"> + insert into estimated_receivable + <trim prefix="(" suffix=") values" suffixOverrides=","> + id,fee_system_no,dispatch_no,customer_name,project_name,order_date,fee_name,estimated_amount,currency,related_bill_name,related_bill_status,is_confirmed,confirm_by,confirm_time,remark,create_by,update_by,create_time,update_time,deleted, + </trim> + <foreach item="item" index="index" collection="list" separator=","> + <trim prefix="(" suffix=") " suffixOverrides=","> + #{item.id},#{item.feeSystemNo},#{item.dispatchNo},#{item.customerName},#{item.projectName},#{item.orderDate},#{item.feeName},#{item.estimatedAmount},#{item.currency},#{item.relatedBillName},#{item.relatedBillStatus},#{item.isConfirmed},#{item.confirmBy},#{item.confirmTime},#{item.remark},#{item.createBy},#{item.updateBy},#{item.createTime},#{item.updateTime},#{item.deleted}, + </trim> + </foreach> + </insert> + + <!-- 淇敼 --> + <update id="updateEstimatedReceivable" parameterType="com.ruoyi.cwgl.domain.EstimatedReceivable"> + update estimated_receivable + <trim prefix="SET" suffixOverrides=","> + <if test="feeSystemNo != null and feeSystemNo != ''">fee_system_no = #{feeSystemNo},</if> + <if test="dispatchNo != null and dispatchNo != ''">dispatch_no = #{dispatchNo},</if> + <if test="customerName != null and customerName != ''">customer_name = #{customerName},</if> + <if test="projectName != null">project_name = #{projectName},</if> + <if test="orderDate != null">order_date = #{orderDate},</if> + <if test="feeName != null and feeName != ''">fee_name = #{feeName},</if> + <if test="estimatedAmount != null">estimated_amount = #{estimatedAmount},</if> + <if test="currency != null">currency = #{currency},</if> + <if test="relatedBillName != null">related_bill_name = #{relatedBillName},</if> + <if test="relatedBillStatus != null">related_bill_status = #{relatedBillStatus},</if> + <if test="isConfirmed != null">is_confirmed = #{isConfirmed},</if> + <if test="confirmBy != null">confirm_by = #{confirmBy},</if> + <if test="confirmTime != null">confirm_time = #{confirmTime},</if> + <if test="remark != null">remark = #{remark},</if> + <if test="createBy != null">create_by = #{createBy},</if> + <if test="updateBy != null">update_by = #{updateBy},</if> + <if test="createTime != null">create_time = #{createTime},</if> + <if test="updateTime != null">update_time = #{updateTime},</if> + <if test="deleted != null">deleted = #{deleted},</if> + </trim> + where id = #{id} + </update> + <!-- 淇敼 --> + <update id="updateEstimatedReceivableBatch" parameterType="java.util.List"> + <foreach collection="list" item="item" index="index" separator=";"> + update estimated_receivable + <trim prefix="SET" suffixOverrides=","> + <if test="item.feeSystemNo != null and item.feeSystemNo != ''">fee_system_no = #{item.feeSystemNo},</if> + <if test="item.dispatchNo != null and item.dispatchNo != ''">dispatch_no = #{item.dispatchNo},</if> + <if test="item.customerName != null and item.customerName != ''">customer_name = #{item.customerName},</if> + <if test="item.projectName != null">project_name = #{item.projectName},</if> + <if test="item.orderDate != null">order_date = #{item.orderDate},</if> + <if test="item.feeName != null and item.feeName != ''">fee_name = #{item.feeName},</if> + <if test="item.estimatedAmount != null">estimated_amount = #{item.estimatedAmount},</if> + <if test="item.currency != null">currency = #{item.currency},</if> + <if test="item.relatedBillName != null">related_bill_name = #{item.relatedBillName},</if> + <if test="item.relatedBillStatus != null">related_bill_status = #{item.relatedBillStatus},</if> + <if test="item.isConfirmed != null">is_confirmed = #{item.isConfirmed},</if> + <if test="item.confirmBy != null">confirm_by = #{item.confirmBy},</if> + <if test="item.confirmTime != null">confirm_time = #{item.confirmTime},</if> + <if test="item.remark != null">remark = #{item.remark},</if> + <if test="item.createBy != null">create_by = #{item.createBy},</if> + <if test="item.updateBy != null">update_by = #{item.updateBy},</if> + <if test="item.createTime != null">create_time = #{item.createTime},</if> + <if test="item.updateTime != null">update_time = #{item.updateTime},</if> + <if test="item.deleted != null">deleted = #{item.deleted},</if> + </trim> + where id = #{item.id} + </foreach> + </update> + + <!--鍒犻櫎--> + <delete id="deleteEstimatedReceivableById" parameterType="Integer"> + delete from estimated_receivable where id = #{id} + </delete> + <delete id="deleteEstimatedReceivableByIds" parameterType="Integer"> + delete from estimated_receivable where id in + <foreach item="id" collection="array" open="(" separator="," close=")"> + #{id} + </foreach> + </delete> + +</mapper> \ No newline at end of file diff --git a/ui/admin-ui3/src/api/cwgl/estimatedReceivable.ts b/ui/admin-ui3/src/api/cwgl/estimatedReceivable.ts new file mode 100644 index 0000000..f5949d4 --- /dev/null +++ b/ui/admin-ui3/src/api/cwgl/estimatedReceivable.ts @@ -0,0 +1,67 @@ +import request,{download,requestType} from "@/utils/request"; +import {BaseEntityInterface} from "@/utils/globalInterface"; +export interface EstimatedReceivableI extends BaseEntityInterface{ + id ?: number , feeSystemNo ?: string , dispatchNo ?: string , customerName ?: string , projectName ?: string , orderDate ?: string , feeName ?: string , estimatedAmount ?: string , currency ?: string , relatedBillName ?: string , relatedBillStatus ?: number , isConfirmed ?: number , confirmBy ?: string , confirmTime ?: string , remark ?: string , createBy ?: string , updateBy ?: string , createTime ?: string , updateTime ?: string , deleted ?: number } + + +/** + * 鏌ヨ棰勪及搴旀敹绠$悊鍒楄〃 + */ +export const listEstimatedReceivable:requestType = (query) => { + return request({ + url: '/cwgl/estimatedReceivable/list', + method:'get', + params:query + }) +} +/** + * 鏌ヨ棰勪及搴旀敹绠$悊璇︾粏 + */ +export const getEstimatedReceivable:requestType = (id) => { + return request({ + url: '/cwgl/estimatedReceivable/' + id, + method:'get' + }) +} + +/** + * 鏂板棰勪及搴旀敹绠$悊 + */ +export const addEstimatedReceivable:requestType = (data) => { + return request({ + url: '/cwgl/estimatedReceivable', + method: 'post', + data + }) +} + +/** + * 淇敼棰勪及搴旀敹绠$悊 + */ +export const updateEstimatedReceivable:requestType = (data) => { + return request({ + url: '/cwgl/estimatedReceivable', + method: 'put', + data + }) +} + +/** + * 鍒犻櫎棰勪及搴旀敹绠$悊 + */ +export const delEstimatedReceivable:requestType = (id) => { + return request({ + url: '/cwgl/estimatedReceivable/' + id, + method: 'delete' + }) +} + + +/** + * 瀵煎嚭棰勪及搴旀敹绠$悊 + */ +export const exportEstimatedReceivable:requestType = (query) => { + return new Promise<any>(()=>{ + download('/cwgl/estimatedReceivable/export',query); + }) +} diff --git a/ui/admin-ui3/src/views/cwgl/estimatedReceivable/index.vue b/ui/admin-ui3/src/views/cwgl/estimatedReceivable/index.vue new file mode 100644 index 0000000..dee3b92 --- /dev/null +++ b/ui/admin-ui3/src/views/cwgl/estimatedReceivable/index.vue @@ -0,0 +1,189 @@ +<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:estimatedReceivable:edit']" + @click="handleUpdate">淇敼 + </el-button> + <el-button + type="danger" + icon="Delete" + :disabled="pageF.multiple" + @click="handleDelete" + v-hasPermi="['cwgl:estimatedReceivable:remove']" + >鍒犻櫎 + </el-button> + <el-button + type="warning" + plain + icon="Download" + @click="handleExport" + v-hasPermi="['cwgl:estimatedReceivable:export']" + >瀵煎嚭 + </el-button> + </template> + </avue-crud> + </basicContainer> +</template> + +<script setup name="estimatedReceivable" lang="ts"> + import {EstimatedReceivableI,addEstimatedReceivable, delEstimatedReceivable, exportEstimatedReceivable, getEstimatedReceivable, listEstimatedReceivable, updateEstimatedReceivable} from "@/api/cwgl/estimatedReceivable"; + 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:estimatedReceivable:add"]), + delBtn: hasPermission(["cwgl:estimatedReceivable:remove"]), + editBtn: hasPermission(["cwgl:estimatedReceivable:edit"]), + viewBtn: hasPermission(["cwgl:estimatedReceivable:query"]), + } + }) + + const data = reactive({ + form:<EstimatedReceivableI>{}, + queryParams:<EstimatedReceivableI&PageQueryInterface>{}, + page: <PagesInterface>{ + pageSize: 10, + total: 0, + currentPage: 1, + }, + selectionList:[], + }) + const {queryParams,form,page,selectionList} = toRefs(data); + const option = ref({ + pageKey: 'EstimatedReceivable', + rowKey: 'id', + column: { + id: { + label: 'ID', + }, + feeSystemNo: { + label: '璐圭敤绯荤粺缂栧彿', + rules: [ + { + required: true, + message: "璐圭敤绯荤粺缂栧彿涓嶈兘涓虹┖", trigger: "blur" } + ], }, + dispatchNo: { + label: '璋冨害鍗曞彿', + rules: [ + { + required: true, + message: "璋冨害鍗曞彿涓嶈兘涓虹┖", trigger: "blur" } + ], }, + customerName: { + label: '瀹㈡埛鍚嶇О', + rules: [ + { + required: true, + message: "瀹㈡埛鍚嶇О涓嶈兘涓虹┖", trigger: "blur" } + ], }, + projectName: { + label: '椤圭洰鍚嶇О', + }, + orderDate: { + label: '涓嬪崟鏃ユ湡', + }, + feeName: { + label: '璐圭敤鍚嶇О', + rules: [ + { + required: true, + message: "璐圭敤鍚嶇О涓嶈兘涓虹┖", trigger: "blur" } + ], }, + estimatedAmount: { + label: '棰勪及璐圭敤閲戦', + }, + currency: { + label: '甯佸埗', + }, + relatedBillName: { + label: '鍏宠仈璐﹀崟鍚嶇О', + }, + relatedBillStatus: { + label: '鍏宠仈璐﹀崟鐘舵��', + }, + isConfirmed: { + label: '鏄惁纭(0:鏈‘璁�;1:宸茬‘璁�)', + }, + confirmBy: { + label: '纭浜�', + }, + confirmTime: { + label: '纭鏃堕棿', + }, + remark: { + label: '澶囨敞', + type: 'textarea', minRows: 3, maxRows: 5, + }, + createBy: { + label: '鍒涘缓浜�', + }, + updateBy: { + label: '鏇存柊浜�', + }, + createTime: { + label: '鍒涘缓鏃堕棿', + }, + updateTime: { + label: '鏇存柊鏃堕棿', + }, + deleted: { + label: '鍒犻櫎鏍囪(0:姝e父;1:鍒犻櫎)', + }, + } + }) + + 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:listEstimatedReceivable, + getDetailApi:getEstimatedReceivable, + exportApi:exportEstimatedReceivable, + deleteApi:delEstimatedReceivable, + addApi:addEstimatedReceivable, + updateApi:updateEstimatedReceivable, + handleUpdateFunc:()=>{ + crudRef.value.rowEdit(selectionList.value[0]); + }, + handleSelectionChangeFunc:(selection:any)=>{ + selectionList.value = selection; + } + }) + + +</script> -- Gitblit v1.8.0