| | |
| | | </properties>
|
| | |
|
| | | <dependencies>
|
| | | <!-- ruoyi-springboot2 / swagger knife4j é
ç½® -->
|
| | | <dependency>
|
| | | <groupId>com.github.xiaoymin</groupId>
|
| | | <artifactId>knife4j-spring-boot-starter</artifactId>
|
| | | <version>3.0.3</version>
|
| | | </dependency>
|
| | |
|
| | | <!-- SpringBoot æ ¸å¿å
-->
|
| | | <dependency>
|
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.production.controller; |
| | | |
| | | 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.production.dto.SalesLedgerProductionAccountingDto; |
| | | import com.ruoyi.production.pojo.SalesLedgerProductionAccounting; |
| | | import com.ruoyi.production.service.impl.SalesLedgerProductionAccountingServiceImpl; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * @author :yys |
| | | * @date : 2025/7/21 14:43 |
| | | */ |
| | | @RestController |
| | | @Api(tags = "çäº§æ ¸ç®") |
| | | @RequestMapping("/salesLedger/productionAccounting") |
| | | public class SalesLedgerProductionAccountingController extends BaseController { |
| | | |
| | | @Autowired |
| | | private SalesLedgerProductionAccountingServiceImpl salesLedgerProductionAccountingService; |
| | | |
| | | @GetMapping("/listPage") |
| | | @ApiOperation("çäº§æ ¸ç®-å页æ¥è¯¢") |
| | | @Log(title = "çäº§æ ¸ç®-å页æ¥è¯¢", businessType = BusinessType.OTHER) |
| | | public AjaxResult listPage(Page page, SalesLedgerProductionAccountingDto salesLedgerProductionAccountingDto) { |
| | | IPage<SalesLedgerProductionAccountingDto> list = salesLedgerProductionAccountingService.listPage(page, salesLedgerProductionAccountingDto); |
| | | return AjaxResult.success(list); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.production.controller; |
| | | |
| | | 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.dto.ProcurementDto; |
| | | import com.ruoyi.production.dto.ProcessSchedulingDto; |
| | | import com.ruoyi.production.dto.ProductionDispatchAddDto; |
| | | import com.ruoyi.production.dto.SalesLedgerSchedulingDto; |
| | | import com.ruoyi.production.dto.SalesLedgerSchedulingProcessDto; |
| | | import com.ruoyi.production.service.impl.SalesLedgerSchedulingServiceImpl; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author :yys |
| | | * @date : 2025/7/21 14:43 |
| | | */ |
| | | @RestController |
| | | @Api(tags = "ç产订å") |
| | | @RequestMapping("/salesLedger/scheduling") |
| | | public class SalesLedgerSchedulingController extends BaseController { |
| | | |
| | | @Autowired |
| | | private SalesLedgerSchedulingServiceImpl salesLedgerSchedulingService; |
| | | |
| | | |
| | | @GetMapping("/listPage") |
| | | @Log(title = "ç产管ç-ç产订å-å页æ¥è¯¢", businessType = BusinessType.OTHER) |
| | | @ApiOperation("ç产管ç-ç产订å-å页æ¥è¯¢") |
| | | public AjaxResult listPage(Page page, SalesLedgerSchedulingDto salesLedgerSchedulingDto) { |
| | | IPage<SalesLedgerSchedulingDto> result = salesLedgerSchedulingService.listPage(page,salesLedgerSchedulingDto); |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | /** |
| | | * å¯¼åº |
| | | * @param response |
| | | */ |
| | | @PostMapping("/export") |
| | | @ApiOperation("ç产管ç-ç产订å-导åº") |
| | | public void export(HttpServletResponse response) { |
| | | salesLedgerSchedulingService.export(response); |
| | | } |
| | | |
| | | @PostMapping("/productionDispatch") |
| | | @Log(title = "ç产管ç-ç产订å-ç产派工", businessType = BusinessType.INSERT) |
| | | @ApiOperation("ç产管ç-ç产订å-ç产派工") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult productionDispatch(@RequestBody ProductionDispatchAddDto productionDispatchAddDto) { |
| | | int result = salesLedgerSchedulingService.productionDispatch(productionDispatchAddDto); |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | @GetMapping("/listPageProcess") |
| | | @Log(title = "ç产管ç-å·¥åºæäº§-å页æ¥è¯¢", businessType = BusinessType.OTHER) |
| | | @ApiOperation("ç产管ç-å·¥åºæäº§-å页æ¥è¯¢") |
| | | public AjaxResult listPageProcess(Page page, SalesLedgerSchedulingProcessDto salesLedgerSchedulingDto) { |
| | | IPage<SalesLedgerSchedulingProcessDto> result = salesLedgerSchedulingService.listPageProcess(page,salesLedgerSchedulingDto); |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | |
| | | @DeleteMapping("/productionDispatchDelete") |
| | | @Log(title = "ç产管ç-å·¥åºæäº§-åæ¶æäº§", businessType = BusinessType.DELETE) |
| | | @ApiOperation("ç产管ç-å·¥åºæäº§-åæ¶æäº§") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult productionDispatchDelete(@RequestBody List<Long> ids) { |
| | | int result = salesLedgerSchedulingService.productionDispatchDelete(ids); |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/processScheduling") |
| | | @Log(title = "ç产管ç-å·¥åºæäº§", businessType = BusinessType.INSERT) |
| | | @ApiOperation("ç产管ç-å·¥åºæäº§") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult processScheduling(@RequestBody List<ProcessSchedulingDto> processSchedulingDto) { |
| | | int result = salesLedgerSchedulingService.processScheduling(processSchedulingDto); |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.production.controller; |
| | | |
| | | 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.production.dto.ProcessSchedulingDto; |
| | | import com.ruoyi.production.dto.ProductionReportDto; |
| | | import com.ruoyi.production.dto.SalesLedgerWorkDto; |
| | | import com.ruoyi.production.pojo.SalesLedgerWork; |
| | | import com.ruoyi.production.service.SalesLedgerWorkService; |
| | | import com.ruoyi.production.service.impl.SalesLedgerWorkServiceImpl; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author :yys |
| | | * @date : 2025/7/21 14:43 |
| | | */ |
| | | @RestController |
| | | @Api(tags = "ç产æ¥å·¥(æäº§è®°å½)") |
| | | @RequestMapping("/salesLedger/work") |
| | | public class SalesLedgerWorkController extends BaseController { |
| | | |
| | | |
| | | @Autowired |
| | | private SalesLedgerWorkServiceImpl salesLedgerWorkService; |
| | | |
| | | @GetMapping("/listPage") |
| | | @Log(title = "ç产æ¥å·¥-å页æ¥è¯¢", businessType = BusinessType.OTHER) |
| | | @ApiOperation("ç产æ¥å·¥-å页æ¥è¯¢") |
| | | public AjaxResult listPage(Page page, SalesLedgerWorkDto salesLedgerWorkDto) { |
| | | IPage<SalesLedgerWorkDto> listPage = salesLedgerWorkService.listPage(page, salesLedgerWorkDto); |
| | | return AjaxResult.success(listPage); |
| | | } |
| | | |
| | | @GetMapping("/list") |
| | | @Log(title = "ç产æ¥å·¥-æ¥è¯¢", businessType = BusinessType.OTHER) |
| | | @ApiOperation("ç产æ¥å·¥-æ¥è¯¢") |
| | | public AjaxResult list(@RequestParam("id") Long id) { |
| | | List<ProductionReportDto> list = salesLedgerWorkService.getList(id); |
| | | return AjaxResult.success(list); |
| | | } |
| | | |
| | | @PostMapping("/productionReport") |
| | | @Log(title = "ç产管ç-ç产æ¥å·¥", businessType = BusinessType.INSERT) |
| | | @ApiOperation("ç产管ç-ç产æ¥å·¥") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult productionReport(@RequestBody ProductionReportDto productionReportDto) { |
| | | int result = salesLedgerWorkService.productionReport(productionReportDto); |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/productionReportUpdate") |
| | | @Log(title = "ç产管ç-ç产æ¥å·¥-ä¿®æ¹", businessType = BusinessType.UPDATE) |
| | | @ApiOperation("ç产管ç-ç产æ¥å·¥-ä¿®æ¹") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult productionReportUpdate(@RequestBody ProductionReportDto productionReportDto) { |
| | | int result = salesLedgerWorkService.productionReportUpdate(productionReportDto); |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.production.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * @author :yys |
| | | * @date : 2025/7/22 9:19 |
| | | */ |
| | | @Data |
| | | @ApiModel |
| | | public class ProcessSchedulingDto { |
| | | |
| | | private Long id; |
| | | |
| | | /** |
| | | * æäº§äººid |
| | | */ |
| | | @ApiModelProperty(value = "æäº§äººid") |
| | | private Long schedulingUserId; |
| | | |
| | | |
| | | /** |
| | | * æäº§æ°é |
| | | */ |
| | | @ApiModelProperty(value = "æäº§æ°é") |
| | | private BigDecimal schedulingNum; |
| | | |
| | | |
| | | /** |
| | | * å·¥æ¶å®é¢ |
| | | */ |
| | | @ApiModelProperty(value = "å·¥æ¶å®é¢") |
| | | private BigDecimal workHours; |
| | | |
| | | /** |
| | | * å·¥åº |
| | | */ |
| | | @ApiModelProperty(value = "å·¥åº") |
| | | private String process; |
| | | /** |
| | | * æäº§æ¥æ |
| | | */ |
| | | @ApiModelProperty(value = "æäº§æ¥æ") |
| | | private String schedulingDate; |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.production.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * @author :yys |
| | | * @date : 2025/7/21 16:28 |
| | | */ |
| | | @Data |
| | | @ApiModel |
| | | public class ProductionDispatchAddDto { |
| | | |
| | | @ApiModelProperty(value = "éå®å°è´¦ID") |
| | | private Long salesLedgerId; |
| | | |
| | | @ApiModelProperty(value = "éå®äº§åID") |
| | | private Long salesLedgerProductId; |
| | | |
| | | /** |
| | | * æäº§æ°é |
| | | */ |
| | | @ApiModelProperty(value = "æäº§æ°é") |
| | | private BigDecimal schedulingNum; |
| | | |
| | | /** |
| | | * æäº§äºº |
| | | */ |
| | | @ApiModelProperty(value = "æäº§äºº") |
| | | private Long schedulingUserId; |
| | | |
| | | /** |
| | | * æäº§æ¥æ |
| | | */ |
| | | @ApiModelProperty(value = "æäº§æ¥æ") |
| | | private String schedulingDate; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.production.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * @author :yys |
| | | * @date : 2025/7/22 10:24 |
| | | */ |
| | | @Data |
| | | @ApiModel |
| | | public class ProductionReportDto { |
| | | |
| | | private Long id; |
| | | /** |
| | | * æäº§äººid |
| | | */ |
| | | @ApiModelProperty(value = "ç产人id") |
| | | private Long schedulingUserId; |
| | | |
| | | /** |
| | | * æäº§æ°é |
| | | */ |
| | | private BigDecimal schedulingNum; |
| | | |
| | | /** |
| | | * ç产æ°é |
| | | */ |
| | | @ApiModelProperty(value = "ç产æ°é") |
| | | private BigDecimal finishedNum; |
| | | |
| | | /** |
| | | * çäº§æ¥æ |
| | | */ |
| | | @ApiModelProperty(value = "çäº§æ¥æ") |
| | | private String schedulingDate; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.production.dto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Excel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author :yys |
| | | * @date : 2025/7/22 9:35 |
| | | */ |
| | | @Data |
| | | @ApiModel |
| | | public class SalesLedgerProductDto { |
| | | |
| | | /** |
| | | * éå®ååå· |
| | | */ |
| | | @Excel(name = "éå®ååå·") |
| | | @ApiModelProperty(value = "éå®ååå·") |
| | | private String salesContractNo; |
| | | |
| | | /** |
| | | * 客æ·ååå· |
| | | */ |
| | | @Excel(name = "客æ·ååå·") |
| | | @ApiModelProperty(value = "客æ·ååå·") |
| | | private String customerContractNo; |
| | | |
| | | /** |
| | | * 项ç®åç§° |
| | | */ |
| | | @Excel(name = "项ç®åç§°") |
| | | @ApiModelProperty(value = "项ç®åç§°") |
| | | private String projectName; |
| | | |
| | | |
| | | /** |
| | | * 客æ·åç§° |
| | | */ |
| | | @Excel(name = "客æ·åç§°") |
| | | @ApiModelProperty(value = "客æ·åç§°") |
| | | private String customerName; |
| | | |
| | | |
| | | /** |
| | | * 产å大类 |
| | | */ |
| | | @Excel(name = "产å大类") |
| | | @ApiModelProperty(value = "产å大类") |
| | | private String productCategory; |
| | | |
| | | /** |
| | | * è§æ ¼åå· |
| | | */ |
| | | @Excel(name = "è§æ ¼åå·") |
| | | @ApiModelProperty(value = "è§æ ¼åå·") |
| | | private String specificationModel; |
| | | |
| | | /** |
| | | * åä½ |
| | | */ |
| | | @Excel(name = "åä½") |
| | | @ApiModelProperty(value = "åä½") |
| | | private String unit; |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.production.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * @author :yys |
| | | * @date : 2025/7/22 13:55 |
| | | */ |
| | | @Data |
| | | @ApiModel |
| | | public class SalesLedgerProductionAccountingDto extends SalesLedgerProductDto{ |
| | | |
| | | /** |
| | | * ç产人id |
| | | */ |
| | | @ApiModelProperty(value = "ç产人id") |
| | | private Long schedulingUserId; |
| | | |
| | | /** |
| | | * æäº§äººåç§° |
| | | */ |
| | | @ApiModelProperty(value = "ç产人åç§°") |
| | | private String schedulingUserName; |
| | | |
| | | |
| | | /** |
| | | * å·¥èµ |
| | | */ |
| | | @ApiModelProperty(value = "å·¥èµ") |
| | | private BigDecimal wages; |
| | | |
| | | /** |
| | | * ç产æ°é |
| | | */ |
| | | @ApiModelProperty(value = "ç产æ°é") |
| | | private BigDecimal finishedNum; |
| | | |
| | | /** |
| | | * å·¥æ¶å®é¢ |
| | | */ |
| | | @ApiModelProperty(value = "å·¥æ¶å®é¢") |
| | | private BigDecimal workHours; |
| | | |
| | | /** |
| | | * å·¥åº |
| | | */ |
| | | @ApiModelProperty(value = "å·¥åº") |
| | | private String process; |
| | | /** |
| | | * æäº§æ¥æ |
| | | */ |
| | | @ApiModelProperty(value = "æäº§æ¥æ") |
| | | private String schedulingDate; |
| | | |
| | | @ApiModelProperty(value = "å¼å§æ¶é´") |
| | | private String schedulingDateStart; |
| | | @ApiModelProperty(value = "ç»ææ¶é´") |
| | | private String schedulingDateEnd; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.production.dto; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Excel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDate; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author :yys |
| | | * @date : 2025/7/21 15:42 |
| | | */ |
| | | @Data |
| | | @ApiModel |
| | | public class SalesLedgerSchedulingDto { |
| | | |
| | | @ApiModelProperty(value = "éå®äº§åID") |
| | | private Long salesLedgerProductId; |
| | | |
| | | @ApiModelProperty(value = "éå®å°è´¦ID") |
| | | private Long salesLedgerId; |
| | | |
| | | /** |
| | | * éå®ååå· |
| | | */ |
| | | @Excel(name = "éå®ååå·") |
| | | @ApiModelProperty(value = "éå®ååå·") |
| | | private String salesContractNo; |
| | | |
| | | /** |
| | | * 客æ·ååå· |
| | | */ |
| | | @Excel(name = "客æ·ååå·") |
| | | @ApiModelProperty(value = "客æ·ååå·") |
| | | private String customerContractNo; |
| | | |
| | | /** |
| | | * 项ç®åç§° |
| | | */ |
| | | @Excel(name = "项ç®åç§°") |
| | | @ApiModelProperty(value = "项ç®åç§°") |
| | | private String projectName; |
| | | |
| | | /** |
| | | * å½å
¥æ¥æ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "å½å
¥æ¥æ", width = 30, dateFormat = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @ApiModelProperty(value = "å½å
¥æ¥æ") |
| | | private Date entryDate; |
| | | |
| | | @ApiModelProperty(value = "å½å
¥æ¥æå¼å§") |
| | | private String entryDateStart; |
| | | |
| | | @ApiModelProperty(value = "å½å
¥æ¥æç»æ") |
| | | private String entryDateEnd; |
| | | |
| | | /** |
| | | * 客æ·åç§° |
| | | */ |
| | | @Excel(name = "客æ·åç§°") |
| | | @ApiModelProperty(value = "客æ·åç§°") |
| | | private String customerName; |
| | | |
| | | |
| | | /** |
| | | * 产å大类 |
| | | */ |
| | | @Excel(name = "产å大类") |
| | | @ApiModelProperty(value = "产å大类") |
| | | private String productCategory; |
| | | |
| | | /** |
| | | * è§æ ¼åå· |
| | | */ |
| | | @Excel(name = "è§æ ¼åå·") |
| | | @ApiModelProperty(value = "è§æ ¼åå·") |
| | | private String specificationModel; |
| | | |
| | | /** |
| | | * åä½ |
| | | */ |
| | | @Excel(name = "åä½") |
| | | @ApiModelProperty(value = "åä½") |
| | | private String unit; |
| | | |
| | | /** |
| | | * æ°é |
| | | */ |
| | | @Excel(name = "æ°é") |
| | | @ApiModelProperty(value = "æ°é") |
| | | private BigDecimal quantity; |
| | | |
| | | /** |
| | | * æäº§æ°é |
| | | */ |
| | | @Excel(name = "æäº§æ°é") |
| | | @ApiModelProperty(value = "æäº§æ°é") |
| | | private BigDecimal schedulingNum; |
| | | |
| | | /** |
| | | * å®å·¥æ°é |
| | | */ |
| | | @Excel(name = "å®å·¥æ°é") |
| | | @ApiModelProperty(value = "å®å·¥æ°é") |
| | | private BigDecimal successNum; |
| | | |
| | | @ApiModelProperty(value = "ç§æ·ID") |
| | | private Long tenantId; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.production.dto; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Excel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author :yys |
| | | * @date : 2025/7/21 16:47 |
| | | */ |
| | | @Data |
| | | @ApiModel |
| | | public class SalesLedgerSchedulingProcessDto { |
| | | |
| | | @ApiModelProperty(value = "éå®äº§åID") |
| | | private Long salesLedgerProductId; |
| | | |
| | | @ApiModelProperty(value = "éå®å°è´¦ID") |
| | | private Long salesLedgerId; |
| | | |
| | | @ApiModelProperty(value = "å¼å§æ¶é´") |
| | | private String schedulingDateStart; |
| | | |
| | | @ApiModelProperty(value = "ç»ææ¶é´") |
| | | private String schedulingDateEnd; |
| | | |
| | | /** |
| | | * id |
| | | */ |
| | | private Long id; |
| | | |
| | | /** |
| | | * éå®ååå· |
| | | */ |
| | | @Excel(name = "éå®ååå·") |
| | | @ApiModelProperty(value = "éå®ååå·") |
| | | private String salesContractNo; |
| | | |
| | | /** |
| | | * 客æ·ååå· |
| | | */ |
| | | @Excel(name = "客æ·ååå·") |
| | | @ApiModelProperty(value = "客æ·ååå·") |
| | | private String customerContractNo; |
| | | |
| | | /** |
| | | * 项ç®åç§° |
| | | */ |
| | | @Excel(name = "项ç®åç§°") |
| | | @ApiModelProperty(value = "项ç®åç§°") |
| | | private String projectName; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "æ´¾å·¥æ¥æ", width = 30, dateFormat = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @ApiModelProperty(value = "æ´¾å·¥æ¥æ") |
| | | private Date schedulingDate; |
| | | |
| | | /** |
| | | * 客æ·åç§° |
| | | */ |
| | | @Excel(name = "客æ·åç§°") |
| | | @ApiModelProperty(value = "客æ·åç§°") |
| | | private String customerName; |
| | | |
| | | |
| | | /** |
| | | * 产å大类 |
| | | */ |
| | | @Excel(name = "产å大类") |
| | | @ApiModelProperty(value = "产å大类") |
| | | private String productCategory; |
| | | |
| | | /** |
| | | * è§æ ¼åå· |
| | | */ |
| | | @Excel(name = "è§æ ¼åå·") |
| | | @ApiModelProperty(value = "è§æ ¼åå·") |
| | | private String specificationModel; |
| | | |
| | | /** |
| | | * åä½ |
| | | */ |
| | | @Excel(name = "åä½") |
| | | @ApiModelProperty(value = "åä½") |
| | | private String unit; |
| | | |
| | | /** |
| | | * ç¶æ |
| | | */ |
| | | @Excel(name = "ç¶æ") |
| | | @ApiModelProperty(value = "ç¶æ") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 派工人 |
| | | */ |
| | | @Excel(name = "派工人") |
| | | @ApiModelProperty(value = "派工人") |
| | | private String schedulingUserName; |
| | | |
| | | /** |
| | | * 派工人 |
| | | */ |
| | | @ApiModelProperty(value = "派工人id") |
| | | private Long schedulingUserId; |
| | | |
| | | |
| | | /** |
| | | * æäº§æ°é |
| | | */ |
| | | @Excel(name = "æäº§æ°é") |
| | | @ApiModelProperty(value = "æäº§æ°é") |
| | | private BigDecimal schedulingNum; |
| | | |
| | | /** |
| | | * å·²æäº§æ°é |
| | | */ |
| | | @ApiModelProperty(value = "å·²æäº§æ°é") |
| | | private BigDecimal successNum; |
| | | |
| | | private Long tenantId; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.production.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDate; |
| | | |
| | | /** |
| | | * @author :yys |
| | | * @date : 2025/7/22 9:33 |
| | | */ |
| | | @Data |
| | | @ApiModel |
| | | public class SalesLedgerWorkDto extends SalesLedgerProductDto{ |
| | | |
| | | private Long id; |
| | | |
| | | /** |
| | | * æäº§äººid |
| | | */ |
| | | @ApiModelProperty(value = "æäº§äººid") |
| | | private Long schedulingUserId; |
| | | |
| | | /** |
| | | * æäº§äººåç§° |
| | | */ |
| | | @ApiModelProperty(value = "æäº§äººåç§°") |
| | | private String schedulingUserName; |
| | | |
| | | |
| | | /** |
| | | * æäº§æ°é |
| | | */ |
| | | @ApiModelProperty(value = "æäº§æ°é") |
| | | private BigDecimal schedulingNum; |
| | | |
| | | /** |
| | | * ç产æ°é |
| | | */ |
| | | @ApiModelProperty(value = "ç产æ°é") |
| | | private BigDecimal finishedNum; |
| | | |
| | | /** |
| | | * å·¥æ¶å®é¢ |
| | | */ |
| | | @ApiModelProperty(value = "å·¥æ¶å®é¢") |
| | | private BigDecimal workHours; |
| | | |
| | | /** |
| | | * å·¥åº |
| | | */ |
| | | @ApiModelProperty(value = "å·¥åº") |
| | | private String process; |
| | | /** |
| | | * æäº§æ¥æ |
| | | */ |
| | | @ApiModelProperty(value = "æäº§æ¥æ") |
| | | private String schedulingDate; |
| | | |
| | | @ApiModelProperty(value = "å¼å§æ¶é´") |
| | | private String schedulingDateStart; |
| | | @ApiModelProperty(value = "ç»ææ¶é´") |
| | | private String schedulingDateEnd; |
| | | |
| | | /** |
| | | * æ¥å·¥ç¶æï¼1-å¾
ç产 2-å·²æ¥å·¥ï¼ |
| | | */ |
| | | @ApiModelProperty(value = "æ¥å·¥ç¶æ") |
| | | private Integer status; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.production.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.production.dto.SalesLedgerProductionAccountingDto; |
| | | import com.ruoyi.production.pojo.SalesLedgerProductionAccounting; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * @author :yys |
| | | * @date : 2025/7/21 14:38 |
| | | */ |
| | | public interface SalesLedgerProductionAccountingMapper extends BaseMapper<SalesLedgerProductionAccounting> { |
| | | |
| | | |
| | | IPage<SalesLedgerProductionAccountingDto> listPage(Page page,@Param("salesLedgerDto") SalesLedgerProductionAccountingDto salesLedgerProductionAccountingDto); |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.production.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.production.dto.SalesLedgerSchedulingDto; |
| | | import com.ruoyi.production.dto.SalesLedgerSchedulingProcessDto; |
| | | import com.ruoyi.production.pojo.SalesLedgerScheduling; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author :yys |
| | | * @date : 2025/7/21 14:37 |
| | | */ |
| | | public interface SalesLedgerSchedulingMapper extends BaseMapper<SalesLedgerScheduling> { |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * @param page |
| | | * @param salesLedgerSchedulingDto |
| | | * @return |
| | | */ |
| | | IPage<SalesLedgerSchedulingDto> listPage(Page page,@Param("salesLedgerDto") SalesLedgerSchedulingDto salesLedgerSchedulingDto); |
| | | |
| | | /** |
| | | * å¯¼åº |
| | | * @return |
| | | */ |
| | | List<SalesLedgerSchedulingDto> list(); |
| | | |
| | | /** |
| | | * å页æ¥è¯¢å·¥åºæäº§ |
| | | * @param page |
| | | * @param salesLedgerSchedulingDto |
| | | * @return |
| | | */ |
| | | IPage<SalesLedgerSchedulingProcessDto> listPageProcess(Page page,@Param("salesLedgerDto") SalesLedgerSchedulingProcessDto salesLedgerSchedulingDto); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.production.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.production.dto.SalesLedgerWorkDto; |
| | | import com.ruoyi.production.pojo.SalesLedgerWork; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * @author :yys |
| | | * @date : 2025/7/21 14:37 |
| | | */ |
| | | public interface SalesLedgerWorkMapper extends BaseMapper<SalesLedgerWork> { |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * @param page |
| | | * @param salesLedgerWorkDto |
| | | * @return |
| | | */ |
| | | IPage<SalesLedgerWorkDto> listPage(Page page,@Param("salesLedgerDto") SalesLedgerWorkDto salesLedgerWorkDto); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.production.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * @author :yys |
| | | * @date : 2025/7/8 13:24 |
| | | */ |
| | | @TableName("sales_ledger_production_accounting") |
| | | @Data |
| | | @Builder |
| | | public class SalesLedgerProductionAccounting { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * éå®æäº§-æ¥å·¥è¡¨id |
| | | */ |
| | | private Long salesLedgerWorkId; |
| | | |
| | | /** |
| | | * éå®æäº§è¡¨id |
| | | */ |
| | | private Long salesLedgerSchedulingId; |
| | | |
| | | /** |
| | | * éå®å°è´¦id |
| | | */ |
| | | private Long salesLedgerId; |
| | | |
| | | /** |
| | | * éå®äº§åid |
| | | */ |
| | | private Long salesLedgerProductId; |
| | | |
| | | /** |
| | | * ç产人id |
| | | */ |
| | | private Long schedulingUserId; |
| | | |
| | | /** |
| | | * ç产人åç§° |
| | | */ |
| | | private String schedulingUserName; |
| | | |
| | | /** |
| | | * ç产æ°é |
| | | */ |
| | | private BigDecimal finishedNum; |
| | | |
| | | /** |
| | | * å·¥æ¶å®é¢ |
| | | */ |
| | | private BigDecimal workHours; |
| | | |
| | | /** |
| | | * å·¥åº |
| | | */ |
| | | private String process; |
| | | /** |
| | | * çäº§æ¥æ |
| | | */ |
| | | private LocalDate schedulingDate; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private Integer status; |
| | | |
| | | /** |
| | | * å建è
|
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | /** |
| | | * å建æ¶é´ |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | /** |
| | | * ä¿®æ¹è
|
| | | */ |
| | | @TableField(fill = FieldFill.UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | /** |
| | | * ä¿®æ¹æ¶é´ |
| | | */ |
| | | @TableField(fill = FieldFill.UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | /** |
| | | * ç§æ·ID |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long tenantId; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.production.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * @author :yys |
| | | * @date : 2025/7/8 13:24 |
| | | */ |
| | | @TableName("sales_ledger_scheduling") |
| | | @Data |
| | | @Builder |
| | | public class SalesLedgerScheduling { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * éå®å°è´¦id |
| | | */ |
| | | private Long salesLedgerId; |
| | | |
| | | /** |
| | | * éå®äº§åid |
| | | */ |
| | | private Long salesLedgerProductId; |
| | | |
| | | /** |
| | | * 派工人id |
| | | */ |
| | | private Long schedulingUserId; |
| | | |
| | | /** |
| | | * 派工人åç§° |
| | | */ |
| | | private String schedulingUserName; |
| | | |
| | | |
| | | /** |
| | | * æäº§æ°é |
| | | */ |
| | | private BigDecimal schedulingNum; |
| | | |
| | | /** |
| | | * å·²æäº§æ°é |
| | | */ |
| | | private BigDecimal finishedNum; |
| | | /** |
| | | * æ´¾å·¥æ¥æ |
| | | */ |
| | | private LocalDate schedulingDate; |
| | | |
| | | /** |
| | | * æäº§ç¶æï¼1-å¾
æäº§ 2-æäº§ä¸ 3-å·²æäº§ï¼ |
| | | */ |
| | | private Integer status; |
| | | |
| | | /** |
| | | * å建è
|
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | /** |
| | | * å建æ¶é´ |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | /** |
| | | * ä¿®æ¹è
|
| | | */ |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | /** |
| | | * ä¿®æ¹æ¶é´ |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | /** |
| | | * ç§æ·ID |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long tenantId; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.production.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * @author :yys |
| | | * @date : 2025/7/8 13:24 |
| | | */ |
| | | @TableName("sales_ledger_work") |
| | | @Data |
| | | @Builder |
| | | public class SalesLedgerWork { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * éå®æäº§è¡¨id |
| | | */ |
| | | private Long salesLedgerSchedulingId; |
| | | |
| | | /** |
| | | * éå®å°è´¦id |
| | | */ |
| | | private Long salesLedgerId; |
| | | |
| | | /** |
| | | * éå®äº§åid |
| | | */ |
| | | private Long salesLedgerProductId; |
| | | |
| | | /** |
| | | * æäº§äººid |
| | | */ |
| | | private Long schedulingUserId; |
| | | |
| | | /** |
| | | * æäº§äººåç§° |
| | | */ |
| | | private String schedulingUserName; |
| | | |
| | | |
| | | /** |
| | | * æäº§æ°é |
| | | */ |
| | | private BigDecimal schedulingNum; |
| | | |
| | | /** |
| | | * ç产æ°é |
| | | */ |
| | | private BigDecimal finishedNum; |
| | | |
| | | /** |
| | | * å·¥æ¶å®é¢ |
| | | */ |
| | | private BigDecimal workHours; |
| | | |
| | | /** |
| | | * å·¥åº |
| | | */ |
| | | private String process; |
| | | /** |
| | | * æäº§æ¥æ |
| | | */ |
| | | private LocalDate schedulingDate; |
| | | |
| | | /** |
| | | * æ¥å·¥ç¶æï¼1-å¾
ç产 2-çäº§ä¸ 3-å·²æ¥å·¥ï¼ |
| | | */ |
| | | private Integer status; |
| | | |
| | | /** |
| | | * å建è
|
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | |
| | | /** |
| | | * å建æ¶é´ |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | /** |
| | | * ä¿®æ¹è
|
| | | */ |
| | | @TableField(fill = FieldFill.UPDATE) |
| | | private Integer updateUser; |
| | | |
| | | /** |
| | | * ä¿®æ¹æ¶é´ |
| | | */ |
| | | @TableField(fill = FieldFill.UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | /** |
| | | * ç§æ·ID |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long tenantId; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.production.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.production.dto.SalesLedgerProductionAccountingDto; |
| | | import com.ruoyi.production.pojo.SalesLedgerProductionAccounting; |
| | | |
| | | /** |
| | | * @author :yys |
| | | * @date : 2025/7/21 14:39 |
| | | */ |
| | | public interface SalesLedgerProductionAccountingService extends IService<SalesLedgerProductionAccounting> { |
| | | |
| | | |
| | | IPage<SalesLedgerProductionAccountingDto> listPage(Page page, SalesLedgerProductionAccountingDto salesLedgerProductionAccountingDto); |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.production.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.production.dto.ProcessSchedulingDto; |
| | | import com.ruoyi.production.dto.ProductionDispatchAddDto; |
| | | import com.ruoyi.production.dto.SalesLedgerSchedulingDto; |
| | | import com.ruoyi.production.dto.SalesLedgerSchedulingProcessDto; |
| | | import com.ruoyi.production.pojo.SalesLedgerScheduling; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author :yys |
| | | * @date : 2025/7/21 14:39 |
| | | */ |
| | | public interface SalesLedgerSchedulingService extends IService<SalesLedgerScheduling> { |
| | | |
| | | IPage<SalesLedgerSchedulingDto> listPage(Page page, SalesLedgerSchedulingDto salesLedgerSchedulingDto); |
| | | |
| | | void export(HttpServletResponse response); |
| | | |
| | | int productionDispatch(ProductionDispatchAddDto productionDispatchAddDto); |
| | | |
| | | IPage<SalesLedgerSchedulingProcessDto> listPageProcess(Page page, SalesLedgerSchedulingProcessDto salesLedgerSchedulingDto); |
| | | |
| | | int productionDispatchDelete(List<Long> ids); |
| | | |
| | | int processScheduling(List<ProcessSchedulingDto> processSchedulingDto); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.production.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.production.dto.ProductionReportDto; |
| | | import com.ruoyi.production.dto.SalesLedgerWorkDto; |
| | | import com.ruoyi.production.pojo.SalesLedgerWork; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author :yys |
| | | * @date : 2025/7/21 14:38 |
| | | */ |
| | | public interface SalesLedgerWorkService extends IService<SalesLedgerWork> { |
| | | |
| | | IPage<SalesLedgerWorkDto> listPage(Page page, SalesLedgerWorkDto salesLedgerWorkDto); |
| | | |
| | | int productionReport(ProductionReportDto productionReportDto); |
| | | |
| | | int productionReportUpdate(ProductionReportDto productionReportDto); |
| | | |
| | | List<ProductionReportDto> getList(Long id); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.production.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.production.dto.SalesLedgerProductionAccountingDto; |
| | | import com.ruoyi.production.mapper.SalesLedgerProductionAccountingMapper; |
| | | import com.ruoyi.production.pojo.SalesLedgerProductionAccounting; |
| | | import com.ruoyi.production.service.SalesLedgerProductionAccountingService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @author :yys |
| | | * @date : 2025/7/21 14:41 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | @Slf4j |
| | | public class SalesLedgerProductionAccountingServiceImpl extends ServiceImpl<SalesLedgerProductionAccountingMapper, SalesLedgerProductionAccounting> implements SalesLedgerProductionAccountingService { |
| | | |
| | | private final SalesLedgerProductionAccountingMapper salesLedgerProductionAccountingMapper; |
| | | |
| | | @Override |
| | | public IPage<SalesLedgerProductionAccountingDto> listPage(Page page, SalesLedgerProductionAccountingDto salesLedgerProductionAccountingDto) { |
| | | IPage<SalesLedgerProductionAccountingDto> list = salesLedgerProductionAccountingMapper.listPage(page, salesLedgerProductionAccountingDto); |
| | | return list; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.production.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.procurementrecord.dto.ProcurementRecordOutPageDto; |
| | | import com.ruoyi.production.dto.ProcessSchedulingDto; |
| | | import com.ruoyi.production.dto.ProductionDispatchAddDto; |
| | | import com.ruoyi.production.dto.SalesLedgerSchedulingDto; |
| | | import com.ruoyi.production.dto.SalesLedgerSchedulingProcessDto; |
| | | import com.ruoyi.production.mapper.SalesLedgerSchedulingMapper; |
| | | import com.ruoyi.production.mapper.SalesLedgerWorkMapper; |
| | | import com.ruoyi.production.pojo.SalesLedgerScheduling; |
| | | import com.ruoyi.production.pojo.SalesLedgerWork; |
| | | import com.ruoyi.production.service.SalesLedgerSchedulingService; |
| | | import com.ruoyi.project.system.domain.SysUser; |
| | | import com.ruoyi.project.system.mapper.SysUserMapper; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDate; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @author :yys |
| | | * @date : 2025/7/21 14:41 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | @Slf4j |
| | | public class SalesLedgerSchedulingServiceImpl extends ServiceImpl<SalesLedgerSchedulingMapper, SalesLedgerScheduling> implements SalesLedgerSchedulingService { |
| | | |
| | | private final SalesLedgerSchedulingMapper salesLedgerSchedulingMapper; |
| | | |
| | | private final SalesLedgerWorkMapper salesLedgerWorkMapper; |
| | | |
| | | @Override |
| | | public IPage<SalesLedgerSchedulingDto> listPage(Page page, SalesLedgerSchedulingDto salesLedgerSchedulingDto) { |
| | | IPage<SalesLedgerSchedulingDto> list = salesLedgerSchedulingMapper.listPage(page, salesLedgerSchedulingDto); |
| | | if(list.getTotal() == 0){ |
| | | return list; |
| | | } |
| | | Set<Long> collect = list.getRecords().stream().map(SalesLedgerSchedulingDto::getSalesLedgerProductId).collect(Collectors.toSet()); |
| | | LambdaQueryWrapper<SalesLedgerWork> salesLedgerWorkLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | salesLedgerWorkLambdaQueryWrapper.in(SalesLedgerWork::getSalesLedgerProductId, collect) |
| | | .ne(SalesLedgerWork::getStatus, 1); |
| | | List<SalesLedgerWork> salesLedgerWorks = salesLedgerWorkMapper.selectList(salesLedgerWorkLambdaQueryWrapper); |
| | | list.getRecords().forEach(i -> { |
| | | // è·å宿æ°é |
| | | i.setSuccessNum(salesLedgerWorks |
| | | .stream() |
| | | .filter(j -> j.getSalesLedgerProductId().equals(i.getSalesLedgerProductId())) |
| | | .map(SalesLedgerWork::getFinishedNum) |
| | | .reduce(BigDecimal.ZERO, BigDecimal::add)); |
| | | }); |
| | | return list; |
| | | } |
| | | |
| | | @Override |
| | | public void export(HttpServletResponse response) { |
| | | List<SalesLedgerSchedulingDto> list = salesLedgerSchedulingMapper.list(); |
| | | if(CollectionUtils.isEmpty(list)){ |
| | | throw new RuntimeException("æ å¯¼åºæ°æ®"); |
| | | } |
| | | Set<Long> collect = list.stream().map(SalesLedgerSchedulingDto::getSalesLedgerProductId).collect(Collectors.toSet()); |
| | | LambdaQueryWrapper<SalesLedgerWork> salesLedgerWorkLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | salesLedgerWorkLambdaQueryWrapper.in(SalesLedgerWork::getSalesLedgerProductId, collect) |
| | | .ne(SalesLedgerWork::getStatus, 1); |
| | | List<SalesLedgerWork> salesLedgerWorks = salesLedgerWorkMapper.selectList(salesLedgerWorkLambdaQueryWrapper); |
| | | list.forEach(i -> { |
| | | // è·å宿æ°é |
| | | i.setSuccessNum(salesLedgerWorks |
| | | .stream() |
| | | .filter(j -> j.getSalesLedgerProductId().equals(i.getSalesLedgerProductId())) |
| | | .map(SalesLedgerWork::getFinishedNum) |
| | | .reduce(BigDecimal.ZERO, BigDecimal::add)); |
| | | }); |
| | | ExcelUtil<SalesLedgerSchedulingDto> util = new ExcelUtil<>(SalesLedgerSchedulingDto.class); |
| | | util.exportExcel(response, list, "ç产订å"); |
| | | } |
| | | |
| | | private final SysUserMapper sysUserMapper; |
| | | |
| | | @Override |
| | | public int productionDispatch(ProductionDispatchAddDto productionDispatchAddDto) { |
| | | SysUser sysUser = sysUserMapper.selectUserById(productionDispatchAddDto.getSchedulingUserId()); |
| | | if(sysUser == null) throw new RuntimeException("æäº§äººä¸åå¨"); |
| | | SalesLedgerScheduling salesLedgerScheduling = SalesLedgerScheduling.builder() |
| | | .salesLedgerId(productionDispatchAddDto.getSalesLedgerId()) |
| | | .salesLedgerProductId(productionDispatchAddDto.getSalesLedgerProductId()) |
| | | .schedulingUserId(productionDispatchAddDto.getSchedulingUserId()) |
| | | .schedulingUserName(sysUser.getNickName()) |
| | | .schedulingNum(productionDispatchAddDto.getSchedulingNum()) |
| | | .schedulingDate(LocalDate.parse(productionDispatchAddDto.getSchedulingDate(), DateTimeFormatter.ISO_LOCAL_DATE)) |
| | | .status(1) |
| | | .build(); |
| | | return salesLedgerSchedulingMapper.insert(salesLedgerScheduling); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<SalesLedgerSchedulingProcessDto> listPageProcess(Page page, SalesLedgerSchedulingProcessDto salesLedgerSchedulingDto) { |
| | | IPage<SalesLedgerSchedulingProcessDto> list = salesLedgerSchedulingMapper.listPageProcess(page, salesLedgerSchedulingDto); |
| | | Set<Long> collect = list.getRecords().stream().map(SalesLedgerSchedulingProcessDto::getSalesLedgerProductId).collect(Collectors.toSet()); |
| | | LambdaQueryWrapper<SalesLedgerWork> salesLedgerWorkLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | salesLedgerWorkLambdaQueryWrapper.in(SalesLedgerWork::getSalesLedgerProductId, collect) |
| | | .ne(SalesLedgerWork::getStatus, 1); |
| | | List<SalesLedgerWork> salesLedgerWorks = salesLedgerWorkMapper.selectList(salesLedgerWorkLambdaQueryWrapper); |
| | | list.getRecords().forEach(i -> { |
| | | // è·å宿æ°é |
| | | i.setSuccessNum(salesLedgerWorks |
| | | .stream() |
| | | .filter(j -> j.getSalesLedgerProductId().equals(i.getSalesLedgerProductId())) |
| | | .map(SalesLedgerWork::getFinishedNum) |
| | | .reduce(BigDecimal.ZERO, BigDecimal::add)); |
| | | }); |
| | | return list; |
| | | } |
| | | |
| | | @Override |
| | | public int productionDispatchDelete(List<Long> ids) { |
| | | LambdaQueryWrapper<SalesLedgerScheduling> salesLedgerSchedulingLambdaQueryWrapper = new LambdaQueryWrapper<SalesLedgerScheduling>(); |
| | | salesLedgerSchedulingLambdaQueryWrapper.in(SalesLedgerScheduling::getId, ids); |
| | | List<SalesLedgerScheduling> salesLedgerSchedulings = salesLedgerSchedulingMapper.selectList(salesLedgerSchedulingLambdaQueryWrapper); |
| | | if(CollectionUtils.isEmpty(salesLedgerSchedulings)) throw new RuntimeException("æäº§ä¸åå¨"); |
| | | List<SalesLedgerScheduling> collect = salesLedgerSchedulings.stream().filter(i -> !i.getStatus().equals(1)).collect(Collectors.toList()); |
| | | if(!CollectionUtils.isEmpty(collect)) throw new RuntimeException("æäº§å·²å¼å§ï¼è¯·å¿å é¤"); |
| | | salesLedgerSchedulingMapper.deleteBatchIds(ids); |
| | | return 0; |
| | | } |
| | | |
| | | @Override |
| | | public int processScheduling(List<ProcessSchedulingDto> processSchedulingDtos) { |
| | | for (ProcessSchedulingDto processSchedulingDto : processSchedulingDtos) { |
| | | SalesLedgerScheduling salesLedgerScheduling = salesLedgerSchedulingMapper.selectById(processSchedulingDto.getId()); |
| | | if(salesLedgerScheduling == null) throw new RuntimeException("æäº§ä¸åå¨"); |
| | | if(salesLedgerScheduling.getStatus().equals(3)) throw new RuntimeException("æäº§å·²å®æï¼è¯·å¿éå¤æäº§"); |
| | | SysUser sysUser = sysUserMapper.selectUserById(processSchedulingDto.getSchedulingUserId()); |
| | | if(sysUser == null) throw new RuntimeException("æäº§äººä¸åå¨"); |
| | | salesLedgerScheduling.setFinishedNum(salesLedgerScheduling.getFinishedNum().add(processSchedulingDto.getSchedulingNum())); |
| | | if(salesLedgerScheduling.getSchedulingNum().compareTo(salesLedgerScheduling.getFinishedNum()) <= 0){ |
| | | salesLedgerScheduling.setStatus(3); |
| | | }else{ |
| | | salesLedgerScheduling.setStatus(2); |
| | | } |
| | | salesLedgerSchedulingMapper.updateById(salesLedgerScheduling); |
| | | SalesLedgerWork.SalesLedgerWorkBuilder salesLedgerWorkBuilder = SalesLedgerWork.builder() |
| | | .salesLedgerSchedulingId(salesLedgerScheduling.getId()) |
| | | .salesLedgerId(salesLedgerScheduling.getSalesLedgerId()) |
| | | .salesLedgerProductId(salesLedgerScheduling.getSalesLedgerProductId()) |
| | | .schedulingUserId(salesLedgerScheduling.getSchedulingUserId()) |
| | | .schedulingUserName(sysUser.getNickName()) |
| | | .schedulingNum(processSchedulingDto.getSchedulingNum()) |
| | | .workHours(processSchedulingDto.getWorkHours()) |
| | | .process(processSchedulingDto.getProcess()) |
| | | .status(1) |
| | | .schedulingDate(LocalDate.parse(processSchedulingDto.getSchedulingDate(), DateTimeFormatter.ISO_LOCAL_DATE)); |
| | | salesLedgerWorkMapper.insert(salesLedgerWorkBuilder.build()); |
| | | } |
| | | return 0; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.production.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.production.dto.ProductionReportDto; |
| | | import com.ruoyi.production.dto.SalesLedgerWorkDto; |
| | | import com.ruoyi.production.mapper.SalesLedgerProductionAccountingMapper; |
| | | import com.ruoyi.production.mapper.SalesLedgerWorkMapper; |
| | | import com.ruoyi.production.pojo.SalesLedgerProductionAccounting; |
| | | import com.ruoyi.production.pojo.SalesLedgerWork; |
| | | import com.ruoyi.production.service.SalesLedgerProductionAccountingService; |
| | | import com.ruoyi.production.service.SalesLedgerWorkService; |
| | | import com.ruoyi.project.system.domain.SysUser; |
| | | import com.ruoyi.project.system.mapper.SysUserMapper; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @author :yys |
| | | * @date : 2025/7/21 14:40 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | @Slf4j |
| | | public class SalesLedgerWorkServiceImpl extends ServiceImpl<SalesLedgerWorkMapper, SalesLedgerWork> implements SalesLedgerWorkService { |
| | | |
| | | private final SalesLedgerWorkMapper salesLedgerWorkMapper; |
| | | |
| | | private final SysUserMapper sysUserMapper; |
| | | |
| | | private final SalesLedgerProductionAccountingMapper salesLedgerProductionAccountingMapper; |
| | | |
| | | @Override |
| | | public IPage<SalesLedgerWorkDto> listPage(Page page, SalesLedgerWorkDto salesLedgerWorkDto) { |
| | | IPage<SalesLedgerWorkDto> iPage = salesLedgerWorkMapper.listPage(page, salesLedgerWorkDto); |
| | | return iPage; |
| | | } |
| | | |
| | | @Override |
| | | public int productionReport(ProductionReportDto productionReportDto) { |
| | | SalesLedgerWork salesLedgerWork = salesLedgerWorkMapper.selectById(productionReportDto.getId()); |
| | | SysUser sysUser = sysUserMapper.selectUserById(productionReportDto.getSchedulingUserId()); |
| | | if (salesLedgerWork == null) throw new RuntimeException("æ¥å·¥æ°æ®ä¸åå¨"); |
| | | if (salesLedgerWork.getStatus() == 3) throw new RuntimeException("æ¥å·¥å·²å®æ"); |
| | | if (sysUser == null) throw new RuntimeException("ç产人ä¸åå¨"); |
| | | salesLedgerWork.setFinishedNum(salesLedgerWork.getFinishedNum().add(productionReportDto.getFinishedNum())); |
| | | if(salesLedgerWork.getSchedulingNum().compareTo(salesLedgerWork.getFinishedNum()) <= 0){ |
| | | salesLedgerWork.setStatus(3); |
| | | }else{ |
| | | salesLedgerWork.setStatus(2); |
| | | } |
| | | salesLedgerWorkMapper.updateById(salesLedgerWork); |
| | | // æ°å¢æ¥å·¥æ°æ® |
| | | SalesLedgerProductionAccounting.SalesLedgerProductionAccountingBuilder builder = SalesLedgerProductionAccounting.builder() |
| | | .salesLedgerWorkId(salesLedgerWork.getId()) |
| | | .salesLedgerSchedulingId(salesLedgerWork.getSalesLedgerSchedulingId()) |
| | | .salesLedgerId(salesLedgerWork.getSalesLedgerId()) |
| | | .salesLedgerProductId(salesLedgerWork.getSalesLedgerProductId()) |
| | | .schedulingUserId(sysUser.getUserId()) |
| | | .schedulingUserName(sysUser.getNickName()) |
| | | .finishedNum(productionReportDto.getFinishedNum()) |
| | | .workHours(salesLedgerWork.getWorkHours()) |
| | | .process(salesLedgerWork.getProcess()) |
| | | .schedulingDate(LocalDate.parse(productionReportDto.getSchedulingDate(), DateTimeFormatter.ISO_LOCAL_DATE)); |
| | | salesLedgerProductionAccountingMapper.insert(builder.build()); |
| | | return 0; |
| | | } |
| | | |
| | | @Override |
| | | public int productionReportUpdate(ProductionReportDto productionReportDto) { |
| | | SalesLedgerWork salesLedgerWork = salesLedgerWorkMapper.selectById(productionReportDto.getId()); |
| | | if(salesLedgerWork == null) throw new RuntimeException("æ¥å·¥æ°æ®ä¸åå¨"); |
| | | SysUser sysUser = sysUserMapper.selectUserById(productionReportDto.getSchedulingUserId()); |
| | | if(sysUser == null) throw new RuntimeException("ç产人ä¸åå¨"); |
| | | salesLedgerWork.setFinishedNum(productionReportDto.getFinishedNum()); |
| | | if(salesLedgerWork.getSchedulingNum().compareTo(salesLedgerWork.getFinishedNum()) <= 0){ |
| | | salesLedgerWork.setStatus(3); |
| | | }else{ |
| | | salesLedgerWork.setStatus(2); |
| | | } |
| | | salesLedgerWork.setSchedulingUserId(sysUser.getUserId()); |
| | | salesLedgerWork.setSchedulingUserName(sysUser.getNickName()); |
| | | salesLedgerWork.setSchedulingDate(LocalDate.parse(productionReportDto.getSchedulingDate(), DateTimeFormatter.ISO_LOCAL_DATE)); |
| | | salesLedgerWorkMapper.updateById(salesLedgerWork); |
| | | |
| | | // æ´æ°æ ¸ç®æ°æ® |
| | | LambdaQueryWrapper<SalesLedgerProductionAccounting> salesLedgerProductionAccountingLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | salesLedgerProductionAccountingLambdaQueryWrapper.eq(SalesLedgerProductionAccounting::getSalesLedgerWorkId, salesLedgerWork.getId()) |
| | | .orderByDesc(SalesLedgerProductionAccounting::getCreateTime) |
| | | .last("limit 1"); |
| | | SalesLedgerProductionAccounting salesLedgerProductionAccounting = salesLedgerProductionAccountingMapper.selectOne(salesLedgerProductionAccountingLambdaQueryWrapper); |
| | | if(salesLedgerProductionAccounting != null){ |
| | | salesLedgerProductionAccounting.setFinishedNum(productionReportDto.getFinishedNum()); |
| | | salesLedgerProductionAccounting.setSchedulingUserId(sysUser.getUserId()); |
| | | salesLedgerProductionAccounting.setSchedulingUserName(sysUser.getNickName()); |
| | | salesLedgerProductionAccounting.setSchedulingDate(LocalDate.parse(productionReportDto.getSchedulingDate(), DateTimeFormatter.ISO_LOCAL_DATE)); |
| | | salesLedgerProductionAccountingMapper.updateById(salesLedgerProductionAccounting); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | @Override |
| | | public List<ProductionReportDto> getList(Long id) { |
| | | SalesLedgerWork salesLedgerWork = salesLedgerWorkMapper.selectById(id); |
| | | if(salesLedgerWork == null) throw new RuntimeException("æ¥å·¥æ°æ®ä¸åå¨"); |
| | | LambdaQueryWrapper<SalesLedgerProductionAccounting> salesLedgerProductionAccountingLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | salesLedgerProductionAccountingLambdaQueryWrapper.eq(SalesLedgerProductionAccounting::getSalesLedgerWorkId, id); |
| | | List<SalesLedgerProductionAccounting> salesLedgerProductionAccountingList = salesLedgerProductionAccountingMapper.selectList(salesLedgerProductionAccountingLambdaQueryWrapper); |
| | | if(CollectionUtils.isEmpty(salesLedgerProductionAccountingList)) throw new RuntimeException("没æçäº§è®°å½æ°æ®"); |
| | | return salesLedgerProductionAccountingList.stream().map(salesLedgerProductionAccounting -> { |
| | | ProductionReportDto productionReportDto = new ProductionReportDto(); |
| | | BeanUtils.copyProperties(salesLedgerProductionAccounting, productionReportDto); |
| | | productionReportDto.setSchedulingDate(salesLedgerProductionAccounting.getSchedulingDate().format(DateTimeFormatter.ISO_LOCAL_DATE)); |
| | | productionReportDto.setSchedulingNum(salesLedgerWork.getSchedulingNum()); |
| | | return productionReportDto; |
| | | }).collect(Collectors.toList()); |
| | | } |
| | | } |
| | |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.other.mapper.TempFileMapper; |
| | | import com.ruoyi.other.pojo.TempFile; |
| | | import com.ruoyi.production.mapper.SalesLedgerSchedulingMapper; |
| | | import com.ruoyi.production.pojo.SalesLedgerScheduling; |
| | | import com.ruoyi.project.system.domain.SysDept; |
| | | import com.ruoyi.project.system.mapper.SysDeptMapper; |
| | | import com.ruoyi.sales.dto.MonthlyAmountDto; |
| | |
| | | private final ReceiptPaymentMapper receiptPaymentMapper; |
| | | |
| | | private final InvoiceLedgerMapper invoiceLedgerMapper; |
| | | |
| | | private final SalesLedgerSchedulingMapper salesLedgerSchedulingMapper; |
| | | |
| | | @Autowired |
| | | private SysDeptMapper sysDeptMapper; |
| | |
| | | List<Long> idList = Arrays.stream(ids) |
| | | .filter(Objects::nonNull) |
| | | .collect(Collectors.toList()); |
| | | |
| | | if (CollectionUtils.isEmpty(idList)) { |
| | | return 0; |
| | | } |
| | | // ç产订åæå¾
æäº§æ°æ®ï¼å°è´¦ä¸å¯å é¤ |
| | | LambdaQueryWrapper<SalesLedgerScheduling> salesLedgerSchedulingLambdaQueryWrapper = new LambdaQueryWrapper<SalesLedgerScheduling>() |
| | | .in(SalesLedgerScheduling::getSalesLedgerId, idList); |
| | | if (salesLedgerSchedulingMapper.selectCount(salesLedgerSchedulingLambdaQueryWrapper) > 0) { |
| | | throw new BaseException("ææäº§æ°æ®ï¼ä¸å¯å é¤"); |
| | | } |
| | | // 1. å
å é¤åè¡¨æ°æ® |
| | | LambdaQueryWrapper<SalesLedgerProduct> productWrapper = new LambdaQueryWrapper<>(); |
| | | productWrapper.in(SalesLedgerProduct::getSalesLedgerId, idList); |
| | | salesLedgerProductMapper.delete(productWrapper); |
| | | |
| | | // å é¤çäº§è®¢åæ°æ® |
| | | LambdaQueryWrapper<SalesLedgerScheduling> in = new LambdaQueryWrapper<SalesLedgerScheduling>() |
| | | .in(SalesLedgerScheduling::getSalesLedgerId, idList); |
| | | salesLedgerSchedulingMapper.delete(in); |
| | | // 2. åå é¤ä¸»è¡¨æ°æ® |
| | | return salesLedgerMapper.deleteBatchIds(idList); |
| | | } |
| | |
| | | # Swaggeré
ç½® |
| | | swagger: |
| | | # æ¯å¦å¼å¯swagger |
| | | enabled: false |
| | | enabled: true |
| | | # 请æ±åç¼ |
| | | pathMapping: /dev-api |
| | | |
| | |
| | | # Springé
ç½® |
| | | spring: |
| | | profiles: |
| | | active: prod |
| | | active: dev |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.production.mapper.SalesLedgerProductionAccountingMapper"> |
| | | |
| | | <select id="listPage" resultType="com.ruoyi.production.dto.SalesLedgerProductionAccountingDto"> |
| | | SELECT |
| | | t4.id, |
| | | t4.finished_num * t4.work_hours as wages, |
| | | t4.scheduling_user_id, |
| | | t4.scheduling_user_name, |
| | | t4.scheduling_date, |
| | | t4.finished_num, |
| | | t4.work_hours, |
| | | t4.process, |
| | | T1.sales_contract_no, |
| | | T1.customer_contract_no, |
| | | T1.project_name, |
| | | T1.customer_name, |
| | | t3.product_category, |
| | | t3.specification_model, |
| | | t3.unit |
| | | FROM |
| | | sales_ledger_production_accounting t4 |
| | | LEFT JOIN sales_ledger T1 ON T1.id = t4.sales_ledger_id |
| | | left join sales_ledger_product t3 on t4.sales_ledger_product_id = t3.id |
| | | <where> |
| | | 1 = 1 |
| | | <if test="salesLedgerDto.schedulingUserName != null and salesLedgerDto.schedulingUserName != '' "> |
| | | AND t4.scheduling_user_uame LIKE CONCAT('%',#{salesLedgerDto.schedulingUserName},'%') |
| | | </if> |
| | | <if test="salesLedgerDto.customerName != null and salesLedgerDto.customerName != '' "> |
| | | AND T1.customer_name LIKE CONCAT('%',#{salesLedgerDto.customerName},'%') |
| | | </if> |
| | | <if test="salesLedgerDto.customerContractNo != null and salesLedgerDto.customerContractNo !='' "> |
| | | AND T1.customer_contract_no LIKE CONCAT('%',#{salesLedgerDto.customerContractNo},'%') |
| | | </if> |
| | | <if test="salesLedgerDto.salesContractNo != null and salesLedgerDto.salesContractNo != '' "> |
| | | AND T1.sales_contract_no LIKE CONCAT('%',#{salesLedgerDto.salesContractNo},'%') |
| | | </if> |
| | | <if test="salesLedgerDto.projectName != null and salesLedgerDto.projectName != '' "> |
| | | AND T1.project_name LIKE CONCAT('%',#{salesLedgerDto.projectName},'%') |
| | | </if> |
| | | <if test="salesLedgerDto.schedulingDateStart != null and salesLedgerDto.schedulingDateStart != '' "> |
| | | AND t4.scheduling_date >= DATE_FORMAT(#{salesLedgerDto.entryDateStart},'%Y-%m-%d') |
| | | </if> |
| | | <if test="salesLedgerDto.schedulingDateEnd != null and salesLedgerDto.schedulingDateEnd != '' "> |
| | | AND t4.scheduling_date <= DATE_FORMAT(#{salesLedgerDto.entryDateEnd},'%Y-%m-%d') |
| | | </if> |
| | | </where> |
| | | group by t4.id |
| | | order by t4.update_time desc |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.production.mapper.SalesLedgerSchedulingMapper"> |
| | | |
| | | <select id="listPage" resultType="com.ruoyi.production.dto.SalesLedgerSchedulingDto"> |
| | | SELECT |
| | | T2.id as salesLedgerProductId, |
| | | T1.id as salesLedgerId, |
| | | ifNull(sum(t3.scheduling_num),0) AS schedulingNum, |
| | | T1.sales_contract_no, |
| | | T1.customer_contract_no, |
| | | T1.project_name, |
| | | T1.entry_date, |
| | | T1.customer_name, |
| | | T2.quantity, |
| | | T2.product_category, |
| | | T2.specification_model, |
| | | T2.unit |
| | | FROM |
| | | sales_ledger_product T2 |
| | | LEFT join sales_ledger_scheduling t3 on T2.id = t3.sales_ledger_product_id |
| | | LEFT JOIN sales_ledger T1 ON T1.id = T2.sales_ledger_id |
| | | <where> |
| | | T1.id is not null |
| | | <if test="salesLedgerDto.customerName != null and salesLedgerDto.customerName != '' "> |
| | | AND T1.customer_name LIKE CONCAT('%',#{salesLedgerDto.customerName},'%') |
| | | </if> |
| | | <if test="salesLedgerDto.customerContractNo != null and salesLedgerDto.customerContractNo !='' "> |
| | | AND T1.customer_contract_no LIKE CONCAT('%',#{salesLedgerDto.customerContractNo},'%') |
| | | </if> |
| | | <if test="salesLedgerDto.salesContractNo != null and salesLedgerDto.salesContractNo != '' "> |
| | | AND T1.sales_contract_no LIKE CONCAT('%',#{salesLedgerDto.salesContractNo},'%') |
| | | </if> |
| | | <if test="salesLedgerDto.projectName != null and salesLedgerDto.projectName != '' "> |
| | | AND T1.project_name LIKE CONCAT('%',#{salesLedgerDto.projectName},'%') |
| | | </if> |
| | | <if test="salesLedgerDto.entryDateStart != null and salesLedgerDto.entryDateStart != '' "> |
| | | AND T1.entry_date >= DATE_FORMAT(#{salesLedgerDto.entryDateStart},'%Y-%m-%d') |
| | | </if> |
| | | <if test="salesLedgerDto.entryDateEnd != null and salesLedgerDto.entryDateEnd != '' "> |
| | | AND T1.entry_date <= DATE_FORMAT(#{salesLedgerDto.entryDateEnd},'%Y-%m-%d') |
| | | </if> |
| | | </where> |
| | | GROUP BY T2.id |
| | | </select> |
| | | <select id="list" resultType="com.ruoyi.production.dto.SalesLedgerSchedulingDto"> |
| | | SELECT |
| | | T2.id, |
| | | ifNull(sum(t3.scheduling_num),0) AS schedulingNum, |
| | | T1.sales_contract_no, |
| | | T1.customer_contract_no, |
| | | T1.project_name, |
| | | T1.entry_date, |
| | | T1.customer_name, |
| | | T2.quantity, |
| | | T2.product_category, |
| | | T2.specification_model, |
| | | T2.unit |
| | | FROM |
| | | sales_ledger_product T2 |
| | | LEFT JOIN sales_ledger T1 ON T1.id = T2.sales_ledger_id |
| | | LEFT join sales_ledger_scheduling t3 on T1.id = t3.sales_ledger_id |
| | | where T1.id is not null |
| | | GROUP BY T2.id |
| | | </select> |
| | | <select id="listPageProcess" resultType="com.ruoyi.production.dto.SalesLedgerSchedulingProcessDto"> |
| | | SELECT |
| | | t3.id as salesLedgerProductId, |
| | | T1.id as salesLedgerId, |
| | | T2.id, |
| | | T2.status, |
| | | T2.scheduling_user_id, |
| | | T2.scheduling_user_name, |
| | | T2.scheduling_date, |
| | | ifNull(T2.scheduling_num,0) AS schedulingNum, |
| | | T1.sales_contract_no, |
| | | T1.customer_contract_no, |
| | | T1.project_name, |
| | | T1.customer_name, |
| | | t3.product_category, |
| | | t3.specification_model, |
| | | t3.unit |
| | | FROM |
| | | sales_ledger_scheduling T2 |
| | | LEFT JOIN sales_ledger T1 ON T1.id = T2.sales_ledger_id |
| | | left join sales_ledger_product t3 on T2.sales_ledger_product_id = t3.id |
| | | <where> |
| | | 1 = 1 |
| | | <if test="salesLedgerDto.status != null and salesLedgerDto.status != '' "> |
| | | AND T2.status = #{salesLedgerDto.status} |
| | | </if> |
| | | <if test="salesLedgerDto.customerName != null and salesLedgerDto.customerName != '' "> |
| | | AND T1.customer_name LIKE CONCAT('%',#{salesLedgerDto.customerName},'%') |
| | | </if> |
| | | <if test="salesLedgerDto.customerContractNo != null and salesLedgerDto.customerContractNo !='' "> |
| | | AND T1.customer_contract_no LIKE CONCAT('%',#{salesLedgerDto.customerContractNo},'%') |
| | | </if> |
| | | <if test="salesLedgerDto.salesContractNo != null and salesLedgerDto.salesContractNo != '' "> |
| | | AND T1.sales_contract_no LIKE CONCAT('%',#{salesLedgerDto.salesContractNo},'%') |
| | | </if> |
| | | <if test="salesLedgerDto.projectName != null and salesLedgerDto.projectName != '' "> |
| | | AND T1.project_name LIKE CONCAT('%',#{salesLedgerDto.projectName},'%') |
| | | </if> |
| | | <if test="salesLedgerDto.schedulingDateStart != null and salesLedgerDto.schedulingDateStart != '' "> |
| | | AND T2.scheduling_date >= DATE_FORMAT(#{salesLedgerDto.entryDateStart},'%Y-%m-%d') |
| | | </if> |
| | | <if test="salesLedgerDto.schedulingDateEnd != null and salesLedgerDto.schedulingDateEnd != '' "> |
| | | AND T2.scheduling_date <= DATE_FORMAT(#{salesLedgerDto.entryDateEnd},'%Y-%m-%d') |
| | | </if> |
| | | </where> |
| | | order by T2.update_time desc |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.production.mapper.SalesLedgerWorkMapper"> |
| | | |
| | | <select id="listPage" resultType="com.ruoyi.production.dto.SalesLedgerWorkDto"> |
| | | SELECT |
| | | t4.id, |
| | | t4.status, |
| | | t4.scheduling_user_id, |
| | | t4.scheduling_user_name, |
| | | t4.scheduling_date, |
| | | t4.scheduling_num, |
| | | t4.finished_num, |
| | | t4.work_hours, |
| | | t4.process, |
| | | T1.sales_contract_no, |
| | | T1.customer_contract_no, |
| | | T1.project_name, |
| | | T1.customer_name, |
| | | t3.product_category, |
| | | t3.specification_model, |
| | | t3.unit |
| | | FROM |
| | | sales_ledger_work t4 |
| | | LEFT JOIN sales_ledger T1 ON T1.id = t4.sales_ledger_id |
| | | left join sales_ledger_product t3 on t4.sales_ledger_product_id = t3.id |
| | | <where> |
| | | 1 = 1 |
| | | <if test="salesLedgerDto.status != null and salesLedgerDto.status != '' "> |
| | | AND t4.status = #{salesLedgerDto.status} |
| | | </if> |
| | | <if test="salesLedgerDto.customerName != null and salesLedgerDto.customerName != '' "> |
| | | AND T1.customer_name LIKE CONCAT('%',#{salesLedgerDto.customerName},'%') |
| | | </if> |
| | | <if test="salesLedgerDto.customerContractNo != null and salesLedgerDto.customerContractNo !='' "> |
| | | AND T1.customer_contract_no LIKE CONCAT('%',#{salesLedgerDto.customerContractNo},'%') |
| | | </if> |
| | | <if test="salesLedgerDto.salesContractNo != null and salesLedgerDto.salesContractNo != '' "> |
| | | AND T1.sales_contract_no LIKE CONCAT('%',#{salesLedgerDto.salesContractNo},'%') |
| | | </if> |
| | | <if test="salesLedgerDto.projectName != null and salesLedgerDto.projectName != '' "> |
| | | AND T1.project_name LIKE CONCAT('%',#{salesLedgerDto.projectName},'%') |
| | | </if> |
| | | <if test="salesLedgerDto.schedulingDateStart != null and salesLedgerDto.schedulingDateStart != '' "> |
| | | AND t4.scheduling_date >= DATE_FORMAT(#{salesLedgerDto.entryDateStart},'%Y-%m-%d') |
| | | </if> |
| | | <if test="salesLedgerDto.schedulingDateEnd != null and salesLedgerDto.schedulingDateEnd != '' "> |
| | | AND t4.scheduling_date <= DATE_FORMAT(#{salesLedgerDto.entryDateEnd},'%Y-%m-%d') |
| | | </if> |
| | | </where> |
| | | order by t4.update_time desc |
| | | </select> |
| | | </mapper> |