wms:
仓库可存储物料保存仓库楼层信息
车间mes:
申请领料获取工位信息
master
xs 1 year ago
parent 972b968753
commit 3703e3bbbb

@ -47,7 +47,7 @@ public class MesBaseStationInfo extends BaseEntity {
* *
*/ */
@Excel(name = "楼层") @Excel(name = "楼层")
private Long floor; private Integer floor;
/** /**
* *
@ -103,11 +103,11 @@ public class MesBaseStationInfo extends BaseEntity {
return processId; return processId;
} }
public void setFloor(Long floor) { public void setFloor(Integer floor) {
this.floor = floor; this.floor = floor;
} }
public Long getFloor() { public Integer getFloor() {
return floor; return floor;
} }

@ -8,6 +8,7 @@ import com.hw.common.log.annotation.Log;
import com.hw.common.log.enums.BusinessType; import com.hw.common.log.enums.BusinessType;
import com.hw.common.security.annotation.RequiresPermissions; import com.hw.common.security.annotation.RequiresPermissions;
import com.hw.common.security.utils.SecurityUtils; import com.hw.common.security.utils.SecurityUtils;
import com.hw.mes.api.domain.MesBaseStationInfo;
import com.hw.mes.domain.MesMaterialBom; import com.hw.mes.domain.MesMaterialBom;
import com.hw.mes.domain.MesProductPlan; import com.hw.mes.domain.MesProductPlan;
import com.hw.mes.domain.MesProductPlanDetail; import com.hw.mes.domain.MesProductPlanDetail;
@ -29,6 +30,10 @@ import java.util.Map;
@RestController @RestController
@RequestMapping("/api") @RequestMapping("/api")
public class MesApiController extends BaseController { public class MesApiController extends BaseController {
@Autowired
private IMesBaseStationInfoService mesBaseStationInfoService;
@Autowired @Autowired
private IMesMaterialBomService mesMaterialBomService; private IMesMaterialBomService mesMaterialBomService;
@ -41,6 +46,18 @@ public class MesApiController extends BaseController {
@Autowired @Autowired
private IMesBaseBarcodeInfoService mesBaseBarcodeInfoService; private IMesBaseBarcodeInfoService mesBaseBarcodeInfoService;
/**
*
*/
@GetMapping("/getLoginStationInfo")
public AjaxResult getLoginStationInfo()
{
MesBaseStationInfo loginStationInfo = mesBaseStationInfoService.getLoginStationInfo();
return success(loginStationInfo);
}
/** /**
* BOM * BOM
*/ */
@ -222,4 +239,19 @@ public class MesApiController extends BaseController {
return getDataTable(productPlanService.selectMaterialInstallationCircumstance(hashMap)); return getDataTable(productPlanService.selectMaterialInstallationCircumstance(hashMap));
} }
/**
*
*/
@Log(title = "领料", businessType = BusinessType.COMPLETE)
@PostMapping(("/completeCollectMaterials"))
public AjaxResult completeCollectMaterials() {
//todo
/*http://IP:5001/wcs/RecieveRcs/agvComplete 装配区背负式Agv通知任务完成
{
"endStationCode": "string",//工位
}*/
return null;
}
} }

@ -108,8 +108,6 @@ public class MesBaseStationInfoController extends BaseController
} }
/** /**
* *
*/ */

@ -59,4 +59,13 @@ public interface IMesBaseStationInfoService
* @return * @return
*/ */
public int deleteMesBaseStationInfoByStationId(Long stationId); public int deleteMesBaseStationInfoByStationId(Long stationId);
/**
*
*
* @return
*/
public MesBaseStationInfo getLoginStationInfo();
} }

@ -1,7 +1,10 @@
package com.hw.mes.service.impl; package com.hw.mes.service.impl;
import java.util.List; import java.util.List;
import com.hw.common.core.exception.ServiceException;
import com.hw.common.core.utils.DateUtils; import com.hw.common.core.utils.DateUtils;
import com.hw.common.core.utils.ip.IpUtils;
import com.hw.common.security.utils.SecurityUtils; import com.hw.common.security.utils.SecurityUtils;
import com.hw.mes.api.domain.MesBaseStationInfo; import com.hw.mes.api.domain.MesBaseStationInfo;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -16,8 +19,7 @@ import com.hw.mes.service.IMesBaseStationInfoService;
* @date 2024-01-26 * @date 2024-01-26
*/ */
@Service @Service
public class MesBaseStationInfoServiceImpl implements IMesBaseStationInfoService public class MesBaseStationInfoServiceImpl implements IMesBaseStationInfoService {
{
@Autowired @Autowired
private MesBaseStationInfoMapper mesBaseStationInfoMapper; private MesBaseStationInfoMapper mesBaseStationInfoMapper;
@ -28,8 +30,7 @@ public class MesBaseStationInfoServiceImpl implements IMesBaseStationInfoService
* @return * @return
*/ */
@Override @Override
public MesBaseStationInfo selectMesBaseStationInfoByStationId(Long stationId) public MesBaseStationInfo selectMesBaseStationInfoByStationId(Long stationId) {
{
return mesBaseStationInfoMapper.selectMesBaseStationInfoByStationId(stationId); return mesBaseStationInfoMapper.selectMesBaseStationInfoByStationId(stationId);
} }
@ -40,8 +41,7 @@ public class MesBaseStationInfoServiceImpl implements IMesBaseStationInfoService
* @return * @return
*/ */
@Override @Override
public List<MesBaseStationInfo> selectMesBaseStationInfoList(MesBaseStationInfo mesBaseStationInfo) public List<MesBaseStationInfo> selectMesBaseStationInfoList(MesBaseStationInfo mesBaseStationInfo) {
{
return mesBaseStationInfoMapper.selectMesBaseStationInfoList(mesBaseStationInfo); return mesBaseStationInfoMapper.selectMesBaseStationInfoList(mesBaseStationInfo);
} }
@ -52,8 +52,7 @@ public class MesBaseStationInfoServiceImpl implements IMesBaseStationInfoService
* @return * @return
*/ */
@Override @Override
public int insertMesBaseStationInfo(MesBaseStationInfo mesBaseStationInfo) public int insertMesBaseStationInfo(MesBaseStationInfo mesBaseStationInfo) {
{
mesBaseStationInfo.setCreateTime(DateUtils.getNowDate()); mesBaseStationInfo.setCreateTime(DateUtils.getNowDate());
mesBaseStationInfo.setCreateBy(SecurityUtils.getUsername()); mesBaseStationInfo.setCreateBy(SecurityUtils.getUsername());
return mesBaseStationInfoMapper.insertMesBaseStationInfo(mesBaseStationInfo); return mesBaseStationInfoMapper.insertMesBaseStationInfo(mesBaseStationInfo);
@ -66,8 +65,7 @@ public class MesBaseStationInfoServiceImpl implements IMesBaseStationInfoService
* @return * @return
*/ */
@Override @Override
public int updateMesBaseStationInfo(MesBaseStationInfo mesBaseStationInfo) public int updateMesBaseStationInfo(MesBaseStationInfo mesBaseStationInfo) {
{
mesBaseStationInfo.setUpdateTime(DateUtils.getNowDate()); mesBaseStationInfo.setUpdateTime(DateUtils.getNowDate());
mesBaseStationInfo.setUpdateBy(SecurityUtils.getUsername()); mesBaseStationInfo.setUpdateBy(SecurityUtils.getUsername());
return mesBaseStationInfoMapper.updateMesBaseStationInfo(mesBaseStationInfo); return mesBaseStationInfoMapper.updateMesBaseStationInfo(mesBaseStationInfo);
@ -80,8 +78,7 @@ public class MesBaseStationInfoServiceImpl implements IMesBaseStationInfoService
* @return * @return
*/ */
@Override @Override
public int deleteMesBaseStationInfoByStationIds(Long[] stationIds) public int deleteMesBaseStationInfoByStationIds(Long[] stationIds) {
{
return mesBaseStationInfoMapper.deleteMesBaseStationInfoByStationIds(stationIds); return mesBaseStationInfoMapper.deleteMesBaseStationInfoByStationIds(stationIds);
} }
@ -92,8 +89,26 @@ public class MesBaseStationInfoServiceImpl implements IMesBaseStationInfoService
* @return * @return
*/ */
@Override @Override
public int deleteMesBaseStationInfoByStationId(Long stationId) public int deleteMesBaseStationInfoByStationId(Long stationId) {
{
return mesBaseStationInfoMapper.deleteMesBaseStationInfoByStationId(stationId); return mesBaseStationInfoMapper.deleteMesBaseStationInfoByStationId(stationId);
} }
/**
*
*
* @return
*/
@Override
public MesBaseStationInfo getLoginStationInfo() {
String ipAddress = SecurityUtils.getLoginUser().getIpaddr();
ipAddress = "192.168.2.20";//TODO:正式时需要删除
MesBaseStationInfo mesBaseStationInfo = mesBaseStationInfoMapper.selectMesBaseStationInfoByStationIp(ipAddress);
Integer processFloor = SecurityUtils.getProcessFloor();
if (mesBaseStationInfo != null && mesBaseStationInfo.getFloor() != null && !mesBaseStationInfo.getFloor().equals(processFloor)) {
throw new ServiceException("请在" + processFloor + "楼登录此工序");
}
return mesBaseStationInfo;
}
} }

@ -35,8 +35,7 @@ import com.hw.common.core.web.page.TableDataInfo;
*/ */
@RestController @RestController
@RequestMapping("/wmswarehouse") @RequestMapping("/wmswarehouse")
public class WmsBaseWarehouseController extends BaseController public class WmsBaseWarehouseController extends BaseController {
{
@Autowired @Autowired
private IWmsBaseWarehouseService wmsBaseWarehouseService; private IWmsBaseWarehouseService wmsBaseWarehouseService;
@ -51,8 +50,7 @@ public class WmsBaseWarehouseController extends BaseController
*/ */
@RequiresPermissions("wms:wmswarehouse:list") @RequiresPermissions("wms:wmswarehouse:list")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(WmsBaseWarehouse wmsBaseWarehouse) public TableDataInfo list(WmsBaseWarehouse wmsBaseWarehouse) {
{
startPage(); startPage();
List<WmsBaseWarehouse> list = wmsBaseWarehouseService.selectWmsBaseWarehouseJoinList(wmsBaseWarehouse); List<WmsBaseWarehouse> list = wmsBaseWarehouseService.selectWmsBaseWarehouseJoinList(wmsBaseWarehouse);
return getDataTable(list); return getDataTable(list);
@ -64,8 +62,7 @@ public class WmsBaseWarehouseController extends BaseController
@RequiresPermissions("wms:wmswarehouse:export") @RequiresPermissions("wms:wmswarehouse:export")
@Log(title = "仓库管理", businessType = BusinessType.EXPORT) @Log(title = "仓库管理", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, WmsBaseWarehouse wmsBaseWarehouse) public void export(HttpServletResponse response, WmsBaseWarehouse wmsBaseWarehouse) {
{
List<WmsBaseWarehouse> list = wmsBaseWarehouseService.selectWmsBaseWarehouseJoinList(wmsBaseWarehouse); List<WmsBaseWarehouse> list = wmsBaseWarehouseService.selectWmsBaseWarehouseJoinList(wmsBaseWarehouse);
ExcelUtil<WmsBaseWarehouse> util = new ExcelUtil<WmsBaseWarehouse>(WmsBaseWarehouse.class); ExcelUtil<WmsBaseWarehouse> util = new ExcelUtil<WmsBaseWarehouse>(WmsBaseWarehouse.class);
util.exportExcel(response, list, "仓库数据"); util.exportExcel(response, list, "仓库数据");
@ -76,8 +73,7 @@ public class WmsBaseWarehouseController extends BaseController
*/ */
@RequiresPermissions("wms:wmswarehouse:query") @RequiresPermissions("wms:wmswarehouse:query")
@GetMapping(value = "/{warehouseId}") @GetMapping(value = "/{warehouseId}")
public AjaxResult getInfo(@PathVariable("warehouseId") Long warehouseId) public AjaxResult getInfo(@PathVariable("warehouseId") Long warehouseId) {
{
return success(wmsBaseWarehouseService.selectWmsBaseWarehouseByWarehouseId(warehouseId)); return success(wmsBaseWarehouseService.selectWmsBaseWarehouseByWarehouseId(warehouseId));
} }
@ -87,8 +83,7 @@ public class WmsBaseWarehouseController extends BaseController
@RequiresPermissions("wms:wmswarehouse:add") @RequiresPermissions("wms:wmswarehouse:add")
@Log(title = "仓库管理", businessType = BusinessType.INSERT) @Log(title = "仓库管理", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody WmsBaseWarehouse wmsBaseWarehouse) public AjaxResult add(@RequestBody WmsBaseWarehouse wmsBaseWarehouse) {
{
return toAjax(wmsBaseWarehouseService.insertWmsBaseWarehouse(wmsBaseWarehouse)); return toAjax(wmsBaseWarehouseService.insertWmsBaseWarehouse(wmsBaseWarehouse));
} }
@ -98,8 +93,7 @@ public class WmsBaseWarehouseController extends BaseController
@RequiresPermissions("wms:wmswarehouse:edit") @RequiresPermissions("wms:wmswarehouse:edit")
@Log(title = "仓库管理", businessType = BusinessType.UPDATE) @Log(title = "仓库管理", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody WmsBaseWarehouse wmsBaseWarehouse) public AjaxResult edit(@RequestBody WmsBaseWarehouse wmsBaseWarehouse) {
{
return toAjax(wmsBaseWarehouseService.updateWmsBaseWarehouse(wmsBaseWarehouse)); return toAjax(wmsBaseWarehouseService.updateWmsBaseWarehouse(wmsBaseWarehouse));
} }
@ -109,8 +103,7 @@ public class WmsBaseWarehouseController extends BaseController
@RequiresPermissions("wms:wmswarehouse:remove") @RequiresPermissions("wms:wmswarehouse:remove")
@Log(title = "仓库管理", businessType = BusinessType.DELETE) @Log(title = "仓库管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{warehouseIds}") @DeleteMapping("/{warehouseIds}")
public AjaxResult remove(@PathVariable Long[] warehouseIds) public AjaxResult remove(@PathVariable Long[] warehouseIds) {
{
//todo:判断是否有引用或者改为状态9 //todo:判断是否有引用或者改为状态9
return toAjax(wmsBaseWarehouseService.deleteWmsBaseWarehouseByWarehouseIds(warehouseIds)); return toAjax(wmsBaseWarehouseService.deleteWmsBaseWarehouseByWarehouseIds(warehouseIds));
} }
@ -121,8 +114,7 @@ public class WmsBaseWarehouseController extends BaseController
*/ */
@RequiresPermissions("wms:wmswarehouse:list") @RequiresPermissions("wms:wmswarehouse:list")
@GetMapping("/getWarehouseCategories") @GetMapping("/getWarehouseCategories")
public AjaxResult getWarehouseCategories(WmsBaseCategory wmsBaseCategory) public AjaxResult getWarehouseCategories(WmsBaseCategory wmsBaseCategory) {
{
List<WmsBaseCategory> list = wmsBaseCategoryService.selectWmsBaseCategoryList(wmsBaseCategory); List<WmsBaseCategory> list = wmsBaseCategoryService.selectWmsBaseCategoryList(wmsBaseCategory);
return success(list); return success(list);
} }
@ -132,8 +124,7 @@ public class WmsBaseWarehouseController extends BaseController
*/ */
@RequiresPermissions("wms:wmswarehouse:materialallocate") @RequiresPermissions("wms:wmswarehouse:materialallocate")
@GetMapping("/selectWmsWarehouseMaterialList") @GetMapping("/selectWmsWarehouseMaterialList")
public TableDataInfo selectWmsWarehouseMaterialList(WmsWarehouseMaterial wmsWarehouseMaterial) public TableDataInfo selectWmsWarehouseMaterialList(WmsWarehouseMaterial wmsWarehouseMaterial) {
{
startPage(); startPage();
List<WmsWarehouseMaterial> warehouseMaterials = wmsWarehouseMaterialService.selectWmsWarehouseMaterialJoinList(wmsWarehouseMaterial); List<WmsWarehouseMaterial> warehouseMaterials = wmsWarehouseMaterialService.selectWmsWarehouseMaterialJoinList(wmsWarehouseMaterial);
return getDataTable(warehouseMaterials); return getDataTable(warehouseMaterials);
@ -145,9 +136,8 @@ public class WmsBaseWarehouseController extends BaseController
@RequiresPermissions("wms:wmswarehouse:materialallocate") @RequiresPermissions("wms:wmswarehouse:materialallocate")
@Log(title = "仓库管理", businessType = BusinessType.ALLOCATE) @Log(title = "仓库管理", businessType = BusinessType.ALLOCATE)
@PutMapping("/allocateMaterials") @PutMapping("/allocateMaterials")
public AjaxResult allocateMaterials(Long warehouseId, Long[] materialIds) public AjaxResult allocateMaterials(Long warehouseId, Integer warehouseFloor, Long[] materialIds) {
{ wmsWarehouseMaterialService.batchInsertWarehouseMaterial(warehouseId, warehouseFloor, materialIds);
wmsWarehouseMaterialService.batchInsertWarehouseMaterial(warehouseId, materialIds);
return success(); return success();
} }
@ -158,8 +148,7 @@ public class WmsBaseWarehouseController extends BaseController
@RequiresPermissions("wms:wmswarehouse:materialallocate") @RequiresPermissions("wms:wmswarehouse:materialallocate")
@Log(title = "仓库管理", businessType = BusinessType.UNALLOCATE) @Log(title = "仓库管理", businessType = BusinessType.UNALLOCATE)
@PostMapping("/unallocateMaterials") @PostMapping("/unallocateMaterials")
public AjaxResult unallocateMaterials(Long[] warehouseMaterialIds) public AjaxResult unallocateMaterials(Long[] warehouseMaterialIds) {
{
return toAjax(wmsWarehouseMaterialService.deleteWmsWarehouseMaterialByWarehouseMaterialIds(warehouseMaterialIds)); return toAjax(wmsWarehouseMaterialService.deleteWmsWarehouseMaterialByWarehouseMaterialIds(warehouseMaterialIds));
} }

@ -20,6 +20,8 @@ public class WmsWarehouseMaterial extends BaseEntity
/** 仓库ID */ /** 仓库ID */
private Long warehouseId; private Long warehouseId;
private Integer warehouseFloor;
/** 库位编码;单独需要针对库位设置的,后续扩展使用 */ /** 库位编码;单独需要针对库位设置的,后续扩展使用 */
private String locationCode; private String locationCode;
@ -50,6 +52,15 @@ public class WmsWarehouseMaterial extends BaseEntity
{ {
return warehouseId; return warehouseId;
} }
public Integer getWarehouseFloor() {
return warehouseFloor;
}
public void setWarehouseFloor(Integer warehouseFloor) {
this.warehouseFloor = warehouseFloor;
}
public void setLocationCode(String locationCode) public void setLocationCode(String locationCode)
{ {
this.locationCode = locationCode; this.locationCode = locationCode;

@ -72,7 +72,8 @@ public interface IWmsWarehouseMaterialService
* *
* *
* @param warehouseId ID * @param warehouseId ID
* @param warehouseFloor
* @param materialIds * @param materialIds
*/ */
public void batchInsertWarehouseMaterial(Long warehouseId, Long[] materialIds); public void batchInsertWarehouseMaterial(Long warehouseId, Integer warehouseFloor, Long[] materialIds);
} }

@ -260,11 +260,11 @@ public class WmsRawInstockServiceImpl implements IWmsRawInstockService {
String materialBarcode = wmsRawBackVo.getMaterialBarcode(); String materialBarcode = wmsRawBackVo.getMaterialBarcode();
R<MesBaseBarcodeInfo> baseBarcodeInfoR = remoteMesService.getBarcode(materialBarcode, SecurityConstants.INNER); R<MesBaseBarcodeInfo> baseBarcodeInfoR = remoteMesService.getBarcode(materialBarcode, SecurityConstants.INNER);
if (baseBarcodeInfoR == null) { if (baseBarcodeInfoR == null) {
throw new ServiceException("物料码有误"); throw new ServiceException("物料码有误");
} }
MesBaseBarcodeInfo baseBarcodeInfo = baseBarcodeInfoR.getData(); MesBaseBarcodeInfo baseBarcodeInfo = baseBarcodeInfoR.getData();
if (baseBarcodeInfo == null) { if (baseBarcodeInfo == null) {
throw new ServiceException("物料码有误"); throw new ServiceException("物料码有误");
} }
//判断此柜体是否已跟拆分门板绑定,如果未绑定不允许返库 //判断此柜体是否已跟拆分门板绑定,如果未绑定不允许返库

@ -538,8 +538,8 @@ public class WmsRawOutstockServiceImpl implements IWmsRawOutstockService {
wmsStockTotal.setUpdateBy(userName); wmsStockTotal.setUpdateBy(userName);
wmsStockTotalMapper.updateWmsStockTotal(wmsStockTotal); wmsStockTotalMapper.updateWmsStockTotal(wmsStockTotal);
WmsRawOutstock toInsertedRawOutstock = getWmsRawOutstock(baseWarehouse, planCode, planDetailCode, WmsRawOutstock toInsertedRawOutstock = getWmsRawOutstock(baseWarehouse, wmsRawOutstock,
rawOutstockDetail.getMaterialId(), taskCode, taskType, wmsRawOutstock.getApplyReason(), rawOutstockDetail.getMaterialId(), taskCode, taskType,
planAmount, currentDate, userName, wmsStockTotal.getStockTotalId()); planAmount, currentDate, userName, wmsStockTotal.getStockTotalId());
toInsertedRawOutstocks.add(toInsertedRawOutstock); toInsertedRawOutstocks.add(toInsertedRawOutstock);
@ -562,8 +562,7 @@ public class WmsRawOutstockServiceImpl implements IWmsRawOutstockService {
* *
* *
* @param baseWarehouse * @param baseWarehouse
* @param planCode * @param wmsRawOutstockParam
* @param planDetailCode
* @param materialId * @param materialId
* @param taskCode * @param taskCode
* @param planAmount * @param planAmount
@ -571,8 +570,8 @@ public class WmsRawOutstockServiceImpl implements IWmsRawOutstockService {
* @param userName * @param userName
* @return * @return
*/ */
private WmsRawOutstock getWmsRawOutstock(WmsBaseWarehouse baseWarehouse, private WmsRawOutstock getWmsRawOutstock(WmsBaseWarehouse baseWarehouse, WmsRawOutstock wmsRawOutstockParam,
String planCode, String planDetailCode, Long materialId, String taskCode, String taskType, String applyReason, Long materialId, String taskCode, String taskType,
BigDecimal planAmount, Date currentDate, String userName, Long stockTotalId) { BigDecimal planAmount, Date currentDate, String userName, Long stockTotalId) {
//出库要求 0申请出库1申请审核出库2直接出库 //出库要求 0申请出库1申请审核出库2直接出库
String outRequirement = baseWarehouse.getOutRequirement(); String outRequirement = baseWarehouse.getOutRequirement();
@ -596,18 +595,18 @@ public class WmsRawOutstockServiceImpl implements IWmsRawOutstockService {
toInsertedRawOutstock.setTaskCode(taskCode); toInsertedRawOutstock.setTaskCode(taskCode);
toInsertedRawOutstock.setWarehouseId(baseWarehouse.getWarehouseId()); toInsertedRawOutstock.setWarehouseId(baseWarehouse.getWarehouseId());
// toInsertedRawOutstock.setLocationCode(wmsRawStock.getLocationCode()); // toInsertedRawOutstock.setLocationCode(wmsRawStock.getLocationCode());
toInsertedRawOutstock.setStationId(SecurityUtils.getStationId()); toInsertedRawOutstock.setStationId(wmsRawOutstockParam.getStationId());
toInsertedRawOutstock.setStockTotalId(stockTotalId); toInsertedRawOutstock.setStockTotalId(stockTotalId);
// toInsertedRawOutstock.setPalletInfoCode(wmsRawStock.getPalletInfoCode()); // toInsertedRawOutstock.setPalletInfoCode(wmsRawStock.getPalletInfoCode());
toInsertedRawOutstock.setOperationType(operationType); toInsertedRawOutstock.setOperationType(operationType);
toInsertedRawOutstock.setApplyBy(userName); toInsertedRawOutstock.setApplyBy(userName);
toInsertedRawOutstock.setApplyReason(applyReason); toInsertedRawOutstock.setApplyReason(wmsRawOutstockParam.getApplyReason());
toInsertedRawOutstock.setApplyDate(currentDate); toInsertedRawOutstock.setApplyDate(currentDate);
toInsertedRawOutstock.setEndStationCode(SecurityUtils.getStationCode()); toInsertedRawOutstock.setEndStationCode(wmsRawOutstockParam.getEndStationCode());
toInsertedRawOutstock.setMaterialId(materialId); toInsertedRawOutstock.setMaterialId(materialId);
toInsertedRawOutstock.setOutstockAmount(planAmount); toInsertedRawOutstock.setOutstockAmount(planAmount);
toInsertedRawOutstock.setPlanCode(planCode); toInsertedRawOutstock.setPlanCode(wmsRawOutstockParam.getPlanCode());
toInsertedRawOutstock.setPlanDetailCode(planDetailCode); toInsertedRawOutstock.setPlanDetailCode(wmsRawOutstockParam.getPlanDetailCode());
// toInsertedRawOutstock.setMaterialBatch(wmsRawStock.getInstockBatch());//申请出库时不指定某个物料 // toInsertedRawOutstock.setMaterialBatch(wmsRawStock.getInstockBatch());//申请出库时不指定某个物料
toInsertedRawOutstock.setTaskType(taskType); toInsertedRawOutstock.setTaskType(taskType);
toInsertedRawOutstock.setCreateTime(currentDate); toInsertedRawOutstock.setCreateTime(currentDate);
@ -634,7 +633,7 @@ public class WmsRawOutstockServiceImpl implements IWmsRawOutstockService {
} }
wmsRawOutstock.setTaskCode(Seq.getId(Seq.rawOutstockSeqType, Seq.rawOutstockSeqCode)); wmsRawOutstock.setTaskCode(Seq.getId(Seq.rawOutstockSeqType, Seq.rawOutstockSeqCode));
wmsRawOutstock.setStationId(SecurityUtils.getStationId()); // wmsRawOutstock.setStationId(SecurityUtils.getStationId());
wmsRawOutstock.setOperationType(operationType); wmsRawOutstock.setOperationType(operationType);
wmsRawOutstock.setApplyBy(userName); wmsRawOutstock.setApplyBy(userName);
@ -650,12 +649,12 @@ public class WmsRawOutstockServiceImpl implements IWmsRawOutstockService {
toInsertedRawOutstock.setTaskCode(Seq.getId(Seq.rawOutstockSeqType, Seq.rawOutstockSeqCode)); toInsertedRawOutstock.setTaskCode(Seq.getId(Seq.rawOutstockSeqType, Seq.rawOutstockSeqCode));
toInsertedRawOutstock.setWarehouseId(wmsRawOutstock.getWarehouseId()); toInsertedRawOutstock.setWarehouseId(wmsRawOutstock.getWarehouseId());
toInsertedRawOutstock.setLocationCode(wmsRawOutstockDetail.getLocationCode()); toInsertedRawOutstock.setLocationCode(wmsRawOutstockDetail.getLocationCode());
toInsertedRawOutstock.setStationId(SecurityUtils.getStationId()); // toInsertedRawOutstock.setStationId(SecurityUtils.getStationId());
toInsertedRawOutstock.setPalletInfoCode(wmsRawOutstockDetail.getPalletInfoCode()); toInsertedRawOutstock.setPalletInfoCode(wmsRawOutstockDetail.getPalletInfoCode());
toInsertedRawOutstock.setOperationType(operationType); toInsertedRawOutstock.setOperationType(operationType);
toInsertedRawOutstock.setApplyBy(userName); toInsertedRawOutstock.setApplyBy(userName);
toInsertedRawOutstock.setApplyDate(currentDate); toInsertedRawOutstock.setApplyDate(currentDate);
toInsertedRawOutstock.setEndStationCode(SecurityUtils.getStationCode()); // toInsertedRawOutstock.setEndStationCode(SecurityUtils.getStationCode());
toInsertedRawOutstock.setPlanCode(wmsRawOutstock.getPlanCode()); toInsertedRawOutstock.setPlanCode(wmsRawOutstock.getPlanCode());
toInsertedRawOutstock.setPlanDetailCode(wmsRawOutstock.getPlanDetailCode()); toInsertedRawOutstock.setPlanDetailCode(wmsRawOutstock.getPlanDetailCode());
toInsertedRawOutstock.setMaterialBatch(wmsRawOutstockDetail.getInstockBatch()); toInsertedRawOutstock.setMaterialBatch(wmsRawOutstockDetail.getInstockBatch());
@ -1120,7 +1119,7 @@ public class WmsRawOutstockServiceImpl implements IWmsRawOutstockService {
wmsRawOutstock.setTaskCode(Seq.getId(Seq.rawOutstockSeqType, Seq.rawOutstockSeqCode)); wmsRawOutstock.setTaskCode(Seq.getId(Seq.rawOutstockSeqType, Seq.rawOutstockSeqCode));
wmsRawOutstock.setWarehouseId(baseLocation.getWarehouseId()); wmsRawOutstock.setWarehouseId(baseLocation.getWarehouseId());
wmsRawOutstock.setStationId(SecurityUtils.getStationId()); // wmsRawOutstock.setStationId(SecurityUtils.getStationId());
wmsRawOutstock.setMaterialId(baseBarcodeInfo.getMaterialId()); wmsRawOutstock.setMaterialId(baseBarcodeInfo.getMaterialId());
wmsRawOutstock.setMaterialBatch(baseBarcodeInfo.getBatchCode()); wmsRawOutstock.setMaterialBatch(baseBarcodeInfo.getBatchCode());
wmsRawOutstock.setRealOutstockAmount(outstockAmount); wmsRawOutstock.setRealOutstockAmount(outstockAmount);

@ -108,10 +108,11 @@ public class WmsWarehouseMaterialServiceImpl implements IWmsWarehouseMaterialSer
* *
* *
* @param warehouseId ID * @param warehouseId ID
* @param warehouseFloor
* @param materialIds * @param materialIds
*/ */
@Override @Override
public void batchInsertWarehouseMaterial(Long warehouseId, Long[] materialIds) { public void batchInsertWarehouseMaterial(Long warehouseId, Integer warehouseFloor, Long[] materialIds) {
if (StringUtils.isNotEmpty(materialIds)) { if (StringUtils.isNotEmpty(materialIds)) {
String userName = SecurityUtils.getUsername(); String userName = SecurityUtils.getUsername();
Date currentDate = new Date(); Date currentDate = new Date();
@ -120,6 +121,7 @@ public class WmsWarehouseMaterialServiceImpl implements IWmsWarehouseMaterialSer
for (Long materialId : materialIds) { for (Long materialId : materialIds) {
WmsWarehouseMaterial warehouseMaterial = new WmsWarehouseMaterial(); WmsWarehouseMaterial warehouseMaterial = new WmsWarehouseMaterial();
warehouseMaterial.setWarehouseId(warehouseId); warehouseMaterial.setWarehouseId(warehouseId);
warehouseMaterial.setWarehouseFloor(warehouseFloor);
warehouseMaterial.setStorageType(WmsConstants.WMS_WAREHOUSE_MATERIAL_STORAGE_TYPE_MATERIAL); warehouseMaterial.setStorageType(WmsConstants.WMS_WAREHOUSE_MATERIAL_STORAGE_TYPE_MATERIAL);
warehouseMaterial.setStorageId(materialId); warehouseMaterial.setStorageId(materialId);
warehouseMaterial.setCreateBy(userName); warehouseMaterial.setCreateBy(userName);

@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="WmsWarehouseMaterial" id="WmsWarehouseMaterialResult"> <resultMap type="WmsWarehouseMaterial" id="WmsWarehouseMaterialResult">
<result property="warehouseMaterialId" column="warehouse_material_id" /> <result property="warehouseMaterialId" column="warehouse_material_id" />
<result property="warehouseId" column="warehouse_id" /> <result property="warehouseId" column="warehouse_id" />
<result property="warehouseFloor" column="warehouse_floor" />
<result property="locationCode" column="location_code" /> <result property="locationCode" column="location_code" />
<result property="storageType" column="storage_type" /> <result property="storageType" column="storage_type" />
<result property="storageId" column="storage_id" /> <result property="storageId" column="storage_id" />
@ -17,7 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectWmsWarehouseMaterialVo"> <sql id="selectWmsWarehouseMaterialVo">
select warehouse_id, location_code, storage_type, storage_id, create_time, create_by from wms_warehouse_material select warehouse_id,warehouse_floor, location_code, storage_type, storage_id, create_time, create_by from wms_warehouse_material
</sql> </sql>
<select id="selectWmsWarehouseMaterialList" parameterType="WmsWarehouseMaterial" resultMap="WmsWarehouseMaterialResult"> <select id="selectWmsWarehouseMaterialList" parameterType="WmsWarehouseMaterial" resultMap="WmsWarehouseMaterialResult">
@ -35,6 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
insert into wms_warehouse_material insert into wms_warehouse_material
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="warehouseId != null">warehouse_id,</if> <if test="warehouseId != null">warehouse_id,</if>
<if test="warehouseFloor != null">warehouse_floor,</if>
<if test="locationCode != null">location_code,</if> <if test="locationCode != null">location_code,</if>
<if test="storageType != null">storage_type,</if> <if test="storageType != null">storage_type,</if>
<if test="storageId != null">storage_id,</if> <if test="storageId != null">storage_id,</if>
@ -43,6 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="warehouseId != null">#{warehouseId},</if> <if test="warehouseId != null">#{warehouseId},</if>
<if test="warehouseFloor != null">#{warehouseFloor},</if>
<if test="locationCode != null">#{locationCode},</if> <if test="locationCode != null">#{locationCode},</if>
<if test="storageType != null">#{storageType},</if> <if test="storageType != null">#{storageType},</if>
<if test="storageId != null">#{storageId},</if> <if test="storageId != null">#{storageId},</if>
@ -78,7 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectWmsWarehouseMaterialJoinList" parameterType="WmsWarehouseMaterial" resultMap="WmsWarehouseMaterialResult"> <select id="selectWmsWarehouseMaterialJoinList" parameterType="WmsWarehouseMaterial" resultMap="WmsWarehouseMaterialResult">
select wwm.warehouse_material_id,wwm.warehouse_id, wwm.location_code, wwm.storage_type, wwm.storage_id, wwm.create_time, wwm.create_by, select wwm.warehouse_material_id,wwm.warehouse_id, wwm.warehouse_floor,wwm.location_code, wwm.storage_type, wwm.storage_id, wwm.create_time, wwm.create_by,
mbm.material_code,mbm.material_name mbm.material_code,mbm.material_name
from wms_warehouse_material wwm left join mes_base_material_info mbm on wwm.storage_id=mbm.material_id and wwm.storage_type='1' from wms_warehouse_material wwm left join mes_base_material_info mbm on wwm.storage_id=mbm.material_id and wwm.storage_type='1'
<where> <where>
@ -87,9 +90,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select> </select>
<insert id="batchInsertWarehouseMaterial"> <insert id="batchInsertWarehouseMaterial">
insert into wms_warehouse_material(warehouse_id, storage_type,storage_id,create_time,create_by) values insert into wms_warehouse_material(warehouse_id,warehouse_floor, storage_type,storage_id,create_time,create_by) values
<foreach item="item" index="index" collection="list" separator=","> <foreach item="item" index="index" collection="list" separator=",">
(#{item.warehouseId},#{item.storageType},#{item.storageId},#{item.createTime},#{item.createBy}) (#{item.warehouseId},#{item.warehouseFloor},#{item.storageType},#{item.storageId},#{item.createTime},#{item.createBy})
</foreach> </foreach>
</insert> </insert>

@ -287,7 +287,7 @@
<el-table-column label="序号" align="center" prop="index"/> <el-table-column label="序号" align="center" prop="index"/>
<el-table-column label="关联人员" align="center" prop="prodlineId"> <el-table-column label="关联人员" align="center" prop="prodlineId">
<template slot-scope="scope"> <template slot-scope="scope">
<el-select v-model="scope.row.userId" filterable placeholder="请选择关联人员" clearable> <el-select v-model="scope.row.userId" filterable placeholder="请选择关联人员" clearable @input="handleSelectUser(scope.row)">
<el-option <el-option
v-for="item in userList" v-for="item in userList"
:key="item.userId" :key="item.userId"
@ -616,7 +616,13 @@ export default {
obj.userName = ""; obj.userName = "";
this.mesBaseProcessUserList.push(obj); this.mesBaseProcessUserList.push(obj);
}, },
//username
handleSelectUser(){
const selected = this.userList.find(option => option.value === newValue);
},
/** 工序关联人员删除按钮操作 */ /** 工序关联人员删除按钮操作 */
handleDeleteMesBaseProcessUser() { handleDeleteMesBaseProcessUser() {
if (this.checkedMesBaseProcessUser.length == 0) { if (this.checkedMesBaseProcessUser.length == 0) {
this.$modal.msgError("请先选择要删除的工序关联人员数据"); this.$modal.msgError("请先选择要删除的工序关联人员数据");

@ -212,6 +212,7 @@ export default {
this.materialQueryParams.warehouseId = warehouseId; this.materialQueryParams.warehouseId = warehouseId;
this.warehouseInfoForm.warehouseCode = this.$route.query && this.$route.query.warehouseCode; this.warehouseInfoForm.warehouseCode = this.$route.query && this.$route.query.warehouseCode;
this.warehouseInfoForm.warehouseName = this.$route.query && this.$route.query.warehouseName; this.warehouseInfoForm.warehouseName = this.$route.query && this.$route.query.warehouseName;
this.warehouseInfoForm.warehouseFloor = this.$route.query && this.$route.query.warehouseFloor;
this.getAllocateMaterialList(); this.getAllocateMaterialList();
this.getMaterialList(); this.getMaterialList();
@ -293,8 +294,9 @@ export default {
submitForm() { submitForm() {
this.allocateMaterialBtnDisable = true; this.allocateMaterialBtnDisable = true;
const warehouseId = this.allocateMaterialQueryParams.warehouseId; const warehouseId = this.allocateMaterialQueryParams.warehouseId;
const warehouseFloor = this.warehouseInfoForm.warehouseFloor;
const materialIds = this.materialIds.join(","); const materialIds = this.materialIds.join(",");
allocateMaterials({ warehouseId: warehouseId, materialIds: materialIds }).then((response) => { allocateMaterials({ warehouseId: warehouseId, warehouseFloor:warehouseFloor, materialIds: materialIds }).then((response) => {
this.$modal.msgSuccess("保存成功"); this.$modal.msgSuccess("保存成功");
this.getAllocateMaterialList(); this.getAllocateMaterialList();
this.getMaterialList(); this.getMaterialList();

@ -738,7 +738,8 @@ export default {
const warehouseId = row.warehouseId; const warehouseId = row.warehouseId;
const warehouseName = row.warehouseName; const warehouseName = row.warehouseName;
const warehouseCode = row.warehouseCode; const warehouseCode = row.warehouseCode;
const params = {warehouseCode:warehouseCode,warehouseName:warehouseName}; const warehouseFloor = row.warehouseFloor;
const params = {warehouseCode:warehouseCode,warehouseName:warehouseName,warehouseFloor:warehouseFloor};
this.$tab.openPage("仓库物料配置[" + warehouseName + "]", '/warehouse/allocateMaterial/index/' + warehouseId, params); this.$tab.openPage("仓库物料配置[" + warehouseName + "]", '/warehouse/allocateMaterial/index/' + warehouseId, params);
}, },

Loading…
Cancel
Save