haungfuli пре 2 година
родитељ
комит
7a1dfe4a4f

+ 11 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/PublishTaskInfoController.java

@@ -25,6 +25,17 @@ public class PublishTaskInfoController {
     @Autowired
     private IPublishTaskInfoService publishTaskInfoService;
 
+    /**
+     * 货主我的发布,各状态任务数量
+     * @param publishTaskInfo
+     * @return
+     */
+    @Log(title = "我的发布各状态任务数量")
+    @GetMapping("/selectNum")
+    public PublishTaskInfo selectNum(PublishTaskInfo publishTaskInfo) {
+        return publishTaskInfoService.selectNum(publishTaskInfo);
+    }
+
     /**
      * 任务列表
      * @param publishTaskInfo

+ 23 - 1
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/PublishTaskInfo.java

@@ -268,7 +268,7 @@ public class PublishTaskInfo extends BaseModel<PublishTaskInfo> {
     private String searchKeyWord;
 
     /**
-     * 查询类型
+     * 查询类型(1审核中2未通过3已通过4已过期)
      */
     @TableField(exist = false)
     private String searchType;
@@ -336,6 +336,28 @@ public class PublishTaskInfo extends BaseModel<PublishTaskInfo> {
      */
     @TableField(exist = false)
     private String flag;
+
+    /**
+     * 审核中数量
+     */
+    @TableField(exist = false)
+    private Integer examieNum;
+    /**
+     * 未通过数量
+     */
+    @TableField(exist = false)
+    private Integer noNum;
+    /**
+     * 已通过数量
+     */
+    @TableField(exist = false)
+    private Integer passNum;
+    /**
+     * 已过期数量
+     */
+    @TableField(exist = false)
+    private Integer overdueNum;
+
     @Override
     protected Serializable pkVal() {
         return this.id;

+ 7 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/IPublishTaskInfoService.java

@@ -18,6 +18,13 @@ import java.util.List;
  */
 public interface IPublishTaskInfoService extends IService<PublishTaskInfo> {
 
+    /**
+     * 货主我的发布,各状态任务数量
+     * @param publishTaskInfo
+     * @return
+     */
+    PublishTaskInfo selectNum(PublishTaskInfo publishTaskInfo);
+
     /**
      * 发布记录列表
      * @param publishTaskInfo

+ 29 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/PublishTaskInfoServiceImpl.java

@@ -658,6 +658,35 @@ public class PublishTaskInfoServiceImpl extends ServiceImpl<PublishTaskInfoMappe
         }
     }
 
+
+    /**
+     * 货主我的发布,各状态任务数量
+     *
+     * @param publishTaskInfo
+     * @return
+     */
+    @Override
+    public PublishTaskInfo selectNum(PublishTaskInfo publishTaskInfo) {
+        PublishTaskInfo publishTaskInfo1 = new PublishTaskInfo();
+        //审核中数量
+        Integer count = this.selectCount(new EntityWrapper<PublishTaskInfo>().eq("common_id",publishTaskInfo.getCommonId())
+                .eq("status_key","1").eq("delete_flag","0"));
+        //未通过数量
+        Integer count1 = this.selectCount(new EntityWrapper<PublishTaskInfo>().eq("common_id",publishTaskInfo.getCommonId())
+                .eq("status_key","3").eq("delete_flag","0"));
+        //已通过数量
+        Integer count2 = this.selectCount(new EntityWrapper<PublishTaskInfo>().eq("common_id",publishTaskInfo.getCommonId())
+                .eq("status_key","5").eq("delete_flag","0"));
+        //已过期数量
+        Integer count3 = this.selectCount(new EntityWrapper<PublishTaskInfo>().eq("common_id",publishTaskInfo.getCommonId())
+                .eq("status_key","7").eq("delete_flag","0"));
+        publishTaskInfo1.setExamieNum(count);
+        publishTaskInfo1.setNoNum(count1);
+        publishTaskInfo1.setPassNum(count2);
+        publishTaskInfo1.setOverdueNum(count3);
+        return publishTaskInfo1;
+    }
+
     /**
      * 任务列表
      *

+ 1 - 1
winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/CargoOwnerInfoMapper.xml

@@ -58,7 +58,7 @@
         o.advance_payment as advancePayment,
         o.charge_proportion as chargeProportion,
         o.accumulated_freight as accumulatedFreight,
-        GROUP_CONCAT(co.company) as proxyIdentity,
+        GROUP_CONCAT(co.company SEPARATOR '\n') as proxyIdentity,
         o.authentication_status_key as authenticationStatusKey,
         case when o.authentication_status is null then '未认证' else o.authentication_status end as authenticationStatus,
         o.back_stage_status_key as backStageStatusKey,

+ 3 - 3
winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/FreightInfoMapper.xml

@@ -32,7 +32,7 @@
             resultType="com.yh.saas.plugin.yiliangyiyun.entity.FreightInfo">
         <if test="searchType != null and searchType != ''">
             <if test="searchType == 1">
-                SELECT IFNULL(SUM(b.profit)/10000, 0 ) as profit, right(aa.date,2) as date
+                SELECT IFNULL(ROUND(SUM(b.profit)/10000,4), 0 ) as profit, right(aa.date,2) as date
                 FROM (SELECT @cdate := date_add( @cdate, INTERVAL - 1 DAY ) date
                 FROM ( SELECT @cdate := date_add( CURDATE(), INTERVAL 1 DAY ) FROM hy_freight_info LIMIT 30 ) a ) aa
                 LEFT JOIN (select id,profit, profit_date from hy_freight_info
@@ -42,7 +42,7 @@
                 ORDER BY aa.date DESC;
             </if>
             <if test="searchType == 2">
-                SELECT IFNULL( b.profit, 0 ) as profit , right(aa.date,2) as date
+                SELECT IFNULL( ROUND(b.profit,4), 0 ) as profit , right(aa.date,2) as date
                 FROM (SELECT DATE_FORMAT( @cdate := date_add( @cdate, INTERVAL - 1 MONTH ), '%Y-%m' ) date
                 FROM ( SELECT @cdate := date_add( CURDATE(), INTERVAL 1 MONTH ) FROM hy_freight_info ) a LIMIT 12
                 ) aa LEFT JOIN (SELECT SUM(profit)/10000 profit,mon profit_date
@@ -52,7 +52,7 @@
                 ) b on aa.date = b.profit_date;
             </if>
             <if test="searchType == 3">
-                SELECT IFNULL( b.profit, 0 ) as profit,aa.date as date
+                SELECT IFNULL( ROUND(b.profit,4), 0 ) as profit,aa.date as date
                 FROM (SELECT DATE_FORMAT( @cdate := date_add( @cdate, INTERVAL - 1 YEAR ), '%Y' ) date
                 FROM ( SELECT @cdate := date_add( CURDATE(), INTERVAL 1 YEAR ) FROM hy_freight_info LIMIT 10) a ) aa
                 LEFT JOIN (SELECT SUM(profit)/10000 profit,year profit_date

+ 6 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/PublishTaskInfoMapper.xml

@@ -32,6 +32,9 @@
             <if test="searchType == 3">
                 AND p.status_key = '5'
             </if>
+            <if test="searchType == 4">
+                AND p.status_key = '7'
+            </if>
         </if>
     </select>
     <!-- 获得任务列表 -->
@@ -114,6 +117,9 @@
             <if test="searchType == 3">
                 AND p.status_key = '5'
             </if>
+            <if test="searchType == 4">
+                AND p.status_key = '7'
+            </if>
         </if>
         ORDER BY p.create_date DESC
         <if test="currentPage != null and currentPage != ''">