Преглед изворни кода

报价单添加报价类型

lyhzzz пре 2 година
родитељ
комит
1539581125

+ 2 - 1
src/main/java/com/fdkankan/sale/common/ResultCode.java

@@ -33,7 +33,8 @@ public enum ResultCode  {
     ORDER_COMMENT_EXITS(60011, "该订单已评论"),
     ORDER_INVOICE_EXITS(60012, "该订单已申请开票"),
     ORDER_NOt_PAY(60013, "该订单未支付"),
-    ORDER_INVOICE_OPEN(60013, "该订单已开票"),
+    ORDER_INVOICE_OPEN(60014, "该订单已开票"),
+    PRICE_TYPE_NOT(60015, "报价类型为空"),
 
 
 

+ 8 - 1
src/main/java/com/fdkankan/sale/entity/PriceList.java

@@ -64,9 +64,16 @@ public class PriceList implements Serializable {
     private String updateTime;
 
     /**
-     * 0初始报价,1补充报价
+     * 1确认过报价,0未确认过报价
      */
     @TableField("status")
     private Integer status;
+    /**
+     * 0备件,1人工
+     */
+    @TableField("type")
+    private Integer type;
+
+
 
 }

+ 4 - 1
src/main/java/com/fdkankan/sale/service/impl/RepairSaleService.java

@@ -138,6 +138,9 @@ public class RepairSaleService {
 
         List<PriceList> priceLists = param.getPriceLists();
         for (PriceList priceList : priceLists) {
+            if(priceList.getType() == null){
+                throw new BusinessException(ResultCode.PRICE_TYPE_NOT);
+            }
             priceList.setRepairId(param.getRepairId());
         }
         priceListService.saveOrUpdateBatch(priceLists);
@@ -158,7 +161,7 @@ public class RepairSaleService {
 
     public void payRegister(PayRegisterParam param,Long userId) {
         if(StringUtils.isBlank(param.getRepairId())
-                ||  param.getPayType() == null || StringUtils.isBlank(param.getPayImg())){
+                ||  param.getPayType() == null || param.getPayImg() == null){
             throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
         }
         Repair repair = repairService.getById(param.getRepairId());