Browse Source

u8发货管理,回收增加备注

lyhzzz 2 years ago
parent
commit
3e52f8909d
35 changed files with 662 additions and 14 deletions
  1. 1 0
      src/main/java/com/fdkankan/sale/common/RepairStatusEnum.java
  2. 1 0
      src/main/java/com/fdkankan/sale/common/RepairStatusEnumMsg.java
  3. 1 0
      src/main/java/com/fdkankan/sale/common/RepairStatusProcessComing.java
  4. 1 0
      src/main/java/com/fdkankan/sale/common/RepairStatusProcessIng.java
  5. 21 0
      src/main/java/com/fdkankan/sale/controller/RepairRecoveryController.java
  6. 47 0
      src/main/java/com/fdkankan/sale/controller/RepairU8Controller.java
  7. 3 0
      src/main/java/com/fdkankan/sale/entity/PartLog.java
  8. 60 0
      src/main/java/com/fdkankan/sale/entity/RepairRecovery.java
  9. 68 0
      src/main/java/com/fdkankan/sale/entity/RepairU8.java
  10. 1 1
      src/main/java/com/fdkankan/sale/generate/AutoGenerate.java
  11. 3 0
      src/main/java/com/fdkankan/sale/mapper/IRepairMapper.java
  12. 18 0
      src/main/java/com/fdkankan/sale/mapper/IRepairRecoveryMapper.java
  13. 18 0
      src/main/java/com/fdkankan/sale/mapper/IRepairU8Mapper.java
  14. 1 1
      src/main/java/com/fdkankan/sale/service/IPartLogService.java
  15. 1 1
      src/main/java/com/fdkankan/sale/service/IPartService.java
  16. 18 0
      src/main/java/com/fdkankan/sale/service/IRepairRecoveryService.java
  17. 3 0
      src/main/java/com/fdkankan/sale/service/IRepairService.java
  18. 17 0
      src/main/java/com/fdkankan/sale/service/IRepairU8Service.java
  19. 1 1
      src/main/java/com/fdkankan/sale/service/impl/DingService.java
  20. 2 1
      src/main/java/com/fdkankan/sale/service/impl/PartLogServiceImpl.java
  21. 4 4
      src/main/java/com/fdkankan/sale/service/impl/PartServiceImpl.java
  22. 1 1
      src/main/java/com/fdkankan/sale/service/impl/RepairCustomerService.java
  23. 2 2
      src/main/java/com/fdkankan/sale/service/impl/RepairPersonnelService.java
  24. 31 0
      src/main/java/com/fdkankan/sale/service/impl/RepairRecoveryServiceImpl.java
  25. 5 0
      src/main/java/com/fdkankan/sale/service/impl/RepairServiceImpl.java
  26. 4 1
      src/main/java/com/fdkankan/sale/service/impl/RepairSupplyService.java
  27. 70 0
      src/main/java/com/fdkankan/sale/service/impl/RepairU8Service.java
  28. 30 0
      src/main/java/com/fdkankan/sale/service/impl/RepairU8ServiceImpl.java
  29. 14 1
      src/main/java/com/fdkankan/sale/util/StatusUtil.java
  30. 22 0
      src/main/resources/banner.txt
  31. 158 0
      src/main/resources/banner.txt.back
  32. 2 0
      src/main/resources/bootstrap.yml
  33. 23 0
      src/main/resources/mapper/sale/RepairMapper.xml
  34. 5 0
      src/main/resources/mapper/sale/RepairRecoveryMapper.xml
  35. 5 0
      src/main/resources/mapper/sale/RepairU8Mapper.xml

+ 1 - 0
src/main/java/com/fdkankan/sale/common/RepairStatusEnum.java

@@ -13,6 +13,7 @@ public enum  RepairStatusEnum {
     TO_BE_QUOTED(20, "维修报价"),
     TO_BE_CONFIRMED(30, "维修确认"),
     TO_BE_CANCELED(40, "维修支付"),
+    TO_BE_U8SEND(41, "u8发货"),
     TO_BE_PREPARED(50, "备件准备"),
     TO_BE_REPAIRED(60, "设备维修"),
     TO_BE_TESTED(70, "维修测试"),

+ 1 - 0
src/main/java/com/fdkankan/sale/common/RepairStatusEnumMsg.java

@@ -12,6 +12,7 @@ public enum RepairStatusEnumMsg {
     TO_BE_QUOTED(20, "{userName}费用确认中"),
     TO_BE_CONFIRMED(30, "待确认报价"),
     TO_BE_CANCELED(40, "待支付费用"),
+    TO_BE_U8SEND(41, "待u8发货"),
     TO_BE_PREPARED(50, "{userName}正在准备所需备件"),
     TO_BE_REPAIRED(60, "{userName}维修中"),
     TO_BE_TESTED(70, "{userName}正在测试"),

+ 1 - 0
src/main/java/com/fdkankan/sale/common/RepairStatusProcessComing.java

@@ -15,6 +15,7 @@ public enum RepairStatusProcessComing {
     TO_BE_QUOTED(20, "待报价","维修报价","{userName}费用确认中","sale"),
     TO_BE_CONFIRMED(30,"待确认", "维修确认","待确认报价",""),
     TO_BE_CANCELED(40, "已取消","维修支付","待支付费用","sale"),
+    TO_BE_U8SEND(41, "待u8发货","u8发货","u8发货",""),
     TO_BE_PREPARED(50,"待备料","备件准备", "{userName}正在准备所需备件","repairSupply"),
     TO_BE_REPAIRED(60, "维修中","设备维修","{userName}维修中","repairMan"),
     TO_BE_TESTED(70, "待测试","维修测试","{userName}正在测试","tester"),

+ 1 - 0
src/main/java/com/fdkankan/sale/common/RepairStatusProcessIng.java

@@ -18,6 +18,7 @@ public enum RepairStatusProcessIng {
     TO_BE_QUOTED(20, "待报价","维修检测","{userName}完成检测","repairMan"),
     TO_BE_CONFIRMED(30,"待确认", "维修报价","{userName}完成报价","sale"),
     TO_BE_CANCELED(40, "已取消","维修取消","已取消维修",""),
+    TO_BE_U8SEND(41, "待u8发货","u8发货","u8发货",""),
     TO_BE_PREPARED(50,"待备料","维修确认", "已确认维修",""),
     TO_BE_PREPARED_1(51,"维修中添加备件","维修检测", "{userName}维修中添加备件","repairMan"),
     TO_BE_REPAIRED(60, "维修中","备件准备","{userName}完成备料","repairSupply"),

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

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

+ 47 - 0
src/main/java/com/fdkankan/sale/controller/RepairU8Controller.java

@@ -0,0 +1,47 @@
+package com.fdkankan.sale.controller;
+
+
+import com.fdkankan.sale.common.ResultData;
+import com.fdkankan.sale.entity.SysUser;
+import com.fdkankan.sale.service.IRepairU8Service;
+import com.fdkankan.sale.service.impl.RepairU8Service;
+import com.fdkankan.sale.vo.request.RepairParam;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author 
+ * @since 2023-06-05
+ */
+@RestController
+@RequestMapping("/sale/repairU8")
+public class RepairU8Controller extends BaseController{
+
+
+    @Autowired
+    RepairU8Service repairU8Service;
+
+    @PostMapping("/u8List")
+    public ResultData u8List(@RequestBody RepairParam param){
+        SysUser user = getUser();
+        if(user != null && user.getRoleId() != 1){
+            param.setUserId(user.getId());
+        }
+        return ResultData.ok(repairU8Service.u8List(param));
+    }
+
+    @PostMapping("/u8Send")
+    public ResultData u8Send(@RequestBody RepairParam param){
+        SysUser user = getUser();
+        if(user != null && user.getRoleId() != 1){
+            param.setUserId(user.getId());
+        }
+        repairU8Service.u8Send(param);
+        return ResultData.ok();
+    }
+}
+

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

@@ -65,6 +65,9 @@ public class PartLog implements Serializable {
     private String repairId;
 
 
+    @TableField("repair_recovery_id")
+    private Integer repairRecoveryId;
+
     @TableField("rec_status")
     @TableLogic(value = "A",delval = "I")
     private String recStatus;

+ 60 - 0
src/main/java/com/fdkankan/sale/entity/RepairRecovery.java

@@ -0,0 +1,60 @@
+package com.fdkankan.sale.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 
+ * @since 2023-06-07
+ */
+@Getter
+@Setter
+@TableName("t_repair_recovery")
+public class RepairRecovery implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 回收id
+     */
+    @TableId(value = "recovery_id", type = IdType.AUTO)
+    private Integer recoveryId;
+
+    /**
+     * 工单
+     */
+    @TableField("repair_id")
+    private String repairId;
+
+    /**
+     * 备注
+     */
+    @TableField("remark")
+    private String remark;
+
+    @TableField("sys_user_id")
+    private Long sysUserId;
+
+    @TableField("rec_status")
+    @TableLogic(value = "A",delval = "I")
+    private String recStatus;
+
+    @TableField("create_time")
+    private Date createTime;
+
+    @TableField("update_time")
+    private Date updateTime;
+
+
+}

+ 68 - 0
src/main/java/com/fdkankan/sale/entity/RepairU8.java

@@ -0,0 +1,68 @@
+package com.fdkankan.sale.entity;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.util.Date;
+
+import jodd.util.Base64;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 
+ * @since 2023-06-05
+ */
+@Getter
+@Setter
+@TableName("t_repair_u8")
+public class RepairU8 implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * u8发件记录
+     */
+    @TableId("id")
+    private Integer id;
+
+    /**
+     * 维修单号
+     */
+    @TableField("repair_id")
+    private String repairId;
+
+    /**
+     * u8发货单号
+     */
+    @TableField("u8_num")
+    private String u8Num;
+
+    /**
+     * 操作人id
+     */
+    @TableField("sys_user_id")
+    private Long sysUserId;
+
+    @TableField("remark")
+    private String remark;
+
+    @TableField("rec_status")
+    @TableLogic(value = "A",delval = "I")
+    private String recStatus;
+
+    @TableField("create_time")
+    private Date createTime;
+
+    @TableField("update_time")
+    private Date updateTime;
+
+
+
+}

+ 1 - 1
src/main/java/com/fdkankan/sale/generate/AutoGenerate.java

@@ -18,7 +18,7 @@ public class AutoGenerate {
         String path =System.getProperty("user.dir");
 
         generate(path,"sale", getTables(new String[]{
-                "t_ding_user","t_ding_config"
+                "t_repair_recovery",
         }));
 
 //        generate(path,"goods", getTables(new String[]{

+ 3 - 0
src/main/java/com/fdkankan/sale/mapper/IRepairMapper.java

@@ -23,9 +23,12 @@ public interface IRepairMapper extends BaseMapper<Repair> {
 
     Page<RepairerVo> supplyOrderList(Page<Object> page, RepairParam param);
 
+    Page<RepairerVo> u8List(Page<Object> page, RepairParam param);
+
     Page<RepairerVo> repairerOrderList(Page<Object> page, RepairParam param);
 
     Page<RepairerVo> testOrderList(Page<Object> page, RepairParam param);
 
     Page<RepairerVo> pageInfoList(Page<Object> page, RepairInfoListParam param);
+
 }

+ 18 - 0
src/main/java/com/fdkankan/sale/mapper/IRepairRecoveryMapper.java

@@ -0,0 +1,18 @@
+package com.fdkankan.sale.mapper;
+
+import com.fdkankan.sale.entity.RepairRecovery;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 
+ * @since 2023-06-07
+ */
+@Mapper
+public interface IRepairRecoveryMapper extends BaseMapper<RepairRecovery> {
+
+}

+ 18 - 0
src/main/java/com/fdkankan/sale/mapper/IRepairU8Mapper.java

@@ -0,0 +1,18 @@
+package com.fdkankan.sale.mapper;
+
+import com.fdkankan.sale.entity.RepairU8;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 
+ * @since 2023-06-05
+ */
+@Mapper
+public interface IRepairU8Mapper extends BaseMapper<RepairU8> {
+
+}

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

@@ -16,7 +16,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
  */
 public interface IPartLogService extends IService<PartLog> {
 
-    void saveLog(Integer partId,Integer count, Long userId,Integer status,String repairId);
+    void saveLog(Integer partId,Integer count, Long userId,Integer status,String repairId,Integer repairRecoveryId);
 
     PageInfo pageList(RequestBase param);
 }

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

@@ -28,7 +28,7 @@ public interface IPartService extends IService<Part> {
 
     void outStock(Integer partId,Integer count,Long userId,String repairId);
 
-    void recovery(Integer partId, Integer partCount, Long userId, String repairId,Integer status);
+    void recovery(Integer partId, Integer partCount, Long userId, String repairId,Integer status,Integer repairRecoveryId);
 
     HashMap<Integer, Part> getHashMap();
 }

+ 18 - 0
src/main/java/com/fdkankan/sale/service/IRepairRecoveryService.java

@@ -0,0 +1,18 @@
+package com.fdkankan.sale.service;
+
+import com.fdkankan.sale.entity.Repair;
+import com.fdkankan.sale.entity.RepairRecovery;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 
+ * @since 2023-06-07
+ */
+public interface IRepairRecoveryService extends IService<RepairRecovery> {
+
+    RepairRecovery saveByParam(Repair param, Long userId);
+}

+ 3 - 0
src/main/java/com/fdkankan/sale/service/IRepairService.java

@@ -25,6 +25,8 @@ public interface IRepairService extends IService<Repair> {
 
     Page<RepairerVo> supplyOrderList( RepairParam param);
 
+    Page<RepairerVo> u8List(RepairParam param);
+
     Page<RepairerVo> repairerOrderList(RepairParam param);
 
     Page<RepairerVo> testOrderList(RepairParam param);
@@ -48,4 +50,5 @@ public interface IRepairService extends IService<Repair> {
     void updateCancelStatus(String repairId, Integer status);
 
     void updateRepairInvoiceStatus(String repairId, Integer InvoiceStatus);
+
 }

+ 17 - 0
src/main/java/com/fdkankan/sale/service/IRepairU8Service.java

@@ -0,0 +1,17 @@
+package com.fdkankan.sale.service;
+
+import com.fdkankan.sale.entity.RepairU8;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 
+ * @since 2023-06-05
+ */
+public interface IRepairU8Service extends IService<RepairU8> {
+
+    void saveByParam(String repairId, String trackingNum,Long sysUserId);
+}

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

@@ -107,7 +107,7 @@ public class DingService {
                 phones.add(sysUser.getDingAccount());
 
             }
-            if(repairLog.getRepairStatus().equals(RepairStatusProcessComing.TO_BE_PREPARED.getStatus())){
+            if(repairLog.getRepairStatus().equals(RepairStatusProcessComing.TO_BE_U8SEND.getStatus())){
                 List<SysUser> userList = sysUserService.getByRoleType(6);
                 for (SysUser user : userList) {
                     if(StringUtils.isNotBlank(user.getDingAccount())){

+ 2 - 1
src/main/java/com/fdkankan/sale/service/impl/PartLogServiceImpl.java

@@ -31,7 +31,7 @@ public class PartLogServiceImpl extends ServiceImpl<IPartLogMapper, PartLog> imp
     IPartService partService;
 
     @Override
-    public void saveLog(Integer partId,Integer count, Long userId,Integer status,String repairId) {
+    public void saveLog(Integer partId,Integer count, Long userId,Integer status,String repairId,Integer repairRecoveryId) {
         Part part = partService.getById(partId);
         if(part == null){
             throw new BusinessException(ResultCode.PART_NOT_EXITS);
@@ -43,6 +43,7 @@ public class PartLogServiceImpl extends ServiceImpl<IPartLogMapper, PartLog> imp
         partLog.setCount(count);
         partLog.setSysUserId(userId);
         partLog.setRepairId(repairId);
+        partLog.setRepairRecoveryId(repairRecoveryId);
         this.save(partLog);
     }
 

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

@@ -78,7 +78,7 @@ public class PartServiceImpl extends ServiceImpl<IPartMapper, Part> implements I
         wrapper.eq(Part::getPartId,part.getPartId());
         wrapper.setSql("part_stock = part_stock +" + part.getPartStock());
         this.update(wrapper);
-        partLogService.saveLog(part.getPartId(),part.getPartStock(),userId,0,null);
+        partLogService.saveLog(part.getPartId(),part.getPartStock(),userId,0,null,null);
     }
 
     @Override
@@ -98,19 +98,19 @@ public class PartServiceImpl extends ServiceImpl<IPartMapper, Part> implements I
         wrapper.eq(Part::getPartId,partId);
         wrapper.setSql("part_stock = part_stock -" + count);
         this.update(wrapper);
-        partLogService.saveLog(partId,count,userId,1,repairId);
+        partLogService.saveLog(partId,count,userId,1,repairId,null);
 
     }
 
     @Override
-    public void recovery(Integer partId, Integer partCount, Long userId, String repairId,Integer status) {
+    public void recovery(Integer partId, Integer partCount, Long userId, String repairId,Integer status,Integer repairRecoveryId) {
         if(status.equals(RepairStatusEnum.TO_BE_CANCELED_RECOVERED.status())){
             LambdaUpdateWrapper<Part> wrapper = new LambdaUpdateWrapper<>();
             wrapper.eq(Part::getPartId,partId);
             wrapper.setSql("part_stock = part_stock +" +partCount);
             this.update(wrapper);
         }
-        partLogService.saveLog(partId,partCount,userId,2,repairId);
+        partLogService.saveLog(partId,partCount,userId,2,repairId,repairRecoveryId);
 
     }
 

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

@@ -76,7 +76,7 @@ public class RepairCustomerService {
             if(collect.size() <=0){
                 repairLogService.saveBySysUser(param.getUserId(),repair.getRepairId(),RepairStatusEnum.TO_BE_REPAIRED.status(),repair.getStatus(),"维修确认");
             }else {
-                repairLogService.saveBySysUser(param.getUserId(),repair.getRepairId(),RepairStatusEnum.TO_BE_PREPARED.status(),repair.getStatus(),"维修确认");
+                repairLogService.saveBySysUser(param.getUserId(),repair.getRepairId(),RepairStatusEnum.TO_BE_U8SEND.status(),repair.getStatus(),"维修确认");
             }
         }
         if(param.getConfirm() == 1) {

+ 2 - 2
src/main/java/com/fdkankan/sale/service/impl/RepairPersonnelService.java

@@ -107,7 +107,7 @@ public class RepairPersonnelService {
         Integer repairStatus = RepairStatusEnum.TO_BE_QUOTED.status();
         if(repairRegister.getDefineDamage() == 0 && repair.getWarrantyType() == 0){
             if(param.getPartList().size() >0){
-                repairStatus = RepairStatusEnum.TO_BE_PREPARED.status();
+                repairStatus = RepairStatusEnum.TO_BE_U8SEND.status();
             }else {
                 repairStatus = RepairStatusEnum.TO_BE_REPAIRED.status();
             }
@@ -181,7 +181,7 @@ public class RepairPersonnelService {
         RepairRegisterLog repairRegisterLog = repairRegisterLogService.saveLog(repairRegister);
         this.addRepairPart(param.getPartList(),repair,repairRegister,repairRegisterLog.getRegisterLogId());
         if(repair.getWarrantyType() == 0){
-            repairLogService.saveBySysUser(userId,repair.getRepairId(),RepairStatusEnum.TO_BE_PREPARED.status(),repair.getStatus(),"维修中添加备件",null,repairRegisterLog.getRegisterLogId());
+            repairLogService.saveBySysUser(userId,repair.getRepairId(),RepairStatusEnum.TO_BE_U8SEND.status(),repair.getStatus(),"维修中添加备件",null,repairRegisterLog.getRegisterLogId());
         }else {
             repairLogService.saveBySysUser(userId,repair.getRepairId(),RepairStatusEnum.TO_BE_QUOTED.status(),repair.getStatus(),"维修中添加备件",null,repairRegisterLog.getRegisterLogId());
         }

+ 31 - 0
src/main/java/com/fdkankan/sale/service/impl/RepairRecoveryServiceImpl.java

@@ -0,0 +1,31 @@
+package com.fdkankan.sale.service.impl;
+import java.util.Date;
+
+import com.fdkankan.sale.entity.Repair;
+import com.fdkankan.sale.entity.RepairRecovery;
+import com.fdkankan.sale.mapper.IRepairRecoveryMapper;
+import com.fdkankan.sale.service.IRepairRecoveryService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 
+ * @since 2023-06-07
+ */
+@Service
+public class RepairRecoveryServiceImpl extends ServiceImpl<IRepairRecoveryMapper, RepairRecovery> implements IRepairRecoveryService {
+
+    @Override
+    public RepairRecovery saveByParam(Repair param, Long userId) {
+        RepairRecovery repairRecovery = new RepairRecovery();
+        repairRecovery.setRepairId(param.getRepairId());
+        repairRecovery.setRemark(param.getRemark());
+        repairRecovery.setSysUserId(userId);
+        this.save(repairRecovery);
+        return repairRecovery;
+    }
+}

+ 5 - 0
src/main/java/com/fdkankan/sale/service/impl/RepairServiceImpl.java

@@ -69,6 +69,11 @@ public class RepairServiceImpl extends ServiceImpl<IRepairMapper, Repair> implem
     }
 
     @Override
+    public Page<RepairerVo> u8List( RepairParam param) {
+        return this.getBaseMapper().u8List(new Page<>(param.getPageNum(),param.getPageSize()),param);
+    }
+
+    @Override
     public Page<RepairerVo> repairerOrderList(RepairParam param) {
         return this.getBaseMapper().repairerOrderList(new Page<>(param.getPageNum(),param.getPageSize()),param);
     }

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

@@ -55,6 +55,8 @@ public class RepairSupplyService {
     IPriceListService priceListService;
     @Autowired
     IPartLogService partLogService;
+    @Autowired
+    IRepairRecoveryService repairRecoveryService;
 
     /**
      * 维修备件管理 供应链
@@ -159,9 +161,10 @@ public class RepairSupplyService {
                 && !repair.getStatus().equals(RepairStatusEnum.TO_BE_CANCELED_RECOVERED.status())){
             throw new BusinessException(ResultCode.REPAIR_STATUS_NOT_EXITS);
         }
+        RepairRecovery repairRecovery = repairRecoveryService.saveByParam(param, userId);
         List<RepairRegisterPartVo> partVoList = this.partInfo(param.getRepairId(),1);
         for (RepairRegisterPartVo partVo : partVoList) {
-            partService.recovery(partVo.getPartId(),partVo.getPartCount(),userId,repair.getRepairId(),repair.getStatus());
+            partService.recovery(partVo.getPartId(),partVo.getPartCount(),userId,repair.getRepairId(),repair.getStatus(),repairRecovery.getRecoveryId());
         }
 
         repairLogService.saveBySysUser(userId,param.getRepairId(),RepairStatusEnum.TO_BE_SHIPPED.status(),repair.getStatus(),"备件回收");

+ 70 - 0
src/main/java/com/fdkankan/sale/service/impl/RepairU8Service.java

@@ -0,0 +1,70 @@
+package com.fdkankan.sale.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fdkankan.sale.common.PageInfo;
+import com.fdkankan.sale.common.RepairStatusEnum;
+import com.fdkankan.sale.common.ResultCode;
+import com.fdkankan.sale.entity.Part;
+import com.fdkankan.sale.entity.PartLog;
+import com.fdkankan.sale.entity.PriceList;
+import com.fdkankan.sale.entity.Repair;
+import com.fdkankan.sale.exception.BusinessException;
+import com.fdkankan.sale.service.*;
+import com.fdkankan.sale.util.StatusUtil;
+import com.fdkankan.sale.vo.request.RepairParam;
+import com.fdkankan.sale.vo.response.RepairRegisterPartVo;
+import com.fdkankan.sale.vo.response.RepairerVo;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+@Service
+public class RepairU8Service {
+
+    @Autowired
+    IRepairService repairService;
+    @Autowired
+    IRepairLogService repairLogService;
+    @Autowired
+    ISysUserService sysUserService;
+    @Autowired
+    IRepairU8Service repairU8Service;
+
+    /**
+     * 维修备件管理 供应链
+     * statusParam 0 待备料,1已备料,2待回收
+     *      * status 0待接单,10待检测,20待报价,30待确认,40已取消,50待备料,60维修中,70待测试,
+     *      *        80待支付(已完结),90待回收,100待发货,110已发货
+     */
+    public Object u8List(RepairParam param) {
+        List<Integer> repairStatus = StatusUtil.getU8Status(param.getStatusParam());
+        param.setStatusList(repairStatus);
+        Page<RepairerVo>  voPage = repairService.u8List(param);
+        sysUserService.setSaleNameAndRepairManName(voPage.getRecords());
+        return PageInfo.PageInfo(voPage);
+    }
+
+
+    public void u8Send(RepairParam param) {
+        if(StringUtils.isBlank(param.getRepairId()) || StringUtils.isBlank(param.getTrackingNum())){
+            throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
+        }
+        Repair repair = repairService.getById(param.getRepairId());
+        if(repair == null){
+            throw new BusinessException(ResultCode.REPAIR_NOT_EXITS);
+        }
+        if(!repair.getStatus().equals(RepairStatusEnum.TO_BE_U8SEND.status())){
+            throw new BusinessException(ResultCode.REPAIR_STATUS_NOT_EXITS);
+        }
+
+        repairLogService.saveBySysUser(param.getUserId(),param.getRepairId(),RepairStatusEnum.TO_BE_PREPARED.status(),repair.getStatus(),"备件准备");
+
+        repairU8Service.saveByParam(param.getRepairId(),param.getTrackingNum(),param.getUserId());
+
+    }
+}

+ 30 - 0
src/main/java/com/fdkankan/sale/service/impl/RepairU8ServiceImpl.java

@@ -0,0 +1,30 @@
+package com.fdkankan.sale.service.impl;
+import java.util.Date;
+
+import com.fdkankan.sale.entity.RepairU8;
+import com.fdkankan.sale.mapper.IRepairU8Mapper;
+import com.fdkankan.sale.service.IRepairU8Service;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 
+ * @since 2023-06-05
+ */
+@Service
+public class RepairU8ServiceImpl extends ServiceImpl<IRepairU8Mapper, RepairU8> implements IRepairU8Service {
+
+    @Override
+    public void saveByParam(String repairId, String trackingNum,Long sysUserId) {
+        RepairU8 repairU8 = new RepairU8();
+        repairU8.setRepairId(repairId);
+        repairU8.setU8Num(trackingNum);
+        repairU8.setSysUserId(sysUserId);
+        repairU8.setRemark("");
+        this.save(repairU8);
+    }
+}

+ 14 - 1
src/main/java/com/fdkankan/sale/util/StatusUtil.java

@@ -69,7 +69,7 @@ public class StatusUtil {
     /**
      * 测试工程师
      * statusParam 0 待测试,1测试完成
-     *      * status 0待接单,10待检测,20待报价,30待确认,40已取消,50待备料,60维修中,70待测试,
+     *      * status 0待接单,10待检测,20待报价,30待确认,40已取消,41u8待发货,50待备料,60维修中,70待测试,
      *      *        80待支付(已完结),90待回收,100待发货,110已发货
      */
     public static List<Integer> getTesterStatus(Integer statusParam) {
@@ -84,6 +84,18 @@ public class StatusUtil {
     }
 
 
+    public static List<Integer> getU8Status(Integer statusParam) {
+        if(statusParam == null){
+            throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
+        }
+        switch (statusParam){
+            case 0 : return Collections.singletonList(41);
+            case 1 : return Arrays.asList(50,60,70,80,90,91,100,110);
+            default: throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
+        }
+    }
+
+
     public static String getCameraName(Integer cameraType){
         switch (cameraType){
             case 0 : return "四维看看";
@@ -101,4 +113,5 @@ public class StatusUtil {
         }
         return  null;
     }
+
 }

+ 22 - 0
src/main/resources/banner.txt

@@ -0,0 +1,22 @@
+
+//                          _ooOoo_                               //
+//                         o8888888o                              //
+//                         88" . "88                              //
+//                         (| ^_^ |)                              //
+//                         O\  =  /O                              //
+//                      ____/`---'\____                           //
+//                    .'  \\|     |//  `.                         //
+//                   /  \\|||  :  |||//  \                        //
+//                  /  _||||| -:- |||||-  \                       //
+//                  |   | \\\  -  /// |   |                       //
+//                  | \_|  ''\---/''  |   |                       //
+//                  \  .-\__  `-`  ___/-. /                       //
+//                ___`. .'  /--.--\  `. . ___                     //
+//              ."" '<  `.___\_<|>_/___.'  >'"".                  //
+//            | | :  `- \`.;`\ _ /`;.`/ - ` : | |                 //
+//            \  \ `-.   \_ __\ /__ _/   .-` /  /                 //
+//      ========`-.____`-.___\_____/___.-`____.-'========         //
+//                           `=---='                              //
+//      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^        //
+//             佛祖保佑          永无BUG         永不修改         //
+

+ 158 - 0
src/main/resources/banner.txt.back

@@ -0,0 +1,158 @@
+...................o888888o.o88888888o.
+.................8888888888888888888888888o.
+...............888::::888888888888888888888888o.
+.............88::::::::88888888888888888888888888o.
+...........o8:::::::::888::顶88888888888888888888888.
+..........8888:8::::::8:::::::::顶88888888888888888888.
+.........8888::::8888::::::::::::::::顶88888888888 ''''88
+........8888:::888888888::::::::::::::::顶888888888 8
+.......88.88888888888888888:::::::::::::顶88888888888
+......88..888888888888888888:::::::::::顶88888888888888
+......88.888888888888888888888::::::::顶88888888888888888
+......8..8888888888888888888888::::::顶88888888888888888888
+........8888888888888888::88888:::::顶8888888888888888888888
+......88888888888888888::::8888::::顶8888888888888888 ''''8888
+.....88888888888888888::::8888::::顶:8::***::888888888 888
+....88888888888888888::::888:::::顶::::*EYE*::888888888 88
+..888888888888888888::::88::::::顶:::::::::::::888888888 88
+.8888888888888888888::::8::::::顶:::::::::::::顶888888888 88
+888...8888888888::88::::8:::::顶:::8oo8::::::88888888888888 8
+88...88888888888:::8:::::::::顶:::::::::::::88888888888888888
+.8..8888888888888:::::::::::顶::"8888888":::顶88888888888888888
+..8888888888::888::::::::::顶:::::"8a8"::::顶88888888888888888888
+.888888888:::::88:::::::::顶88::::::::::::顶88888888888888888888888
+8888888888:::::8:::::::::顶88888::::::::顶888888888888888888888888888
+888888888:::::8:::::::::顶8888888ooooo顶8888888888888888888888888888888
+888888.顶::::::::::::::顶8888888888::::::顶8888888888888888 ''''888888888
+8888..顶:::::::::::::::顶88888888888::::::顶8888888888888888 88888888
+.888..顶::::::::::::::顶8888888888888:::::::顶888888888888888 888888
+..888.顶:::::::::::::顶88888888888888888::::::顶8888888888888 88888
+...88.顶:::::::::::::8888:88888888888888888:::::顶顶888888888 8888
+...88.顶:::::::::::8888顶::88888::888888888888:::::顶顶88888 888
+...8...顶::::::::::8888顶:::8888:::::88888888888::::::顶顶88 888
+.......8顶:::::::8888顶:::::888:::::::88:::8888888:::::::顶顶 88
+......88顶:::::::8888顶::::::88:::::::::8:::::888888::::::::顶顶 88
+.....8888顶:::::888顶:::::::::88::::::::::顶::::8888::::::::::::顶 8
+....88888:顶::::888顶::::::::::8:::::::::::顶::::888::::::::::::::顶
+...88.888:顶:::888:顶::::::::::8::::::::::::顶::888::::::::::::::::顶
+...8.88888顶:::88::顶::::::::::::::::::::::::顶:88::::::::::::::::::顶
+.....88888顶:::88::顶:::::::::::::::::::::::::顶88:::::::::::::::::::顶
+.....88888顶:::88::顶:::::::::::::::::::::::::顶:8::::::::::::::::::::顶
+....888888顶::::8::顶::::::::::::::8888::::::::顶8::::::::::::8888:::::顶
+....88888..顶:::8::顶顶:::::::::::888888:::::::顶::::::::::::888888::::顶
+....8888...顶顶:::::顶顶::::::::::888888:::::::顶顶::::::::::888888::::顶
+....8888....顶:::::::顶顶::::::::::8888:::::::顶顶顶::::::::::8888::::顶''''
+.....888....顶顶::::::顶顶顶:::::::::::::::::顶顶::顶::::::::::::::::顶''''
+......88.....顶::::::::顶顶顶顶:::::::::::顶顶顶:::顶顶:::::::::::::顶''''
+.......88....顶顶:::::::::顶顶顶顶顶顶顶顶顶顶:::::::顶顶顶顶顶顶顶顶''''
+........88....顶顶::::::::::::顶顶顶顶顶顶顶::::::::::::顶顶顶顶顶o''''
+.........88...8顶顶::::::::::::::::::::::::::::::::::::::::顶
+..........8...88顶顶::::::::::::::::::::::顶:::顶::::::::::顶
+..............888顶顶::::::::::::::::::顶顶::::::顶顶::::::顶
+.............88888顶顶:::::::::::::::顶顶顶:::::::顶顶:::::顶
+.............888888顶顶:::::::::::::顶顶顶:::::::::顶顶:::顶
+............88888888顶顶:::::::::::顶顶顶:::::::::::顶:::顶
+...........88.8888888.顶::::::::顶顶顶::::::::::::::顶::顶
+...........8..888888..顶::::::顶顶:::::::::::::::::顶::顶
+..............888888..顶:::::顶:::::::::::::::::::顶::顶顶
+.............888888...顶::::顶::::::::::::::::::::::::顶顶
+.............888888...顶::::顶::::::::::::::::::::::::顶:顶
+.............88888...顶::::::::::::::8::::::::::::::::顶::顶
+............88888...顶:::::::::::::::88::::::::::::::::顶::顶
+...........88888...顶::::::::::::::::8::::::::::::::::::顶::顶
+..........88888...顶:::::顶:::::::::::::::::::::顶::::::::顶::顶
+..........8888...顶:::::顶:::::::::::::::::::::::顶顶::::::顶::顶
+.........8888...顶:::::顶:::::::::::::::::::::::顶顶顶:::::::顶:顶
+........888....顶:::::顶顶::::::::::::::::::::::顶顶顶::::::::顶:顶
+......8888....顶::::::顶顶:::::::::::::::::::::顶顶顶::::::::: 顶:顶
+.....888......顶:::::顶:::::::::::::::::::::::顶顶::::::::::::::顶:顶
+..8888.......顶::::::::::::::::::::::::::::::顶::::::::::::::::::顶:顶
+.............顶::::::::::::::::::::::::::::::::::::::::::::::::::顶:顶
+............顶::::::::顶:::::::::::::::::::::::::::::::::::::::::顶:顶
+............顶::::::::顶:::::::::::::::::顶::::::::::::::::::::::顶:顶
+...........顶::::::::::顶::::::::::::::顶::::::::::::::::::::::::顶:顶
+...........顶:::::::::::顶8::::::::8:顶:::::::::::::::::::::::::顶:顶p
+...........顶::::::::::::888hole888顶:::::::::::::::::::::::::::顶:顶o
+...........顶:::::::::::::88888888顶:::::::::::::::::::::::::::顶:顶p
+...........顶::::::::::::::888888顶::::::::::::::::::::::::::::顶:顶
+...........顶:::::::::::::::88888顶:::::::::::::::::::::::::::顶:顶
+...........顶:::::::::::::::::88顶::::::::::::::::::::::::::::顶顶
+...........顶:::::::::::::::::::顶:::::::::::::::::::::::::::顶顶
+...........顶:::::::::::::::::::顶::::::::::::::::::::::::::顶顶
+............顶:::::::::::::::::顶::::::::::::::::::::::::::顶顶
+............顶:::::::::::::::::顶::::::::::::::::::::::::::顶
+.............顶:::::::::::::::顶::::::::::::::::::::::::::顶
+.............顶:::::::::::::::顶:::::::::::::::::::::::::顶
+..............顶:::::::::::::顶:::::::::::::::::::::::::顶
+..............顶:::::::::::::顶:::::::::::::::::::::::顶
+...............顶:::::::::::顶:::::::::::::::::::::::顶
+...............顶:::::::::::顶::::::::::::::::::::::顶
+................顶:::::::::顶::::::::::::::::::::::顶
+................顶:::::::::顶:::::::::::::::::::::顶
+.................顶:::::::顶:::::::::::::::::::::顶
+..................顶::::::顶::::::::::::::::::::顶
+..................顶:::::顶::::::::::::::::::::顶
+...................顶:::顶::::::::::::::::::::顶
+...................顶::顶::::::::::::::::::::顶
+....................顶:顶:::::::::::::::::::顶
+....................顶顶:::::::::::::::::::顶
+....................顶顶::::::::::::::::::顶
+....................顶顶:::::::::::::::::顶
+....................顶顶:::::顶::::::::顶顶
+....................顶顶::::顶顶:::::::顶顶
+....................顶顶::::::顶顶:::::顶顶
+.....................顶顶::::::::::::::顶顶
+.....................顶顶::::顶:::::::::顶顶
+......................顶顶::顶顶顶:::::::顶顶
+......................顶顶::顶顶顶:::::::顶顶
+......................顶顶:::顶顶::::::::::顶
+.......................顶顶::顶顶::::::::::顶
+.......................顶顶::顶顶:::::::::::顶
+.......................顶顶:::顶::::::::::::顶
+.......................顶顶:::::::::::::::::顶
+.......................顶顶:::::::::::::::::顶
+.......................顶顶::::::::::::::::::顶
+.......................顶顶::::::::::::::::::顶
+.......................顶顶::::::::::::::::::顶
+........................顶顶:::::::::::::::::顶
+........................顶顶:::::::::::::::::顶
+........................顶顶:::::::::::::::::顶
+........................顶顶:::::::::::::::::顶
+........................顶顶:::::::::::::::::顶
+.........................顶顶:::::::::::::::顶
+.........................顶顶:::::::::::::::顶
+.........................顶顶:::::::::::::::顶
+.........................顶顶::::::::::::::顶
+..........................顶顶:::::::::::::顶
+..........................顶顶:::::::::::::顶
+..........................顶顶:::::::::::::顶
+..........................顶顶::::::::::::顶
+..........................顶顶::::::::::::顶
+...........................顶顶:::::::::::顶
+...........................顶顶::::::::::顶
+...........................顶顶::::::::::顶
+............................顶顶::::::::顶
+............................顶顶::::::::顶
+............................顶顶::::::::顶
+.............................顶顶:::::::顶
+.............................顶顶:::::::顶
+..............................顶顶::::::顶
+..............................顶顶::::::顶
+..............................顶顶::::::顶
+..............................顶顶::::::顶
+..............................顶顶::::::顶
+..............................顶顶::::::顶
+.............................顶顶:::::::顶
+............................顶:顶::::::::顶
+............................顶:顶:::::::::顶
+............................顶:顶::::::::::顶
+............................顶:顶:::::::::::顶
+............................顶:顶::::::::::::顶
+............................顶:顶:::::::::::::顶
+............................顶:顶::::::::::::::顶
+............................顶顶:::::::::::::::::顶
+..............................顶顶::::::::::::::::顶
+................................顶顶顶:::::::::顶顶
+..................................顶顶::顶::::顶顶
+...................................顶顶顶顶顶顶顶
+......................................顶顶顶顶顶

+ 2 - 0
src/main/resources/bootstrap.yml

@@ -7,6 +7,8 @@ spring:
       max-file-size: 1024MB
       # 设置单次请求文件的总大小
       max-request-size: 1024MB
+  banner:
+    location: /banner.txt
 logging:
   config: classpath:logback-spring.xml
 

+ 23 - 0
src/main/resources/mapper/sale/RepairMapper.xml

@@ -71,6 +71,29 @@
         order by r.create_time desc
     </select>
 
+    <select id="u8List" resultType="com.fdkankan.sale.vo.response.RepairerVo">
+        select distinct r.*,rr.check_result,o.create_time as orderReceivingTime,c.customer_name,c.company_name,
+        o.sys_user_id as saleId,rr.sys_user_id as repairManId
+        from t_repair r
+        left join  t_order_receiving o on r.repair_id = o.repair_id
+        left join  t_repair_register rr on r.repair_id = rr.repair_id
+        left join  t_customer c on r.repair_id = c.repair_id
+        where r.rec_status = 'A' and r.status in
+        <foreach item="status" collection="param.statusList" open="(" separator="," close=")">
+            #{status}
+        </foreach>
+        <if test="param.repairId != null and param.repairId != ''">
+            and r.repair_id like  concat ('%',#{param.repairId},'%')
+        </if>
+        <if test="param.cameraType != null">
+            and r.camera_type = #{param.cameraType}
+        </if>
+        <if test="param.cameraSnCode != null and param.cameraSnCode != ''">
+            and r.camera_sn_code like  concat ('%',#{param.cameraSnCode},'%')
+        </if>
+        order by r.create_time desc
+    </select>
+
 
     <select id="repairerOrderList" resultType="com.fdkankan.sale.vo.response.RepairerVo">
         select distinct  r.*,o.create_time as orderReceivingTime,c.customer_name,c.company_name,

+ 5 - 0
src/main/resources/mapper/sale/RepairRecoveryMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.fdkankan.sale.mapper.IRepairRecoveryMapper">
+
+</mapper>

+ 5 - 0
src/main/resources/mapper/sale/RepairU8Mapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.fdkankan.sale.mapper.IRepairU8Mapper">
+
+</mapper>