更新开放接口

This commit is contained in:
Stang 2024-11-19 15:13:21 +08:00
parent 7cf4ad5510
commit 7d38eb503d
2 changed files with 26 additions and 24 deletions

View File

@ -89,28 +89,28 @@ public class BaseKnifeController extends BaseController {
* @return
*/
@GetMapping("/open/selectBaseKnife")
public List<Map<String, Object>> openList() {
BaseKnife baseKnife = new BaseKnife();
List<BaseKnife> list = baseKnifeService.selectBaseKnifeList(null);
List<Map<String, Object>> result = new ArrayList<>();
list.forEach(item -> {
Map<String, Object> map = new HashMap<>();
map.put("gid", item.getBaseKnifeId().toString());
map.put("itemCode", item.getKnifeCode());
map.put("itemName", item.getKnifeName());
map.put("itemUnit", item.getKnifeUnit());
map.put("itemType", item.getKnifeType());
map.put("areaCode", item.getAreaCode());
map.put("knifeLife", "100");
map.put("knifeLifeUsed", item.getKnifeLife() == 0 ? null : String.valueOf(100 - item.getKnifeLife()));
map.put("knifeLifeLeave", item.getKnifeLife() == 0 ? null : String.valueOf(item.getKnifeLife()));
map.put("isLocked", item.getIsLocked());
map.put("lockedStartTime", item.getLockedStartTime() == null ? null : item.getLockedStartTime());
map.put("lockedEndTime", item.getLockedEndTime() == null ? null : item.getLockedEndTime());
map.put("planSheet", item.getPlanSheet() == null ? null : item.getPlanSheet());
map.put("outInfoList", item.getOutInfoList());
result.add(map);
});
public TableDataInfo openList(BaseKnife baseKnife) {
// BaseKnife baseKnife = new BaseKnife();
// List<BaseKnife> list = baseKnifeService.selectBaseKnifeList(null);
// List<Map<String, Object>> result = new ArrayList<>();
// list.forEach(item -> {
// Map<String, Object> map = new HashMap<>();
// map.put("gid", item.getBaseKnifeId().toString());
// map.put("itemCode", item.getKnifeCode());
// map.put("itemName", item.getKnifeName());
// map.put("itemUnit", item.getKnifeUnit());
// map.put("itemType", item.getKnifeType());
// map.put("areaCode", item.getAreaCode());
// map.put("knifeLife", "100");
// map.put("knifeLifeUsed", item.getKnifeLife() == 0 ? null : String.valueOf(100 - item.getKnifeLife()));
// map.put("knifeLifeLeave", item.getKnifeLife() == 0 ? null : String.valueOf(item.getKnifeLife()));
// map.put("isLocked", item.getIsLocked());
// map.put("lockedStartTime", item.getLockedStartTime() == null ? null : item.getLockedStartTime());
// map.put("lockedEndTime", item.getLockedEndTime() == null ? null : item.getLockedEndTime());
// map.put("planSheet", item.getPlanSheet() == null ? null : item.getPlanSheet());
// map.put("outInfoList", item.getOutInfoList());
// result.add(map);
// });
// 构建日志
SysOperLog operLog = new SysOperLog();
@ -128,7 +128,9 @@ public class BaseKnifeController extends BaseController {
// operLog.setJsonResult(JSON.toJSONString(result));
operLogService.insertOperlog(operLog);
return result;
startPage();
List<BaseKnife> list = baseKnifeService.selectBaseKnifeList(baseKnife);
return getDataTable(list);
}
@PostMapping("/open/checkForAlignment")

View File

@ -31,7 +31,7 @@ public class WmsOutTaskController extends BaseController {
/**
* 查询出库任务列表
*/
@GetMapping("/open/list")
@GetMapping("/open/incompleteList")
public TableDataInfo openList(WmsOutTask wmsOutTask) {
startPage();
wmsOutTask.setTaskState("0");