基础信息仓库库区货位+bom+设备

highway
A0010407 1 year ago
parent bea6dee309
commit 73a3d5ce6d

@ -93,6 +93,14 @@ public class BomComponent extends BaseEntity {
@Excel(name = "预留字段3")
private String attr3;
//虚拟字段
@Excel(name = "组件上层物料名称")
private String componentName;
/** 产品描述 */
@Excel(name = "产品描述")
private String productDescZh;
// private List<BaseBomComponent> children;
//
// public List<BaseBomComponent> getChildren() {
@ -140,6 +148,15 @@ public class BomComponent extends BaseEntity {
public String getProductCode() {
return productCode;
}
public void setProductDescZh(String productDescZh) {
this.productDescZh = productDescZh;
}
public String getProductDescZh() {
return productDescZh;
}
public void setCumc(String cumc) {
this.cumc = cumc;
}
@ -151,6 +168,13 @@ public class BomComponent extends BaseEntity {
this.component = component;
}
public String getComponentName() {
return componentName;
}
public void setComponentName(String componentName) {
this.componentName = componentName;
}
public String getComponent() {
return component;
}
@ -254,7 +278,9 @@ public class BomComponent extends BaseEntity {
.append("bomName", getBomName())
.append("site", getSite())
.append("productCode", getProductCode())
.append("productDescZh", getProductDescZh())
.append("cumc", getCumc())
.append("componentName", getComponentName())
.append("component", getComponent())
.append("bomHierarchy", getBomHierarchy())
.append("projectNo", getProjectNo())

@ -72,7 +72,15 @@ public class BaseLocationController extends BaseController {
@Log(title = "货位管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody BaseLocation baseLocation) {
return toAjax(baseLocationService.insertBaseLocation(baseLocation));
if (baseLocationService.checkCodeUnique(baseLocation)) {
return AjaxResult.error("货位编码已存在!");
}
// else if(baseLocationService.checkNameUnique(baseLocation)){
// return AjaxResult.error("货位描述已存在!");
// }
else{
return toAjax(baseLocationService.insertBaseLocation(baseLocation));
}
}
/**

@ -72,7 +72,13 @@ public class BaseWarehouseController extends BaseController {
@Log(title = "仓库管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody BaseWarehouse baseWarehouse) {
return toAjax(baseWarehouseService.insertBaseWarehouse(baseWarehouse));
if (baseWarehouseService.checkWarehouseCodeUnique(baseWarehouse)) {
return AjaxResult.error("仓库编码已存在!");
}else if(baseWarehouseService.checkWarehouseNameUnique(baseWarehouse)){
return AjaxResult.error("仓库名称已存在!");
}else{
return toAjax(baseWarehouseService.insertBaseWarehouse(baseWarehouse));
}
}
/**

@ -58,4 +58,7 @@ public interface BaseLocationMapper {
* @return
*/
public int deleteBaseLocationByLocationIds(String[] locationIds);
String checkCodeUnique(BaseLocation baseLocation);
// String checkNameUnique(BaseLocation baseLocation);
}

@ -2,6 +2,7 @@ package com.op.wms.mapper;
import java.util.List;
import com.op.wms.domain.BaseEquipment;
import com.op.wms.domain.BaseWarehouse;
/**
@ -60,4 +61,7 @@ public interface BaseWarehouseMapper {
public int deleteBaseWarehouseByWarehouseIds(String[] warehouseIds);
//查询总数
Integer queryCount(BaseWarehouse baseWarehouse);
String checkWarehouseCodeUnique(BaseWarehouse baseWarehouse);
String checkWarehouseNameUnique(BaseWarehouse baseWarehouse);
}

@ -57,4 +57,7 @@ public interface IBaseLocationService {
* @return
*/
public int deleteBaseLocationByLocationId(String locationId);
// boolean checkNameUnique(BaseLocation baseLocation);
boolean checkCodeUnique(BaseLocation baseLocation);
}

@ -57,4 +57,7 @@ public interface IBaseWarehouseService {
* @return
*/
public int deleteBaseWarehouseByWarehouseId(String warehouseId);
boolean checkWarehouseCodeUnique(BaseWarehouse baseWarehouse);
boolean checkWarehouseNameUnique(BaseWarehouse baseWarehouse);
}

@ -5,6 +5,7 @@ import java.util.List;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.op.common.core.utils.DateUtils;
import com.op.common.security.utils.SecurityUtils;
import com.op.wms.domain.BaseProduct;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.op.wms.mapper.BaseLocationMapper;
@ -97,4 +98,36 @@ public class BaseLocationServiceImpl implements IBaseLocationService {
public int deleteBaseLocationByLocationId(String locationId) {
return baseLocationMapper.deleteBaseLocationByLocationId(locationId);
}
/**
*
*
* @return
*/
@Override
@DS("#header.poolName")
public boolean checkCodeUnique(BaseLocation baseLocation) {
String code = baseLocationMapper.checkCodeUnique(baseLocation);
if(code == null){
return false;
}else{
return true;
}
}
/**
*
*
* @return
*/
// @Override
// @DS("#header.poolName")
// public boolean checkNameUnique(BaseLocation baseLocation) {
// String name = baseLocationMapper.checkNameUnique(baseLocation);
// if(name == null){
// return false;
// }else{
// return true;
// }
// }
}

@ -5,6 +5,7 @@ import java.util.List;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.op.common.core.utils.DateUtils;
import com.op.common.security.utils.SecurityUtils;
import com.op.wms.domain.BaseEquipment;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.op.wms.mapper.BaseWarehouseMapper;
@ -100,4 +101,36 @@ public class BaseWarehouseServiceImpl implements IBaseWarehouseService {
public int deleteBaseWarehouseByWarehouseId(String warehouseId) {
return baseWarehouseMapper.deleteBaseWarehouseByWarehouseId(warehouseId);
}
/**
*
*
* @return
*/
@Override
@DS("#header.poolName")
public boolean checkWarehouseCodeUnique(BaseWarehouse baseWarehouse) {
String code = baseWarehouseMapper.checkWarehouseCodeUnique(baseWarehouse);
if(code == null){
return false;
}else{
return true;
}
}
/**
*
*
* @return
*/
@Override
@DS("#header.poolName")
public boolean checkWarehouseNameUnique(BaseWarehouse baseWarehouse) {
String name = baseWarehouseMapper.checkWarehouseNameUnique(baseWarehouse);
if(name == null){
return false;
}else{
return true;
}
}
}

@ -183,9 +183,9 @@
</select>
<select id="getWorkCenterName" parameterType="BaseEquipment" resultType="java.lang.String">
select factoryName
select factory_name
from sys_factory
where factoryCode = #{workshopCode}
where factory_code = #{workshopCode}
</select>
</mapper>

@ -67,7 +67,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectBaseLocationList" parameterType="BaseLocation" resultMap="BaseLocationResult">
<include refid="selectBaseLocationVo"/>
<where>
<if test="locationCode != null and locationCode != ''"> and location_code = #{locationCode}</if>
<if test="locationCode != null and locationCode != ''"> and location_code like concat('%', #{locationCode}, '%')</if>
<if test="shelfOrder != null and shelfOrder != ''"> and shelf_order = #{shelfOrder}</if>
<if test="checkOrder != null and checkOrder != ''"> and check_order = #{checkOrder}</if>
<if test="pickOrder != null and pickOrder != ''"> and pick_order = #{pickOrder}</if>
@ -79,9 +79,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="locationAttr != null and locationAttr != ''"> and location_attr = #{locationAttr}</if>
<if test="turnDemand != null and turnDemand != ''"> and turn_demand = #{turnDemand}</if>
<if test="stockEnv != null and stockEnv != ''"> and stock_env = #{stockEnv}</if>
<if test="warehouseCode != null and warehouseCode != ''"> and warehouse_code = #{warehouseCode}</if>
<if test="warehouseCode != null and warehouseCode != ''"> and warehouse_code like concat('%', #{warehouseCode}, '%')</if>
<if test="regionCode != null and regionCode != ''"> and region_code = #{regionCode}</if>
<if test="areaCode != null and areaCode != ''"> and area_code = #{areaCode}</if>
<if test="areaCode != null and areaCode != ''"> and area_code like concat('%', #{areaCode}, '%')</if>
<if test="checkCode != null and checkCode != ''"> and check_code = #{checkCode}</if>
<if test="workArea != null and workArea != ''"> and work_area = #{workArea}</if>
<if test="port1 != null and port1 != ''"> and port1 = #{port1}</if>
@ -305,4 +305,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{locationId}
</foreach>
</delete>
<select id="checkCodeUnique" parameterType="BaseLocation" resultType ="java.lang.String">
select location_code
from base_location
where location_code = #{locationCode}
</select>
</mapper>

@ -33,8 +33,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectBaseWarehouseList" parameterType="BaseWarehouse" resultMap="BaseWarehouseResult">
<include refid="selectBaseWarehouseVo"/>
<where>
<if test="warehouseType != null and warehouseType != ''"> and warehouse_type = #{warehouseType}</if>
<if test="warehouseCode != null and warehouseCode != ''"> and warehouse_code = #{warehouseCode}</if>
<if test="warehouseType != null and warehouseType != ''"> and warehouse_type like concat('%', #{warehouseType}, '%')</if>
<if test="warehouseCode != null and warehouseCode != ''"> and warehouse_code like concat('%', #{warehouseCode}, '%')</if>
<if test="warehouseName != null and warehouseName != ''"> and warehouse_name like concat('%', #{warehouseName}, '%')</if>
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
<if test="factoryName != null and factoryName != ''"> and factory_name like concat('%', #{factoryName}, '%')</if>
@ -141,4 +141,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from base_warehouse
</select>
<select id="checkWarehouseNameUnique" parameterType="BaseWarehouse" resultType ="java.lang.String">
select warehouse_name
from base_warehouse
where warehouse_name = #{warehouseName}
</select>
<select id="checkWarehouseCodeUnique" parameterType="BaseWarehouse" resultType ="java.lang.String">
select warehouse_code
from base_warehouse
where warehouse_code = #{warehouseCode}
</select>
</mapper>
Loading…
Cancel
Save