| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.production.controller; |
| | | |
| | | 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.production.mapper.ProductionOrderMapper; |
| | | import com.ruoyi.production.pojo.ProductionOrder; |
| | | import com.ruoyi.production.service.ProductionOrderService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author :yys |
| | | * @date : 2025/11/26 14:21 |
| | | */ |
| | | @RestController |
| | | @Api(tags = "ç产订å") |
| | | @RequestMapping("/productionOrder") |
| | | public class ProductionOrderController extends BaseController { |
| | | |
| | | @Autowired |
| | | private ProductionOrderService productionOrderService; |
| | | |
| | | @Autowired |
| | | private ProductionOrderMapper productionOrderMapper; |
| | | |
| | | @GetMapping("/listPage") |
| | | @Log(title = "ç产订å-å页æ¥è¯¢", businessType = BusinessType.OTHER) |
| | | @ApiOperation("ç产订å-å页æ¥è¯¢") |
| | | public AjaxResult listPage(Page page, ProductionOrder productionOrder) { |
| | | return AjaxResult.success(productionOrderService.listPage(page, productionOrder)); |
| | | } |
| | | |
| | | @PostMapping("/addProductionOrder") |
| | | @Log(title = "ç产订å-æ°å¢", businessType = BusinessType.INSERT) |
| | | @ApiOperation("ç产订å-æ°å¢") |
| | | public AjaxResult addProductionOrder(@RequestBody ProductionOrder productionOrder) { |
| | | String scdd = OrderUtils.countTodayByCreateTime(productionOrderMapper, "SCDD"); |
| | | productionOrder.setOrderNo(scdd); |
| | | return AjaxResult.success(productionOrderService.save(productionOrder)); |
| | | } |
| | | |
| | | @PostMapping("/updateProductionOrder") |
| | | @Log(title = "ç产订å-ä¿®æ¹", businessType = BusinessType.UPDATE) |
| | | @ApiOperation("ç产订å-ä¿®æ¹") |
| | | public AjaxResult updateProductionOrder(@RequestBody ProductionOrder productionOrder) { |
| | | return AjaxResult.success(productionOrderService.updateById(productionOrder)); |
| | | } |
| | | |
| | | @DeleteMapping("/deleteProductionOrder") |
| | | @Log(title = "ç产订å-å é¤", businessType = BusinessType.DELETE) |
| | | @ApiOperation("ç产订å-å é¤") |
| | | public AjaxResult deleteProductionOrder(@RequestBody List<Long> ids) { |
| | | if (CollectionUtils.isEmpty(ids)) return AjaxResult.error("è¯·ä¼ å
¥è¦å é¤çID"); |
| | | return AjaxResult.success(productionOrderService.removeBatchByIds(ids)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * å¯¼åº |
| | | * @param response |
| | | */ |
| | | @PostMapping("/export") |
| | | @ApiOperation("ç产管ç-ç产订å-导åº") |
| | | @Log(title = "ç产订å-导åº", businessType = BusinessType.EXPORT) |
| | | public void export(HttpServletResponse response) { |
| | | productionOrderService.export(response); |
| | | } |
| | | |
| | | /** |
| | | * å¯¼åº |
| | | * @param response |
| | | */ |
| | | @PostMapping("/exportOne") |
| | | @ApiOperation("ç产管ç-ç产派工-导åº") |
| | | @Log(title = "ç产订å-导åº", businessType = BusinessType.EXPORT) |
| | | public void exportOne(HttpServletResponse response) { |
| | | productionOrderService.exportOne(response); |
| | | } |
| | | |
| | | } |
| | |
| | | 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 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; |
| | |
| | | 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); |
| | | } |
| | | // @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); |
| | | } |
| | | // /** |
| | | // * å¯¼åº |
| | | // * @param response |
| | | // */ |
| | | // @PostMapping("/export") |
| | | // @ApiOperation("ç产管ç-ç产订å-导åº") |
| | | // public void export(HttpServletResponse response) { |
| | | // salesLedgerSchedulingService.export(response); |
| | | // } |
| | | |
| | | |
| | | /** |
| | | * å¯¼åº |
| | | * @param response |
| | | */ |
| | | @PostMapping("/exportOne") |
| | | @ApiOperation("ç产管ç-ç产派工-导åº") |
| | | public void exportOne(HttpServletResponse response) { |
| | | salesLedgerSchedulingService.exportOne(response); |
| | | } |
| | | |
| | | @PostMapping("/productionDispatch") |
| | | @Log(title = "ç产管ç-ç产订å-ç产派工", businessType = BusinessType.INSERT) |
| | |
| | | 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.SalesLedgerSchedulingProcessDto; |
| | | 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; |
| | |
| | | package com.ruoyi.production.dto; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Excel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.time.LocalDate; |
| | | |
| | | /** |
| | | * @author :yys |
| | |
| | | @Excel(name = "å¾
ææ°é") |
| | | private BigDecimal daiNum; |
| | | |
| | | @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 = "ç产订åå·") |
| | | private String orderNo; |
| | | |
| | | /** |
| | | * 产å大类 |
| | | */ |
| | | @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 = "订åç¶æ") |
| | | @TableField(exist = false) |
| | | private String status; |
| | | |
| | | @ApiModelProperty(value = "ç§æ·ID") |
| | | private Long tenantId; |
| | | @ApiModelProperty(value = "å®å·¥æ°é") |
| | | @TableField(exist = false) |
| | | private BigDecimal successNum; |
| | | |
| | | /** |
| | | * å½å
¥æ¥æ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | @Excel(name = "å½å
¥æ¥æ", width = 30, dateFormat = "yyyy-MM-dd") |
| | | private LocalDate registerDate; |
| | | |
| | | /** |
| | | * å½å
¥äºº |
| | | */ |
| | | @Excel(name = "å½å
¥äºº") |
| | | private String createBy; |
| | | |
| | | } |
| | |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * @author :yys |
| | |
| | | @ApiModel |
| | | public class ProcessSchedulingDto { |
| | | |
| | | /** |
| | | * å£å³åç±» |
| | | */ |
| | | private String type; |
| | | |
| | | /** |
| | | * 夿³¨ |
| | | */ |
| | | private String remark; |
| | | |
| | | /** |
| | | * æè |
| | | */ |
| | | private String loss; |
| | | |
| | | /** |
| | | * é¢ç¨ |
| | | */ |
| | | private String receive; |
| | | |
| | | private Long id; |
| | | |
| | | /** |
| | |
| | | @ApiModelProperty(value = "éå®å°è´¦ID") |
| | | private Long salesLedgerId; |
| | | |
| | | @ApiModelProperty(value = "éå®äº§åID") |
| | | @ApiModelProperty(value = "ç产订åID") |
| | | private Long salesLedgerProductId; |
| | | |
| | | /** |
| | |
| | | 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 |
| | |
| | | @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 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 orderNo; |
| | | |
| | | |
| | | /** |
| | |
| | | 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 org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDate; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | |
| | | 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; |
| | |
| | | @ApiModel |
| | | public class SalesLedgerSchedulingProcessDto { |
| | | |
| | | @ApiModelProperty(value = "éå®äº§åID") |
| | | @ApiModelProperty(value = "ç产订åID") |
| | | private Long salesLedgerProductId; |
| | | |
| | | @ApiModelProperty(value = "éå®å°è´¦ID") |
| | | private Long salesLedgerId; |
| | | |
| | | @ApiModelProperty(value = "å¼å§æ¶é´") |
| | | private String entryDateStart; |
| | |
| | | private Long id; |
| | | |
| | | /** |
| | | * éå®ååå· |
| | | * ç产订åå· |
| | | */ |
| | | @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 orderNo; |
| | | |
| | | @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; |
| | | |
| | | |
| | | /** |
| | |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDate; |
| | | |
| | | /** |
| | | * @author :yys |
| | |
| | | @Excel(name = "ç¶æ", readConverterExp = "1=å¾
ç产,2=ç产ä¸,3=å·²æ¥å·¥") |
| | | private String statusName; |
| | | |
| | | /** |
| | | * å£å³åç±» |
| | | */ |
| | | @ApiModelProperty(value = "å£å³åç±»") |
| | | private String type; |
| | | |
| | | /** |
| | | * 夿³¨ |
| | | */ |
| | | @ApiModelProperty(value = "夿³¨") |
| | | private String remark; |
| | | |
| | | /** |
| | | * æè |
| | | */ |
| | | @ApiModelProperty(value = "æè") |
| | | private String loss; |
| | | |
| | | /** |
| | | * é¢ç¨ |
| | | */ |
| | | @ApiModelProperty(value = "é¢ç¨") |
| | | private String receive; |
| | | |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.production.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.production.pojo.ProductionOrder; |
| | | |
| | | /** |
| | | * @author :yys |
| | | * @date : 2025/11/26 14:18 |
| | | */ |
| | | public interface ProductionOrderMapper extends BaseMapper<ProductionOrder> { |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.production.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Excel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * @author :yys |
| | | * @date : 2025/11/26 14:15 |
| | | */ |
| | | @Data |
| | | @TableName("production_order") |
| | | public class ProductionOrder { |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "å½å
¥æ¥æå¼å§") |
| | | @TableField(exist = false) |
| | | private String entryDateStart; |
| | | |
| | | @ApiModelProperty(value = "å½å
¥æ¥æç»æ") |
| | | @TableField(exist = false) |
| | | private String entryDateEnd; |
| | | |
| | | /** |
| | | * ç产订åå· |
| | | */ |
| | | @Excel(name = "ç产订åå·") |
| | | @ApiModelProperty(value = "ç产订åå·") |
| | | private String orderNo; |
| | | |
| | | /** |
| | | * 产å大类 |
| | | */ |
| | | @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 = "订åç¶æ") |
| | | @TableField(exist = false) |
| | | private String status = "æªå®æ"; |
| | | |
| | | /** |
| | | * æäº§æ°é |
| | | */ |
| | | @Excel(name = "æäº§æ°é") |
| | | @ApiModelProperty(value = "æäº§æ°é") |
| | | @TableField(exist = false) |
| | | private BigDecimal schedulingNum; |
| | | |
| | | |
| | | /** |
| | | * å®å·¥æ°é |
| | | */ |
| | | @Excel(name = "å®å·¥æ°é") |
| | | @ApiModelProperty(value = "å®å·¥æ°é") |
| | | @TableField(exist = false) |
| | | private BigDecimal successNum = BigDecimal.ZERO; |
| | | |
| | | /** |
| | | * å½å
¥æ¥æ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | @Excel(name = "å½å
¥æ¥æ", width = 30, dateFormat = "yyyy-MM-dd") |
| | | @ApiModelProperty(value = "å½å
¥æ¥æ") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDate registerDate; |
| | | |
| | | /** |
| | | * å½å
¥äºº |
| | | */ |
| | | @Excel(name = "å½å
¥äºº") |
| | | @ApiModelProperty(value = "å½å
¥äºº") |
| | | private String createBy; |
| | | |
| | | /** |
| | | * å建è
|
| | | */ |
| | | @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; |
| | | |
| | | } |
| | |
| | | private Long salesLedgerId; |
| | | |
| | | /** |
| | | * éå®äº§åid |
| | | * ç产订åid |
| | | */ |
| | | private Long salesLedgerProductId; |
| | | |
| | |
| | | private Long salesLedgerId; |
| | | |
| | | /** |
| | | * éå®äº§åid |
| | | * ç产订åid |
| | | */ |
| | | private Long salesLedgerProductId; |
| | | |
| | |
| | | * å·¥åº |
| | | */ |
| | | private String process; |
| | | |
| | | /** |
| | | * å£å³åç±» |
| | | */ |
| | | private String type; |
| | | |
| | | /** |
| | | * 夿³¨ |
| | | */ |
| | | private String remark; |
| | | |
| | | /** |
| | | * æè |
| | | */ |
| | | private String loss; |
| | | |
| | | /** |
| | | * é¢ç¨ |
| | | */ |
| | | private String receive; |
| | | /** |
| | | * æäº§æ¥æ |
| | | */ |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.production.service; |
| | | |
| | | 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.pojo.ProductionOrder; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * @author :yys |
| | | * @date : 2025/11/26 14:19 |
| | | */ |
| | | public interface ProductionOrderService extends IService<ProductionOrder> { |
| | | AjaxResult listPage(Page page, ProductionOrder productionOrder); |
| | | |
| | | void export(HttpServletResponse response); |
| | | |
| | | void exportOne(HttpServletResponse response); |
| | | } |
| | |
| | | int productionDispatchDelete(List<Long> ids); |
| | | |
| | | int processScheduling(List<ProcessSchedulingDto> processSchedulingDto); |
| | | |
| | | void exportOne(HttpServletResponse response); |
| | | } |
| | |
| | | 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; |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | 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.StringUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.production.dto.DaiDto; |
| | | import com.ruoyi.production.mapper.ProductionOrderMapper; |
| | | import com.ruoyi.production.mapper.SalesLedgerSchedulingMapper; |
| | | import com.ruoyi.production.mapper.SalesLedgerWorkMapper; |
| | | import com.ruoyi.production.pojo.ProductionOrder; |
| | | import com.ruoyi.production.pojo.SalesLedgerScheduling; |
| | | import com.ruoyi.production.pojo.SalesLedgerWork; |
| | | import com.ruoyi.production.service.ProductionOrderService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @author :yys |
| | | * @date : 2025/11/26 14:20 |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | public class ProductionOrderServiceImpl extends ServiceImpl<ProductionOrderMapper, ProductionOrder> implements ProductionOrderService { |
| | | |
| | | @Autowired |
| | | private ProductionOrderMapper productionOrderMapper; |
| | | |
| | | @Autowired |
| | | private SalesLedgerWorkMapper salesLedgerWorkMapper; |
| | | |
| | | @Autowired |
| | | private SalesLedgerSchedulingMapper salesLedgerSchedulingMapper; |
| | | |
| | | @Override |
| | | public AjaxResult listPage(Page page, ProductionOrder productionOrder) { |
| | | LambdaQueryWrapper<ProductionOrder> productionOrderLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | if(productionOrder != null){ |
| | | if(StringUtils.isNotEmpty(productionOrder.getOrderNo())){ |
| | | productionOrderLambdaQueryWrapper.like(ProductionOrder::getOrderNo, productionOrder.getOrderNo()); |
| | | } |
| | | if(StringUtils.isNotEmpty(productionOrder.getProductCategory())){ |
| | | productionOrderLambdaQueryWrapper.like(ProductionOrder::getProductCategory, productionOrder.getProductCategory()); |
| | | } |
| | | if(StringUtils.isNotEmpty(productionOrder.getEntryDateStart()) && StringUtils.isNotEmpty(productionOrder.getEntryDateEnd())){ |
| | | productionOrderLambdaQueryWrapper.ge(ProductionOrder::getRegisterDate, productionOrder.getEntryDateStart()) |
| | | .le(ProductionOrder::getRegisterDate, productionOrder.getEntryDateEnd()); |
| | | } |
| | | |
| | | } |
| | | IPage<ProductionOrder> list = productionOrderMapper.selectPage(page,productionOrderLambdaQueryWrapper); |
| | | if(CollectionUtils.isEmpty(list.getRecords())){ |
| | | return AjaxResult.success(list); |
| | | } |
| | | Set<Long> collect = list.getRecords().stream().map(ProductionOrder::getId).collect(Collectors.toSet()); |
| | | // è·åæäº§æ°é |
| | | LambdaQueryWrapper<SalesLedgerScheduling> salesLedgerSchedulingLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | salesLedgerSchedulingLambdaQueryWrapper.in(SalesLedgerScheduling::getSalesLedgerProductId, collect); |
| | | List<SalesLedgerScheduling> salesLedgerSchedulings = salesLedgerSchedulingMapper.selectList(salesLedgerSchedulingLambdaQueryWrapper); |
| | | // 计ç®å®å·¥æ°é |
| | | 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.setSchedulingNum(salesLedgerSchedulings |
| | | .stream() |
| | | .filter(j -> j.getSalesLedgerProductId().equals(i.getId())) |
| | | .map(SalesLedgerScheduling::getSchedulingNum) |
| | | .reduce(BigDecimal.ZERO, BigDecimal::add)); |
| | | // è·å宿æ°é |
| | | i.setSuccessNum(salesLedgerWorks |
| | | .stream() |
| | | .filter(j -> j.getSalesLedgerProductId().equals(i.getId())) |
| | | .map(SalesLedgerWork::getFinishedNum) |
| | | .reduce(BigDecimal.ZERO, BigDecimal::add)); |
| | | // ç¶æ = æ°éåå®å·¥æ°éæ¯è¾ |
| | | if(i.getSchedulingNum().compareTo(i.getSuccessNum()) == 0){ |
| | | i.setStatus("已宿"); |
| | | }else{ |
| | | i.setStatus("æªå®æ"); |
| | | } |
| | | }); |
| | | return AjaxResult.success(list); |
| | | } |
| | | |
| | | @Override |
| | | public void export(HttpServletResponse response) { |
| | | List<ProductionOrder> list = this.list(); |
| | | if(CollectionUtils.isEmpty(list)){ |
| | | throw new RuntimeException("æ å¯¼åºæ°æ®"); |
| | | } |
| | | Set<Long> collect = list.stream().map(ProductionOrder::getId).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.getId())) |
| | | .map(SalesLedgerWork::getFinishedNum) |
| | | .reduce(BigDecimal.ZERO, BigDecimal::add)); |
| | | // ç¶æ = æ°éåå®å·¥æ°éæ¯è¾ |
| | | if(i.getQuantity().compareTo(i.getSuccessNum()) == 0){ |
| | | i.setStatus("已宿"); |
| | | }else{ |
| | | i.setStatus("æªå®æ"); |
| | | } |
| | | }); |
| | | ExcelUtil<ProductionOrder> util = new ExcelUtil<>(ProductionOrder.class); |
| | | util.exportExcel(response, list, "ç产订å"); |
| | | } |
| | | |
| | | @Override |
| | | public void exportOne(HttpServletResponse response) { |
| | | List<ProductionOrder> list = this.list(); |
| | | if(CollectionUtils.isEmpty(list)){ |
| | | throw new RuntimeException("æ å¯¼åºæ°æ®"); |
| | | } |
| | | List<DaiDto> dais = new ArrayList<>(); |
| | | list.forEach(i -> { |
| | | DaiDto daiDto = new DaiDto(); |
| | | BeanUtils.copyProperties(i, daiDto); |
| | | // è·åå¾
æäº§æ°é |
| | | daiDto.setDaiNum(daiDto.getQuantity().subtract(i.getSuccessNum())); |
| | | dais.add(daiDto); |
| | | }); |
| | | ExcelUtil<DaiDto> util = new ExcelUtil<>(DaiDto.class); |
| | | util.exportExcel(response, dais, "ç产派工"); |
| | | } |
| | | } |
| | |
| | | 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.*; |
| | | 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.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.math.BigDecimal; |
| | | import java.time.LocalDate; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | import java.util.stream.Collectors; |
| | |
| | | SysUser sysUser = sysUserMapper.selectUserById(processSchedulingDto.getSchedulingUserId()); |
| | | if(sysUser == null) throw new RuntimeException("æäº§äººä¸åå¨"); |
| | | salesLedgerScheduling.setFinishedNum(salesLedgerScheduling.getFinishedNum().add(processSchedulingDto.getSchedulingNum())); |
| | | LambdaQueryWrapper<SalesLedgerWork> salesLedgerWorkLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | salesLedgerWorkLambdaQueryWrapper.eq(SalesLedgerWork::getSalesLedgerSchedulingId, salesLedgerScheduling.getId()) |
| | | .ne(SalesLedgerWork::getStatus, 1); |
| | | List<SalesLedgerWork> salesLedgerWorks = salesLedgerWorkMapper.selectList(salesLedgerWorkLambdaQueryWrapper); |
| | | if(salesLedgerScheduling.getSchedulingNum().compareTo(salesLedgerScheduling.getFinishedNum()) < 0){ |
| | | throw new RuntimeException("å½åæäº§æ°é大äºå¾
æäº§æ°éï¼è¯·ä»ç»æ ¸å¯¹ï¼"); |
| | | } |
| | |
| | | .salesLedgerProductId(salesLedgerScheduling.getSalesLedgerProductId()) |
| | | .schedulingUserId(salesLedgerScheduling.getSchedulingUserId()) |
| | | .schedulingUserName(sysUser.getNickName()) |
| | | .type(processSchedulingDto.getType()) |
| | | .remark(processSchedulingDto.getRemark()) |
| | | .loss(processSchedulingDto.getLoss()) |
| | | .receive(processSchedulingDto.getReceive()) |
| | | .schedulingNum(processSchedulingDto.getSchedulingNum()) |
| | | .workHours(processSchedulingDto.getWorkHours()) |
| | | .process(processSchedulingDto.getProcess()) |
| | |
| | | return 0; |
| | | } |
| | | |
| | | @Override |
| | | public void exportOne(HttpServletResponse response) { |
| | | List<SalesLedgerSchedulingDto> list = salesLedgerSchedulingMapper.list(); |
| | | if(CollectionUtils.isEmpty(list)){ |
| | | throw new RuntimeException("æ å¯¼åºæ°æ®"); |
| | | } |
| | | List<DaiDto> dais = new ArrayList<>(); |
| | | list.forEach(i -> { |
| | | DaiDto daiDto = new DaiDto(); |
| | | BeanUtils.copyProperties(i, daiDto); |
| | | // è·åå¾
æäº§æ°é |
| | | daiDto.setDaiNum(daiDto.getQuantity().subtract(i.getSchedulingNum())); |
| | | dais.add(daiDto); |
| | | }); |
| | | ExcelUtil<DaiDto> util = new ExcelUtil<>(DaiDto.class); |
| | | util.exportExcel(response, dais, "ç产派工"); |
| | | } |
| | | } |
| | |
| | | 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; |
| | |
| | | @PostMapping
|
| | | public AjaxResult add(@Validated @RequestBody SysRole role)
|
| | | {
|
| | | if (!roleService.checkRoleNameUnique(role))
|
| | | {
|
| | | return error("æ°å¢è§è²'" + role.getRoleName() + "'失败ï¼è§è²åç§°å·²åå¨");
|
| | | }
|
| | | else if (!roleService.checkRoleKeyUnique(role))
|
| | | {
|
| | | return error("æ°å¢è§è²'" + role.getRoleName() + "'失败ï¼è§è²æéå·²åå¨");
|
| | | }
|
| | | // if (!roleService.checkRoleNameUnique(role))
|
| | | // {
|
| | | // return error("æ°å¢è§è²'" + role.getRoleName() + "'失败ï¼è§è²åç§°å·²åå¨");
|
| | | // }
|
| | | // else if (!roleService.checkRoleKeyUnique(role))
|
| | | // {
|
| | | // return error("æ°å¢è§è²'" + role.getRoleName() + "'失败ï¼è§è²æéå·²åå¨");
|
| | | // }
|
| | | role.setCreateBy(getUsername());
|
| | | role.setTenantId(SecurityUtils.getLoginUser().getTenantId());
|
| | | return toAjax(roleService.insertRole(role));
|
| | |
| | | {
|
| | | roleService.checkRoleAllowed(role);
|
| | | roleService.checkRoleDataScope(role.getRoleId());
|
| | | if (!roleService.checkRoleNameUnique(role))
|
| | | {
|
| | | return error("ä¿®æ¹è§è²'" + role.getRoleName() + "'失败ï¼è§è²åç§°å·²åå¨");
|
| | | }
|
| | | else if (!roleService.checkRoleKeyUnique(role))
|
| | | {
|
| | | return error("ä¿®æ¹è§è²'" + role.getRoleName() + "'失败ï¼è§è²æéå·²åå¨");
|
| | | }
|
| | | // if (!roleService.checkRoleNameUnique(role))
|
| | | // {
|
| | | // return error("ä¿®æ¹è§è²'" + role.getRoleName() + "'失败ï¼è§è²åç§°å·²åå¨");
|
| | | // }
|
| | | // else if (!roleService.checkRoleKeyUnique(role))
|
| | | // {
|
| | | // return error("ä¿®æ¹è§è²'" + role.getRoleName() + "'失败ï¼è§è²æéå·²åå¨");
|
| | | // }
|
| | | role.setUpdateBy(getUsername());
|
| | |
|
| | | if (roleService.updateRole(role) > 0)
|
| | |
| | | @Data |
| | | @TableName("ticket_registration") |
| | | public class TicketRegistrationDto extends TicketRegistration { |
| | | @TableField(exist = false) |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 主é®ID |
| | |
| | | import com.ruoyi.basic.pojo.SupplierManage; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.DataScope; |
| | | import com.ruoyi.framework.security.LoginUser; |
| | | import com.ruoyi.purchase.dto.PaymentHistoryRecordVo; |
| | | import com.ruoyi.purchase.dto.PaymentLedgerDto; |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.enums.FileNameType; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.purchase.dto.ProductRecordDto; |
| | | import com.ruoyi.purchase.dto.TicketRegistrationDto; |
| | |
| | | |
| | | @Override |
| | | public IPage<ProductRecordDto> productRecordPage(Page page, TicketRegistrationDto ticketRegistrationDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | ticketRegistrationDto.setUserId(userId); |
| | | IPage<ProductRecordDto> productRecordDtoIPage1 = productRecordMapper.productRecordPage(page, ticketRegistrationDto); |
| | | page.setSize(productRecordDtoIPage1.getTotal()); |
| | | IPage<ProductRecordDto> productRecordDtoIPage = productRecordMapper.productRecordPage(page, ticketRegistrationDto); |
| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int addOrEditPurchase(PurchaseLedgerDto purchaseLedgerDto) throws IOException { |
| | | |
| | | SalesLedger salesLedger = salesLedgerMapper.selectById(purchaseLedgerDto.getSalesLedgerId()); |
| | | //å½å
¥äºº |
| | | SysUser sysUser = userMapper.selectUserById(purchaseLedgerDto.getRecorderId()); |
| | | |
| | |
| | | if(ObjectUtils.isNotEmpty(loginUser) && null != loginUser.getTenantId()) { |
| | | purchaseLedger.setTenantId(loginUser.getTenantId()); |
| | | } |
| | | purchaseLedger.setSalesContractNo(ObjectUtils.isNotEmpty(salesLedger) ? salesLedger.getSalesContractNo() : null); |
| | | purchaseLedger.setSalesContractNo(purchaseLedgerDto.getSalesContractNo()); |
| | | purchaseLedger.setSupplierName(supplierManage.getSupplierName()); |
| | | purchaseLedger.setRecorderId(purchaseLedgerDto.getRecorderId()); |
| | | purchaseLedger.setRecorderName(sysUser.getNickName()); |
| | |
| | | |
| | | @Override |
| | | public IPage<PurchaseLedgerDto> selectPurchaseLedgerListPage(IPage ipage, PurchaseLedgerDto purchaseLedger) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | purchaseLedger.setRecorderId(userId); |
| | | IPage<PurchaseLedgerDto> purchaseLedgerDtoIPage = purchaseLedgerMapper.selectPurchaseLedgerListPage(ipage, purchaseLedger); |
| | | purchaseLedgerDtoIPage.getRecords().forEach(purchaseLedgerDto -> { |
| | | List<CommonFile> commonFiles = commonFileMapper.selectList(new LambdaQueryWrapper<CommonFile>().eq(CommonFile::getCommonId, purchaseLedgerDto.getId()).eq(CommonFile::getType, FileNameType.PURCHASELEDGER.getValue())); |
| | |
| | | import com.ruoyi.common.enums.SalesLedgerType; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.bean.BeanUtils; |
| | | import com.ruoyi.other.mapper.TempFileMapper; |
| | |
| | | if (!ObjectUtils.isEmpty(ticketRegistration.getIssueDateStart()) && !ObjectUtils.isEmpty(ticketRegistration.getIssueDateEnd())) { |
| | | queryWrapper.between(TicketRegistration::getIssueDate, LocalDate.parse(ticketRegistration.getIssueDateStart(), DateTimeFormatter.ofPattern("yyyy-MM-dd")), LocalDate.parse(ticketRegistration.getIssueDateEnd(), DateTimeFormatter.ofPattern("yyyy-MM-dd"))); |
| | | } |
| | | queryWrapper.eq(TicketRegistration::getIssUerId, SecurityUtils.getUserId()); |
| | | IPage<TicketRegistration> ticketRegistrationIPage = ticketRegistrationMapper.selectPage(page, queryWrapper); |
| | | // 计ç®å·²ä»æ¬¾éé¢ |
| | | if (CollectionUtils.isNotEmpty(ticketRegistrationIPage.getRecords())) { |
| | |
| | | # Springé
ç½® |
| | | spring: |
| | | profiles: |
| | | active: cwglxt |
| | | active: yxglxt |
| | | #10.136.58.65 è´¢å¡ç®¡çç³»ç» cwglxt |
| | | #10.136.58.66 设å¤ç®¡çç³»ç» sbglxt |
| | | #10.136.58.67 ç产管æ§ç³»ç» scgkxt |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.ProductionOrderMapper"> |
| | | |
| | | </mapper> |
| | |
| | | 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 |
| | | LEFT JOIN production_order t3 on t3.id = t4.sales_ledger_product_id |
| | | <where> |
| | | t3.type = 1 |
| | | <if test="salesLedgerDto.schedulingUserName != null and salesLedgerDto.schedulingUserName != '' "> |
| | | AND t4.scheduling_user_name 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 test="salesLedgerDto.productCategory != null and salesLedgerDto.productCategory != '' "> |
| | | AND t3.product_category LIKE CONCAT('%',#{salesLedgerDto.productCategory},'%') |
| | | </if> |
| | | <if test="salesLedgerDto.entryDateStart != null and salesLedgerDto.entryDateStart != '' "> |
| | | AND t4.scheduling_date >= DATE_FORMAT(#{salesLedgerDto.entryDateStart},'%Y-%m-%d') |
| | |
| | | <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_date, |
| | | ifNull(T2.scheduling_num,0) AS schedulingNum, |
| | | ifNull(T2.finished_num,0) AS successNum, |
| | | T1.sales_contract_no, |
| | | T1.customer_contract_no, |
| | | T1.project_name, |
| | | T1.customer_name, |
| | | t3.product_category, |
| | | t3.specification_model, |
| | | t3.unit |
| | | t3.unit, |
| | | t3.order_no |
| | | FROM |
| | | sales_ledger_scheduling T2 |
| | | LEFT JOIN sales_ledger T1 ON T1.id = T2.sales_ledger_id |
| | | left join sales_ledger_product t3 on T2.sales_ledger_product_id = t3.id |
| | | LEFT JOIN production_order t3 on t3.id = T2.sales_ledger_product_id |
| | | <where> |
| | | t3.type = 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 test="salesLedgerDto.orderNo != null and salesLedgerDto.orderNo != '' "> |
| | | AND T1.order_no LIKE CONCAT('%',#{salesLedgerDto.orderNo},'%') |
| | | </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 test="salesLedgerDto.productCategory != null and salesLedgerDto.productCategory !='' "> |
| | | AND t3.productCategory LIKE CONCAT('%',#{salesLedgerDto.productCategory},'%') |
| | | </if> |
| | | <if test="salesLedgerDto.entryDateStart != null and salesLedgerDto.entryDateStart != '' "> |
| | | AND T2.scheduling_date >= DATE_FORMAT(#{salesLedgerDto.entryDateStart},'%Y-%m-%d') |
| | |
| | | t4.finished_num, |
| | | t4.work_hours, |
| | | t4.process, |
| | | T1.sales_contract_no, |
| | | T1.customer_contract_no, |
| | | T1.project_name, |
| | | T1.customer_name, |
| | | t4.type, |
| | | t4.receive, |
| | | t4.loss, |
| | | t4.remark, |
| | | t3.product_category, |
| | | t3.specification_model, |
| | | t3.unit |
| | | t3.unit, |
| | | t3.order_no |
| | | 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 |
| | | LEFT JOIN production_order t3 on t3.id = t4.sales_ledger_product_id |
| | | <where> |
| | | t3.type = 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 test="salesLedgerDto.orderNo != null and salesLedgerDto.orderNo != '' "> |
| | | AND t3.order_no LIKE CONCAT('%',#{salesLedgerDto.orderNo},'%') |
| | | </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 test="salesLedgerDto.productCategory != null and salesLedgerDto.productCategory !='' "> |
| | | AND t3.productCategory LIKE CONCAT('%',#{salesLedgerDto.productCategory},'%') |
| | | </if> |
| | | <if test="salesLedgerDto.entryDateStart != null and salesLedgerDto.entryDateStart != '' "> |
| | | AND t4.scheduling_date >= DATE_FORMAT(#{salesLedgerDto.entryDateStart},'%Y-%m-%d') |
| | |
| | | |
| | | <select id="productRecordPage" resultType="com.ruoyi.purchase.dto.ProductRecordDto"> |
| | | SELECT |
| | | sl.sales_contract_no, |
| | | sl.customer_contract_no, |
| | | sl.customer_name, |
| | | pl.sales_contract_no, |
| | | pm.model AS product_model, |
| | | pl.purchase_contract_number, |
| | | pl.supplier_name, |
| | |
| | | ROUND(pr.tickets_amount-pr.tickets_amount/(1+pr.tax_rate/100),2 )as invoice_amount |
| | | FROM product_record pr |
| | | left join purchase_ledger pl on pl.id = pr.purchase_ledger_id |
| | | left join sales_ledger sl on sl.id = pl.sales_ledger_id |
| | | left join ticket_registration tr on tr.id = pr.ticket_registration_id |
| | | left join product_model pm on pm.id = pr.product_model_id |
| | | WHERE type = 2 |
| | | <if test="c.salesContractNo != null and c.salesContractNo != ''"> |
| | | and sl.sales_contract_no = #{c.salesContractNo} |
| | | and pl.sales_contract_no = #{c.salesContractNo} |
| | | </if> |
| | | <if test="c.supplierName != null and c.supplierName != ''"> |
| | | and pl.supplier_name = #{c.supplierName} |
| | |
| | | <if test="c.purchaseContractNumber != null and c.purchaseContractNumber != ''"> |
| | | and tr.purchase_contract_number like concat('%',#{c.purchaseContractNumber},'%') |
| | | </if> |
| | | <if test="c.userId != null and c.userId != '' "> |
| | | AND pl.recorder_id = #{c.userId} |
| | | </if> |
| | | </select> |
| | | <select id="getProductRecordById" resultType="com.ruoyi.purchase.dto.ProductRecordDto"> |
| | | SELECT |
| | |
| | | <if test="c.entryDateEnd != null and c.entryDateEnd != '' "> |
| | | AND pl.entry_date <= DATE_FORMAT(#{c.entryDateEnd},'%Y-%m-%d') |
| | | </if> |
| | | <if test="c.recorderId != null and c.recorderId != '' "> |
| | | AND pl.recorder_id = #{c.recorderId} |
| | | </if> |
| | | </where> |
| | | group by pl.id, pl.purchase_contract_number, pl.sales_contract_no, pl.supplier_name, |
| | | pl.project_name,pl.entry_date, |