hym преди 3 години
родител
ревизия
8d182c8391
променени са 18 файла, в които са добавени 140 реда и са изтрити 153 реда
  1. 1 1
      zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/IotPayApplication.java
  2. 2 2
      zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/quartz/SchedulerConfig.java
  3. 2 2
      zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/quartz/job/AmountSyncJob.java
  4. 2 2
      zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/quartz/job/ControlByDayJob.java
  5. 1 0
      zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/quartz/job/DeviceSyncJob.java
  6. 2 2
      zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/quartz/job/DeviceValveCommondSync.java
  7. 2 2
      zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/quartz/job/EstimateMsgSendJob.java
  8. 2 2
      zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/quartz/job/EstimatedDayJob.java
  9. 2 2
      zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/quartz/job/EstimatedValveJob.java
  10. 2 2
      zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/quartz/job/InvoicePrintResultJob.java
  11. 2 2
      zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/quartz/job/MessageSendJob.java
  12. 2 2
      zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/quartz/job/OpenAccountValveInspection.java
  13. 2 2
      zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/quartz/job/ResetLadderJob.java
  14. 1 1
      zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/quartz/service/impl/AmountSynDayServiceImpl.java
  15. 0 5
      zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/quartz/service/impl/EstimateMsgSendServiceImpl.java
  16. 0 6
      zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/quartz/service/impl/EstimatedValveServiceImpl.java
  17. 1 6
      zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/service/impl/MeasurementSettlementServiceImpl.java
  18. 114 112
      zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/service/impl/pay/PayMessagesendrecordServiceImp.java

+ 1 - 1
zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/IotPayApplication.java

@@ -11,7 +11,7 @@ import org.springframework.scheduling.annotation.EnableAsync;
 import org.springframework.scheduling.annotation.EnableScheduling;
 
 @SpringBootApplication(scanBasePackages={"com.zcxk","com.bz.zoneiot"})
-@EnableScheduling
+//@EnableScheduling
 @EnableAsync
 @EnableCaching  //开启缓存
 @EnableFeignClients(basePackages="com.zcxk")

+ 2 - 2
zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/quartz/SchedulerConfig.java

@@ -8,9 +8,9 @@ public class SchedulerConfig implements SchedulerFactoryBeanCustomizer {
 	
 	@Override
 	public void customize(SchedulerFactoryBean schedulerFactoryBean) {
-		 	schedulerFactoryBean.setStartupDelay(2);
+		 /*	schedulerFactoryBean.setStartupDelay(2);
 	        schedulerFactoryBean.setAutoStartup(true);
-	        schedulerFactoryBean.setOverwriteExistingJobs(true);
+	        schedulerFactoryBean.setOverwriteExistingJobs(true);*/
 	}
 
 }

+ 2 - 2
zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/quartz/job/AmountSyncJob.java

@@ -23,7 +23,7 @@ public class AmountSyncJob implements Job,Serializable {
 
     @Override
     public void execute(JobExecutionContext context) throws JobExecutionException {
-        // 1,获取推送配置信息
+      /*  // 1,获取推送配置信息
         JobDetail jobDetail = context.getJobDetail();
         JobDataMap jobDataMap = jobDetail.getJobDataMap();
         Integer siteId = jobDataMap.getInt("siteId");
@@ -32,7 +32,7 @@ public class AmountSyncJob implements Job,Serializable {
         // 2,调用推送方法
         log.info("invoke AmountSyncJob , customerId = {}",customerId);
         amountSynService.amountUpdate(siteId,customerId);
-        log.info("invoked AmountSyncJob , customerId = {}",customerId);
+        log.info("invoked AmountSyncJob , customerId = {}",customerId);*/
     }
 
 

+ 2 - 2
zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/quartz/job/ControlByDayJob.java

@@ -21,7 +21,7 @@ public class ControlByDayJob implements Job, Serializable {
 
     @Override
     public void execute(JobExecutionContext context) throws JobExecutionException {
-        // 1,获取推送配置信息
+     /*   // 1,获取推送配置信息
         JobDetail jobDetail = context.getJobDetail();
         JobDataMap jobDataMap = jobDetail.getJobDataMap();
         Integer siteId = Integer.valueOf(jobDataMap.get("siteId").toString());
@@ -30,6 +30,6 @@ public class ControlByDayJob implements Job, Serializable {
         // 2,调用推送方法
         log.info("invoke ControlByDayJob");
         payMessagesendrecordService.sendValveCommond(siteId,customerId);
-        log.info("invoked ControlByDayJob");
+        log.info("invoked ControlByDayJob");*/
     }
 }

+ 1 - 0
zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/quartz/job/DeviceSyncJob.java

@@ -23,6 +23,7 @@ public class DeviceSyncJob implements Job, Serializable {
 
     @Override
     public void execute(JobExecutionContext context){
+
         deviceSyncService.start();
     }
 }

+ 2 - 2
zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/quartz/job/DeviceValveCommondSync.java

@@ -28,8 +28,8 @@ public class DeviceValveCommondSync implements  Job, Serializable {
 
     @Override
     public void execute(JobExecutionContext context) throws JobExecutionException {
-        log.info("巡检阀门操作有效期开始");
+      /*  log.info("巡检阀门操作有效期开始");
         payControlRecordMapper.updateControlRecordResultTimeOut();
-        log.info("巡检阀门操作有效期结束");
+        log.info("巡检阀门操作有效期结束");*/
     }
 }

+ 2 - 2
zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/quartz/job/EstimateMsgSendJob.java

@@ -21,7 +21,7 @@ public class EstimateMsgSendJob implements Job, Serializable {
     private EstimateMsgSendService estimateMsgSendService;
     @Override
     public void execute(JobExecutionContext context) throws JobExecutionException {
-
+/*
         // 1,获取推送配置信息
         JobDetail jobDetail = context.getJobDetail();
         JobDataMap jobDataMap = jobDetail.getJobDataMap();
@@ -31,6 +31,6 @@ public class EstimateMsgSendJob implements Job, Serializable {
         // 2,调用推送方法
         log.info("invoke EstimateMsgSendJob , customerId = {}",tenantId);
         estimateMsgSendService.send(tenantId);
-        log.info("invoked EstimateMsgSendJob , customerId = {}",tenantId);
+        log.info("invoked EstimateMsgSendJob , customerId = {}",tenantId);*/
     }
 }

+ 2 - 2
zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/quartz/job/EstimatedDayJob.java

@@ -23,7 +23,7 @@ public class EstimatedDayJob implements Job, Serializable {
     @Override
     public void execute(JobExecutionContext context) throws JobExecutionException {
 
-        // 1,获取推送配置信息
+      /*  // 1,获取推送配置信息
         JobDetail jobDetail = context.getJobDetail();
         JobDataMap jobDataMap = jobDetail.getJobDataMap();
         Integer siteId = Integer.valueOf(jobDataMap.get("siteId").toString());
@@ -32,6 +32,6 @@ public class EstimatedDayJob implements Job, Serializable {
         // 2,调用推送方法
         log.info("invoke EstimatedDayJob , customerId = {}",customerId);
         estimatedDayService.start(siteId,customerId);
-        log.info("invoked EstimatedDayJob , customerId = {}",customerId);
+        log.info("invoked EstimatedDayJob , customerId = {}",customerId);*/
     }
 }

+ 2 - 2
zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/quartz/job/EstimatedValveJob.java

@@ -23,13 +23,13 @@ public class EstimatedValveJob implements Job, Serializable {
     public void execute(JobExecutionContext context) throws JobExecutionException {
 
         // 1,获取推送配置信息
-        JobDetail jobDetail = context.getJobDetail();
+     /*   JobDetail jobDetail = context.getJobDetail();
         JobDataMap jobDataMap = jobDetail.getJobDataMap();
 
         String tenantId= jobDataMap.get("tenantId").toString();
         // 2,调用推送方法
         log.info("invoke EstimatedValveJob , customerId = {}",tenantId);
         estimatedValveService.startValve(tenantId);
-        log.info("invoked EstimatedValveJob , customerId = {}",tenantId);
+        log.info("invoked EstimatedValveJob , customerId = {}",tenantId);*/
     }
 }

+ 2 - 2
zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/quartz/job/InvoicePrintResultJob.java

@@ -26,14 +26,14 @@ public class InvoicePrintResultJob {
     @Scheduled(cron = "0 0 0/1 * * ?")
     //@Scheduled(cron = "0 42 13 ? * *")   //定时执行,秒分时日月年
     private void queryResult() {
-        List<PayInvoiceprinted> payInvoiceprinteds = printInvoicePrintService.findListByState();
+      /*  List<PayInvoiceprinted> payInvoiceprinteds = printInvoicePrintService.findListByState();
         for (PayInvoiceprinted item : payInvoiceprinteds) {
             try {
                 printInvoiceQueryResultService.queryPrintInvoiceInfo(item);
             } catch (Exception e) {
                 e.printStackTrace();
             }
-        }
+        }*/
 
     }
 }

+ 2 - 2
zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/quartz/job/MessageSendJob.java

@@ -28,11 +28,11 @@ public class MessageSendJob implements Job, Serializable {
 
     @Override
     public void execute(JobExecutionContext context) {
-        JobDetail jobDetail = context.getJobDetail();
+        /*JobDetail jobDetail = context.getJobDetail();
         JobDataMap jobDataMap = jobDetail.getJobDataMap();
          String tenantId=jobDataMap.get("tenantId").toString();
 //        Integer sendType = Integer.valueOf(jobDataMap.get("sendType").toString());//1指定日期推送 2单日推送
-        payMessagesendrecordService.sendPayDebtPushMessagesByAuto(tenantId);
+        payMessagesendrecordService.sendPayDebtPushMessagesByAuto(tenantId);*/
         //自动推送短信
 //        if(sendType == 1){
 //            payMessagesendrecordService.sendMessageAuto(siteId,customerId);

+ 2 - 2
zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/quartz/job/OpenAccountValveInspection.java

@@ -38,7 +38,7 @@ public class OpenAccountValveInspection  implements Job, Serializable {
 
     @Override
     public void execute(JobExecutionContext context) throws JobExecutionException {
-        log.info("巡检开户开阀操作开始:"+ LocalDateTime.now());
+       /* log.info("巡检开户开阀操作开始:"+ LocalDateTime.now());
             try {
                 List<PayValveStateInfoDto> payValveStateInfos = payFeeMapper.getDeviceValveStateByRecord();
                 if(payValveStateInfos.size() > 0){
@@ -52,6 +52,6 @@ public class OpenAccountValveInspection  implements Job, Serializable {
             } catch (Exception e){
                 e.printStackTrace();
             }
-        log.info("巡检开户开阀操作结束:"+ LocalDateTime.now());
+        log.info("巡检开户开阀操作结束:"+ LocalDateTime.now());*/
     }
 }

+ 2 - 2
zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/quartz/job/ResetLadderJob.java

@@ -23,7 +23,7 @@ public class ResetLadderJob  implements Job,Serializable {
 
     @Override
     public void execute(JobExecutionContext context) throws JobExecutionException {
-        // 1,获取推送配置信息
+     /*   // 1,获取推送配置信息
         JobDetail jobDetail = context.getJobDetail();
         JobDataMap jobDataMap = jobDetail.getJobDataMap();
         Integer siteId = jobDataMap.getInt("siteId");
@@ -32,6 +32,6 @@ public class ResetLadderJob  implements Job,Serializable {
         // 2,调用推送方法
         log.info("invoke ResetLadderJob , configId = {}",customerId);
         resetLadderService.resetLadderValue(siteId,customerId);
-        log.info("invoked ResetLadderJob , configId = {}",customerId);
+        log.info("invoked ResetLadderJob , configId = {}",customerId);*/
     }
 }

+ 1 - 1
zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/quartz/service/impl/AmountSynDayServiceImpl.java

@@ -59,7 +59,7 @@ public class AmountSynDayServiceImpl implements AmountSynByDayService, Initializ
 
     @Override
     public void afterPropertiesSet() {
-        saveQrtzTask();
+
     }
 
     public void saveQrtzTask() {

+ 0 - 5
zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/quartz/service/impl/EstimateMsgSendServiceImpl.java

@@ -49,12 +49,7 @@ public class EstimateMsgSendServiceImpl implements EstimateMsgSendService, Initi
 
     @Override
     public void afterPropertiesSet() {
-        List<PayBaseAccount> payBaseAccounts = payBaseAccountMapper.getCustIdAndSiteId();
-        for (PayBaseAccount payBaseAccount: payBaseAccounts){
-            PayMessageTemplateDto dto = payMessagetemplateMapper.get(payBaseAccount.getTenantId(),null,null);
-            saveQrtzTask(payBaseAccount.getTenantId(),dto != null && StringUtils.isNotBlank(dto.getSendTime()) ? dto.getSendTime() : "");
 
-        }
 
     }
 

+ 0 - 6
zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/quartz/service/impl/EstimatedValveServiceImpl.java

@@ -48,12 +48,6 @@ public class EstimatedValveServiceImpl implements EstimatedValveService, Initial
     private PayBaseAccountMapper payBaseAccountMapper;
     @Override
     public void afterPropertiesSet() {
-        List<PayBaseAccount> payBaseAccounts = payBaseAccountMapper.getCustIdAndSiteId();
-        for (PayBaseAccount payBaseAccount: payBaseAccounts){
-            PayMessageTemplateDto dto = payMessagetemplateMapper.get(payBaseAccount.getTenantId(),null,null);
-            saveQrtzTask(payBaseAccount.getTenantId(),dto != null && StringUtils.isNotBlank(dto.getSendTime()) ? dto.getSendTime() : "");
-
-        }
 
     }
 

+ 1 - 6
zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/service/impl/MeasurementSettlementServiceImpl.java

@@ -793,12 +793,7 @@ public class MeasurementSettlementServiceImpl implements MeasurementSettlementSe
         measurementInstanceMapper.update(measurementInstance);
 
     }
-    private void pushBillingPeriodData(Date billingPeriod, Date startTime,Date endTime){
-        LoginUser currentUser = UserUtil.getCurrentUser();
-       List<WaterCostsDTO>waterCostsDTOS= measurementInstanceMapper.findBillingPeriodData(startTime,endTime,
-               currentUser.getCompanyId(),currentUser.getTenantId());
-        waterCostsDTOS.forEach(waterCostsDTO -> waterCostsDTO.setBillperiodDate(billingPeriod));
-    }
+
     @Override
     public BaseClosingAccountInfo findHistory() {
         LoginUser loginUser = UserUtil.getCurrentUser();

+ 114 - 112
zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/service/impl/pay/PayMessagesendrecordServiceImp.java

@@ -79,12 +79,11 @@ public class PayMessagesendrecordServiceImp implements PayMessagesendrecordServi
     PayFeeMapper payFeeMapper;
 
     @Autowired
-    PayFeeService  payFeeService;
+    PayFeeService payFeeService;
     @Autowired
     private MeasurementInstanceMapper measurementInstanceMapper;
 
 
-
     public void insert(PayMessagesendrecordDto payMessagesendrecordDto) {
 
         LoginUser loginUser = UserUtil.getCurrentUser();
@@ -99,12 +98,12 @@ public class PayMessagesendrecordServiceImp implements PayMessagesendrecordServi
         payMessagesendrecordMapper.insert(payMessagesendrecordDto);
     }
 
-    public  Pagination<PayMessagesendrecordDto> findList(PayMessagesendrecordDto payMessagesendrecordDto,int pageNum,int pageSize) {
+    public Pagination<PayMessagesendrecordDto> findList(PayMessagesendrecordDto payMessagesendrecordDto, int pageNum, int pageSize) {
         LoginUser loginUser = UserUtil.getCurrentUser();
         //分页
-        PageHelper.startPage(pageNum,pageSize);
+        PageHelper.startPage(pageNum, pageSize);
         //站点为空则加入用户站点查询
-        if( loginUser !=null){
+        if (loginUser != null) {
             //站点权限
 
         }
@@ -112,7 +111,8 @@ public class PayMessagesendrecordServiceImp implements PayMessagesendrecordServi
         List<PayMessagesendrecordDto> list = payMessagesendrecordMapper.findList(payMessagesendrecordDto);
         return new Pagination<>(list);
     }
-    public  List<PayMessagesendrecordDto> findListByClossingaccount(PayMessagesendrecordDto payMessagesendrecordDto, Integer siteId, Integer customerId ) {
+
+    public List<PayMessagesendrecordDto> findListByClossingaccount(PayMessagesendrecordDto payMessagesendrecordDto, Integer siteId, Integer customerId) {
 
         //站点权限
         payMessagesendrecordDto.setSiteId(BigInteger.valueOf(siteId));
@@ -120,8 +120,8 @@ public class PayMessagesendrecordServiceImp implements PayMessagesendrecordServi
         payMessagesendrecordDto.setCustomerId(BigInteger.valueOf(customerId));
 
         //获取最新账期
-        BaseClosingAccountInfoDto baseClosingAccountInfoDto=baseClosingAccountInfoMapper.getLastClosingAccount(siteId,customerId);
-        if(baseClosingAccountInfoDto == null){
+        BaseClosingAccountInfoDto baseClosingAccountInfoDto = baseClosingAccountInfoMapper.getLastClosingAccount(siteId, customerId);
+        if (baseClosingAccountInfoDto == null) {
             return new ArrayList<>();
         }
         payMessagesendrecordDto.setYear(baseClosingAccountInfoDto.getYear());
@@ -137,69 +137,69 @@ public class PayMessagesendrecordServiceImp implements PayMessagesendrecordServi
 
         //获取最新账期
         List<MeasurementInstance> history = measurementInstanceMapper.findHistory(null, loginUser.getCompanyId(), loginUser.getDepartmentId());
-        MeasurementInstance measurementInstance=new MeasurementInstance();
-        if(!CollectionUtils.isEmpty(history)){
-            measurementInstance=history.get(0);
+        MeasurementInstance measurementInstance = new MeasurementInstance();
+        if (!CollectionUtils.isEmpty(history)) {
+            measurementInstance = history.get(0);
         }
         Date billingPeriod = measurementInstance.getBillingPeriod();
-        Integer year=null;
-        Integer month=null;
-        if(billingPeriod!=null){
-            year= DateUtil.getYear(billingPeriod);
-            month=DateUtil.getMonth(billingPeriod);
+        Integer year = null;
+        Integer month = null;
+        if (billingPeriod != null) {
+            year = DateUtil.getYear(billingPeriod);
+            month = DateUtil.getMonth(billingPeriod);
         }
         //分页
-        PageHelper.startPage(pageNum,pageSize);
+        PageHelper.startPage(pageNum, pageSize);
         //获取数据
-        List<PayDebtMessageDto> list = payMessagesendrecordMapper.findDebtList( year,month,  condition,  beginDebtFee,  endDebtFee, accountIds,loginUser.getTenantId(),loginUser.getUserCondition());
+        List<PayDebtMessageDto> list = payMessagesendrecordMapper.findDebtList(year, month, condition, beginDebtFee, endDebtFee, accountIds, loginUser.getTenantId(), loginUser.getUserCondition());
 
         return new Pagination<>(list);
     }
 
-    public void export(String condition , BigDecimal beginDebtFee, BigDecimal endDebtFee, HttpServletResponse httpServletResponse){
+    public void export(String condition, BigDecimal beginDebtFee, BigDecimal endDebtFee, HttpServletResponse httpServletResponse) {
 
         LoginUser loginUser = UserUtil.getCurrentUser();
-        Integer siteId=null;
-        Integer customerId=null;
-        List<ProgramItem> programItems=null;
-        if( loginUser !=null){
+        Integer siteId = null;
+        Integer customerId = null;
+        List<ProgramItem> programItems = null;
+        if (loginUser != null) {
             //站点权限
-            siteId=loginUser.getSiteId();
+            siteId = loginUser.getSiteId();
             //客户权限
-            customerId=loginUser.getCustomerId();
+            customerId = loginUser.getCustomerId();
             //数据权限
-            programItems=UserUtil.getCurrentSiteProgramItems(loginUser);
+            programItems = UserUtil.getCurrentSiteProgramItems(loginUser);
         }
         //获取最新账期
-        BaseClosingAccountInfoDto baseClosingAccountInfoDto=baseClosingAccountInfoMapper.getLastClosingAccount(loginUser.getSiteId(),loginUser.getCustomerId());
+        BaseClosingAccountInfoDto baseClosingAccountInfoDto = baseClosingAccountInfoMapper.getLastClosingAccount(loginUser.getSiteId(), loginUser.getCustomerId());
         //获取数据
-        List<PayDebtMessageDto> list =new ArrayList();
-        if(baseClosingAccountInfoDto != null){
-            list = payMessagesendrecordMapper.findDebtList( baseClosingAccountInfoDto.getYear(),baseClosingAccountInfoDto.getMonth(),  condition,  beginDebtFee,  endDebtFee, null,loginUser.getTenantId(),loginUser.getUserCondition());
+        List<PayDebtMessageDto> list = new ArrayList();
+        if (baseClosingAccountInfoDto != null) {
+            list = payMessagesendrecordMapper.findDebtList(baseClosingAccountInfoDto.getYear(), baseClosingAccountInfoDto.getMonth(), condition, beginDebtFee, endDebtFee, null, loginUser.getTenantId(), loginUser.getUserCondition());
         }
         String title = "客户欠费记录";
 
         DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
         String[] rowsName = new String[]{"序号", "客户编号", "客户名称", "手机号", "本期水量(吨)", "本期欠费(元)",
-                "历史欠费(元)", "本期违约金(元)", "历史违约金(元)", "欠费总额(元)", "累积催缴","最近一次催缴时间"};
+                "历史欠费(元)", "本期违约金(元)", "历史违约金(元)", "欠费总额(元)", "累积催缴", "最近一次催缴时间"};
         List<Object[]> dataList = newArrayList();
         Object[] objs = null;
         int i = 0;
-        for(PayDebtMessageDto payDebtMessageDto :list){
+        for (PayDebtMessageDto payDebtMessageDto : list) {
             objs = new Object[rowsName.length];
             objs[0] = ++i;
-            objs[1]=payDebtMessageDto.getAccountnumber();
-            objs[2]=payDebtMessageDto.getAccountname();
-            objs[3]=payDebtMessageDto.getMobilephone();
-            objs[4]=payDebtMessageDto.getPayamount();
-            objs[5]=payDebtMessageDto.getWaterfee();
-            objs[6]=payDebtMessageDto.getHistorywaterfee();
-            objs[7]=payDebtMessageDto.getPenaltyfee();
-            objs[8]=payDebtMessageDto.getHistorypenaltyfee();
-            objs[9]=payDebtMessageDto.getCountfee();
-            objs[10]=payDebtMessageDto.getSendNum();
-            if(payDebtMessageDto.getLastSendTime() != null){
-                objs[11]=df.format(payDebtMessageDto.getLastSendTime());
+            objs[1] = payDebtMessageDto.getAccountnumber();
+            objs[2] = payDebtMessageDto.getAccountname();
+            objs[3] = payDebtMessageDto.getMobilephone();
+            objs[4] = payDebtMessageDto.getPayamount();
+            objs[5] = payDebtMessageDto.getWaterfee();
+            objs[6] = payDebtMessageDto.getHistorywaterfee();
+            objs[7] = payDebtMessageDto.getPenaltyfee();
+            objs[8] = payDebtMessageDto.getHistorypenaltyfee();
+            objs[9] = payDebtMessageDto.getCountfee();
+            objs[10] = payDebtMessageDto.getSendNum();
+            if (payDebtMessageDto.getLastSendTime() != null) {
+                objs[11] = df.format(payDebtMessageDto.getLastSendTime());
             }
             dataList.add(objs);
         }
@@ -212,6 +212,7 @@ public class PayMessagesendrecordServiceImp implements PayMessagesendrecordServi
 
 
     }
+
     /*
      * @Description: 手动推送短信
      *
@@ -222,48 +223,48 @@ public class PayMessagesendrecordServiceImp implements PayMessagesendrecordServi
      * @return: 返回成功推送数量,负数为推送异常,0为全部推送失败
      *
      */
-    public AjaxMessage<String> sendMessageByUser(String condition, BigDecimal beginDebtFee, BigDecimal endDebtFee, List<BigInteger> accountIds){
+    public AjaxMessage<String> sendMessageByUser(String condition, BigDecimal beginDebtFee, BigDecimal endDebtFee, List<BigInteger> accountIds) {
         LoginUser loginUser = UserUtil.getCurrentUser();
-        Integer siteId=null;
-        Integer customerId=null;
-        List<ProgramItem> programItems=null;
-        if( loginUser !=null){
+        Integer siteId = null;
+        Integer customerId = null;
+        List<ProgramItem> programItems = null;
+        if (loginUser != null) {
             //站点权限
-            siteId=loginUser.getSiteId();
+            siteId = loginUser.getSiteId();
             //客户权限
-            customerId=loginUser.getCustomerId();
+            customerId = loginUser.getCustomerId();
             //数据权限
-            programItems=UserUtil.getCurrentSiteProgramItems(loginUser);
+            programItems = UserUtil.getCurrentSiteProgramItems(loginUser);
         }
 
         //获取短信模板
-        PayMessageTemplateDto templateList= payMessagetemplateMapper.get(loginUser.getTenantId(),0,null);
-        if(templateList == null){
+        PayMessageTemplateDto templateList = payMessagetemplateMapper.get(loginUser.getTenantId(), 0, null);
+        if (templateList == null) {
             //获取短信模板失败,没查询到有效模板
             throw new ServiceException(ResultStatus.MESSAGE_TEMPLATE_FAILED);
         }
-        if (!templateList.checkMessage()){
+        if (!templateList.checkMessage()) {
             //短信配置信息有空值
             throw new ServiceException(ResultStatus.MESSAGE_CONFIGURATION_ISEMPTY);
         }
 
 
         //获取最新账期
-        BaseClosingAccountInfoDto baseClosingAccountInfoDto=baseClosingAccountInfoMapper.getLastClosingAccount(loginUser.getSiteId(),loginUser.getCustomerId());
-        if(baseClosingAccountInfoDto == null){
+        BaseClosingAccountInfoDto baseClosingAccountInfoDto = baseClosingAccountInfoMapper.getLastClosingAccount(loginUser.getSiteId(), loginUser.getCustomerId());
+        if (baseClosingAccountInfoDto == null) {
             throw new ServiceException(ResultStatus.ClOSING_ACCCOUNT_NOT_EXIT);
         }
         //获取数据
-        List<PayDebtMessageDto> debtList = payMessagesendrecordMapper.findDebtList( baseClosingAccountInfoDto.getYear(),baseClosingAccountInfoDto.getMonth(),  condition,  beginDebtFee,  endDebtFee, accountIds,loginUser.getTenantId(),loginUser.getUserCondition());
-        if(debtList.size()==0){
+        List<PayDebtMessageDto> debtList = payMessagesendrecordMapper.findDebtList(baseClosingAccountInfoDto.getYear(), baseClosingAccountInfoDto.getMonth(), condition, beginDebtFee, endDebtFee, accountIds, loginUser.getTenantId(), loginUser.getUserCondition());
+        if (debtList.size() == 0) {
             //获取欠费信息失败
             throw new ServiceException(ResultStatus.MESSAGE_DEBTFEE_FAILED);
         }
-        Integer successNmu=0;
-        for(PayDebtMessageDto payDebtMessageDto: debtList){
-            successNmu = successNmu+ sendMessageInfo(0, BigInteger.valueOf(siteId), BigInteger.valueOf(customerId) , templateList, baseClosingAccountInfoDto.getYear(),baseClosingAccountInfoDto.getMonth(), payDebtMessageDto);
+        Integer successNmu = 0;
+        for (PayDebtMessageDto payDebtMessageDto : debtList) {
+            successNmu = successNmu + sendMessageInfo(0, BigInteger.valueOf(siteId), BigInteger.valueOf(customerId), templateList, baseClosingAccountInfoDto.getYear(), baseClosingAccountInfoDto.getMonth(), payDebtMessageDto);
         }
-        return new AjaxMessage<>(ResultStatus.OK,"推送成功"+successNmu+"条");
+        return new AjaxMessage<>(ResultStatus.OK, "推送成功" + successNmu + "条");
     }
 
     /*
@@ -275,40 +276,40 @@ public class PayMessagesendrecordServiceImp implements PayMessagesendrecordServi
      * @return:
      *
      */
-    public void sendMessageAuto(Integer siteId, Integer customerId){
+    public void sendMessageAuto(Integer siteId, Integer customerId) {
         PayMessageTemplateDto payMessageTemplateDto = new PayMessageTemplateDto();
         payMessageTemplateDto.setSiteId(BigInteger.valueOf(siteId));
         payMessageTemplateDto.setCustomerId(BigInteger.valueOf(customerId));
         payMessageTemplateDto.setSendType(0);
 
         //获取短信模板
-        PayMessageTemplateDto templateList= payMessagetemplateMapper.get("",0,1);
-        if(templateList == null){
+        PayMessageTemplateDto templateList = payMessagetemplateMapper.get("", 0, 1);
+        if (templateList == null) {
             //获取短信模板失败,没查询到有效模板
             throw new ServiceException(ResultStatus.MESSAGE_TEMPLATE_FAILED);
         }
 
         if (!templateList.checkMessage()
-            || StringUtils.isBlank( templateList.getDays())
-                || StringUtils.isBlank( templateList.getSendTime())
-            ){
+                || StringUtils.isBlank(templateList.getDays())
+                || StringUtils.isBlank(templateList.getSendTime())
+        ) {
             //短信配置信息有空值
             throw new ServiceException(ResultStatus.MESSAGE_CONFIGURATION_ISEMPTY);
         }
         //获取最新账期
-        BaseClosingAccountInfoDto baseClosingAccountInfoDto=baseClosingAccountInfoMapper.getLastClosingAccount(siteId,customerId);
-        if(baseClosingAccountInfoDto == null){
+        BaseClosingAccountInfoDto baseClosingAccountInfoDto = baseClosingAccountInfoMapper.getLastClosingAccount(siteId, customerId);
+        if (baseClosingAccountInfoDto == null) {
             throw new ServiceException(ResultStatus.ClOSING_ACCCOUNT_NOT_EXIT);
         }
         //获取数据
-        List<PayDebtMessageDto> debtList = payMessagesendrecordMapper.findDebtList( baseClosingAccountInfoDto.getYear(),baseClosingAccountInfoDto.getMonth(),  null,  null,  null, null,null,null);
-        if(debtList.size()==0){
+        List<PayDebtMessageDto> debtList = payMessagesendrecordMapper.findDebtList(baseClosingAccountInfoDto.getYear(), baseClosingAccountInfoDto.getMonth(), null, null, null, null, null, null);
+        if (debtList.size() == 0) {
             //获取欠费信息失败
             throw new ServiceException(ResultStatus.MESSAGE_DEBTFEE_FAILED);
         }
 
-        for(PayDebtMessageDto payDebtMessageDto: debtList){
-            sendMessageInfo(0, BigInteger.valueOf(siteId), BigInteger.valueOf(customerId) , templateList, baseClosingAccountInfoDto.getYear(),baseClosingAccountInfoDto.getMonth(), payDebtMessageDto);
+        for (PayDebtMessageDto payDebtMessageDto : debtList) {
+            sendMessageInfo(0, BigInteger.valueOf(siteId), BigInteger.valueOf(customerId), templateList, baseClosingAccountInfoDto.getYear(), baseClosingAccountInfoDto.getMonth(), payDebtMessageDto);
         }
     }
 
@@ -325,31 +326,31 @@ public class PayMessagesendrecordServiceImp implements PayMessagesendrecordServi
      * @return:
      *
      */
-    private Integer sendMessageInfo(int type , BigInteger siteId, BigInteger customerId, PayMessageTemplateDto templates, Integer year,Integer month, PayDebtMessageDto payDebtMessageDto) {
+    private Integer sendMessageInfo(int type, BigInteger siteId, BigInteger customerId, PayMessageTemplateDto templates, Integer year, Integer month, PayDebtMessageDto payDebtMessageDto) {
         String template;
         //违约金
         BigDecimal Penaltyfee = payDebtMessageDto.getPenaltyfee().add(payDebtMessageDto.getHistorypenaltyfee());
-        if(Penaltyfee.compareTo(BigDecimal.ZERO) == 1){
+        if (Penaltyfee.compareTo(BigDecimal.ZERO) == 1) {
             //有违约金
-            template=templates.getTemplate2();
-        }else{
+            template = templates.getTemplate2();
+        } else {
             //无违约金
-            template=templates.getTemplate1();
+            template = templates.getTemplate1();
         }
         //拼接短信内容
-        StringBuilder address= new StringBuilder(payDebtMessageDto.getAddress());
-        if(address.length()>6){
-            address.replace(0,address.length()-5,"*****");
-        }else{
-            address.replace(0,address.length()/2,"*****");
-        }
-        String message= template.replace("{accountname}",new StringBuilder(payDebtMessageDto.getAccountname()).replace(0,1,"*"))
-                .replace("{accountnumber}",payDebtMessageDto.getAccountnumber())
-                .replace("{address}",address.toString())
-                .replace("{debtFee}",payDebtMessageDto.getWaterfee().add(payDebtMessageDto.getHistorywaterfee()).toString())
-                .replace("{penaltyFee}",payDebtMessageDto.getPenaltyfee().add(payDebtMessageDto.getHistorypenaltyfee()).toString());
+        StringBuilder address = new StringBuilder(payDebtMessageDto.getAddress());
+        if (address.length() > 6) {
+            address.replace(0, address.length() - 5, "*****");
+        } else {
+            address.replace(0, address.length() / 2, "*****");
+        }
+        String message = template.replace("{accountname}", new StringBuilder(payDebtMessageDto.getAccountname()).replace(0, 1, "*"))
+                .replace("{accountnumber}", payDebtMessageDto.getAccountnumber())
+                .replace("{address}", address.toString())
+                .replace("{debtFee}", payDebtMessageDto.getWaterfee().add(payDebtMessageDto.getHistorywaterfee()).toString())
+                .replace("{penaltyFee}", payDebtMessageDto.getPenaltyfee().add(payDebtMessageDto.getHistorypenaltyfee()).toString());
         //生成推送记录
-        PayMessagesendrecordDto payMessagesendrecordDto=new PayMessagesendrecordDto();
+        PayMessagesendrecordDto payMessagesendrecordDto = new PayMessagesendrecordDto();
         payMessagesendrecordDto.setAccountId(payDebtMessageDto.getAccountId());
         payMessagesendrecordDto.setAccountname(payDebtMessageDto.getAccountname());
         payMessagesendrecordDto.setAccountnumber(payDebtMessageDto.getAccountnumber());
@@ -371,15 +372,15 @@ public class PayMessagesendrecordServiceImp implements PayMessagesendrecordServi
         //
         //短信推送:1成功 0失败
         int result = SMSClient.sendMsg(sendReq);
-        if(result == 1){
+        if (result == 1) {
             payMessagesendrecordDto.setState("成功");
-        }else{
+        } else {
             payMessagesendrecordDto.setState("失败");
         }
         //保存推送记录
-        if(type ==1){//手动推送有用户
-             this.insert(payMessagesendrecordDto);
-        }else{//自动推送无用户
+        if (type == 1) {//手动推送有用户
+            this.insert(payMessagesendrecordDto);
+        } else {//自动推送无用户
             payMessagesendrecordDto.setCreateBy(templates.getUpdateBy());
             payMessagesendrecordDto.setCreateDate(LocalDateTime.now());
             payMessagesendrecordDto.setUpdateBy(templates.getUpdateBy());
@@ -393,8 +394,8 @@ public class PayMessagesendrecordServiceImp implements PayMessagesendrecordServi
     }
 
     @Override
-    public void afterPropertiesSet()  {
-        QuartzEntity entity3 = new QuartzEntity();
+    public void afterPropertiesSet() {
+      /*  QuartzEntity entity3 = new QuartzEntity();
         entity3.setJobGroup("巡检开户开阀操作");
         entity3.setJobName("OpenAccountValveInspectionSyncByJob" );
         entity3.setDescription("OpenAccountValveInspectionSyncByJob" );
@@ -406,33 +407,34 @@ public class PayMessagesendrecordServiceImp implements PayMessagesendrecordServi
         if(!exists3) {
             jobAndTriggerService.save(entity3);
         }
+*/
 
 
-
-        QuartzEntity entity4 = new QuartzEntity();
+       /* QuartzEntity entity4 = new QuartzEntity();
         entity4.setJobGroup("巡检阀门操作有效期");
         entity4.setJobName("DeviceValveSyncByJob" );
         entity4.setDescription("DeviceValveSyncByJob" );
         // modify by pengdi ,判断定时任务是否存在,不存在才进行新增
-        boolean exists4 = jobAndTriggerService.isExists(entity4);
-        if(!exists4) {
-            log.info("巡检阀门操作有效期:" + "0 */30 * * * ?");
-            entity4.setCronExpression("0 */30 * * * ?");
-            entity4.setJobClassName(DeviceValveCommondSync.class.getName());
-            jobAndTriggerService.save(entity4);
-        }
+        boolean exists4 = jobAndTriggerService.isExists(entity4);*/
+        // if(!exists4) {
+        //log.info("巡检阀门操作有效期:" + "0 */30 * * * ?");
+        // entity4.setCronExpression("0 */30 * * * ?");
+        // entity4.setJobClassName(DeviceValveCommondSync.class.getName());
+        // jobAndTriggerService.save(entity4);
+
 
 
 
-        //获取需要自动推送的模板
+        /*//获取需要自动推送的模板
         PayMessageTemplateDto payMessageTemplateDto =new PayMessageTemplateDto();
         payMessageTemplateDto.setOperationType(1);
         payMessageTemplateDto.setSendType(0);
         List<PayMessageTemplateDto> PayMessageTemplateDtos= payMessagetemplateService.getAllMessageTemplate(payMessageTemplateDto);
         //循环添加定时任务
-        for(PayMessageTemplateDto payMessageTemplate :PayMessageTemplateDtos){
-            saveQrtzTask(payMessageTemplate);
-        }
+       /* for(PayMessageTemplateDto payMessageTemplate :PayMessageTemplateDtos){
+            //saveQrtzTask(payMessageTemplate);
+        }*/
+
     }
 
     /*