Explorar el Código

Merge branch 'feature/relation_type_item' into feature/pushfee

# Conflicts:
#	sp-admin/sa-view/tb-invoice-order/tb-invoice-order-list.html
#	sp-server/.gitignore
#	sp-server/src/main/java/com/pj/project/tb_entity/TbEntityService.java
#	sp-server/src/main/java/com/pj/project/tb_invoice_info/TbInvoiceInfoService.java
#	sp-server/src/main/resources/application-dev.yml
lzm hace 3 años
padre
commit
1079219c59

+ 8 - 4
sp-server/src/main/java/com/pj/project/tb_business/TbBusinessService.java

@@ -371,8 +371,8 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
                                 .setPickCustomerName(tbCostomer.getName()).setPickTime(now)
                                 .setConfirm(1).setConfirmTime(now);
                         tbBusinessItemService.updateById(item);
-                        List<String> customerMessageType = StrUtil.splitTrim(tbCostomer.getMessageType(),",");
-                        if(customerMessageType.contains(messageType)){
+                        List<String> customerMessageType = StrUtil.splitTrim(tbCostomer.getMessageType(), ",");
+                        if (customerMessageType.contains(messageType)) {
                             spAdminList.stream().map(SpAdmin::getOpenid).forEach(openId -> {
                                 String detailUrl = myConfig.getWebDomain() + "/pages/business-item/item-detail?itemId=" + item.getId() + "&openid=" + openId;
                                 wxService.sendTemplateMsg(wxConfig.getBusinessConfirmTemplate(), openId, msgDataBO, detailUrl);
@@ -560,8 +560,12 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
                 TbSortGroup sortGroup = tbSortGroupService.getById(tbBusinessSort.getGroupId());
                 if (sortGroup.getCompletePay().equals(1) && sortGroup.getStatus().equals(1)) {
                     List<TbBusinessSort> sorts = tbBusinessSortService.findByGroupId(sortGroup.getId());
-                    if (sorts.size() > items.size()) {
-                        result.put("showPay", false);
+                    for (TbBusinessSort sort : sorts) {
+                       long count= items.stream().filter(tbBusinessItem -> StrUtil.equals(sort.getTypeId(),tbBusinessItem.getItemTypeId()))
+                                .count();
+                       if (count==0){
+                           result.put("showPay", false);
+                       }
                     }
                 }
             }