change - 箱壳单日出入库查询修改

master
wenjy 2 years ago
parent dc5f8fc800
commit f6e7ccd43f

@ -23,6 +23,7 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
@ -135,7 +136,8 @@ public class NorthWareHouseController {
@PostMapping("/getStoreInfo")
@ResponseBody
public String getStoreInfo(){
public String getStoreInfo() throws ParseException {
SimpleDateFormat today = new SimpleDateFormat("yyyy-MM-dd 00:00:00");
RecordTask recordTaskInfo;
Map<String,Object> params = new HashMap<>();
Calendar calendar = Calendar.getInstance();
@ -160,7 +162,8 @@ public class NorthWareHouseController {
southWare.setUseStoreCount(baseLocationInfoList.size());
southWare.setFreeStoreCount(312-baseLocationInfoList.size());
params.put("beginRecordTime",calendar.getTime());
//params.put("beginRecordTime",calendar.getTime());
params.put("beginRecordTime",today.parse(today.format(new Date())));
params.put("endRecordTime",new Date());
recordTaskInfo = new RecordTask("A","1",1L,new Date());

@ -23,6 +23,7 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
@ -137,7 +138,8 @@ public class SouthWareHouseController {
@PostMapping("/getStoreInfo")
@ResponseBody
public String getStoreInfo(){
public String getStoreInfo() throws ParseException {
SimpleDateFormat today = new SimpleDateFormat("yyyy-MM-dd 00:00:00");
RecordTask recordTaskInfo;
Map<String,Object> params = new HashMap<>();
Calendar calendar = Calendar.getInstance();
@ -162,23 +164,24 @@ public class SouthWareHouseController {
southWare.setUseStoreCount(baseLocationInfoList.size());
southWare.setFreeStoreCount(312-baseLocationInfoList.size());
params.put("beginRecordTime",calendar.getTime());
//params.put("beginRecordTime",calendar.getTime());
params.put("beginRecordTime",today.parse(today.format(new Date())));
params.put("endRecordTime",new Date());
recordTaskInfo = new RecordTask("A","1",1L,new Date());
recordTaskInfo = new RecordTask("B","1",1L,new Date());
recordTaskInfo.setParams(params);
List<RecordTask> recordLeftInStore = recordTaskService.selectRecordTaskList(recordTaskInfo);
recordTaskInfo = new RecordTask("A","1",2L,new Date());
recordTaskInfo = new RecordTask("B","1",2L,new Date());
recordTaskInfo.setParams(params);
List<RecordTask> recordLeftOutStore = recordTaskService.selectRecordTaskList(recordTaskInfo);
recordTaskInfo = new RecordTask("A","2",1L,new Date());
recordTaskInfo = new RecordTask("B","2",1L,new Date());
recordTaskInfo.setParams(params);
List<RecordTask> recordRightInStore = recordTaskService.selectRecordTaskList(recordTaskInfo);
recordTaskInfo = new RecordTask("A","2",2L,new Date());
recordTaskInfo = new RecordTask("B","2",2L,new Date());
recordTaskInfo.setParams(params);
List<RecordTask> recordRightOutStore = recordTaskService.selectRecordTaskList(recordTaskInfo);

@ -35,6 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="locationArea != null and locationArea != ''"> and location_area = #{locationArea}</if>
<if test="taskType != null "> and task_type = #{taskType}</if>
<if test="taskStatus != null "> and task_status = #{taskStatus}</if>
<if test="storeCode != null "> and store_code = #{storeCode}</if>
<if test="params.beginRecordTime != null "> and record_time between #{params.beginRecordTime} and #{params.endRecordTime}</if>
</where>
</select>

Loading…
Cancel
Save