更新开放接口

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