|
@@ -11,6 +11,9 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
import java.math.BigDecimal;
|
|
|
|
+import java.text.ParseException;
|
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
|
+import java.util.Calendar;
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
@@ -267,6 +270,7 @@ public class WmsInboundResultServiceImpl implements IWmsInboundResultService {
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
|
+<<<<<<< HEAD
|
|
public int undoInbound(BigDecimal inboundId) {
|
|
public int undoInbound(BigDecimal inboundId) {
|
|
//根据前端传过来的inboundId
|
|
//根据前端传过来的inboundId
|
|
//对实时库存表进行删除
|
|
//对实时库存表进行删除
|
|
@@ -279,5 +283,54 @@ public class WmsInboundResultServiceImpl implements IWmsInboundResultService {
|
|
wmspInboundResultMapper.deleteInboundByInboudId(inboundId);
|
|
wmspInboundResultMapper.deleteInboundByInboudId(inboundId);
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
|
|
+=======
|
|
|
|
+ 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());
|
|
|
|
+// 创建晚班时间(前一天的晚上23:45到当天的早上7:45)
|
|
|
|
+ String nightTime = forwardDay+" 23:45:00";
|
|
|
|
+ String nightTime2 = nowDay+" 23:45:00";
|
|
|
|
+// 创建早班时间(当天的早上7:45到当前下午的15:45)
|
|
|
|
+ String morningTime = nowDay+" 07:45:00";
|
|
|
|
+// 创建后一天的早班时间
|
|
|
|
+ String morningTime2 = afterDay+" 07:45:00";
|
|
|
|
+// 创建中班时间(当天下午的15:45到晚上的23:45)
|
|
|
|
+ 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);
|
|
|
|
+>>>>>>> 6aeaabd84833916e29cbd1fa3c6cd6ca0e9b8c51
|
|
}
|
|
}
|
|
}
|
|
}
|