|
|
@ -44,6 +44,109 @@ public class HaiAnIssureNotifyController { |
|
|
@Autowired |
|
|
@Autowired |
|
|
private PartAttributeUtil partAttributeUtil; |
|
|
private PartAttributeUtil partAttributeUtil; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @author rqrq |
|
|
|
|
|
* @Description 查询当前用户未下达海安申请单,工单/发货/委外共用,按入参orderType隔离 - rqrq |
|
|
|
|
|
*/ |
|
|
|
|
|
@PostMapping(value = "/getUserNotifyNo") |
|
|
|
|
|
public R getUserNotifyNo(@RequestBody HaiAnSOIssueNotifyHeaderData data) { |
|
|
|
|
|
HaiAnSOIssueNotifyHeaderData row = haiAnIssureNotifyService.haiAnGetUserNotifyNo(data); |
|
|
|
|
|
return R.ok().put("row", row); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @author rqrq |
|
|
|
|
|
* @Description 校验用户是否存在未下达海安申请单,默认shoporder并支持shipment/poorder按类型隔离 - rqrq |
|
|
|
|
|
*/ |
|
|
|
|
|
@PostMapping(value = "/checkUserHasUnissueShopOrder") |
|
|
|
|
|
public R checkUserHasUnissueShopOrder(@RequestBody HaiAnSOIssueNotifyHeaderData data) { |
|
|
|
|
|
HaiAnSOIssueNotifyHeaderData row = haiAnIssureNotifyService.haiAnCheckUserHasUnissueShopOrder(data); |
|
|
|
|
|
return R.ok().put("row", row); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @author rqrq |
|
|
|
|
|
* @Description 创建海安领料申请单头,工单/发货/委外共用createNotify入口 - rqrq |
|
|
|
|
|
*/ |
|
|
|
|
|
@PostMapping(value = "/createNotify") |
|
|
|
|
|
public R createNotify(@RequestBody HaiAnSOIssueNotifyHeaderData data) { |
|
|
|
|
|
haiAnIssureNotifyService.haiAnCreateNotify(data); |
|
|
|
|
|
return R.ok(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @author rqrq |
|
|
|
|
|
* @Description 查询海安申请单工单行明细,供申请页父行回显 - rqrq |
|
|
|
|
|
*/ |
|
|
|
|
|
@PostMapping(value = "/getNotifyNoDetail") |
|
|
|
|
|
public R getNotifyNoDetail(@RequestBody HaiAnSOIssueNotifyHeaderData data) { |
|
|
|
|
|
List<HaiAnSOIssueNotifyOrderListData> rows = haiAnIssureNotifyService.haiAnGetNotifyNoDetail(data); |
|
|
|
|
|
return R.ok().put("rows", rows); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @author rqrq |
|
|
|
|
|
* @Description 保存单条海安工单行,返回新生成的itemNo供前端继续写物料 - rqrq |
|
|
|
|
|
*/ |
|
|
|
|
|
@PostMapping(value = "/saveSOIssueNotifyOrderList") |
|
|
|
|
|
public R saveSOIssueNotifyOrderList(@RequestBody HaiAnSOIssueNotifyOrderList data) { |
|
|
|
|
|
Integer itemNo = haiAnIssureNotifyService.haiAnSaveSOIssueNotifyOrderList(data); |
|
|
|
|
|
return R.ok().put("itemNo", itemNo); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @author rqrq |
|
|
|
|
|
* @Description 保存海安工单物料明细,先删后存保证编辑幂等 - rqrq |
|
|
|
|
|
*/ |
|
|
|
|
|
@PostMapping(value = "/saveMaterialDetail") |
|
|
|
|
|
public R saveMaterialDetail(@RequestBody List<HaiAnSOIssueNotifyOrderMaterialListData> data) { |
|
|
|
|
|
haiAnIssureNotifyService.haiAnSaveMaterialDetail(data); |
|
|
|
|
|
return R.ok(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @author rqrq |
|
|
|
|
|
* @Description 删除海安申请单工单行并同步清理子物料 - rqrq |
|
|
|
|
|
*/ |
|
|
|
|
|
@PostMapping(value = "/deleteNotifySOS") |
|
|
|
|
|
public R deleteNotifySOS(@RequestBody HaiAnSOIssueNotifyOrderListData data) { |
|
|
|
|
|
haiAnIssureNotifyService.haiAnDeleteNotifySOS(data); |
|
|
|
|
|
return R.ok(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @author rqrq |
|
|
|
|
|
* @Description 下达海安申请单,仅更新主单状态与计划时间 - rqrq |
|
|
|
|
|
*/ |
|
|
|
|
|
@PostMapping(value = "/xiadaNotify") |
|
|
|
|
|
public R xiadaNotify(@RequestBody HaiAnSOIssueNotifyHeaderData data) { |
|
|
|
|
|
haiAnIssureNotifyService.haiAnXiadaNotifyHeader(data); |
|
|
|
|
|
return R.ok(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @author rqrq |
|
|
|
|
|
* @Description 删除海安申请单头并清理父子层,避免残留导致再次建单冲突 - rqrq |
|
|
|
|
|
*/ |
|
|
|
|
|
@PostMapping(value = "/deleteNotify") |
|
|
|
|
|
public R deleteNotify(@RequestBody HaiAnSOIssueNotifyHeaderData data) { |
|
|
|
|
|
haiAnIssureNotifyService.haiAnDeleteNotifyHeader(data); |
|
|
|
|
|
return R.ok(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @author rqrq |
|
|
|
|
|
* @Description 保存海安工单与物料(删后重建),工单/发货/委外申请页共用 - rqrq |
|
|
|
|
|
*/ |
|
|
|
|
|
@PostMapping(value = "/saveNewSoIssueNotify") |
|
|
|
|
|
public R saveNewSoIssueNotify(@RequestBody HaiAnNewSoIssueNotifyDto data) { |
|
|
|
|
|
String result = haiAnIssureNotifyService.haiAnSaveNewSoIssueNotify(data); |
|
|
|
|
|
if ("200".equals(result)) { |
|
|
|
|
|
return R.ok("操作成功"); |
|
|
|
|
|
} |
|
|
|
|
|
return R.error("操作失败"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* @author rqrq |
|
|
* @author rqrq |
|
|
* @Description 查询当前物料行的指定策略,供指定弹窗展示 - rqrq |
|
|
* @Description 查询当前物料行的指定策略,供指定弹窗展示 - rqrq |
|
|
|