src/main/java/com/ruoyi/production/controller/ProductionLineController.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,71 @@ package com.ruoyi.production.controller; import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.framework.aspectj.lang.enums.BusinessType; import com.ruoyi.framework.web.controller.BaseController; import com.ruoyi.framework.web.domain.AjaxResult; import com.ruoyi.production.pojo.ProductionLine; import com.ruoyi.production.service.ProductionLineService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.List; /** * @author :yys * @date : 2025/12/4 11:19 */ @RestController @Api(tags = "产线管ç") @RequestMapping("/productionLine") public class ProductionLineController extends BaseController { @Autowired private ProductionLineService productionLineService; /** * é彿¥è¯¢äº§çº¿æ */ @GetMapping("/listTree") @ApiOperation(value = "é彿¥è¯¢äº§çº¿æ ") public AjaxResult listTree() { List<ProductionLine> productionLines = productionLineService.listTree(); return AjaxResult.success(productionLines); } /** * å页-æ ¹æ®ç¶èç¹IDæ¥è¯¢åæ ï¼å¦æ¥è¯¢ID=1ç产线ä¸çææå·¥åºï¼ */ @GetMapping("/pageList") @ApiOperation(value = "å页-æ ¹æ®ç¶èç¹IDæ¥è¯¢åæ ") public AjaxResult getSubTree(Page page, ProductionLine productionLine) { return AjaxResult.success(productionLineService.getSubTreeByParentId(page ,productionLine)); } @PostMapping("/add") @ApiOperation(value = "æ·»å 产线") @Log(title = "产线管ç", businessType = BusinessType.INSERT) public AjaxResult add(@RequestBody ProductionLine productionLine) { return AjaxResult.success(productionLineService.save(productionLine)); } @PostMapping("/update") @ApiOperation(value = "ä¿®æ¹äº§çº¿") @Log(title = "产线管ç", businessType = BusinessType.UPDATE) public AjaxResult update(@RequestBody ProductionLine productionLine) { return AjaxResult.success(productionLineService.updateById(productionLine)); } @DeleteMapping("/delete") @ApiOperation(value = "å é¤äº§çº¿") @Log(title = "产线管ç", businessType = BusinessType.DELETE) public AjaxResult delete(@RequestBody List<Long> ids) { if(CollectionUtils.isEmpty(ids)) return AjaxResult.error("è¯·ä¼ å ¥è¦å é¤çID"); return AjaxResult.success(productionLineService.removeBatchByIds(ids)); } } src/main/java/com/ruoyi/production/dto/ProductionDispatchAddDto.java
@@ -34,6 +34,18 @@ private Long schedulingUserId; /** * ç产人 */ @ApiModelProperty(value = "ç产人") private Long productionUserId; /** * 产线id */ @ApiModelProperty(value = "产线id") private Long lineId; /** * æäº§æ¥æ */ @ApiModelProperty(value = "æäº§æ¥æ") src/main/java/com/ruoyi/production/dto/SalesLedgerSchedulingDto.java
@@ -128,4 +128,8 @@ @ApiModelProperty(value = "ç§æ·ID") private Long tenantId; private Long productionUserId; private String productionUserName; } src/main/java/com/ruoyi/production/dto/SalesLedgerSchedulingProcessDto.java
@@ -125,6 +125,31 @@ private Long schedulingUserId; /** * ç产人id */ @ApiModelProperty(value = "ç产人id") private Long productionUserId; /** * ç产人åç§° */ @Excel(name = "ç产人åç§°") @ApiModelProperty(value = "ç产人åç§°") private String productionUserName; /** * ç产产线 */ @Excel(name = "ç产产线") @ApiModelProperty(value = "ç产产线") private String productionLineName; @ApiModelProperty(value = "ç产产线id") private Long productionLineId; /** * æäº§æ°é */ src/main/java/com/ruoyi/production/dto/SalesLedgerWorkDto.java
@@ -24,6 +24,9 @@ @ApiModelProperty(value = "æäº§äººid") private Long schedulingUserId; @ApiModelProperty(value = "ç产人id") private Long productionUserId; /** * æäº§äººåç§° */ src/main/java/com/ruoyi/production/mapper/ProductionLineMapper.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,11 @@ package com.ruoyi.production.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ruoyi.production.pojo.ProductionLine; /** * @author :yys * @date : 2025/12/4 11:17 */ public interface ProductionLineMapper extends BaseMapper<ProductionLine> { } src/main/java/com/ruoyi/production/pojo/ProductionLine.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,92 @@ package com.ruoyi.production.pojo; import com.baomidou.mybatisplus.annotation.*; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.math.BigDecimal; import java.time.LocalDate; import java.time.LocalDateTime; import java.util.List; /** * @author :yys * @date : 2025/12/4 11:13 */ @Data @TableName("production_line") public class ProductionLine { private static final long serialVersionUID = 1L; @TableId(value = "id", type = IdType.AUTO) private Long id; /** * åç§° */ @ApiModelProperty("åç§°") private String name; /** * ç¶çº§id */ @ApiModelProperty("ç¶çº§id") private Integer parentId; /** * ç±»å 1-产线 2-å·¥åº */ @ApiModelProperty("ç±»å 1-产线 2-å·¥åº") private Integer type; /** * æåº */ @ApiModelProperty("æåº") private Integer sort; /** * 夿³¨ */ @ApiModelProperty("夿³¨") private String remark; /** * åæ°æ® */ @TableField(exist = false) @ApiModelProperty("åæ°æ®") private List<ProductionLine> children; /** * å建è */ @TableField(fill = FieldFill.INSERT) private Integer createUser; /** * å建æ¶é´ */ @TableField(fill = FieldFill.INSERT) private LocalDateTime createTime; /** * ä¿®æ¹è */ @TableField(fill = FieldFill.INSERT_UPDATE) private Integer updateUser; /** * ä¿®æ¹æ¶é´ */ @TableField(fill = FieldFill.INSERT_UPDATE) private LocalDateTime updateTime; /** * ç§æ·ID */ @TableField(fill = FieldFill.INSERT) private Long tenantId; } src/main/java/com/ruoyi/production/pojo/SalesLedgerScheduling.java
@@ -39,6 +39,22 @@ private Long schedulingUserId; /** * ç产产线id */ private Long productionLineId; /** * ç产人id */ private Long productionUserId; /** * ç产人åç§° */ private String productionUserName; /** * çäº§çæº */ private String speculativeTradingName; src/main/java/com/ruoyi/production/pojo/SalesLedgerWork.java
@@ -48,6 +48,18 @@ private String schedulingUserName; /** * ç产人id */ private Long productionUserId; /** * ç产人åç§° */ private String productionUserName; /** * æäº§æ°é */ src/main/java/com/ruoyi/production/service/ProductionLineService.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,28 @@ package com.ruoyi.production.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.production.pojo.ProductionLine; import java.util.List; /** * @author :yys * @date : 2025/12/4 11:18 */ public interface ProductionLineService extends IService<ProductionLine> { /** * é彿¥è¯¢äº§çº¿æ * @return */ List<ProductionLine> listTree(); /** * æ ¹æ®ç¶èç¹IDé彿¥è¯¢åæ * @param parentId ç¶èç¹ID * @return å å«åèç¹çç¶èç¹å¯¹è±¡ */ IPage<ProductionLine> getSubTreeByParentId(Page page, ProductionLine productionLine); } src/main/java/com/ruoyi/production/service/impl/ProductionLineServiceImpl.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,99 @@ package com.ruoyi.production.service.impl; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.ruoyi.production.mapper.ProductionLineMapper; import com.ruoyi.production.pojo.ProductionLine; import com.ruoyi.production.service.ProductionLineService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.ArrayList; import java.util.List; /** * @author :yys * @date : 2025/12/4 11:19 */ @Service @Slf4j public class ProductionLineServiceImpl extends ServiceImpl<ProductionLineMapper, ProductionLine> implements ProductionLineService { @Autowired private ProductionLineMapper productionLineMapper; /** * é彿¥è¯¢äº§çº¿æ * @return */ @Override public List<ProductionLine> listTree() { List<ProductionLine> productionLines = productionLineMapper.selectList(Wrappers.lambdaQuery(ProductionLine.class) .eq(ProductionLine::getParentId, 0) .eq(ProductionLine::getType, 1)); // 2. éå½ä¸ºæ¯ä¸ªæ ¹èç¹å è½½åèç¹ï¼å·¥åº/åäº§çº¿ï¼ for (ProductionLine rootLine : productionLines) { loadChildren(rootLine,1); } return productionLines; } /** * éå½å è½½åèç¹ï¼æ ¸å¿æ¹æ³ï¼ * @param parentNode ç¶èç¹å¯¹è±¡ */ private void loadChildren(ProductionLine parentNode,Integer type) { // 1. æ¥è¯¢å½åç¶èç¹çææåèç¹ List<ProductionLine> children = productionLineMapper.selectList(Wrappers.lambdaQuery(ProductionLine.class) .eq(ProductionLine::getParentId, parentNode.getId()) .eq(ProductionLine::getType, type)); // 2. è¥æåèç¹ï¼ç»§ç»éå½å è½½åèç¹çåèç¹ if (!children.isEmpty()) { parentNode.setChildren(children); // 设置åèç¹ for (ProductionLine child : children) { loadChildren(child,type); // éå½è°ç¨ï¼å è½½ååèç¹ } } } /** * æéæä¾ï¼æ ¹æ®ç¶èç¹IDæ¥è¯¢åä¸ªåæ ï¼å¦æ¥è¯¢æä¸ªäº§çº¿ä¸çææå·¥åºï¼ */ @Override public IPage<ProductionLine> getSubTreeByParentId(Page page, ProductionLine productionLine) { // 1. æ¥è¯¢ç¶èç¹æ¬èº« ProductionLine parentNode = productionLineMapper.selectById(productionLine.getId()); if (parentNode == null) { return null; } // 2. éå½å è½½åèç¹ loadChildren(productionLine,1); List<Long> ids = new ArrayList<>(); ids.add(productionLine.getId()); if(CollectionUtils.isNotEmpty(productionLine.getChildren())){ // éå½è·åææåèç¹çid getAllChildIds(productionLine,ids); } return productionLineMapper.selectPage(page, Wrappers.lambdaQuery(ProductionLine.class) .in(ProductionLine::getParentId, ids) .eq(ProductionLine::getType, 2)); } /** * éå½è·åææåèç¹çid */ public List<Long> getAllChildIds(ProductionLine node,List<Long> ids) { if (node.getChildren() != null) { for (ProductionLine child : node.getChildren()) { ids.add(child.getId()); ids.addAll(getAllChildIds(child,ids)); } } return ids; } } src/main/java/com/ruoyi/production/service/impl/SalesLedgerProductionAccountingServiceImpl.java
@@ -3,6 +3,7 @@ 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.common.utils.SecurityUtils; import com.ruoyi.production.dto.SalesLedgerProductionAccountingDto; import com.ruoyi.production.mapper.SalesLedgerProductionAccountingMapper; import com.ruoyi.production.pojo.SalesLedgerProductionAccounting; @@ -26,6 +27,7 @@ @Override public IPage<SalesLedgerProductionAccountingDto> listPage(Page page, SalesLedgerProductionAccountingDto salesLedgerProductionAccountingDto) { salesLedgerProductionAccountingDto.setSchedulingUserId(SecurityUtils.getLoginUser().getUser().getUserId()); IPage<SalesLedgerProductionAccountingDto> list = salesLedgerProductionAccountingMapper.listPage(page, salesLedgerProductionAccountingDto); list.getRecords().forEach(item -> { String[] split = item.getSpecificationModel().split("\\*"); src/main/java/com/ruoyi/production/service/impl/SalesLedgerSchedulingServiceImpl.java
@@ -33,6 +33,7 @@ import java.math.BigDecimal; import java.math.RoundingMode; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import java.util.ArrayList; import java.util.Arrays; @@ -57,6 +58,8 @@ @Override public IPage<SalesLedgerSchedulingDto> listPage(Page page, SalesLedgerSchedulingDto salesLedgerSchedulingDto) { salesLedgerSchedulingDto.setProductionUserId(SecurityUtils.getLoginUser().getUser().getUserId()); salesLedgerSchedulingDto.setProductionUserName(SecurityUtils.getLoginUser().getUser().getNickName()); IPage<SalesLedgerSchedulingDto> list = salesLedgerSchedulingMapper.listPage(page, salesLedgerSchedulingDto); if(list.getTotal() == 0){ return list; @@ -145,52 +148,60 @@ i++; continue; } // è·å空ä½çæº String[] split = productionDispatchAddDto.getSpeculativeTradingName().split(","); if(split != null && split.length == 0){ SysUser sysUser1 = sysUserMapper.selectUserById(productionDispatchAddDto.getProductionUserId() == null ? loginUser.getUser().getUserId() : productionDispatchAddDto.getSchedulingUserId()); if(sysUser1 == null){ i++; continue; } List<SpeculativeTradingInfo> speculativeTradingInfos = speculativeTradingInfoMapper.selectList(new LambdaQueryWrapper<SpeculativeTradingInfo>() .in(SpeculativeTradingInfo::getName, Arrays.asList(split)) .orderByAsc(SpeculativeTradingInfo::getSort)); if(CollectionUtils.isEmpty(speculativeTradingInfos)){ i++; continue; } AtomicReference<String> name = new AtomicReference<>(""); //éè¦ç»å®ççæº //éè¿è§æ ¼åå·åæäº§æ°éè®¡ç®æ¬æ¬¡ç产产é String[] split1 = productionDispatchAddDto.getSpecificationModel().split("\\*"); if(split1.length != 2){ i++; continue; } // æ¬æ¬¡ç产产é BigDecimal productionNum = new BigDecimal(split1[0]) .multiply(new BigDecimal(split1[1]).multiply(productionDispatchAddDto.getSchedulingNum())); // å¤ä¸ªçæºæ åµ if(speculativeTradingInfos.size() > 1){ for (SpeculativeTradingInfo speculativeTradingInfo : speculativeTradingInfos) { // è·åè¯¥çæºæ£å¨æäº§é BigDecimal schedulingNumBySpeculativeTradingName = getSchedulingNumBySpeculativeTradingName(speculativeTradingInfo.getName()); // å¦æè¯¥çæºæ»é(åä½kgéè¦ä¹1000) - æ£å¨æäº§é >=æ¬æ¬¡ç产产éå°±åé æ¤çæº if(speculativeTradingInfo.getWorkLoad().multiply(new BigDecimal(1000)).subtract(schedulingNumBySpeculativeTradingName).compareTo(productionNum) >= 0){ name.set(speculativeTradingInfo.getName()); break; } } }else{ // åä¸ªçæºæ åµ name.set(speculativeTradingInfos.get(0).getName()); } if(name.get().isEmpty()){ i++; continue; } // // è·å空ä½çæº // String[] split = productionDispatchAddDto.getSpeculativeTradingName().split(","); // if(split != null && split.length == 0){ // i++; // continue; // } // List<SpeculativeTradingInfo> speculativeTradingInfos = speculativeTradingInfoMapper.selectList(new LambdaQueryWrapper<SpeculativeTradingInfo>() // .in(SpeculativeTradingInfo::getName, Arrays.asList(split)) // .orderByAsc(SpeculativeTradingInfo::getSort)); // if(CollectionUtils.isEmpty(speculativeTradingInfos)){ // i++; // continue; // } // AtomicReference<String> name = new AtomicReference<>(""); //éè¦ç»å®ççæº // //éè¿è§æ ¼åå·åæäº§æ°éè®¡ç®æ¬æ¬¡ç产产é // String[] split1 = productionDispatchAddDto.getSpecificationModel().split("\\*"); // if(split1.length != 2){ // i++; // continue; // } // // æ¬æ¬¡ç产产é // BigDecimal productionNum = new BigDecimal(split1[0]) // .multiply(new BigDecimal(split1[1]).multiply(productionDispatchAddDto.getSchedulingNum())); // // å¤ä¸ªçæºæ åµ // if(speculativeTradingInfos.size() > 1){ // for (SpeculativeTradingInfo speculativeTradingInfo : speculativeTradingInfos) { // // è·åè¯¥çæºæ£å¨æäº§é // BigDecimal schedulingNumBySpeculativeTradingName = getSchedulingNumBySpeculativeTradingName(speculativeTradingInfo.getName()); // // å¦æè¯¥çæºæ»é(åä½kgéè¦ä¹1000) - æ£å¨æäº§é >=æ¬æ¬¡ç产产éå°±åé æ¤çæº // if(speculativeTradingInfo.getWorkLoad().multiply(new BigDecimal(1000)).subtract(schedulingNumBySpeculativeTradingName).compareTo(productionNum) >= 0){ // name.set(speculativeTradingInfo.getName()); // break; // } // } // }else{ // // åä¸ªçæºæ åµ // name.set(speculativeTradingInfos.get(0).getName()); // } // if(name.get().isEmpty()){ // i++; // continue; // } SalesLedgerScheduling salesLedgerScheduling = SalesLedgerScheduling.builder() .salesLedgerId(productionDispatchAddDto.getSalesLedgerId()) .salesLedgerProductId(productionDispatchAddDto.getSalesLedgerProductId()) .speculativeTradingName(name.get()) // .speculativeTradingName(name.get()) .productionUserId(sysUser1.getUserId()) .productionUserName(sysUser1.getNickName()) .productionLineId(productionDispatchAddDto.getLineId()) .schedulingUserId(sysUser.getUserId()) .schedulingUserName(sysUser.getNickName()) .schedulingNum(productionDispatchAddDto.getSchedulingNum()) @@ -281,6 +292,8 @@ @Override public IPage<SalesLedgerSchedulingProcessDto> listPageProcess(Page page, SalesLedgerSchedulingProcessDto salesLedgerSchedulingDto) { Long userId = SecurityUtils.getLoginUser().getUserId(); salesLedgerSchedulingDto.setProductionUserId(userId); IPage<SalesLedgerSchedulingProcessDto> list = salesLedgerSchedulingMapper.listPageProcess(page, salesLedgerSchedulingDto); // Set<Long> collect = list.getRecords().stream().map(SalesLedgerSchedulingProcessDto::getId).collect(Collectors.toSet()); // if(CollectionUtils.isEmpty(collect)) return list; @@ -338,6 +351,8 @@ SalesLedgerWork.SalesLedgerWorkBuilder salesLedgerWorkBuilder = SalesLedgerWork.builder() .salesLedgerSchedulingId(salesLedgerScheduling.getId()) .salesLedgerId(salesLedgerScheduling.getSalesLedgerId()) .productionUserId(salesLedgerScheduling.getProductionUserId()) .productionUserName(salesLedgerScheduling.getProductionUserName()) .remark(processSchedulingDto.getRemark()) .type(processSchedulingDto.getType()) .loss(processSchedulingDto.getLoss()) src/main/java/com/ruoyi/production/service/impl/SalesLedgerWorkServiceImpl.java
@@ -57,6 +57,7 @@ @Override public IPage<SalesLedgerWorkDto> listPage(Page page, SalesLedgerWorkDto salesLedgerWorkDto) { salesLedgerWorkDto.setProductionUserId(SecurityUtils.getLoginUser().getUserId()); IPage<SalesLedgerWorkDto> iPage = salesLedgerWorkMapper.listPage(page, salesLedgerWorkDto); List<Loss> losses = lossMapper.selectList(null); if(!CollectionUtils.isEmpty(losses)){ src/main/resources/application-trsw.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: 9129 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://172.17.0.1:3306/product-inventory-management-trsw?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 username: root password: xd@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: 172.17.0.1 # 端å£ï¼é»è®¤ä¸º6379 port: 6380 # æ°æ®åºç´¢å¼ database: 13 # å¯ç # 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: hckxTest active: dev src/main/resources/mapper/production/ProductionLineMapper.xml
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,5 @@ <?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.production.mapper.ProductionLineMapper"> </mapper> src/main/resources/mapper/production/SalesLedgerProductionAccountingMapper.xml
@@ -28,6 +28,9 @@ <if test="salesLedgerDto.schedulingUserName != null and salesLedgerDto.schedulingUserName != '' "> AND t4.scheduling_user_name LIKE CONCAT('%',#{salesLedgerDto.schedulingUserName},'%') </if> <if test="salesLedgerDto.schedulingUserId != null and salesLedgerDto.schedulingUserId != '' "> AND t4.scheduling_user_id LIKE CONCAT('%',#{salesLedgerDto.schedulingUserId},'%') </if> <if test="salesLedgerDto.customerName != null and salesLedgerDto.customerName != '' "> AND T1.customer_name LIKE CONCAT('%',#{salesLedgerDto.customerName},'%') </if> src/main/resources/mapper/production/SalesLedgerSchedulingMapper.xml
@@ -41,6 +41,9 @@ <if test="salesLedgerDto.entryDateEnd != null and salesLedgerDto.entryDateEnd != '' "> AND T1.entry_date <= DATE_FORMAT(#{salesLedgerDto.entryDateEnd},'%Y-%m-%d') </if> <if test="salesLedgerDto.productionUserId != null and salesLedgerDto.productionUserId != '' "> AND T1.entry_person = #{salesLedgerDto.productionUserId} </if> </where> GROUP BY T2.id </select> @@ -82,11 +85,16 @@ T1.customer_name, t3.product_category, t3.specification_model, t3.unit t3.unit, t4.name as productionLineName, t4.id as productionLineId, T2.production_user_name, T2.production_user_id FROM sales_ledger_scheduling T2 LEFT JOIN sales_ledger T1 ON T1.id = T2.sales_ledger_id left join sales_ledger_product t3 on T2.sales_ledger_product_id = t3.id left join production_line t4 on t4.id = T2.production_line_id <where> t3.type = 1 <if test="salesLedgerDto.status != null and salesLedgerDto.status != '' "> @@ -110,6 +118,9 @@ <if test="salesLedgerDto.entryDateEnd != null and salesLedgerDto.entryDateEnd != '' "> AND T2.scheduling_date <= DATE_FORMAT(#{salesLedgerDto.entryDateEnd},'%Y-%m-%d') </if> <if test="salesLedgerDto.productionUserId != null and salesLedgerDto.productionUserId != '' "> AND T2.production_user_id = #{salesLedgerDto.productionUserId} </if> </where> order by T2.status asc </select> src/main/resources/mapper/production/SalesLedgerWorkMapper.xml
@@ -8,6 +8,7 @@ t4.status, t4.scheduling_user_id, t4.scheduling_user_name, t4.production_user_id, t4.scheduling_date, t4.scheduling_num, t4.finished_num, @@ -34,6 +35,9 @@ <if test="salesLedgerDto.status != null and salesLedgerDto.status != '' "> AND t4.status = #{salesLedgerDto.status} </if> <if test="salesLedgerDto.productionUserId != null and salesLedgerDto.productionUserId != '' "> AND t4.production_user_id = #{salesLedgerDto.productionUserId} </if> <if test="salesLedgerDto.customerName != null and salesLedgerDto.customerName != '' "> AND T1.customer_name LIKE CONCAT('%',#{salesLedgerDto.customerName},'%') </if>