¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.business.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.business.dto.DuePayableDto; |
| | | import com.ruoyi.business.entity.DuePayable; |
| | | import com.ruoyi.business.service.DuePayableService; |
| | | import com.ruoyi.business.vo.DuePayableVo; |
| | | import com.ruoyi.business.vo.SearchDuePurchaseVo; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import io.swagger.annotations.Api; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * åºä»æ¬¾controller |
| | | * |
| | | * @author buhuazhen |
| | | * @date 2025/8/26 |
| | | * @email 3038525872@qq.com |
| | | */ |
| | | @RestController |
| | | @Api(tags = "åºä»æ¬¾") |
| | | @AllArgsConstructor |
| | | @RequestMapping("/duePayable") |
| | | public class DuePayableController { |
| | | |
| | | private final DuePayableService duePayableService; |
| | | |
| | | @PostMapping("/addDuePayable") |
| | | public R addDuePayable(@RequestBody DuePayableDto duePayableDto) { |
| | | return R.ok(duePayableService.addDuePayable(duePayableDto)); |
| | | } |
| | | |
| | | @GetMapping("/list") |
| | | public R<IPage<DuePayableVo>> list(Page<DuePayable> page, SearchDuePurchaseVo vo) { |
| | | return R.ok(duePayableService.selectPayableList(page, vo)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.business.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | |
| | | import com.ruoyi.business.dto.ReceiptPaymentDto; |
| | | import com.ruoyi.business.entity.ReceiptPayment; |
| | | import com.ruoyi.business.service.ReceiptPaymentService; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @RestController |
| | | @RequestMapping("/receiptPayment") |
| | | public class ReceiptPaymentController extends BaseController { |
| | | |
| | | @Autowired |
| | | private ReceiptPaymentService receiptPaymentService; |
| | | |
| | | /** |
| | | * åºæ¶å°è´¦æ°å¢ |
| | | * @param receiptPayment |
| | | * @return |
| | | */ |
| | | @PostMapping("/saveOrUpdate") |
| | | public AjaxResult receiptPaymentSaveOrUpdate (@RequestBody ReceiptPayment receiptPayment) { |
| | | receiptPaymentService.receiptPaymentSaveOrUpdate(receiptPayment); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | /** |
| | | * åºæ¶å°è´¦ä¿®æ¹ |
| | | * @param receiptPayment |
| | | * @return |
| | | */ |
| | | @PostMapping("/update") |
| | | public AjaxResult receiptPaymentUpdate (@RequestBody ReceiptPayment receiptPayment) { |
| | | return AjaxResult.success(receiptPaymentService.receiptPaymentUpdate(receiptPayment)); |
| | | } |
| | | |
| | | /** |
| | | * åºæ¶å°è´¦å é¤ |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/del") |
| | | public AjaxResult receiptPaymentDel (@RequestBody List<Integer> ids) { |
| | | return AjaxResult.success(receiptPaymentService.receiptPaymentDel(ids)); |
| | | } |
| | | |
| | | /** |
| | | * åºæ¶å°è´¦è¯¦æ
|
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/invoiceInfo") |
| | | public AjaxResult invoiceInfo (Integer id) { |
| | | return AjaxResult.success(receiptPaymentService.invoiceInfo(id)); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢åºæ¶è®°å½ |
| | | */ |
| | | @GetMapping("/receiptPaymentHistoryListPage") |
| | | public IPage<ReceiptPaymentDto> receiptPaymentHistoryListPage(Page page, ReceiptPaymentDto receiptPaymentDto) { |
| | | return receiptPaymentService.receiptPaymentHistoryListPage(page,receiptPaymentDto); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢åºæ¶è®°å½ä¸å页 |
| | | */ |
| | | @GetMapping("/receiptPaymentHistoryListNoPage") |
| | | public List<ReceiptPaymentDto> receiptPaymentHistoryListNoPage(ReceiptPaymentDto receiptPaymentDto) { |
| | | return receiptPaymentService.receiptPaymentHistoryListNoPage(receiptPaymentDto); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.business.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * @author buhuazhen |
| | | * @date 2025/8/26 |
| | | * @email 3038525872@qq.com |
| | | */ |
| | | @Data |
| | | public class DuePayableDto { |
| | | private Long id; |
| | | |
| | | private String ticketNo; |
| | | |
| | | /** |
| | | * 对åºéè´ä¿¡æ¯è¡¨id |
| | | */ |
| | | private Long purchaseRegistrationId; |
| | | |
| | | /** |
| | | * 仿¬¾ç±»å ï¼é¢ä»æ¬¾ãè¿åº¦æ¬¾ãè´¨ä¿éçï¼ |
| | | */ |
| | | private Integer payableType; |
| | | |
| | | /** |
| | | * 仿¬¾éé¢ |
| | | */ |
| | | private String paymentAmount; |
| | | |
| | | /** |
| | | * éä»¶ `,`åå² |
| | | */ |
| | | private String attachUpload; |
| | | } |
| | |
| | | |
| | | private List officialList; |
| | | |
| | | private Integer searchAll; |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.business.dto; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.ruoyi.business.entity.ReceiptPayment; |
| | | import com.ruoyi.common.annotation.Excel; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class ReceiptPaymentDto extends ReceiptPayment { |
| | | @Excel(name = "客æ·") |
| | | private String customer; |
| | | @Excel(name = "ç
¤ç§") |
| | | private String coal; |
| | | |
| | | @TableField(exist = false) |
| | | @Excel(isExport = false) |
| | | private String receiptPaymentDateStart; |
| | | @TableField(exist = false) |
| | | @Excel(isExport = false) |
| | | private String receiptPaymentDateEnd; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.business.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.ruoyi.common.core.domain.MyBaseEntity; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * åºä»æ¬¾è¡¨ |
| | | * @TableName due_payable |
| | | */ |
| | | @TableName(value ="due_payable") |
| | | @Data |
| | | public class DuePayable extends MyBaseEntity { |
| | | /** |
| | | * |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * ç¥¨å· |
| | | */ |
| | | @TableField("ticket_no") |
| | | private String ticketNo; |
| | | |
| | | /** |
| | | * 对åºéè´ä¿¡æ¯è¡¨id |
| | | */ |
| | | @TableField("purchase_registration_id") |
| | | |
| | | private Long purchaseRegistrationId; |
| | | |
| | | /** |
| | | * 仿¬¾ç±»å ï¼é¢ä»æ¬¾ãè¿åº¦æ¬¾ãè´¨ä¿éçï¼ |
| | | */ |
| | | @TableField("payable_type") |
| | | private Integer payableType; |
| | | |
| | | /** |
| | | * 仿¬¾éé¢ |
| | | */ |
| | | @TableField("payment_amount") |
| | | private BigDecimal paymentAmount; |
| | | |
| | | /** |
| | | * éä»¶ `,`åå² |
| | | */ |
| | | @TableField("attach_upload") |
| | | private String attachUpload; |
| | | |
| | | |
| | | |
| | | @TableField(exist = false) |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | } |
| | |
| | | @TableField(value = "coal_plan_id") |
| | | private Long coalPlanId; |
| | | /** |
| | | * éè´ç±»å |
| | | */ |
| | | @TableField(value = "purchase_type") |
| | | private Integer purchaseType; |
| | | /** |
| | | * ç»è®°æ¥æ |
| | | */ |
| | | @TableField(value = "registration_date") |
| | |
| | | */ |
| | | @TableField(value = "production_quantity") |
| | | private BigDecimal productionQuantity; |
| | | |
| | | /** |
| | | * å¾
æäº§æ°é |
| | | */ |
| | | @TableField(value = "pending_quantity") |
| | | private BigDecimal pendingQuantity; |
| | | /** |
| | | * äººå·¥ææ¬ |
| | | */ |
| | |
| | | */ |
| | | @TableField(exist = false) |
| | | private BigDecimal productionQuantity; |
| | | |
| | | @TableField(exist = false) |
| | | private Integer searchAll; |
| | | /** |
| | | * æäº§æ°é |
| | | */ |
| | |
| | | */ |
| | | @TableField(value = "type") |
| | | private Integer type; |
| | | /** |
| | | * éè´ç±»å |
| | | */ |
| | | @TableField(value = "purchase_type") |
| | | private Integer purchaseType; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.business.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | @TableName("receipt_payment") |
| | | public class ReceiptPayment { |
| | | |
| | | /** |
| | | * åºå· |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "忬¾å½¢å¼ 0çµæ±1æ¿å
") |
| | | private String receiptPaymentType; |
| | | |
| | | @ApiModelProperty(value = "åºæ¶éé¢") |
| | | private BigDecimal receiptPaymentAmount; |
| | | |
| | | @ApiModelProperty(value = "ç»è®°äºº") |
| | | private String registrant; |
| | | |
| | | @ApiModelProperty(value = "éå®è®°å½è¡¨ä¸»é®ID") |
| | | private Integer salesRecordId; |
| | | |
| | | @ApiModelProperty(value = "æ¥æ¬¾æ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDate receiptPaymentDate; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "åå»ºç¨æ·") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | @ApiModelProperty(value = "ä¿®æ¹æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty(value = "ä¿®æ¹ç¨æ·") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | @ApiModelProperty(value = "ç§æ·ID") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long tenantId; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.business.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.business.entity.DuePayable; |
| | | import org.mapstruct.Mapper; |
| | | |
| | | /** |
| | | * @author buhuazhen |
| | | * @description é对表ãdue_payable(åºä»æ¬¾è¡¨)ãçæ°æ®åºæä½Mapper |
| | | * @createDate 2025-08-26 16:12:56 |
| | | * @Entity generator.domain.DuePayable |
| | | */ |
| | | public interface DuePayableMapper extends BaseMapper<DuePayable> { |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.business.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | |
| | | import com.ruoyi.business.dto.ReceiptPaymentDto; |
| | | import com.ruoyi.business.dto.SalesRecordDto; |
| | | import com.ruoyi.business.entity.ReceiptPayment; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | public interface ReceiptPaymentMapper extends BaseMapper<ReceiptPayment> { |
| | | |
| | | /** |
| | | * æ¥è¯¢å·²ç»ç»å®å票çå¼ç¥¨å°è´¦ |
| | | * @param page |
| | | * @param receiptPaymentDto |
| | | * @return |
| | | */ |
| | | IPage<ReceiptPaymentDto> bindInvoiceNoRegPage(Page page, @Param("receiptPaymentDto") ReceiptPaymentDto receiptPaymentDto); |
| | | |
| | | /** |
| | | * å¼ç¥¨å°è´¦è¯¦æ
|
| | | * @param id |
| | | * @return |
| | | */ |
| | | SalesRecordDto invoiceInfo(Integer id); |
| | | |
| | | |
| | | |
| | | /** |
| | | * æ¥è¯¢å款记å½ä¸å页 |
| | | */ |
| | | List<ReceiptPaymentDto> receiptPaymentHistoryListNoPage( @Param("params") ReceiptPaymentDto receiptPaymentDto); |
| | | |
| | | } |
| | |
| | | @Autowired |
| | | private CommonFileMapper commonFileMapper; |
| | | |
| | | @Value("${file.upload-dir}") |
| | | // @Value("${file.upload-dir}") |
| | | private String uploadDir; |
| | | |
| | | @Value("${file.temp-dir}") |
| | | // @Value("${file.temp-dir}") |
| | | private String tempDir; |
| | | |
| | | // ä¸ä¼ å°ä¸´æ¶ç®å½ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.business.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.business.dto.DuePayableDto; |
| | | import com.ruoyi.business.dto.PurchaseRegistrationDto; |
| | | import com.ruoyi.business.entity.DuePayable; |
| | | import com.ruoyi.business.entity.PurchaseRegistration; |
| | | import com.ruoyi.business.vo.DuePayableVo; |
| | | import com.ruoyi.business.vo.SearchDuePurchaseVo; |
| | | |
| | | /** |
| | | * @author buhuazhen |
| | | * @description é对表ãdue_payable(åºä»æ¬¾è¡¨)ãçæ°æ®åºæä½Service |
| | | * @createDate 2025-08-26 16:12:56 |
| | | */ |
| | | public interface DuePayableService extends IService<DuePayable> { |
| | | |
| | | int addDuePayable(DuePayableDto dueDto); |
| | | |
| | | IPage<DuePayableVo> selectPayableList(Page<DuePayable> page, SearchDuePurchaseVo vo); |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.business.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.business.dto.ReceiptPaymentDto; |
| | | import com.ruoyi.business.dto.SalesRecordDto; |
| | | import com.ruoyi.business.entity.ReceiptPayment; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | public interface ReceiptPaymentService { |
| | | |
| | | /** |
| | | * 忬¾ç»è®°æ°å¢ |
| | | * @param receiptPayment |
| | | * @return |
| | | */ |
| | | int receiptPaymentSaveOrUpdate(ReceiptPayment receiptPayment); |
| | | |
| | | /** |
| | | * 忬¾ç»è®°ä¿®æ¹ |
| | | * @param receiptPayment |
| | | * @return |
| | | */ |
| | | int receiptPaymentUpdate(ReceiptPayment receiptPayment); |
| | | |
| | | /** |
| | | * 忬¾ç»è®°å é¤ |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | int receiptPaymentDel(List<Integer> ids); |
| | | |
| | | /** |
| | | * å¼ç¥¨å°è´¦è¯¦æ
|
| | | * @param id |
| | | * @return |
| | | */ |
| | | SalesRecordDto invoiceInfo(Integer id); |
| | | |
| | | /** |
| | | * æ¥è¯¢å款记å½å页 |
| | | */ |
| | | IPage<ReceiptPaymentDto> receiptPaymentHistoryListPage(Page page, ReceiptPaymentDto receiptPaymentDto); |
| | | |
| | | /** |
| | | * æ¥è¯¢å款记å½ä¸å页 |
| | | */ |
| | | List<ReceiptPaymentDto> receiptPaymentHistoryListNoPage(ReceiptPaymentDto receiptPaymentDto); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.business.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.basic.entity.dto.SimpleStorageDto; |
| | | import com.ruoyi.basic.service.StorageBlobService; |
| | | import com.ruoyi.business.dto.DuePayableDto; |
| | | import com.ruoyi.business.entity.DuePayable; |
| | | import com.ruoyi.business.mapper.DuePayableMapper; |
| | | import com.ruoyi.business.service.DuePayableService; |
| | | import com.ruoyi.business.vo.DuePayableVo; |
| | | import com.ruoyi.business.vo.SearchDuePurchaseVo; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import lombok.Getter; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @author buhuazhen |
| | | * @description é对表ãdue_payable(åºä»æ¬¾è¡¨)ãçæ°æ®åºæä½Serviceå®ç° |
| | | * @createDate 2025-08-26 16:12:56 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class DuePayableServiceImpl extends ServiceImpl<DuePayableMapper, DuePayable> |
| | | implements DuePayableService { |
| | | private final StorageBlobService storageBlobService; |
| | | private final DuePayableMapper duePayableMapper; |
| | | |
| | | @Getter |
| | | @Value("${minio.default-bucket}") |
| | | private String defaultBucket; |
| | | |
| | | @Override |
| | | public int addDuePayable(DuePayableDto dto) { |
| | | DuePayable duePayable = new DuePayable(); |
| | | duePayable.setPayableType(dto.getPayableType()); |
| | | duePayable.setAttachUpload(dto.getAttachUpload()); |
| | | duePayable.setPurchaseRegistrationId(dto.getPurchaseRegistrationId()); |
| | | duePayable.setPaymentAmount(new BigDecimal(dto.getPaymentAmount())); |
| | | duePayable.setTicketNo(dto.getTicketNo()); |
| | | duePayable.setId(dto.getId()); |
| | | |
| | | if (Objects.isNull(dto.getId())) { |
| | | return duePayableMapper.insert(duePayable); |
| | | } |
| | | |
| | | return duePayableMapper.updateById(duePayable); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<DuePayableVo> selectPayableList(Page<DuePayable> page, SearchDuePurchaseVo vo) { |
| | | LambdaQueryWrapper<DuePayable> queryWrapper = new LambdaQueryWrapper<>(); |
| | | // todo æç´¢æ¡ä»¶ææ¶ä¸ç¥éæ¯ä»ä¹ð¤· |
| | | queryWrapper.orderByDesc(DuePayable::getCreateTime); |
| | | |
| | | Page<DuePayable> duePayablePage = duePayableMapper.selectPage(page, queryWrapper); |
| | | /** |
| | | * æ¥è¯¢åºéä»¶id ç±äºåç»è¯¦ç» |
| | | */ |
| | | Map<Long, List<Long>> attachMap = duePayablePage.getRecords().stream() |
| | | .collect(Collectors.toMap( |
| | | DuePayable::getId, |
| | | it -> { |
| | | if (StringUtils.isNotBlank(it.getAttachUpload())) { |
| | | return Arrays.stream(it.getAttachUpload().split(",")) |
| | | .map(Long::parseLong) |
| | | .collect(Collectors.toList()); |
| | | } else { |
| | | return List.of(); |
| | | } |
| | | } |
| | | )); |
| | | /** |
| | | * æ ¹æ®ä¸é¢çids æ¥è¯¢åºå
·ä½ä¿¡æ¯ |
| | | */ |
| | | Map<Long,SimpleStorageDto> storageMap = storageBlobService.findStorageByIds(attachMap.values().stream().flatMap(List::stream).toList(), getDefaultBucket()).stream().collect(Collectors.toMap(SimpleStorageDto::getId,it->it)); |
| | | |
| | | |
| | | List<DuePayableVo> convertedList = duePayablePage.getRecords().stream().map(it -> { |
| | | DuePayableVo dueVo = new DuePayableVo(it.getId(), it.getTicketNo(), it.getPurchaseRegistrationId(), it.getPayableType(), it.getPaymentAmount(),Long.parseLong(it.getCreateBy()),it.getCreateTime().toLocalDate()); |
| | | // æä»¶ä¿¡æ¯ |
| | | List<Long> storageIds = attachMap.get(it.getId()); |
| | | dueVo.setAttachFileList( |
| | | storageIds.stream() |
| | | .map(storageMap::get) // O(1) è·å |
| | | .filter(Objects::nonNull) |
| | | .toList() |
| | | ); |
| | | return dueVo; |
| | | }).toList(); |
| | | |
| | | IPage<DuePayableVo> voPage = new Page<>(); |
| | | voPage.setCurrent(duePayablePage.getCurrent()); |
| | | voPage.setSize(duePayablePage.getSize()); |
| | | voPage.setTotal(duePayablePage.getTotal()); |
| | | voPage.setRecords(convertedList); |
| | | return voPage; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | |
| | | private final PendingInventoryMapper pendingInventoryMapper; |
| | | |
| | | private final ProductionSchedulingMapper productionSchedulingMapper; |
| | | |
| | | @Override |
| | | public IPage<ProductionMasterDto> selectPMList(Page page, ProductionMasterDto productionMasterDto) { |
| | | // 1. æå»ºä¸»è¡¨æ¥è¯¢æ¡ä»¶ |
| | |
| | | .collect(Collectors.toList()); |
| | | productionInventoryMapper.deleteBatchIds(inventoryIds); |
| | | } |
| | | List<Production> productions = productionMapper.selectList(new LambdaQueryWrapper<Production>() |
| | | .in(Production::getProductionMasterId, idList)); |
| | | |
| | | // å é¤ç产æ¥å·¥è®°å½ |
| | | productionSchedulingMapper.delete( |
| | | new LambdaQueryWrapper<ProductionScheduling>() |
| | | .in(ProductionScheduling::getProductionId, productions.stream().map(Production::getId).collect(Collectors.toList())) |
| | | ); |
| | | |
| | | // å é¤ç产æç» |
| | | productionMapper.delete( |
| | |
| | | .in(Production::getProductionMasterId, idList) |
| | | ); |
| | | |
| | | |
| | | // 5. å é¤ä¸»è®°å½ |
| | | return productionMasterMapper.deleteBatchIds(idList); |
| | | } |
| | |
| | | BigDecimal reduce = productionScheduling.stream() |
| | | .map(ProductionScheduling::getSchedulingNum) |
| | | .reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | if(reduce.compareTo(productionScheduling.get(0).getProductionQuantity()) < 0){ |
| | | if(reduce.compareTo(productionScheduling.get(0).getProductionQuantity()) > 0){ |
| | | return false; |
| | | } |
| | | Production production = productionMapper.selectById(productionScheduling.get(0).getProductionId()); |
| | | if(production == null){ |
| | | throw new RuntimeException("ç产订å为空"); |
| | | } |
| | | production.setPendingQuantity(production.getPendingQuantity().add(reduce)); |
| | | production.setStatus(2); |
| | | if(reduce.compareTo(productionScheduling.get(0).getProductionQuantity()) == 0){ |
| | | production.setStatus(3); |
| | |
| | | @Override |
| | | public IPage<Production> selectProductionList(Page page, ProductionDto productionDto) { |
| | | LambdaQueryWrapper<Production> queryWrapper = new LambdaQueryWrapper<>(); |
| | | if(productionDto != null && productionDto.getSearchAll() != null){ |
| | | queryWrapper.eq(Production::getStatus, productionDto.getSearchAll()); |
| | | } |
| | | queryWrapper.orderByDesc(Production::getCreateTime); |
| | | return productionMapper.selectPage(page, queryWrapper); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.business.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.business.dto.ReceiptPaymentDto; |
| | | import com.ruoyi.business.dto.SalesRecordDto; |
| | | import com.ruoyi.business.entity.ReceiptPayment; |
| | | import com.ruoyi.business.entity.SalesRecord; |
| | | import com.ruoyi.business.mapper.ReceiptPaymentMapper; |
| | | import com.ruoyi.business.mapper.SalesRecordMapper; |
| | | import com.ruoyi.business.service.ReceiptPaymentService; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.util.ObjectUtils; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDate; |
| | | import java.time.YearMonth; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Service |
| | | public class ReceiptPaymentServiceImpl extends ServiceImpl<ReceiptPaymentMapper, ReceiptPayment> implements ReceiptPaymentService { |
| | | |
| | | @Autowired |
| | | private ReceiptPaymentMapper receiptPaymentMapper; |
| | | @Autowired |
| | | private SalesRecordMapper salesRecordMapper; |
| | | |
| | | /** |
| | | * 忬¾ç»è®°æ°å¢ |
| | | * @param receiptPayment |
| | | * @return |
| | | */ |
| | | @Override |
| | | public int receiptPaymentSaveOrUpdate(ReceiptPayment receiptPayment) { |
| | | SalesRecord salesRecord = salesRecordMapper.selectById(receiptPayment.getSalesRecordId()); |
| | | if (ObjectUtils.isEmpty(salesRecord)){ |
| | | throw new RuntimeException("éå®è®°å½ä¸åå¨"); |
| | | } |
| | | return receiptPaymentMapper.insert(receiptPayment); |
| | | } |
| | | |
| | | /** |
| | | * 忬¾ç»è®°ä¿®æ¹ |
| | | * @param receiptPayment |
| | | * @return |
| | | */ |
| | | @Override |
| | | public int receiptPaymentUpdate(ReceiptPayment receiptPayment) { |
| | | return receiptPaymentMapper.updateById(receiptPayment); |
| | | } |
| | | |
| | | /** |
| | | * 忬¾ç»è®°å é¤ |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @Override |
| | | public int receiptPaymentDel(List<Integer> ids) { |
| | | LambdaQueryWrapper<ReceiptPayment> delQuery = new LambdaQueryWrapper<>(); |
| | | delQuery.in(ReceiptPayment::getId, ids); |
| | | return receiptPaymentMapper.delete(delQuery); |
| | | } |
| | | |
| | | @Override |
| | | public SalesRecordDto invoiceInfo(Integer id) { |
| | | return receiptPaymentMapper.invoiceInfo(id); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<ReceiptPaymentDto> receiptPaymentHistoryListPage(Page page, ReceiptPaymentDto receiptPaymentDto) { |
| | | return receiptPaymentMapper.bindInvoiceNoRegPage(page, receiptPaymentDto); |
| | | } |
| | | |
| | | @Override |
| | | public List<ReceiptPaymentDto> receiptPaymentHistoryListNoPage(ReceiptPaymentDto receiptPaymentDto) { |
| | | return receiptPaymentMapper.receiptPaymentHistoryListNoPage(receiptPaymentDto); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.business.vo; |
| | | |
| | | import com.ruoyi.basic.entity.dto.SimpleStorageDto; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDate; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author buhuazhen |
| | | * @date 2025/8/26 |
| | | * @email 3038525872@qq.com |
| | | */ |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class DuePayableVo { |
| | | |
| | | private Long id; |
| | | |
| | | private String ticketNo; |
| | | |
| | | private Long purchaseRegistrationId; |
| | | |
| | | // æéè¦å¯ä»¥æ¥è¯¢åºéè´å
·ä½ä¿¡æ¯ |
| | | |
| | | private Integer payableType; |
| | | |
| | | private BigDecimal paymentAmount; |
| | | |
| | | private List<SimpleStorageDto> attachFileList; |
| | | |
| | | private Long registrantId; |
| | | |
| | | private LocalDate registrationDate; |
| | | public DuePayableVo(Long id, String ticketNo, Long purchaseRegistrationId, Integer payableType, BigDecimal paymentAmount) { |
| | | this.id = id; |
| | | this.ticketNo = ticketNo; |
| | | this.purchaseRegistrationId = purchaseRegistrationId; |
| | | this.payableType = payableType; |
| | | this.paymentAmount = paymentAmount; |
| | | } |
| | | |
| | | public DuePayableVo(Long id, String ticketNo, Long purchaseRegistrationId, Integer payableType, BigDecimal paymentAmount, Long registrantId, LocalDate registrationDate) { |
| | | this.id = id; |
| | | this.ticketNo = ticketNo; |
| | | this.purchaseRegistrationId = purchaseRegistrationId; |
| | | this.payableType = payableType; |
| | | this.paymentAmount = paymentAmount; |
| | | this.registrantId = registrantId; |
| | | this.registrationDate = registrationDate; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.business.vo; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author buhuazhen |
| | | * @date 2025/8/26 |
| | | * @email 3038525872@qq.com |
| | | */ |
| | | @Data |
| | | public class SearchDuePurchaseVo { |
| | | |
| | | private String search; |
| | | } |
| | |
| | | production_master_id BIGINT NOT NULL DEFAULT 0, -- ç产主表ID |
| | | coal_id BIGINT NOT NULL DEFAULT 0, -- ç
¤ç§ID |
| | | production_quantity INT NOT NULL, -- ç产æ°é |
| | | pending_quantity INT NOT NULL DEFAULT 0, -- å¾
æäº§æ°é |
| | | labor_cost DECIMAL(10, 2) NOT NULL, -- äººå·¥ææ¬ |
| | | energy_consumption_cost DECIMAL(10, 2) NOT NULL, -- è½èææ¬ |
| | | equipment_depreciation DECIMAL(10, 2) NOT NULL, -- è®¾å¤ææ§ |
| | |
| | | COMMENT ON COLUMN production.id IS '主é®ID'; |
| | | COMMENT ON COLUMN production.coal_id IS 'ç
¤ç§ID'; |
| | | COMMENT ON COLUMN production.production_quantity IS 'ç产æ°é'; |
| | | COMMENT ON COLUMN production.pending_quantity IS 'å¾
æäº§æ°é'; |
| | | COMMENT ON COLUMN production.labor_cost IS 'äººå·¥ææ¬'; |
| | | COMMENT ON COLUMN production.energy_consumption_cost IS 'è½èææ¬'; |
| | | COMMENT ON COLUMN production.equipment_depreciation IS 'è®¾å¤ææ§'; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.business.mapper.DuePayableMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.business.entity.DuePayable"> |
| | | <id property="id" column="id" jdbcType="BIGINT"/> |
| | | <result property="ticketNo" column="ticket_no" jdbcType="VARCHAR"/> |
| | | <result property="purchaseRegistrationId" column="purchase_registration_id" jdbcType="BIGINT"/> |
| | | <result property="payableType" column="payable_type" jdbcType="INTEGER"/> |
| | | <result property="paymentAmount" column="payment_amount" jdbcType="NUMERIC"/> |
| | | <result property="attachUpload" column="attach_upload" jdbcType="VARCHAR"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | id,ticket_no,purchase_registration_id, |
| | | payable_type,payment_amount,attach_upload, |
| | | deleted,create_by,create_time, |
| | | update_by,update_time |
| | | </sql> |
| | | </mapper> |
| | |
| | | |
| | | <select id="listPage" resultType="com.ruoyi.business.entity.ProductionScheduling"> |
| | | select * from production_scheduling where deleted = 0 |
| | | <if test="req.searchAll != null and req.searchAll != ''"> |
| | | and status = #{req.searchAll} |
| | | </if> |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.business.mapper.ReceiptPaymentMapper"> |
| | | |
| | | <select id="invoiceInfo" resultType="com.ruoyi.business.dto.SalesRecordDto"> |
| | | SELECT |
| | | T1.*, |
| | | T3.coal |
| | | FROM |
| | | sales_record T1 |
| | | LEFT JOIN customer T2 ON T1.customer_id = T2.id |
| | | LEFT JOIN coal_info T3 ON T1.coal_id = T3.id |
| | | WHERE T1.id = #{id} |
| | | </select> |
| | | <select id="bindInvoiceNoRegPage" resultType="com.ruoyi.business.dto.ReceiptPaymentDto"> |
| | | SELECT |
| | | T1.*, |
| | | T2.customer, |
| | | T3.coal |
| | | FROM |
| | | receipt_payment T1 |
| | | LEFT JOIN sales_record T2 ON T1.sales_record_id = T2.id |
| | | LEFT JOIN coal_info T3 ON T2.coal_id = T3.id |
| | | where 1=1 |
| | | <if test="receiptPaymentDto.customer != null and receiptPaymentDto.customer != ''"> |
| | | and T2.customer like concat('%',#{receiptPaymentDto.customer},'%') |
| | | </if> |
| | | <if test="receiptPaymentDto.coal != null and receiptPaymentDto.coal != ''"> |
| | | and T3.coal like concat('%',#{receiptPaymentDto.coal},'%') |
| | | </if> |
| | | <if test="receiptPaymentDto.receiptPaymentDateStart != null and receiptPaymentDto.receiptPaymentDateEnd != ''"> |
| | | and T1.receipt_payment_date between to_timestamp(#{receiptPaymentDto.receiptPaymentDateStart}, 'yyyy-MM-dd HH24:mi:ss') AND |
| | | to_timestamp(#{receiptPaymentDto.receiptPaymentDateEnd}, 'yyyy-MM-dd HH24:mi:ss') |
| | | </if> |
| | | </select> |
| | | <select id="receiptPaymentHistoryListNoPage" resultType="com.ruoyi.business.dto.ReceiptPaymentDto"> |
| | | SELECT |
| | | T1.*, |
| | | T2.customer, |
| | | T3.coal |
| | | FROM |
| | | receipt_payment T1 |
| | | LEFT JOIN sales_record T2 ON T1.sales_record_id = T2.id |
| | | LEFT JOIN coal_info T3 ON T2.coal_id = T3.id |
| | | where 1=1 |
| | | <if test="receiptPaymentDto.customer != null and receiptPaymentDto.customer != ''"> |
| | | and T2.customer like concat('%',#{receiptPaymentDto.customer},'%') |
| | | </if> |
| | | <if test="receiptPaymentDto.coal != null and receiptPaymentDto.coal != ''"> |
| | | and T3.coal like concat('%',#{receiptPaymentDto.coal},'%') |
| | | </if> |
| | | <if test="receiptPaymentDto.receiptPaymentDateStart != null and receiptPaymentDto.receiptPaymentDateEnd != ''"> |
| | | and T1.receipt_payment_date between to_timestamp(#{receiptPaymentDto.receiptPaymentDateStart}, 'yyyy-MM-dd HH24:mi:ss') AND |
| | | to_timestamp(#{receiptPaymentDto.receiptPaymentDateEnd}, 'yyyy-MM-dd HH24:mi:ss') |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * è·åå
¨é¨å¯ç¨åæ®µä¿¡æ¯ |
| | | * @return |
| | | */ |
| | | @GetMapping("/dictDataList") |
| | | public AjaxResult dictDataList(){ |
| | | return AjaxResult.success(dictDataService.selectAllDictDataList()); |
| | | } |
| | | |
| | | @Log(title = "åå
¸æ°æ®", businessType = BusinessType.EXPORT) |
| | | @PreAuthorize("@ss.hasPermi('system:dict:export')") |
| | | @PostMapping("/export") |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.basic.entity.dto; |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author buhuazhen |
| | | * @date 2025/8/26 |
| | | * @email 3038525872@qq.com |
| | | */ |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class SimpleStorageDto { |
| | | private Long id; |
| | | |
| | | private String originalFilename; |
| | | |
| | | private String contentType; |
| | | |
| | | private String url; |
| | | |
| | | private String downloadUrl; |
| | | |
| | | private Date createTime; |
| | | |
| | | public SimpleStorageDto(Long id, String contentType, String originalFilename, Date createTime) { |
| | | this.id = id; |
| | | this.contentType = contentType; |
| | | this.originalFilename = originalFilename; |
| | | this.createTime = createTime; |
| | | } |
| | | } |
| | |
| | | import com.ruoyi.basic.entity.StorageAttachment; |
| | | import com.ruoyi.basic.entity.StorageBlob; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.basic.entity.dto.SimpleStorageDto; |
| | | import com.ruoyi.basic.entity.dto.StorageBlobDTO; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | |
| | | * @return |
| | | */ |
| | | public int deleteStorageBlobs(StorageAttachment attachment); |
| | | |
| | | List<SimpleStorageDto> findStorageByIds(List<Long> ids,String bucketName); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.basic.entity.StorageAttachment; |
| | | import com.ruoyi.basic.entity.StorageBlob; |
| | | import com.ruoyi.basic.entity.dto.SimpleStorageDto; |
| | | import com.ruoyi.basic.entity.dto.StorageBlobDTO; |
| | | import com.ruoyi.basic.mapper.StorageAttachmentMapper; |
| | | import com.ruoyi.basic.mapper.StorageBlobMapper; |
| | |
| | | private MinioUtils minioUtils; |
| | | |
| | | @Override |
| | | public List<StorageBlobDTO> updateStorageBlobs(List<MultipartFile> files, String bucketName,Long type) { |
| | | public List<StorageBlobDTO> updateStorageBlobs(List<MultipartFile> files, String bucketName, Long type) { |
| | | |
| | | // è¥æ²¡ä¼ å
¥bucketNameï¼å使ç¨é»è®¤bucketName |
| | | if (StringUtils.isEmpty(bucketName)) { |
| | |
| | | "pdf", "doc", "docx", "xls", "xlsx", "ppt", "pptx", "txt", "rtf", "md", "csv", "odt", |
| | | |
| | | // è§é¢ |
| | | "mp4", "mov", "avi", "wmv", "flv", "mkv", "webm", "mpeg", "3gp","MOV", |
| | | "mp4", "mov", "avi", "wmv", "flv", "mkv", "webm", "mpeg", "3gp", "MOV", |
| | | |
| | | // é³é¢ |
| | | "mp3", "wav", "ogg", "aac", "flac", "m4a", "wma", "amr", |
| | |
| | | new LambdaQueryWrapper<StorageBlob>().in(StorageBlob::getId, ids) |
| | | ); |
| | | } |
| | | |
| | | |
| | | // ç§»é¤MinIOä¸çæä»¶ |
| | | if (!storageBlobs.isEmpty()) { |
| | | for (StorageBlob storageBlob : storageBlobs) { |
| | |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | @Override |
| | | public List<SimpleStorageDto> findStorageByIds(List<Long> ids, String bucketName) { |
| | | if (ids == null || ids.isEmpty()) { |
| | | return List.of(); |
| | | } |
| | | return storageBlobMapper.selectByIds(ids).parallelStream().map(it -> { |
| | | SimpleStorageDto dto = new SimpleStorageDto(it.getId(), it.getContentType(), it.getOriginalFilename(), it.getCreateTime()); |
| | | dto.setDownloadUrl(minioUtils.getDownloadUrls(it.getBucketFilename(), bucketName, it.getOriginalFilename(), true)); |
| | | dto.setUrl(minioUtils.getPreviewUrl(it.getBucketFilename(), bucketName, true)); |
| | | return dto; |
| | | }).toList(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.system.domain.vo; |
| | | |
| | | import lombok.Data; |
| | | import lombok.RequiredArgsConstructor; |
| | | |
| | | /** |
| | | * @author buhuazhen |
| | | * @date 2025/8/26 |
| | | * @email 3038525872@qq.com |
| | | */ |
| | | @Data |
| | | public class DictDataVo { |
| | | private String label; |
| | | private String value; |
| | | private String type; |
| | | } |
| | |
| | | */ |
| | | public List<SysDictData> selectDictDataList(SysDictData dictData); |
| | | |
| | | public List<SysDictData> selectAllDictList(); |
| | | |
| | | /** |
| | | * æ ¹æ®åå
¸ç±»åæ¥è¯¢åå
¸æ°æ® |
| | | * |
| | |
| | | |
| | | import java.util.List; |
| | | import com.ruoyi.common.core.domain.entity.SysDictData; |
| | | import com.ruoyi.system.domain.vo.DictDataVo; |
| | | |
| | | /** |
| | | * åå
¸ ä¸å¡å± |
| | |
| | | * @return ç»æ |
| | | */ |
| | | public int updateDictData(SysDictData dictData); |
| | | |
| | | public List<DictDataVo> selectAllDictDataList(); |
| | | |
| | | } |
| | |
| | | package com.ruoyi.system.service.impl; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.ruoyi.system.domain.vo.DictDataVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.ruoyi.common.core.domain.entity.SysDictData; |
| | |
| | | } |
| | | return row; |
| | | } |
| | | |
| | | @Override |
| | | public List<DictDataVo> selectAllDictDataList() { |
| | | return dictDataMapper.selectAllDictList().stream().map(it->{ |
| | | DictDataVo dict = new DictDataVo(); |
| | | dict.setLabel(it.getDictLabel()); |
| | | dict.setValue(it.getDictValue()); |
| | | dict.setType(it.getDictType()); |
| | | return dict; |
| | | }).toList(); |
| | | } |
| | | } |
| | |
| | | <select id="countDictDataByType" resultType="Integer"> |
| | | select count(1) from sys_dict_data where dict_type=#{dictType} |
| | | </select> |
| | | |
| | | <delete id="deleteDictDataById" parameterType="Long"> |
| | | <select id="selectAllDictList" resultType="com.ruoyi.common.core.domain.entity.SysDictData"> |
| | | <include refid="selectDictDataVo"/> |
| | | where status = '0' |
| | | </select> |
| | | |
| | | <delete id="deleteDictDataById" parameterType="Long"> |
| | | delete from sys_dict_data where dict_code = #{dictCode} |
| | | </delete> |
| | | |