| | |
| | | !gradle/wrapper/gradle-wrapper.jar
|
| | | claude.md
|
| | | target/
|
| | | src/test/
|
| | | test/
|
| | | !.mvn/wrapper/maven-wrapper.jar
|
| | |
|
| | | ######################################################################
|
| | | # Claude Code
|
| | | .claude/
|
| | |
|
| | | # IDE
|
| | |
|
| | | ### STS ###
|
| | | .apt_generated
|
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "java.compile.nullAnalysis.mode": "disabled" |
| | | } |
| | |
| | | <getui-sdk.version>1.0.7.0</getui-sdk.version>
|
| | | <jsqlparser.version>4.9</jsqlparser.version>
|
| | | <thumbnailator.version>0.4.20</thumbnailator.version>
|
| | | <langchain4j.version>1.0.0-beta3</langchain4j.version>
|
| | |
|
| | | </properties>
|
| | |
|
| | | <dependencyManagement>
|
| | | <dependencies>
|
| | | <dependency>
|
| | | <groupId>dev.langchain4j</groupId>
|
| | | <artifactId>langchain4j-bom</artifactId>
|
| | | <version>${langchain4j.version}</version>
|
| | | <type>pom</type>
|
| | | <scope>import</scope>
|
| | | </dependency>
|
| | | <dependency>
|
| | | <groupId>dev.langchain4j</groupId>
|
| | | <artifactId>langchain4j-community-bom</artifactId>
|
| | | <version>${langchain4j.version}</version>
|
| | | <type>pom</type>
|
| | | <scope>import</scope>
|
| | | </dependency>
|
| | | </dependencies>
|
| | | </dependencyManagement>
|
| | |
|
| | |
|
| | | <dependencies>
|
| | | <!-- ruoyi-springboot2 / swagger knife4j é
ç½® -->
|
| | |
| | | <artifactId>spring-boot-starter-data-redis</artifactId>
|
| | | </dependency>
|
| | |
|
| | | <dependency>
|
| | | <groupId>org.springframework.boot</groupId>
|
| | | <artifactId>spring-boot-starter-data-mongodb</artifactId>
|
| | | </dependency>
|
| | |
|
| | |
|
| | | <!-- pool å¯¹è±¡æ± -->
|
| | | <dependency>
|
| | |
| | | <artifactId>commons-pool2</artifactId>
|
| | | </dependency>
|
| | |
|
| | | <dependency>
|
| | | <groupId>dev.langchain4j</groupId>
|
| | | <artifactId>langchain4j-spring-boot-starter</artifactId>
|
| | | </dependency>
|
| | | <dependency>
|
| | | <groupId>dev.langchain4j</groupId>
|
| | | <artifactId>langchain4j-pinecone</artifactId>
|
| | | </dependency>
|
| | |
|
| | | <dependency>
|
| | | <groupId>dev.langchain4j</groupId>
|
| | | <artifactId>langchain4j-open-ai-spring-boot-starter</artifactId>
|
| | | </dependency>
|
| | | <dependency>
|
| | | <groupId>dev.langchain4j</groupId>
|
| | | <artifactId>langchain4j-reactor</artifactId>
|
| | | </dependency>
|
| | |
|
| | | <dependency>
|
| | | <groupId>dev.langchain4j</groupId>
|
| | | <artifactId>langchain4j-ollama-spring-boot-starter</artifactId>
|
| | | </dependency>
|
| | |
|
| | | <dependency>
|
| | | <groupId>dev.langchain4j</groupId>
|
| | | <artifactId>langchain4j-community-dashscope-spring-boot-starter</artifactId>
|
| | | </dependency>
|
| | |
|
| | | <dependency>
|
| | | <groupId>dev.langchain4j</groupId>
|
| | | <artifactId>langchain4j-mcp</artifactId>
|
| | | </dependency>
|
| | |
|
| | | <!-- Mysql驱å¨å
-->
|
| | | <dependency>
|
| | |
| | |
|
| | | /**
|
| | | * å¯å¨ç¨åº
|
| | | * |
| | | *
|
| | | * @author ruoyi
|
| | | */
|
| | | @SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
|
| | | @EnableScheduling
|
| | | //@EnableScheduling
|
| | | public class RuoYiApplication
|
| | | {
|
| | | public static void main(String[] args)
|
| | |
| | | @Excel(name = "å
³èå
¥åºåå·") |
| | | private String inboundBatches; |
| | | |
| | | @Schema(description = "åè´§ç±»å") |
| | | @Excel(name = "åè´§ç±»å") |
| | | private Integer shippingType; |
| | | |
| | | @Schema(description = "å货车çå·") |
| | | @Excel(name = "å货车çå·") |
| | | private String truckPlateNo; |
| | | |
| | | @Schema(description = "å¿«éå
¬å¸") |
| | | @Excel(name = "å¿«éå
¬å¸") |
| | | private String expressCompany; |
| | | |
| | | @Schema(description = "å¿«éåå·") |
| | | @Excel(name = "å¿«éåå·") |
| | | private String expressNo; |
| | | |
| | | @Schema(description = "éè´§æ¥æ") |
| | | @Excel(name = "éè´§æ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | |
| | | package com.ruoyi.account.bean.vo.sales; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnore; |
| | | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Excel; |
| | |
| | | @Schema(description = "éå®è®¢åå·") |
| | | @Excel(name = "éå®è®¢åå·") |
| | | private String salesContractNo; |
| | | |
| | | @Schema(description = "å·²æ¶æ¬¾éé¢") |
| | | @ExcelIgnore |
| | | private BigDecimal amountReceived; |
| | | } |
| | |
| | | @Excel(name = "å
³èåè´§åå·") |
| | | private String shippingNo; |
| | | |
| | | @Schema(description = "åè´§ç±»å") |
| | | @Excel(name = "åè´§ç±»å") |
| | | private Integer shippingType; |
| | | |
| | | @Schema(description = "å货车çå·") |
| | | @Excel(name = "å货车çå·") |
| | | private String truckPlateNo; |
| | | |
| | | @Schema(description = "å¿«éå
¬å¸") |
| | | @Excel(name = "å¿«éå
¬å¸") |
| | | private String expressCompany; |
| | | |
| | | @Schema(description = "å¿«éåå·") |
| | | @Excel(name = "å¿«éåå·") |
| | | private String expressNo; |
| | | |
| | | @Schema(description = "éè´§æ¥æ") |
| | | @Excel(name = "éè´§æ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | public R<IPage<AccountInvoiceApplicationVo>> listPageAccountInvoiceApplication(Page page, AccountInvoiceApplicationDto accountInvoiceApplicationDto) { |
| | | IPage<AccountInvoiceApplicationVo> listPage = accountInvoiceApplicationService.listPageAccountInvoiceApplication(page,accountInvoiceApplicationDto); |
| | | return R.ok(listPage); |
| | | } |
| | | |
| | | @GetMapping("/getAccountInvoiceApplicationList") |
| | | @Log(title = "æ ¹æ®å®¢æ·idæ¥è¯¢å¼ç¥¨ç³è¯·å°è´¦", businessType = BusinessType.OTHER) |
| | | @Operation(summary = "è´¢å¡ç®¡ç--å¼ç¥¨ç³è¯·å°è´¦") |
| | | public R<List<AccountInvoiceApplicationVo>> getAccountInvoiceApplicationList(@RequestParam Integer customerId){ |
| | | return R.ok(accountInvoiceApplicationService.getAccountInvoiceApplicationList(customerId)); |
| | | } |
| | | |
| | | @GetMapping("/getOutboundBatchesByCustomer") |
| | |
| | | |
| | | //å¤æè¯¥åºåºè®°å½æ¯å¦æå¼ç¥¨ç³è¯· |
| | | boolean existsByStockOutRecordId(@Param("stockOutRecordIds") List<Long> stockOutRecordIds); |
| | | |
| | | List<AccountInvoiceApplicationVo> selectAccountInvoiceApplicationList(@Param("customerId") Integer customerId); |
| | | } |
| | |
| | | if (accountSubjectDto != null && accountSubjectDto.getStatus() != null) { |
| | | queryWrapper.eq(AccountSubject::getStatus, accountSubjectDto.getStatus()); |
| | | } |
| | | queryWrapper.orderByDesc(AccountSubject::getSubjectCode).orderByDesc(AccountSubject::getId); |
| | | queryWrapper.orderByAsc(AccountSubject::getSubjectCode).orderByAsc(AccountSubject::getId); |
| | | return queryWrapper; |
| | | } |
| | | |
| | |
| | | } |
| | | List<AccountSubject> sortedSubjects = new ArrayList<>(subjects); |
| | | sortedSubjects.sort(Comparator |
| | | .comparing(AccountSubject::getSubjectCode, Comparator.nullsFirst(String::compareTo)).reversed() |
| | | .thenComparing(AccountSubject::getId, Comparator.nullsFirst(Long::compareTo)).reversed()); |
| | | .comparing(AccountSubject::getSubjectCode, Comparator.nullsLast(String::compareTo)) |
| | | .thenComparing(AccountSubject::getId, Comparator.nullsLast(Long::compareTo))); |
| | | |
| | | Map<Long, AccountSubjectVo> subjectVoMap = new LinkedHashMap<>(); |
| | | for (AccountSubject subject : sortedSubjects) { |
| | |
| | | return removeBatchByIds(ids); |
| | | } |
| | | |
| | | @Override |
| | | public List<AccountInvoiceApplicationVo> getAccountInvoiceApplicationList(Integer customerId) { |
| | | return accountInvoiceApplicationMapper.selectAccountInvoiceApplicationList(customerId); |
| | | } |
| | | |
| | | private String genInvoiceApplicationNo() { |
| | | return "KP" + LocalDateTime.now().format(CODE_TIME_FORMATTER) + new Random().nextInt(10); |
| | | } |
| | |
| | | if (StringUtils.isEmpty(accountSalesCollection.getCollectionNumber())) { |
| | | accountSalesCollection.setCollectionNumber(genAccountSalesCollectionNo()); |
| | | } |
| | | // String stockOutRecordIds = accountSalesCollection.getStockOutRecordIds(); |
| | | // if (stockOutRecordIds != null && !stockOutRecordIds.isEmpty()) { |
| | | // List<Long> ids = Arrays.stream(stockOutRecordIds.split(",")) |
| | | // .map(Long::valueOf) |
| | | // .toList(); |
| | | // if (accountSalesCollectionMapper.existsByStockOutRecordId(ids)){ |
| | | // throw new ServiceException("åå¨éå¤çåºåºå"); |
| | | // } |
| | | // } |
| | | String stockOutRecordIds = accountSalesCollection.getStockOutRecordIds(); |
| | | if (stockOutRecordIds != null && !stockOutRecordIds.isEmpty()) { |
| | | List<Long> ids = Arrays.stream(stockOutRecordIds.split(",")) |
| | | .map(Long::valueOf) |
| | | .toList(); |
| | | if (accountSalesCollectionMapper.existsByStockOutRecordId(ids)){ |
| | | throw new ServiceException("åå¨éå¤çåºåºå"); |
| | | } |
| | | } |
| | | return save(accountSalesCollection); |
| | | } |
| | | |
| | |
| | | void exportAccountInvoiceApplication(HttpServletResponse response, AccountInvoiceApplicationDto accountInvoiceApplicationDto); |
| | | |
| | | boolean deleteAccountInvoiceApplication(List<Long> ids); |
| | | |
| | | List<AccountInvoiceApplicationVo> getAccountInvoiceApplicationList(Integer customerId); |
| | | } |
| | |
| | | @Excel(name = "å
³èé¨é¨") |
| | | private String deptName; |
| | | |
| | | @Schema(description = "è¯å") |
| | | @Excel(name = "è¯å") |
| | | private String rating; |
| | | |
| | | @Schema(description = "è¯ä»·å
容æè¿°") |
| | | @Excel(name = "è¯ä»·å
容æè¿°") |
| | | private String evaluation; |
| | | |
| | | } |
| | |
| | | /** |
| | | * å建æ¶é´ |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | /** |
| | |
| | | @Schema(description = "产ååå·IDs") |
| | | private String productModelIds; |
| | | |
| | | @Schema(description = "产ååå·æ°é,éå·åé") |
| | | private String productModelQuantities; |
| | | |
| | | @Schema(description = "è¯å(1-5å)") |
| | | @Excel(name = "è¯å") |
| | | private BigDecimal rating; |
| | | |
| | | @Schema(description = "è¯ä»·å
容æè¿°") |
| | | @Excel(name = "è¯ä»·å
容æè¿°") |
| | | private String evaluation; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long deptId; |
| | |
| | | import com.ruoyi.aftersalesservice.service.AfterSalesServiceService; |
| | | import com.ruoyi.common.utils.OrderUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.project.system.domain.SysDept; |
| | | import com.ruoyi.project.system.domain.SysUser; |
| | |
| | | private final SysUserMapper sysUserMapper; |
| | | private final ISalesLedgerProductService salesLedgerProductService; |
| | | private final ISalesLedgerService salesLedgerService; |
| | | private final com.ruoyi.sales.mapper.ShippingInfoMapper shippingInfoMapper; |
| | | |
| | | @Override |
| | | public IPage<AfterSalesServiceNewDto> listPage(Page page, AfterSalesServiceNewDto afterSalesService) { |
| | |
| | | if(sysUser == null) throw new RuntimeException("å®¡æ ¸äººä¸åå¨"); |
| | | afterSalesServiceNewDto.setCheckNickName(sysUser.getNickName()); |
| | | if (StringUtils.isEmpty(afterSalesServiceNewDto.getAfterSalesServiceNo())) { |
| | | String string = OrderUtils.countAfterServiceTodayByCreateTime(afterSalesServiceMapper, "SH_", afterSalesServiceNewDto.getCreateTime() != null ? afterSalesServiceNewDto.getCreateTime() : LocalDateTime.now()); |
| | | String string = OrderUtils.countAfterServiceTodayByCreateTime(afterSalesServiceMapper, "SH_"); |
| | | afterSalesServiceNewDto.setAfterSalesServiceNo(string); |
| | | } |
| | | return this.save(afterSalesServiceNewDto); |
| | |
| | | SalesLedger byId = salesLedgerService.getById(afterSalesService.getSalesLedgerId()); |
| | | List<Long> collect = Arrays.stream(afterSalesService.getProductModelIds().split(",")).map(Long::valueOf).collect(Collectors.toList()); |
| | | List<SalesLedgerProduct> list = salesLedgerProductService.list(new QueryWrapper<SalesLedgerProduct>().lambda().in(SalesLedgerProduct::getId, collect)); |
| | | |
| | | if (StringUtils.isNotEmpty(afterSalesService.getProductModelQuantities())) { |
| | | String[] quantities = afterSalesService.getProductModelQuantities().split(","); |
| | | for (int i = 0; i < collect.size(); i++) { |
| | | Long productId = collect.get(i); |
| | | for (SalesLedgerProduct product : list) { |
| | | if (product.getId().equals(productId)) { |
| | | if (i < quantities.length && StringUtils.isNotEmpty(quantities[i])) { |
| | | product.setQuantity(new java.math.BigDecimal(quantities[i])); |
| | | } |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | for (SalesLedgerProduct product : list) { |
| | | com.ruoyi.sales.pojo.ShippingInfo shippingInfo = shippingInfoMapper.selectOne( |
| | | new com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper<com.ruoyi.sales.pojo.ShippingInfo>() |
| | | .eq(com.ruoyi.sales.pojo.ShippingInfo::getSalesLedgerProductId, product.getId()) |
| | | .orderByDesc(com.ruoyi.sales.pojo.ShippingInfo::getCreateTime) |
| | | .last("limit 1") |
| | | ); |
| | | if (shippingInfo != null) { |
| | | product.setShippingCarNumber(shippingInfo.getShippingCarNumber()); |
| | | product.setShippingDate(shippingInfo.getShippingDate()); |
| | | product.setShippingStatus(shippingInfo.getStatus()); |
| | | product.setExpressCompany(shippingInfo.getExpressCompany()); |
| | | product.setExpressNumber(shippingInfo.getExpressNumber()); |
| | | } |
| | | } |
| | | |
| | | AfterSalesServiceNewDto afterSalesServiceNewDto = new AfterSalesServiceNewDto(); |
| | | BeanUtils.copyProperties(afterSalesService, afterSalesServiceNewDto); |
| | | SalesLedgerDto salesLedgerDto = new SalesLedgerDto(); |
| | |
| | | |
| | | import com.ruoyi.approve.pojo.ApproveNode; |
| | | import com.ruoyi.approve.service.IApproveNodeService; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | |
| | | * @param approveNode |
| | | * @return |
| | | */ |
| | | @Log(title = "审æ¹èç¹", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/updateApproveNode") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Operation(summary = "审æ¹èç¹") |
| | |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Log(title = "åå§å审æ¹èç¹", businessType = BusinessType.INSERT) |
| | | @PostMapping("/init") |
| | | public AjaxResult init(String id) { |
| | | approveNodeService.initApproveNodes("",id,1L); |
| | |
| | | |
| | | import com.ruoyi.approve.pojo.ApproveProcessConfigNode; |
| | | import com.ruoyi.approve.service.ApproveProcessConfigNodeService; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | |
| | | * @return |
| | | */ |
| | | @ApiOperation("æ·»å 审æ¹èç¹") |
| | | @Log(title = "å®¡æ¹æµç¨èç¹", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public R addApproveProcessConfigNodes(@RequestBody List<ApproveProcessConfigNode> approveProcessConfigNodes) { |
| | | return R.ok(approveProcessConfigNodeService.addApproveProcessConfigNodes(approveProcessConfigNodes)); |
| | |
| | | import com.ruoyi.approve.bean.vo.ApproveProcessVO; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.security.LoginUser; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.project.system.domain.SysDept; |
| | |
| | | * @param approveProcessVO |
| | | * @return |
| | | */ |
| | | @Log(title = "æ·»å 审æ¹", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Operation(summary = "æ·»å 审æ¹") |
| | |
| | | * @param approveGetAndUpdateVo |
| | | * @return |
| | | */ |
| | | @Log(title = "æ´æ°å®¡æ¹", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/update") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Operation(summary = "æ´æ°å®¡æ¹") |
| | |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @Log(title = "å é¤å®¡æ¹", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/deleteIds") |
| | | @Operation(summary = "å é¤å®¡æ¹") |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | } |
| | | |
| | | @Operation(summary = "å
¬åºç®¡ç导åº") |
| | | @Log(title = "å
¬åºç®¡ç导åº", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/exportOne") |
| | | public void exportOne(HttpServletResponse response) { |
| | | List<ApproveProcess> accountExpenses = approveProcessService.list(new LambdaQueryWrapper<ApproveProcess>() |
| | |
| | | } |
| | | |
| | | @Operation(summary = "请å管ç导åº") |
| | | @Log(title = "请å管ç导åº", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/exportTwo") |
| | | public void exportTwo(HttpServletResponse response) { |
| | | List<ApproveProcess> accountExpenses = approveProcessService.list(new LambdaQueryWrapper<ApproveProcess>() |
| | |
| | | } |
| | | |
| | | @Operation(summary = "åºå·®ç®¡ç导åº") |
| | | @Log(title = "åºå·®ç®¡ç导åº", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/exportThree") |
| | | public void exportThree(HttpServletResponse response) { |
| | | List<ApproveProcess> accountExpenses = approveProcessService.list(new LambdaQueryWrapper<ApproveProcess>() |
| | |
| | | } |
| | | |
| | | @Operation(summary = "æ¥é管ç导åº") |
| | | @Log(title = "æ¥é管ç导åº", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/exportFour") |
| | | public void exportFour(HttpServletResponse response) { |
| | | List<ApproveProcess> accountExpenses = approveProcessService.list(new LambdaQueryWrapper<ApproveProcess>() |
| | |
| | | } |
| | | |
| | | @Operation(summary = "éè´ç³è¯·å¯¼åº") |
| | | @Log(title = "éè´ç³è¯·å¯¼åº", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/exportFive") |
| | | public void exportFive(HttpServletResponse response) { |
| | | List<ApproveProcess> accountExpenses = approveProcessService.list(new LambdaQueryWrapper<ApproveProcess>() |
| | |
| | | } |
| | | |
| | | @Operation(summary = "åå审æ¹å¯¼åº") |
| | | @Log(title = "åå审æ¹å¯¼åº", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/exportZero") |
| | | public void exportZero(HttpServletResponse response) { |
| | | List<ApproveProcess> accountExpenses = approveProcessService.list(new LambdaQueryWrapper<ApproveProcess>() |
| | |
| | | } |
| | | |
| | | @Operation(summary = "å±é©ä½ä¸å®¡æ¹å¯¼åº") |
| | | @Log(title = "å±é©ä½ä¸å®¡æ¹å¯¼åº", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/exportEight") |
| | | public void exportEight(HttpServletResponse response) { |
| | | List<ApproveProcess> accountExpenses = approveProcessService.list(new LambdaQueryWrapper<ApproveProcess>() |
| | |
| | | import com.ruoyi.approve.mapper.WorkingHoursSettingMapper; |
| | | import com.ruoyi.approve.pojo.*; |
| | | import com.ruoyi.approve.service.HolidaySettingsService; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | * 墿·» |
| | | * @return |
| | | */ |
| | | @Log(title = "墿·»åæè®¾ç½®", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody HolidaySettings holidaySettings){ |
| | | return AjaxResult.success(holidaySettingsService.save(holidaySettings)); |
| | |
| | | * æ´æ° |
| | | * @return |
| | | */ |
| | | @Log(title = "æ´æ°åæè®¾ç½®", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/update") |
| | | public AjaxResult update(@RequestBody HolidaySettings holidaySettings){ |
| | | return AjaxResult.success(holidaySettingsService.updateById(holidaySettings)); |
| | |
| | | * å é¤ |
| | | * @return |
| | | */ |
| | | @Log(title = "å é¤åæè®¾ç½®", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/delete") |
| | | public AjaxResult delete(@RequestBody List<Long> ids){ |
| | | if(CollectionUtils.isEmpty(ids)) return AjaxResult.error("è¯·ä¼ å
¥è¦å é¤çID"); |
| | |
| | | * 墿·»å¹´åè§å |
| | | * @return |
| | | */ |
| | | @Log(title = "墿·»å¹´åè§å", businessType = BusinessType.INSERT) |
| | | @PostMapping("/addAnnualLeaveSetting") |
| | | public AjaxResult addAnnualLeaveSetting(@RequestBody AnnualLeaveSetting annualLeaveSetting){ |
| | | return AjaxResult.success(annualLeaveSettingMapper.insert(annualLeaveSetting)); |
| | |
| | | * æ´æ°å¹´åè§å |
| | | * @return |
| | | */ |
| | | @Log(title = "æ´æ°å¹´åè§å", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/updateAnnualLeaveSetting") |
| | | public AjaxResult updateAnnualLeaveSetting(@RequestBody AnnualLeaveSetting annualLeaveSetting){ |
| | | return AjaxResult.success(annualLeaveSettingMapper.updateById(annualLeaveSetting)); |
| | |
| | | * å é¤å¹´åè§å |
| | | * @return |
| | | */ |
| | | @Log(title = "å é¤å¹´åè§å", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/deleteAnnualLeaveSetting") |
| | | public AjaxResult deleteAnnualLeaveSetting(@RequestBody List<Long> ids){ |
| | | if(CollectionUtils.isEmpty(ids)) return AjaxResult.error("è¯·ä¼ å
¥è¦å é¤çID"); |
| | |
| | | * 墿·»å çè§å |
| | | * @return |
| | | */ |
| | | @Log(title = "墿·»å çè§å", businessType = BusinessType.INSERT) |
| | | @PostMapping("/addOvertimeSetting") |
| | | public AjaxResult addOvertimeSetting(@RequestBody OvertimeSetting overtimeSetting){ |
| | | return AjaxResult.success(overtimeSettingMapper.insert(overtimeSetting)); |
| | |
| | | * æ´æ°å çè§å |
| | | * @return |
| | | */ |
| | | @Log(title = "æ´æ°å çè§å", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/updateOvertimeSetting") |
| | | public AjaxResult updateOvertimeSetting(@RequestBody OvertimeSetting overtimeSetting){ |
| | | return AjaxResult.success(overtimeSettingMapper.updateById(overtimeSetting)); |
| | |
| | | * å é¤å çè§å |
| | | * @return |
| | | */ |
| | | @Log(title = "å é¤å çè§å", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/deleteOvertimeSetting") |
| | | public AjaxResult deleteOvertimeSetting(@RequestBody List<Long> ids){ |
| | | if(CollectionUtils.isEmpty(ids)) return AjaxResult.error("è¯·ä¼ å
¥è¦å é¤çID"); |
| | |
| | | * 墿·»çå¶è§å |
| | | * @return |
| | | */ |
| | | @Log(title = "墿·»çå¶è§å", businessType = BusinessType.INSERT) |
| | | @PostMapping("/addWorkingHoursSetting") |
| | | public AjaxResult addWorkingHoursSetting(@RequestBody WorkingHoursSetting workingHoursSetting){ |
| | | return AjaxResult.success(workingHoursSettingMapper.insert(workingHoursSetting)); |
| | |
| | | * æ´æ°çå¶è§å |
| | | * @return |
| | | */ |
| | | @Log(title = "æ´æ°çå¶è§å", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/updateWorkingHoursSetting") |
| | | public AjaxResult updateWorkingHoursSetting(@RequestBody WorkingHoursSetting workingHoursSetting){ |
| | | return AjaxResult.success(workingHoursSettingMapper.updateById(workingHoursSetting)); |
| | |
| | | * å é¤çå¶è§å |
| | | * @return |
| | | */ |
| | | @Log(title = "å é¤çå¶è§å", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/deleteWorkingHoursSetting") |
| | | public AjaxResult deleteWorkingHoursSetting(@RequestBody List<Long> ids){ |
| | | if(CollectionUtils.isEmpty(ids)) return AjaxResult.error("è¯·ä¼ å
¥è¦å é¤çID"); |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.approve.dto.KnowledgeBaseVectorVO; |
| | | import com.ruoyi.approve.pojo.KnowledgeBase; |
| | | import com.ruoyi.approve.pojo.KnowledgeBaseVector; |
| | | import com.ruoyi.approve.service.KnowledgeBaseService; |
| | | import com.ruoyi.approve.service.KnowledgeBaseVectorService; |
| | | import com.ruoyi.basic.dto.StorageAttachmentDTO; |
| | | import com.ruoyi.basic.dto.StorageBlobDTO; |
| | | import com.ruoyi.basic.pojo.StorageBlob; |
| | | import com.ruoyi.basic.service.StorageAttachmentService; |
| | | import com.ruoyi.basic.service.StorageBlobService; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | |
| | | @Tag(name = "ç¥è¯åºç®¡ç") |
| | | public class KnowledgeBaseController { |
| | | private KnowledgeBaseService knowledgeBaseService; |
| | | private KnowledgeBaseVectorService knowledgeBaseVectorService; |
| | | private StorageAttachmentService storageAttachmentService; |
| | | private StorageBlobService storageBlobService; |
| | | |
| | | /** |
| | | /**ã |
| | | * è·åå表 |
| | | * @return |
| | | */ |
| | | @GetMapping("/getList") |
| | | public AjaxResult getList(@RequestParam(defaultValue = "1") long current, |
| | | @RequestParam(defaultValue = "10") long size, KnowledgeBase knowledgeBase) { |
| | | Page page = new Page(current, size); |
| | | return AjaxResult.success(knowledgeBaseService.listpage(page, knowledgeBase)); |
| | | return AjaxResult.success(knowledgeBaseService.listpage(page,knowledgeBase)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢ç¥è¯åº |
| | | /**ã |
| | | * 墿·» |
| | | * @return |
| | | */ |
| | | @Log(title = "ç¥è¯åº", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody KnowledgeBase knowledgeBase) { |
| | | public AjaxResult add(@RequestBody KnowledgeBase knowledgeBase){ |
| | | return AjaxResult.success(knowledgeBaseService.save(knowledgeBase)); |
| | | } |
| | | |
| | | /** |
| | | * æ´æ°ç¥è¯åº |
| | | * æ´æ° |
| | | * @return |
| | | */ |
| | | @Log(title = "ç¥è¯åº", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/update") |
| | | public AjaxResult update(@RequestBody KnowledgeBase knowledgeBase) { |
| | | public AjaxResult update(@RequestBody KnowledgeBase knowledgeBase){ |
| | | return AjaxResult.success(knowledgeBaseService.updateById(knowledgeBase)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤ç¥è¯åº |
| | | * å é¤ |
| | | * @return |
| | | */ |
| | | @Log(title = "ç¥è¯åº", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/delete") |
| | | public AjaxResult delete(@RequestBody List<Long> ids) { |
| | | if (CollectionUtils.isEmpty(ids)) return AjaxResult.error("è¯·ä¼ å
¥è¦å é¤çID"); |
| | | public AjaxResult delete(@RequestBody List<Long> ids){ |
| | | if(CollectionUtils.isEmpty(ids)) return AjaxResult.error("è¯·ä¼ å
¥è¦å é¤çID"); |
| | | return AjaxResult.success(knowledgeBaseService.removeByIds(ids)); |
| | | } |
| | | |
| | | @Log(title = "ç¥è¯åº", businessType = BusinessType.EXPORT) |
| | | @Operation(summary = "ç¥è¯åºç®¡ç导åº") |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response) { |
| | |
| | | util.exportExcel(response, accountExpenses, "ç¥è¯åºç®¡ç导åº"); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢ç¥è¯åºæä»¶åéåç¶æ |
| | | */ |
| | | @GetMapping("/vector/status/{knowledgeBaseId}") |
| | | @Operation(summary = "æ¥è¯¢ç¥è¯åºæä»¶åéåç¶æ") |
| | | public AjaxResult getVectorStatus(@PathVariable Long knowledgeBaseId) { |
| | | List<KnowledgeBaseVectorVO> list = knowledgeBaseVectorService.getVectorStatusByKnowledgeBaseId(knowledgeBaseId); |
| | | return AjaxResult.success(list); |
| | | } |
| | | |
| | | /** |
| | | * éæ°åéåæä»¶ |
| | | */ |
| | | @PostMapping("/vector/reprocess/{vectorId}") |
| | | @Operation(summary = "éæ°åéåæä»¶") |
| | | public AjaxResult reprocessVector(@PathVariable Long vectorId) { |
| | | knowledgeBaseVectorService.reprocessVector(vectorId); |
| | | return AjaxResult.success("已鿰æäº¤åéåä»»å¡"); |
| | | } |
| | | |
| | | /** |
| | | * ä¿åç¥è¯åºæä»¶å
³èï¼æä»¶ä¸ä¼ åè°ç¨ï¼ |
| | | * ä¸ä¼ æµç¨ï¼ |
| | | * 1. å
è°ç¨ /common/upload ä¸ä¼ æä»¶ï¼è·å storageBlobDTOs |
| | | * 2. åè°ç¨æ¤æ¥å£å
³èæä»¶å°ç¥è¯åºå¹¶è§¦ååéå |
| | | */ |
| | | @PostMapping("/file/save") |
| | | @Operation(summary = "ä¿åç¥è¯åºæä»¶å
³è") |
| | | public AjaxResult saveKnowledgeBaseFiles(@RequestBody KnowledgeBaseFileDTO dto) { |
| | | if (dto.getKnowledgeBaseId() == null) { |
| | | return AjaxResult.error("ç¥è¯åºIDä¸è½ä¸ºç©º"); |
| | | } |
| | | if (CollectionUtils.isEmpty(dto.getStorageBlobIds())) { |
| | | return AjaxResult.error("æä»¶IDä¸è½ä¸ºç©º"); |
| | | } |
| | | |
| | | // ä¿åéä»¶å
³è |
| | | StorageAttachmentDTO attachmentDTO = new StorageAttachmentDTO(); |
| | | attachmentDTO.setRecordType("knowledge_base"); |
| | | attachmentDTO.setRecordId(dto.getKnowledgeBaseId()); |
| | | attachmentDTO.setApplication("rag_file"); |
| | | List<StorageBlobDTO> blobDTOs = new ArrayList<>(); |
| | | for (Long blobId : dto.getStorageBlobIds()) { |
| | | StorageBlobDTO blobDTO = new StorageBlobDTO(); |
| | | blobDTO.setId(blobId); |
| | | blobDTOs.add(blobDTO); |
| | | } |
| | | attachmentDTO.setStorageBlobDTOs(blobDTOs); |
| | | storageAttachmentService.saveStorageAttachment(attachmentDTO); |
| | | |
| | | // å建åéè®°å½å¹¶è§¦ååéå |
| | | for (Long blobId : dto.getStorageBlobIds()) { |
| | | StorageBlob blob = storageBlobService.getById(blobId); |
| | | if (blob != null) { |
| | | String fileName = blob.getOriginalFilename(); |
| | | String fileType = getFileExtension(fileName); |
| | | |
| | | knowledgeBaseVectorService.createVectorRecord( |
| | | dto.getKnowledgeBaseId(), |
| | | blobId, |
| | | fileName, |
| | | fileType |
| | | ); |
| | | } |
| | | } |
| | | |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | private String getFileExtension(String fileName) { |
| | | if (fileName == null || !fileName.contains(".")) { |
| | | return "unknown"; |
| | | } |
| | | return fileName.substring(fileName.lastIndexOf('.') + 1).toLowerCase(); |
| | | } |
| | | |
| | | /** |
| | | * å é¤ç¥è¯åºæä»¶ |
| | | */ |
| | | @DeleteMapping("/file/delete") |
| | | @Operation(summary = "å é¤ç¥è¯åºæä»¶") |
| | | public AjaxResult deleteKnowledgeBaseFiles(@RequestBody List<Long> vectorIds) { |
| | | if (CollectionUtils.isEmpty(vectorIds)) { |
| | | return AjaxResult.error("è¯·éæ©è¦å é¤çæä»¶"); |
| | | } |
| | | knowledgeBaseVectorService.deleteVectors(vectorIds); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | /** |
| | | * ç¥è¯åºæä»¶DTO |
| | | */ |
| | | @lombok.Data |
| | | public static class KnowledgeBaseFileDTO { |
| | | private Long knowledgeBaseId; |
| | | private List<Long> storageBlobIds; |
| | | } |
| | | } |
| | | } |
| | |
| | | import com.ruoyi.approve.pojo.NotificationManagement; |
| | | import com.ruoyi.approve.pojo.OnlineMeeting; |
| | | import com.ruoyi.approve.service.NotificationManagementService; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | * 墿·» |
| | | * @return |
| | | */ |
| | | @Log(title = "墿·»éç¥ç®¡ç", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody NotificationManagement notificationManagement){ |
| | | return AjaxResult.success(notificationManagementService.save(notificationManagement)); |
| | |
| | | * æ´æ° |
| | | * @return |
| | | */ |
| | | @Log(title = "æ´æ°éç¥ç®¡ç", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/update") |
| | | public AjaxResult update(@RequestBody NotificationManagement notificationManagement){ |
| | | return AjaxResult.success(notificationManagementService.updateById(notificationManagement)); |
| | |
| | | * å é¤ |
| | | * @return |
| | | */ |
| | | @Log(title = "å é¤éç¥ç®¡ç", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/delete") |
| | | public AjaxResult delete(@RequestBody List<Long> ids){ |
| | | if(CollectionUtils.isEmpty(ids)) return AjaxResult.error("è¯·ä¼ å
¥è¦å é¤çID"); |
| | |
| | | * @param onlineMeeting |
| | | * @return |
| | | */ |
| | | @Log(title = "æ°å¢çº¿ä¸ä¼è®®", businessType = BusinessType.INSERT) |
| | | @PostMapping("/addOnlineMeeting") |
| | | public AjaxResult addOnlineMeeting(@RequestBody OnlineMeeting onlineMeeting){ |
| | | return AjaxResult.success(onlineMeetingMapper.insert(onlineMeeting)); |
| | |
| | | *æ°å¢æä»¶å
񄧮 |
| | | * |
| | | */ |
| | | @Log(title = "æ°å¢æä»¶å
񄧮", businessType = BusinessType.INSERT) |
| | | @PostMapping("/addFileSharing") |
| | | public AjaxResult addFileSharing(@RequestBody FileSharing fileSharing){ |
| | | return AjaxResult.success(fileSharingMapper.insert(fileSharing)); |
| | |
| | | import com.ruoyi.approve.pojo.RpaProcessAutomation; |
| | | import com.ruoyi.approve.service.RpaProcessAutomationService; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | |
| | | * 墿·» |
| | | * @return |
| | | */ |
| | | @Log(title = "RPAæµç¨èªå¨å", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody RpaProcessAutomation rpaProcessAutomation){ |
| | | return AjaxResult.success(rpaProcessAutomationService.save(rpaProcessAutomation)); |
| | |
| | | * æ´æ° |
| | | * @return |
| | | */ |
| | | @Log(title = "RPAæµç¨èªå¨å", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/update") |
| | | public AjaxResult update(@RequestBody RpaProcessAutomation rpaProcessAutomation){ |
| | | return AjaxResult.success(rpaProcessAutomationService.updateById(rpaProcessAutomation)); |
| | |
| | | * å é¤ |
| | | * @return |
| | | */ |
| | | @Log(title = "RPAæµç¨èªå¨å", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/delete") |
| | | public AjaxResult delete(@RequestBody List<Long> ids){ |
| | | if(CollectionUtils.isEmpty(ids)) return AjaxResult.error("è¯·ä¼ å
¥è¦å é¤çID"); |
| | | return AjaxResult.success(rpaProcessAutomationService.removeByIds(ids)); |
| | | } |
| | | |
| | | @Log(title = "RPAæµç¨èªå¨å", businessType = BusinessType.EXPORT) |
| | | @Operation(summary = "RPAæµç¨èªå¨å导åº") |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response) { |
| | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long deptId; |
| | | |
| | | /** |
| | | * æä»¶æ°é |
| | | */ |
| | | private Integer fileCount; |
| | | |
| | | /** |
| | | * æ»åçæ°é |
| | | */ |
| | | private Integer totalChunkCount; |
| | | |
| | | /** |
| | | * ç¥è¯åºæè¿° |
| | | */ |
| | | private String description; |
| | | |
| | | } |
| | |
| | | package com.ruoyi.approve.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | |
| | | import com.ruoyi.basic.enums.RecordTypeEnum; |
| | | import com.ruoyi.basic.utils.FileUtil; |
| | | import com.ruoyi.common.enums.FileNameType; |
| | | import com.ruoyi.common.enums.StockInQualifiedRecordTypeEnum; |
| | | import com.ruoyi.common.enums.StockOutQualifiedRecordTypeEnum; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.device.mapper.DeviceRepairMapper; |
| | | import com.ruoyi.procurementrecord.utils.StockUtils; |
| | | import com.ruoyi.project.system.domain.SysUser; |
| | | import com.ruoyi.project.system.mapper.SysUserMapper; |
| | | import com.ruoyi.project.system.service.ISysNoticeService; |
| | | import com.ruoyi.sales.mapper.CommonFileMapper; |
| | | import com.ruoyi.sales.pojo.CommonFile; |
| | | import com.ruoyi.purchase.mapper.PurchaseLedgerMapper; |
| | | import com.ruoyi.purchase.pojo.PurchaseLedger; |
| | | import com.ruoyi.quality.mapper.QualityInspectMapper; |
| | | import com.ruoyi.quality.mapper.QualityInspectParamMapper; |
| | | import com.ruoyi.quality.mapper.QualityTestStandardMapper; |
| | | import com.ruoyi.quality.mapper.QualityTestStandardParamMapper; |
| | | import com.ruoyi.quality.pojo.QualityInspect; |
| | | import com.ruoyi.quality.pojo.QualityInspectParam; |
| | | import com.ruoyi.quality.pojo.QualityTestStandard; |
| | | import com.ruoyi.quality.pojo.QualityTestStandardParam; |
| | | import com.ruoyi.sales.mapper.*; |
| | | import com.ruoyi.sales.pojo.*; |
| | | import com.ruoyi.sales.service.impl.CommonFileServiceImpl; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | private final SysUserMapper sysUserMapper; |
| | | private final ISysNoticeService sysNoticeService; |
| | | private final CommonFileMapper fileMapper; |
| | | private final DeviceRepairMapper deviceRepairMapper; |
| | | private final PurchaseLedgerMapper purchaseLedgerMapper; |
| | | private final SalesQuotationMapper salesQuotationMapper; |
| | | private final ShippingInfoMapper shippingInfoMapper; |
| | | private final ShippingProductDetailMapper shippingProductDetailMapper; |
| | | private final CommonFileServiceImpl commonFileService; |
| | | private final ApproveBusinessStatusService approveBusinessStatusService; |
| | | private final StockUtils stockUtils; |
| | | private final SalesLedgerProductMapper salesLedgerProductMapper; |
| | | private final QualityInspectMapper qualityInspectMapper; |
| | | private final QualityTestStandardMapper qualityTestStandardMapper; |
| | | private final QualityTestStandardParamMapper qualityTestStandardParamMapper; |
| | | private final QualityInspectParamMapper qualityInspectParamMapper; |
| | | private final FileUtil fileUtil; |
| | | |
| | | |
| | |
| | | } |
| | | approveProcessMapper.updateById(approveProcess); |
| | | |
| | | approveBusinessStatusService.syncBusinessStatus(approveProcess.getApproveType(), approveProcess.getApproveReason(), status); |
| | | //éè´å®¡æ ¸ |
| | | if (approveProcess.getApproveType().equals(5)) { |
| | | PurchaseLedger purchaseLedger = purchaseLedgerMapper.selectOne(new LambdaQueryWrapper<PurchaseLedger>() |
| | | .eq(PurchaseLedger::getPurchaseContractNumber, approveProcess.getApproveReason()) |
| | | .last("limit 1")); |
| | | if (purchaseLedger != null) { |
| | | if (status.equals(2)) { |
| | | // åæ |
| | | purchaseLedger.setApprovalStatus(3); |
| | | List<SalesLedgerProduct> salesLedgerProducts = salesLedgerProductMapper.selectList(new QueryWrapper<SalesLedgerProduct>() |
| | | .lambda().eq(SalesLedgerProduct::getSalesLedgerId, purchaseLedger.getId()).eq(SalesLedgerProduct::getType, 2)); |
| | | for (SalesLedgerProduct salesLedgerProduct : salesLedgerProducts) { |
| | | // è´¨æ£ |
| | | if (salesLedgerProduct.getIsChecked()) { |
| | | addQualityInspect(purchaseLedger, salesLedgerProduct); |
| | | } else { |
| | | //ç´æ¥å
¥åº |
| | | stockUtils.addStockWithBatchNo(salesLedgerProduct.getProductModelId(), salesLedgerProduct.getQuantity(), StockInQualifiedRecordTypeEnum.PURCHASE_STOCK_IN.getCode(), purchaseLedger.getId(), purchaseLedger.getPurchaseContractNumber() + "-" + salesLedgerProduct.getId()); |
| | | } |
| | | } |
| | | } else if (status.equals(3)) { |
| | | // æç» |
| | | purchaseLedger.setApprovalStatus(4); |
| | | } else if (status.equals(1)) { |
| | | // å®¡æ ¸ä¸ |
| | | purchaseLedger.setApprovalStatus(2); |
| | | } |
| | | purchaseLedgerMapper.updateById(purchaseLedger); |
| | | } |
| | | } |
| | | // é宿¥ä»·ç¶æä¿®æ¹ |
| | | if (approveProcess.getApproveType().equals(6)) { |
| | | SalesQuotation salesQuote = salesQuotationMapper.selectOne(new LambdaQueryWrapper<SalesQuotation>() |
| | | .eq(SalesQuotation::getQuotationNo, approveProcess.getApproveReason()) |
| | | .last("limit 1")); |
| | | // åæ |
| | | if (status.equals(2) && salesQuote != null) { |
| | | salesQuote.setStatus("éè¿"); |
| | | } else if (status.equals(3) && salesQuote != null) { |
| | | salesQuote.setStatus("æç»"); |
| | | } else if (status.equals(1) && salesQuote != null) { |
| | | salesQuote.setStatus("å®¡æ ¸ä¸"); |
| | | } |
| | | salesQuotationMapper.updateById(salesQuote); |
| | | } |
| | | // åºåºå®¡æ¹ä¿®æ¹=åè´§å®¡æ¹ |
| | | if (approveProcess.getApproveType().equals(7)) { |
| | | ShippingInfo shippingInfo = shippingInfoMapper.selectOne(new LambdaQueryWrapper<ShippingInfo>() |
| | | .eq(ShippingInfo::getShippingNo, approveProcess.getApproveReason()) |
| | | .orderByDesc(ShippingInfo::getCreateTime) |
| | | .last("limit 1")); |
| | | if (shippingInfo != null) { |
| | | if (status.equals(2)) { |
| | | shippingInfo.setStatus("å®¡æ ¸éè¿"); |
| | | shippingInfo.setShippingDate(new Date()); |
| | | //æ´æ¹åºåºå®¡æ ¸ç¶æï¼å¾
ç¡®è®¤æ¹æå¾
å®¡æ ¸ï¼ |
| | | //stockUtils.shipmentStatus(StockOutQualifiedRecordTypeEnum.SALE_SHIP_STOCK_OUT.getCode(), shippingInfo.getId()); |
| | | } else if (status.equals(3)) { |
| | | //å é¤åæ¬ï¼å¾
确认ï¼çåºåºå®¡æ ¸ç¶æ |
| | | //stockUtils.deleteStockOutRecord(shippingInfo.getId(), StockOutQualifiedRecordTypeEnum.SALE_SHIP_STOCK_OUT.getCode()); |
| | | //shippingInfo.setStatus("å®¡æ ¸æç»"); |
| | | } else if (status.equals(1)) { |
| | | //shippingInfo.setStatus("å®¡æ ¸ä¸"); |
| | | } |
| | | shippingInfoMapper.updateById(shippingInfo); |
| | | } |
| | | |
| | | } |
| | | fileUtil.saveStorageAttachment(ApplicationTypeEnum.FILE, RecordTypeEnum.APPROVE_NODE, approveNode.getId(), approveNode.getStorageBlobDTOS()); |
| | | } |
| | | |
| | |
| | | return null; |
| | | } |
| | | |
| | | private void addQualityInspect(PurchaseLedger purchaseLedger, SalesLedgerProduct saleProduct) { |
| | | QualityInspect qualityInspect = new QualityInspect(); |
| | | qualityInspect.setInspectType(0); |
| | | qualityInspect.setSupplier(purchaseLedger.getSupplierName()); |
| | | qualityInspect.setPurchaseLedgerId(purchaseLedger.getId()); |
| | | qualityInspect.setProductId(saleProduct.getProductId()); |
| | | qualityInspect.setProductName(saleProduct.getProductCategory()); |
| | | qualityInspect.setModel(saleProduct.getSpecificationModel()); |
| | | qualityInspect.setProductModelId(saleProduct.getProductModelId()); |
| | | qualityInspect.setUnit(saleProduct.getUnit()); |
| | | qualityInspect.setQuantity(saleProduct.getQuantity()); |
| | | qualityInspectMapper.insert(qualityInspect); |
| | | List<QualityTestStandard> qualityTestStandard = qualityTestStandardMapper.getQualityTestStandardByProductId(saleProduct.getProductId(), 0, null); |
| | | if (qualityTestStandard.size() > 0) { |
| | | qualityInspect.setTestStandardId(qualityTestStandard.get(0).getId()); |
| | | qualityInspectMapper.updateById(qualityInspect); |
| | | qualityTestStandardParamMapper.selectList(Wrappers.<QualityTestStandardParam>lambdaQuery() |
| | | .eq(QualityTestStandardParam::getTestStandardId, qualityTestStandard.get(0).getId())) |
| | | .forEach(qualityTestStandardParam -> { |
| | | QualityInspectParam param = new QualityInspectParam(); |
| | | com.ruoyi.common.utils.bean.BeanUtils.copyProperties(qualityTestStandardParam, param); |
| | | param.setId(null); |
| | | param.setInspectId(qualityInspect.getId()); |
| | | qualityInspectParamMapper.insert(param); |
| | | }); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | package com.ruoyi.approve.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | |
| | | import com.ruoyi.basic.enums.RecordTypeEnum; |
| | | import com.ruoyi.basic.utils.FileUtil; |
| | | import com.ruoyi.common.enums.FileNameType; |
| | | import com.ruoyi.common.enums.StockInQualifiedRecordTypeEnum; |
| | | import com.ruoyi.common.utils.AmountUtils; |
| | | import com.ruoyi.common.utils.OrderUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.procurementrecord.utils.StockUtils; |
| | | import com.ruoyi.project.system.domain.SysDept; |
| | | import com.ruoyi.project.system.domain.SysNotice; |
| | | import com.ruoyi.project.system.domain.SysUser; |
| | |
| | | import com.ruoyi.purchase.mapper.PurchaseLedgerMapper; |
| | | import com.ruoyi.purchase.pojo.PurchaseLedger; |
| | | import com.ruoyi.sales.mapper.CommonFileMapper; |
| | | import com.ruoyi.sales.mapper.SalesLedgerProductMapper; |
| | | import com.ruoyi.sales.mapper.ShippingInfoMapper; |
| | | import com.ruoyi.sales.pojo.CommonFile; |
| | | import com.ruoyi.sales.pojo.SalesLedgerProduct; |
| | | import com.ruoyi.sales.pojo.ShippingInfo; |
| | | import com.ruoyi.sales.service.impl.CommonFileServiceImpl; |
| | | import lombok.RequiredArgsConstructor; |
| | |
| | | import java.io.IOException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class ApproveProcessServiceImpl extends ServiceImpl<ApproveProcessMapper, ApproveProcess> implements IApproveProcessService { |
| | | private static final DateTimeFormatter DATE_FORMAT = DateTimeFormatter.ofPattern("yyyyMMdd"); |
| | | |
| | | private final SysDeptMapper sysDeptMapper; |
| | | private final IApproveNodeService approveNodeService; |
| | | private final SysUserMapper sysUserMapper; |
| | |
| | | private final CommonFileServiceImpl commonFileService; |
| | | private final ISysNoticeService sysNoticeService; |
| | | private final PurchaseLedgerMapper purchaseLedgerMapper; |
| | | private final SalesLedgerProductMapper salesLedgerProductMapper; |
| | | private final StockUtils stockUtils; |
| | | private final ShippingInfoMapper shippingInfoMapper; |
| | | private final ApproveNodeMapper approveNodeMapper; |
| | | private final ApproveProcessConfigNodeService approveProcessConfigNodeService; |
| | | private final ApproveBusinessStatusService approveBusinessStatusService; |
| | | private final FileUtil fileUtil; |
| | | private final ApproveProcessConfigNodeMapper approveProcessConfigNodeMapper; |
| | | |
| | |
| | | public void addApprove(ApproveProcessVO approveProcessVO) throws Exception { |
| | | SysUser sysUser = SecurityUtils.getLoginUser().getUser(); |
| | | SysDept sysDept = sysDeptMapper.selectDeptById(SecurityUtils.getLoginUser().getCurrentDeptId()); |
| | | if (sysDept == null) throw new RuntimeException("é¨é¨ä¸åå¨"); |
| | | if (sysUser == null) throw new RuntimeException("ç³è¯·äººä¸åå¨"); |
| | | |
| | | List<ApproveProcessConfigNodeVo> list = Optional.ofNullable(approveProcessConfigNodeService.listNode(approveProcessVO.getApproveType())) |
| | | .orElse(Collections.emptyList()); |
| | | List<ApproveProcessConfigNodeVo> list = approveProcessConfigNodeService.listNode(approveProcessVO.getApproveType()); |
| | | List<Long> nodeIds = list.stream() |
| | | .map(ApproveProcessConfigNodeVo::getApproverId) |
| | | .filter(Objects::nonNull) |
| | | .collect(Collectors.toList()); |
| | | |
| | | // 审æ¹é
ç½®æ²¡æææå®¡æ ¸äººæ¶ï¼ä¸æ°å¢ååå®¡æ¹æµç¨ï¼ç´æ¥æ§è¡ä¸å¡å®¡æ ¸éè¿é»è¾ã |
| | | // æ å®¡æ ¸äººé»è¾æ·»å |
| | | if (CollectionUtils.isEmpty(nodeIds)) { |
| | | approveBusinessStatusService.syncBusinessStatus(approveProcessVO.getApproveType(), approveProcessVO.getApproveReason(), 2); |
| | | autoPassPurchaseApproveIfNoApprover(approveProcessVO); // éè´åæ å®¡æ ¸äººé»è¾ |
| | | return; |
| | | } |
| | | |
| | | List<SysUser> sysUsers = sysUserMapper.selectUserByIds(nodeIds); |
| | | if (CollectionUtils.isEmpty(sysUsers)) throw new RuntimeException("å®¡æ ¸ç¨æ·ä¸åå¨"); |
| | | |
| | | // æå®¡æ ¸äººæ¶ï¼ææ£å¸¸ååå®¡æ¹æµç¨å建审æ¹ä¸»è¡¨ã审æ¹èç¹å¹¶éç¥é¦ä¸ªå®¡æ ¸äººã |
| | | ApproveProcess approveProcess = buildApproveProcess(approveProcessVO, sysUser, sysDept, nodeIds, sysUsers, 0); |
| | | markResubmitted(approveProcessVO); |
| | | if (sysDept == null) throw new RuntimeException("é¨é¨ä¸åå¨"); |
| | | if (sysUser == null) throw new RuntimeException("ç³è¯·äººä¸åå¨"); |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); |
| | | ApproveProcess approveProcess = new ApproveProcess(); |
| | | String no = OrderUtils.countTodayByCreateTime(approveProcessMapper, "", "approve_id"); |
| | | approveProcess.setApproveId(no); |
| | | approveProcess.setApproveUser(sysUser.getUserId()); |
| | | approveProcess.setApproveUserName(sysUser.getNickName()); |
| | | approveProcess.setApproveDeptId(sysDept.getDeptId()); |
| | | approveProcess.setApproveUserIds(nodeIds.stream().map(String::valueOf).collect(Collectors.joining(","))); |
| | | approveProcess.setApproveDeptName(sysDept.getDeptName()); |
| | | approveProcess.setApproveUserNames(sysUsers.stream().map(SysUser::getNickName).collect(Collectors.joining(","))); |
| | | approveProcess.setApproveTime(StringUtils.isEmpty(approveProcessVO.getApproveTime()) ? new Date() : dateFormat.parse(approveProcessVO.getApproveTime())); |
| | | approveProcess.setApproveReason(approveProcessVO.getApproveReason()); |
| | | approveProcess.setDeviceRepairId(approveProcessVO.getDeviceRepairId()); |
| | | approveProcess.setMaintenancePrice(AmountUtils.scaleAmount(approveProcessVO.getMaintenancePrice())); |
| | | approveProcess.setPrice(AmountUtils.scaleAmount(approveProcessVO.getPrice())); |
| | | approveProcess.setStartDate(approveProcessVO.getStartDate()); |
| | | approveProcess.setEndDate(approveProcessVO.getEndDate()); |
| | | approveProcess.setStartDateTime(approveProcessVO.getStartDateTime()); |
| | | approveProcess.setEndDateTime(approveProcessVO.getEndDateTime()); |
| | | approveProcess.setApproveStatus(0); |
| | | approveProcess.setApproveDelete(0); |
| | | approveProcess.setApproveType(approveProcessVO.getApproveType()); |
| | | approveProcess.setCreateTime(LocalDateTime.now()); |
| | | approveProcess.setTenantId(approveProcessVO.getApproveDeptId()); |
| | | approveProcess.setApproveUserCurrentId(nodeIds.get(0)); |
| | | approveProcess.setApproveUserCurrentName(sysUsers |
| | | .stream() |
| | | .filter(SysUser -> SysUser.getUserId().equals(nodeIds.get(0))) |
| | | .collect(Collectors.toList()) |
| | | .get(0) |
| | | .getNickName()); |
| | | // è®¾ç½®ç¶æä¸ºéæ°æäº¤ |
| | | if (approveProcessVO.getId() != null) { |
| | | ApproveProcess approveProcess1 = approveProcessMapper.selectById(approveProcessVO.getId()); |
| | | approveProcess1.setApproveStatus(4); |
| | | approveProcessMapper.updateById(approveProcess1); |
| | | } |
| | | save(approveProcess); |
| | | //åå§å审æ¹èç¹ |
| | | String nodeIdStr = nodeIds.stream() |
| | | .map(String::valueOf) |
| | | .collect(Collectors.joining(",")); |
| | | approveNodeService.initApproveNodes(nodeIdStr, approveProcess.getApproveId(), approveProcessVO.getApproveDeptId()); |
| | | approveNodeService.initApproveNodes(nodeIdStr, no, approveProcessVO.getApproveDeptId()); |
| | | // éä»¶ç»å® |
| | | fileUtil.saveStorageAttachment(ApplicationTypeEnum.FILE, RecordTypeEnum.APPROVE_PROCESS, approveProcess.getId(), approveProcessVO.getStorageBlobDTOS()); |
| | | /*æ¶æ¯éç¥*/ |
| | |
| | | } |
| | | } |
| | | |
| | | private ApproveProcess buildApproveProcess(ApproveProcessVO approveProcessVO, SysUser sysUser, SysDept sysDept, |
| | | List<Long> nodeIds, List<SysUser> sysUsers, Integer approveStatus) throws Exception { |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); |
| | | ApproveProcess approveProcess = new ApproveProcess(); |
| | | String no = OrderUtils.countTodayByCreateTime(approveProcessMapper, "", "approve_id", approveProcess.getCreateTime() != null ? approveProcess.getCreateTime() : LocalDateTime.now()); |
| | | approveProcess.setApproveId(no); |
| | | approveProcess.setApproveUser(sysUser.getUserId()); |
| | | approveProcess.setApproveUserName(sysUser.getNickName()); |
| | | approveProcess.setApproveDeptId(sysDept.getDeptId()); |
| | | approveProcess.setApproveDeptName(sysDept.getDeptName()); |
| | | approveProcess.setApproveUserIds(nodeIds.stream().map(String::valueOf).collect(Collectors.joining(","))); |
| | | approveProcess.setApproveUserNames(sysUsers.stream().map(SysUser::getNickName).collect(Collectors.joining(","))); |
| | | approveProcess.setApproveTime(StringUtils.isEmpty(approveProcessVO.getApproveTime()) ? new Date() : dateFormat.parse(approveProcessVO.getApproveTime())); |
| | | approveProcess.setApproveReason(approveProcessVO.getApproveReason()); |
| | | approveProcess.setDeviceRepairId(approveProcessVO.getDeviceRepairId()); |
| | | approveProcess.setMaintenancePrice(approveProcessVO.getMaintenancePrice()); |
| | | approveProcess.setPrice(approveProcessVO.getPrice()); |
| | | approveProcess.setStartDate(approveProcessVO.getStartDate()); |
| | | approveProcess.setEndDate(approveProcessVO.getEndDate()); |
| | | approveProcess.setStartDateTime(approveProcessVO.getStartDateTime()); |
| | | approveProcess.setEndDateTime(approveProcessVO.getEndDateTime()); |
| | | approveProcess.setApproveStatus(approveStatus); |
| | | approveProcess.setApproveDelete(0); |
| | | approveProcess.setApproveType(approveProcessVO.getApproveType()); |
| | | approveProcess.setCreateTime(LocalDateTime.now()); |
| | | approveProcess.setTenantId(approveProcessVO.getApproveDeptId()); |
| | | if (!CollectionUtils.isEmpty(nodeIds)) { |
| | | SysUser currentUser = sysUsers.stream() |
| | | .filter(user -> user.getUserId().equals(nodeIds.get(0))) |
| | | .findFirst() |
| | | .orElseThrow(() -> new RuntimeException("å®¡æ ¸ç¨æ·ä¸åå¨")); |
| | | approveProcess.setApproveUserCurrentId(currentUser.getUserId()); |
| | | approveProcess.setApproveUserCurrentName(currentUser.getNickName()); |
| | | private void autoPassPurchaseApproveIfNoApprover(ApproveProcessVO approveProcessVO) { |
| | | if (!Objects.equals(approveProcessVO.getApproveType(), 5) |
| | | || !StringUtils.hasText(approveProcessVO.getApproveReason())) { |
| | | throw new RuntimeException("å®¡æ ¸ç¨æ·ä¸åå¨"); |
| | | } |
| | | if (approveStatus.equals(2) || approveStatus.equals(3) || approveStatus.equals(4)) { |
| | | approveProcess.setApproveOverTime(new Date()); |
| | | } |
| | | return approveProcess; |
| | | } |
| | | |
| | | private void markResubmitted(ApproveProcessVO approveProcessVO) { |
| | | if (approveProcessVO.getId() == null) { |
| | | return; |
| | | purchaseLedgerMapper.update(null, new LambdaUpdateWrapper<PurchaseLedger>() |
| | | .eq(PurchaseLedger::getPurchaseContractNumber, approveProcessVO.getApproveReason()) |
| | | .set(PurchaseLedger::getApprovalStatus, 3)); |
| | | //éè´å
¥åº |
| | | PurchaseLedger purchaseLedger = purchaseLedgerMapper.selectOne(new LambdaQueryWrapper<PurchaseLedger>() |
| | | .eq(PurchaseLedger::getPurchaseContractNumber, approveProcessVO.getApproveReason()) |
| | | .last("limit 1")); |
| | | List<SalesLedgerProduct> salesLedgerProducts = salesLedgerProductMapper.selectList(new QueryWrapper<SalesLedgerProduct>() |
| | | .lambda().eq(SalesLedgerProduct::getSalesLedgerId, purchaseLedger.getId()).eq(SalesLedgerProduct::getType, 2)); |
| | | for (SalesLedgerProduct salesLedgerProduct : salesLedgerProducts) { |
| | | stockUtils.addStockWithBatchNo(salesLedgerProduct.getProductModelId(), salesLedgerProduct.getQuantity(), StockInQualifiedRecordTypeEnum.PURCHASE_STOCK_IN.getCode(), purchaseLedger.getId(),purchaseLedger.getPurchaseContractNumber()+"-"+salesLedgerProduct.getId()); |
| | | } |
| | | ApproveProcess approveProcess = approveProcessMapper.selectById(approveProcessVO.getId()); |
| | | if (approveProcess == null) { |
| | | return; |
| | | } |
| | | approveProcess.setApproveStatus(4); |
| | | approveProcessMapper.updateById(approveProcess); |
| | | } |
| | | |
| | | @Override |
| | |
| | | package com.ruoyi.approve.utils; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.ruoyi.approve.pojo.ApprovalInstance; |
| | | import com.ruoyi.approve.pojo.ApprovalInstanceNode; |
| | | import com.ruoyi.approve.pojo.ApprovalRecord; |
| | | import com.ruoyi.approve.pojo.ApprovalTask; |
| | | import com.ruoyi.approve.pojo.ApprovalTemplateNode; |
| | | import com.ruoyi.approve.pojo.ApprovalTemplateNodeApprover; |
| | | import com.ruoyi.approve.service.ApprovalInstanceNodeService; |
| | | import com.ruoyi.approve.service.ApprovalRecordService; |
| | | import com.ruoyi.approve.service.ApprovalTaskService; |
| | | import com.ruoyi.approve.service.ApprovalTemplateNodeApproverService; |
| | | import com.ruoyi.approve.service.ApprovalTemplateNodeService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * å®¡æ¹æµç¨èç¹å·¥å
·ç±» |
| | | */ |
| | | @Component |
| | | @RequiredArgsConstructor |
| | | public class ApproveProcessConfigNodeUtils { |
| | | |
| | | private final ApprovalInstanceNodeService instanceNodeService; |
| | | private final ApprovalTaskService approvalTaskService; |
| | | private final ApprovalRecordService approvalRecordService; |
| | | private final ApprovalTemplateNodeService approvalTemplateNodeService; |
| | | private final ApprovalTemplateNodeApproverService approvalTemplateNodeApproverService; |
| | | |
| | | /** |
| | | * æå½åå±çº§å建审æ¹èç¹å审æ¹ä»»å¡ã |
| | | * 该éè½½ä¼åæ¶åå
¥ä¸æ¡å起审æ¹è®°å½ã |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public ApprovalInstanceNode createCurrentNodeAndTasks(ApprovalInstance instance) { |
| | | return createCurrentNodeAndTasks(instance, true); |
| | | } |
| | | |
| | | /** |
| | | * æå½åå±çº§å建审æ¹èç¹å审æ¹ä»»å¡ã |
| | | * |
| | | * @param instance 审æ¹å®ä¾ |
| | | * @param createSubmitRecord æ¯å¦å建å起审æ¹è®°å½ |
| | | * @return å建åºçå½åèç¹å®ä¾ |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public ApprovalInstanceNode createCurrentNodeAndTasks(ApprovalInstance instance, boolean createSubmitRecord) { |
| | | if (instance == null || instance.getId() == null) { |
| | | throw new RuntimeException("审æ¹å®ä¾ä¸è½ä¸ºç©º"); |
| | | } |
| | | if (instance.getTemplateId() == null) { |
| | | throw new RuntimeException("å®¡æ¹æ¨¡æ¿ä¸è½ä¸ºç©º"); |
| | | } |
| | | |
| | | Integer currentLevel = instance.getCurrentLevel() == null ? 1 : instance.getCurrentLevel(); |
| | | |
| | | ApprovalInstanceNode existsNode = instanceNodeService.getOne( |
| | | new LambdaQueryWrapper<ApprovalInstanceNode>() |
| | | .eq(ApprovalInstanceNode::getInstanceId, instance.getId()) |
| | | .eq(ApprovalInstanceNode::getLevelNo, currentLevel) |
| | | .eq(ApprovalInstanceNode::getDeleted, 0) |
| | | .last("LIMIT 1") |
| | | ); |
| | | if (existsNode != null) { |
| | | return existsNode; |
| | | } |
| | | |
| | | ApprovalTemplateNode templateNode = approvalTemplateNodeService.getOne( |
| | | new LambdaQueryWrapper<ApprovalTemplateNode>() |
| | | .eq(ApprovalTemplateNode::getTemplateId, instance.getTemplateId()) |
| | | .eq(ApprovalTemplateNode::getLevelNo, currentLevel) |
| | | .orderByAsc(ApprovalTemplateNode::getId) |
| | | .last("LIMIT 1") |
| | | ); |
| | | if (templateNode == null) { |
| | | throw new RuntimeException("æªæ¾å°å½åå±çº§å¯¹åºçå®¡æ¹æ¨¡æ¿èç¹"); |
| | | } |
| | | |
| | | List<ApprovalTemplateNodeApprover> approvers = approvalTemplateNodeApproverService.list( |
| | | new LambdaQueryWrapper<ApprovalTemplateNodeApprover>() |
| | | .eq(ApprovalTemplateNodeApprover::getTemplateId, instance.getTemplateId()) |
| | | .eq(ApprovalTemplateNodeApprover::getNodeId, templateNode.getId()) |
| | | .eq(ApprovalTemplateNodeApprover::getDeleted, 0L) |
| | | .orderByAsc(ApprovalTemplateNodeApprover::getSortNo) |
| | | ); |
| | | if (approvers == null || approvers.isEmpty()) { |
| | | throw new RuntimeException("å½å审æ¹èç¹æªé
置审æ¹äºº"); |
| | | } |
| | | |
| | | ApprovalInstanceNode instanceNode = new ApprovalInstanceNode(); |
| | | instanceNode.setInstanceId(instance.getId()); |
| | | instanceNode.setLevelNo(templateNode.getLevelNo()); |
| | | instanceNode.setApproveType(templateNode.getApproveType()); |
| | | instanceNode.setStatus("PENDING"); |
| | | instanceNode.setStartTime(LocalDateTime.now()); |
| | | instanceNode.setDeleted((byte) 0); |
| | | instanceNodeService.save(instanceNode); |
| | | |
| | | List<ApprovalTask> taskList = new ArrayList<>(approvers.size()); |
| | | for (ApprovalTemplateNodeApprover approver : approvers) { |
| | | ApprovalTask task = new ApprovalTask(); |
| | | task.setInstanceId(instance.getId()); |
| | | task.setNodeId(instanceNode.getId()); |
| | | task.setLevelNo(instanceNode.getLevelNo()); |
| | | task.setApproverId(approver.getApproverId()); |
| | | task.setApproverName(approver.getApproverName()); |
| | | task.setTaskStatus("PENDING"); |
| | | task.setIsRead((byte) 0); |
| | | task.setDeleted((byte) 0); |
| | | taskList.add(task); |
| | | } |
| | | approvalTaskService.saveBatch(taskList); |
| | | |
| | | if (createSubmitRecord) { |
| | | ApprovalRecord record = new ApprovalRecord(); |
| | | record.setInstanceId(instance.getId()); |
| | | record.setNodeId(instanceNode.getId()); |
| | | record.setOperatorId(instance.getApplicantId()); |
| | | record.setOperatorName(instance.getApplicantName()); |
| | | record.setAction("SUBMIT"); |
| | | record.setComment("å起审æ¹"); |
| | | record.setDeleted((byte) 0); |
| | | approvalRecordService.save(record); |
| | | } |
| | | |
| | | return instanceNode; |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢å½åå¾
å¤çèç¹ã |
| | | */ |
| | | public ApprovalInstanceNode getCurrentNode(Long instanceId) { |
| | | if (instanceId == null) { |
| | | return null; |
| | | } |
| | | |
| | | return instanceNodeService.getOne( |
| | | new LambdaQueryWrapper<ApprovalInstanceNode>() |
| | | .eq(ApprovalInstanceNode::getInstanceId, instanceId) |
| | | .eq(ApprovalInstanceNode::getStatus, "PENDING") |
| | | .eq(ApprovalInstanceNode::getDeleted, 0) |
| | | .orderByAsc(ApprovalInstanceNode::getLevelNo) |
| | | .last("LIMIT 1") |
| | | ); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢å½å审æ¹å±çº§ã |
| | | */ |
| | | public Integer getCurrentLevel(Long instanceId) { |
| | | ApprovalInstanceNode currentNode = getCurrentNode(instanceId); |
| | | return currentNode != null ? currentNode.getLevelNo() : null; |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢å½åèç¹ä¸çå¾
审æ¹ä»»å¡ã |
| | | */ |
| | | public List<ApprovalTask> getCurrentPendingTasks(Long instanceId) { |
| | | if (instanceId == null) { |
| | | return List.of(); |
| | | } |
| | | |
| | | ApprovalInstanceNode currentNode = getCurrentNode(instanceId); |
| | | if (currentNode == null) { |
| | | return List.of(); |
| | | } |
| | | |
| | | return approvalTaskService.list( |
| | | new LambdaQueryWrapper<ApprovalTask>() |
| | | .eq(ApprovalTask::getInstanceId, instanceId) |
| | | .eq(ApprovalTask::getNodeId, currentNode.getId()) |
| | | .eq(ApprovalTask::getTaskStatus, "PENDING") |
| | | .eq(ApprovalTask::getDeleted, 0) |
| | | .orderByAsc(ApprovalTask::getLevelNo) |
| | | ); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢å½åç¨æ·å¨å½åèç¹ä¸çå¾
审æ¹ä»»å¡ã |
| | | */ |
| | | public ApprovalTask getCurrentUserTask(Long instanceId, Long userId) { |
| | | if (instanceId == null || userId == null) { |
| | | return null; |
| | | } |
| | | |
| | | ApprovalInstanceNode currentNode = getCurrentNode(instanceId); |
| | | if (currentNode == null) { |
| | | return null; |
| | | } |
| | | |
| | | return approvalTaskService.getOne( |
| | | new LambdaQueryWrapper<ApprovalTask>() |
| | | .eq(ApprovalTask::getInstanceId, instanceId) |
| | | .eq(ApprovalTask::getNodeId, currentNode.getId()) |
| | | .eq(ApprovalTask::getApproverId, userId) |
| | | .eq(ApprovalTask::getTaskStatus, "PENDING") |
| | | .eq(ApprovalTask::getDeleted, 0) |
| | | .last("LIMIT 1") |
| | | ); |
| | | } |
| | | |
| | | /** |
| | | * 夿å½åç¨æ·æ¯å¦æ¯å½å审æ¹äººã |
| | | */ |
| | | public boolean isCurrentApprover(Long instanceId, Long userId) { |
| | | return getCurrentUserTask(instanceId, userId) != null; |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢å½åèç¹ç审æ¹äºº ID å表ã |
| | | */ |
| | | public List<Long> getCurrentNodeApproverIds(Long instanceId) { |
| | | return getCurrentPendingTasks(instanceId).stream() |
| | | .map(ApprovalTask::getApproverId) |
| | | .distinct() |
| | | .collect(Collectors.toList()); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢å½åèç¹å©ä½å¾
审æ¹äººæ°ã |
| | | */ |
| | | public int getRemainingApproverCount(Long instanceId) { |
| | | return getCurrentPendingTasks(instanceId).size(); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢å½åèç¹å·²åæäººæ°ã |
| | | */ |
| | | public int getApprovedCount(Long instanceId) { |
| | | if (instanceId == null) { |
| | | return 0; |
| | | } |
| | | |
| | | ApprovalInstanceNode currentNode = getCurrentNode(instanceId); |
| | | if (currentNode == null) { |
| | | return 0; |
| | | } |
| | | |
| | | return Math.toIntExact(approvalTaskService.count( |
| | | new LambdaQueryWrapper<ApprovalTask>() |
| | | .eq(ApprovalTask::getInstanceId, instanceId) |
| | | .eq(ApprovalTask::getNodeId, currentNode.getId()) |
| | | .eq(ApprovalTask::getTaskStatus, "APPROVED") |
| | | .eq(ApprovalTask::getDeleted, 0) |
| | | )); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢å½åèç¹å·²æç»äººæ°ã |
| | | */ |
| | | public int getRejectedCount(Long instanceId) { |
| | | if (instanceId == null) { |
| | | return 0; |
| | | } |
| | | |
| | | ApprovalInstanceNode currentNode = getCurrentNode(instanceId); |
| | | if (currentNode == null) { |
| | | return 0; |
| | | } |
| | | |
| | | return Math.toIntExact(approvalTaskService.count( |
| | | new LambdaQueryWrapper<ApprovalTask>() |
| | | .eq(ApprovalTask::getInstanceId, instanceId) |
| | | .eq(ApprovalTask::getNodeId, currentNode.getId()) |
| | | .eq(ApprovalTask::getTaskStatus, "REJECTED") |
| | | .eq(ApprovalTask::getDeleted, 0) |
| | | )); |
| | | } |
| | | |
| | | /** |
| | | * 夿å½åèç¹æ¯å¦å¯ä»¥æµè½¬å°ä¸ä¸å±ã |
| | | */ |
| | | public boolean canProceedToNextLevel(Long instanceId, String approveType) { |
| | | if (instanceId == null || approveType == null) { |
| | | return false; |
| | | } |
| | | |
| | | if (getRejectedCount(instanceId) > 0) { |
| | | return false; |
| | | } |
| | | |
| | | int totalApproverCount = getCurrentPendingTasks(instanceId).size() + getApprovedCount(instanceId); |
| | | int approvedCount = getApprovedCount(instanceId); |
| | | |
| | | if ("AND".equalsIgnoreCase(approveType)) { |
| | | return approvedCount > 0 && approvedCount == totalApproverCount; |
| | | } |
| | | if ("OR".equalsIgnoreCase(approveType)) { |
| | | return approvedCount > 0; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢å½åç¨æ·å¨å½åèç¹ä¸çä»»å¡ç¶æã |
| | | */ |
| | | public String getUserTaskStatus(Long instanceId, Long userId) { |
| | | if (instanceId == null || userId == null) { |
| | | return null; |
| | | } |
| | | |
| | | ApprovalInstanceNode currentNode = getCurrentNode(instanceId); |
| | | if (currentNode == null) { |
| | | return null; |
| | | } |
| | | |
| | | ApprovalTask task = approvalTaskService.getOne( |
| | | new LambdaQueryWrapper<ApprovalTask>() |
| | | .eq(ApprovalTask::getInstanceId, instanceId) |
| | | .eq(ApprovalTask::getNodeId, currentNode.getId()) |
| | | .eq(ApprovalTask::getApproverId, userId) |
| | | .eq(ApprovalTask::getDeleted, 0) |
| | | .last("LIMIT 1") |
| | | ); |
| | | |
| | | return task != null ? task.getTaskStatus() : null; |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢æå®ç¨æ·çå
¨é¨å¾
审æ¹ä»»å¡ã |
| | | */ |
| | | public List<ApprovalTask> getUserAllPendingTasks(Long userId) { |
| | | if (userId == null) { |
| | | return List.of(); |
| | | } |
| | | |
| | | return approvalTaskService.list( |
| | | new LambdaQueryWrapper<ApprovalTask>() |
| | | .eq(ApprovalTask::getApproverId, userId) |
| | | .eq(ApprovalTask::getTaskStatus, "PENDING") |
| | | .eq(ApprovalTask::getDeleted, 0) |
| | | .orderByDesc(ApprovalTask::getCreateTime) |
| | | ); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢å®¡æ¹å®ä¾çè¿åº¦æè¦ã |
| | | */ |
| | | public String getApprovalProgress(Long instanceId) { |
| | | if (instanceId == null) { |
| | | return "æ æç审æ¹å®ä¾"; |
| | | } |
| | | |
| | | ApprovalInstanceNode currentNode = getCurrentNode(instanceId); |
| | | if (currentNode == null) { |
| | | return "审æ¹å·²å®ææå°æªå¼å§"; |
| | | } |
| | | |
| | | int approvedCount = getApprovedCount(instanceId); |
| | | int rejectedCount = getRejectedCount(instanceId); |
| | | int pendingCount = getRemainingApproverCount(instanceId); |
| | | int totalCount = approvedCount + rejectedCount + pendingCount; |
| | | |
| | | return String.format( |
| | | "第%d级审æ¹ï¼æ»äººæ°=%dï¼å·²åæ=%dï¼å·²æç»=%dï¼å¾
审æ¹=%d", |
| | | currentNode.getLevelNo(), |
| | | totalCount, |
| | | approvedCount, |
| | | rejectedCount, |
| | | pendingCount |
| | | ); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | import com.ruoyi.basic.dto.StorageAttachmentDTO; |
| | | import com.ruoyi.basic.service.StorageAttachmentService; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | |
| | | * @param ids æä»¶idå表 |
| | | * @return å é¤ç»æ |
| | | */ |
| | | @Log(title = "åå¨éä»¶", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/delete") |
| | | @Operation(summary = "å é¤éç¨æä»¶ä¸ä¼ çéä»¶ä¿¡æ¯") |
| | | public R batchDelete(@RequestBody List<Long> ids) { |
| | |
| | | /** |
| | | * ä¿åéç¨æä»¶ä¸ä¼ çéä»¶ä¿¡æ¯ |
| | | */ |
| | | @Log(title = "åå¨éä»¶", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | @Operation(summary = "ä¿åéç¨æä»¶ä¸ä¼ çéä»¶ä¿¡æ¯") |
| | | public R add(@RequestBody StorageAttachmentDTO storageAttachmentDTO) { |
| | |
| | | * @param supplierManage |
| | | * @return |
| | | */ |
| | | @Log(title = "ä¾åºå管ç", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody SupplierManage supplierManage) { |
| | | supplierService.saveSupplier(supplierManage); |
| | |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @Log(title = "ä¾åºå管ç", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/del") |
| | | public AjaxResult delSupplier(@RequestBody List<Integer> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | |
| | | * @param supplierManage |
| | | * @return |
| | | */ |
| | | @Log(title = "ä¾åºå管ç", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/update") |
| | | public AjaxResult update(@RequestBody SupplierManage supplierManage) { |
| | | supplierService.supplierUpdate(supplierManage); |
| | |
| | | * @param response |
| | | * @param supplierManageDto |
| | | */ |
| | | @Log(title = "ä¾åºå管ç", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void supplierExport(HttpServletResponse response,SupplierManageDto supplierManageDto) { |
| | | supplierService.supplierExport(response, supplierManageDto); |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.basic.pojo.SupplierManageFile; |
| | | import com.ruoyi.basic.service.SupplierManageFileService; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | * @param supplierManageFile |
| | | * @return |
| | | */ |
| | | @Log(title = "æ°å¢ä¾åºåéä»¶", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody SupplierManageFile supplierManageFile) { |
| | | return AjaxResult.success(supplierManageFileService.save(supplierManageFile)); |
| | |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @Log(title = "å é¤ä¾åºåéä»¶", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/del") |
| | | public AjaxResult delSupplierManageFile(@RequestBody List<Integer> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | |
| | | FILE("file"), |
| | | AFTER_FILE("after_file"), |
| | | BEFORE_FILE("before_file"), |
| | | APK("apk"), |
| | | RAG_FILE("rag_file"); |
| | | APK("apk"); |
| | | |
| | | |
| | | private final String type; |
| | |
| | | // Account |
| | | SALES_REFUND_AMOUNT_ORDER("sales_refund_amount_order"), |
| | | SALES_RECEIPT_RETURN("sales_receipt_return"), |
| | | ACCOUNT_EXPENSE("account_expense"), |
| | | FIN_REIMBURSEMENT("fin_reimbursement"), |
| | | FIN_VOUCHER("fin_voucher"), |
| | | ACCOUNT_FILE("account_file"), |
| | | ENTERPRISE_NEWS("enterprise_news"), |
| | | APPROVAL_INSTANCE("approval_instance"), |
| | | ACCOUNT_INVOICE_APPLICATION("account_invoice_application"), |
| | | ACCOUNT_PURCHASE_INVOICE("account_purchase_invoice"), |
| | | APPROVAL_TEMPLATE("approval_template"); |
| | | ACCOUNT_PURCHASE_INVOICE("account_purchase_invoice"); |
| | | |
| | | private final String type; |
| | | RecordTypeEnum(String type) { this.type = type; } |
| | |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * å®¢æ·æ¡£æ¡Mapperæ¥å£ |
| | |
| | | * @date 2025-05-07 |
| | | */ |
| | | @Mapper |
| | | public interface CustomerMapper extends BaseMapper<Customer> |
| | | { |
| | | /** |
| | | * æ¥è¯¢å®¢æ·æ¡£æ¡ |
| | | * |
| | | * @param id å®¢æ·æ¡£æ¡ä¸»é® |
| | | * @return å®¢æ·æ¡£æ¡ |
| | | */ |
| | | Customer selectCustomerById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢å®¢æ·æ¡£æ¡å表 |
| | | * |
| | | * @param customer å®¢æ·æ¡£æ¡ |
| | | * @return å®¢æ·æ¡£æ¡éå |
| | | */ |
| | | List<Customer> selectCustomerList(Customer customer); |
| | | |
| | | /** |
| | | * æ°å¢å®¢æ·æ¡£æ¡ |
| | | * |
| | | * @param customer å®¢æ·æ¡£æ¡ |
| | | * @return ç»æ |
| | | */ |
| | | int insertCustomer(Customer customer); |
| | | |
| | | /** |
| | | * ä¿®æ¹å®¢æ·æ¡£æ¡ |
| | | * |
| | | * @param customer å®¢æ·æ¡£æ¡ |
| | | * @return ç»æ |
| | | */ |
| | | int updateCustomer(Customer customer); |
| | | |
| | | /** |
| | | * å é¤å®¢æ·æ¡£æ¡ |
| | | * |
| | | * @param id å®¢æ·æ¡£æ¡ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | int deleteCustomerById(Long id); |
| | | |
| | | /** |
| | | * æ¹éå é¤å®¢æ·æ¡£æ¡ |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | int deleteCustomerByIds(Long[] ids); |
| | | public interface CustomerMapper extends BaseMapper<Customer> { |
| | | |
| | | IPage<CustomerVo> listPage(Page<CustomerDto> page, @Param("c") CustomerDto customer, @Param("loginUserId") Long loginUserId); |
| | | |
| | |
| | | IPage<CustomerTransactionsVo> customewTransactions(Page page, @Param("customerName") String customerName); |
| | | |
| | | IPage<CustomerTransactionsDetailsVo> customewTransactionsDetails(Page page, @Param("customerId") Long customerId); |
| | | |
| | | List<Map<String, Object>> getShippedAmountByCustomerIds(@Param("customerIds") List<Long> customerIds); |
| | | |
| | | List<Map<String, Object>> getShippedAmountBySalesLedgerIds(@Param("salesLedgerIds") List<Long> salesLedgerIds); |
| | | } |
| | |
| | | import com.ruoyi.basic.pojo.CustomerUser; |
| | | import com.ruoyi.basic.service.*; |
| | | import com.ruoyi.basic.vo.CustomerVo; |
| | | import com.ruoyi.common.utils.AmountUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.security.LoginUser; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.procurementrecord.mapper.ReturnManagementMapper; |
| | | import com.ruoyi.procurementrecord.pojo.ReturnManagement; |
| | | import com.ruoyi.sales.mapper.SalesLedgerMapper; |
| | | import com.ruoyi.sales.mapper.SalesQuotationMapper; |
| | | import com.ruoyi.sales.pojo.SalesLedger; |
| | | import com.ruoyi.sales.pojo.SalesQuotation; |
| | | import com.ruoyi.sales.vo.CustomerTransactionsDetailsVo; |
| | | import com.ruoyi.sales.vo.CustomerTransactionsVo; |
| | | import lombok.AllArgsConstructor; |
| | |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.ZoneId; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | |
| | | @Slf4j |
| | | public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer> implements ICustomerService { |
| | | @Autowired |
| | | private SalesLedgerMapper salesLedgerMapper; |
| | | @Autowired |
| | | private SalesQuotationMapper salesQuotationMapper; |
| | | @Autowired |
| | | private ReturnManagementMapper returnManagementMapper; |
| | | private SalesLedgerMapper salesLedgerMapper; |
| | | @Autowired |
| | | private CustomerMapper customerMapper; |
| | | |
| | |
| | | public int updateCustomer(Customer customer) { |
| | | LoginUser loginUser = SecurityUtils.getLoginUser(); |
| | | Long tenantId = loginUser.getTenantId(); |
| | | validateCustomerEditPermission(customer.getId()); |
| | | customer.setTenantId(tenantId); |
| | | return customerMapper.updateById(customer); |
| | | } |
| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int deleteCustomerByIds(Long[] ids) { |
| | | List<Long> idList = Arrays.asList(ids); |
| | | // æ£æ¥æ¯å¦æéå®å°è´¦å
³è |
| | | List<SalesLedger> salesLedgers = salesLedgerMapper.selectList(new QueryWrapper<SalesLedger>().lambda().in(SalesLedger::getCustomerId, idList)); |
| | | if (!salesLedgers.isEmpty()) { |
| | | throw new RuntimeException("å®¢æ·æ¡£æ¡ä¸æéå®å°è´¦ï¼è¯·å
å é¤éå®å°è´¦"); |
| | | throw new RuntimeException("å®¢æ·æ¡£æ¡ä¸æéå®ååï¼è¯·å
å é¤éå®åå"); |
| | | } |
| | | |
| | | // æ£æ¥æ¯å¦æéå®éè´§å
³è |
| | | List<ReturnManagement> returnManagements = returnManagementMapper.selectList(new QueryWrapper<ReturnManagement>().lambda().in(ReturnManagement::getCustomerId, idList)); |
| | | if (!returnManagements.isEmpty()) { |
| | | throw new RuntimeException("å®¢æ·æ¡£æ¡ä¸æéå®éè´§ï¼è¯·å
å é¤éå®éè´§"); |
| | | } |
| | | |
| | | // æ£æ¥æ¯å¦æé宿¥ä»·å
³è |
| | | List<SalesQuotation> salesQuotations = salesQuotationMapper.selectList(new QueryWrapper<SalesQuotation>().lambda().in(SalesQuotation::getCustomerId, idList)); |
| | | if (!salesQuotations.isEmpty()) { |
| | | throw new RuntimeException("å®¢æ·æ¡£æ¡ä¸æé宿¥ä»·ï¼è¯·å
å é¤é宿¥ä»·"); |
| | | } |
| | | |
| | | // æ¥è¯¢æ¯å¦æå·²åé
çå
¬æµ·å®¢æ· |
| | | List<Customer> assignedPools = customerMapper.selectList( |
| | | /*List<Customer> assignedPools = customerMapper.selectList( |
| | | new QueryWrapper<Customer>().lambda() |
| | | .in(Customer::getId, idList) |
| | | .eq(Customer::getType, 1). |
| | |
| | | ); |
| | | if (!assignedPools.isEmpty()) { |
| | | throw new RuntimeException("å®¢æ·æ¡£æ¡ä¸æå·²åé
çå
¬æµ·å®¢æ·ï¼è¯·å
æ¶å"); |
| | | } |
| | | }*/ |
| | | // å é¤å®¢æ·çåæ¶ä¹éè¦å é¤å¯¹åºç客æ·è·éãéä»¶åå访æé |
| | | for (Long id : ids) { |
| | | customerFollowUpService.deleteByCustomerId(id); |
| | |
| | | } |
| | | |
| | | // æ ¹æ® type åæ°è®¾ç½®å®¢æ·ç±»åï¼ç§æµ·/å
¬æµ·ï¼ |
| | | if (type != null) { |
| | | /*if (type != null) { |
| | | userList.forEach(customer -> { |
| | | customer.setType(type); |
| | | }); |
| | | } |
| | | }*/ |
| | | this.saveOrUpdateBatch(userList); |
| | | return R.ok(true); |
| | | } catch (Exception e) { |
| | |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> customerList(Customer customer) { |
| | | LoginUser loginUser = SecurityUtils.getLoginUser(); |
| | | Long loginUserId = loginUser.getUserId(); |
| | | CustomerDto query = new CustomerDto(); |
| | | if (customer != null) { |
| | | BeanUtils.copyProperties(customer, query); |
| | | } |
| | | LambdaQueryWrapper<Customer> queryWrapper = Wrappers.lambdaQuery(); |
| | | queryWrapper.select(Customer::getId, Customer::getCustomerName, Customer::getTaxpayerIdentificationNumber); |
| | | |
| | | // å¤ç¨å®¢æ·å表çå¯è§æ§è§åï¼é¿å
æå«äººçç§æµ·å®¢æ·æ´é²ç»å½åè´¦å· |
| | | List<CustomerVo> visibleCustomers = customerMapper.list(query, loginUserId); |
| | | if (CollectionUtils.isEmpty(visibleCustomers)) { |
| | | return Collections.emptyList(); |
| | | } |
| | | // è·ååå§æ¥è¯¢ç»æ |
| | | List<Map<String, Object>> result = customerMapper.selectMaps(queryWrapper); |
| | | |
| | | return visibleCustomers.stream().map(item -> { |
| | | Map<String, Object> map = new LinkedHashMap<>(); |
| | | map.put("id", item.getId()); |
| | | map.put("customerName", item.getCustomerName()); |
| | | map.put("taxpayerIdentificationNumber", item.getTaxpayerIdentificationNumber()); |
| | | return map; |
| | | }).collect(Collectors.toList()); |
| | | // å°ä¸å线å½å转æ¢ä¸ºé©¼å³°å½å |
| | | return result.stream().map(map -> map.entrySet().stream() |
| | | .collect(Collectors.toMap( |
| | | entry -> underlineToCamel(entry.getKey()), |
| | | Map.Entry::getValue)) |
| | | ).collect(Collectors.toList()); |
| | | } |
| | | |
| | | // åé
å
¬æµ·å®¢æ·ç»ç§æµ· |
| | |
| | | public void recycleCustomer(CustomerDto customerDto) { |
| | | Customer customer = customerMapper.selectById(customerDto.getId()); |
| | | if (customer.getType() == 1 && customer.getIsAssigned() == 1) { // å
¬æµ·ä¸å·²åé
|
| | | validatePublicSeaRecyclePermission(customer.getId()); |
| | | customer.setIsAssigned(0); |
| | | customer.setUsageStatus(0L); |
| | | customer.setUsageUser(0L); |
| | |
| | | return this.updateById(customer); |
| | | } |
| | | |
| | | private void validateCustomerEditPermission(Long customerId) { |
| | | Customer customer = customerMapper.selectById(customerId); |
| | | if (customer == null) { |
| | | throw new RuntimeException("å®¢æ·æ¡£æ¡ä¸åå¨"); |
| | | } |
| | | if (!hasSalesModuleReference(customerId)) { |
| | | return; |
| | | } |
| | | if (Objects.equals(customer.getType(), 0)) { |
| | | throw new RuntimeException("已被é宿¨¡åå¼ç¨çç§æµ·å®¢æ·ä¸è½ç¼è¾"); |
| | | } |
| | | if (Objects.equals(customer.getType(), 1) && Objects.equals(customer.getIsAssigned(), 1)) { |
| | | throw new RuntimeException("å·²é¢ç¨å¹¶ä¸è¢«é宿¨¡åå¼ç¨çå
¬æµ·å®¢æ·ä¸è½ç¼è¾"); |
| | | } |
| | | } |
| | | |
| | | private void validatePublicSeaRecyclePermission(Long customerId) { |
| | | if (hasSalesModuleReference(customerId)) { |
| | | throw new RuntimeException("å·²é¢ç¨å¹¶ä¸è¢«é宿¨¡åå¼ç¨çå
¬æµ·å®¢æ·ä¸è½åæ¶"); |
| | | } |
| | | } |
| | | |
| | | private boolean hasSalesModuleReference(Long customerId) { |
| | | Long salesLedgerCount = salesLedgerMapper.selectCount(new QueryWrapper<SalesLedger>().lambda() |
| | | .eq(SalesLedger::getCustomerId, customerId)); |
| | | if (salesLedgerCount != null && salesLedgerCount > 0) { |
| | | return true; |
| | | } |
| | | Long salesQuotationCount = salesQuotationMapper.selectCount(new QueryWrapper<SalesQuotation>().lambda() |
| | | .eq(SalesQuotation::getCustomerId, customerId)); |
| | | if (salesQuotationCount != null && salesQuotationCount > 0) { |
| | | return true; |
| | | } |
| | | Long returnManagementCount = returnManagementMapper.selectCount(new QueryWrapper<ReturnManagement>().lambda() |
| | | .eq(ReturnManagement::getCustomerId, customerId)); |
| | | return returnManagementCount != null && returnManagementCount > 0; |
| | | } |
| | | |
| | | @Override |
| | | public IPage<CustomerTransactionsVo> customewTransactions(Page page, String customerName) { |
| | | return customerMapper.customewTransactions(page, customerName); |
| | | IPage<CustomerTransactionsVo> p = customerMapper.customewTransactions(page, customerName); |
| | | List<CustomerTransactionsVo> records = p.getRecords(); |
| | | if (!CollectionUtils.isEmpty(records)) { |
| | | List<Long> customerIds = records.stream().map(CustomerTransactionsVo::getCustomerId).collect(Collectors.toList()); |
| | | List<Map<String, Object>> shippedAmountList = customerMapper.getShippedAmountByCustomerIds(customerIds); |
| | | Map<Long, BigDecimal> shippedAmountMap = new HashMap<>(); |
| | | for (Map<String, Object> map : shippedAmountList) { |
| | | if (map.get("outboundAmount") != null) { |
| | | shippedAmountMap.put(((Number) map.get("customerId")).longValue(), new BigDecimal(String.valueOf(map.get("outboundAmount")))); |
| | | } |
| | | } |
| | | for (CustomerTransactionsVo vo : records) { |
| | | BigDecimal outboundAmount = shippedAmountMap.getOrDefault(vo.getCustomerId(), BigDecimal.ZERO); |
| | | vo.setShippedAmount(outboundAmount); |
| | | BigDecimal contractAmounts = vo.getContractAmounts() == null ? BigDecimal.ZERO : vo.getContractAmounts(); |
| | | BigDecimal unshippedAmount = contractAmounts.subtract(outboundAmount); |
| | | if (unshippedAmount.compareTo(BigDecimal.ZERO) < 0) { |
| | | unshippedAmount = BigDecimal.ZERO; |
| | | } |
| | | vo.setUnshippedAmount(unshippedAmount); |
| | | AmountUtils.normalizeCustomerTransaction(vo); |
| | | } |
| | | } |
| | | return p; |
| | | } |
| | | |
| | | @Override |
| | | public IPage<CustomerTransactionsDetailsVo> customewTransactionsDetails(Page page, Long customerId) { |
| | | return customerMapper.customewTransactionsDetails(page, customerId); |
| | | IPage<CustomerTransactionsDetailsVo> p = customerMapper.customewTransactionsDetails(page, customerId); |
| | | List<CustomerTransactionsDetailsVo> records = p.getRecords(); |
| | | if (!CollectionUtils.isEmpty(records)) { |
| | | List<Long> salesLedgerIds = records.stream().map(CustomerTransactionsDetailsVo::getSalesLedgerId).collect(Collectors.toList()); |
| | | List<Map<String, Object>> shippedAmountList = customerMapper.getShippedAmountBySalesLedgerIds(salesLedgerIds); |
| | | Map<Long, BigDecimal> shippedAmountMap = new HashMap<>(); |
| | | for (Map<String, Object> map : shippedAmountList) { |
| | | if (map.get("outboundAmount") != null) { |
| | | shippedAmountMap.put(((Number) map.get("salesLedgerId")).longValue(), new BigDecimal(String.valueOf(map.get("outboundAmount")))); |
| | | } |
| | | } |
| | | for (CustomerTransactionsDetailsVo vo : records) { |
| | | BigDecimal outboundAmount = shippedAmountMap.getOrDefault(vo.getSalesLedgerId(), BigDecimal.ZERO); |
| | | vo.setShippedAmount(outboundAmount); |
| | | BigDecimal contractAmount = vo.getContractAmount() == null ? BigDecimal.ZERO : vo.getContractAmount(); |
| | | BigDecimal unshippedAmount = contractAmount.subtract(outboundAmount); |
| | | if (unshippedAmount.compareTo(BigDecimal.ZERO) < 0) { |
| | | unshippedAmount = BigDecimal.ZERO; |
| | | } |
| | | vo.setUnshippedAmount(unshippedAmount); |
| | | AmountUtils.normalizeCustomerTransactionDetail(vo); |
| | | } |
| | | } |
| | | return p; |
| | | } |
| | | |
| | | /** |
| | |
| | | import com.ruoyi.basic.mapper.SupplierManageMapper; |
| | | import com.ruoyi.basic.pojo.SupplierManage; |
| | | import com.ruoyi.basic.service.ISupplierService; |
| | | import com.ruoyi.common.utils.AmountUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.purchase.mapper.PurchaseLedgerMapper; |
| | | import com.ruoyi.purchase.pojo.PurchaseLedger; |
| | | import com.ruoyi.purchase.vo.SupplierTransactionsDetailsVo; |
| | | import com.ruoyi.purchase.vo.SupplierTransactionsVo; |
| | | import com.ruoyi.quality.mapper.QualityInspectMapper; |
| | | import com.ruoyi.quality.mapper.QualityUnqualifiedMapper; |
| | | import com.ruoyi.quality.pojo.QualityInspect; |
| | | import com.ruoyi.quality.pojo.QualityUnqualified; |
| | | import com.ruoyi.sales.mapper.SalesLedgerProductMapper; |
| | | import com.ruoyi.sales.pojo.SalesLedgerProduct; |
| | | import com.ruoyi.stock.mapper.StockInRecordMapper; |
| | | import com.ruoyi.stock.pojo.StockInRecord; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDate; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class SupplierServiceImpl extends ServiceImpl<SupplierManageMapper,SupplierManage> implements ISupplierService { |
| | | public class SupplierServiceImpl extends ServiceImpl<SupplierManageMapper, SupplierManage> implements ISupplierService { |
| | | |
| | | private final SupplierManageMapper supplierMapper; |
| | | private final PurchaseLedgerMapper purchaseLedgerMapper; |
| | | private final SalesLedgerProductMapper salesLedgerProductMapper; |
| | | private final StockInRecordMapper stockInRecordMapper; |
| | | private final QualityInspectMapper qualityInspectMapper; |
| | | private final QualityUnqualifiedMapper qualityUnqualifiedMapper; |
| | | |
| | | /** |
| | | * ä¾åºåæ°å¢ |
| | | * |
| | | * @param supplierManage |
| | | * @return |
| | | */ |
| | | @Override |
| | | public void saveSupplier(SupplierManage supplierManage) { |
| | | LambdaQueryWrapper<SupplierManage> supplierManageLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | supplierManageLambdaQueryWrapper.eq(SupplierManage::getSupplierName,supplierManage.getSupplierName()); |
| | | supplierManageLambdaQueryWrapper.eq(SupplierManage::getSupplierName, supplierManage.getSupplierName()); |
| | | if (supplierMapper.selectCount(supplierManageLambdaQueryWrapper) > 0) { |
| | | throw new RuntimeException("ä¾åºåå·²åå¨"); |
| | | } |
| | |
| | | |
| | | /** |
| | | * ä¾åºåå é¤ |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * ä¾åºå详æ
|
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * ä¾åºåä¿®æ¹ |
| | | * |
| | | * @param supplierManage |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * ä¾åºåå页æ¥è¯¢ |
| | | * |
| | | * @param page |
| | | * @param supplierManageDto |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<SupplierManage> supplierListPage(Page page, SupplierManageDto supplierManageDto) { |
| | | return supplierMapper.supplierListPage(page,supplierManageDto); |
| | | return supplierMapper.supplierListPage(page, supplierManageDto); |
| | | } |
| | | |
| | | /** |
| | | * ä¾åºåå¯¼åº |
| | | * |
| | | * @param response |
| | | * @param supplierManageDto |
| | | */ |
| | |
| | | ExcelUtil<SupplierManageExcelDto> util = new ExcelUtil<SupplierManageExcelDto>(SupplierManageExcelDto.class); |
| | | List<SupplierManageExcelDto> list = util.importExcel(file.getInputStream()); |
| | | ArrayList<SupplierManage> supplierManages = new ArrayList<>(); |
| | | list.stream().forEach(dto -> { |
| | | list.forEach(dto -> { |
| | | SupplierManage supplierManage = new SupplierManage(); |
| | | BeanUtils.copyProperties(dto,supplierManage); |
| | | BeanUtils.copyProperties(dto, supplierManage); |
| | | supplierManage.setMaintainTime(LocalDate.now()); |
| | | Long userId = SecurityUtils.getLoginUser().getUser().getUserId(); |
| | | |
| | | supplierManage.setMaintainUserId(Integer.parseInt(userId+"")); |
| | | supplierManage.setMaintainUserId(Integer.parseInt(userId + "")); |
| | | supplierManages.add(supplierManage); |
| | | }); |
| | | |
| | | this.saveOrUpdateBatch(supplierManages); |
| | | return true; |
| | | }catch (Exception e){ |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return false; |
| | |
| | | |
| | | @Override |
| | | public IPage<SupplierTransactionsVo> supplierTransactions(Page page, String supplierName) { |
| | | return supplierMapper.supplierTransactions(page,supplierName); |
| | | IPage<SupplierTransactionsVo> plPage = supplierMapper.supplierTransactions(page, supplierName); |
| | | List<SupplierTransactionsVo> resultList = plPage.getRecords(); |
| | | if (resultList.isEmpty()) { |
| | | return plPage; |
| | | } |
| | | |
| | | List<Long> supplierIds = resultList.stream().map(SupplierTransactionsVo::getSupplierId).collect(Collectors.toList()); |
| | | |
| | | List<PurchaseLedger> purchaseLedgers = purchaseLedgerMapper.selectList(new LambdaQueryWrapper<PurchaseLedger>() |
| | | .in(PurchaseLedger::getSupplierId, supplierIds)); |
| | | |
| | | if (purchaseLedgers.isEmpty()) { |
| | | for (SupplierTransactionsVo vo : resultList) { |
| | | vo.setShippedAmount(BigDecimal.ZERO); |
| | | BigDecimal contractAmount = vo.getContractAmounts() == null ? BigDecimal.ZERO : vo.getContractAmounts(); |
| | | vo.setUnshippedAmount(contractAmount); |
| | | AmountUtils.normalizeSupplierTransaction(vo); |
| | | } |
| | | return plPage; |
| | | } |
| | | |
| | | List<Long> ledgerIds = purchaseLedgers.stream().map(PurchaseLedger::getId).collect(Collectors.toList()); |
| | | |
| | | List<SalesLedgerProduct> salesLedgerProducts = salesLedgerProductMapper.selectList(new LambdaQueryWrapper<SalesLedgerProduct>() |
| | | .in(SalesLedgerProduct::getSalesLedgerId, ledgerIds) |
| | | .eq(SalesLedgerProduct::getType, 2)); |
| | | |
| | | // ä¸è´¨æ£ç´æ¥å
¥åºç - 7 |
| | | List<StockInRecord> directInboundRecords = stockInRecordMapper.selectList(new LambdaQueryWrapper<StockInRecord>() |
| | | .eq(StockInRecord::getRecordType, "7") |
| | | .eq(StockInRecord::getApprovalStatus, 1) |
| | | .in(StockInRecord::getRecordId, ledgerIds)); |
| | | |
| | | // éè¿è´¨æ£å
¥åºç |
| | | List<QualityInspect> qualityInspects = qualityInspectMapper.selectList(new LambdaQueryWrapper<QualityInspect>() |
| | | .in(QualityInspect::getPurchaseLedgerId, ledgerIds)); |
| | | List<Long> inspectIds = qualityInspects.stream().map(QualityInspect::getId).collect(Collectors.toList()); |
| | | |
| | | // è´¨æ£åæ ¼å
¥åº - 10 |
| | | List<StockInRecord> qualifiedInboundRecords = new ArrayList<>(); |
| | | List<QualityUnqualified> qualityUnqualifieds = new ArrayList<>(); |
| | | if (!inspectIds.isEmpty()) { |
| | | qualifiedInboundRecords = stockInRecordMapper.selectList(new LambdaQueryWrapper<StockInRecord>() |
| | | .eq(StockInRecord::getRecordType, "10") |
| | | .eq(StockInRecord::getApprovalStatus, 1) |
| | | .in(StockInRecord::getRecordId, inspectIds)); |
| | | |
| | | qualityUnqualifieds = qualityUnqualifiedMapper.selectList(new LambdaQueryWrapper<QualityUnqualified>() |
| | | .in(QualityUnqualified::getInspectId, inspectIds)); |
| | | } |
| | | List<Long> unqualifiedIds = qualityUnqualifieds.stream().map(QualityUnqualified::getId).collect(Collectors.toList()); |
| | | |
| | | // è´¨æ£ä¸åæ ¼å
¥åº - 11 |
| | | List<StockInRecord> unqualifiedInboundRecords = new ArrayList<>(); |
| | | if (!unqualifiedIds.isEmpty()) { |
| | | unqualifiedInboundRecords = stockInRecordMapper.selectList(new LambdaQueryWrapper<StockInRecord>() |
| | | .eq(StockInRecord::getRecordType, "11") |
| | | .eq(StockInRecord::getApprovalStatus, 1) |
| | | .in(StockInRecord::getRecordId, unqualifiedIds)); |
| | | } |
| | | |
| | | for (SupplierTransactionsVo vo : resultList) { |
| | | BigDecimal shippedAmount = BigDecimal.ZERO; |
| | | |
| | | List<PurchaseLedger> currentLedgers = purchaseLedgers.stream().filter(pl -> pl.getSupplierId().equals(vo.getSupplierId())).toList(); |
| | | for (PurchaseLedger ledger : currentLedgers) { |
| | | Long ledgerId = ledger.getId(); |
| | | |
| | | List<StockInRecord> currentDirectRecords = directInboundRecords.stream().filter(s -> s.getRecordId().equals(ledgerId)).toList(); |
| | | for (StockInRecord sir : currentDirectRecords) { |
| | | List<SalesLedgerProduct> currentProducts = salesLedgerProducts.stream().filter(s -> s.getSalesLedgerId().equals(ledgerId)).toList(); |
| | | for (SalesLedgerProduct slp : currentProducts) { |
| | | if (sir.getStockInNum() != null && slp.getTaxInclusiveUnitPrice() != null) { |
| | | shippedAmount = shippedAmount.add(sir.getStockInNum().multiply(slp.getTaxInclusiveUnitPrice())); |
| | | } |
| | | } |
| | | } |
| | | |
| | | List<QualityInspect> currentInspects = qualityInspects.stream().filter(q -> q.getPurchaseLedgerId().equals(ledgerId)).toList(); |
| | | for (QualityInspect inspect : currentInspects) { |
| | | List<StockInRecord> currentQualifiedRecords = qualifiedInboundRecords.stream().filter(s -> s.getRecordId().equals(inspect.getId())).toList(); |
| | | for (StockInRecord sir : currentQualifiedRecords) { |
| | | BigDecimal minPrice = getMinTaxInclusiveUnitPrice(salesLedgerProducts, ledgerId, sir.getProductModelId()); |
| | | if (sir.getStockInNum() != null && minPrice != null) { |
| | | shippedAmount = shippedAmount.add(sir.getStockInNum().multiply(minPrice)); |
| | | } |
| | | } |
| | | |
| | | List<QualityUnqualified> currentUnqualifieds = qualityUnqualifieds.stream().filter(q -> q.getInspectId().equals(inspect.getId())).toList(); |
| | | for (QualityUnqualified unqualified : currentUnqualifieds) { |
| | | List<StockInRecord> currentUnqualifiedRecords = unqualifiedInboundRecords.stream().filter(s -> s.getRecordId().equals(unqualified.getId())).toList(); |
| | | for (StockInRecord sir : currentUnqualifiedRecords) { |
| | | BigDecimal minPrice = getMinTaxInclusiveUnitPrice(salesLedgerProducts, ledgerId, sir.getProductModelId()); |
| | | if (sir.getStockInNum() != null && minPrice != null) { |
| | | shippedAmount = shippedAmount.add(sir.getStockInNum().multiply(minPrice)); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | BigDecimal contractAmount = vo.getContractAmounts() == null ? BigDecimal.ZERO : vo.getContractAmounts(); |
| | | if (shippedAmount.subtract(contractAmount).compareTo(BigDecimal.ZERO) > 0) { |
| | | shippedAmount = contractAmount; |
| | | } |
| | | vo.setShippedAmount(shippedAmount); |
| | | vo.setUnshippedAmount(contractAmount.subtract(shippedAmount)); |
| | | AmountUtils.normalizeSupplierTransaction(vo); |
| | | } |
| | | |
| | | return plPage; |
| | | } |
| | | |
| | | @Override |
| | | public IPage<SupplierTransactionsDetailsVo> supplierTransactionsDetails(Page page, Long supplierId) { |
| | | return supplierMapper.supplierTransactionsDetails(page,supplierId); |
| | | IPage<SupplierTransactionsDetailsVo> plPage = supplierMapper.supplierTransactionsDetails(page, supplierId); |
| | | |
| | | List<SupplierTransactionsDetailsVo> resultList = plPage.getRecords(); |
| | | if (resultList.isEmpty()) { |
| | | return plPage; |
| | | } |
| | | |
| | | List<Long> ledgerIds = resultList.stream().map(SupplierTransactionsDetailsVo::getPurchaseLedgerId).collect(Collectors.toList()); |
| | | |
| | | List<SalesLedgerProduct> salesLedgerProducts = salesLedgerProductMapper.selectList(new LambdaQueryWrapper<SalesLedgerProduct>() |
| | | .in(SalesLedgerProduct::getSalesLedgerId, ledgerIds) |
| | | .eq(SalesLedgerProduct::getType, 2)); |
| | | |
| | | // ä¸è´¨æ£ç´æ¥å
¥åºç - 7 |
| | | List<StockInRecord> directInboundRecords = stockInRecordMapper.selectList(new LambdaQueryWrapper<StockInRecord>() |
| | | .eq(StockInRecord::getRecordType, "7") |
| | | .eq(StockInRecord::getApprovalStatus, 1) |
| | | .in(StockInRecord::getRecordId, ledgerIds)); |
| | | |
| | | // éè¿è´¨æ£å
¥åºç |
| | | List<QualityInspect> qualityInspects = qualityInspectMapper.selectList(new LambdaQueryWrapper<QualityInspect>() |
| | | .in(QualityInspect::getPurchaseLedgerId, ledgerIds)); |
| | | List<Long> inspectIds = qualityInspects.stream().map(QualityInspect::getId).collect(Collectors.toList()); |
| | | |
| | | // è´¨æ£åæ ¼å
¥åº - 10 |
| | | List<StockInRecord> qualifiedInboundRecords = new ArrayList<>(); |
| | | List<QualityUnqualified> qualityUnqualifieds = new ArrayList<>(); |
| | | if (!inspectIds.isEmpty()) { |
| | | qualifiedInboundRecords = stockInRecordMapper.selectList(new LambdaQueryWrapper<StockInRecord>() |
| | | .eq(StockInRecord::getRecordType, "10") |
| | | .eq(StockInRecord::getApprovalStatus, 1) |
| | | .in(StockInRecord::getRecordId, inspectIds)); |
| | | |
| | | qualityUnqualifieds = qualityUnqualifiedMapper.selectList(new LambdaQueryWrapper<QualityUnqualified>() |
| | | .in(QualityUnqualified::getInspectId, inspectIds)); |
| | | } |
| | | List<Long> unqualifiedIds = qualityUnqualifieds.stream().map(QualityUnqualified::getId).collect(Collectors.toList()); |
| | | |
| | | // è´¨æ£ä¸åæ ¼å
¥åº - 11 |
| | | List<StockInRecord> unqualifiedInboundRecords = new ArrayList<>(); |
| | | if (!unqualifiedIds.isEmpty()) { |
| | | unqualifiedInboundRecords = stockInRecordMapper.selectList(new LambdaQueryWrapper<StockInRecord>() |
| | | .eq(StockInRecord::getRecordType, "11") |
| | | .eq(StockInRecord::getApprovalStatus, 1) |
| | | .in(StockInRecord::getRecordId, unqualifiedIds)); |
| | | } |
| | | |
| | | for (SupplierTransactionsDetailsVo vo : resultList) { |
| | | BigDecimal shippedAmount = BigDecimal.ZERO; |
| | | |
| | | List<StockInRecord> currentDirectRecords = directInboundRecords.stream().filter(s -> s.getRecordId().equals(vo.getPurchaseLedgerId())).toList(); |
| | | for (StockInRecord sir : currentDirectRecords) { |
| | | List<SalesLedgerProduct> currentProducts = salesLedgerProducts.stream().filter(s -> s.getSalesLedgerId().equals(vo.getPurchaseLedgerId())).toList(); |
| | | for (SalesLedgerProduct slp : currentProducts) { |
| | | if (sir.getStockInNum() != null && slp.getTaxInclusiveUnitPrice() != null) { |
| | | shippedAmount = shippedAmount.add(sir.getStockInNum().multiply(slp.getTaxInclusiveUnitPrice())); |
| | | } |
| | | } |
| | | } |
| | | |
| | | List<QualityInspect> currentInspects = qualityInspects.stream().filter(q -> q.getPurchaseLedgerId().equals(vo.getPurchaseLedgerId())).toList(); |
| | | for (QualityInspect inspect : currentInspects) { |
| | | List<StockInRecord> currentQualifiedRecords = qualifiedInboundRecords.stream().filter(s -> s.getRecordId().equals(inspect.getId())).toList(); |
| | | for (StockInRecord sir : currentQualifiedRecords) { |
| | | BigDecimal minPrice = getMinTaxInclusiveUnitPrice(salesLedgerProducts, vo.getPurchaseLedgerId(), sir.getProductModelId()); |
| | | if (sir.getStockInNum() != null && minPrice != null) { |
| | | shippedAmount = shippedAmount.add(sir.getStockInNum().multiply(minPrice)); |
| | | } |
| | | } |
| | | |
| | | List<QualityUnqualified> currentUnqualifieds = qualityUnqualifieds.stream().filter(q -> q.getInspectId().equals(inspect.getId())).toList(); |
| | | for (QualityUnqualified unqualified : currentUnqualifieds) { |
| | | List<StockInRecord> currentUnqualifiedRecords = unqualifiedInboundRecords.stream().filter(s -> s.getRecordId().equals(unqualified.getId())).toList(); |
| | | for (StockInRecord sir : currentUnqualifiedRecords) { |
| | | BigDecimal minPrice = getMinTaxInclusiveUnitPrice(salesLedgerProducts, vo.getPurchaseLedgerId(), sir.getProductModelId()); |
| | | if (sir.getStockInNum() != null && minPrice != null) { |
| | | shippedAmount = shippedAmount.add(sir.getStockInNum().multiply(minPrice)); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | BigDecimal contractAmount = vo.getContractAmount() == null ? BigDecimal.ZERO : vo.getContractAmount(); |
| | | if (shippedAmount.subtract(contractAmount).compareTo(BigDecimal.ZERO) > 0) { |
| | | shippedAmount = contractAmount; |
| | | } |
| | | vo.setShippedAmount(shippedAmount); |
| | | vo.setUnshippedAmount(contractAmount.subtract(shippedAmount)); |
| | | AmountUtils.normalizeSupplierTransactionDetail(vo); |
| | | } |
| | | |
| | | return plPage; |
| | | } |
| | | |
| | | private BigDecimal getMinTaxInclusiveUnitPrice(List<SalesLedgerProduct> allSlp, Long salesLedgerId, Long productModelId) { |
| | | return allSlp.stream() |
| | | .filter(s -> s.getSalesLedgerId().equals(salesLedgerId) && s.getProductModelId() != null && s.getProductModelId().equals(productModelId)) |
| | | .map(SalesLedgerProduct::getTaxInclusiveUnitPrice) |
| | | .filter(java.util.Objects::nonNull) |
| | | .min(BigDecimal::compareTo) |
| | | .orElse(null); |
| | | } |
| | | } |
| | |
| | | * å
±äº«ç¨æ·IDå符串ï¼SQLæ¥è¯¢è¿åï¼ç¨äºè½¬æ¢ä¸ºListï¼ |
| | | */ |
| | | private String userIdsStr; |
| | | |
| | | /** |
| | | * æ¯å¦è¢«é宿¨¡åå¼ç¨ï¼0-å¦ï¼1-æ¯ |
| | | */ |
| | | private Integer salesReferenceFlag; |
| | | } |
| | |
| | | package com.ruoyi.basic.vo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.ruoyi.basic.pojo.ProductModel; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | |
| | | @Data |
| | | public class ProductModelVo extends ProductModel { |
| | | |
| | | @TableField(exist = false) |
| | | private String topProductName; |
| | | |
| | | private List<String> batchNoList; |
| | | } |
| | |
| | | import com.ruoyi.collaborativeApproval.pojo.RulesRegulationsManagement; |
| | | import com.ruoyi.collaborativeApproval.service.DutyPlanService; |
| | | import com.ruoyi.common.utils.excel.ExcelUtils; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import lombok.AllArgsConstructor; |
| | |
| | | return AjaxResult.success(dutyPlanService.getNum()); |
| | | } |
| | | |
| | | @Log(title = "æ°å¢å¼ç计å", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | @Operation(summary = "æ°å¢") |
| | | public AjaxResult add(@RequestBody DutyPlan dutyPlan){ |
| | | return AjaxResult.success(dutyPlanService.save(dutyPlan)); |
| | | } |
| | | |
| | | @Log(title = "ä¿®æ¹å¼ç计å", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/update") |
| | | @Operation(summary = "ä¿®æ¹") |
| | | public AjaxResult update(@RequestBody DutyPlan dutyPlan){ |
| | | return AjaxResult.success(dutyPlanService.updateById(dutyPlan)); |
| | | } |
| | | |
| | | @Log(title = "å é¤å¼ç计å", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/delete") |
| | | @Operation(summary = "å é¤") |
| | | public AjaxResult delete(@RequestBody List<Long> ids){ |
| | |
| | | } |
| | | return AjaxResult.success(dutyPlanService.removeBatchByIds(ids)); |
| | | } |
| | | @Log(title = "导åºå¼ç计å", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | @Operation(summary = "导åº") |
| | | public void exportData(HttpServletResponse response, DutyPlanDTO dutyPlanDTO){ |
| | |
| | | import com.ruoyi.collaborativeApproval.vo.SearchMeetingRoomVo; |
| | | import com.ruoyi.collaborativeApproval.vo.SearchMeetingUseVo; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | |
| | | return R.ok(meetingService.getMeetingRoomList(vo)); |
| | | } |
| | | |
| | | @Log(title = "æ°å¢ä¼è®®å®¤", businessType = BusinessType.INSERT) |
| | | @PostMapping("/saveRoom") |
| | | public R saveRoom(@RequestBody MeetingRoom meetingRoom) { |
| | | meetingService.saveMeetRoom(meetingRoom); |
| | |
| | | return R.ok(meetingService.findMeetRoomById(id)); |
| | | } |
| | | |
| | | @Log(title = "å é¤ä¼è®®å®¤", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/delRoom/{id}") |
| | | public R deleteRoom(@PathVariable Long id) { |
| | | meetingService.deleteMeetingRoom(id); |
| | |
| | | return R.ok(meetingService.getMeetingDraftList(vo)); |
| | | } |
| | | |
| | | @Log(title = "ä¿åä¼è®®è稿", businessType = BusinessType.INSERT) |
| | | @PostMapping("/saveDraft") |
| | | public R saveMeetingDraft(@RequestBody MeetDraft meetDraft) { |
| | | meetingService.saveMeetDraft(meetDraft); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Log(title = "å é¤ä¼è®®è稿", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/delDraft/{id}") |
| | | public R deleteMeetingDraft(@PathVariable Long id) { |
| | | meetingService.deleteMeetingDraft(id); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Log(title = "æ°å¢ä¼è®®ç³è¯·", businessType = BusinessType.INSERT) |
| | | @PostMapping("/saveMeetingApplication") |
| | | public R saveMeetApplication(@RequestBody MeetApplication meetApplication) { |
| | | return meetingService.saveMeetApplication(meetApplication); |
| | |
| | | return R.ok(meetingService.getMeetingMinutesById(id)); |
| | | } |
| | | |
| | | @Log(title = "ä¿åä¼è®®çºªè¦", businessType = BusinessType.INSERT) |
| | | @PostMapping("/saveMeetingMinutes") |
| | | public R saveMeetingMinutes(@RequestBody MeetingMinutes meetingMinutes) { |
| | | meetingService.saveMeetingMinutes(meetingMinutes); |
| | |
| | | } |
| | | |
| | | @Operation(summary = "ä¼è®®å®¤è®¾ç½®å¯¼åº") |
| | | @Log(title = "导åºä¼è®®å®¤è®¾ç½®", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response) { |
| | | List<MeetingRoom> accountExpenses = meetingService.list(); |
| | |
| | | private final MeetDraftMapper meetDraftMapper; |
| | | |
| | | @Operation(summary = "ä¼è®®è稿导åº") |
| | | @Log(title = "导åºä¼è®®è稿", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/exportOne") |
| | | public void exportOne(HttpServletResponse response) { |
| | | List<MeetDraft> accountExpenses = meetDraftMapper.selectList(new LambdaQueryWrapper<MeetDraft>()); |
| | |
| | | import com.ruoyi.basic.pojo.SupplierManage; |
| | | import com.ruoyi.collaborativeApproval.pojo.NoticeType; |
| | | import com.ruoyi.collaborativeApproval.service.NoticeTypeService; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | * @param noticeType |
| | | * @return |
| | | */ |
| | | @Log(title = "æ°å¢å
¬åç±»å", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody NoticeType noticeType) { |
| | | return AjaxResult.success(noticeTypeService.saveOrUpdate(noticeType)); |
| | |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @Log(title = "å é¤å
¬åç±»å", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/del") |
| | | public AjaxResult delNoticeType(@RequestBody List<Integer> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | |
| | | import com.ruoyi.collaborativeApproval.pojo.SealApplicationManagement; |
| | | import com.ruoyi.collaborativeApproval.service.RulesRegulationsManagementService; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | |
| | | return AjaxResult.success(rulesRegulationsManagementService.listPage(page, rulesRegulationsManagement)); |
| | | } |
| | | |
| | | @Log(title = "æ°å¢è§ç« å¶åº¦", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | @Operation(summary = "æ°å¢") |
| | | public AjaxResult add(@RequestBody RulesRegulationsManagement rulesRegulationsManagement){ |
| | |
| | | return AjaxResult.success(rulesRegulationsManagement.getId()); |
| | | } |
| | | |
| | | @Log(title = "ä¿®æ¹è§ç« å¶åº¦", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/update") |
| | | @Operation(summary = "ä¿®æ¹") |
| | | public AjaxResult update(@RequestBody RulesRegulationsManagement rulesRegulationsManagement){ |
| | | return AjaxResult.success(rulesRegulationsManagementService.updateById(rulesRegulationsManagement)); |
| | | } |
| | | |
| | | @Log(title = "å é¤è§ç« å¶åº¦", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/delete") |
| | | @Operation(summary = "å é¤") |
| | | public AjaxResult delete(@PathVariable("ids") List<Long> ids){ |
| | |
| | | return AjaxResult.success(rulesRegulationsManagementService.removeBatchByIds(ids)); |
| | | } |
| | | //è§åæ¥çæ¶æ°å¢é
è¯»ç¶æ |
| | | @Log(title = "æ°å¢é
è¯»ç¶æ", businessType = BusinessType.INSERT) |
| | | @PostMapping("/addReadingStatus") |
| | | @Operation(summary = "æ°å¢é
è¯»ç¶æ") |
| | | public AjaxResult addReadingStatus(@RequestBody ReadingStatus readingStatus){ |
| | | return AjaxResult.success(readingStatusMapper.insert(readingStatus)); |
| | | } |
| | | @Log(title = "ä¿®æ¹é
è¯»ç¶æ", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/updateReadingStatus") |
| | | @Operation(summary = "ä¿®æ¹é
è¯»ç¶æ") |
| | | public AjaxResult updateReadingStatus(@RequestBody ReadingStatus readingStatus){ |
| | |
| | | } |
| | | |
| | | @Operation(summary = "è§ç« å¶åº¦ç®¡ç导åº") |
| | | @Log(title = "导åºè§ç« å¶åº¦", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response) { |
| | | List<RulesRegulationsManagement> accountExpenses = rulesRegulationsManagementService.list(); |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.collaborativeApproval.pojo.RulesRegulationsManagementFile; |
| | | import com.ruoyi.collaborativeApproval.service.RulesRegulationsManagementFileService; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.quality.pojo.QualityInspectFile; |
| | | import com.ruoyi.quality.service.IQualityInspectFileService; |
| | |
| | | * @param rulesRegulationsManagementFile |
| | | * @return |
| | | */ |
| | | @Log(title = "è§ç« å¶åº¦æä»¶", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody RulesRegulationsManagementFile rulesRegulationsManagementFile) { |
| | | return AjaxResult.success(rulesRegulationsManagementFileService.save(rulesRegulationsManagementFile)); |
| | |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @Log(title = "è§ç« å¶åº¦æä»¶", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/del") |
| | | public AjaxResult delQualityUnqualified(@RequestBody List<Integer> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | |
| | | import com.ruoyi.collaborativeApproval.service.SealApplicationManagementService; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.project.system.service.ISysNoticeService; |
| | |
| | | return AjaxResult.success(sealApplicationManagementService.listPage(page,sealApplicationManagement)); |
| | | } |
| | | |
| | | @Log(title = "ç¨ç« ç³è¯·", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | @Operation(summary = "æ°å¢") |
| | | public AjaxResult add(@RequestBody SealApplicationManagementDTO sealApplicationManagement){ |
| | |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @Log(title = "ç¨ç« ç³è¯·", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/update") |
| | | @Operation(summary = "ä¿®æ¹") |
| | | public AjaxResult update(@RequestBody SealApplicationManagementDTO sealApplicationManagement){ |
| | |
| | | return AjaxResult.success(sealApplicationManagementService.updateById(sealApplicationManagement)); |
| | | } |
| | | |
| | | @Log(title = "ç¨ç« ç³è¯·", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/delete") |
| | | @Operation(summary = "å é¤") |
| | | public AjaxResult delete(@PathVariable("ids") List<Long> ids){ |
| | |
| | | return AjaxResult.success(sealApplicationManagementService.removeBatchByIds(ids)); |
| | | } |
| | | |
| | | @Log(title = "ç¨ç« ç³è¯·", businessType = BusinessType.EXPORT) |
| | | @Operation(summary = "ç¨å°ç³è¯·ç®¡ç导åº") |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response) { |
| | |
| | | import com.ruoyi.collaborativeApproval.dto.StaffContactsPersonalDTO; |
| | | import com.ruoyi.collaborativeApproval.pojo.StaffContactsPersonal; |
| | | import com.ruoyi.collaborativeApproval.service.StaffContactsPersonalService; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import lombok.AllArgsConstructor; |
| | |
| | | return AjaxResult.success(staffContactsPersonalService.listPage(page, staffContactsPersonalDTO)); |
| | | } |
| | | |
| | | @Log(title = "æ°å¢åå·¥é讯å½", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | @Operation(summary = "æ°å¢") |
| | | public AjaxResult add(@RequestBody StaffContactsPersonal staffContactsPersonal) { |
| | | return AjaxResult.success(staffContactsPersonalService.save(staffContactsPersonal)); |
| | | } |
| | | |
| | | @Log(title = "å é¤åå·¥é讯å½", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/delete/{id}") |
| | | @Operation(summary = "å é¤") |
| | | public AjaxResult delete(@PathVariable("id") Long id) { |
| | |
| | | .or() |
| | | .eq(MeetApplication::getApplicationType, "notification"); |
| | | }); |
| | | if (Objects.nonNull(vo.getDate())) { |
| | | if (Objects.nonNull(vo.getMeetingDate())) { |
| | | alWrapper.and(wrapper -> { |
| | | wrapper.eq(MeetApplication::getMeetingDate, vo.getDate()); |
| | | wrapper.eq(MeetApplication::getMeetingDate, vo.getMeetingDate()); |
| | | }); |
| | | } |
| | | alWrapper.orderByAsc(MeetApplication::getStartTime); |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private Date meetingDate; |
| | | |
| | | private String date; |
| | | } |
| | |
| | | public enum StockOutQualifiedRecordTypeEnum implements BaseEnum<String> { |
| | | CUSTOMIZATION_STOCK_OUT("1", "åæ ¼èªå®ä¹åºåº"), |
| | | PRODUCTION_REPORT_STOCK_OUT("3", "ç产æ¥å·¥-åºåº"), |
| | | SALE_STOCK_OUT("8", "éå®-åºåº"), |
| | | PURCHASE_RETURN_STOCK_OUT("9", "éè´éè´§"), |
| | | CUSTOMIZATION_UNSTOCK_OUT("10", "ä¸åæ ¼èªå®ä¹åºåº"), |
| | | SALE_SHIP_STOCK_OUT("13", "éå®-åè´§åºåº"), |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.common.utils; |
| | | |
| | | import com.ruoyi.purchase.dto.ProcurementBusinessSummaryDto; |
| | | import com.ruoyi.purchase.vo.SupplierTransactionsDetailsVo; |
| | | import com.ruoyi.purchase.vo.SupplierTransactionsVo; |
| | | import com.ruoyi.sales.pojo.SalesLedgerProduct; |
| | | import com.ruoyi.sales.vo.CustomerTransactionsDetailsVo; |
| | | import com.ruoyi.sales.vo.CustomerTransactionsVo; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * éé¢ç²¾åº¦å·¥å
·ï¼ç»ä¸ä¿ç 6 ä½å°æ° |
| | | */ |
| | | public final class AmountUtils { |
| | | |
| | | public static final int AMOUNT_SCALE = 6; |
| | | public static final RoundingMode AMOUNT_ROUNDING = RoundingMode.HALF_UP; |
| | | |
| | | private AmountUtils() { |
| | | } |
| | | |
| | | public static BigDecimal scaleAmount(BigDecimal value) { |
| | | if (value == null) { |
| | | return BigDecimal.ZERO.setScale(AMOUNT_SCALE, AMOUNT_ROUNDING); |
| | | } |
| | | return value.setScale(AMOUNT_SCALE, AMOUNT_ROUNDING); |
| | | } |
| | | |
| | | public static BigDecimal calcTaxExclusiveTotalPrice(BigDecimal taxInclusiveTotalPrice, BigDecimal taxRate) { |
| | | if (taxInclusiveTotalPrice == null || taxRate == null) { |
| | | return scaleAmount(BigDecimal.ZERO); |
| | | } |
| | | BigDecimal divisor = BigDecimal.ONE.add( |
| | | taxRate.divide(BigDecimal.valueOf(100), AMOUNT_SCALE, AMOUNT_ROUNDING) |
| | | ); |
| | | return scaleAmount(taxInclusiveTotalPrice.divide(divisor, AMOUNT_SCALE, AMOUNT_ROUNDING)); |
| | | } |
| | | |
| | | public static void normalizeSalesLedgerProduct(SalesLedgerProduct product) { |
| | | if (product == null) { |
| | | return; |
| | | } |
| | | product.setTaxInclusiveUnitPrice(scaleAmount(product.getTaxInclusiveUnitPrice())); |
| | | product.setTaxInclusiveTotalPrice(scaleAmount(product.getTaxInclusiveTotalPrice())); |
| | | product.setTaxExclusiveTotalPrice(scaleAmount(product.getTaxExclusiveTotalPrice())); |
| | | } |
| | | |
| | | public static void normalizeSalesLedgerProducts(Collection<SalesLedgerProduct> products) { |
| | | if (products == null) { |
| | | return; |
| | | } |
| | | products.forEach(AmountUtils::normalizeSalesLedgerProduct); |
| | | } |
| | | |
| | | public static void normalizeContractAmount(Object entity) { |
| | | if (entity == null) { |
| | | return; |
| | | } |
| | | try { |
| | | java.lang.reflect.Field field = entity.getClass().getDeclaredField("contractAmount"); |
| | | field.setAccessible(true); |
| | | field.set(entity, scaleAmount((BigDecimal) field.get(entity))); |
| | | } catch (NoSuchFieldException ignored) { |
| | | } catch (Exception e) { |
| | | throw new RuntimeException("æ ååååéé¢å¤±è´¥", e); |
| | | } |
| | | } |
| | | |
| | | public static void normalizeSupplierTransaction(SupplierTransactionsVo vo) { |
| | | if (vo == null) { |
| | | return; |
| | | } |
| | | vo.setContractAmounts(scaleAmount(vo.getContractAmounts())); |
| | | vo.setShippedAmount(scaleAmount(vo.getShippedAmount())); |
| | | vo.setUnshippedAmount(scaleAmount(vo.getUnshippedAmount())); |
| | | } |
| | | |
| | | public static void normalizeSupplierTransactionDetail(SupplierTransactionsDetailsVo vo) { |
| | | if (vo == null) { |
| | | return; |
| | | } |
| | | vo.setContractAmount(scaleAmount(vo.getContractAmount())); |
| | | vo.setShippedAmount(scaleAmount(vo.getShippedAmount())); |
| | | vo.setUnshippedAmount(scaleAmount(vo.getUnshippedAmount())); |
| | | } |
| | | |
| | | public static void normalizeCustomerTransaction(CustomerTransactionsVo vo) { |
| | | if (vo == null) { |
| | | return; |
| | | } |
| | | vo.setContractAmounts(scaleAmount(vo.getContractAmounts())); |
| | | vo.setShippedAmount(scaleAmount(vo.getShippedAmount())); |
| | | vo.setUnshippedAmount(scaleAmount(vo.getUnshippedAmount())); |
| | | } |
| | | |
| | | public static void normalizeCustomerTransactionDetail(CustomerTransactionsDetailsVo vo) { |
| | | if (vo == null) { |
| | | return; |
| | | } |
| | | vo.setContractAmount(scaleAmount(vo.getContractAmount())); |
| | | vo.setShippedAmount(scaleAmount(vo.getShippedAmount())); |
| | | vo.setUnshippedAmount(scaleAmount(vo.getUnshippedAmount())); |
| | | } |
| | | |
| | | public static void normalizeProcurementBusinessSummary(ProcurementBusinessSummaryDto dto) { |
| | | if (dto == null) { |
| | | return; |
| | | } |
| | | dto.setPurchaseAmount(scaleAmount(dto.getPurchaseAmount())); |
| | | dto.setAveragePrice(scaleAmount(dto.getAveragePrice())); |
| | | dto.setReturnAmount(scaleAmount(dto.getReturnAmount())); |
| | | } |
| | | |
| | | public static void normalizeProcurementBusinessSummaryList(List<ProcurementBusinessSummaryDto> list) { |
| | | if (list == null) { |
| | | return; |
| | | } |
| | | list.forEach(AmountUtils::normalizeProcurementBusinessSummary); |
| | | } |
| | | } |
| | |
| | | import java.lang.management.ManagementFactory;
|
| | | import java.text.ParseException;
|
| | | import java.text.SimpleDateFormat;
|
| | | import java.time.*;
|
| | | import java.time.LocalDate;
|
| | | import java.time.LocalDateTime;
|
| | | import java.time.LocalTime;
|
| | | import java.time.ZoneId;
|
| | | import java.time.ZonedDateTime;
|
| | | import java.util.Date;
|
| | | import org.apache.commons.lang3.time.DateFormatUtils;
|
| | |
|
| | | /**
|
| | | * æ¶é´å·¥å
·ç±»
|
| | | *
|
| | | * |
| | | * @author ruoyi
|
| | | */
|
| | | public class DateUtils extends org.apache.commons.lang3.time.DateUtils
|
| | |
| | | public static String YYYY_MM_DD_HH_MM_SS = "yyyy-MM-dd HH:mm:ss";
|
| | |
|
| | | private static String[] parsePatterns = {
|
| | | "yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm", "yyyy-MM",
|
| | | "yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm", "yyyy-MM", |
| | | "yyyy/MM/dd", "yyyy/MM/dd HH:mm:ss", "yyyy/MM/dd HH:mm", "yyyy/MM",
|
| | | "yyyy.MM.dd", "yyyy.MM.dd HH:mm:ss", "yyyy.MM.dd HH:mm", "yyyy.MM"};
|
| | |
|
| | | /**
|
| | | * è·åå½åDate忥æ
|
| | | *
|
| | | * |
| | | * @return Date() å½åæ¥æ
|
| | | */
|
| | | public static Date getNowDate()
|
| | |
| | |
|
| | | public static LocalDate toLocalDate(Date date){
|
| | | if(date == null) return LocalDate.now();
|
| | | // java.sql.Date.toInstant() 伿 UnsupportedOperationExceptionï¼éå
转为 java.util.Date
|
| | | Instant instant = new java.util.Date(date.getTime()).toInstant();
|
| | | return instant.atZone(ZoneId.of("Asia/Shanghai"))
|
| | | // 2. æå®åºå®æ¶åºè½¬æ¢ï¼å¦ä¸å
«åºUTC+8ãUTCé¶æ¶åºï¼
|
| | | return date.toInstant()
|
| | | .atZone(ZoneId.of("Asia/Shanghai")) // ä¸å
«åºï¼å京/䏿µ·æ¶åºï¼
|
| | | // .atZone(ZoneId.of("UTC")) // å¯éï¼UTCé¶æ¶åº
|
| | | .toLocalDate();
|
| | | }
|
| | |
|
| | | /**
|
| | | * è·åå½åæ¥æ, é»è®¤æ ¼å¼ä¸ºyyyy-MM-dd
|
| | | *
|
| | | * |
| | | * @return String
|
| | | */
|
| | | public static String getDate()
|
| | |
| | | * @param <T> å®ä½ç±»å |
| | | * @return 订åç¼å· |
| | | */ |
| | | public static <T> String countTodayByCreateTime(BaseMapper<T> mapper,String preFix,String code, LocalDateTime createTime) { |
| | | if (createTime == null) { |
| | | createTime = LocalDateTime.now(); |
| | | } |
| | | LocalDate today = createTime.toLocalDate(); |
| | | public static <T> String countTodayByCreateTime(BaseMapper<T> mapper,String preFix,String code) { |
| | | LocalDate today = LocalDate.now(); |
| | | LocalDateTime todayStart = today.atStartOfDay(); |
| | | LocalDateTime tomorrowStart = today.plusDays(1).atStartOfDay(); |
| | | String dateStr = today.format(DateTimeFormatter.BASIC_ISO_DATE); |
| | |
| | | * @param <T> å®ä½ç±»æ³å |
| | | * @return å½å¤©è®°å½æ°é |
| | | */ |
| | | public static <T> String countAfterServiceTodayByCreateTime(BaseMapper<T> mapper,String preFix, LocalDateTime createTime) { |
| | | if (createTime == null) { |
| | | createTime = LocalDateTime.now(); |
| | | } |
| | | LocalDate localDate = createTime.toLocalDate(); |
| | | public static <T> String countAfterServiceTodayByCreateTime(BaseMapper<T> mapper,String preFix) { |
| | | LocalDateTime todayStart = LocalDateTime.of( |
| | | localDate, |
| | | LocalDateTime.now().toLocalDate(), |
| | | LocalTime.MIN |
| | | ); |
| | | LocalDateTime todayEnd = LocalDateTime.of( |
| | | localDate, |
| | | LocalDateTime.now().toLocalDate(), |
| | | LocalTime.MAX |
| | | ); |
| | | |
| | |
| | | .lt("create_time", endDate); |
| | | |
| | | Long aLong = mapper.selectCount(queryWrapper); |
| | | return preFix + localDate.format(DateTimeFormatter.ISO_LOCAL_DATE).replaceAll("-", "") + String.format("%03d", (aLong + 1)); |
| | | return preFix + LocalDate.now().format(DateTimeFormatter.ISO_LOCAL_DATE).replaceAll("-", "") + String.format("%03d", (aLong + 1)); |
| | | } |
| | | } |
| | |
| | | wrapper.like(CustomerVisits::getVisitingPeople, customerVisits.getVisitingPeople()); |
| | | } |
| | | } |
| | | wrapper.orderByDesc(CustomerVisits::getId); |
| | | |
| | | return customerVisitsMapper.selectPage(page, wrapper); |
| | | } |
| | | |
| | |
| | | import com.ruoyi.device.dto.DeviceDefectRecordDto; |
| | | import com.ruoyi.device.pojo.DeviceDefectRecord; |
| | | import com.ruoyi.device.service.DeviceDefectRecordService; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | |
| | | return AjaxResult.success(deviceDefectRecordService.listPage(new Page<>(1,-1),deviceDefectRecordDto)); |
| | | } |
| | | |
| | | @Log(title = "æ°å¢è®¾å¤ç¼ºé·è®°å½", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | @Operation(summary = "æ·»å 设å¤ç¼ºé·è®°å½") |
| | | public AjaxResult add(@RequestBody DeviceDefectRecord deviceDefectRecord) { |
| | | return AjaxResult.success(deviceDefectRecordService.add(deviceDefectRecord)); |
| | | } |
| | | @Log(title = "ä¿®æ¹è®¾å¤ç¼ºé·è®°å½", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/update") |
| | | @Operation(summary = "ä¿®æ¹è®¾å¤ç¼ºé·è®°å½") |
| | | public AjaxResult update(@RequestBody DeviceDefectRecord deviceDefectRecord) { |
| | | return AjaxResult.success(deviceDefectRecordService.updateByDDR(deviceDefectRecord)); |
| | | } |
| | | @Log(title = "å é¤è®¾å¤ç¼ºé·è®°å½", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/delete") |
| | | @Operation(summary = "å é¤è®¾å¤ç¼ºé·è®°å½") |
| | | public AjaxResult delete(@PathVariable Long id) { |
| | |
| | | import com.ruoyi.device.pojo.DeviceMaintenance; |
| | | import com.ruoyi.device.service.IDeviceLedgerService; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Anonymous; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | |
| | | return AjaxResult.success(deviceLedgerService.queryPage(page, deviceLedger)); |
| | | } |
| | | |
| | | @Log(title = "æ°å¢è®¾å¤å°è´¦", businessType = BusinessType.INSERT) |
| | | @PostMapping() |
| | | @Operation(summary = "æ·»å 设å¤å°è´¦") |
| | | public AjaxResult add(@RequestBody DeviceLedgerDto deviceLedgerDto) { |
| | |
| | | return AjaxResult.success(deviceLedgerDto); |
| | | } |
| | | |
| | | @Log(title = "ä¿®æ¹è®¾å¤å°è´¦", businessType = BusinessType.UPDATE) |
| | | @PutMapping() |
| | | @Operation(summary = "ä¿®æ¹è®¾å¤å°è´¦") |
| | | public AjaxResult update(@RequestBody DeviceLedgerDto deviceLedgerDto) { |
| | | return deviceLedgerService.updateDeviceLedger(deviceLedgerDto); |
| | | } |
| | | |
| | | @Log(title = "å é¤è®¾å¤å°è´¦", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | @Operation(summary = "å é¤è®¾å¤å°è´¦") |
| | | public AjaxResult delete(@PathVariable("ids") ArrayList<Long> ids) { |
| | |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @Log(title = "导åºè®¾å¤å°è´¦", businessType = BusinessType.EXPORT) |
| | | @PostMapping("export") |
| | | @Operation(summary = "导åºè®¾å¤å°è´¦") |
| | | public void export(HttpServletResponse response, Long[] ids) { |
| | | deviceLedgerService.export(response, ids); |
| | | } |
| | | |
| | | @Log(title = "ä¸è½½è®¾å¤å°è´¦æ¨¡æ¿", businessType = BusinessType.EXPORT) |
| | | @Operation(summary = "ä¸è½½æ¨¡æ¿") |
| | | @PostMapping("/downloadTemplate") |
| | | public void downloadTemplate(HttpServletResponse response) { |
| | |
| | | util.importTemplateExcel(response, "设å¤å¯¼å
¥æ¨¡æ¿"); |
| | | } |
| | | |
| | | @Log(title = "导å
¥è®¾å¤å°è´¦", businessType = BusinessType.IMPORT) |
| | | @PostMapping("/import") |
| | | @Operation(summary = "导å
¥è®¾å¤å°è´¦") |
| | | public AjaxResult importData(MultipartFile file) throws IOException { |
| | |
| | | import com.ruoyi.device.pojo.DeviceMaintenance; |
| | | import com.ruoyi.device.service.IDeviceLedgerService; |
| | | import com.ruoyi.device.service.IDeviceMaintenanceService; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | |
| | | return AjaxResult.success(deviceMaintenanceService.queryPage(page,deviceMaintenanceDto)); |
| | | } |
| | | |
| | | @Log(title = "æ°å¢è®¾å¤ä¿å
»", businessType = BusinessType.INSERT) |
| | | @PostMapping() |
| | | @Operation(summary = "æ·»å 设å¤ä¿å
»") |
| | | public AjaxResult add(@RequestBody DeviceMaintenanceDto deviceMaintenance) { |
| | |
| | | return AjaxResult.success(deviceMaintenanceService.detailById(id)); |
| | | } |
| | | |
| | | @Log(title = "ä¿®æ¹è®¾å¤ä¿å
»", businessType = BusinessType.UPDATE) |
| | | @PutMapping () |
| | | @Operation(summary = "ä¿®æ¹è®¾å¤ä¿å
»") |
| | | public AjaxResult update(@RequestBody DeviceMaintenanceDto deviceMaintenance) { |
| | |
| | | return deviceMaintenanceService.updateDeviceDeviceMaintenance(deviceMaintenance); |
| | | } |
| | | |
| | | @Log(title = "æ§è¡è®¾å¤ä¿å
»", businessType = BusinessType.UPDATE) |
| | | @PostMapping ("maintenance") |
| | | @Operation(summary = "ä¿®æ¹è®¾å¤ä¿å
»") |
| | | public AjaxResult maintenance(@RequestBody DeviceMaintenanceDto deviceMaintenance) { |
| | |
| | | } |
| | | |
| | | |
| | | @Log(title = "å é¤è®¾å¤ä¿å
»", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | @Operation(summary = "å é¤è®¾å¤ä¿å
»") |
| | | public AjaxResult delete(@PathVariable("ids") Long[] ids) { |
| | |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @Log(title = "导åºè®¾å¤ä¿å
»", businessType = BusinessType.EXPORT) |
| | | @PostMapping("export") |
| | | @Operation(summary = "导åºè®¾å¤ä¿å
»") |
| | | public void export(HttpServletResponse response, Long[] ids) { |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.device.pojo.DeviceMaintenanceFile; |
| | | import com.ruoyi.device.service.DeviceMaintenanceFileService; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import org.springframework.util.CollectionUtils; |
| | |
| | | * @param deviceMaintenanceFile |
| | | * @return |
| | | */ |
| | | @Log(title = "æ°å¢è®¾å¤ä¿å
»éä»¶", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody DeviceMaintenanceFile deviceMaintenanceFile) { |
| | | return AjaxResult.success(deviceMaintenanceFileService.save(deviceMaintenanceFile)); |
| | |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @Log(title = "å é¤è®¾å¤ä¿å
»éä»¶", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/del") |
| | | public AjaxResult delQualityUnqualified(@RequestBody List<Integer> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | |
| | | import com.ruoyi.device.dto.DeviceRepairDto; |
| | | import com.ruoyi.device.pojo.DeviceRepair; |
| | | import com.ruoyi.device.service.IDeviceRepairService; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | |
| | | return AjaxResult.success(deviceRepairService.queryPage(page,deviceRepairDto)); |
| | | } |
| | | |
| | | @Log(title = "æ°å¢è®¾å¤æ¥ä¿®", businessType = BusinessType.INSERT) |
| | | @PostMapping() |
| | | @Operation(summary = "æ·»å è®¾å¤æ¥ä¿®") |
| | | public AjaxResult add( @RequestBody DeviceRepairDto deviceRepairDto) { |
| | |
| | | return AjaxResult.success(deviceRepairService.detailById(id)); |
| | | } |
| | | |
| | | @Log(title = "ä¿®æ¹è®¾å¤æ¥ä¿®", businessType = BusinessType.UPDATE) |
| | | @PutMapping () |
| | | @Operation(summary = "ä¿®æ¹è®¾å¤æ¥ä¿®") |
| | | public AjaxResult update( @RequestBody DeviceRepairDto deviceRepairDto) { |
| | | return deviceRepairService.updateDeviceRepair(deviceRepairDto); |
| | | } |
| | | |
| | | @Log(title = "设å¤ç»´ä¿®", businessType = BusinessType.UPDATE) |
| | | @PostMapping ("/repair") |
| | | @Operation(summary = "设å¤ç»´ä¿®") |
| | | public AjaxResult repair( @RequestBody DeviceRepairDto deviceRepairDto) { |
| | | return deviceRepairService.confirmRepair(deviceRepairDto); |
| | | } |
| | | |
| | | @Log(title = "è®¾å¤æ¥ä¿®éªæ¶", businessType = BusinessType.UPDATE) |
| | | @PostMapping ("/acceptance") |
| | | @Operation(summary = "è®¾å¤æ¥ä¿®éªæ¶å®¡æ¹") |
| | | public AjaxResult acceptance(@RequestBody DeviceRepairDto deviceRepairDto) { |
| | | return deviceRepairService.approveRepairAcceptance(deviceRepairDto); |
| | | } |
| | | |
| | | @Log(title = "å é¤è®¾å¤æ¥ä¿®", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | @Operation(summary = "å é¤è®¾å¤æ¥ä¿®") |
| | | public AjaxResult delete(@PathVariable("ids") Long[] ids) { |
| | |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @Log(title = "导åºè®¾å¤æ¥ä¿®", businessType = BusinessType.EXPORT) |
| | | @PostMapping("export") |
| | | @Operation(summary = "导åºè®¾å¤æ¥ä¿®") |
| | | public void export(HttpServletResponse response, Long[] ids) { |
| | |
| | | @Schema(description = "æåæ§è¡æ¶é´") |
| | | private LocalDateTime lastExecutionTime; |
| | | |
| | | @Schema(description = "æ¯å¦æ¿æ´»") |
| | | private boolean isActive; |
| | | @Schema(description = "æ¯å¦æ¿æ´», 1=å¯ç¨, 0=åç¨") |
| | | private Integer isActive; |
| | | |
| | | @Schema(description = "夿³¨") |
| | | @Excel(name = "夿³¨") |
| | |
| | | private final Scheduler scheduler; |
| | | |
| | | /** |
| | | * æ·»å æ°ä»»å¡å°è°åº¦å¨ |
| | | * æ·»å ææ´æ°ä»»å¡å°è°åº¦å¨ |
| | | */ |
| | | public void scheduleMaintenanceTask(MaintenanceTask task){ |
| | | try { |
| | | JobDetail jobDetail = buildJobDetail(task); |
| | | Trigger trigger = buildJobTrigger(task, jobDetail); |
| | | scheduler.scheduleJob(jobDetail, trigger); |
| | | |
| | | // æ£æ¥è§¦å卿¯å¦å·²åå¨ |
| | | TriggerKey triggerKey = trigger.getKey(); |
| | | Trigger existingTrigger = scheduler.getTrigger(triggerKey); |
| | | |
| | | if (existingTrigger != null) { |
| | | // 触åå¨å·²åå¨ï¼æ´æ°å® |
| | | scheduler.rescheduleJob(triggerKey, trigger); |
| | | } else { |
| | | // 触åå¨ä¸åå¨ï¼å
ç¡®ä¿ Job åå¨ï¼ç¶åè°åº¦è§¦åå¨ |
| | | scheduler.addJob(jobDetail, true); |
| | | scheduler.scheduleJob(trigger); |
| | | } |
| | | }catch (SchedulerException e){ |
| | | log.error("SchedulerException scheduleMaintenanceTask ERROR",e); |
| | | throw new RuntimeException(e); |
| | |
| | | try{ |
| | | TriggerKey triggerKey = new TriggerKey("triggerMaintenanceTask_" + task.getId()); |
| | | |
| | | // è·åç°æè§¦åå¨å¹¶è½¬æ¢ä¸º CronTrigger |
| | | // è·åç°æè§¦åå¨ |
| | | Trigger oldTrigger = scheduler.getTrigger(triggerKey); |
| | | |
| | | // æå»ºæ°ç JobDetail å Trigger |
| | | JobDetail jobDetail = buildJobDetail(task); |
| | | Trigger newTrigger = buildJobTrigger(task, jobDetail); |
| | | |
| | | if (oldTrigger == null) { |
| | | // 触åå¨ä¸åå¨ï¼è¯´æä»»å¡ä¹å被å é¤è¿ |
| | | // å
ç¡®ä¿ Job åå¨ï¼ç¶åè°åº¦è§¦åå¨ |
| | | scheduler.addJob(jobDetail, true); |
| | | scheduler.scheduleJob(newTrigger); |
| | | return; |
| | | } |
| | | |
| | | // 触åå¨åå¨ï¼ç´æ¥æ´æ° |
| | | if (!(oldTrigger instanceof CronTrigger)) { |
| | | throw new SchedulerException("Existing trigger is not a CronTrigger"); |
| | | } |
| | | |
| | | // 3. æå»ºCronTriggerï¼ç¡®ä¿æä¹
åé
ç½® |
| | | CronTrigger newTrigger = TriggerBuilder.newTrigger() |
| | | .withIdentity(triggerKey) // å¯ä¸æ è¯ï¼ç¨äºæä¹
ååå¨ |
| | | .withDescription(task.getTaskName() + "_TRIGGER") // 触åå¨æè¿° |
| | | .forJob(oldTrigger.getJobKey()) // å
³è对åºçJob |
| | | // æå»ºæ°ç CronTrigger |
| | | CronTrigger cronTrigger = TriggerBuilder.newTrigger() |
| | | .withIdentity(triggerKey) |
| | | .withDescription(task.getTaskName() + "_TRIGGER") |
| | | .forJob(oldTrigger.getJobKey()) |
| | | .withSchedule(CronScheduleBuilder |
| | | .cronSchedule(convertToCronExpression(task)) // éè¿æ§è¡æ¶ççç¥ï¼æ ¹æ®ä¸å¡è°æ´ï¼ |
| | | .cronSchedule(convertToCronExpression(task)) |
| | | .withMisfireHandlingInstructionDoNothing() |
| | | ) |
| | | // 4. 设置å¼å§æ¶é´ï¼è¥ä¸ºnullåç«å³çæï¼ |
| | | .startAt(task.getNextExecutionTime() != null |
| | | ? Date.from(task.getNextExecutionTime().atZone(ZoneId.systemDefault()).toInstant()) |
| | | : new Date()) |
| | | .build(); |
| | | scheduler.rescheduleJob(triggerKey, newTrigger); |
| | | |
| | | scheduler.rescheduleJob(triggerKey, cronTrigger); |
| | | }catch (SchedulerException e){ |
| | | log.error("SchedulerException rescheduleMaintenanceTask ERROR",e); |
| | | throw new RuntimeException(e); |
| | |
| | | public void unscheduleMaintenanceTask(Long taskId){ |
| | | try { |
| | | JobKey jobKey = new JobKey("MaintenanceTask_" + taskId); |
| | | // å é¤ Job ä¼èªå¨å é¤å
³èç Trigger |
| | | scheduler.deleteJob(jobKey); |
| | | }catch (SchedulerException e){ |
| | | log.error("SchedulerException unscheduleMaintenanceTask ERROR",e); |
| | |
| | | package com.ruoyi.device.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.utils.bean.BeanUtils; |
| | |
| | | |
| | | @Override |
| | | public AjaxResult listPage(Page page, MaintenanceTask maintenanceTask) { |
| | | Page<MaintenanceTask> taskPage = maintenanceTaskMapper.selectPage(page, new QueryWrapper<MaintenanceTask>().orderByDesc("create_time")); |
| | | LambdaQueryWrapper<MaintenanceTask> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.orderByDesc(MaintenanceTask::getId); |
| | | Page<MaintenanceTask> taskPage = maintenanceTaskMapper.selectPage(page, queryWrapper); |
| | | // 2. å¦ææ²¡ææ°æ®ï¼ç´æ¥è¿å空å页 |
| | | if (taskPage.getRecords().isEmpty()) { |
| | | return AjaxResult.success(taskPage); |
| | |
| | | |
| | | @Override |
| | | public AjaxResult add(MaintenanceTask maintenanceTask) { |
| | | maintenanceTask.setActive(true); |
| | | // 计ç®é¦æ¬¡æ§è¡æ¶é´ |
| | | TimingTask task = new TimingTask(); |
| | | task.setFrequencyType(maintenanceTask.getFrequencyType()); |
| | |
| | | maintenanceTask.setNextExecutionTime(firstExecutionTime); |
| | | int insert = maintenanceTaskMapper.insert(maintenanceTask); |
| | | if (insert > 0) { |
| | | maintenanceTaskScheduler.scheduleMaintenanceTask(maintenanceTask); |
| | | // åªæå½ isActive 为 1 æ¶ææ·»å å°å®æ¶ä»»å¡è°åº¦å¨ |
| | | if (maintenanceTask.getIsActive() != null && maintenanceTask.getIsActive() == 1) { |
| | | maintenanceTaskScheduler.scheduleMaintenanceTask(maintenanceTask); |
| | | } |
| | | } |
| | | return AjaxResult.success("æ·»å æå"); |
| | | } |
| | |
| | | if (maintenanceTask1 == null) { |
| | | return AjaxResult.warn("æ²¡ææ¤æ°æ®"); |
| | | } |
| | | |
| | | // ä¿åæ§ç isActive ç¶æ |
| | | Integer oldIsActive = maintenanceTask1.getIsActive(); |
| | | Integer newIsActive = maintenanceTask.getIsActive(); |
| | | |
| | | BeanUtils.copyProperties(maintenanceTask, maintenanceTask1); |
| | | int update = maintenanceTaskMapper.updateById(maintenanceTask1); |
| | | if (update > 0) { |
| | | maintenanceTaskScheduler.rescheduleMaintenanceTask(maintenanceTask1); |
| | | // å¤ç isActive ç¶æåå |
| | | if (newIsActive != null && newIsActive == 1) { |
| | | // æ°ç¶æä¸ºå¯ç¨ï¼æ·»å å°å®æ¶ä»»å¡è°åº¦å¨ |
| | | if (oldIsActive == null || oldIsActive != 1) { |
| | | // 仿ªå¯ç¨å为å¯ç¨ï¼æ·»å å°è°åº¦å¨ |
| | | maintenanceTaskScheduler.scheduleMaintenanceTask(maintenanceTask1); |
| | | } else { |
| | | // å·²ç»å¯ç¨ï¼æ´æ°è°åº¦å¨ä¸çä»»å¡ |
| | | maintenanceTaskScheduler.rescheduleMaintenanceTask(maintenanceTask1); |
| | | } |
| | | } else { |
| | | // æ°ç¶æä¸ºåç¨ï¼ä»å®æ¶ä»»å¡è°åº¦å¨ä¸ç§»é¤ |
| | | if (oldIsActive != null && oldIsActive == 1) { |
| | | maintenanceTaskScheduler.unscheduleMaintenanceTask(maintenanceTask1.getId()); |
| | | } |
| | | } |
| | | } |
| | | return AjaxResult.success("æ´æ°æå"); |
| | | } |
| | | |
| | | @Override |
| | | public AjaxResult delete(List<Long> ids) { |
| | | // å
ä»å®æ¶ä»»å¡è°åº¦å¨ä¸ç§»é¤ææå¾
å é¤çä»»å¡ |
| | | ids.forEach(id -> { |
| | | try { |
| | | maintenanceTaskScheduler.unscheduleMaintenanceTask(id); |
| | | } catch (Exception e) { |
| | | log.error("å é¤å®æ¶ä»»å¡è°åº¦å¤±è´¥, id: {}", id, e); |
| | | } |
| | | }); |
| | | |
| | | // å仿°æ®åºä¸å é¤è®°å½ |
| | | int delete = maintenanceTaskMapper.deleteBatchIds(ids); |
| | | if (delete > 0) { |
| | | ids.forEach(id -> { |
| | | maintenanceTaskScheduler.unscheduleMaintenanceTask(id); |
| | | }); |
| | | return AjaxResult.success("å 餿å"); |
| | | } |
| | | return AjaxResult.success("å 餿å"); |
| | | return AjaxResult.error("å é¤å¤±è´¥"); |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.framework.config; |
| | | |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.fasterxml.jackson.databind.SerializationFeature; |
| | | import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; |
| | | import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer; |
| | | import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; |
| | | import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer; |
| | | import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; |
| | | import org.mybatis.spring.annotation.MapperScan; |
| | | import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.context.annotation.EnableAspectJAutoProxy; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.TimeZone; |
| | | |
| | | /** |
| | | * ç¨åºæ³¨è§£é
ç½® |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | @Configuration |
| | | // 表示éè¿aopæ¡æ¶æ´é²è¯¥ä»£ç对象,AopContextè½å¤è®¿é® |
| | | @EnableAspectJAutoProxy(exposeProxy = true) |
| | | // æå®è¦æ«æçMapperç±»çå
çè·¯å¾ |
| | | @MapperScan("com.ruoyi.**.mapper") |
| | | public class ApplicationConfig { |
| | | /** |
| | | * æ¶åºé
ç½® |
| | | */ |
| | | @Bean |
| | | public Jackson2ObjectMapperBuilderCustomizer jacksonObjectMapperCustomization() { |
| | | return jacksonObjectMapperBuilder -> jacksonObjectMapperBuilder.timeZone(TimeZone.getDefault()); |
| | | } |
| | | |
| | | @Bean |
| | | public ObjectMapper objectMapper() { |
| | | ObjectMapper mapper = new ObjectMapper(); |
| | | // å
¨å±å¿½ç¥æªç¥å段 |
| | | mapper.configure(com.fasterxml.jackson.databind.DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); |
| | | JavaTimeModule module = new JavaTimeModule(); |
| | | // LocalDateTimeï¼æ¯æ yyyy-MM-dd HH:mm:ss |
| | | DateTimeFormatter dateTimeFormatter = |
| | | DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); |
| | | module.addDeserializer(LocalDateTime.class, |
| | | new LocalDateTimeDeserializer(dateTimeFormatter)); |
| | | module.addSerializer(LocalDateTime.class, |
| | | new LocalDateTimeSerializer(dateTimeFormatter)); |
| | | // LocalDateï¼æ¯æ yyyy-MM-dd |
| | | DateTimeFormatter dateFormatter = |
| | | DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | | module.addDeserializer(LocalDate.class, |
| | | new LocalDateDeserializer(dateFormatter)); |
| | | module.addSerializer(LocalDate.class, |
| | | new LocalDateSerializer(dateFormatter)); |
| | | mapper.registerModule(module); |
| | | mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); |
| | | return mapper; |
| | | } |
| | | } |
| | | package com.ruoyi.framework.config;
|
| | |
|
| | | import java.util.TimeZone;
|
| | | import org.mybatis.spring.annotation.MapperScan;
|
| | | import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer;
|
| | | import org.springframework.context.annotation.Bean;
|
| | | import org.springframework.context.annotation.Configuration;
|
| | | import org.springframework.context.annotation.EnableAspectJAutoProxy;
|
| | |
|
| | | /**
|
| | | * ç¨åºæ³¨è§£é
ç½®
|
| | | *
|
| | | * @author ruoyi
|
| | | */
|
| | | @Configuration
|
| | | // 表示éè¿aopæ¡æ¶æ´é²è¯¥ä»£ç对象,AopContextè½å¤è®¿é®
|
| | | @EnableAspectJAutoProxy(exposeProxy = true)
|
| | | // æå®è¦æ«æçMapperç±»çå
çè·¯å¾
|
| | | @MapperScan("com.ruoyi.**.mapper")
|
| | | public class ApplicationConfig
|
| | | {
|
| | | /**
|
| | | * æ¶åºé
ç½®
|
| | | */
|
| | | @Bean
|
| | | public Jackson2ObjectMapperBuilderCustomizer jacksonObjectMapperCustomization()
|
| | | {
|
| | | return jacksonObjectMapperBuilder -> jacksonObjectMapperBuilder.timeZone(TimeZone.getDefault());
|
| | | }
|
| | | }
|
| | |
| | | private static final Integer ORDER_STATUS_WAIT = 1; |
| | | private static final Integer ORDER_STATUS_RUNNING = 2; |
| | | private static final Integer ORDER_STATUS_COMPLETED = 3; |
| | | //private static final Integer ORDER_STATUS_END = 4; // 已忶 |
| | | private static final Integer ORDER_STATUS_END = 5; |
| | | private static final Integer ORDER_STATUS_PAUSED = 4; |
| | | |
| | | /********************************************************åºç¡ç±»*****************************************************/ |
| | | @GetMapping("/todos") |
| | |
| | | |
| | | @GetMapping("/processOutputAnalysis") |
| | | @Operation(summary = "å·¥åºäº§åºåæ") |
| | | public R processOutputAnalysis(@DefaultType Integer type){ |
| | | List<MapDto> list = homeService.processOutputAnalysis(type); |
| | | public R processOutputAnalysis(@DefaultType Integer dateType){ |
| | | List<MapDto> list = homeService.processOutputAnalysis(dateType); |
| | | return R.ok(list); |
| | | } |
| | | |
| | |
| | | } |
| | | Integer statusFromParam = parseOrderStatus(status); |
| | | if (!isBlank(status) && statusFromParam == null && !"all".equalsIgnoreCase(status.trim())) { |
| | | return R.fail("statusåæ°ä¸åæ³ï¼å¯éå¼ï¼all/waiting/inProgress/completed/end æ 1/2/3/5"); |
| | | return R.fail("statusåæ°ä¸åæ³ï¼å¯éå¼ï¼all/waiting/inProgress/completed/paused æ 1/2/3/4"); |
| | | } |
| | | Integer queryStatus = resolveOrderStatus(status, tab); |
| | | |
| | | long safePageNum = pageNum == null || pageNum < 1 ? 1 : pageNum; |
| | | boolean queryAll = pageSize != null && pageSize == -1; |
| | | long safePageSize = queryAll ? -1 : (pageSize == null || pageSize < 1 ? 10 : Math.min(pageSize, 50)); |
| | | long offset = queryAll ? 0 : (safePageNum - 1) * safePageSize; |
| | | long safePageSize = pageSize == null || pageSize < 1 ? 10 : Math.min(pageSize, 50); |
| | | long offset = (safePageNum - 1) * safePageSize; |
| | | LocalDateTime startTime = queryDate == null ? null : queryDate.atStartOfDay(); |
| | | LocalDateTime endTime = queryDate == null ? null : queryDate.plusDays(1).atStartOfDay(); |
| | | |
| | |
| | | long waitingCount = 0L; |
| | | long inProgressCount = 0L; |
| | | long completedCount = 0L; |
| | | long endCount = 0L; |
| | | long pausedCount = 0L; |
| | | List<Map<String, Object>> statusCountRows = productionOrderMapper.countHomeOrderProgressByStatus(startTime, endTime); |
| | | if (statusCountRows != null) { |
| | | for (Map<String, Object> countRow : statusCountRows) { |
| | |
| | | inProgressCount = cnt; |
| | | } else if (Objects.equals(statusKey, ORDER_STATUS_COMPLETED)) { |
| | | completedCount = cnt; |
| | | } else if (Objects.equals(statusKey, ORDER_STATUS_END)) { |
| | | endCount = cnt; |
| | | } else if (Objects.equals(statusKey, ORDER_STATUS_PAUSED)) { |
| | | pausedCount = cnt; |
| | | } |
| | | } |
| | | } |
| | |
| | | result.put("tab", mapOrderTab(queryStatus)); |
| | | result.put("status", mapOrderStatus(queryStatus)); |
| | | result.put("bizDate", queryDate == null ? null : queryDate.format(DATE_FORMATTER)); |
| | | result.put("total", toLong(productionOrderMapper.countHomeOrderProgress(null, startTime, endTime))); |
| | | result.put("total", toLong(productionOrderMapper.countHomeOrderProgress(queryStatus, startTime, endTime))); |
| | | result.put("pageNum", safePageNum); |
| | | result.put("pageSize", safePageSize); |
| | | result.put("waitingCount", waitingCount); |
| | | result.put("inProgressCount", inProgressCount); |
| | | result.put("completedCount", completedCount); |
| | | result.put("endCount", endCount); |
| | | result.put("pausedCount", pausedCount); |
| | | result.put("records", records); |
| | | return R.ok(result); |
| | | } |
| | |
| | | if ("3".equals(normalized) || "completed".equals(normalized)) { |
| | | return ORDER_STATUS_COMPLETED; |
| | | } |
| | | if ("5".equals(normalized) || "end".equals(normalized)) { |
| | | return ORDER_STATUS_END; |
| | | if ("4".equals(normalized) || "paused".equals(normalized)) { |
| | | return ORDER_STATUS_PAUSED; |
| | | } |
| | | return null; |
| | | } |
| | |
| | | if (Objects.equals(status, ORDER_STATUS_COMPLETED)) { |
| | | return "completed"; |
| | | } |
| | | if (Objects.equals(status, ORDER_STATUS_END)) { |
| | | return "end"; |
| | | if (Objects.equals(status, ORDER_STATUS_PAUSED)) { |
| | | return "paused"; |
| | | } |
| | | if (Objects.equals(status, ORDER_STATUS_WAIT)) { |
| | | return "waiting"; |
| | |
| | | if (Objects.equals(status, ORDER_STATUS_COMPLETED)) { |
| | | return "completed"; |
| | | } |
| | | if (Objects.equals(status, ORDER_STATUS_END)) { |
| | | return "end"; |
| | | if (Objects.equals(status, ORDER_STATUS_PAUSED)) { |
| | | return "paused"; |
| | | } |
| | | return "all"; |
| | | } |
| | |
| | | if (Objects.equals(status, ORDER_STATUS_COMPLETED)) { |
| | | return "已宿"; |
| | | } |
| | | if (Objects.equals(status, ORDER_STATUS_END)) { |
| | | return "å·²ç»æ"; |
| | | if (Objects.equals(status, ORDER_STATUS_PAUSED)) { |
| | | return "å·²æå"; |
| | | } |
| | | return "æªç¥"; |
| | | } |
| | |
| | | .select(ProductionOrder::getQuantity, ProductionOrder::getCompleteQuantity) |
| | | .ge(ProductionOrder::getCreateTime, day.atStartOfDay()) |
| | | .lt(ProductionOrder::getCreateTime, day.plusDays(1).atStartOfDay()) |
| | | .ne(ProductionOrder::getStatus, ORDER_STATUS_END)); |
| | | .ne(ProductionOrder::getStatus, ORDER_STATUS_PAUSED)); |
| | | |
| | | BigDecimal totalQuantity = BigDecimal.ZERO; |
| | | BigDecimal totalCompleteQuantity = BigDecimal.ZERO; |
| | |
| | | import com.ruoyi.account.pojo.purchase.AccountPurchasePayment; |
| | | import com.ruoyi.account.pojo.sales.AccountSalesCollection; |
| | | import com.ruoyi.approve.mapper.ApproveProcessMapper; |
| | | import com.ruoyi.approve.mapper.ApprovalInstanceMapper; |
| | | import com.ruoyi.approve.mapper.ApprovalTaskMapper; |
| | | import com.ruoyi.approve.pojo.ApproveProcess; |
| | | import com.ruoyi.approve.pojo.ApprovalInstance; |
| | | import com.ruoyi.approve.pojo.ApprovalTask; |
| | | import com.ruoyi.basic.mapper.CustomerMapper; |
| | | import com.ruoyi.basic.mapper.ProductMapper; |
| | | import com.ruoyi.basic.mapper.SupplierManageMapper; |
| | |
| | | import com.ruoyi.collaborativeApproval.mapper.NoticeMapper; |
| | | import com.ruoyi.collaborativeApproval.pojo.Notice; |
| | | import com.ruoyi.common.enums.ApproveTypeEnum; |
| | | import com.ruoyi.common.enums.TypeEnums; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.device.mapper.DeviceRepairMapper; |
| | |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.math.BigDecimal; |
| | |
| | | private final QualityInspectMapper qualityStatisticsMapper; |
| | | |
| | | private final ApproveProcessMapper approveProcessMapper; |
| | | |
| | | private final ApprovalTaskMapper approvalTaskMapper; |
| | | |
| | | private final ApprovalInstanceMapper approvalInstanceMapper; |
| | | |
| | | private final SysDeptMapper sysDeptMapper; |
| | | |
| | |
| | | @Override |
| | | public List<ApproveProcess> todos() throws ParseException { |
| | | LoginUser loginUser = SecurityUtils.getLoginUser(); |
| | | List<ApproveProcess> approveProcesses = new ArrayList<>(); |
| | | |
| | | // æ¥è¯¢æ§å®¡æ¹è¡¨ï¼approve_processï¼ |
| | | LambdaQueryWrapper<ApproveProcess> approveProcessLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | approveProcessLambdaQueryWrapper.eq(ApproveProcess::getApproveDelete, 0) |
| | | .eq(ApproveProcess::getApproveUserCurrentId, loginUser.getUserId()) |
| | | .ne(ApproveProcess::getApproveStatus, 2); |
| | | List<ApproveProcess> oldList = approveProcessMapper.selectList(approveProcessLambdaQueryWrapper); |
| | | if (!CollectionUtils.isEmpty(oldList)) { |
| | | oldList.forEach(a -> { |
| | | if (a.getApproveType() != null) { |
| | | a.setApproveTypeName(ApproveTypeEnum.getNameByCode(a.getApproveType())); |
| | | } |
| | | }); |
| | | approveProcesses.addAll(oldList); |
| | | // .eq(ApproveProcess::getTenantId, loginUser.getTenantId()); |
| | | List<ApproveProcess> approveProcesses = approveProcessMapper.selectList(approveProcessLambdaQueryWrapper); |
| | | if (CollectionUtils.isEmpty(approveProcesses)) { |
| | | approveProcesses = new ArrayList<>(); |
| | | } |
| | | |
| | | // æ¥è¯¢æ°å®¡æ¹è¡¨ï¼approval_task + approval_instanceï¼ |
| | | List<ApprovalTask> pendingTasks = approvalTaskMapper.selectList(new LambdaQueryWrapper<ApprovalTask>() |
| | | .eq(ApprovalTask::getApproverId, loginUser.getUserId()) |
| | | .eq(ApprovalTask::getTaskStatus, "PENDING") |
| | | .eq(ApprovalTask::getDeleted, 0)); |
| | | if (!CollectionUtils.isEmpty(pendingTasks)) { |
| | | List<Long> instanceIds = pendingTasks.stream() |
| | | .map(ApprovalTask::getInstanceId) |
| | | .distinct() |
| | | .collect(Collectors.toList()); |
| | | List<ApprovalInstance> instances = approvalInstanceMapper.selectList(new LambdaQueryWrapper<ApprovalInstance>() |
| | | .in(ApprovalInstance::getId, instanceIds) |
| | | .eq(ApprovalInstance::getDeleted, 0)); |
| | | Map<Long, ApprovalInstance> instanceMap = instances.stream() |
| | | .collect(Collectors.toMap(ApprovalInstance::getId, i -> i, (a, b) -> a)); |
| | | |
| | | for (ApprovalTask task : pendingTasks) { |
| | | ApprovalInstance instance = instanceMap.get(task.getInstanceId()); |
| | | if (instance == null) { |
| | | continue; |
| | | } |
| | | ApproveProcess ap = new ApproveProcess(); |
| | | ap.setId(instance.getId()); |
| | | ap.setApproveId(instance.getInstanceNo()); |
| | | ap.setApproveReason(instance.getTitle()); |
| | | ap.setApproveTime(instance.getApplyTime() != null ? java.sql.Timestamp.valueOf(instance.getApplyTime()) : null); |
| | | ap.setApproveUserName(instance.getApplicantName()); |
| | | ap.setApproveDeptName(instance.getTemplateName()); |
| | | if (instance.getBusinessType() != null) { |
| | | ap.setApproveType(instance.getBusinessType().intValue()); |
| | | ap.setApproveTypeName(TypeEnums.getLabelByValue(instance.getBusinessType())); |
| | | } |
| | | approveProcesses.add(ap); |
| | | approveProcesses.forEach(a -> { |
| | | if (a.getApproveType() != null) { |
| | | a.setApproveTypeName(ApproveTypeEnum.getNameByCode(a.getApproveType())); |
| | | } |
| | | } |
| | | }); |
| | | // // æ¥è¯¢æªé¢ç¨å³ä¿è®°å½ |
| | | // SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | // |
| | | // LaborIssue laborIssue1 = new LaborIssue(); |
| | | // laborIssue1.setAdoptedDate(new Date()); |
| | | // laborIssue1.setIssueDate(sdf.parse(sdf.format(new Date()))); |
| | | // List<LaborIssue> laborIssues = lavorIssueMapper.list(laborIssue1); |
| | | // //staff_join_leave_record表被å é¤ |
| | | // if(!CollectionUtils.isEmpty(laborIssues)){ |
| | | // for (LaborIssue laborIssue : laborIssues) { |
| | | // ApproveProcess approveProcess = new ApproveProcess(); |
| | | // approveProcess.setApproveId(laborIssue.getOrderNo()); |
| | | // approveProcess.setApproveDeptName(sysDeptMapper.selectDeptById(loginUser.getTenantId()).getDeptName()); |
| | | // approveProcess.setApproveTime(laborIssue.getIssueDate()); |
| | | // approveProcess.setApproveReason(laborIssue.getDictTypeName() + "-" + |
| | | // laborIssue.getDictName() + "è¶
æ¶æªé¢å"); |
| | | // approveProcesses.add(approveProcess); |
| | | // } |
| | | // } |
| | | |
| | | return approveProcesses; |
| | | } |
| | |
| | | |
| | | @Override |
| | | public Map<String, Object> approveAndDeviceTodos() { |
| | | // æ§å®¡æ¹è¡¨å¾
å |
| | | Long oldCount = approveProcessMapper.selectCount(new LambdaQueryWrapper<ApproveProcess>() |
| | | // 审æ¹ååå¾
å |
| | | Long aLong = approveProcessMapper.selectCount(new LambdaQueryWrapper<ApproveProcess>() |
| | | .eq(ApproveProcess::getApproveUserCurrentId, SecurityUtils.getUserId()) |
| | | .eq(ApproveProcess::getApproveDelete, 0) |
| | | .in(ApproveProcess::getApproveStatus, 0, 1, 3)); |
| | | // æ°å®¡æ¹è¡¨å¾
å |
| | | Long newCount = approvalTaskMapper.selectCount(new LambdaQueryWrapper<ApprovalTask>() |
| | | .eq(ApprovalTask::getApproverId, SecurityUtils.getUserId()) |
| | | .eq(ApprovalTask::getTaskStatus, "PENDING") |
| | | .eq(ApprovalTask::getDeleted, 0)); |
| | | // è®¾å¤æ¥ä¿®å¾
å |
| | | Long aLong1 = deviceRepairMapper.selectCount(new LambdaQueryWrapper<DeviceRepair>() |
| | | .eq(DeviceRepair::getStatus, 0) |
| | | .eq(DeviceRepair::getRepairName, SecurityUtils.getLoginUser().getNickName())); |
| | | return new HashMap<String, Object>() { |
| | | { |
| | | put("approveTodo", oldCount + newCount); |
| | | put("approveTodo", aLong); |
| | | put("deviceRepairTodo", aLong1); |
| | | } |
| | | }; |
| | |
| | | |
| | | @Override |
| | | public ProductionProgressDto productionProgress() { |
| | | LocalDateTime now = LocalDateTime.now(); |
| | | |
| | | LocalDateTime startOfMonth = now |
| | | .with(TemporalAdjusters.firstDayOfMonth()) |
| | | .with(LocalTime.MIN); |
| | | |
| | | LocalDateTime endOfMonth = now |
| | | .with(TemporalAdjusters.lastDayOfMonth()) |
| | | .with(LocalTime.MAX); |
| | | |
| | | |
| | | ProductionProgressDto productionProgressDto = new ProductionProgressDto(); |
| | | List<ProductionProgressOrderDto> orderDetails = productionOrderMapper.selectProgressOrders( |
| | | LocalDateTime.now().minusMonths(1), LocalDateTime.now()); |
| | | List<ProductionProgressOrderDto> orderDetails = productionOrderMapper |
| | | .selectProgressOrders(startOfMonth, endOfMonth); |
| | | productionProgressDto.setCompletedOrderDetails(orderDetails); |
| | | long totalCount = orderDetails.size(); |
| | | long count = orderDetails.stream().filter( |
| | |
| | | public ProductionTurnoverDto workInProcessTurnover() { |
| | | ProductionTurnoverDto productionTurnoverDto = new ProductionTurnoverDto(); |
| | | List<ProductionTaskStatisticsDto> taskList = productionOperationTaskMapper |
| | | .selectTaskStatisticsByDate(LocalDate.now().minusMonths(1), LocalDate.now()); |
| | | .selectTaskStatisticsByDate(LocalDate.now().with(TemporalAdjusters.firstDayOfMonth()), LocalDate.now().with(TemporalAdjusters.lastDayOfMonth())); |
| | | long sum = taskList.stream() |
| | | .filter(task -> defaultDecimal(task.getPlanQuantity()).compareTo(defaultDecimal(task.getCompleteQuantity())) > 0) |
| | | .map(ProductionTaskStatisticsDto::getPlanQuantity) |
| | |
| | | String endStr = endDate.atStartOfDay() |
| | | .format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); |
| | | |
| | | // List<Map<String, Object>> inputList = productionProductInputMapper.selectInputStats(startStr, endStr); |
| | | List<Map<String, Object>> inputList = null; |
| | | List<Map<String, Object>> inputList = productionProductInputMapper.selectInputStats(startStr, endStr); |
| | | //List<Map<String, Object>> inputList = null; |
| | | List<Map<String, Object>> outputList = productionProductOutputMapper.selectDailyOutputStats(startStr, endStr); |
| | | |
| | | Map<String, InputOutputAnalysisDto> dateMap = new HashMap<>(); |
| | | |
| | | if (!CollectionUtils.isEmpty(inputList)) { |
| | | for (Map<String, Object> map : inputList) { |
| | | String date = (String) map.get("date"); |
| | | String date = (String) map.get("statDate"); |
| | | if (date == null) |
| | | continue; |
| | | InputOutputAnalysisDto dto = dateMap.getOrDefault(date, new InputOutputAnalysisDto()); |
| | |
| | | |
| | | if (!CollectionUtils.isEmpty(outputList)) { |
| | | for (Map<String, Object> map : outputList) { |
| | | String date = (String) map.get("date"); |
| | | String date = (String) map.get("statDate"); |
| | | if (date == null) |
| | | continue; |
| | | InputOutputAnalysisDto dto = dateMap.getOrDefault(date, new InputOutputAnalysisDto()); |
| | |
| | | @Override |
| | | public List<MapDto> orderCount() { |
| | | LocalDate now = LocalDate.now(); |
| | | DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); |
| | | |
| | | String currentStart = now.withDayOfMonth(1).atStartOfDay() |
| | | .format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); |
| | | String currentEnd = now.atTime(LocalTime.MAX).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); |
| | | LocalDateTime startDateTime = now.with(TemporalAdjusters.firstDayOfMonth()).atStartOfDay(); |
| | | LocalDateTime endDateTime = now.with(TemporalAdjusters.lastDayOfMonth()).atTime(LocalTime.MAX); |
| | | |
| | | LocalDate lastMonthDate = now.minusMonths(1); |
| | | String lastStart = lastMonthDate.withDayOfMonth(1).atStartOfDay() |
| | | .format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); |
| | | String lastEnd = lastMonthDate.withDayOfMonth(lastMonthDate.lengthOfMonth()).atTime(LocalTime.MAX) |
| | | .format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); |
| | | String currentStart = startDateTime.format(dateTimeFormatter); |
| | | String currentEnd = endDateTime.format(dateTimeFormatter); |
| | | |
| | | String lastStart = startDateTime.minusMonths(1).format(dateTimeFormatter); |
| | | String lastEnd = endDateTime.format(dateTimeFormatter); |
| | | |
| | | int currentCreated = productionOrderMapper.countCreated(currentStart, currentEnd); |
| | | int lastCreated = productionOrderMapper.countCreated(lastStart, lastEnd); |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | 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.R; |
| | | import com.ruoyi.inspectiontask.dto.InspectionTaskDto; |
| | |
| | | /** |
| | | * å¯¼åº |
| | | */ |
| | | @PostMapping("/export") |
| | | @Log(title = "æ£éªä»»å¡", businessType = BusinessType.EXPORT) |
| | | @Operation(summary = "导åºå®æ¶ä»»å¡è®°å½") |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response) { |
| | | Page page = new Page<>(-1, -1); |
| | | InspectionTaskDto timingTask = new InspectionTaskDto(); |
| | |
| | | /** |
| | | * å·¡æ£ä»»å¡è¡¨æ°å¢ä¿®æ¹ |
| | | */ |
| | | @PostMapping("/addOrEditInspectionTask") |
| | | @Log(title = "æ£éªä»»å¡", businessType = BusinessType.INSERT) |
| | | @Operation(summary = "å·¡æ£ä»»å¡è¡¨æ°å¢ä¿®æ¹") |
| | | @PostMapping("/addOrEditInspectionTask") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R addOrEditInspectionTask(@RequestBody InspectionTaskDto inspectionTaskDto) { |
| | | return R.ok(inspectionTaskService.addOrEditInspectionTask(inspectionTaskDto)); |
| | |
| | | /** |
| | | * å·¡æ£ä»»å¡è¡¨å é¤ |
| | | */ |
| | | @DeleteMapping("/delInspectionTask") |
| | | @Log(title = "æ£éªä»»å¡", businessType = BusinessType.DELETE) |
| | | @Operation(summary = "å·¡æ£ä»»å¡è¡¨å é¤") |
| | | @DeleteMapping("/delInspectionTask") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R remove(@RequestBody Long[] ids) { |
| | | return R.ok(inspectionTaskService.delByIds(ids)); |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | 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.R; |
| | | import com.ruoyi.inspectiontask.dto.QrCodeDto; |
| | |
| | | /** |
| | | * äºç»´ç 管ç表æ°å¢ä¿®æ¹ |
| | | */ |
| | | @PostMapping("/addOrEditQrCode") |
| | | @Log(title = "äºç»´ç ", businessType = BusinessType.INSERT) |
| | | @Operation(summary = "äºç»´ç 管ç表æ°å¢ä¿®æ¹") |
| | | @PostMapping("/addOrEditQrCode") |
| | | public R<Long> addOrEditQrCode(@RequestBody QrCodeDto qrCodeDto) { |
| | | return R.ok(qrCodeService.addOrEditQrCode(qrCodeDto)); |
| | | } |
| | |
| | | /** |
| | | * äºç»´ç 管ç表å é¤ |
| | | */ |
| | | @DeleteMapping("/delQrCode") |
| | | @Log(title = "äºç»´ç ", businessType = BusinessType.DELETE) |
| | | @Operation(summary = "äºç»´ç 管ç表å é¤") |
| | | @DeleteMapping("/delQrCode") |
| | | public R remove(@RequestBody Long[] ids) { |
| | | return R.ok(qrCodeService.delByIds(ids)); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | 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.R; |
| | | import com.ruoyi.inspectiontask.dto.QrCodeScanRecordDto; |
| | |
| | | /** |
| | | * äºç»´ç æ«ç è®°å½è¡¨æ°å¢ä¿®æ¹ |
| | | */ |
| | | @PostMapping("/addOrEditQrCodeRecord") |
| | | @Log(title = "äºç»´ç æ«æè®°å½", businessType = BusinessType.INSERT) |
| | | @Operation(summary = "äºç»´ç æ«ç è®°å½è¡¨æ°å¢ä¿®æ¹") |
| | | @PostMapping("/addOrEditQrCodeRecord") |
| | | public R addOrEditQrCodeRecord(@RequestBody QrCodeScanRecordDto qrCodeScanRecordDto) { |
| | | return R.ok(qrCodeScanRecordService.addOrEditQrCodeRecord(qrCodeScanRecordDto)); |
| | | } |
| | |
| | | /** |
| | | * äºç»´ç æ«ç è®°å½è¡¨å é¤ |
| | | */ |
| | | @DeleteMapping("/delSalesRecord") |
| | | @Log(title = "äºç»´ç æ«æè®°å½", businessType = BusinessType.DELETE) |
| | | @Operation(summary = "äºç»´ç æ«ç è®°å½è¡¨å é¤") |
| | | @DeleteMapping("/delSalesRecord") |
| | | public R remove(@RequestBody Long[] ids) { |
| | | return R.ok(qrCodeScanRecordService.delByIds(ids)); |
| | | } |
| | |
| | | /** |
| | | * å¯¼åº |
| | | */ |
| | | @Log(title = "宿¶ä»»å¡", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | @Operation(summary = "导åºå®æ¶ä»»å¡") |
| | | public void export(HttpServletResponse response) { |
| | |
| | | /** |
| | | * 宿¶å·¡æ£ä»»å¡è¡¨æ°å¢ä¿®æ¹ |
| | | */ |
| | | @Log(title = "宿¶ä»»å¡", businessType = BusinessType.INSERT) |
| | | @PostMapping("/addOrEditTimingTask") |
| | | @Operation(summary = "æ°å¢ä¿®æ¹å®æ¶ä»»å¡") |
| | | @Log(title = "宿¶ä»»å¡", businessType = BusinessType.INSERT) |
| | | public R addOrEditTimingTask(@RequestBody TimingTaskDto timingTaskDto) throws SchedulerException { |
| | | return R.ok(timingTaskService.addOrEditTimingTask(timingTaskDto)); |
| | | } |
| | |
| | | /** |
| | | * 宿¶å·¡æ£ä»»å¡è¡¨å é¤ |
| | | */ |
| | | @Log(title = "宿¶ä»»å¡", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/delTimingTask") |
| | | @Operation(summary = "å é¤å®æ¶ä»»å¡") |
| | | @Log(title = "宿¶ä»»å¡", businessType = BusinessType.DELETE) |
| | | public R remove(@RequestBody Long[] ids) { |
| | | return R.ok(timingTaskService.delByIds(ids)); |
| | | } |
| | |
| | | if (StringUtils.isNotBlank(inspectionTaskDto.getInspectionProject())) { |
| | | queryWrapper.like(InspectionTask::getInspectionProject, inspectionTaskDto.getInspectionProject()); |
| | | } |
| | | queryWrapper.orderByDesc(InspectionTask::getCreateTime); |
| | | IPage<InspectionTask> entityPage = inspectionTaskMapper.selectPage(page, queryWrapper); |
| | | |
| | | // æ æ°æ®æåè¿å |
| | |
| | | |
| | | // è·åç°æè§¦åå¨å¹¶è½¬æ¢ä¸º CronTrigger |
| | | Trigger oldTrigger = scheduler.getTrigger(triggerKey); |
| | | if (oldTrigger == null) { |
| | | JobKey jobKey = new JobKey("timingTask_" + task.getId()); |
| | | JobDetail jobDetail = scheduler.getJobDetail(jobKey); |
| | | if (jobDetail != null) { |
| | | Trigger trigger = buildJobTrigger(task, jobDetail); |
| | | scheduler.scheduleJob(trigger); |
| | | } else { |
| | | scheduleTimingTask(task); |
| | | } |
| | | return; |
| | | } |
| | | if (!(oldTrigger instanceof CronTrigger)) { |
| | | throw new SchedulerException("Existing trigger is not a CronTrigger"); |
| | | } |
| | |
| | | |
| | | // 使ç¨switchç¡®ä¿æ¡ä»¶äºæ¥ |
| | | String frequencyType = task.getFrequencyType().toUpperCase(); // ç»ä¸è½¬ä¸ºå¤§åæ¯è¾ |
| | | switch (frequencyType) { |
| | | case "DAILY": |
| | | return convertDailyToCron(task.getFrequencyDetail()); |
| | | case "WEEKLY": |
| | | return convertWeeklyToCron(task.getFrequencyDetail()); |
| | | case "MONTHLY": |
| | | return convertMonthlyToCron(task.getFrequencyDetail()); |
| | | case "QUARTERLY": |
| | | return convertQuarterlyToCron(task.getFrequencyDetail()); |
| | | default: |
| | | throw new IllegalArgumentException("䏿¯æçé¢çç±»å: " + task.getFrequencyType()); |
| | | } |
| | | return switch (frequencyType) { |
| | | case "DAILY" -> convertDailyToCron(task.getFrequencyDetail()); |
| | | case "WEEKLY" -> convertWeeklyToCron(task.getFrequencyDetail()); |
| | | case "MONTHLY" -> convertMonthlyToCron(task.getFrequencyDetail()); |
| | | case "QUARTERLY" -> convertQuarterlyToCron(task.getFrequencyDetail()); |
| | | default -> throw new IllegalArgumentException("䏿¯æçé¢çç±»å: " + task.getFrequencyType()); |
| | | }; |
| | | } |
| | | |
| | | // æ¯æ¥ä»»å¡è½¬æ¢ |
| | |
| | | if (timingTask.getIsEnabled() != null) { |
| | | queryWrapper.eq(TimingTask::getIsEnabled, timingTask.getIsEnabled()); |
| | | } |
| | | queryWrapper.orderByDesc(TimingTask::getCreateTime); |
| | | // æ ID ååºæåº |
| | | queryWrapper.orderByDesc(TimingTask::getId); |
| | | IPage<TimingTask> taskPage = timingTaskMapper.selectPage(page, queryWrapper); |
| | | |
| | | // 2. å¦ææ²¡ææ°æ®ï¼ç´æ¥è¿å空å页 |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | 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.domain.AjaxResult; |
| | | import com.ruoyi.measuringinstrumentledger.dto.SparePartsRequisitionRecordDto; |
| | | import com.ruoyi.measuringinstrumentledger.service.SparePartsRequisitionRecordService; |
| | |
| | | |
| | | @GetMapping("/listPage") |
| | | @Operation(summary = "å¤ä»¶åç±»-å页æ¥è¯¢") |
| | | @Log(title = "å¤ä»¶é¢ç¨è®°å½-å页æ¥è¯¢", businessType = BusinessType.OTHER) |
| | | public AjaxResult listPage(Page page, SparePartsRequisitionRecordDto sparePartsRequisitionRecordDto){ |
| | | IPage<SparePartsRequisitionRecordDto> listPage = sparePartsRequisitionRecordService.listPage(page, sparePartsRequisitionRecordDto); |
| | | return AjaxResult.success(listPage); |
| | |
| | | |
| | | @PostMapping("/add") |
| | | @Operation(summary = "åå
¬ç©èµ-æ·»å ") |
| | | @Log(title = "åå
¬ç©èµ-æ·»å ", businessType = BusinessType.INSERT) |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult add(@RequestBody OfficeSupplies officeSupplies) { |
| | | // æç
§å½åæ¶é´yyyyMMdd + å½å¤©æ°å¢æ°é + 1çæç¼å· |
| | |
| | | |
| | | @PostMapping("/update") |
| | | @Operation(summary = "åå
¬ç©èµ-ä¿®æ¹") |
| | | @Log(title = "åå
¬ç©èµ-ä¿®æ¹", businessType = BusinessType.UPDATE) |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult update(@RequestBody OfficeSupplies officeSupplies) { |
| | | return officeSuppliesService.updateById(officeSupplies) ? success() : error(); |
| | |
| | | |
| | | @DeleteMapping("/delete") |
| | | @Operation(summary = "åå
¬ç©èµ-å é¤") |
| | | @Log(title = "åå
¬ç©èµ-å é¤", businessType = BusinessType.DELETE) |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult delete(@RequestBody List<Long> ids) { |
| | | if(CollectionUtils.isEmpty(ids)) return AjaxResult.error("è¯·ä¼ å
¥è¦å é¤çID"); |
| | |
| | | package com.ruoyi.other.controller; |
| | | |
| | | 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.domain.R; |
| | | import com.ruoyi.other.dto.PdaVersionDTO; |
| | | import com.ruoyi.other.pojo.PdaVersion; |
| | |
| | | } |
| | | |
| | | @Operation(summary = "æ·»å çæ¬") |
| | | @Log(title = "PDAçæ¬-æ·»å ", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public R add(@RequestBody PdaVersionDTO pdaVersion) { |
| | | return R.ok(pdaVersionService.add(pdaVersion)); |
| | |
| | | @Schema(description = "å
³èåºåºåå·") |
| | | private String shippingNo; |
| | | |
| | | @Schema(description = "åè´§ç±»å") |
| | | private Integer shippingType; |
| | | |
| | | @Schema(description = "å货车çå·") |
| | | private String truckPlateNo; |
| | | |
| | | @Schema(description = "å¿«éå
¬å¸") |
| | | private String expressCompany; |
| | | |
| | | @Schema(description = "å¿«éåå·") |
| | | private String expressNo; |
| | | |
| | | @Schema(description = "项ç®åç§°") |
| | | private String projectName; |
| | | |
| | |
| | | |
| | | @Schema(description = "éå®äº§å对象æ°ç»") |
| | | private List<ReturnSaleProductDto> returnSaleProducts; |
| | | |
| | | @Schema(description = "éå®éè´§å
¥åºå®¡æ¹ç¶æ") |
| | | private Integer stockInApprovalStatus; |
| | | |
| | | } |
| | |
| | | |
| | | @Schema(description = "åè´§åºåºæ°é") |
| | | private BigDecimal stockOutNum; |
| | | |
| | | @Schema(description = "å¾
å¤çéè´§æ°é") |
| | | private BigDecimal pendingReturnNum; |
| | | } |
| | |
| | | |
| | | @Schema(description = "å«ç¨åä»·") |
| | | private BigDecimal taxInclusiveUnitPrice; |
| | | |
| | | @Schema(description = "å¾
å¤çéè´§æ°é") |
| | | private BigDecimal pendingReturnNum; |
| | | } |
| | |
| | | |
| | | 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.domain.AjaxResult; |
| | | import com.ruoyi.procurementrecord.pojo.GasTankWarning; |
| | | import com.ruoyi.procurementrecord.service.GasTankWarningService; |
| | |
| | | return AjaxResult.success(gasTankWarningService.listPage(page, gasTankWarning)); |
| | | } |
| | | |
| | | @Log(title = "æ°å¢æ°ç¶é¢è¦", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody GasTankWarning gasTankWarning) { |
| | | return AjaxResult.success(gasTankWarningService.save(gasTankWarning)); |
| | | } |
| | | |
| | | @Log(title = "ä¿®æ¹æ°ç¶é¢è¦", businessType = BusinessType.UPDATE) |
| | | @PostMapping("update") |
| | | public AjaxResult update(@RequestBody GasTankWarning gasTankWarning) { |
| | | return AjaxResult.success(gasTankWarningService.updateById(gasTankWarning)); |
| | | } |
| | | |
| | | @Log(title = "å 餿°ç¶é¢è¦", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("delete") |
| | | public AjaxResult delete(@RequestBody List<Long> ids) { |
| | | if (CollectionUtils.isEmpty(ids)) return AjaxResult.error("è¯·ä¼ å
¥è¦å é¤çID"); |
| | | return AjaxResult.success(gasTankWarningService.removeByIds(ids)); |
| | | } |
| | | |
| | | //å¯¼åº |
| | | @Log(title = "å¯¼åºæ°ç¶é¢è¦", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, @RequestParam(name = "ids", required = false) List<Long> ids) { |
| | | gasTankWarningService.export(response, ids); |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | 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.procurementrecord.pojo.InboundManagement; |
| | |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | @Log(title = "æ°å¢å°è´§ç®¡ç", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | @Operation(summary = "å°è´§ç®¡ç-æ·»å ") |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | return result ? AjaxResult.success() : AjaxResult.error(); |
| | | } |
| | | |
| | | @Log(title = "ä¿®æ¹å°è´§ç®¡ç", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/update") |
| | | @Operation(summary = "å°è´§ç®¡ç-ä¿®æ¹") |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | return result ? AjaxResult.success() : AjaxResult.error(); |
| | | } |
| | | |
| | | @Log(title = "å é¤å°è´§ç®¡ç", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/del") |
| | | @Operation(summary = "å°è´§ç®¡ç-å é¤") |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | package com.ruoyi.procurementrecord.controller; |
| | | |
| | | 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.procurementrecord.mapper.ProcurementExceptionRecordMapper; |
| | |
| | | |
| | | private ProcurementExceptionRecordMapper procurementExceptionRecordMapper; |
| | | |
| | | @Log(title = "æ°å¢éè´å¼å¸¸è®°å½", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | @Transactional |
| | | public AjaxResult add(@RequestBody ProcurementExceptionRecord procurementExceptionRecord) { |
| | | return AjaxResult.success(procurementExceptionRecordMapper.insert(procurementExceptionRecord)); |
| | | } |
| | | |
| | | @Log(title = "ä¿®æ¹éè´å¼å¸¸è®°å½", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/update") |
| | | @Transactional |
| | | public AjaxResult updatePro(@RequestBody ProcurementExceptionRecord procurementExceptionRecord) { |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | 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.procurementrecord.pojo.ProcurementPlan; |
| | |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | @Log(title = "æ°å¢éè´è®¡å", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | @Operation(summary = "éè´è®¡å-æ·»å ") |
| | | public AjaxResult add(@RequestBody ProcurementPlan procurementPlan){ |
| | |
| | | return result ? AjaxResult.success() : AjaxResult.error(); |
| | | } |
| | | |
| | | @Log(title = "ä¿®æ¹éè´è®¡å", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/update") |
| | | @Operation(summary = "éè´è®¡å-ä¿®æ¹") |
| | | public AjaxResult update(@RequestBody ProcurementPlan procurementPlan){ |
| | |
| | | return result ? AjaxResult.success() : AjaxResult.error(); |
| | | } |
| | | |
| | | @Log(title = "å é¤éè´è®¡å", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/del") |
| | | @Operation(summary = "éè´è®¡å-å é¤") |
| | | public AjaxResult del(@RequestBody List<Long> ids){ |
| | |
| | | return result ? AjaxResult.success() : AjaxResult.error(); |
| | | } |
| | | |
| | | /** |
| | | * å¯¼åº |
| | | * @param response |
| | | */ |
| | | @Log(title = "导åºéè´è®¡å", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response) { |
| | | procurementPlanService.export(response); |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | 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.procurementrecord.pojo.ProcurementPriceManagement; |
| | |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | @Log(title = "æ°å¢éè´ä»·æ ¼ç®¡ç", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | @Operation(summary = "éè´ä»·æ ¼ç®¡ç-æ·»å ") |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | return result ? AjaxResult.success() : AjaxResult.error(); |
| | | } |
| | | |
| | | @Log(title = "ä¿®æ¹éè´ä»·æ ¼ç®¡ç", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/update") |
| | | @Operation(summary = "éè´ä»·æ ¼ç®¡ç-ä¿®æ¹") |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | return result ? AjaxResult.success() : AjaxResult.error(); |
| | | } |
| | | |
| | | @Log(title = "å é¤éè´ä»·æ ¼ç®¡ç", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/del") |
| | | @Operation(summary = "éè´ä»·æ ¼ç®¡ç-å é¤") |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | return result ? AjaxResult.success() : AjaxResult.error(); |
| | | } |
| | | |
| | | /** |
| | | * å¯¼åº |
| | | * @param response |
| | | */ |
| | | @Log(title = "导åºéè´ä»·æ ¼ç®¡ç", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response) { |
| | | procurementPriceManagementService.export(response); |
| | |
| | | import com.ruoyi.account.pojo.AccountStatementDetails; |
| | | import com.ruoyi.account.service.AccountStatementDetailsService; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | 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.procurementrecord.bean.dto.ReturnManagementDto; |
| | |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | @Log(title = "æ°å¢éå®éè´§", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | @Operation(summary = "éå®éè´§-æ·»å ") |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | return returnManagementService.addReturnManagementDto(returnManagementDto) ? success() : error(); |
| | | } |
| | | |
| | | @Log(title = "ä¿®æ¹éå®éè´§", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/update") |
| | | @Operation(summary = "éå®éè´§-ä¿®æ¹") |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | } |
| | | |
| | | |
| | | @Log(title = "å é¤éå®éè´§", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/del") |
| | | @Operation(summary = "éå®éè´§-å é¤") |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | package com.ruoyi.procurementrecord.controller; |
| | | |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | /** |
| | | * å
¥åºæ¶é´ |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDateTime createTime; |
| | |
| | | @Schema(description = "å
³èåºåºåå·Id") |
| | | private Long shippingId; |
| | | |
| | | @Schema(description = "åè´§ç±»å 1货车 2å¿«é") |
| | | private Integer shippingType; |
| | | |
| | | @Schema(description = "å货车çå·") |
| | | private String truckPlateNo; |
| | | |
| | | @Schema(description = "å¿«éå
¬å¸") |
| | | private String expressCompany; |
| | | |
| | | @Schema(description = "å¿«éåå·") |
| | | private String expressNo; |
| | | |
| | | @Schema(description = "项ç®id") |
| | | private Long projectId; |
| | | |
| | |
| | | @Schema(description = "å建æ¶é´") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | @Schema(description = "æ´æ°æ¶é´") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.basic.mapper.ProductModelMapper; |
| | | import com.ruoyi.basic.pojo.ProductModel; |
| | | import com.ruoyi.common.utils.AmountUtils; |
| | | import com.ruoyi.common.utils.OrderUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | |
| | | Long aLong = customStorageMapper.selectCount(null); |
| | | item.setInboundBatches(aLong.equals(0L) ? "第1æ¹æ¬¡(èªå®ä¹å
¥åº)" : "第"+ (aLong + 1) + "æ¹æ¬¡(èªå®ä¹å
¥åº)" ); |
| | | item.setCreateBy(loginUser.getNickName()); |
| | | item.setCode(OrderUtils.countTodayByCreateTime(customStorageMapper, "", "code", item.getCreateTime() != null ? item.getCreateTime() : LocalDateTime.now())); |
| | | item.setCode(OrderUtils.countTodayByCreateTime(customStorageMapper, "", "code")); |
| | | customStorageMapper.insert(item); |
| | | }); |
| | | return AjaxResult.success("èªå®ä¹å
¥åºæå"); |
| | |
| | | dto.setInboundNum0(dto.getInboundNum().subtract(totalInboundNum)); |
| | | // åºåä»·å¼ |
| | | if(dto.getTaxInclusiveUnitPrice() != null){ |
| | | dto.setTaxInclusiveTotalPrice(dto.getInboundNum0().multiply(dto.getTaxInclusiveUnitPrice())); |
| | | dto.setTaxInclusiveTotalPrice(AmountUtils.scaleAmount( |
| | | dto.getInboundNum0().multiply(dto.getTaxInclusiveUnitPrice()) |
| | | )); |
| | | } |
| | | } |
| | | pageList.setRecords(procurementPageDtoCopyList); |
| | |
| | | import com.ruoyi.common.enums.StockInQualifiedRecordTypeEnum; |
| | | import com.ruoyi.common.utils.OrderUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import com.ruoyi.procurementrecord.bean.dto.ReturnManagementDto; |
| | | import com.ruoyi.procurementrecord.bean.dto.ReturnSaleProductDto; |
| | | import com.ruoyi.procurementrecord.bean.vo.ShippingInfoVo; |
| | |
| | | import com.ruoyi.procurementrecord.service.ReturnManagementService; |
| | | import com.ruoyi.procurementrecord.service.ReturnSaleProductService; |
| | | import com.ruoyi.procurementrecord.utils.StockUtils; |
| | | import com.ruoyi.sales.mapper.SalesLedgerMapper; |
| | | import com.ruoyi.sales.pojo.ShippingInfo; |
| | | import com.ruoyi.sales.service.ShippingInfoService; |
| | | import lombok.RequiredArgsConstructor; |
| | |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @author :yys |
| | |
| | | private final ReturnManagementMapper returnManagementMapper; |
| | | private final ReturnSaleProductService returnSaleProductService; |
| | | private final ShippingInfoService shippingInfoService; |
| | | private final SalesLedgerMapper salesLedgerMapper; |
| | | private final SalesRefundAmountOrderService salesRefundAmountOrderService; |
| | | private final StockUtils stockUtils; |
| | | |
| | |
| | | @Override |
| | | public boolean addReturnManagementDto(ReturnManagementDto returnManagementDto) { |
| | | if (ObjectUtils.isEmpty(returnManagementDto.getReturnNo())){ |
| | | String rt = OrderUtils.countTodayByCreateTime(returnManagementMapper, "RT","return_no", returnManagementDto.getCreateTime() != null ? returnManagementDto.getCreateTime() : LocalDateTime.now()); |
| | | String rt = OrderUtils.countTodayByCreateTime(returnManagementMapper, "RT","return_no"); |
| | | returnManagementDto.setReturnNo(rt); |
| | | } |
| | | save(returnManagementDto); |
| | |
| | | public boolean handle(Long returnManagementId) { |
| | | ReturnManagement byId = this.getById(returnManagementId); |
| | | List<ReturnSaleProductDto> list = returnSaleProductService.listReturnSaleProduct(returnManagementId); |
| | | |
| | | // 1. è®¡ç®æ£ç¡®ç鿬¾æ»é¢ï¼éé¢=åä»·Ãæ°éï¼ |
| | | BigDecimal totalRefund = BigDecimal.ZERO; |
| | | for (ReturnSaleProductDto returnSaleProduct : list) { |
| | | BigDecimal itemAmount = returnSaleProduct.getAmount() != null |
| | | ? returnSaleProduct.getAmount() |
| | | : BigDecimal.ZERO; |
| | | totalRefund = totalRefund.add(itemAmount); |
| | | // æ¯å¦æè´¨éé®é¢ |
| | | if (returnSaleProduct.getIsQuality() == 1) { |
| | | stockUtils.addUnStockWithBatchNo(returnSaleProduct.getProductModelId(), returnSaleProduct.getNum(), StockInQualifiedRecordTypeEnum.RETURN_UNSTOCK_IN.getCode(), returnSaleProduct.getId(), returnSaleProduct.getBatchNo()); |
| | | } else { |
| | | stockUtils.addStockWithBatchNo(returnSaleProduct.getProductModelId(), returnSaleProduct.getNum(), StockInQualifiedRecordTypeEnum.RETURN_HE_IN.getCode(), returnSaleProduct.getId(), returnSaleProduct.getBatchNo()); |
| | | } |
| | | } |
| | | |
| | | // 2. æ´æ°éè´§åç¶æå鿬¾æ»é¢ |
| | | byId.setStatus(1); |
| | | byId.setSettler(SecurityUtils.getLoginUser().getNickName()); |
| | | byId.setRefundAmount(totalRefund); |
| | | updateById(byId); |
| | | //æ´æ°é货产åå表çç¶æ |
| | | List<ReturnSaleProduct> updateList = list.stream().map(m -> { |
| | | ReturnSaleProduct returnSaleProduct = new ReturnSaleProduct(); |
| | | returnSaleProduct.setId(m.getId()); |
| | | returnSaleProduct.setStatus(1); |
| | | return returnSaleProduct; |
| | | }).collect(Collectors.toList()); |
| | | returnSaleProductService.updateBatchById(updateList); |
| | | |
| | | SalesRefundAmountOrderDto salesRefundAmountOrder = new SalesRefundAmountOrderDto(); |
| | | salesRefundAmountOrder.setReturnManagementId(returnManagementId); |
| | | salesRefundAmountOrder.setStatus(0); |
| | | salesRefundAmountOrder.setCreateTime(byId.getCreateTime()); |
| | | salesRefundAmountOrder.setCreateUserId(SecurityUtils.getUserId()); |
| | | BigDecimal bigDecimal = new BigDecimal(0); |
| | | for (ReturnSaleProductDto returnSaleProduct : list) { |
| | | bigDecimal = bigDecimal.add(returnSaleProduct.getPrice()); |
| | | salesRefundAmountOrder.setRefundedAmount(new BigDecimal(0)); |
| | | // æ¯å¦æè´¨éé®é¢ |
| | | if (returnSaleProduct.getIsQuality() == 1) { |
| | | // æè´¨éé®é¢ï¼å
¥ä¸åæ ¼åº(å¸¦æ¹æ¬¡) |
| | | stockUtils.addUnStockWithBatchNo(returnSaleProduct.getProductModelId(),returnSaleProduct.getNum(), StockInQualifiedRecordTypeEnum.RETURN_UNSTOCK_IN.getCode(),returnSaleProduct.getId(),returnSaleProduct.getBatchNo()); |
| | | }else{ |
| | | // æ è´¨éé®é¢ï¼å
¥åæ ¼åº(å¸¦æ¹æ¬¡) |
| | | stockUtils.addStockWithBatchNo(returnSaleProduct.getProductModelId(),returnSaleProduct.getNum(), StockInQualifiedRecordTypeEnum.RETURN_HE_IN.getCode(),returnSaleProduct.getId(),returnSaleProduct.getBatchNo()); |
| | | } |
| | | } |
| | | salesRefundAmountOrder.setRefundAmount(bigDecimal); |
| | | salesRefundAmountOrder.setNotRefundedAmount(salesRefundAmountOrder.getRefundedAmount()); |
| | | // 忹鿬¾ |
| | | // salesRefundAmountOrderService.addSalesRefundAmountOrderDto(salesRefundAmountOrder); |
| | | return true; |
| | | } |
| | | |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.common.enums.ReviewStatusEnum; |
| | | import com.ruoyi.common.enums.StockInQualifiedRecordTypeEnum; |
| | | import com.ruoyi.common.enums.StockOutQualifiedRecordTypeEnum; |
| | | import com.ruoyi.procurementrecord.mapper.ProcurementRecordMapper; |
| | | import com.ruoyi.procurementrecord.mapper.ProcurementRecordOutMapper; |
| | | import com.ruoyi.stock.dto.StockInventoryDto; |
| | | import com.ruoyi.stock.dto.StockOutRecordDto; |
| | | import com.ruoyi.stock.dto.StockUninventoryDto; |
| | | import com.ruoyi.stock.pojo.StockInRecord; |
| | | import com.ruoyi.stock.pojo.StockOutRecord; |
| | |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | |
| | |
| | | * @param recordId |
| | | */ |
| | | public void addStock(Long productModelId, BigDecimal quantity, String recordType, Long recordId) { |
| | | addStock(productModelId, quantity, recordType, recordId, null); |
| | | } |
| | | |
| | | /** |
| | | * åæ ¼å
¥åº |
| | | * @param recordType |
| | | * @param recordId |
| | | */ |
| | | public void addStock(Long productModelId, BigDecimal quantity, String recordType, Long recordId, LocalDateTime createTime) { |
| | | StockInventoryDto stockInventoryDto = new StockInventoryDto(); |
| | | stockInventoryDto.setRecordId(recordId); |
| | | stockInventoryDto.setRecordType(String.valueOf(recordType)); |
| | | stockInventoryDto.setQualitity(quantity); |
| | | stockInventoryDto.setProductModelId(productModelId); |
| | | stockInventoryDto.setCreateTime(createTime); |
| | | stockInventoryService.addStockInRecordOnly(stockInventoryDto); |
| | | } |
| | | |
| | |
| | | * @param recordId |
| | | */ |
| | | public void addStockWithBatchNo(Long productModelId, BigDecimal quantity, String recordType, Long recordId, String batchNo) { |
| | | addStockWithBatchNo(productModelId, quantity, recordType, recordId, batchNo, null); |
| | | } |
| | | |
| | | /** |
| | | * åæ ¼å
¥åºå¸¦æ¹æ¬¡å· |
| | | * @param recordType |
| | | * @param recordId |
| | | */ |
| | | public void addStockWithBatchNo(Long productModelId, BigDecimal quantity, String recordType, Long recordId, String batchNo, LocalDateTime createTime) { |
| | | StockInventoryDto stockInventoryDto = new StockInventoryDto(); |
| | | stockInventoryDto.setRecordId(recordId); |
| | | stockInventoryDto.setRecordType(String.valueOf(recordType)); |
| | | stockInventoryDto.setQualitity(quantity); |
| | | stockInventoryDto.setProductModelId(productModelId); |
| | | stockInventoryDto.setBatchNo(batchNo); |
| | | stockInventoryDto.setCreateTime(createTime); |
| | | stockInventoryService.addStockInRecordOnly(stockInventoryDto); |
| | | } |
| | | |
| | |
| | | stockInventoryDto.setQualitity(quantity); |
| | | stockInventoryDto.setProductModelId(productModelId); |
| | | stockInventoryDto.setBatchNo(batchNo); |
| | | stockInventoryService.addStockOutRecordOnly(stockInventoryDto); |
| | | StockOutRecordDto stockOutRecordDto = stockInventoryService.addStockOutRecordOnly(stockInventoryDto); |
| | | stockOutRecordService.batchApprove(Collections.singletonList(stockOutRecordDto.getId()),1); |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | //å é¤åºåºè®°å½ |
| | | public void deleteStockOutRecord(Long recordId, String recordType) { |
| | | List<StockOutRecord> records = stockOutRecordService.list(new QueryWrapper<StockOutRecord>() |
| | | .lambda().eq(StockOutRecord::getRecordId, recordId) |
| | | List<StockOutRecord> list = stockOutRecordService.list(Wrappers.<StockOutRecord>lambdaQuery() |
| | | .eq(StockOutRecord::getRecordId, recordId) |
| | | .eq(StockOutRecord::getRecordType, recordType)); |
| | | if (ObjectUtils.isEmpty(records)) { |
| | | return; |
| | | } |
| | | List<Long> approvedIds = records.stream() |
| | | .filter(one -> ReviewStatusEnum.APPROVED.getCode().equals(one.getApprovalStatus())) |
| | | .map(StockOutRecord::getId) |
| | | .toList(); |
| | | List<Long> pendingIds = records.stream() |
| | | .filter(one -> !ReviewStatusEnum.APPROVED.getCode().equals(one.getApprovalStatus())) |
| | | .map(StockOutRecord::getId) |
| | | .toList(); |
| | | if (!approvedIds.isEmpty()) { |
| | | stockOutRecordService.batchDelete(approvedIds); |
| | | } |
| | | if (!pendingIds.isEmpty()) { |
| | | stockOutRecordService.removeByIds(pendingIds); |
| | | if (CollectionUtils.isNotEmpty(list)) { |
| | | for (StockOutRecord one : list) { |
| | | if (ReviewStatusEnum.APPROVED.getCode().equals(one.getApprovalStatus())) { |
| | | stockOutRecordService.batchDelete(Collections.singletonList(one.getId())); |
| | | } else { |
| | | stockOutRecordService.removeById(one.getId()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | @Excel(name = "éæ±æ°é") |
| | | private BigDecimal qtyRequired; |
| | | |
| | | @Schema(description = "æ¥æº éå®/å
é¨") |
| | | @Excel(name = "æ¥æº éå®/å
é¨") |
| | | private String source; |
| | | |
| | | @Schema(description = "æ¿è¯ºæ¥æ") |
| | | @Excel(name = "æ¿è¯ºæ¥æ") |
| | | private LocalDate promisedDeliveryDate; |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.production.bean.vo; |
| | | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | @Data |
| | | @Schema(name = "ProcessRouteStatusVo", description = "å·¥åºç产è¿åº¦é¡¹") |
| | | public class ProcessRouteStatusVo { |
| | | |
| | | @Schema(description = "å·¥åºåç§°") |
| | | private String name; |
| | | |
| | | @Schema(description = "宿è¿åº¦ç¾åæ¯") |
| | | private BigDecimal percentage; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.production.bean.vo; |
| | | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | @Data |
| | | @Schema(name = "ProductionOrderProcessTaskVo", description = "ç产订åå·¥åºä»»å¡è¿åº¦") |
| | | public class ProductionOrderProcessTaskVo { |
| | | |
| | | @Schema(description = "ç产订åID") |
| | | private Long productionOrderId; |
| | | |
| | | @Schema(description = "å·¥åºåç§°") |
| | | private String operationName; |
| | | |
| | | @Schema(description = "宿è¿åº¦") |
| | | private BigDecimal completionStatus; |
| | | } |
| | |
| | | |
| | | @Schema(description = "æ¯å¦å·²éæ") |
| | | private Boolean returned; |
| | | |
| | | @Schema(description = "å·¥åºç产è¿åº¦") |
| | | private List<ProcessRouteStatusVo> processRouteStatus; |
| | | } |
| | |
| | | package com.ruoyi.production.controller; |
| | | |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.production.bean.dto.ProductionBomStructureDto; |
| | | import com.ruoyi.production.bean.vo.ProductionBomStructureVo; |
| | |
| | | return R.ok(productionBomStructureService.listByBomId(bomId)); |
| | | } |
| | | |
| | | @Log(title = "æ°å¢æä¿®æ¹BOMç»æ", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/addOrUpdateBomStructs") |
| | | @Operation(summary = "æ°å¢æä¿®æ¹BOMç»æ") |
| | | public R addProductionBomStructure(@RequestBody ProductionBomStructureDto productionBomStructureDto) { |
| | |
| | | package com.ruoyi.production.controller; |
| | | |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.production.bean.dto.ProductionOperationTaskDto; |
| | |
| | | return R.ok(productionOperationTaskService.getProductionOperationTaskInfo(id)); |
| | | } |
| | | |
| | | @Log(title = "æ°å¢å·¥å", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | @Operation(summary = "æ°å¢å·¥å") |
| | | public R<Boolean> add(@RequestBody ProductionOperationTask productionOperationTask) { |
| | | return R.ok(productionOperationTaskService.saveProductionOperationTask(productionOperationTask)); |
| | | } |
| | | |
| | | @Log(title = "ä¿®æ¹å·¥å", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | @Operation(summary = "ä¿®æ¹å·¥å") |
| | | public R<Boolean> edit(@RequestBody ProductionOperationTask productionOperationTask) { |
| | | return R.ok(productionOperationTaskService.saveProductionOperationTask(productionOperationTask)); |
| | | } |
| | | |
| | | @Log(title = "å é¤å·¥å", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/delete") |
| | | @Operation(summary = "å é¤å·¥å") |
| | | public R<Boolean> remove(@RequestBody List<Long> ids) { |
| | | return R.ok(productionOperationTaskService.removeProductionOperationTask(ids)); |
| | | } |
| | | |
| | | @Log(title = "产å工忴æ°", businessType = BusinessType.UPDATE) |
| | | @Operation(summary = "产å工忴æ°") |
| | | @PostMapping("/updateProductWorkOrder") |
| | | public R updateProductWorkOrder(@RequestBody ProductionOperationTaskDto dto) { |
| | | return R.ok(productionOperationTaskService.updateProductWorkOrder(dto)); |
| | | } |
| | | |
| | | @Log(title = "ææ´¾æ¥å·¥äºº", businessType = BusinessType.UPDATE) |
| | | @Operation(summary = "ææ´¾æ¥å·¥äºº") |
| | | @PostMapping("/assign") |
| | | public R<Boolean> assign(@RequestBody ProductionOperationTaskDto dto) { |
| | | return R.ok(productionOperationTaskService.assign(dto)); |
| | | } |
| | | |
| | | @Log(title = "å·¥åæµè½¬å¡ä¸è½½", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/down") |
| | | @Operation(summary = "å·¥åæµè½¬å¡ä¸è½½") |
| | | public void down(HttpServletResponse response, @RequestBody ProductionOperationTaskDto dto) { |
| | |
| | | return R.ok(productionOrderService.getProductionOrderInfo(id)); |
| | | } |
| | | |
| | | @Log(title = "ç产工å", businessType = BusinessType.INSERT) |
| | | @PostMapping("/addOrder") |
| | | @Operation(summary = "æ°å¢ç产订å", description = "æ°å¢ä¸ååªæ¯æ1ç§æ¹å¼ï¼ç产计åçæï¼ä¼ productionPlanIdsï¼ç³»ç»èªå¨æ±æ»è®¡åå¾å°äº§åè§æ ¼åæ°éï¼" |
| | | + "technologyRoutingId 为空æ¶ä¼èªå¨å¹é
该产åè§æ ¼ææ°å·¥èºè·¯çº¿ï¼quantity æç»å¿
é¡»å¤§äº 0ã") |
| | |
| | | return R.ok(productionOrderService.saveProductionOrder(productionOrder)); |
| | | } |
| | | |
| | | @Log(title = "ç产工å", businessType = BusinessType.UPDATE) |
| | | @Operation(summary = "ç»å®å·¥èºè·¯çº¿") |
| | | @PostMapping("/bindingRoute") |
| | | public R bindingRoute(@RequestBody ProductionOrderDto productionOrderDto) { |
| | | return R.ok(productionOrderService.bindingRoute(productionOrderDto)); |
| | | } |
| | | |
| | | @Log(title = "ç产工å", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/syncSnapshot/{id}") |
| | | @Operation(summary = "忥ç产订åå·¥èº/BOMå¿«ç
§") |
| | | public R<Integer> syncSnapshot(@PathVariable Long id) { |
| | | return R.ok(productionOrderService.syncProductionOrderSnapshot(id)); |
| | | } |
| | | |
| | | @Log(title = "ç产工å", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/delete") |
| | | @Operation(summary = "å é¤ç产订å") |
| | | public R<Boolean> remove(@RequestBody List<Long> ids) { |
| | |
| | | return R.ok(productionOrderService.getWorkOrderReportInspectDetail(productionOrderDto)); |
| | | } |
| | | |
| | | @Log(title = "ç产工å", businessType = BusinessType.UPDATE) |
| | | @Operation(summary = "æ´æ°è®¢åç¶æ") |
| | | @PostMapping("/updateOrder") |
| | | public R updateOrder(@RequestBody ProductionOrderDto productionOrderDto) { |
| | |
| | | package com.ruoyi.production.controller; |
| | | |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.production.bean.dto.ProductionOrderPickDto; |
| | | import com.ruoyi.production.bean.vo.ProductionOrderPickVo; |
| | |
| | | |
| | | private final ProductionOrderPickService productionOrderPickService; |
| | | |
| | | @Log(title = "颿ä¿åå°çº¿è¾¹ä»", businessType = BusinessType.INSERT) |
| | | @PostMapping("/savePick") |
| | | @Operation(summary = "颿ä¿åå°çº¿è¾¹ä»") |
| | | public R<Boolean> savePick(@RequestBody ProductionOrderPickDto dto) { |
| | | return R.ok(productionOrderPickService.savePick(dto)); |
| | | } |
| | | |
| | | @Log(title = "忴颿", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/updatePick") |
| | | @Operation(summary = "忴颿") |
| | | public R<Boolean> updatePick(@RequestBody ProductionOrderPickDto dto) { |
| | |
| | | package com.ruoyi.production.controller; |
| | | |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.production.pojo.ProductionOrderRoutingOperation; |
| | | import com.ruoyi.production.service.ProductionOrderRoutingOperationService; |
| | |
| | | return R.ok(productionOrderRoutingService.listMain(orderId)); |
| | | } |
| | | |
| | | @Log(title = "ç产工åºè·¯ç±", businessType = BusinessType.INSERT) |
| | | @PostMapping("/addRouteItem") |
| | | @Operation(summary = "æ°å¢ç产订åçå·¥èºè·¯çº¿è¯¦æ
") |
| | | public R addRouteItem(@RequestBody ProductionOrderRoutingOperation productionOrderRoutingOperation) { |
| | | return productionOrderRoutingOperationService.addRouteItem(productionOrderRoutingOperation); |
| | | } |
| | | |
| | | @Log(title = "ç产工åºè·¯ç±", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/updateRouteItem") |
| | | @Operation(summary = "ä¿®æ¹ç产订åçå·¥èºè·¯çº¿è¯¦æ
") |
| | | public R updateRouteItem(@RequestBody ProductionOrderRoutingOperation productionOrderRoutingOperation) { |
| | | return productionOrderRoutingOperationService.updateRouteItem(productionOrderRoutingOperation); |
| | | return R.ok(productionOrderRoutingOperationService.updateRouteItem(productionOrderRoutingOperation)); |
| | | } |
| | | |
| | | @Log(title = "ç产工åºè·¯ç±", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/deleteRouteItem/{id}") |
| | | @Operation(summary = "å é¤ç产工èºè·¯çº¿") |
| | | public R deleteRouteItem(@PathVariable("id") Long id) { |
| | | return productionOrderRoutingOperationService.deleteRouteItem(id); |
| | | } |
| | | |
| | | @Log(title = "ç产工åºè·¯ç±", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/sortRouteItem") |
| | | @Operation(summary = "æåº") |
| | | public R sortRouteItem(@RequestBody ProductionOrderRoutingOperation productionOrderRoutingOperation) { |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | 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.domain.R; |
| | | import com.ruoyi.production.bean.dto.ProductionOrderRoutingOperationParamDto; |
| | | import com.ruoyi.production.bean.vo.ProductionOrderRoutingOperationParamVo; |
| | |
| | | return R.ok(productionOrderRoutingOperationParamService.getProductionOrderRoutingOperationParamInfo(id)); |
| | | } |
| | | |
| | | @Log(title = "ç产工åºåæ°", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | @Operation(summary = "æ°å¢ç产订åå·¥èºè·¯çº¿å·¥åºåæ°") |
| | | public R<Boolean> add(@RequestBody ProductionOrderRoutingOperationParam item) { |
| | | return R.ok(productionOrderRoutingOperationParamService.saveProductionOrderRoutingOperationParam(item)); |
| | | } |
| | | |
| | | @Log(title = "ç产工åºåæ°", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | @Operation(summary = "ä¿®æ¹ç产订åå·¥èºè·¯çº¿å·¥åºåæ°") |
| | | public R<Boolean> edit(@RequestBody ProductionOrderRoutingOperationParam item) { |
| | | return R.ok(productionOrderRoutingOperationParamService.updateById(item)); |
| | | } |
| | | |
| | | @Log(title = "ç产工åºåæ°", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{id}") |
| | | @Operation(summary = "å é¤ç产订åå·¥èºè·¯çº¿å·¥åºåæ°") |
| | | public R<Boolean> remove(@PathVariable("id") Long id) { |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.production.bean.dto.ProductionProductMainDto; |
| | | import com.ruoyi.production.service.ProductionProductMainService; |
| | |
| | | * @param productionProductMainDto |
| | | * @return |
| | | */ |
| | | @Log(title = "ç产产å", businessType = BusinessType.INSERT) |
| | | @PostMapping("/addProductMain") |
| | | @PreAuthorize("@ss.hasPermi('productionProductMain:add')") |
| | | public R addProductMain(@RequestBody ProductionProductMainDto productionProductMainDto) { |
| | | return R.ok(productionProductMainService.addProductMain(productionProductMainDto)); |
| | | } |
| | | |
| | | @Log(title = "ç产产å", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | @Operation(summary = "æ°å¢ç产æ¥å·¥") |
| | | public R add(@RequestBody ProductionProductMainDto productionProductMainDto) { |
| | | return R.ok(productionProductMainService.saveProductionProductMain(productionProductMainDto)); |
| | | } |
| | | |
| | | @Log(title = "ç产产å", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | @Operation(summary = "ä¿®æ¹ç产æ¥å·¥") |
| | | public R edit(@RequestBody ProductionProductMainDto productionProductMainDto) { |
| | | return R.ok(productionProductMainService.saveProductionProductMain(productionProductMainDto)); |
| | | } |
| | | |
| | | @Log(title = "ç产产å", businessType = BusinessType.DELETE) |
| | | @Operation(summary = "å 餿¥å·¥") |
| | | @DeleteMapping("/delete") |
| | | public R delete(@RequestBody ProductionProductMainDto productionProductMainDto) { |
| | | return R.ok(productionProductMainService.removeProductMain(productionProductMainDto.getId())); |
| | | } |
| | | |
| | | @Log(title = "ç产产å", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{id}") |
| | | @Operation(summary = "å é¤ç产æ¥å·¥") |
| | | public R remove(@PathVariable("id") Long id) { |
| | |
| | | /** |
| | | * å¯¼åº |
| | | */ |
| | | @Log(title = "ç产产å", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, ProductionProductMainDto productionProductMainDto) { |
| | | List<ProductionProductMainDto> list; |
| | |
| | | WAIT(1, "å¾
å¼å§"), |
| | | RUNNING(2, "è¿è¡ä¸"), |
| | | FINISHED(3, "已宿"), |
| | | //CANCEL(4, "已忶"), |
| | | END(5, "å·²ç»æ"); |
| | | CANCEL(4, "已忶"); |
| | | |
| | | private final Integer code; |
| | | private final String desc; |
| | |
| | | } |
| | | |
| | | /** |
| | | * 夿æ¯å¦å
许å é¤ï¼1ï¼ |
| | | * 夿æ¯å¦å
许å é¤ï¼4ï¼ |
| | | */ |
| | | public static boolean canDelete(Integer code) { |
| | | return WAIT.getCode().equals(code); |
| | | return WAIT.getCode().equals(code) || CANCEL.getCode().equals(code); |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | /** |
| | | * 夿æ¯å¦å·²å¼å§ç产ï¼2ã3ã5ï¼ |
| | | * 夿æ¯å¦å·²å¼å§ç产ï¼2ã3ï¼ |
| | | */ |
| | | public static boolean isStarted(Integer code) { |
| | | return RUNNING.getCode().equals(code) || FINISHED.getCode().equals(code) || END.getCode().equals(code); |
| | | return RUNNING.getCode().equals(code) || FINISHED.getCode().equals(code); |
| | | } |
| | | } |
| | |
| | | import com.ruoyi.home.dto.processDataProductionStatisticsDto; |
| | | import com.ruoyi.production.bean.dto.ProductionOperationTaskDto; |
| | | import com.ruoyi.production.bean.vo.ProductionOperationTaskVo; |
| | | import com.ruoyi.production.bean.vo.ProductionOrderProcessTaskVo; |
| | | import com.ruoyi.production.pojo.ProductionOperationTask; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | ProductionOperationTaskDto getProductWorkOrderFlowCard(@Param("id") Long id); |
| | | |
| | | List<ProductionOperationTaskVo> getOperation(@Param("c") ProductionOperationTaskDto dto); |
| | | |
| | | List<ProductionOrderProcessTaskVo> listProcessStatusByOrderIds(@Param("orderIds") List<Long> orderIds); |
| | | } |
| | |
| | | private String npsNo; |
| | | |
| | | @Schema(description = "å½å
¥æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @Schema(description = "æ´æ°æ¶é´") |
| | |
| | | R deleteRouteItem(Long id); |
| | | |
| | | int sortRouteItem(ProductionOrderRoutingOperation productionOrderRoutingOperation); |
| | | |
| | | } |
| | |
| | | // æ£æ¥æ°æ®æ¯å¦éå¤ï¼é¿å
éå¤ä¿å |
| | | boolean duplicate = productionOrderRoutingOperationParamMapper.selectCount( |
| | | Wrappers.<ProductionOrderRoutingOperationParam>lambdaQuery() |
| | | .eq(ProductionOrderRoutingOperationParam::getProductionOrderId, item.getProductionOrderId()) |
| | | .isNull(ProductionOrderRoutingOperationParam::getProductionProductMainId) |
| | | .eq(ProductionOrderRoutingOperationParam::getProductionOrderRoutingOperationId, item.getProductionOrderRoutingOperationId()) |
| | | .eq(item.getTechnologyRoutingOperationParamId() != null, |
| | | ProductionOrderRoutingOperationParam::getTechnologyRoutingOperationParamId, item.getTechnologyRoutingOperationParamId()) |
| | | .eq(item.getTechnologyRoutingOperationParamId() == null && item.getTechnologyOperationParamId() != null, |
| | | ProductionOrderRoutingOperationParam::getTechnologyOperationParamId, item.getTechnologyOperationParamId()) |
| | | .eq(item.getTechnologyRoutingOperationParamId() == null |
| | | && item.getTechnologyOperationParamId() == null |
| | | && item.getParamId() != null, |
| | | ProductionOrderRoutingOperationParam::getParamId, item.getParamId()) |
| | | .eq(item.getTechnologyRoutingOperationParamId() == null |
| | | && item.getTechnologyOperationParamId() == null |
| | | && item.getParamId() == null |
| | | && item.getParamCode() != null, |
| | | .eq(item.getTechnologyRoutingOperationParamId() == null && item.getParamCode() != null, |
| | | ProductionOrderRoutingOperationParam::getParamCode, item.getParamCode()) |
| | | .ne(item.getId() != null, ProductionOrderRoutingOperationParam::getId, item.getId()) |
| | | ) > 0; |
| | |
| | | import com.ruoyi.production.bean.vo.ProductionOrderVo; |
| | | import com.ruoyi.production.bean.vo.ProductionPlanVo; |
| | | import com.ruoyi.production.bean.vo.ProductionOrderWorkOrderDetailVo; |
| | | import com.ruoyi.production.bean.vo.ProcessRouteStatusVo; |
| | | import com.ruoyi.production.bean.vo.ProductionOrderProcessTaskVo; |
| | | import com.ruoyi.production.enums.ProductOrderStatusEnum; |
| | | import com.ruoyi.production.mapper.*; |
| | | import com.ruoyi.production.pojo.*; |
| | |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | |
| | | // å页æ¥è¯¢ç产订å |
| | | Page<ProductionOrderVo> result = (Page<ProductionOrderVo>) baseMapper.pageProductionOrder(page, dto); |
| | | fillProductImages(result.getRecords()); |
| | | fillProcessRouteStatus(result.getRecords()); |
| | | return result; |
| | | } |
| | | |
| | |
| | | // æ¥è¯¢ç产订åå表 |
| | | List<ProductionOrderVo> records = baseMapper.listProductionOrder(dto); |
| | | fillProductImages(records); |
| | | fillProcessRouteStatus(records); |
| | | return records; |
| | | } |
| | | |
| | |
| | | // ä¸åå
¥å£ç»ä¸è¡¥é½æ¥æºåæ®ã计ååå·¥èºä¿¡æ¯ï¼é¿å
å端åå«ä¼ å¤å¥å段ã |
| | | validateAndFillOrder(productionOrder, oldOrder); |
| | | if (productionOrder.getNpsNo() == null || productionOrder.getNpsNo().trim().isEmpty()) { |
| | | productionOrder.setNpsNo(generateNextOrderNo(productionOrder.getCreateTime() != null ? productionOrder.getCreateTime() : LocalDateTime.now())); |
| | | productionOrder.setNpsNo(generateNextOrderNo()); |
| | | } |
| | | if (productionOrder.getCompleteQuantity() == null) { |
| | | productionOrder.setCompleteQuantity(BigDecimal.ZERO); |
| | |
| | | || !Objects.equals(oldOrder.getProductModelId(), productionOrder.getProductModelId()) |
| | | || compareDecimal(oldOrder.getQuantity(), productionOrder.getQuantity()) != 0 |
| | | || productionOrderRoutingMapper.selectCount(Wrappers.<ProductionOrderRouting>lambdaQuery() |
| | | .eq(ProductionOrderRouting::getProductionOrderId, productionOrder.getId())) == 0); |
| | | .eq(ProductionOrderRouting::getProductionOrderId, productionOrder.getId())) == 0); |
| | | if (needSync) { |
| | | syncProductionOrderSnapshot(productionOrder.getId()); |
| | | } |
| | |
| | | Map<String, BigDecimal> operationDemandedQuantityMap = |
| | | buildOperationDemandedQuantityMap(orderBomStructureList, rootProductModelId); |
| | | Map<Long, String> operationNameMap = technologyOperationMapper.selectBatchIds( |
| | | // éåå¤çæ°æ®å¹¶ç»è£
ç»æ |
| | | // éåå¤çæ°æ®å¹¶ç»è£
ç»æ |
| | | routingOperations.stream() |
| | | .map(TechnologyRoutingOperation::getTechnologyOperationId) |
| | | .filter(Objects::nonNull) |
| | |
| | | private void clearProductionSnapshot(Long productionOrderId) { |
| | | // æ¸
ç订åå·²çæçå·¥èºä¸BOMå¿«ç
§æ°æ® |
| | | boolean hasPickRecord = productionOrderPickRecordMapper.selectCount( |
| | | // æ¥è¯¢å¹¶åå¤ä¸å¡æ°æ® |
| | | // æ¥è¯¢å¹¶åå¤ä¸å¡æ°æ® |
| | | Wrappers.<ProductionOrderPickRecord>lambdaQuery() |
| | | .eq(ProductionOrderPickRecord::getProductionOrderId, productionOrderId)) > 0; |
| | | // åæ°ä¸åç½®æ¡ä»¶æ ¡éª |
| | |
| | | List<Long> taskIds = productionOperationTaskMapper.selectList( |
| | | Wrappers.<ProductionOperationTask>lambdaQuery() |
| | | .eq(ProductionOperationTask::getProductionOrderId, productionOrderId)) |
| | | // éåå¤çæ°æ®å¹¶ç»è£
ç»æ |
| | | // éåå¤çæ°æ®å¹¶ç»è£
ç»æ |
| | | .stream().map(ProductionOperationTask::getId).collect(Collectors.toList()); |
| | | if (!taskIds.isEmpty()) { |
| | | // å·²ææ¥å·¥è®°å½è¯´æè®¢åå·²å¼å·¥ï¼æ¤æ¶ä¸å
许åé建快ç
§ã |
| | |
| | | .orderByDesc(ProductionOrder::getId); |
| | | } |
| | | |
| | | private String generateNextOrderNo(LocalDateTime createTime) { |
| | | private String generateNextOrderNo() { |
| | | // çæä¸ä¸ä¸ªç产订åå· |
| | | LocalDate localDate = createTime.toLocalDate(); |
| | | String datePrefix = localDate.format(DateTimeFormatter.ofPattern("yyyyMMdd")); |
| | | String datePrefix = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyMMdd")); |
| | | String prefix = "SC" + datePrefix; |
| | | ProductionOrder latestOrder = this.getOne(Wrappers.<ProductionOrder>lambdaQuery() |
| | | .likeRight(ProductionOrder::getNpsNo, prefix) |
| | |
| | | } |
| | | } |
| | | |
| | | private void fillProcessRouteStatus(List<ProductionOrderVo> records) { |
| | | if (records == null || records.isEmpty()) { |
| | | return; |
| | | } |
| | | List<Long> orderIds = records.stream() |
| | | .map(ProductionOrderVo::getId) |
| | | .filter(Objects::nonNull) |
| | | .distinct() |
| | | .collect(Collectors.toList()); |
| | | if (orderIds.isEmpty()) { |
| | | return; |
| | | } |
| | | |
| | | List<ProductionOrderProcessTaskVo> tasks = productionOperationTaskMapper.listProcessStatusByOrderIds(orderIds); |
| | | Map<Long, List<ProcessRouteStatusVo>> statusMap = new LinkedHashMap<>(); |
| | | if (tasks != null) { |
| | | for (ProductionOrderProcessTaskVo task : tasks) { |
| | | if (task == null || task.getProductionOrderId() == null) { |
| | | continue; |
| | | } |
| | | ProcessRouteStatusVo status = new ProcessRouteStatusVo(); |
| | | status.setName(task.getOperationName() != null && !task.getOperationName().isBlank() |
| | | ? task.getOperationName() |
| | | : "æªç¥å·¥åº"); |
| | | BigDecimal percentage = task.getCompletionStatus() == null |
| | | ? BigDecimal.ZERO |
| | | : task.getCompletionStatus(); |
| | | if (percentage.compareTo(new BigDecimal("100")) > 0) { |
| | | percentage = new BigDecimal("100"); |
| | | } |
| | | status.setPercentage(percentage); |
| | | statusMap.computeIfAbsent(task.getProductionOrderId(), key -> new ArrayList<>()).add(status); |
| | | } |
| | | } |
| | | |
| | | for (ProductionOrderVo record : records) { |
| | | record.setProcessRouteStatus(statusMap.getOrDefault(record.getId(), Collections.emptyList())); |
| | | } |
| | | } |
| | | |
| | | private StorageBlobVO toStorageBlobVO(StorageBlob blob) { |
| | | // å°åå¨æä»¶å¯¹è±¡è½¬æ¢ä¸ºVO |
| | | StorageBlobVO vo = BeanUtil.copyProperties(blob, StorageBlobVO.class); |
| | |
| | | new Page<ProductionOperationTaskVo>(1, -1), taskQuery); |
| | | List<ProductionOperationTaskVo> workOrderList = workOrderPage == null || workOrderPage.getRecords() == null |
| | | ? Collections.emptyList() |
| | | // éåå¤çæ°æ®å¹¶ç»è£
ç»æ |
| | | // éåå¤çæ°æ®å¹¶ç»è£
ç»æ |
| | | : workOrderPage.getRecords().stream() |
| | | .filter(Objects::nonNull) |
| | | .sorted(Comparator.comparing(ProductionOperationTaskVo::getId, Comparator.nullsLast(Comparator.naturalOrder()))) |
| | |
| | | .collect(Collectors.toList()); |
| | | List<ProductionProductMain> reportMainList = workOrderIdList.isEmpty() |
| | | ? Collections.emptyList() |
| | | // æ¥è¯¢å¹¶åå¤ä¸å¡æ°æ® |
| | | // æ¥è¯¢å¹¶åå¤ä¸å¡æ°æ® |
| | | : productionProductMainMapper.selectList( |
| | | Wrappers.<ProductionProductMain>lambdaQuery() |
| | | .in(ProductionProductMain::getProductionOperationTaskId, workOrderIdList) |
| | |
| | | } |
| | | } |
| | | |
| | | // è¿æ»¤åºéæ ¹èç¹ï¼å®é
é¢æé¡¹ï¼ |
| | | // æé¤æå
¥åä¸äº§åºåç¸å䏿¯ä¾ä¸º1çæ
åµï¼èªèº«å å·¥ï¼ä¸éè¦é¢æï¼ |
| | | // æ¶é订åæåè§æ ¼IDï¼å
å«ç产订åæåè§æ ¼ä¸BOMæ ¹èç¹è§æ ¼ï¼ç¨äºæé¤âèªå·±âè¿ä¸ç©æ |
| | | Set<Long> finishedProductModelIds = new HashSet<>(); |
| | | if (productionOrder != null && productionOrder.getProductModelId() != null) { |
| | | finishedProductModelIds.add(productionOrder.getProductModelId()); |
| | | } |
| | | bomStructureList.stream() |
| | | .filter(s -> s != null && (s.getParentId() == null || s.getParentId() == 0)) |
| | | .map(ProductionBomStructureVo::getProductModelId) |
| | | .filter(Objects::nonNull) |
| | | .forEach(finishedProductModelIds::add); |
| | | |
| | | // æ¶éææè¢«å¼ç¨ä¸ºç¶çº§çèç¹IDï¼BOM仿åä¸éå·¥åºå¾éé
ç½®åä¸éå·¥åºï¼ |
| | | // ä¸é´èç¹æ¯ä¸ä¸éå·¥åºç产åºï¼èªå¶ï¼ï¼åªææ¯æ¡åæ¯æéå±çå¶åèç¹ææ¯çæ£éè¦é¢ç¨çç©æã |
| | | Set<Long> parentNodeIds = bomStructureList.stream() |
| | | .filter(s -> s != null && s.getParentId() != null && s.getParentId() != 0) |
| | | .map(ProductionBomStructureVo::getParentId) |
| | | .filter(Objects::nonNull) |
| | | .collect(Collectors.toSet()); |
| | | |
| | | // è¿æ»¤åºå¶åèç¹ï¼å®é
颿项ï¼ï¼éæ ¹èç¹ãéä¸é´èç¹ï¼å¹¶æé¤ä¸è®¢åæååè§æ ¼çç©æï¼èªå¶æåæ éé¢æï¼ |
| | | List<ProductionBomStructureVo> childStructureList = bomStructureList.stream() |
| | | .filter(s -> s != null && s.getParentId() != null && s.getParentId() != 0) |
| | | .filter(s -> { |
| | | ProductionBomStructureVo parent = structureByIdMap.get(s.getParentId()); |
| | | if (parent == null) { |
| | | return true; |
| | | } |
| | | // æå
¥åä¸äº§åºåç¸å䏿¯ä¾ä¸º1æ¶ï¼ä¸éè¦é¢æ |
| | | boolean sameProduct = Objects.equals(s.getProductModelId(), parent.getProductModelId()); |
| | | boolean unitRatio = BigDecimal.ONE.compareTo(defaultDecimal(s.getUnitQuantity())) == 0; |
| | | return !(sameProduct && unitRatio); |
| | | }) |
| | | .filter(s -> s.getId() == null || !parentNodeIds.contains(s.getId())) |
| | | .filter(s -> s.getProductModelId() == null || !finishedProductModelIds.contains(s.getProductModelId())) |
| | | .collect(Collectors.toList()); |
| | | |
| | | // éåå¤çæ°æ®å¹¶ç»è£
ç»æ |
| | |
| | | if (!productModelIds.isEmpty()) { |
| | | List<StockInventory> stockList = stockInventoryMapper.selectList( |
| | | Wrappers.<StockInventory>lambdaQuery() |
| | | .in(StockInventory::getProductModelId, productModelIds)); |
| | | .in(StockInventory::getProductModelId, productModelIds) |
| | | .gt(StockInventory::getQualitity, BigDecimal.ZERO)); |
| | | for (StockInventory stockItem : stockList) { |
| | | if (stockItem == null || stockItem.getProductModelId() == null) { |
| | | continue; |
| | |
| | | } |
| | | } |
| | | |
| | | List<ProductionOrderPickVo> pickList = new ArrayList<>(); |
| | | Map<String, ProductionOrderPickVo> mergedPickMap = new LinkedHashMap<>(); |
| | | for (ProductionBomStructureVo structure : childStructureList) { |
| | | if (structure == null || structure.getProductModelId() == null) { |
| | | continue; |
| | | } |
| | | Long productModelId = structure.getProductModelId(); |
| | | ProductionOrderPickVo vo = new ProductionOrderPickVo(); |
| | | vo.setProductModelId(productModelId); |
| | | vo.setOperationName(structure.getOperationName()); |
| | | vo.setTechnologyOperationId(structure.getTechnologyOperationId()); |
| | | vo.setProductName(structure.getProductName()); |
| | | vo.setModel(structure.getModel()); |
| | | vo.setDemandedQuantity(defaultDecimal(structure.getDemandedQuantity())); |
| | | vo.setUnit(structure.getUnit()); |
| | | List<String> batchNoList = stockBatchNoMap.get(productModelId) == null |
| | | ? Collections.emptyList() |
| | | : new ArrayList<>(stockBatchNoMap.get(productModelId)); |
| | | vo.setBatchNoList(batchNoList); |
| | | vo.setStockQuantity(stockQuantityMap.getOrDefault(productModelId, BigDecimal.ZERO)); |
| | | vo.setBom(true); |
| | | pickList.add(vo); |
| | | String mergeKey = String.valueOf(structure.getTechnologyOperationId()) + "#" + productModelId; |
| | | ProductionOrderPickVo vo = mergedPickMap.get(mergeKey); |
| | | if (vo == null) { |
| | | vo = new ProductionOrderPickVo(); |
| | | vo.setProductModelId(productModelId); |
| | | vo.setOperationName(structure.getOperationName()); |
| | | vo.setTechnologyOperationId(structure.getTechnologyOperationId()); |
| | | vo.setProductName(structure.getProductName()); |
| | | vo.setModel(structure.getModel()); |
| | | vo.setDemandedQuantity(BigDecimal.ZERO); |
| | | vo.setUnit(structure.getUnit()); |
| | | List<String> batchNoList = stockBatchNoMap.get(productModelId) == null |
| | | ? Collections.emptyList() |
| | | : new ArrayList<>(stockBatchNoMap.get(productModelId)); |
| | | vo.setBatchNoList(batchNoList); |
| | | vo.setStockQuantity(stockQuantityMap.getOrDefault(productModelId, BigDecimal.ZERO)); |
| | | vo.setBom(true); |
| | | mergedPickMap.put(mergeKey, vo); |
| | | } |
| | | vo.setDemandedQuantity(defaultDecimal(vo.getDemandedQuantity()).add(defaultDecimal(structure.getDemandedQuantity()))); |
| | | } |
| | | return pickList; |
| | | return new ArrayList<>(mergedPickMap.values()); |
| | | } |
| | | |
| | | @Override |
| | | public int updateOrder(ProductionOrderDto productionOrderDto) { |
| | | // æ´æ°ç产订åä¸»æ°æ® |
| | | productionOrderDto.setStatus(ProductOrderStatusEnum.END.getCode()); |
| | | productionOrderDto.setStatus(5); |
| | | return baseMapper.updateById(productionOrderDto); |
| | | } |
| | | } |
| | |
| | | BeanUtils.copyProperties(dto, entity); |
| | | entity.setProductModelId(resolveProductModelId(dto, i + 2, allModels, productNameById)); |
| | | entity.setStatus(PLAN_STATUS_WAIT); |
| | | entity.setSource("å
é¨"); |
| | | entity.setSource(StringUtils.isNotEmpty(dto.getSource()) ? StringUtils.trim(dto.getSource()) : "å
é¨"); |
| | | entity.setQuantityIssued(BigDecimal.ZERO); |
| | | entity.setCreateTime(now); |
| | | entity.setUpdateTime(now); |
| | |
| | | import com.ruoyi.quality.mapper.*; |
| | | import com.ruoyi.quality.pojo.*; |
| | | import com.ruoyi.stock.pojo.StockInRecord; |
| | | import com.ruoyi.stock.pojo.StockInventory; |
| | | import com.ruoyi.stock.service.StockInRecordService; |
| | | import com.ruoyi.stock.dto.StockInventoryDto; |
| | | import com.ruoyi.stock.service.StockInventoryService; |
| | |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.ArrayList; |
| | | import java.util.Collections; |
| | | import java.util.HashMap; |
| | | import java.util.LinkedHashMap; |
| | | import java.util.LinkedHashSet; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | import java.util.Set; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Service |
| | |
| | | StockInQualifiedRecordTypeEnum.PRODUCTION_REPORT_STOCK_IN.getCode(), |
| | | productModel.getId(), |
| | | "0"); |
| | | |
| | | //StockInRecord stockInRecord = stockInRecordService.getOne(Wrappers.<StockInRecord>lambdaQuery() |
| | | // .eq(StockInRecord::getRecordId, productionProductMain.getId()) |
| | | // .eq(StockInRecord::getRecordType, StockInQualifiedRecordTypeEnum.PRODUCTION_REPORT_STOCK_IN.getCode()) |
| | | //); |
| | | //stockInRecordService.batchApprove(Collections.singletonList(stockInRecord.getId()),1); |
| | | } |
| | | |
| | | productionOperationTask.setCompleteQuantity(defaultDecimal(productionOperationTask.getCompleteQuantity()).add(productQty)); |
| | |
| | | if (ObjectUtils.isNull(productionOrder.getStartTime())) { |
| | | productionOrder.setStartTime(LocalDateTime.now()); |
| | | } |
| | | // ä»
å¾
å¼å§ç¶æææ¨è¿å°è¿è¡ä¸ï¼é¿å
éæ«éå·¥åºæ¥å·¥æ¶è¦çå·²å®æç¶æã |
| | | if (ProductOrderStatusEnum.WAIT.getCode().equals(productionOrder.getStatus())) { |
| | | productionOrder.setStatus(ProductOrderStatusEnum.RUNNING.getCode()); |
| | | } |
| | | // 订åç¶æç±æåä¸éå·¥åºçåæ ¼äº§åºæ¨å¨ï¼é¿å
ä¸é´å·¥åºæåå®å·¥ã |
| | | productionOrder.setStatus(ProductOrderStatusEnum.RUNNING.getCode()); |
| | | if (isLastOperation) { |
| | | productionOrder.setCompleteQuantity(defaultDecimal(productionOrder.getCompleteQuantity()).add(productQty)); |
| | | if (productionOrder.getQuantity() != null |
| | |
| | | import com.ruoyi.basic.service.StorageBlobService;
|
| | | import com.ruoyi.basic.utils.FileUtil;
|
| | | import com.ruoyi.framework.aspectj.lang.annotation.Anonymous;
|
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log;
|
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
|
| | | import com.ruoyi.framework.web.domain.R;
|
| | | import io.swagger.v3.oas.annotations.Operation;
|
| | | import io.swagger.v3.oas.annotations.tags.Tag;
|
| | |
| | | private final StorageBlobService storageBlobService;
|
| | | private final FileUtil fileUtil;
|
| | |
|
| | | @Log(title = "éç¨æä»¶ä¸ä¼ ", businessType = BusinessType.INSERT)
|
| | | @PostMapping({"/upload"})
|
| | | @Operation(summary = "æä»¶ä¸ä¼ ")
|
| | | public R upload(@RequestParam("files") List<MultipartFile> files) {
|
| | |
| | | * å
Œ
±æä»¶ä¸ä¼
|
| | | * æ¤æ¥å£ä¸ä¼ çæä»¶æ°¸ä¹
ææï¼æ
ç¨
|
| | | */
|
| | | @Log(title = "å
Œ
±æä»¶ä¸ä¼ ", businessType = BusinessType.INSERT)
|
| | | @PostMapping({"/public/upload"})
|
| | | @Operation(summary = "æä»¶ä¸ä¼ ")
|
| | | public R publicUpload(@RequestParam("files") List<MultipartFile> files) {
|
| | |
| | | package com.ruoyi.project.system.domain;
|
| | |
|
| | | import com.baomidou.mybatisplus.annotation.TableField;
|
| | | import com.fasterxml.jackson.annotation.JsonIgnore;
|
| | | import com.ruoyi.common.xss.Xss;
|
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.fasterxml.jackson.annotation.JsonIgnore; |
| | | import com.ruoyi.common.xss.Xss; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Excel;
|
| | | import com.ruoyi.framework.aspectj.lang.annotation.Excel.ColumnType;
|
| | | import com.ruoyi.framework.aspectj.lang.annotation.Excel.Type;
|
| | |
| | | @Excel(name = "è´¦å·ç¶æ", readConverterExp = "0=æ£å¸¸,1=åç¨")
|
| | | private String status;
|
| | |
|
| | | /** å 餿 å¿ï¼0代表åå¨ 2代表å é¤ï¼ */
|
| | | private String delFlag;
|
| | |
|
| | | /** æ¯å¦å¼éAIåè½ï¼0å¦ 1æ¯ï¼ */
|
| | | @JsonIgnore
|
| | | private Integer aiEnabled;
|
| | |
|
| | | /** å 餿 å¿ï¼0代表åå¨ 2代表å é¤ï¼ */ |
| | | private String delFlag; |
| | | |
| | | /** æ¯å¦å¼éAIåè½ï¼0å¦ 1æ¯ï¼ */ |
| | | @JsonIgnore |
| | | private Integer aiEnabled; |
| | | |
| | | /** æåç»å½IP */
|
| | | @Excel(name = "æåç»å½IP", type = Type.EXPORT)
|
| | | private String loginIp;
|
| | |
| | | */
|
| | | @TableField(exist = false)
|
| | | private String deptNames;
|
| | |
|
| | | /**
|
| | | * è§è²åç§°
|
| | | */
|
| | | @TableField(exist = false)
|
| | | private String roleNames;
|
| | |
|
| | | public Long getCurrentDeptId() {
|
| | | return currentDeptId;
|
| | |
| | | this.status = status;
|
| | | }
|
| | |
|
| | | public String getDelFlag()
|
| | | {
|
| | | return delFlag;
|
| | | }
|
| | | public String getDelFlag() |
| | | { |
| | | return delFlag; |
| | | } |
| | |
|
| | | public void setDelFlag(String delFlag)
|
| | | {
|
| | | this.delFlag = delFlag;
|
| | | }
|
| | |
|
| | | public Integer getAiEnabled()
|
| | | {
|
| | | return aiEnabled;
|
| | | }
|
| | |
|
| | | public void setAiEnabled(Integer aiEnabled)
|
| | | {
|
| | | this.aiEnabled = aiEnabled;
|
| | | }
|
| | | public void setDelFlag(String delFlag) |
| | | { |
| | | this.delFlag = delFlag; |
| | | } |
| | | |
| | | public Integer getAiEnabled() |
| | | { |
| | | return aiEnabled; |
| | | } |
| | | |
| | | public void setAiEnabled(Integer aiEnabled) |
| | | { |
| | | this.aiEnabled = aiEnabled; |
| | | } |
| | |
|
| | | public String getLoginIp()
|
| | | {
|
| | |
| | | this.deptNames = deptNames;
|
| | | }
|
| | |
|
| | | public String getRoleNames() {
|
| | | return roleNames;
|
| | | }
|
| | |
|
| | | public void setRoleNames(String roleNames) {
|
| | | this.roleNames = roleNames;
|
| | | }
|
| | |
|
| | | public Long getDeptId() {
|
| | | return deptId;
|
| | | }
|
| | |
| | | .append("sex", getSex())
|
| | | .append("avatar", getAvatar())
|
| | | .append("password", getPassword())
|
| | | .append("status", getStatus())
|
| | | .append("delFlag", getDelFlag())
|
| | | .append("aiEnabled", getAiEnabled())
|
| | | .append("loginIp", getLoginIp())
|
| | | .append("status", getStatus()) |
| | | .append("delFlag", getDelFlag()) |
| | | .append("aiEnabled", getAiEnabled()) |
| | | .append("loginIp", getLoginIp()) |
| | | .append("loginDate", getLoginDate())
|
| | | .append("createBy", getCreateBy())
|
| | | .append("createTime", getCreateTime())
|
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.project.system.domain.SysUserDept; |
| | | import com.ruoyi.project.system.domain.vo.SysUserDeptVo; |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | |
| | | List<SysUserDeptVo> userLoginFacotryList(@Param("userDeptVo") SysUserDeptVo userDeptVo); |
| | | |
| | | List<Map<String, Object>> setSchemeApplicableStaffUserInfo(@Param("ids") List<Long> ids); |
| | | |
| | | @Select("<script>" + |
| | | "select count(distinct sud.user_id) " + |
| | | "from sys_user_dept sud " + |
| | | "inner join sys_user su on su.user_id = sud.user_id " + |
| | | "where su.del_flag = '0' " + |
| | | "and sud.dept_id in " + |
| | | "<foreach collection='deptIds' item='deptId' open='(' separator=',' close=')'>" + |
| | | "#{deptId}" + |
| | | "</foreach>" + |
| | | "</script>") |
| | | Long countDistinctUserIdsByDeptIds(@Param("deptIds") List<Long> deptIds); |
| | | |
| | | @Select("<script>" + |
| | | "select distinct sud.user_id " + |
| | | "from sys_user_dept sud " + |
| | | "inner join sys_user su on su.user_id = sud.user_id " + |
| | | "where su.del_flag = '0' " + |
| | | "and sud.dept_id in " + |
| | | "<foreach collection='deptIds' item='deptId' open='(' separator=',' close=')'>" + |
| | | "#{deptId}" + |
| | | "</foreach>" + |
| | | "</script>") |
| | | List<Long> selectDistinctUserIdsByDeptIds(@Param("deptIds") List<Long> deptIds); |
| | | } |
| | |
| | |
|
| | | List<Long> getUserByRole(@Param("role") String role);
|
| | |
|
| | | /**
|
| | | * æ¥è¯¢æææ´»è·ç¨æ·ï¼å«é¨é¨åç§°åè§è²åç§°ï¼
|
| | | */
|
| | | List<SysUser> selectUserListWithDetail();
|
| | |
|
| | | List<Long> getUserByPerms(@Param("perms") List<String> perms);
|
| | | }
|
| | |
| | | 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.collaborativeApproval.mapper.EnterpriseNewsMapper;
|
| | | import com.ruoyi.collaborativeApproval.pojo.EnterpriseNews;
|
| | | import com.ruoyi.common.utils.SecurityUtils;
|
| | | import com.ruoyi.project.system.domain.SysDept;
|
| | | import com.ruoyi.project.system.domain.SysNotice;
|
| | |
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
|
| | | import java.util.HashSet;
|
| | | import java.util.List;
|
| | | import java.util.Set;
|
| | | import java.util.stream.Collectors;
|
| | | import java.util.regex.Matcher;
|
| | | import java.util.regex.Pattern;
|
| | |
|
| | | /**
|
| | | * å
¬å æå¡å±å®ç°
|
| | |
| | | @RequiredArgsConstructor
|
| | | public class SysNoticeServiceImpl extends ServiceImpl<SysNoticeMapper, SysNotice> implements ISysNoticeService {
|
| | |
|
| | | private static final Pattern ENTERPRISE_NEWS_ID_PATTERN = Pattern.compile("[?&]id=(\\d+)");
|
| | |
|
| | | private final SysNoticeMapper noticeMapper;
|
| | | private final SysUserMapper userMapper;
|
| | | private final SysDeptMapper deptMapper;
|
| | | private final SysUserDeptMapper userDeptMapper;
|
| | | private final UnipushService unipushService;
|
| | | private final EnterpriseNewsMapper enterpriseNewsMapper;
|
| | |
|
| | | /**
|
| | | * æ¥è¯¢å
¬åä¿¡æ¯
|
| | |
| | | * @return ç»æ
|
| | | */
|
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public int updateNotice(SysNotice notice)
|
| | | {
|
| | | if (notice == null || notice.getNoticeId() == null) {
|
| | | return 0;
|
| | | }
|
| | | SysNotice dbNotice = noticeMapper.selectNoticeById(notice.getNoticeId());
|
| | | if (dbNotice == null) {
|
| | | return 0;
|
| | | }
|
| | | boolean needSyncNewsReadCount = isEnterpriseNewsNotice(dbNotice)
|
| | | && notice.getStatus() != null
|
| | | && !notice.getStatus().equals(dbNotice.getStatus());
|
| | | int rows = noticeMapper.updateNotice(notice);
|
| | | if (rows > 0 && needSyncNewsReadCount) {
|
| | | syncEnterpriseNewsReadCount(dbNotice.getJumpPath());
|
| | | }
|
| | | return rows;
|
| | | return noticeMapper.updateNotice(notice);
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | @Override
|
| | | public int readAll() {
|
| | | Long userId = SecurityUtils.getUserId();
|
| | | List<SysNotice> unreadNotices = noticeMapper.selectList(Wrappers.<SysNotice>lambdaQuery()
|
| | | .eq(SysNotice::getConsigneeId, userId)
|
| | | .eq(SysNotice::getStatus, "0"));
|
| | | int rows = noticeMapper.update(null, Wrappers.<SysNotice>lambdaUpdate()
|
| | | return noticeMapper.update(null, Wrappers.<SysNotice>lambdaUpdate()
|
| | | .eq(SysNotice::getConsigneeId, userId)
|
| | | .eq(SysNotice::getStatus, "0")
|
| | | .set(SysNotice::getStatus, "1"));
|
| | | if (rows > 0) {
|
| | | syncEnterpriseNewsReadCount(unreadNotices);
|
| | | }
|
| | | return rows;
|
| | | }
|
| | |
|
| | | @Override
|
| | |
| | | return false;
|
| | | }
|
| | | sysNotice.setStatus("1");
|
| | | boolean updated = noticeMapper.update(null, Wrappers.<SysNotice>lambdaUpdate()
|
| | | return noticeMapper.update(null, Wrappers.<SysNotice>lambdaUpdate()
|
| | | .eq(SysNotice::getNoticeId, noticeId)
|
| | | .eq(SysNotice::getStatus, "0")
|
| | | .set(SysNotice::getStatus, "1")) > 0;
|
| | | if (updated) {
|
| | | syncEnterpriseNewsReadCount(sysNotice.getJumpPath());
|
| | | }
|
| | | return updated;
|
| | | }
|
| | |
|
| | | private boolean isEnterpriseNewsNotice(SysNotice sysNotice) {
|
| | | return sysNotice != null
|
| | | && sysNotice.getJumpPath() != null
|
| | | && sysNotice.getJumpPath().contains("/enterpriseNews?id=");
|
| | | }
|
| | |
|
| | | private void syncEnterpriseNewsReadCount(List<SysNotice> notices) {
|
| | | if (notices == null || notices.isEmpty()) {
|
| | | return;
|
| | | }
|
| | | Set<String> jumpPaths = new HashSet<>();
|
| | | for (SysNotice notice : notices) {
|
| | | if (isEnterpriseNewsNotice(notice)) {
|
| | | jumpPaths.add(notice.getJumpPath());
|
| | | }
|
| | | }
|
| | | for (String jumpPath : jumpPaths) {
|
| | | syncEnterpriseNewsReadCount(jumpPath);
|
| | | }
|
| | | }
|
| | |
|
| | | private void syncEnterpriseNewsReadCount(String jumpPath) {
|
| | | Long newsId = parseEnterpriseNewsId(jumpPath);
|
| | | if (newsId == null) {
|
| | | return;
|
| | | }
|
| | | long readCount = noticeMapper.selectCount(Wrappers.<SysNotice>lambdaQuery()
|
| | | .eq(SysNotice::getStatus, "1")
|
| | | .eq(SysNotice::getJumpPath, jumpPath));
|
| | | EnterpriseNews enterpriseNews = new EnterpriseNews();
|
| | | enterpriseNews.setId(newsId);
|
| | | enterpriseNews.setReadCount((int) readCount);
|
| | | enterpriseNewsMapper.updateById(enterpriseNews);
|
| | | }
|
| | |
|
| | | private Long parseEnterpriseNewsId(String jumpPath) {
|
| | | if (jumpPath == null || !jumpPath.startsWith("/enterpriseNews")) {
|
| | | return null;
|
| | | }
|
| | | Matcher matcher = ENTERPRISE_NEWS_ID_PATTERN.matcher(jumpPath);
|
| | | if (!matcher.find()) {
|
| | | return null;
|
| | | }
|
| | | try {
|
| | | return Long.parseLong(matcher.group(1));
|
| | | } catch (NumberFormatException e) {
|
| | | return null;
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | 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.StringUtils; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.Parameters; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import com.ruoyi.common.utils.StringUtils;
|
| | | 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.R;
|
| | | import io.swagger.v3.oas.annotations.Operation;
|
| | | import io.swagger.v3.oas.annotations.Parameter;
|
| | | import io.swagger.v3.oas.annotations.Parameters;
|
| | | import io.swagger.v3.oas.annotations.media.Schema;
|
| | | import io.swagger.v3.oas.annotations.tags.Tag;
|
| | |
|
| | | /**
|
| | | * swagger ç¨æ·æµè¯æ¹æ³
|
| | |
| | | }
|
| | |
|
| | | @Operation(summary = "è·åç¨æ·è¯¦ç»")
|
| | | @Parameter(name = "userId", description = "ç¨æ·ID", required = true) |
| | | @GetMapping("/{userId}") |
| | | public R<UserEntity> getUser(@PathVariable Integer userId) |
| | | @Parameter(name = "userId", description = "ç¨æ·ID", required = true)
|
| | | @GetMapping("/{userId}")
|
| | | public R<UserEntity> getUser(@PathVariable Integer userId)
|
| | | {
|
| | | if (!users.isEmpty() && users.containsKey(userId))
|
| | | {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | @Log(title = "æµè¯æ¥å£æ°å¢ç¨æ·", businessType = BusinessType.INSERT)
|
| | | @Operation(summary = "æ°å¢ç¨æ·")
|
| | | @Parameters({ |
| | | @Parameter(name = "userId", description = "ç¨æ·id"), |
| | | @Parameter(name = "username", description = "ç¨æ·åç§°"), |
| | | @Parameter(name = "password", description = "ç¨æ·å¯ç "), |
| | | @Parameter(name = "mobile", description = "ç¨æ·ææº") |
| | | }) |
| | | @PostMapping("/save") |
| | | public R<String> save(UserEntity user) |
| | | @Parameters({
|
| | | @Parameter(name = "userId", description = "ç¨æ·id"),
|
| | | @Parameter(name = "username", description = "ç¨æ·åç§°"),
|
| | | @Parameter(name = "password", description = "ç¨æ·å¯ç "),
|
| | | @Parameter(name = "mobile", description = "ç¨æ·ææº")
|
| | | })
|
| | | @PostMapping("/save")
|
| | | public R<String> save(UserEntity user)
|
| | | {
|
| | | if (StringUtils.isNull(user) || StringUtils.isNull(user.getUserId()))
|
| | | {
|
| | |
| | | return R.ok();
|
| | | }
|
| | |
|
| | | @Log(title = "æµè¯æ¥å£æ´æ°ç¨æ·", businessType = BusinessType.UPDATE)
|
| | | @Operation(summary = "æ´æ°ç¨æ·")
|
| | | @PutMapping("/update")
|
| | | public R<String> update(@RequestBody UserEntity user)
|
| | |
| | | return R.ok();
|
| | | }
|
| | |
|
| | | @Log(title = "æµè¯æ¥å£å é¤ç¨æ·", businessType = BusinessType.DELETE)
|
| | | @Operation(summary = "å é¤ç¨æ·ä¿¡æ¯")
|
| | | @Parameter(name = "userId", description = "ç¨æ·ID", required = true) |
| | | @DeleteMapping("/{userId}") |
| | | public R<String> delete(@PathVariable Integer userId) |
| | | @Parameter(name = "userId", description = "ç¨æ·ID", required = true)
|
| | | @DeleteMapping("/{userId}")
|
| | | public R<String> delete(@PathVariable Integer userId)
|
| | | {
|
| | | if (!users.isEmpty() && users.containsKey(userId))
|
| | | {
|
| | |
| | | package com.ruoyi.projectManagement.controller; |
| | | |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.projectManagement.dto.InfoStageDto; |
| | | import com.ruoyi.projectManagement.dto.UpdateStateInfo; |
| | |
| | | |
| | | @PostMapping("/save") |
| | | @Operation(summary = "ä¿å") |
| | | @Log(title = "项ç®ä¿¡æ¯-ä¿å", businessType = BusinessType.INSERT) |
| | | public AjaxResult save(@RequestBody @Valid SaveInfoVo saveInfoVo) { |
| | | infoService.save(saveInfoVo); |
| | | return AjaxResult.success(); |
| | |
| | | |
| | | @PostMapping("/updateStatus") |
| | | @Operation(summary = "ä¿®æ¹ç¶æ") |
| | | @Log(title = "项ç®ä¿¡æ¯-ä¿®æ¹ç¶æ", businessType = BusinessType.UPDATE) |
| | | public AjaxResult updateStatus(@RequestBody @Valid UpdateStateInfo updateStateInfo){ |
| | | infoService.updateStatus(updateStateInfo); |
| | | return AjaxResult.success(); |
| | |
| | | |
| | | @PostMapping("/delete/{id}") |
| | | @Operation(summary = "å é¤") |
| | | @Log(title = "项ç®ä¿¡æ¯-å é¤", businessType = BusinessType.DELETE) |
| | | public AjaxResult delete(@PathVariable Long id) { |
| | | infoService.deleteInfo(id); |
| | | return AjaxResult.success(); |
| | |
| | | |
| | | @PostMapping("/saveStage") |
| | | @Operation(summary = "ä¿åé¶æ®µ") |
| | | @Log(title = "项ç®ä¿¡æ¯-ä¿åé¶æ®µ", businessType = BusinessType.INSERT) |
| | | public AjaxResult saveStage(@RequestBody @Valid SaveInfoStageVo dto) { |
| | | infoStageHandleService.save(dto); |
| | | return AjaxResult.success(); |
| | |
| | | |
| | | @PostMapping("/deleteStage/{id}") |
| | | @Operation(summary = "å é¤é¶æ®µ") |
| | | @Log(title = "项ç®ä¿¡æ¯-å é¤é¶æ®µ", businessType = BusinessType.DELETE) |
| | | public AjaxResult deleteStage(@PathVariable Long id) { |
| | | infoStageHandleService.deleteById(id); |
| | | return AjaxResult.success(); |
| | |
| | | package com.ruoyi.projectManagement.controller; |
| | | |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.projectManagement.service.PlanService; |
| | | import com.ruoyi.projectManagement.vo.SavePlanNodeVo; |
| | |
| | | |
| | | @PostMapping("/save") |
| | | @Operation(summary = "ä¿å") |
| | | @Log(title = "项ç®è®¡å-ä¿å", businessType = BusinessType.INSERT) |
| | | public AjaxResult save(@RequestBody @Valid SavePlanVo savePlanVo) { |
| | | planService.savePlan(savePlanVo); |
| | | return AjaxResult.success(); |
| | |
| | | |
| | | @PostMapping("/delete/{id}") |
| | | @Operation(summary = "å é¤") |
| | | @Log(title = "项ç®è®¡å-å é¤", businessType = BusinessType.DELETE) |
| | | public AjaxResult delete(@PathVariable Long id) { |
| | | planService.deletePlan(id); |
| | | return AjaxResult.success(); |
| | |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.utils.OrderUtils; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import com.ruoyi.projectManagement.dto.RoleDto; |
| | | import com.ruoyi.projectManagement.mapper.RolesMapper; |
| | | import com.ruoyi.projectManagement.pojo.Roles; |
| | |
| | | |
| | | @PostMapping("/add") |
| | | @Operation(summary = "æ°å¢") |
| | | @Log(title = "项ç®è§è²-æ°å¢", businessType = BusinessType.INSERT) |
| | | public AjaxResult add(@RequestBody RoleDto roleDto) { |
| | | if (roleDto.getIsDefaultNo()) { |
| | | roleDto.setNo(OrderUtils.countTodayByCreateTime(rolesMapper, "XMJS","no", roleDto.getCreateTime() != null ? roleDto.getCreateTime() : LocalDateTime.now())); |
| | | roleDto.setNo(OrderUtils.countTodayByCreateTime(rolesMapper, "XMJS","no")); |
| | | } |
| | | return AjaxResult.success(rolesservice.save(roleDto)); |
| | | } |
| | | |
| | | @PostMapping("/update") |
| | | @Operation(summary = "ä¿®æ¹") |
| | | @Log(title = "项ç®è§è²-ä¿®æ¹", businessType = BusinessType.UPDATE) |
| | | public AjaxResult update(@RequestBody Roles roles) { |
| | | return AjaxResult.success(rolesservice.updateById(roles)); |
| | | } |
| | | |
| | | @DeleteMapping("/delete") |
| | | @Operation(summary = "å é¤") |
| | | @Log(title = "项ç®è§è²-å é¤", businessType = BusinessType.DELETE) |
| | | public AjaxResult delete(@RequestBody List<Long> ids) { |
| | | if (CollectionUtils.isEmpty(ids)) return AjaxResult.error("è¯·ä¼ å
¥è¦å é¤çID"); |
| | | return AjaxResult.success(rolesservice.removeBatchByIds(ids)); |
| | |
| | | private Integer status; |
| | | |
| | | @Schema(description = "å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @Schema(description = "åå»ºç¨æ·") |
| | |
| | | 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.framework.web.domain.R; |
| | | import com.ruoyi.framework.web.page.TableDataInfo; |
| | | import com.ruoyi.purchase.dto.PurchaseLedgerDto; |
| | | import com.ruoyi.purchase.mapper.PurchaseLedgerTemplateMapper; |
| | |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * éè´å°è´¦Controller |
| | |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢éè´éè´§å¯ééè´å°è´¦ |
| | | */ |
| | | @GetMapping("/returnableList") |
| | | public TableDataInfo returnableList(PurchaseLedger purchaseLedger) { |
| | | startPage(); |
| | | List<PurchaseLedger> list = purchaseLedgerService.selectReturnablePurchaseLedgerList(purchaseLedger); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导åºéè´å°è´¦å表 |
| | | */ |
| | | @Log(title = "éè´å°è´¦", businessType = BusinessType.EXPORT) |
| | |
| | | @PostMapping("/addOrEditPurchase") |
| | | public AjaxResult addOrEditPurchase(@RequestBody PurchaseLedgerDto purchaseLedgerDto) throws Exception { |
| | | return toAjax(purchaseLedgerService.addOrEditPurchase(purchaseLedgerDto)); |
| | | } |
| | | |
| | | @Operation(summary = "æ¹éæ¨è¿éè´å°è´¦å°å
¥åº") |
| | | @Log(title = "æ¹éæ¨è¿éè´å°è´¦å°å
¥åº", businessType = BusinessType.OTHER) |
| | | @PostMapping("/batchInsertPurchaseSteps") |
| | | public R batchInsertPurchaseSteps(@RequestBody PurchaseLedgerDto purchaseLedgerDto) { |
| | | return purchaseLedgerService.batchInsertPurchaseSteps(purchaseLedgerDto == null ? null : purchaseLedgerDto.getIds()); |
| | | } |
| | | |
| | | /** |
| | |
| | | /** |
| | | * ä¿®æ¹éè´å°è´¦å®¡æ¹ç¶æ |
| | | */ |
| | | @Log(title = "éè´å°è´¦", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/updateApprovalStatus") |
| | | public AjaxResult addOrEditPurchase(@RequestBody PurchaseLedger purchaseLedger){ |
| | | return toAjax(purchaseLedgerService.updateById(purchaseLedger)); |
| | |
| | | @Operation(summary = "çæéè´åºåå·") |
| | | @GetMapping("/createPurchaseNo") |
| | | @Log(title = "çæéè´åºåå·", businessType = BusinessType.OTHER) |
| | | public AjaxResult createPurchaseNo(@RequestParam Date entryDate) { |
| | | return AjaxResult.success("çææå",purchaseLedgerService.getPurchaseNo(entryDate)); |
| | | public AjaxResult createPurchaseNo() { |
| | | return AjaxResult.success("çææå",purchaseLedgerService.getPurchaseNo()); |
| | | } |
| | | |
| | | @Operation(summary = "è·åéè´åæå°æ°æ®") |
| | | @GetMapping("/printData/{id}") |
| | | public AjaxResult printData(@PathVariable Long id) { |
| | | Map<String, Object> data = purchaseLedgerService.getPrintData(id); |
| | | if (data == null) { |
| | | return AjaxResult.error("éè´åä¸åå¨"); |
| | | } |
| | | return AjaxResult.success(data); |
| | | } |
| | | } |
| | |
| | | import com.ruoyi.purchase.dto.PurchaseReturnOrderDto; |
| | | import com.ruoyi.purchase.mapper.PurchaseReturnOrdersMapper; |
| | | import com.ruoyi.purchase.pojo.PurchaseReturnOrders; |
| | | import com.ruoyi.stock.mapper.StockOutRecordMapper; |
| | | import com.ruoyi.stock.pojo.StockOutRecord; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import com.ruoyi.purchase.service.PurchaseReturnOrdersService; |
| | | import com.ruoyi.purchase.vo.PurchaseStockInProductVo; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | |
| | | private PurchaseReturnOrdersService purchaseReturnOrdersService; |
| | | private PurchaseReturnOrdersMapper purchaseReturnOrdersMapper; |
| | | private AccountStatementDetailsService accountStatementDetailsService; |
| | | private StockOutRecordMapper stockOutRecordMapper; |
| | | |
| | | |
| | | @GetMapping("/listPage") |
| | |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody PurchaseReturnOrderDto purchaseReturnOrderDto) throws Exception { |
| | | if (purchaseReturnOrderDto.getIsDefaultNo()) { |
| | | purchaseReturnOrderDto.setNo(OrderUtils.countTodayByCreateTime(purchaseReturnOrdersMapper, "CGTL", "no", purchaseReturnOrderDto.getCreateTime() != null ? purchaseReturnOrderDto.getCreateTime() : LocalDateTime.now())); |
| | | purchaseReturnOrderDto.setNo(OrderUtils.countTodayByCreateTime(purchaseReturnOrdersMapper, "CGTL", "no")); |
| | | } |
| | | return AjaxResult.success(purchaseReturnOrdersService.add(purchaseReturnOrderDto)); |
| | | } |
| | |
| | | return AjaxResult.success(purchaseReturnOrdersService.getPurchaseReturnOrderDtoById(id)); |
| | | } |
| | | |
| | | @Log(title = "éè´éè´§å", businessType = BusinessType.DELETE) |
| | | @PostMapping("/deleteById/{id}") |
| | | public AjaxResult deleteById(@PathVariable Long id) { |
| | | //å¦æè¯¥éè´éè´§å·²ç»çæå¯¹è´¦ååæ æ³å é¤ |
| | |
| | | .eq(AccountStatementDetails::getReceiptNumber, purchaseReturnOrders.getNo())); |
| | | if (CollectionUtils.isNotEmpty(accountStatementDetails)){ |
| | | throw new ServiceException("该éè´éè´§åå·²ç»çæå¯¹è´¦åï¼æ æ³å é¤"); |
| | | } |
| | | List<StockOutRecord> approvedStockOutRecords = stockOutRecordMapper.selectList(Wrappers.<StockOutRecord>lambdaQuery() |
| | | .eq(StockOutRecord::getRecordType, "9") |
| | | .eq(StockOutRecord::getApprovalStatus, 1) |
| | | .inSql(StockOutRecord::getRecordId, "select id from purchase_return_order_products where purchase_return_order_id = " + id)); |
| | | if (CollectionUtils.isNotEmpty(approvedStockOutRecords)) { |
| | | throw new ServiceException("该éè´éè´§å对åºåºåºå·²å®¡æ ¸éè¿ï¼æ æ³å é¤"); |
| | | } |
| | | purchaseReturnOrdersService.deleteById(id); |
| | | return AjaxResult.success(); |
| | |
| | | private Long id; |
| | | |
| | | /** |
| | | * 审æ¹å®ä¾ID |
| | | */ |
| | | private Long approvalInstanceId; |
| | | |
| | | /** |
| | | * éè´ååå· |
| | | */ |
| | | @Excel(name = "éè´ååå·") |
| | |
| | | /** |
| | | * å½å
¥æ¥æ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "å½å
¥æ¥æ", width = 30, dateFormat = "yyyy-MM-dd") |
| | | private Date entryDate; |
| | | |
| | |
| | | |
| | | private List<SalesLedgerProduct> productData; |
| | | |
| | | @Schema(description = "æ¹éå¤çéè´å°è´¦IDå表") |
| | | private List<Long> ids; |
| | | |
| | | private List<String> tempFileIds; |
| | | |
| | | private List<CommonFile> SalesLedgerFiles; |
| | |
| | | */ |
| | | @Excel(name = "ååéé¢") |
| | | private BigDecimal contractAmount = BigDecimal.ZERO; |
| | | |
| | | /** |
| | | * å®é
ååéé¢ï¼æ£åéè´§åï¼ |
| | | */ |
| | | @Schema(description = "å®é
ååéé¢") |
| | | private BigDecimal netContractAmount = BigDecimal.ZERO; |
| | | |
| | | |
| | | @Schema(description = "æä»¶ç±»å å 4") |
| | |
| | | // éè´ååå· |
| | | private String purchaseContractNumber; |
| | | |
| | | private String shippingTypeText; |
| | | |
| | | /** |
| | | * 对åºåºåºæ¯å¦å·²å®¡æ ¸éè¿ |
| | | */ |
| | | private Boolean stockOutApproved; |
| | | |
| | | //éæäººå§å |
| | | private String returnUserName; |
| | | |
| | |
| | | |
| | | IPage<PurchaseLedgerDto> selectPurchaseLedgerListPage(IPage ipage, @Param("c") PurchaseLedgerDto purchaseLedger); |
| | | |
| | | List<PurchaseLedger> selectReturnablePurchaseLedgerList(@Param("c") PurchaseLedger purchaseLedger); |
| | | |
| | | List<IncomeExpenseAnalysisDto> selectPurchaseStats(@Param("startDate") String startDate, @Param("endDate") String endDate, @Param("dateFormat") String dateFormat); |
| | | |
| | | BigDecimal selectTotalPurchaseAmount(@Param("startDate") String startDate, @Param("endDate") String endDate); |
| | |
| | | /** |
| | | * å½å
¥æ¥æ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "å½å
¥æ¥æ", width = 30, dateFormat = "yyyy-MM-dd") |
| | | private Date entryDate; |
| | | |
| | |
| | | * ååéé¢ï¼äº§åå«ç¨æ»ä»·ï¼ |
| | | */ |
| | | private BigDecimal contractAmount; |
| | | |
| | | /** |
| | | * å®é
ååéé¢ï¼æ£åéè´§åï¼ |
| | | */ |
| | | @Schema(description = "å®é
ååéé¢") |
| | | private BigDecimal netContractAmount; |
| | | // |
| | | // /** |
| | | // * ä¸å¡å |
| | |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long deptId; |
| | | |
| | | } |
| | |
| | | @Schema(description = "ä¾åºåid") |
| | | private Long supplierId; |
| | | |
| | | @Schema(description = "åè´§ç±»å 1货车 2å¿«é") |
| | | private Integer shippingType; |
| | | |
| | | @Schema(description = "å货车çå·") |
| | | private String truckPlateNo; |
| | | |
| | | @Schema(description = "å¿«éå
¬å¸") |
| | | private String expressCompany; |
| | | |
| | | @Schema(description = "å¿«éåå·") |
| | | private String expressNo; |
| | | |
| | | @Schema(description = "项ç®id") |
| | | private Long projectId; |
| | | |
| | |
| | | private BigDecimal totalAmount; |
| | | |
| | | @Schema(description = "å½å
¥æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.purchase.dto.PurchaseLedgerDto; |
| | | import com.ruoyi.purchase.pojo.PurchaseLedger; |
| | | import com.ruoyi.sales.pojo.SalesLedgerProduct; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * éè´å°è´¦Serviceæ¥å£ |
| | |
| | | |
| | | List<PurchaseLedger> selectPurchaseLedgerList(PurchaseLedger purchaseLedger); |
| | | |
| | | List<PurchaseLedger> selectReturnablePurchaseLedgerList(PurchaseLedger purchaseLedger); |
| | | |
| | | int addOrEditPurchase(PurchaseLedgerDto purchaseLedgerDto) throws Exception; |
| | | |
| | | R batchInsertPurchaseSteps(List<Long> ids); |
| | | |
| | | void addQualityInspect(PurchaseLedger purchaseLedger, SalesLedgerProduct saleProduct); |
| | | |
| | |
| | | |
| | | IPage<PurchaseLedgerDto> selectPurchaseLedgerListPage(IPage ipage, PurchaseLedgerDto purchaseLedger); |
| | | |
| | | String getPurchaseNo(Date entryDate); |
| | | String getPurchaseNo(); |
| | | |
| | | AjaxResult importData(MultipartFile file); |
| | | |
| | | PurchaseLedgerDto getPurchaseByCode(PurchaseLedgerDto purchaseLedgerDto); |
| | | |
| | | Map<String, Object> getPrintData(Long id); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.utils.AmountUtils; |
| | | import com.ruoyi.purchase.dto.ProcurementBusinessSummaryDto; |
| | | import com.ruoyi.sales.mapper.SalesLedgerProductMapper; |
| | | import lombok.RequiredArgsConstructor; |
| | |
| | | private final SalesLedgerProductMapper salesLedgerProductMapper; |
| | | |
| | | public IPage<ProcurementBusinessSummaryDto> listPage(Page page, ProcurementBusinessSummaryDto procurementBusinessSummaryDto) { |
| | | return salesLedgerProductMapper.procurementBusinessSummaryListPage(page, procurementBusinessSummaryDto); |
| | | IPage<ProcurementBusinessSummaryDto> result = salesLedgerProductMapper.procurementBusinessSummaryListPage(page, procurementBusinessSummaryDto); |
| | | AmountUtils.normalizeProcurementBusinessSummaryList(result.getRecords()); |
| | | return result; |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.ruoyi.approve.bean.dto.ApprovalInstanceDto; |
| | | import com.ruoyi.approve.mapper.ApprovalTemplateMapper; |
| | | import com.ruoyi.approve.pojo.ApprovalInstance; |
| | | import com.ruoyi.approve.pojo.ApprovalTemplate; |
| | | import com.ruoyi.approve.bean.vo.ApproveProcessVO; |
| | | import com.ruoyi.approve.pojo.ApproveProcess; |
| | | import com.ruoyi.approve.service.ApprovalInstanceService; |
| | | import com.ruoyi.approve.service.impl.ApproveProcessServiceImpl; |
| | | import com.ruoyi.basic.enums.ApplicationTypeEnum; |
| | | import com.ruoyi.basic.enums.RecordTypeEnum; |
| | |
| | | import com.ruoyi.basic.pojo.ProductModel; |
| | | import com.ruoyi.basic.pojo.SupplierManage; |
| | | import com.ruoyi.basic.utils.FileUtil; |
| | | import com.ruoyi.common.enums.ApprovalStatusEnum; |
| | | import com.ruoyi.common.enums.ReviewStatusEnum; |
| | | import com.ruoyi.common.enums.StockInQualifiedRecordTypeEnum; |
| | | import com.ruoyi.common.enums.TypeEnums; |
| | | import com.ruoyi.common.enums.FileNameType; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.AmountUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.security.LoginUser; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.other.mapper.TempFileMapper; |
| | | import com.ruoyi.procurementrecord.mapper.ProcurementRecordMapper; |
| | | import com.ruoyi.procurementrecord.pojo.ProcurementRecordStorage; |
| | | import com.ruoyi.procurementrecord.utils.StockUtils; |
| | | import com.ruoyi.project.system.domain.SysDept; |
| | | import com.ruoyi.project.system.domain.SysUser; |
| | | import com.ruoyi.project.system.mapper.SysDeptMapper; |
| | | import com.ruoyi.project.system.mapper.SysUserMapper; |
| | | import com.ruoyi.purchase.dto.PurchaseLedgerDto; |
| | | import com.ruoyi.purchase.dto.PurchaseLedgerImportDto; |
| | |
| | | import com.ruoyi.quality.pojo.QualityInspectParam; |
| | | import com.ruoyi.quality.pojo.QualityTestStandard; |
| | | import com.ruoyi.quality.pojo.QualityTestStandardParam; |
| | | import com.ruoyi.quality.service.IQualityInspectService; |
| | | import com.ruoyi.sales.mapper.CommonFileMapper; |
| | | import com.ruoyi.sales.mapper.SalesLedgerMapper; |
| | | import com.ruoyi.sales.mapper.SalesLedgerProductMapper; |
| | | import com.ruoyi.sales.pojo.CommonFile; |
| | | import com.ruoyi.sales.pojo.SalesLedger; |
| | | import com.ruoyi.sales.pojo.SalesLedgerProduct; |
| | | import com.ruoyi.sales.service.impl.CommonFileServiceImpl; |
| | | import com.ruoyi.stock.pojo.StockInRecord; |
| | | import com.ruoyi.stock.service.StockInRecordService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | |
| | | |
| | | import java.io.InputStream; |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.ZoneId; |
| | |
| | | private final SysUserMapper userMapper; |
| | | private final TempFileMapper tempFileMapper; |
| | | private final CommonFileMapper commonFileMapper; |
| | | private final SysDeptMapper sysDeptMapper; |
| | | private final SupplierManageMapper supplierManageMapper; |
| | | private final ProductMapper productMapper; |
| | | private final ProductModelMapper productModelMapper; |
| | |
| | | private final ApproveProcessServiceImpl approveProcessService; |
| | | private final ProcurementRecordMapper procurementRecordStorageMapper; |
| | | private final FileUtil fileUtil; |
| | | private final ApprovalInstanceService approvalInstanceService; |
| | | private final IQualityInspectService qualityInspectService; |
| | | private final StockInRecordService stockInRecordService; |
| | | private final StockUtils stockUtils; |
| | | private final ApprovalTemplateMapper approvalTemplateMapper; |
| | | |
| | | @Override |
| | | public List<PurchaseLedger> selectPurchaseLedgerList(PurchaseLedger purchaseLedger) { |
| | |
| | | if (purchaseLedger.getApprovalStatus() != null) { |
| | | queryWrapper.eq(PurchaseLedger::getApprovalStatus, purchaseLedger.getApprovalStatus()); |
| | | } |
| | | // åªæ¥è¯¢å
¥åºå·²å®¡æ¹éè¿çéè´å°è´¦ |
| | | queryWrapper.inSql(PurchaseLedger::getId, |
| | | "SELECT DISTINCT record_id FROM stock_in_record WHERE approval_status = 1"); |
| | | return purchaseLedgerMapper.selectList(queryWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public List<PurchaseLedger> selectReturnablePurchaseLedgerList(PurchaseLedger purchaseLedger) { |
| | | return purchaseLedgerMapper.selectReturnablePurchaseLedgerList(purchaseLedger); |
| | | } |
| | | |
| | | @Override |
| | |
| | | PurchaseLedger purchaseLedger = new PurchaseLedger(); |
| | | // DTO转Entity |
| | | BeanUtils.copyProperties(purchaseLedgerDto, purchaseLedger); |
| | | AmountUtils.normalizeContractAmount(purchaseLedger); |
| | | SalesLedger salesLedger = salesLedgerMapper.selectById(purchaseLedgerDto.getSalesLedgerId()); |
| | | //å½å
¥äºº |
| | | SysUser sysUser = userMapper.selectUserById(purchaseLedgerDto.getRecorderId()); |
| | |
| | | purchaseLedger.setRecorderId(purchaseLedgerDto.getRecorderId()); |
| | | |
| | | purchaseLedger.setApprovalStatus(1); |
| | | // å®é
ååéé¢å§ç»çäºååéé¢ |
| | | purchaseLedger.setNetContractAmount(purchaseLedger.getContractAmount()); |
| | | // 3. æ°å¢ææ´æ°ä¸»è¡¨ |
| | | if (purchaseLedger.getId() == null && !StringUtils.hasText(purchaseLedger.getPurchaseContractNumber())) { |
| | | purchaseLedger.setPurchaseContractNumber(generatePurchaseContractNo(purchaseLedger.getEntryDate())); |
| | | if (purchaseLedger.getId() == null) { |
| | | purchaseLedgerMapper.insert(purchaseLedger); |
| | | } else { |
| | | // å é¤éè´å®¡æ ¸ï¼éæ°æäº¤ |
| | | ApproveProcess one = approveProcessService.getOne(new LambdaQueryWrapper<ApproveProcess>() |
| | | .eq(ApproveProcess::getApproveType, 5) |
| | | .eq(ApproveProcess::getApproveReason, purchaseLedger.getPurchaseContractNumber()) |
| | | .eq(ApproveProcess::getApproveDelete, 0) |
| | | .last("limit 1")); |
| | | if (one != null) { |
| | | approveProcessService.delByIds(Collections.singletonList(one.getId())); |
| | | } |
| | | purchaseLedgerMapper.updateById(purchaseLedger); |
| | | } |
| | | this.saveOrUpdate(purchaseLedger); |
| | | |
| | | // 4. å¤çåè¡¨æ°æ® |
| | | List<SalesLedgerProduct> productList = purchaseLedgerDto.getProductData(); |
| | |
| | | handleSalesLedgerProducts(purchaseLedger.getId(), productList, purchaseLedgerDto.getType()); |
| | | } |
| | | // 6.éè´å®¡æ ¸æ°å¢ï¼å®¡æ¹ç®¡çæªé
ç½®éè´å®¡æ¹äººæ¶ï¼å®¡æ¹æå¡ä¼èªå¨ç½®ä¸ºå®¡æ¹éè¿ã |
| | | //æ¥è¯¢å½åéè´ååå·æ¯å¦å·²æ·»å 审æ¹ï¼å¦ææä¸ä¸æ¯é©³åç¶æï¼åä¸é夿·»å |
| | | ApprovalInstance oldApprovalInstance = approvalInstanceService.getOne(Wrappers.<ApprovalInstance>lambdaQuery() |
| | | .eq(ApprovalInstance::getDeleted, 0) |
| | | .eq(ApprovalInstance::getBusinessType, TypeEnums.PURCHASE_APPROVAL.getCode()) |
| | | .eq(ApprovalInstance::getBusinessId, purchaseLedger.getId()) |
| | | .ne(ApprovalInstance::getStatus,"REJECTED") |
| | | .last("limit 1") |
| | | ); |
| | | if(Objects.isNull(oldApprovalInstance)){ |
| | | addApproveByPurchase(loginUser, purchaseLedger, productList); |
| | | } |
| | | addApproveByPurchase(loginUser, purchaseLedger); |
| | | // 5. è¿ç§»ä¸´æ¶æä»¶å°æ£å¼ç®å½ |
| | | fileUtil.saveStorageAttachment(ApplicationTypeEnum.FILE, RecordTypeEnum.PURCHASE_LEDGER, purchaseLedger.getId(), purchaseLedgerDto.getStorageBlobDTOS()); |
| | | return 1; |
| | | } |
| | | |
| | | @Override |
| | | public R batchInsertPurchaseSteps(List<Long> ids) { |
| | | if (CollectionUtils.isEmpty(ids)) { |
| | | return R.fail("è¯·éæ©éè´å°è´¦"); |
| | | } |
| | | |
| | | List<Long> distinctIds = ids.stream() |
| | | .filter(Objects::nonNull) |
| | | .distinct() |
| | | .collect(Collectors.toList()); |
| | | if (CollectionUtils.isEmpty(distinctIds)) { |
| | | return R.fail("è¯·éæ©éè´å°è´¦"); |
| | | } |
| | | |
| | | PurchaseLedgerDto queryDto = new PurchaseLedgerDto(); |
| | | queryDto.setIds(distinctIds); |
| | | IPage<PurchaseLedgerDto> pageResult = this.selectPurchaseLedgerListPage( |
| | | new com.baomidou.mybatisplus.extension.plugins.pagination.Page<>(1, distinctIds.size()), |
| | | queryDto |
| | | ); |
| | | List<PurchaseLedgerDto> ledgerDtos = pageResult == null || pageResult.getRecords() == null |
| | | ? Collections.emptyList() |
| | | : pageResult.getRecords(); |
| | | |
| | | Map<Long, PurchaseLedgerDto> ledgerDtoMap = ledgerDtos.stream() |
| | | .filter(item -> item.getId() != null) |
| | | .collect(Collectors.toMap(PurchaseLedgerDto::getId, item -> item, (left, right) -> left, LinkedHashMap::new)); |
| | | |
| | | List<Map<String, Object>> details = new ArrayList<>(); |
| | | int successCount = 0; |
| | | int skipCount = 0; |
| | | int failCount = 0; |
| | | int autoApprovedCount = 0; |
| | | |
| | | for (Long id : distinctIds) { |
| | | Map<String, Object> detail = new LinkedHashMap<>(); |
| | | detail.put("purchaseLedgerId", id); |
| | | PurchaseLedgerDto purchaseLedgerDto = ledgerDtoMap.get(id); |
| | | if (purchaseLedgerDto == null) { |
| | | failCount++; |
| | | detail.put("status", "FAIL"); |
| | | detail.put("message", "éè´å°è´¦ä¸åå¨ææªæ¥è¯¢å°"); |
| | | details.add(detail); |
| | | continue; |
| | | } |
| | | |
| | | detail.put("purchaseContractNumber", purchaseLedgerDto.getPurchaseContractNumber()); |
| | | detail.put("approvalStatus", purchaseLedgerDto.getApprovalStatus()); |
| | | detail.put("stockInStatus", purchaseLedgerDto.getStockInStatus()); |
| | | |
| | | if (ApprovalStatusEnum.REJECTED.getCode().equals(purchaseLedgerDto.getApprovalStatus())) { |
| | | skipCount++; |
| | | detail.put("status", "SKIP"); |
| | | detail.put("message", "éè´å已驳å"); |
| | | details.add(detail); |
| | | continue; |
| | | } |
| | | |
| | | if ("å®å
¨å
¥åº".equals(purchaseLedgerDto.getStockInStatus())) { |
| | | skipCount++; |
| | | detail.put("status", "SKIP"); |
| | | detail.put("message", "éè´åå·²å®å
¨å
¥åº"); |
| | | details.add(detail); |
| | | continue; |
| | | } |
| | | |
| | | try { |
| | | PurchaseLedger purchaseLedger = purchaseLedgerMapper.selectById(id); |
| | | if (purchaseLedger == null) { |
| | | failCount++; |
| | | detail.put("status", "FAIL"); |
| | | detail.put("message", "éè´å°è´¦ä¸åå¨"); |
| | | details.add(detail); |
| | | continue; |
| | | } |
| | | |
| | | if (!ApprovalStatusEnum.APPROVED.getCode().equals(purchaseLedger.getApprovalStatus())) { |
| | | ApprovalInstance approvalInstance = approvalInstanceService.getOne( |
| | | Wrappers.<ApprovalInstance>lambdaQuery() |
| | | .eq(ApprovalInstance::getBusinessId, purchaseLedger.getId()) |
| | | .eq(ApprovalInstance::getBusinessType, 5L) |
| | | .eq(ApprovalInstance::getDeleted, 0) |
| | | .orderByDesc(ApprovalInstance::getId) |
| | | .last("limit 1") |
| | | ); |
| | | if (approvalInstance == null) { |
| | | failCount++; |
| | | detail.put("status", "FAIL"); |
| | | detail.put("message", "æªæ¾å°å¯¹åºçéè´å®¡æ¹å®ä¾"); |
| | | details.add(detail); |
| | | continue; |
| | | } |
| | | |
| | | if ("APPROVED".equals(approvalInstance.getStatus()) |
| | | && !ApprovalStatusEnum.APPROVED.getCode().equals(purchaseLedger.getApprovalStatus())) { |
| | | purchaseLedger.setApprovalStatus(ApprovalStatusEnum.APPROVED.getCode()); |
| | | purchaseLedgerMapper.updateById(purchaseLedger); |
| | | } else if (!"APPROVED".equals(approvalInstance.getStatus())) { |
| | | R autoApproveResult = approvalInstanceService.autoApprove(approvalInstance.getId()); |
| | | if (autoApproveResult == null || !R.isSuccess(autoApproveResult)) { |
| | | failCount++; |
| | | detail.put("status", "FAIL"); |
| | | detail.put("message", autoApproveResult == null ? "éè´å®¡æ¹èªå¨éè¿å¤±è´¥" : autoApproveResult.getMsg()); |
| | | details.add(detail); |
| | | continue; |
| | | } |
| | | autoApprovedCount++; |
| | | } |
| | | |
| | | purchaseLedger = purchaseLedgerMapper.selectById(id); |
| | | if (purchaseLedger == null || !ApprovalStatusEnum.APPROVED.getCode().equals(purchaseLedger.getApprovalStatus())) { |
| | | failCount++; |
| | | detail.put("status", "FAIL"); |
| | | detail.put("message", "éè´å审æ¹ç¶ææªæ´æ°ä¸ºå·²éè¿"); |
| | | details.add(detail); |
| | | continue; |
| | | } |
| | | } |
| | | |
| | | List<SalesLedgerProduct> products = salesLedgerProductMapper.selectList( |
| | | Wrappers.<SalesLedgerProduct>lambdaQuery() |
| | | .eq(SalesLedgerProduct::getSalesLedgerId, purchaseLedger.getId()) |
| | | .eq(SalesLedgerProduct::getType, 2) |
| | | .orderByAsc(SalesLedgerProduct::getId) |
| | | ); |
| | | if (CollectionUtils.isEmpty(products)) { |
| | | skipCount++; |
| | | detail.put("status", "SKIP"); |
| | | detail.put("message", "éè´å没æäº§åæç»"); |
| | | details.add(detail); |
| | | continue; |
| | | } |
| | | |
| | | int processedProductCount = 0; |
| | | int skippedProductCount = 0; |
| | | int failedProductCount = 0; |
| | | for (SalesLedgerProduct product : products) { |
| | | try { |
| | | boolean processed; |
| | | if (Boolean.TRUE.equals(product.getIsChecked())) { |
| | | processed = processPurchaseQualityProduct(purchaseLedger, product); |
| | | } else { |
| | | processed = processPurchaseDirectProduct(purchaseLedger, product); |
| | | } |
| | | if (processed) { |
| | | processedProductCount++; |
| | | } else { |
| | | skippedProductCount++; |
| | | } |
| | | } catch (Exception ex) { |
| | | failedProductCount++; |
| | | log.error("æ¹éæ¨è¿éè´å°è´¦å¤±è´¥, purchaseLedgerId={}, productId={}, productModelId={}", |
| | | purchaseLedger.getId(), product.getId(), product.getProductModelId(), ex); |
| | | } |
| | | } |
| | | |
| | | successCount++; |
| | | detail.put("status", failedProductCount > 0 ? "PARTIAL" : "SUCCESS"); |
| | | detail.put("processedProductCount", processedProductCount); |
| | | detail.put("skippedProductCount", skippedProductCount); |
| | | detail.put("failedProductCount", failedProductCount); |
| | | detail.put("message", failedProductCount > 0 ? "é¨å产åå¤ç失败" : "å¤ç宿"); |
| | | details.add(detail); |
| | | } catch (Exception ex) { |
| | | failCount++; |
| | | detail.put("status", "FAIL"); |
| | | detail.put("message", ex.getMessage()); |
| | | details.add(detail); |
| | | log.error("æ¹éæ¨è¿éè´å°è´¦å¤±è´¥, purchaseLedgerId={}", id, ex); |
| | | } |
| | | } |
| | | |
| | | Map<String, Object> summary = new LinkedHashMap<>(); |
| | | summary.put("totalCount", distinctIds.size()); |
| | | summary.put("successCount", successCount); |
| | | summary.put("skipCount", skipCount); |
| | | summary.put("failCount", failCount); |
| | | summary.put("autoApprovedCount", autoApprovedCount); |
| | | summary.put("details", details); |
| | | return R.ok(summary, "æ¹éæ¨è¿éè´æ¥éª¤å®æ"); |
| | | } |
| | | |
| | | |
| | |
| | | param.setId(null); |
| | | param.setInspectId(qualityInspect.getId()); |
| | | qualityInspectParamMapper.insert(param); |
| | | }); |
| | | } |
| | | } |
| | | |
| | | private boolean processPurchaseQualityProduct(PurchaseLedger purchaseLedger, SalesLedgerProduct product) { |
| | | if (purchaseLedger == null || product == null || product.getProductModelId() == null) { |
| | | return false; |
| | | } |
| | | |
| | | QualityInspect qualityInspect = findLatestPurchaseQualityInspect(purchaseLedger.getId(), product.getProductModelId()); |
| | | if (qualityInspect == null) { |
| | | addQualityInspect(purchaseLedger, product); |
| | | qualityInspect = findLatestPurchaseQualityInspect(purchaseLedger.getId(), product.getProductModelId()); |
| | | } |
| | | if (qualityInspect == null) { |
| | | return false; |
| | | } |
| | | |
| | | LocalDateTime purchaseInspectTime = toStartOfDayPlusDays(purchaseLedger.getEntryDate(), 1); |
| | | if (purchaseInspectTime != null && (qualityInspect.getCheckTime() == null |
| | | || !DateUtils.toLocalDate(qualityInspect.getCheckTime()).equals(purchaseInspectTime.toLocalDate()))) { |
| | | qualityInspect.setCheckTime(DateUtils.toDate(purchaseInspectTime.toLocalDate())); |
| | | qualityInspectMapper.updateById(qualityInspect); |
| | | } |
| | | |
| | | List<StockInRecord> stockRecords = findQualityStockRecords(qualityInspect.getId(), product.getProductModelId()); |
| | | if (hasApprovedStockRecord(stockRecords)) { |
| | | return true; |
| | | } |
| | | |
| | | if (!Integer.valueOf(1).equals(qualityInspect.getInspectState())) { |
| | | R autoSubmitResult = qualityInspectService.autoSubmit(qualityInspect.getId()); |
| | | if (autoSubmitResult == null || !R.isSuccess(autoSubmitResult)) { |
| | | return false; |
| | | } |
| | | qualityInspect = qualityInspectMapper.selectById(qualityInspect.getId()); |
| | | } |
| | | |
| | | stockRecords = findQualityStockRecords(qualityInspect.getId(), product.getProductModelId()); |
| | | if (CollectionUtils.isEmpty(stockRecords) |
| | | && qualityInspect.getQualifiedQuantity() != null |
| | | && qualityInspect.getQualifiedQuantity().compareTo(BigDecimal.ZERO) > 0) { |
| | | stockUtils.addStockWithBatchNo( |
| | | product.getProductModelId(), |
| | | qualityInspect.getQualifiedQuantity(), |
| | | StockInQualifiedRecordTypeEnum.CUSTOMIZATION_UNSTOCK_OUT.getCode(), |
| | | qualityInspect.getId(), |
| | | null, |
| | | purchaseInspectTime == null ? null : purchaseInspectTime.plusDays(1) |
| | | ); |
| | | stockRecords = findQualityStockRecords(qualityInspect.getId(), product.getProductModelId()); |
| | | } |
| | | |
| | | StockInRecord targetStockRecord = findLatestUnapprovedStockRecord(stockRecords); |
| | | if (targetStockRecord == null) { |
| | | return false; |
| | | } |
| | | |
| | | LocalDateTime qualityStockCreateTime = resolveQualityStockCreateTime(qualityInspect); |
| | | if (qualityStockCreateTime != null && (targetStockRecord.getCreateTime() == null |
| | | || !qualityStockCreateTime.equals(targetStockRecord.getCreateTime()))) { |
| | | targetStockRecord.setCreateTime(qualityStockCreateTime); |
| | | stockInRecordService.updateById(targetStockRecord); |
| | | } |
| | | |
| | | approveStockRecords(Collections.singletonList(targetStockRecord)); |
| | | stockRecords = findQualityStockRecords(qualityInspect.getId(), product.getProductModelId()); |
| | | return hasApprovedStockRecord(stockRecords); |
| | | } |
| | | |
| | | private boolean processPurchaseDirectProduct(PurchaseLedger purchaseLedger, SalesLedgerProduct product) { |
| | | if (purchaseLedger == null || product == null || product.getProductModelId() == null) { |
| | | return false; |
| | | } |
| | | if (product.getQuantity() == null) { |
| | | return false; |
| | | } |
| | | if (!StringUtils.hasText(purchaseLedger.getPurchaseContractNumber())) { |
| | | return false; |
| | | } |
| | | |
| | | LocalDateTime stockCreateTime = toStartOfDayPlusDays(purchaseLedger.getEntryDate(), 1); |
| | | |
| | | List<StockInRecord> stockRecords = findDirectStockRecords(purchaseLedger.getId(), purchaseLedger.getPurchaseContractNumber(), product.getProductModelId(), product.getId()); |
| | | if (hasApprovedStockRecord(stockRecords)) { |
| | | return true; |
| | | } |
| | | |
| | | if (CollectionUtils.isEmpty(stockRecords)) { |
| | | stockUtils.addStockWithBatchNo( |
| | | product.getProductModelId(), |
| | | product.getQuantity(), |
| | | StockInQualifiedRecordTypeEnum.PURCHASE_STOCK_IN.getCode(), |
| | | purchaseLedger.getId(), |
| | | purchaseLedger.getPurchaseContractNumber() + "-" + product.getId(), |
| | | stockCreateTime |
| | | ); |
| | | stockRecords = findDirectStockRecords(purchaseLedger.getId(), purchaseLedger.getPurchaseContractNumber(), product.getProductModelId(), product.getId()); |
| | | } |
| | | |
| | | if (CollectionUtils.isEmpty(stockRecords)) { |
| | | return false; |
| | | } |
| | | |
| | | StockInRecord targetStockRecord = findLatestUnapprovedStockRecord(stockRecords); |
| | | if (targetStockRecord == null) { |
| | | return false; |
| | | } |
| | | |
| | | if (stockCreateTime != null && (targetStockRecord.getCreateTime() == null |
| | | || !stockCreateTime.equals(targetStockRecord.getCreateTime()))) { |
| | | targetStockRecord.setCreateTime(stockCreateTime); |
| | | stockInRecordService.updateById(targetStockRecord); |
| | | } |
| | | |
| | | approveStockRecords(Collections.singletonList(targetStockRecord)); |
| | | stockRecords = findDirectStockRecords(purchaseLedger.getId(), purchaseLedger.getPurchaseContractNumber(), product.getProductModelId(), product.getId()); |
| | | return hasApprovedStockRecord(stockRecords); |
| | | } |
| | | |
| | | private LocalDateTime toStartOfDayPlusDays(Date date, int days) { |
| | | if (date == null) { |
| | | return null; |
| | | } |
| | | return DateUtils.toLocalDate(date).plusDays(days).atStartOfDay(); |
| | | } |
| | | |
| | | private LocalDateTime resolveQualityStockCreateTime(QualityInspect qualityInspect) { |
| | | if (qualityInspect == null || qualityInspect.getCheckTime() == null) { |
| | | return null; |
| | | } |
| | | return DateUtils.toLocalDate(qualityInspect.getCheckTime()).plusDays(1).atStartOfDay(); |
| | | } |
| | | |
| | | private QualityInspect findLatestPurchaseQualityInspect(Long purchaseLedgerId, Long productModelId) { |
| | | if (purchaseLedgerId == null || productModelId == null) { |
| | | return null; |
| | | } |
| | | return qualityInspectMapper.selectOne( |
| | | Wrappers.<QualityInspect>lambdaQuery() |
| | | .eq(QualityInspect::getInspectType, 0) |
| | | .eq(QualityInspect::getPurchaseLedgerId, purchaseLedgerId) |
| | | .eq(QualityInspect::getProductModelId, productModelId) |
| | | .orderByDesc(QualityInspect::getId) |
| | | .last("limit 1") |
| | | ); |
| | | } |
| | | |
| | | private List<StockInRecord> findQualityStockRecords(Long qualityInspectId, Long productModelId) { |
| | | if (qualityInspectId == null || productModelId == null) { |
| | | return Collections.emptyList(); |
| | | } |
| | | return stockInRecordService.list( |
| | | Wrappers.<StockInRecord>lambdaQuery() |
| | | .eq(StockInRecord::getRecordType, StockInQualifiedRecordTypeEnum.CUSTOMIZATION_UNSTOCK_OUT.getCode()) |
| | | .eq(StockInRecord::getRecordId, qualityInspectId) |
| | | .eq(StockInRecord::getProductModelId, productModelId) |
| | | .orderByDesc(StockInRecord::getId) |
| | | ); |
| | | } |
| | | |
| | | private List<StockInRecord> findDirectStockRecords(Long purchaseLedgerId, String purchaseContractNumber, Long productModelId, Long purchaseProductId) { |
| | | if (purchaseLedgerId == null || productModelId == null || purchaseProductId == null || !StringUtils.hasText(purchaseContractNumber)) { |
| | | return Collections.emptyList(); |
| | | } |
| | | String batchNo = purchaseContractNumber + "-" + purchaseProductId; |
| | | return stockInRecordService.list( |
| | | Wrappers.<StockInRecord>lambdaQuery() |
| | | .eq(StockInRecord::getRecordType, StockInQualifiedRecordTypeEnum.PURCHASE_STOCK_IN.getCode()) |
| | | .eq(StockInRecord::getRecordId, purchaseLedgerId) |
| | | .eq(StockInRecord::getProductModelId, productModelId) |
| | | .eq(StockInRecord::getBatchNo, batchNo) |
| | | .orderByDesc(StockInRecord::getId) |
| | | ); |
| | | } |
| | | |
| | | private boolean hasApprovedStockRecord(List<StockInRecord> stockRecords) { |
| | | return stockRecords != null && stockRecords.stream() |
| | | .anyMatch(item -> ReviewStatusEnum.APPROVED.getCode().equals(item.getApprovalStatus())); |
| | | } |
| | | |
| | | private StockInRecord findLatestUnapprovedStockRecord(List<StockInRecord> stockRecords) { |
| | | if (CollectionUtils.isEmpty(stockRecords)) { |
| | | return null; |
| | | } |
| | | return stockRecords.stream() |
| | | .filter(item -> !ReviewStatusEnum.APPROVED.getCode().equals(item.getApprovalStatus())) |
| | | .findFirst() |
| | | .orElse(null); |
| | | } |
| | | |
| | | private void approveStockRecords(List<StockInRecord> stockRecords) { |
| | | if (CollectionUtils.isEmpty(stockRecords)) { |
| | | return; |
| | | } |
| | | List<Long> rejectedIds = stockRecords.stream() |
| | | .filter(item -> ReviewStatusEnum.REJECTED.getCode().equals(item.getApprovalStatus())) |
| | | .map(StockInRecord::getId) |
| | | .filter(Objects::nonNull) |
| | | .collect(Collectors.toList()); |
| | | if (!rejectedIds.isEmpty()) { |
| | | stockInRecordService.batchReAudit(rejectedIds); |
| | | } |
| | | |
| | | List<Long> pendingIds = stockRecords.stream() |
| | | .filter(item -> item.getApprovalStatus() == null |
| | | || ReviewStatusEnum.PENDING_REVIEW.getCode().equals(item.getApprovalStatus()) |
| | | || ReviewStatusEnum.REJECTED.getCode().equals(item.getApprovalStatus())) |
| | | .map(StockInRecord::getId) |
| | | .filter(Objects::nonNull) |
| | | .collect(Collectors.toList()); |
| | | if (!pendingIds.isEmpty()) { |
| | | stockInRecordService.batchApprove(pendingIds, ReviewStatusEnum.APPROVED.getCode()); |
| | | }); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | // è®¾ç½®åæ®µ |
| | | for (SalesLedgerProduct product : products) { |
| | | AmountUtils.normalizeSalesLedgerProduct(product); |
| | | product.setSalesLedgerId(salesLedgerId); |
| | | |
| | | Long productId = product.getProductId(); |
| | |
| | | } |
| | | |
| | | // è®¡ç®æ»å«ç¨éé¢ |
| | | BigDecimal totalTaxInclusiveAmount = products.stream() |
| | | BigDecimal totalTaxInclusiveAmount = AmountUtils.scaleAmount(products.stream() |
| | | .map(SalesLedgerProduct::getTaxInclusiveTotalPrice) |
| | | .filter(Objects::nonNull) |
| | | .reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | .reduce(BigDecimal.ZERO, BigDecimal::add)); |
| | | |
| | | // æ´æ°ä¸»è¡¨çæ»éé¢å段 |
| | | if (salesLedgerId != null) { |
| | |
| | | for (Long id : ids) { |
| | | PurchaseLedger purchaseLedger = purchaseLedgerMapper.selectById(id); |
| | | if(purchaseLedger != null){ |
| | | List<ApprovalInstance> approvalInstances = approvalInstanceService.list(new LambdaQueryWrapper<ApprovalInstance>() |
| | | .eq(ApprovalInstance::getBusinessId, purchaseLedger.getId()) |
| | | .eq(ApprovalInstance::getBusinessType, 5L) |
| | | .eq(ApprovalInstance::getDeleted, 0)); |
| | | if (CollectionUtils.isNotEmpty(approvalInstances)) { |
| | | approvalInstanceService.delete( |
| | | approvalInstances.stream() |
| | | .map(ApprovalInstance::getId) |
| | | .filter(Objects::nonNull) |
| | | .collect(Collectors.toList()) |
| | | ); |
| | | } |
| | | |
| | | List<ApproveProcess> approveProcesses = approveProcessService.list(new LambdaQueryWrapper<ApproveProcess>() |
| | | ApproveProcess one = approveProcessService.getOne(new LambdaQueryWrapper<ApproveProcess>() |
| | | .eq(ApproveProcess::getApproveType, 5) |
| | | .eq(ApproveProcess::getApproveDelete, 0) |
| | | .eq(ApproveProcess::getApproveReason, purchaseLedger.getPurchaseContractNumber())); |
| | | if (CollectionUtils.isNotEmpty(approveProcesses)) { |
| | | approveProcessService.delByIds( |
| | | approveProcesses.stream() |
| | | .map(ApproveProcess::getId) |
| | | .filter(Objects::nonNull) |
| | | .collect(Collectors.toList()) |
| | | ); |
| | | .eq(ApproveProcess::getApproveReason, purchaseLedger.getPurchaseContractNumber()) |
| | | .last("limit 1")); |
| | | if (one != null) { |
| | | approveProcessService.delByIds(Collections.singletonList(one.getId())); |
| | | } |
| | | } |
| | | } |
| | |
| | | // 4. è½¬æ¢ DTO |
| | | PurchaseLedgerDto resultDto = new PurchaseLedgerDto(); |
| | | BeanUtils.copyProperties(purchaseLedger, resultDto); |
| | | AmountUtils.normalizeContractAmount(resultDto); |
| | | if (!products.isEmpty()) { |
| | | AmountUtils.normalizeSalesLedgerProducts(products); |
| | | resultDto.setHasChildren(true); |
| | | resultDto.setProductData(products); |
| | | resultDto.setStorageBlobVOS(fileUtil.getStorageBlobVOsByApplicationAndRecordTypeAndRecordId(ApplicationTypeEnum.FILE, RecordTypeEnum.PURCHASE_LEDGER, purchaseLedger.getId())); |
| | |
| | | queryWrapper.eq(SalesLedgerProduct::getSalesLedgerId, purchaseLedger.getId()) |
| | | .eq(SalesLedgerProduct::getType, 2); |
| | | List<SalesLedgerProduct> productList = salesLedgerProductMapper.selectList(queryWrapper); |
| | | AmountUtils.normalizeSalesLedgerProducts(productList); |
| | | resultDto.setProductData(productList); |
| | | return resultDto; |
| | | } |
| | |
| | | |
| | | @Override |
| | | public IPage<PurchaseLedgerDto> selectPurchaseLedgerListPage(IPage ipage, PurchaseLedgerDto purchaseLedger) { |
| | | return purchaseLedgerMapper.selectPurchaseLedgerListPage(ipage, purchaseLedger); |
| | | IPage<PurchaseLedgerDto> page = purchaseLedgerMapper.selectPurchaseLedgerListPage(ipage, purchaseLedger); |
| | | if (!CollectionUtils.isEmpty(page.getRecords())) { |
| | | page.getRecords().forEach(record -> { |
| | | AmountUtils.normalizeContractAmount(record); |
| | | AmountUtils.normalizeSalesLedgerProducts(record.getProductData()); |
| | | }); |
| | | } |
| | | return page; |
| | | } |
| | | |
| | | @Override |
| | | public String getPurchaseNo(Date entryDate) { |
| | | LocalDate localDate = entryDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); |
| | | public String getPurchaseNo() { |
| | | // çææ¥æåç¼ï¼ä¾å¦ï¼CG20250405ï¼ |
| | | String purchaseNo = "CG" + localDate.format(DateTimeFormatter.ofPattern("yyyyMMdd")); |
| | | String purchaseNo = "CG" + LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyMMdd")); |
| | | |
| | | // æå»º Redis Keyï¼æå¤©åéï¼ |
| | | String redisKey = "purchase_no:" + localDate.format(DateTimeFormatter.ISO_LOCAL_DATE); |
| | | String redisKey = "purchase_no:" + LocalDate.now().format(DateTimeFormatter.ISO_LOCAL_DATE); |
| | | |
| | | // è·åå½ååºå·å¹¶éå¢ï¼ååæä½ï¼ |
| | | Long sequence = redisTemplate.opsForValue().increment(redisKey); |
| | |
| | | salesLedger.setContractAmount(salesLedgerProductImportDtos.stream() |
| | | .map(PurchaseLedgerProductImportDto::getTaxInclusiveTotalPrice) |
| | | .reduce(BigDecimal.ZERO,BigDecimal::add)); |
| | | salesLedger.setNetContractAmount(salesLedger.getContractAmount()); |
| | | // éè¿éå®åå·ç»å®éå® |
| | | SalesLedger salesLedger1 = salesLedgerMapper.selectOne(new LambdaQueryWrapper<SalesLedger>() |
| | | .eq(SalesLedger::getSalesContractNo, salesLedger.getSalesContractNo()) |
| | |
| | | BeanUtils.copyProperties(salesLedgerProductImportDto, salesLedgerProduct); |
| | | salesLedgerProduct.setSalesLedgerId(salesLedger.getId()); |
| | | salesLedgerProduct.setType(2); |
| | | AmountUtils.normalizeSalesLedgerProduct(salesLedgerProduct); |
| | | // 计ç®ä¸å«ç¨æ»ä»· |
| | | salesLedgerProduct.setTaxExclusiveTotalPrice(salesLedgerProduct.getTaxInclusiveTotalPrice().divide(new BigDecimal(1).add(salesLedgerProduct.getTaxRate().divide(new BigDecimal(100))), 2, RoundingMode.HALF_UP)); |
| | | salesLedgerProduct.setTaxExclusiveTotalPrice( |
| | | AmountUtils.calcTaxExclusiveTotalPrice( |
| | | salesLedgerProduct.getTaxInclusiveTotalPrice(), |
| | | salesLedgerProduct.getTaxRate() |
| | | ) |
| | | ); |
| | | list.stream() |
| | | .filter(map -> map.get("productName").equals(salesLedgerProduct.getProductCategory()) && map.get("model").equals(salesLedgerProduct.getSpecificationModel())) |
| | | .findFirst() |
| | |
| | | salesLedgerProductMapper.insert(salesLedgerProduct); |
| | | } |
| | | // éè´å®¡æ ¸ |
| | | List<SalesLedgerProduct> snapshotProducts = salesLedgerProductMapper.selectList( |
| | | new LambdaQueryWrapper<SalesLedgerProduct>() |
| | | .eq(SalesLedgerProduct::getSalesLedgerId, salesLedger.getId()) |
| | | .eq(SalesLedgerProduct::getType, 2) |
| | | ); |
| | | addApproveByPurchase(loginUser, salesLedger, snapshotProducts); |
| | | addApproveByPurchase(loginUser,salesLedger); |
| | | } |
| | | |
| | | return AjaxResult.success("导å
¥æå"); |
| | |
| | | |
| | | @Override |
| | | public PurchaseLedgerDto getPurchaseByCode(PurchaseLedgerDto purchaseLedgerDto) { |
| | | PurchaseLedger purchaseLedger = null; |
| | | ApprovalInstance approvalSnapshotInstance = null; |
| | | |
| | | // 1. ä¼å
æå½å审æ¹å®ä¾æ¥è¯¢å¿«ç
§ |
| | | if (purchaseLedgerDto.getApprovalInstanceId() != null) { |
| | | approvalSnapshotInstance = approvalInstanceService.getById(purchaseLedgerDto.getApprovalInstanceId()); |
| | | if (approvalSnapshotInstance != null && approvalSnapshotInstance.getBusinessId() != null) { |
| | | purchaseLedger = purchaseLedgerMapper.selectById(approvalSnapshotInstance.getBusinessId()); |
| | | } |
| | | } |
| | | |
| | | // 2. æ²¡ä¼ å®¡æ¹å®ä¾IDæ¶ï¼éåå°æéè´ååå·æ¥è¯¢ |
| | | // 1. æ¥è¯¢ä¸»è¡¨ |
| | | PurchaseLedger purchaseLedger = purchaseLedgerMapper.selectOne(new LambdaQueryWrapper<PurchaseLedger>() |
| | | .eq(PurchaseLedger::getPurchaseContractNumber, purchaseLedgerDto.getPurchaseContractNumber()) |
| | | .last("LIMIT 1")); |
| | | if (purchaseLedger == null) { |
| | | purchaseLedger = purchaseLedgerMapper.selectOne(new LambdaQueryWrapper<PurchaseLedger>() |
| | | .eq(PurchaseLedger::getPurchaseContractNumber, purchaseLedgerDto.getPurchaseContractNumber()) |
| | | .last("LIMIT 1")); |
| | | if (purchaseLedger == null) { |
| | | throw new BaseException("éè´å°è´¦ä¸åå¨"); |
| | | } |
| | | throw new BaseException("éè´å°è´¦ä¸åå¨"); |
| | | } |
| | | |
| | | // 3. æ¥è¯¢å½åéè´å对åºç审æ¹å¿«ç
§ |
| | | if (approvalSnapshotInstance == null) { |
| | | approvalSnapshotInstance = approvalInstanceService.getOne(new LambdaQueryWrapper<ApprovalInstance>() |
| | | .eq(ApprovalInstance::getBusinessId, purchaseLedger.getId()) |
| | | .eq(ApprovalInstance::getBusinessType, 5L) |
| | | .eq(ApprovalInstance::getDeleted, 0) |
| | | .orderByDesc(ApprovalInstance::getId) |
| | | .last("LIMIT 1")); |
| | | } |
| | | |
| | | if (approvalSnapshotInstance != null && StringUtils.hasText(approvalSnapshotInstance.getFormConfig())) { |
| | | try { |
| | | PurchaseLedgerDto snapshot = JSON.parseObject(approvalSnapshotInstance.getFormConfig(), PurchaseLedgerDto.class); |
| | | if (snapshot != null) { |
| | | snapshot.setId(purchaseLedger.getId()); |
| | | if (snapshot.getPurchaseContractNumber() == null) { |
| | | snapshot.setPurchaseContractNumber(purchaseLedger.getPurchaseContractNumber()); |
| | | } |
| | | if (snapshot.getSupplierId() == null) { |
| | | snapshot.setSupplierId(purchaseLedger.getSupplierId()); |
| | | } |
| | | if (snapshot.getSupplierName() == null) { |
| | | snapshot.setSupplierName(purchaseLedger.getSupplierName()); |
| | | } |
| | | if (snapshot.getSalesContractNo() == null) { |
| | | snapshot.setSalesContractNo(purchaseLedger.getSalesContractNo()); |
| | | } |
| | | if (snapshot.getSalesContractNoId() == null) { |
| | | snapshot.setSalesContractNoId(purchaseLedger.getSalesLedgerId()); |
| | | } |
| | | if (snapshot.getProjectName() == null) { |
| | | snapshot.setProjectName(purchaseLedger.getProjectName()); |
| | | } |
| | | if (snapshot.getEntryDate() == null) { |
| | | snapshot.setEntryDate(purchaseLedger.getEntryDate()); |
| | | } |
| | | if (snapshot.getExecutionDate() == null) { |
| | | snapshot.setExecutionDate(purchaseLedger.getExecutionDate()); |
| | | } |
| | | if (snapshot.getRemarks() == null) { |
| | | snapshot.setRemarks(purchaseLedger.getRemarks()); |
| | | } |
| | | if (snapshot.getRecorderId() == null) { |
| | | snapshot.setRecorderId(purchaseLedger.getRecorderId()); |
| | | } |
| | | if (snapshot.getRecorderName() == null) { |
| | | snapshot.setRecorderName(purchaseLedger.getRecorderName()); |
| | | } |
| | | snapshot.setProductData(snapshot.getProductData() == null ? Collections.emptyList() : snapshot.getProductData()); |
| | | snapshot.setHasChildren(CollectionUtils.isNotEmpty(snapshot.getProductData())); |
| | | return snapshot; |
| | | } |
| | | } catch (Exception e) { |
| | | log.warn("è§£æéè´å®¡æ¹å¿«ç
§å¤±è´¥: {}", e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | // 4. æ¥è¯¢å表 |
| | | // 2. æ¥è¯¢å表 |
| | | LambdaQueryWrapper<SalesLedgerProduct> productWrapper = new LambdaQueryWrapper<>(); |
| | | productWrapper.eq(SalesLedgerProduct::getSalesLedgerId, purchaseLedger.getId()) |
| | | .eq(SalesLedgerProduct::getType, 2); |
| | | List<SalesLedgerProduct> products = salesLedgerProductMapper.selectList(productWrapper); |
| | | |
| | | // 5. è½¬æ¢ DTO |
| | | // 4. è½¬æ¢ DTO |
| | | PurchaseLedgerDto resultDto = new PurchaseLedgerDto(); |
| | | BeanUtils.copyProperties(purchaseLedger, resultDto); |
| | | AmountUtils.normalizeContractAmount(resultDto); |
| | | if (!products.isEmpty()) { |
| | | AmountUtils.normalizeSalesLedgerProducts(products); |
| | | resultDto.setHasChildren(true); |
| | | resultDto.setProductData(products); |
| | | } |
| | | return resultDto; |
| | | } |
| | | |
| | | public void addApproveByPurchase(LoginUser loginUser, PurchaseLedger purchaseLedger, List<SalesLedgerProduct> productList) { |
| | | public void addApproveByPurchase(LoginUser loginUser,PurchaseLedger purchaseLedger) throws Exception { |
| | | if (loginUser == null) { |
| | | return; |
| | | } |
| | | ApprovalTemplate approvalTemplate = approvalTemplateMapper.selectOne( |
| | | new LambdaQueryWrapper<ApprovalTemplate>() |
| | | .eq(ApprovalTemplate::getBusinessType, 5L) |
| | | .eq(ApprovalTemplate::getDeleted, 0) |
| | | .orderByDesc(ApprovalTemplate::getId) |
| | | .last("LIMIT 1") |
| | | ); |
| | | if (approvalTemplate == null) { |
| | | throw new BaseException("请å
é
ç½®éè´å®¡æ¹æ¨¡æ¿"); |
| | | } |
| | | |
| | | ApprovalInstanceDto approvalInstance = new ApprovalInstanceDto(); |
| | | approvalInstance.setTemplateId(approvalTemplate.getId()); |
| | | approvalInstance.setTemplateName(approvalTemplate.getTemplateName()); |
| | | approvalInstance.setBusinessId(purchaseLedger.getId()); |
| | | approvalInstance.setBusinessType(5L); |
| | | approvalInstance.setCurrentLevel(1); |
| | | approvalInstance.setApplicantId(loginUser.getUserId()); |
| | | approvalInstance.setTitle(purchaseLedger.getPurchaseContractNumber()+"审æ¹"); |
| | | approvalInstance.setApplicantName(loginUser.getNickName()); |
| | | approvalInstance.setApplyTime(LocalDateTime.now()); |
| | | PurchaseLedgerDto snapshot = new PurchaseLedgerDto(); |
| | | BeanUtils.copyProperties(purchaseLedger, snapshot); |
| | | snapshot.setProductData(productList == null ? Collections.emptyList() : new ArrayList<>(productList)); |
| | | approvalInstance.setFormConfig(JSON.toJSONString(snapshot)); |
| | | approvalInstanceService.add(approvalInstance); |
| | | |
| | | ApproveProcessVO approveProcessVO = new ApproveProcessVO(); |
| | | approveProcessVO.setApproveType(5); |
| | | approveProcessVO.setApproveDeptId(loginUser.getCurrentDeptId()); |
| | | approveProcessVO.setApproveReason(purchaseLedger.getPurchaseContractNumber()); |
| | | approveProcessVO.setApproveUserIds(purchaseLedger.getApproveUserIds()); |
| | | approveProcessVO.setApproveUser(loginUser.getUserId()); |
| | | approveProcessVO.setApproveTime(LocalDate.now().toString()); |
| | | approveProcessVO.setPrice(AmountUtils.scaleAmount(purchaseLedger.getContractAmount())); |
| | | approveProcessService.addApprove(approveProcessVO); |
| | | } |
| | | |
| | | /** |
| | |
| | | return sb.toString(); |
| | | } |
| | | |
| | | private static final String PURCHASE_LOCK_PREFIX = "purchase_contract_no:"; |
| | | private static final long PURCHASE_LOCK_WAIT_TIMEOUT = 10; |
| | | private static final long PURCHASE_LOCK_EXPIRE_TIME = 30; |
| | | |
| | | private String generatePurchaseContractNo(Date entryDate) { |
| | | LocalDate currentDate = entryDate != null ? DateUtils.toLocalDate(entryDate) : LocalDate.now(); |
| | | String datePart = currentDate.format(DateTimeFormatter.BASIC_ISO_DATE); |
| | | String lockKey = PURCHASE_LOCK_PREFIX + datePart; |
| | | String lockValue = Thread.currentThread().getId() + "-" + System.nanoTime(); |
| | | |
| | | try { |
| | | long startWaitTime = System.currentTimeMillis(); |
| | | while (System.currentTimeMillis() - startWaitTime < PURCHASE_LOCK_WAIT_TIMEOUT * 1000) { |
| | | Boolean locked = redisTemplate.opsForValue().setIfAbsent(lockKey, lockValue, PURCHASE_LOCK_EXPIRE_TIME, TimeUnit.SECONDS); |
| | | if (Boolean.TRUE.equals(locked)) { |
| | | break; |
| | | } |
| | | try { |
| | | Thread.sleep(100); |
| | | } catch (InterruptedException e) { |
| | | Thread.currentThread().interrupt(); |
| | | throw new RuntimeException("è·åéæ¶è¢«ä¸æ", e); |
| | | } |
| | | } |
| | | |
| | | if (Boolean.FALSE.equals(redisTemplate.hasKey(lockKey))) { |
| | | throw new RuntimeException("è·åéè´ååç¼å·çæé失败ï¼è¶
æ¶"); |
| | | } |
| | | |
| | | String prefix = "CG-" + datePart + "-"; |
| | | List<PurchaseLedger> existingList = purchaseLedgerMapper.selectList( |
| | | new LambdaQueryWrapper<PurchaseLedger>() |
| | | .likeRight(PurchaseLedger::getPurchaseContractNumber, prefix) |
| | | .select(PurchaseLedger::getPurchaseContractNumber)); |
| | | List<Integer> existingSequences = existingList.stream() |
| | | .map(PurchaseLedger::getPurchaseContractNumber) |
| | | .filter(Objects::nonNull) |
| | | .map(no -> { |
| | | int lastDash = no.lastIndexOf('-'); |
| | | if (lastDash >= 0) { |
| | | try { |
| | | return Integer.parseInt(no.substring(lastDash + 1)); |
| | | } catch (NumberFormatException e) { |
| | | return 0; |
| | | } |
| | | } |
| | | return 0; |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | int nextSequence = findFirstMissingSequence(existingSequences); |
| | | |
| | | return prefix + String.format("%03d", nextSequence); |
| | | } finally { |
| | | String luaScript = "if redis.call('GET', KEYS[1]) == ARGV[1] then return redis.call('DEL', KEYS[1]) else return 0 end"; |
| | | redisTemplate.execute( |
| | | new org.springframework.data.redis.core.script.DefaultRedisScript<>(luaScript, Long.class), |
| | | Collections.singletonList(lockKey), |
| | | lockValue |
| | | ); |
| | | @Override |
| | | public Map<String, Object> getPrintData(Long id) { |
| | | PurchaseLedger purchaseLedger = getById(id); |
| | | if (purchaseLedger == null) { |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | private int findFirstMissingSequence(List<Integer> sequences) { |
| | | if (sequences.isEmpty()) { |
| | | return 1; |
| | | } |
| | | sequences.sort(Integer::compareTo); |
| | | int next = 1; |
| | | for (int seq : sequences) { |
| | | if (seq == next) { |
| | | next++; |
| | | } else if (seq > next) { |
| | | break; |
| | | } |
| | | } |
| | | return next; |
| | | List<SalesLedgerProduct> products = salesLedgerProductMapper.selectList( |
| | | new LambdaQueryWrapper<SalesLedgerProduct>() |
| | | .eq(SalesLedgerProduct::getSalesLedgerId, id) |
| | | .eq(SalesLedgerProduct::getType, 2) |
| | | ); |
| | | SysDept dept = sysDeptMapper.selectDeptById(100L); |
| | | Map<String, Object> result = new HashMap<>(); |
| | | result.put("companyName", dept != null ? dept.getDeptName() : ""); |
| | | result.put("ledger", purchaseLedger); |
| | | result.put("products", products); |
| | | return result; |
| | | } |
| | | } |
| | |
| | | import com.ruoyi.purchase.mapper.PurchaseLedgerMapper; |
| | | import com.ruoyi.purchase.mapper.PurchaseReturnOrderProductsMapper; |
| | | import com.ruoyi.purchase.mapper.PurchaseReturnOrdersMapper; |
| | | import com.ruoyi.purchase.pojo.PurchaseLedger; |
| | | import com.ruoyi.purchase.pojo.PurchaseReturnOrderProducts; |
| | | import com.ruoyi.purchase.pojo.PurchaseReturnOrders; |
| | | import com.ruoyi.purchase.service.PurchaseReturnOrdersService; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | } |
| | | }else { |
| | | throw new RuntimeException("è¯·éæ©éè´§åå"); |
| | | } |
| | | |
| | | // æ´æ°éè´å°è´¦çå®é
ååéé¢ |
| | | if (purchaseReturnOrderDto.getPurchaseLedgerId() != null && purchaseReturnOrderDto.getTotalAmount() != null) { |
| | | PurchaseLedger purchaseLedger = purchaseLedgerMapper.selectById(purchaseReturnOrderDto.getPurchaseLedgerId()); |
| | | if (purchaseLedger != null) { |
| | | BigDecimal baseAmount = purchaseLedger.getNetContractAmount() != null |
| | | ? purchaseLedger.getNetContractAmount() |
| | | : purchaseLedger.getContractAmount(); |
| | | purchaseLedger.setNetContractAmount(baseAmount.subtract(purchaseReturnOrderDto.getTotalAmount())); |
| | | purchaseLedgerMapper.updateById(purchaseLedger); |
| | | } |
| | | } |
| | | return true; |
| | | } |
| | |
| | | @Schema(description = "å·²éè´§æ°é") |
| | | private BigDecimal totalReturnNum; |
| | | |
| | | @Schema(description = "éå®åè´§æ°é") |
| | | private BigDecimal saleOutQuantity; |
| | | |
| | | @Schema(description = "å«ç¨åä»·") |
| | | private BigDecimal taxInclusiveUnitPrice; |
| | | |
| | |
| | | @Schema(description = "éè´§æ»æ°") |
| | | private BigDecimal totalReturnNum; |
| | | |
| | | @Schema(description = "éå®åè´§æ°é") |
| | | private BigDecimal saleOutQuantity; |
| | | |
| | | @Schema(description = "å«ç¨åä»·") |
| | | private BigDecimal taxInclusiveUnitPrice; |
| | | |
| | |
| | | @Schema(description = "ååéé¢") |
| | | private BigDecimal contractAmount; |
| | | |
| | | @Schema(description = "仿¬¾éé¢") |
| | | private BigDecimal paymentAmount; |
| | | @Schema(description = "å·²å
¥åºéé¢") |
| | | private BigDecimal shippedAmount; |
| | | |
| | | @Schema(description = "åºä»éé¢") |
| | | private BigDecimal payableAmount; |
| | | |
| | | @Schema(description = "éè´§éé¢") |
| | | private BigDecimal returnAmount; |
| | | @Schema(description = "æªå
¥åºéé¢") |
| | | private BigDecimal unshippedAmount; |
| | | |
| | | } |
| | |
| | | private String supplierName; |
| | | |
| | | @Schema(description = "ååæ»éé¢") |
| | | //该ä¾åºåéè´åå累计éé¢ |
| | | private BigDecimal contractAmounts; |
| | | |
| | | @Schema(description = "仿¬¾éé¢") |
| | | //该ä¾åºåéè´ä»æ¬¾ç´¯è®¡éé¢ |
| | | private BigDecimal paymentAmount; |
| | | @Schema(description = "å·²å
¥åºéé¢") |
| | | private BigDecimal shippedAmount; |
| | | |
| | | @Schema(description = "åºä»éé¢") |
| | | //该ä¾åºåéè´åºä»ç´¯è®¡éé¢=åå§éé¢-仿¬¾-鿬¾ |
| | | private BigDecimal payableAmount; |
| | | |
| | | @Schema(description = "éè´§éé¢") |
| | | private BigDecimal returnAmount; |
| | | @Schema(description = "æªå
¥åºéé¢") |
| | | private BigDecimal unshippedAmount; |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.quality.pojo.QualityInspect; |
| | | import com.ruoyi.quality.pojo.QualityInspectFile; |
| | | import com.ruoyi.quality.pojo.QualityInspectParam; |
| | |
| | | * @param qualityInspectFile |
| | | * @return |
| | | */ |
| | | @Log(title = "ä¸ä¼ è´¨æ£æä»¶", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody QualityInspectFile qualityInspectFile) { |
| | | return AjaxResult.success(qualityInspectFileService.save(qualityInspectFile)); |
| | |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @Log(title = "å é¤è´¨æ£æä»¶", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/del") |
| | | public AjaxResult delQualityUnqualified(@RequestBody List<Integer> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | |
| | | @Operation(summary = "æ£æµææ ç»´æ¤æ¥è¯¢") |
| | | @Log(title = "æ£æµææ ç»´æ¤æ¥è¯¢", businessType = BusinessType.OTHER) |
| | | public R<?> list(Long testStandardId) { |
| | | return R.ok(qualityTestStandardParamService.list(Wrappers.<QualityTestStandardParam>lambdaQuery() |
| | | .eq(QualityTestStandardParam::getTestStandardId, testStandardId) |
| | | .orderByDesc(QualityTestStandardParam::getCreateTime))); |
| | | return R.ok(qualityTestStandardParamService.list(Wrappers.<QualityTestStandardParam>lambdaQuery().eq(QualityTestStandardParam::getTestStandardId,testStandardId))); |
| | | } |
| | | |
| | | } |
| | |
| | | /** |
| | | * æ£æµæ¥æ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "æ£æµæ¥æ", width = 30, dateFormat = "yyyy-MM-dd") |
| | | private Date checkTime; |
| | | |
| | |
| | | private BigDecimal unqualifiedQuantity; |
| | | |
| | | /** |
| | | * æ¯å¦æ½æ£(0:å¦;1:æ¯) |
| | | */ |
| | | @Excel(name = "æ¯å¦æ½æ£", readConverterExp = "0=å¦,1=æ¯") |
| | | @TableField("is_sampling") |
| | | private Integer isSampling; |
| | | |
| | | /** |
| | | * æ½æ£æ°é |
| | | */ |
| | | @Excel(name = "æ½æ£æ°é") |
| | | @TableField("sampling_quantity") |
| | | private BigDecimal samplingQuantity; |
| | | |
| | | /** |
| | | * æ£æµåä½ |
| | | */ |
| | | @Excel(name = "æ£æµåä½") |
| | |
| | | @Schema(description = "å
³èæ£æµæ å主表id") |
| | | private Long testStandardId; |
| | | |
| | | /** |
| | | * åæ ¼ç |
| | | */ |
| | | @TableField(exist = false) |
| | | @Excel(name = "åæ ¼ç(%)") |
| | | private BigDecimal passRate; |
| | | |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long deptId; |
| | |
| | | /** |
| | | * æ£æµæ¥æ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "æ£æµæ¥æ", width = 30, dateFormat = "yyyy-MM-dd") |
| | | private Date checkTime; |
| | | |
| | |
| | | /** |
| | | * å¤çæ¥æ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "å¤çæ¥æ", width = 30, dateFormat = "yyyy-MM-dd") |
| | | private Date dealTime; |
| | | |
| | |
| | | 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.R; |
| | | import com.ruoyi.quality.dto.QualityInspectDto; |
| | | import com.ruoyi.quality.pojo.QualityInspect; |
| | | |
| | |
| | | QualityInspectDto getDetailById(Integer id); |
| | | |
| | | int submit(QualityInspect qualityInspect); |
| | | |
| | | R autoSubmit(Long id); |
| | | |
| | | void down(HttpServletResponse response, QualityInspect qualityInspect); |
| | | } |
| | |
| | | import com.deepoove.poi.config.Configure; |
| | | import com.ruoyi.common.enums.StockInQualifiedRecordTypeEnum; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.HackLoopTableRenderPolicy; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.web.domain.R; |
| | |
| | | import java.io.OutputStream; |
| | | import java.math.BigDecimal; |
| | | import java.net.URLEncoder; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.util.Arrays; |
| | | import java.util.Collections; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | |
| | | public int submit(QualityInspect inspect) { |
| | | QualityInspect qualityInspect = qualityInspectMapper.selectById(inspect.getId()); |
| | | |
| | | //æäº¤åå¿
须夿æ¯å¦åæ ¼ |
| | | if (ObjectUtils.isNull(qualityInspect.getCheckResult())) { |
| | | throw new ServiceException("请å
夿æ¯å¦åæ ¼"); |
| | | } |
| | | |
| | | //æäº¤åå¿
须夿æ¯å¦åæ ¼ï¼éè¿åæ ¼æ°éåä¸åæ ¼æ°éæ¥å¤æï¼ |
| | | if (ObjectUtils.isNull(qualityInspect.getQualifiedQuantity())) { |
| | | throw new ServiceException("åæ ¼æ°éä¸è½ä¸ºç©º"); |
| | | } |
| | |
| | | stockInventoryDto.setRecordId(qualityInspect.getId()); |
| | | stockInventoryDto.setProductModelId(qualityInspect.getProductModelId()); |
| | | stockInventoryDto.setQualitity(qualityInspect.getQualifiedQuantity()); |
| | | if (qualityInspect.getCheckTime() != null) { |
| | | LocalDate stockCreateDate = DateUtils.toLocalDate(qualityInspect.getCheckTime()).plusDays(1); |
| | | stockInventoryDto.setCreateTime(LocalDateTime.of(stockCreateDate, java.time.LocalTime.MIDNIGHT)); |
| | | } |
| | | stockInventoryDto.setBatchNo(resolveProductionBatchNo( |
| | | qualityInspect.getProductMainId(), |
| | | qualityInspect.getId(), |
| | | qualityInspect.getProductModelId())); |
| | | stockInventoryService.addStockInRecordOnly(stockInventoryDto); |
| | | //StockInRecord stockInRecord = stockInRecordService.getOne(Wrappers.<StockInRecord>lambdaQuery() |
| | | // .eq(StockInRecord::getRecordId, qualityInspect.getId()) |
| | | // .eq(StockInRecord::getRecordType, stockInventoryDto.getRecordType()) |
| | | //); |
| | | //stockInRecordService.batchApprove(Collections.singletonList(stockInRecord.getId()),1); |
| | | } |
| | | // ä¸åæ ¼å¤ç |
| | | if(qualityInspect.getUnqualifiedQuantity().compareTo(BigDecimal.ZERO) > 0){ |
| | |
| | | |
| | | qualityInspect.setInspectState(1);//å·²æäº¤ |
| | | return qualityInspectMapper.updateById(qualityInspect); |
| | | } |
| | | |
| | | @Override |
| | | public R autoSubmit(Long id) { |
| | | if (id == null) { |
| | | return R.fail("æ£éªåIDä¸è½ä¸ºç©º"); |
| | | } |
| | | QualityInspect qualityInspect = qualityInspectMapper.selectById(id); |
| | | if (qualityInspect == null) { |
| | | return R.fail("æ£éªåä¸åå¨"); |
| | | } |
| | | if (Integer.valueOf(1).equals(qualityInspect.getInspectState())) { |
| | | return R.ok("æ£éªåå·²æäº¤"); |
| | | } |
| | | |
| | | if (ObjectUtils.isNull(qualityInspect.getCheckResult())) { |
| | | qualityInspect.setCheckResult("åæ ¼"); |
| | | } |
| | | if (ObjectUtils.isNull(qualityInspect.getQualifiedQuantity())) { |
| | | qualityInspect.setQualifiedQuantity(qualityInspect.getQuantity() == null ? BigDecimal.ZERO : qualityInspect.getQuantity()); |
| | | } |
| | | if (ObjectUtils.isNull(qualityInspect.getUnqualifiedQuantity())) { |
| | | qualityInspect.setUnqualifiedQuantity(BigDecimal.ZERO); |
| | | } |
| | | qualityInspectMapper.updateById(qualityInspect); |
| | | int rows = submit(qualityInspect); |
| | | return rows > 0 ? R.ok("æ£éªåæäº¤æå") : R.fail("æ£éªåæäº¤å¤±è´¥"); |
| | | } |
| | | |
| | | private String resolveProductionBatchNo(Long productionProductMainId, |
| | |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | |
| | | @Override |
| | | public int add(List<QualityTestStandardBinding> qualityTestStandardBindings) { |
| | | ArrayList<QualityTestStandardBinding> qualityTestStandardBindings1 = new ArrayList<>(qualityTestStandardBindings.size()); |
| | | //夿æ¯å¦å·²ç»æç»å®è¿çæ°æ® |
| | | for (QualityTestStandardBinding qualityTestStandardBinding : qualityTestStandardBindings) { |
| | | List<QualityTestStandardBinding> testStandardBindings = qualityTestStandardBindingMapper.selectList(Wrappers.<QualityTestStandardBinding>lambdaQuery() |
| | | .eq(QualityTestStandardBinding::getTestStandardId, qualityTestStandardBinding.getTestStandardId()) |
| | | .eq(QualityTestStandardBinding::getProductId, qualityTestStandardBinding.getProductId())); |
| | | if (testStandardBindings.size() > 0){ |
| | | throw new RuntimeException("该产åå·²ç»ç»å®è¿,è¯·æ£æ¥"); |
| | | continue; |
| | | } |
| | | qualityTestStandardBindings1.add(qualityTestStandardBinding); |
| | | } |
| | | saveBatch(qualityTestStandardBindings); |
| | | saveBatch(qualityTestStandardBindings1); |
| | | return 0; |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.safe.controller; |
| | | |
| | | 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.domain.R; |
| | | import com.ruoyi.safe.pojo.SafeAccident; |
| | | import com.ruoyi.safe.service.SafeAccidentService; |
| | |
| | | } |
| | | |
| | | @Operation(summary = "æ°å¢äºæ
䏿¥è®°å½") |
| | | @Log(title = "å®å
¨äºæ
", businessType = BusinessType.INSERT) |
| | | @PostMapping() |
| | | public R add(@RequestBody SafeAccident safeAccident) { |
| | | return R.ok(safeAccidentService.save(safeAccident)); |
| | | } |
| | | |
| | | @Operation(summary = "ä¿®æ¹äºæ
䏿¥è®°å½") |
| | | @Log(title = "å®å
¨äºæ
", businessType = BusinessType.UPDATE) |
| | | @PutMapping () |
| | | public R update(@RequestBody SafeAccident safeAccident) { |
| | | return R.ok(safeAccidentService.updateById(safeAccident)); |
| | | } |
| | | |
| | | @Operation(summary = "å é¤äºæ
䏿¥è®°å½") |
| | | @Log(title = "å®å
¨äºæ
", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public R delSafeAccident(@RequestBody List<Integer> ids) { |
| | | return R.ok(safeAccidentService.removeBatchByIds(ids)); |
| | |
| | | package com.ruoyi.safe.controller; |
| | | |
| | | 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.domain.R; |
| | | import com.ruoyi.safe.pojo.SafeCertification; |
| | | import com.ruoyi.safe.service.SafeCertificationService; |
| | |
| | | } |
| | | |
| | | @Operation(summary = "æ°å¢å®å
¨è§ç¨ä¸èµè´¨ç®¡ç") |
| | | @Log(title = "å®å
¨è¯ä¹¦", businessType = BusinessType.INSERT) |
| | | @PostMapping() |
| | | public R add(@RequestBody SafeCertification safeCertification) { |
| | | return R.ok(safeCertificationService.save(safeCertification)); |
| | | } |
| | | |
| | | @Operation(summary = "ä¿®æ¹å®å
¨è§ç¨ä¸èµè´¨ç®¡ç") |
| | | @Log(title = "å®å
¨è¯ä¹¦", businessType = BusinessType.UPDATE) |
| | | @PutMapping () |
| | | public R update(@RequestBody SafeCertification safeCertification) { |
| | | return R.ok(safeCertificationService.updateById(safeCertification)); |
| | | } |
| | | |
| | | @Operation(summary = "å é¤å®å
¨è§ç¨ä¸èµè´¨ç®¡ç") |
| | | @Log(title = "å®å
¨è¯ä¹¦", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public R delSafeCertification(@RequestBody List<Integer> ids) { |
| | | return R.ok(safeCertificationService.removeBatchByIds(ids)); |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | 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.domain.R; |
| | | import com.ruoyi.safe.pojo.SafeCertificationFile; |
| | | import com.ruoyi.safe.service.SafeCertificationFileService; |
| | |
| | | * @param safeCertificationFile |
| | | * @return |
| | | */ |
| | | @Log(title = "æ°å¢å®å
¨è¯ä¹¦æä»¶", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | @Operation(summary = "æ°å¢") |
| | | public R add(@RequestBody SafeCertificationFile safeCertificationFile) { |
| | |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @Log(title = "å é¤å®å
¨è¯ä¹¦æä»¶", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/del") |
| | | @Operation(summary = "å é¤") |
| | | public R delSafeCertificationFile(@RequestBody List<Integer> ids) { |
| | |
| | | package com.ruoyi.safe.controller; |
| | | |
| | | 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.domain.R; |
| | | import com.ruoyi.safe.pojo.SafeContingencyPlan; |
| | | import com.ruoyi.safe.service.SafeContingencyPlanService; |
| | |
| | | return R.ok(safeContingencyPlanService.pageSafeContingencyPlan(page, safeContingencyPlan)); |
| | | } |
| | | |
| | | @Log(title = "æ°å¢åºæ¥é¢æ¡", businessType = BusinessType.INSERT) |
| | | @Operation(summary = "æ°å¢åºæ¥é¢æ¡æ¥é
") |
| | | @PostMapping() |
| | | public R add(@RequestBody SafeContingencyPlan safeContingencyPlan) { |
| | | return R.ok(safeContingencyPlanService.save(safeContingencyPlan)); |
| | | } |
| | | |
| | | @Log(title = "ä¿®æ¹åºæ¥é¢æ¡", businessType = BusinessType.UPDATE) |
| | | @Operation(summary = "ä¿®æ¹åºæ¥é¢æ¡æ¥é
") |
| | | @PutMapping () |
| | | public R update(@RequestBody SafeContingencyPlan safeContingencyPlan) { |
| | | return R.ok(safeContingencyPlanService.updateById(safeContingencyPlan)); |
| | | } |
| | | |
| | | @Log(title = "å é¤åºæ¥é¢æ¡", businessType = BusinessType.DELETE) |
| | | @Operation(summary = "å é¤åºæ¥é¢æ¡æ¥é
") |
| | | @DeleteMapping("/{ids}") |
| | | public R delSafeCertification(@RequestBody List<Integer> ids) { |
| | |
| | | package com.ruoyi.safe.controller; |
| | | |
| | | 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.domain.R; |
| | | import com.ruoyi.safe.pojo.SafeHazard; |
| | | import com.ruoyi.safe.service.SafeHazardService; |
| | |
| | | return R.ok(safeHazardService.pageSafeHazard(page, safeHazard)); |
| | | } |
| | | |
| | | @Log(title = "æ°å¢å±é©æº", businessType = BusinessType.INSERT) |
| | | @Operation(summary = "æ°å¢å±é©æºå°è´¦") |
| | | @PostMapping() |
| | | public R add(@RequestBody SafeHazard safeHazard) { |
| | | return R.ok(safeHazardService.save(safeHazard)); |
| | | } |
| | | |
| | | @Log(title = "ä¿®æ¹å±é©æº", businessType = BusinessType.UPDATE) |
| | | @Operation(summary = "ä¿®æ¹å±é©æºå°è´¦") |
| | | @PutMapping () |
| | | public R update(@RequestBody SafeHazard safeHazard) { |
| | | return R.ok(safeHazardService.updateById(safeHazard)); |
| | | } |
| | | |
| | | @Log(title = "å é¤å±é©æº", businessType = BusinessType.DELETE) |
| | | @Operation(summary = "å é¤å±é©æºå°è´¦") |
| | | @DeleteMapping("/{ids}") |
| | | public R delSafeHazard(@RequestBody List<Integer> ids) { |
| | |
| | | package com.ruoyi.safe.controller; |
| | | |
| | | 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.domain.R; |
| | | import com.ruoyi.safe.dto.SafeHazardRecordDto; |
| | | import com.ruoyi.safe.pojo.SafeHazardRecord; |
| | |
| | | } |
| | | |
| | | @Operation(summary = "é¢ç¨") |
| | | @Log(title = "å±é©æºè®°å½", businessType = BusinessType.INSERT) |
| | | @PostMapping("/borrow") |
| | | public R borrow(@RequestBody SafeHazardRecord safeHazardRecord) { |
| | | return R.ok(safeHazardRecordService.borrow(safeHazardRecord)); |
| | | } |
| | | |
| | | @Operation(summary = "å½è¿") |
| | | @Log(title = "å±é©æºè®°å½", businessType = BusinessType.UPDATE) |
| | | @PutMapping("/return") |
| | | public R returnSafeHazardRecord(@RequestBody SafeHazardRecord safeHazardRecord) { |
| | | return R.ok(safeHazardRecordService.returnSafeHazardRecord(safeHazardRecord)); |
| | | } |
| | | |
| | | @Operation(summary = "å é¤") |
| | | @Log(title = "å±é©æºè®°å½", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public R delSafeHazardRecord(@RequestBody List<Integer> ids) { |
| | | return R.ok(safeHazardRecordService.delSafeHazardRecord(ids)); |
| | |
| | | package com.ruoyi.safe.controller; |
| | | |
| | | 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.domain.R; |
| | | import com.ruoyi.safe.dto.SafeHiddenDto; |
| | | import com.ruoyi.safe.pojo.SafeHidden; |
| | |
| | | } |
| | | |
| | | @Operation(summary = "æ°å¢éæ£ææ¥") |
| | | @Log(title = "å®å
¨éæ£", businessType = BusinessType.INSERT) |
| | | @PostMapping() |
| | | public R add(@RequestBody SafeHidden safeHidden) { |
| | | return R.ok(safeHiddenService.add(safeHidden)); |
| | | } |
| | | |
| | | @Operation(summary = "ä¿®æ¹éæ£ææ¥(æ´æ¹/éªæ¶)") |
| | | @Log(title = "å®å
¨éæ£", businessType = BusinessType.UPDATE) |
| | | @PutMapping () |
| | | public R update(@RequestBody SafeHidden safeHidden) { |
| | | return R.ok(safeHiddenService.updateById(safeHidden)); |
| | | } |
| | | |
| | | @Operation(summary = "å é¤éæ£ææ¥") |
| | | @Log(title = "å®å
¨éæ£", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public R delSafeHidden(@RequestBody List<Integer> ids) { |
| | | return R.ok(safeHiddenService.delSafeHidden(ids)); |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | 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.domain.R; |
| | | import com.ruoyi.safe.pojo.SafeHiddenFile; |
| | | import com.ruoyi.safe.service.SafeHiddenFileService; |
| | |
| | | * @param safeHiddenFile |
| | | * @return |
| | | */ |
| | | @Log(title = "æ°å¢éæ£æä»¶", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | @Operation(summary = "æ°å¢") |
| | | public R add(@RequestBody SafeHiddenFile safeHiddenFile) { |
| | |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @Log(title = "å é¤éæ£æä»¶", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/del") |
| | | @Operation(summary = "å é¤") |
| | | public R delSafeHiddenFile(@RequestBody List<Integer> ids) { |
| | |
| | | package com.ruoyi.safe.controller; |
| | | |
| | | 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.domain.R; |
| | | import com.ruoyi.safe.dto.SafeTrainingDto; |
| | | import com.ruoyi.safe.pojo.SafeTraining; |
| | |
| | | } |
| | | |
| | | @Operation(summary = "æ°å¢/ç¼è¾å®å
¨å¹è®èæ ¸") |
| | | @Log(title = "å®å
¨å¹è®", businessType = BusinessType.INSERT) |
| | | @PostMapping() |
| | | public R addOrUpdate(@RequestBody SafeTraining safeTraining) { |
| | | return R.ok(safeTrainingService.addOrUpdate(safeTraining)); |
| | | } |
| | | |
| | | @Operation(summary = "ç¾å°") |
| | | @Log(title = "å®å
¨å¹è®", businessType = BusinessType.INSERT) |
| | | @PostMapping ("/sign") |
| | | public R sign(@RequestBody SafeTrainingDetails safeTrainingDetails) { |
| | | return R.ok(safeTrainingDetailsService.save(safeTrainingDetails)); |
| | |
| | | } |
| | | |
| | | @Operation(summary = "ç»ææç»ä¿å") |
| | | @Log(title = "å®å
¨å¹è®", businessType = BusinessType.UPDATE) |
| | | @PostMapping ("/saveSafeTraining") |
| | | public R saveSafeTraining(@RequestBody SafeTrainingDto safeTrainingDto) { |
| | | return R.ok(safeTrainingService.saveSafeTraining(safeTrainingDto)); |
| | | } |
| | | |
| | | @Operation(summary = "å é¤å®å
¨å¹è®èæ ¸") |
| | | @Log(title = "å®å
¨å¹è®", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public R delSafeTraining(@RequestBody List<Integer> ids) { |
| | | return R.ok(safeTrainingService.delSafeTraining(ids)); |
| | | } |
| | | |
| | | @Operation(summary = "导åº") |
| | | @Log(title = "å®å
¨å¹è®", businessType = BusinessType.EXPORT) |
| | | @PostMapping ("/export") |
| | | public void export(HttpServletResponse response, @RequestBody SafeTraining safeTraining) { |
| | | safeTrainingService.export(response,safeTraining.getId()); |
| | |
| | | package com.ruoyi.safe.controller; |
| | | |
| | | 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.domain.R; |
| | | import com.ruoyi.safe.pojo.SafeTrainingDetails; |
| | | import com.ruoyi.safe.service.SafeTrainingDetailsService; |
| | |
| | | return R.ok(safeTrainingDetailsService.pageDetails(page, safeTrainingDetails)); |
| | | } |
| | | |
| | | @Log(title = "导åºå¹è®è¯¦æ
", businessType = BusinessType.EXPORT) |
| | | @Operation(summary = "导åº") |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, @RequestBody SafeTrainingDetails safeTrainingDetails) { |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | 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.domain.R; |
| | | import com.ruoyi.safe.pojo.SafeHiddenFile; |
| | | import com.ruoyi.safe.pojo.SafeTrainingFile; |
| | |
| | | * @param safeHiddenFile |
| | | * @return |
| | | */ |
| | | @Log(title = "æ°å¢å¹è®æä»¶", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | @Operation(summary = "æ°å¢") |
| | | public R add(@RequestBody SafeTrainingFile safeHiddenFile) { |
| | |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @Log(title = "å é¤å¹è®æä»¶", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/del") |
| | | @Operation(summary = "å é¤") |
| | | public R delSafeHiddenFile(@RequestBody List<Integer> ids) { |
| | |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.utils.OrderUtils; |
| | | 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.sales.mapper.PaymentShippingMapper; |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | return AjaxResult.success(listPage); |
| | | } |
| | | |
| | | @Log(title = "仿¬¾åè´§", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | @Operation(summary = "æ·»å æ¯ä»ä¸åè´§ä¿¡æ¯") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult add(@RequestBody PaymentShipping paymentShipping) { |
| | | String ord = OrderUtils.countTodayByCreateTime(paymentShippingMapper, "ORD","order_no", paymentShipping.getCreateTime() != null ? paymentShipping.getCreateTime() : LocalDateTime.now()); |
| | | String ord = OrderUtils.countTodayByCreateTime(paymentShippingMapper, "ORD","order_no"); |
| | | paymentShipping.setOrderNo(ord); |
| | | boolean save = paymentShippingService.save(paymentShipping); |
| | | return save ? success() : error(); |
| | | } |
| | | |
| | | @Log(title = "仿¬¾åè´§", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/update") |
| | | @Operation(summary = "ä¿®æ¹æ¯ä»ä¸åè´§ä¿¡æ¯") |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | return update ? success() : error(); |
| | | } |
| | | |
| | | @Log(title = "仿¬¾åè´§", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/delete") |
| | | @Operation(summary = "å 餿¯ä»ä¸åè´§ä¿¡æ¯") |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | |
| | | // å¦æå·²ç»æè¿å¼ç¥¨æå款æä½,åä¸å
许ç¼è¾ |
| | | boolean hasReceiptOperation = receiptPaymentAmountTotal.compareTo(BigDecimal.ZERO) > 0; |
| | | salesLedgerVo.setIsEdit(!hasReceiptOperation); |
| | | salesLedgerVo.setIsEdit(hasReceiptOperation); |
| | | |
| | | salesLedgerVo.setStorageBlobVOs(fileUtil.getStorageBlobVOsByApplicationAndRecordTypeAndRecordId(ApplicationTypeEnum.FILE, RecordTypeEnum.SALES_LEDGER, ledgerId)); |
| | | } |
| | |
| | | public R getSalesLedgerWithProductsLoss(Long salesLedgerId) { |
| | | return R.ok(salesLedgerService.getSalesLedgerWithProductsLoss(salesLedgerId)); |
| | | } |
| | | |
| | | @Operation(summary = "è·åéå®åæå°æ°æ®") |
| | | @GetMapping("/printData/{id}") |
| | | public AjaxResult printData(@PathVariable Long id) { |
| | | Map<String, Object> data = salesLedgerService.getPrintData(id); |
| | | if (data == null) { |
| | | return AjaxResult.error("éå®åä¸åå¨"); |
| | | } |
| | | return AjaxResult.success(data); |
| | | } |
| | | } |
| | |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.procurementrecord.service.ProcurementRecordService; |
| | | import com.ruoyi.procurementrecord.utils.StockUtils; |
| | | import com.ruoyi.purchase.dto.SimpleReturnOrderGroupDto; |
| | | import com.ruoyi.purchase.mapper.PurchaseReturnOrderProductsMapper; |
| | | import com.ruoyi.sales.pojo.SalesLedgerProduct; |
| | | import com.ruoyi.sales.service.ISalesLedgerProductService; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 产åä¿¡æ¯Controller |
| | |
| | | public class SalesLedgerProductController extends BaseController |
| | | { |
| | | private final ISalesLedgerProductService salesLedgerProductService; |
| | | private final ProcurementRecordService procurementRecordService; |
| | | private final StockUtils stockUtils; |
| | | private final PurchaseReturnOrderProductsMapper purchaseReturnOrderProductsMapper; |
| | | |
| | | |
| | | /** |
| | |
| | | @GetMapping("/list") |
| | | public AjaxResult list(SalesLedgerProduct salesLedgerProduct) { |
| | | List<SalesLedgerProduct> list = salesLedgerProductService.selectSalesLedgerProductList(salesLedgerProduct); |
| | | if (CollUtil.isNotEmpty(list)) { |
| | | list.forEach(item -> { |
| | | if (item.getApproveStatus() != 2) { |
| | | if (item.getHasSufficientStock() == 0) { |
| | | item.setApproveStatus(0); |
| | | } else { |
| | | item.setApproveStatus(1); |
| | | } |
| | | } |
| | | java.math.BigDecimal returnQuantity = item.getReturnQuantity() == null |
| | | ? java.math.BigDecimal.ZERO |
| | | : item.getReturnQuantity(); |
| | | item.setReturnQuantity(returnQuantity); |
| | | java.math.BigDecimal availableQuality = item.getQuantity() == null |
| | | ? java.math.BigDecimal.ZERO |
| | | : item.getQuantity(); |
| | | if (item.getType() != null && item.getType() == 2) { |
| | | availableQuality = item.getApprovedStockInNum() == null |
| | | ? java.math.BigDecimal.ZERO |
| | | : item.getApprovedStockInNum(); |
| | | availableQuality = availableQuality |
| | | .subtract(item.getShippedQuantity() == null ? java.math.BigDecimal.ZERO : item.getShippedQuantity()); |
| | | } |
| | | item.setAvailableQuality(availableQuality.subtract(returnQuantity)); |
| | | }); |
| | | if (CollUtil.isEmpty(list)) { |
| | | return AjaxResult.success(list); |
| | | } |
| | | List<Long> productIds = list.stream().map(SalesLedgerProduct::getProductModelId).collect(Collectors.toList()); |
| | | List<SimpleReturnOrderGroupDto> groupListByProductIds = purchaseReturnOrderProductsMapper.getReturnOrderGroupListByProductIds(productIds); |
| | | Map<Long, BigDecimal> returnOrderGroupDtoMap = groupListByProductIds.stream().collect(Collectors.toMap(SimpleReturnOrderGroupDto::getProductModelId, item -> item.getSumReturnQuantity())); |
| | | |
| | | list.forEach(item -> { |
| | | if (item.getApproveStatus() != 2) { |
| | | if (item.getHasSufficientStock() == 0) { |
| | | item.setApproveStatus(0); |
| | | } else { |
| | | item.setApproveStatus(1); |
| | | } |
| | | } |
| | | // ç»è®¡éè´§æ°é |
| | | BigDecimal returnQuality = returnOrderGroupDtoMap.getOrDefault(item.getProductModelId(), BigDecimal.ZERO); |
| | | item.setReturnQuality(returnQuality); |
| | | item.setAvailableQuality(item.getQuantity().subtract(returnQuality)); |
| | | }); |
| | | return AjaxResult.success(list); |
| | | } |
| | | |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.sales.dto.SalesQuotationDto; |
| | | import com.ruoyi.sales.service.SalesQuotationService; |
| | |
| | | } |
| | | |
| | | |
| | | @Log(title = "é宿¥ä»·", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response) { |
| | | Page page = new Page(-1,-1); |
| | |
| | | } |
| | | |
| | | |
| | | @Log(title = "é宿¥ä»·", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody SalesQuotationDto salesQuotationDto) { |
| | | return AjaxResult.success(salesQuotationService.add(salesQuotationDto)); |
| | | } |
| | | @Log(title = "é宿¥ä»·", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/update") |
| | | public AjaxResult update(@RequestBody SalesQuotationDto salesQuotationDto) { |
| | | return AjaxResult.success(salesQuotationService.edit(salesQuotationDto)); |
| | | } |
| | | @Log(title = "é宿¥ä»·", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/delete") |
| | | public AjaxResult delete(@RequestBody Long id) { |
| | | return AjaxResult.success(salesQuotationService.delete(id)); |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | 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.sales.pojo.SalespersonManagement; |
| | |
| | | return AjaxResult.success(listPage); |
| | | } |
| | | |
| | | @Log(title = "ä¸å¡å管ç", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | @Operation(summary = "æ·»å ä¸å¡åä¿¡æ¯") |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | return save ? AjaxResult.success() : AjaxResult.error(); |
| | | } |
| | | |
| | | @Log(title = "ä¸å¡å管ç", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/update") |
| | | @Operation(summary = "ä¿®æ¹ä¸å¡åä¿¡æ¯") |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | return update ? AjaxResult.success() : AjaxResult.error(); |
| | | } |
| | | |
| | | @Log(title = "ä¸å¡å管ç", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/delete") |
| | | @Operation(summary = "å é¤ä¸å¡åä¿¡æ¯") |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.approve.bean.vo.ApproveProcessVO; |
| | | import com.ruoyi.approve.service.impl.ApproveProcessServiceImpl; |
| | | import com.ruoyi.common.utils.OrderUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.security.LoginUser; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.framework.web.domain.R; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.io.IOException; |
| | | import java.time.LocalDate; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Log(title = "åè´§ä¿¡æ¯ç®¡ç", businessType = BusinessType.INSERT) |
| | | public AjaxResult add(@RequestBody ShippingInfoDto req) throws Exception { |
| | | return AjaxResult.success(shippingInfoService.addReq(req) ? "æ·»å æå" : "æ·»å 失败"); |
| | | LoginUser loginUser = SecurityUtils.getLoginUser(); |
| | | String sh = OrderUtils.countTodayByCreateTime(shippingInfoMapper, "SH","shipping_no"); |
| | | // åè´§å®¡æ¹ |
| | | ApproveProcessVO approveProcessVO = new ApproveProcessVO(); |
| | | approveProcessVO.setApproveType(7); |
| | | approveProcessVO.setApproveDeptId(loginUser.getCurrentDeptId()); |
| | | approveProcessVO.setApproveReason(sh);//åè´§ç¼å· |
| | | approveProcessVO.setApproveUserIds(req.getApproveUserIds()); |
| | | approveProcessVO.setApproveUser(loginUser.getUserId()); |
| | | approveProcessVO.setApproveTime(LocalDate.now().toString()); |
| | | approveProcessService.addApprove(approveProcessVO); |
| | | // æ·»å åè´§æ¶æ¯ |
| | | req.setShippingNo(sh); |
| | | req.setStatus("å¾
å®¡æ ¸"); |
| | | boolean save = shippingInfoService.add(req); |
| | | return save ? AjaxResult.success() : AjaxResult.error(); |
| | | } |
| | | |
| | | @Operation(summary = "åè´§æ£åºå") |
| | |
| | | /** |
| | | * 导åºåè´§ä¿¡æ¯ç®¡ç |
| | | */ |
| | | @Log(title = "åè´§ä¿¡æ¯", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | @Operation(summary = "导åºåè´§ä¿¡æ¯") |
| | | public void export(HttpServletResponse response) { |
| | |
| | | private String salesContractNo; |
| | | private String customerContractNo; |
| | | private String projectName; |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date entryDate; |
| | | |
| | | private String entryDateStart; |
| | |
| | | */ |
| | | // 审æ¹äºº |
| | | private String approveUserIds; |
| | | |
| | | private Long templateId; |
| | | } |
| | |
| | | private String month; // æä»½ï¼å¦2024-12ï¼ |
| | | private Integer orderCount; // è®¢åæ° |
| | | private BigDecimal salesAmount; // éå®é¢ |
| | | private BigDecimal productQuantity; // 产åé宿°é |
| | | private BigDecimal shipRate; |
| | | |
| | | } |
| | |
| | | //åè´§æ°é |
| | | private BigDecimal totalQuantity; |
| | | |
| | | private Long templateId; |
| | | |
| | | private String templateName; |
| | | |
| | | |
| | | } |
| | |
| | | "DATE_FORMAT(sl.entry_date, '%Y-%m') AS month, " + |
| | | "COUNT(DISTINCT sl.id) AS order_count, " + // æ»è®¢åæ° |
| | | "SUM(slp.tax_inclusive_total_price) AS sales_amount, " + // éå®é¢ |
| | | "SUM(IFNULL(slp.quantity, 0)) AS product_quantity, " + // 产åé宿°é |
| | | // åè´§ç = åè´§è®¢åæ° * 100 / æ»è®¢åæ°ï¼ä¿ç2ä½å°æ°ï¼é¿å
é¤0æ¥éï¼ |
| | | "ROUND(IF(COUNT(DISTINCT sl.id) = 0, 0, " + |
| | | "SUM(CASE WHEN slp.approve_status = 2 THEN 1 ELSE 0 END) / COUNT(DISTINCT sl.id) * 100), 2) AS ship_rate " + |
| | |
| | | private String remark; |
| | | |
| | | @Schema(description = "å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @Schema(description = "åå»ºç¨æ·") |
| | |
| | | /** |
| | | * å½å
¥æ¥æ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "å½å
¥æ¥æ", width = 30, dateFormat = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private Date entryDate; |
| | |
| | | |
| | | @Schema(description = "仿¬¾æ¹å¼") |
| | | private String paymentMethod; |
| | | |
| | | @Schema(description = "å®é
ååéé¢") |
| | | private BigDecimal netContractAmount; |
| | | |
| | | @TableField(exist = false) |
| | | @Schema(description = "çäº§ç¶æ") |
| | |
| | | @TableField(exist = false) |
| | | private Integer hasSufficientStock; |
| | | |
| | | // å¯ç¨æ°é quantity - returnQuantity |
| | | // éè´§æ°é |
| | | @TableField(exist = false) |
| | | private BigDecimal returnQuality; |
| | | |
| | | // å¯ç¨æ°é quantity - returnQuality |
| | | @TableField(exist = false) |
| | | private BigDecimal availableQuality; |
| | | @Schema(description = "åå»ºç¨æ·") |
| | |
| | | @TableField(exist = false) |
| | | @Schema(description = "å¾
åè´§æ°é") |
| | | private BigDecimal noQuantity; |
| | | |
| | | @TableField(exist = false) |
| | | @Schema(description = "éè´§æ°é") |
| | | private BigDecimal returnQuantity; |
| | | |
| | | @TableField(exist = false) |
| | | @Schema(description = "éå®åè´§æ°é") |
| | | private BigDecimal shippedQuantity; |
| | | |
| | | @TableField(exist = false) |
| | | @Schema(description = "å·²å®¡æ ¸å
¥åºæ°é") |
| | | private BigDecimal approvedStockInNum; |
| | | |
| | | @TableField(exist = false) |
| | | @Schema(description = "审æ¹ä¸æ°é") |
| | | private BigDecimal pendingApprovalQuantity; |
| | | } |
| | |
| | | @ApiModelProperty(value = "夿³¨") |
| | | private String remark; |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "ä¿®æ¹æ¶é´") |
| | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | |
| | | @Schema(description = "åä½") |
| | | private String unit; |
| | | @Schema(description = "åä»·") |
| | | private Double unitPrice; |
| | | private BigDecimal unitPrice; |
| | | @Schema(description = "æ°é") |
| | | private Integer quantity; |
| | | @Schema(description = "éé¢") |
| | | private Double amount; |
| | | private BigDecimal amount; |
| | | @Schema(description = "å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | |
| | | import jakarta.validation.constraints.NotNull; |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * éå®å°è´¦Serviceæ¥å£ |
| | |
| | | List<LossProductModelDto> getSalesLedgerWithProductsLoss(Long salesLedgerId); |
| | | |
| | | IPage<SalesLedgerDto> listSalesLedger(SalesLedgerDto salesLedgerDto, Page page); |
| | | |
| | | Map<String, Object> getPrintData(Long id); |
| | | } |
| | |
| | | List<ShippingProductDetailDto> getDetail(Long id); |
| | | |
| | | ShippingApproveDto getDateilByShippingNo(String shippingNo); |
| | | |
| | | boolean addReq(ShippingInfoDto req); |
| | | } |
| | |
| | | |
| | | public AjaxResult total() { |
| | | List<SalesLedger> salesLedgers = salesLedgerMapper.selectList(null); |
| | | if(CollectionUtils.isEmpty(salesLedgers)) return AjaxResult.success(salesLedgers); |
| | | if (CollectionUtils.isEmpty(salesLedgers)) { |
| | | return AjaxResult.success(salesLedgers); |
| | | } |
| | | |
| | | Map<String, Object> map = new HashMap<>(); |
| | | // éå®é¢ |
| | | map.put("contractAmountTotal", salesLedgers.stream().map(SalesLedger::getContractAmount).reduce(BigDecimal.ZERO, BigDecimal::add)); |
| | | // è®¢åæ°é |
| | | map.put("total", new BigDecimal(salesLedgers.size())); |
| | | // åè´§ç |
| | | List<SalesLedgerProduct> salesLedgerProducts = salesLedgerProductMapper.selectList(new LambdaQueryWrapper<SalesLedgerProduct>() |
| | | // éå®é¢ |
| | | BigDecimal contractAmountTotal = salesLedgers.stream() |
| | | .map(SalesLedger::getContractAmount) |
| | | .filter(Objects::nonNull) |
| | | .reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | map.put("contractAmountTotal", contractAmountTotal); |
| | | |
| | | // è®¢åæ°é |
| | | int totalOrders = salesLedgers.size(); |
| | | map.put("total", new BigDecimal(totalOrders)); |
| | | map.put("shipRate", "0.00%"); |
| | | |
| | | // 产åé宿°é |
| | | List<SalesLedgerProduct> products = salesLedgerProductMapper.selectList(new LambdaQueryWrapper<SalesLedgerProduct>() |
| | | .eq(SalesLedgerProduct::getType, 1)); |
| | | map.put("shipRate", "0%"); |
| | | if(CollectionUtils.isEmpty(salesLedgerProducts)) return AjaxResult.success(map); |
| | | // åè´§æ°é |
| | | long count = shippingInfoMapper.selectCount(new LambdaQueryWrapper<ShippingInfo>() |
| | | .in(ShippingInfo::getSalesLedgerProductId, salesLedgerProducts.stream().map(SalesLedgerProduct::getId).collect(Collectors.toList())) |
| | | .eq(ShippingInfo::getStatus,"å·²åè´§")); |
| | | map.put("shipRate", String.format("%.2f", count * 100.0 / salesLedgerProducts.size()) + "%"); |
| | | BigDecimal productQuantityTotal = CollectionUtils.isEmpty(products) ? BigDecimal.ZERO : |
| | | products.stream() |
| | | .map(SalesLedgerProduct::getQuantity) |
| | | .filter(Objects::nonNull) |
| | | .reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | map.put("productQuantityTotal", productQuantityTotal); |
| | | |
| | | if (CollectionUtils.isEmpty(products)) { |
| | | return AjaxResult.success(map); |
| | | } |
| | | |
| | | Map<Long, Long> productIdToLedgerIdMap = products.stream() |
| | | .filter(p -> p.getId() != null && p.getSalesLedgerId() != null) |
| | | .collect(Collectors.toMap(SalesLedgerProduct::getId, SalesLedgerProduct::getSalesLedgerId, (k1, k2) -> k1)); |
| | | |
| | | List<ShippingInfo> shippingInfos = shippingInfoMapper.selectList(new LambdaQueryWrapper<ShippingInfo>() |
| | | .eq(ShippingInfo::getStatus, "å®¡æ ¸éè¿")); |
| | | |
| | | long shippedOrderCount = shippingInfos.stream() |
| | | .filter(info -> productIdToLedgerIdMap.containsKey(info.getSalesLedgerProductId())) |
| | | .map(info -> { |
| | | if (info.getSalesLedgerId() != null) { |
| | | return info.getSalesLedgerId(); |
| | | } |
| | | return productIdToLedgerIdMap.get(info.getSalesLedgerProductId()); |
| | | }) |
| | | .filter(Objects::nonNull) |
| | | .distinct() |
| | | .count(); |
| | | |
| | | map.put("shipRate", String.format("%.2f", shippedOrderCount * 100.0 / totalOrders) + "%"); |
| | | return AjaxResult.success(map); |
| | | } |
| | | |
| | |
| | | List<String> dateList = new ArrayList<>(); |
| | | List<BigDecimal> orderCountList = new ArrayList<>(); |
| | | List<BigDecimal> salesAmountList = new ArrayList<>(); |
| | | List<BigDecimal> productQuantityList = new ArrayList<>(); |
| | | List<BigDecimal> shippingRateList = new ArrayList<>(); |
| | | |
| | | Calendar tempCalendar = Calendar.getInstance(); |
| | |
| | | if (dto != null) { |
| | | orderCountList.add(new BigDecimal(dto.getOrderCount())); |
| | | salesAmountList.add(dto.getSalesAmount() != null ? dto.getSalesAmount() : BigDecimal.ZERO); |
| | | productQuantityList.add(dto.getProductQuantity() != null ? dto.getProductQuantity() : BigDecimal.ZERO); |
| | | shippingRateList.add(new BigDecimal(String.valueOf(dto.getShipRate()))); |
| | | } else { |
| | | orderCountList.add(BigDecimal.ZERO); |
| | | salesAmountList.add(BigDecimal.ZERO); |
| | | productQuantityList.add(BigDecimal.ZERO); |
| | | shippingRateList.add(BigDecimal.ZERO); |
| | | } |
| | | |
| | |
| | | map.put("dateList", dateList); |
| | | map.put("orderCountList", orderCountList); |
| | | map.put("salesAmountList", salesAmountList); |
| | | map.put("productQuantityList", productQuantityList); |
| | | map.put("shippingRateList", shippingRateList); |
| | | return AjaxResult.success(map); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.utils.AmountUtils; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.procurementrecord.utils.StockUtils; |
| | | import com.ruoyi.production.mapper.*; |
| | |
| | | import com.ruoyi.technology.mapper.TechnologyBomStructureMapper; |
| | | import com.ruoyi.technology.mapper.TechnologyRoutingMapper; |
| | | import com.ruoyi.technology.pojo.TechnologyRouting; |
| | | import org.apache.commons.lang3.BooleanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | import java.lang.reflect.Field; |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.Arrays; |
| | |
| | | |
| | | @Override |
| | | public SalesLedgerProduct selectSalesLedgerProductById(Long id) { |
| | | return salesLedgerProductMapper.selectById(id); |
| | | SalesLedgerProduct product = salesLedgerProductMapper.selectById(id); |
| | | AmountUtils.normalizeSalesLedgerProduct(product); |
| | | return product; |
| | | } |
| | | |
| | | @Override |
| | |
| | | List<SalesLedgerProduct> salesLedgerProducts = salesLedgerProductMapper.selectSalesLedgerProductList(salesLedgerProduct); |
| | | if(!CollectionUtils.isEmpty(salesLedgerProducts)){ |
| | | salesLedgerProducts.forEach(item -> { |
| | | // åè´§ä¿¡æ¯ï¼åææ°ä¸æ¡ï¼åªæ¥è¯¢å®¡æ ¸éè¿æå·²åè´§çè®°å½ï¼ |
| | | ShippingInfo latestShippingInfo = shippingInfoMapper.selectOne(new LambdaQueryWrapper<ShippingInfo>() |
| | | AmountUtils.normalizeSalesLedgerProduct(item); |
| | | // åè´§ä¿¡æ¯ |
| | | ShippingInfo shippingInfo = shippingInfoMapper.selectOne(new LambdaQueryWrapper<ShippingInfo>() |
| | | .eq(ShippingInfo::getSalesLedgerProductId, item.getId()) |
| | | .in(ShippingInfo::getStatus, "å®¡æ ¸éè¿", "å·²åè´§") |
| | | .orderByDesc(ShippingInfo::getCreateTime) |
| | | .last("limit 1")); |
| | | if(latestShippingInfo != null){ |
| | | item.setShippingDate(latestShippingInfo.getShippingDate()); |
| | | item.setExpressCompany(latestShippingInfo.getExpressCompany()); |
| | | item.setExpressNumber(latestShippingInfo.getExpressNumber()); |
| | | } |
| | | // 车çå·ï¼åææå®¡æ ¸éè¿æå·²åè´§è®°å½ç车çå·ï¼éå·æ¼æ¥ |
| | | List<ShippingInfo> allShippingInfos = shippingInfoMapper.selectList(new LambdaQueryWrapper<ShippingInfo>() |
| | | .eq(ShippingInfo::getSalesLedgerProductId, item.getId()) |
| | | .in(ShippingInfo::getStatus, "å®¡æ ¸éè¿", "å·²åè´§") |
| | | .orderByAsc(ShippingInfo::getCreateTime)); |
| | | if(!CollectionUtils.isEmpty(allShippingInfos)){ |
| | | String carNumbers = allShippingInfos.stream() |
| | | .map(ShippingInfo::getShippingCarNumber) |
| | | .filter(carNo -> carNo != null && !carNo.trim().isEmpty()) |
| | | .distinct() |
| | | .collect(Collectors.joining(",")); |
| | | item.setShippingCarNumber(carNumbers); |
| | | if(shippingInfo != null){ |
| | | item.setShippingDate(shippingInfo.getShippingDate()); |
| | | item.setShippingCarNumber(shippingInfo.getShippingCarNumber()); |
| | | item.setExpressCompany(shippingInfo.getExpressCompany()); |
| | | item.setExpressNumber(shippingInfo.getExpressNumber()); |
| | | } |
| | | }); |
| | | } |
| | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int addOrUpdateSalesLedgerProduct(SalesLedgerProduct salesLedgerProduct) { |
| | | AmountUtils.normalizeSalesLedgerProduct(salesLedgerProduct); |
| | | |
| | | int result; |
| | | Long salesLedgerId = salesLedgerProduct.getSalesLedgerId(); |
| | |
| | | */ |
| | | public void addProductionData(SalesLedgerProduct salesLedgerProduct) { |
| | | //å
å¤æè¯¥äº§åæ¯å¦éè¦ç产 |
| | | if (!BooleanUtils.isTrue(salesLedgerProduct.getIsProduction())) { |
| | | return; |
| | | if (Boolean.TRUE.equals(salesLedgerProduct.getIsProduction())) { |
| | | SalesLedger salesLedger = salesLedgerMapper.selectById(salesLedgerProduct.getSalesLedgerId()); |
| | | ProductionPlan productionPlan = new ProductionPlan(); |
| | | productionPlan.setSalesLedgerId(salesLedgerProduct.getSalesLedgerId()); |
| | | productionPlan.setSalesLedgerProductId(salesLedgerProduct.getId()); |
| | | productionPlan.setMpsNo(generateNextPlanNo(LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyMMdd")))); |
| | | productionPlan.setProductModelId(salesLedgerProduct.getProductModelId()); |
| | | productionPlan.setQtyRequired(salesLedgerProduct.getQuantity()); |
| | | productionPlan.setSource("éå®"); |
| | | productionPlan.setStatus(0); |
| | | productionPlan.setRequiredDate(salesLedger.getDeliveryDate());//éæ±æ¥æ=äº¤è´§æ¥æ |
| | | productionPlan.setPromisedDeliveryDate(salesLedger.getDeliveryDate());//æ¿è¯ºæ¥æ=äº¤è´§æ¥æ |
| | | productionPlanMapper.insert(productionPlan); |
| | | } |
| | | SalesLedger salesLedger = salesLedgerMapper.selectById(salesLedgerProduct.getSalesLedgerId()); |
| | | ProductionPlan productionPlan = new ProductionPlan(); |
| | | productionPlan.setSalesLedgerId(salesLedgerProduct.getSalesLedgerId()); |
| | | productionPlan.setSalesLedgerProductId(salesLedgerProduct.getId()); |
| | | productionPlan.setMpsNo(generateNextPlanNo(com.ruoyi.common.utils.DateUtils.toLocalDate(salesLedger.getEntryDate()) |
| | | .format(DateTimeFormatter.ofPattern("yyyyMMdd")))); |
| | | productionPlan.setProductModelId(salesLedgerProduct.getProductModelId()); |
| | | productionPlan.setQtyRequired(salesLedgerProduct.getQuantity()); |
| | | productionPlan.setSource("éå®"); |
| | | productionPlan.setStatus(0); |
| | | productionPlan.setRequiredDate(salesLedger.getDeliveryDate());//éæ±æ¥æ=äº¤è´§æ¥æ |
| | | productionPlan.setPromisedDeliveryDate(salesLedger.getDeliveryDate());//æ¿è¯ºæ¥æ=äº¤è´§æ¥æ |
| | | productionPlanMapper.insert(productionPlan); |
| | | |
| | | } |
| | | |
| | |
| | | |
| | | Field amountField = mainEntityClass.getDeclaredField("contractAmount"); |
| | | amountField.setAccessible(true); |
| | | amountField.set(entity, totalAmount); |
| | | amountField.set(entity, AmountUtils.scaleAmount(totalAmount)); |
| | | |
| | | mainMapper.updateById(entity); |
| | | } catch (Exception e) { |
| | |
| | | import com.ruoyi.common.enums.FileNameType; |
| | | import com.ruoyi.common.enums.SaleEnum; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.AmountUtils; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.EnumUtil; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | |
| | | import com.ruoyi.project.system.domain.SysUser; |
| | | import com.ruoyi.project.system.mapper.SysDeptMapper; |
| | | import com.ruoyi.project.system.mapper.SysUserMapper; |
| | | import com.ruoyi.purchase.dto.SimpleReturnOrderGroupDto; |
| | | import com.ruoyi.purchase.mapper.PurchaseReturnOrderProductsMapper; |
| | | import com.ruoyi.quality.mapper.QualityInspectMapper; |
| | | import com.ruoyi.sales.dto.*; |
| | | import com.ruoyi.sales.mapper.CommonFileMapper; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | |
| | | import java.io.InputStream; |
| | | import java.lang.reflect.Field; |
| | |
| | | @Autowired |
| | | private ProductionProductMainService productionProductMainService; |
| | | @Autowired |
| | | private PurchaseReturnOrderProductsMapper purchaseReturnOrderProductsMapper; |
| | | ; |
| | | @Autowired |
| | | private SysUserMapper sysUserMapper; |
| | | |
| | | @Override |
| | |
| | | productWrapper.eq(SalesLedgerProduct::getType, type.getCode()); |
| | | List<SalesLedgerProduct> salesLedgerProducts = salesLedgerProductMapper.selectList(productWrapper); |
| | | if (type.equals(SaleEnum.PURCHASE)) { |
| | | // æ¥è¯¢éè´§ä¿¡æ¯ |
| | | List<Long> productIds = salesLedgerProducts.stream().map(SalesLedgerProduct::getProductModelId).collect(Collectors.toList()); |
| | | List<SimpleReturnOrderGroupDto> groupListByProductIds = new ArrayList<>(); |
| | | if (CollectionUtils.isNotEmpty(productIds)) { |
| | | groupListByProductIds = purchaseReturnOrderProductsMapper.getReturnOrderGroupListByProductIds(productIds); |
| | | } |
| | | Map<Long, BigDecimal> returnOrderGroupDtoMap = groupListByProductIds.stream().collect(Collectors.toMap(SimpleReturnOrderGroupDto::getProductModelId, SimpleReturnOrderGroupDto::getSumReturnQuantity)); |
| | | salesLedgerProducts.forEach(item -> { |
| | | BigDecimal returnQuantity = item.getReturnQuantity() == null ? BigDecimal.ZERO : item.getReturnQuantity(); |
| | | item.setReturnQuantity(returnQuantity); |
| | | BigDecimal quantity = item.getQuantity() == null ? BigDecimal.ZERO : item.getQuantity(); |
| | | item.setAvailableQuality(quantity.subtract(returnQuantity)); |
| | | BigDecimal returnQuality = returnOrderGroupDtoMap.getOrDefault(item.getProductModelId(), BigDecimal.ZERO); |
| | | item.setReturnQuality(returnQuality); |
| | | item.setAvailableQuality(item.getQuantity().subtract(returnQuality)); |
| | | }); |
| | | } |
| | | return salesLedgerProducts; |
| | |
| | | productWrapper.eq(SalesLedgerProduct::getSalesLedgerId, salesLedger.getId()); |
| | | productWrapper.eq(SalesLedgerProduct::getType, 1); |
| | | List<SalesLedgerProduct> products = salesLedgerProductMapper.selectList(productWrapper); |
| | | AmountUtils.normalizeSalesLedgerProducts(products); |
| | | for (SalesLedgerProduct product : products) { |
| | | product.setRegister(SecurityUtils.getLoginUser().getUser().getNickName()); |
| | | product.setRegisterDate(LocalDateTime.now()); |
| | |
| | | .orderByDesc(ShippingInfo::getCreateTime) |
| | | .last("limit 1")); |
| | | if (shippingInfo != null) { |
| | | product.setShippingCarNumber(shippingInfo.getShippingCarNumber()); |
| | | product.setShippingDate(shippingInfo.getShippingDate()); |
| | | product.setShippingStatus(shippingInfo.getStatus()); |
| | | product.setExpressCompany(shippingInfo.getExpressCompany()); |
| | | product.setExpressNumber(shippingInfo.getExpressNumber()); |
| | | } |
| | | } |
| | | |
| | |
| | | // 4. è½¬æ¢ DTO |
| | | SalesLedgerDto resultDto = new SalesLedgerDto(); |
| | | BeanUtils.copyProperties(salesLedger, resultDto); |
| | | AmountUtils.normalizeContractAmount(resultDto); |
| | | if (!products.isEmpty()) { |
| | | resultDto.setHasChildren(true); |
| | | resultDto.setProductData(products); |
| | |
| | | dto.setReceiptAmount(totalIncome); |
| | | //å¼ç¥¨éé¢ |
| | | List<AccountInvoiceApplication> accountInvoiceApplications = accountInvoiceApplicationMapper.selectList(new LambdaQueryWrapper<AccountInvoiceApplication>() |
| | | .eq(AccountInvoiceApplication::getStatus,1) |
| | | .eq(AccountInvoiceApplication::getStatus, 1) |
| | | .between(AccountInvoiceApplication::getApplyDate, startTime, endTime)); |
| | | BigDecimal totalInvoiceAmount = Optional.of( |
| | | accountInvoiceApplications.stream() |
| | |
| | | |
| | | @Override |
| | | public IPage<SalesLedgerVo> selectSalesLedgerListPage(Page page, SalesLedgerDto salesLedgerDto) { |
| | | return salesLedgerMapper.selectSalesLedgerListPage(page, salesLedgerDto); |
| | | IPage<SalesLedgerVo> result = salesLedgerMapper.selectSalesLedgerListPage(page, salesLedgerDto); |
| | | if (!CollectionUtils.isEmpty(result.getRecords())) { |
| | | result.getRecords().forEach(AmountUtils::normalizeContractAmount); |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | @Override |
| | |
| | | if (CollectionUtils.isEmpty(salesLedgerImportDtoList)) return AjaxResult.error("éå®å°è´¦æ°æ®ä¸ºç©ºï¼"); |
| | | List<SalesLedgerImportDto> salesLedgerProductImportDtoList = stringListMap.get("éå®äº§åæ°æ®"); |
| | | if (CollectionUtils.isEmpty(salesLedgerProductImportDtoList)) return AjaxResult.error("éå®äº§åæ°æ®ä¸ºç©ºï¼"); |
| | | // å®¢æ·æ°æ® - åè listPage æ¥è¯¢ç§æµ·å®¢æ·ï¼type = 0ï¼ |
| | | // type = 0ï¼ç§æµ·å®¢æ·ï¼æè
type = 1ï¼å
¬æµ·å®¢æ·ï¼ä¸å·²è¢«åé
ï¼å¹¶ä¸æ¯èªå·±é¢ç¨ãèªå·±å建æè
å
±äº«ç»èªå·±çå®¢æ· |
| | | Long loginUserId = loginUser.getUser().getUserId(); |
| | | List<Customer> customers = customerMapper.selectList(new QueryWrapper<Customer>() |
| | | .in("customer_name", salesLedgerImportDtoList.stream() |
| | | .map(SalesLedgerImportDto::getCustomerName).collect(Collectors.toList())) |
| | | .and(wrapper -> wrapper.eq("type", 0) |
| | | .or(wrapper2 -> wrapper2.eq("type", 1).eq("is_assigned", 1))) |
| | | .and(wrapper -> wrapper.eq("usage_user", loginUserId) |
| | | .or(wrapper2 -> wrapper2.eq("create_user", loginUserId) |
| | | .or(wrapper3 -> wrapper3.exists("select 1 from customer_user cu where cu.customer_id = customer.id and cu.user_id = " + loginUserId))))); |
| | | // å®¢æ·æ°æ® |
| | | List<Customer> customers = customerMapper.selectList(new LambdaQueryWrapper<Customer>().in(Customer::getCustomerName, |
| | | salesLedgerImportDtoList.stream().map(SalesLedgerImportDto::getCustomerName).collect(Collectors.toList()))); |
| | | // // è§æ ¼åå·æ°æ® |
| | | // List<ProductModel> productModels = productModelMapper.selectList(new LambdaQueryWrapper<ProductModel>().in(ProductModel::getModel, |
| | | // salesLedgerProductImportDtoList.stream().map(SalesLedgerImportDto::getSpecificationModel).collect(Collectors.toList()))); |
| | |
| | | if (salesLedger1 != null) { |
| | | continue; |
| | | } |
| | | |
| | | // 夿ä¸å¡åæ¯å¦åå¨ |
| | | SysUser salesman = sysUserMapper.selectOne(new LambdaQueryWrapper<SysUser>() |
| | | .eq(SysUser::getNickName, salesLedgerImportDto.getSalesman())); |
| | | if (salesman == null) { |
| | | throw new RuntimeException("ä¸å¡å:" + salesLedgerImportDto.getSalesman() + "ä¸åå¨ï¼"); |
| | | } |
| | | SalesLedger salesLedger = new SalesLedger(); |
| | | BeanUtils.copyProperties(salesLedgerImportDto, salesLedger); |
| | | salesLedger.setExecutionDate(DateUtils.toLocalDate(salesLedgerImportDto.getExecutionDate())); |
| | | salesLedger.setDeliveryDate(DateUtils.toLocalDate(salesLedgerImportDto.getDeliveryDate())); |
| | | // éè¿å®¢æ·åç§°æ¥è¯¢å®¢æ·IDï¼å®¢æ·ååå· |
| | | Optional<Customer> customerOptional = customers.stream() |
| | | salesLedger.setCustomerId(customers.stream() |
| | | .filter(customer -> customer.getCustomerName().equals(salesLedger.getCustomerName())) |
| | | .findFirst(); |
| | | if (customerOptional.isEmpty()) { |
| | | throw new RuntimeException("客æ·:" + salesLedger.getCustomerName() + "ä¸åå¨ï¼æè
éç§æµ·ç¨æ·"); |
| | | } |
| | | salesLedger.setCustomerId(customerOptional.get().getId()); |
| | | salesLedger.setCustomerContractNo(customerOptional.get().getTaxpayerIdentificationNumber()); |
| | | .findFirst() |
| | | .map(Customer::getId) |
| | | .orElse(null)); |
| | | salesLedger.setCustomerContractNo(customers.stream() |
| | | .filter(customer -> customer.getCustomerName().equals(salesLedger.getCustomerName())) |
| | | .findFirst() |
| | | .map(Customer::getTaxpayerIdentificationNumber) |
| | | .orElse(null)); |
| | | Long aLong = sysUsers.stream() |
| | | .filter(sysUser -> sysUser.getNickName().equals(salesLedger.getEntryPerson())) |
| | | .findFirst() |
| | |
| | | salesLedger.setContractAmount(salesLedgerProductImportDtos.stream() |
| | | .map(SalesLedgerProductImportDto::getTaxInclusiveTotalPrice) |
| | | .reduce(BigDecimal.ZERO, BigDecimal::add)); |
| | | salesLedger.setNetContractAmount(salesLedger.getContractAmount()); |
| | | salesLedgerMapper.insert(salesLedger); |
| | | |
| | | |
| | |
| | | BeanUtils.copyProperties(salesLedgerProductImportDto, salesLedgerProduct); |
| | | salesLedgerProduct.setSalesLedgerId(salesLedger.getId()); |
| | | salesLedgerProduct.setType(1); |
| | | AmountUtils.normalizeSalesLedgerProduct(salesLedgerProduct); |
| | | // 计ç®ä¸å«ç¨æ»ä»· |
| | | salesLedgerProduct.setTaxExclusiveTotalPrice(salesLedgerProduct.getTaxInclusiveTotalPrice().divide(new BigDecimal(1).add(salesLedgerProduct.getTaxRate().divide(new BigDecimal(100))), 2, RoundingMode.HALF_UP)); |
| | | // æ ¡éªäº§åè§æ ¼æ¯å¦åå¨ |
| | | Optional<Map<String, Object>> productModelOptional = list.stream() |
| | | salesLedgerProduct.setTaxExclusiveTotalPrice( |
| | | AmountUtils.calcTaxExclusiveTotalPrice( |
| | | salesLedgerProduct.getTaxInclusiveTotalPrice(), |
| | | salesLedgerProduct.getTaxRate() |
| | | ) |
| | | ); |
| | | list.stream() |
| | | .filter(map -> Objects.equals(map.get("productName"), salesLedgerProduct.getProductCategory()) && Objects.equals(map.get("model"), salesLedgerProduct.getSpecificationModel())) |
| | | .findFirst(); |
| | | if (productModelOptional.isEmpty()) { |
| | | throw new RuntimeException("产å大类:" + salesLedgerProduct.getProductCategory() + ",è§æ ¼åå·:" + salesLedgerProduct.getSpecificationModel() + "ä¸åå¨ï¼"); |
| | | } |
| | | Map<String, Object> productModelMap = productModelOptional.get(); |
| | | salesLedgerProduct.setProductModelId(Long.parseLong(productModelMap.get("modelId").toString())); |
| | | salesLedgerProduct.setProductId(Long.parseLong(productModelMap.get("id").toString())); |
| | | .findFirst() |
| | | .ifPresent(map -> { |
| | | salesLedgerProduct.setProductModelId(Long.parseLong(map.get("modelId").toString())); |
| | | salesLedgerProduct.setProductId(Long.parseLong(map.get("id").toString())); |
| | | }); |
| | | // salesLedgerProduct.setProductId(productList.stream() |
| | | // .filter(product -> product.getProductName().equals(salesLedgerProduct.getProductCategory())) |
| | | // .findFirst() |
| | |
| | | productWrapper.eq(SalesLedgerProduct::getType, 1); |
| | | List<SalesLedgerProduct> products = salesLedgerProductMapper.selectList(productWrapper); |
| | | for (SalesLedgerProduct product : products) { |
| | | product.setRegister(SecurityUtils.getLoginUser().getUser().getNickName()); |
| | | product.setRegister(SecurityUtils.getLoginUser().getUser().getNickName()); |
| | | product.setRegisterDate(LocalDateTime.now()); |
| | | // åè´§ä¿¡æ¯ |
| | | ShippingInfo shippingInfo = shippingInfoMapper.selectOne(new LambdaQueryWrapper<ShippingInfo>() |
| | | .eq(ShippingInfo::getSalesLedgerProductId, product.getId()) |
| | | .orderByDesc(ShippingInfo::getCreateTime) |
| | | .last("limit 1")); |
| | | product.setShippingCarNumber(shippingInfo.getShippingCarNumber()); |
| | | product.setShippingDate(shippingInfo.getShippingDate()); |
| | | if (shippingInfo != null) { |
| | | product.setShippingCarNumber(shippingInfo.getShippingCarNumber()); |
| | | product.setShippingDate(shippingInfo.getShippingDate()); |
| | | product.setShippingStatus(shippingInfo.getStatus()); |
| | | product.setExpressCompany(shippingInfo.getExpressCompany()); |
| | | product.setExpressNumber(shippingInfo.getExpressNumber()); |
| | | } |
| | | } |
| | | // è¿æ»¤åªä¿çåè´§è®°å½ |
| | | products = products.stream().filter(product -> "å·²åè´§".equals(product.getShippingStatus())).collect(Collectors.toList()); |
| | | products = products.stream().filter(product -> "å®¡æ ¸éè¿".equals(product.getShippingStatus())).collect(Collectors.toList()); |
| | | if (!products.isEmpty()) { |
| | | salesLedger.setHasChildren(true); |
| | | salesLedger.setProductData(products); |
| | |
| | | // å é¤éå®ç®¡çæ°æ® |
| | | LambdaQueryWrapper<SalesLedgerProduct> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.in(SalesLedgerProduct::getSalesLedgerId, idList) |
| | | .eq(SalesLedgerProduct::getType, 1) |
| | | .select(SalesLedgerProduct::getId); |
| | | |
| | | List<SalesLedgerProduct> products = salesLedgerProductMapper.selectList(queryWrapper); |
| | |
| | | |
| | | // 2. DTO转Entity |
| | | SalesLedger salesLedger = convertToEntity(salesLedgerDto); |
| | | AmountUtils.normalizeContractAmount(salesLedger); |
| | | salesLedger.setCustomerName(customer.getCustomerName()); |
| | | salesLedger.setTenantId(customer.getTenantId()); |
| | | // å½å
¥äººï¼å¦ææªä¼ å使ç¨å½åç»å½ç¨æ· |
| | | if (StringUtils.isEmpty(salesLedger.getEntryPerson())) { |
| | | salesLedger.setEntryPerson(String.valueOf(SecurityUtils.getUserId())); |
| | | } |
| | | // 3. æ°å¢ææ´æ°ä¸»è¡¨ |
| | | if (salesLedger.getId() == null) { |
| | | String contractNo = salesLedger.getSalesContractNo(); |
| | | if (StringUtils.isEmpty(contractNo)) { |
| | | contractNo = generateSalesContractNo(salesLedgerDto.getEntryDate()); |
| | | contractNo = generateSalesContractNo(); |
| | | } |
| | | salesLedger.setSalesContractNo(contractNo); |
| | | salesLedgerMapper.insert(salesLedger); |
| | |
| | | // 4. å¤çåè¡¨æ°æ® |
| | | List<SalesLedgerProduct> productList = salesLedgerDto.getProductData(); |
| | | if (productList != null && !productList.isEmpty()) { |
| | | AmountUtils.normalizeSalesLedgerProducts(productList); |
| | | handleSalesLedgerProducts(salesLedger.getId(), productList, EnumUtil.fromCode(SaleEnum.class, salesLedgerDto.getType())); |
| | | updateMainContractAmount( |
| | | salesLedger.getId(), |
| | |
| | | ); |
| | | } |
| | | |
| | | // 5. å
åºï¼ç¡®ä¿å®é
ååé颿åå§å¼çäºååéé¢ |
| | | if (salesLedger.getNetContractAmount() == null) { |
| | | SalesLedger dbLedger = salesLedgerMapper.selectById(salesLedger.getId()); |
| | | if (dbLedger != null && dbLedger.getNetContractAmount() == null && dbLedger.getContractAmount() != null) { |
| | | SalesLedger updateEntity = new SalesLedger(); |
| | | updateEntity.setId(salesLedger.getId()); |
| | | updateEntity.setNetContractAmount(dbLedger.getContractAmount()); |
| | | salesLedgerMapper.updateById(updateEntity); |
| | | } |
| | | } |
| | | |
| | | // 6. ä¿åéå®å°è´¦éä»¶ |
| | | // 5. ä¿åéå®å°è´¦éä»¶ |
| | | fileUtil.saveStorageAttachment(ApplicationTypeEnum.FILE, RecordTypeEnum.SALES_LEDGER, salesLedger.getId(), salesLedgerDto.getStorageBlobDTOs()); |
| | | |
| | | return 1; |
| | |
| | | // æ§è¡æ´æ°æä½ |
| | | if (!updateList.isEmpty()) { |
| | | for (SalesLedgerProduct product : updateList) { |
| | | AmountUtils.normalizeSalesLedgerProduct(product); |
| | | product.setType(type.getCode()); |
| | | salesLedgerProductMapper.updateById(product); |
| | | } |
| | |
| | | // æ§è¡æå
¥æä½ |
| | | if (!insertList.isEmpty()) { |
| | | for (SalesLedgerProduct salesLedgerProduct : insertList) { |
| | | AmountUtils.normalizeSalesLedgerProduct(salesLedgerProduct); |
| | | salesLedgerProduct.setType(type.getCode()); |
| | | salesLedgerProductMapper.insert(salesLedgerProduct); |
| | | // æ·»å çäº§æ°æ® |
| | |
| | | } |
| | | |
| | | @Transactional(readOnly = true) |
| | | public String generateSalesContractNo(Date entryDate) { |
| | | LocalDate currentDate = entryDate != null ? DateUtils.toLocalDate(entryDate) : LocalDate.now(); |
| | | public String generateSalesContractNo() { |
| | | LocalDate currentDate = LocalDate.now(); |
| | | String datePart = currentDate.format(DateTimeFormatter.BASIC_ISO_DATE); |
| | | String lockKey = LOCK_PREFIX + datePart; |
| | | String lockValue = Thread.currentThread().getId() + "-" + System.nanoTime(); // å¯ä¸æ è¯éææè
|
| | |
| | | } |
| | | |
| | | // 2. æ¥è¯¢å½å¤©/å
¬å¸å·²åå¨çåºåå·ï¼ä¸åé»è¾ä¸è´ï¼ |
| | | Long tenantId = SecurityUtils.getLoginUser().getTenantId(); |
| | | if (null != tenantId) { |
| | | //è·åå
¬å¸ç¼å· |
| | | SysDept sysDept = sysDeptMapper.selectDeptById(tenantId.longValue()); |
| | | if (!ObjectUtils.isEmpty(sysDept)) { |
| | | datePart = (StringUtils.isEmpty(sysDept.getDeptNick()) ? "" : sysDept.getDeptNick()) + datePart; |
| | | } |
| | | } |
| | | // Long tenantId = SecurityUtils.getLoginUser().getTenantId(); |
| | | // if (null != tenantId) { |
| | | //è·åå
¬å¸ç¼å· |
| | | // SysDept sysDept = sysDeptMapper.selectDeptById(tenantId.longValue()); |
| | | // if (!ObjectUtils.isEmpty(sysDept)) { |
| | | // datePart = (StringUtils.isEmpty(sysDept.getDeptNick()) ? "" : sysDept.getDeptNick()) + datePart; |
| | | // } |
| | | // } |
| | | datePart = "D" + datePart; |
| | | List<Integer> existingSequences = salesLedgerMapper.selectSequencesByDate(datePart); |
| | | int nextSequence = findFirstMissingSequence(existingSequences); |
| | | |
| | |
| | | |
| | | Field amountField = mainEntityClass.getDeclaredField("contractAmount"); |
| | | amountField.setAccessible(true); |
| | | amountField.set(entity, totalAmount); |
| | | |
| | | // å®é
ååéé¢åå§å¼çäºååéé¢ |
| | | try { |
| | | Field netAmountField = mainEntityClass.getDeclaredField("netContractAmount"); |
| | | netAmountField.setAccessible(true); |
| | | netAmountField.set(entity, totalAmount); |
| | | } catch (NoSuchFieldException ignored) { |
| | | // åç±»å¯è½æ²¡æè¯¥å段ï¼å¿½ç¥ |
| | | } |
| | | amountField.set(entity, AmountUtils.scaleAmount(totalAmount)); |
| | | |
| | | mainMapper.updateById(entity); |
| | | } catch (Exception e) { |
| | |
| | | return totalAmount; |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> getPrintData(Long id) { |
| | | SalesLedgerDto dto = new SalesLedgerDto(); |
| | | dto.setId(id); |
| | | SalesLedgerDto ledger = getSalesLedgerWithProducts(dto); |
| | | if (ledger == null) { |
| | | return null; |
| | | } |
| | | SysDept dept = sysDeptMapper.selectDeptById(100L); |
| | | Map<String, Object> result = new HashMap<>(); |
| | | result.put("companyName", dept != null ? dept.getDeptName() : ""); |
| | | result.put("ledger", ledger); |
| | | return result; |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.approve.bean.dto.ApprovalInstanceDto; |
| | | import com.ruoyi.approve.bean.vo.ApproveGetAndUpdateVo; |
| | | import com.ruoyi.approve.mapper.ApprovalTemplateMapper; |
| | | import com.ruoyi.approve.pojo.ApprovalInstance; |
| | | import com.ruoyi.approve.pojo.ApprovalTemplate; |
| | | import com.ruoyi.approve.pojo.ApproveProcess; |
| | | import com.ruoyi.approve.service.ApprovalInstanceService; |
| | | import com.ruoyi.approve.service.impl.ApproveProcessServiceImpl; |
| | | import com.ruoyi.approve.bean.vo.ApproveGetAndUpdateVo; |
| | | import com.ruoyi.approve.bean.vo.ApproveProcessVO; |
| | | import com.ruoyi.basic.mapper.CustomerMapper; |
| | | import com.ruoyi.basic.pojo.Customer; |
| | | import com.ruoyi.common.enums.IsDeleteEnum; |
| | | import com.ruoyi.common.utils.AmountUtils; |
| | | import com.ruoyi.common.utils.OrderUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.bean.BeanUtils; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.*; |
| | | import java.time.LocalDate; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Service |
| | |
| | | |
| | | private final ApproveProcessServiceImpl approveProcessService; |
| | | private final CustomerMapper customerMapper; |
| | | private final ApprovalTemplateMapper approvalTemplateMapper; |
| | | private final ApprovalInstanceService approvalInstanceService; |
| | | |
| | | @Override |
| | | public IPage<SalesQuotationDto> listPage(Page page, SalesQuotationDto salesQuotationDto) { |
| | |
| | | if(CollectionUtils.isEmpty(salesQuotationDtoIPage.getRecords())){ |
| | | return salesQuotationDtoIPage; |
| | | } |
| | | |
| | | // æ¹éæ¥è¯¢äº§åï¼é¿å
N+1 é®é¢ |
| | | List<Long> quotationIds = salesQuotationDtoIPage.getRecords().stream() |
| | | .map(SalesQuotationDto::getId) |
| | | .filter(Objects::nonNull) |
| | | .collect(Collectors.toList()); |
| | | |
| | | if (!quotationIds.isEmpty()) { |
| | | List<SalesQuotationProduct> allProducts = salesQuotationProductMapper.selectList( |
| | | new LambdaQueryWrapper<SalesQuotationProduct>() |
| | | .in(SalesQuotationProduct::getSalesQuotationId, quotationIds) |
| | | ); |
| | | |
| | | Map<Long, List<SalesQuotationProduct>> productMap = allProducts.stream() |
| | | .collect(Collectors.groupingBy(SalesQuotationProduct::getSalesQuotationId)); |
| | | |
| | | salesQuotationDtoIPage.getRecords().forEach(record -> |
| | | record.setProducts(productMap.getOrDefault(record.getId(), new ArrayList<>())) |
| | | ); |
| | | } |
| | | salesQuotationDtoIPage.getRecords().forEach(record -> { |
| | | record.setTotalAmount(AmountUtils.scaleAmount(record.getTotalAmount())); |
| | | List<SalesQuotationProduct> products = salesQuotationProductMapper.selectBySalesQuotationId(record.getId()); |
| | | if (!CollectionUtils.isEmpty(products)) { |
| | | products.forEach(product -> { |
| | | product.setUnitPrice(AmountUtils.scaleAmount(product.getUnitPrice())); |
| | | product.setAmount(AmountUtils.scaleAmount(product.getAmount())); |
| | | }); |
| | | } |
| | | record.setProducts(products); |
| | | }); |
| | | return salesQuotationDtoIPage; |
| | | } |
| | | |
| | | private void normalizeAmounts(SalesQuotationDto salesQuotationDto) { |
| | | salesQuotationDto.setTotalAmount(AmountUtils.scaleAmount(salesQuotationDto.getTotalAmount())); |
| | | if (CollectionUtils.isEmpty(salesQuotationDto.getProducts())) { |
| | | return; |
| | | } |
| | | salesQuotationDto.getProducts().forEach(product -> { |
| | | product.setUnitPrice(AmountUtils.scaleAmount(product.getUnitPrice())); |
| | | product.setAmount(AmountUtils.scaleAmount(product.getAmount())); |
| | | }); |
| | | } |
| | | |
| | | @Override |
| | | public boolean add(SalesQuotationDto salesQuotationDto) { |
| | | normalizeAmounts(salesQuotationDto); |
| | | LoginUser loginUser = SecurityUtils.getLoginUser(); |
| | | SalesQuotation salesQuotation = new SalesQuotation(); |
| | | BeanUtils.copyProperties(salesQuotationDto, salesQuotation); |
| | |
| | | if (ObjectUtils.isNotEmpty(customer)) { |
| | | salesQuotation.setCustomer(customer.getCustomerName()); |
| | | } |
| | | String quotationNo = OrderUtils.countTodayByCreateTime(salesQuotationMapper, "QT","quotation_no", salesQuotationDto.getCreateTime() != null ? salesQuotationDto.getCreateTime() : LocalDateTime.now()); |
| | | String quotationNo = OrderUtils.countTodayByCreateTime(salesQuotationMapper, "QT","quotation_no"); |
| | | salesQuotation.setQuotationNo(quotationNo); |
| | | salesQuotation.setStatus("å¾
审æ¹"); |
| | | salesQuotationMapper.insert(salesQuotation); |
| | |
| | | }).collect(Collectors.toList()); |
| | | salesQuotationProductService.saveBatch(products); |
| | | // æ¥ä»·å®¡æ¹ |
| | | ApprovalTemplate approvalTemplate = approvalTemplateMapper.selectOne( |
| | | new LambdaQueryWrapper<ApprovalTemplate>() |
| | | .eq(ApprovalTemplate::getBusinessType, 6L) |
| | | .eq(ApprovalTemplate::getDeleted, 0) |
| | | .orderByDesc(ApprovalTemplate::getId) |
| | | .last("LIMIT 1") |
| | | ); |
| | | if (approvalTemplate == null) { |
| | | throw new RuntimeException("请å
é
ç½®æ¥ä»·å®¡æ¹æ¨¡æ¿"); |
| | | } |
| | | ApprovalInstanceDto approvalInstance = new ApprovalInstanceDto(); |
| | | approvalInstance.setTemplateId(approvalTemplate.getId()); |
| | | approvalInstance.setTemplateName(approvalTemplate.getTemplateName()); |
| | | approvalInstance.setBusinessId(salesQuotation.getId()); |
| | | approvalInstance.setBusinessType(6L); |
| | | approvalInstance.setCurrentLevel(1); |
| | | approvalInstance.setTitle(quotationNo+"审æ¹"); |
| | | approvalInstance.setApplicantId(loginUser.getUserId()); |
| | | approvalInstance.setApplicantName(loginUser.getNickName()); |
| | | approvalInstance.setApplyTime(LocalDateTime.now()); |
| | | ApproveProcessVO approveProcessVO = new ApproveProcessVO(); |
| | | approveProcessVO.setApproveType(6); |
| | | approveProcessVO.setApproveDeptId(loginUser.getCurrentDeptId()); |
| | | approveProcessVO.setApproveReason(quotationNo); |
| | | approveProcessVO.setApproveUserIds(salesQuotationDto.getApproveUserIds()); |
| | | approveProcessVO.setApproveUser(loginUser.getUserId()); |
| | | approveProcessVO.setApproveTime(LocalDate.now().toString()); |
| | | approveProcessVO.setPrice(salesQuotationDto.getTotalAmount()); |
| | | try { |
| | | approvalInstanceService.add(approvalInstance); |
| | | } catch (Exception e) { |
| | | log.error("SalesQuotationServiceImpl approve error for quotationNo: {}", e); |
| | | throw new RuntimeException("审æ¹å¤±è´¥: " + e.getMessage(), e); |
| | | approveProcessService.addApprove(approveProcessVO); |
| | | }catch (Exception e){ |
| | | log.error("SalesQuotationServiceImpl error:{}", e); |
| | | throw new RuntimeException("审æ¹å¤±è´¥"); |
| | | } |
| | | return true; |
| | | } |
| | | @Override |
| | | public boolean edit(SalesQuotationDto salesQuotationDto) { |
| | | normalizeAmounts(salesQuotationDto); |
| | | SalesQuotation salesQuotation = new SalesQuotation(); |
| | | BeanUtils.copyProperties(salesQuotationDto, salesQuotation); |
| | | ApproveGetAndUpdateVo vo = new ApproveGetAndUpdateVo(); |
| | |
| | | |
| | | salesQuotationProductService.saveBatch(products); |
| | | // ä¿®æ¹æ¥ä»·å®¡æ¹ |
| | | // å
ç»æä¹åæªç»æçæ¥ä»·å®¡æ¹ |
| | | approvalInstanceService.lambdaUpdate().set(ApprovalInstance::getStatus,"REJECTED").eq(ApprovalInstance::getBusinessId,salesQuotation.getId()).eq(ApprovalInstance::getBusinessType,6L).update(); |
| | | |
| | | ApprovalTemplate approvalTemplate = approvalTemplateMapper.selectOne( |
| | | new LambdaQueryWrapper<ApprovalTemplate>() |
| | | .eq(ApprovalTemplate::getBusinessType, 6L) |
| | | .eq(ApprovalTemplate::getDeleted, 0) |
| | | .orderByDesc(ApprovalTemplate::getId) |
| | | .last("LIMIT 1") |
| | | ); |
| | | if (approvalTemplate == null) { |
| | | throw new RuntimeException("请å
é
ç½®æ¥ä»·å®¡æ¹æ¨¡æ¿"); |
| | | } |
| | | ApprovalInstanceDto approvalInstance = new ApprovalInstanceDto(); |
| | | approvalInstance.setTemplateId(approvalTemplate.getId()); |
| | | approvalInstance.setTemplateName(approvalTemplate.getTemplateName()); |
| | | approvalInstance.setBusinessId(salesQuotation.getId()); |
| | | approvalInstance.setBusinessType(6L); |
| | | approvalInstance.setCurrentLevel(1); |
| | | approvalInstance.setTitle(salesQuotation.getQuotationNo()+"审æ¹"); |
| | | approvalInstance.setApplicantId(SecurityUtils.getUserId()); |
| | | approvalInstance.setApplicantName(SecurityUtils.getLoginUser().getNickName()); |
| | | approvalInstance.setApplyTime(LocalDateTime.now()); |
| | | try { |
| | | approvalInstanceService.add(approvalInstance); |
| | | } catch (Exception e) { |
| | | log.error("SalesQuotationServiceImpl approve error for quotationNo: {}", e); |
| | | throw new RuntimeException("审æ¹å¤±è´¥: " + e.getMessage(), e); |
| | | } |
| | | vo.setApproveUserIds(salesQuotationDto.getApproveUserIds()); |
| | | vo.setApproveType(6); |
| | | vo.setApproveReason(salesQuotationDto.getQuotationNo()); |
| | | approveProcessService.updateApproveUser(vo); |
| | | return true; |
| | | } |
| | | @Override |
| | |
| | | if(salesQuotation==null) return false; |
| | | salesQuotationMapper.deleteById(id); |
| | | salesQuotationProductMapper.delete(new LambdaQueryWrapper<SalesQuotationProduct>().eq(SalesQuotationProduct::getSalesQuotationId, id)); |
| | | // å é¤è¯¥æ¥ä»·å¯¹åºçå
¨é¨å®¡æ¹å®ä¾ï¼å¯è½åå¨å¤æ¬¡æäº¤/éå®¡ï¼ |
| | | List<ApprovalInstance> approvalInstances = approvalInstanceService.list(new LambdaQueryWrapper<ApprovalInstance>() |
| | | .eq(ApprovalInstance::getBusinessId, id) |
| | | .eq(ApprovalInstance::getBusinessType, 6L) |
| | | .eq(ApprovalInstance::getDeleted, 0)); |
| | | if(!approvalInstances.isEmpty()){ |
| | | approvalInstanceService.delete( |
| | | approvalInstances.stream() |
| | | .map(ApprovalInstance::getId) |
| | | .filter(Objects::nonNull) |
| | | .collect(Collectors.toList()) |
| | | ); |
| | | } |
| | | // å é¤è¯¥æ¥ä»·å¯¹åºçå
¨é¨å®¡æ¹æµç¨ï¼å䏿¥ä»·å¯è½åå¤åèµ·ï¼ |
| | | List<ApproveProcess> approveProcesses = approveProcessService.list(new LambdaQueryWrapper<ApproveProcess>() |
| | | // å 餿¥ä»·å®¡æ¹ |
| | | ApproveProcess one = approveProcessService.getOne(new LambdaQueryWrapper<ApproveProcess>() |
| | | .eq(ApproveProcess::getApproveType, 6) |
| | | .eq(ApproveProcess::getApproveDelete, IsDeleteEnum.NOT_DELETED) |
| | | .eq(ApproveProcess::getApproveReason, salesQuotation.getQuotationNo())); |
| | | if(!approveProcesses.isEmpty()){ |
| | | approveProcessService.delByIds( |
| | | approveProcesses.stream() |
| | | .map(ApproveProcess::getId) |
| | | .filter(Objects::nonNull) |
| | | .collect(Collectors.toList()) |
| | | ); |
| | | if(one != null){ |
| | | approveProcessService.delByIds(Collections.singletonList(one.getId())); |
| | | } |
| | | return true; |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | 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.approve.bean.dto.ApprovalInstanceDto; |
| | | import com.ruoyi.approve.mapper.ApprovalTemplateMapper; |
| | | import com.ruoyi.approve.pojo.ApprovalTemplate; |
| | | import com.ruoyi.approve.pojo.ApproveProcess; |
| | | import com.ruoyi.approve.service.ApprovalInstanceService; |
| | | import com.ruoyi.approve.service.impl.ApproveProcessServiceImpl; |
| | | import com.ruoyi.basic.enums.ApplicationTypeEnum; |
| | | import com.ruoyi.basic.enums.RecordTypeEnum; |
| | | import com.ruoyi.basic.utils.FileUtil; |
| | | import com.ruoyi.common.enums.FileNameType; |
| | | import com.ruoyi.common.enums.StockInQualifiedRecordTypeEnum; |
| | | import com.ruoyi.common.enums.StockOutQualifiedRecordTypeEnum; |
| | | import com.ruoyi.common.utils.OrderUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.framework.security.LoginUser; |
| | | import com.ruoyi.procurementrecord.bean.vo.ShippingProductVo; |
| | | import com.ruoyi.procurementrecord.utils.StockUtils; |
| | | import com.ruoyi.sales.dto.ShippingApproveDto; |
| | |
| | | import com.ruoyi.sales.pojo.ShippingInfo; |
| | | import com.ruoyi.sales.pojo.ShippingProductDetail; |
| | | import com.ruoyi.sales.service.ShippingInfoService; |
| | | import com.ruoyi.stock.pojo.StockInRecord; |
| | | import com.ruoyi.stock.pojo.StockOutRecord; |
| | | import com.ruoyi.stock.service.StockOutRecordService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | private final ApproveProcessServiceImpl approveProcessService; |
| | | private final FileUtil fileUtil; |
| | | private final ShippingProductDetailMapper shippingProductDetailMapper; |
| | | private final ApprovalTemplateMapper approvalTemplateMapper; |
| | | private final ApprovalInstanceService approvalInstanceService; |
| | | private final StockOutRecordService stockOutRecordService; |
| | | |
| | | @Override |
| | | public IPage<ShippingInfoDto> listPage(Page page, ShippingInfo req) { |
| | |
| | | shippingProductDetailMapper.insert(req.getBatchNoDetailList()); |
| | | for (ShippingProductDetail shippingProductDetail : req.getBatchNoDetailList()) { |
| | | stockUtils.substractStock(shippingProductDetail.getProductModelId(), shippingProductDetail.getQuantity(), StockOutQualifiedRecordTypeEnum.SALE_SHIP_STOCK_OUT.getCode(), req.getId(), shippingProductDetail.getBatchNo()); |
| | | //StockOutRecord stockOutRecord = stockOutRecordService.getOne(Wrappers.<StockOutRecord>lambdaQuery() |
| | | // .eq(StockOutRecord::getRecordId, req.getId()) |
| | | // .eq(StockOutRecord::getRecordType, StockOutQualifiedRecordTypeEnum.SALE_SHIP_STOCK_OUT.getCode()) |
| | | //); |
| | | //stockOutRecordService.batchApprove(Collections.singletonList(stockOutRecord.getId()),1); |
| | | } |
| | | // ä¿åæä»¶ |
| | | fileUtil.saveStorageAttachment(ApplicationTypeEnum.IMAGE, RecordTypeEnum.SHIPPING_INFO, req.getId(), req.getStorageBlobDTOs()); |
| | |
| | | List<ShippingProductDetailDto> dateilByShippingNo = shippingProductDetailMapper.getDateilByShippingNo(shippingNo); |
| | | shippingApproveDto.setShippingProductDetailDtoList(dateilByShippingNo); |
| | | return shippingApproveDto; |
| | | } |
| | | |
| | | @Override |
| | | public boolean addReq(ShippingInfoDto req) { |
| | | |
| | | // æ ¡éªè¯¥äº§åæ¯å¦å·²æå¾
å®¡æ ¸/å®¡æ ¸ä¸çåè´§è®°å½ï¼é²æ¢éå¤æäº¤ |
| | | Long salesLedgerProductId = req.getSalesLedgerProductId(); |
| | | if (salesLedgerProductId != null) { |
| | | long pendingCount = this.count(new LambdaQueryWrapper<ShippingInfo>() |
| | | .eq(ShippingInfo::getSalesLedgerProductId, salesLedgerProductId) |
| | | .in(ShippingInfo::getStatus, "å¾
å®¡æ ¸", "å®¡æ ¸ä¸")); |
| | | if (pendingCount > 0) { |
| | | throw new RuntimeException("该产åå·²æå¾
å®¡æ ¸çåè´§è®°å½ï¼è¯·å¿éå¤æäº¤"); |
| | | } |
| | | } |
| | | |
| | | LoginUser loginUser = SecurityUtils.getLoginUser(); |
| | | String sh = OrderUtils.countTodayByCreateTime(shippingInfoMapper, "SH","shipping_no",req.getCreateTime()); |
| | | // å
ä¿ååè´§åï¼åå起审æ¹ï¼æ å®¡æ ¸äººèªå¨éè¿æ¶éè¦æåè´§ç¼å·åååè´§ç¶æã |
| | | req.setShippingNo(sh); |
| | | req.setStatus("å¾
å®¡æ ¸"); |
| | | boolean save = this.add(req); |
| | | // åè´§å®¡æ¹ |
| | | ApprovalTemplate approvalTemplate = approvalTemplateMapper.selectOne( |
| | | new LambdaQueryWrapper<ApprovalTemplate>() |
| | | .eq(ApprovalTemplate::getBusinessType, 7L) |
| | | .eq(ApprovalTemplate::getDeleted, 0) |
| | | .orderByDesc(ApprovalTemplate::getId) |
| | | .last("LIMIT 1") |
| | | ); |
| | | if (approvalTemplate == null) { |
| | | throw new RuntimeException("请å
é
ç½®åè´§å®¡æ¹æ¨¡æ¿"); |
| | | } |
| | | ApprovalInstanceDto approvalInstance = new ApprovalInstanceDto(); |
| | | approvalInstance.setTemplateId(approvalTemplate.getId()); |
| | | approvalInstance.setTemplateName(approvalTemplate.getTemplateName()); |
| | | approvalInstance.setBusinessId(req.getId()); |
| | | approvalInstance.setBusinessType(7L); |
| | | approvalInstance.setCurrentLevel(1); |
| | | approvalInstance.setTitle(sh); |
| | | approvalInstance.setApplicantId(loginUser.getUserId()); |
| | | approvalInstance.setApplicantName(loginUser.getNickName()); |
| | | approvalInstance.setApplyTime(LocalDateTime.now()); |
| | | approvalInstanceService.add(approvalInstance); |
| | | // å建审æ¹å®ä¾åï¼æ´æ°åè´§ç¶æä¸º"å®¡æ ¸ä¸"ï¼ä½¿å端æ£ç¡®æ¾ç¤ºå®¡æ¹ç¶æ |
| | | req.setStatus("å®¡æ ¸ä¸"); |
| | | this.updateById(req); |
| | | return true; |
| | | } |
| | | } |
| | |
| | | @Schema(description = "ååéé¢") |
| | | private BigDecimal contractAmount; |
| | | |
| | | @Schema(description = "æ¶æ¬¾éé¢") |
| | | private BigDecimal receiptPaymentAmount; |
| | | @Schema(description = "å·²åºåºéé¢") |
| | | private BigDecimal shippedAmount; |
| | | |
| | | @Schema(description = "åºæ¶éé¢") |
| | | private BigDecimal receiptableAmount; |
| | | |
| | | @Schema(description = "éè´§éé¢") |
| | | private BigDecimal returnAmount; |
| | | @Schema(description = "æªåºåºéé¢") |
| | | private BigDecimal unshippedAmount; |
| | | |
| | | } |
| | |
| | | private String customerName; |
| | | |
| | | @Schema(description = "ååæ»éé¢") |
| | | //该客æ·éå®åå累计éé¢ |
| | | private BigDecimal contractAmounts; |
| | | |
| | | @Schema(description = "æ¶æ¬¾éé¢") |
| | | //该客æ·é宿¶æ¬¾ç´¯è®¡éé¢ |
| | | private BigDecimal receiptPaymentAmount; |
| | | @Schema(description = "å·²åºåºéé¢") |
| | | private BigDecimal shippedAmount; |
| | | |
| | | @Schema(description = "åºæ¶éé¢") |
| | | //该客æ·éå®åºæ¶ç´¯è®¡éé¢=åå§éé¢-忬¾-鿬¾ |
| | | private BigDecimal receiptableAmount; |
| | | |
| | | @Schema(description = "éè´§éé¢") |
| | | private BigDecimal returnAmount; |
| | | @Schema(description = "æªåºåºéé¢") |
| | | private BigDecimal unshippedAmount; |
| | | |
| | | } |
| | |
| | | package com.ruoyi.staff.controller; |
| | | |
| | | 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.domain.AjaxResult; |
| | | import com.ruoyi.staff.pojo.HolidayApplication; |
| | | import com.ruoyi.staff.service.HolidayApplicationService; |
| | |
| | | /** |
| | | * æ°å¢è¯·åç³è¯· |
| | | */ |
| | | @Log(title = "æ°å¢è¯·åç³è¯·", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody HolidayApplication holidayApplication){ |
| | | return AjaxResult.success(holidayApplicationService.save(holidayApplication)); |
| | |
| | | /** |
| | | * ä¿®æ¹è¯·åç³è¯· |
| | | */ |
| | | @Log(title = "ä¿®æ¹è¯·åç³è¯·", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/update") |
| | | public AjaxResult update(@RequestBody HolidayApplication holidayApplication){ |
| | | return AjaxResult.success(holidayApplicationService.updateById(holidayApplication)); |
| | |
| | | /** |
| | | * å é¤è¯·åç³è¯· |
| | | */ |
| | | @Log(title = "å é¤è¯·åç³è¯·", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/delete/{id}") |
| | | public AjaxResult delete(@PathVariable("id") Long id){ |
| | | return AjaxResult.success(holidayApplicationService.removeById(id)); |
| | |
| | | package com.ruoyi.staff.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.OrderItem; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | 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.domain.R; |
| | | import com.ruoyi.staff.pojo.PersonalAttendanceLocationConfig; |
| | | import com.ruoyi.staff.service.PersonalAttendanceLocationConfigService; |
| | |
| | | private final PersonalAttendanceLocationConfigService personalAttendanceLocationConfigService; |
| | | |
| | | @Operation(summary = "æ°å¢/ä¿®æ¹äººåæå¡è§åé
ç½®") |
| | | @Log(title = "æ°å¢/ä¿®æ¹äººåæå¡è§åé
ç½®", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public R add(@RequestBody PersonalAttendanceLocationConfig personalAttendanceLocationConfig){ |
| | | if (personalAttendanceLocationConfig.getId() != null |
| | | && !personalAttendanceLocationConfigService.canEdit(personalAttendanceLocationConfig.getId())) { |
| | | return R.fail("è¯¥çæ¬¡é
置已被æç并产çæå¡è®°å½ï¼ä¸è½ç¼è¾"); |
| | | } |
| | | |
| | | |
| | | // çæ¬¡éè¦ä¸è½å¤éå¤ |
| | | if (personalAttendanceLocationConfig.getId() == null && personalAttendanceLocationConfigService.lambdaQuery().eq(PersonalAttendanceLocationConfig::getShift, personalAttendanceLocationConfig.getShift()).one() != null) { |
| | | return R.fail("çæ¬¡ä¸è½éå¤"); |
| | |
| | | |
| | | @Operation(summary = "å页æ¥è¯¢äººåæå¡è§åé
ç½®") |
| | | @GetMapping("/listPage") |
| | | public R listPage(Page page, PersonalAttendanceLocationConfig query){ |
| | | page.addOrder(OrderItem.desc("id")); |
| | | LambdaQueryWrapper<PersonalAttendanceLocationConfig> wrapper = new LambdaQueryWrapper<PersonalAttendanceLocationConfig>() |
| | | .ne(PersonalAttendanceLocationConfig::getId, 999); |
| | | if (query.getSysDeptId() != null) { |
| | | wrapper.eq(PersonalAttendanceLocationConfig::getSysDeptId, query.getSysDeptId()); |
| | | } |
| | | if (query.getShift() != null && !query.getShift().isEmpty()) { |
| | | wrapper.eq(PersonalAttendanceLocationConfig::getShift, query.getShift()); |
| | | } |
| | | IPage<PersonalAttendanceLocationConfig> result = personalAttendanceLocationConfigService.page(page, wrapper); |
| | | result.getRecords().forEach(item -> { |
| | | boolean locked = personalAttendanceLocationConfigService.hasAttendanceUsage(item.getId()); |
| | | item.setUsageLocked(locked); |
| | | item.setCanEdit(!locked); |
| | | item.setCanDelete(!locked); |
| | | }); |
| | | return R.ok(result); |
| | | public R listPage(Page page){ |
| | | return R.ok(personalAttendanceLocationConfigService.page(page)); |
| | | } |
| | | |
| | | |
| | | @Operation(summary = "å é¤äººåæå¡è§åé
ç½®") |
| | | @Log(title = "å é¤äººåæå¡è§åé
ç½®", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/del") |
| | | public R del(@RequestBody List<Integer> ids) { |
| | | for (Integer id : ids) { |
| | | if (!personalAttendanceLocationConfigService.canDelete(id)) { |
| | | return R.fail("åå¨å·²æçä¸å·²ææå¡è®°å½ççæ¬¡é
ç½®ï¼ä¸è½å é¤"); |
| | | } |
| | | } |
| | | return R.ok(personalAttendanceLocationConfigService.removeBatchByIds(ids)); |
| | | } |
| | | |
| | |
| | | package com.ruoyi.staff.controller; |
| | | |
| | | 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.domain.AjaxResult; |
| | | import com.ruoyi.staff.dto.PersonalAttendanceRecordsDto; |
| | | import com.ruoyi.staff.pojo.PersonalAttendanceRecords; |
| | |
| | | @Resource |
| | | private PersonalAttendanceRecordsService personalAttendanceRecordsService; |
| | | |
| | | @Log(title = "个人èå¤è®°å½", businessType = BusinessType.INSERT) |
| | | @Operation(summary = "æ°å¢æå¡ç¾å°") |
| | | @PostMapping("") |
| | | public AjaxResult add(@RequestBody PersonalAttendanceRecordsDto personalAttendanceRecordsDto){ |
| | |
| | | return AjaxResult.success(personalAttendanceRecordsService.todayInfo(personalAttendanceRecordsDto)); |
| | | } |
| | | |
| | | @Log(title = "个人èå¤è®°å½", businessType = BusinessType.EXPORT) |
| | | @Operation(summary = "å¯¼åºæå¡ç¾å°") |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, PersonalAttendanceRecordsDto personalAttendanceRecordsDto) { |
| | |
| | | import com.alibaba.excel.write.style.HorizontalCellStyleStrategy; |
| | | import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; |
| | | 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.domain.R; |
| | | import com.ruoyi.staff.dto.PerformanceShiftAddDto; |
| | | import com.ruoyi.staff.pojo.PersonalAttendanceLocationConfig; |
| | |
| | | private PersonalShiftService personalShiftService; |
| | | |
| | | @Operation(summary = "人åæç") |
| | | @Log(title = "æ°å¢äººåæç", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public R add(@RequestBody PerformanceShiftAddDto performanceShiftAddDto){ |
| | | return R.ok(personalShiftService.performanceShiftAdd(performanceShiftAddDto)); |
| | |
| | | } |
| | | |
| | | @Operation(summary = "çæ¬¡ç¶æä¿®æ¹") |
| | | @PostMapping("/update") |
| | | @Log(title = "ä¿®æ¹çæ¬¡ç¶æ", businessType = BusinessType.UPDATE) |
| | | @PostMapping("update") |
| | | public R performanceShiftUpdate(@RequestBody PersonalShift personalShift) { |
| | | personalShiftService.performanceShiftUpdate(personalShift); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Operation(summary = "导åº") |
| | | @Log(title = "导åºäººåæç", businessType = BusinessType.EXPORT) |
| | | @GetMapping("export") |
| | | public void exportToExcel(@NotNull(message = "æ¶é´ä¸è½ä¸ºç©ºï¼") String time, String userName, Integer sysDeptId, Boolean isMonth, HttpServletResponse response) throws Exception { |
| | | ServletOutputStream out = response.getOutputStream(); |
| | |
| | | package com.ruoyi.staff.controller; |
| | | |
| | | 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.domain.AjaxResult; |
| | | import com.ruoyi.staff.dto.StaffLeaveDto; |
| | | import com.ruoyi.staff.service.StaffLeaveService; |
| | |
| | | * @param staffLeaveDto |
| | | * @return |
| | | */ |
| | | @Log(title = "æ°å¢ç¦»èè®°å½", businessType = BusinessType.INSERT) |
| | | @PostMapping("") |
| | | public AjaxResult add(@RequestBody StaffLeaveDto staffLeaveDto) { |
| | | return AjaxResult.success(staffLeaveService.add(staffLeaveDto)); |
| | |
| | | * @param staffLeaveDto |
| | | * @return |
| | | */ |
| | | @Log(title = "ä¿®æ¹ç¦»èè®°å½", businessType = BusinessType.UPDATE) |
| | | @PutMapping("/{id}") |
| | | public AjaxResult update(@PathVariable("id") Long id, @RequestBody StaffLeaveDto staffLeaveDto) { |
| | | return AjaxResult.success(staffLeaveService.update(id, staffLeaveDto)); |
| | |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @Log(title = "å é¤ç¦»èè®°å½", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/del") |
| | | public AjaxResult del(@RequestBody List<Integer> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | |
| | | * 离èå¯¼åº |
| | | * @param staffLeaveDto |
| | | */ |
| | | @Log(title = "导åºç¦»èè®°å½", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, StaffLeaveDto staffLeaveDto) { |
| | | staffLeaveService.export(response, staffLeaveDto); |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/listPage") |
| | | public AjaxResult staffOnJobListPage(Page page, StaffOnJobDto staffOnJob) { |
| | | public AjaxResult staffOnJobListPage(Page page, StaffOnJob staffOnJob) { |
| | | return AjaxResult.success(staffOnJobService.staffOnJobListPage(page, staffOnJob)); |
| | | } |
| | | |
| | |
| | | * @param staffOnJob |
| | | * @return |
| | | */ |
| | | @Log(title = "å¨èåå·¥", businessType = BusinessType.INSERT) |
| | | @PostMapping("") |
| | | public AjaxResult add(@RequestBody StaffOnJobDto staffOnJob) { |
| | | return AjaxResult.success(staffOnJobService.add(staffOnJob)); |
| | |
| | | * @param staffOnJobDto |
| | | * @return |
| | | */ |
| | | @Log(title = "å¨èåå·¥", businessType = BusinessType.UPDATE) |
| | | @PutMapping("/{id}") |
| | | public AjaxResult update(@PathVariable("id") Long id, @RequestBody StaffOnJobDto staffOnJobDto) { |
| | | return AjaxResult.success(staffOnJobService.update(id, staffOnJobDto)); |
| | |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @Log(title = "å¨èåå·¥", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/del") |
| | | public AjaxResult delStaffOnJobs(@RequestBody List<Integer> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | |
| | | * @param staffContract |
| | | * @return |
| | | */ |
| | | @Log(title = "å¨èåå·¥", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/renewContract/{id}") |
| | | public AjaxResult renewContract(@PathVariable Long id, @RequestBody StaffContract staffContract) { |
| | | return AjaxResult.success(staffOnJobService.renewContract(id, staffContract)); |
| | | } |
| | | |
| | | @Operation(summary = "ä¸è½½æ¨¡æ¿") |
| | | @Log(title = "å¨èåå·¥", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/downloadTemplate") |
| | | public void downloadTemplate(HttpServletResponse response) { |
| | | ExcelUtil<StaffOnJobExcelDto> util = new ExcelUtil<>(StaffOnJobExcelDto.class); |
| | |
| | | * @param response |
| | | * @param staffOnJob |
| | | */ |
| | | @Log(title = "å¨èåå·¥", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void staffOnJobExport(HttpServletResponse response,StaffOnJob staffOnJob) { |
| | | staffOnJobService.staffOnJobExport(response, staffOnJob); |
| | |
| | | * @param response |
| | | * @param staffOnJob |
| | | */ |
| | | @Log(title = "å¨èåå·¥", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/exportCopy") |
| | | @Operation(summary = "word模æ¿ååå¨èå工导åº") |
| | | public AjaxResult exportCopy(HttpServletResponse response,@RequestBody StaffOnJob staffOnJob) throws Exception{ |
| | |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.staff.dto.CalculateSalaryDto; |
| | | import com.ruoyi.staff.dto.StaffSalaryCalculateDto; |
| | | import com.ruoyi.staff.pojo.StaffSalaryMain; |
| | | import com.ruoyi.staff.service.StaffSalaryMainService; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | return staffSalaryMainService.calculateSalary(calculateSalaryDto); |
| | | } |
| | | |
| | | @Operation(summary = "æåå·¥éç®å·¥èµæç»") |
| | | @PostMapping("/calculateByEmployeeId") |
| | | public AjaxResult calculateByEmployeeId(@RequestBody StaffSalaryCalculateDto staffSalaryCalculateDto) { |
| | | return staffSalaryMainService.calculateSalaryByEmployee(staffSalaryCalculateDto); |
| | | } |
| | | |
| | | @PostMapping("/add") |
| | | @Operation(summary = "æ°å»ºå·¥èµè¡¨") |
| | | @Log(title = "æ°å»ºå·¥èµè¡¨", businessType = BusinessType.INSERT) |
| | |
| | | return staffSalaryMainService.delete(ids); |
| | | } |
| | | |
| | | @PostMapping("/export") |
| | | @Operation(summary = "导åºåå·¥èªèµæç»") |
| | | public void export(HttpServletResponse response, String salaryMonth) { |
| | | staffSalaryMainService.exportSalaryDetail(response, salaryMonth); |
| | | } |
| | | |
| | | @GetMapping("/availableDepts") |
| | | @Operation(summary = "è·åå¯éé¨é¨ï¼æé¤å·²åæ¾å·¥èµè¡¨çé¨é¨ï¼") |
| | | public AjaxResult getAvailableDepts(String salaryMonth) { |
| | | return staffSalaryMainService.getAvailableDepts(salaryMonth); |
| | | } |
| | | |
| | | } |
| | |
| | | return AjaxResult.success(staffSchedulingService.listPage(vo)); |
| | | } |
| | | |
| | | @Log(title = "åå·¥æç", businessType = BusinessType.INSERT) |
| | | @PostMapping("/save") |
| | | public AjaxResult save(@RequestBody @Validated SaveStaffSchedulingDto saveStaffSchedulingDto){ |
| | | staffSchedulingService.saveStaffScheduling(saveStaffSchedulingDto); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @Log(title = "åå·¥æç", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/delByIds") |
| | | public AjaxResult delByIds(@RequestBody List<Integer> ids){ |
| | | staffSchedulingService.removeByIds(ids); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @Log(title = "åå·¥æç", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/del/{id}") |
| | | public AjaxResult del(@PathVariable("id") Integer id){ |
| | | staffSchedulingService.removeById(id); |
| | |
| | | /** |
| | | * å®¶åºä½å |
| | | */ |
| | | @Excel(name = "å®¶åºä½å", sort = 6) |
| | | private String adress; |
| | | |
| | | /** |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private Date contractEndTime; |
| | | |
| | | private Long sysDeptId; |
| | | } |
| | |
| | | List<Map<String, Object>> performanceShiftYearList(@Param("time") String time, @Param("userName") String userName, @Param("sysDeptId") Integer sysDeptId); |
| | | |
| | | List<PerformanceShiftMapDto> performanceShiftList(@Param("time") String time, @Param("userName") String userName, @Param("sysDeptId") Integer sysDeptId); |
| | | |
| | | boolean existsAttendanceUsedByConfig(@Param("configId") Integer configId); |
| | | } |
| | |
| | | List<SchemeApplicableStaff> selectSchemeByStaffId(@Param("staffId") Long staffId); |
| | | |
| | | /** |
| | | * æ ¹æ®é¨é¨IDæ¥è¯¢ææ°ç¤¾ä¿æ¹æ¡ |
| | | * @param deptId é¨é¨ID |
| | | * @return ææ°ç¤¾ä¿æ¹æ¡ |
| | | */ |
| | | SchemeApplicableStaff selectLatestSchemeByDeptId(@Param("deptId") Long deptId); |
| | | |
| | | /** |
| | | * æ ¹æ®ç¤¾ä¿æ¹æ¡IDæ¥è¯¢å¯¹åºçæç»å表 |
| | | * @param schemeId ç¤¾ä¿æ¹æ¡ID |
| | | * @return æ¹æ¡æç»å表 |
| | |
| | | @Mapper |
| | | public interface StaffOnJobMapper extends BaseMapper<StaffOnJob> { |
| | | |
| | | IPage<StaffOnJobDto> staffOnJobListPage(Page page, @Param("staffOnJob") StaffOnJobDto staffOnJob); |
| | | IPage<StaffOnJobDto> staffOnJobListPage(Page page, @Param("staffOnJob") StaffOnJob staffOnJob); |
| | | |
| | | List<StaffOnJobDto> staffOnJobList(@Param("staffOnJob") StaffOnJob staffOnJob); |
| | | |
| | |
| | | * @return åå·¥æ°æ® |
| | | */ |
| | | StaffOnJob selectStaffByNickName(String staffName); |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * å工工èµä¸»è¡¨ Mapper æ¥å£ |
| | |
| | | */ |
| | | @Mapper |
| | | public interface StaffSalaryMainMapper extends BaseMapper<StaffSalaryMain> { |
| | | |
| | | List<String> selectIssuedDeptIds(String salaryMonth); |
| | | |
| | | } |
| | |
| | | |
| | | @Schema(description = "çæ¬¡") |
| | | private String shift; |
| | | |
| | | /** |
| | | * æ¯å¦å·²è¢«æçä¸å·²ææå¡è®°å½ä½¿ç¨ |
| | | */ |
| | | @Schema(description = "æ¯å¦å·²è¢«æçä¸å·²ææå¡è®°å½ä½¿ç¨") |
| | | @TableField(exist = false) |
| | | private Boolean usageLocked; |
| | | |
| | | /** |
| | | * æ¯å¦å¯ç¼è¾ |
| | | */ |
| | | @Schema(description = "æ¯å¦å¯ç¼è¾") |
| | | @TableField(exist = false) |
| | | private Boolean canEdit; |
| | | |
| | | /** |
| | | * æ¯å¦å¯å é¤ |
| | | */ |
| | | @Schema(description = "æ¯å¦å¯å é¤") |
| | | @TableField(exist = false) |
| | | private Boolean canDelete; |
| | | |
| | | @Schema(description = "åå»ºç¨æ·") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | |
| | | /** |
| | | * å®¶åºä½å |
| | | */ |
| | | @Excel(name = "å®¶åºä½å", sort = 6) |
| | | private String adress; |
| | | |
| | | /** |
| | |
| | | @Schema(description = "å
¶ä»æ¯åº") |
| | | private BigDecimal otherDeduct; |
| | | |
| | | @Schema(description = "社ä¿è¡¥ç¼´") |
| | | private BigDecimal socialSupplementAmount; |
| | | |
| | | @Schema(description = "å·¥èµä¸ªç¨") |
| | | private BigDecimal salaryTax; |
| | | |
| | |
| | | public interface IStaffOnJobService extends IService<StaffOnJob> { |
| | | |
| | | |
| | | IPage<StaffOnJobDto> staffOnJobListPage(Page page, StaffOnJobDto staffOnJob); |
| | | IPage<StaffOnJobDto> staffOnJobListPage(Page page, StaffOnJob staffOnJob); |
| | | |
| | | StaffOnJobDto staffOnJobDetail(Long id); |
| | | |
| | |
| | | */ |
| | | public interface PersonalAttendanceLocationConfigService extends IService<PersonalAttendanceLocationConfig> { |
| | | |
| | | /** |
| | | * å¤æçæ¬¡é
ç½®æ¯å¦å·²è¢«æçä¸å·²ææå¡è®°å½ä½¿ç¨ã |
| | | */ |
| | | boolean hasAttendanceUsage(Integer configId); |
| | | |
| | | /** |
| | | * å¤æçæ¬¡é
ç½®æ¯å¦å
许ç¼è¾ã |
| | | */ |
| | | boolean canEdit(Integer configId); |
| | | |
| | | /** |
| | | * å¤æçæ¬¡é
ç½®æ¯å¦å
许å é¤ã |
| | | */ |
| | | boolean canDelete(Integer configId); |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.staff.dto.CalculateSalaryDto; |
| | | import com.ruoyi.staff.dto.StaffSalaryCalculateDto; |
| | | import com.ruoyi.staff.pojo.StaffSalaryMain; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | import java.util.List; |
| | |
| | | AjaxResult delete(List<Long> ids); |
| | | |
| | | AjaxResult calculateSalary(CalculateSalaryDto calculateSalaryDto); |
| | | |
| | | AjaxResult calculateSalaryByEmployee(StaffSalaryCalculateDto staffSalaryCalculateDto); |
| | | |
| | | void exportSalaryDetail(HttpServletResponse response, String salaryMonth); |
| | | |
| | | AjaxResult getAvailableDepts(String salaryMonth); |
| | | } |
| | |
| | | package com.ruoyi.staff.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.staff.mapper.PersonalAttendanceLocationConfigMapper; |
| | | import com.ruoyi.staff.mapper.PersonalShiftMapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.staff.pojo.PersonalAttendanceLocationConfig; |
| | | import com.ruoyi.staff.mapper.PersonalAttendanceLocationConfigMapper; |
| | | import com.ruoyi.staff.service.PersonalAttendanceLocationConfigService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @since 2026-02-11 09:41:34 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class PersonalAttendanceLocationConfigServiceImpl extends ServiceImpl<PersonalAttendanceLocationConfigMapper, PersonalAttendanceLocationConfig> implements PersonalAttendanceLocationConfigService { |
| | | |
| | | private final PersonalShiftMapper personalShiftMapper; |
| | | |
| | | @Override |
| | | public boolean hasAttendanceUsage(Integer configId) { |
| | | if (configId == null) { |
| | | return false; |
| | | } |
| | | return personalShiftMapper.existsAttendanceUsedByConfig(configId); |
| | | } |
| | | |
| | | @Override |
| | | public boolean canEdit(Integer configId) { |
| | | return !hasAttendanceUsage(configId); |
| | | } |
| | | |
| | | @Override |
| | | public boolean canDelete(Integer configId) { |
| | | return !hasAttendanceUsage(configId); |
| | | } |
| | | } |
| | |
| | | List<PersonalShift> personalShifts = personalShiftMapper.selectList(Wrappers.<PersonalShift>lambdaQuery() |
| | | .eq(PersonalShift::getStaffOnJobId, staffOnJob.getId()) |
| | | .eq(PersonalShift::getWorkTime, currentDate.atStartOfDay()) |
| | | .isNotNull(PersonalShift::getPersonalAttendanceLocationConfigId) |
| | | .ne(PersonalShift::getPersonalAttendanceLocationConfigId, 999)); |
| | | .isNotNull(PersonalShift::getPersonalAttendanceLocationConfigId)); |
| | | if (CollectionUtil.isEmpty(personalShifts)){ |
| | | throw new BaseException("å½åç¨æ·å½å¤©æ²¡ææçæ°æ®"); |
| | | } |
| | |
| | | List<PersonalShift> personalShifts = personalShiftMapper.selectList(Wrappers.<PersonalShift>lambdaQuery() |
| | | .eq(PersonalShift::getStaffOnJobId, staffOnJob.getId()) |
| | | .eq(PersonalShift::getWorkTime, currentDate.atStartOfDay()) |
| | | .isNotNull(PersonalShift::getPersonalAttendanceLocationConfigId) |
| | | .ne(PersonalShift::getPersonalAttendanceLocationConfigId, 999)); |
| | | .isNotNull(PersonalShift::getPersonalAttendanceLocationConfigId)); |
| | | if (CollectionUtil.isNotEmpty(personalShifts)){ |
| | | PersonalAttendanceLocationConfig personalAttendanceLocationConfig = personalAttendanceLocationConfigMapper.selectById(personalShifts.get(0).getPersonalAttendanceLocationConfigId()); |
| | | if (personalAttendanceLocationConfig != null) { |
| | | resultDto.setStartAt(personalAttendanceLocationConfig.getStartAt()); |
| | | resultDto.setEndAt(personalAttendanceLocationConfig.getEndAt()); |
| | | resultDto.setShift(personalAttendanceLocationConfig.getShift()); |
| | | } |
| | | resultDto.setStartAt(personalAttendanceLocationConfig.getStartAt()); |
| | | resultDto.setEndAt(personalAttendanceLocationConfig.getEndAt()); |
| | | resultDto.setShift(personalAttendanceLocationConfig.getShift()); |
| | | } |
| | | return resultDto; |
| | | } |
| | |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | schemeApplicableStaffLambdaQueryWrapper.like(SchemeApplicableStaff::getTitle, schemeApplicableStaff.getTitle()); |
| | | } |
| | | } |
| | | schemeApplicableStaffLambdaQueryWrapper.orderByDesc(SchemeApplicableStaff::getId); |
| | | Page<SchemeApplicableStaff> page1 = schemeApplicableStaffMapper.selectPage(page, schemeApplicableStaffLambdaQueryWrapper); |
| | | List<Long> collect = page1.getRecords().stream().map(SchemeApplicableStaff::getId).collect(Collectors.toList()); |
| | | if(CollectionUtils.isEmpty(collect)){ |
| | |
| | | * @param id |
| | | */ |
| | | public void calculateByEmployeeId(Integer id,Map<String, Object> map,String date) { |
| | | if (id == null || map == null) { |
| | | return; |
| | | // 1. å
¥åæ ¡éª |
| | | if (id == null) { |
| | | return; // æè¿å空åè¡¨ï¼æ ¹æ®ä¸å¡éæ±è°æ´ |
| | | } |
| | | Long staffId = id.longValue(); |
| | | // 社ä¿éé¢ |
| | | BigDecimal socialPersonal = new BigDecimal("0.00"); |
| | | // å
¬ç§¯ééé¢ |
| | | BigDecimal fundPersonal = new BigDecimal("0.00"); |
| | | // åºæ¬å·¥èµ |
| | | BigDecimal basicSalary = new BigDecimal("0.00"); |
| | | map.put("fundPersonal", fundPersonal); // å
¬ç§¯é |
| | | map.put("socialPersonal", socialPersonal); // 社ä¿éé¢ |
| | | map.put("basicSalary", basicSalary); // åºæ¬å·¥èµ |
| | | // 个ç¨éé¢ |
| | | BigDecimal salaryTax = new BigDecimal("0.00"); |
| | | map.put("salaryTax", salaryTax); |
| | | // è®¡ä»¶å·¥èµ |
| | | BigDecimal pieceSalary = new BigDecimal("0.00"); |
| | | map.put("pieceSalary", pieceSalary); |
| | | // 计æ¶å·¥èµ |
| | | BigDecimal hourlySalary = new BigDecimal("0.00"); |
| | | map.put("hourlySalary", hourlySalary); |
| | | // å
¶ä»æ¶å
¥ |
| | | BigDecimal otherIncome = new BigDecimal("0.00"); |
| | | map.put("otherIncome", otherIncome); |
| | | // å
¶ä»æ¯åº |
| | | BigDecimal otherDeduct = new BigDecimal("0.00"); |
| | | map.put("otherDeduct", otherDeduct); |
| | | // åºåå·¥èµ |
| | | BigDecimal grossSalary = new BigDecimal("0.00"); |
| | | map.put("grossSalary", grossSalary); |
| | | // åºæ£å·¥èµ |
| | | BigDecimal deductSalary = new BigDecimal("0.00"); |
| | | map.put("deductSalary", deductSalary); |
| | | // å®åå·¥èµ |
| | | BigDecimal netSalary = new BigDecimal("0.00"); |
| | | map.put("netSalary", netSalary); |
| | | // è°ç¨åºæ¬å·¥èµ |
| | | StaffOnJob staffOnJobDto = staffOnJobMapper.selectById(staffId); |
| | | if(staffOnJobDto == null){ |
| | | return; |
| | | } |
| | | BigDecimal basicSalary = hasValue(map, "basicSalary") |
| | | ? normalizeMoney(getBigDecimal(map, "basicSalary")) |
| | | : normalizeMoney(staffOnJobDto.getBasicSalary()); |
| | | BigDecimal otherIncome = normalizeMoney(getBigDecimal(map, "otherIncome")); |
| | | BigDecimal otherDeduct = normalizeMoney(getBigDecimal(map, "otherDeduct")); |
| | | BigDecimal socialSupplementAmount = hasValue(map, "socialSupplementAmount") |
| | | ? normalizeMoney(getBigDecimal(map, "socialSupplementAmount")) |
| | | : calculateLatestDeptSocialSupplementAmount(staffOnJobDto); |
| | | BigDecimal pieceSalary = normalizeMoney(getBigDecimal(map, "pieceSalary")); |
| | | BigDecimal hourlySalary = normalizeMoney(getBigDecimal(map, "hourlySalary")); |
| | | BigDecimal socialPersonal = BigDecimal.ZERO.setScale(2, RoundingMode.HALF_UP); |
| | | BigDecimal fundPersonal = BigDecimal.ZERO.setScale(2, RoundingMode.HALF_UP); |
| | | |
| | | basicSalary = staffOnJobDto.getBasicSalary(); |
| | | map.put("basicSalary", basicSalary); |
| | | // åºåå·¥èµ |
| | | map.put("grossSalary", basicSalary); |
| | | // 个ç¨éé¢ï¼æ 社ä¿çï¼ |
| | | BigDecimal bigDecimal = TaxCalculator.calculateMonthlyTax(basicSalary, socialPersonal, fundPersonal); |
| | | map.put("salaryTax", bigDecimal); |
| | | // 计æ¶å·¥èµ è®¡ä»¶å·¥èµ |
| | | UserProductionAccountingDto userProductionAccountingDto = new UserProductionAccountingDto(); |
| | | userProductionAccountingDto.setUserId(getUidByStaffId(staffId)); |
| | | userProductionAccountingDto.setDate(date); |
| | | UserAccountDto byUserId = salesLedgerProductionAccountingService.getByUserId(userProductionAccountingDto); |
| | | if(byUserId != null){ |
| | | pieceSalary = normalizeMoney(byUserId.getAccountBalance()); |
| | | hourlySalary = normalizeMoney(byUserId.getAccount()); |
| | | map.put("pieceSalary", byUserId.getAccountBalance()); |
| | | map.put("hourlySalary", byUserId.getAccount()); |
| | | // åºå å®åå¢å |
| | | grossSalary = grossSalary.add(byUserId.getAccountBalance()).add(byUserId.getAccount()); |
| | | map.put("grossSalary", grossSalary); |
| | | netSalary = netSalary.add(byUserId.getAccountBalance()).add(byUserId.getAccount()); |
| | | map.put("netSalary", netSalary); |
| | | } |
| | | |
| | | // æ¥è¯¢è¯¥äººå对åºçç¤¾ä¿æ¹æ¡ |
| | | // 2. æ¥è¯¢è¯¥äººå对åºçç¤¾ä¿æ¹æ¡ |
| | | List<SchemeApplicableStaff> schemeList = schemeApplicableStaffMapper.selectSchemeByStaffId(staffId); |
| | | if (!CollectionUtils.isEmpty(schemeList)) { |
| | | for (SchemeApplicableStaff scheme : schemeList) { |
| | | List<SchemeInsuranceDetail> detailList = schemeApplicableStaffMapper.selectDetailBySchemeId(scheme.getId()); |
| | | if(CollectionUtils.isEmpty(detailList)){ |
| | | continue; |
| | | } |
| | | for (SchemeInsuranceDetail detail : detailList) { |
| | | if("å
¬ç§¯é".equals(detail.getInsuranceType())){ |
| | | fundPersonal = calculateByEmployeeIdType(detail.getInsuranceType(), fundPersonal, basicSalary, staffOnJobDto, detail); |
| | | }else{ |
| | | socialPersonal = calculateByEmployeeIdType(detail.getInsuranceType(), socialPersonal, basicSalary, staffOnJobDto, detail); |
| | | } |
| | | if (CollectionUtils.isEmpty(schemeList)) { |
| | | return; // æ å¹é
æ¹æ¡ï¼è¿å空å表 |
| | | } |
| | | // 3. 为æ¯ä¸ªæ¹æ¡å
³èæç»å表 |
| | | for (SchemeApplicableStaff scheme : schemeList) { |
| | | List<SchemeInsuranceDetail> detailList = schemeApplicableStaffMapper.selectDetailBySchemeId(scheme.getId()); |
| | | // æ ¹æ®æç»å表计ç®ç¤¾ä¿ç¼´è´¹éé¢ |
| | | if(CollectionUtils.isEmpty(detailList)){ |
| | | continue; |
| | | } |
| | | for (SchemeInsuranceDetail detail : detailList) { |
| | | if("å
¬ç§¯é".equals(detail.getInsuranceType())){ |
| | | fundPersonal = fundPersonal.add(calculateByEmployeeIdType(detail.getInsuranceType(),fundPersonal, staffOnJobDto, detail)); |
| | | }else{ |
| | | socialPersonal = socialPersonal.add(calculateByEmployeeIdType(detail.getInsuranceType(),socialPersonal, staffOnJobDto, detail)); |
| | | } |
| | | } |
| | | } |
| | | |
| | | BigDecimal grossSalary = basicSalary.add(pieceSalary).add(hourlySalary).add(otherIncome); |
| | | BigDecimal salaryTax = TaxCalculator.calculateMonthlyTax( |
| | | grossSalary, |
| | | socialPersonal.add(socialSupplementAmount), |
| | | fundPersonal |
| | | ); |
| | | BigDecimal deductSalary = salaryTax |
| | | .add(fundPersonal) |
| | | .add(socialPersonal) |
| | | .add(socialSupplementAmount) |
| | | .add(otherDeduct); |
| | | BigDecimal netSalary = grossSalary.subtract(deductSalary); |
| | | |
| | | if (!hasText(map, "staffName")) { |
| | | map.put("staffName", staffOnJobDto.getStaffName()); |
| | | } |
| | | if (!hasText(map, "nation")) { |
| | | map.put("nation", staffOnJobDto.getNation()); |
| | | } |
| | | map.put("basicSalary", basicSalary); |
| | | map.put("pieceSalary", pieceSalary); |
| | | map.put("hourlySalary", hourlySalary); |
| | | map.put("otherIncome", otherIncome); |
| | | map.put("socialPersonal", socialPersonal); |
| | | map.put("fundPersonal", fundPersonal); |
| | | map.put("otherDeduct", otherDeduct); |
| | | map.put("socialSupplementAmount", socialSupplementAmount); |
| | | map.put("grossSalary", grossSalary); |
| | | map.put("salaryTax", salaryTax); |
| | | map.put("deductSalary", deductSalary); |
| | | map.put("netSalary", netSalary); |
| | | // 个ç¨éé¢ï¼ç¤¾ä¿çï¼ |
| | | bigDecimal = TaxCalculator.calculateMonthlyTax(basicSalary, socialPersonal, fundPersonal); |
| | | map.put("salaryTax", bigDecimal); |
| | | // åºæ£å·¥èµ |
| | | map.put("deductSalary", bigDecimal.add(fundPersonal).add(socialPersonal)); |
| | | // å®åå·¥èµ |
| | | map.put("netSalary", basicSalary.subtract(bigDecimal).subtract(fundPersonal).subtract(socialPersonal)); |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param detail |
| | | * @return |
| | | */ |
| | | public BigDecimal calculateByEmployeeIdType(String type,BigDecimal bigDecimal, BigDecimal basicSalary, StaffOnJob staffOnJobDto,SchemeInsuranceDetail detail) { |
| | | public BigDecimal calculateByEmployeeIdType(String type,BigDecimal bigDecimal, StaffOnJob staffOnJobDto,SchemeInsuranceDetail detail) { |
| | | // 夿æ¯å¦è°ç¨åºæ¬å·¥èµ |
| | | if (detail.getUseBasicSalary() == 1) { |
| | | BigDecimal divide = detail.getPaymentBase().multiply(detail.getPersonalRatio()).divide(new BigDecimal("100"), 2); |
| | | bigDecimal = bigDecimal.add(divide); |
| | | }else{ |
| | | // è°ç¨å½åå·¥èµè¡¨ä¸çåºæ¬å·¥èµ |
| | | BigDecimal multiply = basicSalary.multiply(detail.getPersonalRatio().divide(new BigDecimal("100"), 2)); |
| | | // è°ç¨åºæ¬å·¥èµ |
| | | BigDecimal multiply = staffOnJobDto.getBasicSalary().multiply(detail.getPersonalRatio().divide(new BigDecimal("100"), 2)); |
| | | bigDecimal = bigDecimal.add(multiply); |
| | | } |
| | | bigDecimal = bigDecimal.add(detail.getPersonalFixed()); |
| | | return bigDecimal; |
| | | } |
| | | |
| | | private BigDecimal calculateLatestDeptSocialSupplementAmount(StaffOnJob staffOnJobDto) { |
| | | if (staffOnJobDto == null || staffOnJobDto.getSysDeptId() == null) { |
| | | return BigDecimal.ZERO.setScale(2, RoundingMode.HALF_UP); |
| | | } |
| | | SchemeApplicableStaff latestScheme = schemeApplicableStaffMapper.selectLatestSchemeByDeptId(staffOnJobDto.getSysDeptId()); |
| | | if (latestScheme == null) { |
| | | return BigDecimal.ZERO.setScale(2, RoundingMode.HALF_UP); |
| | | } |
| | | List<SchemeInsuranceDetail> detailList = schemeApplicableStaffMapper.selectDetailBySchemeId(latestScheme.getId()); |
| | | if (CollectionUtils.isEmpty(detailList)) { |
| | | return BigDecimal.ZERO.setScale(2, RoundingMode.HALF_UP); |
| | | } |
| | | BigDecimal socialSupplementAmount = BigDecimal.ZERO.setScale(2, RoundingMode.HALF_UP); |
| | | for (SchemeInsuranceDetail detail : detailList) { |
| | | if (!"å
¬ç§¯é".equals(detail.getInsuranceType())) { |
| | | socialSupplementAmount = calculateByEmployeeIdType( |
| | | detail.getInsuranceType(), |
| | | socialSupplementAmount, |
| | | normalizeMoney(staffOnJobDto.getBasicSalary()), |
| | | staffOnJobDto, |
| | | detail |
| | | ); |
| | | } |
| | | } |
| | | return socialSupplementAmount.setScale(2, RoundingMode.HALF_UP); |
| | | } |
| | | |
| | | private boolean hasValue(Map<String, Object> map, String key) { |
| | | return map != null && map.get(key) != null; |
| | | } |
| | | |
| | | private boolean hasText(Map<String, Object> map, String key) { |
| | | if (map == null) { |
| | | return false; |
| | | } |
| | | Object value = map.get(key); |
| | | return value != null && !String.valueOf(value).trim().isEmpty(); |
| | | } |
| | | |
| | | private BigDecimal getBigDecimal(Map<String, Object> map, String key) { |
| | | if (map == null) { |
| | | return null; |
| | | } |
| | | Object value = map.get(key); |
| | | if (value == null) { |
| | | return null; |
| | | } |
| | | if (value instanceof BigDecimal) { |
| | | return (BigDecimal) value; |
| | | } |
| | | if (value instanceof Number) { |
| | | return new BigDecimal(String.valueOf(value)); |
| | | } |
| | | String text = String.valueOf(value).trim(); |
| | | if (text.isEmpty()) { |
| | | return null; |
| | | } |
| | | return new BigDecimal(text); |
| | | } |
| | | |
| | | private BigDecimal normalizeMoney(BigDecimal value) { |
| | | return value == null ? BigDecimal.ZERO.setScale(2, RoundingMode.HALF_UP) : value.setScale(2, RoundingMode.HALF_UP); |
| | | } |
| | | } |
| | |
| | | StaffLeave staffLeave = new StaffLeave(); |
| | | staffLeave.setStaffOnJobId(staffLeaveDto.getStaffOnJobId()); |
| | | staffLeave.setReason(staffLeaveDto.getReason()); |
| | | staffLeave.setLeaveDate(staffLeaveDto.getLeaveDate()); |
| | | String reason = staffLeaveDto.getReason(); |
| | | if (StaffLeaveReasonOther.getCode().equals(reason)){ |
| | | staffLeave.setRemark(staffLeaveDto.getRemark()); |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.dto.WordDateDto; |
| | | import com.ruoyi.project.system.domain.SysDept; |
| | |
| | | |
| | | //å¨èåå·¥å°è´¦å页æ¥è¯¢ |
| | | @Override |
| | | public IPage<StaffOnJobDto> staffOnJobListPage(Page page, StaffOnJobDto staffOnJob) { |
| | | IPage<StaffOnJobDto> staffOnJobDtoIPage = staffOnJobMapper.staffOnJobListPage(page, staffOnJob); |
| | | return staffOnJobDtoIPage; |
| | | public IPage<StaffOnJobDto> staffOnJobListPage(Page page, StaffOnJob staffOnJob) { |
| | | return staffOnJobMapper.staffOnJobListPage(page,staffOnJob); |
| | | } |
| | | |
| | | //æ°å¢å
¥è |
| | |
| | | } |
| | | |
| | | // å建å
¥èæ°æ® |
| | | syncStudyInfoFromEducation(staffOnJobPrams); |
| | | staffOnJobPrams.setContractExpireTime(staffOnJobPrams.getContractEndTime()); |
| | | staffOnJobPrams.setStaffState(1); |
| | | staffOnJobMapper.insert(staffOnJobPrams); |
| | |
| | | // ç»å®åè¡¨æ°æ® |
| | | bingingStaffOnJobExtra(id,staffOnJobParams); |
| | | // æ´æ°åå·¥æ°æ® |
| | | syncStudyInfoFromEducation(staffOnJobParams); |
| | | staffOnJobParams.setContractExpireTime(staffOnJobParams.getContractEndTime()); |
| | | return staffOnJobMapper.updateById(staffOnJobParams); |
| | | } |
| | |
| | | .forEach(staff -> staff.setStaffOnJobId(id)); // èµå¼ |
| | | staffEducationService.saveBatch(staffOnJobPrams.getStaffEducationList()); |
| | | } |
| | | |
| | | // æ°å¢å·¥ä½ç»å |
| | | if(CollectionUtils.isNotEmpty(staffOnJobPrams.getStaffWorkExperienceList())){ |
| | | staffOnJobPrams.getStaffWorkExperienceList().stream() |
| | |
| | | .forEach(staff -> staff.setStaffOnJobId(id)); // èµå¼ |
| | | staffEmergencyContactServiceImpl.saveBatch(staffOnJobPrams.getStaffEmergencyContactList()); |
| | | } |
| | | } |
| | | |
| | | private void syncStudyInfoFromEducation(StaffOnJob staffOnJobPrams) { |
| | | if (staffOnJobPrams == null || CollectionUtils.isEmpty(staffOnJobPrams.getStaffEducationList())) { |
| | | if (staffOnJobPrams != null) { |
| | | staffOnJobPrams.setFirstStudy("/"); |
| | | staffOnJobPrams.setProfession("/"); |
| | | } |
| | | return; |
| | | } |
| | | Optional<StaffEducation> matchedEducation = staffOnJobPrams.getStaffEducationList().stream() |
| | | .filter(Objects::nonNull) |
| | | .filter(education -> StringUtils.isNotEmpty(education.getMajor())) |
| | | .findFirst(); |
| | | if (matchedEducation.isPresent()) { |
| | | StaffEducation education = matchedEducation.get(); |
| | | staffOnJobPrams.setFirstStudy(education.getEducation()); |
| | | staffOnJobPrams.setProfession(education.getMajor()); |
| | | return; |
| | | } |
| | | staffOnJobPrams.setFirstStudy("/"); |
| | | staffOnJobPrams.setProfession("/"); |
| | | } |
| | | |
| | | |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.project.system.domain.SysDept; |
| | | import com.ruoyi.project.system.mapper.SysDeptMapper; |
| | | import com.ruoyi.project.system.mapper.SysUserDeptMapper; |
| | | import com.ruoyi.staff.excel.StaffSalaryExportData; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import com.ruoyi.staff.dto.CalculateSalaryDto; |
| | | import com.ruoyi.staff.dto.StaffSalaryCalculateDto; |
| | | import com.ruoyi.staff.mapper.StaffLeaveMapper; |
| | | import com.ruoyi.staff.mapper.StaffSalaryDetailMapper; |
| | | import com.ruoyi.staff.mapper.StaffSalaryMainMapper; |
| | |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.HashMap; |
| | | import java.util.HashSet; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Set; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | private final SchemeApplicableStaffServiceImpl schemeApplicableStaffService; |
| | | private final SysUserDeptMapper sysUserDeptMapper; |
| | | private final StaffLeaveMapper staffLeaveMapper; |
| | | private final SysDeptMapper sysDeptMapper; |
| | | |
| | | @Override |
| | | public AjaxResult listPage(Page page, StaffSalaryMain staffSalaryMain) { |
| | |
| | | staffSalaryMainLambdaQueryWrapper.eq(StaffSalaryMain::getStatus, staffSalaryMain.getStatus()); |
| | | } |
| | | } |
| | | staffSalaryMainLambdaQueryWrapper.orderByDesc(StaffSalaryMain::getId); |
| | | Page<StaffSalaryMain> page1 = staffSalaryMainMapper.selectPage(page, staffSalaryMainLambdaQueryWrapper); |
| | | page1.getRecords().forEach(main -> { |
| | | List<StaffSalaryDetail> staffSalaryDetailList = staffSalaryDetailMapper.selectList(new LambdaQueryWrapper<StaffSalaryDetail>().eq(StaffSalaryDetail::getMainId, main.getId())); |
| | |
| | | |
| | | @Override |
| | | public AjaxResult add(StaffSalaryMain staffSalaryMain) { |
| | | if (staffSalaryMain == null || StringUtils.isEmpty(staffSalaryMain.getSalaryMonth())) { |
| | | return AjaxResult.error("åæ°é误"); |
| | | } |
| | | |
| | | Integer status = staffSalaryMain.getStatus(); |
| | | if (status != null && status == 5) { |
| | | String salaryMonth = staffSalaryMain.getSalaryMonth(); |
| | | String deptIds = staffSalaryMain.getDeptIds(); |
| | | |
| | | List<StaffSalaryMain> issuedList = staffSalaryMainMapper.selectList(new LambdaQueryWrapper<StaffSalaryMain>() |
| | | .eq(StaffSalaryMain::getSalaryMonth, salaryMonth) |
| | | .eq(StaffSalaryMain::getStatus, 5)); |
| | | |
| | | for (StaffSalaryMain issued : issuedList) { |
| | | if (hasOverlappingDept(deptIds, issued.getDeptIds())) { |
| | | return AjaxResult.error("å䏿份åä¸é¨é¨å·¥èµä¸å¯ä»¥åæ¾å¤æ¬¡"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | staffSalaryMainMapper.insert(staffSalaryMain); |
| | | staffSalaryMain.getStaffSalaryDetailList().forEach(detail -> { |
| | | detail.setMainId(staffSalaryMain.getId()); |
| | |
| | | if(staffSalaryMain1 == null){ |
| | | return AjaxResult.error("åæ°é误"); |
| | | } |
| | | |
| | | Integer newStatus = staffSalaryMain.getStatus(); |
| | | if (newStatus != null && newStatus == 5) { |
| | | String salaryMonth = staffSalaryMain.getSalaryMonth(); |
| | | if (StringUtils.isEmpty(salaryMonth)) { |
| | | salaryMonth = staffSalaryMain1.getSalaryMonth(); |
| | | } |
| | | String deptIds = staffSalaryMain.getDeptIds(); |
| | | if (StringUtils.isEmpty(deptIds)) { |
| | | deptIds = staffSalaryMain1.getDeptIds(); |
| | | } |
| | | |
| | | List<StaffSalaryMain> issuedList = staffSalaryMainMapper.selectList(new LambdaQueryWrapper<StaffSalaryMain>() |
| | | .eq(StaffSalaryMain::getSalaryMonth, salaryMonth) |
| | | .eq(StaffSalaryMain::getStatus, 5) |
| | | .ne(StaffSalaryMain::getId, staffSalaryMain.getId())); |
| | | |
| | | for (StaffSalaryMain issued : issuedList) { |
| | | if (hasOverlappingDept(deptIds, issued.getDeptIds())) { |
| | | return AjaxResult.error("å䏿份åä¸é¨é¨å·¥èµä¸å¯ä»¥åæ¾å¤æ¬¡"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | // å¾
å®¡æ ¸ä¸å¯ç¼è¾ |
| | | // if(staffSalaryMain1.getStatus() > 3){ |
| | | // return AjaxResult.error("å¾
å®¡æ ¸ä¸å¯ç¼è¾"); |
| | |
| | | return AjaxResult.success(mapList); |
| | | } |
| | | |
| | | @Override |
| | | public AjaxResult calculateSalaryByEmployee(StaffSalaryCalculateDto staffSalaryCalculateDto) { |
| | | if (staffSalaryCalculateDto == null |
| | | || staffSalaryCalculateDto.getStaffOnJobId() == null |
| | | || StringUtils.isEmpty(staffSalaryCalculateDto.getSalaryMonth())) { |
| | | return AjaxResult.error("åæ°é误"); |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", staffSalaryCalculateDto.getStaffOnJobId()); |
| | | map.put("staffOnJobId", staffSalaryCalculateDto.getStaffOnJobId()); |
| | | map.put("salaryMonth", staffSalaryCalculateDto.getSalaryMonth()); |
| | | map.put("staffName", staffSalaryCalculateDto.getStaffName()); |
| | | map.put("postName", staffSalaryCalculateDto.getPostName()); |
| | | map.put("deptName", staffSalaryCalculateDto.getDeptName()); |
| | | if (staffSalaryCalculateDto.getBasicSalary() != null) { |
| | | map.put("basicSalary", staffSalaryCalculateDto.getBasicSalary()); |
| | | } |
| | | map.put("pieceSalary", staffSalaryCalculateDto.getPieceSalary()); |
| | | map.put("hourlySalary", staffSalaryCalculateDto.getHourlySalary()); |
| | | map.put("otherIncome", staffSalaryCalculateDto.getOtherIncome()); |
| | | map.put("socialPersonal", staffSalaryCalculateDto.getSocialPersonal()); |
| | | map.put("fundPersonal", staffSalaryCalculateDto.getFundPersonal()); |
| | | map.put("otherDeduct", staffSalaryCalculateDto.getOtherDeduct()); |
| | | map.put("socialSupplementAmount", staffSalaryCalculateDto.getSocialSupplementAmount()); |
| | | map.put("salaryTax", staffSalaryCalculateDto.getSalaryTax()); |
| | | map.put("grossSalary", staffSalaryCalculateDto.getGrossSalary()); |
| | | map.put("deductSalary", staffSalaryCalculateDto.getDeductSalary()); |
| | | map.put("netSalary", staffSalaryCalculateDto.getNetSalary()); |
| | | map.put("remark", staffSalaryCalculateDto.getRemark()); |
| | | schemeApplicableStaffService.calculateByEmployeeId( |
| | | staffSalaryCalculateDto.getStaffOnJobId().intValue(), |
| | | map, |
| | | staffSalaryCalculateDto.getSalaryMonth() |
| | | ); |
| | | return AjaxResult.success(map); |
| | | } |
| | | |
| | | @Override |
| | | public void exportSalaryDetail(HttpServletResponse response, String salaryMonth) { |
| | | LambdaQueryWrapper<StaffSalaryMain> mainWrapper = new LambdaQueryWrapper<>(); |
| | | if (StringUtils.isNotEmpty(salaryMonth)) { |
| | | mainWrapper.eq(StaffSalaryMain::getSalaryMonth, salaryMonth); |
| | | } |
| | | List<StaffSalaryMain> mainList = staffSalaryMainMapper.selectList(mainWrapper); |
| | | |
| | | List<StaffSalaryExportData> exportDataList = new ArrayList<>(); |
| | | for (StaffSalaryMain main : mainList) { |
| | | List<StaffSalaryDetail> detailList = staffSalaryDetailMapper.selectList( |
| | | new LambdaQueryWrapper<StaffSalaryDetail>().eq(StaffSalaryDetail::getMainId, main.getId()) |
| | | ); |
| | | |
| | | for (StaffSalaryDetail detail : detailList) { |
| | | StaffSalaryExportData exportData = new StaffSalaryExportData(); |
| | | exportData.setSalaryMonth(main.getSalaryMonth()); |
| | | exportData.setSalaryTitle(main.getSalaryTitle()); |
| | | exportData.setStaffName(detail.getStaffName()); |
| | | exportData.setDeptName(detail.getDeptName()); |
| | | exportData.setBasicSalary(detail.getBasicSalary()); |
| | | exportData.setPieceSalary(detail.getPieceSalary()); |
| | | exportData.setHourlySalary(detail.getHourlySalary()); |
| | | exportData.setOtherIncome(detail.getOtherIncome()); |
| | | exportData.setSocialPersonal(detail.getSocialPersonal()); |
| | | exportData.setFundPersonal(detail.getFundPersonal()); |
| | | exportData.setOtherDeduct(detail.getOtherDeduct()); |
| | | exportData.setSocialSupplementAmount(detail.getSocialSupplementAmount()); |
| | | exportData.setSalaryTax(detail.getSalaryTax()); |
| | | exportData.setGrossSalary(detail.getGrossSalary()); |
| | | exportData.setDeductSalary(detail.getDeductSalary()); |
| | | exportData.setNetSalary(detail.getNetSalary()); |
| | | exportData.setRemark(detail.getRemark()); |
| | | exportDataList.add(exportData); |
| | | } |
| | | } |
| | | |
| | | ExcelUtil<StaffSalaryExportData> util = new ExcelUtil<>(StaffSalaryExportData.class); |
| | | util.exportExcel(response, exportDataList, "åå·¥èªèµæç»"); |
| | | } |
| | | |
| | | public List<Map<String, Object>> setSchemeApplicableStaffUserInfo(List<Long> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | | return new ArrayList<>(); |
| | | } |
| | | // éè¿é¨é¨è·å人åid |
| | | return sysUserDeptMapper.setSchemeApplicableStaffUserInfo(ids); |
| | | } |
| | | |
| | | @Override |
| | | public AjaxResult getAvailableDepts(String salaryMonth) { |
| | | if (StringUtils.isEmpty(salaryMonth)) { |
| | | return AjaxResult.error("å·¥èµæä»½ä¸è½ä¸ºç©º"); |
| | | } |
| | | |
| | | List<String> issuedDeptIdStrings = staffSalaryMainMapper.selectIssuedDeptIds(salaryMonth); |
| | | |
| | | Set<Long> issuedDeptIds = new HashSet<>(); |
| | | for (String deptIds : issuedDeptIdStrings) { |
| | | if (StringUtils.isNotEmpty(deptIds)) { |
| | | String[] ids = deptIds.split(","); |
| | | for (String id : ids) { |
| | | issuedDeptIds.add(Long.parseLong(id.trim())); |
| | | } |
| | | } |
| | | } |
| | | |
| | | List<SysDept> allDepts = sysDeptMapper.selectList(new LambdaQueryWrapper<SysDept>() |
| | | .eq(SysDept::getStatus, "0") |
| | | .eq(SysDept::getDelFlag, "0")); |
| | | |
| | | List<SysDept> availableDepts = new ArrayList<>(); |
| | | for (SysDept dept : allDepts) { |
| | | if (!issuedDeptIds.contains(dept.getDeptId())) { |
| | | availableDepts.add(dept); |
| | | } |
| | | } |
| | | |
| | | return AjaxResult.success(availableDepts); |
| | | } |
| | | |
| | | private boolean hasOverlappingDept(String deptIds1, String deptIds2) { |
| | | if (StringUtils.isEmpty(deptIds1) || StringUtils.isEmpty(deptIds2)) { |
| | | return false; |
| | | } |
| | | |
| | | Set<String> deptSet1 = new HashSet<>(Arrays.asList(deptIds1.split(","))); |
| | | String[] deptArray2 = deptIds2.split(","); |
| | | |
| | | for (String deptId : deptArray2) { |
| | | if (deptSet1.contains(deptId.trim())) { |
| | | return true; |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | } |
| | |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @PostMapping("/reAudit") |
| | | @Log(title = "åºåºç®¡ç-å审åºåº", businessType = BusinessType.UPDATE) |
| | | @Operation(summary = "æ¹éå审åºåºè®°å½") |
| | | public AjaxResult reAudit(@RequestBody StockOutRecordDto approveDto) { |
| | | if(CollectionUtils.isEmpty(approveDto.getIds())){ |
| | | return AjaxResult.error("è¯·éæ©è³å°ä¸æ¡æ°æ®"); |
| | | } |
| | | stockOutRecordService.batchReAudit(approveDto.getIds()); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.enums.StockInQualifiedRecordTypeEnum; |
| | | import com.ruoyi.common.enums.StockOutQualifiedRecordTypeEnum; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.stock.dto.StockInventoryDto; |
| | | import com.ruoyi.stock.dto.StockUninventoryDto; |
| | |
| | | |
| | | @PostMapping("/addstockUninventory") |
| | | @Operation(summary = "æ°å¢åºå") |
| | | @Log(title = "æ°å¢ä¸åæ ¼åºå", businessType = BusinessType.INSERT) |
| | | public R addstockUninventory(@RequestBody StockUninventoryDto stockUninventoryDto) { |
| | | stockUninventoryDto.setRecordType(String.valueOf(StockInQualifiedRecordTypeEnum.CUSTOMIZATION_UNSTOCK_IN.getCode())); |
| | | stockUninventoryDto.setRecordId(0L); |
| | |
| | | |
| | | @PostMapping("/subtractstockUninventory") |
| | | @Operation(summary = "æ£ååºå") |
| | | @Log(title = "æ£åä¸åæ ¼åºå", businessType = BusinessType.UPDATE) |
| | | public R subtractstockUninventory(@RequestBody StockUninventoryDto stockUninventoryDto) { |
| | | stockUninventoryDto.setRecordType(String.valueOf(StockOutQualifiedRecordTypeEnum.CUSTOMIZATION_UNSTOCK_OUT.getCode())); |
| | | stockUninventoryDto.setRecordId(0L); |
| | |
| | | |
| | | @PostMapping("/addStockInRecordOnly") |
| | | @Operation(summary = "æ°å¢å
¥åºè®°å½ï¼ä»
å建记å½ï¼ä¸è°æ´åºåï¼") |
| | | @Log(title = "æ°å¢ä¸åæ ¼åºåå
¥åºè®°å½", businessType = BusinessType.INSERT) |
| | | public R addStockInRecordOnly(@RequestBody StockUninventoryDto stockUninventoryDto) { |
| | | stockUninventoryDto.setRecordType(String.valueOf(StockInQualifiedRecordTypeEnum.CUSTOMIZATION_UNSTOCK_IN.getCode())); |
| | | stockUninventoryDto.setRecordId(0L); |
| | |
| | | |
| | | @PostMapping("/addStockOutRecordOnly") |
| | | @Operation(summary = "æ°å¢åºåºè®°å½ï¼ä»
å建记å½ï¼ä¸è°æ´åºåï¼") |
| | | @Log(title = "æ°å¢ä¸åæ ¼åºååºåºè®°å½", businessType = BusinessType.INSERT) |
| | | public R addStockOutRecordOnly(@RequestBody StockUninventoryDto stockUninventoryDto) { |
| | | stockUninventoryDto.setRecordType(String.valueOf(StockOutQualifiedRecordTypeEnum.CUSTOMIZATION_UNSTOCK_OUT.getCode())); |
| | | stockUninventoryDto.setRecordId(0L); |
| | |
| | | |
| | | @PostMapping("/exportStockUninventory") |
| | | @Operation(summary = "导åºåºå") |
| | | @Log(title = "导åºä¸åæ ¼åºå", businessType = BusinessType.EXPORT) |
| | | public void exportStockUninventory(HttpServletResponse response, StockUninventoryDto stockUninventoryDto) { |
| | | stockUninventoryService.exportStockUninventory(response,stockUninventoryDto); |
| | | } |
| | |
| | | |
| | | @PostMapping("/frozenStock") |
| | | @Operation(summary = "å»ç»åºå") |
| | | @Log(title = "å»ç»ä¸åæ ¼åºå", businessType = BusinessType.UPDATE) |
| | | public R frozenStock(@RequestBody StockInventoryDto stockInventoryDto) { |
| | | return R.ok(stockUninventoryService.frozenStock(stockInventoryDto)); |
| | | } |
| | | |
| | | @PostMapping("/thawStock") |
| | | @Operation(summary = "è§£å»åºå") |
| | | @Log(title = "è§£å»ä¸åæ ¼åºå", businessType = BusinessType.UPDATE) |
| | | public R thawStock(@RequestBody StockInventoryDto stockInventoryDto) { |
| | | return R.ok(stockUninventoryService.thawStock(stockInventoryDto)); |
| | | } |
| | |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serial; |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | @TableName("stock_in_record") |
| | | @Schema(name = "å
¥åºç®¡ç") |
| | | public class StockInRecord { |
| | | public class StockInRecord implements Serializable { |
| | | |
| | | @Serial |
| | | private static final long serialVersionUID = 1L; |
| | | /** |
| | | * åºå· |
| | |
| | | private String remark; |
| | | |
| | | @Schema(description = "é¢è¦æ°é") |
| | | @TableField(exist = false) |
| | | private BigDecimal warnNum; |
| | | |
| | | @Schema(description = "ç±»å 0åæ ¼å
¥åº 1ä¸åæ ¼å
¥åº") |
| | | private String type; |
| | | |
| | | @Schema(description = "å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | |
| | | private String remark; |
| | | |
| | | @Schema(description = "å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | |
| | | public interface StockInRecordService extends IService<StockInRecord> { |
| | | IPage<StockInRecordDto> listPage(Page page, StockInRecordDto stockInRecordDto); |
| | | |
| | | int add(StockInRecordDto stockInRecordDto); |
| | | StockInRecord add(StockInRecordDto stockInRecordDto); |
| | | |
| | | int update(Long id, StockInRecordDto stockInRecordDto); |
| | | |
| | |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.stock.dto.StockInRecordDto; |
| | | import com.ruoyi.stock.dto.StockInventoryDto; |
| | | import com.ruoyi.stock.dto.StockOutRecordDto; |
| | | import com.ruoyi.stock.pojo.StockInventory; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | |
| | | |
| | | Boolean addStockInRecordOnly(StockInventoryDto stockInventoryDto); |
| | | |
| | | Boolean addStockOutRecordOnly(StockInventoryDto stockInventoryDto); |
| | | StockOutRecordDto addStockOutRecordOnly(StockInventoryDto stockInventoryDto); |
| | | |
| | | R importStockInventory(MultipartFile file); |
| | | |
| | |
| | | public interface StockOutRecordService extends IService<StockOutRecord> { |
| | | IPage<StockOutRecordDto> listPage(Page page, StockOutRecordDto stockOutRecordDto); |
| | | |
| | | int add(StockOutRecordDto stockOutRecordDto); |
| | | StockOutRecordDto add(StockOutRecordDto stockOutRecordDto); |
| | | |
| | | int update(Long id, StockOutRecordDto stockOutRecordDto); |
| | | |
| | |
| | | void exportStockOutRecord(HttpServletResponse response, StockOutRecordDto stockOutRecordDto); |
| | | |
| | | int batchApprove(List<Long> ids, Integer approvalStatus); |
| | | |
| | | int batchReAudit(List<Long> ids); |
| | | } |
| | |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.bean.BeanUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import com.ruoyi.stock.dto.StockInRecordDto; |
| | | import com.ruoyi.stock.dto.StockInventoryDto; |
| | | import com.ruoyi.stock.dto.StockUninventoryDto; |
| | | import com.ruoyi.stock.execl.StockInRecordExportData; |
| | | import com.ruoyi.production.mapper.ProductionOrderPickMapper; |
| | | import com.ruoyi.production.pojo.ProductionOrderPick; |
| | | import com.ruoyi.procurementrecord.mapper.ReturnManagementMapper; |
| | | import com.ruoyi.procurementrecord.mapper.ReturnSaleProductMapper; |
| | | import com.ruoyi.procurementrecord.pojo.ReturnManagement; |
| | | import com.ruoyi.procurementrecord.pojo.ReturnSaleProduct; |
| | | import com.ruoyi.sales.mapper.SalesLedgerMapper; |
| | | import com.ruoyi.sales.mapper.ShippingInfoMapper; |
| | | import com.ruoyi.sales.pojo.SalesLedger; |
| | | import com.ruoyi.sales.pojo.ShippingInfo; |
| | | import com.ruoyi.stock.mapper.StockInRecordMapper; |
| | | import com.ruoyi.stock.mapper.StockInventoryMapper; |
| | | import com.ruoyi.stock.mapper.StockUninventoryMapper; |
| | |
| | | private StockInventoryMapper stockInventoryMapper; |
| | | private StockUninventoryMapper stockUninventoryMapper; |
| | | private ProductionOrderPickMapper productionOrderPickMapper; |
| | | private ReturnSaleProductMapper returnSaleProductMapper; |
| | | private ReturnManagementMapper returnManagementMapper; |
| | | private ShippingInfoMapper shippingInfoMapper; |
| | | private SalesLedgerMapper salesLedgerMapper; |
| | | |
| | | @Override |
| | | public IPage<StockInRecordDto> listPage(Page page, StockInRecordDto stockInRecordDto) { |
| | |
| | | // æ°å¢å
¥åº |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int add(StockInRecordDto stockInRecordDto) { |
| | | LocalDateTime createTime = stockInRecordDto.getCreateTime(); |
| | | if (createTime == null) { |
| | | createTime = LocalDateTime.now(); |
| | | } |
| | | String no = OrderUtils.countTodayByCreateTime(stockInRecordMapper, "RK","inbound_batches", createTime); |
| | | public StockInRecord add(StockInRecordDto stockInRecordDto) { |
| | | String no = OrderUtils.countTodayByCreateTime(stockInRecordMapper, "RK","inbound_batches"); |
| | | stockInRecordDto.setInboundBatches(no); |
| | | stockInRecordDto.setCreateTime(createTime); |
| | | StockInRecord stockInRecord = new StockInRecord(); |
| | | BeanUtils.copyProperties(stockInRecordDto, stockInRecord); |
| | | return stockInRecordMapper.insert(stockInRecord); |
| | | stockInRecordMapper.insert(stockInRecord); |
| | | return stockInRecord; |
| | | } |
| | | |
| | | @Override |
| | |
| | | throw new BaseException("该å
¥åºè®°å½ä¸åå¨,æ æ³æ´æ°!!!"); |
| | | } |
| | | |
| | | // è®°å½ä¿®æ¹åç batch_no |
| | | String oldBatchNo = stockInRecord.getBatchNo(); |
| | | String newBatchNo = stockInRecordDto.getBatchNo(); |
| | | |
| | | String[] ignoreProperties = {"id", "inbound_batches"};//æé¤id屿§ |
| | | BeanUtils.copyProperties(stockInRecordDto, stockInRecord, ignoreProperties); |
| | | return stockInRecordMapper.updateById(stockInRecord); |
| | | int result = stockInRecordMapper.updateById(stockInRecord); |
| | | |
| | | // 妿 batch_no åçååï¼éè¦åæ¥æ´æ°å
³è表 |
| | | if (newBatchNo != null && !newBatchNo.equals(oldBatchNo)) { |
| | | updateRelatedBatchNo(stockInRecord, oldBatchNo, newBatchNo); |
| | | } |
| | | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * åæ¥æ´æ°å
³è表ç batch_no |
| | | * @param stockInRecord å
¥åºè®°å½ |
| | | * @param oldBatchNo ä¿®æ¹åçæ¹å· |
| | | * @param newBatchNo ä¿®æ¹åçæ¹å· |
| | | */ |
| | | private void updateRelatedBatchNo(StockInRecord stockInRecord, String oldBatchNo, String newBatchNo) { |
| | | // 1. æ´æ° stock_inventory 表ï¼åæ ¼åºåï¼ |
| | | LambdaQueryWrapper<StockInventory> inventoryEq = new LambdaQueryWrapper<StockInventory>() |
| | | .eq(StockInventory::getProductModelId, stockInRecord.getProductModelId()); |
| | | if (StringUtils.isEmpty(oldBatchNo)) { |
| | | inventoryEq.isNull(StockInventory::getBatchNo); |
| | | } else { |
| | | inventoryEq.eq(StockInventory::getBatchNo, oldBatchNo); |
| | | } |
| | | StockInventory stockInventory = stockInventoryMapper.selectOne(inventoryEq); |
| | | if (stockInventory != null) { |
| | | stockInventory.setBatchNo(newBatchNo); |
| | | stockInventoryMapper.updateById(stockInventory); |
| | | } |
| | | |
| | | // 2. æ´æ° stock_uninventory 表ï¼ä¸åæ ¼åºåï¼ |
| | | LambdaQueryWrapper<StockUninventory> uninventoryEq = new LambdaQueryWrapper<StockUninventory>() |
| | | .eq(StockUninventory::getProductModelId, stockInRecord.getProductModelId()); |
| | | if (StringUtils.isEmpty(oldBatchNo)) { |
| | | uninventoryEq.isNull(StockUninventory::getBatchNo); |
| | | } else { |
| | | uninventoryEq.eq(StockUninventory::getBatchNo, oldBatchNo); |
| | | } |
| | | StockUninventory stockUninventory = stockUninventoryMapper.selectOne(uninventoryEq); |
| | | if (stockUninventory != null) { |
| | | stockUninventory.setBatchNo(newBatchNo); |
| | | stockUninventoryMapper.updateById(stockUninventory); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | |
| | | if (stockInRecord == null) { |
| | | throw new BaseException("å
¥åºè®°å½ä¸åå¨,æ æ³å®¡æ¹!!!"); |
| | | } |
| | | if (stockInRecord.getApprovalStatus() != null && !ReviewStatusEnum.PENDING_REVIEW.getCode().equals(stockInRecord.getApprovalStatus())) { |
| | | /*if (stockInRecord.getApprovalStatus() != null && !ReviewStatusEnum.PENDING_REVIEW.getCode().equals(stockInRecord.getApprovalStatus())) { |
| | | throw new BaseException("åªæå¾
审æ¹ç¶æçè®°å½æè½å®¡æ¹,å
¥åºæ¹æ¬¡:" + stockInRecord.getInboundBatches()); |
| | | } |
| | | }*/ |
| | | stockInRecord.setApprovalStatus(approvalStatus); |
| | | stockInRecordMapper.updateById(stockInRecord); |
| | | |
| | |
| | | stockInventoryDto.setBatchNo(stockInRecord.getBatchNo()); |
| | | stockInventoryDto.setQualitity(stockInRecord.getStockInNum()); |
| | | stockInventoryDto.setRemark(stockInRecord.getRemark()); |
| | | stockInventoryDto.setWarnNum(stockInRecord.getWarnNum()); |
| | | if (stockInventory == null) { |
| | | try { |
| | | stockInventoryMapper.insert(new StockInventory() {{ |
| | | setProductModelId(stockInRecord.getProductModelId()); |
| | | setQualitity(stockInRecord.getStockInNum()); |
| | | setBatchNo(stockInRecord.getBatchNo()); |
| | | setRemark(stockInRecord.getRemark()); |
| | | setWarnNum(stockInRecord.getWarnNum()); |
| | | setVersion(1); |
| | | }}); |
| | | } catch (org.springframework.dao.DuplicateKeyException e) { |
| | | stockInventoryMapper.updateAddStockInventory(stockInventoryDto); |
| | | } |
| | | stockInventoryMapper.insert(new StockInventory() {{ |
| | | setProductModelId(stockInRecord.getProductModelId()); |
| | | setQualitity(stockInRecord.getStockInNum()); |
| | | setWarnNum(stockInRecord.getWarnNum()); |
| | | setBatchNo(stockInRecord.getBatchNo()); |
| | | setRemark(stockInRecord.getRemark()); |
| | | setVersion(1); |
| | | }}); |
| | | } else { |
| | | stockInventoryMapper.updateAddStockInventory(stockInventoryDto); |
| | | } |
| | |
| | | stockUninventoryDto.setQualitity(stockInRecord.getStockInNum()); |
| | | stockUninventoryDto.setRemark(stockInRecord.getRemark()); |
| | | if (stockUninventory == null) { |
| | | try { |
| | | stockUninventoryMapper.insert(new StockUninventory() {{ |
| | | setProductModelId(stockInRecord.getProductModelId()); |
| | | setQualitity(stockInRecord.getStockInNum()); |
| | | setBatchNo(stockInRecord.getBatchNo()); |
| | | setRemark(stockInRecord.getRemark()); |
| | | setVersion(1); |
| | | }}); |
| | | } catch (org.springframework.dao.DuplicateKeyException e) { |
| | | stockUninventoryMapper.updateAddStockUnInventory(stockUninventoryDto); |
| | | } |
| | | stockUninventoryMapper.insert(new StockUninventory() {{ |
| | | setProductModelId(stockInRecord.getProductModelId()); |
| | | setQualitity(stockInRecord.getStockInNum()); |
| | | setBatchNo(stockInRecord.getBatchNo()); |
| | | setRemark(stockInRecord.getRemark()); |
| | | setVersion(1); |
| | | }}); |
| | | } else { |
| | | stockUninventoryMapper.updateAddStockUnInventory(stockUninventoryDto); |
| | | } |
| | | } |
| | | // éå®éè´§å
¥åº:æ£åéå®å°è´¦å®é
ååéé¢(éè´§çæ) |
| | | handleSalesReturnRefund(stockInRecord); |
| | | } |
| | | } |
| | | return ids.size(); |
| | |
| | | } |
| | | |
| | | return ids.size(); |
| | | } |
| | | |
| | | /** |
| | | * éå®éè´§å
¥åºå®¡æ¹éè¿æ¶,æ£å对åºéå®å°è´¦çå®é
ååéé¢ã |
| | | * å
³èé¾:stock_in_record.record_id = return_sale_product.id |
| | | * â return_management.shipping_id = shipping_info.id |
| | | * â shipping_info.sales_ledger_id = sales_ledger.id |
| | | * åªå¤ç record_type 为 14(åæ ¼)æ 15(ä¸åæ ¼)çéå®éè´§å
¥åºã |
| | | */ |
| | | private void handleSalesReturnRefund(StockInRecord stockInRecord) { |
| | | String recordType = stockInRecord.getRecordType(); |
| | | if (!StockInQualifiedRecordTypeEnum.RETURN_HE_IN.getCode().equals(recordType) |
| | | && !StockInQualifiedRecordTypeEnum.RETURN_UNSTOCK_IN.getCode().equals(recordType)) { |
| | | return; |
| | | } |
| | | if (stockInRecord.getRecordId() == null) { |
| | | return; |
| | | } |
| | | ReturnSaleProduct rsp = returnSaleProductMapper.selectById(stockInRecord.getRecordId()); |
| | | if (rsp == null || rsp.getReturnManagementId() == null) { |
| | | return; |
| | | } |
| | | ReturnManagement rm = returnManagementMapper.selectById(rsp.getReturnManagementId()); |
| | | if (rm == null || rm.getShippingId() == null) { |
| | | return; |
| | | } |
| | | ShippingInfo shippingInfo = shippingInfoMapper.selectById(rm.getShippingId()); |
| | | if (shippingInfo == null || shippingInfo.getSalesLedgerId() == null) { |
| | | return; |
| | | } |
| | | SalesLedger salesLedger = salesLedgerMapper.selectById(shippingInfo.getSalesLedgerId()); |
| | | if (salesLedger == null || salesLedger.getContractAmount() == null) { |
| | | return; |
| | | } |
| | | BigDecimal refund = rsp.getAmount() != null ? rsp.getAmount() : BigDecimal.ZERO; |
| | | if (refund.compareTo(BigDecimal.ZERO) == 0) { |
| | | return; |
| | | } |
| | | BigDecimal baseAmount = salesLedger.getNetContractAmount() != null |
| | | ? salesLedger.getNetContractAmount() |
| | | : salesLedger.getContractAmount(); |
| | | salesLedger.setNetContractAmount(baseAmount.subtract(refund)); |
| | | salesLedgerMapper.updateById(salesLedger); |
| | | } |
| | | } |
| | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDate; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | newStockInventory.setBatchNo(stockInventoryDto.getBatchNo()); |
| | | newStockInventory.setLockedQuantity(stockInventoryDto.getLockedQuantity()); |
| | | newStockInventory.setWarnNum(stockInventoryDto.getWarnNum()); |
| | | try { |
| | | stockInventoryMapper.insert(newStockInventory); |
| | | } catch (org.springframework.dao.DuplicateKeyException e) { |
| | | stockInventoryMapper.updateAddStockInventory(stockInventoryDto); |
| | | } |
| | | stockInventoryMapper.insert(newStockInventory); |
| | | } else { |
| | | stockInventoryMapper.updateAddStockInventory(stockInventoryDto); |
| | | } |
| | |
| | | stockInRecordDto.setStockInNum(stockInventoryDto.getQualitity()); |
| | | stockInRecordDto.setBatchNo(batchNo); |
| | | stockInRecordDto.setProductModelId(stockInventoryDto.getProductModelId()); |
| | | stockInRecordDto.setWarnNum(stockInventoryDto.getWarnNum()); |
| | | stockInRecordDto.setType("0"); |
| | | stockInRecordDto.setRemark(stockInventoryDto.getRemark()); |
| | | stockInRecordDto.setWarnNum(stockInventoryDto.getWarnNum()); |
| | | stockInRecordService.add(stockInRecordDto); |
| | | StockInRecord stockInRecord = stockInRecordService.add(stockInRecordDto); |
| | | |
| | | stockInRecordService.batchApprove(Collections.singletonList(stockInRecord.getId()),1); |
| | | |
| | | return true; |
| | | } |
| | | |
| | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public Boolean addStockOutRecordOnly(StockInventoryDto stockInventoryDto) { |
| | | public StockOutRecordDto addStockOutRecordOnly(StockInventoryDto stockInventoryDto) { |
| | | LambdaQueryWrapper<StockInventory> eq = new LambdaQueryWrapper<>(); |
| | | eq.eq(StockInventory::getProductModelId, stockInventoryDto.getProductModelId()); |
| | | if (StringUtils.isEmpty(stockInventoryDto.getBatchNo())) { |
| | |
| | | stockOutRecordDto.setProductModelId(stockInventoryDto.getProductModelId()); |
| | | stockOutRecordDto.setType("0"); |
| | | stockOutRecordDto.setRemark(stockInventoryDto.getRemark()); |
| | | stockOutRecordService.add(stockOutRecordDto); |
| | | return true; |
| | | StockOutRecordDto add = stockOutRecordService.add(stockOutRecordDto); |
| | | return add; |
| | | } |
| | | |
| | | @Override |
| | |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.bean.BeanUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import com.ruoyi.stock.dto.StockInventoryDto; |
| | | import com.ruoyi.stock.dto.StockOutRecordDto; |
| | | import com.ruoyi.stock.dto.StockUninventoryDto; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public int add(StockOutRecordDto stockOutRecordDto) { |
| | | LocalDateTime createTime = stockOutRecordDto.getCreateTime(); |
| | | if (createTime == null) { |
| | | createTime = LocalDateTime.now(); |
| | | } |
| | | String no = OrderUtils.countTodayByCreateTime(stockOutRecordMapper, "CK","outbound_batches", createTime); |
| | | public StockOutRecordDto add(StockOutRecordDto stockOutRecordDto) { |
| | | String no = OrderUtils.countTodayByCreateTime(stockOutRecordMapper, "CK","outbound_batches"); |
| | | stockOutRecordDto.setOutboundBatches(no); |
| | | stockOutRecordDto.setCreateTime(createTime); |
| | | if (StockOutQualifiedRecordTypeEnum.SALE_SHIP_STOCK_OUT.getCode().equals(stockOutRecordDto.getRecordType())){ |
| | | stockOutRecordDto.setApprovalStatus(3); |
| | | } |
| | | return stockOutRecordMapper.insert(stockOutRecordDto); |
| | | stockOutRecordMapper.insert(stockOutRecordDto); |
| | | return stockOutRecordDto; |
| | | } |
| | | |
| | | @Override |
| | |
| | | if (stockOutRecord == null) { |
| | | throw new BaseException("åºåºè®°å½ä¸åå¨,æ æ³å®¡æ¹!!!"); |
| | | } |
| | | if (stockOutRecord.getApprovalStatus() != null && !ReviewStatusEnum.PENDING_REVIEW.getCode().equals(stockOutRecord.getApprovalStatus())) { |
| | | throw new BaseException("åªæå¾
审æ¹ç¶æçè®°å½æè½å®¡æ¹,åºåºæ¹æ¬¡:" + stockOutRecord.getOutboundBatches()); |
| | | } |
| | | //if (stockOutRecord.getApprovalStatus() != null && !ReviewStatusEnum.PENDING_REVIEW.getCode().equals(stockOutRecord.getApprovalStatus())) { |
| | | // throw new BaseException("åªæå¾
审æ¹ç¶æçè®°å½æè½å®¡æ¹,åºåºæ¹æ¬¡:" + stockOutRecord.getOutboundBatches()); |
| | | //} |
| | | stockOutRecord.setApprovalStatus(approvalStatus); |
| | | stockOutRecordMapper.updateById(stockOutRecord); |
| | | // 审æ¹éè¿æ¶ï¼æ£ååºå |
| | |
| | | stockUninventoryMapper.updateSubtractStockUnInventory(stockUninventoryDto); |
| | | } |
| | | } |
| | | } |
| | | return ids.size(); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int batchReAudit(List<Long> ids) { |
| | | if (CollectionUtils.isEmpty(ids)) { |
| | | throw new BaseException("è¯·éæ©è³å°ä¸æ¡æ°æ®"); |
| | | } |
| | | for (Long id : ids) { |
| | | StockOutRecord stockOutRecord = stockOutRecordMapper.selectById(id); |
| | | if (stockOutRecord == null) { |
| | | throw new BaseException("åºåºè®°å½ä¸åå¨,æ æ³éæ°å®¡æ ¸!!!"); |
| | | } |
| | | if (!ReviewStatusEnum.REJECTED.getCode().equals(stockOutRecord.getApprovalStatus())) { |
| | | throw new BaseException("åªæé©³åç¶æçè®°å½æè½éæ°å®¡æ ¸,åºåºæ¹æ¬¡:" + stockOutRecord.getOutboundBatches()); |
| | | } |
| | | stockOutRecord.setApprovalStatus(ReviewStatusEnum.PENDING_REVIEW.getCode()); |
| | | stockOutRecordMapper.updateById(stockOutRecord); |
| | | } |
| | | return ids.size(); |
| | | } |
| | |
| | | package com.ruoyi.technology.controller; |
| | | |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.technology.bean.dto.TechnologyBomStructureDto; |
| | | import com.ruoyi.technology.bean.vo.TechnologyBomStructureVo; |
| | |
| | | |
| | | @PostMapping |
| | | @Operation(summary = "æ°å¢æä¿®æ¹BOMç»æ") |
| | | @Log(title = "æ°å¢æä¿®æ¹BOMç»æ", businessType = BusinessType.INSERT) |
| | | public R addOrUpdate(@RequestBody TechnologyBomStructureDto technologyBomStructureDto) { |
| | | return R.ok(technologyBomStructureService.addTechnologyBomStructure(technologyBomStructureDto)); |
| | | } |
| | |
| | | } |
| | | |
| | | @PostMapping("/add") |
| | | @Log(title = "å·¥åºæ°å¢", businessType = BusinessType.INSERT) |
| | | @Log(title = "æ°å¢å·¥åº", businessType = BusinessType.INSERT) |
| | | @Operation(summary = "æ°å¢å·¥åº") |
| | | public R add(@RequestBody TechnologyOperationDto technologyOperationDto) { |
| | | return technologyOperationService.add(technologyOperationDto); |
| | | } |
| | | |
| | | @PutMapping("/update") |
| | | @Log(title = "å·¥åºæ´æ°", businessType = BusinessType.UPDATE) |
| | | @Log(title = "ä¿®æ¹å·¥åº", businessType = BusinessType.UPDATE) |
| | | @Operation(summary = "ä¿®æ¹å·¥åº") |
| | | public R update(@RequestBody com.ruoyi.technology.pojo.TechnologyOperation technologyOperation) { |
| | | return technologyOperationService.update(technologyOperation); |
| | | return R.ok(technologyOperationService.updateById(technologyOperation)); |
| | | } |
| | | |
| | | @DeleteMapping("/batchDelete") |
| | | @Log(title = "å é¤å·¥åº", businessType = BusinessType.DELETE) |
| | | @Log(title = "æ¹éå é¤å·¥åº", businessType = BusinessType.DELETE) |
| | | @Operation(summary = "æ¹éå é¤å·¥åº") |
| | | public R batchDelete(@RequestBody List<Long> ids) { |
| | | return R.ok(technologyOperationService.batchDelete(ids)); |
| | |
| | | } |
| | | |
| | | @DeleteMapping("/batchDelete/{id}") |
| | | @Log(title = "å é¤å·¥åºåæ°", businessType = BusinessType.DELETE) |
| | | @Log(title = "Delete technology operation param", businessType = BusinessType.DELETE) |
| | | @Operation(summary = "å é¤å·¥åºåæ°") |
| | | public AjaxResult batchDelete(@PathVariable("id") Long id) { |
| | | return AjaxResult.success(technologyOperationParamService.batchDelete(id)); |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | 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.domain.R; |
| | | import com.ruoyi.technology.bean.dto.TechnologyRoutingDto; |
| | | import com.ruoyi.technology.bean.vo.TechnologyRoutingVo; |
| | |
| | | /** |
| | | * æ°å¢å·¥èºè·¯çº¿ã |
| | | */ |
| | | @PostMapping("/addTechRoute") |
| | | @Log(title = "å·¥èºè·¯çº¿", businessType = BusinessType.INSERT) |
| | | @Operation(summary = "æ°å¢å·¥èºè·¯çº¿") |
| | | @PostMapping("/addTechRoute") |
| | | public R add(@RequestBody TechnologyRouting technologyRouting) { |
| | | return R.ok(technologyRoutingService.saveTechnologyRouting(technologyRouting)); |
| | | } |
| | |
| | | /** |
| | | * ä¿®æ¹å·¥èºè·¯çº¿ã |
| | | */ |
| | | @PutMapping("/editTechRoute") |
| | | @Log(title = "å·¥èºè·¯çº¿", businessType = BusinessType.UPDATE) |
| | | @Operation(summary = "ä¿®æ¹å·¥èºè·¯çº¿") |
| | | @PutMapping("/editTechRoute") |
| | | public R edit(@RequestBody TechnologyRouting technologyRouting) { |
| | | return R.ok(technologyRoutingService.updateTechnologyRouting(technologyRouting)); |
| | | } |
| | |
| | | /** |
| | | * æ¹éå é¤å·¥èºè·¯çº¿ã |
| | | */ |
| | | @DeleteMapping("/delete") |
| | | @Log(title = "å·¥èºè·¯çº¿", businessType = BusinessType.DELETE) |
| | | @Operation(summary = "å é¤å·¥èºè·¯çº¿") |
| | | @DeleteMapping("/delete") |
| | | public R remove(@RequestBody List<Long> ids) { |
| | | return R.ok(technologyRoutingService.removeTechnologyRouting(ids)); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | 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.domain.R; |
| | | import com.ruoyi.technology.bean.dto.TechnologyRoutingOperationDto; |
| | | import com.ruoyi.technology.bean.vo.TechnologyRoutingOperationVo; |
| | |
| | | return R.ok(technologyRoutingOperationService.getTechnologyRoutingOperationInfo(id)); |
| | | } |
| | | |
| | | @PostMapping("/add") |
| | | @Log(title = "å·¥èºè·¯çº¿å·¥åº", businessType = BusinessType.INSERT) |
| | | @Operation(summary = "æ°å¢å·¥èºè·¯çº¿å·¥åº") |
| | | @PostMapping("/add") |
| | | public R add(@RequestBody TechnologyRoutingOperation technologyRoutingOperation) { |
| | | return R.ok(technologyRoutingOperationService.saveTechnologyRoutingOperation(technologyRoutingOperation)); |
| | | } |
| | | |
| | | @PutMapping |
| | | @Log(title = "å·¥èºè·¯çº¿å·¥åº", businessType = BusinessType.UPDATE) |
| | | @Operation(summary = "ä¿®æ¹å·¥èºè·¯çº¿å·¥åº") |
| | | @PutMapping |
| | | public R edit(@RequestBody TechnologyRoutingOperation technologyRoutingOperation) { |
| | | return R.ok(technologyRoutingOperationService.updateById(technologyRoutingOperation)); |
| | | } |
| | | |
| | | @DeleteMapping("/{id}") |
| | | @Log(title = "å·¥èºè·¯çº¿å·¥åº", businessType = BusinessType.DELETE) |
| | | @Operation(summary = "å é¤å·¥èºè·¯çº¿å·¥åº") |
| | | @DeleteMapping("/{id}") |
| | | public R remove(@PathVariable("id") Long id) { |
| | | return R.ok(technologyRoutingOperationService.removeTechnologyRoutingOperation(id)); |
| | | } |
| | | |
| | | @PostMapping ("/sort") |
| | | @Log(title = "å·¥èºè·¯çº¿å·¥åº", businessType = BusinessType.UPDATE) |
| | | @Operation(summary = "æåºå·¥èºè·¯çº¿å·¥åº") |
| | | @PostMapping ("/sort") |
| | | public R sort(@RequestBody TechnologyRoutingOperation technologyRoutingOperation) { |
| | | return R.ok(technologyRoutingOperationService.sort(technologyRoutingOperation)); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | 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.domain.R; |
| | | import com.ruoyi.technology.bean.dto.TechnologyRoutingOperationParamDto; |
| | | import com.ruoyi.technology.bean.dto.TechnologyRoutingOperationParamSyncDto; |
| | |
| | | |
| | | @PostMapping("/add") |
| | | @Operation(summary = "æ°å¢ç产订åå·¥èºè·¯çº¿å·¥åºåæ°") |
| | | @Log(title = "æ°å¢å·¥èºè·¯çº¿å·¥åºåæ°", businessType = BusinessType.INSERT) |
| | | public R<Boolean> add(@RequestBody TechnologyRoutingOperationParam technologyRoutingOperationParam) { |
| | | return R.ok(technologyRoutingOperationParamService.saveTechnologyRoutingOperationParam(technologyRoutingOperationParam)); |
| | | } |
| | | |
| | | @PutMapping |
| | | @Operation(summary = "ä¿®æ¹ç产订åå·¥èºè·¯çº¿å·¥åºåæ°") |
| | | @Log(title = "ä¿®æ¹å·¥èºè·¯çº¿å·¥åºåæ°", businessType = BusinessType.UPDATE) |
| | | public R<Boolean> edit(@RequestBody TechnologyRoutingOperationParam technologyRoutingOperationParam) { |
| | | return R.ok(technologyRoutingOperationParamService.saveTechnologyRoutingOperationParam(technologyRoutingOperationParam)); |
| | | } |
| | | |
| | | @DeleteMapping("/{id}") |
| | | @Operation(summary = "å é¤ç产订åå·¥èºè·¯çº¿å·¥åºåæ°") |
| | | @Log(title = "å é¤å·¥èºè·¯çº¿å·¥åºåæ°", businessType = BusinessType.DELETE) |
| | | public R<Boolean> remove(@PathVariable("id") Long id) { |
| | | return R.ok(technologyRoutingOperationParamService.removeTechnologyRoutingOperationParam(id)); |
| | | } |
| | | |
| | | @PostMapping("/sync") |
| | | @Operation(summary = "æå·¥èºè·¯çº¿å·¥åºåæ¥å·¥åºåæ°") |
| | | @Log(title = "忥工èºè·¯çº¿å·¥åºåæ°", businessType = BusinessType.UPDATE) |
| | | public R<Integer> sync(@RequestBody TechnologyRoutingOperationParamSyncDto syncDto) { |
| | | return R.ok(technologyRoutingOperationParamService.syncTechnologyRoutingOperationParam(syncDto)); |
| | | } |
| | |
| | | package com.ruoyi.technology.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | |
| | | |
| | | @Schema(description = "å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime createTime; |
| | | |
| | | @Schema(description = "ä¿®æ¹äºº") |
| | |
| | | |
| | | @Schema(description = "ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @Schema(description = "é¨é¨ID") |
| | |
| | | private String description; |
| | | |
| | | @Schema(description = "å½å
¥æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @Schema(description = "æ´æ°æ¶é´") |
| | |
| | | |
| | | R add(TechnologyOperationDto technologyOperationDto); |
| | | |
| | | R update(TechnologyOperation technologyOperation); |
| | | |
| | | String batchDelete(List<Long> ids); |
| | | |
| | | List<TechnologyOperationVo> listVo(); |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public R update(TechnologyOperation technologyOperation) { |
| | | if (technologyOperation.getId() == null) { |
| | | return R.fail("å·¥åºIDä¸è½ä¸ºç©º"); |
| | | } |
| | | boolean updated = technologyOperationMapper.update( |
| | | null, |
| | | Wrappers.<TechnologyOperation>lambdaUpdate() |
| | | .eq(TechnologyOperation::getId, technologyOperation.getId()) |
| | | .set(TechnologyOperation::getName, technologyOperation.getName()) |
| | | .set(TechnologyOperation::getNo, technologyOperation.getNo()) |
| | | .set(TechnologyOperation::getRemark, technologyOperation.getRemark()) |
| | | .set(TechnologyOperation::getSalaryQuota, technologyOperation.getSalaryQuota()) |
| | | .set(TechnologyOperation::getIsQuality, technologyOperation.getIsQuality()) |
| | | .set(TechnologyOperation::getIsProduction, technologyOperation.getIsProduction()) |
| | | .set(TechnologyOperation::getType, technologyOperation.getType()) |
| | | .set(TechnologyOperation::getDeviceLedgerId, technologyOperation.getDeviceLedgerId()) |
| | | ) > 0; |
| | | return updated ? R.ok() : R.fail("ä¿®æ¹å¤±è´¥"); |
| | | } |
| | | |
| | | /** |
| | | * å é¤å·¥åºåæ ¡éªæ¯å¦å·²è¢«BOMç»ææå·¥èºè·¯çº¿å¼ç¨ã |
| | | */ |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.common.utils.OrderUtils; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import com.ruoyi.technology.bean.dto.TechnologyRoutingDto; |
| | | import com.ruoyi.technology.bean.vo.TechnologyRoutingVo; |
| | | import com.ruoyi.production.mapper.ProductionOrderRoutingMapper; |
| | |
| | | |
| | | @Override |
| | | public Long saveTechnologyRouting(TechnologyRouting technologyRouting) { |
| | | String code = OrderUtils.countTodayByCreateTime(technologyRoutingMapper, "GYLX", "process_route_code", technologyRouting.getCreateTime() != null ? technologyRouting.getCreateTime() : LocalDateTime.now()); |
| | | String code = OrderUtils.countTodayByCreateTime(technologyRoutingMapper, "GYLX", "process_route_code"); |
| | | technologyRouting.setProcessRouteCode(code); |
| | | technologyRoutingMapper.insert(technologyRouting); |
| | | // 带å
¥bom产åç»æ |
| | |
| | | package com.ruoyi.warehouse.controller; |
| | | |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.warehouse.pojo.DocumentationFile; |
| | | import com.ruoyi.warehouse.service.DocumentationFileService; |
| | |
| | | * @param documentationFile |
| | | * @return |
| | | */ |
| | | @Log(title = "æ°å¢ææ¡£æä»¶", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody DocumentationFile documentationFile) { |
| | | return AjaxResult.success(documentationFileService.save(documentationFile)); |
| | |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @Log(title = "å é¤ææ¡£æä»¶", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/del") |
| | | public AjaxResult delDocumentationFile(@RequestBody List<Long> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | # 项ç®ç¸å
³é
ç½® |
| | | 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 |
| | | # åå审æ¹ç¼å·åç¼(é
ç½®æä»¶åç¼å½å) |
| | | approvalNumberPrefix: NEW |
| | | |
| | | # ä¸ªæ¨ Unipush é
ç½® |
| | | getui: |
| | | appId: PfjyAAE0FK64FaO1w2CMb1 |
| | | appKey: zTMb831OEL6J4GK1uE3Ob4 |
| | | masterSecret: K1GFtsv42v61tXGnF7SGE5 |
| | | domain: https://restapi.getui.cn/v2/ |
| | | # 离线æ¨é使ç¨çå
å/ç»ä»¶å |
| | | intentComponent: uni.app.UNI099A590/io.dcloud.PandoraEntry |
| | | |
| | | # å¼åç¯å¢é
ç½® |
| | | server: |
| | | # æå¡å¨çHTTP端å£ï¼é»è®¤ä¸º8080 |
| | | port: 9003 |
| | | 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: jxc |
| | | # ç¨æ·é
ç½® |
| | | 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-btyx-pro?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 é
ç½® |
| | | data: |
| | | # redis é
ç½® |
| | | redis: |
| | | # å°å |
| | | # host: 127.0.0.1 |
| | | host: 172.17.0.1 |
| | | # 端å£ï¼é»è®¤ä¸º6379 |
| | | port: 6379 |
| | | # æ°æ®åºç´¢å¼ |
| | | database: 15 |
| | | # å¯ç |
| | | # password: root2022! |
| | | password: |
| | | |
| | | # è¿æ¥è¶
æ¶æ¶é´ |
| | | timeout: 10s |
| | | lettuce: |
| | | pool: |
| | | # è¿æ¥æ± ä¸çæå°ç©ºé²è¿æ¥ |
| | | min-idle: 0 |
| | | # è¿æ¥æ± ä¸çæå¤§ç©ºé²è¿æ¥ |
| | | max-idle: 8 |
| | | # è¿æ¥æ± çæå¤§æ°æ®åºè¿æ¥æ° |
| | | max-active: 8 |
| | | # #è¿æ¥æ± æå¤§é»å¡çå¾
æ¶é´ï¼ä½¿ç¨è´å¼è¡¨ç¤ºæ²¡æéå¶ï¼ |
| | | max-wait: -1ms |
| | | |
| | | # Quartz宿¶ä»»å¡é
ç½®ï¼æ°å¢é¨åï¼ |
| | | quartz: |
| | | job-store-type: jdbc # ä½¿ç¨æ°æ®åºåå¨ |
| | | jdbc: |
| | | initialize-schema: never # 馿¬¡è¿è¡æ¶èªå¨åå»ºè¡¨ç»æï¼æååæ¹ä¸ºnever |
| | | schema: classpath:org/quartz/impl/jdbcjobstore/tables_mysql_innodb.sql # MySQLè¡¨ç»æèæ¬ |
| | | properties: |
| | | org: |
| | | quartz: |
| | | scheduler: |
| | | instanceName: RuoYiScheduler |
| | | instanceId: AUTO |
| | | jobStore: |
| | | class: org.quartz.impl.jdbcjobstore.JobStoreTX |
| | | driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate # MySQLéé
|
| | | tablePrefix: qrtz_ # 表ååç¼ï¼ä¸èæ¬ä¸è´ |
| | | isClustered: false # åèç¹æ¨¡å¼ï¼éç¾¤éæ¹ä¸ºtrueï¼ |
| | | clusterCheckinInterval: 10000 |
| | | txIsolationLevelSerializable: true |
| | | threadPool: |
| | | class: org.quartz.simpl.SimpleThreadPool |
| | | threadCount: 10 # çº¿ç¨æ± å¤§å° |
| | | threadPriority: 5 |
| | | makeThreadsDaemons: true |
| | | updateCheck: false # å
³éçæ¬æ£æ¥ |
| | | # tokené
ç½® |
| | | token: |
| | | # 令çèªå®ä¹æ è¯ |
| | | header: Authorization |
| | | # 令çå¯é¥ |
| | | secret: xpAVjhCjQDaDB7mjPAzMDSbQWXNu2zYkTdDNUsPMS5Xx8QMmQVYN7n74eZrYJxDJ |
| | | # ä»¤çæææï¼é»è®¤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 # æ£å¼ç®å½ |
| | | path: /javaWork/product-inventory-management/file # ä¸ä¼ ç®å½ |
| | | urlPrefix: /prod-api/common # 龿¥åç¼ |
| | | domain: http://1.15.17.182:9056 # åååç¼ |
| | | expired: 120 # è¿ææ¶é´(åä½:åé) |
| | | useLimit: 10 # ä½¿ç¨æ¬¡æ° |
| | | compress: true # æ¯å¦å缩 |
| | | needCompressSize: 10MB # å缩éå¼ |
| | | compressQuality: 0.5 # å缩质é(0.0-1.0) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | # 项ç®ç¸å
³é
ç½® |
| | | 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 |
| | | # åå审æ¹ç¼å·åç¼(é
ç½®æä»¶åç¼å½å) |
| | | approvalNumberPrefix: NEW |
| | | |
| | | # ä¸ªæ¨ Unipush é
ç½® |
| | | getui: |
| | | appId: PfjyAAE0FK64FaO1w2CMb1 |
| | | appKey: zTMb831OEL6J4GK1uE3Ob4 |
| | | masterSecret: K1GFtsv42v61tXGnF7SGE5 |
| | | domain: https://restapi.getui.cn/v2/ |
| | | # 离线æ¨é使ç¨çå
å/ç»ä»¶å |
| | | intentComponent: uni.app.UNI099A590/io.dcloud.PandoraEntry |
| | | |
| | | # å¼åç¯å¢é
ç½® |
| | | server: |
| | | # æå¡å¨çHTTP端å£ï¼é»è®¤ä¸º8080 |
| | | port: 9002 |
| | | servlet: |
| | | # åºç¨ç访é®è·¯å¾ |
| | | context-path: / |
| | | tomcat: |
| | | # tomcatçURIç¼ç |
| | | uri-encoding: UTF-8 |
| | | # è¿æ¥æ°æ»¡åçæéæ°ï¼é»è®¤ä¸º100 |
| | | accept-count: 1000 |
| | | max-swallow-size: -1 # -1 表示ä¸éå¶ |
| | | max-http-form-post-size: -1 # POST 请æ±ä½ä¸éå¶ |
| | | connection-timeout: 60000 # è¿æ¥è¶
æ¶æ¶é´(毫ç§) |
| | | 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: uploadPath |
| | | # ç¨æ·é
ç½® |
| | | 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-ddgw?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | username: root |
| | | password: 200381 |
| | | # ä»åºæ°æ®æº |
| | | 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 |
| | | data: |
| | | # redis é
ç½® |
| | | redis: |
| | | # å°å |
| | | host: localhost |
| | | # host: 172.17.0.1 |
| | | # 端å£ï¼é»è®¤ä¸º6379 |
| | | port: 6379 |
| | | # æ°æ®åºç´¢å¼ |
| | | database: 0 |
| | | # å¯ç |
| | | # password: root2022! |
| | | password: |
| | | |
| | | # è¿æ¥è¶
æ¶æ¶é´ |
| | | timeout: 10s |
| | | lettuce: |
| | | pool: |
| | | # è¿æ¥æ± ä¸çæå°ç©ºé²è¿æ¥ |
| | | min-idle: 0 |
| | | # è¿æ¥æ± ä¸çæå¤§ç©ºé²è¿æ¥ |
| | | max-idle: 8 |
| | | # è¿æ¥æ± çæå¤§æ°æ®åºè¿æ¥æ° |
| | | max-active: 8 |
| | | # #è¿æ¥æ± æå¤§é»å¡çå¾
æ¶é´ï¼ä½¿ç¨è´å¼è¡¨ç¤ºæ²¡æéå¶ï¼ |
| | | max-wait: -1ms |
| | | # Quartz宿¶ä»»å¡é
ç½®ï¼æ°å¢é¨åï¼ |
| | | quartz: |
| | | job-store-type: jdbc # ä½¿ç¨æ°æ®åºåå¨ |
| | | jdbc: |
| | | initialize-schema: never # 馿¬¡è¿è¡æ¶èªå¨åå»ºè¡¨ç»æï¼æååæ¹ä¸ºnever |
| | | schema: classpath:org/quartz/impl/jdbcjobstore/tables_mysql_innodb.sql # MySQLè¡¨ç»æèæ¬ |
| | | properties: |
| | | org: |
| | | quartz: |
| | | scheduler: |
| | | instanceName: RuoYiScheduler |
| | | instanceId: AUTO |
| | | jobStore: |
| | | class: org.quartz.impl.jdbcjobstore.JobStoreTX |
| | | driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate # MySQLéé
|
| | | tablePrefix: qrtz_ # 表ååç¼ï¼ä¸èæ¬ä¸è´ |
| | | isClustered: false # åèç¹æ¨¡å¼ï¼éç¾¤éæ¹ä¸ºtrueï¼ |
| | | clusterCheckinInterval: 10000 |
| | | txIsolationLevelSerializable: true |
| | | threadPool: |
| | | class: org.quartz.simpl.SimpleThreadPool |
| | | threadCount: 10 # çº¿ç¨æ± å¤§å° |
| | | threadPriority: 5 |
| | | makeThreadsDaemons: true |
| | | updateCheck: false # å
³éçæ¬æ£æ¥ |
| | | # tokené
ç½® |
| | | token: |
| | | # 令çèªå®ä¹æ è¯ |
| | | header: Authorization |
| | | # 令çå¯é¥ |
| | | secret: xpAVjhCjQDaDB7mjPAzMDSbQWXNu2zYkTdDNUsPMS5Xx8QMmQVYN7n74eZrYJxDJ |
| | | # ä»¤çæææï¼é»è®¤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 # æ£å¼ç®å½ åæå é¤ |
| | | path: /javaWork/product-inventory-management/file/path/uploads # ä¸ä¼ ç®å½ |
| | | urlPrefix: /prod-api/common # 龿¥åç¼ |
| | | domain: http://36.137.101.88:9001 # åååç¼ |
| | | expired: 120 # è¿ææ¶é´(åä½:åé) |
| | | useLimit: 10 # ä½¿ç¨æ¬¡æ° |
| | | compress: true # æ¯å¦å缩 |
| | | needCompressSize: 10MB # å缩éå¼ |
| | | compressQuality: 0.5 # å缩质é(0.0-1.0) |
| | | knowledge: |
| | | one: D:\æ°ç大ç½ç´ ä¼ä¸äº§åä½ç³»è¯´æææ¡£.md |
| | |
| | | # çæå¹´ä»½ |
| | | copyrightYear: 2025 |
| | | # æä»¶è·¯å¾ 示ä¾ï¼ Windowsé
ç½®D:/ruoyi/uploadPathï¼Linuxé
ç½® /home/ruoyi/uploadPathï¼ |
| | | profile: D:/ruoyi/uploadPath |
| | | profile: /javaWork/product-inventory-management/file |
| | | |
| | | # è·åipå°åå¼å
³ |
| | | addressEnabled: false |
| | | # éªè¯ç ç±»å math æ°åè®¡ç® char å符éªè¯ |
| | | captchaType: math |
| | | # åå审æ¹ç¼å·åç¼(é
ç½®æä»¶åç¼å½å) |
| | | approvalNumberPrefix: DEV |
| | | approvalNumberPrefix: NEW |
| | | |
| | | # ä¸ªæ¨ Unipush é
ç½® |
| | | getui: |
| | |
| | | # å¼åç¯å¢é
ç½® |
| | | server: |
| | | # æå¡å¨çHTTP端å£ï¼é»è®¤ä¸º8080 |
| | | port: 7005 |
| | | port: 9003 |
| | | servlet: |
| | | # åºç¨ç访é®è·¯å¾ |
| | | context-path: / |
| | |
| | | # æ¥å¿é
ç½® |
| | | logging: |
| | | level: |
| | | org.quartz: DEBUG |
| | | com.ruoyi: warn |
| | | org.springframework: warn |
| | | |
| | |
| | | accessKey: admin |
| | | secretKey: 12345678 |
| | | preview-expiry: 24 # é¢è§å°åé»è®¤24å°æ¶ |
| | | default-bucket: uploadPath |
| | | default-bucket: jxc |
| | | # ç¨æ·é
ç½® |
| | | user: |
| | | password: |
| | |
| | | druid: |
| | | # ä¸»åºæ°æ®æº |
| | | master: |
| | | url: jdbc:mysql://localhost:3306/product-inventory-management-bdpro?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | url: jdbc:mysql://localhost:3306/product-inventory-management-hnhb?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | username: root |
| | | password: 123456 |
| | | password: 200381 |
| | | # ä»åºæ°æ®æº |
| | | slave: |
| | | # 仿°æ®æºå¼å
³/é»è®¤å
³é |
| | |
| | | restart: |
| | | # çé¨ç½²å¼å
³ |
| | | enabled: false |
| | | # redis é
ç½® |
| | | data: |
| | | mongodb: |
| | | uri: mongodb://114.132.189.42:9028/chat_memory_db |
| | | # redis é
ç½® |
| | | redis: |
| | | # å°å |
| | | host: 127.0.0.1 |
| | | # host: 172.17.0.1 |
| | | # host: 172.17.0.1 |
| | | # 端å£ï¼é»è®¤ä¸º6379 |
| | | port: 6379 |
| | | # æ°æ®åºç´¢å¼ |
| | | database: 0 |
| | | database: 15 |
| | | # å¯ç |
| | | # password: root2022! |
| | | password: |
| | |
| | | max-active: 8 |
| | | # #è¿æ¥æ± æå¤§é»å¡çå¾
æ¶é´ï¼ä½¿ç¨è´å¼è¡¨ç¤ºæ²¡æéå¶ï¼ |
| | | max-wait: -1ms |
| | | |
| | | # Quartz宿¶ä»»å¡é
ç½®ï¼æ°å¢é¨åï¼ |
| | | quartz: |
| | | job-store-type: jdbc # ä½¿ç¨æ°æ®åºåå¨ |
| | |
| | | threadPriority: 5 |
| | | makeThreadsDaemons: true |
| | | updateCheck: false # å
³éçæ¬æ£æ¥ |
| | | |
| | | # tokené
ç½® |
| | | token: |
| | | # 令çèªå®ä¹æ è¯ |
| | |
| | | |
| | | # æä»¶ä¸ä¼ é
ç½® |
| | | file: |
| | | temp-dir: D:/ruoyi/temp/uploads # 临æ¶ç®å½ åæå é¤ |
| | | upload-dir: D:/ruoyi/prod/uploads # æ£å¼ç®å½ åæå é¤ |
| | | path: D:/ruoyi/prod/uploads # ä¸ä¼ ç®å½ |
| | | urlPrefix: /common # 龿¥åç¼ |
| | | domain: http://127.0.0.1:7006 # åååç¼ |
| | | temp-dir: /javaWork/product-inventory-management/file/temp/uploads # 临æ¶ç®å½ |
| | | upload-dir: /javaWork/product-inventory-management/file/prod/uploads # æ£å¼ç®å½ |
| | | path: /javaWork/product-inventory-management/file # ä¸ä¼ ç®å½ |
| | | urlPrefix: /prod-api/common # 龿¥åç¼ |
| | | domain: http://1.15.17.182:9056 # åååç¼ |
| | | expired: 120 # è¿ææ¶é´(åä½:åé) |
| | | useLimit: 10 # ä½¿ç¨æ¬¡æ° |
| | | compress: true # æ¯å¦å缩 |
| | | needCompressSize: 10MB # å缩éå¼ |
| | | compressQuality: 0.5 # å缩质é(0.0-1.0) |
| | | knowledge: |
| | | one: D:\æ°ç大ç½ç´ ä¼ä¸äº§åä½ç³»è¯´æææ¡£.md |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | # 项ç®ç¸å
³é
ç½® |
| | | 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 |
| | | # åå审æ¹ç¼å·åç¼(é
ç½®æä»¶åç¼å½å) |
| | | approvalNumberPrefix: NEW |
| | | |
| | | # ä¸ªæ¨ Unipush é
ç½® |
| | | getui: |
| | | appId: PfjyAAE0FK64FaO1w2CMb1 |
| | | appKey: zTMb831OEL6J4GK1uE3Ob4 |
| | | masterSecret: K1GFtsv42v61tXGnF7SGE5 |
| | | domain: https://restapi.getui.cn/v2/ |
| | | # 离线æ¨é使ç¨çå
å/ç»ä»¶å |
| | | intentComponent: uni.app.UNI099A590/io.dcloud.PandoraEntry |
| | | |
| | | # å¼åç¯å¢é
ç½® |
| | | server: |
| | | # æå¡å¨çHTTP端å£ï¼é»è®¤ä¸º8080 |
| | | port: 9002 |
| | | 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: jxc |
| | | # ç¨æ·é
ç½® |
| | | 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://36.213.180.217:11101/product-inventory-management-dtzg?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 é
ç½® |
| | | data: |
| | | # redis é
ç½® |
| | | redis: |
| | | # å°å |
| | | # host: 127.0.0.1 |
| | | host: 172.17.0.1 |
| | | # 端å£ï¼é»è®¤ä¸º6379 |
| | | port: 11102 |
| | | # æ°æ®åºç´¢å¼ |
| | | database: 0 |
| | | # å¯ç |
| | | # password: root2022! |
| | | password: |
| | | |
| | | # è¿æ¥è¶
æ¶æ¶é´ |
| | | timeout: 10s |
| | | lettuce: |
| | | pool: |
| | | # è¿æ¥æ± ä¸çæå°ç©ºé²è¿æ¥ |
| | | min-idle: 0 |
| | | # è¿æ¥æ± ä¸çæå¤§ç©ºé²è¿æ¥ |
| | | max-idle: 8 |
| | | # è¿æ¥æ± çæå¤§æ°æ®åºè¿æ¥æ° |
| | | max-active: 8 |
| | | # #è¿æ¥æ± æå¤§é»å¡çå¾
æ¶é´ï¼ä½¿ç¨è´å¼è¡¨ç¤ºæ²¡æéå¶ï¼ |
| | | max-wait: -1ms |
| | | |
| | | # Quartz宿¶ä»»å¡é
ç½®ï¼æ°å¢é¨åï¼ |
| | | quartz: |
| | | job-store-type: jdbc # ä½¿ç¨æ°æ®åºåå¨ |
| | | jdbc: |
| | | initialize-schema: never # 馿¬¡è¿è¡æ¶èªå¨åå»ºè¡¨ç»æï¼æååæ¹ä¸ºnever |
| | | schema: classpath:org/quartz/impl/jdbcjobstore/tables_mysql_innodb.sql # MySQLè¡¨ç»æèæ¬ |
| | | properties: |
| | | org: |
| | | quartz: |
| | | scheduler: |
| | | instanceName: RuoYiScheduler |
| | | instanceId: AUTO |
| | | jobStore: |
| | | class: org.quartz.impl.jdbcjobstore.JobStoreTX |
| | | driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate # MySQLéé
|
| | | tablePrefix: qrtz_ # 表ååç¼ï¼ä¸èæ¬ä¸è´ |
| | | isClustered: false # åèç¹æ¨¡å¼ï¼éç¾¤éæ¹ä¸ºtrueï¼ |
| | | clusterCheckinInterval: 10000 |
| | | txIsolationLevelSerializable: true |
| | | threadPool: |
| | | class: org.quartz.simpl.SimpleThreadPool |
| | | threadCount: 10 # çº¿ç¨æ± å¤§å° |
| | | threadPriority: 5 |
| | | makeThreadsDaemons: true |
| | | updateCheck: false # å
³éçæ¬æ£æ¥ |
| | | # tokené
ç½® |
| | | token: |
| | | # 令çèªå®ä¹æ è¯ |
| | | header: Authorization |
| | | # 令çå¯é¥ |
| | | secret: xpAVjhCjQDaDB7mjPAzMDSbQWXNu2zYkTdDNUsPMS5Xx8QMmQVYN7n74eZrYJxDJ |
| | | # ä»¤çæææï¼é»è®¤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 # æ£å¼ç®å½ |
| | | path: /javaWork/product-inventory-management/file # ä¸ä¼ ç®å½ |
| | | urlPrefix: /prod-api/common # 龿¥åç¼ |
| | | domain: http://36.213.180.217:9001 # åååç¼ |
| | | expired: 120 # è¿ææ¶é´(åä½:åé) |
| | | useLimit: 10 # ä½¿ç¨æ¬¡æ° |
| | | compress: true # æ¯å¦å缩 |
| | | needCompressSize: 10MB # å缩éå¼ |
| | | compressQuality: 0.5 # å缩质é(0.0-1.0) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | # 项ç®ç¸å
³é
ç½® |
| | | 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 |
| | | # åå审æ¹ç¼å·åç¼(é
ç½®æä»¶åç¼å½å) |
| | | approvalNumberPrefix: NEW |
| | | |
| | | # ä¸ªæ¨ Unipush é
ç½® |
| | | getui: |
| | | appId: PfjyAAE0FK64FaO1w2CMb1 |
| | | appKey: zTMb831OEL6J4GK1uE3Ob4 |
| | | masterSecret: K1GFtsv42v61tXGnF7SGE5 |
| | | domain: https://restapi.getui.cn/v2/ |
| | | # 离线æ¨é使ç¨çå
å/ç»ä»¶å |
| | | intentComponent: uni.app.UNI099A590/io.dcloud.PandoraEntry |
| | | |
| | | # å¼åç¯å¢é
ç½® |
| | | server: |
| | | # æå¡å¨çHTTP端å£ï¼é»è®¤ä¸º8080 |
| | | port: 9002 |
| | | 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: jxc |
| | | # ç¨æ·é
ç½® |
| | | 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://36.213.180.217:11101/product-inventory-management-dyzn?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 é
ç½® |
| | | data: |
| | | # redis é
ç½® |
| | | redis: |
| | | # å°å |
| | | # host: 127.0.0.1 |
| | | host: 36.213.180.217 |
| | | # 端å£ï¼é»è®¤ä¸º6379 |
| | | port: 11102 |
| | | # æ°æ®åºç´¢å¼ |
| | | database: 0 |
| | | # å¯ç |
| | | # password: root2022! |
| | | password: |
| | | |
| | | # è¿æ¥è¶
æ¶æ¶é´ |
| | | timeout: 10s |
| | | lettuce: |
| | | pool: |
| | | # è¿æ¥æ± ä¸çæå°ç©ºé²è¿æ¥ |
| | | min-idle: 0 |
| | | # è¿æ¥æ± ä¸çæå¤§ç©ºé²è¿æ¥ |
| | | max-idle: 8 |
| | | # è¿æ¥æ± çæå¤§æ°æ®åºè¿æ¥æ° |
| | | max-active: 8 |
| | | # #è¿æ¥æ± æå¤§é»å¡çå¾
æ¶é´ï¼ä½¿ç¨è´å¼è¡¨ç¤ºæ²¡æéå¶ï¼ |
| | | max-wait: -1ms |
| | | |
| | | # Quartz宿¶ä»»å¡é
ç½®ï¼æ°å¢é¨åï¼ |
| | | quartz: |
| | | job-store-type: jdbc # ä½¿ç¨æ°æ®åºåå¨ |
| | | jdbc: |
| | | initialize-schema: never # 馿¬¡è¿è¡æ¶èªå¨åå»ºè¡¨ç»æï¼æååæ¹ä¸ºnever |
| | | schema: classpath:org/quartz/impl/jdbcjobstore/tables_mysql_innodb.sql # MySQLè¡¨ç»æèæ¬ |
| | | properties: |
| | | org: |
| | | quartz: |
| | | scheduler: |
| | | instanceName: RuoYiScheduler |
| | | instanceId: AUTO |
| | | jobStore: |
| | | class: org.quartz.impl.jdbcjobstore.JobStoreTX |
| | | driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate # MySQLéé
|
| | | tablePrefix: qrtz_ # 表ååç¼ï¼ä¸èæ¬ä¸è´ |
| | | isClustered: false # åèç¹æ¨¡å¼ï¼éç¾¤éæ¹ä¸ºtrueï¼ |
| | | clusterCheckinInterval: 10000 |
| | | txIsolationLevelSerializable: true |
| | | threadPool: |
| | | class: org.quartz.simpl.SimpleThreadPool |
| | | threadCount: 10 # çº¿ç¨æ± å¤§å° |
| | | threadPriority: 5 |
| | | makeThreadsDaemons: true |
| | | updateCheck: false # å
³éçæ¬æ£æ¥ |
| | | # tokené
ç½® |
| | | token: |
| | | # 令çèªå®ä¹æ è¯ |
| | | header: Authorization |
| | | # 令çå¯é¥ |
| | | secret: xpAVjhCjQDaDB7mjPAzMDSbQWXNu2zYkTdDNUsPMS5Xx8QMmQVYN7n74eZrYJxDJ |
| | | # ä»¤çæææï¼é»è®¤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 # æ£å¼ç®å½ |
| | | path: /javaWork/product-inventory-management/file # ä¸ä¼ ç®å½ |
| | | urlPrefix: /prod-api/common # 龿¥åç¼ |
| | | # domain: http://192.168.1.32:9001 # åååç¼ |
| | | domain: http://36.213.180.217:9518 # åååç¼ |
| | | expired: 120 # è¿ææ¶é´(åä½:åé) |
| | | useLimit: 10 # ä½¿ç¨æ¬¡æ° |
| | | compress: true # æ¯å¦å缩 |
| | | needCompressSize: 10MB # å缩éå¼ |
| | | compressQuality: 0.5 # å缩质é(0.0-1.0) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | # 项ç®ç¸å
³é
ç½® |
| | | 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 |
| | | # åå审æ¹ç¼å·åç¼(é
ç½®æä»¶åç¼å½å) |
| | | approvalNumberPrefix: NEW |
| | | |
| | | # ä¸ªæ¨ Unipush é
ç½® |
| | | getui: |
| | | appId: PfjyAAE0FK64FaO1w2CMb1 |
| | | appKey: zTMb831OEL6J4GK1uE3Ob4 |
| | | masterSecret: K1GFtsv42v61tXGnF7SGE5 |
| | | domain: https://restapi.getui.cn/v2/ |
| | | # 离线æ¨é使ç¨çå
å/ç»ä»¶å |
| | | intentComponent: uni.app.UNI099A590/io.dcloud.PandoraEntry |
| | | |
| | | # å¼åç¯å¢é
ç½® |
| | | server: |
| | | # æå¡å¨çHTTP端å£ï¼é»è®¤ä¸º8080 |
| | | port: 9003 |
| | | 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: jxc |
| | | # ç¨æ·é
ç½® |
| | | 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:9002/product-inventory-management-hyjc-pro?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | username: root |
| | | password: hyjc@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 é
ç½® |
| | | data: |
| | | # redis é
ç½® |
| | | redis: |
| | | # å°å |
| | | # host: 127.0.0.1 |
| | | host: 172.17.0.1 |
| | | # 端å£ï¼é»è®¤ä¸º6379 |
| | | port: 6379 |
| | | # æ°æ®åºç´¢å¼ |
| | | database: 0 |
| | | # å¯ç |
| | | # password: root2022! |
| | | password: |
| | | |
| | | # è¿æ¥è¶
æ¶æ¶é´ |
| | | timeout: 10s |
| | | lettuce: |
| | | pool: |
| | | # è¿æ¥æ± ä¸çæå°ç©ºé²è¿æ¥ |
| | | min-idle: 0 |
| | | # è¿æ¥æ± ä¸çæå¤§ç©ºé²è¿æ¥ |
| | | max-idle: 8 |
| | | # è¿æ¥æ± çæå¤§æ°æ®åºè¿æ¥æ° |
| | | max-active: 8 |
| | | # #è¿æ¥æ± æå¤§é»å¡çå¾
æ¶é´ï¼ä½¿ç¨è´å¼è¡¨ç¤ºæ²¡æéå¶ï¼ |
| | | max-wait: -1ms |
| | | |
| | | # Quartz宿¶ä»»å¡é
ç½®ï¼æ°å¢é¨åï¼ |
| | | quartz: |
| | | job-store-type: jdbc # ä½¿ç¨æ°æ®åºåå¨ |
| | | jdbc: |
| | | initialize-schema: never # 馿¬¡è¿è¡æ¶èªå¨åå»ºè¡¨ç»æï¼æååæ¹ä¸ºnever |
| | | schema: classpath:org/quartz/impl/jdbcjobstore/tables_mysql_innodb.sql # MySQLè¡¨ç»æèæ¬ |
| | | properties: |
| | | org: |
| | | quartz: |
| | | scheduler: |
| | | instanceName: RuoYiScheduler |
| | | instanceId: AUTO |
| | | jobStore: |
| | | class: org.quartz.impl.jdbcjobstore.JobStoreTX |
| | | driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate # MySQLéé
|
| | | tablePrefix: qrtz_ # 表ååç¼ï¼ä¸èæ¬ä¸è´ |
| | | isClustered: false # åèç¹æ¨¡å¼ï¼éç¾¤éæ¹ä¸ºtrueï¼ |
| | | clusterCheckinInterval: 10000 |
| | | txIsolationLevelSerializable: true |
| | | threadPool: |
| | | class: org.quartz.simpl.SimpleThreadPool |
| | | threadCount: 10 # çº¿ç¨æ± å¤§å° |
| | | threadPriority: 5 |
| | | makeThreadsDaemons: true |
| | | updateCheck: false # å
³éçæ¬æ£æ¥ |
| | | # tokené
ç½® |
| | | token: |
| | | # 令çèªå®ä¹æ è¯ |
| | | header: Authorization |
| | | # 令çå¯é¥ |
| | | secret: xpAVjhCjQDaDB7mjPAzMDSbQWXNu2zYkTdDNUsPMS5Xx8QMmQVYN7n74eZrYJxDJ |
| | | # ä»¤çæææï¼é»è®¤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 # æ£å¼ç®å½ |
| | | path: /javaWork/product-inventory-management/file # ä¸ä¼ ç®å½ |
| | | urlPrefix: /prod-api/common # 龿¥åç¼ |
| | | domain: http://36.138.94.178:9001 # åååç¼ |
| | | expired: 120 # è¿ææ¶é´(åä½:åé) |
| | | useLimit: 10 # ä½¿ç¨æ¬¡æ° |
| | | compress: true # æ¯å¦å缩 |
| | | needCompressSize: 10MB # å缩éå¼ |
| | | compressQuality: 0.5 # å缩质é(0.0-1.0) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | # 项ç®ç¸å
³é
ç½® |
| | | 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 |
| | | # åå审æ¹ç¼å·åç¼(é
ç½®æä»¶åç¼å½å) |
| | | approvalNumberPrefix: NEW |
| | | |
| | | # ä¸ªæ¨ Unipush é
ç½® |
| | | getui: |
| | | appId: PfjyAAE0FK64FaO1w2CMb1 |
| | | appKey: zTMb831OEL6J4GK1uE3Ob4 |
| | | masterSecret: K1GFtsv42v61tXGnF7SGE5 |
| | | domain: https://restapi.getui.cn/v2/ |
| | | # 离线æ¨é使ç¨çå
å/ç»ä»¶å |
| | | intentComponent: uni.app.UNI099A590/io.dcloud.PandoraEntry |
| | | |
| | | # å¼åç¯å¢é
ç½® |
| | | server: |
| | | # æå¡å¨çHTTP端å£ï¼é»è®¤ä¸º8080 |
| | | port: 9003 |
| | | 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: jxc |
| | | # ç¨æ·é
ç½® |
| | | 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:9002/product-inventory-management-hylq-pro?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | username: root |
| | | password: hylq@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 é
ç½® |
| | | data: |
| | | # redis é
ç½® |
| | | redis: |
| | | # å°å |
| | | # host: 127.0.0.1 |
| | | host: 172.17.0.1 |
| | | # 端å£ï¼é»è®¤ä¸º6379 |
| | | port: 6379 |
| | | # æ°æ®åºç´¢å¼ |
| | | database: 0 |
| | | # å¯ç |
| | | # password: root2022! |
| | | password: |
| | | |
| | | # è¿æ¥è¶
æ¶æ¶é´ |
| | | timeout: 10s |
| | | lettuce: |
| | | pool: |
| | | # è¿æ¥æ± ä¸çæå°ç©ºé²è¿æ¥ |
| | | min-idle: 0 |
| | | # è¿æ¥æ± ä¸çæå¤§ç©ºé²è¿æ¥ |
| | | max-idle: 8 |
| | | # è¿æ¥æ± çæå¤§æ°æ®åºè¿æ¥æ° |
| | | max-active: 8 |
| | | # #è¿æ¥æ± æå¤§é»å¡çå¾
æ¶é´ï¼ä½¿ç¨è´å¼è¡¨ç¤ºæ²¡æéå¶ï¼ |
| | | max-wait: -1ms |
| | | |
| | | # Quartz宿¶ä»»å¡é
ç½®ï¼æ°å¢é¨åï¼ |
| | | quartz: |
| | | job-store-type: jdbc # ä½¿ç¨æ°æ®åºåå¨ |
| | | jdbc: |
| | | initialize-schema: never # 馿¬¡è¿è¡æ¶èªå¨åå»ºè¡¨ç»æï¼æååæ¹ä¸ºnever |
| | | schema: classpath:org/quartz/impl/jdbcjobstore/tables_mysql_innodb.sql # MySQLè¡¨ç»æèæ¬ |
| | | properties: |
| | | org: |
| | | quartz: |
| | | scheduler: |
| | | instanceName: RuoYiScheduler |
| | | instanceId: AUTO |
| | | jobStore: |
| | | class: org.quartz.impl.jdbcjobstore.JobStoreTX |
| | | driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate # MySQLéé
|
| | | tablePrefix: qrtz_ # 表ååç¼ï¼ä¸èæ¬ä¸è´ |
| | | isClustered: false # åèç¹æ¨¡å¼ï¼éç¾¤éæ¹ä¸ºtrueï¼ |
| | | clusterCheckinInterval: 10000 |
| | | txIsolationLevelSerializable: true |
| | | threadPool: |
| | | class: org.quartz.simpl.SimpleThreadPool |
| | | threadCount: 10 # çº¿ç¨æ± å¤§å° |
| | | threadPriority: 5 |
| | | makeThreadsDaemons: true |
| | | updateCheck: false # å
³éçæ¬æ£æ¥ |
| | | # tokené
ç½® |
| | | token: |
| | | # 令çèªå®ä¹æ è¯ |
| | | header: Authorization |
| | | # 令çå¯é¥ |
| | | secret: xpAVjhCjQDaDB7mjPAzMDSbQWXNu2zYkTdDNUsPMS5Xx8QMmQVYN7n74eZrYJxDJ |
| | | # ä»¤çæææï¼é»è®¤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 # æ£å¼ç®å½ |
| | | path: /javaWork/product-inventory-management/file # ä¸ä¼ ç®å½ |
| | | urlPrefix: /prod-api/common # 龿¥åç¼ |
| | | domain: http://36.139.202.111:9001 # åååç¼ |
| | | expired: 120 # è¿ææ¶é´(åä½:åé) |
| | | useLimit: 10 # ä½¿ç¨æ¬¡æ° |
| | | compress: true # æ¯å¦å缩 |
| | | needCompressSize: 10MB # å缩éå¼ |
| | | compressQuality: 0.5 # å缩质é(0.0-1.0) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | # 项ç®ç¸å
³é
ç½® |
| | | 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 |
| | | # åå审æ¹ç¼å·åç¼(é
ç½®æä»¶åç¼å½å) |
| | | approvalNumberPrefix: NEW |
| | | |
| | | # ä¸ªæ¨ Unipush é
ç½® |
| | | getui: |
| | | appId: PfjyAAE0FK64FaO1w2CMb1 |
| | | appKey: zTMb831OEL6J4GK1uE3Ob4 |
| | | masterSecret: K1GFtsv42v61tXGnF7SGE5 |
| | | domain: https://restapi.getui.cn/v2/ |
| | | # 离线æ¨é使ç¨çå
å/ç»ä»¶å |
| | | intentComponent: uni.app.UNI099A590/io.dcloud.PandoraEntry |
| | | |
| | | # å¼åç¯å¢é
ç½® |
| | | server: |
| | | # æå¡å¨çHTTP端å£ï¼é»è®¤ä¸º8080 |
| | | port: 9002 |
| | | servlet: |
| | | # åºç¨ç访é®è·¯å¾ |
| | | context-path: / |
| | | tomcat: |
| | | # tomcatçURIç¼ç |
| | | uri-encoding: UTF-8 |
| | | # è¿æ¥æ°æ»¡åçæéæ°ï¼é»è®¤ä¸º100 |
| | | accept-count: 1000 |
| | | max-swallow-size: -1 # -1 表示ä¸éå¶ |
| | | max-http-form-post-size: -1 # POST 请æ±ä½ä¸éå¶ |
| | | connection-timeout: 60000 # è¿æ¥è¶
æ¶æ¶é´(毫ç§) |
| | | 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: uploadPath |
| | | # ç¨æ·é
ç½® |
| | | 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:9000/product-inventory-management-jhjm?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | username: root |
| | | password: jhjm@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 |
| | | data: |
| | | # redis é
ç½® |
| | | redis: |
| | | # å°å |
| | | # host: 127.0.0.1 |
| | | host: 172.17.0.1 |
| | | # 端å£ï¼é»è®¤ä¸º6379 |
| | | port: 6379 |
| | | # æ°æ®åºç´¢å¼ |
| | | database: 0 |
| | | # å¯ç |
| | | # password: root2022! |
| | | password: |
| | | |
| | | # è¿æ¥è¶
æ¶æ¶é´ |
| | | timeout: 10s |
| | | lettuce: |
| | | pool: |
| | | # è¿æ¥æ± ä¸çæå°ç©ºé²è¿æ¥ |
| | | min-idle: 0 |
| | | # è¿æ¥æ± ä¸çæå¤§ç©ºé²è¿æ¥ |
| | | max-idle: 8 |
| | | # è¿æ¥æ± çæå¤§æ°æ®åºè¿æ¥æ° |
| | | max-active: 8 |
| | | # #è¿æ¥æ± æå¤§é»å¡çå¾
æ¶é´ï¼ä½¿ç¨è´å¼è¡¨ç¤ºæ²¡æéå¶ï¼ |
| | | max-wait: -1ms |
| | | # Quartz宿¶ä»»å¡é
ç½®ï¼æ°å¢é¨åï¼ |
| | | quartz: |
| | | job-store-type: jdbc # ä½¿ç¨æ°æ®åºåå¨ |
| | | jdbc: |
| | | initialize-schema: never # 馿¬¡è¿è¡æ¶èªå¨åå»ºè¡¨ç»æï¼æååæ¹ä¸ºnever |
| | | schema: classpath:org/quartz/impl/jdbcjobstore/tables_mysql_innodb.sql # MySQLè¡¨ç»æèæ¬ |
| | | properties: |
| | | org: |
| | | quartz: |
| | | scheduler: |
| | | instanceName: RuoYiScheduler |
| | | instanceId: AUTO |
| | | jobStore: |
| | | class: org.quartz.impl.jdbcjobstore.JobStoreTX |
| | | driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate # MySQLéé
|
| | | tablePrefix: qrtz_ # 表ååç¼ï¼ä¸èæ¬ä¸è´ |
| | | isClustered: false # åèç¹æ¨¡å¼ï¼éç¾¤éæ¹ä¸ºtrueï¼ |
| | | clusterCheckinInterval: 10000 |
| | | txIsolationLevelSerializable: true |
| | | threadPool: |
| | | class: org.quartz.simpl.SimpleThreadPool |
| | | threadCount: 10 # çº¿ç¨æ± å¤§å° |
| | | threadPriority: 5 |
| | | makeThreadsDaemons: true |
| | | updateCheck: false # å
³éçæ¬æ£æ¥ |
| | | # tokené
ç½® |
| | | token: |
| | | # 令çèªå®ä¹æ è¯ |
| | | header: Authorization |
| | | # 令çå¯é¥ |
| | | secret: xpAVjhCjQDaDB7mjPAzMDSbQWXNu2zYkTdDNUsPMS5Xx8QMmQVYN7n74eZrYJxDJ |
| | | # ä»¤çæææï¼é»è®¤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 # æ£å¼ç®å½ åæå é¤ |
| | | path: /javaWork/product-inventory-management/file/path/uploads # ä¸ä¼ ç®å½ |
| | | urlPrefix: /prod-api/common # 龿¥åç¼ |
| | | domain: http://36.133.41.166:9001 # åååç¼ |
| | | expired: 120 # è¿ææ¶é´(åä½:åé) |
| | | useLimit: 10 # ä½¿ç¨æ¬¡æ° |
| | | compress: true # æ¯å¦å缩 |
| | | needCompressSize: 10MB # å缩éå¼ |
| | | compressQuality: 0.5 # å缩质é(0.0-1.0) |
| | | knowledge: |
| | | one: D:\æ°ç大ç½ç´ ä¼ä¸äº§åä½ç³»è¯´æææ¡£.md |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | # 项ç®ç¸å
³é
ç½® |
| | | 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 |
| | | # åå审æ¹ç¼å·åç¼(é
ç½®æä»¶åç¼å½å) |
| | | approvalNumberPrefix: NEW |
| | | |
| | | # ä¸ªæ¨ Unipush é
ç½® |
| | | getui: |
| | | appId: PfjyAAE0FK64FaO1w2CMb1 |
| | | appKey: zTMb831OEL6J4GK1uE3Ob4 |
| | | masterSecret: K1GFtsv42v61tXGnF7SGE5 |
| | | domain: https://restapi.getui.cn/v2/ |
| | | # 离线æ¨é使ç¨çå
å/ç»ä»¶å |
| | | intentComponent: uni.app.UNI099A590/io.dcloud.PandoraEntry |
| | | |
| | | # å¼åç¯å¢é
ç½® |
| | | server: |
| | | # æå¡å¨çHTTP端å£ï¼é»è®¤ä¸º8080 |
| | | port: 9003 |
| | | 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: jxc |
| | | # ç¨æ·é
ç½® |
| | | 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:9002/product-inventory-management-jhsn-pro?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | username: root |
| | | password: jhsn@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 é
ç½® |
| | | data: |
| | | # redis é
ç½® |
| | | redis: |
| | | # å°å |
| | | # host: 127.0.0.1 |
| | | host: 172.17.0.1 |
| | | # 端å£ï¼é»è®¤ä¸º6379 |
| | | port: 6379 |
| | | # æ°æ®åºç´¢å¼ |
| | | database: 0 |
| | | # å¯ç |
| | | # password: root2022! |
| | | password: |
| | | |
| | | # è¿æ¥è¶
æ¶æ¶é´ |
| | | timeout: 10s |
| | | lettuce: |
| | | pool: |
| | | # è¿æ¥æ± ä¸çæå°ç©ºé²è¿æ¥ |
| | | min-idle: 0 |
| | | # è¿æ¥æ± ä¸çæå¤§ç©ºé²è¿æ¥ |
| | | max-idle: 8 |
| | | # è¿æ¥æ± çæå¤§æ°æ®åºè¿æ¥æ° |
| | | max-active: 8 |
| | | # #è¿æ¥æ± æå¤§é»å¡çå¾
æ¶é´ï¼ä½¿ç¨è´å¼è¡¨ç¤ºæ²¡æéå¶ï¼ |
| | | max-wait: -1ms |
| | | |
| | | # Quartz宿¶ä»»å¡é
ç½®ï¼æ°å¢é¨åï¼ |
| | | quartz: |
| | | job-store-type: jdbc # ä½¿ç¨æ°æ®åºåå¨ |
| | | jdbc: |
| | | initialize-schema: never # 馿¬¡è¿è¡æ¶èªå¨åå»ºè¡¨ç»æï¼æååæ¹ä¸ºnever |
| | | schema: classpath:org/quartz/impl/jdbcjobstore/tables_mysql_innodb.sql # MySQLè¡¨ç»æèæ¬ |
| | | properties: |
| | | org: |
| | | quartz: |
| | | scheduler: |
| | | instanceName: RuoYiScheduler |
| | | instanceId: AUTO |
| | | jobStore: |
| | | class: org.quartz.impl.jdbcjobstore.JobStoreTX |
| | | driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate # MySQLéé
|
| | | tablePrefix: qrtz_ # 表ååç¼ï¼ä¸èæ¬ä¸è´ |
| | | isClustered: false # åèç¹æ¨¡å¼ï¼éç¾¤éæ¹ä¸ºtrueï¼ |
| | | clusterCheckinInterval: 10000 |
| | | txIsolationLevelSerializable: true |
| | | threadPool: |
| | | class: org.quartz.simpl.SimpleThreadPool |
| | | threadCount: 10 # çº¿ç¨æ± å¤§å° |
| | | threadPriority: 5 |
| | | makeThreadsDaemons: true |
| | | updateCheck: false # å
³éçæ¬æ£æ¥ |
| | | # tokené
ç½® |
| | | token: |
| | | # 令çèªå®ä¹æ è¯ |
| | | header: Authorization |
| | | # 令çå¯é¥ |
| | | secret: xpAVjhCjQDaDB7mjPAzMDSbQWXNu2zYkTdDNUsPMS5Xx8QMmQVYN7n74eZrYJxDJ |
| | | # ä»¤çæææï¼é»è®¤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 # æ£å¼ç®å½ |
| | | path: /javaWork/product-inventory-management/file # ä¸ä¼ ç®å½ |
| | | urlPrefix: /prod-api/common # 龿¥åç¼ |
| | | domain: http://36.139.201.20:9001 # åååç¼ |
| | | expired: 120 # è¿ææ¶é´(åä½:åé) |
| | | useLimit: 10 # ä½¿ç¨æ¬¡æ° |
| | | compress: true # æ¯å¦å缩 |
| | | needCompressSize: 10MB # å缩éå¼ |
| | | compressQuality: 0.5 # å缩质é(0.0-1.0) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | # 项ç®ç¸å
³é
ç½® |
| | | 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 |
| | | # åå审æ¹ç¼å·åç¼(é
ç½®æä»¶åç¼å½å) |
| | | approvalNumberPrefix: NEW |
| | | |
| | | # ä¸ªæ¨ Unipush é
ç½® |
| | | getui: |
| | | appId: PfjyAAE0FK64FaO1w2CMb1 |
| | | appKey: zTMb831OEL6J4GK1uE3Ob4 |
| | | masterSecret: K1GFtsv42v61tXGnF7SGE5 |
| | | domain: https://restapi.getui.cn/v2/ |
| | | # 离线æ¨é使ç¨çå
å/ç»ä»¶å |
| | | intentComponent: uni.app.UNI099A590/io.dcloud.PandoraEntry |
| | | |
| | | # å¼åç¯å¢é
ç½® |
| | | server: |
| | | # æå¡å¨çHTTP端å£ï¼é»è®¤ä¸º8080 |
| | | port: 9003 |
| | | 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: jxc |
| | | # ç¨æ·é
ç½® |
| | | 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-lmjn?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | username: root |
| | | # password: lmjn@123456.. |
| | | 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 é
ç½® |
| | | data: |
| | | # redis é
ç½® |
| | | redis: |
| | | # å°å |
| | | # host: 127.0.0.1 |
| | | host: 172.17.0.1 |
| | | # 端å£ï¼é»è®¤ä¸º6379 |
| | | port: 6379 |
| | | # æ°æ®åºç´¢å¼ |
| | | database: 0 |
| | | # å¯ç |
| | | # password: root2022! |
| | | password: |
| | | |
| | | # è¿æ¥è¶
æ¶æ¶é´ |
| | | timeout: 10s |
| | | lettuce: |
| | | pool: |
| | | # è¿æ¥æ± ä¸çæå°ç©ºé²è¿æ¥ |
| | | min-idle: 0 |
| | | # è¿æ¥æ± ä¸çæå¤§ç©ºé²è¿æ¥ |
| | | max-idle: 8 |
| | | # è¿æ¥æ± çæå¤§æ°æ®åºè¿æ¥æ° |
| | | max-active: 8 |
| | | # #è¿æ¥æ± æå¤§é»å¡çå¾
æ¶é´ï¼ä½¿ç¨è´å¼è¡¨ç¤ºæ²¡æéå¶ï¼ |
| | | max-wait: -1ms |
| | | |
| | | # Quartz宿¶ä»»å¡é
ç½®ï¼æ°å¢é¨åï¼ |
| | | quartz: |
| | | job-store-type: jdbc # ä½¿ç¨æ°æ®åºåå¨ |
| | | jdbc: |
| | | initialize-schema: never # 馿¬¡è¿è¡æ¶èªå¨åå»ºè¡¨ç»æï¼æååæ¹ä¸ºnever |
| | | schema: classpath:org/quartz/impl/jdbcjobstore/tables_mysql_innodb.sql # MySQLè¡¨ç»æèæ¬ |
| | | properties: |
| | | org: |
| | | quartz: |
| | | scheduler: |
| | | instanceName: RuoYiScheduler |
| | | instanceId: AUTO |
| | | jobStore: |
| | | class: org.quartz.impl.jdbcjobstore.JobStoreTX |
| | | driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate # MySQLéé
|
| | | tablePrefix: qrtz_ # 表ååç¼ï¼ä¸èæ¬ä¸è´ |
| | | isClustered: false # åèç¹æ¨¡å¼ï¼éç¾¤éæ¹ä¸ºtrueï¼ |
| | | clusterCheckinInterval: 10000 |
| | | txIsolationLevelSerializable: true |
| | | threadPool: |
| | | class: org.quartz.simpl.SimpleThreadPool |
| | | threadCount: 10 # çº¿ç¨æ± å¤§å° |
| | | threadPriority: 5 |
| | | makeThreadsDaemons: true |
| | | updateCheck: false # å
³éçæ¬æ£æ¥ |
| | | # tokené
ç½® |
| | | token: |
| | | # 令çèªå®ä¹æ è¯ |
| | | header: Authorization |
| | | # 令çå¯é¥ |
| | | secret: xpAVjhCjQDaDB7mjPAzMDSbQWXNu2zYkTdDNUsPMS5Xx8QMmQVYN7n74eZrYJxDJ |
| | | # ä»¤çæææï¼é»è®¤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 # æ£å¼ç®å½ |
| | | path: /javaWork/product-inventory-management/file # ä¸ä¼ ç®å½ |
| | | urlPrefix: /prod-api/common # 龿¥åç¼ |
| | | # domain: http://192.168.1.32:9001 # åååç¼ |
| | | domain: http://1.15.17.182:9105 # åååç¼ |
| | | expired: 120 # è¿ææ¶é´(åä½:åé) |
| | | useLimit: 10 # ä½¿ç¨æ¬¡æ° |
| | | compress: true # æ¯å¦å缩 |
| | | needCompressSize: 10MB # å缩éå¼ |
| | | compressQuality: 0.5 # å缩质é(0.0-1.0) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | # 项ç®ç¸å
³é
ç½® |
| | | ruoyi: |
| | | # åç§° |
| | | name: RuoYi |
| | | # çæ¬ |
| | | version: 3.8.9 |
| | | # çæå¹´ä»½ |
| | | copyrightYear: 2025 |
| | | # æä»¶è·¯å¾ 示ä¾ï¼ Windowsé
ç½®D:/ruoyi/uploadPathï¼Linuxé
ç½® /home/ruoyi/uploadPathï¼ |
| | | profile: /home/ruoyi/uploadPath |
| | | |
| | | # è·åipå°åå¼å
³ |
| | | addressEnabled: false |
| | | # éªè¯ç ç±»å math æ°åè®¡ç® char å符éªè¯ |
| | | captchaType: math |
| | | # åå审æ¹ç¼å·åç¼(é
ç½®æä»¶åç¼å½å) |
| | | approvalNumberPrefix: DEV |
| | | |
| | | # ä¸ªæ¨ Unipush é
ç½® |
| | | getui: |
| | | appId: PfjyAAE0FK64FaO1w2CMb1 |
| | | appKey: zTMb831OEL6J4GK1uE3Ob4 |
| | | masterSecret: K1GFtsv42v61tXGnF7SGE5 |
| | | domain: https://restapi.getui.cn/v2/ |
| | | # 离线æ¨é使ç¨çå
å/ç»ä»¶å |
| | | intentComponent: uni.app.UNI099A590/io.dcloud.PandoraEntry |
| | | |
| | | # å¼åç¯å¢é
ç½® |
| | | server: |
| | | # æå¡å¨çHTTP端å£ï¼é»è®¤ä¸º8080 |
| | | port: 7003 |
| | | 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: |
| | | org.quartz: DEBUG |
| | | 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: uploadPath |
| | | # ç¨æ·é
ç½® |
| | | 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://36.134.154.10:9002/product-inventory-management-qxy?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | username: root |
| | | password: qxy@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 |
| | | data: |
| | | # redis é
ç½® |
| | | redis: |
| | | # å°å |
| | | # host: 127.0.0.1 |
| | | host: 172.17.0.1 |
| | | # 端å£ï¼é»è®¤ä¸º6379 |
| | | port: 6379 |
| | | # æ°æ®åºç´¢å¼ |
| | | database: 0 |
| | | # å¯ç |
| | | # password: root2022! |
| | | password: |
| | | |
| | | # è¿æ¥è¶
æ¶æ¶é´ |
| | | timeout: 10s |
| | | lettuce: |
| | | pool: |
| | | # è¿æ¥æ± ä¸çæå°ç©ºé²è¿æ¥ |
| | | min-idle: 0 |
| | | # è¿æ¥æ± ä¸çæå¤§ç©ºé²è¿æ¥ |
| | | max-idle: 8 |
| | | # è¿æ¥æ± çæå¤§æ°æ®åºè¿æ¥æ° |
| | | max-active: 8 |
| | | # #è¿æ¥æ± æå¤§é»å¡çå¾
æ¶é´ï¼ä½¿ç¨è´å¼è¡¨ç¤ºæ²¡æéå¶ï¼ |
| | | max-wait: -1ms |
| | | # Quartz宿¶ä»»å¡é
ç½®ï¼æ°å¢é¨åï¼ |
| | | quartz: |
| | | job-store-type: jdbc # ä½¿ç¨æ°æ®åºåå¨ |
| | | jdbc: |
| | | initialize-schema: never # 馿¬¡è¿è¡æ¶èªå¨åå»ºè¡¨ç»æï¼æååæ¹ä¸ºnever |
| | | schema: classpath:org/quartz/impl/jdbcjobstore/tables_mysql_innodb.sql # MySQLè¡¨ç»æèæ¬ |
| | | properties: |
| | | org: |
| | | quartz: |
| | | scheduler: |
| | | instanceName: RuoYiScheduler |
| | | instanceId: AUTO |
| | | jobStore: |
| | | class: org.quartz.impl.jdbcjobstore.JobStoreTX |
| | | driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate # MySQLéé
|
| | | tablePrefix: qrtz_ # 表ååç¼ï¼ä¸èæ¬ä¸è´ |
| | | isClustered: false # åèç¹æ¨¡å¼ï¼éç¾¤éæ¹ä¸ºtrueï¼ |
| | | clusterCheckinInterval: 10000 |
| | | txIsolationLevelSerializable: true |
| | | threadPool: |
| | | class: org.quartz.simpl.SimpleThreadPool |
| | | threadCount: 10 # çº¿ç¨æ± å¤§å° |
| | | threadPriority: 5 |
| | | makeThreadsDaemons: true |
| | | updateCheck: false # å
³éçæ¬æ£æ¥ |
| | | |
| | | # tokené
ç½® |
| | | token: |
| | | # 令çèªå®ä¹æ è¯ |
| | | header: Authorization |
| | | # 令çå¯é¥ |
| | | secret: xpAVjhCjQDaDB7mjPAzMDSbQWXNu2zYkTdDNUsPMS5Xx8QMmQVYN7n74eZrYJxDJ |
| | | # ä»¤çæææï¼é»è®¤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 # æ£å¼ç®å½ åæå é¤ |
| | | path: /javaWork/product-inventory-management/file/path/uploads # ä¸ä¼ ç®å½ |
| | | urlPrefix: /prod-api/common # 龿¥åç¼ |
| | | domain: http://36.134.154.10:9001 # åååç¼ |
| | | expired: 120 # è¿ææ¶é´(åä½:åé) |
| | | useLimit: 10 # ä½¿ç¨æ¬¡æ° |
| | | compress: true # æ¯å¦å缩 |
| | | needCompressSize: 10MB # å缩éå¼ |
| | | compressQuality: 0.5 # å缩质é(0.0-1.0) |
| | | knowledge: |
| | | one: D:\æ°ç大ç½ç´ ä¼ä¸äº§åä½ç³»è¯´æææ¡£.md |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | # 项ç®ç¸å
³é
ç½® |
| | | 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 |
| | | # åå审æ¹ç¼å·åç¼(é
ç½®æä»¶åç¼å½å) |
| | | approvalNumberPrefix: NEW |
| | | |
| | | # ä¸ªæ¨ Unipush é
ç½® |
| | | getui: |
| | | appId: PfjyAAE0FK64FaO1w2CMb1 |
| | | appKey: zTMb831OEL6J4GK1uE3Ob4 |
| | | masterSecret: K1GFtsv42v61tXGnF7SGE5 |
| | | domain: https://restapi.getui.cn/v2/ |
| | | # 离线æ¨é使ç¨çå
å/ç»ä»¶å |
| | | intentComponent: uni.app.UNI099A590/io.dcloud.PandoraEntry |
| | | |
| | | # å¼åç¯å¢é
ç½® |
| | | server: |
| | | # æå¡å¨çHTTP端å£ï¼é»è®¤ä¸º8080 |
| | | port: 9002 |
| | | servlet: |
| | | # åºç¨ç访é®è·¯å¾ |
| | | context-path: / |
| | | tomcat: |
| | | # tomcatçURIç¼ç |
| | | uri-encoding: UTF-8 |
| | | # è¿æ¥æ°æ»¡åçæéæ°ï¼é»è®¤ä¸º100 |
| | | accept-count: 1000 |
| | | max-swallow-size: -1 # -1 表示ä¸éå¶ |
| | | max-http-form-post-size: -1 # POST 请æ±ä½ä¸éå¶ |
| | | connection-timeout: 60000 # è¿æ¥è¶
æ¶æ¶é´(毫ç§) |
| | | 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: uploadPath |
| | | # ç¨æ·é
ç½® |
| | | 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://36.213.180.217:11101/product-inventory-management-sdks?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 |
| | | data: |
| | | # redis é
ç½® |
| | | redis: |
| | | # å°å |
| | | # host: localhost |
| | | host: 172.17.0.1 |
| | | # 端å£ï¼é»è®¤ä¸º6379 |
| | | port: 11102 |
| | | # æ°æ®åºç´¢å¼ |
| | | database: 0 |
| | | # å¯ç |
| | | # password: root2022! |
| | | password: |
| | | |
| | | # è¿æ¥è¶
æ¶æ¶é´ |
| | | timeout: 10s |
| | | lettuce: |
| | | pool: |
| | | # è¿æ¥æ± ä¸çæå°ç©ºé²è¿æ¥ |
| | | min-idle: 0 |
| | | # è¿æ¥æ± ä¸çæå¤§ç©ºé²è¿æ¥ |
| | | max-idle: 8 |
| | | # è¿æ¥æ± çæå¤§æ°æ®åºè¿æ¥æ° |
| | | max-active: 8 |
| | | # #è¿æ¥æ± æå¤§é»å¡çå¾
æ¶é´ï¼ä½¿ç¨è´å¼è¡¨ç¤ºæ²¡æéå¶ï¼ |
| | | max-wait: -1ms |
| | | # Quartz宿¶ä»»å¡é
ç½®ï¼æ°å¢é¨åï¼ |
| | | quartz: |
| | | job-store-type: jdbc # ä½¿ç¨æ°æ®åºåå¨ |
| | | jdbc: |
| | | initialize-schema: never # 馿¬¡è¿è¡æ¶èªå¨åå»ºè¡¨ç»æï¼æååæ¹ä¸ºnever |
| | | schema: classpath:org/quartz/impl/jdbcjobstore/tables_mysql_innodb.sql # MySQLè¡¨ç»æèæ¬ |
| | | properties: |
| | | org: |
| | | quartz: |
| | | scheduler: |
| | | instanceName: RuoYiScheduler |
| | | instanceId: AUTO |
| | | jobStore: |
| | | class: org.quartz.impl.jdbcjobstore.JobStoreTX |
| | | driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate # MySQLéé
|
| | | tablePrefix: qrtz_ # 表ååç¼ï¼ä¸èæ¬ä¸è´ |
| | | isClustered: false # åèç¹æ¨¡å¼ï¼éç¾¤éæ¹ä¸ºtrueï¼ |
| | | clusterCheckinInterval: 10000 |
| | | txIsolationLevelSerializable: true |
| | | threadPool: |
| | | class: org.quartz.simpl.SimpleThreadPool |
| | | threadCount: 10 # çº¿ç¨æ± å¤§å° |
| | | threadPriority: 5 |
| | | makeThreadsDaemons: true |
| | | updateCheck: false # å
³éçæ¬æ£æ¥ |
| | | # tokené
ç½® |
| | | token: |
| | | # 令çèªå®ä¹æ è¯ |
| | | header: Authorization |
| | | # 令çå¯é¥ |
| | | secret: xpAVjhCjQDaDB7mjPAzMDSbQWXNu2zYkTdDNUsPMS5Xx8QMmQVYN7n74eZrYJxDJ |
| | | # ä»¤çæææï¼é»è®¤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 # æ£å¼ç®å½ åæå é¤ |
| | | path: /javaWork/product-inventory-management/file/path/uploads # ä¸ä¼ ç®å½ |
| | | urlPrefix: /prod-api/common # 龿¥åç¼ |
| | | domain: http://36.137.101.88:9520 # åååç¼ |
| | | expired: 120 # è¿ææ¶é´(åä½:åé) |
| | | useLimit: 10 # ä½¿ç¨æ¬¡æ° |
| | | compress: true # æ¯å¦å缩 |
| | | needCompressSize: 10MB # å缩éå¼ |
| | | compressQuality: 0.5 # å缩质é(0.0-1.0) |
| | | knowledge: |
| | | one: D:\æ°ç大ç½ç´ ä¼ä¸äº§åä½ç³»è¯´æææ¡£.md |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | # 项ç®ç¸å
³é
ç½® |
| | | ruoyi: |
| | | # åç§° |
| | | name: RuoYi |
| | | # çæ¬ |
| | | version: 3.8.9 |
| | | # çæå¹´ä»½ |
| | | copyrightYear: 2025 |
| | | # æä»¶è·¯å¾ 示ä¾ï¼ Windowsé
ç½®D:/ruoyi/uploadPathï¼Linuxé
ç½® /home/ruoyi/uploadPathï¼ |
| | | profile: /home/ruoyi/uploadPath |
| | | |
| | | # è·åipå°åå¼å
³ |
| | | addressEnabled: false |
| | | # éªè¯ç ç±»å math æ°åè®¡ç® char å符éªè¯ |
| | | captchaType: math |
| | | # åå审æ¹ç¼å·åç¼(é
ç½®æä»¶åç¼å½å) |
| | | approvalNumberPrefix: DEV |
| | | |
| | | # ä¸ªæ¨ Unipush é
ç½® |
| | | getui: |
| | | appId: PfjyAAE0FK64FaO1w2CMb1 |
| | | appKey: zTMb831OEL6J4GK1uE3Ob4 |
| | | masterSecret: K1GFtsv42v61tXGnF7SGE5 |
| | | domain: https://restapi.getui.cn/v2/ |
| | | # 离线æ¨é使ç¨çå
å/ç»ä»¶å |
| | | intentComponent: uni.app.UNI099A590/io.dcloud.PandoraEntry |
| | | |
| | | # å¼åç¯å¢é
ç½® |
| | | server: |
| | | # æå¡å¨çHTTP端å£ï¼é»è®¤ä¸º8080 |
| | | port: 7003 |
| | | servlet: |
| | | # åºç¨ç访é®è·¯å¾ |
| | | context-path: / |
| | | tomcat: |
| | | # tomcatçURIç¼ç |
| | | uri-encoding: UTF-8 |
| | | # è¿æ¥æ°æ»¡åçæéæ°ï¼é»è®¤ä¸º100 |
| | | accept-count: 1000 |
| | | max-swallow-size: -1 # -1 表示ä¸éå¶ |
| | | max-http-form-post-size: -1 # POST 请æ±ä½ä¸éå¶ |
| | | connection-timeout: 60000 # è¿æ¥è¶
æ¶æ¶é´(毫ç§) |
| | | threads: |
| | | # tomcatæå¤§çº¿ç¨æ°ï¼é»è®¤ä¸º200 |
| | | max: 800 |
| | | # Tomcatå¯å¨åå§åççº¿ç¨æ°ï¼é»è®¤å¼10 |
| | | min-spare: 100 |
| | | |
| | | # æ¥å¿é
ç½® |
| | | logging: |
| | | level: |
| | | org.quartz: DEBUG |
| | | 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: uploadPath |
| | | # ç¨æ·é
ç½® |
| | | 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:9002/product-inventory-management-sdtx?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | username: root |
| | | password: sdtx@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 |
| | | data: |
| | | # redis é
ç½® |
| | | redis: |
| | | # å°å |
| | | # host: 127.0.0.1 |
| | | host: 172.17.0.1 |
| | | # 端å£ï¼é»è®¤ä¸º6379 |
| | | port: 6379 |
| | | # æ°æ®åºç´¢å¼ |
| | | database: 0 |
| | | # å¯ç |
| | | # password: root2022! |
| | | password: |
| | | |
| | | # è¿æ¥è¶
æ¶æ¶é´ |
| | | timeout: 10s |
| | | lettuce: |
| | | pool: |
| | | # è¿æ¥æ± ä¸çæå°ç©ºé²è¿æ¥ |
| | | min-idle: 0 |
| | | # è¿æ¥æ± ä¸çæå¤§ç©ºé²è¿æ¥ |
| | | max-idle: 8 |
| | | # è¿æ¥æ± çæå¤§æ°æ®åºè¿æ¥æ° |
| | | max-active: 8 |
| | | # #è¿æ¥æ± æå¤§é»å¡çå¾
æ¶é´ï¼ä½¿ç¨è´å¼è¡¨ç¤ºæ²¡æéå¶ï¼ |
| | | max-wait: -1ms |
| | | # Quartz宿¶ä»»å¡é
ç½®ï¼æ°å¢é¨åï¼ |
| | | quartz: |
| | | job-store-type: jdbc # ä½¿ç¨æ°æ®åºåå¨ |
| | | jdbc: |
| | | initialize-schema: never # 馿¬¡è¿è¡æ¶èªå¨åå»ºè¡¨ç»æï¼æååæ¹ä¸ºnever |
| | | schema: classpath:org/quartz/impl/jdbcjobstore/tables_mysql_innodb.sql # MySQLè¡¨ç»æèæ¬ |
| | | properties: |
| | | org: |
| | | quartz: |
| | | scheduler: |
| | | instanceName: RuoYiScheduler |
| | | instanceId: AUTO |
| | | jobStore: |
| | | class: org.quartz.impl.jdbcjobstore.JobStoreTX |
| | | driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate # MySQLéé
|
| | | tablePrefix: qrtz_ # 表ååç¼ï¼ä¸èæ¬ä¸è´ |
| | | isClustered: false # åèç¹æ¨¡å¼ï¼éç¾¤éæ¹ä¸ºtrueï¼ |
| | | clusterCheckinInterval: 10000 |
| | | txIsolationLevelSerializable: true |
| | | threadPool: |
| | | class: org.quartz.simpl.SimpleThreadPool |
| | | threadCount: 10 # çº¿ç¨æ± å¤§å° |
| | | threadPriority: 5 |
| | | makeThreadsDaemons: true |
| | | updateCheck: false # å
³éçæ¬æ£æ¥ |
| | | |
| | | # tokené
ç½® |
| | | token: |
| | | # 令çèªå®ä¹æ è¯ |
| | | header: Authorization |
| | | # 令çå¯é¥ |
| | | secret: xpAVjhCjQDaDB7mjPAzMDSbQWXNu2zYkTdDNUsPMS5Xx8QMmQVYN7n74eZrYJxDJ |
| | | # ä»¤çæææï¼é»è®¤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 # æ£å¼ç®å½ åæå é¤ |
| | | path: /javaWork/product-inventory-management/file/path/uploads # ä¸ä¼ ç®å½ |
| | | urlPrefix: /prod-api/common # 龿¥åç¼ |
| | | domain: http://36.213.156.184:9001 # åååç¼ |
| | | expired: 120 # è¿ææ¶é´(åä½:åé) |
| | | useLimit: 10 # ä½¿ç¨æ¬¡æ° |
| | | compress: true # æ¯å¦å缩 |
| | | needCompressSize: 10MB # å缩éå¼ |
| | | compressQuality: 0.5 # å缩质é(0.0-1.0) |
| | | knowledge: |
| | | one: D:\æ°ç大ç½ç´ ä¼ä¸äº§åä½ç³»è¯´æææ¡£.md |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | # 项ç®ç¸å
³é
ç½® |
| | | 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 |
| | | # åå审æ¹ç¼å·åç¼(é
ç½®æä»¶åç¼å½å) |
| | | approvalNumberPrefix: NEW |
| | | |
| | | # ä¸ªæ¨ Unipush é
ç½® |
| | | getui: |
| | | appId: PfjyAAE0FK64FaO1w2CMb1 |
| | | appKey: zTMb831OEL6J4GK1uE3Ob4 |
| | | masterSecret: K1GFtsv42v61tXGnF7SGE5 |
| | | domain: https://restapi.getui.cn/v2/ |
| | | # 离线æ¨é使ç¨çå
å/ç»ä»¶å |
| | | intentComponent: uni.app.UNI099A590/io.dcloud.PandoraEntry |
| | | |
| | | # å¼åç¯å¢é
ç½® |
| | | server: |
| | | # æå¡å¨çHTTP端å£ï¼é»è®¤ä¸º8080 |
| | | port: 9002 |
| | | 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: jxc |
| | | # ç¨æ·é
ç½® |
| | | 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://36.213.180.217:11101/product-inventory-management-skjs?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 é
ç½® |
| | | data: |
| | | # redis é
ç½® |
| | | redis: |
| | | # å°å |
| | | # host: 127.0.0.1 |
| | | host: 36.213.180.217 |
| | | # 端å£ï¼é»è®¤ä¸º6379 |
| | | port: 11102 |
| | | # æ°æ®åºç´¢å¼ |
| | | database: 0 |
| | | # å¯ç |
| | | # password: root2022! |
| | | password: |
| | | |
| | | # è¿æ¥è¶
æ¶æ¶é´ |
| | | timeout: 10s |
| | | lettuce: |
| | | pool: |
| | | # è¿æ¥æ± ä¸çæå°ç©ºé²è¿æ¥ |
| | | min-idle: 0 |
| | | # è¿æ¥æ± ä¸çæå¤§ç©ºé²è¿æ¥ |
| | | max-idle: 8 |
| | | # è¿æ¥æ± çæå¤§æ°æ®åºè¿æ¥æ° |
| | | max-active: 8 |
| | | # #è¿æ¥æ± æå¤§é»å¡çå¾
æ¶é´ï¼ä½¿ç¨è´å¼è¡¨ç¤ºæ²¡æéå¶ï¼ |
| | | max-wait: -1ms |
| | | |
| | | # Quartz宿¶ä»»å¡é
ç½®ï¼æ°å¢é¨åï¼ |
| | | quartz: |
| | | job-store-type: jdbc # ä½¿ç¨æ°æ®åºåå¨ |
| | | jdbc: |
| | | initialize-schema: never # 馿¬¡è¿è¡æ¶èªå¨åå»ºè¡¨ç»æï¼æååæ¹ä¸ºnever |
| | | schema: classpath:org/quartz/impl/jdbcjobstore/tables_mysql_innodb.sql # MySQLè¡¨ç»æèæ¬ |
| | | properties: |
| | | org: |
| | | quartz: |
| | | scheduler: |
| | | instanceName: RuoYiScheduler |
| | | instanceId: AUTO |
| | | jobStore: |
| | | class: org.quartz.impl.jdbcjobstore.JobStoreTX |
| | | driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate # MySQLéé
|
| | | tablePrefix: qrtz_ # 表ååç¼ï¼ä¸èæ¬ä¸è´ |
| | | isClustered: false # åèç¹æ¨¡å¼ï¼éç¾¤éæ¹ä¸ºtrueï¼ |
| | | clusterCheckinInterval: 10000 |
| | | txIsolationLevelSerializable: true |
| | | threadPool: |
| | | class: org.quartz.simpl.SimpleThreadPool |
| | | threadCount: 10 # çº¿ç¨æ± å¤§å° |
| | | threadPriority: 5 |
| | | makeThreadsDaemons: true |
| | | updateCheck: false # å
³éçæ¬æ£æ¥ |
| | | # tokené
ç½® |
| | | token: |
| | | # 令çèªå®ä¹æ è¯ |
| | | header: Authorization |
| | | # 令çå¯é¥ |
| | | secret: xpAVjhCjQDaDB7mjPAzMDSbQWXNu2zYkTdDNUsPMS5Xx8QMmQVYN7n74eZrYJxDJ |
| | | # ä»¤çæææï¼é»è®¤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 # æ£å¼ç®å½ |
| | | path: /javaWork/product-inventory-management/file # ä¸ä¼ ç®å½ |
| | | urlPrefix: /prod-api/common # 龿¥åç¼ |
| | | # domain: http://192.168.1.32:9001 # åååç¼ |
| | | domain: http://36.213.180.217:9514 # åååç¼ |
| | | expired: 120 # è¿ææ¶é´(åä½:åé) |
| | | useLimit: 10 # ä½¿ç¨æ¬¡æ° |
| | | compress: true # æ¯å¦å缩 |
| | | needCompressSize: 10MB # å缩éå¼ |
| | | compressQuality: 0.5 # å缩质é(0.0-1.0) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | # 项ç®ç¸å
³é
ç½® |
| | | 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 |
| | | # åå审æ¹ç¼å·åç¼(é
ç½®æä»¶åç¼å½å) |
| | | approvalNumberPrefix: NEW |
| | | |
| | | # ä¸ªæ¨ Unipush é
ç½® |
| | | getui: |
| | | appId: PfjyAAE0FK64FaO1w2CMb1 |
| | | appKey: zTMb831OEL6J4GK1uE3Ob4 |
| | | masterSecret: K1GFtsv42v61tXGnF7SGE5 |
| | | domain: https://restapi.getui.cn/v2/ |
| | | # 离线æ¨é使ç¨çå
å/ç»ä»¶å |
| | | intentComponent: uni.app.UNI099A590/io.dcloud.PandoraEntry |
| | | |
| | | # å¼åç¯å¢é
ç½® |
| | | server: |
| | | # æå¡å¨çHTTP端å£ï¼é»è®¤ä¸º8080 |
| | | port: 9002 |
| | | servlet: |
| | | # åºç¨ç访é®è·¯å¾ |
| | | context-path: / |
| | | tomcat: |
| | | # tomcatçURIç¼ç |
| | | uri-encoding: UTF-8 |
| | | # è¿æ¥æ°æ»¡åçæéæ°ï¼é»è®¤ä¸º100 |
| | | accept-count: 1000 |
| | | max-swallow-size: -1 # -1 表示ä¸éå¶ |
| | | max-http-form-post-size: -1 # POST 请æ±ä½ä¸éå¶ |
| | | connection-timeout: 60000 # è¿æ¥è¶
æ¶æ¶é´(毫ç§) |
| | | 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: uploadPath |
| | | # ç¨æ·é
ç½® |
| | | 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:9000/product-inventory-management-tddq?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | username: root |
| | | password: tddq@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 |
| | | data: |
| | | # redis é
ç½® |
| | | redis: |
| | | # å°å |
| | | host: 172.17.0.1 |
| | | # host: 172.17.0.1 |
| | | # 端å£ï¼é»è®¤ä¸º6379 |
| | | port: 6379 |
| | | # æ°æ®åºç´¢å¼ |
| | | database: 0 |
| | | # å¯ç |
| | | # password: root2022! |
| | | password: |
| | | |
| | | # è¿æ¥è¶
æ¶æ¶é´ |
| | | timeout: 10s |
| | | lettuce: |
| | | pool: |
| | | # è¿æ¥æ± ä¸çæå°ç©ºé²è¿æ¥ |
| | | min-idle: 0 |
| | | # è¿æ¥æ± ä¸çæå¤§ç©ºé²è¿æ¥ |
| | | max-idle: 8 |
| | | # è¿æ¥æ± çæå¤§æ°æ®åºè¿æ¥æ° |
| | | max-active: 8 |
| | | # #è¿æ¥æ± æå¤§é»å¡çå¾
æ¶é´ï¼ä½¿ç¨è´å¼è¡¨ç¤ºæ²¡æéå¶ï¼ |
| | | max-wait: -1ms |
| | | # Quartz宿¶ä»»å¡é
ç½®ï¼æ°å¢é¨åï¼ |
| | | quartz: |
| | | job-store-type: jdbc # ä½¿ç¨æ°æ®åºåå¨ |
| | | jdbc: |
| | | initialize-schema: never # 馿¬¡è¿è¡æ¶èªå¨åå»ºè¡¨ç»æï¼æååæ¹ä¸ºnever |
| | | schema: classpath:org/quartz/impl/jdbcjobstore/tables_mysql_innodb.sql # MySQLè¡¨ç»æèæ¬ |
| | | properties: |
| | | org: |
| | | quartz: |
| | | scheduler: |
| | | instanceName: RuoYiScheduler |
| | | instanceId: AUTO |
| | | jobStore: |
| | | class: org.quartz.impl.jdbcjobstore.JobStoreTX |
| | | driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate # MySQLéé
|
| | | tablePrefix: qrtz_ # 表ååç¼ï¼ä¸èæ¬ä¸è´ |
| | | isClustered: false # åèç¹æ¨¡å¼ï¼éç¾¤éæ¹ä¸ºtrueï¼ |
| | | clusterCheckinInterval: 10000 |
| | | txIsolationLevelSerializable: true |
| | | threadPool: |
| | | class: org.quartz.simpl.SimpleThreadPool |
| | | threadCount: 10 # çº¿ç¨æ± å¤§å° |
| | | threadPriority: 5 |
| | | makeThreadsDaemons: true |
| | | updateCheck: false # å
³éçæ¬æ£æ¥ |
| | | # tokené
ç½® |
| | | token: |
| | | # 令çèªå®ä¹æ è¯ |
| | | header: Authorization |
| | | # 令çå¯é¥ |
| | | secret: xpAVjhCjQDaDB7mjPAzMDSbQWXNu2zYkTdDNUsPMS5Xx8QMmQVYN7n74eZrYJxDJ |
| | | # ä»¤çæææï¼é»è®¤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 # æ£å¼ç®å½ åæå é¤ |
| | | path: /javaWork/product-inventory-management/file/path/uploads # ä¸ä¼ ç®å½ |
| | | urlPrefix: /prod-api/common # 龿¥åç¼ |
| | | domain: http://36.137.101.88:9001 # åååç¼ |
| | | expired: 120 # è¿ææ¶é´(åä½:åé) |
| | | useLimit: 10 # ä½¿ç¨æ¬¡æ° |
| | | compress: true # æ¯å¦å缩 |
| | | needCompressSize: 10MB # å缩éå¼ |
| | | compressQuality: 0.5 # å缩质é(0.0-1.0) |
| | | knowledge: |
| | | one: D:\æ°ç大ç½ç´ ä¼ä¸äº§åä½ç³»è¯´æææ¡£.md |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | # 项ç®ç¸å
³é
ç½® |
| | | ruoyi: |
| | | # åç§° |
| | | name: RuoYi |
| | | # çæ¬ |
| | | version: 3.8.9 |
| | | # çæå¹´ä»½ |
| | | copyrightYear: 2025 |
| | | # æä»¶è·¯å¾ 示ä¾ï¼ Windowsé
ç½®D:/ruoyi/uploadPathï¼Linuxé
ç½® /home/ruoyi/uploadPathï¼ |
| | | profile: /home/ruoyi/uploadPath |
| | | |
| | | # è·åipå°åå¼å
³ |
| | | addressEnabled: false |
| | | # éªè¯ç ç±»å math æ°åè®¡ç® char å符éªè¯ |
| | | captchaType: math |
| | | # åå审æ¹ç¼å·åç¼(é
ç½®æä»¶åç¼å½å) |
| | | approvalNumberPrefix: DEV |
| | | |
| | | # ä¸ªæ¨ Unipush é
ç½® |
| | | getui: |
| | | appId: PfjyAAE0FK64FaO1w2CMb1 |
| | | appKey: zTMb831OEL6J4GK1uE3Ob4 |
| | | masterSecret: K1GFtsv42v61tXGnF7SGE5 |
| | | domain: https://restapi.getui.cn/v2/ |
| | | # 离线æ¨é使ç¨çå
å/ç»ä»¶å |
| | | intentComponent: uni.app.UNI099A590/io.dcloud.PandoraEntry |
| | | |
| | | # å¼åç¯å¢é
ç½® |
| | | server: |
| | | # æå¡å¨çHTTP端å£ï¼é»è®¤ä¸º8080 |
| | | port: 9002 |
| | | servlet: |
| | | # åºç¨ç访é®è·¯å¾ |
| | | context-path: / |
| | | tomcat: |
| | | # tomcatçURIç¼ç |
| | | uri-encoding: UTF-8 |
| | | # è¿æ¥æ°æ»¡åçæéæ°ï¼é»è®¤ä¸º100 |
| | | accept-count: 1000 |
| | | max-swallow-size: -1 # -1 表示ä¸éå¶ |
| | | max-http-form-post-size: -1 # POST 请æ±ä½ä¸éå¶ |
| | | connection-timeout: 60000 # è¿æ¥è¶
æ¶æ¶é´(毫ç§) |
| | | threads: |
| | | # tomcatæå¤§çº¿ç¨æ°ï¼é»è®¤ä¸º200 |
| | | max: 800 |
| | | # Tomcatå¯å¨åå§åççº¿ç¨æ°ï¼é»è®¤å¼10 |
| | | min-spare: 100 |
| | | |
| | | # æ¥å¿é
ç½® |
| | | logging: |
| | | level: |
| | | org.quartz: DEBUG |
| | | 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: uploadPath |
| | | # ç¨æ·é
ç½® |
| | | 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://36.133.45.183:9000/product-inventory-management-xcdq?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | username: root |
| | | password: xcdq@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 |
| | | data: |
| | | # redis é
ç½® |
| | | redis: |
| | | # å°å |
| | | # host: 127.0.0.1 |
| | | host: 172.17.0.1 |
| | | # 端å£ï¼é»è®¤ä¸º6379 |
| | | port: 6379 |
| | | # æ°æ®åºç´¢å¼ |
| | | database: 0 |
| | | # å¯ç |
| | | # password: root2022! |
| | | password: |
| | | |
| | | # è¿æ¥è¶
æ¶æ¶é´ |
| | | timeout: 10s |
| | | lettuce: |
| | | pool: |
| | | # è¿æ¥æ± ä¸çæå°ç©ºé²è¿æ¥ |
| | | min-idle: 0 |
| | | # è¿æ¥æ± ä¸çæå¤§ç©ºé²è¿æ¥ |
| | | max-idle: 8 |
| | | # è¿æ¥æ± çæå¤§æ°æ®åºè¿æ¥æ° |
| | | max-active: 8 |
| | | # #è¿æ¥æ± æå¤§é»å¡çå¾
æ¶é´ï¼ä½¿ç¨è´å¼è¡¨ç¤ºæ²¡æéå¶ï¼ |
| | | max-wait: -1ms |
| | | # Quartz宿¶ä»»å¡é
ç½®ï¼æ°å¢é¨åï¼ |
| | | quartz: |
| | | job-store-type: jdbc # ä½¿ç¨æ°æ®åºåå¨ |
| | | jdbc: |
| | | initialize-schema: never # 馿¬¡è¿è¡æ¶èªå¨åå»ºè¡¨ç»æï¼æååæ¹ä¸ºnever |
| | | schema: classpath:org/quartz/impl/jdbcjobstore/tables_mysql_innodb.sql # MySQLè¡¨ç»æèæ¬ |
| | | properties: |
| | | org: |
| | | quartz: |
| | | scheduler: |
| | | instanceName: RuoYiScheduler |
| | | instanceId: AUTO |
| | | jobStore: |
| | | class: org.quartz.impl.jdbcjobstore.JobStoreTX |
| | | driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate # MySQLéé
|
| | | tablePrefix: qrtz_ # 表ååç¼ï¼ä¸èæ¬ä¸è´ |
| | | isClustered: false # åèç¹æ¨¡å¼ï¼éç¾¤éæ¹ä¸ºtrueï¼ |
| | | clusterCheckinInterval: 10000 |
| | | txIsolationLevelSerializable: true |
| | | threadPool: |
| | | class: org.quartz.simpl.SimpleThreadPool |
| | | threadCount: 10 # çº¿ç¨æ± å¤§å° |
| | | threadPriority: 5 |
| | | makeThreadsDaemons: true |
| | | updateCheck: false # å
³éçæ¬æ£æ¥ |
| | | |
| | | # tokené
ç½® |
| | | token: |
| | | # 令çèªå®ä¹æ è¯ |
| | | header: Authorization |
| | | # 令çå¯é¥ |
| | | secret: xpAVjhCjQDaDB7mjPAzMDSbQWXNu2zYkTdDNUsPMS5Xx8QMmQVYN7n74eZrYJxDJ |
| | | # ä»¤çæææï¼é»è®¤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 # æ£å¼ç®å½ åæå é¤ |
| | | path: /javaWork/product-inventory-management/file/path/uploads # ä¸ä¼ ç®å½ |
| | | urlPrefix: /prod-api/common # 龿¥åç¼ |
| | | domain: http://36.133.45.183:9001 # åååç¼ |
| | | expired: 120 # è¿ææ¶é´(åä½:åé) |
| | | useLimit: 10 # ä½¿ç¨æ¬¡æ° |
| | | compress: true # æ¯å¦å缩 |
| | | needCompressSize: 10MB # å缩éå¼ |
| | | compressQuality: 0.5 # å缩质é(0.0-1.0) |
| | | knowledge: |
| | | one: D:\æ°ç大ç½ç´ ä¼ä¸äº§åä½ç³»è¯´æææ¡£.md |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | # 项ç®ç¸å
³é
ç½® |
| | | 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 |
| | | # åå审æ¹ç¼å·åç¼(é
ç½®æä»¶åç¼å½å) |
| | | approvalNumberPrefix: NEW |
| | | |
| | | # ä¸ªæ¨ Unipush é
ç½® |
| | | getui: |
| | | appId: PfjyAAE0FK64FaO1w2CMb1 |
| | | appKey: zTMb831OEL6J4GK1uE3Ob4 |
| | | masterSecret: K1GFtsv42v61tXGnF7SGE5 |
| | | domain: https://restapi.getui.cn/v2/ |
| | | # 离线æ¨é使ç¨çå
å/ç»ä»¶å |
| | | intentComponent: uni.app.UNI099A590/io.dcloud.PandoraEntry |
| | | |
| | | # å¼åç¯å¢é
ç½® |
| | | server: |
| | | # æå¡å¨çHTTP端å£ï¼é»è®¤ä¸º8080 |
| | | port: 9003 |
| | | servlet: |
| | | # åºç¨ç访é®è·¯å¾ |
| | | context-path: / |
| | | tomcat: |
| | | # tomcatçURIç¼ç |
| | | uri-encoding: UTF-8 |
| | | # è¿æ¥æ°æ»¡åçæéæ°ï¼é»è®¤ä¸º100 |
| | | accept-count: 1000 |
| | | max-swallow-size: -1 # -1 表示ä¸éå¶ |
| | | max-http-form-post-size: -1 # POST 请æ±ä½ä¸éå¶ |
| | | connection-timeout: 60000 # è¿æ¥è¶
æ¶æ¶é´(毫ç§) |
| | | 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: uploadPath |
| | | # ç¨æ·é
ç½® |
| | | 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-xhzg?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | username: root |
| | | password: 200381 |
| | | # ä»åºæ°æ®æº |
| | | 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 |
| | | data: |
| | | # redis é
ç½® |
| | | redis: |
| | | # å°å |
| | | host: localhost |
| | | # host: 172.17.0.1 |
| | | # 端å£ï¼é»è®¤ä¸º6379 |
| | | port: 6379 |
| | | # æ°æ®åºç´¢å¼ |
| | | database: 0 |
| | | # å¯ç |
| | | # password: root2022! |
| | | password: |
| | | |
| | | # è¿æ¥è¶
æ¶æ¶é´ |
| | | timeout: 10s |
| | | lettuce: |
| | | pool: |
| | | # è¿æ¥æ± ä¸çæå°ç©ºé²è¿æ¥ |
| | | min-idle: 0 |
| | | # è¿æ¥æ± ä¸çæå¤§ç©ºé²è¿æ¥ |
| | | max-idle: 8 |
| | | # è¿æ¥æ± çæå¤§æ°æ®åºè¿æ¥æ° |
| | | max-active: 8 |
| | | # #è¿æ¥æ± æå¤§é»å¡çå¾
æ¶é´ï¼ä½¿ç¨è´å¼è¡¨ç¤ºæ²¡æéå¶ï¼ |
| | | max-wait: -1ms |
| | | # Quartz宿¶ä»»å¡é
ç½®ï¼æ°å¢é¨åï¼ |
| | | quartz: |
| | | job-store-type: jdbc # ä½¿ç¨æ°æ®åºåå¨ |
| | | jdbc: |
| | | initialize-schema: never # 馿¬¡è¿è¡æ¶èªå¨åå»ºè¡¨ç»æï¼æååæ¹ä¸ºnever |
| | | schema: classpath:org/quartz/impl/jdbcjobstore/tables_mysql_innodb.sql # MySQLè¡¨ç»æèæ¬ |
| | | properties: |
| | | org: |
| | | quartz: |
| | | scheduler: |
| | | instanceName: RuoYiScheduler |
| | | instanceId: AUTO |
| | | jobStore: |
| | | class: org.quartz.impl.jdbcjobstore.JobStoreTX |
| | | driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate # MySQLéé
|
| | | tablePrefix: qrtz_ # 表ååç¼ï¼ä¸èæ¬ä¸è´ |
| | | isClustered: false # åèç¹æ¨¡å¼ï¼éç¾¤éæ¹ä¸ºtrueï¼ |
| | | clusterCheckinInterval: 10000 |
| | | txIsolationLevelSerializable: true |
| | | threadPool: |
| | | class: org.quartz.simpl.SimpleThreadPool |
| | | threadCount: 10 # çº¿ç¨æ± å¤§å° |
| | | threadPriority: 5 |
| | | makeThreadsDaemons: true |
| | | updateCheck: false # å
³éçæ¬æ£æ¥ |
| | | # tokené
ç½® |
| | | token: |
| | | # 令çèªå®ä¹æ è¯ |
| | | header: Authorization |
| | | # 令çå¯é¥ |
| | | secret: xpAVjhCjQDaDB7mjPAzMDSbQWXNu2zYkTdDNUsPMS5Xx8QMmQVYN7n74eZrYJxDJ |
| | | # ä»¤çæææï¼é»è®¤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 # æ£å¼ç®å½ åæå é¤ |
| | | path: /javaWork/product-inventory-management/file/path/uploads # ä¸ä¼ ç®å½ |
| | | urlPrefix: /prod-api/common # 龿¥åç¼ |
| | | domain: http://36.137.101.88:9001 # åååç¼ |
| | | expired: 120 # è¿ææ¶é´(åä½:åé) |
| | | useLimit: 10 # ä½¿ç¨æ¬¡æ° |
| | | compress: true # æ¯å¦å缩 |
| | | needCompressSize: 10MB # å缩éå¼ |
| | | compressQuality: 0.5 # å缩质é(0.0-1.0) |
| | | knowledge: |
| | | one: D:\æ°ç大ç½ç´ ä¼ä¸äº§åä½ç³»è¯´æææ¡£.md |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | # 项ç®ç¸å
³é
ç½® |
| | | 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 |
| | | # åå审æ¹ç¼å·åç¼(é
ç½®æä»¶åç¼å½å) |
| | | approvalNumberPrefix: NEW |
| | | |
| | | # ä¸ªæ¨ Unipush é
ç½® |
| | | getui: |
| | | appId: PfjyAAE0FK64FaO1w2CMb1 |
| | | appKey: zTMb831OEL6J4GK1uE3Ob4 |
| | | masterSecret: K1GFtsv42v61tXGnF7SGE5 |
| | | domain: https://restapi.getui.cn/v2/ |
| | | # 离线æ¨é使ç¨çå
å/ç»ä»¶å |
| | | intentComponent: uni.app.UNI099A590/io.dcloud.PandoraEntry |
| | | |
| | | # å¼åç¯å¢é
ç½® |
| | | server: |
| | | # æå¡å¨çHTTP端å£ï¼é»è®¤ä¸º8080 |
| | | port: 9002 |
| | | 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: jxc |
| | | # ç¨æ·é
ç½® |
| | | 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://36.213.180.217:11101/product-inventory-management-xlzn?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 é
ç½® |
| | | data: |
| | | # redis é
ç½® |
| | | redis: |
| | | # å°å |
| | | # host: 127.0.0.1 |
| | | host: 172.17.0.1 |
| | | # 端å£ï¼é»è®¤ä¸º6379 |
| | | port: 11102 |
| | | # æ°æ®åºç´¢å¼ |
| | | database: 0 |
| | | # å¯ç |
| | | # password: root2022! |
| | | password: |
| | | |
| | | # è¿æ¥è¶
æ¶æ¶é´ |
| | | timeout: 10s |
| | | lettuce: |
| | | pool: |
| | | # è¿æ¥æ± ä¸çæå°ç©ºé²è¿æ¥ |
| | | min-idle: 0 |
| | | # è¿æ¥æ± ä¸çæå¤§ç©ºé²è¿æ¥ |
| | | max-idle: 8 |
| | | # è¿æ¥æ± çæå¤§æ°æ®åºè¿æ¥æ° |
| | | max-active: 8 |
| | | # #è¿æ¥æ± æå¤§é»å¡çå¾
æ¶é´ï¼ä½¿ç¨è´å¼è¡¨ç¤ºæ²¡æéå¶ï¼ |
| | | max-wait: -1ms |
| | | |
| | | # Quartz宿¶ä»»å¡é
ç½®ï¼æ°å¢é¨åï¼ |
| | | quartz: |
| | | job-store-type: jdbc # ä½¿ç¨æ°æ®åºåå¨ |
| | | jdbc: |
| | | initialize-schema: never # 馿¬¡è¿è¡æ¶èªå¨åå»ºè¡¨ç»æï¼æååæ¹ä¸ºnever |
| | | schema: classpath:org/quartz/impl/jdbcjobstore/tables_mysql_innodb.sql # MySQLè¡¨ç»æèæ¬ |
| | | properties: |
| | | org: |
| | | quartz: |
| | | scheduler: |
| | | instanceName: RuoYiScheduler |
| | | instanceId: AUTO |
| | | jobStore: |
| | | class: org.quartz.impl.jdbcjobstore.JobStoreTX |
| | | driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate # MySQLéé
|
| | | tablePrefix: qrtz_ # 表ååç¼ï¼ä¸èæ¬ä¸è´ |
| | | isClustered: false # åèç¹æ¨¡å¼ï¼éç¾¤éæ¹ä¸ºtrueï¼ |
| | | clusterCheckinInterval: 10000 |
| | | txIsolationLevelSerializable: true |
| | | threadPool: |
| | | class: org.quartz.simpl.SimpleThreadPool |
| | | threadCount: 10 # çº¿ç¨æ± å¤§å° |
| | | threadPriority: 5 |
| | | makeThreadsDaemons: true |
| | | updateCheck: false # å
³éçæ¬æ£æ¥ |
| | | # tokené
ç½® |
| | | token: |
| | | # 令çèªå®ä¹æ è¯ |
| | | header: Authorization |
| | | # 令çå¯é¥ |
| | | secret: xpAVjhCjQDaDB7mjPAzMDSbQWXNu2zYkTdDNUsPMS5Xx8QMmQVYN7n74eZrYJxDJ |
| | | # ä»¤çæææï¼é»è®¤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 # æ£å¼ç®å½ |
| | | path: /javaWork/product-inventory-management/file # ä¸ä¼ ç®å½ |
| | | urlPrefix: /prod-api/common # 龿¥åç¼ |
| | | domain: http://36.213.180.217:9001 # åååç¼ |
| | | expired: 120 # è¿ææ¶é´(åä½:åé) |
| | | useLimit: 10 # ä½¿ç¨æ¬¡æ° |
| | | compress: true # æ¯å¦å缩 |
| | | needCompressSize: 10MB # å缩éå¼ |
| | | compressQuality: 0.5 # å缩质é(0.0-1.0) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | # 项ç®ç¸å
³é
ç½® |
| | | 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 |
| | | # åå审æ¹ç¼å·åç¼(é
ç½®æä»¶åç¼å½å) |
| | | approvalNumberPrefix: NEW |
| | | |
| | | # ä¸ªæ¨ Unipush é
ç½® |
| | | getui: |
| | | appId: PfjyAAE0FK64FaO1w2CMb1 |
| | | appKey: zTMb831OEL6J4GK1uE3Ob4 |
| | | masterSecret: K1GFtsv42v61tXGnF7SGE5 |
| | | domain: https://restapi.getui.cn/v2/ |
| | | # 离线æ¨é使ç¨çå
å/ç»ä»¶å |
| | | intentComponent: uni.app.UNI099A590/io.dcloud.PandoraEntry |
| | | |
| | | # å¼åç¯å¢é
ç½® |
| | | server: |
| | | # æå¡å¨çHTTP端å£ï¼é»è®¤ä¸º8080 |
| | | port: 9002 |
| | | 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: jxc |
| | | # ç¨æ·é
ç½® |
| | | 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:9000/product-inventory-management-xswh?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | username: root |
| | | password: xswh@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 é
ç½® |
| | | data: |
| | | # redis é
ç½® |
| | | redis: |
| | | # å°å |
| | | # host: 127.0.0.1 |
| | | host: 172.17.0.1 |
| | | # 端å£ï¼é»è®¤ä¸º6379 |
| | | port: 6379 |
| | | # æ°æ®åºç´¢å¼ |
| | | database: 0 |
| | | # å¯ç |
| | | # password: root2022! |
| | | password: |
| | | |
| | | # è¿æ¥è¶
æ¶æ¶é´ |
| | | timeout: 10s |
| | | lettuce: |
| | | pool: |
| | | # è¿æ¥æ± ä¸çæå°ç©ºé²è¿æ¥ |
| | | min-idle: 0 |
| | | # è¿æ¥æ± ä¸çæå¤§ç©ºé²è¿æ¥ |
| | | max-idle: 8 |
| | | # è¿æ¥æ± çæå¤§æ°æ®åºè¿æ¥æ° |
| | | max-active: 8 |
| | | # #è¿æ¥æ± æå¤§é»å¡çå¾
æ¶é´ï¼ä½¿ç¨è´å¼è¡¨ç¤ºæ²¡æéå¶ï¼ |
| | | max-wait: -1ms |
| | | |
| | | # Quartz宿¶ä»»å¡é
ç½®ï¼æ°å¢é¨åï¼ |
| | | quartz: |
| | | job-store-type: jdbc # ä½¿ç¨æ°æ®åºåå¨ |
| | | jdbc: |
| | | initialize-schema: never # 馿¬¡è¿è¡æ¶èªå¨åå»ºè¡¨ç»æï¼æååæ¹ä¸ºnever |
| | | schema: classpath:org/quartz/impl/jdbcjobstore/tables_mysql_innodb.sql # MySQLè¡¨ç»æèæ¬ |
| | | properties: |
| | | org: |
| | | quartz: |
| | | scheduler: |
| | | instanceName: RuoYiScheduler |
| | | instanceId: AUTO |
| | | jobStore: |
| | | class: org.quartz.impl.jdbcjobstore.JobStoreTX |
| | | driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate # MySQLéé
|
| | | tablePrefix: qrtz_ # 表ååç¼ï¼ä¸èæ¬ä¸è´ |
| | | isClustered: false # åèç¹æ¨¡å¼ï¼éç¾¤éæ¹ä¸ºtrueï¼ |
| | | clusterCheckinInterval: 10000 |
| | | txIsolationLevelSerializable: true |
| | | threadPool: |
| | | class: org.quartz.simpl.SimpleThreadPool |
| | | threadCount: 10 # çº¿ç¨æ± å¤§å° |
| | | threadPriority: 5 |
| | | makeThreadsDaemons: true |
| | | updateCheck: false # å
³éçæ¬æ£æ¥ |
| | | # tokené
ç½® |
| | | token: |
| | | # 令çèªå®ä¹æ è¯ |
| | | header: Authorization |
| | | # 令çå¯é¥ |
| | | secret: xpAVjhCjQDaDB7mjPAzMDSbQWXNu2zYkTdDNUsPMS5Xx8QMmQVYN7n74eZrYJxDJ |
| | | # ä»¤çæææï¼é»è®¤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 # æ£å¼ç®å½ |
| | | path: /javaWork/product-inventory-management/file # ä¸ä¼ ç®å½ |
| | | urlPrefix: /prod-api/common # 龿¥åç¼ |
| | | domain: http://36.138.177.225:9001 # åååç¼ |
| | | expired: 120 # è¿ææ¶é´(åä½:åé) |
| | | useLimit: 10 # ä½¿ç¨æ¬¡æ° |
| | | compress: true # æ¯å¦å缩 |
| | | needCompressSize: 10MB # å缩éå¼ |
| | | compressQuality: 0.5 # å缩质é(0.0-1.0) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | # 项ç®ç¸å
³é
ç½® |
| | | 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 |
| | | # åå审æ¹ç¼å·åç¼(é
ç½®æä»¶åç¼å½å) |
| | | approvalNumberPrefix: NEW |
| | | |
| | | # ä¸ªæ¨ Unipush é
ç½® |
| | | getui: |
| | | appId: PfjyAAE0FK64FaO1w2CMb1 |
| | | appKey: zTMb831OEL6J4GK1uE3Ob4 |
| | | masterSecret: K1GFtsv42v61tXGnF7SGE5 |
| | | domain: https://restapi.getui.cn/v2/ |
| | | # 离线æ¨é使ç¨çå
å/ç»ä»¶å |
| | | intentComponent: uni.app.UNI099A590/io.dcloud.PandoraEntry |
| | | |
| | | # å¼åç¯å¢é
ç½® |
| | | server: |
| | | # æå¡å¨çHTTP端å£ï¼é»è®¤ä¸º8080 |
| | | port: 9002 |
| | | 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: jxc |
| | | # ç¨æ·é
ç½® |
| | | 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://36.213.180.217:11101/product-inventory-management-yjyy?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 é
ç½® |
| | | data: |
| | | # redis é
ç½® |
| | | redis: |
| | | # å°å |
| | | # host: 127.0.0.1 |
| | | host: 36.213.180.217 |
| | | # 端å£ï¼é»è®¤ä¸º6379 |
| | | port: 11102 |
| | | # æ°æ®åºç´¢å¼ |
| | | database: 0 |
| | | # å¯ç |
| | | # password: root2022! |
| | | password: |
| | | |
| | | # è¿æ¥è¶
æ¶æ¶é´ |
| | | timeout: 10s |
| | | lettuce: |
| | | pool: |
| | | # è¿æ¥æ± ä¸çæå°ç©ºé²è¿æ¥ |
| | | min-idle: 0 |
| | | # è¿æ¥æ± ä¸çæå¤§ç©ºé²è¿æ¥ |
| | | max-idle: 8 |
| | | # è¿æ¥æ± çæå¤§æ°æ®åºè¿æ¥æ° |
| | | max-active: 8 |
| | | # #è¿æ¥æ± æå¤§é»å¡çå¾
æ¶é´ï¼ä½¿ç¨è´å¼è¡¨ç¤ºæ²¡æéå¶ï¼ |
| | | max-wait: -1ms |
| | | |
| | | # Quartz宿¶ä»»å¡é
ç½®ï¼æ°å¢é¨åï¼ |
| | | quartz: |
| | | job-store-type: jdbc # ä½¿ç¨æ°æ®åºåå¨ |
| | | jdbc: |
| | | initialize-schema: never # 馿¬¡è¿è¡æ¶èªå¨åå»ºè¡¨ç»æï¼æååæ¹ä¸ºnever |
| | | schema: classpath:org/quartz/impl/jdbcjobstore/tables_mysql_innodb.sql # MySQLè¡¨ç»æèæ¬ |
| | | properties: |
| | | org: |
| | | quartz: |
| | | scheduler: |
| | | instanceName: RuoYiScheduler |
| | | instanceId: AUTO |
| | | jobStore: |
| | | class: org.quartz.impl.jdbcjobstore.JobStoreTX |
| | | driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate # MySQLéé
|
| | | tablePrefix: qrtz_ # 表ååç¼ï¼ä¸èæ¬ä¸è´ |
| | | isClustered: false # åèç¹æ¨¡å¼ï¼éç¾¤éæ¹ä¸ºtrueï¼ |
| | | clusterCheckinInterval: 10000 |
| | | txIsolationLevelSerializable: true |
| | | threadPool: |
| | | class: org.quartz.simpl.SimpleThreadPool |
| | | threadCount: 10 # çº¿ç¨æ± å¤§å° |
| | | threadPriority: 5 |
| | | makeThreadsDaemons: true |
| | | updateCheck: false # å
³éçæ¬æ£æ¥ |
| | | # tokené
ç½® |
| | | token: |
| | | # 令çèªå®ä¹æ è¯ |
| | | header: Authorization |
| | | # 令çå¯é¥ |
| | | secret: xpAVjhCjQDaDB7mjPAzMDSbQWXNu2zYkTdDNUsPMS5Xx8QMmQVYN7n74eZrYJxDJ |
| | | # ä»¤çæææï¼é»è®¤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 # æ£å¼ç®å½ |
| | | path: /javaWork/product-inventory-management/file # ä¸ä¼ ç®å½ |
| | | urlPrefix: /prod-api/common # 龿¥åç¼ |
| | | # domain: http://192.168.1.32:9001 # åååç¼ |
| | | domain: http://36.213.180.217:9516 # åååç¼ |
| | | expired: 120 # è¿ææ¶é´(åä½:åé) |
| | | useLimit: 10 # ä½¿ç¨æ¬¡æ° |
| | | compress: true # æ¯å¦å缩 |
| | | needCompressSize: 10MB # å缩éå¼ |
| | | compressQuality: 0.5 # å缩质é(0.0-1.0) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | # 项ç®ç¸å
³é
ç½® |
| | | 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 |
| | | # åå审æ¹ç¼å·åç¼(é
ç½®æä»¶åç¼å½å) |
| | | approvalNumberPrefix: NEW |
| | | |
| | | # ä¸ªæ¨ Unipush é
ç½® |
| | | getui: |
| | | appId: PfjyAAE0FK64FaO1w2CMb1 |
| | | appKey: zTMb831OEL6J4GK1uE3Ob4 |
| | | masterSecret: K1GFtsv42v61tXGnF7SGE5 |
| | | domain: https://restapi.getui.cn/v2/ |
| | | # 离线æ¨é使ç¨çå
å/ç»ä»¶å |
| | | intentComponent: uni.app.UNI099A590/io.dcloud.PandoraEntry |
| | | |
| | | # å¼åç¯å¢é
ç½® |
| | | server: |
| | | # æå¡å¨çHTTP端å£ï¼é»è®¤ä¸º8080 |
| | | port: 9003 |
| | | 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: jxc |
| | | # ç¨æ·é
ç½® |
| | | 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:9002/product-inventory-management-ytjz-pro?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | username: root |
| | | password: ytjz@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 é
ç½® |
| | | data: |
| | | # redis é
ç½® |
| | | redis: |
| | | # å°å |
| | | # host: 127.0.0.1 |
| | | host: 172.17.0.1 |
| | | # 端å£ï¼é»è®¤ä¸º6379 |
| | | port: 6379 |
| | | # æ°æ®åºç´¢å¼ |
| | | database: 0 |
| | | # å¯ç |
| | | # password: root2022! |
| | | password: |
| | | |
| | | # è¿æ¥è¶
æ¶æ¶é´ |
| | | timeout: 10s |
| | | lettuce: |
| | | pool: |
| | | # è¿æ¥æ± ä¸çæå°ç©ºé²è¿æ¥ |
| | | min-idle: 0 |
| | | # è¿æ¥æ± ä¸çæå¤§ç©ºé²è¿æ¥ |
| | | max-idle: 8 |
| | | # è¿æ¥æ± çæå¤§æ°æ®åºè¿æ¥æ° |
| | | max-active: 8 |
| | | # #è¿æ¥æ± æå¤§é»å¡çå¾
æ¶é´ï¼ä½¿ç¨è´å¼è¡¨ç¤ºæ²¡æéå¶ï¼ |
| | | max-wait: -1ms |
| | | |
| | | # Quartz宿¶ä»»å¡é
ç½®ï¼æ°å¢é¨åï¼ |
| | | quartz: |
| | | job-store-type: jdbc # ä½¿ç¨æ°æ®åºåå¨ |
| | | jdbc: |
| | | initialize-schema: never # 馿¬¡è¿è¡æ¶èªå¨åå»ºè¡¨ç»æï¼æååæ¹ä¸ºnever |
| | | schema: classpath:org/quartz/impl/jdbcjobstore/tables_mysql_innodb.sql # MySQLè¡¨ç»æèæ¬ |
| | | properties: |
| | | org: |
| | | quartz: |
| | | scheduler: |
| | | instanceName: RuoYiScheduler |
| | | instanceId: AUTO |
| | | jobStore: |
| | | class: org.quartz.impl.jdbcjobstore.JobStoreTX |
| | | driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate # MySQLéé
|
| | | tablePrefix: qrtz_ # 表ååç¼ï¼ä¸èæ¬ä¸è´ |
| | | isClustered: false # åèç¹æ¨¡å¼ï¼éç¾¤éæ¹ä¸ºtrueï¼ |
| | | clusterCheckinInterval: 10000 |
| | | txIsolationLevelSerializable: true |
| | | threadPool: |
| | | class: org.quartz.simpl.SimpleThreadPool |
| | | threadCount: 10 # çº¿ç¨æ± å¤§å° |
| | | threadPriority: 5 |
| | | makeThreadsDaemons: true |
| | | updateCheck: false # å
³éçæ¬æ£æ¥ |
| | | # tokené
ç½® |
| | | token: |
| | | # 令çèªå®ä¹æ è¯ |
| | | header: Authorization |
| | | # 令çå¯é¥ |
| | | secret: xpAVjhCjQDaDB7mjPAzMDSbQWXNu2zYkTdDNUsPMS5Xx8QMmQVYN7n74eZrYJxDJ |
| | | # ä»¤çæææï¼é»è®¤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 # æ£å¼ç®å½ |
| | | path: /javaWork/product-inventory-management/file # ä¸ä¼ ç®å½ |
| | | urlPrefix: /prod-api/common # 龿¥åç¼ |
| | | domain: http://36.139.201.181:9001 # åååç¼ |
| | | expired: 120 # è¿ææ¶é´(åä½:åé) |
| | | useLimit: 10 # ä½¿ç¨æ¬¡æ° |
| | | compress: true # æ¯å¦å缩 |
| | | needCompressSize: 10MB # å缩éå¼ |
| | | compressQuality: 0.5 # å缩质é(0.0-1.0) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | # 项ç®ç¸å
³é
ç½® |
| | | 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 |
| | | # åå审æ¹ç¼å·åç¼(é
ç½®æä»¶åç¼å½å) |
| | | approvalNumberPrefix: NEW |
| | | |
| | | # ä¸ªæ¨ Unipush é
ç½® |
| | | getui: |
| | | appId: PfjyAAE0FK64FaO1w2CMb1 |
| | | appKey: zTMb831OEL6J4GK1uE3Ob4 |
| | | masterSecret: K1GFtsv42v61tXGnF7SGE5 |
| | | domain: https://restapi.getui.cn/v2/ |
| | | # 离线æ¨é使ç¨çå
å/ç»ä»¶å |
| | | intentComponent: uni.app.UNI099A590/io.dcloud.PandoraEntry |
| | | |
| | | # å¼åç¯å¢é
ç½® |
| | | server: |
| | | # æå¡å¨çHTTP端å£ï¼é»è®¤ä¸º8080 |
| | | port: 9003 |
| | | servlet: |
| | | # åºç¨ç访é®è·¯å¾ |
| | | context-path: / |
| | | tomcat: |
| | | # tomcatçURIç¼ç |
| | | uri-encoding: UTF-8 |
| | | # è¿æ¥æ°æ»¡åçæéæ°ï¼é»è®¤ä¸º100 |
| | | accept-count: 1000 |
| | | max-swallow-size: -1 # -1 表示ä¸éå¶ |
| | | max-http-form-post-size: -1 # POST 请æ±ä½ä¸éå¶ |
| | | connection-timeout: 60000 # è¿æ¥è¶
æ¶æ¶é´(毫ç§) |
| | | 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: uploadPath |
| | | # ç¨æ·é
ç½® |
| | | 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:9002/product-inventory-management-zqsy-pro?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | username: root |
| | | password: zqsy@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 |
| | | data: |
| | | # redis é
ç½® |
| | | redis: |
| | | # å°å |
| | | # host: 127.0.0.1 |
| | | host: 172.17.0.1 |
| | | # 端å£ï¼é»è®¤ä¸º6379 |
| | | port: 6379 |
| | | # æ°æ®åºç´¢å¼ |
| | | database: 0 |
| | | # å¯ç |
| | | # password: root2022! |
| | | password: |
| | | |
| | | # è¿æ¥è¶
æ¶æ¶é´ |
| | | timeout: 10s |
| | | lettuce: |
| | | pool: |
| | | # è¿æ¥æ± ä¸çæå°ç©ºé²è¿æ¥ |
| | | min-idle: 0 |
| | | # è¿æ¥æ± ä¸çæå¤§ç©ºé²è¿æ¥ |
| | | max-idle: 8 |
| | | # è¿æ¥æ± çæå¤§æ°æ®åºè¿æ¥æ° |
| | | max-active: 8 |
| | | # #è¿æ¥æ± æå¤§é»å¡çå¾
æ¶é´ï¼ä½¿ç¨è´å¼è¡¨ç¤ºæ²¡æéå¶ï¼ |
| | | max-wait: -1ms |
| | | # Quartz宿¶ä»»å¡é
ç½®ï¼æ°å¢é¨åï¼ |
| | | quartz: |
| | | job-store-type: jdbc # ä½¿ç¨æ°æ®åºåå¨ |
| | | jdbc: |
| | | initialize-schema: never # 馿¬¡è¿è¡æ¶èªå¨åå»ºè¡¨ç»æï¼æååæ¹ä¸ºnever |
| | | schema: classpath:org/quartz/impl/jdbcjobstore/tables_mysql_innodb.sql # MySQLè¡¨ç»æèæ¬ |
| | | properties: |
| | | org: |
| | | quartz: |
| | | scheduler: |
| | | instanceName: RuoYiScheduler |
| | | instanceId: AUTO |
| | | jobStore: |
| | | class: org.quartz.impl.jdbcjobstore.JobStoreTX |
| | | driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate # MySQLéé
|
| | | tablePrefix: qrtz_ # 表ååç¼ï¼ä¸èæ¬ä¸è´ |
| | | isClustered: false # åèç¹æ¨¡å¼ï¼éç¾¤éæ¹ä¸ºtrueï¼ |
| | | clusterCheckinInterval: 10000 |
| | | txIsolationLevelSerializable: true |
| | | threadPool: |
| | | class: org.quartz.simpl.SimpleThreadPool |
| | | threadCount: 10 # çº¿ç¨æ± å¤§å° |
| | | threadPriority: 5 |
| | | makeThreadsDaemons: true |
| | | updateCheck: false # å
³éçæ¬æ£æ¥ |
| | | # tokené
ç½® |
| | | token: |
| | | # 令çèªå®ä¹æ è¯ |
| | | header: Authorization |
| | | # 令çå¯é¥ |
| | | secret: xpAVjhCjQDaDB7mjPAzMDSbQWXNu2zYkTdDNUsPMS5Xx8QMmQVYN7n74eZrYJxDJ |
| | | # ä»¤çæææï¼é»è®¤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 # æ£å¼ç®å½ åæå é¤ |
| | | path: /javaWork/product-inventory-management/file/path/uploads # ä¸ä¼ ç®å½ |
| | | urlPrefix: /prod-api/common # 龿¥åç¼ |
| | | domain: http://36.213.128.159:9001 # åååç¼ |
| | | expired: 120 # è¿ææ¶é´(åä½:åé) |
| | | useLimit: 10 # ä½¿ç¨æ¬¡æ° |
| | | compress: true # æ¯å¦å缩 |
| | | needCompressSize: 10MB # å缩éå¼ |
| | | compressQuality: 0.5 # å缩质é(0.0-1.0) |
| | | knowledge: |
| | | one: D:\æ°ç大ç½ç´ ä¼ä¸äº§åä½ç³»è¯´æææ¡£.md |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | # 项ç®ç¸å
³é
ç½® |
| | | 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 |
| | | # åå审æ¹ç¼å·åç¼(é
ç½®æä»¶åç¼å½å) |
| | | approvalNumberPrefix: NEW |
| | | |
| | | # ä¸ªæ¨ Unipush é
ç½® |
| | | getui: |
| | | appId: PfjyAAE0FK64FaO1w2CMb1 |
| | | appKey: zTMb831OEL6J4GK1uE3Ob4 |
| | | masterSecret: K1GFtsv42v61tXGnF7SGE5 |
| | | domain: https://restapi.getui.cn/v2/ |
| | | # 离线æ¨é使ç¨çå
å/ç»ä»¶å |
| | | intentComponent: uni.app.UNI099A590/io.dcloud.PandoraEntry |
| | | |
| | | # å¼åç¯å¢é
ç½® |
| | | server: |
| | | # æå¡å¨çHTTP端å£ï¼é»è®¤ä¸º8080 |
| | | port: 9003 |
| | | 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: jxc |
| | | # ç¨æ·é
ç½® |
| | | 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-zxzn?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | username: root |
| | | password: zxzn@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 é
ç½® |
| | | data: |
| | | # redis é
ç½® |
| | | redis: |
| | | # å°å |
| | | # host: 127.0.0.1 |
| | | host: 172.17.0.1 |
| | | # 端å£ï¼é»è®¤ä¸º6379 |
| | | port: 6379 |
| | | # æ°æ®åºç´¢å¼ |
| | | database: 15 |
| | | # å¯ç |
| | | # password: root2022! |
| | | password: |
| | | |
| | | # è¿æ¥è¶
æ¶æ¶é´ |
| | | timeout: 10s |
| | | lettuce: |
| | | pool: |
| | | # è¿æ¥æ± ä¸çæå°ç©ºé²è¿æ¥ |
| | | min-idle: 0 |
| | | # è¿æ¥æ± ä¸çæå¤§ç©ºé²è¿æ¥ |
| | | max-idle: 8 |
| | | # è¿æ¥æ± çæå¤§æ°æ®åºè¿æ¥æ° |
| | | max-active: 8 |
| | | # #è¿æ¥æ± æå¤§é»å¡çå¾
æ¶é´ï¼ä½¿ç¨è´å¼è¡¨ç¤ºæ²¡æéå¶ï¼ |
| | | max-wait: -1ms |
| | | |
| | | # Quartz宿¶ä»»å¡é
ç½®ï¼æ°å¢é¨åï¼ |
| | | quartz: |
| | | job-store-type: jdbc # ä½¿ç¨æ°æ®åºåå¨ |
| | | jdbc: |
| | | initialize-schema: never # 馿¬¡è¿è¡æ¶èªå¨åå»ºè¡¨ç»æï¼æååæ¹ä¸ºnever |
| | | schema: classpath:org/quartz/impl/jdbcjobstore/tables_mysql_innodb.sql # MySQLè¡¨ç»æèæ¬ |
| | | properties: |
| | | org: |
| | | quartz: |
| | | scheduler: |
| | | instanceName: RuoYiScheduler |
| | | instanceId: AUTO |
| | | jobStore: |
| | | class: org.quartz.impl.jdbcjobstore.JobStoreTX |
| | | driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate # MySQLéé
|
| | | tablePrefix: qrtz_ # 表ååç¼ï¼ä¸èæ¬ä¸è´ |
| | | isClustered: false # åèç¹æ¨¡å¼ï¼éç¾¤éæ¹ä¸ºtrueï¼ |
| | | clusterCheckinInterval: 10000 |
| | | txIsolationLevelSerializable: true |
| | | threadPool: |
| | | class: org.quartz.simpl.SimpleThreadPool |
| | | threadCount: 10 # çº¿ç¨æ± å¤§å° |
| | | threadPriority: 5 |
| | | makeThreadsDaemons: true |
| | | updateCheck: false # å
³éçæ¬æ£æ¥ |
| | | # tokené
ç½® |
| | | token: |
| | | # 令çèªå®ä¹æ è¯ |
| | | header: Authorization |
| | | # 令çå¯é¥ |
| | | secret: xpAVjhCjQDaDB7mjPAzMDSbQWXNu2zYkTdDNUsPMS5Xx8QMmQVYN7n74eZrYJxDJ |
| | | # ä»¤çæææï¼é»è®¤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 # æ£å¼ç®å½ |
| | | path: /javaWork/product-inventory-management/file # ä¸ä¼ ç®å½ |
| | | urlPrefix: /prod-api/common # 龿¥åç¼ |
| | | domain: http://192.168.0.200:9001 # åååç¼ |
| | | expired: 120 # è¿ææ¶é´(åä½:åé) |
| | | useLimit: 10 # ä½¿ç¨æ¬¡æ° |
| | | compress: true # æ¯å¦å缩 |
| | | needCompressSize: 10MB # å缩éå¼ |
| | | compressQuality: 0.5 # å缩质é(0.0-1.0) |
| | |
| | | # Springé
ç½® |
| | | spring: |
| | | jackson: |
| | | date-format: yyyy-MM-dd HH:mm:ss |
| | | time-zone: GMT+8 |
| | | main: |
| | | allow-circular-references: true |
| | | profiles: |
| | | active: dev |
| | | |
| | | # Pinecone åéæ°æ®åºé
ç½® |
| | | pinecone: |
| | | api-key: pcsk_4SJLnh_tNB3wSLJU8tc4E5P28PcXX8eCLdURqZpVhg1FMV8CRYxjneWdzqRdB5Ftqooi9 |
| | | index: xiaozhi-index |
| | | namespace: knowledge-base |
| | | |
| | | langchain4j: |
| | | mcp: |
| | | # MCP æå¡ç«¯å°åï¼æ ¹æ®å®é
é¨ç½²ç MCP æå¡è°æ´ï¼ |
| | |
| | | å½åæ¥æï¼{{currentDate}}ï¼ä¸å½æ¶åºï¼ã |
| | | |
| | | å·¥ä½è§åï¼ |
| | | 1. ç¨æ·æåºâæ¥ãé®ãç»è®¡ãåæãé¢è¦ãå»ºè®®ãæ¥åâç±»éæ±æ¶ï¼ä¼å
è°ç¨å·¥å
·è¿åç»æå JSONï¼ä¸ç¼é ä¸å¡æ°æ®ã |
| | | 2. å½ä¸ææ¬ã婿¶¦ãåºåèµéãç°éæµãé¢è¦ã驾驶è±ãæ¥æ¥ã卿¥çåºæ¯æ¶ï¼ä¼å
è°ç¨å¯¹åºå·¥å
·ã |
| | | 1. ç¨æ·æåºâæ¥ãé®ãç»è®¡ãåæãé¢è¦ãå»ºè®®ãæ¥åâéæ±æ¶ï¼ä¼å
è°ç¨å·¥å
·è¿åç»æå JSONï¼ä¸ç¼é ä¸å¡æ°æ®ã |
| | | 2. å½ä¸ææ¬ã婿¶¦ãåºåèµéãç°éæµãé¢è¦ã驾驶è±ãæ¥æ¥å¨æ¥åºæ¯æ¶ï¼ä¼å
è°ç¨å¯¹åºå·¥å
·ã |
| | | 3. å·¥å
·è¿å JSON æ¶ï¼ç´æ¥è¾åºåå§ JSON å符串ï¼ä¸è¦é¢å¤å
裹 Markdownï¼ä¹ä¸è¦å¨åå追å è§£éææ¬ã |
| | | 4. ç¨æ·æ²¡ææç¡®ç»åºæ¶é´ã客æ·ãä¾åºåã产åã订åãæ°éçç鿡件æ¶ï¼ä¸è¦èªè¡è¡¥å
æ¡ä»¶ï¼å·¥å
·åæ°ä¿æä¸ºç©ºï¼ç±å·¥å
·æå½åä¸å¡å£å¾æ¥è¯¢ã |
| | | 5. ç¨æ·æå°âæ¬å¨ãæ¬æãä»å¹´ãä»å¤©ãæè¿ãè¿30天ã䏿ãå»å¹´âçç¸å¯¹æ¶é´æ¶ï¼å¿
é¡»ä¸¥æ ¼åºäºâå½åæ¥æâæ¢ç®ï¼ç¦æ¢èªè¡å设年份ã |
| | | 6. ç¨æ·é®â为ä»ä¹å©æ¶¦ä¸éââåªä¸ªè®¢åäºæââåªä¸ªå®¢æ·æèµé±ââåªä¸ªå®¢æ·å©æ¶¦è´¡ç®æé«ââåªä¸ªå·¥åºææ¬æé«âçé®é¢æ¶ï¼ä¼å
åºäºè®¢å婿¶¦ä¸å·¥åºææ¬åæå·¥å
·ä½çã |
| | | 7. åçå¿
须使ç¨ä¸æï¼è¥æ°æ®ä¸è¶³ä»¥å¾åºç»è®ºï¼æç¡®æåºç¼ºå°åªäºå
³é®å段æç鿡件ã |
| | | 4. å½ç¨æ·é®é¢ç¼ºå°æ¶é´èå´æ¶ï¼é»è®¤ä½¿ç¨å·¥å
·å
ç½®å£å¾ï¼å¦è¿30å¤©ãæ¬æãè¿90天ï¼ï¼å¹¶å¨åç»å¯æéç¨æ·è¡¥å
èå´ã |
| | | 5. ç¨æ·é®â为ä»ä¹å©æ¶¦ä¸éââåªä¸ªè®¢åäºæââåªä¸ªå®¢æ·æèµé±ââåªä¸ªå®¢æ·å©æ¶¦è´¡ç®æé«ââåªä¸ªè½¦é´/å·¥åºææ¬æé«âçé®é¢æ¶ï¼ä¼å
åºäºè®¢å婿¶¦ä¸å·¥åºææ¬åæå·¥å
·ä½çã |
| | | 6. åçå¿
须使ç¨ä¸æï¼è¥æ°æ®ä¸è¶³ä»¥å¾åºç»è®ºï¼æç¡®æåºç¼ºå°åªäºå
³é®å段æç鿡件ã |
| | | 7. ç¨æ·æå°âä»å¹´/æ¬æ/ä»å¤©/æè¿/䏿/å»å¹´âçç¸å¯¹æ¶é´æ¶ï¼å¿
é¡»ä¸¥æ ¼åºäºâå½åæ¥æâæ¢ç®ï¼ç¦æ¢èªè¡å设年份ã |
| | |
| | | AND A.apply_date BETWEEN #{req.startDate} AND #{req.endDate} |
| | | </if> |
| | | </where> |
| | | order by A.id desc |
| | | </select> |
| | | |
| | | <select id="getInboundBatchesBySupplier" |
| | |
| | | </select> |
| | | |
| | | <select id="existsByStockInRecordId" resultType="java.lang.Boolean"> |
| | | SELECT COUNT(*) > 0 |
| | | SELECT COUNT(*) > 0 |
| | | FROM account_payment_application |
| | | WHERE status != 2 |
| | | AND ( |
| | | <foreach collection="stockInRecordIds" item="id" separator=" OR "> |
| | | FIND_IN_SET(#{id}, stock_in_record_ids) > 0 |
| | | </foreach> |
| | | ) |
| | | WHERE status != 2 |
| | | <foreach collection="stockInRecordIds" item="id" open="(" separator=" OR " close=")"> |
| | | FIND_IN_SET(#{id}, stock_in_record_ids) |
| | | </foreach> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | AND api.issue_date BETWEEN #{req.startDate} AND #{req.endDate} |
| | | </if> |
| | | </where> |
| | | order by api.id desc |
| | | </select> |
| | | <select id="getInboundBatchesBySupplier" |
| | | resultType="com.ruoyi.account.bean.vo.purchase.PurchaseInboundVo"> |
| | |
| | | AND app.payment_date BETWEEN #{req.startDate} AND #{req.endDate} |
| | | </if> |
| | | </where> |
| | | order by app.id desc |
| | | </select> |
| | | <select id="selectPayment" resultType="com.ruoyi.home.dto.IncomeExpenseAnalysisDto"> |
| | | SELECT DATE_FORMAT(payment_date, #{dateFormat}) AS dateStr, |
| | |
| | | AND A.apply_date BETWEEN #{req.startDate} AND #{req.endDate} |
| | | </if> |
| | | </where> |
| | | order by A.id desc |
| | | </select> |
| | | <select id="getOutboundBatchesByCustomer" |
| | | resultType="com.ruoyi.account.bean.vo.sales.SalesOutboundVo"> |
| | |
| | | <select id="existsByStockOutRecordId" resultType="java.lang.Boolean"> |
| | | SELECT COUNT(*) > 0 |
| | | FROM account_invoice_application |
| | | WHERE status != 2 |
| | | AND ( |
| | | <foreach collection="stockOutRecordIds" item="id" separator=" OR "> |
| | | FIND_IN_SET(#{id}, stock_out_record_ids) > 0 |
| | | </foreach> |
| | | ) |
| | | </select> |
| | | <select id="selectAccountInvoiceApplicationList" |
| | | resultType="com.ruoyi.account.bean.vo.sales.AccountInvoiceApplicationVo"> |
| | | select |
| | | * |
| | | from ( |
| | | select aia.*, |
| | | asi.id AS sales_invoice_id, |
| | | asi.status AS sales_invoice_status, |
| | | c.customer_name, |
| | | GROUP_CONCAT(sour.outbound_batches SEPARATOR ',') AS outboundBatches |
| | | from account_invoice_application aia |
| | | left join customer c on aia.customer_id = c.id |
| | | left join stock_out_record sour on FIND_IN_SET(sour.id, aia.stock_out_record_ids) > 0 |
| | | left join account_sales_invoice asi on aia.id = asi.account_invoice_application_id |
| | | GROUP BY aia.id |
| | | )A |
| | | WHERE A.customer_id = #{customerId} |
| | | AND (COALESCE(A.sales_invoice_id,'') = '' OR A.sales_invoice_status = 1) |
| | | AND A.status = 1 |
| | | order by A.id desc |
| | | WHERE status!=2 |
| | | <foreach collection="stockOutRecordIds" item="id" open="(" separator=" OR " close=")"> |
| | | FIND_IN_SET(#{id}, stock_out_record_ids) |
| | | </foreach> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | AND A.collection_date BETWEEN #{req.startDate} AND #{req.endDate} |
| | | </if> |
| | | </where> |
| | | order by A.id desc |
| | | |
| | | </select> |
| | | <select id="existsByStockOutRecordId" resultType="java.lang.Boolean"> |
| | | SELECT COUNT(*) > 0 |
| | |
| | | <select id="getOutboundBatchesByCustomer" |
| | | resultType="com.ruoyi.account.bean.vo.sales.SalesOutboundVo"> |
| | | SELECT |
| | | id, |
| | | outbound_batches, |
| | | customer_name, |
| | | shipping_date, |
| | | product_name, |
| | | specification_model, |
| | | tax_rate, |
| | | outbound_amount, |
| | | shipping_no, |
| | | sales_contract_no, |
| | | amount_received |
| | | FROM |
| | | ( |
| | | SELECT |
| | | sor.id, |
| | | sor.outbound_batches, |
| | | sl.customer_name, |
| | | sor.create_time AS shipping_date, |
| | | p.product_name, |
| | | pm.model AS specification_model, |
| | | slp.tax_rate, |
| | | sor.stock_out_num * slp.tax_inclusive_unit_price AS outbound_amount, |
| | | s.shipping_no, |
| | | sl.sales_contract_no, |
| | | COALESCE ( SUM( acsc.collection_amount ), 0 ) AS amount_received |
| | | FROM |
| | | stock_out_record sor |
| | | LEFT JOIN shipping_info s ON sor.record_id = s.id |
| | | LEFT JOIN sales_ledger sl ON s.sales_ledger_id = sl.id |
| | | LEFT JOIN sales_ledger_product slp ON s.sales_ledger_product_id = slp.id |
| | | AND slp.type = 1 |
| | | LEFT JOIN product_model pm ON slp.product_model_id = pm.id |
| | | LEFT JOIN product p ON pm.product_id = p.id |
| | | LEFT JOIN account_sales_collection acsc ON acsc.stock_out_record_ids = sor.id |
| | | WHERE |
| | | sor.record_type = '13' |
| | | AND sor.approval_status = 1 |
| | | AND sl.customer_id = #{customerId} |
| | | GROUP BY |
| | | sor.outbound_batches |
| | | ORDER BY |
| | | sor.id |
| | | ) tempA |
| | | WHERE |
| | | amount_received < outbound_amount |
| | | sor.id, |
| | | sor.outbound_batches, |
| | | sl.customer_name, |
| | | sor.create_time as shippingDate, |
| | | p.product_name, |
| | | pm.model as specification_model, |
| | | slp.tax_rate, |
| | | sor.stock_out_num * slp.tax_inclusive_unit_price as outboundAmount, |
| | | s.shipping_no, |
| | | sl.sales_contract_no |
| | | FROM stock_out_record sor |
| | | left join shipping_info s on sor.record_id = s.id |
| | | LEFT JOIN sales_ledger sl ON s.sales_ledger_id = sl.id |
| | | LEFT JOIN sales_ledger_product slp ON s.sales_ledger_product_id = slp.id and slp.type = 1 |
| | | left join product_model pm on slp.product_model_id = pm.id |
| | | left join product p on pm.product_id = p.id |
| | | WHERE sor.record_type='13' and sor.approval_status=1 |
| | | and sl.customer_id=#{customerId} |
| | | |
| | | and sor.id NOT IN ( |
| | | SELECT DISTINCT SUBSTRING_INDEX(SUBSTRING_INDEX(a.stock_out_record_ids, ',', n.n), ',', -1) |
| | | FROM account_sales_collection a |
| | | CROSS JOIN ( |
| | | SELECT 1 n UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL |
| | | SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6 |
| | | ) n |
| | | WHERE n.n <= CHAR_LENGTH(a.stock_out_record_ids) - CHAR_LENGTH(REPLACE(a.stock_out_record_ids, ',', '')) + 1 |
| | | ) |
| | | |
| | | order by sor.id DESC |
| | | </select> |
| | | <select id="selectIncomeStats" resultType="com.ruoyi.home.dto.IncomeExpenseAnalysisDto"> |
| | | SELECT DATE_FORMAT(collection_date, #{dateFormat}) AS dateStr, |
| | |
| | | AND asi.issue_date BETWEEN #{req.startDate} AND #{req.endDate} |
| | | </if> |
| | | </where> |
| | | order by asi.id desc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | |
| | | <select id="listPage" resultType="com.ruoyi.aftersalesservice.pojo.AfterSalesNearExpiry"> |
| | | select * from after_sales_near_expiry |
| | | <where> |
| | | <if test="req.expireDate != null"> |
| | | AND expire_date = #{req.expireDate} |
| | | </if> |
| | | <if test="req.disDate != null"> |
| | | AND dis_date = #{req.disDate} |
| | | </if> |
| | | <if test="req.status != null"> |
| | | AND status = #{req.status} |
| | | </if> |
| | | </where> |
| | | where 1 = 1 |
| | | <if test="req.expireDate != null"> |
| | | AND expire_date = #{req.expireDate} |
| | | </if> |
| | | <if test="req.disDate != null"> |
| | | AND dis_date = #{req.disDate} |
| | | </if> |
| | | <if test="req.status != null"> |
| | | AND status = #{req.status} |
| | | </if> |
| | | order by create_time desc |
| | | </select> |
| | | |
| | | </mapper> |
| | | </mapper> |
| | |
| | | <if test="req.serviceType != null"> |
| | | and service_type = #{req.serviceType} |
| | | </if> |
| | | order by create_time desc |
| | | order by update_time desc |
| | | </select> |
| | | <select id="countAfterSalesService" resultType="com.ruoyi.aftersalesservice.dto.CountDto"> |
| | | select |
| | |
| | | group by status |
| | | </select> |
| | | |
| | | </mapper> |
| | | </mapper> |
| | |
| | | approve_user_names,approve_reason,approve_time,approve_over_time,approve_status, |
| | | approve_delete,tenant_id,approve_type,approve_remark,start_date_time,end_date_time |
| | | </sql> |
| | | |
| | | <select id="listPage" resultType="com.ruoyi.approve.vo.ApproveProcessVo"> |
| | | select * from approve_process where approve_delete = 0 |
| | | <if test="req.approveId != null and req.approveId != ''"> |
| | | and approve_id like concat('%',#{req.approveId},'%') |
| | | </if> |
| | | <if test="req.approveStatus != null or req.approveStatus == 0"> |
| | | <if test="req.approveStatus != null"> |
| | | and approve_status = #{req.approveStatus} |
| | | </if> |
| | | <if test="req.approveType != null "> |
| | | and approve_type = #{req.approveType} |
| | | </if> |
| | | order by id desc |
| | | order by approve_time desc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | and type = #{knowledgeBase.type} |
| | | </if> |
| | | </where> |
| | | order by id desc |
| | | |
| | | </select> |
| | | </mapper> |
| | | </mapper> |
| | |
| | | <select id="listPage" resultType="com.ruoyi.basic.vo.CustomerVo"> |
| | | select |
| | | c.*, |
| | | u.user_name usage_user_name, |
| | | u.nick_name as usage_user_name, |
| | | ( |
| | | select group_concat(u2.user_name separator ', ') |
| | | select group_concat(u2.nick_name separator ', ') |
| | | from customer_user cu |
| | | left join sys_user u2 on cu.user_id = u2.user_id |
| | | where cu.customer_id = c.id |
| | |
| | | from customer_user cu |
| | | where cu.customer_id = c.id |
| | | and cu.user_id != c.usage_user |
| | | ) as user_ids_str, |
| | | CASE |
| | | WHEN EXISTS (SELECT 1 FROM sales_ledger sl WHERE sl.customer_id = c.id) |
| | | OR EXISTS (SELECT 1 FROM sales_quotation sq WHERE sq.customer_id = c.id) |
| | | OR EXISTS (SELECT 1 FROM return_management rm WHERE rm.customer_id = c.id) |
| | | THEN 1 |
| | | ELSE 0 |
| | | END AS sales_reference_flag |
| | | ) as user_ids_str |
| | | from customer c |
| | | left join sys_user u on c.usage_user = u.user_id |
| | | <where> |
| | |
| | | and customer_type = #{c.customerType} |
| | | </if> |
| | | <!-- å
¬æµ·æ¥è¯¢ï¼type = 1ï¼å
¬æµ·å®¢æ·ï¼--> |
| | | <if test="c.type != null and c.type == 1"> |
| | | <!--<if test="c.type != null and c.type == 1"> |
| | | and type = #{c.type} |
| | | </if> |
| | | </if>--> |
| | | <!-- ç§æµ·æ¥è¯¢ï¼type = 0ï¼ç§æµ·å®¢æ·ï¼æè
type = 1ï¼å
¬æµ·å®¢æ·ï¼ä¸å·²è¢«åé
ï¼å¹¶ä¸æ¯èªå·±é¢ç¨ãèªå·±å建æè
å
±äº«ç»èªå·±çå®¢æ· --> |
| | | <if test="c.type != null and c.type == 0"> |
| | | <!--<if test="c.type != null and c.type == 0"> |
| | | and ( |
| | | (type = #{c.type} or (type = 1 and is_assigned = 1)) |
| | | and ( |
| | |
| | | ) |
| | | ) |
| | | ) |
| | | </if> |
| | | </if>--> |
| | | </where> |
| | | order by c.id desc |
| | | order by maintenance_time desc |
| | | </select> |
| | | |
| | | <select id="list" resultType="com.ruoyi.basic.vo.CustomerVo"> |
| | |
| | | from customer_user cu |
| | | where cu.customer_id = c.id |
| | | and cu.user_id != c.usage_user |
| | | ) as user_ids_str, |
| | | CASE |
| | | WHEN EXISTS (SELECT 1 FROM sales_ledger sl WHERE sl.customer_id = c.id) |
| | | OR EXISTS (SELECT 1 FROM sales_quotation sq WHERE sq.customer_id = c.id) |
| | | OR EXISTS (SELECT 1 FROM return_management rm WHERE rm.customer_id = c.id) |
| | | THEN 1 |
| | | ELSE 0 |
| | | END AS sales_reference_flag |
| | | ) as user_ids_str |
| | | from customer c |
| | | left join sys_user u on c.usage_user = u.user_id |
| | | <where> |
| | |
| | | and customer_type = #{c.customerType} |
| | | </if> |
| | | <!-- å
¬æµ·æ¥è¯¢ï¼type = 1ï¼å
¬æµ·å®¢æ·ï¼--> |
| | | <if test="c.type != null and c.type == 1"> |
| | | <!--<if test="c.type != null and c.type == 1"> |
| | | and type = #{c.type} |
| | | </if> |
| | | </if>--> |
| | | <!-- ç§æµ·æ¥è¯¢ï¼type = 0ï¼ç§æµ·å®¢æ·ï¼æè
type = 1ï¼å
¬æµ·å®¢æ·ï¼ä¸å·²è¢«åé
ï¼å¹¶ä¸æ¯èªå·±é¢ç¨ãèªå·±å建æè
å
±äº«ç»èªå·±çå®¢æ· --> |
| | | <if test="c.type != null and c.type == 0"> |
| | | <!--<if test="c.type != null and c.type == 0"> |
| | | and ( |
| | | (type = #{c.type} or (type = 1 and is_assigned = 1)) |
| | | and ( |
| | |
| | | ) |
| | | ) |
| | | ) |
| | | </if> |
| | | </if>--> |
| | | </where> |
| | | order by c.id desc |
| | | </select> |
| | | |
| | | <select id="customewTransactions" resultType="com.ruoyi.sales.vo.CustomerTransactionsVo"> |
| | | select T1.customer_id, |
| | | c.customer_name, |
| | | T1.contractAmounts AS contractAmounts, |
| | | IFNULL(T2.receiptPaymentAmount, 0) AS receiptPaymentAmount, |
| | | T1.contractAmounts - IFNULL(T2.receiptPaymentAmount, 0) - IFNULL(T4.returnAmount, 0) AS receiptableAmount, |
| | | IFNULL(T4.returnAmount, 0) AS returnAmount |
| | | T1.contractAmounts |
| | | from (select customer_id, sum(contract_amount) as contractAmounts from sales_ledger group by customer_id) T1 |
| | | left join (select customer_id, sum(collection_amount) as receiptPaymentAmount from account_sales_collection group by customer_id) T2 on T1.customer_id = T2.customer_id |
| | | left join ( |
| | | select |
| | | sl.customer_id, |
| | | sum(rm.refund_amount) as returnAmount |
| | | from return_management rm |
| | | left join shipping_info si on rm.shipping_id = si.id |
| | | left join sales_ledger sl on si.sales_ledger_id = sl.id |
| | | where rm.status=1 |
| | | group by sl.customer_id |
| | | ) T4 on T4.customer_id=T1.customer_id |
| | | left join customer c on T1.customer_id = c.id |
| | | <where> |
| | | <if test="customerName!=null and customerName!=''"> |
| | | AND c.customer_name LIKE CONCAT('%', #{customerName}, '%') |
| | | </if> |
| | | </where> |
| | | order by T1.customer_id desc |
| | | </select> |
| | | |
| | | <select id="customewTransactionsDetails" |
| | | resultType="com.ruoyi.sales.vo.CustomerTransactionsDetailsVo"> |
| | | select sl.id salesLedgerId, |
| | | sl.sales_contract_no, |
| | | sl.execution_date, |
| | | sl.contract_amount AS contract_amount, |
| | | IFNULL(T1.receiptPaymentAmount, 0) AS receiptPaymentAmount, |
| | | sl.contract_amount - IFNULL(T1.receiptPaymentAmount, 0) - IFNULL(T3.returnAmount, 0) AS receiptableAmount, |
| | | IFNULL(T3.returnAmount, 0) AS returnAmount |
| | | sl.contract_amount |
| | | from sales_ledger sl |
| | | left join ( |
| | | select |
| | | sl.id, |
| | | sum(ascc.collection_amount) as receiptPaymentAmount |
| | | from account_sales_collection ascc |
| | | left join stock_out_record sor on FIND_IN_SET(sor.id, ascc.stock_out_record_ids) > 0 |
| | | left join shipping_info s on sor.record_id = s.id |
| | | LEFT JOIN sales_ledger sl ON s.sales_ledger_id = sl.id |
| | | WHERE sor.record_type='13' |
| | | and sor.approval_status=1 |
| | | group by sl.id |
| | | )T1 on T1.id = sl.id |
| | | left join ( |
| | | select sl.id, |
| | | sum(rm.refund_amount) as returnAmount |
| | | from return_management rm |
| | | left join shipping_info si on rm.shipping_id = si.id |
| | | left join sales_ledger sl on si.sales_ledger_id = sl.id |
| | | where rm.status=1 |
| | | group by sl.id |
| | | )T3 on T3.id = sl.id |
| | | where sl.customer_id = #{customerId} |
| | | order by sl.id desc |
| | | order by sl.execution_date |
| | | </select> |
| | | |
| | | <select id="getShippedAmountByCustomerIds" resultType="java.util.Map"> |
| | | SELECT |
| | | sl.customer_id as customerId, |
| | | sum(sor.stock_out_num * slp.tax_inclusive_unit_price) as outboundAmount |
| | | FROM stock_out_record sor |
| | | LEFT join shipping_info s on sor.record_id = s.id |
| | | LEFT JOIN sales_ledger sl ON s.sales_ledger_id = sl.id |
| | | LEFT JOIN sales_ledger_product slp ON s.sales_ledger_product_id = slp.id |
| | | WHERE sor.record_type='13' |
| | | and sor.approval_status=1 |
| | | and slp.type = 1 |
| | | and sl.customer_id IN |
| | | <foreach collection="customerIds" item="customerId" open="(" separator="," close=")"> |
| | | #{customerId} |
| | | </foreach> |
| | | group by sl.customer_id |
| | | </select> |
| | | |
| | | <select id="getShippedAmountBySalesLedgerIds" resultType="java.util.Map"> |
| | | SELECT |
| | | sl.id as salesLedgerId, |
| | | sum(sor.stock_out_num * slp.tax_inclusive_unit_price) as outboundAmount |
| | | FROM stock_out_record sor |
| | | LEFT join shipping_info s on sor.record_id = s.id |
| | | LEFT JOIN sales_ledger sl ON s.sales_ledger_id = sl.id |
| | | LEFT JOIN sales_ledger_product slp ON s.sales_ledger_product_id = slp.id |
| | | WHERE sor.record_type='13' |
| | | and sor.approval_status=1 |
| | | and slp.type = 1 |
| | | and sl.id IN |
| | | <foreach collection="salesLedgerIds" item="id" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | group by sl.id |
| | | </select> |
| | | </mapper> |
| | |
| | | |
| | | <resultMap id="ProductModelVoResultMap" type="com.ruoyi.basic.vo.ProductModelVo" extends="BaseResultMap"> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="top_product_name" property="topProductName" /> |
| | | <collection property="batchNoList" |
| | | ofType="java.lang.String" |
| | | column="{productModelId=id}" |
| | |
| | | </resultMap> |
| | | |
| | | <select id="listPageProductModel" resultMap="ProductModelVoResultMap"> |
| | | select pm.*,p.product_name |
| | | WITH RECURSIVE product_root AS ( |
| | | SELECT id, parent_id, product_name |
| | | FROM product |
| | | WHERE parent_id IS NULL |
| | | UNION ALL |
| | | SELECT p.id, p.parent_id, pr.product_name |
| | | FROM product p |
| | | INNER JOIN product_root pr ON p.parent_id = pr.id |
| | | ) |
| | | select pm.*, p.product_name, |
| | | pr.product_name as top_product_name |
| | | from product_model pm |
| | | left join product p on pm.product_id = p.id |
| | | left join product_root pr on p.id = pr.id |
| | | <where> |
| | | <if test="c.model != null and c.model != ''"> |
| | | and pm.model like concat('%',#{c.model},'%') |
| | |
| | | AND T1.is_white = #{supplierManageDto.isWhite} |
| | | </if> |
| | | </where> |
| | | order by T1.id desc |
| | | order by T1.maintain_time desc |
| | | </select> |
| | | |
| | | <select id="supplierExportList" resultType="com.ruoyi.basic.excel.SupplierManageExcelDto"> |
| | |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="supplierTransactions" resultType="com.ruoyi.purchase.vo.SupplierTransactionsVo"> |
| | | select T1.supplier_id, |
| | | SELECT T1.supplier_id, |
| | | sm.supplier_name, |
| | | T1.contractAmounts, |
| | | IFNULL(T2.paymentAmount, 0) AS paymentAmount, |
| | | T1.contractAmounts - IFNULL(T2.paymentAmount, 0) - IFNULL(T4.returnAmount, 0) AS payableAmount, |
| | | IFNULL(T4.returnAmount, 0) AS returnAmount |
| | | from (select supplier_id, sum(contract_amount) as contractAmounts from purchase_ledger group by supplier_id) T1 |
| | | left join (select supplier_id, sum(payment_amount) as paymentAmount from account_purchase_payment group by supplier_id) T2 on T1.supplier_id = T2.supplier_id |
| | | left join ( |
| | | select |
| | | supplier_id, |
| | | sum(total_amount) as returnAmount |
| | | from purchase_return_orders pro |
| | | group by supplier_id |
| | | ) T4 on T4.supplier_id=T1.supplier_id |
| | | left join supplier_manage sm on T1.supplier_id = sm.id |
| | | T1.contractAmounts |
| | | FROM (SELECT supplier_id, SUM(contract_amount) AS contractAmounts FROM purchase_ledger GROUP BY supplier_id) T1 |
| | | LEFT JOIN supplier_manage sm ON T1.supplier_id = sm.id |
| | | <where> |
| | | <if test="supplierName!=null and supplierName!=''"> |
| | | AND sm.supplier_name LIKE CONCAT('%',#{supplierName},'%') |
| | | </if> |
| | | </where> |
| | | order by T1.supplier_id desc |
| | | </select> |
| | | |
| | | <select id="supplierTransactionsDetails" |
| | | resultType="com.ruoyi.purchase.vo.SupplierTransactionsDetailsVo"> |
| | | select pl.id purchaseLedgerId, |
| | | SELECT pl.id purchaseLedgerId, |
| | | pl.purchase_contract_number, |
| | | pl.execution_date, |
| | | pl.contract_amount AS contract_amount, |
| | | IFNULL(T1.paymentAmount, 0) AS paymentAmount, |
| | | pl.contract_amount - IFNULL(T1.paymentAmount, 0) - IFNULL(T3.returnAmount, 0) AS payableAmount, |
| | | IFNULL(T3.returnAmount, 0) AS returnAmount |
| | | from purchase_ledger pl |
| | | left join ( |
| | | select |
| | | pl.id, |
| | | sum(app.payment_amount) as paymentAmount |
| | | from account_purchase_payment app |
| | | left join account_payment_application apa on app.account_payment_application_id = apa.id |
| | | left join stock_in_record sir on FIND_IN_SET(sir.id, apa.stock_in_record_ids) > 0 |
| | | -- 10 ç±»åæå
³èè´¨æ£è¡¨ |
| | | LEFT JOIN quality_inspect qi ON sir.record_type = 10 AND sir.record_id = qi.id |
| | | -- 卿å
³èéè´ï¼èªå¨éé
7 å 10ï¼ |
| | | LEFT JOIN purchase_ledger pl |
| | | ON pl.id = IF(sir.record_type = 7, sir.record_id, qi.purchase_ledger_id) |
| | | WHERE sir.approval_status = 1 |
| | | AND sir.record_type IN ('7','10') |
| | | group by pl.id |
| | | )T1 on T1.id = pl.id |
| | | left join ( |
| | | select pl.id, |
| | | sum(pro.total_amount) as returnAmount |
| | | from purchase_return_orders pro |
| | | left join purchase_ledger pl on pro.purchase_ledger_id = pl.id |
| | | group by pl.id |
| | | )T3 on T3.id = pl.id |
| | | where pl.supplier_id = #{supplierId} |
| | | order by pl.id desc |
| | | pl.contract_amount |
| | | FROM purchase_ledger pl |
| | | WHERE pl.supplier_id = #{supplierId} |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | <mapper namespace="com.ruoyi.collaborativeApproval.mapper.NoticeMapper"> |
| | | |
| | | <select id="listPage" resultType="com.ruoyi.collaborativeApproval.dto.NoticeDTO"> |
| | | select n.*, su.user_name as create_user_name |
| | | select n.*, su.nick_name as create_user_name |
| | | from notice n |
| | | left join sys_user su on n.create_user = su.user_id |
| | | <where> |
| | |
| | | and n.status = #{ew.status} |
| | | </if> |
| | | </where> |
| | | order by n.create_time desc |
| | | </select> |
| | | </mapper> |
| | |
| | | </resultMap> |
| | | |
| | | <select id="listPage" resultMap="RulesRegulationsManagementDTOMap"> |
| | | select rrm.*, su.user_name as create_user_name |
| | | select rrm.*, su.nick_name as create_user_name |
| | | from rules_regulations_management rrm |
| | | left join sys_user su on rrm.create_user = su.user_id |
| | | <where> |
| | |
| | | and rrm.category = #{ew.category} |
| | | </if> |
| | | </where> |
| | | order by rrm.id desc |
| | | </select> |
| | | </mapper> |
| | |
| | | </if> |
| | | </where> |
| | | GROUP BY sam.id |
| | | order by sam.id desc |
| | | </select> |
| | | </mapper> |
| | |
| | | left join device_ledger dl on dm.device_ledger_id = dl.id |
| | | left join sys_user su on dm.create_user = su.user_id |
| | | <where> |
| | | <if test="deviceMaintenanceDto.deviceName != null"> |
| | | and dl.device_name like concat('%',#{deviceMaintenanceDto.deviceName},'%') |
| | | <if test="deviceMaintenanceDto.deviceName != null and deviceMaintenanceDto.deviceName != ''"> |
| | | and dl.device_name like concat('%', #{deviceMaintenanceDto.deviceName}, '%') |
| | | </if> |
| | | <if test="deviceMaintenanceDto.deviceModel != null"> |
| | | and dl.device_model like concat('%',#{deviceMaintenanceDto.deviceModel},'%') |
| | | <if test="deviceMaintenanceDto.deviceModel != null and deviceMaintenanceDto.deviceModel != ''"> |
| | | and dl.device_model like concat('%', #{deviceMaintenanceDto.deviceModel}, '%') |
| | | </if> |
| | | <if test="deviceMaintenanceDto.status != null"> |
| | | and dm.status = #{deviceMaintenanceDto.status} |
| | | </if> |
| | | <if test="deviceMaintenanceDto.maintenanceActuallyName != null"> |
| | | and dm.maintenance_actually_name like concat('%',#{deviceMaintenanceDto.maintenanceActuallyName},'%') |
| | | <if test="deviceMaintenanceDto.maintenanceActuallyName != null and deviceMaintenanceDto.maintenanceActuallyName != ''"> |
| | | and dm.maintenance_actually_name like concat('%', #{deviceMaintenanceDto.maintenanceActuallyName}, '%') |
| | | </if> |
| | | <if test="deviceMaintenanceDto.maintenancePlanTime != null"> |
| | | and dm.maintenance_plan_time like concat('%',#{deviceMaintenanceDto.maintenancePlanTime},'%') |
| | | and dm.maintenance_plan_time = #{deviceMaintenanceDto.maintenancePlanTime} |
| | | </if> |
| | | <if test="deviceMaintenanceDto.maintenanceActuallyTime != null"> |
| | | and dm.maintenance_actually_time like concat('%',#{deviceMaintenanceDto.maintenanceActuallyTime},'%') |
| | | </if> |
| | | <if test="deviceMaintenanceDto.maintenanceActuallyTime != null"> |
| | | and dm.maintenance_actually_time >= str_to_date(#{deviceMaintenanceDto.maintenanceActuallyTime}, '%Y-%m-%d') |
| | | and dm.maintenance_actually_time < date_add(str_to_date(#{deviceMaintenanceDto.maintenanceActuallyTime}, '%Y-%m-%d'), interval 1 day) |
| | | and dm.maintenance_actually_time >= str_to_date(#{deviceMaintenanceDto.maintenanceActuallyTime}, |
| | | '%Y-%m-%d') |
| | | and dm.maintenance_actually_time < |
| | | date_add(str_to_date(#{deviceMaintenanceDto.maintenanceActuallyTime}, '%Y-%m-%d'), interval 1 day) |
| | | </if> |
| | | </where> |
| | | order by dm.create_time desc |
| | | order by |
| | | <!-- å¾
ä¿å
»(0)ä¼å
æå¨ä¸é¢ï¼å·²å®ç»(1)å¨ä¸é¢ --> |
| | | dm.status asc, |
| | | case |
| | | <!-- å½ç¶ææ¯ 0ï¼å¾
ä¿å
»ï¼æ¶ï¼æè®¡åæ¶é´ååºï¼å³æ¶é´æè¿çåå卿ä¸é¢ --> |
| | | when dm.status = 0 then dm.maintenance_plan_time |
| | | end asc, |
| | | case |
| | | <!-- å½ç¶ææ¯ 1ï¼å·²å®ç»ï¼æ¶ï¼æå®é
ä¿å
»æ¶é´éåºï¼æè¿åä¿å
»å®çååå¨å·²å®ç»éææå --> |
| | | when dm.status = 1 then dm.maintenance_actually_time |
| | | end desc |
| | | </select> |
| | | |
| | | <select id="detailById" resultType="com.ruoyi.device.vo.DeviceMaintenanceVo"> |
| | | select dm.id, |
| | | dm.device_ledger_id, |
| | |
| | | |
| | | <select id="queryPage" resultType="com.ruoyi.device.vo.DeviceRepairVo"> |
| | | select dr.id, |
| | | dr.device_ledger_id, |
| | | dr.repair_time, |
| | | dr.repair_name, |
| | | dr.remark, |
| | | dr.maintenance_name, |
| | | dr.maintenance_time, |
| | | dr.maintenance_result, |
| | | dr.acceptance_name, |
| | | dr.acceptance_time, |
| | | dr.acceptance_remark, |
| | | dr.status, |
| | | dr.create_time, |
| | | dr.update_time, |
| | | dr.create_user, |
| | | dr.update_user, |
| | | dr.tenant_id, |
| | | dl.device_name, |
| | | dl.device_model, |
| | | dr.machinery_category |
| | | dr.device_ledger_id, |
| | | dr.repair_time, |
| | | dr.repair_name, |
| | | dr.remark, |
| | | dr.maintenance_name, |
| | | dr.maintenance_time, |
| | | dr.maintenance_result, |
| | | dr.acceptance_name, |
| | | dr.acceptance_time, |
| | | dr.acceptance_remark, |
| | | dr.status, |
| | | dr.create_time, |
| | | dr.update_time, |
| | | dr.create_user, |
| | | dr.update_user, |
| | | dr.tenant_id, |
| | | dl.device_name, |
| | | dl.device_model, |
| | | dr.machinery_category |
| | | from device_repair dr |
| | | left join device_ledger dl on dr.device_ledger_id = dl.id |
| | | <where> |
| | | 1 = 1 |
| | | <if test="deviceRepairDto.deviceName != null"> |
| | | and dl.device_name like concat('%',#{deviceRepairDto.deviceName},'%') |
| | | </if> |
| | |
| | | and dr.maintenance_time like concat('%',#{deviceRepairDto.maintenanceTimeStr},'%') |
| | | </if> |
| | | </where> |
| | | order by dr.create_time desc |
| | | order by dr.id desc |
| | | </select> |
| | | |
| | | <select id="detailById" resultType="com.ruoyi.device.vo.DeviceRepairVo"> |
| | | select dr.id, |
| | | dr.device_ledger_id, |
| | |
| | | AND record_date = DATE_FORMAT(#{req.recordDate},'%Y-%m-%d') |
| | | </if> |
| | | </where> |
| | | ORDER BY create_time DESC |
| | | ORDER BY update_time DESC |
| | | </select> |
| | | </mapper> |
| | |
| | | AND t1.record_date = DATE_FORMAT(#{req.recordDate},'%Y-%m-%d') |
| | | </if> |
| | | </where> |
| | | ORDER BY t1.create_time DESC |
| | | ORDER BY t1.update_time DESC |
| | | </select> |
| | | <select id="list" resultType="com.ruoyi.measuringinstrumentledger.pojo.MeasuringInstrumentLedgerRecord"> |
| | | SELECT |
| | |
| | | </where> |
| | | ORDER BY t1.update_time DESC |
| | | </select> |
| | | </mapper> |
| | | </mapper> |
| | |
| | | and sp.name like concat('%',#{spareParts.name},'%') |
| | | </if> |
| | | </where> |
| | | order by sp.create_time desc |
| | | </select> |
| | | </mapper> |
| | | </mapper> |
| | |
| | | select rm.*, |
| | | c.customer_name, |
| | | si.shipping_no, |
| | | rm.shipping_type, |
| | | rm.truck_plate_no, |
| | | rm.express_company, |
| | | rm.express_no, |
| | | sl.project_name, |
| | | sl.sales_contract_no, |
| | | sl.salesman, |
| | | CASE |
| | | WHEN tempA.total_approval = 0 OR tempA.total_approval IS NULL THEN 0 |
| | | WHEN tempA.approval_sum = tempA.total_approval THEN 1 |
| | | ELSE 2 |
| | | END AS stock_in_approval_status |
| | | sl.salesman |
| | | from return_management rm |
| | | left join shipping_info si on rm.shipping_id = si.id |
| | | left join customer c on rm.customer_id = c.id |
| | | left join sales_ledger sl on si.sales_ledger_id = sl.id |
| | | LEFT JOIN ( |
| | | SELECT |
| | | rsp.return_management_id, |
| | | COUNT(sir.id) AS total_approval, |
| | | SUM(CASE WHEN sir.approval_status = 1 THEN 1 ELSE 0 END) AS approval_sum |
| | | FROM return_sale_product rsp LEFT JOIN stock_in_record sir ON rsp.id = sir.record_id |
| | | GROUP BY rsp.return_management_id |
| | | ) tempA ON tempA.return_management_id = rm.id |
| | | <where> |
| | | <if test="req.returnNo != null and req.returnNo != ''"> |
| | | and rm.return_no like concat('%',#{req.returnNo},'%') |
| | |
| | | and sl.sales_contract_no like concat('%',#{req.salesContractNo},'%') |
| | | </if> |
| | | </where> |
| | | order by rm.id desc |
| | | </select> |
| | | <select id="getReturnManagementDtoById" resultType="com.ruoyi.procurementrecord.bean.dto.ReturnManagementDto"> |
| | | select rm.*, |
| | | c.customer_name, |
| | | si.shipping_no, |
| | | rm.shipping_type, |
| | | rm.truck_plate_no, |
| | | rm.express_company, |
| | | rm.express_no, |
| | | sl.project_name, |
| | | sl.sales_contract_no, |
| | | sl.salesman |
| | |
| | | rm.return_no, |
| | | c.customer_name, |
| | | si.shipping_no, |
| | | rm.shipping_type, |
| | | rm.truck_plate_no, |
| | | rm.express_company, |
| | | rm.express_no, |
| | | rm.make_time, |
| | | rm.refund_amount, |
| | | rm.return_reason, |
| | |
| | | sor.outbound_batches, |
| | | sor.stock_out_num, |
| | | sor.batch_no, |
| | | GREATEST( sor.stock_out_num - COALESCE ( rs.total_return_num, 0 ), 0 ) AS un_quantity, |
| | | COALESCE ( rs.pending_return_num, 0 ) AS pending_return_num , |
| | | COALESCE ( rs.return_num, 0 ) AS total_return_num |
| | | GREATEST(sor.stock_out_num - COALESCE(rs1.total_return_num1, 0), 0) AS un_quantity, |
| | | COALESCE(rs.total_return_num, 0) AS total_return_num |
| | | FROM return_sale_product rsp |
| | | LEFT JOIN return_management rm ON rm.id = rsp.return_management_id |
| | | LEFT JOIN shipping_info si ON si.id = rm.shipping_id |
| | |
| | | left join product_model pm on slp.product_model_id = pm.id |
| | | LEFT JOIN product p on pm.product_id = p.id |
| | | LEFT JOIN (SELECT stock_out_record_id, |
| | | SUM(num) AS total_return_num, |
| | | SUM( CASE WHEN return_management_id =#{returnManagementId} AND STATUS = 0 THEN num ELSE 0 END ) AS pending_return_num , |
| | | SUM( CASE WHEN STATUS = 1 THEN num ELSE 0 END ) AS return_num |
| | | SUM(num) AS total_return_num |
| | | FROM return_sale_product |
| | | WHERE 1 = 1 and return_management_id = #{returnManagementId} |
| | | GROUP BY stock_out_record_id) rs ON rs.stock_out_record_id = sor.id |
| | | LEFT JOIN (SELECT stock_out_record_id, |
| | | SUM(num) AS total_return_num1 |
| | | FROM return_sale_product |
| | | WHERE 1 = 1 |
| | | GROUP BY stock_out_record_id) rs1 ON rs1.stock_out_record_id = sor.id |
| | | where rm.id =#{returnManagementId} |
| | | </select> |
| | | <select id="listReturnSaleProduct" resultType="com.ruoyi.procurementrecord.bean.dto.ReturnSaleProductDto"> |
| | |
| | | select date_format(scheduling_date, '%m-%d') as dateStr, |
| | | cast(ifnull(sum(finished_num), 0) as decimal(18,2)) as numberOfCompleted, |
| | | cast(ifnull(sum(work_hours), 0) as decimal(18,2)) as amount, |
| | | cast(0 as decimal(18,2)) as passRate |
| | | cast(sum(ppo.quantity) / sum(ppo.quantity + ppo.scrap_qty) * 100.00 as decimal(18,2)) as passRate |
| | | from production_account |
| | | left join production_product_main ppm on ppm.id = production_account.production_product_main_id |
| | | left join production_product_output ppo on ppo.production_product_main_id = ppm.id |
| | | where scheduling_date >= #{startDate} |
| | | and scheduling_date <= #{endDate} |
| | | group by date_format(scheduling_date, '%m-%d') |
| | |
| | | and pot.work_order_no like concat('%', #{c.workOrderNo}, '%') |
| | | </if> |
| | | </where> |
| | | order by pot.production_order_id desc, poro.drag_sort |
| | | order by pot.work_order_no desc |
| | | </select> |
| | | |
| | | <select id="selectTaskStatisticsByDate" resultType="com.ruoyi.home.dto.ProductionTaskStatisticsDto"> |
| | |
| | | <if test="endDateTime != null"> |
| | | and ppo.create_time <= #{endDateTime} |
| | | </if> |
| | | <if test="userId != null"> |
| | | and ppm.create_user = #{userId} |
| | | </if> |
| | | <!-- <if test="userId != null">--> |
| | | <!-- and ppm.create_user = #{userId}--> |
| | | <!-- </if>--> |
| | | <if test="processIds != null and processIds.size() > 0"> |
| | | and poro.technology_operation_id in |
| | | <foreach collection="processIds" item="id" open="(" separator="," close=")"> |
| | |
| | | order by min(poro.drag_sort), poro.operation_name |
| | | </select> |
| | | |
| | | <select id="listProcessStatusByOrderIds" resultType="com.ruoyi.production.bean.vo.ProductionOrderProcessTaskVo"> |
| | | select pot.production_order_id as productionOrderId, |
| | | poro.operation_name as operationName, |
| | | ROUND(IFNULL(pot.complete_quantity, 0) / NULLIF(pot.plan_quantity, 0) * 100, 2) AS completionStatus |
| | | from production_operation_task pot |
| | | left join production_order_routing_operation poro |
| | | on pot.production_order_routing_operation_id = poro.id |
| | | where pot.production_order_id in |
| | | <foreach collection="orderIds" item="orderId" open="(" separator="," close=")"> |
| | | #{orderId} |
| | | </foreach> |
| | | order by pot.production_order_id, poro.drag_sort asc, pot.id asc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <include refid="ProductionOrderVoColumns" /> |
| | | <include refid="ProductionOrderVoFrom" /> |
| | | <include refid="ProductionOrderWhere" /> |
| | | order by po.id desc |
| | | order by po.nps_no desc |
| | | </select> |
| | | |
| | | <select id="listProductionOrder" resultMap="ProductionOrderVoResultMap"> |
| | |
| | | and po.create_time < #{endTime} |
| | | </if> |
| | | </where> |
| | | order by po.id desc |
| | | <if test="size != null and size >= 0"> |
| | | limit #{offset}, #{size} |
| | | </if> |
| | | order by po.nps_no desc |
| | | limit #{offset}, #{size} |
| | | </select> |
| | | |
| | | <select id="countHomeOrderProgress" resultType="java.lang.Long"> |
| | |
| | | </if> |
| | | </if> |
| | | </where> |
| | | ORDER BY COALESCE(pp.id) DESC |
| | | ORDER BY pp.required_date DESC |
| | | </select> |
| | | |
| | | <select id="selectWithMaterialByIds" resultType="com.ruoyi.production.bean.dto.ProductionPlanDto"> |
| | |
| | | </where> |
| | | order by ppi.create_time desc |
| | | </select> |
| | | <select id="selectInputStats" resultType="java.util.Map"> |
| | | select DATE_FORMAT(create_time, '%Y-%m-%d') as statDate, |
| | | sum(ifnull(quantity, 0)) as quantity |
| | | # sum(ifnull(scrap_qty, 0)) as scrapQty |
| | | from production_product_input |
| | | where create_time >= #{startDate} |
| | | and create_time <= #{endDate} |
| | | group by DATE_FORMAT(create_time, '%Y-%m-%d') |
| | | order by statDate asc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | </select> |
| | | |
| | | <select id="selectDailyOutputStats" resultType="java.util.Map"> |
| | | select date(create_time) as statDate, |
| | | select DATE_FORMAT(create_time, '%Y-%m-%d') as statDate, |
| | | sum(ifnull(quantity, 0)) as quantity, |
| | | sum(ifnull(scrap_qty, 0)) as scrapQty |
| | | from production_product_output |
| | | where create_time >= #{startDate} |
| | | and create_time <= #{endDate} |
| | | group by date(create_time) |
| | | group by DATE_FORMAT(create_time, '%Y-%m-%d') |
| | | order by statDate asc |
| | | </select> |
| | | |
| | |
| | | |
| | | <update id="updateContractAmountById"> |
| | | UPDATE purchase_ledger |
| | | SET contract_amount = #{totalTaxInclusiveAmount}, |
| | | net_contract_amount = #{totalTaxInclusiveAmount} |
| | | SET contract_amount = #{totalTaxInclusiveAmount} |
| | | WHERE id = #{id} |
| | | </update> |
| | | <select id="selectPurchaseStats" resultType="com.ruoyi.home.dto.IncomeExpenseAnalysisDto"> |
| | |
| | | pl.supplier_name, |
| | | pl.project_name, |
| | | pl.contract_amount, |
| | | pl.net_contract_amount, |
| | | pl.entry_date, |
| | | pl.execution_date, |
| | | pl.recorder_id, |
| | |
| | | AND slp.sales_ledger_id = qi.purchase_ledger_id |
| | | AND slp.product_model_id = qi.product_model_id |
| | | WHERE sir.approval_status = 1 |
| | | |
| | | UNION ALL |
| | | |
| | | SELECT slp.id AS sales_ledger_product_id, |
| | | sir.stock_in_num |
| | | FROM stock_in_record sir |
| | | INNER JOIN quality_unqualified qu |
| | | ON TRIM(sir.record_type) = '11' |
| | | AND sir.record_id = qu.id |
| | | INNER JOIN quality_inspect qi |
| | | ON qi.id = qu.inspect_id |
| | | INNER JOIN sales_ledger_product slp |
| | | ON slp.type = 2 |
| | | AND slp.sales_ledger_id = qi.purchase_ledger_id |
| | | AND slp.product_model_id = qi.product_model_id |
| | | WHERE sir.approval_status = 1 |
| | | |
| | | ) rel |
| | | GROUP BY rel.sales_ledger_product_id |
| | | ) approved_qty ON approved_qty.sales_ledger_product_id = slp.id |
| | |
| | | <if test="c.supplierId != null"> |
| | | AND pl.supplier_id = #{c.supplierId} |
| | | </if> |
| | | <if test="c.ids != null and c.ids.size() > 0"> |
| | | AND pl.id IN |
| | | <foreach collection="c.ids" item="id" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | <if test="c.approvalStatus != null"> |
| | | AND pl.approval_status = #{c.approvalStatus} |
| | | </if> |
| | |
| | | <if test="c.stockInStatus != null and c.stockInStatus != ''"> |
| | | WHERE result.stock_in_status = #{c.stockInStatus} |
| | | </if> |
| | | ORDER BY result.entry_date DESC |
| | | </select> |
| | | |
| | | <select id="selectReturnablePurchaseLedgerList" resultType="com.ruoyi.purchase.pojo.PurchaseLedger"> |
| | | SELECT DISTINCT pl.* |
| | | FROM purchase_ledger pl |
| | | WHERE 1 = 1 |
| | | <if test="c.purchaseContractNumber != null and c.purchaseContractNumber != ''"> |
| | | AND pl.purchase_contract_number LIKE CONCAT('%', #{c.purchaseContractNumber}, '%') |
| | | </if> |
| | | <if test="c.supplierId != null"> |
| | | AND pl.supplier_id = #{c.supplierId} |
| | | </if> |
| | | <if test="c.approvalStatus != null"> |
| | | AND pl.approval_status = #{c.approvalStatus} |
| | | </if> |
| | | AND EXISTS ( |
| | | SELECT 1 |
| | | FROM stock_in_record sir |
| | | LEFT JOIN quality_inspect qi |
| | | ON sir.record_type = '10' |
| | | AND sir.record_id = qi.id |
| | | LEFT JOIN sales_ledger_product slp |
| | | ON slp.sales_ledger_id = pl.id |
| | | AND slp.product_model_id = sir.product_model_id |
| | | AND slp.type = 2 |
| | | LEFT JOIN ( |
| | | SELECT stock_in_record_id, SUM(return_quantity) AS total_return_num |
| | | FROM purchase_return_order_products |
| | | GROUP BY stock_in_record_id |
| | | ) rs ON rs.stock_in_record_id = sir.id |
| | | WHERE sir.approval_status = 1 |
| | | AND sir.record_type IN ('7','10') |
| | | AND ( |
| | | (sir.record_type = '7' AND sir.record_id = pl.id) |
| | | OR (sir.record_type = '10' AND qi.purchase_ledger_id = pl.id) |
| | | ) |
| | | AND slp.id IS NOT NULL |
| | | AND GREATEST(sir.stock_in_num - COALESCE(rs.total_return_num, 0), 0) > 0 |
| | | ) |
| | | ORDER BY pl.entry_date DESC |
| | | ORDER BY result.entry_date DESC, result.purchase_contract_number DESC |
| | | </select> |
| | | |
| | | <select id="selectTotalPurchaseAmount" resultType="java.math.BigDecimal"> |
| | |
| | | <result column="no" property="no" /> |
| | | <result column="return_type" property="returnType" /> |
| | | <result column="supplier_id" property="supplierId" /> |
| | | <result column="shipping_type" property="shippingType" /> |
| | | <result column="truck_plate_no" property="truckPlateNo" /> |
| | | <result column="express_company" property="expressCompany" /> |
| | | <result column="express_no" property="expressNo" /> |
| | | <result column="project_id" property="projectId" /> |
| | | <result column="project_phase" property="projectPhase" /> |
| | | <result column="prepared_at" property="preparedAt" /> |
| | |
| | | SELECT |
| | | pro.*, |
| | | sm.supplier_name as supplier_name, |
| | | pl.purchase_contract_number as purchase_contract_number, |
| | | CASE |
| | | WHEN EXISTS ( |
| | | SELECT 1 |
| | | FROM purchase_return_order_products prop |
| | | INNER JOIN stock_out_record sor ON sor.record_id = prop.id |
| | | AND sor.record_type = '9' |
| | | AND sor.approval_status = 1 |
| | | WHERE prop.purchase_return_order_id = pro.id |
| | | ) THEN 1 |
| | | ELSE 0 |
| | | END AS stock_out_approved |
| | | pl.purchase_contract_number as purchase_contract_number |
| | | FROM purchase_return_orders pro |
| | | LEFT JOIN supplier_manage sm ON pro.supplier_id = sm.id |
| | | LEFT JOIN purchase_ledger pl ON pl.id = pro.purchase_ledger_id |
| | |
| | | pro.no returnNo, |
| | | t.inboundBatches, |
| | | sm.supplier_name, |
| | | pro.shipping_type, |
| | | pro.truck_plate_no, |
| | | pro.express_company, |
| | | pro.express_no, |
| | | pro.prepared_at, |
| | | pro.total_amount, |
| | | CASE pro.return_type WHEN 0 THEN 'éè´§éæ¬¾' WHEN 1 THEN 'ææ¶' END AS returnType, |
| | |
| | | sir.stock_in_num, |
| | | sir.batch_no, |
| | | slp.tax_inclusive_unit_price, |
| | | GREATEST( |
| | | sir.stock_in_num |
| | | - COALESCE(rs.total_return_num, 0) |
| | | - COALESCE(so.total_sale_out_num, 0), |
| | | 0 |
| | | ) AS un_quantity, |
| | | COALESCE(rs.total_return_num, 0) AS total_return_num, |
| | | COALESCE(so.total_sale_out_num, 0) AS saleOutQuantity |
| | | GREATEST(sir.stock_in_num - COALESCE(rs.total_return_num, 0), 0) AS un_quantity, |
| | | COALESCE(rs.total_return_num, 0) AS total_return_num |
| | | FROM stock_in_record sir |
| | | LEFT JOIN quality_inspect qi ON sir.record_type = 10 AND sir.record_id = qi.id |
| | | LEFT JOIN purchase_ledger pl |
| | | ON pl.id = IF(sir.record_type = 7, sir.record_id, qi.purchase_ledger_id) |
| | | LEFT JOIN sales_ledger_product slp |
| | | ON pl.id = slp.sales_ledger_id |
| | | AND slp.product_model_id = sir.product_model_id |
| | | AND slp.type = 2 |
| | | LEFT JOIN sales_ledger_product slp ON pl.id = slp.sales_ledger_id |
| | | LEFT JOIN ( |
| | | SELECT |
| | | stock_in_record_id, |
| | |
| | | WHERE 1=1 |
| | | GROUP BY stock_in_record_id |
| | | ) rs ON rs.stock_in_record_id = sir.id |
| | | LEFT JOIN ( |
| | | SELECT |
| | | inv.batch_no, |
| | | inv.product_model_id, |
| | | SUM(spd.quantity) AS total_sale_out_num |
| | | FROM shipping_product_detail spd |
| | | INNER JOIN shipping_info si |
| | | ON si.id = spd.shipping_info_id |
| | | INNER JOIN stock_out_record sor |
| | | ON sor.record_id = si.id |
| | | AND sor.record_type = '13' |
| | | AND sor.approval_status IN (0, 1, 3) |
| | | INNER JOIN stock_inventory inv |
| | | ON inv.id = spd.stock_inventory_id |
| | | GROUP BY inv.batch_no, inv.product_model_id |
| | | ) so ON so.product_model_id = sir.product_model_id |
| | | AND (so.batch_no = sir.batch_no OR (so.batch_no IS NULL AND sir.batch_no IS NULL)) |
| | | WHERE sir.approval_status = 1 |
| | | WHERE sir.approval_status = 1 AND slp.type = 2 |
| | | AND sir.record_type IN ('7','10') |
| | | and pl.id = #{purchaseLedgerId} |
| | | </select> |
| | |
| | | slp.tax_inclusive_unit_price, |
| | | prop.return_quantity, |
| | | prop.purchase_return_order_id, |
| | | GREATEST( |
| | | sir.stock_in_num |
| | | - COALESCE(rs.total_return_num, 0) |
| | | - COALESCE(so.total_sale_out_num, 0), |
| | | 0 |
| | | ) AS un_quantity, |
| | | COALESCE(rs.total_return_num, 0) AS total_return_num, |
| | | COALESCE(so.total_sale_out_num, 0) AS saleOutQuantity |
| | | GREATEST(sir.stock_in_num - COALESCE(rs1.total_return_num1, 0), 0) AS un_quantity, |
| | | COALESCE(rs.total_return_num, 0) AS total_return_num |
| | | from purchase_return_order_products prop |
| | | left join purchase_return_orders pro on prop.purchase_return_order_id = pro.id |
| | | LEFT JOIN stock_in_record sir ON prop.stock_in_record_id = sir.id and sir.record_type in ('7','10') |
| | |
| | | LEFT JOIN (SELECT stock_in_record_id, |
| | | SUM(return_quantity) AS total_return_num |
| | | FROM purchase_return_order_products |
| | | WHERE 1 = 1 |
| | | WHERE 1 = 1 and purchase_return_order_id = #{id} |
| | | GROUP BY stock_in_record_id) rs ON rs.stock_in_record_id = sir.id |
| | | LEFT JOIN ( |
| | | SELECT |
| | | inv.batch_no, |
| | | inv.product_model_id, |
| | | SUM(spd.quantity) AS total_sale_out_num |
| | | FROM shipping_product_detail spd |
| | | INNER JOIN shipping_info si |
| | | ON si.id = spd.shipping_info_id |
| | | INNER JOIN stock_out_record sor |
| | | ON sor.record_id = si.id |
| | | AND sor.record_type = '13' |
| | | AND sor.approval_status IN (0, 1, 3) |
| | | INNER JOIN stock_inventory inv |
| | | ON inv.id = spd.stock_inventory_id |
| | | GROUP BY inv.batch_no, inv.product_model_id |
| | | ) so ON so.product_model_id = sir.product_model_id |
| | | AND (so.batch_no = sir.batch_no OR (so.batch_no IS NULL AND sir.batch_no IS NULL)) |
| | | LEFT JOIN (SELECT stock_in_record_id, |
| | | SUM(return_quantity) AS total_return_num1 |
| | | FROM purchase_return_order_products |
| | | WHERE 1 = 1 and purchase_return_order_id = #{id} |
| | | GROUP BY stock_in_record_id) rs1 ON rs1.stock_in_record_id = sir.id |
| | | where pro.id = #{id} |
| | | </select> |
| | | </mapper> |
| | |
| | | <select id="qualityInspectListPage" resultType="com.ruoyi.quality.dto.QualityInspectDto"> |
| | | SELECT |
| | | qi.*, |
| | | CASE |
| | | WHEN (IFNULL(qi.qualified_quantity, 0) + IFNULL(qi.unqualified_quantity, 0)) = 0 THEN 0 |
| | | ELSE ROUND(IFNULL(qi.qualified_quantity, 0) / (IFNULL(qi.qualified_quantity, 0) + IFNULL(qi.unqualified_quantity, 0)) * 100, 2) |
| | | END AS passRate, |
| | | <choose> |
| | | <when test="qualityInspect.inspectType == 0"> |
| | | pl.purchase_contract_number as purchase_contract_no |
| | |
| | | <if test="qualityInspect.entryDateEnd != null and qualityInspect.entryDateEnd != '' "> |
| | | AND qi.check_time <= DATE_FORMAT(#{qualityInspect.entryDateEnd},'%Y-%m-%d') |
| | | </if> |
| | | <if test="qualityInspect.purchaseContractNo != null and qualityInspect.purchaseContractNo != '' "> |
| | | AND pl.purchase_contract_number like concat('%',#{qualityInspect.purchaseContractNo},'%') |
| | | </if> |
| | | <if test="qualityInspect.workOrderNo != null and qualityInspect.workOrderNo != '' "> |
| | | AND pot.work_order_no like concat('%',#{qualityInspect.workOrderNo},'%') |
| | | </if> |
| | | <if test="qualityInspect.salesContractNo != null and qualityInspect.salesContractNo != '' "> |
| | | AND po_sales.sales_contract_no like concat('%',#{qualityInspect.salesContractNo},'%') |
| | | </if> |
| | | ORDER BY qi.check_time DESC |
| | | ORDER BY coalesce(qi.check_time, qi.create_time) DESC |
| | | </select> |
| | | |
| | | <select id="qualityInspectExport" resultType="com.ruoyi.quality.pojo.QualityInspect"> |
| | | SELECT |
| | | * |
| | | qi.*, |
| | | CASE |
| | | WHEN (IFNULL(qi.qualified_quantity, 0) + IFNULL(qi.unqualified_quantity, 0)) = 0 THEN 0 |
| | | ELSE ROUND(IFNULL(qi.qualified_quantity, 0) / (IFNULL(qi.qualified_quantity, 0) + IFNULL(qi.unqualified_quantity, 0)) * 100, 2) |
| | | END AS passRate |
| | | FROM quality_inspect |
| | | where |
| | | inspect_type=#{qualityInspect.inspectType} |
| | |
| | | </delete> |
| | | |
| | | <select id="getInspectStatistics" resultType="com.ruoyi.quality.dto.QualityInspectStatDto"> |
| | | SELECT CASE pp.product_name |
| | | WHEN 'åææ' THEN 0 |
| | | WHEN 'åæå' THEN 1 |
| | | WHEN 'æå' THEN 2 |
| | | END AS modelType, |
| | | SELECT qi.inspect_type AS modelType, |
| | | |
| | | IFNULL(SUM(qi.quantity), 0) AS totalCount, |
| | | |
| | |
| | | ELSE 0 |
| | | END), 0) AS completedCount |
| | | |
| | | FROM product p |
| | | INNER JOIN product pp |
| | | ON p.parent_id = pp.id |
| | | LEFT JOIN product_model pm |
| | | ON pm.product_id = p.id |
| | | LEFT JOIN quality_inspect qi |
| | | ON qi.product_model_id = pm.id |
| | | FROM quality_inspect qi |
| | | |
| | | WHERE pp.product_name IN ('åææ', 'åæå', 'æå') |
| | | |
| | | GROUP BY pp.product_name |
| | | GROUP BY qi.inspect_type |
| | | |
| | | </select> |
| | | |
| | | <select id="getPassRateStatistics" resultType="com.ruoyi.quality.dto.QualityPassRateDto"> |
| | | SELECT t.modelType, |
| | | t.totalCount, |
| | | t.completedCount, |
| | | t.qualifiedCount, |
| | | t.unqualifiedCount, |
| | | |
| | | COALESCE(SUM(qi.quantity), 0) AS totalCount, |
| | | /* 宿çï¼ |
| | | å¦ææ»æ°ä¸º 0 åè¿å 0ï¼å¦åè®¡ç®æ¯ä¾ï¼ä½¿ç¨ TRUNCATE ä¿ç 4 ä½å°æ°ï¼å¦ 99.9992ï¼ |
| | | */ |
| | | IF(t.totalCount = 0, 0, |
| | | TRUNCATE((t.completedCount / t.totalCount) * 100, 2) |
| | | ) AS completionRate, |
| | | |
| | | COALESCE(SUM( |
| | | CASE |
| | | WHEN qi.inspect_state = 1 THEN qi.quantity |
| | | ELSE 0 |
| | | END |
| | | ), 0) AS completedCount, |
| | | |
| | | COALESCE(SUM( |
| | | CASE |
| | | WHEN qi.inspect_state = 1 |
| | | THEN qi.qualified_quantity |
| | | ELSE 0 |
| | | END |
| | | ), 0) AS qualifiedCount, |
| | | |
| | | COALESCE(SUM( |
| | | CASE |
| | | WHEN qi.inspect_state = 1 |
| | | THEN qi.unqualified_quantity |
| | | ELSE 0 |
| | | END |
| | | ), 0) AS unqualifiedCount, |
| | | |
| | | /* 宿ç */ |
| | | IF(COALESCE(SUM(qi.quantity), 0) = 0, 0, |
| | | ROUND( |
| | | COALESCE(SUM( |
| | | CASE |
| | | WHEN qi.inspect_state = 1 THEN qi.quantity |
| | | ELSE 0 |
| | | END |
| | | ), 0) |
| | | / SUM(qi.quantity) * 100, 2) |
| | | ) AS completionRate, |
| | | |
| | | /* åæ ¼ç */ |
| | | IF(COALESCE(SUM( |
| | | CASE |
| | | WHEN qi.inspect_state = 1 THEN qi.quantity |
| | | ELSE 0 |
| | | END |
| | | ), 0) = 0, 0, |
| | | ROUND( |
| | | COALESCE(SUM( |
| | | CASE |
| | | WHEN qi.inspect_state = 1 |
| | | THEN qi.qualified_quantity |
| | | ELSE 0 |
| | | END |
| | | ), 0) |
| | | / |
| | | COALESCE(SUM( |
| | | CASE |
| | | WHEN qi.inspect_state = 1 THEN qi.quantity |
| | | ELSE 0 |
| | | END |
| | | ), 0) * 100, 2) |
| | | ) AS passRate |
| | | |
| | | FROM (SELECT 0 AS modelType |
| | | UNION ALL |
| | | SELECT 1 |
| | | UNION ALL |
| | | SELECT 2) t |
| | | LEFT JOIN product p |
| | | ON 1 = 1 |
| | | LEFT JOIN product pp |
| | | ON p.parent_id = pp.id |
| | | LEFT JOIN product_model pm |
| | | ON pm.product_id = p.id |
| | | LEFT JOIN quality_inspect qi |
| | | ON qi.product_model_id = pm.id |
| | | AND ( |
| | | (pp.product_name = 'åææ' AND t.modelType = 0) OR |
| | | (pp.product_name = 'åæå' AND t.modelType = 1) OR |
| | | (pp.product_name = 'æå' AND t.modelType = 2) |
| | | ) |
| | | |
| | | GROUP BY t.modelType |
| | | /* åæ ¼çï¼ |
| | | 妿å®å·¥æ°ä¸º 0 åè¿å 0ï¼ä½¿ç¨ TRUNCATE æªæï¼é²æ¢æå
¶æ¥è¿ 100% çæ°æ®è¢«åèäºå
¥æ 100 |
| | | */ |
| | | IF(t.completedCount = 0, 0, |
| | | TRUNCATE((t.qualifiedCount / t.completedCount) * 100, 2) |
| | | ) AS passRate |
| | | FROM ( |
| | | /* å
éè¿åæ¥è¯¢æåºç¡æ°æ®è¿è¡èåç»è®¡ï¼é¿å
å¤å±éå¤ç¼å夿ç CASE WHEN */ |
| | | SELECT qi.inspect_type AS modelType, |
| | | COALESCE(SUM(qi.quantity), 0) AS totalCount, |
| | | COALESCE(SUM(CASE WHEN qi.inspect_state = 1 THEN qi.quantity ELSE 0 END), |
| | | 0) AS completedCount, |
| | | COALESCE(SUM(CASE WHEN qi.inspect_state = 1 THEN qi.qualified_quantity ELSE 0 END), |
| | | 0) AS qualifiedCount, |
| | | COALESCE(SUM(CASE WHEN qi.inspect_state = 1 THEN qi.unqualified_quantity ELSE 0 END), |
| | | 0) AS unqualifiedCount |
| | | FROM quality_inspect qi |
| | | GROUP BY qi.inspect_type) t |
| | | ORDER BY t.modelType; |
| | | </select> |
| | | |
| | |
| | | FROM months m |
| | | CROSS JOIN types t) |
| | | |
| | | SELECT CASE b.month_num |
| | | WHEN 1 THEN '䏿' |
| | | WHEN 2 THEN 'äºæ' |
| | | WHEN 3 THEN '䏿' |
| | | WHEN 4 THEN 'åæ' |
| | | WHEN 5 THEN 'äºæ' |
| | | WHEN 6 THEN 'å
æ' |
| | | WHEN 7 THEN '䏿' |
| | | WHEN 8 THEN 'å
«æ' |
| | | WHEN 9 THEN '乿' |
| | | WHEN 10 THEN 'åæ' |
| | | WHEN 11 THEN 'å䏿' |
| | | WHEN 12 THEN 'åäºæ' |
| | | END AS month, |
| | | SELECT |
| | | CASE t.month_num |
| | | WHEN 1 THEN '䏿' |
| | | WHEN 2 THEN 'äºæ' |
| | | WHEN 3 THEN '䏿' |
| | | WHEN 4 THEN 'åæ' |
| | | WHEN 5 THEN 'äºæ' |
| | | WHEN 6 THEN 'å
æ' |
| | | WHEN 7 THEN '䏿' |
| | | WHEN 8 THEN 'å
«æ' |
| | | WHEN 9 THEN '乿' |
| | | WHEN 10 THEN 'åæ' |
| | | WHEN 11 THEN 'å䏿' |
| | | WHEN 12 THEN 'åäºæ' |
| | | END AS month, |
| | | |
| | | b.modelType, |
| | | t.modelType, |
| | | t.totalCount, |
| | | t.completedCount, |
| | | t.qualifiedCount, |
| | | t.unqualifiedCount, |
| | | |
| | | /* æ»æ°é */ |
| | | IF(t.totalCount = 0, 0, |
| | | TRUNCATE((t.completedCount / t.totalCount) * 100, 2) |
| | | ) AS completionRate, |
| | | |
| | | IF(t.completedCount = 0, 0, |
| | | TRUNCATE((t.qualifiedCount / t.completedCount) * 100, 2) |
| | | ) AS passRate |
| | | |
| | | FROM ( |
| | | SELECT |
| | | b.month_num, |
| | | b.modelType, |
| | | COALESCE(SUM(qi.quantity), 0) AS totalCount, |
| | | COALESCE(SUM(CASE WHEN qi.inspect_state = 1 THEN qi.quantity ELSE 0 END), 0) AS completedCount, |
| | | COALESCE(SUM(CASE WHEN qi.inspect_state = 1 THEN qi.qualified_quantity ELSE 0 END), 0) AS qualifiedCount, |
| | | COALESCE(SUM(CASE WHEN qi.inspect_state = 1 THEN qi.unqualified_quantity ELSE 0 END), 0) AS unqualifiedCount |
| | | FROM base b |
| | | LEFT JOIN quality_inspect qi ON qi.inspect_type = b.modelType |
| | | AND YEAR(qi.check_time) = #{year} |
| | | AND MONTH(qi.check_time) = b.month_num |
| | | GROUP BY b.month_num, b.modelType |
| | | ) t |
| | | ORDER BY t.month_num, t.modelType; |
| | | </select> |
| | | <select id="getYearlyPassRateStatistics" resultType="com.ruoyi.quality.dto.QualityPassRateDto"> |
| | | SELECT qi.inspect_type AS modelType, |
| | | |
| | | COALESCE(SUM(qi.quantity), 0) AS totalCount, |
| | | |
| | | /* 已宿 */ |
| | | COALESCE(SUM( |
| | | CASE WHEN qi.inspect_state = 1 THEN qi.quantity ELSE 0 END |
| | | ), 0) AS completedCount, |
| | | |
| | | /* åæ ¼ */ |
| | | COALESCE(SUM( |
| | | CASE |
| | | WHEN qi.inspect_state = 1 |
| | | THEN qi.qualified_quantity |
| | | WHEN qi.inspect_state = 1 THEN qi.quantity |
| | | ELSE 0 |
| | | END |
| | | ), 0) AS completedCount, |
| | | |
| | | COALESCE(SUM( |
| | | CASE |
| | | WHEN qi.inspect_state = 1 THEN qi.qualified_quantity |
| | | ELSE 0 |
| | | END |
| | | ), 0) AS qualifiedCount, |
| | | |
| | | /* ä¸åæ ¼ */ |
| | | COALESCE(SUM( |
| | | CASE |
| | | WHEN qi.inspect_state = 1 |
| | | THEN qi.unqualified_quantity |
| | | WHEN qi.inspect_state = 1 THEN qi.unqualified_quantity |
| | | ELSE 0 |
| | | END |
| | | ), 0) AS unqualifiedCount, |
| | |
| | | ROUND( |
| | | COALESCE(SUM( |
| | | CASE WHEN qi.inspect_state = 1 THEN qi.quantity ELSE 0 END |
| | | ), 0) / SUM(qi.quantity) * 100, 2 |
| | | ) |
| | | ), 0) |
| | | / SUM(qi.quantity) * 100, 2) |
| | | ) AS completionRate, |
| | | |
| | | /* åæ ¼ç */ |
| | |
| | | ), 0) = 0, 0, |
| | | ROUND( |
| | | COALESCE(SUM( |
| | | CASE |
| | | WHEN qi.inspect_state = 1 |
| | | THEN qi.qualified_quantity |
| | | ELSE 0 |
| | | END |
| | | CASE WHEN qi.inspect_state = 1 THEN qi.qualified_quantity ELSE 0 END |
| | | ), 0) |
| | | / |
| | | COALESCE(SUM( |
| | | CASE WHEN qi.inspect_state = 1 THEN qi.quantity ELSE 0 END |
| | | ), 0) * 100, 2 |
| | | ) |
| | | ), 0) * 100, 2) |
| | | ) AS passRate |
| | | |
| | | FROM base b |
| | | LEFT JOIN product p ON 1 = 1 |
| | | LEFT JOIN product pp ON p.parent_id = pp.id |
| | | LEFT JOIN product_model pm ON pm.product_id = p.id |
| | | LEFT JOIN quality_inspect qi |
| | | ON qi.product_model_id = pm.id |
| | | AND YEAR(qi.check_time) = #{year} |
| | | AND MONTH(qi.check_time) = b.month_num |
| | | AND ( |
| | | (pp.product_name = 'åææ' AND b.modelType = 0) |
| | | OR (pp.product_name = 'åæå' AND b.modelType = 1) |
| | | OR (pp.product_name = 'æå' AND b.modelType = 2) |
| | | ) |
| | | |
| | | GROUP BY b.month_num, b.modelType |
| | | ORDER BY b.month_num, b.modelType; |
| | | |
| | | </select> |
| | | |
| | | <select id="getYearlyPassRateStatistics" resultType="com.ruoyi.quality.dto.QualityPassRateDto"> |
| | | SELECT t.modelType, |
| | | COALESCE(SUM( |
| | | CASE |
| | | WHEN pp.product_name = 'åææ' AND t.modelType = 0 THEN qi.quantity |
| | | WHEN pp.product_name = 'åæå' AND t.modelType = 1 THEN qi.quantity |
| | | WHEN pp.product_name = 'æå' AND t.modelType = 2 THEN qi.quantity |
| | | ELSE 0 |
| | | END |
| | | ), 0) AS totalCount, |
| | | COALESCE(SUM( |
| | | CASE |
| | | WHEN pp.product_name = 'åææ' AND t.modelType = 0 THEN qi.qualified_quantity |
| | | WHEN pp.product_name = 'åæå' AND t.modelType = 1 THEN qi.qualified_quantity |
| | | WHEN pp.product_name = 'æå' AND t.modelType = 2 THEN qi.qualified_quantity |
| | | ELSE 0 |
| | | END |
| | | ), 0) AS qualifiedCount, |
| | | COALESCE(SUM( |
| | | CASE |
| | | WHEN pp.product_name = 'åææ' AND t.modelType = 0 THEN qi.unqualified_quantity |
| | | WHEN pp.product_name = 'åæå' AND t.modelType = 1 THEN qi.unqualified_quantity |
| | | WHEN pp.product_name = 'æå' AND t.modelType = 2 THEN qi.unqualified_quantity |
| | | ELSE 0 |
| | | END |
| | | ), 0) AS unqualifiedCount |
| | | FROM (SELECT 0 AS modelType |
| | | UNION ALL |
| | | SELECT 1 |
| | | UNION ALL |
| | | SELECT 2) t |
| | | LEFT JOIN product p ON 1 = 1 |
| | | LEFT JOIN product pp ON p.parent_id = pp.id |
| | | LEFT JOIN product_model pm ON pm.product_id = p.id |
| | | LEFT JOIN quality_inspect qi |
| | | ON qi.product_model_id = pm.id |
| | | AND YEAR(qi.check_time) = #{year} |
| | | AND qi.inspect_state = 1 |
| | | GROUP BY t.modelType |
| | | ORDER BY t.modelType; |
| | | FROM quality_inspect qi |
| | | WHERE YEAR(qi.check_time) = #{year} |
| | | GROUP BY qi.inspect_type |
| | | ORDER BY qi.inspect_type; |
| | | </select> |
| | | |
| | | |
| | |
| | | /* åææ */ |
| | | COALESCE(SUM( |
| | | CASE |
| | | WHEN pp.product_name = 'åææ' |
| | | WHEN qi.inspect_type = 0 |
| | | THEN qi.quantity |
| | | ELSE 0 |
| | | END |
| | |
| | | /* åæå */ |
| | | COALESCE(SUM( |
| | | CASE |
| | | WHEN pp.product_name = 'åæå' |
| | | WHEN qi.inspect_type = 1 |
| | | THEN qi.quantity |
| | | ELSE 0 |
| | | END |
| | |
| | | /* æå */ |
| | | COALESCE(SUM( |
| | | CASE |
| | | WHEN pp.product_name = 'æå' |
| | | WHEN qi.inspect_type = 2 |
| | | THEN qi.quantity |
| | | ELSE 0 |
| | | END |
| | | ), 0) AS outgoingCount |
| | | |
| | | FROM months m |
| | | LEFT JOIN product p ON 1 = 1 |
| | | LEFT JOIN product pp ON p.parent_id = pp.id |
| | | LEFT JOIN product_model pm ON pm.product_id = p.id |
| | | LEFT JOIN quality_inspect qi |
| | | ON qi.product_model_id = pm.id |
| | | AND qi.inspect_state = 1 |
| | | ON qi.inspect_state = 1 |
| | | AND YEAR(qi.check_time) = #{year} |
| | | AND MONTH(qi.check_time) = m.month_num |
| | | |
| | |
| | | FROM quality_inspect_param qip |
| | | JOIN quality_inspect qi |
| | | ON qip.inspect_id = qi.id |
| | | JOIN product p |
| | | ON qi.product_id = p.id |
| | | JOIN product pp |
| | | ON p.parent_id = pp.id |
| | | WHERE qi.inspect_state = 1 |
| | | AND ( |
| | | (#{modelType} = 1 AND pp.product_name = 'åææ') |
| | | OR (#{modelType} = 2 AND pp.product_name = 'åæå') |
| | | OR (#{modelType} = 3 AND pp.product_name = 'æå') |
| | | ) |
| | | AND qi.inspect_type = #{modelType} - 1 |
| | | GROUP BY qip.parameter_item), |
| | | ranked AS (SELECT name, |
| | | count, |
| | |
| | | <if test="c.inspectType != null "> |
| | | AND inspect_type =#{c.inspectType} |
| | | </if> |
| | | order by create_time desc |
| | | </select> |
| | | <select id="getQualityTestStandardByProductId" resultType="com.ruoyi.quality.pojo.QualityTestStandard"> |
| | | SELECT qts.* |
| | |
| | | END AS method |
| | | FROM quality_unqualified qu |
| | | LEFT JOIN product_model pm ON qu.model = pm.id |
| | | <where> |
| | | <if test="qualityUnqualified.inspectType != null "> |
| | | AND inspect_type = #{qualityUnqualified.inspectType} |
| | | </if> |
| | | <if test="qualityUnqualified.inspectState != null "> |
| | | AND inspect_state = #{qualityUnqualified.inspectState} |
| | | </if> |
| | | <if test="qualityUnqualified.productName != null and qualityUnqualified.productName != '' "> |
| | | AND product_name = #{qualityUnqualified.productName} |
| | | </if> |
| | | <if test="qualityUnqualified.entryDateStart != null and qualityUnqualified.entryDateStart != '' "> |
| | | AND check_time >= DATE_FORMAT(#{qualityUnqualified.entryDateStart},'%Y-%m-%d') |
| | | </if> |
| | | <if test="qualityUnqualified.entryDateEnd != null and qualityUnqualified.entryDateEnd != '' "> |
| | | AND check_time <= DATE_FORMAT(#{qualityUnqualified.entryDateEnd},'%Y-%m-%d') |
| | | </if> |
| | | </where> |
| | | order by qu.create_time desc |
| | | where |
| | | 1=1 |
| | | <if test="qualityUnqualified.inspectType != null "> |
| | | AND inspect_type = #{qualityUnqualified.inspectType} |
| | | </if> |
| | | <if test="qualityUnqualified.inspectState != null "> |
| | | AND inspect_state = #{qualityUnqualified.inspectState} |
| | | </if> |
| | | <if test="qualityUnqualified.productName != null and qualityUnqualified.productName != '' "> |
| | | AND product_name = #{qualityUnqualified.productName} |
| | | </if> |
| | | <if test="qualityUnqualified.entryDateStart != null and qualityUnqualified.entryDateStart != '' "> |
| | | AND check_time >= DATE_FORMAT(#{qualityUnqualified.entryDateStart},'%Y-%m-%d') |
| | | </if> |
| | | <if test="qualityUnqualified.entryDateEnd != null and qualityUnqualified.entryDateEnd != '' "> |
| | | AND check_time <= DATE_FORMAT(#{qualityUnqualified.entryDateEnd},'%Y-%m-%d') |
| | | </if> |
| | | order by qu.check_time desc |
| | | </select> |
| | | |
| | | <select id="qualityUnqualifiedExport" resultType="com.ruoyi.quality.pojo.QualityUnqualified"> |
| | | SELECT |
| | | * |
| | |
| | | T1.attachment_materials, |
| | | T1.tenant_id, |
| | | T1.contract_amount, |
| | | T1.net_contract_amount, |
| | | T1.contract_amount AS noInvoiceAmountTotal, |
| | | T1.execution_date, |
| | | T2.nick_name AS entry_person_name, |
| | |
| | | AND T1.entry_date <= DATE_FORMAT(#{salesLedgerDto.entryDateEnd},'%Y-%m-%d') |
| | | </if> |
| | | </where> |
| | | order by T1.entry_date desc |
| | | order by T1.entry_date desc, T1.sales_contract_no desc |
| | | </select> |
| | | |
| | | <select id="selectIncomeStats" resultType="com.ruoyi.home.dto.IncomeExpenseAnalysisDto"> |
| | |
| | | FROM sales_ledger |
| | | GROUP BY customer_name |
| | | </select> |
| | | |
| | | <select id="listSalesLedgerAndShipped" resultType="com.ruoyi.sales.dto.SalesLedgerDto"> |
| | | select distinct sl.id as 'disId', sl.* from |
| | | sales_ledger sl |
| | | left join sales_ledger_product slp on sl.id = slp.sales_ledger_id |
| | | left join shipping_info si on slp.id = si.sales_ledger_product_id |
| | | where si.status = 'å·²åè´§' |
| | | <if test="ew.customerName != null and ew.customerName != '' "> |
| | | and sl.customer_name like concat('%',#{ew.customerName},'%') |
| | | where si.status = 'å®¡æ ¸éè¿' |
| | | <if test="ew.customerId != null and ew.customerId != '' "> |
| | | and sl.customer_id = #{ew.customerId} |
| | | </if> |
| | | order by sl.execution_date desc |
| | | </select> |
| | | |
| | | <select id="selectPurchaseReportVoPage" resultType="com.ruoyi.purchase.vo.PurchaseReportVo"> |
| | | select sl.sales_contract_no customerContractNo, |
| | | c.customer_name, |
| | |
| | | from sales_ledger sl |
| | | left join purchase_ledger pl on sl.id = pl.sales_ledger_id |
| | | left join customer c on sl.customer_id = c.id |
| | | <where> |
| | | <if test="customerName != null and customerName != '' "> |
| | | and c.customer_name like concat('%',#{customerName},'%') |
| | | </if> |
| | | </where> |
| | | order by sl.entry_date desc |
| | | where 1=1 |
| | | <if test="customerName != null and customerName != '' "> |
| | | and c.customer_name like concat('%',#{customerName},'%') |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | pm.model as specification_model, |
| | | pm.unit as unit, |
| | | CASE |
| | | WHEN (IFNULL(t2.qualitity, 0) - IFNULL(t2.locked_quantity, 0)) >0 THEN 1 |
| | | WHEN (IFNULL(t2.qualitity, 0) - IFNULL(t2.locked_quantity, 0)) >= (IFNULL(T1.quantity, 0) - IFNULL(t3.shipped_quantity, 0)) THEN 1 |
| | | ELSE 0 |
| | | END as has_sufficient_stock, |
| | | (IFNULL(T1.quantity, 0) - IFNULL(t3.shipped_quantity, 0) - IFNULL(t5.pending_approval_quantity, 0)) as no_quantity, |
| | | IFNULL(t3.shipped_quantity, 0) as shipped_quantity, |
| | | IFNULL(t6.return_quantity, 0) as return_quantity, |
| | | IFNULL(t4.approved_stock_in_num, 0) as approved_stock_in_num, |
| | | IFNULL(t5.pending_approval_quantity, 0) as pending_approval_quantity, |
| | | (IFNULL(T1.quantity, 0) - IFNULL(t3.shipped_quantity, 0)) as no_quantity, |
| | | CASE |
| | | WHEN IFNULL(t3.shipped_quantity, 0) = 0 AND IFNULL(t5.pending_approval_quantity, 0) = 0 THEN 'å¾
åè´§' |
| | | WHEN IFNULL(t3.shipped_quantity, 0) = 0 AND IFNULL(t5.pending_approval_quantity, 0) > 0 THEN '审æ¹ä¸' |
| | | WHEN IFNULL(t3.shipped_quantity, 0) = 0 THEN 'å¾
åè´§' |
| | | WHEN (IFNULL(T1.quantity, 0) - IFNULL(t3.shipped_quantity, 0)) > 0 THEN 'é¨ååè´§' |
| | | ELSE 'å·²åè´§' |
| | | END as shippingStatus, |
| | |
| | | GROUP BY product_model_id |
| | | ) t2 ON T1.product_model_id = t2.product_model_id |
| | | LEFT JOIN ( |
| | | SELECT |
| | | slp.id AS sales_ledger_product_id, |
| | | IFNULL(SUM(so.total_sale_out_num), 0) AS shipped_quantity |
| | | FROM sales_ledger_product slp |
| | | LEFT JOIN ( |
| | | SELECT |
| | | pl.id AS purchase_ledger_id, |
| | | sir.product_model_id, |
| | | SUM(spd.quantity) AS total_sale_out_num |
| | | FROM shipping_product_detail spd |
| | | INNER JOIN shipping_info si |
| | | ON si.id = spd.shipping_info_id |
| | | INNER JOIN stock_out_record sor |
| | | ON sor.record_id = si.id |
| | | AND TRIM(sor.record_type) = '13' |
| | | AND sor.approval_status IN (0, 1, 3) |
| | | INNER JOIN stock_inventory inv |
| | | ON inv.id = spd.stock_inventory_id |
| | | INNER JOIN stock_in_record sir |
| | | ON sir.product_model_id = inv.product_model_id |
| | | AND ( |
| | | (sir.batch_no IS NOT NULL AND sir.batch_no = inv.batch_no) |
| | | OR (sir.batch_no IS NULL AND inv.batch_no IS NULL) |
| | | ) |
| | | AND sir.approval_status = 1 |
| | | AND sir.record_type IN ('7', '10') |
| | | LEFT JOIN quality_inspect qi |
| | | ON sir.record_type = '10' |
| | | AND sir.record_id = qi.id |
| | | LEFT JOIN purchase_ledger pl |
| | | ON pl.id = IF(sir.record_type = '7', sir.record_id, qi.purchase_ledger_id) |
| | | WHERE si.status IN ('å®¡æ ¸éè¿', 'å·²åè´§') |
| | | AND pl.id IS NOT NULL |
| | | GROUP BY pl.id, sir.product_model_id |
| | | ) so ON so.purchase_ledger_id = slp.sales_ledger_id |
| | | AND so.product_model_id = slp.product_model_id |
| | | WHERE slp.type = 2 |
| | | GROUP BY slp.id |
| | | |
| | | UNION ALL |
| | | |
| | | -- éå®å°è´¦(type=1): shipping_info ç´æ¥æ sales_ledger_product_id,åªç»è®¡åºåºå®¡æ ¸éè¿(approval_status=1)çåè´§é,ä¸ t5 ç pending é»è¾äºè¡¥ |
| | | SELECT |
| | | si.sales_ledger_product_id AS sales_ledger_product_id, |
| | | IFNULL(SUM(spd.quantity), 0) AS shipped_quantity |
| | | SELECT sales_ledger_product_id, IFNULL(SUM(spd.quantity), 0) as shipped_quantity |
| | | FROM shipping_info si |
| | | INNER JOIN shipping_product_detail spd ON si.id = spd.shipping_info_id |
| | | INNER JOIN stock_out_record sor |
| | | ON sor.record_id = si.id |
| | | AND TRIM(sor.record_type) = '13' |
| | | AND sor.approval_status = 1 |
| | | WHERE si.status IN ('å®¡æ ¸éè¿', 'å·²åè´§') |
| | | AND si.sales_ledger_product_id IS NOT NULL |
| | | GROUP BY si.sales_ledger_product_id |
| | | LEFT JOIN shipping_product_detail spd ON si.id = spd.shipping_info_id |
| | | where si.status != 'å®¡æ ¸æç»' |
| | | GROUP BY sales_ledger_product_id |
| | | ) t3 ON t3.sales_ledger_product_id = T1.id |
| | | LEFT JOIN ( |
| | | SELECT rel.sales_ledger_product_id, |
| | |
| | | ) rel |
| | | GROUP BY rel.sales_ledger_product_id |
| | | ) t4 ON t4.sales_ledger_product_id = T1.id |
| | | LEFT JOIN ( |
| | | SELECT si.sales_ledger_product_id, IFNULL(SUM(spd.quantity), 0) as pending_approval_quantity |
| | | FROM shipping_info si |
| | | LEFT JOIN shipping_product_detail spd ON si.id = spd.shipping_info_id |
| | | WHERE si.status IN ('å¾
å®¡æ ¸', 'å®¡æ ¸ä¸') |
| | | OR (si.status = 'å®¡æ ¸éè¿' AND NOT EXISTS ( |
| | | SELECT 1 FROM stock_out_record sor |
| | | WHERE sor.record_id = si.id |
| | | AND TRIM(sor.record_type) = '13' |
| | | AND sor.approval_status = 1 |
| | | )) |
| | | GROUP BY si.sales_ledger_product_id |
| | | ) t5 ON t5.sales_ledger_product_id = T1.id |
| | | LEFT JOIN ( |
| | | SELECT |
| | | prop.sales_ledger_product_id, |
| | | IFNULL(SUM(prop.return_quantity), 0) AS return_quantity |
| | | FROM purchase_return_order_products prop |
| | | LEFT JOIN purchase_return_orders pro |
| | | ON pro.id = prop.purchase_return_order_id |
| | | GROUP BY prop.sales_ledger_product_id |
| | | |
| | | UNION ALL |
| | | |
| | | SELECT |
| | | si.sales_ledger_product_id, |
| | | IFNULL(SUM(rsp.num), 0) AS return_quantity |
| | | FROM return_sale_product rsp |
| | | INNER JOIN return_management rm ON rm.id = rsp.return_management_id |
| | | INNER JOIN shipping_info si ON si.id = rm.shipping_id |
| | | INNER JOIN stock_in_record sir ON sir.record_id = rsp.id |
| | | AND TRIM(sir.record_type) IN ('14','15') |
| | | AND sir.approval_status = 1 |
| | | WHERE si.sales_ledger_product_id IS NOT NULL |
| | | GROUP BY si.sales_ledger_product_id |
| | | ) t6 ON t6.sales_ledger_product_id = T1.id |
| | | left join product_model pm ON T1.product_model_id = pm.id |
| | | left join product p ON pm.product_id = p.id |
| | | <where> |
| | |
| | | SUM(slp.tax_inclusive_total_price) AS purchaseAmount, |
| | | COUNT(DISTINCT slp.sales_ledger_id) AS purchaseTimes, |
| | | <!-- å¹³ååä»· = æ»éè´éé¢/æ»éè´æ°éï¼ä¿ç2ä½å°æ°ï¼é¿å
é¤0 --> |
| | | ROUND(IF(SUM(slp.quantity) = 0, 0, SUM(slp.tax_inclusive_total_price) / SUM(slp.quantity)), 2) AS averagePrice, |
| | | ROUND(IF(SUM(slp.quantity) = 0, 0, SUM(slp.tax_inclusive_total_price) / SUM(slp.quantity)), 6) AS averagePrice, |
| | | <!-- 该产åå¤§ç±»ä¸æåä¸ä¸ªå½å
¥æ¥æï¼åå°è´¦ä¸»è¡¨çentry_dateï¼ --> |
| | | MAX(sl.entry_date) AS entryDate, |
| | | COALESCE(NULLIF(SUM(t1.return_quantity), 0), 0) AS return_quantity, |
| | |
| | | JOIN product pr ON slp.product_id = pr.id |
| | | WHERE |
| | | slp.type = 2 |
| | | AND pr.parent_id = ( SELECT id FROM product WHERE product_name = 'åææ' ) |
| | | AND pr.parent_id = ( SELECT id FROM product WHERE product_name = 'åæ' ) |
| | | GROUP BY |
| | | pr.id, |
| | | pr.product_name |
| | |
| | | |
| | | <select id="selectProductCountByTypeAndDate" resultType="int"> |
| | | SELECT IFNULL(COUNT(*), 0) |
| | | FROM sales_ledger_product |
| | | FROM sales_ledger_product slp |
| | | LEFT JOIN sales_ledger sl ON sl.id = slp.sales_ledger_id |
| | | LEFT JOIN purchase_ledger pl ON pl.id = slp.sales_ledger_id |
| | | WHERE type = #{type} |
| | | <if test="startDate != null"> |
| | | AND register_date >= #{startDate} |
| | | </if> |
| | | <if test="endDate != null"> |
| | | AND register_date <= #{endDate} |
| | | </if> |
| | | |
| | | <choose> |
| | | <when test="type == 1"> |
| | | <if test="startDate != null"> |
| | | AND sl.entry_date >= #{startDate} |
| | | </if> |
| | | <if test="endDate != null"> |
| | | AND sl.entry_date <= #{endDate} |
| | | </if> |
| | | </when> |
| | | |
| | | <when test="type == 2"> |
| | | <if test="startDate != null"> |
| | | AND pl.entry_date >= #{startDate} |
| | | </if> |
| | | <if test="endDate != null"> |
| | | AND pl.entry_date <= #{endDate} |
| | | </if> |
| | | </when> |
| | | </choose> |
| | | </select> |
| | | |
| | | <select id="selectRawMaterialExpense" resultType="java.math.BigDecimal"> |
| | | WITH RECURSIVE product_tree AS (SELECT id |
| | | FROM product |
| | | WHERE product_name = 'åææ' |
| | | WHERE product_name = 'åæ' |
| | | |
| | | UNION ALL |
| | | |
| | |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.sales.mapper.SalesQuotationMapper"> |
| | | <select id="listPage" resultType="com.ruoyi.sales.dto.SalesQuotationDto"> |
| | | SELECT t1.* |
| | | SELECT t1.*, |
| | | t2.approve_user_ids |
| | | FROM sales_quotation t1 |
| | | <where> |
| | | <if test="salesQuotationDto.quotationNo != null and salesQuotationDto.quotationNo != '' "> |
| | | AND t1.quotation_no LIKE CONCAT('%',#{salesQuotationDto.quotationNo},'%') |
| | | </if> |
| | | <if test="salesQuotationDto.customer != null and salesQuotationDto.customer != '' "> |
| | | AND t1.customer = #{salesQuotationDto.customer} |
| | | </if> |
| | | <if test="salesQuotationDto.status != null and salesQuotationDto.status != '' "> |
| | | AND t1.status = #{salesQuotationDto.status} |
| | | </if> |
| | | </where> |
| | | order by t1.id desc |
| | | LEFT JOIN approve_process t2 ON t1.quotation_no = t2.approve_reason and t2.approve_type = 6 |
| | | WHERE 1=1 |
| | | and t2.approve_delete = 0 |
| | | <if test="salesQuotationDto.quotationNo != null and salesQuotationDto.quotationNo != '' "> |
| | | AND t1.quotation_no LIKE CONCAT('%',#{salesQuotationDto.quotationNo},'%') |
| | | </if> |
| | | <if test="salesQuotationDto.customer != null and salesQuotationDto.customer != '' "> |
| | | AND t1.customer = #{salesQuotationDto.customer} |
| | | </if> |
| | | <if test="salesQuotationDto.status != null and salesQuotationDto.status != '' "> |
| | | AND t1.status = #{salesQuotationDto.status} |
| | | </if> |
| | | order by t1.quotation_no desc |
| | | </select> |
| | | </mapper> |
| | |
| | | sor.batch_no, |
| | | slp.tax_inclusive_unit_price, |
| | | GREATEST(sor.stock_out_num - COALESCE(rs.total_return_num, 0), 0) AS un_quantity, |
| | | COALESCE(rs.return_num, 0) AS total_return_num, |
| | | COALESCE(rs.pending_return_num, 0) AS pending_return_num |
| | | COALESCE(rs.total_return_num, 0) AS total_return_num |
| | | FROM shipping_info si |
| | | LEFT JOIN shipping_product_detail spd ON spd.shipping_info_id = si.id |
| | | LEFT JOIN stock_out_record sor ON sor.record_id = si.id and sor.record_type = '13' |
| | |
| | | LEFT JOIN ( |
| | | SELECT |
| | | stock_out_record_id, |
| | | SUM(num) AS total_return_num, |
| | | SUM( CASE WHEN rsp.STATUS = 0 THEN rsp.num ELSE 0 END ) AS pending_return_num , |
| | | SUM( CASE WHEN rsp.STATUS = 1 THEN rsp.num ELSE 0 END ) AS return_num |
| | | SUM(num) AS total_return_num |
| | | FROM return_sale_product rsp |
| | | left join return_management rm on rm.id = rsp.return_management_id |
| | | left join shipping_info si on si.id = rm.shipping_id |
| | |
| | | order by sor.id |
| | | </select> |
| | | <select id="getShippingInfoByCustomerName" resultType="com.ruoyi.sales.pojo.ShippingInfo"> |
| | | select distinct si.* from shipping_info si |
| | | select * from shipping_info si |
| | | left join sales_ledger sl on si.sales_ledger_id = sl.id |
| | | inner join stock_out_record sor on sor.record_id = si.id and sor.record_type = '13' and sor.approval_status = 1 |
| | | where sl.customer_name = #{customerName} and si.status = 'å®¡æ ¸éè¿' |
| | | where sl.customer_name = #{customerName} |
| | | </select> |
| | | </mapper> |
| | |
| | | and personal_attendance_records.date >= #{params.date} |
| | | and personal_attendance_records.date < DATE_ADD(DATE(#{params.date}), INTERVAL 1 DAY) |
| | | </if> |
| | | order by personal_attendance_records.id desc |
| | | </select> |
| | | |
| | | <!-- æ¥è¯¢æå®æ¥æææçï¼é请åï¼ä½æ²¡æèå¤è®°å½çå¨èåå·¥ï¼æ²¡æçè§ä¸ºä¼æ¯ä¸æ è®°ç¼ºå¤ --> |
| | | <!-- æ¥è¯¢æå®æ¥ææ²¡æèå¤è®°å½çå¨èåå·¥ï¼å¨æå®æ¶é´ä¹åå
¥èçï¼ --> |
| | | <select id="selectStaffWithoutAttendanceRecordBeforeTime" resultType="com.ruoyi.staff.pojo.StaffOnJob"> |
| | | SELECT soj.* |
| | | FROM staff_on_job soj |
| | |
| | | AND soj.create_time < #{entryDeadline} |
| | | AND EXISTS ( |
| | | SELECT 1 |
| | | FROM personal_shift ps |
| | | WHERE ps.staff_on_job_id = soj.id |
| | | AND DATE(ps.work_time) = #{date} |
| | | AND ps.personal_attendance_location_config_id IS NOT NULL |
| | | AND ps.personal_attendance_location_config_id != 999 |
| | | FROM personal_attendance_location_config palc |
| | | WHERE palc.sys_dept_id = soj.sys_dept_id |
| | | ) |
| | | AND NOT EXISTS ( |
| | | SELECT 1 |
| | |
| | | u.id user_id |
| | | FROM personal_shift s |
| | | LEFT JOIN staff_on_job u ON u.id = s.staff_on_job_id |
| | | LEFT JOIN staff_leave sl ON sl.staff_on_job_id = u.id |
| | | LEFT JOIN personal_attendance_location_config palc ON palc.id = s.personal_attendance_location_config_id |
| | | <where> |
| | | u.id IS NOT NULL |
| | | <if test="sysDeptId != null and sysDeptId != ''"> |
| | | and u.sys_dept_id = #{sysDeptId} |
| | | </if> |
| | | <if test="time != null and time != ''"> |
| | | and DATE_FORMAT(s.work_time, '%Y-%m') = DATE_FORMAT(#{time}, '%Y-%m') |
| | | AND (u.staff_state = 1 OR (u.staff_state = 0 AND sl.leave_date IS NOT NULL AND sl.leave_date >= DATE_FORMAT(#{time}, '%Y-%m-01'))) |
| | | </if> |
| | | <if test="userName != null and userName != ''"> |
| | | and u.staff_name like concat('%', #{userName}, '%') |
| | | </if> |
| | | </where> |
| | | GROUP BY u.id, u.staff_name |
| | | ORDER BY MAX(s.create_time) desc |
| | | ORDER BY MAX(s.create_time) |
| | | </select> |
| | | |
| | | |
| | | <select id="performanceShiftYear" resultType="java.util.Map"> |
| | | SELECT |
| | | u.staff_name name, |
| | |
| | | GROUP_CONCAT(DATE_FORMAT(s.work_time, '%c'), 'ï¼', IFNULL(palc.shift, '') order by s.work_time SEPARATOR ';') month_str |
| | | FROM personal_shift s |
| | | LEFT JOIN staff_on_job u ON u.id = s.staff_on_job_id |
| | | LEFT JOIN staff_leave sl ON sl.staff_on_job_id = u.id |
| | | LEFT JOIN personal_attendance_location_config palc ON palc.id = s.personal_attendance_location_config_id |
| | | LEFT JOIN personal_attendance_location_config palc ON palc.id = s.personal_attendance_location_config_id |
| | | <where> |
| | | <if test="time != null and time != ''"> |
| | | and DATE_FORMAT(s.work_time, '%Y') = DATE_FORMAT(#{time}, '%Y' ) |
| | | AND (u.staff_state = 1 OR (u.staff_state = 0 AND sl.leave_date IS NOT NULL AND sl.leave_date >= DATE_FORMAT(#{time}, '%Y-01-01'))) |
| | | </if> |
| | | <if test="userName != null and userName != ''"> |
| | | and u.staff_name like concat('%', #{userName}, '%') |
| | |
| | | GROUP_CONCAT(DATE_FORMAT(s.work_time, '%c'), 'ï¼', IFNULL(palc.shift, '') order by s.work_time SEPARATOR ';') month_str |
| | | FROM personal_shift s |
| | | LEFT JOIN staff_on_job u ON u.id = s.staff_on_job_id |
| | | LEFT JOIN staff_leave sl ON sl.staff_on_job_id = u.id |
| | | LEFT JOIN personal_attendance_location_config palc ON palc.id = s.personal_attendance_location_config_id |
| | | <where> |
| | | <if test="time != null and time != ''"> |
| | | and DATE_FORMAT(s.work_time, '%Y') = DATE_FORMAT(#{time}, '%Y' ) |
| | | AND (u.staff_state = 1 OR (u.staff_state = 0 AND sl.leave_date IS NOT NULL AND sl.leave_date >= DATE_FORMAT(#{time}, '%Y-01-01'))) |
| | | </if> |
| | | <if test="userName != null and userName != ''"> |
| | | and u.staff_name like concat('%', #{userName}, '%') |
| | |
| | | GROUP_CONCAT(s.work_time, 'ï¼', IFNULL(palc.shift, ''), 'ï¼', s.id order by s.work_time SEPARATOR ';') AS shift_time, u.id user_id |
| | | FROM personal_shift s |
| | | LEFT JOIN staff_on_job u ON u.id = s.staff_on_job_id |
| | | LEFT JOIN staff_leave sl ON sl.staff_on_job_id = u.id |
| | | LEFT JOIN personal_attendance_location_config palc ON palc.id = s.personal_attendance_location_config_id |
| | | <where> |
| | | <if test="time != null and time != ''"> |
| | | and DATE_FORMAT(s.work_time, '%Y-%m') = DATE_FORMAT(#{time}, '%Y-%m' ) |
| | | AND (u.staff_state = 1 OR (u.staff_state = 0 AND sl.leave_date IS NOT NULL AND sl.leave_date >= DATE_FORMAT(#{time}, '%Y-%m-01'))) |
| | | </if> |
| | | <if test="userName != null and userName != ''"> |
| | | and u.staff_name like concat('%', #{userName}, '%') |
| | |
| | | </where> |
| | | GROUP BY u.id |
| | | order by s.create_time |
| | | </select> |
| | | |
| | | <select id="existsAttendanceUsedByConfig" resultType="boolean"> |
| | | SELECT EXISTS ( |
| | | SELECT 1 |
| | | FROM personal_shift ps |
| | | INNER JOIN personal_attendance_records par |
| | | ON par.staff_on_job_id = ps.staff_on_job_id |
| | | AND par.date = DATE(ps.work_time) |
| | | WHERE ps.personal_attendance_location_config_id = #{configId} |
| | | ) |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | create_time DESC |
| | | </select> |
| | | |
| | | <!-- æ ¹æ®é¨é¨IDæ¥è¯¢ææ°ç¤¾ä¿æ¹æ¡ --> |
| | | <select id="selectLatestSchemeByDeptId" resultType="com.ruoyi.staff.pojo.SchemeApplicableStaff"> |
| | | SELECT |
| | | <include refid="schemeColumns"/> |
| | | FROM |
| | | scheme_applicable_staff |
| | | WHERE |
| | | 1 = 1 |
| | | AND FIND_IN_SET(#{deptId}, dept_ids) |
| | | ORDER BY |
| | | create_time DESC |
| | | LIMIT 1 |
| | | </select> |
| | | |
| | | <!-- æ¥è¯¢æ¹æ¡å¯¹åºçæç» --> |
| | | <select id="selectDetailBySchemeId" resultType="com.ruoyi.staff.pojo.SchemeInsuranceDetail"> |
| | | SELECT |
| | |
| | | soj.emergency_contact as emergencyContact, |
| | | soj.emergency_contact_phone as emergencyContactPhone, |
| | | sp.post_name as postName, |
| | | sd.dept_name as deptName, |
| | | se.education as first_study, |
| | | se.major as profession |
| | | sd.dept_name as deptName |
| | | FROM staff_leave |
| | | LEFT JOIN staff_on_job soj ON soj.id = staff_leave.staff_on_job_id |
| | | LEFT JOIN sys_post sp ON sp.post_id = soj.sys_post_id |
| | | LEFT JOIN sys_dept sd ON sd.dept_id = soj.sys_dept_id |
| | | LEFT JOIN staff_education se ON se.staff_on_job_id = staff_leave.staff_on_job_id |
| | | AND se.id = ( |
| | | SELECT MAX(se2.id) |
| | | FROM staff_education se2 |
| | | WHERE se2.staff_on_job_id = staff_leave.staff_on_job_id |
| | | ) |
| | | WHERE 1=1 |
| | | LEFT JOIN |
| | | staff_on_job soj ON soj.id = staff_leave.staff_on_job_id |
| | | LEFT JOIN |
| | | sys_post sp ON sp.post_id = soj.sys_post_id |
| | | LEFT JOIN |
| | | sys_dept sd ON sd.dept_id = soj.sys_dept_id |
| | | where 1=1 |
| | | <if test="c.staffName != null and c.staffName != '' "> |
| | | AND soj.staff_name LIKE CONCAT('%',#{c.staffName},'%') |
| | | </if> |
| | | order by staff_leave.create_time desc |
| | | </select> |
| | | <select id="staffLeaveList" resultType="com.ruoyi.staff.dto.StaffLeaveDto"> |
| | | SELECT |
| | |
| | | sys_post sp ON sp.post_id = soj.sys_post_id |
| | | LEFT JOIN |
| | | sys_dept sd ON sd.dept_id = soj.sys_dept_id |
| | | <where> |
| | | <if test="c.staffName != null and c.staffName != '' "> |
| | | AND soj.staff_name LIKE CONCAT('%',#{c.staffName},'%') |
| | | </if> |
| | | </where> |
| | | order by staff_leave.create_time desc |
| | | where 1=1 |
| | | <if test="c.staffName != null and c.staffName != '' "> |
| | | AND soj.staff_name LIKE CONCAT('%',#{c.staffName},'%') |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="staffLeaveReasonAnalytics" resultType="com.ruoyi.staff.dto.StaffLeaveDto"> |
| | |
| | | <mapper namespace="com.ruoyi.staff.mapper.StaffOnJobMapper"> |
| | | <select id="staffOnJobListPage" resultType="com.ruoyi.staff.dto.StaffOnJobDto"> |
| | | SELECT |
| | | staff_on_job.id, |
| | | staff_on_job.staff_state, |
| | | staff_on_job.staff_no, |
| | | staff_on_job.staff_name, |
| | | staff_on_job.sex, |
| | | staff_on_job.native_place, |
| | | staff_on_job.sys_post_id, |
| | | staff_on_job.sys_dept_id, |
| | | staff_on_job.role_id, |
| | | staff_on_job.adress, |
| | | staff_on_job.first_study, |
| | | staff_on_job.profession, |
| | | staff_on_job.identity_card, |
| | | staff_on_job.age, |
| | | staff_on_job.phone, |
| | | staff_on_job.contract_term, |
| | | staff_on_job.contract_expire_time, |
| | | staff_on_job.trial_end_date, |
| | | staff_on_job.trial_start_date, |
| | | staff_on_job.sign_date, |
| | | staff_on_job.salary_select, |
| | | staff_on_job.pro_salary, |
| | | staff_on_job.date_select, |
| | | staff_on_job.remark, |
| | | staff_on_job.create_time, |
| | | staff_on_job.create_user, |
| | | staff_on_job.update_time, |
| | | staff_on_job.update_user, |
| | | staff_on_job.tenant_id, |
| | | staff_on_job.alias, |
| | | staff_on_job.birth_date, |
| | | staff_on_job.nation, |
| | | staff_on_job.marital_status, |
| | | staff_on_job.pro_term, |
| | | staff_on_job.positive_date, |
| | | staff_on_job.basic_salary, |
| | | staff_on_job.dept_id, |
| | | sp.post_name AS post_name, |
| | | sd.dept_name AS dept_name, |
| | | MIN(t1.contract_start_time) AS contract_start_time, |
| | | MAX(t1.contract_end_time) AS contract_end_time, |
| | | ( |
| | | SELECT GROUP_CONCAT(sec.contact_name SEPARATOR ',') |
| | | FROM staff_emergency_contact sec |
| | | WHERE sec.staff_on_job_id = staff_on_job.id |
| | | ) AS emergency_contact, |
| | | ( |
| | | SELECT GROUP_CONCAT(sec.contact_phone SEPARATOR ',') |
| | | FROM staff_emergency_contact sec |
| | | WHERE sec.staff_on_job_id = staff_on_job.id |
| | | ) AS emergency_contact_phone |
| | | staff_on_job.*, |
| | | sp.post_name as postName, |
| | | sd.dept_name as deptName, |
| | | MIN(t1.contract_start_time) as contract_start_time, -- åææ©ååå¼å§æ¶é´ |
| | | MAX(t1.contract_end_time) as contract_end_time |
| | | FROM staff_on_job |
| | | LEFT JOIN sys_post sp ON sp.post_id = staff_on_job.sys_post_id |
| | | LEFT JOIN sys_dept sd ON sd.dept_id = staff_on_job.sys_dept_id |
| | | LEFT JOIN staff_contract AS t1 ON t1.staff_on_job_id = staff_on_job.id |
| | | <where> |
| | | <if test="staffOnJob.staffState != null"> |
| | | AND staff_on_job.staff_state = #{staffOnJob.staffState} |
| | | </if> |
| | | <if test="staffOnJob.staffName != null and staffOnJob.staffName != '' "> |
| | | AND staff_on_job.staff_name LIKE CONCAT('%',#{staffOnJob.staffName},'%') |
| | | </if> |
| | | <if test="staffOnJob.entryDateStart != null and staffOnJob.entryDateStart != '' "> |
| | | AND staff_on_job.contract_expire_time >= DATE_FORMAT(#{staffOnJob.entryDateStart},'%Y-%m-%d') |
| | | </if> |
| | | <if test="staffOnJob.entryDateEnd != null and staffOnJob.entryDateEnd != '' "> |
| | | AND staff_on_job.contract_expire_time <= DATE_FORMAT(#{staffOnJob.entryDateEnd},'%Y-%m-%d') |
| | | </if> |
| | | <if test="staffOnJob.sysDeptId != null"> |
| | | AND staff_on_job.sys_dept_id = #{staffOnJob.sysDeptId} |
| | | </if> |
| | | </where> |
| | | GROUP BY staff_on_job.id |
| | | <if test="staffOnJob.contractStartTime != null"> |
| | | HAVING MIN(t1.contract_start_time) = #{staffOnJob.contractStartTime} |
| | | LEFT JOIN staff_contract as t1 ON t1.staff_on_job_id = staff_on_job.id |
| | | WHERE 1=1 |
| | | <if test="staffOnJob.staffState != null"> |
| | | AND staff_state = #{staffOnJob.staffState} |
| | | </if> |
| | | order by staff_on_job.create_time desc |
| | | <if test="staffOnJob.staffName != null and staffOnJob.staffName != '' "> |
| | | AND staff_name LIKE CONCAT('%',#{staffOnJob.staffName},'%') |
| | | </if> |
| | | <if test="staffOnJob.entryDateStart != null and staffOnJob.entryDateStart != '' "> |
| | | AND contract_expire_time >= DATE_FORMAT(#{staffOnJob.entryDateStart},'%Y-%m-%d') |
| | | </if> |
| | | <if test="staffOnJob.entryDateEnd != null and staffOnJob.entryDateEnd != '' "> |
| | | AND contract_expire_time <= DATE_FORMAT(#{staffOnJob.entryDateEnd},'%Y-%m-%d') |
| | | </if> |
| | | GROUP BY staff_on_job.id |
| | | </select> |
| | | <select id="staffOnJobList" resultType="com.ruoyi.staff.dto.StaffOnJobDto"> |
| | | SELECT |
| | |
| | | sys_post sp ON sp.post_id = staff_on_job.sys_post_id |
| | | LEFT JOIN |
| | | sys_dept sd ON sd.dept_id = staff_on_job.sys_dept_id |
| | | <where> |
| | | <if test="staffOnJob.staffState != null"> |
| | | AND staff_state = #{staffOnJob.staffState} |
| | | </if> |
| | | <if test="staffOnJob.staffName != null and staffOnJob.staffName != '' "> |
| | | AND staff_name LIKE CONCAT('%',#{staffOnJob.staffName},'%') |
| | | </if> |
| | | </where> |
| | | order by staff_on_job.create_time desc |
| | | where 1=1 |
| | | <if test="staffOnJob.staffState != null"> |
| | | AND staff_state = #{staffOnJob.staffState} |
| | | </if> |
| | | <if test="staffOnJob.staffName != null and staffOnJob.staffName != '' "> |
| | | AND staff_name LIKE CONCAT('%',#{staffOnJob.staffName},'%') |
| | | </if> |
| | | </select> |
| | | <!-- ç»è®¡æå®æ¥æçå¨èåå·¥æ° --> |
| | | <select id="countOnJobStaffByDate" resultType="java.lang.Integer"> |
| | |
| | | <result column="update_user" property="updateUser" /> |
| | | </resultMap> |
| | | |
| | | <select id="selectIssuedDeptIds" resultType="java.lang.String"> |
| | | SELECT DISTINCT dept_ids |
| | | FROM staff_salary_main |
| | | WHERE salary_month = #{salaryMonth} |
| | | AND status = 5 |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | pm.unit, |
| | | u.nick_name as createBy, |
| | | CASE |
| | | WHEN TRIM(sir.record_type) = '7' THEN |
| | | WHEN #{params.topParentProductId} = 3 AND TRIM(sir.record_type) = '7' THEN |
| | | COALESCE(pl_by_product.purchase_contract_number, pl_direct.purchase_contract_number) |
| | | WHEN TRIM(sir.record_type) = '10' THEN |
| | | WHEN #{params.topParentProductId} = 3 AND TRIM(sir.record_type) = '10' THEN |
| | | pl_by_quality.purchase_contract_number |
| | | WHEN #{params.topParentProductId} = 276 THEN |
| | | WHEN #{params.topParentProductId} = 1 THEN |
| | | CASE |
| | | WHEN TRIM(sir.record_type) IN ('14', '15') THEN |
| | | sl_return.sales_contract_no |
| | |
| | | and p.id in (select id from product_tree) |
| | | </if> |
| | | </where> |
| | | order by sir.id desc |
| | | order by sir.create_time desc |
| | | </select> |
| | | <select id="listStockInRecordExportData" resultType="com.ruoyi.stock.execl.StockInRecordExportData"> |
| | | SELECT |
| | |
| | | and sir.record_type = #{params.recordType} |
| | | </if> |
| | | </where> |
| | | order by sir.id desc |
| | | order by sir.create_time desc |
| | | </select> |
| | | <select id="listPageAccountPurchase" resultType="com.ruoyi.account.bean.vo.purchase.PurchaseInboundVo"> |
| | | SELECT |
| | |
| | | product_model_id, |
| | | MAX(create_time) as create_time, |
| | | MAX(update_time) as update_time, |
| | | MAX(warn_num) as warn_num, |
| | | SUM(warn_num) as warn_num, |
| | | MAX(version) as version, |
| | | model, |
| | | MAX(remark) as remark, |
| | |
| | | unit, |
| | | product_name, |
| | | product_id |
| | | order by combined.create_time desc |
| | | </select> |
| | | |
| | | <select id="listStockInventoryExportData" resultType="com.ruoyi.stock.execl.StockInventoryExportData"> |
| | |
| | | su.nick_name as create_by |
| | | from |
| | | stock_in_record sir |
| | | left join ( |
| | | select product_model_id, sum(qualitity) as qualitity |
| | | from stock_inventory |
| | | group by product_model_id |
| | | ) si on sir.product_model_id = si.product_model_id |
| | | left join stock_inventory si on sir.batch_no = si.batch_no |
| | | left join product_model pm on sir.product_model_id = pm.id |
| | | left join product p on pm.product_id = p.id |
| | | left join sys_user su on sir.create_user = su.user_id |
| | |
| | | and sir.create_time <= #{ew.endMonth} |
| | | </if> |
| | | </where> |
| | | order by sir.id desc |
| | | order by sir.create_time desc |
| | | </select> |
| | | |
| | | <select id="stockInAndOutRecord" resultType="com.ruoyi.stock.dto.StockInventoryDto"> |
| | |
| | | and p.id in (select id from product_tree) |
| | | </if> |
| | | </where> |
| | | order by sor.id desc |
| | | order by sor.create_time desc |
| | | </select> |
| | | <select id="listStockOutRecordExportData" resultType="com.ruoyi.stock.execl.StockOutRecordExportData"> |
| | | SELECT |
| | |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="staffCount" column="staff_count" /> |
| | | </resultMap> |
| | | |
| | | |
| | | <sql id="selectDeptVo"> |
| | | select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time |
| | | select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time |
| | | from sys_dept d |
| | | </sql> |
| | | |
| | |
| | | <!-- æ°æ®èå´è¿æ»¤ --> |
| | | ${params.dataScope} |
| | | group by d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time |
| | | order by d.parent_id asc, d.order_num asc, d.create_time desc |
| | | order by d.parent_id, d.order_num |
| | | </select> |
| | | |
| | | |
| | | <select id="selectDeptListByRoleId" resultType="java.lang.Long"> |
| | | select d.dept_id |
| | | from sys_dept d |
| | |
| | | <if test="deptCheckStrictly"> |
| | | and d.dept_id not in (select d.parent_id from sys_dept d inner join sys_role_dept rd on d.dept_id = rd.dept_id and rd.role_id = #{roleId}) |
| | | </if> |
| | | order by d.parent_id asc, d.order_num asc, d.create_time desc |
| | | order by d.parent_id, d.order_num |
| | | </select> |
| | | |
| | | |
| | | <select id="selectDeptById" parameterType="Long" resultMap="SysDeptResult"> |
| | | select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, |
| | | (select dept_name from sys_dept where dept_id = d.parent_id) parent_name, |
| | | d.dept_nick |
| | | from sys_dept d |
| | | where d.dept_id = #{deptId} |
| | | order by d.create_time desc |
| | | </select> |
| | | |
| | | |
| | | <select id="checkDeptExistUser" parameterType="Long" resultType="int"> |
| | | select count(1) from sys_user_dept where dept_id = #{deptId} |
| | | </select> |
| | | |
| | | |
| | | <select id="hasChildByDeptId" parameterType="Long" resultType="int"> |
| | | select count(1) from sys_dept |
| | | where del_flag = '0' and parent_id = #{deptId} limit 1 |
| | | </select> |
| | | |
| | | |
| | | <select id="selectChildrenDeptById" parameterType="Long" resultMap="SysDeptResult"> |
| | | select * from sys_dept where find_in_set(#{deptId}, ancestors) |
| | | </select> |
| | | |
| | | |
| | | <select id="selectNormalChildrenDeptById" parameterType="Long" resultType="int"> |
| | | select count(*) from sys_dept where status = 0 and del_flag = '0' and find_in_set(#{deptId}, ancestors) |
| | | </select> |
| | | |
| | | |
| | | <select id="checkDeptNameUnique" resultMap="SysDeptResult"> |
| | | <include refid="selectDeptVo"/> |
| | | where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0' order by d.create_time desc limit 1 |
| | | where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0' limit 1 |
| | | </select> |
| | | |
| | | |
| | | <insert id="insertDept" parameterType="com.ruoyi.project.system.domain.SysDept"> |
| | | insert into sys_dept( |
| | | <if test="deptId != null and deptId != 0">dept_id,</if> |
| | |
| | | sysdate() |
| | | ) |
| | | </insert> |
| | | |
| | | |
| | | <update id="updateDept" parameterType="com.ruoyi.project.system.domain.SysDept"> |
| | | update sys_dept |
| | | <set> |
| | |
| | | </set> |
| | | where dept_id = #{deptId} |
| | | </update> |
| | | |
| | | |
| | | <update id="updateDeptChildren" parameterType="java.util.List"> |
| | | update sys_dept set ancestors = |
| | | <foreach collection="depts" item="item" index="index" |
| | |
| | | #{item.deptId} |
| | | </foreach> |
| | | </update> |
| | | |
| | | |
| | | <update id="updateDeptStatusNormal" parameterType="Long"> |
| | | update sys_dept set status = '0' where dept_id in |
| | | update sys_dept set status = '0' where dept_id in |
| | | <foreach collection="array" item="deptId" open="(" separator="," close=")"> |
| | | #{deptId} |
| | | </foreach> |
| | | </update> |
| | | |
| | | |
| | | <delete id="deleteDeptById" parameterType="Long"> |
| | | update sys_dept set del_flag = '2' where dept_id = #{deptId} |
| | | </delete> |
| | |
| | | WHERE parent_id = 100; |
| | | </select> |
| | | |
| | | </mapper> |
| | | </mapper> |
| | |
| | | <result property="updateBy" column="update_by" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | </resultMap> |
| | | |
| | | |
| | | <sql id="selectDictTypeVo"> |
| | | select dict_id, dict_name, dict_type, status, create_by, create_time, remark |
| | | select dict_id, dict_name, dict_type, status, create_by, create_time, remark |
| | | from sys_dict_type |
| | | </sql> |
| | | |
| | |
| | | and date_format(create_time,'%Y%m%d') <= date_format(#{params.endTime},'%Y%m%d') |
| | | </if> |
| | | </where> |
| | | order by create_time desc |
| | | </select> |
| | | |
| | | |
| | | <select id="selectDictTypeAll" resultMap="SysDictTypeResult"> |
| | | <include refid="selectDictTypeVo"/> |
| | | </select> |
| | | |
| | | |
| | | <select id="selectDictTypeById" parameterType="Long" resultMap="SysDictTypeResult"> |
| | | <include refid="selectDictTypeVo"/> |
| | | where dict_id = #{dictId} |
| | | </select> |
| | | |
| | | |
| | | <select id="selectDictTypeByType" parameterType="String" resultMap="SysDictTypeResult"> |
| | | <include refid="selectDictTypeVo"/> |
| | | where dict_type = #{dictType} |
| | | </select> |
| | | |
| | | |
| | | <select id="checkDictTypeUnique" parameterType="String" resultMap="SysDictTypeResult"> |
| | | <include refid="selectDictTypeVo"/> |
| | | where dict_type = #{dictType} limit 1 |
| | | </select> |
| | | |
| | | |
| | | <delete id="deleteDictTypeById" parameterType="Long"> |
| | | delete from sys_dict_type where dict_id = #{dictId} |
| | | </delete> |
| | | |
| | | |
| | | <delete id="deleteDictTypeByIds" parameterType="Long"> |
| | | delete from sys_dict_type where dict_id in |
| | | <foreach collection="array" item="dictId" open="(" separator="," close=")"> |
| | | #{dictId} |
| | | </foreach> |
| | | </foreach> |
| | | </delete> |
| | | |
| | | <update id="updateDictType" parameterType="com.ruoyi.project.system.domain.SysDictType"> |
| | |
| | | </set> |
| | | where dict_id = #{dictId} |
| | | </update> |
| | | |
| | | |
| | | <insert id="insertDictType" parameterType="com.ruoyi.project.system.domain.SysDictType"> |
| | | insert into sys_dict_type( |
| | | <if test="dictName != null and dictName != ''">dict_name,</if> |
| | |
| | | sysdate() |
| | | ) |
| | | </insert> |
| | | |
| | | </mapper> |
| | | |
| | | </mapper> |
| | |
| | | <result property="noticeType" column="notice_type" /> |
| | | <result property="noticeContent" column="notice_content" /> |
| | | <result property="status" column="status" /> |
| | | <result property="senderId" column="sender_id" /> |
| | | <result property="consigneeId" column="consignee_id" /> |
| | | <result property="jumpPath" column="jump_path" /> |
| | | <result property="appJumpPath" column="app_jump_path" /> |
| | | <result property="createBy" column="create_by" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateBy" column="update_by" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="remark" column="remark" /> |
| | | <result property="tenantId" column="tenant_id" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectNoticeVo"> |
| | |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="remark" column="remark" /> |
| | | </resultMap> |
| | | |
| | | |
| | | <sql id="selectPostVo"> |
| | | select post_id, post_code, post_name, post_sort, status, create_by, create_time, remark |
| | | select post_id, post_code, post_name, post_sort, status, create_by, create_time, remark |
| | | from sys_post |
| | | </sql> |
| | | |
| | | |
| | | <select id="selectPostList" parameterType="com.ruoyi.project.system.domain.SysPost" resultMap="SysPostResult"> |
| | | <include refid="selectPostVo"/> |
| | | <where> |
| | |
| | | AND post_name like concat('%', #{postName}, '%') |
| | | </if> |
| | | </where> |
| | | order by create_time desc |
| | | </select> |
| | | |
| | | |
| | | <select id="selectPostAll" resultMap="SysPostResult"> |
| | | <include refid="selectPostVo"/> |
| | | </select> |
| | | |
| | | |
| | | <select id="selectPostById" parameterType="Long" resultMap="SysPostResult"> |
| | | <include refid="selectPostVo"/> |
| | | where post_id = #{postId} |
| | | </select> |
| | | |
| | | |
| | | <select id="selectPostListByUserId" parameterType="Long" resultType="Long"> |
| | | select p.post_id |
| | | from sys_post p |
| | |
| | | left join sys_user u on u.user_id = up.user_id |
| | | where u.user_id = #{userId} |
| | | </select> |
| | | |
| | | |
| | | <select id="selectPostsByUserName" parameterType="String" resultMap="SysPostResult"> |
| | | select p.post_id, p.post_name, p.post_code |
| | | from sys_post p |
| | |
| | | left join sys_user u on u.user_id = up.user_id |
| | | where u.user_name = #{userName} |
| | | </select> |
| | | |
| | | |
| | | <select id="checkPostNameUnique" parameterType="String" resultMap="SysPostResult"> |
| | | <include refid="selectPostVo"/> |
| | | where post_name=#{postName} limit 1 |
| | | </select> |
| | | |
| | | |
| | | <select id="checkPostCodeUnique" parameterType="String" resultMap="SysPostResult"> |
| | | <include refid="selectPostVo"/> |
| | | where post_code=#{postCode} limit 1 |
| | | </select> |
| | | |
| | | |
| | | <update id="updatePost" parameterType="com.ruoyi.project.system.domain.SysPost"> |
| | | update sys_post |
| | | <set> |
| | |
| | | </set> |
| | | where post_id = #{postId} |
| | | </update> |
| | | |
| | | |
| | | <insert id="insertPost" parameterType="com.ruoyi.project.system.domain.SysPost" useGeneratedKeys="true" keyProperty="postId"> |
| | | insert into sys_post( |
| | | <if test="postId != null and postId != 0">post_id,</if> |
| | |
| | | sysdate() |
| | | ) |
| | | </insert> |
| | | |
| | | |
| | | <delete id="deletePostById" parameterType="Long"> |
| | | delete from sys_post where post_id = #{postId} |
| | | </delete> |
| | | |
| | | |
| | | <delete id="deletePostByIds" parameterType="Long"> |
| | | delete from sys_post where post_id in |
| | | <foreach collection="array" item="postId" open="(" separator="," close=")"> |
| | | #{postId} |
| | | </foreach> |
| | | </foreach> |
| | | </delete> |
| | | |
| | | </mapper> |
| | | </mapper> |
| src/main/resources/mapper/system/SysRoleMapper.xml
src/main/resources/mapper/system/SysUserMapper.xml
src/main/resources/mapper/technology/TechnologyOperationMapper.xml
src/main/resources/mapper/technology/TechnologyOperationParamMapper.xml
src/main/resources/mapper/warehouse/DocumentationBorrowManagementMapper.xml
src/main/resources/mapper/warehouse/DocumentationMapper.xml
src/main/resources/mapper/warehouse/DocumentationReturnManagementMapper.xml
src/main/resources/mapper/warehouse/WarehouseGoodsShelvesRowcolMapper.xml |