|
@@ -11,6 +11,9 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
+import java.text.ParseException;
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
+import java.util.Calendar;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
@@ -263,4 +266,54 @@ public class WmsInboundResultServiceImpl implements IWmsInboundResultService {
|
|
|
}
|
|
|
return i;
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<Map<String, Object>> getFurnaceNoAmount(Map<String, Object> map) throws ParseException {
|
|
|
+ SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
+ SimpleDateFormat format2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
+
|
|
|
+ Date date = new Date();
|
|
|
+
|
|
|
+
|
|
|
+ String nowDay = format1.format(date);
|
|
|
+
|
|
|
+ Calendar calendar = Calendar.getInstance();
|
|
|
+ Calendar calendar2 = Calendar.getInstance();
|
|
|
+ calendar.add(Calendar.DAY_OF_MONTH,-1);
|
|
|
+ String forwardDay = format1.format(calendar.getTime());
|
|
|
+ calendar2.add(Calendar.DAY_OF_MONTH,1);
|
|
|
+ String afterDay = format1.format(calendar2.getTime());
|
|
|
+
|
|
|
+ String nightTime = forwardDay+" 23:45:00";
|
|
|
+ String nightTime2 = nowDay+" 23:45:00";
|
|
|
+
|
|
|
+ String morningTime = nowDay+" 07:45:00";
|
|
|
+
|
|
|
+ String morningTime2 = afterDay+" 07:45:00";
|
|
|
+
|
|
|
+ String nonTime = nowDay+" 15:45:00";
|
|
|
+
|
|
|
+ String startDate = null;
|
|
|
+ String endDate = null;
|
|
|
+
|
|
|
+ if (date.compareTo(format2.parse(nightTime))>0&&date.compareTo(format2.parse(morningTime))<0){
|
|
|
+
|
|
|
+ startDate = nightTime;
|
|
|
+ endDate = morningTime;
|
|
|
+ }else if (date.compareTo(format2.parse(morningTime))>0&&date.compareTo(format2.parse(nonTime))<0){
|
|
|
+
|
|
|
+ startDate = morningTime;
|
|
|
+ endDate = nonTime;
|
|
|
+ }else if (date.compareTo(format2.parse(nonTime))>0&&date.compareTo(format2.parse(nightTime2))<0){
|
|
|
+
|
|
|
+ startDate = nonTime;
|
|
|
+ endDate = nightTime2;
|
|
|
+ }else{
|
|
|
+
|
|
|
+ startDate = nightTime2;
|
|
|
+ endDate = morningTime2;
|
|
|
+ }
|
|
|
+
|
|
|
+ return wmspInboundResultMapper.getFurnaceNoAmount(startDate,endDate);
|
|
|
+ }
|
|
|
}
|