库存冻结功能

This commit is contained in:
yinjinlu-pc\尹金路 2024-09-08 09:58:54 +08:00
parent 902814c027
commit 4d4f91ccaa
14 changed files with 154 additions and 25 deletions

View File

@ -100,6 +100,8 @@ create table wm_transaction (
area_id bigint(20) comment '库位ID', area_id bigint(20) comment '库位ID',
area_code varchar(64) comment '库位编码', area_code varchar(64) comment '库位编码',
area_name varchar(255) comment '库位名称', area_name varchar(255) comment '库位名称',
pakcage_id bigint(20) comment '容器ID',
package_code varchar(64) comment '容器编号',
vendor_id bigint(20) comment '供应商ID', vendor_id bigint(20) comment '供应商ID',
vendor_code varchar(64) comment '供应商编号', vendor_code varchar(64) comment '供应商编号',
vendor_name varchar(255) comment '供应商名称', vendor_name varchar(255) comment '供应商名称',
@ -143,7 +145,17 @@ create table wm_material_stock (
item_name varchar(255) comment '产品物料名称', item_name varchar(255) comment '产品物料名称',
specification varchar(500) comment '规格型号', specification varchar(500) comment '规格型号',
unit_of_measure varchar(64) comment '单位', unit_of_measure varchar(64) comment '单位',
batch_code varchar(255) comment '入库批次号', batch_code varchar(255) comment '批次号',
workorder_id bigint(20) comment '生产工单ID',
workorder_code varchar(64) comment '生产工单编号',
vendor_id bigint(20) comment '供应商ID',
vendor_code varchar(64) comment '供应商编号',
vendor_name varchar(255) comment '供应商名称',
vendor_nick varchar(64) comment '供应商简称',
client_id bigint(20) comment '客户ID',
client_code varchar(64) comment '客户编码',
client_name varchar(255) comment '客户名称',
client_nick varchar(255) comment '客户简称',
warehouse_id bigint(20) not null comment '仓库ID', warehouse_id bigint(20) not null comment '仓库ID',
warehouse_code varchar(64) comment '仓库编码', warehouse_code varchar(64) comment '仓库编码',
warehouse_name varchar(255) comment '仓库名称', warehouse_name varchar(255) comment '仓库名称',
@ -153,15 +165,13 @@ create table wm_material_stock (
area_id bigint(20) comment '库位ID', area_id bigint(20) comment '库位ID',
area_code varchar(64) comment '库位编码', area_code varchar(64) comment '库位编码',
area_name varchar(255) comment '库位名称', area_name varchar(255) comment '库位名称',
vendor_id bigint(20) comment '供应商ID', package_id bigint(20) comment '容器ID',
vendor_code varchar(64) comment '供应商编号', package_code varchar(64) comment '容器编号',
vendor_name varchar(255) comment '供应商名称',
vendor_nick varchar(64) comment '供应商简称',
quantity_onhand double(12,2) comment '在库数量', quantity_onhand double(12,2) comment '在库数量',
workorder_id bigint(20) comment '生产工单ID', quantity_reserved double(12,2) comment '保留数量',
workorder_code varchar(64) comment '生产工单编号',
recpt_date datetime comment '入库时间', recpt_date datetime comment '入库时间',
expire_date datetime comment '库存有效期', expire_date datetime comment '库存有效期',
frozen_flag char(1) default 'N' not null comment '是否冻结',
attr1 varchar(64) default null comment '预留字段1', attr1 varchar(64) default null comment '预留字段1',
attr2 varchar(255) default null comment '预留字段2', attr2 varchar(255) default null comment '预留字段2',
attr3 int(11) default 0 comment '预留字段3', attr3 int(11) default 0 comment '预留字段3',

View File

@ -106,6 +106,8 @@ public class WmStorageAreaController extends BaseController
@DeleteMapping("/{areaIds}") @DeleteMapping("/{areaIds}")
public AjaxResult remove(@PathVariable Long[] areaIds) public AjaxResult remove(@PathVariable Long[] areaIds)
{ {
//TODO:库位删除之前的逻辑校验
return toAjax(wmStorageAreaService.deleteWmStorageAreaByAreaIds(areaIds)); return toAjax(wmStorageAreaService.deleteWmStorageAreaByAreaIds(areaIds));
} }
} }

View File

@ -118,6 +118,8 @@ public class WmStorageLocationController extends BaseController
@DeleteMapping("/{locationIds}") @DeleteMapping("/{locationIds}")
public AjaxResult remove(@PathVariable Long[] locationIds) public AjaxResult remove(@PathVariable Long[] locationIds)
{ {
//TODO:库区删除之前的逻辑校验
for (Long locationId: locationIds for (Long locationId: locationIds
) { ) {
wmStorageAreaService.deleteByLocationId(locationId); wmStorageAreaService.deleteByLocationId(locationId);

View File

@ -133,6 +133,9 @@ public class WmWarehouseController extends BaseController
@DeleteMapping("/{warehouseIds}") @DeleteMapping("/{warehouseIds}")
public AjaxResult remove(@PathVariable Long[] warehouseIds) public AjaxResult remove(@PathVariable Long[] warehouseIds)
{ {
//TODO:仓库删除之前的逻辑校验
for (Long wahouseId: warehouseIds for (Long wahouseId: warehouseIds
) { ) {
wmStorageLocationService.deleteByWarehouseId(wahouseId); wmStorageLocationService.deleteByWarehouseId(wahouseId);

View File

@ -124,20 +124,22 @@ public class WmMaterialStock extends BaseEntity
@Excel(name = "库存有效期", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "库存有效期", width = 30, dateFormat = "yyyy-MM-dd")
private Date expireDate; private Date expireDate;
/**
* 是否冻结
*/
@Excel(name = "是否冻结")
private String frozenFlag;
/** 预留字段1 */ /** 预留字段1 */
@Excel(name = "预留字段1")
private String attr1; private String attr1;
/** 预留字段2 */ /** 预留字段2 */
@Excel(name = "预留字段2")
private String attr2; private String attr2;
/** 预留字段3 */ /** 预留字段3 */
@Excel(name = "预留字段3")
private Long attr3; private Long attr3;
/** 预留字段4 */ /** 预留字段4 */
@Excel(name = "预留字段4")
private Long attr4; private Long attr4;
public void setMaterialStockId(Long materialStockId) public void setMaterialStockId(Long materialStockId)
@ -372,7 +374,16 @@ public class WmMaterialStock extends BaseEntity
{ {
return expireDate; return expireDate;
} }
public void setAttr1(String attr1)
public String getFrozenFlag() {
return frozenFlag;
}
public void setFrozenFlag(String frozenFlag) {
this.frozenFlag = frozenFlag;
}
public void setAttr1(String attr1)
{ {
this.attr1 = attr1; this.attr1 = attr1;
} }

View File

@ -55,6 +55,8 @@ public class WmStorageArea extends BaseEntity
@Excel(name = "是否启用") @Excel(name = "是否启用")
private String enableFlag; private String enableFlag;
private String frozenFlag;
/** 预留字段1 */ /** 预留字段1 */
private String attr1; private String attr1;
@ -157,7 +159,16 @@ public class WmStorageArea extends BaseEntity
{ {
return enableFlag; return enableFlag;
} }
public void setAttr1(String attr1)
public String getFrozenFlag() {
return frozenFlag;
}
public void setFrozenFlag(String frozenFlag) {
this.frozenFlag = frozenFlag;
}
public void setAttr1(String attr1)
{ {
this.attr1 = attr1; this.attr1 = attr1;
} }

View File

@ -41,6 +41,8 @@ public class WmStorageLocation extends BaseEntity
@Excel(name = "是否开启库位管理") @Excel(name = "是否开启库位管理")
private String areaFlag; private String areaFlag;
private String frozenFlag;
/** 预留字段1 */ /** 预留字段1 */
private String attr1; private String attr1;
@ -109,7 +111,16 @@ public class WmStorageLocation extends BaseEntity
{ {
return areaFlag; return areaFlag;
} }
public void setAttr1(String attr1)
public String getFrozenFlag() {
return frozenFlag;
}
public void setFrozenFlag(String frozenFlag) {
this.frozenFlag = frozenFlag;
}
public void setAttr1(String attr1)
{ {
this.attr1 = attr1; this.attr1 = attr1;
} }

View File

@ -41,6 +41,8 @@ public class WmWarehouse extends BaseEntity
@Excel(name = "负责人") @Excel(name = "负责人")
private String charge; private String charge;
private String frozenFlag;
/** 预留字段1 */ /** 预留字段1 */
private String attr1; private String attr1;
@ -109,7 +111,16 @@ public class WmWarehouse extends BaseEntity
{ {
return charge; return charge;
} }
public void setAttr1(String attr1)
public String getFrozenFlag() {
return frozenFlag;
}
public void setFrozenFlag(String frozenFlag) {
this.frozenFlag = frozenFlag;
}
public void setAttr1(String attr1)
{ {
this.attr1 = attr1; this.attr1 = attr1;
} }

View File

@ -228,6 +228,7 @@ public class StorageCoreServiceImpl implements IStorageCoreService {
* 库存消耗 * 库存消耗
* *
*/ */
@Override
public void processItemConsume(List<ItemConsumeTxBean> lines){ public void processItemConsume(List<ItemConsumeTxBean> lines){
if(CollUtil.isEmpty(lines)){ if(CollUtil.isEmpty(lines)){
throw new BussinessException("没有需要处理的原料消耗单行"); throw new BussinessException("没有需要处理的原料消耗单行");
@ -263,6 +264,7 @@ public class StorageCoreServiceImpl implements IStorageCoreService {
* 产品产出 * 产品产出
* *
*/ */
@Override
public void processProductProduce(List<ProductProductTxBean> lines){ public void processProductProduce(List<ProductProductTxBean> lines){
if(CollUtil.isEmpty(lines)){ if(CollUtil.isEmpty(lines)){
throw new BussinessException("没有需要处理的产品产出单行"); throw new BussinessException("没有需要处理的产品产出单行");

View File

@ -4,18 +4,21 @@ import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import com.ktg.common.constant.UserConstants;
import com.ktg.common.exception.BussinessException; import com.ktg.common.exception.BussinessException;
import com.ktg.common.utils.DateUtils; import com.ktg.common.utils.DateUtils;
import com.ktg.common.utils.StringUtils; import com.ktg.common.utils.StringUtils;
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.wm.domain.WmMaterialStock; import com.ktg.mes.wm.domain.*;
import com.ktg.mes.wm.mapper.WmMaterialStockMapper; import com.ktg.mes.wm.mapper.WmMaterialStockMapper;
import com.ktg.mes.wm.service.IWmStorageAreaService;
import com.ktg.mes.wm.service.IWmStorageLocationService;
import com.ktg.mes.wm.service.IWmWarehouseService;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.ktg.mes.wm.mapper.WmTransactionMapper; import com.ktg.mes.wm.mapper.WmTransactionMapper;
import com.ktg.mes.wm.domain.WmTransaction;
import com.ktg.mes.wm.service.IWmTransactionService; import com.ktg.mes.wm.service.IWmTransactionService;
/** /**
@ -27,6 +30,15 @@ import com.ktg.mes.wm.service.IWmTransactionService;
@Service @Service
public class WmTransactionServiceImpl implements IWmTransactionService public class WmTransactionServiceImpl implements IWmTransactionService
{ {
@Autowired
private IWmWarehouseService wmWarehouseService;
@Autowired
private IWmStorageLocationService wmStorageLocationService;
@Autowired
private IWmStorageAreaService wmStorageAreaService;
@Autowired @Autowired
private WmTransactionMapper wmTransactionMapper; private WmTransactionMapper wmTransactionMapper;
@ -40,10 +52,12 @@ public class WmTransactionServiceImpl implements IWmTransactionService
public synchronized WmTransaction processTransaction(WmTransaction wmTransaction) { public synchronized WmTransaction processTransaction(WmTransaction wmTransaction) {
WmMaterialStock stock = new WmMaterialStock(); WmMaterialStock stock = new WmMaterialStock();
validate(wmTransaction); validate(wmTransaction); //先效验业务传递的库存事务参数是否完整
initStock(wmTransaction,stock); initStock(wmTransaction,stock); //用库存事务来初始化一个MSD对象
WmMaterialStock ms =wmMaterialStockMapper.loadMaterialStock(stock); WmMaterialStock ms =wmMaterialStockMapper.loadMaterialStock(stock); //用MSD对象查询库存现有量看是否已经存在相应的记录如果存在则只对数量进行更新不存在则需要新增MSD
checkFrozen(ms,stock); //冻结检测
BigDecimal quantity = wmTransaction.getTransactionQuantity().multiply(new BigDecimal(wmTransaction.getTransactionFlag())); BigDecimal quantity = wmTransaction.getTransactionQuantity().multiply(new BigDecimal(wmTransaction.getTransactionFlag()));
if(StringUtils.isNotNull(ms)){ if(StringUtils.isNotNull(ms)){
//MS已存在 //MS已存在
@ -56,6 +70,9 @@ public class WmTransactionServiceImpl implements IWmTransactionService
wmMaterialStockMapper.updateWmMaterialStock(stock); wmMaterialStockMapper.updateWmMaterialStock(stock);
}else { }else {
//MS不存在 //MS不存在
//TODO:需要为库存增加一个效验逻辑同一个库位上不能放不同批次和属性的物资
stock.setQuantityOnhand(quantity); stock.setQuantityOnhand(quantity);
wmMaterialStockMapper.insertWmMaterialStock(stock); wmMaterialStockMapper.insertWmMaterialStock(stock);
} }
@ -88,6 +105,7 @@ public class WmTransactionServiceImpl implements IWmTransactionService
} }
} }
public void initStock(WmTransaction transaction,WmMaterialStock stock){ public void initStock(WmTransaction transaction,WmMaterialStock stock){
if(StringUtils.isNotNull(transaction.getMaterialStockId())){ if(StringUtils.isNotNull(transaction.getMaterialStockId())){
@ -136,6 +154,36 @@ public class WmTransactionServiceImpl implements IWmTransactionService
} }
} }
/**
* 检查库存冻结情况
* @param ms
*/
private void checkFrozen(WmMaterialStock ms,WmMaterialStock org){
//检查仓库冻结
WmWarehouse warehouse = wmWarehouseService.selectWmWarehouseByWarehouseId(org.getWarehouseId());
if(UserConstants.YES.equals(warehouse.getFrozenFlag())){
throw new BussinessException("仓库"+warehouse.getWarehouseName()+"已被冻结!");
}
//检查库区冻结
WmStorageLocation location = wmStorageLocationService.selectWmStorageLocationByLocationId(org.getLocationId());
if(UserConstants.YES.equals(location.getFrozenFlag())){
throw new BussinessException("库区"+location.getLocationName()+"已被冻结!");
}
//检查库位冻结
WmStorageArea area = wmStorageAreaService.selectWmStorageAreaByAreaId(org.getAreaId());
if(UserConstants.YES.equals(area.getFrozenFlag())){
throw new BussinessException("库位"+area.getAreaName()+"已被冻结!");
}
//检查具体的MS冻结
if(ms!=null && StringUtils.isNotNull(ms.getMaterialStockId())){
if(UserConstants.YES.equals(ms.getFrozenFlag())){
throw new BussinessException(new StringBuilder("存放于").append(ms.getWarehouseName()).append("/")
.append(ms.getLocationName()).append("/").append(ms.getAreaName()).append("下的")
.append(ms.getItemName()).append("已被冻结!").toString());
}
}
}
/** /**
* 查询库存事务 * 查询库存事务

View File

@ -31,6 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="workorderId" column="workorder_id"></result> <result property="workorderId" column="workorder_id"></result>
<result property="workorderCode" column="workorder_code"></result> <result property="workorderCode" column="workorder_code"></result>
<result property="expireDate" column="expire_date" /> <result property="expireDate" column="expire_date" />
<result property="frozenFlag" column="frozen_flag" />
<result property="attr1" column="attr1" /> <result property="attr1" column="attr1" />
<result property="attr2" column="attr2" /> <result property="attr2" column="attr2" />
<result property="attr3" column="attr3" /> <result property="attr3" column="attr3" />
@ -42,7 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectWmMaterialStockVo"> <sql id="selectWmMaterialStockVo">
select material_stock_id, item_type_id, item_id, item_code, item_name, specification, unit_of_measure, batch_code, warehouse_id, warehouse_code, warehouse_name, location_id, location_code, location_name, area_id, area_code, area_name, vendor_id, vendor_code, vendor_name, vendor_nick, quantity_onhand,recpt_date,workorder_id,workorder_code, expire_date, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_material_stock select material_stock_id, item_type_id, item_id, item_code, item_name, specification, unit_of_measure, batch_code, warehouse_id, warehouse_code, warehouse_name, location_id, location_code, location_name, area_id, area_code, area_name, vendor_id, vendor_code, vendor_name, vendor_nick, quantity_onhand,recpt_date,workorder_id,workorder_code, expire_date, frozen_flag, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_material_stock
</sql> </sql>
<select id="selectWmMaterialStockList" parameterType="WmMaterialStock" resultMap="WmMaterialStockResult"> <select id="selectWmMaterialStockList" parameterType="WmMaterialStock" resultMap="WmMaterialStockResult">
@ -73,6 +74,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="workorderId !=null">and workorder_id = #{workorderId}</if> <if test="workorderId !=null">and workorder_id = #{workorderId}</if>
<if test="workorderCode !=null and workorderCode !=''">and workorder_code = #{workorderCode}</if> <if test="workorderCode !=null and workorderCode !=''">and workorder_code = #{workorderCode}</if>
<if test="expireDate != null "> and expire_date = #{expireDate}</if> <if test="expireDate != null "> and expire_date = #{expireDate}</if>
<if test="frozenFlag !=null "> and frozen_flag = #{frozenFlag} </if>
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if> <if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if> <if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
<if test="attr3 != null "> and attr3 = #{attr3}</if> <if test="attr3 != null "> and attr3 = #{attr3}</if>
@ -110,6 +112,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="workorderId !=null">and workorder_id = #{workorderId}</if> <if test="workorderId !=null">and workorder_id = #{workorderId}</if>
<if test="workorderCode !=null and workorderCode !=''">and workorder_code like concat('%',#{workorderCode},'%') </if> <if test="workorderCode !=null and workorderCode !=''">and workorder_code like concat('%',#{workorderCode},'%') </if>
<if test="expireDate != null "> and expire_date = #{expireDate}</if> <if test="expireDate != null "> and expire_date = #{expireDate}</if>
<if test="frozenFlag !=null "> and frozen_flag = #{frozenFlag} </if>
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if> <if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if> <if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
<if test="attr3 != null "> and attr3 = #{attr3}</if> <if test="attr3 != null "> and attr3 = #{attr3}</if>
@ -169,6 +172,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="workorderId !=null">workorder_id,</if> <if test="workorderId !=null">workorder_id,</if>
<if test="workorderCode !=null">workorder_code,</if> <if test="workorderCode !=null">workorder_code,</if>
<if test="expireDate != null">expire_date,</if> <if test="expireDate != null">expire_date,</if>
<if test="frozenFlag !=null ">frozen_flag,</if>
<if test="attr1 != null">attr1,</if> <if test="attr1 != null">attr1,</if>
<if test="attr2 != null">attr2,</if> <if test="attr2 != null">attr2,</if>
<if test="attr3 != null">attr3,</if> <if test="attr3 != null">attr3,</if>
@ -204,6 +208,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="workorderId !=null">#{workorderId},</if> <if test="workorderId !=null">#{workorderId},</if>
<if test="workorderCode !=null">#{workorderCode},</if> <if test="workorderCode !=null">#{workorderCode},</if>
<if test="expireDate != null">#{expireDate},</if> <if test="expireDate != null">#{expireDate},</if>
<if test="frozenFlag !=null ">#{frozenFlag}, </if>
<if test="attr1 != null">#{attr1},</if> <if test="attr1 != null">#{attr1},</if>
<if test="attr2 != null">#{attr2},</if> <if test="attr2 != null">#{attr2},</if>
<if test="attr3 != null">#{attr3},</if> <if test="attr3 != null">#{attr3},</if>
@ -243,6 +248,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="workorderId !=null">workorder_id = #{workorderId},</if> <if test="workorderId !=null">workorder_id = #{workorderId},</if>
<if test="workorderCode !=null">workorder_code = #{workorderCode},</if> <if test="workorderCode !=null">workorder_code = #{workorderCode},</if>
<if test="expireDate != null">expire_date = #{expireDate},</if> <if test="expireDate != null">expire_date = #{expireDate},</if>
<if test="frozenFlag !=null ">frozen_flag = #{frozenFlag}, </if>
<if test="attr1 != null">attr1 = #{attr1},</if> <if test="attr1 != null">attr1 = #{attr1},</if>
<if test="attr2 != null">attr2 = #{attr2},</if> <if test="attr2 != null">attr2 = #{attr2},</if>
<if test="attr3 != null">attr3 = #{attr3},</if> <if test="attr3 != null">attr3 = #{attr3},</if>

View File

@ -15,6 +15,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="positionY" column="position_y" /> <result property="positionY" column="position_y" />
<result property="positionZ" column="position_z" /> <result property="positionZ" column="position_z" />
<result property="enableFlag" column="enable_flag" /> <result property="enableFlag" column="enable_flag" />
<result property="frozenFlag" column="frozen_flag" />
<result property="remark" column="remark" /> <result property="remark" column="remark" />
<result property="attr1" column="attr1" /> <result property="attr1" column="attr1" />
<result property="attr2" column="attr2" /> <result property="attr2" column="attr2" />
@ -27,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectWmStorageAreaVo"> <sql id="selectWmStorageAreaVo">
select area_id, area_code, area_name, location_id, area, max_loa, position_x, position_y, position_z, enable_flag, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_storage_area select area_id, area_code, area_name, location_id, area, max_loa, position_x, position_y, position_z, enable_flag, frozen_flag, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_storage_area
</sql> </sql>
<select id="selectWmStorageAreaList" parameterType="WmStorageArea" resultMap="WmStorageAreaResult"> <select id="selectWmStorageAreaList" parameterType="WmStorageArea" resultMap="WmStorageAreaResult">
@ -67,6 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="positionY != null">position_y,</if> <if test="positionY != null">position_y,</if>
<if test="positionZ != null">position_z,</if> <if test="positionZ != null">position_z,</if>
<if test="enableFlag != null">enable_flag,</if> <if test="enableFlag != null">enable_flag,</if>
<if test="frozenFlag != null">frozen_flag,</if>
<if test="remark != null">remark,</if> <if test="remark != null">remark,</if>
<if test="attr1 != null">attr1,</if> <if test="attr1 != null">attr1,</if>
<if test="attr2 != null">attr2,</if> <if test="attr2 != null">attr2,</if>
@ -87,6 +89,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="positionY != null">#{positionY},</if> <if test="positionY != null">#{positionY},</if>
<if test="positionZ != null">#{positionZ},</if> <if test="positionZ != null">#{positionZ},</if>
<if test="enableFlag != null">#{enableFlag},</if> <if test="enableFlag != null">#{enableFlag},</if>
<if test="frozenFlag != null">#{frozenFlag},</if>
<if test="remark != null">#{remark},</if> <if test="remark != null">#{remark},</if>
<if test="attr1 != null">#{attr1},</if> <if test="attr1 != null">#{attr1},</if>
<if test="attr2 != null">#{attr2},</if> <if test="attr2 != null">#{attr2},</if>
@ -111,6 +114,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="positionY != null">position_y = #{positionY},</if> <if test="positionY != null">position_y = #{positionY},</if>
<if test="positionZ != null">position_z = #{positionZ},</if> <if test="positionZ != null">position_z = #{positionZ},</if>
<if test="enableFlag != null">enable_flag = #{enableFlag},</if> <if test="enableFlag != null">enable_flag = #{enableFlag},</if>
<if test="frozenFlag != null">frozen_flag = #{frozenFlag},</if>
<if test="remark != null">remark = #{remark},</if> <if test="remark != null">remark = #{remark},</if>
<if test="attr1 != null">attr1 = #{attr1},</if> <if test="attr1 != null">attr1 = #{attr1},</if>
<if test="attr2 != null">attr2 = #{attr2},</if> <if test="attr2 != null">attr2 = #{attr2},</if>

View File

@ -11,6 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="warehouseId" column="warehouse_id" /> <result property="warehouseId" column="warehouse_id" />
<result property="area" column="area" /> <result property="area" column="area" />
<result property="areaFlag" column="area_flag" /> <result property="areaFlag" column="area_flag" />
<result property="frozenFlag" column="frozen_flag" />
<result property="remark" column="remark" /> <result property="remark" column="remark" />
<result property="attr1" column="attr1" /> <result property="attr1" column="attr1" />
<result property="attr2" column="attr2" /> <result property="attr2" column="attr2" />
@ -23,7 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectWmStorageLocationVo"> <sql id="selectWmStorageLocationVo">
select location_id, location_code, location_name, warehouse_id, area, area_flag, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_storage_location select location_id, location_code, location_name, warehouse_id, area, area_flag, frozen_flag, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_storage_location
</sql> </sql>
<select id="selectWmStorageLocationList" parameterType="WmStorageLocation" resultMap="WmStorageLocationResult"> <select id="selectWmStorageLocationList" parameterType="WmStorageLocation" resultMap="WmStorageLocationResult">
@ -65,6 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="warehouseId != null">warehouse_id,</if> <if test="warehouseId != null">warehouse_id,</if>
<if test="area != null">area,</if> <if test="area != null">area,</if>
<if test="areaFlag != null">area_flag,</if> <if test="areaFlag != null">area_flag,</if>
<if test="frozenFlag != null">frozen_flag,</if>
<if test="remark != null">remark,</if> <if test="remark != null">remark,</if>
<if test="attr1 != null">attr1,</if> <if test="attr1 != null">attr1,</if>
<if test="attr2 != null">attr2,</if> <if test="attr2 != null">attr2,</if>
@ -81,6 +83,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="warehouseId != null">#{warehouseId},</if> <if test="warehouseId != null">#{warehouseId},</if>
<if test="area != null">#{area},</if> <if test="area != null">#{area},</if>
<if test="areaFlag != null">#{areaFlag},</if> <if test="areaFlag != null">#{areaFlag},</if>
<if test="frozenFlag != null">#{frozenFlag},</if>
<if test="remark != null">#{remark},</if> <if test="remark != null">#{remark},</if>
<if test="attr1 != null">#{attr1},</if> <if test="attr1 != null">#{attr1},</if>
<if test="attr2 != null">#{attr2},</if> <if test="attr2 != null">#{attr2},</if>
@ -101,6 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if> <if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
<if test="area != null">area = #{area},</if> <if test="area != null">area = #{area},</if>
<if test="areaFlag != null">area_flag = #{areaFlag},</if> <if test="areaFlag != null">area_flag = #{areaFlag},</if>
<if test="frozenFlag != null">frozen_flag = #{frozenFlag},</if>
<if test="remark != null">remark = #{remark},</if> <if test="remark != null">remark = #{remark},</if>
<if test="attr1 != null">attr1 = #{attr1},</if> <if test="attr1 != null">attr1 = #{attr1},</if>
<if test="attr2 != null">attr2 = #{attr2},</if> <if test="attr2 != null">attr2 = #{attr2},</if>

View File

@ -11,6 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="location" column="location" /> <result property="location" column="location" />
<result property="area" column="area" /> <result property="area" column="area" />
<result property="charge" column="charge" /> <result property="charge" column="charge" />
<result property="frozenFlag" column="frozen_flag" />
<result property="remark" column="remark" /> <result property="remark" column="remark" />
<result property="attr1" column="attr1" /> <result property="attr1" column="attr1" />
<result property="attr2" column="attr2" /> <result property="attr2" column="attr2" />
@ -47,7 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectWmWarehouseVo"> <sql id="selectWmWarehouseVo">
select warehouse_id, warehouse_code, warehouse_name, location, area, charge, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_warehouse select warehouse_id, warehouse_code, warehouse_name, location, area, charge, frozen_flag, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_warehouse
</sql> </sql>
<select id="selectWmWarehouseList" parameterType="WmWarehouse" resultMap="WmWarehouseResult"> <select id="selectWmWarehouseList" parameterType="WmWarehouse" resultMap="WmWarehouseResult">
@ -62,7 +63,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select> </select>
<select id="getTreeList" resultMap="WmWarehouseResult"> <select id="getTreeList" resultMap="WmWarehouseResult">
SELECT w.warehouse_id, warehouse_code, warehouse_name, location, w.area, charge, w.remark, w.attr1, w.attr2, w.attr3, w.attr4, w.create_by, w.create_time, w.update_by, w.update_time, SELECT w.warehouse_id, warehouse_code, warehouse_name, location, w.area, charge,w.frozen_flag, w.remark, w.attr1, w.attr2, w.attr3, w.attr4, w.create_by, w.create_time, w.update_by, w.update_time,
l.location_id, location_code, location_name, area_flag, l.location_id, location_code, location_name, area_flag,
area_id, area_code, area_name, max_loa, position_x, position_y, position_z area_id, area_code, area_name, max_loa, position_x, position_y, position_z
FROM wm_warehouse w FROM wm_warehouse w
@ -98,6 +99,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="location != null">location,</if> <if test="location != null">location,</if>
<if test="area != null">area,</if> <if test="area != null">area,</if>
<if test="charge != null">charge,</if> <if test="charge != null">charge,</if>
<if test="frozenFlag != null">frozen_flag,</if>
<if test="remark != null">remark,</if> <if test="remark != null">remark,</if>
<if test="attr1 != null">attr1,</if> <if test="attr1 != null">attr1,</if>
<if test="attr2 != null">attr2,</if> <if test="attr2 != null">attr2,</if>
@ -114,6 +116,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="location != null">#{location},</if> <if test="location != null">#{location},</if>
<if test="area != null">#{area},</if> <if test="area != null">#{area},</if>
<if test="charge != null">#{charge},</if> <if test="charge != null">#{charge},</if>
<if test="frozenFlag != null">#{frozenFlag},</if>
<if test="remark != null">#{remark},</if> <if test="remark != null">#{remark},</if>
<if test="attr1 != null">#{attr1},</if> <if test="attr1 != null">#{attr1},</if>
<if test="attr2 != null">#{attr2},</if> <if test="attr2 != null">#{attr2},</if>
@ -134,6 +137,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="location != null">location = #{location},</if> <if test="location != null">location = #{location},</if>
<if test="area != null">area = #{area},</if> <if test="area != null">area = #{area},</if>
<if test="charge != null">charge = #{charge},</if> <if test="charge != null">charge = #{charge},</if>
<if test="frozenFlag != null">frozen_flag = #{frozenFlag},</if>
<if test="remark != null">remark = #{remark},</if> <if test="remark != null">remark = #{remark},</if>
<if test="attr1 != null">attr1 = #{attr1},</if> <if test="attr1 != null">attr1 = #{attr1},</if>
<if test="attr2 != null">attr2 = #{attr2},</if> <if test="attr2 != null">attr2 = #{attr2},</if>