Explorar o código

Merge remote-tracking branch 'origin/master'

yusm hai 5 meses
pai
achega
668aafd49c
Modificáronse 16 ficheiros con 2459 adicións e 41 borrados
  1. 9 2
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/components/common/pullDownSelector.vue
  2. 2 1
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/hooks/useApi.js
  3. 60 3
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/business/businessInfo.vue
  4. 22 5
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/tasks/addEditor.vue
  5. 2324 0
      fhKeeper/formulahousekeeper/management-crm/crm.log
  6. 4 3
      fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/controller/UserCommonModuleController.java
  7. 1 1
      fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/service/UserCommonModuleService.java
  8. 21 16
      fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/service/impl/UserCommonModuleServiceImpl.java
  9. 4 3
      fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/service/impl/VisitPlanServiceImpl.java
  10. 1 1
      fhKeeper/formulahousekeeper/management-crm/src/main/resources/mapper/VisitPlanMapper.xml
  11. 3 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ContractBonusDetailServiceImpl.java
  12. 1 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/task/TimingTask.java
  13. 1 0
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/ContractBonusDetailMapper.xml
  14. 1 0
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/ContractBonusSummaryMapper.xml
  15. 4 4
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/ReportMapper.xml
  16. 1 0
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/UserMapper.xml

+ 9 - 2
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/components/common/pullDownSelector.vue

@@ -70,7 +70,7 @@ const props = defineProps({
   },
   value: {
     type: [String, Array],
-    default: () => null,
+    default: () => [],
   },
   doYouNeedTranslation: {
     type: Boolean,
@@ -86,7 +86,7 @@ const emit = defineEmits(["change"]);
 const fixedData = useFixedData();
 
 const listLoading = ref(false);
-const selectChecked = ref();
+const selectChecked = ref([]);
 const checkboxRefs = ref([]);
 const searchForValue = ref("");
 const allOptions = ref([]);
@@ -105,6 +105,10 @@ watch(() => props.options, (newValue) => {
   }
 })
 
+watch(() => props.value, (newValue) => {
+  selectChecked.value = newValue
+})
+
 function searchOptions(val) {
   listLoading.value = true
   if (!props.doYouNeedTranslation) {
@@ -178,5 +182,8 @@ onMounted(() => {
   } else {
     obtainPersonnelData();
   }
+  if(props.value) {
+    selectChecked.value = props.multipleChoice ? props.value.split(',') : props.value
+  }
 });
 </script>

+ 2 - 1
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/hooks/useApi.js

@@ -56,4 +56,5 @@ export const OBTAIN_ORDER_RELATED_PRODUCTS = `/order/productWithOrder` // 获取
 
 export const SELL_AND_OBTAIN_RELATED_PRODUCTS = `/product/orderWithProduct` // 销售订单关联产品
 
-export const GET_CONTACTS_WITH_MORE_I_DS = `/contacts/getAllContacts` // 更具Id获取联系人
+export const GET_CONTACTS_WITH_MORE_I_DS = `/contacts/getAllContacts` // 更具Id获取联系人
+export const CONTACT_PERSON_ASSOCIATED_WITH_BUSINESS_OPPORTUNITY = `/business-opportunity/saveContactsId` // 联系人关联商机

+ 60 - 3
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/business/businessInfo.vue

@@ -19,7 +19,8 @@
       <van-cell title="备注" :value="info.remark" />
     </div>
     <div class="bottomButton">
-      <van-button type="primary" class="w-full block">关联联系人</van-button>
+      <van-button type="primary" class="w-full block" v-if="!info.contactsName"
+        @click="shoContactDialag()">关联联系人</van-button>
       <van-button type="warning" class="w-full block" v-if="info.inchargerName"
         @click="showDialogCli()">转移商机</van-button>
       <van-button type="primary" class="w-full block" v-if="!info.inchargerName"
@@ -37,17 +38,30 @@
       <div class="themeTextColor text-size-small pl-4 pt-2 pb-2">转移后,将看不到此商机了</div>
     </van-dialog>
 
+    <van-dialog v-model:show="showContactDialog" :title="`关联联系人`" show-cancel-button @confirm="relatedContacts"
+      :before-close="dialogCloseBefo">
+      <van-cell title="联系人" is-link @click="showContactSelect = true">
+        <template #value>
+          {{ dialogSelection.label }}
+        </template>
+      </van-cell>
+    </van-dialog>
+
     <!-- select 选择器 -->
     <van-popup v-model:show="showSelect" destroy-on-close position="bottom" :style="{ height: '80%' }">
       <PullDownSelector @change="selectChange" />
     </van-popup>
+
+    <van-popup v-model:show="showContactSelect" destroy-on-close position="bottom" :style="{ height: '80%' }">
+      <PullDownSelector :options="allContactsList" :doYouNeedTranslation="false" @change="selectChange" />
+    </van-popup>
   </div>
 </template>
 
 <script setup>
 import { ref } from 'vue';
 import { useLifecycle } from '@hooks/useCommon.js';
-import { BUSINESS_OPPORTUNITY_TRANSFER } from '@hooks/useApi'
+import { BUSINESS_OPPORTUNITY_TRANSFER, GET_CONTACTS_WITH_MORE_I_DS, CONTACT_PERSON_ASSOCIATED_WITH_BUSINESS_OPPORTUNITY } from '@hooks/useApi'
 import requests from "@common/requests";
 import useShowToast from '@hooks/useToast'
 import useInfoStore from '@store/useInfoStore'
@@ -64,7 +78,30 @@ const props = defineProps({
 
 const showDialog = ref(false);
 const showSelect = ref(false);
+const showContactSelect = ref(false);
+const showContactDialog = ref(false)
 const dialogSelection = ref({});
+const allContactsList = ref([]);
+
+function shoContactDialag() {
+  dialogSelection.value = {}
+  showContactDialog.value = true
+}
+
+function relatedContacts() {
+  if (!dialogSelection.value.label) {
+    return toastText('请选择要关联的联系人')
+  }
+
+  requests.post(CONTACT_PERSON_ASSOCIATED_WITH_BUSINESS_OPPORTUNITY, {
+    id: props.info.id,
+    contactsId: dialogSelection.value.value
+  }).then((res) => {
+    props.info.contactsName = dialogSelection.value.label
+    showContactDialog.value = false
+    toastSuccess('关联成功')
+  })
+}
 
 function confirmTransfer() {
   if (!dialogSelection.value.label) {
@@ -98,9 +135,11 @@ function selectChange(value, label) {
     value, label
   }
   showSelect.value = false
+  showContactSelect.value = false
 }
 
 function showDialogCli() {
+  dialogSelection.value = {}
   showDialog.value = true
 }
 
@@ -112,9 +151,27 @@ function dialogCloseBefo(val) {
   return true
 }
 
+function getAllContactsList() {
+  requests.get(`${GET_CONTACTS_WITH_MORE_I_DS}?customerId=${props.info.customerId}`).then(({ data = [] }) => {
+    let list = data.map(item => {
+      return {
+        label: item.name,
+        value: item.id,
+      }
+    })
+    if (!list.length) {
+      list = [{}]
+    }
+    allContactsList.value = list
+  })
+}
+
 useLifecycle({
   load: () => {
-    // 添加加载逻辑
+    getAllContactsList()
+  },
+  init: () => {
+    getAllContactsList()
   }
 });
 </script>

+ 22 - 5
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/tasks/addEditor.vue

@@ -63,7 +63,7 @@
           </template>
         </van-field>
         <van-field v-model="vantFormVal.executorId" name="executorId" label="执行人" placeholder="请选择" is-link readonly class="resetStyles"
-          @click="showSelectionBox('executorId', allContactsList)">
+          @click="showSelectionToBox('executorId')">
           <template #input v-if="vantFormVal.executorIdName && vantFormVal.executorIdName.length > 0">
             <TranslationComponent :openId="vantFormVal.executorIdName" />
           </template>
@@ -165,7 +165,11 @@
     <div>
       <!-- 下拉框选择 -->
       <van-popup v-model:show="showSelectionFlag" destroy-on-close position="bottom" :style="{ height: '80%' }">
-        <PullDownSelector :options="showSelectionArray" :doYouNeedTranslation="false" @change="selectChange" :multiple-choice="selectMultipleChoice" />
+        <PullDownSelector :options="showSelectionArray" :doYouNeedTranslation="false" @change="selectChange" />
+      </van-popup>
+
+      <van-popup v-model:show="showSelectionToFlag" destroy-on-close position="bottom" :style="{ height: '80%' }">
+        <PullDownSelector :value="showSelectionToValue" @change="selectChange" :multiple-choice="true" />
       </van-popup>
 
       <!-- 选择日期 -->
@@ -216,7 +220,8 @@ const showDatePicker = ref(false)
 const showDatePickerVal = ref(dayjs().format("YYYY-MM-DD").split("-"))
 const showDatePickerFiled = ref('')
 const customeDate = ref([])
-const selectMultipleChoice = ref(false)
+const showSelectionToFlag = ref(false)
+const showSelectionToValue = ref([])
 const taskTypeFiled = ['customId', 'businessOpportunityId', 'orderId', 'clueId']
 
 const contactDisabled = computed(() => {
@@ -293,6 +298,12 @@ function selectChange(value, label) {
   showSelectionFlag.value = false
 }
 
+function showSelectionToBox(filed) {
+  showSelectionFiled.value = filed
+  showSelectionToValue.value = vantFormVal.value[filed] || []
+  showSelectionToFlag.value = true
+}
+
 function showSelectionBox(filed, list = [], event) {
   if (taskTypeFiled.includes(filed)) {
     const fileds = taskTypeFiled.filter(item => item !== filed)
@@ -303,7 +314,6 @@ function showSelectionBox(filed, list = [], event) {
     vantFormVal.value.contactsId = ''
     vantFormVal.value[`contactsIdName`] = ''
   }
-  selectMultipleChoice.value = filed == 'executorId' ? true : false
   showSelectionFiled.value = filed
   showSelectionArray.value = filed == 'executorId' ? [] : list
   showSelectionFlag.value = true
@@ -348,7 +358,7 @@ function getContactData(filed, value) {
         value: item.id,
       }
     })
-    if (!allContactsList.value.length) {
+    if (!list.length) {
       list = [{}]
     }
     allContactsList.value = list
@@ -429,6 +439,13 @@ function initializeData() {
     }
   })
   formVal.value = props.formValue
+  if((taskType || taskType == 0) && taskType != 3) {
+    const filed = taskType == 0 ? 'customId' : taskType == 1 ? 'businessOpportunityId' : taskType == 2 ? 'orderId' : 'clueId'
+    const value = taskType == 0 ? customId : taskType == 1 ? businessOpportunityId : taskType == 2 ? orderId : clueId
+    if(value) {
+      getContactData(filed, value)
+    }
+  }
 }
 
 useLifecycle({

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 2324 - 0
fhKeeper/formulahousekeeper/management-crm/crm.log


+ 4 - 3
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/controller/UserCommonModuleController.java

@@ -22,11 +22,12 @@ public class UserCommonModuleController {
         return userCommonModuleService.getCommonModules(request);
     }
 
-    @PostMapping("/addCommonModules")
-    private HttpRespMsg addCommonModules(@RequestParam("moduleIds")String moduleIds,HttpServletRequest request) {
-        return userCommonModuleService.addCommonModules(moduleIds,request);
+    @PostMapping("/addOrUpdateCommonModules")
+    private HttpRespMsg addOrUpdateCommonModules(@RequestParam("moduleIds")String moduleIds,HttpServletRequest request) {
+        return userCommonModuleService.addOrUpdateCommonModules(moduleIds,request);
     }
 
+    //已废弃
     @PostMapping("/delCommonModules")
     private HttpRespMsg delCommonModules(@RequestParam("moduleIds")String moduleIds,HttpServletRequest request) {
         return userCommonModuleService.delCommonModules(moduleIds,request);

+ 1 - 1
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/service/UserCommonModuleService.java

@@ -9,7 +9,7 @@ import javax.servlet.http.HttpServletRequest;
 public interface UserCommonModuleService extends IService<UserCommonModule> {
     HttpRespMsg getCommonModules(HttpServletRequest request);
 
-    HttpRespMsg addCommonModules(String moduleIds,HttpServletRequest request);
+    HttpRespMsg addOrUpdateCommonModules(String moduleIds,HttpServletRequest request);
 
     HttpRespMsg delCommonModules(String moduleIds, HttpServletRequest request);
 }

+ 21 - 16
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/service/impl/UserCommonModuleServiceImpl.java

@@ -93,7 +93,7 @@ public class UserCommonModuleServiceImpl extends ServiceImpl<UserCommonModuleMap
 
     @Override
     @Transactional
-    public HttpRespMsg addCommonModules(String moduleIds,HttpServletRequest request) {
+    public HttpRespMsg addOrUpdateCommonModules(String moduleIds,HttpServletRequest request) {
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         User user= userMapper.selectById(request.getHeader("token"));
         if(null == user){
@@ -106,30 +106,32 @@ public class UserCommonModuleServiceImpl extends ServiceImpl<UserCommonModuleMap
         }
         List<Integer> moduleIdList = Arrays.stream(moduleIds.split(",")).map(Integer::parseInt).collect(Collectors.toList());
         //是否已存在
-        Integer count = userCommonModuleMapper.selectCount(new LambdaQueryWrapper<UserCommonModule>()
-                .in(UserCommonModule::getModuleId, moduleIdList)
-                .eq(UserCommonModule::getUserId, user.getId())
-        );
-        if(count > 0){
-            httpRespMsg.setError("已存在选中的常用模块");
-            return httpRespMsg;
-        }
+//        Integer count = userCommonModuleMapper.selectCount(new LambdaQueryWrapper<UserCommonModule>()
+//                .in(UserCommonModule::getModuleId, moduleIdList)
+//                .eq(UserCommonModule::getUserId, user.getId())
+//        );
+//        if(count > 0){
+//            httpRespMsg.setError("已存在选中的常用模块");
+//            return httpRespMsg;
+//        }
         //是否有权限
         Integer roleModuleCount = sysRoleModuleMapper.selectCount(new LambdaQueryWrapper<SysRoleModule>()
                 .in(SysRoleModule::getModuleId, moduleIdList)
                 .eq(SysRoleModule::getRoleId, user.getRoleId())
         );
-        if(roleModuleCount <= moduleIdList.size()){
+        if(roleModuleCount < moduleIdList.size()){
             httpRespMsg.setError("无模块权限");
             return httpRespMsg;
         }
+        //12-20 修改为删除覆盖逻辑
         //计算seq
-        UserCommonModule lastModule = userCommonModuleMapper.selectOne(new LambdaQueryWrapper<UserCommonModule>()
-                .eq(UserCommonModule::getUserId, user.getId())
-                .orderByDesc(UserCommonModule::getSeq)
-                .last("limit 1")
-        );
-        int index = null==lastModule?1:lastModule.getSeq()+1;
+//        UserCommonModule lastModule = userCommonModuleMapper.selectOne(new LambdaQueryWrapper<UserCommonModule>()
+//                .eq(UserCommonModule::getUserId, user.getId())
+//                .orderByDesc(UserCommonModule::getSeq)
+//                .last("limit 1")
+//        );
+//        int index = null==lastModule?1:lastModule.getSeq()+1;
+        int index = 1;
         List<UserCommonModule> toAddList = new ArrayList<>();
         for (Integer moduleId : moduleIdList) {
             UserCommonModule entity = new UserCommonModule();
@@ -140,6 +142,9 @@ public class UserCommonModuleServiceImpl extends ServiceImpl<UserCommonModuleMap
             toAddList.add(entity);
             index++;
         }
+        userCommonModuleMapper.delete(new LambdaQueryWrapper<UserCommonModule>()
+                .eq(UserCommonModule::getUserId, user.getId())
+        );
         userCommonModuleMapper.insertBatch(toAddList);
         return httpRespMsg;
     }

+ 4 - 3
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/service/impl/VisitPlanServiceImpl.java

@@ -86,7 +86,7 @@ public class VisitPlanServiceImpl extends ServiceImpl<VisitPlanMapper, VisitPlan
             }
             Date oldVisitTime = oldPlan.getVisitTime();
             long milliCosts = oldVisitTime.getTime() - now.getTime();
-            if(milliCosts <= 30 * 60 * 1000){
+            if(milliCosts <= 30 * 60 * 1000 && milliCosts > 0){
                 httpRespMsg.setError("原拜访时间为近半小时内的数据无法修改");
                 return httpRespMsg;
             }
@@ -129,7 +129,7 @@ public class VisitPlanServiceImpl extends ServiceImpl<VisitPlanMapper, VisitPlan
                 visitPlan.setFinalRemindTime(DateTimeUtil.cusLocalDateTimeToDate(newRemindTime));
 
             }
-
+            visitPlan.setFinishState(0);
             visitPlanMapper.updateById(visitPlan);
 //            VisitPlan newPlan = visitPlanMapper.selectById(visitPlan.getId());//前端某些字段不传,以防万一
 //
@@ -248,7 +248,7 @@ public class VisitPlanServiceImpl extends ServiceImpl<VisitPlanMapper, VisitPlan
         }
         Date oldVisitTime = taskPlan.getVisitTime();
         long milliCosts = oldVisitTime.getTime() - now.getTime();
-        if(milliCosts <= 30 * 60 * 1000){
+        if(milliCosts <= 30 * 60 * 1000 && milliCosts > 0){
             httpRespMsg.setError("原拜访时间为近半小时内的数据无法修改");
             return httpRespMsg;
         }
@@ -286,6 +286,7 @@ public class VisitPlanServiceImpl extends ServiceImpl<VisitPlanMapper, VisitPlan
         visitPlanMapper.update(null,new LambdaUpdateWrapper<VisitPlan>()
                 .set(VisitPlan::getVisitTime,newVisitTime)
                         .set(VisitPlan::getFinalRemindTime,taskPlan.getFinalRemindTime())
+                        .set(VisitPlan::getFinishState,0)
                 .eq(VisitPlan::getId,planId)
         );
 

+ 1 - 1
fhKeeper/formulahousekeeper/management-crm/src/main/resources/mapper/VisitPlanMapper.xml

@@ -36,7 +36,7 @@
                  left join (select * from sys_dict where code = 'RemindType') sd2 on vs.remind_type = sd2.id
                  left join custom c on vs.custom_id = c.id
         where vs.create_by = #{query.userId} and date_format(vs.visit_time,'%Y-%m-%d') = #{query.calenderDate}
-        order by vs.visit_time asc
+        order by vs.finish_state asc,vs.visit_time asc
     </select>
     <select id="getDetail" resultType="com.management.platform.entity.vo.VisitPlanDetailVO">
         select vs.id, vs.plan_name, vs.custom_id, vs.custom_name

+ 3 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ContractBonusDetailServiceImpl.java

@@ -419,7 +419,9 @@ public class ContractBonusDetailServiceImpl extends ServiceImpl<ContractBonusDet
                     contractBonusSummary.setYear(useYear);
                     toAddSummaryList.add(contractBonusSummary);
                 });
-                contractBonusSummaryMapper.batchInsertByImportData(toAddSummaryList);
+                if(CollectionUtils.isNotEmpty(toAddSummaryList)){
+                    contractBonusSummaryMapper.batchInsertByImportData(toAddSummaryList);
+                }
                 if(CollectionUtils.isNotEmpty(toAddBonusDetailList)){
                     contractBonusDetailMapper.batchInsert(toAddBonusDetailList);
                 }

+ 1 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/task/TimingTask.java

@@ -1684,7 +1684,7 @@ public class TimingTask {
         if (isDev) {
             return;
         }
-        //针对钉钉提醒类型是0或者1的情况,发送提醒。(当天提醒或者今天提醒昨天漏填)
+        //针对钉钉提醒类型是0或者1的情况,发送提醒。(当天提醒或者今天提醒昨天漏填),getPushDingdingUserList内部获取数据根据alert_type=0 or 1做了判断
         List<Map<String, Object>> dingdingUserList = userMapper.getPushDingdingUserList(str, date);
         //钉钉平台的用批量发送, 每分钟5000个
         int minuteSize = 5000;

+ 1 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/ContractBonusDetailMapper.xml

@@ -45,5 +45,6 @@
                      )tmp2 group by contract, project_id
             )tmp1
                 left join project p on tmp1.projectId = p.id
+        order by tmp1.contract
     </select>
 </mapper>

+ 1 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/ContractBonusSummaryMapper.xml

@@ -22,6 +22,7 @@
             cbs.year = substr(#{ym},1,4)  and cbs.company_id = #{companyId}
         and substr(cbs.start_ym,6,7) &lt;= substr(#{ym},6,7)
         and substr(cbs.end_ym,6,7) &gt;= substr(#{ym},6,7)
+        order by cbs.user_id
     </select>
 
     <sql id="baseColumns">

+ 4 - 4
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/ReportMapper.xml

@@ -1503,7 +1503,7 @@
         select creator_id,project_id,sum(ifnull(working_time,0)) projectTotalCost
         from report
         where
-        company_id = 10
+        company_id = #{companyId} and state = 1
         and create_date between str_to_date(#{startDate},'%Y-%m-%d') and str_to_date(#{endDate},'%Y-%m-%d')
         and creator_id in
         <foreach collection="userIds" item="userId" separator="," open="(" close=")">
@@ -1516,7 +1516,7 @@
         select creator_id,substr(create_date,1,7) as ym,project_id,sum(ifnull(working_time,0)) projectYMCost
         from report
         where
-        company_id = 10
+        company_id = #{companyId}  and state = 1
         and create_date between str_to_date(#{startDate},'%Y-%m-%d') and str_to_date(#{endDate},'%Y-%m-%d')
         and creator_id in
         <foreach collection="userIds" item="userId" separator="," open="(" close=")">
@@ -1547,7 +1547,7 @@
         select creator_id,substr(create_date,1,7) as ym,project_id,sum(ifnull(working_time,0)) projectYMCost
         from report
         where
-        company_id = 10
+        company_id = #{companyId}
         and create_date between str_to_date(#{startDate},'%Y-%m-%d') and str_to_date(#{endDate},'%Y-%m-%d')
         and creator_id in
         <foreach collection="userIds" item="userId" separator="," open="(" close=")">
@@ -1560,7 +1560,7 @@
         select creator_id,project_id,create_date,working_time
         from report
         where
-        company_id = 10
+        company_id = #{companyId}
         and create_date between str_to_date(#{startDate},'%Y-%m-%d') and str_to_date(#{endDate},'%Y-%m-%d')
         and creator_id in
         <foreach collection="userIds" item="userId" separator="," open="(" close=")">

+ 1 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/UserMapper.xml

@@ -180,6 +180,7 @@
         WHERE a.dingding_userid is not null and time_type.alert_time = #{alertTime}
         AND a.is_active = 1
         AND a.report_status=0
+        AND (time_type.`alert_type` = 0 OR time_type.`alert_type` = 1)
         AND company.expiration_date >= NOW()
         AND NOT EXISTS(SELECT 1 FROM report WHERE report.`creator_id` = a.id AND ((report.`create_date` = DATE_FORMAT(date_sub(NOW(),interval 1 day), '%Y-%m-%d') and time_type.alert_type=1)or(report.`create_date` = DATE_FORMAT(NOW(), '%Y-%m-%d') and time_type.alert_type=0)))
         <if test="date != null">