完成出库计划新增接口,并自动执行出库计划,在数量等条件满足的情况下生成相应的出库任务
This commit is contained in:
parent
8fad8ba16c
commit
655f0ab225
@ -45,6 +45,15 @@ public class WmsOutPlanController extends BaseController {
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@PostMapping("/open/add")
|
||||
public AjaxResult openAdd(@RequestBody WmsOutPlan wmsOutPlan) {
|
||||
// 出库计划编码自动生成
|
||||
if (wmsOutPlan.getPlanCode() == null || wmsOutPlan.getPlanCode().isEmpty()) {
|
||||
wmsOutPlan.setPlanCode(MultiModuleCodeGenerator.generateTaskCode("CKP"));
|
||||
}
|
||||
return toAjax(wmsOutPlanService.insertWmsOutPlanAndRun(wmsOutPlan));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询出库计划管理列表
|
||||
*/
|
||||
|
@ -30,6 +30,14 @@ public interface IWmsOutPlanService {
|
||||
*/
|
||||
List<WmsOutPlan> selectWmsOutPlanList(WmsOutPlan wmsOutPlan);
|
||||
|
||||
/**
|
||||
* 新增出库计划管理并执行
|
||||
*
|
||||
* @param wmsOutPlan 出库计划管理
|
||||
* @return 结果
|
||||
*/
|
||||
int insertWmsOutPlanAndRun(WmsOutPlan wmsOutPlan);
|
||||
|
||||
/**
|
||||
* 新增出库计划管理
|
||||
*
|
||||
|
@ -90,6 +90,16 @@ public class WmsOutPlanServiceImpl implements IWmsOutPlanService {
|
||||
return wmsOutPlanList;
|
||||
}
|
||||
|
||||
@Transactional
|
||||
@Override
|
||||
public int insertWmsOutPlanAndRun(WmsOutPlan wmsOutPlan) {
|
||||
wmsOutPlan.setCreateTime(DateUtils.getNowDate());
|
||||
int rows = wmsOutPlanMapper.insertWmsOutPlan(wmsOutPlan);
|
||||
insertWmsOutPlanDetail(wmsOutPlan);
|
||||
this.runWmsOutPlan(new Long[]{wmsOutPlan.getWmsOutPlanId()});
|
||||
return rows;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增出库计划管理
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user