Bladeren bron

统计数量接口修改

dongbw 7 jaren geleden
bovenliggende
commit
18a566bf0a

+ 5 - 4
src/main/java/com/uas/ps/inquiry/dao/PurcInquiryItemDao.java

@@ -10,6 +10,7 @@ import org.springframework.data.repository.query.Param;
 import org.springframework.stereotype.Repository;
 
 import javax.transaction.Transactional;
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -87,7 +88,7 @@ public interface PurcInquiryItemDao extends JpaSpecificationExecutor<PurcInquiry
      * @return 查询结果
      */
     @Query(value = "select count(1) from (select 1 from purc$puinquiryitems where id_enuu = :enuu and id_useruu = :useruu and id_date between :starttime and :endtime group by id_inbrand, id_cmpcode) a", nativeQuery = true)
-    Integer sumPersonalPublish(@Param("enuu") Long enuu, @Param("useruu") Long useruu, @Param("starttime") Long starttime, @Param("endtime") Long endtime);
+    Integer sumPersonalPublish(@Param("enuu") Long enuu, @Param("useruu") Long useruu, @Param("starttime") Date starttime, @Param("endtime") Date endtime);
 
     /**
      * 查询企业不同型号发布询价数量统计
@@ -98,7 +99,7 @@ public interface PurcInquiryItemDao extends JpaSpecificationExecutor<PurcInquiry
      * @return 查询结果
      */
     @Query(value = "select count(1) from (select 1 from purc$puinquiryitems where id_enuu = :enuu and id_date between :starttime and :endtime group by id_inbrand, id_cmpcode) a", nativeQuery = true)
-    Integer sumEnterprisePublish(@Param("enuu") Long enuu, @Param("starttime") Long starttime, @Param("endtime")Long endtime);
+    Integer sumEnterprisePublish(@Param("enuu") Long enuu, @Param("starttime") Date starttime, @Param("endtime")Date endtime);
 
     /**
      * 查询个人报价询价数量统计
@@ -110,7 +111,7 @@ public interface PurcInquiryItemDao extends JpaSpecificationExecutor<PurcInquiry
      * @return 查询结果
      */
     @Query(value = "select count(1) from public$inquiryitems where id_venduu = :enuu and id_venduseruu = :useruu and id_offertime between :starttime and :endtime", nativeQuery = true)
-    Integer sumPersonalReply(@Param("enuu") Long enuu, @Param("useruu") Long useruu, @Param("starttime") Long starttime, @Param("endtime") Long endtime);
+    Integer sumPersonalReply(@Param("enuu") Long enuu, @Param("useruu") Long useruu, @Param("starttime") Date starttime, @Param("endtime") Date endtime);
 
     /**
      * 查询企业回复询价数量统计
@@ -121,6 +122,6 @@ public interface PurcInquiryItemDao extends JpaSpecificationExecutor<PurcInquiry
      * @return 查询结果
      */
     @Query(value = "select count(1) from public$inquiryitems where id_venduu = :enuu and id_offertime between :starttime and :endtime", nativeQuery = true)
-    Integer sumEnterpriseReply(@Param("enuu") Long enuu, @Param("starttime") Long starttime, @Param("endtime")Long endtime);
+    Integer sumEnterpriseReply(@Param("enuu") Long enuu, @Param("starttime") Date starttime, @Param("endtime")Date endtime);
 
 }

+ 4 - 4
src/main/java/com/uas/ps/inquiry/service/impl/PublicInquiryServiceImpl.java

@@ -1823,7 +1823,7 @@ public class PublicInquiryServiceImpl implements PublicInquiryService {
     @Override
     public ModelMap sumPersonalPublish(Long enuu, Long useruu, Long starttime, Long endtime) {
         ModelMap map = new ModelMap();
-        map.put("count", purcInquiryItemDao.sumPersonalPublish(enuu, useruu, starttime, endtime));
+        map.put("count", purcInquiryItemDao.sumPersonalPublish(enuu, useruu, new Date(starttime), new Date(endtime)));
         return map;
     }
 
@@ -1838,7 +1838,7 @@ public class PublicInquiryServiceImpl implements PublicInquiryService {
     @Override
     public ModelMap sumEnterprisePublish(Long enuu, Long starttime, Long endtime) {
         ModelMap map = new ModelMap();
-        map.put("count", purcInquiryItemDao.sumEnterprisePublish(enuu, starttime, endtime));
+        map.put("count", purcInquiryItemDao.sumEnterprisePublish(enuu, new Date(starttime), new Date(endtime)));
         return map;
     }
 
@@ -1854,7 +1854,7 @@ public class PublicInquiryServiceImpl implements PublicInquiryService {
     @Override
     public ModelMap sumPersonalReply(Long enuu, Long useruu, Long starttime, Long endtime) {
         ModelMap map = new ModelMap();
-        map.put("count", purcInquiryItemDao.sumPersonalReply(enuu, useruu, starttime, endtime));
+        map.put("count", purcInquiryItemDao.sumPersonalReply(enuu, useruu, new Date(starttime), new Date(endtime)));
         return map;
     }
 
@@ -1869,7 +1869,7 @@ public class PublicInquiryServiceImpl implements PublicInquiryService {
     @Override
     public ModelMap sumEnterpriseReply(Long enuu, Long starttime, Long endtime) {
         ModelMap map = new ModelMap();
-        map.put("count", purcInquiryItemDao.sumEnterpriseReply(enuu, starttime, endtime));
+        map.put("count", purcInquiryItemDao.sumEnterpriseReply(enuu, new Date(starttime), new Date(endtime)));
         return map;
     }