فهرست منبع

成本 面损 审批列表

liuchaohui 2 سال پیش
والد
کامیت
bbd22b6f11

+ 31 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/costLossReview/controller/SyCostLossReviewController.java

@@ -8,10 +8,15 @@ import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.aspect.annotation.AutoLog;
 import org.jeecg.common.system.base.controller.JeecgController;
+import org.jeecg.modules.documents.costLossReview.entity.CostAllocationReview;
+import org.jeecg.modules.documents.costLossReview.entity.FabricLossReview;
 import org.jeecg.modules.documents.costLossReview.entity.SyCostLossReview;
 import org.jeecg.modules.documents.costLossReview.service.ISyCostLossReviewService;
 import org.jeecg.modules.documents.orderData.entity.SyOrderData;
 import org.jeecg.modules.documents.orderData.service.ISyOrderDataService;
+import org.jeecg.modules.report.entity.FabricLoss;
+import org.jeecg.modules.report.entity.SyFabricLossReport;
+import org.jeecg.modules.report.service.ISyFabricLossReportService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -26,6 +31,8 @@ import java.util.List;
 public class SyCostLossReviewController extends JeecgController<SyOrderData, ISyOrderDataService> {
    @Autowired
    private ISyCostLossReviewService syCostLossReviewService;
+   @Autowired
+   private ISyFabricLossReportService syFabricLossReportService;
 
    /**
     * 分页列表查询
@@ -62,4 +69,28 @@ public class SyCostLossReviewController extends JeecgController<SyOrderData, ISy
        return Result.OK(pageList);
    }
 
+    @AutoLog(value = "成本损失列表-分页面损列表查询")
+    @ApiOperation(value="成本损失列表-分页面损列表查询", notes="成本损失列表-分页面损列表查询")
+    @GetMapping(value = "/queryFabricLossPage")
+   public Result<?> queryFabricLossPage(FabricLossReview sy,
+                                        @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+                                        @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+                                        HttpServletRequest req){
+       Page<FabricLossReview> page = new Page<FabricLossReview>(pageNo, pageSize);
+       IPage<FabricLossReview> pageList = syCostLossReviewService.querySyFabricLossReport(sy,page);
+       return Result.OK(pageList);
+   }
+
+    @AutoLog(value = "成本损失列表-分页成本列表查询")
+    @ApiOperation(value="成本损失列表-分页成本列表查询", notes="成本损失列表-分页成本列表查询")
+    @GetMapping(value = "/queryCostAllocationPage")
+    public Result<?> queryCostAllocationPage(CostAllocationReview sy,
+                                         @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+                                         @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+                                         HttpServletRequest req){
+        Page<CostAllocationReview> page = new Page<CostAllocationReview>(pageNo, pageSize);
+        IPage<CostAllocationReview> pageList = syCostLossReviewService.queryCostAllocation(sy,page);
+        return Result.OK(pageList);
+    }
+
 }

+ 66 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/costLossReview/entity/CostAllocationReview.java

@@ -0,0 +1,66 @@
+package org.jeecg.modules.documents.costLossReview.entity;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+import java.util.Date;
+
+/**
+ * @Description: 成本分配主表
+ * @Author: jeecg-boot
+ * @Date:   2022-06-21
+ * @Version: V1.0
+ */
+@Data
+public class CostAllocationReview {
+
+    @ApiModelProperty(value = "计划单号")
+    private String planNum;
+    //保存日期
+    private String addDate;
+    //审批日期
+    private String approvalDate;
+    //审批人
+    private String approvalMan;
+    /**款号*/
+    @ApiModelProperty(value = "款号")
+    private String poStyleNum;
+    /**业务员*/
+    @ApiModelProperty(value = "业务员")
+    private String exportSales;
+    /**成衣合同号*/
+    @ApiModelProperty(value = "成衣合同号")
+    private String garmentContractno;
+    /**部门*/
+    @ApiModelProperty(value = "部门")
+    private String department;
+    /**客户简称*/
+    @ApiModelProperty(value = "客户简称")
+    private String customerShortame;
+    /**加工单位*/
+    @ApiModelProperty(value = "加工单位")
+    private String processUnit;
+    /**出运日期*/
+    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "出运日期")
+    private Date outdata;
+    /**计划数量*/
+    @ApiModelProperty(value = "计划数量")
+    private java.math.BigDecimal planQuantity;
+    /**成衣件数-实际出货数量*/
+    @ApiModelProperty(value = "成衣件数-实际出货数量")
+    private java.math.BigDecimal actualShipquantity;
+    @ApiModelProperty(value = "短出数:计划数量和实际出货数量的差额")
+    private java.math.BigDecimal shortseveral;
+    /**短出货值*/
+    @ApiModelProperty(value = "短出货值")
+    private java.math.BigDecimal shortvalue;
+    /**短出面料成本:单件成本*短出数量*/
+    @ApiModelProperty(value = "短出面料成本:单件成本*短出数量")
+    private java.math.BigDecimal fabricshortcost;
+    @ApiModelProperty(value = "制单人")
+    private String preparedBy;
+
+}

+ 42 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/costLossReview/entity/FabricLossReview.java

@@ -0,0 +1,42 @@
+package org.jeecg.modules.documents.costLossReview.entity;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import org.jeecg.modules.report.entity.*;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+import java.util.List;
+
+//面料损耗实体
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class FabricLossReview {
+    //计划单号
+    private String cCode;
+    //款号
+    private String cDefine22;
+    //业务员
+    private  String cPersonName;
+    //计划员
+    private  String planner;
+    //排单数量
+    private Double number;
+    //实际出库数量
+    private  Double outboundNumber;
+    //制单人
+    private  String makingPeople;
+    //成衣合同号
+    private  String contractNo;
+    //保存日期
+    private String createTime;
+    //审批日期
+    private String approvalDate;
+    //审批人
+    private String approvalMan;
+
+}

+ 5 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/costLossReview/mapper/SyCostLossReviewMapper.java

@@ -4,6 +4,8 @@ import com.baomidou.dynamic.datasource.annotation.DS;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.apache.ibatis.annotations.Param;
+import org.jeecg.modules.documents.costLossReview.entity.CostAllocationReview;
+import org.jeecg.modules.documents.costLossReview.entity.FabricLossReview;
 import org.jeecg.modules.documents.costLossReview.entity.SyCostLossReview;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 
@@ -20,4 +22,7 @@ public interface SyCostLossReviewMapper extends BaseMapper<SyCostLossReview> {
     IPage<SyCostLossReview> querylist(@Param("e")SyCostLossReview syCostLossReview, Page<SyCostLossReview> page);//@Param("pageNO")int pageNO,@Param("pageSize")int pageSize
     @DS("multi-one")
     List<String> queryMakerByplanNo(@Param("planNo")String planNo);
+
+    IPage<FabricLossReview> querySyFabricLossReport(@Param("sy")FabricLossReview sy, Page<FabricLossReview> page);
+    IPage<CostAllocationReview> queryCostAllocation(@Param("sy")CostAllocationReview sy, Page<CostAllocationReview> page);
 }

+ 115 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/costLossReview/mapper/xml/SyCostLossReviewMapper.xml

@@ -116,4 +116,119 @@
         where planNo =#{planNo}
         group by planNo,maker
     </select>
+
+    <select id="querySyFabricLossReport" resultType="org.jeecg.modules.documents.costLossReview.entity.FabricLossReview">
+        select plan_code as cCode,create_time as createTime,approval_date as approvalDate,approval_man as approvalMan,
+                 content ->> '$.cDefine22'  AS cDefine22, content ->> '$.planner'  as planner,
+                 content ->> '$.number' as number, content ->> '$.contractNo' as contractNo,
+                 content ->> '$.cPersonName' as cPersonName,
+                 content ->> '$.outboundNumber' as outboundNumber,
+                 content ->> '$.makingPeople' as makingPeople
+        from sy_fabric_loss_report
+        where 1=1
+        <if test="sy.createTime != null and sy.createTime !=''">
+            AND date_format( create_time, '%Y-%m-%d' )= date_format(#{sy.createTime},'%Y-%m-%d');
+        </if>
+        <if test="sy.approvalMan != null and sy.approvalMan !=''">
+            AND approval_man = #{sy.approvalMan}
+        </if>
+        <if test="sy.approvalDate != null and sy.approvalDate !=''">
+            AND approval_date = #{sy.approvalDate}
+        </if>
+        <if test="sy.cCode != null and sy.cCode !=''">
+            AND plan_code = #{sy.cCode}
+        </if>
+        <if test="sy.cDefine22 != null and sy.cDefine22 !=''">
+            AND JSON_EXTRACT( content, '$.cDefine22' ) = #{sy.cDefine22}
+        </if>
+        <if test="sy.planner != null and sy.planner !=''">
+            AND JSON_EXTRACT( content, '$.planner' ) = #{sy.planner}
+        </if>
+        <if test="sy.number != null and sy.number !=''">
+            AND JSON_EXTRACT( content, '$.number' ) = #{sy.number}
+        </if>
+        <if test="sy.contractNo != null and sy.contractNo !=''">
+            AND JSON_EXTRACT( content, '$.contractNo' ) = #{sy.contractNo}
+        </if>
+        <if test="sy.cPersonName != null and sy.cPersonName !=''">
+            AND JSON_EXTRACT( content, '$.cPersonName' ) = #{sy.cPersonName}
+        </if>
+        <if test="sy.outboundNumber != null and sy.outboundNumber !=''">
+            AND JSON_EXTRACT( content, '$.outboundNumber') = #{sy.outboundNumber}
+        </if>
+        <if test="sy.makingPeople != null and sy.makingPeople !=''">
+            AND JSON_EXTRACT( content, '$.makingPeople' ) = #{sy.makingPeople}
+        </if>
+    </select>
+
+    <select id="queryCostAllocation" resultType="org.jeecg.modules.documents.costLossReview.entity.CostAllocationReview">
+        select plan_num as planNum,approval_date as approvalDate,approval_man as approvalMan,add_date as addDate,
+        cost_info ->> '$.poStyleNum'  AS poStyleNum,
+        cost_info ->> '$.exportSales'  AS exportSales,
+        cost_info ->> '$.garmentContractno'  AS garmentContractno,
+        cost_info ->> '$.department'  AS department,
+        cost_info ->> '$.customerShortame'  AS customerShortame,
+        cost_info ->> '$.processUnit'  AS processUnit,
+        cost_info ->> '$.outdata'  AS outdata,
+        cost_info ->> '$.planQuantity'  AS planQuantity,
+        cost_info ->> '$.actualShipquantity'  AS actualShipquantity,
+        cost_info ->> '$.shortseveral'  AS shortseveral,
+        cost_info ->> '$.shortvalue'  AS shortvalue,
+        cost_info ->> '$.fabricshortcost'  AS fabricshortcost,
+        cost_info ->> '$.preparedBy'  AS preparedBy
+        from sy_cost_json
+        where 1=1
+        <if test="sy.addDate != null and sy.addDate !=''">
+            AND date_format( add_date, '%Y-%m-%d' )= date_format(#{sy.addDate},'%Y-%m-%d');
+        </if>
+        <if test="sy.approvalMan != null and sy.approvalMan !=''">
+            AND approval_man = #{sy.approvalMan}
+        </if>
+        <if test="sy.approvalDate != null and sy.approvalDate !=''">
+            AND approval_date = #{sy.approvalDate}
+        </if>
+        <if test="sy.planNum != null and sy.planNum !=''">
+            AND plan_num = #{sy.planNum}
+        </if>
+        <if test="sy.poStyleNum != null and sy.poStyleNum !=''">
+            AND JSON_EXTRACT( content, '$.poStyleNum' ) = #{sy.poStyleNum}
+        </if>
+        <if test="sy.exportSales != null and sy.exportSales !=''">
+            AND JSON_EXTRACT( content, '$.exportSales' ) = #{sy.exportSales}
+        </if>
+        <if test="sy.garmentContractno != null and sy.garmentContractno !=''">
+            AND JSON_EXTRACT( content, '$.garmentContractno' ) = #{sy.garmentContractno}
+        </if>
+        <if test="sy.department != null and sy.department !=''">
+            AND JSON_EXTRACT( content, '$.department' ) = #{sy.department}
+        </if>
+        <if test="sy.customerShortame != null and sy.customerShortame !=''">
+            AND JSON_EXTRACT( content, '$.customerShortame' ) = #{sy.customerShortame}
+        </if>
+        <if test="sy.processUnit != null and sy.processUnit !=''">
+            AND JSON_EXTRACT( content, '$.processUnit') = #{sy.processUnit}
+        </if>
+        <if test="sy.outdata != null and sy.outdata !=''">
+            AND JSON_EXTRACT( content, '$.outdata' ) = #{sy.outdata}
+        </if>
+
+        <if test="sy.planQuantity != null and sy.planQuantity !=''">
+            AND JSON_EXTRACT( content, '$.planQuantity' ) = #{sy.planQuantity}
+        </if>
+        <if test="sy.actualShipquantity != null and sy.actualShipquantity !=''">
+            AND JSON_EXTRACT( content, '$.actualShipquantity' ) = #{sy.actualShipquantity}
+        </if>
+        <if test="sy.shortseveral != null and sy.shortseveral !=''">
+            AND JSON_EXTRACT( content, '$.shortseveral' ) = #{sy.shortseveral}
+        </if>
+        <if test="sy.shortvalue != null and sy.shortvalue !=''">
+            AND JSON_EXTRACT( content, '$.shortvalue') = #{sy.shortvalue}
+        </if>
+        <if test="sy.fabricshortcost != null and sy.fabricshortcost !=''">
+            AND JSON_EXTRACT( content, '$.fabricshortcost' ) = #{sy.fabricshortcost}
+        </if>
+        <if test="sy.preparedBy != null and sy.preparedBy !=''">
+            AND JSON_EXTRACT( content, '$.preparedBy' ) = #{sy.preparedBy}
+        </if>
+    </select>
 </mapper>

+ 4 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/costLossReview/service/ISyCostLossReviewService.java

@@ -3,6 +3,8 @@ package org.jeecg.modules.documents.costLossReview.service;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.IService;
+import org.jeecg.modules.documents.costLossReview.entity.CostAllocationReview;
+import org.jeecg.modules.documents.costLossReview.entity.FabricLossReview;
 import org.jeecg.modules.documents.costLossReview.entity.SyCostLossReview;
 
 import java.util.List;
@@ -16,4 +18,6 @@ import java.util.List;
 public interface ISyCostLossReviewService extends IService<SyCostLossReview> {
      IPage<SyCostLossReview> querylist(SyCostLossReview syCostLossReview, Page<SyCostLossReview> page);
      List<String> queryMakerByplanNo(String planNo);
+     IPage<FabricLossReview> querySyFabricLossReport(FabricLossReview sy, Page<FabricLossReview> page);
+     IPage<CostAllocationReview> queryCostAllocation(CostAllocationReview sy, Page<CostAllocationReview> page);
 }

+ 12 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/costLossReview/service/impl/SyCostLossReviewServiceImpl.java

@@ -4,6 +4,8 @@ package org.jeecg.modules.documents.costLossReview.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 org.jeecg.modules.documents.costLossReview.entity.CostAllocationReview;
+import org.jeecg.modules.documents.costLossReview.entity.FabricLossReview;
 import org.jeecg.modules.documents.costLossReview.entity.SyCostLossReview;
 import org.jeecg.modules.documents.costLossReview.mapper.SyCostLossReviewMapper;
 import org.jeecg.modules.documents.costLossReview.service.ISyCostLossReviewService;
@@ -33,4 +35,14 @@ public class SyCostLossReviewServiceImpl extends ServiceImpl<SyCostLossReviewMap
     public List<String> queryMakerByplanNo(String planNo) {
         return syCostLossReviewMapper.queryMakerByplanNo(planNo);
     }
+
+    @Override
+    public IPage<FabricLossReview> querySyFabricLossReport(FabricLossReview sy, Page<FabricLossReview> page) {
+        return syCostLossReviewMapper.querySyFabricLossReport(sy, page);
+    }
+
+    @Override
+    public IPage<CostAllocationReview> queryCostAllocation(CostAllocationReview sy, Page<CostAllocationReview> page) {
+        return syCostLossReviewMapper.queryCostAllocation(sy, page);
+    }
 }