lyhzzz hai 1 ano
pai
achega
f718a8c4a5

+ 15 - 0
README.md

@@ -47,4 +47,19 @@ http://120.25.146.52:3090/project/297/interface/api/9528
 6.确认报价新增参数 
     /service/sale/salePersonnel/confirmRepair
         remark 备注
+~~~~
+
+###**v1.5.0**
+~~~~
+详见文档
+1.
+    saleOrderList  接口列表添加返回isSignFor 0未签收,1已签收  ,invoiceStatus 是否需要开启 0否,1是
+2.
+    添加接口    /service/sale/salePersonnel/signFor 填写签收凭证
+3.
+    添加接口    /service/sale/repairInfo/exportRepairInfo  导出工单详情
+4.
+    /process,/details进度条和详情接口中 customerAddress obj中包含填写的签收凭证
+5.
+    添加接口  /service/sale/repairInvoice/invoiceRegister   入参和微信端开票申请一模一样
 ~~~~

+ 6 - 0
src/main/java/com/fdkankan/sale/controller/RepairInvoiceController.java

@@ -45,6 +45,12 @@ public class RepairInvoiceController extends BaseController {
         return ResultData.ok(PageInfo.PageInfo(repairInvoiceService.pageList(param)));
     }
 
+    @PostMapping("/invoiceRegister")
+    public ResultData invoiceRegister(@RequestBody RepairInvoice param){
+        repairInvoiceService.invoiceRegister(param,getUserId());
+        return ResultData.ok();
+    }
+
     @PostMapping("/open")
     public ResultData open(@RequestBody RepairInvoice param  ){
         repairInvoiceService.open(param,getUserId());

+ 0 - 21
src/main/java/com/fdkankan/sale/controller/RepairRegisterLogController.java

@@ -1,21 +0,0 @@
-package com.fdkankan.sale.controller;
-
-
-import org.springframework.web.bind.annotation.RequestMapping;
-
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * <p>
- *  前端控制器
- * </p>
- *
- * @author 
- * @since 2023-03-22
- */
-@RestController
-@RequestMapping("/sale/repairRegisterLog")
-public class RepairRegisterLogController {
-
-}
-

+ 3 - 0
src/main/java/com/fdkankan/sale/entity/RepairInvoice.java

@@ -135,4 +135,7 @@ public class RepairInvoice implements Serializable {
     @TableField("get_address")
     private String getAddress;
 
+    @TableField(exist = false)
+    private Integer needInvoice;
+
 }

+ 1 - 0
src/main/java/com/fdkankan/sale/service/IRepairInvoiceService.java

@@ -22,4 +22,5 @@ public interface IRepairInvoiceService extends IService<RepairInvoice> {
 
     void open(RepairInvoice repairInvoice, Long userId);
 
+    void invoiceRegister(RepairInvoice param, Long userId);
 }

+ 21 - 3
src/main/java/com/fdkankan/sale/service/impl/RepairInvoiceServiceImpl.java

@@ -8,9 +8,7 @@ import com.fdkankan.fyun.face.FYunFileServiceInterface;
 import com.fdkankan.sale.common.CacheUtil;
 import com.fdkankan.sale.common.FilePath;
 import com.fdkankan.sale.common.ResultCode;
-import com.fdkankan.sale.entity.Customer;
-import com.fdkankan.sale.entity.MailTemplate;
-import com.fdkankan.sale.entity.RepairInvoice;
+import com.fdkankan.sale.entity.*;
 import com.fdkankan.sale.exception.BusinessException;
 import com.fdkankan.sale.mapper.IRepairInvoiceMapper;
 import com.fdkankan.sale.service.*;
@@ -18,6 +16,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.fdkankan.sale.vo.request.RepairInvoiceParam;
 import com.fdkankan.sale.vo.response.RepairInvoiceVo;
 import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -58,6 +57,25 @@ public class RepairInvoiceServiceImpl extends ServiceImpl<IRepairInvoiceMapper,
     }
 
     @Override
+    public void invoiceRegister(RepairInvoice param, Long userId) {
+        if(StringUtils.isBlank(param.getRepairId()) ){
+            throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
+        }
+        Repair repair = repairService.getById(param.getRepairId());
+        if(repair == null){
+            throw new BusinessException(ResultCode.ORDER_PAY_NOT_EXITS);
+        }
+        RepairInvoice repairInvoice = this.getByRepairId(param.getRepairId());
+        if(repairInvoice !=null){
+            throw new BusinessException(ResultCode.ORDER_INVOICE_EXITS);
+        }
+        repairInvoice = new RepairInvoice();
+        BeanUtils.copyProperties(param,repairInvoice);
+        this.save(repairInvoice);
+        repairService.updateRepairInvoiceStatus(repair.getRepairId(),1);
+    }
+
+    @Override
     public void open(RepairInvoice param, Long userId) {
         if(param.getInvoiceId() == null ){
             throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);