diff --git a/src/main/java/com/xujie/modules/supplier/controller/SupplierInvNotificationController.java b/src/main/java/com/xujie/modules/supplier/controller/SupplierInvNotificationController.java index 946fc5b..d4bfed2 100644 --- a/src/main/java/com/xujie/modules/supplier/controller/SupplierInvNotificationController.java +++ b/src/main/java/com/xujie/modules/supplier/controller/SupplierInvNotificationController.java @@ -110,6 +110,13 @@ public class SupplierInvNotificationController { } + @PostMapping("/getPurDetailPage") + @ApiOperation("询价单查询分页接口") + public R getPurDetailPage(@RequestBody PurQuotationDetailData query){ + PageUtils page = purQuotationService.getPurDetailPage(query); + return R.ok().put("page", page); + } + // -----------------------------------------------------------------采购开票通知单 --------------------------------------------------- diff --git a/src/main/java/com/xujie/modules/supplier/data/PurQuotationDetailData.java b/src/main/java/com/xujie/modules/supplier/data/PurQuotationDetailData.java index ce41fcf..4e48a86 100644 --- a/src/main/java/com/xujie/modules/supplier/data/PurQuotationDetailData.java +++ b/src/main/java/com/xujie/modules/supplier/data/PurQuotationDetailData.java @@ -4,9 +4,7 @@ import com.xujie.common.utils.QueryPage; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; -import org.springframework.data.relational.core.sql.In; -import java.time.LocalDateTime; import java.util.Date; /** @@ -33,7 +31,7 @@ public class PurQuotationDetailData extends QueryPage { @ApiModelProperty(value = "物料名称") private String partDesc; - @ApiModelProperty(value = "状态") + @ApiModelProperty(value = "状态(待报价/已报价/已接受/未接受/已拒绝)") private String status; @ApiModelProperty(value = "询价数量") @@ -97,6 +95,51 @@ public class PurQuotationDetailData extends QueryPage { private String spec; + private String supplierId; //供应商编码 + + private String supplierName; //供应商名称 + + private String taxCode; //税率 + + private Double totalValeBase; //本位币总金额 + + private Double totalVale; //总金额 + + private String orderDate; //订单日期 + + + private String userName; + + private String fileName; + + private String uploadFlag; + + private String histFlag; + + private Integer SeqNo; + + private Date wantReplyDate; + + private String employeeName; + + private String deliveryTerm; + + private String paymentTerm; + + private String otherCondition; + + private String startDate; + + private String endDate; + + private String submitFlag; + + private String buyer; + + private String currency; + + private String primaryFlag; + public Object getKey() { return this.id; } diff --git a/src/main/java/com/xujie/modules/supplier/mapper/PurQuotationDetailMapper.java b/src/main/java/com/xujie/modules/supplier/mapper/PurQuotationDetailMapper.java index 5f0dc83..86afa6c 100644 --- a/src/main/java/com/xujie/modules/supplier/mapper/PurQuotationDetailMapper.java +++ b/src/main/java/com/xujie/modules/supplier/mapper/PurQuotationDetailMapper.java @@ -23,9 +23,10 @@ public interface PurQuotationDetailMapper extends BaseMapper List getListByModel(PurQuotationDetail data); - IPage myPage(Page page, @Param("query") PurQuotationDetail data); + IPage myPage(Page page, @Param("query") PurQuotationDetailData data); int getMaxItemNo(String orderNo); void updatePurDetailStatus(PurQuotationDetailData purDetail); + } diff --git a/src/main/java/com/xujie/modules/supplier/service/PurQuotationService.java b/src/main/java/com/xujie/modules/supplier/service/PurQuotationService.java index 7525539..96bea75 100644 --- a/src/main/java/com/xujie/modules/supplier/service/PurQuotationService.java +++ b/src/main/java/com/xujie/modules/supplier/service/PurQuotationService.java @@ -25,7 +25,6 @@ public interface PurQuotationService { void delPurHeader(PurQuotationHeader data); - List getPurDetailList(PurQuotationDetail query); @@ -35,6 +34,15 @@ public interface PurQuotationService { void delPurDetail(PurQuotationDetail purDetail); + /** + * 询价单查询接口 + * @Method getQuotationOffer + * @param query + * @return + */ + PageUtils getPurDetailPage(PurQuotationDetailData query); + + //----------------------------------不用的方法---------------------------------------- @@ -281,5 +289,4 @@ public interface PurQuotationService { void updatePurDetailStatus(PurQuotationDetailData purDetail); - } diff --git a/src/main/java/com/xujie/modules/supplier/service/impl/PurQuotationServiceImpl.java b/src/main/java/com/xujie/modules/supplier/service/impl/PurQuotationServiceImpl.java index a506172..f0ed967 100644 --- a/src/main/java/com/xujie/modules/supplier/service/impl/PurQuotationServiceImpl.java +++ b/src/main/java/com/xujie/modules/supplier/service/impl/PurQuotationServiceImpl.java @@ -136,6 +136,14 @@ public class PurQuotationServiceImpl implements PurQuotationService { purQuotationDetailMapper.deleteById(model.getId()); } + @Override + public PageUtils getPurDetailPage(PurQuotationDetailData data) { + IPage resultList = + purQuotationDetailMapper.myPage(new Page<>(data.getPage(), data.getLimit()), data); + return new PageUtils(resultList); + + } + @Override @Transactional diff --git a/src/main/resources/mapper/supplier/PurQuotationDetailMapper.xml b/src/main/resources/mapper/supplier/PurQuotationDetailMapper.xml index 8b7ba42..2269c90 100644 --- a/src/main/resources/mapper/supplier/PurQuotationDetailMapper.xml +++ b/src/main/resources/mapper/supplier/PurQuotationDetailMapper.xml @@ -91,52 +91,110 @@ order by id desc - + select A.order_no + , A.supplier_id + , A.supplier_name + , A.tax_code + , A.buyer + , A.currency + , A.order_date + , A.upload_flag + , A.file_name + , A.want_reply_date + , A.other_condition as otherCondition + + , B.item_no + , B.site + , B.part_no + , B.part_desc + , B.umid + , B.qty + , B.price + , B.material_cost + , B.produce_fee + , B.profit + , B.freight + , B.duty + , B.additional_cost + , B.pur_lead_time + , B.remark + , B.tax + , B.last_update_by + , B.status + , B.tax_rate + , B.surface_fee + , B.purchase_cycle + , B.mould_fee + , B.remark2 + + , E.user_display + , F.DeliveryTerm as deliveryTerm + , G.PaymentTerm as paymentTerm + , P.part_spec as spec + + , round((round(round(B.qty, 2) * round(B.Price, 4), 2) + round(B.additional_cost, 2)) * + round(A.currency_rate, 6), 2) as total_vale_base + , (round(round(B.qty, 2) * round(B.price, 4), 2) + round(B.additional_cost, 2)) as total_vale + , (SELECT dbo.Get_Tax_TaxRate(A.site, D.taxCode)) as taxRate + + from PurQuotationHeader as A + left join PurQuotationDetail B on A.site = B.site and A.order_no = B.order_no + left join part as P On B.Site = P.site and B.part_no = P.part_no + left join srm_supplier D on A.supplier_id = D.supplier_no and A.site = D.site + left join sys_user E on A.site = E.site and A.buyer = E.username + left join DeliveryTerm F on A.site = F.Site and A.delivery_term = F.DeliveryTermID + left join PaymentTerm G on A.site = G.Site and A.payment_term = G.PaymentTermID where 1=1 - and order_no like '%${query.orderNo}%' - and site like '%${query.site}%' - and part_no like '%${query.partNo}%' - and part_desc like '%${query.partDesc}%' - and status like '%${query.status}%' - and qty like '%${query.qty}%' - and umid like '%${query.umid}%' - and remark2 like '%${query.remark2}%' - and convert_factor like '%${query.convertFactor}%' - and act_reply_date like '%${query.actReplyDate}%' - and order_ref1 like '%${query.orderRef1}%' - and item_no like '%${query.itemNo}%' - and surface_fee like '%${query.surfaceFee}%' - and freight like '%${query.freight}%' - and last_update_by like '%${query.lastUpdateBy}%' - and order_ref2 like '%${query.orderRef2}%' - and pur_lead_time like '%${query.purLeadTime}%' - and duty like '%${query.duty}%' - and profit like '%${query.profit}%' - and tax like '%${query.tax}%' - and material_cost like '%${query.materialCost}%' - and remark like '%${query.remark}%' - and id = '${query.id}' - and additional_cost like '%${query.additionalCost}%' - and purchase_cycle like '%${query.purchaseCycle}%' - and price like '%${query.price}%' - and act_reply_comments like '%${query.actReplyComments}%' - and tax_rate like '%${query.taxRate}%' - and accept_flag like '%${query.acceptFlag}%' - and produce_fee like '%${query.produceFee}%' - and mould_fee like '%${query.mouldFee}%' - and order_ref3 like '%${query.orderRef3}%' - and order_ref_type like '%${query.orderRefType}%' - order by id desc + and A.supplier_id = '%${query.supplierId}%' + and A.supplier_name like '%${query.supplierName}%' + + and A.order_date gt;= '${query.startDate}' + + + and A.order_date lt;= '${query.endDate}' + + + and B.order_no like '%${query.orderNo}%' + and B.site like '%${query.site}%' + and B.part_no like '%${query.partNo}%' + and B.part_desc like '%${query.partDesc}%' + and B.status like '%${query.status}%' + and B.qty like '%${query.qty}%' + and B.umid like '%${query.umid}%' + and B.remark2 like '%${query.remark2}%' + and B.convert_factor like '%${query.convertFactor}%' + and B.act_reply_date like '%${query.actReplyDate}%' + and B.order_ref1 like '%${query.orderRef1}%' + and B.item_no like '%${query.itemNo}%' + and B.surface_fee like '%${query.surfaceFee}%' + and B.freight like '%${query.freight}%' + and B.last_update_by like '%${query.lastUpdateBy}%' + and B.order_ref2 like '%${query.orderRef2}%' + and B.pur_lead_time like '%${query.purLeadTime}%' + and B.duty like '%${query.duty}%' + and B.profit like '%${query.profit}%' + and B.tax like '%${query.tax}%' + and B.material_cost like '%${query.materialCost}%' + and B.remark like '%${query.remark}%' + and B.id = '${query.id}' + and B.additional_cost like '%${query.additionalCost}%' + and B.purchase_cycle like '%${query.purchaseCycle}%' + and B.price like '%${query.price}%' + and B.act_reply_comments like '%${query.actReplyComments}%' + and B.tax_rate like '%${query.taxRate}%' + and B.accept_flag like '%${query.acceptFlag}%' + and B.produce_fee like '%${query.produceFee}%' + and B.mould_fee like '%${query.mouldFee}%' + and B.order_ref3 like '%${query.orderRef3}%' + and B.order_ref_type like '%${query.orderRefType}%' + Order by A.order_no desc ,B.item_no - update PurQuotationDetail set status = #{status}