|
|
|
@ -179,5 +179,36 @@ public class CountingWIPController extends AbstractController { |
|
|
|
return R.error("确认失败: " + e.getMessage()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 删除WIP数据 |
|
|
|
*/ |
|
|
|
@PostMapping("delete") |
|
|
|
public R delete(@RequestBody Map<String, Object> params) { |
|
|
|
try { |
|
|
|
String site = (String) params.get("site"); |
|
|
|
String reportId = (String) params.get("reportId"); |
|
|
|
String rollNo = (String) params.get("rollNo"); |
|
|
|
|
|
|
|
if (site == null || site.isEmpty()) { |
|
|
|
return R.error("站点不能为空"); |
|
|
|
} |
|
|
|
if (reportId == null || reportId.isEmpty()) { |
|
|
|
return R.error("盘点任务单号不能为空"); |
|
|
|
} |
|
|
|
if (rollNo == null || rollNo.isEmpty()) { |
|
|
|
return R.error("标签条码不能为空"); |
|
|
|
} |
|
|
|
|
|
|
|
countingWIPService.deleteByRollNo(site, reportId, rollNo); |
|
|
|
|
|
|
|
return R.ok() |
|
|
|
.put("code", 0) |
|
|
|
.put("msg", "删除成功"); |
|
|
|
} catch (Exception e) { |
|
|
|
logger.error("删除WIP数据失败", e); |
|
|
|
return R.error("删除失败: " + e.getMessage()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|