ccjgmwz 3 سال پیش
والد
کامیت
2a6c7b1356

+ 1 - 1
winsea-haixin-platform-backend/src/main/resources/application-prod.yml

@@ -7,7 +7,7 @@ spring:
   datasource:
     driver-class-name: com.mysql.jdbc.Driver
     password: Ccj841968545
-    url: jdbc:mysql://47.100.3.209:3306/ylyy?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false&serverTimezone=Asia/Shanghai
+    url: jdbc:mysql://47.100.3.209:3306/yilaingyiyun?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false&serverTimezone=Asia/Shanghai
     username: root
   redis:
     database: 0

+ 1 - 0
winsea-haixin-platform-backend/src/main/resources/application.yml

@@ -49,6 +49,7 @@ auth:
     - /ws/**/*
     - /commonUser/*
     - /contractManagementInfo/*
+    - /salePlanInfo/getTips
   expire-in: 36000
   login-url: /login.html
   logout-url: /auth/api/logout

+ 16 - 1
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/SalePlanInfoController.java

@@ -4,6 +4,7 @@ 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.service.ISalePlanInfoService;
+import com.yh.saas.plugin.yiliangyiyun.service.IWarehouseInOutInfoService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -20,6 +21,8 @@ import org.springframework.web.bind.annotation.*;
 public class SalePlanInfoController {
     @Autowired
     private ISalePlanInfoService salePlanInfoService;
+    @Autowired
+    private IWarehouseInOutInfoService warehouseInOutInfoService;
 
     /**
      * 查看销售计划
@@ -91,6 +94,18 @@ public class SalePlanInfoController {
         return salePlanInfoService.examine(salePlanInfo);
 
     }
-
+    /**
+     * 获取tips
+     * @param phone
+     * @return
+     */
+    @GetMapping("/getTips")
+    public SalePlanInfo getTips(String  phone) {
+        SalePlanInfo salePlanInfo = new SalePlanInfo();
+        salePlanInfo.setTaskTip(warehouseInOutInfoService.selectCountByPhone(phone));
+        salePlanInfo.setContractTip(0);
+        salePlanInfo.setMyTip(salePlanInfo.getContractTip()+salePlanInfo.getTaskTip());
+        return salePlanInfo;
+    }
 }
 

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

@@ -250,6 +250,12 @@ public class SalePlanInfo extends BaseModel<SalePlanInfo> {
     private String receivePrivate;
 
 
+    @TableField(exist = false)
+    private Integer taskTip;
+    @TableField(exist = false)
+    private Integer contractTip;
+    @TableField(exist = false)
+    private Integer myTip;
     @Override
     protected Serializable pkVal() {
         return this.id;

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

@@ -282,6 +282,9 @@ public class WarehouseInOutInfo extends BaseModel<WarehouseInOutInfo> {
     @TableField(exist = false)
     private String keyWord;
 
+    @TableField(exist = false)
+    private String phone;
+
     @Override
     protected Serializable pkVal() {
         return this.id;

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

@@ -59,5 +59,4 @@ public interface ISalePlanInfoService extends IService<SalePlanInfo> {
      * @return
      */
     String examine(SalePlanInfo salePlanInfo);
-
 }

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

@@ -98,4 +98,5 @@ public interface IWarehouseInOutInfoService extends IService<WarehouseInOutInfo>
      *查看已派车辆
      */
     List<WarehouseInOutInfo> selectDistributeCar(String contractNo);
+    Integer selectCountByPhone(String phone);
 }

+ 17 - 1
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/WarehouseInOutInfoServiceImpl.java

@@ -588,6 +588,7 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
         pageView.put("searchType", warehouseInOutInfo.getSearchType());
         pageView.put("pageSize", warehouseInOutInfo.getPageSize());
         pageView.put("currentPage", warehouseInOutInfo.getCurrentPage());
+        pageView.put("phone", warehouseInOutInfo.getPhone());
         // 查询记录总数
         Integer dataCount = baseMapper.getCountByCondition(pageView);
         List<WarehouseInOutInfo> dataList = baseMapper.getListByCondition(pageView);
@@ -609,6 +610,7 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
         Map<String, Object> pageView = new HashMap<>();
         pageView.put("keyWord",warehouseInOutInfo.getKeyWord());
         pageView.put("statusFlag",warehouseInOutInfo.getStatusFlag());
+        pageView.put("phone",warehouseInOutInfo.getPhone());
         List<WarehouseInOutInfo> dataList = baseMapper.selectInfoByKeyWord(pageView);
         return dataList;
     }
@@ -742,5 +744,19 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
                 .orderBy("update_date", false));
         return warehouseInOutInfoList;
     }
-
+    /**
+     * 流转记录查询
+     *
+     * @param phone
+     * @return
+     */
+    @Override
+    public Integer selectCountByPhone(String phone) {
+        Map<String, Object> pageView = new HashMap<>();
+        pageView.put("statusFlag", 1);
+        pageView.put("phone", phone);
+        // 查询记录总数
+        Integer dataCount = baseMapper.getCountByCondition(pageView);
+        return dataCount;
+    }
 }

+ 6 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/WarehouseInOutInfoMapper.xml

@@ -7,8 +7,10 @@
         COUNT(w.id)
         FROM warehouse_in_out_info w
         left join warehouse_in_out_detail d on w.id=d.info_id
+        left join warehouse_base_info wbi on wbi.id = w.base_id
         WHERE
         w.delete_flag = '0'
+        and wbi.person_phone = ${phone}
         <if test="searchType != null and searchType != ''">
             <if test="searchType == 2">
                 AND w.in_out_flag = '1'
@@ -62,8 +64,10 @@
         w.task_type as taskType
         FROM warehouse_in_out_info w
         left join warehouse_in_out_detail d on w.id=d.info_id
+        left join warehouse_base_info wbi on wbi.id = w.base_id
         WHERE
         w.delete_flag = '0'
+        and wbi.person_phone = ${phone}
         <if test="searchType != null and searchType != ''">
             <if test="searchType == 2">
                 AND w.in_out_flag = '1'
@@ -180,10 +184,12 @@
         w.start_weight as startWeight,
         w.address_url as addressUrl
         FROM warehouse_in_out_info w
+        left join warehouse_base_info wbi on wbi.id = w.base_id
         left join warehouse_in_out_detail d on w.id=d.info_id
         WHERE 1=1
         and w.delete_flag = '0'
         and w.status_flag = ${statusFlag}
+        and wbi.person_phone = ${phone}
         and ( w.contract_no like "%${keyWord}%" or w.tran_car_no like "%${keyWord}%" or car_no like "%${keyWord}%")
         ORDER BY w.update_date DESC
     </select>