| src/main/java/com/ruoyi/account/bean/dto/AccountDto.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/main/java/com/ruoyi/account/bean/dto/AccountDto2.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/main/java/com/ruoyi/account/bean/dto/AccountDto3.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/main/java/com/ruoyi/account/bean/dto/AccountReportDto.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/main/java/com/ruoyi/account/bean/vo/AccountReportVo.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/main/java/com/ruoyi/account/controller/AccountingController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/main/java/com/ruoyi/account/service/AccountingService.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/main/java/com/ruoyi/account/service/impl/AccountingServiceImpl.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/main/java/com/ruoyi/production/service/impl/ProductionProductMainServiceImpl.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/main/resources/mapper/production/ProductionOperationTaskMapper.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/main/java/com/ruoyi/account/bean/dto/AccountDto.java
ÎļþÒÑɾ³ý src/main/java/com/ruoyi/account/bean/dto/AccountDto2.java
ÎļþÒÑɾ³ý src/main/java/com/ruoyi/account/bean/dto/AccountDto3.java
ÎļþÒÑɾ³ý src/main/java/com/ruoyi/account/bean/dto/AccountReportDto.java
ÎļþÃû´Ó src/main/java/com/ruoyi/account/bean/dto/ReportDateDto.java ÐÞ¸Ä @@ -1,17 +1,16 @@ package com.ruoyi.account.bean.dto; 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.time.LocalDate; /** * @author :yys * @date : 2026/1/16 16:57 */ @Data public class ReportDateDto { @Schema(name = "AccountReportDto", description = "è´¢å¡æ¥è¡¨--æ¥æåæ°") public class AccountReportDto { /** * å¼å§æ¶é´ @@ -26,15 +25,5 @@ @JsonFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd") private LocalDate entryDateEnd; /** * å¼å§æä»½ */ private Integer startMonth; /** * ç»ææä»½ */ private Integer endMonth; } src/main/java/com/ruoyi/account/bean/vo/AccountReportVo.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,28 @@ package com.ruoyi.account.bean.vo; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import java.math.BigDecimal; @Data @Schema(name = "AccountReportVo", description = "è´¢å¡æ¥è¡¨--è¿ååæ°") public class AccountReportVo { @Schema(description = "æ»è¥æ¶") private BigDecimal totalIncome; @Schema(description = "æ»æ¯åº") private BigDecimal totalExpense; @Schema(description = "æ»æ¶å ¥ç¬æ°") private Integer incomeNumber; @Schema(description = "æ»æ¯åºç¬æ°") private Integer expenseNumber; @Schema(description = "åæ¶å ¥") private BigDecimal netRevenue; } src/main/java/com/ruoyi/account/controller/AccountingController.java
@@ -1,12 +1,16 @@ package com.ruoyi.account.controller; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ruoyi.account.service.impl.AccountingServiceImpl; import com.ruoyi.account.bean.dto.AccountReportDto; import com.ruoyi.account.service.AccountingService; 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 io.swagger.v3.oas.annotations.tags.Tag; import com.ruoyi.framework.web.domain.R; import io.swagger.v3.oas.annotations.Operation; import lombok.AllArgsConstructor; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; @@ -19,11 +23,11 @@ @Tag(name = "ä¼è®¡æ ¸ç®") @RestController @RequestMapping("/accounting") @AllArgsConstructor @RequiredArgsConstructor public class AccountingController extends BaseController { private AccountingServiceImpl accountingService; private final AccountingService accountingService; @Operation(summary = "æ»è®¡") @GetMapping("/total") @@ -43,4 +47,14 @@ return accountingService.calculateDepreciation(page,year); } /*****************************************è´¢å¡æ¥è¡¨******************************************************************************/ @GetMapping("/accountStatementDetailsByMonth") @Log(title = "ç»è®¡æ»åºæ¶+æ»æ¯åº+æ»æ¶å ¥ç¬æ°+æ»æ¯åºç¬æ°+åæ¶å ¥", businessType = BusinessType.OTHER) @Operation(summary = "è´¢å¡æ¥è¡¨--ç»è®¡æ»åºæ¶+æ»æ¯åº+æ»æ¶å ¥ç¬æ°+æ»æ¯åºç¬æ°+åæ¶å ¥") public R getAccountStatementDetailsByMonth(AccountReportDto accountReportDto) { return R.ok(accountingService.getAccountStatementDetailsByMonth(accountReportDto)); } } src/main/java/com/ruoyi/account/service/AccountingService.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,19 @@ package com.ruoyi.account.service; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ruoyi.account.bean.dto.AccountReportDto; import com.ruoyi.account.bean.vo.AccountReportVo; import com.ruoyi.framework.web.domain.AjaxResult; public interface AccountingService { AjaxResult total(Integer year); AjaxResult deviceTypeDistribution(Integer year); AjaxResult calculateDepreciation(Page page, Integer year); AccountReportVo getAccountStatementDetailsByMonth(AccountReportDto accountReportDto); } src/main/java/com/ruoyi/account/service/impl/AccountingServiceImpl.java
@@ -3,9 +3,17 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ruoyi.account.bean.dto.AccountReportDto; import com.ruoyi.account.bean.dto.DeviceTypeDetail; import com.ruoyi.account.bean.dto.DeviceTypeDistributionVO; import com.ruoyi.account.bean.vo.AccountReportVo; import com.ruoyi.account.mapper.purchase.AccountPurchasePaymentMapper; import com.ruoyi.account.mapper.sales.AccountSalesCollectionMapper; import com.ruoyi.account.pojo.purchase.AccountPurchasePayment; import com.ruoyi.account.pojo.sales.AccountSalesCollection; import com.ruoyi.account.service.AccountingService; import com.ruoyi.device.mapper.DeviceLedgerMapper; import com.ruoyi.device.pojo.DeviceLedger; import com.ruoyi.framework.web.domain.AjaxResult; @@ -33,13 +41,17 @@ @Service @Slf4j @RequiredArgsConstructor public class AccountingServiceImpl { public class AccountingServiceImpl implements AccountingService { private final DeviceLedgerMapper deviceLedgerMapper; private final CustomStorageMapper customStorageMapper; private final ProcurementRecordMapper procurementRecordMapper; private final ProcurementRecordOutMapper procurementRecordOutMapper; private final AccountSalesCollectionMapper accountSalesCollectionMapper; private final AccountPurchasePaymentMapper accountPurchasePaymentMapper; @Override public AjaxResult total(Integer year) { Map<String,Object> map = new HashMap<>(); map.put("deprAmount",0); // ææ§éé¢ @@ -233,6 +245,7 @@ return totalDepreciation.setScale(2, BigDecimal.ROUND_HALF_UP); } @Override public AjaxResult deviceTypeDistribution(Integer year) { // 2. ç»è£ è¿åVO DeviceTypeDistributionVO vo = new DeviceTypeDistributionVO(); @@ -256,6 +269,7 @@ return AjaxResult.success(vo); } @Override public AjaxResult calculateDepreciation(Page page, Integer year) { LambdaQueryWrapper<DeviceLedger> deviceLedgerLambdaQueryWrapper = new LambdaQueryWrapper<>(); deviceLedgerLambdaQueryWrapper.like(DeviceLedger::getCreateTime,year) @@ -267,4 +281,24 @@ } return AjaxResult.success(deviceLedgerIPage); } @Override public AccountReportVo getAccountStatementDetailsByMonth(AccountReportDto accountReportDto) { AccountReportVo accountReportVo = new AccountReportVo(); //æ»è¥æ¶=æ¶æ¬¾åæ»éé¢ //æ»æ¶å ¥ç¬æ°=æ¶æ¬¾åæ»ç¬æ° List<AccountSalesCollection> accountSalesCollections = accountSalesCollectionMapper.selectList(Wrappers.<AccountSalesCollection>lambdaQuery() .between(AccountSalesCollection::getCollectionDate, accountReportDto.getEntryDateStart(), accountReportDto.getEntryDateEnd())); accountReportVo.setTotalIncome(accountSalesCollections.stream().map(AccountSalesCollection::getCollectionAmount).reduce(BigDecimal.ZERO, BigDecimal::add)); accountReportVo.setIncomeNumber(accountSalesCollections.size()); //æ»æ¯åº=仿¬¾åæ»éé¢ //æ»æ¯åºç¬æ°=仿¬¾åæ»ç¬æ° List<AccountPurchasePayment> accountPurchasePayments = accountPurchasePaymentMapper.selectList(Wrappers.<AccountPurchasePayment>lambdaQuery() .between(AccountPurchasePayment::getPaymentDate, accountReportDto.getEntryDateStart(), accountReportDto.getEntryDateEnd())); accountReportVo.setTotalExpense(accountPurchasePayments.stream().map(AccountPurchasePayment::getPaymentAmount).reduce(BigDecimal.ZERO, BigDecimal::add)); accountReportVo.setExpenseNumber(accountPurchasePayments.size()); //å婿¶¦=æ»è¥æ¶-æ»æ¯åº accountReportVo.setNetRevenue(accountReportVo.getTotalIncome().subtract(accountReportVo.getTotalExpense())); return accountReportVo; } } src/main/java/com/ruoyi/production/service/impl/ProductionProductMainServiceImpl.java
@@ -401,7 +401,7 @@ productionAccount.setSchedulingUserId(user == null ? null : user.getUserId()); productionAccount.setSchedulingUserName(user == null ? dto.getUserName() : user.getNickName()); productionAccount.setFinishedNum(productQty); productionAccount.setWorkHours(technologyOperation.getSalaryQuota()); productionAccount.setWorkHours(technologyOperation != null ? technologyOperation.getSalaryQuota() : null); productionAccount.setTechnologyOperationName(technologyOperation == null ? null : technologyOperation.getName()); productionAccount.setSchedulingDate(LocalDateTime.now()); productionAccountMapper.insert(productionAccount); src/main/resources/mapper/production/ProductionOperationTaskMapper.xml
@@ -110,7 +110,7 @@ select poro.operation_name as processName, sum(ifnull(ppi.input_quantity, 0)) as totalInput, sum(ifnull(ppo.scrap_qty, 0)) as totalScrap, sum(ifnull(ppo.quantity, 0) - ifnull(ppo.scrap_qty, 0)) as totalOutput sum(greatest(ifnull(ppo.quantity, 0) - ifnull(ppo.scrap_qty, 0), 0)) as totalOutput from production_product_output ppo inner join production_product_main ppm on ppo.production_product_main_id = ppm.id inner join production_operation_task pot on ppm.production_operation_task_id = pot.id