1、时间范围修改
This commit is contained in:
parent
2e115a96c3
commit
9a6057114c
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -168,7 +168,7 @@ public class ProductionDataSyncServiceImpl implements DataSyncService {
|
|||||||
try {
|
try {
|
||||||
String deleteSql = "DELETE FROM " + targetTable +
|
String deleteSql = "DELETE FROM " + targetTable +
|
||||||
" WHERE " + targetTimeField + " >= ? ";
|
" WHERE " + targetTimeField + " >= ? ";
|
||||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
String startDateStr = simpleDateFormat.format(startDate)+" 00:00:00";
|
String startDateStr = simpleDateFormat.format(startDate)+" 00:00:00";
|
||||||
String endDateStr = simpleDateFormat.format(endDate)+" 23:59:59";
|
String endDateStr = simpleDateFormat.format(endDate)+" 23:59:59";
|
||||||
int deletedCount = DBSql.update(deleteSql, new Object[]{startDateStr});
|
int deletedCount = DBSql.update(deleteSql, new Object[]{startDateStr});
|
||||||
@ -742,7 +742,7 @@ public class ProductionDataSyncServiceImpl implements DataSyncService {
|
|||||||
// 按时间范围删除
|
// 按时间范围删除
|
||||||
String deleteSql = "DELETE FROM " + hzb +
|
String deleteSql = "DELETE FROM " + hzb +
|
||||||
" WHERE BKGS = '"+bkgs+"' AND " + targetTimeField + " >= ? ";
|
" WHERE BKGS = '"+bkgs+"' AND " + targetTimeField + " >= ? ";
|
||||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
String startDateStr = simpleDateFormat.format(startDate)+" 00:00:00";
|
String startDateStr = simpleDateFormat.format(startDate)+" 00:00:00";
|
||||||
int deletedCount = DBSql.update(deleteSql, new Object[]{startDate});
|
int deletedCount = DBSql.update(deleteSql, new Object[]{startDate});
|
||||||
LOGGER.info("已删除目标表[{}]中{}条数据(时间范围: {} )",
|
LOGGER.info("已删除目标表[{}]中{}条数据(时间范围: {} )",
|
||||||
@ -773,7 +773,7 @@ public class ProductionDataSyncServiceImpl implements DataSyncService {
|
|||||||
boolean hasMore;
|
boolean hasMore;
|
||||||
String pageSql = "";
|
String pageSql = "";
|
||||||
List<RowMap> pageData = null;
|
List<RowMap> pageData = null;
|
||||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
String startDate = "";
|
String startDate = "";
|
||||||
String endDate = "";
|
String endDate = "";
|
||||||
try {
|
try {
|
||||||
|
|||||||
@ -334,7 +334,7 @@ public class PurchaseDataSummaryServiceImpl implements DataSummaryService {
|
|||||||
int update = DBSql.update(deleteSql, new Object[]{bkgs, yearMonth});
|
int update = DBSql.update(deleteSql, new Object[]{bkgs, yearMonth});
|
||||||
LOGGER.info("采购_基地_年月采购明细:{}年月物料采购月度汇总数据,板块公司:{},删除了{}条数据", yearMonth, bkgs, update);
|
LOGGER.info("采购_基地_年月采购明细:{}年月物料采购月度汇总数据,板块公司:{},删除了{}条数据", yearMonth, bkgs, update);
|
||||||
|
|
||||||
String currentMonthSql = "SELECT " +
|
String currentMonthSql = "SELECT c.BKGS AS BKGS," +
|
||||||
" CONCAT(c.Year, '-', LPAD(c.Month, 2, '0')) AS ny, " +
|
" CONCAT(c.Year, '-', LPAD(c.Month, 2, '0')) AS ny, " +
|
||||||
" c.Year AS year, " +
|
" c.Year AS year, " +
|
||||||
" c.Month AS month, " +
|
" c.Month AS month, " +
|
||||||
@ -345,7 +345,7 @@ public class PurchaseDataSummaryServiceImpl implements DataSummaryService {
|
|||||||
" tstotalAmount/totalQuantity AS PJDJ " +
|
" tstotalAmount/totalQuantity AS PJDJ " +
|
||||||
" FROM (" +
|
" FROM (" +
|
||||||
" SELECT " +
|
" SELECT " +
|
||||||
" WLMC, " +
|
" WLMC, BKGS, " +
|
||||||
" SUM(DHJE) AS tstotalAmount, " +
|
" SUM(DHJE) AS tstotalAmount, " +
|
||||||
" SUM(RKSL) AS totalQuantity, " +
|
" SUM(RKSL) AS totalQuantity, " +
|
||||||
" SLGC, " +
|
" SLGC, " +
|
||||||
|
|||||||
@ -196,7 +196,7 @@ public class PurchaseDataSyncServiceImpl implements DataSyncService {
|
|||||||
try {
|
try {
|
||||||
String deleteSql = "DELETE FROM " + targetTable +
|
String deleteSql = "DELETE FROM " + targetTable +
|
||||||
" WHERE " + targetTimeField + " >= ? ";
|
" WHERE " + targetTimeField + " >= ? ";
|
||||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
String startDateStr = simpleDateFormat.format(startDate)+" 00:00:00";
|
String startDateStr = simpleDateFormat.format(startDate)+" 00:00:00";
|
||||||
String endDateStr = simpleDateFormat.format(endDate)+" 23:59:59";
|
String endDateStr = simpleDateFormat.format(endDate)+" 23:59:59";
|
||||||
int deletedCount = DBSql.update(deleteSql, new Object[]{startDateStr});
|
int deletedCount = DBSql.update(deleteSql, new Object[]{startDateStr});
|
||||||
@ -784,7 +784,7 @@ public class PurchaseDataSyncServiceImpl implements DataSyncService {
|
|||||||
for (String bkgs : bkgsArr) {
|
for (String bkgs : bkgsArr) {
|
||||||
String deleteSql = "DELETE FROM " + hzb +
|
String deleteSql = "DELETE FROM " + hzb +
|
||||||
" WHERE BKGS = '"+bkgs+"' AND " + targetTimeField + " >= ? ";
|
" WHERE BKGS = '"+bkgs+"' AND " + targetTimeField + " >= ? ";
|
||||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
String startDateStr = simpleDateFormat.format(startDate)+" 00:00:00";
|
String startDateStr = simpleDateFormat.format(startDate)+" 00:00:00";
|
||||||
int deletedCount = DBSql.update(deleteSql, new Object[]{startDateStr});
|
int deletedCount = DBSql.update(deleteSql, new Object[]{startDateStr});
|
||||||
LOGGER.info("已删除目标表["+hzb+"]中{}条数据(时间范围: {} )",
|
LOGGER.info("已删除目标表["+hzb+"]中{}条数据(时间范围: {} )",
|
||||||
@ -817,7 +817,7 @@ public class PurchaseDataSyncServiceImpl implements DataSyncService {
|
|||||||
boolean hasMore;
|
boolean hasMore;
|
||||||
String pageSql = "";
|
String pageSql = "";
|
||||||
List<RowMap> pageData = null;
|
List<RowMap> pageData = null;
|
||||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
String startDate = "";
|
String startDate = "";
|
||||||
String endDate = "";
|
String endDate = "";
|
||||||
PurchaseUtil purchaseUtil = new PurchaseUtil();
|
PurchaseUtil purchaseUtil = new PurchaseUtil();
|
||||||
|
|||||||
@ -473,7 +473,7 @@ public class SaleCountDimensionImpl implements DataSummaryService {
|
|||||||
bo.set("JD", location.getLongitude());
|
bo.set("JD", location.getLongitude());
|
||||||
bo.set("WD", location.getLatitude());
|
bo.set("WD", location.getLatitude());
|
||||||
}
|
}
|
||||||
if ("石膏板".equals(map.getString("LB_1"))){
|
if ("石膏板".equals(lb_1) || "高分子".equals(lb_1)){
|
||||||
bo.set("XL", map.getDouble("TSXL"));
|
bo.set("XL", map.getDouble("TSXL"));
|
||||||
bo.set("SNTQXL", map.getString("sntqtsxl"));
|
bo.set("SNTQXL", map.getString("sntqtsxl"));
|
||||||
}else {
|
}else {
|
||||||
|
|||||||
@ -459,7 +459,7 @@ public class SaleDataSyncServiceImpl implements DataSyncService {
|
|||||||
try {
|
try {
|
||||||
String deleteSql = "DELETE FROM " + targetTable +
|
String deleteSql = "DELETE FROM " + targetTable +
|
||||||
" WHERE " + targetTimeField + " >= ? ";
|
" WHERE " + targetTimeField + " >= ? ";
|
||||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
String startDateStr = simpleDateFormat.format(startDate)+" 00:00:00";
|
String startDateStr = simpleDateFormat.format(startDate)+" 00:00:00";
|
||||||
String endDateStr = simpleDateFormat.format(endDate)+" 23:59:59";
|
String endDateStr = simpleDateFormat.format(endDate)+" 23:59:59";
|
||||||
int deletedCount = DBSql.update(deleteSql, new Object[]{startDateStr});
|
int deletedCount = DBSql.update(deleteSql, new Object[]{startDateStr});
|
||||||
@ -773,7 +773,7 @@ public class SaleDataSyncServiceImpl implements DataSyncService {
|
|||||||
for (String bkgs : bkgsArr) {
|
for (String bkgs : bkgsArr) {
|
||||||
String deleteSql = "DELETE FROM " + hzb +
|
String deleteSql = "DELETE FROM " + hzb +
|
||||||
" WHERE BKGS = '"+bkgs+"' AND " + targetTimeField + " >= ? ";
|
" WHERE BKGS = '"+bkgs+"' AND " + targetTimeField + " >= ? ";
|
||||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
String startDateStr = simpleDateFormat.format(startDate)+" 00:00:00";
|
String startDateStr = simpleDateFormat.format(startDate)+" 00:00:00";
|
||||||
int deletedCount = DBSql.update(deleteSql, new Object[]{startDateStr});
|
int deletedCount = DBSql.update(deleteSql, new Object[]{startDateStr});
|
||||||
LOGGER.info("已删除目标表["+hzb+"]中{}条数据(时间范围: {} )",
|
LOGGER.info("已删除目标表["+hzb+"]中{}条数据(时间范围: {} )",
|
||||||
@ -809,7 +809,7 @@ public class SaleDataSyncServiceImpl implements DataSyncService {
|
|||||||
boolean hasMore;
|
boolean hasMore;
|
||||||
String pageSql = "";
|
String pageSql = "";
|
||||||
List<RowMap> pageData = null;
|
List<RowMap> pageData = null;
|
||||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
String startDate = "";
|
String startDate = "";
|
||||||
String endDate = "";
|
String endDate = "";
|
||||||
// 查询梦牌区域
|
// 查询梦牌区域
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user