refactor(入库任务): 增加库位信息
This commit is contained in:
parent
575e5d1b61
commit
a012aa0743
@ -124,11 +124,10 @@ public class WmsInTaskController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
// @PreAuthorize("@ss.hasPermi('wm:wmsInTask:issueBatch')")
|
// @PreAuthorize("@ss.hasPermi('wm:wmsInTask:issueBatch')")
|
||||||
// @Log(title = "入库任务", businessType = BusinessType.UPDATE)
|
// @Log(title = "入库任务", businessType = BusinessType.UPDATE)
|
||||||
@PostMapping("/open/issueBatch")
|
@PostMapping("/open/issueBatch/{ids}")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public AjaxResult issueBatch(@RequestBody List<String> wmsInTaskIdList) {
|
public AjaxResult issueBatch(@PathVariable String[] ids) {
|
||||||
|
for (String taskId : ids) {
|
||||||
wmsInTaskIdList.forEach(taskId -> {
|
|
||||||
// 获取任务信息
|
// 获取任务信息
|
||||||
WmsInTask wmsInTask = wmsInTaskService.selectWmsInTaskById(taskId);
|
WmsInTask wmsInTask = wmsInTaskService.selectWmsInTaskById(taskId);
|
||||||
// 更新任务状态
|
// 更新任务状态
|
||||||
@ -230,7 +229,7 @@ public class WmsInTaskController extends BaseController {
|
|||||||
}
|
}
|
||||||
mdItemService.updateMdItem(mbbBdMrlMitm);
|
mdItemService.updateMdItem(mbbBdMrlMitm);
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
return toAjax(1);
|
return toAjax(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -60,6 +60,9 @@ public class WmsInTask extends BaseEntity {
|
|||||||
* 库位编码
|
* 库位编码
|
||||||
*/
|
*/
|
||||||
private String cellCode;
|
private String cellCode;
|
||||||
|
private String cellX;
|
||||||
|
private String cellY;
|
||||||
|
private String cellZ;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 起始库位
|
* 起始库位
|
||||||
@ -205,6 +208,30 @@ public class WmsInTask extends BaseEntity {
|
|||||||
this.cellCode = cellCode;
|
this.cellCode = cellCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getCellX() {
|
||||||
|
return cellX;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCellX(String cellX) {
|
||||||
|
this.cellX = cellX;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCellY() {
|
||||||
|
return cellY;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCellY(String cellY) {
|
||||||
|
this.cellY = cellY;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCellZ() {
|
||||||
|
return cellZ;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCellZ(String cellZ) {
|
||||||
|
this.cellZ = cellZ;
|
||||||
|
}
|
||||||
|
|
||||||
public void setIsActive(String isActive) {
|
public void setIsActive(String isActive) {
|
||||||
this.isActive = isActive;
|
this.isActive = isActive;
|
||||||
}
|
}
|
||||||
@ -313,6 +340,9 @@ public class WmsInTask extends BaseEntity {
|
|||||||
.append("cellName", getCellName())
|
.append("cellName", getCellName())
|
||||||
.append("cellCode", getCellCode())
|
.append("cellCode", getCellCode())
|
||||||
.append("cellOrig", getCellOrig())
|
.append("cellOrig", getCellOrig())
|
||||||
|
.append("cellX", getCellX())
|
||||||
|
.append("cellY", getCellY())
|
||||||
|
.append("cellZ", getCellZ())
|
||||||
.append("remark", getRemark())
|
.append("remark", getRemark())
|
||||||
.append("createBy", getCreateBy())
|
.append("createBy", getCreateBy())
|
||||||
.append("createTime", getCreateTime())
|
.append("createTime", getCreateTime())
|
||||||
|
@ -9,7 +9,9 @@ import com.ktg.generator.util.MultiModuleCodeGenerator;
|
|||||||
import com.ktg.mes.md.domain.MdItem;
|
import com.ktg.mes.md.domain.MdItem;
|
||||||
import com.ktg.mes.md.mapper.MdItemMapper;
|
import com.ktg.mes.md.mapper.MdItemMapper;
|
||||||
import com.ktg.mes.md.service.IMdItemService;
|
import com.ktg.mes.md.service.IMdItemService;
|
||||||
|
import com.ktg.mes.wm.domain.WmStorageArea;
|
||||||
import com.ktg.mes.wm.domain.WmsInPlanDetailEntity;
|
import com.ktg.mes.wm.domain.WmsInPlanDetailEntity;
|
||||||
|
import com.ktg.mes.wm.mapper.WmStorageAreaMapper;
|
||||||
import com.ktg.mes.wm.service.IWmsInPlanDetailEntityService;
|
import com.ktg.mes.wm.service.IWmsInPlanDetailEntityService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@ -31,6 +33,8 @@ public class WmsInTaskServiceImpl implements IWmsInTaskService {
|
|||||||
private MdItemMapper mdItemMapper;
|
private MdItemMapper mdItemMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IWmsInPlanDetailEntityService wmsInPlanDetailEntityService;
|
private IWmsInPlanDetailEntityService wmsInPlanDetailEntityService;
|
||||||
|
@Autowired
|
||||||
|
private WmStorageAreaMapper wmStorageAreaMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询入库任务
|
* 查询入库任务
|
||||||
@ -58,6 +62,12 @@ public class WmsInTaskServiceImpl implements IWmsInTaskService {
|
|||||||
|
|
||||||
WmsInPlanDetailEntity wmsInPlanDetailEntityQuery = new WmsInPlanDetailEntity();
|
WmsInPlanDetailEntity wmsInPlanDetailEntityQuery = new WmsInPlanDetailEntity();
|
||||||
wmsInPlanDetailEntityQuery.setPlanDetailsId(task.getDetailInId());
|
wmsInPlanDetailEntityQuery.setPlanDetailsId(task.getDetailInId());
|
||||||
|
// 库位信息
|
||||||
|
WmStorageArea wmStorageArea = wmStorageAreaMapper.selectWmStorageAreaByAreaCode(task.getCellCode());
|
||||||
|
task.setCellX(wmStorageArea.getPositionX().toString());
|
||||||
|
task.setCellY(wmStorageArea.getPositionY().toString());
|
||||||
|
task.setCellZ(wmStorageArea.getPositionZ().toString());
|
||||||
|
|
||||||
List<WmsInPlanDetailEntity> wmsInPlanDetailEntityList = wmsInPlanDetailEntityService.selectWmsInPlanDetailEntityList(wmsInPlanDetailEntityQuery);
|
List<WmsInPlanDetailEntity> wmsInPlanDetailEntityList = wmsInPlanDetailEntityService.selectWmsInPlanDetailEntityList(wmsInPlanDetailEntityQuery);
|
||||||
task.setWmsInPlanDetailEntityList(wmsInPlanDetailEntityList);
|
task.setWmsInPlanDetailEntityList(wmsInPlanDetailEntityList);
|
||||||
wmsInTaskList.add(task);
|
wmsInTaskList.add(task);
|
||||||
|
Loading…
Reference in New Issue
Block a user