Browse Source

客户采购更变单无需处理和需处理写反了

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@10482 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
wangmh 8 years ago
parent
commit
7e34207c05

+ 1 - 2
src/main/java/com/uas/platform/b2b/controller/SaleOrderChangeController.java

@@ -422,8 +422,7 @@ public class SaleOrderChangeController {
 			value = Integer.valueOf(objects[0].toString());
 			if ("unNeedReply".equals(key)) {
 				all = all + value;
-			}
-			if(Status.NOT_REPLY.toString().equals(key)){
+			} else if(Status.NOT_REPLY.toString().equals(key)){
 				key = "notReply";
 				all = all + value;
 			} else if (Status.REPLIED.toString().equals(key)){

+ 2 - 2
src/main/java/com/uas/platform/b2b/dao/PurchaseOrderChangeDao.java

@@ -96,7 +96,7 @@ public interface PurchaseOrderChangeDao extends JpaSpecificationExecutor<Purchas
 	 * @Param ids 未读单据id
 	 * @return
 	 */
-	@Query("select count(p), p.status from PurchaseOrderChange p where p.id in :ids and p.unNeedReply=1 group by p.status")
+	@Query("select count(p), p.status from PurchaseOrderChange p where p.id in :ids and (p.unNeedReply is null or p.unNeedReply=0) group by p.status")
 	List<Object[]> getUnreadCountEveryStatus(@Param("ids") List<Long> ids);
 
 	/**
@@ -105,6 +105,6 @@ public interface PurchaseOrderChangeDao extends JpaSpecificationExecutor<Purchas
 	 * @Param ids 未读单据id
 	 * @return
 	 */
-	@Query("select count(p) from PurchaseOrderChange p where p.id in :ids and (p.unNeedReply is null or p.unNeedReply=0)")
+	@Query("select count(p) from PurchaseOrderChange p where p.id in :ids and p.unNeedReply=1")
 	Integer getNotNeedReplyCount(@Param("ids") List<Long> ids);
 }

+ 1 - 1
src/main/webapp/resources/tpl/index/sale/change.html

@@ -138,7 +138,7 @@
 					<div class="btn-group btn-group-sm">
 						<button type="button" class="btn btn-default btn-line"
 							ng-class="{'btn-info':active=='unread'}" ng-click="setActive('unread')">无需确认
-							<b class="new-dot" ng-if="unread.notReply > 0">{{unread.all>99?'99+':unread.notReply}}</b>
+							<b class="new-dot" ng-if="unread.unNeedReply > 0">{{unread.unNeedReply>99?'99+':unread.unNeedReply}}</b>
 						</button>
 					</div>
 				</div>