|
@@ -97,6 +97,23 @@ public class SupplyChainController extends BaseController {
|
|
|
Map<String, Object> requestMap = new HashMap<>();
|
|
|
if (!Check.isNull(orderStartDate)) {
|
|
|
requestMap.put("start", DateUtils.strDateToInt(orderStartDate));
|
|
|
+
|
|
|
+ //根据本阶段日期 获取上阶段 开始 和 截至 日期
|
|
|
+ Map<String, String> map = DateUtils.getStartEndTime(orderStartDate, orderEndDate);
|
|
|
+ //下个周期的开始时间
|
|
|
+ String lastTimeStart = map.get("lastTimeStart");
|
|
|
+ //下个周期的结束时间
|
|
|
+ String lastTimeEnd = map.get("lastTimeEnd");
|
|
|
+ //当前小时
|
|
|
+ Integer hour = DateUtils.getNowHour() - 1;
|
|
|
+ //当天 yyyy-MM-dd
|
|
|
+ String today = DateUtils.getNowDateStr();
|
|
|
+ if (!(orderStartDate.equals(orderEndDate) && orderStartDate.equals(today))) {
|
|
|
+ hour = 23;
|
|
|
+ }
|
|
|
+ requestMap.put("lastTimeStart", DateUtils.strDateToInt(lastTimeStart));
|
|
|
+ requestMap.put("lastTimeEnd", DateUtils.strDateToInt(lastTimeEnd));
|
|
|
+ requestMap.put("hour", hour);
|
|
|
}
|
|
|
if (!Check.isNull(orderEndDate)) {
|
|
|
requestMap.put("end", DateUtils.strDateToInt(orderEndDate));
|
|
@@ -228,23 +245,32 @@ public class SupplyChainController extends BaseController {
|
|
|
@ApiParam("用户ID") @RequestParam(value = "userId", required = false) String userId) {
|
|
|
Map<String, Object> requestMap = new HashMap<>();
|
|
|
if (!Check.isNull(orderStartDate) && !Check.isNull(orderEndDate)) {
|
|
|
- if (!Check.isNull(orderStartDate)) {
|
|
|
- requestMap.put("start", DateUtils.strDateToInt(orderStartDate));
|
|
|
- }
|
|
|
- if (!Check.isNull(orderEndDate)) {
|
|
|
- requestMap.put("end", DateUtils.strDateToInt(orderEndDate));
|
|
|
+ requestMap.put("start", DateUtils.strDateToInt(orderStartDate));
|
|
|
+ requestMap.put("end", DateUtils.strDateToInt(orderEndDate));
|
|
|
+
|
|
|
+ //根据本阶段日期 获取上阶段 开始 和 截至 日期
|
|
|
+ Map<String, String> map = DateUtils.getStartEndTime(orderStartDate, orderEndDate);
|
|
|
+ //下个周期的开始时间
|
|
|
+ String lastTimeStart = map.get("lastTimeStart");
|
|
|
+ //下个周期的结束时间
|
|
|
+ String lastTimeEnd = map.get("lastTimeEnd");
|
|
|
+ //当前小时
|
|
|
+ Integer hour = DateUtils.getNowHour() - 1;
|
|
|
+ //当天 yyyy-MM-dd
|
|
|
+ String today = DateUtils.getNowDateStr();
|
|
|
+ if (!(orderStartDate.equals(orderEndDate) && orderStartDate.equals(today))) {
|
|
|
+ hour = 23;
|
|
|
}
|
|
|
+ requestMap.put("lastTimeStart", DateUtils.strDateToInt(lastTimeStart));
|
|
|
+ requestMap.put("lastTimeEnd", DateUtils.strDateToInt(lastTimeEnd));
|
|
|
+ requestMap.put("hour", hour);
|
|
|
}
|
|
|
|
|
|
if (!Check.isNull(bindStartDate) && !Check.isNull(bindEndDate)) {
|
|
|
- if (!Check.isNull(bindStartDate)) {
|
|
|
- requestMap.put("start", DateUtils.strDateToInt(bindStartDate));
|
|
|
- requestMap.put("bindStartDate", bindStartDate);
|
|
|
- }
|
|
|
- if (!Check.isNull(bindEndDate)) {
|
|
|
- requestMap.put("end", DateUtils.strDateToInt(bindEndDate));
|
|
|
- requestMap.put("bindEndDate", bindEndDate);
|
|
|
- }
|
|
|
+ requestMap.put("start", DateUtils.strDateToInt(bindStartDate));
|
|
|
+ requestMap.put("bindStartDate", bindStartDate);
|
|
|
+ requestMap.put("end", DateUtils.strDateToInt(bindEndDate));
|
|
|
+ requestMap.put("bindEndDate", bindEndDate);
|
|
|
}
|
|
|
|
|
|
if (!Check.isNull(itemId)) {
|
|
@@ -1201,26 +1227,29 @@ public class SupplyChainController extends BaseController {
|
|
|
@ApiParam("用户ID") @RequestParam(value = "userId", required = false) Long userId
|
|
|
) {
|
|
|
Map<String, Object> requestMap = new HashMap<>();
|
|
|
- if (!Check.isNull(orderStartDate)) {
|
|
|
- Long start = DateUtils.getStartLongTime(orderStartDate);
|
|
|
- requestMap.put("start", start);
|
|
|
- requestMap.put("startDate", orderStartDate);
|
|
|
- }
|
|
|
- if (!Check.isNull(orderEndDate)) {
|
|
|
- Long end = DateUtils.getEndLongTime(orderEndDate);
|
|
|
- requestMap.put("end", end);
|
|
|
- requestMap.put("endDate", orderEndDate + " 23:59:59");
|
|
|
+ if (!Check.isNull(orderStartDate) && !Check.isNull(orderEndDate)) {
|
|
|
+ requestMap.put("start", DateUtils.strDateToInt(orderStartDate));
|
|
|
+ requestMap.put("end", DateUtils.strDateToInt(orderEndDate));
|
|
|
|
|
|
+ //根据本阶段日期 获取上阶段 开始 和 截至 日期
|
|
|
+ Map<String, String> map = DateUtils.getStartEndTime(orderStartDate, orderEndDate);
|
|
|
+ //下个周期的开始时间
|
|
|
+ String lastTimeStart = map.get("lastTimeStart");
|
|
|
+ //下个周期的结束时间
|
|
|
+ String lastTimeEnd = map.get("lastTimeEnd");
|
|
|
+ //当前小时
|
|
|
+ Integer hour = DateUtils.getNowHour() - 1;
|
|
|
+ //当天 yyyy-MM-dd
|
|
|
+ String today = DateUtils.getNowDateStr();
|
|
|
+ if (!(orderStartDate.equals(orderEndDate) && orderStartDate.equals(today))) {
|
|
|
+ hour = 23;
|
|
|
+ }
|
|
|
+ requestMap.put("lastTimeStart", DateUtils.strDateToInt(lastTimeStart));
|
|
|
+ requestMap.put("lastTimeEnd", DateUtils.strDateToInt(lastTimeEnd));
|
|
|
+ requestMap.put("hour", hour);
|
|
|
}
|
|
|
- if (!Check.isNull(bindStartDate)) {
|
|
|
- Long start = DateUtils.getStartLongTime(bindStartDate);
|
|
|
- requestMap.put("start", start);
|
|
|
+ if (!Check.isNull(bindStartDate) && !Check.isNull(bindEndDate)) {
|
|
|
requestMap.put("startDate", bindStartDate);
|
|
|
- }
|
|
|
-
|
|
|
- if (!Check.isNull(bindEndDate)) {
|
|
|
- Long end = DateUtils.getEndLongTime(bindEndDate);
|
|
|
- requestMap.put("end", end);
|
|
|
requestMap.put("endDate", bindEndDate + " 23:59:59");
|
|
|
}
|
|
|
|
|
@@ -1805,10 +1834,6 @@ public class SupplyChainController extends BaseController {
|
|
|
Integer start = DateUtils.getIntegerTime(orderStartDate);
|
|
|
requestMap.put("start", start);
|
|
|
}
|
|
|
- if (!Check.isNull(orderEndDate)) {
|
|
|
- Integer end = DateUtils.getIntegerTime(orderEndDate);
|
|
|
- requestMap.put("end", end);
|
|
|
- }
|
|
|
if (!Check.isNull(collectSampleId)) {
|
|
|
requestMap.put("collectSampleId", collectSampleId);
|
|
|
}
|