lyhzzz 4 maanden geleden
bovenliggende
commit
d658413f6d
39 gewijzigde bestanden met toevoegingen van 313 en 387 verwijderingen
  1. 18 0
      README.md
  2. 1 4
      src/main/java/com/fdkankan/manage/common/CacheUtil.java
  3. 9 6
      src/main/java/com/fdkankan/manage/controller/AuthorizeRtkController.java
  4. 1 1
      src/main/java/com/fdkankan/manage/controller/CameraController.java
  5. 2 1
      src/main/java/com/fdkankan/manage/controller/InvoiceController.java
  6. 47 1
      src/main/java/com/fdkankan/manage/entity/AuthorizeRtk.java
  7. 3 0
      src/main/java/com/fdkankan/manage/entity/Camera.java
  8. 6 0
      src/main/java/com/fdkankan/manage/entity/CameraDetail.java
  9. 2 1
      src/main/java/com/fdkankan/manage/entity/Company.java
  10. 3 0
      src/main/java/com/fdkankan/manage/entity/Invoice.java
  11. 6 0
      src/main/java/com/fdkankan/manage/entity/ScenePlusExt.java
  12. 0 62
      src/main/java/com/fdkankan/manage/factory/CustomerRelaHandler.java
  13. 0 62
      src/main/java/com/fdkankan/manage/factory/DeviceInHandler.java
  14. 0 101
      src/main/java/com/fdkankan/manage/factory/DeviceOutHandler.java
  15. 0 9
      src/main/java/com/fdkankan/manage/factory/ExcelHandlerFactory.java
  16. 0 10
      src/main/java/com/fdkankan/manage/factory/ImportExcelHandler.java
  17. 11 1
      src/main/java/com/fdkankan/manage/inner/controller/InnerController.java
  18. 7 2
      src/main/java/com/fdkankan/manage/service/IAuthorizeRtkService.java
  19. 1 2
      src/main/java/com/fdkankan/manage/service/ICameraService.java
  20. 1 1
      src/main/java/com/fdkankan/manage/service/IInvoiceService.java
  21. 3 0
      src/main/java/com/fdkankan/manage/service/IRtkDeviceService.java
  22. 1 1
      src/main/java/com/fdkankan/manage/service/impl/AuthorizeCameraServiceImpl.java
  23. 49 5
      src/main/java/com/fdkankan/manage/service/impl/AuthorizeRtkServiceImpl.java
  24. 64 58
      src/main/java/com/fdkankan/manage/service/impl/CameraServiceImpl.java
  25. 33 39
      src/main/java/com/fdkankan/manage/service/impl/InvoiceServiceImpl.java
  26. 13 0
      src/main/java/com/fdkankan/manage/service/impl/RtkDeviceServiceImpl.java
  27. 11 6
      src/main/java/com/fdkankan/manage/service/impl/SceneProServiceImpl.java
  28. 2 0
      src/main/java/com/fdkankan/manage/vo/InvoicePageParamVO.java
  29. 2 0
      src/main/java/com/fdkankan/manage/vo/InvoiceVO.java
  30. 2 0
      src/main/java/com/fdkankan/manage/vo/request/AuthorizeParam.java
  31. 0 8
      src/main/java/com/fdkankan/manage/vo/request/AuthorizeRtkParam.java
  32. 3 0
      src/main/java/com/fdkankan/manage/vo/request/CameraInOutParam.java
  33. 1 0
      src/main/java/com/fdkankan/manage/vo/response/CompanyVo.java
  34. 2 0
      src/main/java/com/fdkankan/manage/vo/response/SceneVo.java
  35. 1 1
      src/main/resources/mapper/manage/CompanyMapper.xml
  36. 6 3
      src/main/resources/mapper/manage/InvoiceMapper.xml
  37. 2 2
      src/main/resources/mapper/manage/SceneProMapper.xml
  38. BIN
      src/main/resources/template/cameraIn.xlsx
  39. BIN
      src/main/resources/template/cameraOut.xlsx

+ 18 - 0
README.md

@@ -184,4 +184,22 @@
 
 需求4:
     列表旧接口service/manage/rtkDevice/list  多加参数,账号类型 accountType 0账号池,1专用账号,2账号池限期
+    
+需求7:
+    计算优先级接口调整
+    /service/manage/mqQueueConfig/getInfo              添加参数type 不传默认4dkk, 全景VR切图入参为pano    
+    /service/manage/mqQueueConfig/updateModelingLevel  同上
+    
+需求10:
+    入库增加参数
+        snCode 
+        cameraType
+        wifiNamePrefix
+        colour
+        version
+    
+需求11:
+    新增字段canUpWebsite 能否上传四维看看。0否,1是
+需求12 
+    新增字段 oddNumber 开票审批单号
 ~~~~

+ 1 - 4
src/main/java/com/fdkankan/manage/common/CacheUtil.java

@@ -2,10 +2,7 @@ package com.fdkankan.manage.common;
 
 import com.fdkankan.manage.entity.AuthorizeCamera;
 import com.fdkankan.manage.entity.IncrementUseType;
-import com.fdkankan.manage.vo.request.AgentNewLogParam;
-import com.fdkankan.manage.vo.request.AuthorizeParam;
-import com.fdkankan.manage.vo.request.FeedbackParam;
-import com.fdkankan.manage.vo.request.OrderParam;
+import com.fdkankan.manage.vo.request.*;
 
 import java.util.HashMap;
 

+ 9 - 6
src/main/java/com/fdkankan/manage/controller/AuthorizeRtkController.java

@@ -5,13 +5,11 @@ import com.fdkankan.manage.common.ResultData;
 import com.fdkankan.manage.entity.AuthorizeRtk;
 import com.fdkankan.manage.service.IAuthorizeRtkService;
 import com.fdkankan.manage.vo.request.AuthorizeParam;
-import com.fdkankan.manage.vo.request.AuthorizeRtkParam;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.*;
 
-import org.springframework.web.bind.annotation.RestController;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
 
 /**
  * <p>
@@ -35,9 +33,14 @@ public class AuthorizeRtkController {
     }
 
     @PostMapping("/authLog")
-    public ResultData authLog(@RequestBody AuthorizeRtkParam param){
+    public ResultData authLog(@RequestBody AuthorizeParam param){
 
         return ResultData.ok(authorizeRtkService.pageList(param));
     }
+
+    @GetMapping("/export")
+    public void export(HttpServletRequest req, HttpServletResponse resp) throws Exception {
+        authorizeRtkService.export(req,resp);
+    }
 }
 

+ 1 - 1
src/main/java/com/fdkankan/manage/controller/CameraController.java

@@ -38,7 +38,7 @@ public class CameraController {
      */
     @PostMapping("/in")
     public ResultData in(@RequestBody CameraInOutParam param) {
-        cameraService.in(param.getWifiName());
+        cameraService.in(param);
         return ResultData.ok();
     }
 

+ 2 - 1
src/main/java/com/fdkankan/manage/controller/InvoiceController.java

@@ -57,8 +57,9 @@ public class InvoiceController {
     @PostMapping("/invoiceRegister")
     public ResultData invoiceRegister(
         @RequestParam("id") Long id, @RequestParam("invoiceNum") String invoiceNum, String shipNum,
+        @RequestParam("oddNumber") String oddNumber,
         @RequestParam(value = "file", required = false) MultipartFile file) throws Exception{
-        return invoiceService.invoiceRegister(Long.valueOf( StpUtil.getLoginId().toString()), id, invoiceNum, shipNum, file);
+        return invoiceService.invoiceRegister(Long.valueOf( StpUtil.getLoginId().toString()), id, invoiceNum, oddNumber,shipNum, file);
     }
 
     /**

+ 47 - 1
src/main/java/com/fdkankan/manage/entity/AuthorizeRtk.java

@@ -1,5 +1,7 @@
 package com.fdkankan.manage.entity;
 
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.alibaba.excel.annotation.ExcelProperty;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
@@ -10,6 +12,7 @@ import java.math.BigDecimal;
 import java.util.Date;
 
 import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fdkankan.manage.common.CustomDateConverter;
 import lombok.Getter;
 import lombok.Setter;
 
@@ -29,100 +32,120 @@ public class AuthorizeRtk implements Serializable {
     private static final long serialVersionUID = 1L;
 
     @TableId(value = "id", type = IdType.AUTO)
+    @ExcelIgnore
     private Integer id;
 
     /**
      * 客户名称
      */
     @TableField("customer_name")
+    @ExcelProperty(value = "客户名称",index = 6)
     private String customerName;
 
     /**
      * 客户类别0直销,1经销
      */
     @TableField("customer_type")
+    @ExcelProperty(value = "客户类别",index = 7,converter = CustomDateConverter.class)
     private Integer customerType;
 
     /**
      * 终端客户
      */
     @TableField("end_customer")
+    @ExcelProperty(value = "终端客户",index = 8)
     private String endCustomer;
 
     /**
      * 使用类型
      */
     @TableField("use_type")
+    @ExcelProperty(value = "使用类型",index = 9,converter = CustomDateConverter.class)
     private Integer useType;
 
     /**
      * 项目号
      */
     @TableField("project_num")
+    @ExcelProperty(value = "项目号",index = 20)
     private String projectNum;
 
     /**
      * 备注
      */
     @TableField("remark")
+    @ExcelProperty(value = "备注",index = 21)
     private String remark;
 
     /**
      * 合同所属公司
      */
     @TableField("company_name")
+    @ExcelProperty(value = "合同所属公司",index = 2)
     private String companyName;
 
     /**
      * 业务部门
      */
     @TableField("business_dept")
+    @ExcelProperty(value = "业务部门",index = 3)
     private String businessDept;
 
     /**
      * 业务员
      */
     @TableField("business_name")
+    @ExcelProperty(value = "业务员",index = 4)
     private String businessName;
 
     /**
      * 客户付款时间
      */
     @TableField("customer_pay_time")
+    @ExcelProperty(value = "客户付款时间",index = 5)
     private String customerPayTime;
 
     /**
      * rtksn
      */
     @TableField("rtk_code")
+    @ExcelProperty(value = "板卡SN号",index = 16)
     private String rtkCode;
 
     /**
      * 创建人
      */
     @TableField("sys_user_id")
+    @ExcelIgnore
     private Long sysUserId;
 
     @TableField(exist = false)
+    @ExcelIgnore
     private String sysUserName;
 
     @TableField("rec_status")
+    @ExcelIgnore
     @TableLogic(value = "A",delval = "I")
     private String recStatus;
 
     @TableField("create_time")
-    private Date createTime;
+    @ExcelProperty(value = "下单时间",index = 0)
+    private String createTime;
 
     @TableField("update_time")
+    @ExcelIgnore
     private Date updateTime;
 
     @TableField("amount")
+    @ExcelProperty(value = "订单金额",index = 10)
     private BigDecimal amount;
 
     @TableField("currency_symbol")
+    @ExcelProperty(value = "币种",index = 11)
     private String currencySymbol;
 
     @TableField("order_sn")
+    @ExcelProperty(value = "订单号",index = 1)
     private String orderSn;
 
     @TableField("valid_day")
@@ -130,9 +153,32 @@ public class AuthorizeRtk implements Serializable {
 
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @TableField("valid_start_time")
+    @ExcelProperty(value = "差分账号期限开始时间",index = 18)
     private Date validStartTime;
 
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @TableField("valid_end_time")
+    @ExcelProperty(value = "差分账号期限结束时间",index = 19)
     private Date validEndTime;
+
+
+    @TableField(exist = false)
+    @ExcelProperty(value = "数量",index = 12)
+    private Integer count = 1;
+
+    @TableField(exist = false)
+    @ExcelProperty(value = "付款状态",index = 13)
+    private String payStatus ;
+
+    @TableField(exist = false)
+    @ExcelProperty(value = "充值方式",index = 14)
+    private String payType ="线下" ;
+
+    @TableField(exist = false)
+    @ExcelProperty(value = "深光rtk插件SN号",index = 17)
+    private String sgRtkSn  ;
+
+    @TableField(exist = false)
+    @ExcelProperty(value = "相机SN",index = 15)
+    private String cameraSn  ;
 }

+ 3 - 0
src/main/java/com/fdkankan/manage/entity/Camera.java

@@ -1,6 +1,7 @@
 package com.fdkankan.manage.entity;
 
 import com.baomidou.mybatisplus.annotation.*;
+import com.fdkankan.manage.vo.request.CameraInOutParam;
 import lombok.Getter;
 import lombok.Setter;
 
@@ -79,4 +80,6 @@ public class Camera implements Serializable {
     @TableLogic(value = "A",delval = "I")
     private String recStatus;
 
+    @TableField(exist = false)
+    private CameraInOutParam param;
 }

+ 6 - 0
src/main/java/com/fdkankan/manage/entity/CameraDetail.java

@@ -159,4 +159,10 @@ public class CameraDetail implements Serializable {
 
     @TableField("unit")
     private String unit;
+
+    @TableField("colour")
+    private String colour;
+
+    @TableField("version")
+    private String version;
 }

+ 2 - 1
src/main/java/com/fdkankan/manage/entity/Company.java

@@ -116,5 +116,6 @@ public class Company implements Serializable {
     private String sceneVersion;
 
 
-
+    @TableField("can_up_website")
+    private Integer canUpWebsite;
 }

+ 3 - 0
src/main/java/com/fdkankan/manage/entity/Invoice.java

@@ -226,4 +226,7 @@ public class Invoice implements Serializable {
     @TableField("invoiced")
     private Integer invoiced;
 
+    @TableField("odd_number")
+    private String oddNumber;
+
 }

+ 6 - 0
src/main/java/com/fdkankan/manage/entity/ScenePlusExt.java

@@ -161,6 +161,12 @@ public class ScenePlusExt implements Serializable {
     @TableField("mixture")
     private Integer mixture;
 
+    @TableField("slam_count")
+    private Integer slamCount;
+
+    @TableField("mesh_compute_time")
+    private Long meshComputeTime;
+
     @TableField("location")
     private Integer location;
 

+ 0 - 62
src/main/java/com/fdkankan/manage/factory/CustomerRelaHandler.java

@@ -1,62 +0,0 @@
-package com.fdkankan.manage.factory;
-
-import cn.hutool.core.collection.CollUtil;
-import com.fdkankan.manage.common.ResultCode;
-import com.fdkankan.manage.constant.CameraOutTypeEnum;
-import com.fdkankan.manage.entity.AgentNew;
-import com.fdkankan.manage.exception.BusinessException;
-import com.fdkankan.manage.service.ICameraService;
-import com.fdkankan.manage.service.IExcelService;
-import com.fdkankan.manage.vo.request.CameraInOutParam;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-@Component("customerRela")
-public class CustomerRelaHandler implements ImportExcelHandler{
-
-    @Autowired
-    private IExcelService excelService;
-    @Autowired
-    private ICameraService cameraService;
-
-    @Override
-    public int importExcel(List<HashMap<Integer, String>> excelRowList) {
-
-        if(CollUtil.isEmpty(excelRowList)){
-            return 0;
-        }
-
-        List<Integer> errorIndex = new ArrayList<>();
-        List<CameraInOutParam> companyParams = new ArrayList<>();
-
-        Integer index = 0;
-        for (HashMap<Integer, String> map : excelRowList) {
-            index ++;
-            if(index == 0 && !map.get(0).equals("客户关联模板")){
-                throw new BusinessException(ResultCode.TEMPLATE_TYPE_ERROR);
-            }
-            if(index <4){
-                continue;
-            }
-            CameraInOutParam param = new CameraInOutParam();
-            param.setCompanyName(map.get(0));
-            param.setSnCode(map.get(1));
-            if(StringUtils.isBlank(param.getSnCode()) || StringUtils.isBlank(param.getCompanyName())){
-                errorIndex.add(index -3 );
-            }
-            companyParams.add(param);
-        }
-        excelService.toExcelError(errorIndex);
-
-        if(companyParams.size() <=0){
-            throw new BusinessException(ResultCode.COMPANY_TEMPLATE_EMPTY);
-        }
-
-        return cameraService.updateCompany(companyParams);
-    }
-}

+ 0 - 62
src/main/java/com/fdkankan/manage/factory/DeviceInHandler.java

@@ -1,62 +0,0 @@
-package com.fdkankan.manage.factory;
-
-import cn.hutool.core.collection.CollUtil;
-import com.fdkankan.manage.common.ResultCode;
-import com.fdkankan.manage.constant.CameraOutTypeEnum;
-import com.fdkankan.manage.entity.AgentNew;
-import com.fdkankan.manage.exception.BusinessException;
-import com.fdkankan.manage.service.ICameraService;
-import com.fdkankan.manage.service.IExcelService;
-import com.fdkankan.manage.vo.request.CameraInOutParam;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-@Slf4j
-@Component("deviceIn")
-public class DeviceInHandler implements ImportExcelHandler{
-
-    @Autowired
-    private IExcelService excelService;
-    @Autowired
-    private ICameraService cameraService;
-
-    @Override
-    public int importExcel(List<HashMap<Integer, String>> excelRowList) {
-
-        if(CollUtil.isEmpty(excelRowList)){
-            return 0;
-        }
-
-        List<String> wifiNameList = new ArrayList<>();
-        List<Integer> errorIndex = new ArrayList<>();
-        Integer index = 0;
-        for (HashMap<Integer, String> map : excelRowList) {
-            index ++;
-            if(index == 0 && !map.get(0).equals("设备入库模板")){
-                throw new BusinessException(ResultCode.TEMPLATE_TYPE_ERROR);
-            }
-            if(index <4){   //从第四行开始
-                continue;
-            }
-            String wifiName = map.get(0);
-            if(StringUtils.isBlank(wifiName)){
-                errorIndex.add(index -3);
-            }
-            wifiNameList.add(wifiName);
-        }
-
-        excelService.toExcelError(errorIndex);
-
-        if(wifiNameList.size() <=0){
-            throw new BusinessException(ResultCode.IN_TEMPLATE_EMPTY);
-        }
-
-        return cameraService.ins(wifiNameList);
-    }
-}

+ 0 - 101
src/main/java/com/fdkankan/manage/factory/DeviceOutHandler.java

@@ -1,101 +0,0 @@
-package com.fdkankan.manage.factory;
-
-import cn.hutool.core.collection.CollUtil;
-import com.fdkankan.manage.common.ResultCode;
-import com.fdkankan.manage.constant.CameraOutTypeEnum;
-import com.fdkankan.manage.entity.AgentNew;
-import com.fdkankan.manage.exception.BusinessException;
-import com.fdkankan.manage.service.IAgentNewService;
-import com.fdkankan.manage.service.ICameraService;
-import com.fdkankan.manage.service.IExcelService;
-import com.fdkankan.manage.vo.request.CameraInOutParam;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-@Slf4j
-@Component("deviceOut")
-public class DeviceOutHandler implements ImportExcelHandler{
-
-    @Autowired
-    private IAgentNewService agentNewService;
-    @Autowired
-    private IExcelService excelService;
-    @Autowired
-    private ICameraService cameraService;
-
-    @Override
-    public int importExcel(List<HashMap<Integer, String>> excelRowList) {
-
-        if(CollUtil.isEmpty(excelRowList)){
-            return 0;
-        }
-
-        List<CameraInOutParam> params = new ArrayList<>();
-        List<Integer> errorIndex = new ArrayList<>();
-
-        Integer index = 0;
-        for (HashMap<Integer, String> map : excelRowList) {
-            index ++;
-            if(index == 0 && !map.get(0).equals("设备出库模板")){
-                throw new BusinessException(ResultCode.TEMPLATE_TYPE_ERROR);
-            }
-            if(index <4){
-                continue;
-            }
-            String snCode = map.get(0);
-            String outTypeString = map.get(1);
-            String companyName = map.get(2);
-            String orderSn = map.get(3);
-            String agentName = map.get(4);
-            CameraOutTypeEnum outTypeEnum = CameraOutTypeEnum.getByMsg(outTypeString);
-            if(outTypeEnum == null || StringUtils.isBlank(snCode)){
-                log.error("outError-->出库错误:出库类型为空或snCode为空:snCode:{},outType:{},companyName:{},orderSn:{},agentName:{}"
-                        ,snCode,outTypeString,companyName,orderSn,agentName);
-                errorIndex.add(index -3);
-            }
-            CameraInOutParam param = new CameraInOutParam();
-            if(outTypeEnum != null){
-                int outType = outTypeEnum.getCode();
-                param.setOutType(outType);
-            }
-            if(param.getOutType() != null && param.getOutType() == 4 && StringUtils.isBlank(agentName)){
-                log.error("outError-->出库错误:经销商为空错误:snCode:{},outType:{},companyName:{},orderSn:{},agentName:{}"
-                        ,snCode,outTypeString,companyName,orderSn,agentName);
-                errorIndex.add(index -3);
-            }
-            if(param.getOutType() != null && param.getOutType() != 4 && StringUtils.isNotBlank(agentName)){
-                log.error("outError-->出库错误:出库类型错误:snCode:{},outType:{},companyName:{},orderSn:{},agentName:{}"
-                        ,snCode,outTypeString,companyName,orderSn,agentName);
-                errorIndex.add(index -3);
-            }
-            if(StringUtils.isNotBlank(agentName)){
-                AgentNew agentNew = agentNewService.getByName(agentName);
-                if(agentNew == null){
-                    log.error("outError-->出库错误:代理商不存在:snCode:{},outType:{},companyName:{},orderSn:{},agentName:{}"
-                            ,snCode,outTypeString,companyName,orderSn,agentName);
-                    errorIndex.add(index -3);
-                }else {
-                    param.setAgentId(agentNew.getId());
-                }
-            }
-            param.setCompanyName(companyName);
-            param.setOrderSn(orderSn);
-            param.setSnCode(snCode);
-            params.add(param);
-        }
-
-        excelService.toExcelError(errorIndex);
-
-        if(params.size() <=0){
-            throw new BusinessException(ResultCode.OUT_TEMPLATE_EMPTY);
-        }
-
-        return cameraService.outs(params);
-    }
-}

+ 0 - 9
src/main/java/com/fdkankan/manage/factory/ExcelHandlerFactory.java

@@ -1,9 +0,0 @@
-package com.fdkankan.manage.factory;
-
-import cn.hutool.extra.spring.SpringUtil;
-
-public class ExcelHandlerFactory {
-    public static ImportExcelHandler getHandler(String name){
-        return SpringUtil.getBean(name);
-    }
-}

+ 0 - 10
src/main/java/com/fdkankan/manage/factory/ImportExcelHandler.java

@@ -1,10 +0,0 @@
-package com.fdkankan.manage.factory;
-
-import java.util.HashMap;
-import java.util.List;
-
-public interface ImportExcelHandler {
-
-    int importExcel(List<HashMap<Integer, String>> excelRowList);
-
-}

+ 11 - 1
src/main/java/com/fdkankan/manage/inner/controller/InnerController.java

@@ -1,5 +1,6 @@
 package com.fdkankan.manage.inner.controller;
 
+import cn.hutool.core.date.DateUtil;
 import cn.hutool.extra.servlet.ServletUtil;
 import cn.hutool.log.Log;
 import com.alibaba.fastjson.JSONObject;
@@ -102,13 +103,22 @@ public class InnerController extends BaseController {
         if(rtkDevice == null || rtkDevice.getUseStatus() !=0){
             throw new BusinessException(ResultCode.RTK_SN_CODE_NOT_EXIT);
         }
+        //2.9.0授权期限相机
+        if(rtkDevice.getAccountType() ==2){
+            Date now = new Date();
+            Date validStartTime = rtkDevice.getValidStartTime() == null ?now :rtkDevice.getValidStartTime();
+            Date validEndTime = rtkDevice.getValidEndTime()== null ?now :rtkDevice.getValidEndTime();
+            if(now.getTime() <=validStartTime.getTime() || now.getTime() >=validEndTime.getTime()){
+                throw new BusinessException(ResultCode.RTK_SN_CODE_NOT_EXIT);
+            }
+        }
         //rtkDevice.getType() = 0板卡自带账号信息,无需关联
         Integer rtkAccountId = null;
         if(rtkDevice.getRtkType() == 0 && rtkDevice.getFailureTime() != null && rtkDevice.getFailureTime().getTime() <= new Date().getTime()){
             rtkDevice.setRtkType(1);
             rtkDeviceService.updateTypeById(rtkDevice.getId(),1);
         }
-        if(rtkDevice.getRtkType() != 0 && rtkDevice.getAccountType() == 0){
+        if(rtkDevice.getRtkType() != 0 && (rtkDevice.getAccountType() == 0 || rtkDevice.getAccountType() == 2)){
             RtkAccount rtkAccount = rtkAccountService.getOneNotUseAccount(rtkSnCode,rtkDevice.getCameraSn());
             rtkAccountId = rtkAccount.getId();
             BeanUtils.copyProperties(rtkAccount,rtkDevice);

+ 7 - 2
src/main/java/com/fdkankan/manage/service/IAuthorizeRtkService.java

@@ -2,7 +2,10 @@ package com.fdkankan.manage.service;
 
 import com.fdkankan.manage.entity.AuthorizeRtk;
 import com.baomidou.mybatisplus.extension.service.IService;
-import com.fdkankan.manage.vo.request.AuthorizeRtkParam;
+import com.fdkankan.manage.vo.request.AuthorizeParam;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
 
 /**
  * <p>
@@ -16,5 +19,7 @@ public interface IAuthorizeRtkService extends IService<AuthorizeRtk> {
 
     void addAuth(AuthorizeRtk authorizeRtk);
 
-    Object pageList(AuthorizeRtkParam param);
+    Object pageList(AuthorizeParam param);
+
+    void export(HttpServletRequest req, HttpServletResponse resp);
 }

+ 1 - 2
src/main/java/com/fdkankan/manage/service/ICameraService.java

@@ -29,7 +29,7 @@ public interface ICameraService extends IService<Camera> {
 
     PageInfo pageList(CameraParam param);
 
-    void in(String wifiName);
+    void in(CameraInOutParam param);
 
     void out(CameraInOutParam param);
 
@@ -37,7 +37,6 @@ public interface ICameraService extends IService<Camera> {
 
     void deleteCamera(Long id);
 
-    Integer ins(List<String> wifiNameList);
 
     Integer outs(List<CameraInOutParam> params);
 

+ 1 - 1
src/main/java/com/fdkankan/manage/service/IInvoiceService.java

@@ -24,7 +24,7 @@ public interface IInvoiceService extends IService<Invoice> {
 
     Page<InvoiceVO> pageInvoice(InvoicePageParamVO param);
 
-    ResultData invoiceRegister(Long userId, Long id, String invoiceNum,
+    ResultData invoiceRegister(Long userId, Long id, String invoiceNum,String oddNumber,
         String shipNum,MultipartFile file) throws IOException;
 
     ResultData getInvoiceRegisterDetail(Long id);

+ 3 - 0
src/main/java/com/fdkankan/manage/service/IRtkDeviceService.java

@@ -7,6 +7,7 @@ import com.fdkankan.manage.vo.request.RtkInfoParam;
 
 import java.util.HashMap;
 import java.util.List;
+import java.util.Set;
 
 /**
  * <p>
@@ -35,4 +36,6 @@ public interface IRtkDeviceService extends IService<RtkDevice> {
     void updateTypeById(Integer id, Integer rtkType);
 
     void updateValidTime(Integer id, String startTime, String endTime);
+
+    HashMap<String, RtkDevice> getByRtkSnCodeList(Set<String> rtkCodes);
 }

+ 1 - 1
src/main/java/com/fdkankan/manage/service/impl/AuthorizeCameraServiceImpl.java

@@ -236,7 +236,7 @@ public class AuthorizeCameraServiceImpl extends ServiceImpl<IAuthorizeCameraMapp
                 orderParam.setPageNum(orderParam.getPageNum()+1);
                 page = this.pageListByParam(orderParam);
                 if(page.getRecords().size() >0){
-                    excelService.commonExport(req,resp,"下载订单",page.getRecords(),excelWriter);
+                    excelService.commonExport(req,resp,"相机授权订单",page.getRecords(),excelWriter);
                 }
             }
         }catch (Exception e){

+ 49 - 5
src/main/java/com/fdkankan/manage/service/impl/AuthorizeRtkServiceImpl.java

@@ -2,9 +2,11 @@ package com.fdkankan.manage.service.impl;
 
 import cn.dev33.satoken.stp.StpUtil;
 import cn.hutool.core.date.DateUtil;
+import com.alibaba.excel.EasyExcel;
+import com.alibaba.excel.ExcelWriter;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.fdkankan.common.constant.ErrorCode;
+import com.fdkankan.manage.common.CacheUtil;
 import com.fdkankan.manage.common.PageInfo;
 import com.fdkankan.manage.common.ResultCode;
 import com.fdkankan.manage.entity.AuthorizeRtk;
@@ -14,16 +16,18 @@ import com.fdkankan.manage.exception.BusinessException;
 import com.fdkankan.manage.mapper.IAuthorizeRtkMapper;
 import com.fdkankan.manage.service.IAuthorizeRtkService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fdkankan.manage.service.IExcelService;
 import com.fdkankan.manage.service.IRtkDeviceService;
 import com.fdkankan.manage.service.ISysUserService;
 import com.fdkankan.manage.util.DateUtils;
-import com.fdkankan.manage.vo.request.AuthorizeRtkParam;
+import com.fdkankan.manage.vo.request.AuthorizeParam;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
 import java.util.HashMap;
-import java.util.List;
 import java.util.Set;
 import java.util.stream.Collectors;
 
@@ -42,6 +46,8 @@ public class AuthorizeRtkServiceImpl extends ServiceImpl<IAuthorizeRtkMapper, Au
     IRtkDeviceService rtkDeviceService;
     @Autowired
     ISysUserService sysUserService;
+    @Autowired
+    IExcelService excelService;
     @Override
     public void addAuth(AuthorizeRtk authorizeRtk) {
         if(StringUtils.isBlank(authorizeRtk.getRtkCode()) ||authorizeRtk.getValidStartTime() == null || authorizeRtk.getValidEndTime() == null){
@@ -65,29 +71,67 @@ public class AuthorizeRtkServiceImpl extends ServiceImpl<IAuthorizeRtkMapper, Au
         authorizeRtk.setValidStartTime(DateUtil.parse(startTime));
         authorizeRtk.setValidEndTime(DateUtil.parse(endTime));
         authorizeRtk.setSysUserId(Long.valueOf(StpUtil.getLoginId().toString()));
+        authorizeRtk.setOrderSn(DateUtils.getOrderSn());
         this.save(authorizeRtk);
 
 
     }
 
     @Override
-    public Object pageList(AuthorizeRtkParam param) {
+    public Object pageList(AuthorizeParam param) {
         if(StringUtils.isBlank(param.getRktCode())){
             throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
         }
+        return PageInfo.PageInfo(this.pageListByParam(param));
+    }
+
+    private Page<AuthorizeRtk> pageListByParam(AuthorizeParam param){
         LambdaQueryWrapper<AuthorizeRtk> wrapper = new LambdaQueryWrapper<>();
         wrapper.eq(AuthorizeRtk::getRtkCode,param.getRktCode());
         wrapper.orderByDesc(AuthorizeRtk::getId);
         Page<AuthorizeRtk> page = this.page(new Page<>(param.getPageNum(), param.getPageSize()), wrapper);
         Set<Long> sysIds = page.getRecords().stream().map(AuthorizeRtk::getSysUserId).collect(Collectors.toSet());
         HashMap<Long, SysUser> userMap = sysUserService.getByIds(sysIds);
+        Set<String> rtkCodes = page.getRecords().stream().map(AuthorizeRtk::getRtkCode).collect(Collectors.toSet());
+        HashMap<String, RtkDevice> rtkMap = rtkDeviceService.getByRtkSnCodeList(rtkCodes);
         for (AuthorizeRtk record : page.getRecords()) {
             SysUser sysUser = userMap.get(record.getSysUserId());
             if(sysUser != null){
                 record.setSysUserName(sysUser.getNickName());
             }
+            RtkDevice rtkDevice = rtkMap.get(record.getRtkCode());
+            if(rtkDevice!= null){
+                record.setSgRtkSn(rtkDevice.getSgRtkSn());
+                record.setCameraSn(rtkDevice.getCameraSn());
+            }
         }
+        return page;
+    }
 
-        return PageInfo.PageInfo(page);
+    @Override
+    public void export(HttpServletRequest req, HttpServletResponse resp) {
+        AuthorizeParam orderParam = CacheUtil.authorizeParam;
+        orderParam.setPageNum(1);
+        orderParam.setPageSize(5000);
+        Page<AuthorizeRtk> page = this.pageListByParam(orderParam);
+
+        ExcelWriter excelWriter = null;
+        try {
+            excelWriter = EasyExcel.write(resp.getOutputStream(),AuthorizeRtk.class).build();
+            excelService.commonExport(req,resp,"rtk授权订单",page.getRecords(),excelWriter);
+            while (page.hasNext()){
+                orderParam.setPageNum(orderParam.getPageNum()+1);
+                page = this.pageListByParam(orderParam);
+                if(page.getRecords().size() >0){
+                    excelService.commonExport(req,resp,"rtk授权订单",page.getRecords(),excelWriter);
+                }
+            }
+        }catch (Exception e){
+            e.printStackTrace();
+        }finally {
+            if(excelWriter !=null){
+                excelWriter.finish();
+            }
+        }
     }
 }

+ 64 - 58
src/main/java/com/fdkankan/manage/service/impl/CameraServiceImpl.java

@@ -113,19 +113,16 @@ public class CameraServiceImpl extends ServiceImpl<ICameraMapper, Camera> implem
     }
 
     @Override
-    public synchronized void in(String wifiName) {
-        if(StringUtils.isEmpty(wifiName) ){
+    public synchronized void in(CameraInOutParam param) {
+        if(StringUtils.isEmpty(param.getSnCode()) || param.getCameraType() == null || StringUtils.isBlank(param.getWifiNamePrefix())
+                || StringUtils.isBlank(param.getColour()) || StringUtils.isBlank(param.getVersion())){
             throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
         }
         List<CameraWifiPrefix> list = cameraWifiPrefixService.list();
         Set<String> wifiNamePrefixList = list.stream().map(CameraWifiPrefix::getWifiNamePrefix).collect(Collectors.toSet());
 
-        if(!wifiName.contains("_")){
-            throw new BusinessException(ResultCode.WIFI_NAME_ERROR);
-        }
-        String[] split = wifiName.split("_");
-        String cameraPrefix = split[0] +"_";
-        String snCode = split[1];
+        String cameraPrefix = param.getWifiNamePrefix();
+        String snCode = param.getSnCode();
 
         if(!wifiNamePrefixList.contains(cameraPrefix)){
             throw new BusinessException(ResultCode.WIFI_NAME_ERROR);
@@ -136,6 +133,9 @@ public class CameraServiceImpl extends ServiceImpl<ICameraMapper, Camera> implem
         if(cameraTypeMap.get(cameraPrefix) == null){
             throw new BusinessException(ResultCode.WIFI_NAME_ERROR);
         }
+        if(!Objects.equals(cameraTypeMap.get(cameraPrefix).getCameraType(), param.getCameraType())){
+            throw new BusinessException(ResultCode.CAMERA_TYPE_ERROR);
+        }
 
         LambdaQueryWrapper<Camera> wrapper = new LambdaQueryWrapper<>();
         wrapper.eq(Camera::getSnCode,snCode);
@@ -143,27 +143,20 @@ public class CameraServiceImpl extends ServiceImpl<ICameraMapper, Camera> implem
         if(count > 0){
             throw new BusinessException(ResultCode.WIFI_NAME_REPEAT);
         }
-        saveBatchCamera(Collections.singletonList(wifiName),cameraTypeMap);
+        saveBatchCamera(Arrays.asList(param));
     }
 
-    private Integer saveBatchCamera(List<String> wifiNameList,HashMap<String,CameraWifiPrefix> cameraTypeMap){
-        HashSet<String> wifiNameSet = new HashSet<>(wifiNameList);
+    private Integer saveBatchCamera(List<CameraInOutParam> params){
         List<Camera> cameraList = new ArrayList<>();
-        for (String wifiName : wifiNameSet) {
-            String[] res = wifiName.split("_");
-            if(res.length !=2 || StringUtils.isBlank(res[1])){
-                throw new BusinessException(ResultCode.WIFI_NAME_ERROR);
-            }
-            if(cameraTypeMap.get(res[0] +"_") == null){
-                throw new BusinessException(ResultCode.WIFI_NAME_ERROR);
-            }
+        for (CameraInOutParam param : params) {
             Camera camera = new Camera();
-            camera.setWifiName(wifiName);
-            camera.setSnCode(res[1]);
-            camera.setChildName(res[1]);
+            camera.setWifiName(param.getWifiNamePrefix() + param.getSnCode());
+            camera.setSnCode(param.getSnCode());
+            camera.setChildName(param.getSnCode());
             camera.setWifiPassword(CameraConstant.WIFI_PASSWORD_VALUE);
             camera.setChildPassword(CameraConstant.CHILD_PASSWORD_VALUE);
             camera.setActivatedTime(DateUtil.date2String(new Date(),DateUtil.DEFAULT_DATE_FORMAT));
+            camera.setParam(param);
             cameraList.add(camera);
 
         }
@@ -171,16 +164,16 @@ public class CameraServiceImpl extends ServiceImpl<ICameraMapper, Camera> implem
 
         List<CameraDetail> cameraDetailList = new ArrayList<>();
         for (Camera camera : cameraList) {
+            CameraInOutParam param = camera.getParam();
             CameraDetail cameraDetail = new CameraDetail();
             cameraDetail.setAgency(CameraConstant.DEFAULT_AGENT);
             cameraDetail.setCameraId(camera.getId());
             cameraDetail.setCountry(0);//默认中国
-            String wifiNamePrix = camera.getWifiName().split("_")[0]+"_";
-            CameraWifiPrefix cameraType = cameraTypeMap.get(wifiNamePrix);
-            cameraDetail.setType(cameraType.getCameraType());
-
+            cameraDetail.setType(param.getCameraType());
             cameraDetail.setTotalSpace(Long.valueOf(Constant.CAMERA_BASE_SPACE_VALUE));
             cameraDetail.setUsedSpace(0L);
+            cameraDetail.setColour(param.getColour());
+            cameraDetail.setVersion(param.getVersion());
 
             cameraDetail.setUnit(CacheUtil.cameraUnit);
             if(cameraDetail.getUnit().equals("SP")){
@@ -189,15 +182,11 @@ public class CameraServiceImpl extends ServiceImpl<ICameraMapper, Camera> implem
             if("aws".equals(CacheUtil.uploadType)){
                 cameraDetail.setCountry(1);//1-国外
             }
-            Long goodId = null;
+            Long goodId ;
             if(cameraDetail.getType() == 1 || cameraDetail.getType() == 4){
                 goodId = 4L;
-            }
-            if(cameraDetail.getType() == 9){
-                goodId = 9L;
-            }
-            if(cameraDetail.getType() == 10){
-                goodId = 10L;
+            }else {
+                goodId = Long.valueOf(cameraDetail.getType());
             }
             cameraDetail.setGoodsId(goodId);
 
@@ -211,19 +200,8 @@ public class CameraServiceImpl extends ServiceImpl<ICameraMapper, Camera> implem
         return  cameraDetailService.saveBatch(cameraDetailList) ? cameraList.size() : 0;
 
     }
-    @Override
-    public Integer ins(List<String> wifiNameList){
-        List<CameraWifiPrefix> cameraTypeList = cameraWifiPrefixService.list();
-        Set<String> wifiNamePrefixList = cameraTypeList.stream().map(CameraWifiPrefix::getWifiNamePrefix).collect(Collectors.toSet());
-        List<Integer> errorRow = getErrorRow(wifiNameList,wifiNamePrefixList);
-        HashMap<String,CameraWifiPrefix> cameraTypeMap = new HashMap<>();
-        cameraTypeList.forEach(entity->cameraTypeMap.put(entity.getWifiNamePrefix(),entity));
-
-        excelService.toExcelError(errorRow);
-        List<String> snCodeList = new ArrayList<>();
-        for (String wifiName : wifiNameList) {
-            snCodeList.add(wifiName.split("_")[1]);
-        }
+    public Integer ins(List<CameraInOutParam> params){
+        List<String> snCodeList = params.stream().map(CameraInOutParam::getSnCode).collect(Collectors.toList());
         LambdaQueryWrapper<Camera> wrapper = new LambdaQueryWrapper<>();
         wrapper.in(Camera::getSnCode,snCodeList);
         List<Camera> list = this.list(wrapper);
@@ -232,7 +210,7 @@ public class CameraServiceImpl extends ServiceImpl<ICameraMapper, Camera> implem
             List<Integer> errorRow2 = getErrorRow(snCodeList, newList);
             excelService.toExcelError(errorRow2);
         }
-        return saveBatchCamera(wifiNameList,cameraTypeMap);
+        return saveBatchCamera(params);
     }
 
 
@@ -644,7 +622,14 @@ public class CameraServiceImpl extends ServiceImpl<ICameraMapper, Camera> implem
     @Override
     public Integer insExcelList(List<HashMap<Integer, String>> excelRowList) {
         List<String> wifiNameList = new ArrayList<>();
+        List<CameraWifiPrefix> cameraTypeList = cameraWifiPrefixService.list();
+        HashMap<String,CameraWifiPrefix> cameraTypeMap = new HashMap<>();
+        cameraTypeList.forEach(entity->cameraTypeMap.put(entity.getWifiNamePrefix(),entity));
+
         Integer index = 0;
+        List<Integer> errorIndex = new ArrayList<>();
+        List<CameraInOutParam> params = new ArrayList<>();
+
         for (HashMap<Integer, String> map : excelRowList) {
             index ++;
             if(map.isEmpty()){
@@ -656,14 +641,37 @@ public class CameraServiceImpl extends ServiceImpl<ICameraMapper, Camera> implem
             if(index <4){   //从第四行开始
                 continue;
             }
+            String snCode = map.get(0);
+            String wifiPerName = map.get(1);
+            String colour = map.get(2);
+            String version = map.get(3);
+            if(StringUtils.isBlank(snCode) || StringUtils.isBlank(wifiPerName) || StringUtils.isBlank(colour) || StringUtils.isBlank(version)){
+                errorIndex.add(index -3);
+                continue;
+            }
+            CameraWifiPrefix cameraWifiPrefix = cameraTypeMap.get(wifiPerName);
+            if(cameraWifiPrefix == null){
+                errorIndex.add(index -3);
+                continue;
+            }
+
+            CameraInOutParam param = new CameraInOutParam();
+            param.setSnCode(snCode);
+            param.setWifiNamePrefix(wifiPerName);
+            param.setColour(colour);
+            param.setVersion(version);
+            param.setCameraType(cameraWifiPrefix.getCameraType());
+            params.add(param);
             String wifiName = map.get(0);
             wifiNameList.add(wifiName);
         }
 
-        if(wifiNameList.size() <=0){
-            throw new BusinessException(ResultCode.IN_TEMPLATE_EMPTY);
+        excelService.toExcelError(errorIndex);
+
+        if(params.size() <=0){
+            throw new BusinessException(ResultCode.OUT_TEMPLATE_EMPTY);
         }
-        return this.ins(wifiNameList);
+        return this.ins(params);
     }
 
     @Autowired
@@ -687,13 +695,12 @@ public class CameraServiceImpl extends ServiceImpl<ICameraMapper, Camera> implem
             String snCode = map.get(0);
             String outTypeString = map.get(1);
             String companyName = map.get(2);
-            String orderSn = map.get(3);
-            String agentName = map.get(4);
-            String buyDate = map.get(5);
+            String agentName = map.get(3);
+            String buyDate = map.get(4);
             CameraOutTypeEnum outTypeEnum = CameraOutTypeEnum.getByMsg(outTypeString);
             if(outTypeEnum == null || StringUtils.isBlank(snCode) || StringUtils.isBlank(buyDate)){
-                log.error("outError-->出库错误:出库类型为空或snCode为空:snCode:{},outType:{},companyName:{},orderSn:{},agentName:{}"
-                        ,snCode,outTypeString,companyName,orderSn,agentName);
+                log.error("outError-->出库错误:出库类型为空或snCode为空:snCode:{},outType:{},companyName:{},agentName:{}"
+                        ,snCode,outTypeString,companyName,agentName);
                 errorIndex.add(index -3);
             }
             CameraInOutParam param = new CameraInOutParam();
@@ -705,15 +712,14 @@ public class CameraServiceImpl extends ServiceImpl<ICameraMapper, Camera> implem
             if(StringUtils.isNotBlank(agentName)){
                 AgentNew agentNew = agentNewService.getByName(agentName);
                 if(agentNew == null){
-                    log.error("outError-->出库错误:代理商不存在:snCode:{},outType:{},companyName:{},orderSn:{},agentName:{}"
-                            ,snCode,outTypeString,companyName,orderSn,agentName);
+                    log.error("outError-->出库错误:代理商不存在:snCode:{},outType:{},companyName:{},agentName:{}"
+                            ,snCode,outTypeString,companyName,agentName);
                     errorIndex.add(index -3);
                 }else {
                     param.setAgentId(agentNew.getId());
                 }
             }
             param.setCompanyName(companyName);
-            param.setOrderSn(orderSn);
             param.setSnCode(snCode);
             params.add(param);
 

+ 33 - 39
src/main/java/com/fdkankan/manage/service/impl/InvoiceServiceImpl.java

@@ -85,7 +85,7 @@ public class InvoiceServiceImpl extends ServiceImpl<IInvoiceMapper, Invoice> imp
 
     @Override
     public synchronized ResultData  invoiceRegister(
-        Long userId, Long id, String invoiceNum,
+        Long userId, Long id, String invoiceNum,String oddNumber,
         String shipNum, MultipartFile file) throws IOException {
 
         Invoice invoice = this.getById(id);
@@ -108,50 +108,44 @@ public class InvoiceServiceImpl extends ServiceImpl<IInvoiceMapper, Invoice> imp
             invoiceRegister.setUpdateTime(DateUtils.getDate(new Date()));
         }
         //普通发票
-        if(InvoiceType.ORDINARY.code().equals(type)){
-            if(Objects.isNull(file) || file.isEmpty()){
-                throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
-            }
-            String fileName = file.getOriginalFilename();
-            String suffixName = fileName.substring(fileName.lastIndexOf("."));
-            fileName = UUID.randomUUID().toString().replace("-","");
-            File  localFile = File.createTempFile(fileName,suffixName);
-            file.transferTo(localFile);
-            String ossFilePath = OssPath.invoiceOssDir + fileName + suffixName;
-            fYunFileServiceInterface.uploadFile(localFile.getPath(),ossFilePath);
-            invoiceRegister.setInvoiceUrl(ossUrlPrefix + ossFilePath);
-
-            String orderNum  = null;
-            if(invoice.getOrderId()!= null){
-                Order order = orderService.getById(invoice.getOrderId());
-                orderNum = order == null ? null : order.getOrderSn();
-            }
-            if(invoice.getIncrementOrderId()!= null){
-                IncrementOrder order = incrementOrderService.getById(invoice.getIncrementOrderId());
-                orderNum = order == null ? null : order.getOrderSn();
-            }
-            if(invoice.getDownloadOrderId()!= null){
-                DownloadOrder order = downloadOrderService.getById(invoice.getDownloadOrderId());
-                orderNum = order == null ? null : order.getOrderSn();
-            }
+        if(Objects.isNull(file) || file.isEmpty()){
+            throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
+        }
+        String fileName = file.getOriginalFilename();
+        String suffixName = fileName.substring(fileName.lastIndexOf("."));
+        fileName = UUID.randomUUID().toString().replace("-","");
+        File  localFile = File.createTempFile(fileName,suffixName);
+        file.transferTo(localFile);
+        String ossFilePath = OssPath.invoiceOssDir + fileName + suffixName;
+        fYunFileServiceInterface.uploadFile(localFile.getPath(),ossFilePath);
+        invoiceRegister.setInvoiceUrl(ossUrlPrefix + ossFilePath);
+
+        String orderNum  = null;
+        if(invoice.getOrderId()!= null){
+            Order order = orderService.getById(invoice.getOrderId());
+            orderNum = order == null ? null : order.getOrderSn();
+        }
+        if(invoice.getIncrementOrderId()!= null){
+            IncrementOrder order = incrementOrderService.getById(invoice.getIncrementOrderId());
+            orderNum = order == null ? null : order.getOrderSn();
+        }
+        if(invoice.getDownloadOrderId()!= null){
+            DownloadOrder order = downloadOrderService.getById(invoice.getDownloadOrderId());
+            orderNum = order == null ? null : order.getOrderSn();
+        }
 
-            User user = userService.getById(invoice.getUserId());
-            String userName = user == null ? null : user.getNickName();
+        User user = userService.getById(invoice.getUserId());
+        String userName = user == null ? null : user.getNickName();
 
-            MailTemplate mailTemplate = this.setMailMsg(orderNum,userName);
+        MailTemplate mailTemplate = this.setMailMsg(orderNum,userName);
 
-            Boolean mail = mailTemplateService.sendMail(invoice.getEmailAddress(), mailTemplate,localFile.getPath());
-            if(!mail){
-                throw new BusinessException(ResultCode.MAIL_SEND_ERROR);
-            }
-        }else{//专用发票
-            if(StrUtil.isEmpty(shipNum)){
-                throw new BusinessException(ResultCode.SHIP_NUM_EMPTY);
-            }
-            invoiceRegister.setShipNum(shipNum);
+        Boolean mail = mailTemplateService.sendMail(invoice.getEmailAddress(), mailTemplate,localFile.getPath());
+        if(!mail){
+            throw new BusinessException(ResultCode.MAIL_SEND_ERROR);
         }
         invoice.setInvoiced(1);
         invoice.setUpdateTime(null);
+        invoice.setOddNumber(oddNumber);
         this.updateById(invoice);
         invoiceRegisterService.saveOrUpdate(invoiceRegister);
 

+ 13 - 0
src/main/java/com/fdkankan/manage/service/impl/RtkDeviceServiceImpl.java

@@ -299,4 +299,17 @@ public class RtkDeviceServiceImpl extends ServiceImpl<IRtkDeviceMapper, RtkDevic
         wrapper.set(RtkDevice::getValidEndTime,endTime);
         this.update(wrapper);
     }
+
+    @Override
+    public HashMap<String, RtkDevice> getByRtkSnCodeList(Set<String> rtkCodes) {
+        HashMap<String, RtkDevice> map = new HashMap<>();
+        if(rtkCodes == null || rtkCodes.isEmpty()){
+            return map;
+        }
+        LambdaQueryWrapper<RtkDevice> wrapper = new LambdaQueryWrapper<>();
+        wrapper.in(RtkDevice::getRtkSnCode,rtkCodes);
+        List<RtkDevice> list = this.list(wrapper);
+        list.forEach( e-> map.put(e.getRtkSnCode(),e));
+        return map;
+    }
 }

+ 11 - 6
src/main/java/com/fdkankan/manage/service/impl/SceneProServiceImpl.java

@@ -286,6 +286,10 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
                     record.setStatus(-1);
                     record.setWebSite(null);
                 }
+            }else {
+                if(record.getMeshComputeTime() != null){
+                    record.setComputeTime(record.getMeshComputeTime());
+                }
             }
             if(record.getStatus() != -2){
                 record.setComputeTime(null);
@@ -335,12 +339,13 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
                     record.setStatus(-4);
                 }
             }
-            if(record.getLocation() != null && (record.getLocation() == 5 || record.getLocation() == 6)){
-                if(record.getMixture() != 1){
-                    record.setSlamCount(record.getShootCount());
-                    record.setShootCount(null);
-                }
-            }
+
+//            if(record.getLocation() != null && (record.getLocation() == 5 || record.getLocation() == 6)){
+//                if(record.getMixture() != 1){
+//                    record.setSlamCount(record.getShootCount());
+//                    record.setShootCount(null);
+//                }
+//            }
         }
         return PageInfo.PageInfo(page);
     }

+ 2 - 0
src/main/java/com/fdkankan/manage/vo/InvoicePageParamVO.java

@@ -25,6 +25,8 @@ public class InvoicePageParamVO extends RequestBase {
 
     private String payTimeEnd;
 
+    private String oddNumber;
+
     public String getInvoiceTimeStart() {
         return DateUtils.getStartTime(invoiceTimeStart) ;
     }

+ 2 - 0
src/main/java/com/fdkankan/manage/vo/InvoiceVO.java

@@ -141,5 +141,7 @@ public class InvoiceVO {
 
     @ExcelIgnore
     private Long userId;
+    @ExcelProperty("开票审批单号")
+    private String oddNumber;
 
 }

+ 2 - 0
src/main/java/com/fdkankan/manage/vo/request/AuthorizeParam.java

@@ -39,4 +39,6 @@ public class AuthorizeParam extends RequestBase{
 
     private String listType;
     private BigDecimal amount;
+    private String rktCode;
+
 }

+ 0 - 8
src/main/java/com/fdkankan/manage/vo/request/AuthorizeRtkParam.java

@@ -1,8 +0,0 @@
-package com.fdkankan.manage.vo.request;
-
-import lombok.Data;
-
-@Data
-public class AuthorizeRtkParam extends RequestBase{
-    private String rktCode;
-}

+ 3 - 0
src/main/java/com/fdkankan/manage/vo/request/CameraInOutParam.java

@@ -19,4 +19,7 @@ public class CameraInOutParam {
     private Integer cameraType;
 
     private String wifiNamePrefix;
+
+    private String colour;
+    private String version;
 }

+ 1 - 0
src/main/java/com/fdkankan/manage/vo/response/CompanyVo.java

@@ -17,4 +17,5 @@ public class CompanyVo {
     private String qrLogo;
     private Integer showLogo;               //是否显示初始logo,0隐藏,1显示
     private String sceneVersion;
+    private Integer canUpWebsite;
 }

+ 2 - 0
src/main/java/com/fdkankan/manage/vo/response/SceneVo.java

@@ -54,4 +54,6 @@ public class SceneVo {
     private Long computeTime ; // 计算时长 单位秒
 
     private Integer slamCount ; // slam帧数
+
+    private Long meshComputeTime; //mesh计算时间 单位秒
 }

+ 1 - 1
src/main/resources/mapper/manage/CompanyMapper.xml

@@ -4,7 +4,7 @@
 
     <select id="pageList" resultType="com.fdkankan.manage.vo.response.CompanyVo">
         select c.id,c.company_name,c.company_desc ,c.sys_user_id as createUserId, u.user_name as createUserName,c.create_time,
-               c.top_logo,c.floor_logo,c.qr_logo,c.show_logo ,c.scene_version
+               c.top_logo,c.floor_logo,c.qr_logo,c.show_logo ,c.scene_version,c.can_up_website
         from  t_company c
         left join sys_user u on c.sys_user_id = u.id
         where c.rec_status = 'A'

+ 6 - 3
src/main/resources/mapper/manage/InvoiceMapper.xml

@@ -23,7 +23,8 @@
     i.`ship_address` as shipAddress,
       i.`email_address` AS email,
       i.`invoiced`,
-    i.`user_id` as userId
+    i.`user_id` as userId,
+    i.odd_number as oddNumber
       FROM t_invoice i
       LEFT JOIN t_order o ON i.`order_id` = o.`id`
       WHERE i.`consume_type` = 0 AND i.`rec_status` = 'A' AND o.`rec_status` = 'A' AND i.`type` != 1
@@ -64,7 +65,8 @@
       i.`ship_address` AS shipAddress,
       i.`email_address` AS email,
       i.`invoiced`,
-    i.`user_id` as userId
+    i.`user_id` as userId,
+    i.odd_number as oddNumber
     FROM t_invoice i
       LEFT JOIN t_increment_order o ON i.`increment_order_id` = o.`id`
       WHERE i.`consume_type` = 2 AND i.`rec_status` = 'A' AND o.`rec_status` = 'A' AND i.`type` != 1
@@ -105,7 +107,8 @@
       i.`ship_address` AS shipAddress,
       i.`email_address` AS email,
       i.`invoiced`,
-    i.`user_id` as userId
+    i.`user_id` as userId,
+    i.odd_number as oddNumber
     FROM t_invoice i
       LEFT JOIN t_download_order o ON i.`download_order_id` = o.`id`
       WHERE i.`consume_type` = 3 AND i.`rec_status` = 'A' AND o.`rec_status` = 'A' AND i.`type` != 1

+ 2 - 2
src/main/resources/mapper/manage/SceneProMapper.xml

@@ -24,7 +24,7 @@
         SELECT * FROM(
         select s.scene_name ,s.num,s.create_time,s.space as sceneSize
         ,s.view_count,s.status,s.pay_status,'v3' as scene_version ,s.web_site , s.thumb
-        ,null as algorithmTime,data_source,s.shoot_count,s.gps,s.user_id,s.camera_id,s.compute_time,null as location,null as mixture,s.laser_title
+        ,null as algorithmTime,data_source,s.shoot_count,s.gps,s.user_id,s.camera_id,s.compute_time,null as location,null as mixture,s.laser_title,null as slamCount,null as meshComputeTime
         from t_scene_pro s
         <include refid="commonWhere"></include>
         <if test="param.isLaser ==0 and param.sceneName != null and param.sceneName!='' ">
@@ -46,7 +46,7 @@
         UNION ALL
         select s.title as sceneName ,s.num,s.create_time,e.space as sceneSize
         ,e.view_count,s.scene_status as status,s.pay_status,'v4' as scene_version,e.web_site,e.thumb
-        ,algorithm_time,data_source,e.shoot_count,e.gps,s.user_id,s.camera_id,e.compute_time,e.location,e.mixture,s.laser_title
+        ,algorithm_time,data_source,e.shoot_count,e.gps,s.user_id,s.camera_id,e.compute_time,e.location,e.mixture,s.laser_title,e.slam_count,e.mesh_compute_time
         from t_scene_plus s
         left join t_scene_plus_ext e on s.id = e.plus_id
         <include refid="commonWhere"></include>

BIN
src/main/resources/template/cameraIn.xlsx


BIN
src/main/resources/template/cameraOut.xlsx