doum
3 天以前 66b84de58e3efae14c1e258ee716e02ad9557497
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/ApproveServiceImpl.java
@@ -286,6 +286,7 @@
                                Constants.equalsInteger(i.getUserId(),memberId)
                                &&Constants.equalsInteger(i.getStatus(),Constants.ZERO)
                                &&Constants.equalsInteger(i.getSendacopy(),Constants.ZERO)
                                        &&StringUtils.equals(i.getParam2(),"0")
                        ).count()
                );
                //已处理数据
@@ -335,6 +336,7 @@
                    noticesList.stream().filter(i->Constants.equalsInteger(i.getUserId(),noticesDTO.getMemberId())
                            &&Constants.equalsInteger(i.getStatus(),Constants.ZERO)
                            &&Constants.equalsInteger(i.getSendacopy(),Constants.ZERO)
                            &&StringUtils.equals(i.getParam2(),"0")
                    ).count()
            );
            internalHomeVO.setNoticeDealNum(
@@ -493,7 +495,7 @@
        approveList.add(createUserApprove);
        //查询所有待处理人
        String token = systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode();
//        String token = systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode();
        //审批业务数据
        for (int i = 0; i < approveParamList.size(); i++) {
            ApproveParam approveParam = approveParamList.get(i);
@@ -600,8 +602,7 @@
                            wxPlatNotice.sendPlatformBookTemplateNotice(systemDictDataBiz,
                                    wxNoticeConfigMapper,
                                    platformBooksMapper.selectById(businessId),
                                    WxPlatConstants.platformBookContent.platformBookWaitAudit,
                                    token,
                                    WxPlatConstants.platformBookContent.platformBookWaitAudit,
                                    Arrays.asList(member.getSystemOpenid().split(",")),
                                    Constants.ONE);
                        }
@@ -617,7 +618,6 @@
                        if(StringUtils.isNotBlank(member.getSystemOpenid())){
                            wxPlatNotice.sendVisitTemplateNotice(systemDictDataBiz,
                                    wxNoticeConfigMapper,visitsMapper.selectById(businessId), WxPlatConstants.visitContent.visitWaitAudit,
                                    token,
                                    Arrays.asList(member.getSystemOpenid().split(","))
                            );
                        }
@@ -632,7 +632,6 @@
                        if(StringUtils.isNotBlank(member.getSystemOpenid())){
                            wxPlatNotice.sendVisitTemplateNotice(systemDictDataBiz,
                                    wxNoticeConfigMapper,visitsMapper.selectById(businessId), WxPlatConstants.visitReportContent.visitReportWaitAudit,
                                    token,
                                    Arrays.asList(member.getSystemOpenid().split(","))
                            );
                        }
@@ -654,7 +653,6 @@
                                            wxNoticeConfigMapper,
                                            carUseBookMapper.selectById(businessId),
                                            WxPlatConstants.carUseBookContent.carUseBookWaitAudit,
                                            token,
                                            Arrays.asList(member.getSystemOpenid().split(",")),
                                            Constants.ONE);
                                }
@@ -723,13 +721,23 @@
            if(Objects.isNull(platformBooks)){
                throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"未查询到业务数据信息");
            }
            title = "[物流车入园预约]申请人-" + platformBooks.getDriverName();
            jsonMap.put("inType", "入库类型:"+(Constants.equalsInteger(platformBooks.getInType(),Constants.ZERO)?"整托盘":"件烟"));
            jsonMap.put("totalNum", "总运输量:"+platformBooks.getTotalNum()+"万支");
            jsonMap.put("arriveDate", "到场时间:" + DateUtil.DateToStr(platformBooks.getArriveDate() , "yyyy-MM-dd HH:mm"));
            jsonMap.put("carNum", "车牌照:"+platformBooks.getCarCodeFront());
            title = ApproveServiceImpl.creatPlatformBookNotice(platformBooks,jsonMap);
//            title = "[物流车入园预约]申请人-" + platformBooks.getDriverName();
//            jsonMap.put("inType", "入库类型:"+(Constants.equalsInteger(platformBooks.getInType(),Constants.ZERO)?"整托盘":"件烟"));
//            jsonMap.put("totalNum", "总运输量:"+platformBooks.getTotalNum()+"万支");
//            jsonMap.put("arriveDate", "到场时间:" + DateUtil.DateToStr(platformBooks.getArriveDate() , "yyyy-MM-dd HH:mm"));
//            jsonMap.put("carNum", "车牌照:"+platformBooks.getCarCodeFront());
        }
        return title;
    }
    public static String creatPlatformBookNotice(PlatformBooks platformBooks,Map<String,Object> jsonMap){
        jsonMap.put("inType", "作业类型:"+(Constants.equalsInteger(platformBooks.getInType(),Constants.ZERO)?"整托盘":"件烟"));
        jsonMap.put("totalNum", "总运输量:"+platformBooks.getTotalNum()+"万支");
        jsonMap.put("arriveDate", "到场时间:" + DateUtil.DateToStr(platformBooks.getArriveDate() , "yyyy-MM-dd HH:mm"));
        jsonMap.put("carNum", "车牌照:"+platformBooks.getCarCodeFront());
        return  "[物流车入园预约]申请人-" + platformBooks.getDriverName() ;
    }
@@ -1210,8 +1218,10 @@
                || Objects.isNull(approveDTO.getLoginUserInfo())){
            throw new BusinessException(ResponseStatus.BAD_REQUEST);
        }
        if(approveDTO.getStatus().equals(Constants.THREE)&&StringUtils.isBlank(approveDTO.getCheckInfo())){
            throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"请输入拒绝说明");
        if(!(Constants.equalsInteger(approveDTO.getObjType(),Constants.THREE)||Constants.equalsInteger(approveDTO.getObjType(),Constants.FOUR))){
            if(approveDTO.getStatus().equals(Constants.THREE)&&StringUtils.isBlank(approveDTO.getCheckInfo())){
                throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"请输入拒绝说明");
            }
        }
        Approve approve = approveMapper.selectOne(new QueryWrapper<Approve>()
                .lambda()
@@ -1444,7 +1454,6 @@
                        wxNoticeConfigMapper,
                        platformBooksMapper.selectById(approveDTO.getObjId()),
                        WxPlatConstants.platformBookContent.platformBookWaitAudit,
                        systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(),
                        openIdList,
                        Constants.ONE);
            }
@@ -1468,8 +1477,7 @@
                        //发送微信公众号通知
                        wxPlatNotice.sendCarUseBookTemplateNotice(systemDictDataBiz,
                                wxNoticeConfigMapper,carUseBook,
                                WxPlatConstants.carUseBookContent.carUseBookWaitAudit,
                                systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(),
                                WxPlatConstants.carUseBookContent.carUseBookWaitAudit,
                                openIdList,1);
                    }
                }
@@ -1495,7 +1503,6 @@
                        wxPlatNotice.sendVisitTemplateNotice(systemDictDataBiz,
                                wxNoticeConfigMapper,visitsMapper.selectById(approveDTO.getObjId()),
                                approveDTO.getObjType().equals(Constants.approveObjectType.visitReporting)?WxPlatConstants.visitReportContent.visitReportWaitAudit:WxPlatConstants.visitContent.visitWaitAudit,
                                systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(),
                                openIdList
                        );
                    }
@@ -1752,7 +1759,6 @@
                if(Objects.nonNull(visits) && StringUtils.isNotBlank(visits.getOpenid())){
                    wxPlatNotice.sendVisitTemplateNotice(systemDictDataBiz,
                            wxNoticeConfigMapper,visits, objCode,
                            systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(),
                            Arrays.asList(visits.getOpenid().split(","))
                    );
                }
@@ -1779,7 +1785,6 @@
                    wxPlatNotice.sendCarUseBookTemplateNotice(systemDictDataBiz,
                            wxNoticeConfigMapper,carUseBook,
                            Constants.equalsInteger(approveDTO.getStatus(),Constants.TWO)?WxPlatConstants.carUseBookContent.carUseBookAuditSuccess: WxPlatConstants.carUseBookContent.carUseBookAuditFail,
                            systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(),
                            Arrays.asList(systemUser.getOpenid().split(",")),0);
                }
            }
@@ -1850,7 +1855,6 @@
                wxPlatNotice.sendPlatformBookTemplateNotice(systemDictDataBiz,
                        wxNoticeConfigMapper, platformBooks,
                        Constants.equalsInteger(approveDTO.getStatus(),Constants.TWO)?WxPlatConstants.platformBookContent.platformBookAuditSuccess: WxPlatConstants.platformBookContent.platformBookAuditFail,
                        systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(),
                        Arrays.asList(driver.getOpenid().split(",")),0);
            }