Explorar el Código

Merge branch 'master' of http://47.100.3.209:3000/gdc/yiliangyiyun

ccjgmwz hace 3 años
padre
commit
88d5c266d1
Se han modificado 44 ficheros con 2032 adiciones y 11 borrados
  1. 1 1
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/GeneratorCodeByTables.java
  2. 8 3
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/constant/StatusEnum.java
  3. 21 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/SettledCompanyContactsController.java
  4. 21 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/SettledCompanyDynamicsController.java
  5. 21 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/SettledCompanyErrorController.java
  6. 83 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/SettledCompanyInfoController.java
  7. 9 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/TranCarInfoController.java
  8. 7 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/TranProcessInfoController.java
  9. 76 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/TranSettlementReportController.java
  10. 56 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/SettledCompanyContacts.java
  11. 93 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/SettledCompanyDynamics.java
  12. 60 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/SettledCompanyError.java
  13. 155 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/SettledCompanyInfo.java
  14. 12 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/TranCarInfo.java
  15. 23 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/TranProcessInfo.java
  16. 199 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/TranSettlementReport.java
  17. 16 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/mapper/SettledCompanyContactsMapper.java
  18. 16 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/mapper/SettledCompanyDynamicsMapper.java
  19. 16 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/mapper/SettledCompanyErrorMapper.java
  20. 36 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/mapper/SettledCompanyInfoMapper.java
  21. 2 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/mapper/TranCarInfoMapper.java
  22. 7 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/mapper/TranProcessInfoMapper.java
  23. 33 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/mapper/TranSettlementReportMapper.java
  24. 16 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/ISettledCompanyContactsService.java
  25. 16 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/ISettledCompanyDynamicsService.java
  26. 16 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/ISettledCompanyErrorService.java
  27. 54 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/ISettledCompanyInfoService.java
  28. 6 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/ITranCarInfoService.java
  29. 6 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/ITranProcessInfoService.java
  30. 50 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/ITranSettlementReportService.java
  31. 20 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/SettledCompanyContactsServiceImpl.java
  32. 20 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/SettledCompanyDynamicsServiceImpl.java
  33. 20 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/SettledCompanyErrorServiceImpl.java
  34. 198 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/SettledCompanyInfoServiceImpl.java
  35. 13 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/TranCarInfoServiceImpl.java
  36. 35 3
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/TranProcessInfoServiceImpl.java
  37. 286 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/TranSettlementReportServiceImpl.java
  38. 56 0
      winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/WarehouseBaseInfoServiceImpl.java
  39. 5 0
      winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/SettledCompanyContactsMapper.xml
  40. 5 0
      winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/SettledCompanyDynamicsMapper.xml
  41. 5 0
      winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/SettledCompanyErrorMapper.xml
  42. 115 0
      winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/SettledCompanyInfoMapper.xml
  43. 12 4
      winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/TranProcessInfoMapper.xml
  44. 107 0
      winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/TranSettlementReportMapper.xml

+ 1 - 1
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/GeneratorCodeByTables.java

@@ -53,7 +53,7 @@ public class GeneratorCodeByTables {
     }
 
     public static void main(String[] args) throws IOException {
-        generateByTables("Gongdc", "com.yh.saas.plugin.yiliangyiyun","app_version");
+        generateByTables("Gongdc", "com.yh.saas.plugin.yiliangyiyun","settled_company_info","settled_company_contacts","settled_company_error","settled_company_dynamics");
     }
 
     /**

+ 8 - 3
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/constant/StatusEnum.java

@@ -34,8 +34,10 @@ public enum StatusEnum {
 
 
     //汽运状态
-    DELIVERED("1","已送达","delivered"),
-    NOT_DELIVERED("3","未送达","not_delivered"),
+    NOT_DELIVERED("1","未送达",""),
+    NOT_LOADED("2","未装车","not_loaded"),
+    LOADED("3","已装车","loaded"),
+    DELIVERED("5","已送达","delivered"),
 
     //运输管理状态
     TRAN_DO("1", "执行中", "Under implementation"),
@@ -105,7 +107,10 @@ public enum StatusEnum {
     NOT_COLLECTION("1", "待回款", ""),
     COLLECTION("3", "已回款", ""),
 
-
+    // 入驻公司状态
+    TO_BE_REVIEWED("1", "待审核", ""),
+    PASSED_COMP("3", "已通过", ""),
+    FAIL_COMP("5", "未通过", ""),
     ;
     @Getter
     private String flag;

+ 21 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/SettledCompanyContactsController.java

@@ -0,0 +1,21 @@
+package com.yh.saas.plugin.yiliangyiyun.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ * 入驻公司联系人信息 前端控制器
+ * </p>
+ *
+ * @author Gongdc
+ * @since 2021-08-28
+ */
+@RestController
+@RequestMapping("/settledCompanyContacts")
+public class SettledCompanyContactsController {
+
+}
+

+ 21 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/SettledCompanyDynamicsController.java

@@ -0,0 +1,21 @@
+package com.yh.saas.plugin.yiliangyiyun.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ * 入驻公司发布动态 前端控制器
+ * </p>
+ *
+ * @author Gongdc
+ * @since 2021-08-28
+ */
+@RestController
+@RequestMapping("/settledCompanyDynamics")
+public class SettledCompanyDynamicsController {
+
+}
+

+ 21 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/SettledCompanyErrorController.java

@@ -0,0 +1,21 @@
+package com.yh.saas.plugin.yiliangyiyun.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ * 入驻公司举报纠错 前端控制器
+ * </p>
+ *
+ * @author Gongdc
+ * @since 2021-08-28
+ */
+@RestController
+@RequestMapping("/settledCompanyError")
+public class SettledCompanyErrorController {
+
+}
+

+ 83 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/SettledCompanyInfoController.java

@@ -0,0 +1,83 @@
+package com.yh.saas.plugin.yiliangyiyun.controller;
+
+
+import com.baomidou.mybatisplus.plugins.Page;
+import com.yh.saas.plugin.yiliangyiyun.entity.SalePlanInfo;
+import com.yh.saas.plugin.yiliangyiyun.entity.SettledCompanyInfo;
+import com.yh.saas.plugin.yiliangyiyun.entity.TranCarInfo;
+import com.yh.saas.plugin.yiliangyiyun.exception.ServiceException;
+import com.yh.saas.plugin.yiliangyiyun.service.ISettledCompanyInfoService;
+import com.yh.saas.plugin.yiliangyiyun.service.ITranCarInfoService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * <p>
+ * 入驻公司信息 前端控制器
+ * </p>
+ *
+ * @author Gongdc
+ * @since 2021-08-28
+ */
+@RestController
+@RequestMapping("/settledCompanyInfo")
+public class SettledCompanyInfoController {
+
+
+    @Autowired
+    private ISettledCompanyInfoService settledCompanyInfoService;
+
+    /**
+     * 添加入驻公司信息
+     * @param settledCompanyInfo
+     * @return
+     */
+    @PostMapping("/api/addSettledCompanyInfo")
+    public String addSettledCompanyInfo(@RequestBody SettledCompanyInfo settledCompanyInfo) throws ServiceException {
+        return settledCompanyInfoService.addSettledCompanyInfo(settledCompanyInfo);
+    }
+
+    /**
+     * 编辑入住公司信息
+     * @param settledCompanyInfo
+     * @return
+     */
+    @PostMapping("/api/editSettledCompanyInfo")
+    public String editSettledCompanyInfo(@RequestBody SettledCompanyInfo settledCompanyInfo) throws ServiceException {
+        return settledCompanyInfoService.editSettledCompanyInfo(settledCompanyInfo);
+    }
+
+    /**
+     * 列表
+     * @param settledCompanyInfo
+     * @return
+     */
+    @GetMapping("/selectSettledCompanyInfo")
+    public Page<SettledCompanyInfo> selectSettledCompanyInfo(SettledCompanyInfo settledCompanyInfo) {
+        return settledCompanyInfoService.selectSettledCompanyInfo(settledCompanyInfo);
+    }
+
+    /**
+     * 查看详情
+     * @param id
+     * @return
+     */
+    @GetMapping("/getSettledCompanyInfo")
+    public SettledCompanyInfo getSettledCompanyInfo(String id){
+        return settledCompanyInfoService.getSettledCompanyInfo(id);
+    }
+
+
+    /**
+     * 删除销售计划
+     *  @param settledCompanyInfo
+     * @return
+     */
+    @PostMapping("/api/deleteSettledCompanyInfo")
+    public void deleteSettledCompanyInfo(@RequestBody SettledCompanyInfo settledCompanyInfo) {
+        settledCompanyInfoService.deleteSettledCompanyInfo(settledCompanyInfo.getId());
+    }
+
+
+}
+

+ 9 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/TranCarInfoController.java

@@ -2,6 +2,7 @@ package com.yh.saas.plugin.yiliangyiyun.controller;
 
 
 import com.yh.saas.plugin.yiliangyiyun.entity.TranCarInfo;
+import com.yh.saas.plugin.yiliangyiyun.entity.TranProcessInfo;
 import com.yh.saas.plugin.yiliangyiyun.entity.TranTaskInfo;
 import com.yh.saas.plugin.yiliangyiyun.exception.ServiceException;
 import com.yh.saas.plugin.yiliangyiyun.service.ITranCarInfoService;
@@ -54,6 +55,14 @@ public class TranCarInfoController {
     public List<TranCarInfo> selectTranCarInfoNum(TranCarInfo tranCarInfo){
         return tranCarInfoService.selectTranCarInfoNum(tranCarInfo);
     }
+    /**
+     * 删除车辆
+     * @param example
+     */
+    @PostMapping("/api/deleteTranCar")
+    public void deleteTranCar(@RequestBody TranCarInfo example) {
+        tranCarInfoService.deleteTranCar(example.getId());
+    }
 
 }
 

+ 7 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/TranProcessInfoController.java

@@ -75,5 +75,12 @@ public class TranProcessInfoController {
     public void deleteTranProcess(@RequestBody TranProcessInfo example) {
         tranProcessInfoService.deleteTranProcess(example.getId());
     }
+    /**
+     * 设置运输金额
+     */
+    @PostMapping("/api/setUpTranPrice")
+    public String setUpTranPrice(@RequestBody TranProcessInfo tranProcessInfo){
+        return tranProcessInfoService.setUpTranPrice(tranProcessInfo);
+    }
 }
 

+ 76 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/TranSettlementReportController.java

@@ -0,0 +1,76 @@
+package com.yh.saas.plugin.yiliangyiyun.controller;
+
+
+import com.baomidou.mybatisplus.plugins.Page;
+import com.yh.saas.plugin.yiliangyiyun.entity.ContractManagementInfo;
+import com.yh.saas.plugin.yiliangyiyun.entity.TranSettlementReport;
+import com.yh.saas.plugin.yiliangyiyun.service.ITranSettlementReportService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 汽运结算报表 前端控制器
+ * </p>
+ *
+ * @author Gongdc
+ * @since 2021-08-27
+ */
+@RestController
+    @RequestMapping("/tranSettlementReport")
+public class TranSettlementReportController {
+    @Autowired
+    private ITranSettlementReportService tranSettlementReportService;
+    /**
+     * 汽运结算统计报表
+     * @param tranSettlementReport
+     * @return
+     */
+    @GetMapping("/selectTranSettlementReport")
+    public Page<TranSettlementReport> selectTranSettlementReport(TranSettlementReport tranSettlementReport){
+        return tranSettlementReportService.selectTranSettlementReport(tranSettlementReport);
+    }
+
+    /**
+     * 修改结算重量\扣款\已开发票
+     * @param tranSettlementReport
+     * @return
+     */
+    @PostMapping("/api/editTranSettlementReport")
+    public String editTranSettlementReport(@RequestBody TranSettlementReport tranSettlementReport){
+        return tranSettlementReportService.editTranSettlementReport(tranSettlementReport);
+    }
+
+    /**
+     * 合同编号下拉列表
+     * @param compId
+     * @return
+     */
+    @GetMapping("/selectContractNoList")
+    public List<ContractManagementInfo> selectContractNoList(String compId) {
+        return tranSettlementReportService.selectContractNoList(compId);
+    }
+
+    /**
+     * 出纳付款
+     * @param
+     * @return
+     */
+    @PostMapping("/api/payMoney")
+    public String payMoney(@RequestBody TranSettlementReport tranSettlementReport){
+        return tranSettlementReportService.payMoney(tranSettlementReport);
+    }
+
+    /**
+     * 批量开发票
+     * @param tranSettlementReport
+     * @return
+     */
+    @PostMapping("/api/openInvoiceList")
+    public String openInvoiceList(@RequestBody TranSettlementReport tranSettlementReport) {
+        return tranSettlementReportService.openInvoiceList(tranSettlementReport);
+    }
+}
+

+ 56 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/SettledCompanyContacts.java

@@ -0,0 +1,56 @@
+package com.yh.saas.plugin.yiliangyiyun.entity;
+
+import com.baomidou.mybatisplus.activerecord.Model;
+import java.io.Serializable;
+
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.annotations.TableName;
+import com.baomidou.mybatisplus.annotations.Version;
+
+import com.baomidou.mybatisplus.enums.IdType;
+import com.yh.saas.common.support.entity.BaseModel;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * <p>
+ * 入驻公司联系人信息
+ * </p>
+ *
+ * @author Gongdc
+ * @since 2021-08-28
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@TableName("settled_company_contacts")
+public class SettledCompanyContacts extends BaseModel<SettledCompanyContacts> {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(type = IdType.UUID)
+    private String id;
+    /**
+     * 信息id
+     */
+    private String infoId;
+    /**
+     * 联系人
+     */
+    private String contacts;
+    /**
+     * 联系人电话
+     */
+    private String contactsPhone;
+
+
+    @Override
+    protected Serializable pkVal() {
+        return this.id;
+    }
+
+}

+ 93 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/SettledCompanyDynamics.java

@@ -0,0 +1,93 @@
+package com.yh.saas.plugin.yiliangyiyun.entity;
+
+import java.util.Date;
+import com.baomidou.mybatisplus.activerecord.Model;
+import java.io.Serializable;
+
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.annotations.TableName;
+import com.baomidou.mybatisplus.annotations.Version;
+
+import com.baomidou.mybatisplus.enums.IdType;
+import com.yh.saas.common.support.entity.BaseModel;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * <p>
+ * 入驻公司发布动态
+ * </p>
+ *
+ * @author Gongdc
+ * @since 2021-08-28
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@TableName("settled_company_dynamics")
+public class SettledCompanyDynamics extends BaseModel<SettledCompanyDynamics> {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(type = IdType.UUID)
+    private String id;
+    /**
+     * 发布手机号
+     */
+    private String phone;
+    /**
+     * 公司名称
+     */
+    private String compName;
+    /**
+     * 城市
+     */
+    private String city;
+    /**
+     * 标题
+     */
+    private String title;
+    /**
+     * 动态内容
+     */
+    private String content;
+    /**
+     * 附件
+     */
+    private String address;
+    /**
+     * 发布日期
+     */
+    private Date dynamicsDate;
+    /**
+     * 状态flag
+     */
+    private String statusFlag;
+    /**
+     * 状态
+     */
+    private String status;
+    /**
+     * 审核状态
+     */
+    private String approveStatus;
+    /**
+     * 审核流id
+     */
+    private String workflowId;
+    /**
+     * 是否显示
+     */
+    private String showFlag;
+
+
+    @Override
+    protected Serializable pkVal() {
+        return this.id;
+    }
+
+}

+ 60 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/SettledCompanyError.java

@@ -0,0 +1,60 @@
+package com.yh.saas.plugin.yiliangyiyun.entity;
+
+import com.baomidou.mybatisplus.activerecord.Model;
+import java.io.Serializable;
+
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.annotations.TableName;
+import com.baomidou.mybatisplus.annotations.Version;
+
+import com.baomidou.mybatisplus.enums.IdType;
+import com.yh.saas.common.support.entity.BaseModel;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * <p>
+ * 入驻公司举报纠错
+ * </p>
+ *
+ * @author Gongdc
+ * @since 2021-08-28
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@TableName("settled_company_error")
+public class SettledCompanyError extends BaseModel<SettledCompanyError> {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(type = IdType.UUID)
+    private String id;
+    /**
+     * 信息id
+     */
+    private String infoId;
+    /**
+     * 公司名称
+     */
+    private String compName;
+    /**
+     * 举报/纠错
+     */
+    private String error;
+    /**
+     * 附件
+     */
+    private String address;
+
+
+    @Override
+    protected Serializable pkVal() {
+        return this.id;
+    }
+
+}

+ 155 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/SettledCompanyInfo.java

@@ -0,0 +1,155 @@
+package com.yh.saas.plugin.yiliangyiyun.entity;
+
+import com.baomidou.mybatisplus.activerecord.Model;
+import java.io.Serializable;
+import java.util.List;
+
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.annotations.TableName;
+import com.baomidou.mybatisplus.annotations.Version;
+
+import com.baomidou.mybatisplus.enums.IdType;
+import com.yh.saas.common.support.entity.BaseModel;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * <p>
+ * 入驻公司信息
+ * </p>
+ *
+ * @author Gongdc
+ * @since 2021-08-28
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@TableName("settled_company_info")
+public class SettledCompanyInfo extends BaseModel<SettledCompanyInfo> {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(type = IdType.UUID)
+    private String id;
+    /**
+     * 公司id
+     */
+    private String compId;
+    /**
+     * 公司名称
+     */
+    private String compName;
+    /**
+     * 创建人手机号
+     */
+    private String createPhone;
+    /**
+     * 主营类型
+     */
+    private String mainBusinessType;
+    /**
+     * 标题
+     */
+    private String title;
+    /**
+     * 企业简介
+     */
+    private String companyProfile;
+    /**
+     * 经度
+     */
+    private String longitude;
+    /**
+     * 纬度
+     */
+    private String latitude;
+    /**
+     * 省
+     */
+    private String province;
+    /**
+     * 市
+     */
+    private String city;
+    /**
+     * 区
+     */
+    private String area;
+    /**
+     * 详细地址
+     */
+    private String detailedAddress;
+    /**
+     * 封面附件地址
+     */
+    private String attachmentAddress;
+    /**
+     * 营业执照地址
+     */
+    private String licenseAddress;
+    /**
+     * 标签
+     */
+    private String label;
+    /**
+     * 场地照片地址
+     */
+    private String sitePhotoAddress;
+    /**
+     * 邮箱
+     */
+    private String email;
+    /**
+     * 传真
+     */
+    private String fax;
+    /**
+     * 状态flag
+     */
+    private String statusFlag;
+    /**
+     * 状态
+     */
+    private String status;
+    /**
+     * 审核状态
+     */
+    private String approveStatus;
+    /**
+     * 审核流id
+     */
+    private String workflowId;
+    /**
+     * 是否显示
+     */
+    private String showFlag;
+
+    @TableField(exist = false)
+    private List<SettledCompanyContacts> settledCompanyContacts;
+
+
+    @TableField(exist = false)
+    private List<SettledCompanyError> settledCompanyErrorList;
+    /**
+     * 查询类型
+     */
+    @TableField(exist = false)
+    private String searchType;
+
+    /**
+     * 模糊查询
+     */
+    @TableField(exist = false)
+    private String searchKeyWord;
+
+    @Override
+    protected Serializable pkVal() {
+        return this.id;
+    }
+
+}

+ 12 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/TranCarInfo.java

@@ -73,6 +73,18 @@ public class TranCarInfo extends BaseModel<TranCarInfo> {
      * 车牌号
      */
     private String carNo;
+    /**
+     * 箱号
+     */
+    private String caseNo;
+    /**
+     * 封号
+     */
+    private String titleNo;
+    /**
+     * 运输单价
+     */
+    private String tranPrice;
     /**
      * 车次
      */

+ 23 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/TranProcessInfo.java

@@ -47,6 +47,18 @@ public class TranProcessInfo extends BaseModel<TranProcessInfo> {
      * 运输阶段编号
      */
     private String processNo;
+    /**
+     * 当前运输价格
+     */
+    private Float tranPrice;
+    /**
+     * 审核中的运输价格
+     */
+    private Float tranPriceIng;
+    /**
+     * 运输价格状态
+     */
+    private String priceStatus;
     /**
      * 货名key
      */
@@ -223,6 +235,17 @@ public class TranProcessInfo extends BaseModel<TranProcessInfo> {
     @TableField(exist = false)
     private List<TranCarInfo> tranCarInfoList;
 
+    /**
+     * 运输单价标识(1提交2审核)
+     */
+    @TableField(exist = false)
+    private String flag;
+    /**
+     * 包括已删除的车辆
+     */
+    @TableField(exist = false)
+    private Integer count;
+
 
     @Override
     protected Serializable pkVal() {

+ 199 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/TranSettlementReport.java

@@ -0,0 +1,199 @@
+package com.yh.saas.plugin.yiliangyiyun.entity;
+
+import java.util.Date;
+import com.baomidou.mybatisplus.activerecord.Model;
+import java.io.Serializable;
+import java.util.List;
+
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.annotations.TableName;
+import com.baomidou.mybatisplus.annotations.Version;
+
+import com.baomidou.mybatisplus.enums.IdType;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.yh.saas.common.support.entity.BaseModel;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import org.springframework.format.annotation.DateTimeFormat;
+
+/**
+ * <p>
+ * 汽运结算报表
+ * </p>
+ *
+ * @author Gongdc
+ * @since 2021-08-27
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@TableName("tran_settlement_report")
+public class TranSettlementReport extends BaseModel<TranSettlementReport> {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(type = IdType.UUID)
+    private String id;
+    /**
+     * 公司id
+     */
+    private String compId;
+    /**
+     * 合同编号
+     */
+    private String contractNo;
+    /**
+     * 运输阶段
+     */
+    private String processNo;
+    /**
+     * 电话
+     */
+    private String phone;
+    /**
+     * 姓名
+     */
+    private String name;
+    /**
+     * 派车编号
+     */
+    private String tranCarNo;
+    /**
+     * 车牌号
+     */
+    private String carNo;
+    /**
+     * 装车净重(吨)
+     */
+    private Float loadingWeight;
+    /**
+     * 卸车净重(吨)
+     */
+    private Float unloadingWeight;
+    /**
+     * 损耗(吨)
+     */
+    private Float lossWeight;
+    /**
+     * 运输单价(元/吨)
+     */
+    private Float transportPrice;
+    /**
+     * 结算重量(吨)
+     */
+    private Float settlementWeight;
+    /**
+     * 扣款(元)
+     */
+    private String deductionAmount;
+    /**
+     * 应付金额(元/吨)
+     */
+    private Float amountIngPayable;
+    /**
+     * 已付金额(元/吨)
+     */
+    private Float amountEdPayable;
+    /**
+     * 未付金额(元/吨)
+     */
+    private Float amountNotPayable;
+    /**
+     * 已开发票(元)
+     */
+    private Float alreadyInvoice;
+    /**
+     * 付款日期
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    private Date paymentDate;
+    /**
+     * 状态标识
+     */
+    private String statusFlag;
+    /**
+     * 状态
+     */
+    private String status;
+    /**
+     * 状态英文
+     */
+    private String statusEn;
+    /**
+     * 审核状态
+     */
+    private String approveStatus;
+    /**
+     * 付款截图
+     */
+    private String paymentScreenshot;
+    /**
+     * 审核流id
+     */
+    private String workflowId;
+    /**
+     * 手动修改标识(1是)
+     */
+    private String manualFlag;
+    /**
+     * 通过1驳回2
+     */
+    @TableField(exist = false)
+    private Integer flag;
+
+    /**
+     * 修改结算重量0修改扣款1修改已开发票2
+     */
+    @TableField(exist = false)
+    private Integer editFlag;
+
+    /**
+     * 角色人flag(1统计2决策人3财务4出纳)
+     */
+    @TableField(exist = false)
+    private Integer roleFlag;
+
+    /**
+     * 待审核id
+     */
+    @TableField(exist = false)
+    private String taskId;
+
+    /**
+     * 模糊查询
+     */
+    @TableField(exist = false)
+    private String searchKeyWord;
+
+    /**
+     *查询类型
+     */
+    @TableField(exist = false)
+    private String searchType;
+
+    /**
+     *付款金额
+     */
+    @TableField(exist = false)
+    private Float money;
+
+    //改价记录
+    @TableField(exist = false)
+    private List<DriverPayeeInfo> driverPayeeInfoList;
+
+    @TableField(exist = false)
+    private List<TranSettlementReport> tranSettlementReportList;
+
+
+    @Override
+    protected Serializable pkVal() {
+        return this.id;
+    }
+
+}

+ 16 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/mapper/SettledCompanyContactsMapper.java

@@ -0,0 +1,16 @@
+package com.yh.saas.plugin.yiliangyiyun.mapper;
+
+import com.yh.saas.plugin.yiliangyiyun.entity.SettledCompanyContacts;
+import com.baomidou.mybatisplus.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 入驻公司联系人信息 Mapper 接口
+ * </p>
+ *
+ * @author Gongdc
+ * @since 2021-08-28
+ */
+public interface SettledCompanyContactsMapper extends BaseMapper<SettledCompanyContacts> {
+
+}

+ 16 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/mapper/SettledCompanyDynamicsMapper.java

@@ -0,0 +1,16 @@
+package com.yh.saas.plugin.yiliangyiyun.mapper;
+
+import com.yh.saas.plugin.yiliangyiyun.entity.SettledCompanyDynamics;
+import com.baomidou.mybatisplus.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 入驻公司发布动态 Mapper 接口
+ * </p>
+ *
+ * @author Gongdc
+ * @since 2021-08-28
+ */
+public interface SettledCompanyDynamicsMapper extends BaseMapper<SettledCompanyDynamics> {
+
+}

+ 16 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/mapper/SettledCompanyErrorMapper.java

@@ -0,0 +1,16 @@
+package com.yh.saas.plugin.yiliangyiyun.mapper;
+
+import com.yh.saas.plugin.yiliangyiyun.entity.SettledCompanyError;
+import com.baomidou.mybatisplus.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 入驻公司举报纠错 Mapper 接口
+ * </p>
+ *
+ * @author Gongdc
+ * @since 2021-08-28
+ */
+public interface SettledCompanyErrorMapper extends BaseMapper<SettledCompanyError> {
+
+}

+ 36 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/mapper/SettledCompanyInfoMapper.java

@@ -0,0 +1,36 @@
+package com.yh.saas.plugin.yiliangyiyun.mapper;
+
+import com.yh.saas.plugin.yiliangyiyun.entity.SalePlanInfo;
+import com.yh.saas.plugin.yiliangyiyun.entity.SettledCompanyInfo;
+import com.baomidou.mybatisplus.mapper.BaseMapper;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * <p>
+ * 入驻公司信息 Mapper 接口
+ * </p>
+ *
+ * @author Gongdc
+ * @since 2021-08-28
+ */
+public interface SettledCompanyInfoMapper extends BaseMapper<SettledCompanyInfo> {
+
+
+    /**
+     * 根据条件查询总数
+     *
+     * @param pageView
+     * @return
+     */
+    Integer getCountByCondition(Map<String, Object> pageView);
+
+    /**
+     * 根据条件查询列表
+     *
+     * @param pageView
+     * @return
+     */
+    List<SettledCompanyInfo> getListByCondition(Map<String, Object> pageView);
+}

+ 2 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/mapper/TranCarInfoMapper.java

@@ -3,6 +3,8 @@ package com.yh.saas.plugin.yiliangyiyun.mapper;
 import com.yh.saas.plugin.yiliangyiyun.entity.TranCarInfo;
 import com.baomidou.mybatisplus.mapper.BaseMapper;
 
+import java.util.Map;
+
 /**
  * <p>
  * 记录车次 Mapper 接口

+ 7 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/mapper/TranProcessInfoMapper.java

@@ -31,4 +31,11 @@ public interface TranProcessInfoMapper extends BaseMapper<TranProcessInfo> {
      * @return
      */
     List<TranProcessInfo> getListByCondition(Map<String, Object> pageView);
+    /**
+     * 根据条件查询车辆总数
+     *
+     * @param pageView
+     * @return
+     */
+    Integer getCarByCondition(Map<String, Object> pageView);
 }

+ 33 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/mapper/TranSettlementReportMapper.java

@@ -0,0 +1,33 @@
+package com.yh.saas.plugin.yiliangyiyun.mapper;
+
+import com.yh.saas.plugin.yiliangyiyun.entity.TranSettlementReport;
+import com.baomidou.mybatisplus.mapper.BaseMapper;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * <p>
+ * 汽运结算报表 Mapper 接口
+ * </p>
+ *
+ * @author Gongdc
+ * @since 2021-08-27
+ */
+public interface TranSettlementReportMapper extends BaseMapper<TranSettlementReport> {
+    /**
+     * 根据条件查询汽运结算统计总数
+     *
+     * @param pageView
+     * @return
+     */
+    Integer getCountByCondition(Map<String, Object> pageView);
+
+    /**
+     * 根据条件查询采购平仓统计列表
+     *
+     * @param pageView
+     * @return
+     */
+    List<TranSettlementReport> getListByCondition(Map<String, Object> pageView);
+}

+ 16 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/ISettledCompanyContactsService.java

@@ -0,0 +1,16 @@
+package com.yh.saas.plugin.yiliangyiyun.service;
+
+import com.yh.saas.plugin.yiliangyiyun.entity.SettledCompanyContacts;
+import com.baomidou.mybatisplus.service.IService;
+
+/**
+ * <p>
+ * 入驻公司联系人信息 服务类
+ * </p>
+ *
+ * @author Gongdc
+ * @since 2021-08-28
+ */
+public interface ISettledCompanyContactsService extends IService<SettledCompanyContacts> {
+
+}

+ 16 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/ISettledCompanyDynamicsService.java

@@ -0,0 +1,16 @@
+package com.yh.saas.plugin.yiliangyiyun.service;
+
+import com.yh.saas.plugin.yiliangyiyun.entity.SettledCompanyDynamics;
+import com.baomidou.mybatisplus.service.IService;
+
+/**
+ * <p>
+ * 入驻公司发布动态 服务类
+ * </p>
+ *
+ * @author Gongdc
+ * @since 2021-08-28
+ */
+public interface ISettledCompanyDynamicsService extends IService<SettledCompanyDynamics> {
+
+}

+ 16 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/ISettledCompanyErrorService.java

@@ -0,0 +1,16 @@
+package com.yh.saas.plugin.yiliangyiyun.service;
+
+import com.yh.saas.plugin.yiliangyiyun.entity.SettledCompanyError;
+import com.baomidou.mybatisplus.service.IService;
+
+/**
+ * <p>
+ * 入驻公司举报纠错 服务类
+ * </p>
+ *
+ * @author Gongdc
+ * @since 2021-08-28
+ */
+public interface ISettledCompanyErrorService extends IService<SettledCompanyError> {
+
+}

+ 54 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/ISettledCompanyInfoService.java

@@ -0,0 +1,54 @@
+package com.yh.saas.plugin.yiliangyiyun.service;
+
+import com.baomidou.mybatisplus.plugins.Page;
+import com.yh.saas.plugin.yiliangyiyun.entity.SettledCompanyInfo;
+import com.baomidou.mybatisplus.service.IService;
+import com.yh.saas.plugin.yiliangyiyun.exception.ServiceException;
+
+/**
+ * <p>
+ * 入驻公司信息 服务类
+ * </p>
+ *
+ * @author Gongdc
+ * @since 2021-08-28
+ */
+public interface ISettledCompanyInfoService extends IService<SettledCompanyInfo> {
+
+    /**
+     * 添加入住公司信息
+     * @param settledCompanyInfo
+     * @return
+     */
+    String addSettledCompanyInfo(SettledCompanyInfo settledCompanyInfo) throws ServiceException;
+
+    /**
+     * 编辑入住公司信息
+     * @param settledCompanyInfo
+     * @return
+     */
+    String editSettledCompanyInfo(SettledCompanyInfo settledCompanyInfo) throws ServiceException;
+
+
+    /**
+     * 入驻公司列表
+     * @param settledCompanyInfo
+     * @return
+     */
+    Page<SettledCompanyInfo> selectSettledCompanyInfo(SettledCompanyInfo settledCompanyInfo);
+
+    /**
+     * 查看详情
+     * @param id
+     * @return
+     */
+    SettledCompanyInfo getSettledCompanyInfo(String id);
+
+    /**
+     * 删除
+     *  @param id
+     * @return
+     */
+    void deleteSettledCompanyInfo(String id);
+
+}

+ 6 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/ITranCarInfoService.java

@@ -33,6 +33,12 @@ public interface ITranCarInfoService extends IService<TranCarInfo> {
      * @param tranCarInfo
      */
     List<TranCarInfo> selectTranCarInfoNum(TranCarInfo tranCarInfo);
+    /**
+     * 删除运输车辆
+     *
+     * @param id
+     */
+    void deleteTranCar(String id);
 
 
 }

+ 6 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/ITranProcessInfoService.java

@@ -57,5 +57,11 @@ public interface ITranProcessInfoService extends IService<TranProcessInfo> {
      * @param id
      */
     void deleteTranProcess(String id);
+    /**
+     * 设置运输价格
+     * @param tranProcessInfo
+     * @return
+     */
+    String setUpTranPrice(TranProcessInfo tranProcessInfo);
 
 }

+ 50 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/ITranSettlementReportService.java

@@ -0,0 +1,50 @@
+package com.yh.saas.plugin.yiliangyiyun.service;
+
+import com.baomidou.mybatisplus.plugins.Page;
+import com.yh.saas.plugin.yiliangyiyun.entity.ContractManagementInfo;
+import com.yh.saas.plugin.yiliangyiyun.entity.TranSettlementReport;
+import com.baomidou.mybatisplus.service.IService;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 汽运结算报表 服务类
+ * </p>
+ *
+ * @author Gongdc
+ * @since 2021-08-27
+ */
+public interface ITranSettlementReportService extends IService<TranSettlementReport> {
+    /**
+     * 汽运结算统计报表
+     *
+     * @param tranSettlementReport
+     * @return
+     */
+    Page<TranSettlementReport> selectTranSettlementReport(TranSettlementReport tranSettlementReport);
+    /**
+     * 修改 结算重量\扣款\已开发票
+     * @param tranSettlementReport
+     * @return
+     */
+    String editTranSettlementReport(TranSettlementReport tranSettlementReport);
+    /**
+     * 合同编号下拉列表
+     *
+     * @param compId
+     */
+    List<ContractManagementInfo> selectContractNoList(String compId);
+    /**
+     * 出纳付款
+     * @param tranSettlementReport
+     */
+    String payMoney(TranSettlementReport tranSettlementReport);
+    /**
+     * 批量开发票
+     * @param tranSettlementReport
+     */
+    String openInvoiceList(TranSettlementReport tranSettlementReport);
+
+
+}

+ 20 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/SettledCompanyContactsServiceImpl.java

@@ -0,0 +1,20 @@
+package com.yh.saas.plugin.yiliangyiyun.service.impl;
+
+import com.yh.saas.plugin.yiliangyiyun.entity.SettledCompanyContacts;
+import com.yh.saas.plugin.yiliangyiyun.mapper.SettledCompanyContactsMapper;
+import com.yh.saas.plugin.yiliangyiyun.service.ISettledCompanyContactsService;
+import com.baomidou.mybatisplus.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 入驻公司联系人信息 服务实现类
+ * </p>
+ *
+ * @author Gongdc
+ * @since 2021-08-28
+ */
+@Service
+public class SettledCompanyContactsServiceImpl extends ServiceImpl<SettledCompanyContactsMapper, SettledCompanyContacts> implements ISettledCompanyContactsService {
+
+}

+ 20 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/SettledCompanyDynamicsServiceImpl.java

@@ -0,0 +1,20 @@
+package com.yh.saas.plugin.yiliangyiyun.service.impl;
+
+import com.yh.saas.plugin.yiliangyiyun.entity.SettledCompanyDynamics;
+import com.yh.saas.plugin.yiliangyiyun.mapper.SettledCompanyDynamicsMapper;
+import com.yh.saas.plugin.yiliangyiyun.service.ISettledCompanyDynamicsService;
+import com.baomidou.mybatisplus.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 入驻公司发布动态 服务实现类
+ * </p>
+ *
+ * @author Gongdc
+ * @since 2021-08-28
+ */
+@Service
+public class SettledCompanyDynamicsServiceImpl extends ServiceImpl<SettledCompanyDynamicsMapper, SettledCompanyDynamics> implements ISettledCompanyDynamicsService {
+
+}

+ 20 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/SettledCompanyErrorServiceImpl.java

@@ -0,0 +1,20 @@
+package com.yh.saas.plugin.yiliangyiyun.service.impl;
+
+import com.yh.saas.plugin.yiliangyiyun.entity.SettledCompanyError;
+import com.yh.saas.plugin.yiliangyiyun.mapper.SettledCompanyErrorMapper;
+import com.yh.saas.plugin.yiliangyiyun.service.ISettledCompanyErrorService;
+import com.baomidou.mybatisplus.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 入驻公司举报纠错 服务实现类
+ * </p>
+ *
+ * @author Gongdc
+ * @since 2021-08-28
+ */
+@Service
+public class SettledCompanyErrorServiceImpl extends ServiceImpl<SettledCompanyErrorMapper, SettledCompanyError> implements ISettledCompanyErrorService {
+
+}

+ 198 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/SettledCompanyInfoServiceImpl.java

@@ -0,0 +1,198 @@
+package com.yh.saas.plugin.yiliangyiyun.service.impl;
+
+import com.baomidou.mybatisplus.mapper.EntityWrapper;
+import com.baomidou.mybatisplus.plugins.Page;
+import com.google.common.collect.Lists;
+import com.yh.saas.common.support.util.IdGenerator;
+import com.yh.saas.common.support.util.StringUtils;
+import com.yh.saas.plugin.yiliangyiyun.constant.StatusEnum;
+import com.yh.saas.plugin.yiliangyiyun.entity.*;
+import com.yh.saas.plugin.yiliangyiyun.exception.ServiceException;
+import com.yh.saas.plugin.yiliangyiyun.mapper.SettledCompanyInfoMapper;
+import com.yh.saas.plugin.yiliangyiyun.service.ISettledCompanyContactsService;
+import com.yh.saas.plugin.yiliangyiyun.service.ISettledCompanyErrorService;
+import com.yh.saas.plugin.yiliangyiyun.service.ISettledCompanyInfoService;
+import com.baomidou.mybatisplus.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.CollectionUtils;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * <p>
+ * 入驻公司信息 服务实现类
+ * </p>
+ *
+ * @author Gongdc
+ * @since 2021-08-28
+ */
+@Service
+public class SettledCompanyInfoServiceImpl extends ServiceImpl<SettledCompanyInfoMapper, SettledCompanyInfo> implements ISettledCompanyInfoService {
+
+
+    @Autowired
+    private ISettledCompanyContactsService settledCompanyContactsService;
+
+
+    @Autowired
+    private ISettledCompanyErrorService settledCompanyErrorService;
+
+    /**
+     * 添加入住公司信息
+     * @param settledCompanyInfo
+     * @return
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public String addSettledCompanyInfo(SettledCompanyInfo settledCompanyInfo) throws ServiceException {
+        settledCompanyInfo.setId(IdGenerator.generateUUID());
+        settledCompanyInfo.setStatusFlag(StatusEnum.TO_BE_REVIEWED.getFlag());
+        settledCompanyInfo.setStatus(StatusEnum.TO_BE_REVIEWED.getName());
+        // 联系人处理
+        List<SettledCompanyContacts> settledCompanyContactsList = settledCompanyInfo.getSettledCompanyContacts();
+        if(!CollectionUtils.isEmpty(settledCompanyContactsList)){
+            settledCompanyContactsList.forEach(settledCompanyContacts -> {
+                settledCompanyContacts.setId(IdGenerator.generateUUID());
+                settledCompanyContacts.setInfoId(settledCompanyInfo.getId());
+            });
+            settledCompanyContactsService.insertBatch(settledCompanyContactsList);
+        }
+        return settledCompanyInfo.getId();
+    }
+
+
+    /**
+     * 编辑入住公司信息
+     * @param settledCompanyInfo
+     * @return
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public String editSettledCompanyInfo(SettledCompanyInfo settledCompanyInfo) throws ServiceException {
+        // 更新公司信息
+        this.updateById(settledCompanyInfo);
+        // 联系人处理
+        List<SettledCompanyContacts> settledCompanyContactsList = settledCompanyContactsService.selectList(new EntityWrapper<SettledCompanyContacts>()
+        .eq("info_id",settledCompanyInfo.getId()));
+        List<String> idList = new ArrayList<>();
+        if(!CollectionUtils.isEmpty(settledCompanyContactsList)){
+             idList = settledCompanyContactsList.stream().map(SettledCompanyContacts::getId).collect(Collectors.toList());
+        }
+        List<SettledCompanyContacts> settledCompanyContactsListNew = settledCompanyInfo.getSettledCompanyContacts();
+        if(!CollectionUtils.isEmpty(settledCompanyContactsListNew)){
+           for(SettledCompanyContacts settledCompanyContacts:settledCompanyContactsListNew){
+               if(StringUtils.isEmpty(settledCompanyContacts.getId())){
+                   settledCompanyContacts.setId(IdGenerator.generateUUID());
+                   settledCompanyContacts.setInfoId(settledCompanyInfo.getId());
+                   settledCompanyContactsService.insert(settledCompanyContacts);
+               }
+               else{
+                   settledCompanyContactsService.updateById(settledCompanyContacts);
+               }
+           }
+            List<String> idListNew = settledCompanyContactsListNew.stream().map(SettledCompanyContacts::getId).collect(Collectors.toList());
+            if(!CollectionUtils.isEmpty(idList)){
+                idList.forEach(s ->{
+                    if(!idListNew.contains(s)) {
+                        settledCompanyContactsService.deleteById(s);
+                    }
+                } );
+
+            }
+        }
+        else{
+            if(!CollectionUtils.isEmpty(idList)){
+                idList.forEach(s ->{
+                    settledCompanyContactsService.deleteById(s);
+                } );
+
+            }
+        }
+        return settledCompanyInfo.getId();
+    }
+
+
+
+    /**
+     * 入驻公司列表
+     * @param settledCompanyInfo
+     * @return
+     */
+    @Override
+    public Page<SettledCompanyInfo> selectSettledCompanyInfo(SettledCompanyInfo settledCompanyInfo) {
+        Map<String, Object> pageView = new HashMap<>();
+        pageView.put("startRecord", (settledCompanyInfo.getCurrentPage() - 1)
+                * settledCompanyInfo.getPageSize());
+        //公司id
+        pageView.put("createPhone",settledCompanyInfo.getCreatePhone());
+        pageView.put("mainBusinessType",settledCompanyInfo.getMainBusinessType());
+        pageView.put("searchKeyWord",settledCompanyInfo.getSearchKeyWord());
+        pageView.put("province",settledCompanyInfo.getProvince());
+        pageView.put("city",settledCompanyInfo.getCity());
+        pageView.put("area",settledCompanyInfo.getArea());
+        pageView.put("detailedAddress",settledCompanyInfo.getDetailedAddress());
+        pageView.put("searchType", settledCompanyInfo.getSearchType());
+        pageView.put("pageSize",settledCompanyInfo.getPageSize());
+        pageView.put("currentPage",settledCompanyInfo.getCurrentPage());
+        // 查询总数
+        Integer dataCount = baseMapper.getCountByCondition(pageView);
+        List<SettledCompanyInfo> dataList = baseMapper.getListByCondition(pageView);
+        Page<SettledCompanyInfo> page = new Page<>();
+        page.setRecords(dataList == null ? Lists.newArrayList() : dataList);
+        page.setTotal(dataCount == null ? 0 : dataCount);
+        page.setCurrent(settledCompanyInfo.getCurrentPage());
+        page.setSize(settledCompanyInfo.getPageSize());
+        return page;
+    }
+
+    /**
+     * 查看详情
+     * @param id
+     * @return
+     */
+    @Override
+    public SettledCompanyInfo getSettledCompanyInfo(String id) {
+        //查看信息
+        SettledCompanyInfo settledCompanyInfo = this.selectById(id);
+        // 联系人
+        List<SettledCompanyContacts> settledCompanyContactsList = settledCompanyContactsService.selectList(new EntityWrapper<SettledCompanyContacts>()
+                .eq("info_id",settledCompanyInfo.getId()));
+        // 举报
+        List<SettledCompanyError> settledCompanyErrors = settledCompanyErrorService.selectList(new EntityWrapper<SettledCompanyError>()
+                .eq("info_id",settledCompanyInfo.getId()));
+        settledCompanyInfo.setSettledCompanyContacts(settledCompanyContactsList);
+        settledCompanyInfo.setSettledCompanyErrorList(settledCompanyErrors);
+        return settledCompanyInfo;
+    }
+
+
+
+    /**
+     * 删除
+     *  @param id
+     * @return
+     */
+    @Override
+    public void deleteSettledCompanyInfo(String id) {
+        //查询销售计划信息
+        SettledCompanyInfo settledCompanyInfo = this.selectById(id);
+        if(settledCompanyInfo != null){
+            //删除销售计划信息
+            this.deleteById(settledCompanyInfo.getId());
+            // 联系人
+            boolean result = settledCompanyContactsService.delete(new EntityWrapper<SettledCompanyContacts>()
+                    .eq("info_id",settledCompanyInfo.getId()));
+            // 举报
+            boolean res = settledCompanyErrorService.delete(new EntityWrapper<SettledCompanyError>()
+                    .eq("info_id",settledCompanyInfo.getId()));
+        }
+    }
+
+
+}

+ 13 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/TranCarInfoServiceImpl.java

@@ -168,4 +168,17 @@ public class TranCarInfoServiceImpl extends ServiceImpl<TranCarInfoMapper, TranC
                 .orderBy("tran_car_no", true));
         return tranCarInfoList;
     }
+
+    /**
+     *
+     * 删除车辆
+     * @param id
+     */
+    @Override
+    public void deleteTranCar(String id) {
+        TranCarInfo tranCarInfo= this.selectById(id);
+        if (tranCarInfo!=null){
+            this.deleteById(tranCarInfo.getId());
+        }
+    }
 }

+ 35 - 3
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/TranProcessInfoServiceImpl.java

@@ -1,6 +1,7 @@
 package com.yh.saas.plugin.yiliangyiyun.service.impl;
 
 import com.baomidou.mybatisplus.mapper.EntityWrapper;
+import com.baomidou.mybatisplus.mapper.Wrapper;
 import com.baomidou.mybatisplus.plugins.Page;
 import com.google.common.collect.Lists;
 import com.winsea.svc.base.security.util.AuthSecurityUtils;
@@ -16,6 +17,7 @@ import com.yh.saas.plugin.yiliangyiyun.service.ITranCarInfoService;
 import com.yh.saas.plugin.yiliangyiyun.service.ITranProcessInfoService;
 import com.baomidou.mybatisplus.service.impl.ServiceImpl;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.mongodb.core.aggregation.ArrayOperators;
 import org.springframework.stereotype.Service;
 import org.springframework.util.CollectionUtils;
 
@@ -109,6 +111,11 @@ public class TranProcessInfoServiceImpl extends ServiceImpl<TranProcessInfoMappe
         //查看车次信息
         List<TranCarInfo> tranCarInfoList = tranCarInfoService.selectList(new EntityWrapper<TranCarInfo>()
                 .eq(TranCarInfo.QueryFiles.PROCESS_ID,id).eq(TranCarInfo.QueryFiles.DELETE_FLAG,NumberConstant.CONSTANT0));
+        Map<String, Object> pageView = new HashMap<>();
+        pageView.put("id", id);
+        // 查询派车总数包括已删除的
+        Integer dataCount = baseMapper.getCarByCondition(pageView);
+        tranProcessInfo.setCount(dataCount);
         tranProcessInfo.setTranCarInfoList(tranCarInfoList);
         return tranProcessInfo;
     }
@@ -137,8 +144,8 @@ public class TranProcessInfoServiceImpl extends ServiceImpl<TranProcessInfoMappe
                     }
                     //汽运类型
                     if(tranCarInfo.getTranType().equals(NumberConstant.CONSTANT1)){
-                        tranCarInfo.setStatusFlag(StatusEnum.NOT_DELIVERED.getFlag());
-                        tranCarInfo.setStatus(StatusEnum.NOT_DELIVERED.getName());
+                        tranCarInfo.setStatusFlag(StatusEnum.NOT_LOADED.getFlag());
+                        tranCarInfo.setStatus(StatusEnum.NOT_LOADED.getName());
                     }
                     tranCarInfoService.insert(tranCarInfo);
                 }
@@ -149,8 +156,13 @@ public class TranProcessInfoServiceImpl extends ServiceImpl<TranProcessInfoMappe
                         tranCarInfo.setSignStatus(StatusEnum.NOT_SIGNED.getName());
                         tranCarInfo.setSignStatusFlag(StatusEnum.NOT_SIGNED.getFlag());
                     }
-                    //卸货时状态改为已送达
+                    //装车反馈时状态改为已装车
                     if(tranCarInfo.getLoadNetWeight()>0){
+                        tranCarInfo.setStatusFlag(StatusEnum.LOADED.getFlag());
+                        tranCarInfo.setStatus(StatusEnum.LOADED.getName());
+                    }
+                    //卸车反馈时状态改为已送达
+                    if(tranCarInfo.getUnloadNetWeight()>0){
                         tranCarInfo.setStatusFlag(StatusEnum.DELIVERED.getFlag());
                         tranCarInfo.setStatus(StatusEnum.DELIVERED.getName());
                     }
@@ -221,4 +233,24 @@ public class TranProcessInfoServiceImpl extends ServiceImpl<TranProcessInfoMappe
             this.deleteById(tranProcessInfo.getId());
         }
     }
+    /**
+     * 设置运输价格
+     * @param tranProcessInfo
+     * @return
+     */
+    @Override
+    public String setUpTranPrice(TranProcessInfo tranProcessInfo) {
+        //物流部提交
+        if ("1".equals(tranProcessInfo.getFlag())){
+            tranProcessInfo.setPriceStatus("审核中");
+        }
+        //决策人审核
+        else {
+            tranProcessInfo.setTranPrice(tranProcessInfo.getTranPriceIng());
+            tranProcessInfo.setTranPriceIng(0.0f);
+            tranProcessInfo.setPriceStatus("已通过");
+        }
+        this.updateById(tranProcessInfo);
+        return "ok";
+    }
 }

+ 286 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/TranSettlementReportServiceImpl.java

@@ -0,0 +1,286 @@
+package com.yh.saas.plugin.yiliangyiyun.service.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.alipay.sofa.runtime.api.annotation.SofaReference;
+import com.baomidou.mybatisplus.mapper.EntityWrapper;
+import com.baomidou.mybatisplus.plugins.Page;
+import com.google.common.collect.Lists;
+import com.winsea.svc.base.base.entity.CommonRoleResource;
+import com.winsea.svc.base.base.service.ICommonRoleResourceService;
+import com.winsea.svc.base.security.entity.User;
+import com.winsea.svc.base.security.util.AuthSecurityUtils;
+import com.yh.saas.plugin.yiliangyiyun.constant.StatusEnum;
+import com.yh.saas.plugin.yiliangyiyun.entity.*;
+import com.yh.saas.plugin.yiliangyiyun.mapper.TranSettlementReportMapper;
+import com.yh.saas.plugin.yiliangyiyun.service.*;
+import com.baomidou.mybatisplus.service.impl.ServiceImpl;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * <p>
+ * 汽运结算报表 服务实现类
+ * </p>
+ *
+ * @author Gongdc
+ * @since 2021-08-27
+ */
+@Service
+public class TranSettlementReportServiceImpl extends ServiceImpl<TranSettlementReportMapper, TranSettlementReport> implements ITranSettlementReportService {
+
+//    @Autowired
+//    private INewWorkflowService workflowService;
+
+//    @SofaReference
+//    private ICommonRoleResourceService roleResourceService;
+    @Autowired
+    private IDriverPayeeInfoService driverPayeeInfoService;
+    @Autowired
+    private IDriverViewInfoService driverViewInfoService;
+
+    @Autowired
+    private IContractManagementInfoService contractManagementInfoService;
+    /**
+     * 汽运结算统计列表
+     *
+     * @param tranSettlementReport
+     * @return
+     */
+    @Override
+    public Page<TranSettlementReport> selectTranSettlementReport(TranSettlementReport tranSettlementReport) {
+        Map<String, Object> pageView = new HashMap<>();
+        pageView.put("startRecord", (tranSettlementReport.getCurrentPage() - 1)
+                * tranSettlementReport.getPageSize());
+//        List<String> businessKeys = null;
+//        if("1".equals(tranSettlementReport.getSearchType())){
+//            businessKeys = workflowService.getTaskBusinessKeysByCode("PROCUREMENT-CLOSE-REPORT");
+//        }
+//        List<String> statusSet = new ArrayList<>();
+//        List<String> resourceIdList = this.getResourceIdList();
+//        if (resourceIdList.contains("procurementCloseReport-Edit")) { // 填写,提交    权限做完以后替换
+//            List<String> statusList = Lists.newArrayList(StatusEnum.PUR_RETURN.getFlag());
+//            statusSet.addAll(statusList);
+//        }
+
+        //公司id
+        pageView.put("compId", tranSettlementReport.getCompId());
+        pageView.put("searchKeyWord", tranSettlementReport.getSearchKeyWord());
+        pageView.put("searchType", tranSettlementReport.getSearchType());
+        pageView.put("pageSize", tranSettlementReport.getPageSize());
+        pageView.put("currentPage", tranSettlementReport.getCurrentPage());
+        pageView.put("contractNo", tranSettlementReport.getContractNo());
+//        pageView.put("roleFlag", tranSettlementReport.getRoleFlag());
+        pageView.put("statusFlag", tranSettlementReport.getStatusFlag());
+//        pageView.put("businessKeys", businessKeys);
+//        pageView.put("statusSet", statusSet);
+
+
+        // 查询采购订单总数
+        Integer dataCount = baseMapper.getCountByCondition(pageView);
+        List<TranSettlementReport> dataList = baseMapper.getListByCondition(pageView);
+
+        if (!CollectionUtils.isEmpty(dataList)) {
+            for (TranSettlementReport tranSettlementReport1 : dataList) {
+                //查询账户信息
+                List<DriverViewInfo> driverViewInfoList = driverViewInfoService.selectList(new EntityWrapper<DriverViewInfo>()
+                        .eq("driver_name", tranSettlementReport1.getName())
+                        .eq("delete_flag", "0"));
+                if (!CollectionUtils.isEmpty(driverViewInfoList)){
+                    for (DriverViewInfo driverViewInfo:driverViewInfoList){
+                        List<DriverPayeeInfo> driverPayeeInfoList=driverPayeeInfoService.selectList(new EntityWrapper<DriverPayeeInfo>()
+                                .eq("driver_id", driverViewInfo.getId())
+                                .eq("delete_flag", "0"));
+                        tranSettlementReport1.setDriverPayeeInfoList(driverPayeeInfoList);
+                    }
+                }
+                //损耗
+                if(tranSettlementReport1.getUnloadingWeight() != null){
+                    tranSettlementReport1.setLossWeight(tranSettlementReport1.getLoadingWeight() - tranSettlementReport1.getUnloadingWeight());
+                }
+                //扣款
+                if(tranSettlementReport1.getLossWeight() <= (tranSettlementReport1.getLoadingWeight()/1000)){
+                    tranSettlementReport1.setDeductionAmount("0");
+                }
+                else{
+                    tranSettlementReport1.setDeductionAmount(String.valueOf((Float.valueOf(tranSettlementReport1.getLossWeight()) - (tranSettlementReport1.getLoadingWeight()/1000)) * tranSettlementReport1.getTransportPrice()));
+                }
+                //结算重量
+                if ("0".equals(tranSettlementReport1.getManualFlag())){
+                    //卸车为空时,结算重量=装车重量
+                    if (tranSettlementReport1.getUnloadingWeight() == null){
+                        tranSettlementReport1.setSettlementWeight(tranSettlementReport1.getLoadingWeight());
+                    }
+                    //卸车不为空时,结算重量=装卸取小
+                    else {
+                        tranSettlementReport1.setSettlementWeight(tranSettlementReport1.getLoadingWeight() > tranSettlementReport1.getUnloadingWeight() ? tranSettlementReport1.getUnloadingWeight() : tranSettlementReport1.getLoadingWeight());
+
+                    }
+                }
+                //应付金额
+                //已付金额
+                //未付金额
+            }
+//                String taskId = "";
+//                // 只有待审核状态才有taskId
+//                if (StringUtils.isNotBlank(tranSettlementReport1.getWorkflowId())) {
+//                    JSONObject jsonObject = workflowService.getActiveTask(Lists.newArrayList(tranSettlementReport1.getWorkflowId()), tranSettlementReport1.getId());
+//                    taskId = jsonObject.getString("taskId");
+//                    tranSettlementReport1.setTaskId(taskId);
+//                }
+//            }
+        }
+                Page<TranSettlementReport> page = new Page<>();
+                page.setRecords(dataList == null ? Lists.newArrayList() : dataList);
+                page.setTotal(dataCount == null ? 0 : dataCount);
+                page.setCurrent(tranSettlementReport.getCurrentPage());
+                page.setSize(tranSettlementReport.getPageSize());
+                return page;
+    }
+//    private List<String> getResourceIdList() {
+//        User currentUser = AuthSecurityUtils.getCurrentUserInfo();
+//        // 当前登录人主要角色
+//        return roleResourceService.getBindResourcesByUserId(currentUser.getUserId()).stream()
+//                .map(CommonRoleResource::getResourceId).collect(Collectors.toList());
+//
+//    }
+    /**
+     * 修改结算重量0修改扣款1修改已开发票2
+     * @param tranSettlementReport
+     * @return
+     */
+    @Override
+    public String editTranSettlementReport(TranSettlementReport tranSettlementReport) {
+        //查询汽运结算信息
+        TranSettlementReport tranSettlementReport1 = this.selectById(tranSettlementReport.getId());
+        if (tranSettlementReport1 != null ){
+            //0 修改结算重量
+            if(tranSettlementReport.getFlag()==0) {
+                tranSettlementReport1.setSettlementWeight(tranSettlementReport.getSettlementWeight());
+                tranSettlementReport1.setManualFlag("1");
+                //更改汽运结算信息
+                this.updateById(tranSettlementReport1);
+                return "OK";
+            }
+            //1 修改扣款
+            else if(tranSettlementReport.getFlag()==1){
+                tranSettlementReport1.setDeductionAmount(tranSettlementReport.getDeductionAmount());
+                //更改汽运结算信息
+                this.updateById(tranSettlementReport1);
+                return "OK";
+            }
+            //2 修改已开发票
+            else {
+                tranSettlementReport1.setAlreadyInvoice(tranSettlementReport1.getAlreadyInvoice() + tranSettlementReport.getAlreadyInvoice());
+                //更改汽运结算信息
+                this.updateById(tranSettlementReport1);
+                return "OK";
+            }
+        }
+        return "NG";
+    }
+    /**
+     * 合同编号下拉列表
+     * @param compId
+     */
+    @Override
+    public List<ContractManagementInfo> selectContractNoList(String compId) {
+        //查我方承运的合同
+        List<ContractManagementInfo> contractManagementInfoList = contractManagementInfoService.selectList(new EntityWrapper<ContractManagementInfo>()
+                .eq("comp_id", compId)
+                .eq("deliver_type", "1")
+                .eq("delete_flag", "0")
+                .orderBy("update_date", false));
+        for(ContractManagementInfo contractManagementInfo: contractManagementInfoList){
+            Float money=0.0f;
+            //查汽运结算报表
+            List<TranSettlementReport> tranSettlementReportList = this.selectList(new EntityWrapper<TranSettlementReport>()
+                    .eq("contract_no", contractManagementInfo.getContractNo())
+                    .eq("delete_flag", "0"));
+            if (!CollectionUtils.isEmpty(tranSettlementReportList)){
+                for (TranSettlementReport tranSettlementReport:tranSettlementReportList){
+                    money=money+tranSettlementReport.getAmountNotPayable();
+                }
+                //有未付金额
+                if (money > 0) {
+                    contractManagementInfo.setReportStatus("待结算");
+                }
+                else {
+                    contractManagementInfo.setReportStatus("已结算");
+                }
+            }
+        }
+        return contractManagementInfoList;
+    }
+
+    /**
+     * 出纳付款
+     *
+     * @param tranSettlementReport
+     * @return
+     */
+    @Override
+    public String payMoney(TranSettlementReport tranSettlementReport) {
+        List<TranSettlementReport> tranSettlementReportList = tranSettlementReport.getTranSettlementReportList();
+        Float money = tranSettlementReport.getMoney();
+        //付款多条
+        if (!CollectionUtils.isEmpty(tranSettlementReportList)) {
+            for (TranSettlementReport tranSettlementReport1 : tranSettlementReportList) {
+                TranSettlementReport tranSettlementReport2 = this.selectById(tranSettlementReport1.getId());
+                //付款金额大于本次循环未付金额
+                if (money >= tranSettlementReport1.getAmountNotPayable()) {
+                    money = money - tranSettlementReport1.getAmountNotPayable();
+                    //全部付款
+                    tranSettlementReport1.setStatus(StatusEnum.PUR_PAYaLL.getName());
+                    tranSettlementReport1.setStatusFlag(StatusEnum.PUR_PAYaLL.getFlag());
+                    tranSettlementReport1.setPaymentDate(tranSettlementReport.getPaymentDate());
+                    tranSettlementReport1.setPaymentScreenshot(tranSettlementReport2.getPaymentScreenshot() != null ? tranSettlementReport2.getPaymentScreenshot() + '$' + tranSettlementReport.getPaymentScreenshot() : tranSettlementReport.getPaymentScreenshot());
+                    tranSettlementReport1.setAmountEdPayable(tranSettlementReport1.getAmountEdPayable() + tranSettlementReport1.getAmountNotPayable());
+                    tranSettlementReport1.setAmountNotPayable(0.0f);
+                    this.updateById(tranSettlementReport1);
+                } else if (money > 0) {
+                    Float moneyTmp = money - tranSettlementReport1.getAmountNotPayable();
+                    //部分付款
+                    tranSettlementReport1.setStatus(StatusEnum.PUR_PAY.getName());
+                    tranSettlementReport1.setStatusFlag(StatusEnum.PUR_PAY.getFlag());
+                    tranSettlementReport1.setPaymentDate(tranSettlementReport.getPaymentDate());
+                    tranSettlementReport1.setPaymentScreenshot(tranSettlementReport2.getPaymentScreenshot() != null ? tranSettlementReport2.getPaymentScreenshot() + '$' + tranSettlementReport.getPaymentScreenshot() : tranSettlementReport.getPaymentScreenshot());
+                    tranSettlementReport1.setAmountEdPayable(tranSettlementReport1.getAmountEdPayable() + money);
+                    tranSettlementReport1.setAmountNotPayable(tranSettlementReport1.getAmountNotPayable() - money);
+                    this.updateById(tranSettlementReport1);
+                    money = moneyTmp;
+                } else {
+                    break;
+                }
+            }
+        }
+        return "ok";
+    }
+
+    /**
+     * 批量开发票
+     *
+     * @param tranSettlementReport
+     */
+    @Override
+    public String openInvoiceList(TranSettlementReport tranSettlementReport) {
+        List<TranSettlementReport> tranSettlementReportList = tranSettlementReport.getTranSettlementReportList();
+        //批量
+        if (!CollectionUtils.isEmpty(tranSettlementReportList)) {
+            for (TranSettlementReport tranSettlementReport1 : tranSettlementReportList) {
+                //已开发票金额等于已付金额
+                tranSettlementReport1.setAlreadyInvoice(tranSettlementReport1.getAmountEdPayable());
+                this.updateById(tranSettlementReport1);
+            }
+        }
+        return "ok";
+    }
+
+}

+ 56 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/WarehouseBaseInfoServiceImpl.java

@@ -47,6 +47,10 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
     private IContractManagementInfoService contractManagementInfoService;
     @Autowired
     private IInOutWarehouseTaskService iInOutWarehouseTaskService;
+    @Autowired
+    private IPurchaseOrderService purchaseOrderService;
+    @Autowired
+    private ISaleOrderService saleOrderService;
 
     /**
      * 仓库管理页面列表
@@ -592,6 +596,58 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
             }
             return temp;
         }
+        //查采购订单审核合同编号
+        else if(flag == 3){
+            List<ContractManagementInfo> contractManagementInfoList = contractManagementInfoService.selectList(new EntityWrapper<ContractManagementInfo>()
+                    .eq("comp_id", compId)
+                    .eq("contract_type", "2")
+                    .eq("delete_flag", "0")
+                    .orderBy("update_date", false));
+            if (!CollectionUtils.isEmpty(contractManagementInfoList)){
+                List<PurchaseOrder> purchaseOrderList=purchaseOrderService.selectList(new EntityWrapper<PurchaseOrder>()
+                        .eq("comp_id", compId)
+                        .eq("delete_flag", "0"));
+                for (int i=0;i<contractManagementInfoList.size();i++){
+                    if (!CollectionUtils.isEmpty(purchaseOrderList)){
+                    for (int j=0;j<purchaseOrderList.size();j++){
+                        if (contractManagementInfoList.get(i).getContractNo().equals(purchaseOrderList.get(j).getContractNo())){
+                            contractManagementInfoList.remove(contractManagementInfoList.get(i));
+                        }
+                      }
+                    }
+                    if(!CollectionUtils.isEmpty(contractManagementInfoList)) {
+                        temp.add(contractManagementInfoList.get(i));
+                    }
+                }
+            }
+            return temp;
+        }
+        //查销售合同编号
+        else if(flag == 4){
+            List<ContractManagementInfo> contractManagementInfoList = contractManagementInfoService.selectList(new EntityWrapper<ContractManagementInfo>()
+                    .eq("comp_id", compId)
+                    .eq("contract_type", "1")
+                    .eq("delete_flag", "0")
+                    .orderBy("update_date", false));
+            if (!CollectionUtils.isEmpty(contractManagementInfoList)){
+                List<SaleOrder> saleOrderList=saleOrderService.selectList(new EntityWrapper<SaleOrder>()
+                        .eq("comp_id", compId)
+                        .eq("delete_flag", "0"));
+                for (int i=0;i<contractManagementInfoList.size();i++){
+                    if (!CollectionUtils.isEmpty(saleOrderList)){
+                        for (int j=0;j<saleOrderList.size();j++){
+                            if (contractManagementInfoList.get(i).getContractNo().equals(saleOrderList.get(j).getContractNo())){
+                                contractManagementInfoList.remove(contractManagementInfoList.get(i));
+                            }
+                        }
+                    }
+                    if(!CollectionUtils.isEmpty(contractManagementInfoList)) {
+                        temp.add(contractManagementInfoList.get(i));
+                    }
+                }
+            }
+            return temp;
+        }
         //查采购、销售合同编号,以及移库任务编号
         else{
             List<ContractManagementInfo> contractManagementInfoList = contractManagementInfoService.selectList(new EntityWrapper<ContractManagementInfo>()

+ 5 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/SettledCompanyContactsMapper.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.yh.saas.plugin.yiliangyiyun.mapper.SettledCompanyContactsMapper">
+
+</mapper>

+ 5 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/SettledCompanyDynamicsMapper.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.yh.saas.plugin.yiliangyiyun.mapper.SettledCompanyDynamicsMapper">
+
+</mapper>

+ 5 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/SettledCompanyErrorMapper.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.yh.saas.plugin.yiliangyiyun.mapper.SettledCompanyErrorMapper">
+
+</mapper>

+ 115 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/SettledCompanyInfoMapper.xml

@@ -0,0 +1,115 @@
+<?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.yh.saas.plugin.yiliangyiyun.mapper.SettledCompanyInfoMapper">
+
+
+    <!-- 获得总数 -->
+    <select id="getCountByCondition" parameterType="Map" resultType="java.lang.Integer">
+        SELECT
+        COUNT(id)
+        FROM settled_company_info
+        WHERE delete_flag = '0'
+        <if test="searchKeyWord != null and searchKeyWord != ''">
+            AND (lower(comp_name) like lower(CONCAT('%',#{searchKeyWord},'%'))
+            OR lower(create_phone) like lower(CONCAT('%',#{searchKeyWord},'%')))
+        </if>
+        <if test="searchType != null and searchType != ''">
+            <if test="searchType == 1">
+                AND status_flag = '1'
+            </if>
+            <if test="searchType == 2">
+                AND status_flag = '3'
+            </if>
+            <if test="searchType == 3">
+                AND status_flag = '5'
+            </if>
+        </if>
+        <if test="createPhone != null and createPhone != ''">
+                AND create_phone = #{createPhone}
+        </if>
+        <if test="showFlag != null and showFlag != ''">
+            AND show_flag = #{showFlag}
+        </if>
+        <if test="province != null and province != ''">
+            AND province = #{province}
+        </if>
+        <if test="city != null and city != ''">
+            AND city = #{city}
+        </if>
+        <if test="area != null and area != ''">
+            AND area = #{area}
+        </if>
+        <if test="detailedAddress != null and detailedAddress != ''">
+            AND (lower(detailed_address) like lower(CONCAT('%',#{detailedAddress},'%')))
+        </if>
+        <if test="mainBusinessType != null and mainBusinessType != ''">
+            AND main_business_type = #{mainBusinessType}
+        </if>
+    </select>
+
+
+    <!-- 获得销售计划列表 -->
+    <select id="getListByCondition" parameterType="Map"
+            resultType="com.yh.saas.plugin.yiliangyiyun.entity.SettledCompanyInfo">
+        SELECT
+        id,
+        comp_name as compName,
+        create_phone as createPhone,
+        main_business_type as mainBusinessType,
+        title,
+        company_profile as companyProfile,
+        longitude,
+        latitude,
+        province,
+        city,
+        area,
+        detailed_address as detailedAddress,
+        attachment_address as attachmentAddress,
+        status,
+        status_flag as statusFlag,
+        show_flag as showFlag,
+        update_date as updateDate
+        FROM settled_company_info
+        WHERE delete_flag = '0'
+        <if test="searchKeyWord != null and searchKeyWord != ''">
+            AND (lower(comp_name) like lower(CONCAT('%',#{searchKeyWord},'%'))
+            OR lower(create_phone) like lower(CONCAT('%',#{searchKeyWord},'%')))
+        </if>
+        <if test="searchType != null and searchType != ''">
+            <if test="searchType == 1">
+                AND status_flag = '1'
+            </if>
+            <if test="searchType == 2">
+                AND status_flag = '3'
+            </if>
+            <if test="searchType == 3">
+                AND status_flag = '5'
+            </if>
+        </if>
+        <if test="createPhone != null and createPhone != ''">
+            AND create_phone = #{createPhone}
+        </if>
+        <if test="showFlag != null and showFlag != ''">
+            AND show_flag = #{showFlag}
+        </if>
+        <if test="province != null and province != ''">
+            AND province = #{province}
+        </if>
+        <if test="city != null and city != ''">
+            AND city = #{city}
+        </if>
+        <if test="area != null and area != ''">
+            AND area = #{area}
+        </if>
+        <if test="detailedAddress != null and detailedAddress != ''">
+            AND (lower(detailed_address) like lower(CONCAT('%',#{detailedAddress},'%')))
+        </if>
+        <if test="mainBusinessType != null and mainBusinessType != ''">
+            AND main_business_type = #{mainBusinessType}
+        </if>
+        ORDER BY status_flag asc , update_date DESC
+        <if test="currentPage != null and currentPage != ''">
+            LIMIT ${startRecord}, ${pageSize}
+        </if>
+    </select>
+</mapper>

+ 12 - 4
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/TranProcessInfoMapper.xml

@@ -4,8 +4,9 @@
 
     <!-- 获得汽运调度总数 -->
     <select id="getCountByCondition" parameterType="Map" resultType="java.lang.Integer">
-        SELECT
-        COUNT(p.id)
+        SELECT COUNT(*) FROM
+        (
+        SELECT COUNT(p.id)
         FROM tran_task_info t
         LEFT JOIN tran_process_info p ON t.id=p.info_id
         LEFT JOIN tran_car_info c ON t.id=c.info_id
@@ -52,7 +53,7 @@
             OR lower(p.receiver) like lower(CONCAT('%',#{searchKeyWord},'%'))
             OR lower(p.process_no) like lower(CONCAT('%',#{searchKeyWord},'%')))
         </if>
-        ORDER BY t.status DESC,t.update_date DESC
+        group by p.id )groups
     </select>
 
     <!-- 汽运调度列表查询 -->
@@ -124,10 +125,17 @@
             OR lower(p.receiver) like lower(CONCAT('%',#{searchKeyWord},'%'))
             OR lower(p.process_no) like lower(CONCAT('%',#{searchKeyWord},'%')))
         </if>
+        group by p.id
         ORDER BY p.process_status DESC,p.update_date DESC
         <if test="currentPage != null and currentPage != ''">
             LIMIT ${startRecord}, ${pageSize}
         </if>
     </select>
-
+    <!-- 获得汽运调度总数 -->
+    <select id="getCarByCondition" parameterType="Map" resultType="java.lang.Integer">
+        SELECT COUNT(c.id)
+        FROM tran_car_info c
+        WHERE
+        c.process_id= #{id}
+    </select>
 </mapper>

+ 107 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/TranSettlementReportMapper.xml

@@ -0,0 +1,107 @@
+<?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.yh.saas.plugin.yiliangyiyun.mapper.TranSettlementReportMapper">
+    <!-- 获得汽运结算统计总数 -->
+    <select id="getCountByCondition" parameterType="Map" resultType="java.lang.Integer">
+        SELECT
+        COUNT(id)
+        FROM tran_settlement_report
+        WHERE
+        delete_flag = '0'
+        AND comp_id = #{compId}
+        <if test="searchType != null and searchType != ''">
+            <if test="searchType == 2">
+                AND amount_ing_payable-amount_ed_payable>0
+            </if>
+            <if test="searchType == 3">
+                AND amount_ing_payable-amount_ed_payable=0
+            </if>
+        </if>
+        <if test="contractNo != null and contractNo != ''and contractNo != '全部合同'">
+            AND contract_no = #{contractNo}
+        </if>
+<!--        <if test="businessKeys != null and businessKeys.size > 0">-->
+<!--            and(-->
+<!--            <foreach collection="businessKeys" item="businessValue" open="(" close=")" separator="or">-->
+<!--                id = #{businessValue}-->
+<!--            </foreach>-->
+<!--            )-->
+<!--        </if>-->
+<!--        <if test="statusSet != null and statusSet.size > 0">-->
+<!--            or (-->
+<!--            <foreach collection="statusSet" item="statusId" separator="or" open="(" close=")">-->
+<!--                status_flag =-->
+<!--                <if test="statusId != null">-->
+<!--                    #{statusId}-->
+<!--                </if>-->
+<!--            </foreach>-->
+<!--            )-->
+<!--        </if>-->
+    </select>
+    <!-- 获得汽运结算统计列表 -->
+    <select id="getListByCondition" parameterType="Map"
+            resultType="com.yh.saas.plugin.yiliangyiyun.entity.TranSettlementReport">
+        SELECT
+        id,
+        comp_id as compId,
+        contract_no as contractNo,
+        process_no as processNo,
+        phone,
+        name as name,
+        tran_car_no as tranCarNo,
+        car_no as carNo,
+        loading_weight as loadingWeight,
+        unloading_weight as unloadingWeight,
+        loss_weight as lossWeight,
+        manual_flag as ManualFlag,
+        transport_price as transportPrice,
+        settlement_weight as settlementWeight,
+        deduction_amount as deductionAmount,
+        amount_ing_payable as amountIngPayable,
+        amount_ed_payable as amountEdPayable,
+        amount_not_payable as amountNotPayable,
+        already_invoice as alreadyInvoice,
+        payment_date as paymentDate,
+        payment_screenshot as paymentScreenshot,
+        status,
+        status_flag as statusFlag,
+        approve_status as approveStatus,
+        workflow_id as workflowId
+        FROM tran_settlement_report
+        WHERE
+        delete_flag = '0'
+        AND comp_id = #{compId}
+        <if test="searchType != null and searchType != ''">
+            <if test="searchType == 2">
+                AND amount_ing_payable-amount_ed_payable>0
+            </if>
+            <if test="searchType == 3">
+                AND amount_ing_payable-amount_ed_payable=0
+            </if>
+        </if>
+        <if test="contractNo != null and contractNo != ''and contractNo != '全部合同'">
+            AND contract_no = #{contractNo}
+        </if>
+<!--        <if test="businessKeys != null and businessKeys.size > 0">-->
+<!--            and(-->
+<!--            <foreach collection="businessKeys" item="businessValue" open="(" close=")" separator="or">-->
+<!--                id = #{businessValue}-->
+<!--            </foreach>-->
+<!--            )-->
+<!--        </if>-->
+<!--        <if test="statusSet != null and statusSet.size > 0">-->
+<!--            or (-->
+<!--            <foreach collection="statusSet" item="statusId" separator="or" open="(" close=")">-->
+<!--                status_flag =-->
+<!--                <if test="statusId != null">-->
+<!--                    #{statusId}-->
+<!--                </if>-->
+<!--            </foreach>-->
+<!--            )-->
+<!--        </if>-->
+        ORDER BY create_date DESC
+        <if test="currentPage != null and currentPage != ''">
+            LIMIT ${startRecord}, ${pageSize}
+        </if>
+    </select>
+</mapper>