只查询出未收费的设备

This commit is contained in:
yiyan 2019-02-13 18:20:22 +08:00
parent 2a29aade77
commit 1edc95210b
2 changed files with 1 additions and 3 deletions

View File

@ -80,8 +80,6 @@ public class PayBillJob {
factoryService.savePayBill(payBill);
}
}
log.info("addPayBill end ...");
}
}

View File

@ -59,7 +59,7 @@ public class FactoryServiceImpl implements FactoryService {
Calendar calendar = Calendar.getInstance();
String year = String.valueOf(calendar.get(Calendar.YEAR));
String month = (calendar.get(Calendar.MONTH) < 10 ? "0" + calendar.get(Calendar.MONTH) : calendar.get(Calendar.MONTH)) + "";
int count = this.deviceDao.getNumber("SELECT count(1) from tbl_device td where td.factory_code = '"+ factoryCode +"' and str_to_date(td.authorize_time,'%Y-%m')='" + year + "-" + month + "-00'");
int count = this.deviceDao.getNumber("SELECT count(1) from tbl_device td where td.is_charge = '0' and td.factory_code = '"+ factoryCode +"' and str_to_date(td.authorize_time,'%Y-%m')='" + year + "-" + month + "-00'");
return count;
}