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

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

@ -8,6 +8,7 @@ import com.hw.common.log.annotation.Log;
import com.hw.common.log.enums.BusinessType;
import com.hw.common.security.annotation.RequiresPermissions;
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.MesProductPlan;
import com.hw.mes.domain.MesProductPlanDetail;
@ -29,6 +30,10 @@ import java.util.Map;
@RestController
@RequestMapping("/api")
public class MesApiController extends BaseController {
@Autowired
private IMesBaseStationInfoService mesBaseStationInfoService;
@Autowired
private IMesMaterialBomService mesMaterialBomService;
@ -41,6 +46,18 @@ public class MesApiController extends BaseController {
@Autowired
private IMesBaseBarcodeInfoService mesBaseBarcodeInfoService;
/**
*
*/
@GetMapping("/getLoginStationInfo")
public AjaxResult getLoginStationInfo()
{
MesBaseStationInfo loginStationInfo = mesBaseStationInfoService.getLoginStationInfo();
return success(loginStationInfo);
}
/**
* BOM
*/
@ -222,4 +239,19 @@ public class MesApiController extends BaseController {
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
*/
public int deleteMesBaseStationInfoByStationId(Long stationId);
/**
*
*
* @return
*/
public MesBaseStationInfo getLoginStationInfo();
}

@ -1,7 +1,10 @@
package com.hw.mes.service.impl;
import java.util.List;
import com.hw.common.core.exception.ServiceException;
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.mes.api.domain.MesBaseStationInfo;
import org.springframework.beans.factory.annotation.Autowired;
@ -16,8 +19,7 @@ import com.hw.mes.service.IMesBaseStationInfoService;
* @date 2024-01-26
*/
@Service
public class MesBaseStationInfoServiceImpl implements IMesBaseStationInfoService
{
public class MesBaseStationInfoServiceImpl implements IMesBaseStationInfoService {
@Autowired
private MesBaseStationInfoMapper mesBaseStationInfoMapper;
@ -28,8 +30,7 @@ public class MesBaseStationInfoServiceImpl implements IMesBaseStationInfoService
* @return
*/
@Override
public MesBaseStationInfo selectMesBaseStationInfoByStationId(Long stationId)
{
public MesBaseStationInfo selectMesBaseStationInfoByStationId(Long stationId) {
return mesBaseStationInfoMapper.selectMesBaseStationInfoByStationId(stationId);
}
@ -40,8 +41,7 @@ public class MesBaseStationInfoServiceImpl implements IMesBaseStationInfoService
* @return
*/
@Override
public List<MesBaseStationInfo> selectMesBaseStationInfoList(MesBaseStationInfo mesBaseStationInfo)
{
public List<MesBaseStationInfo> selectMesBaseStationInfoList(MesBaseStationInfo mesBaseStationInfo) {
return mesBaseStationInfoMapper.selectMesBaseStationInfoList(mesBaseStationInfo);
}
@ -52,8 +52,7 @@ public class MesBaseStationInfoServiceImpl implements IMesBaseStationInfoService
* @return
*/
@Override
public int insertMesBaseStationInfo(MesBaseStationInfo mesBaseStationInfo)
{
public int insertMesBaseStationInfo(MesBaseStationInfo mesBaseStationInfo) {
mesBaseStationInfo.setCreateTime(DateUtils.getNowDate());
mesBaseStationInfo.setCreateBy(SecurityUtils.getUsername());
return mesBaseStationInfoMapper.insertMesBaseStationInfo(mesBaseStationInfo);
@ -66,8 +65,7 @@ public class MesBaseStationInfoServiceImpl implements IMesBaseStationInfoService
* @return
*/
@Override
public int updateMesBaseStationInfo(MesBaseStationInfo mesBaseStationInfo)
{
public int updateMesBaseStationInfo(MesBaseStationInfo mesBaseStationInfo) {
mesBaseStationInfo.setUpdateTime(DateUtils.getNowDate());
mesBaseStationInfo.setUpdateBy(SecurityUtils.getUsername());
return mesBaseStationInfoMapper.updateMesBaseStationInfo(mesBaseStationInfo);
@ -80,8 +78,7 @@ public class MesBaseStationInfoServiceImpl implements IMesBaseStationInfoService
* @return
*/
@Override
public int deleteMesBaseStationInfoByStationIds(Long[] stationIds)
{
public int deleteMesBaseStationInfoByStationIds(Long[] stationIds) {
return mesBaseStationInfoMapper.deleteMesBaseStationInfoByStationIds(stationIds);
}
@ -92,8 +89,26 @@ public class MesBaseStationInfoServiceImpl implements IMesBaseStationInfoService
* @return
*/
@Override
public int deleteMesBaseStationInfoByStationId(Long stationId)
{
public int deleteMesBaseStationInfoByStationId(Long 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
@RequestMapping("/wmswarehouse")
public class WmsBaseWarehouseController extends BaseController
{
public class WmsBaseWarehouseController extends BaseController {
@Autowired
private IWmsBaseWarehouseService wmsBaseWarehouseService;
@ -51,8 +50,7 @@ public class WmsBaseWarehouseController extends BaseController
*/
@RequiresPermissions("wms:wmswarehouse:list")
@GetMapping("/list")
public TableDataInfo list(WmsBaseWarehouse wmsBaseWarehouse)
{
public TableDataInfo list(WmsBaseWarehouse wmsBaseWarehouse) {
startPage();
List<WmsBaseWarehouse> list = wmsBaseWarehouseService.selectWmsBaseWarehouseJoinList(wmsBaseWarehouse);
return getDataTable(list);
@ -64,8 +62,7 @@ public class WmsBaseWarehouseController extends BaseController
@RequiresPermissions("wms:wmswarehouse:export")
@Log(title = "仓库管理", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, WmsBaseWarehouse wmsBaseWarehouse)
{
public void export(HttpServletResponse response, WmsBaseWarehouse wmsBaseWarehouse) {
List<WmsBaseWarehouse> list = wmsBaseWarehouseService.selectWmsBaseWarehouseJoinList(wmsBaseWarehouse);
ExcelUtil<WmsBaseWarehouse> util = new ExcelUtil<WmsBaseWarehouse>(WmsBaseWarehouse.class);
util.exportExcel(response, list, "仓库数据");
@ -76,8 +73,7 @@ public class WmsBaseWarehouseController extends BaseController
*/
@RequiresPermissions("wms:wmswarehouse:query")
@GetMapping(value = "/{warehouseId}")
public AjaxResult getInfo(@PathVariable("warehouseId") Long warehouseId)
{
public AjaxResult getInfo(@PathVariable("warehouseId") Long warehouseId) {
return success(wmsBaseWarehouseService.selectWmsBaseWarehouseByWarehouseId(warehouseId));
}
@ -87,8 +83,7 @@ public class WmsBaseWarehouseController extends BaseController
@RequiresPermissions("wms:wmswarehouse:add")
@Log(title = "仓库管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody WmsBaseWarehouse wmsBaseWarehouse)
{
public AjaxResult add(@RequestBody WmsBaseWarehouse wmsBaseWarehouse) {
return toAjax(wmsBaseWarehouseService.insertWmsBaseWarehouse(wmsBaseWarehouse));
}
@ -98,8 +93,7 @@ public class WmsBaseWarehouseController extends BaseController
@RequiresPermissions("wms:wmswarehouse:edit")
@Log(title = "仓库管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody WmsBaseWarehouse wmsBaseWarehouse)
{
public AjaxResult edit(@RequestBody WmsBaseWarehouse wmsBaseWarehouse) {
return toAjax(wmsBaseWarehouseService.updateWmsBaseWarehouse(wmsBaseWarehouse));
}
@ -109,8 +103,7 @@ public class WmsBaseWarehouseController extends BaseController
@RequiresPermissions("wms:wmswarehouse:remove")
@Log(title = "仓库管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{warehouseIds}")
public AjaxResult remove(@PathVariable Long[] warehouseIds)
{
public AjaxResult remove(@PathVariable Long[] warehouseIds) {
//todo:判断是否有引用或者改为状态9
return toAjax(wmsBaseWarehouseService.deleteWmsBaseWarehouseByWarehouseIds(warehouseIds));
}
@ -121,8 +114,7 @@ public class WmsBaseWarehouseController extends BaseController
*/
@RequiresPermissions("wms:wmswarehouse:list")
@GetMapping("/getWarehouseCategories")
public AjaxResult getWarehouseCategories(WmsBaseCategory wmsBaseCategory)
{
public AjaxResult getWarehouseCategories(WmsBaseCategory wmsBaseCategory) {
List<WmsBaseCategory> list = wmsBaseCategoryService.selectWmsBaseCategoryList(wmsBaseCategory);
return success(list);
}
@ -132,8 +124,7 @@ public class WmsBaseWarehouseController extends BaseController
*/
@RequiresPermissions("wms:wmswarehouse:materialallocate")
@GetMapping("/selectWmsWarehouseMaterialList")
public TableDataInfo selectWmsWarehouseMaterialList(WmsWarehouseMaterial wmsWarehouseMaterial)
{
public TableDataInfo selectWmsWarehouseMaterialList(WmsWarehouseMaterial wmsWarehouseMaterial) {
startPage();
List<WmsWarehouseMaterial> warehouseMaterials = wmsWarehouseMaterialService.selectWmsWarehouseMaterialJoinList(wmsWarehouseMaterial);
return getDataTable(warehouseMaterials);
@ -145,9 +136,8 @@ public class WmsBaseWarehouseController extends BaseController
@RequiresPermissions("wms:wmswarehouse:materialallocate")
@Log(title = "仓库管理", businessType = BusinessType.ALLOCATE)
@PutMapping("/allocateMaterials")
public AjaxResult allocateMaterials(Long warehouseId, Long[] materialIds)
{
wmsWarehouseMaterialService.batchInsertWarehouseMaterial(warehouseId, materialIds);
public AjaxResult allocateMaterials(Long warehouseId, Integer warehouseFloor, Long[] materialIds) {
wmsWarehouseMaterialService.batchInsertWarehouseMaterial(warehouseId, warehouseFloor, materialIds);
return success();
}
@ -158,8 +148,7 @@ public class WmsBaseWarehouseController extends BaseController
@RequiresPermissions("wms:wmswarehouse:materialallocate")
@Log(title = "仓库管理", businessType = BusinessType.UNALLOCATE)
@PostMapping("/unallocateMaterials")
public AjaxResult unallocateMaterials(Long[] warehouseMaterialIds)
{
public AjaxResult unallocateMaterials(Long[] warehouseMaterialIds) {
return toAjax(wmsWarehouseMaterialService.deleteWmsWarehouseMaterialByWarehouseMaterialIds(warehouseMaterialIds));
}

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

@ -72,7 +72,8 @@ public interface IWmsWarehouseMaterialService
*
*
* @param warehouseId ID
* @param warehouseFloor
* @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();
R<MesBaseBarcodeInfo> baseBarcodeInfoR = remoteMesService.getBarcode(materialBarcode, SecurityConstants.INNER);
if (baseBarcodeInfoR == null) {
throw new ServiceException("物料码有误");
throw new ServiceException("物料码有误");
}
MesBaseBarcodeInfo baseBarcodeInfo = baseBarcodeInfoR.getData();
if (baseBarcodeInfo == null) {
throw new ServiceException("物料码有误");
throw new ServiceException("物料码有误");
}
//判断此柜体是否已跟拆分门板绑定,如果未绑定不允许返库

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

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

@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="WmsWarehouseMaterial" id="WmsWarehouseMaterialResult">
<result property="warehouseMaterialId" column="warehouse_material_id" />
<result property="warehouseId" column="warehouse_id" />
<result property="warehouseFloor" column="warehouse_floor" />
<result property="locationCode" column="location_code" />
<result property="storageType" column="storage_type" />
<result property="storageId" column="storage_id" />
@ -17,7 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<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>
<select id="selectWmsWarehouseMaterialList" parameterType="WmsWarehouseMaterial" resultMap="WmsWarehouseMaterialResult">
@ -35,6 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
insert into wms_warehouse_material
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="warehouseId != null">warehouse_id,</if>
<if test="warehouseFloor != null">warehouse_floor,</if>
<if test="locationCode != null">location_code,</if>
<if test="storageType != null">storage_type,</if>
<if test="storageId != null">storage_id,</if>
@ -43,6 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="warehouseId != null">#{warehouseId},</if>
<if test="warehouseFloor != null">#{warehouseFloor},</if>
<if test="locationCode != null">#{locationCode},</if>
<if test="storageType != null">#{storageType},</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 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
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>
@ -87,9 +90,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<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=",">
(#{item.warehouseId},#{item.storageType},#{item.storageId},#{item.createTime},#{item.createBy})
(#{item.warehouseId},#{item.warehouseFloor},#{item.storageType},#{item.storageId},#{item.createTime},#{item.createBy})
</foreach>
</insert>

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

@ -212,6 +212,7 @@ export default {
this.materialQueryParams.warehouseId = warehouseId;
this.warehouseInfoForm.warehouseCode = this.$route.query && this.$route.query.warehouseCode;
this.warehouseInfoForm.warehouseName = this.$route.query && this.$route.query.warehouseName;
this.warehouseInfoForm.warehouseFloor = this.$route.query && this.$route.query.warehouseFloor;
this.getAllocateMaterialList();
this.getMaterialList();
@ -293,8 +294,9 @@ export default {
submitForm() {
this.allocateMaterialBtnDisable = true;
const warehouseId = this.allocateMaterialQueryParams.warehouseId;
const warehouseFloor = this.warehouseInfoForm.warehouseFloor;
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.getAllocateMaterialList();
this.getMaterialList();

@ -738,7 +738,8 @@ export default {
const warehouseId = row.warehouseId;
const warehouseName = row.warehouseName;
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);
},

Loading…
Cancel
Save