src/main/java/com/ruoyi/procurementrecord/controller/ProcurementRecordController.java
@@ -7,6 +7,7 @@ import com.ruoyi.framework.web.controller.BaseController; import com.ruoyi.framework.web.domain.AjaxResult; import com.ruoyi.procurementrecord.dto.*; import com.ruoyi.procurementrecord.pojo.CustomStorage; import com.ruoyi.procurementrecord.service.ProcurementRecordService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -33,7 +34,7 @@ @GetMapping("/productlist") @Log(title = "éè´å ¥åº-å ¥åºç®¡ç-æ°å¢å ¥åºæ¥è¯¢", businessType = BusinessType.OTHER) public AjaxResult list(ProcurementDto procurementDto) { List<ProcurementDto> result =procurementRecordService.listProcurementBySalesLedgerId(procurementDto); List<ProcurementDto> result = procurementRecordService.listProcurementBySalesLedgerId(procurementDto); return AjaxResult.success(result); } @@ -44,6 +45,13 @@ procurementDto.setType(1); procurementDto.setTypeName("éè´å ¥åº"); return AjaxResult.success(procurementRecordService.add(procurementDto)); } @PostMapping("/addCustom") @Log(title = "èªå®ä¹å ¥åº-å ¥åºç®¡ç-æ°å¢å ¥åº", businessType = BusinessType.INSERT) @Transactional public AjaxResult addCustom(@RequestBody List<CustomStorage> customStorage) { return procurementRecordService.addCustom(customStorage); } @PostMapping("/update") @@ -71,16 +79,47 @@ @Log(title = "éè´å ¥åº-å ¥åºç®¡ç-å ¥åºæ¥è¯¢", businessType = BusinessType.OTHER) @ApiOperation(value = "å ¥åºæ¥è¯¢") public AjaxResult listPage(Page page, ProcurementPageDto procurementDto) { IPage<ProcurementPageDto> result =procurementRecordService.listPage(page, procurementDto); IPage<ProcurementPageDto> result = procurementRecordService.listPage(page, procurementDto); return AjaxResult.success(result); } @GetMapping("/listPageByProduction") @Log(title = "çäº§å ¥åº-å ¥åºç®¡ç-å ¥åºæ¥è¯¢", businessType = BusinessType.OTHER) @ApiOperation(value = "å ¥åºæ¥è¯¢") public AjaxResult listPageByProduction(Page page, ProcurementPageDto procurementDto) { IPage<ProcurementPageDto> result = procurementRecordService.listPageByProduction(page, procurementDto); return AjaxResult.success(result); } @GetMapping("/listPageByCustom") @Log(title = "èªå®ä¹å ¥åº-å ¥åºç®¡ç-å ¥åºæ¥è¯¢", businessType = BusinessType.OTHER) @ApiOperation(value = "å ¥åºæ¥è¯¢") public AjaxResult listPageByCustom(Page page, CustomStorage customStorage) { IPage<CustomStorage> result = procurementRecordService.listPageByCustom(page, customStorage); return AjaxResult.success(result); } @GetMapping("/listPageCopy") @Log(title = "éè´å ¥åº-å ¥åºç®¡ç-å ¥åºæ¥è¯¢", businessType = BusinessType.OTHER) @Log(title = "éè´å ¥åº-åºå管ç-å页æ¥è¯¢", businessType = BusinessType.OTHER) public AjaxResult listPageCopy(Page page, ProcurementPageDto procurementDto) { IPage<ProcurementPageDtoCopy> result =procurementRecordService.listPageCopy(page, procurementDto); IPage<ProcurementPageDtoCopy> result = procurementRecordService.listPageCopy(page, procurementDto); return AjaxResult.success(result); } @GetMapping("/listPageCopyByProduction") @Log(title = "çäº§å ¥åº-åºå管ç-å页æ¥è¯¢", businessType = BusinessType.OTHER) public AjaxResult listPageCopyByProduction(Page page, ProcurementPageDto procurementDto) { IPage<ProcurementPageDtoCopy> result = procurementRecordService.listPageCopyByProduction(page, procurementDto); return AjaxResult.success(result); } @GetMapping("/listPageCopyByCustom") @Log(title = "èªå®ä¹å ¥åº-åºå管ç-å页æ¥è¯¢", businessType = BusinessType.OTHER) public AjaxResult listPageCopyByCustom(Page page, CustomStorage customStorage) { IPage<CustomStorage> result = procurementRecordService.listPageCopyByCustom(page, customStorage); return AjaxResult.success(result); } @GetMapping("/getReportList") @Log(title = "åºåæ¥è¡¨æ¥è¯¢", businessType = BusinessType.OTHER) public AjaxResult getReportList(Page page, ProcurementPageDto procurementDto) { src/main/java/com/ruoyi/procurementrecord/dto/ProcurementAddDto.java
@@ -16,7 +16,7 @@ private String nickName; /** * å ¥åºç±»å 1-éè´ 2-ç产 * å ¥åºç±»å 1-éè´ 2-ç产 3-èªå®ä¹ */ private Integer type; src/main/java/com/ruoyi/procurementrecord/dto/ProcurementPageDto.java
@@ -33,10 +33,25 @@ private String inboundBatches; /** * ååå· * éè´ååå· */ private String purchaseContractNumber; /** * éå®ååå· */ private String salesContractNo; /** * 客æ·ååå· */ private String customerContractNo; /** * 客æ·åç§° */ private String customerName; private String salesLedgerProductId; /** src/main/java/com/ruoyi/procurementrecord/dto/ProcurementPageDtoCopy.java
@@ -32,6 +32,22 @@ */ private String purchaseContractNumber; /** * éå®ååå· */ private String salesContractNo; /** * 客æ·ååå· */ private String customerContractNo; /** * 客æ·åç§° */ private String customerName; private String salesLedgerProductId; /** src/main/java/com/ruoyi/procurementrecord/mapper/CustomStorageMapper.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,11 @@ package com.ruoyi.procurementrecord.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ruoyi.procurementrecord.pojo.CustomStorage; /** * @author :yys * @date : 2025/11/10 13:11 */ public interface CustomStorageMapper extends BaseMapper<CustomStorage> { } src/main/java/com/ruoyi/procurementrecord/mapper/ProcurementRecordMapper.java
@@ -31,4 +31,8 @@ List<ProcurementPageDtoCopy> listCopy(); List<ProcurementPageDto> list(); IPage<ProcurementPageDto> listPageByProduction(Page page, @Param("req") ProcurementPageDto procurementDto); IPage<ProcurementPageDtoCopy> listPageCopyByProduction(Page page, @Param("req") ProcurementPageDto procurementDto); } src/main/java/com/ruoyi/procurementrecord/pojo/CustomStorage.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,89 @@ package com.ruoyi.procurementrecord.pojo; import com.baomidou.mybatisplus.annotation.*; import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; import java.math.BigDecimal; import java.time.LocalDateTime; import java.util.Date; /** * @author :yys * @date : 2025/11/10 11:51 */ @TableName("custom_storage") @Data public class CustomStorage { private static final long serialVersionUID = 1L; @TableId(value = "id", type = IdType.AUTO) private Integer id; // å ¥åºæ¶é´ @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") @DateTimeFormat(pattern = "yyyy-MM-dd") private Date inboundDate; // ç©åç±»å private String itemType; // å ¥åºæ¹æ¬¡ private String inboundBatches; // å ¥åºæ°é private BigDecimal inboundNum; // ä¾åºååç§° private String supplierName; // 产å大类 private String productCategory; // è§æ ¼åå· private String specificationModel; // åä½ private String unit; // å«ç¨åä»· private BigDecimal taxInclusiveUnitPrice; // å«ç¨æ»ä»· private BigDecimal taxInclusiveTotalPrice; // ç¨ç(%) private BigDecimal taxRate; // ä¸å«ç¨æ»ä»· private BigDecimal taxExclusiveTotalPrice; /** * åºåºåºç¨æ· */ private String createBy; /** * å ¥åºç¨æ·id */ @TableField(fill = FieldFill.INSERT) private Long createUser; /** * å ¥åºæ¶é´ */ @TableField(fill = FieldFill.INSERT) @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime createTime; /** * ä¿®æ¹è */ @TableField(fill = FieldFill.INSERT_UPDATE) private Long updateUser; /** * ä¿®æ¹æ¶é´ */ @TableField(fill = FieldFill.INSERT_UPDATE) @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime updateTime; /** * ç§æ·ID */ @TableField(fill = FieldFill.INSERT) private Long tenantId; } src/main/java/com/ruoyi/procurementrecord/pojo/ProcurementRecordOut.java
@@ -54,21 +54,25 @@ /** * å ¥åºç¨æ·id */ @TableField(fill = FieldFill.INSERT) private Long createUser; /** * å ¥åºæ¶é´ */ @TableField(fill = FieldFill.INSERT) private LocalDateTime createTime; /** * ä¿®æ¹è */ @TableField(fill = FieldFill.INSERT_UPDATE) private Long updateUser; /** * ä¿®æ¹æ¶é´ */ @TableField(fill = FieldFill.INSERT_UPDATE) private LocalDateTime updateTime; /** src/main/java/com/ruoyi/procurementrecord/pojo/ProcurementRecordStorage.java
@@ -59,21 +59,25 @@ /** * å ¥åºç¨æ·id */ @TableField(fill = FieldFill.INSERT) private Long createUser; /** * å ¥åºæ¶é´ */ @TableField(fill = FieldFill.INSERT) private LocalDateTime createTime; /** * ä¿®æ¹è */ @TableField(fill = FieldFill.INSERT_UPDATE) private Long updateUser; /** * ä¿®æ¹æ¶é´ */ @TableField(fill = FieldFill.INSERT_UPDATE) private LocalDateTime updateTime; /** src/main/java/com/ruoyi/procurementrecord/service/ProcurementRecordService.java
@@ -3,7 +3,9 @@ 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.framework.web.domain.AjaxResult; import com.ruoyi.procurementrecord.dto.*; import com.ruoyi.procurementrecord.pojo.CustomStorage; import com.ruoyi.procurementrecord.pojo.ProcurementRecordStorage; import javax.servlet.http.HttpServletResponse; @@ -34,4 +36,14 @@ void exportCopy(HttpServletResponse response); Map<String, Object> getReportList(Page page, ProcurementPageDto procurementDto); IPage<ProcurementPageDto> listPageByProduction(Page page, ProcurementPageDto procurementDto); AjaxResult addCustom(List<CustomStorage> customStorage); IPage<CustomStorage> listPageByCustom(Page page, CustomStorage customStorage); IPage<ProcurementPageDtoCopy> listPageCopyByProduction(Page page, ProcurementPageDto procurementDto); IPage<CustomStorage> listPageCopyByCustom(Page page, CustomStorage customStorage); } src/main/java/com/ruoyi/procurementrecord/service/impl/ProcurementRecordServiceImpl.java
@@ -7,9 +7,12 @@ import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.framework.security.LoginUser; import com.ruoyi.framework.web.domain.AjaxResult; import com.ruoyi.procurementrecord.dto.*; import com.ruoyi.procurementrecord.mapper.CustomStorageMapper; import com.ruoyi.procurementrecord.mapper.ProcurementRecordMapper; import com.ruoyi.procurementrecord.mapper.ProcurementRecordOutMapper; import com.ruoyi.procurementrecord.pojo.CustomStorage; import com.ruoyi.procurementrecord.pojo.ProcurementRecordStorage; import com.ruoyi.procurementrecord.pojo.ProcurementRecordOut; import com.ruoyi.procurementrecord.service.ProcurementRecordService; @@ -21,6 +24,7 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; import org.springframework.util.StringUtils; import javax.servlet.http.HttpServletResponse; import java.math.BigDecimal; @@ -336,6 +340,134 @@ } @Override public IPage<ProcurementPageDto> listPageByProduction(Page page, ProcurementPageDto procurementDto) { IPage<ProcurementPageDto> procurementPageDtoIPage = procurementRecordMapper.listPageByProduction(page, procurementDto); List<ProcurementPageDto> procurementPageDtos = procurementPageDtoIPage.getRecords(); // 计ç®å¾ å ¥åºæ°é // æ¥è¯¢éè´è®°å½å·²å ¥åºæ°é List<Integer> collect = procurementPageDtos.stream().map(ProcurementPageDto::getId).collect(Collectors.toList()); if(CollectionUtils.isEmpty( collect)){ return procurementPageDtoIPage; } LambdaQueryWrapper<ProcurementRecordOut> procurementRecordLambdaQueryWrapper = new LambdaQueryWrapper<>(); procurementRecordLambdaQueryWrapper.in(ProcurementRecordOut::getProcurementRecordStorageId, collect); List<ProcurementRecordOut> procurementRecords = procurementRecordOutMapper.selectList(procurementRecordLambdaQueryWrapper); if(CollectionUtils.isEmpty( procurementRecords)){ return procurementPageDtoIPage; } for (ProcurementPageDto dto : procurementPageDtos) { // æ ¹æ®éè´å°è´¦IDçé对åºçåºåºè®°å½ List<ProcurementRecordOut> collect1 = procurementRecords.stream() .filter(ProcurementRecordOut -> ProcurementRecordOut.getProcurementRecordStorageId().equals(dto.getId())) .collect(Collectors.toList()); // å¦ææ²¡æç¸å ³çåºåºè®°å½ï¼è·³è¿è¯¥æ¡æ°æ® if(CollectionUtils.isEmpty(collect1)){ dto.setInboundNum0(dto.getInboundNum()); continue; } // 计ç®å·²åºåºæ°éæ»åï¼å¹¶è®¾ç½®å¾ åºåºæ°é BigDecimal totalInboundNum = collect1.stream() .map(ProcurementRecordOut::getInboundNum) .reduce(BigDecimal.ZERO, BigDecimal::add); // å¾ åºåºæ°é = æ»æ°é - å·²åºåºæ°é dto.setInboundNum0(dto.getInboundNum().subtract(totalInboundNum)); } return procurementPageDtoIPage; } private final CustomStorageMapper customStorageMapper; @Override public AjaxResult addCustom(List<CustomStorage> customStorage) { LoginUser loginUser = SecurityUtils.getLoginUser(); if(CollectionUtils.isEmpty(customStorage)){ return AjaxResult.error("æ°æ®ä¸è½ä¸ºç©º"); } customStorage.forEach(item -> { // æ¥è¯¢éè´å ¥åºæ°é Long aLong = customStorageMapper.selectCount(null); item.setInboundBatches(aLong.equals(0L) ? "第1æ¹æ¬¡(èªå®ä¹å ¥åº)" : "第"+ (aLong + 1) + "æ¹æ¬¡(èªå®ä¹å ¥åº)" ); item.setCreateBy(loginUser.getNickName()); customStorageMapper.insert(item); }); return AjaxResult.success("èªå®ä¹å ¥åºæå"); } @Override public IPage<CustomStorage> listPageByCustom(Page page, CustomStorage customStorage) { LambdaQueryWrapper<CustomStorage> customStorageLambdaQueryWrapper = new LambdaQueryWrapper<>(); if(customStorage != null){ if(!StringUtils.isEmpty(customStorage.getSupplierName())){ customStorageLambdaQueryWrapper.like(CustomStorage::getSupplierName, customStorage.getSupplierName()); } // çéå ¥åºæ¶é´ if(customStorage.getInboundDate() != null){ customStorageLambdaQueryWrapper.eq(CustomStorage::getInboundDate, customStorage.getInboundDate()); } } return customStorageMapper.selectPage(page, customStorageLambdaQueryWrapper); } @Override public IPage<ProcurementPageDtoCopy> listPageCopyByProduction(Page page, ProcurementPageDto procurementDto) { IPage<ProcurementPageDtoCopy> procurementPageDtoCopyIPage = procurementRecordMapper.listPageCopyByProduction(page, procurementDto); List<ProcurementPageDtoCopy> procurementPageDtoCopyList = procurementPageDtoCopyIPage.getRecords(); // 计ç®å¾ å ¥åºæ°é // æ¥è¯¢éè´è®°å½å·²å ¥åºæ°é List<Integer> collect = procurementPageDtoCopyList.stream().map(ProcurementPageDtoCopy::getId).collect(Collectors.toList()); if(CollectionUtils.isEmpty( collect)){ return procurementPageDtoCopyIPage; } LambdaQueryWrapper<ProcurementRecordOut> procurementRecordLambdaQueryWrapper = new LambdaQueryWrapper<>(); procurementRecordLambdaQueryWrapper.in(ProcurementRecordOut::getProcurementRecordStorageId, collect); List<ProcurementRecordOut> procurementRecords = procurementRecordOutMapper.selectList(procurementRecordLambdaQueryWrapper); if(CollectionUtils.isEmpty( procurementRecords)){ return procurementPageDtoCopyIPage; } for (ProcurementPageDtoCopy dto : procurementPageDtoCopyList) { // æ ¹æ®éè´å°è´¦IDçé对åºçåºåºè®°å½ List<ProcurementRecordOut> collect1 = procurementRecords.stream() .filter(ProcurementRecordOut -> ProcurementRecordOut.getProcurementRecordStorageId().equals(dto.getId())) .collect(Collectors.toList()); // å¦ææ²¡æç¸å ³çåºåºè®°å½ï¼è·³è¿è¯¥æ¡æ°æ® if(CollectionUtils.isEmpty(collect1)){ dto.setInboundNum0(dto.getInboundNum()); continue; } // 计ç®å·²åºåºæ°éæ»åï¼å¹¶è®¾ç½®å¾ åºåºæ°é BigDecimal totalInboundNum = collect1.stream() .map(ProcurementRecordOut::getInboundNum) .reduce(BigDecimal.ZERO, BigDecimal::add); // åºåºæ°é = æ»æ°é - å¾ åºåºæ°é dto.setTotalInboundNum(totalInboundNum); // å¾ åºåºæ°é = æ»æ°é - å·²åºåºæ°é dto.setInboundNum0(dto.getInboundNum().subtract(totalInboundNum)); } return procurementPageDtoCopyIPage; } @Override public IPage<CustomStorage> listPageCopyByCustom(Page page, CustomStorage customStorage) { LambdaQueryWrapper<CustomStorage> customStorageLambdaQueryWrapper = new LambdaQueryWrapper<>(); customStorageLambdaQueryWrapper.groupBy(CustomStorage::getSupplierName, CustomStorage::getProductCategory, CustomStorage::getSpecificationModel); if(customStorage != null){ if(!StringUtils.isEmpty(customStorage.getSupplierName())){ customStorageLambdaQueryWrapper.like(CustomStorage::getSupplierName, customStorage.getSupplierName()); } // çéå ¥åºæ¶é´ if(customStorage.getInboundDate() != null){ customStorageLambdaQueryWrapper.eq(CustomStorage::getInboundDate, customStorage.getInboundDate()); } } return customStorageMapper.selectPage(page, customStorageLambdaQueryWrapper); } @Override public int add(ProcurementAddDto procurementDto) { LoginUser loginUser = SecurityUtils.getLoginUser(); // æ¹éæ°å¢ src/main/java/com/ruoyi/production/dto/ProcessSchedulingDto.java
@@ -66,5 +66,11 @@ @ApiModelProperty(value = "å£å³åç±»") private String type; /** * é¢ç¨ */ @ApiModelProperty(value = "é¢ç¨") private String receive; } src/main/java/com/ruoyi/production/dto/SalesLedgerWorkDto.java
@@ -107,5 +107,12 @@ @Excel(name = "å£å³åç±»") private String type; /** * é¢ç¨ */ @ApiModelProperty(value = "é¢ç¨") @Excel(name = "é¢ç¨") private String receive; } src/main/java/com/ruoyi/production/pojo/SalesLedgerWork.java
@@ -93,6 +93,11 @@ private String type; /** * é¢ç¨ */ private String receive; /** * å建è */ @TableField(fill = FieldFill.INSERT) src/main/java/com/ruoyi/production/service/impl/SalesLedgerSchedulingServiceImpl.java
@@ -171,6 +171,7 @@ .remark(processSchedulingDto.getRemark()) .type(processSchedulingDto.getType()) .loss(processSchedulingDto.getLoss()) .receive(processSchedulingDto.getReceive()) .salesLedgerProductId(salesLedgerScheduling.getSalesLedgerProductId()) .schedulingUserId(salesLedgerScheduling.getSchedulingUserId()) .schedulingUserName(sysUser.getNickName()) src/main/resources/application-native.yml
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,219 @@ # 项ç®ç¸å ³é ç½® ruoyi: # åç§° name: RuoYi # çæ¬ version: 3.8.9 # çæå¹´ä»½ copyrightYear: 2025 # æä»¶è·¯å¾ 示ä¾ï¼ Windowsé ç½®D:/ruoyi/uploadPathï¼Linuxé ç½® /home/ruoyi/uploadPathï¼ profile: /javaWork/product-inventory-management/file # è·åipå°åå¼å ³ addressEnabled: false # éªè¯ç ç±»å math æ°åè®¡ç® char å符éªè¯ captchaType: math # å¼åç¯å¢é ç½® server: # æå¡å¨çHTTP端å£ï¼é»è®¤ä¸º8080 port: 8080 servlet: # åºç¨ç访é®è·¯å¾ context-path: / tomcat: # tomcatçURIç¼ç uri-encoding: UTF-8 # è¿æ¥æ°æ»¡åçæéæ°ï¼é»è®¤ä¸º100 accept-count: 1000 threads: # tomcatæå¤§çº¿ç¨æ°ï¼é»è®¤ä¸º200 max: 800 # Tomcatå¯å¨åå§åççº¿ç¨æ°ï¼é»è®¤å¼10 min-spare: 100 # æ¥å¿é ç½® logging: level: com.ruoyi: warn org.springframework: warn minio: endpoint: http://114.132.189.42/ port: 7019 secure: false accessKey: admin secretKey: 12345678 preview-expiry: 24 # é¢è§å°åé»è®¤24å°æ¶ default-bucket: demo-product # ç¨æ·é ç½® user: password: # å¯ç æå¤§éè¯¯æ¬¡æ° maxRetryCount: 5 # å¯ç é宿¶é´ï¼é»è®¤10åéï¼ lockTime: 10 # Springé ç½® spring: datasource: type: com.alibaba.druid.pool.DruidDataSource driverClassName: com.mysql.cj.jdbc.Driver druid: # ä¸»åºæ°æ®æº master: url: jdbc:mysql://localhost:3306/product-inventory-management?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 username: root password: 123456 # ä»åºæ°æ®æº slave: # 仿°æ®æºå¼å ³/é»è®¤å ³é enabled: false url: username: password: # åå§è¿æ¥æ° initialSize: 5 # æå°è¿æ¥æ± æ°é minIdle: 10 # æå¤§è¿æ¥æ± æ°é maxActive: 20 # é ç½®è·åè¿æ¥çå¾ è¶ æ¶çæ¶é´ maxWait: 60000 # é ç½®è¿æ¥è¶ æ¶æ¶é´ connectTimeout: 30000 # é ç½®ç½ç»è¶ æ¶æ¶é´ socketTimeout: 60000 # é ç½®é´éå¤ä¹ æè¿è¡ä¸æ¬¡æ£æµï¼æ£æµéè¦å ³éç空é²è¿æ¥ï¼å使¯æ¯«ç§ timeBetweenEvictionRunsMillis: 60000 # é ç½®ä¸ä¸ªè¿æ¥å¨æ± 䏿å°çåçæ¶é´ï¼å使¯æ¯«ç§ minEvictableIdleTimeMillis: 300000 # é ç½®ä¸ä¸ªè¿æ¥å¨æ± 䏿大çåçæ¶é´ï¼å使¯æ¯«ç§ maxEvictableIdleTimeMillis: 900000 # é ç½®æ£æµè¿æ¥æ¯å¦ææ validationQuery: SELECT 1 FROM DUAL testWhileIdle: true testOnBorrow: false testOnReturn: false webStatFilter: enabled: true statViewServlet: enabled: true # 设置ç½ååï¼ä¸å¡«åå 许ææè®¿é® allow: url-pattern: /druid/* # æ§å¶å°ç®¡çç¨æ·ååå¯ç login-username: ruoyi login-password: 123456 filter: stat: enabled: true # æ ¢SQLè®°å½ log-slow-sql: true slow-sql-millis: 1000 merge-sql: true wall: config: multi-statement-allow: true # èµæºä¿¡æ¯ messages: # å½é åèµæºæä»¶è·¯å¾ basename: i18n/messages # æä»¶ä¸ä¼ servlet: multipart: # å个æä»¶å¤§å° max-file-size: 1GB # 设置æ»ä¸ä¼ çæä»¶å¤§å° max-request-size: 2GB # æå¡æ¨¡å devtools: restart: # çé¨ç½²å¼å ³ enabled: false # redis é ç½® redis: # å°å # host: 127.0.0.1 host: 192.168.1.185 # 端å£ï¼é»è®¤ä¸º6379 port: 6379 # æ°æ®åºç´¢å¼ database: 0 # å¯ç # password: root2022! password: # è¿æ¥è¶ æ¶æ¶é´ timeout: 10s lettuce: pool: # è¿æ¥æ± ä¸çæå°ç©ºé²è¿æ¥ min-idle: 0 # è¿æ¥æ± ä¸çæå¤§ç©ºé²è¿æ¥ max-idle: 8 # è¿æ¥æ± çæå¤§æ°æ®åºè¿æ¥æ° max-active: 8 # #è¿æ¥æ± æå¤§é»å¡çå¾ æ¶é´ï¼ä½¿ç¨è´å¼è¡¨ç¤ºæ²¡æéå¶ï¼ max-wait: -1ms # tokené ç½® token: # 令çèªå®ä¹æ è¯ header: Authorization # 令çå¯é¥ secret: abcdefghijklmnopqrstuvwxyz # ä»¤çæææï¼é»è®¤30åéï¼ expireTime: 450 # MyBatis Plusé ç½® mybatis-plus: # æç´¢æå®å å«å æ ¹æ®èªå·±çé¡¹ç®æ¥ typeAliasesPackage: com.ruoyi.**.pojo # é ç½®mapperçæ«æï¼æ¾å°ææçmapper.xmlæ å°æä»¶ mapperLocations: classpath*:mapper/**/*Mapper.xml # å è½½å ¨å±çé ç½®æä»¶ configLocation: classpath:mybatis/mybatis-config.xml global-config: enable-sql-runner: true db-config: id-type: auto # PageHelperå页æä»¶ pagehelper: helperDialect: mysql supportMethodsArguments: true params: count=countSql # Swaggeré ç½® swagger: # æ¯å¦å¼å¯swagger enabled: true # 请æ±åç¼ pathMapping: /dev-api # 鲿¢XSSæ»å» xss: # è¿æ»¤å¼å ³ enabled: true # æé¤é¾æ¥ï¼å¤ä¸ªç¨éå·åéï¼ excludes: /system/notice # å¹é 龿¥ urlPatterns: /system/*,/monitor/*,/tool/* # 代ç çæ gen: # ä½è author: ruoyi # é»è®¤çæå è·¯å¾ system éæ¹æèªå·±ç模ååç§° å¦ system monitor tool packageName: com.ruoyi.project.system # èªå¨å»é¤è¡¨åç¼ï¼é»è®¤æ¯true autoRemovePre: false # 表åç¼ï¼çæç±»åä¸ä¼å å«è¡¨åç¼ï¼å¤ä¸ªç¨éå·åéï¼ tablePrefix: sys_ # æ¯å¦å è®¸çææä»¶è¦çå°æ¬å°ï¼èªå®ä¹è·¯å¾ï¼ï¼é»è®¤ä¸å 许 allowOverwrite: false file: temp-dir: /javaWork/product-inventory-management/file/temp/uploads upload-dir: /javaWork/product-inventory-management/file/prod/uploads src/main/resources/application.yml
@@ -1,4 +1,4 @@ # Springé ç½® spring: profiles: active: hckx active: native src/main/resources/mapper/procurementrecord/ProcurementRecordMapper.xml
@@ -50,15 +50,12 @@ t1.create_by, t2.warn_num from procurement_record_storage t1 left join sales_ledger_product t2 on t2.id = t1.sales_ledger_product_id left join sales_ledger_product t2 on t2.id = t1.sales_ledger_product_id and t2.type = 2 left join purchase_ledger t3 on t3.id = t2.sales_ledger_id <where> 1 = 1 t1.type = 1 <if test="req.supplierName != null and req.supplierName != ''"> and t3.supplier_name like concat('%',#{req.supplierName},'%') </if> <if test="req.type != null and req.type != ''"> and t1.type = #{req.type} </if> <if test="req.timeStr != null and req.timeStr != ''"> and t1.create_time like concat('%',#{req.timeStr},'%') @@ -112,15 +109,12 @@ t1.create_by, t2.warn_num from procurement_record_storage t1 left join sales_ledger_product t2 on t2.id = t1.sales_ledger_product_id left join sales_ledger_product t2 on t2.id = t1.sales_ledger_product_id and t2.type = 2 left join purchase_ledger t3 on t3.id = t2.sales_ledger_id <where> 1 = 1 t1.type = 1 <if test="req.supplierName != null and req.supplierName != ''"> and t3.supplier_name like concat('%',#{req.supplierName},'%') </if> <if test="req.type != null and req.type != ''"> and t1.type = #{req.type} </if> <if test="req.timeStr != null and req.timeStr != ''"> and t1.create_time like concat('%',#{req.timeStr},'%') @@ -169,4 +163,92 @@ left join sales_ledger_product t2 on t2.id = t1.sales_ledger_product_id left join purchase_ledger t3 on t3.id = t2.sales_ledger_id </select> <select id="listPageByProduction" resultType="com.ruoyi.procurementrecord.dto.ProcurementPageDto"> select t3.customer_contract_no, t3.sales_contract_no, t3.customer_name, t2.product_category, t1.id, t1.sales_ledger_product_id, t1.create_user, t2.specification_model, t2.unit, t2.tax_rate, t2.tax_inclusive_unit_price, (t1.inbound_num * t2.tax_inclusive_unit_price) as taxInclusiveTotalPrice, (t1.inbound_num * t2.tax_inclusive_unit_price - t1.inbound_num * t2.tax_inclusive_unit_price * t2.tax_rate / 100) as taxExclusiveTotalPrice, t1.inbound_batches, t1.inbound_num, t1.inbound_num as inboundNum0, t1.create_time, t1.update_time, t1.create_by, t2.warn_num from procurement_record_storage t1 left join sales_ledger_product t2 on t2.id = t1.sales_ledger_product_id and t2.type = 1 left join sales_ledger t3 on t3.id = t2.sales_ledger_id <where> t1.type = 2 <if test="req.customerName != null and req.customerName != ''"> and t3.customer_name like concat('%',#{req.customerName},'%') </if> <if test="req.timeStr != null and req.timeStr != ''"> and t1.create_time like concat('%',#{req.timeStr},'%') </if> </where> </select> <select id="listPageCopyByProduction" resultType="com.ruoyi.procurementrecord.dto.ProcurementPageDtoCopy"> select t3.customer_contract_no, t3.sales_contract_no, t3.customer_name, t2.product_category, t1.id, t1.sales_ledger_product_id, t1.create_user, t2.specification_model, t2.unit, t2.min_stock, t2.tax_rate, t2.tax_inclusive_unit_price, t2.tax_inclusive_total_price, t2.tax_exclusive_total_price, t1.inbound_batches, sum(t1.inbound_num) as inboundNum, sum(t1.inbound_num) as inboundNum0, t1.inbound_num as totalInboundNum, t1.create_time, t1.update_time, t1.create_by, t2.warn_num from procurement_record_storage t1 left join sales_ledger_product t2 on t2.id = t1.sales_ledger_product_id and t2.type = 1 left join sales_ledger t3 on t3.id = t2.sales_ledger_id <where> t1.type = 2 <if test="req.customerName != null and req.customerName != ''"> and t3.customer_name like concat('%',#{req.customerName},'%') </if> <if test="req.timeStr != null and req.timeStr != ''"> and t1.create_time like concat('%',#{req.timeStr},'%') </if> <if test="req.reportDate != null"> and t1.create_time >= #{req.reportDate} and t1.create_time < DATE_ADD(#{req.reportDate}, INTERVAL 1 DAY) </if> <if test="req.startMonth != null"> and t1.create_time >= #{req.startMonth} </if> <if test="req.endMonth != null"> and t1.create_time <= #{req.endMonth} </if> <if test="req.startDate != null"> and t1.create_time >= #{req.startDate} </if> <if test="req.endDate != null"> and t1.create_time <= #{req.endDate} </if> </where> group by t3.customer_name,t2.product_category,t2.specification_model </select> </mapper> src/main/resources/mapper/production/SalesLedgerWorkMapper.xml
@@ -16,6 +16,7 @@ t4.loss, t4.type, t4.remark, t4.receive, T1.sales_contract_no, T1.customer_contract_no, T1.project_name,