余料标示

Leon 4 years ago
parent 7517c1deac
commit 8777d65d43

@ -0,0 +1,40 @@
package com.foreverwin.mesnac.dispatch.controller;
import com.foreverwin.modular.core.util.R;
import com.foreverwin.modular.core.util.FrontPage;
import com.foreverwin.modular.core.util.CommonMethods;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.foreverwin.mesnac.dispatch.service.IssueItemService;
import com.foreverwin.mesnac.dispatch.model.IssueItem;
import java.util.List;
/**
*
* @author Leon.L
* @since 2021-07-09
*/
@RestController
@RequestMapping("/Z-ISSUE-ITEM")
public class IssueItemController {
@Autowired
public IssueItemService issueItemService;
@ResponseBody
@GetMapping("/scanIssueInventory")
public R scanIssueInventory(String item, String inventory){
try {
String site = CommonMethods.getSite();
issueItemService.scanIssueInventory(site, item, inventory);
} catch (Exception e) {
return R.failed(e.getMessage());
}
return R.ok();
}
}

@ -0,0 +1,51 @@
package com.foreverwin.mesnac.dispatch.controller;
import com.foreverwin.mesnac.common.util.StringUtil;
import com.foreverwin.modular.core.exception.BusinessException;
import com.foreverwin.modular.core.util.R;
import com.foreverwin.modular.core.util.FrontPage;
import com.foreverwin.modular.core.util.CommonMethods;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.foreverwin.mesnac.dispatch.service.SurplusItemReturnService;
import com.foreverwin.mesnac.dispatch.model.SurplusItemReturn;
import java.util.List;
import java.util.Map;
/**
*
* @author Leon.L
* @since 2021-07-10
*/
@RestController
@RequestMapping("/Z-SURPLUS-ITEM-RETURN")
public class SurplusItemReturnController {
@Autowired
public SurplusItemReturnService surplusItemReturnService;
@ResponseBody
@GetMapping("/{inventory:.+}")
public R getInventoryData(@PathVariable String inventory) {
Map<String, Object> result;
try {
if (StringUtil.isBlank(inventory)) {
throw BusinessException.build("物料条码不能为空!");
}
String site = CommonMethods.getSite();
result = surplusItemReturnService.getInventoryData(site, inventory);
} catch (Exception e) {
return R.failed(e.getMessage());
}
return R.ok(result);
}
}

@ -0,0 +1,18 @@
package com.foreverwin.mesnac.dispatch.mapper;
import com.foreverwin.mesnac.dispatch.model.IssueItem;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
/**
* <p>
* Mapper
* </p>
*
* @author Leon.L
* @since 2021-07-09
*/
@Repository
public interface IssueItemMapper extends BaseMapper<IssueItem> {
}

@ -0,0 +1,28 @@
package com.foreverwin.mesnac.dispatch.mapper;
import com.foreverwin.mesnac.dispatch.model.SurplusItemReturn;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.Map;
/**
* <p>
* 退 Mapper
* </p>
*
* @author Leon.L
* @since 2021-07-10
*/
@Repository
public interface SurplusItemReturnMapper extends BaseMapper<SurplusItemReturn> {
/**
*
*
* @param inventoryBo
* @return
*/
Map<String, Object> selectInventoryData(@Param("inventoryBo") String inventoryBo);
}

@ -0,0 +1,232 @@
package com.foreverwin.mesnac.dispatch.model;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.IdType;
/**
* <p>
*
* </p>
*
* @author Leon.L
* @since 2021-07-09
*/
@TableName("Z_ISSUE_ITEM")
public class IssueItem extends Model<IssueItem> {
private static final long serialVersionUID = 1L;
/**
*
*/
@TableField("HANDLE")
private String handle;
/**
*
*/
@TableField("SITE")
private String site;
/**
*
*/
@TableField("CALL_ITEM_NO")
private String callItemNo;
/**
*
*/
@TableField("SHOP_ORDER")
private String shopOrder;
/**
*
*/
@TableField("SFC")
private String sfc;
/**
*
*/
@TableField("ITEM")
private String item;
/**
*
*/
@TableField("INVENTORY")
private String inventory;
/**
*
*/
@TableField("QTY")
private Double qty;
/**
*
*/
@TableField("CREATE_USER")
private String createUser;
/**
*
*/
@TableField("CREATED_DATE_TIME")
private LocalDateTime createdDateTime;
/**
*
*/
@TableField("MODIFY_USER")
private String modifyUser;
/**
*
*/
@TableField("MODIFIED_DATE_TIME")
private LocalDateTime modifiedDateTime;
public String getHandle() {
return handle;
}
public void setHandle(String handle) {
this.handle = handle;
}
public String getSite() {
return site;
}
public void setSite(String site) {
this.site = site;
}
public String getCallItemNo() {
return callItemNo;
}
public void setCallItemNo(String callItemNo) {
this.callItemNo = callItemNo;
}
public String getShopOrder() {
return shopOrder;
}
public void setShopOrder(String shopOrder) {
this.shopOrder = shopOrder;
}
public String getSfc() {
return sfc;
}
public void setSfc(String sfc) {
this.sfc = sfc;
}
public String getItem() {
return item;
}
public void setItem(String item) {
this.item = item;
}
public String getInventory() {
return inventory;
}
public void setInventory(String inventory) {
this.inventory = inventory;
}
public Double getQty() {
return qty;
}
public void setQty(Double qty) {
this.qty = qty;
}
public String getCreateUser() {
return createUser;
}
public void setCreateUser(String createUser) {
this.createUser = createUser;
}
public LocalDateTime getCreatedDateTime() {
return createdDateTime;
}
public void setCreatedDateTime(LocalDateTime createdDateTime) {
this.createdDateTime = createdDateTime;
}
public String getModifyUser() {
return modifyUser;
}
public void setModifyUser(String modifyUser) {
this.modifyUser = modifyUser;
}
public LocalDateTime getModifiedDateTime() {
return modifiedDateTime;
}
public void setModifiedDateTime(LocalDateTime modifiedDateTime) {
this.modifiedDateTime = modifiedDateTime;
}
public static final String HANDLE = "HANDLE";
public static final String SITE = "SITE";
public static final String CALL_ITEM_NO = "CALL_ITEM_NO";
public static final String SHOP_ORDER = "SHOP_ORDER";
public static final String SFC = "SFC";
public static final String ITEM = "ITEM";
public static final String INVENTORY = "INVENTORY";
public static final String QTY = "QTY";
public static final String CREATE_USER = "CREATE_USER";
public static final String CREATED_DATE_TIME = "CREATED_DATE_TIME";
public static final String MODIFY_USER = "MODIFY_USER";
public static final String MODIFIED_DATE_TIME = "MODIFIED_DATE_TIME";
@Override
protected Serializable pkVal() {
return this.handle;
}
@Override
public String toString() {
return "IssueItem{" +
"handle = " + handle +
", site = " + site +
", callItemNo = " + callItemNo +
", shopOrder = " + shopOrder +
", sfc = " + sfc +
", item = " + item +
", inventory = " + inventory +
", qty = " + qty +
", createUser = " + createUser +
", createdDateTime = " + createdDateTime +
", modifyUser = " + modifyUser +
", modifiedDateTime = " + modifiedDateTime +
"}";
}
}

@ -0,0 +1,233 @@
package com.foreverwin.mesnac.dispatch.model;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.IdType;
/**
* <p>
* 退
* </p>
*
* @author Leon.L
* @since 2021-07-10
*/
@TableName("Z_SURPLUS_ITEM_RETURN")
public class SurplusItemReturn extends Model<SurplusItemReturn> {
private static final long serialVersionUID = 1L;
/**
*
*/
@TableId(value = "HANDLE", type = IdType.INPUT)
private String handle;
/**
*
*/
@TableField("SITE")
private String site;
/**
*
*/
@TableField("INVENTORY")
private String inventory;
/**
*
*/
@TableField("PARENT_INVENTORY")
private String parentInventory;
/**
*
*/
@TableField("ITEM_BO")
private String itemBo;
/**
*
*/
@TableField("LENGHT")
private Double lenght;
/**
*
*/
@TableField("WIDTH")
private Double width;
/**
*
*/
@TableField("QTY")
private Double qty;
/**
*
*/
@TableField("CREATE_USER_BO")
private String createUserBo;
/**
*
*/
@TableField("CREATED_DATE_TIME")
private LocalDateTime createdDateTime;
/**
*
*/
@TableField("UPDATE_USER_BO")
private String updateUserBo;
/**
*
*/
@TableField("UPDATED_DATE_TIME")
private LocalDateTime updatedDateTime;
public String getHandle() {
return handle;
}
public void setHandle(String handle) {
this.handle = handle;
}
public String getSite() {
return site;
}
public void setSite(String site) {
this.site = site;
}
public String getInventory() {
return inventory;
}
public void setInventory(String inventory) {
this.inventory = inventory;
}
public String getParentInventory() {
return parentInventory;
}
public void setParentInventory(String parentInventory) {
this.parentInventory = parentInventory;
}
public String getItemBo() {
return itemBo;
}
public void setItemBo(String itemBo) {
this.itemBo = itemBo;
}
public Double getLenght() {
return lenght;
}
public void setLenght(Double lenght) {
this.lenght = lenght;
}
public Double getWidth() {
return width;
}
public void setWidth(Double width) {
this.width = width;
}
public Double getQty() {
return qty;
}
public void setQty(Double qty) {
this.qty = qty;
}
public String getCreateUserBo() {
return createUserBo;
}
public void setCreateUserBo(String createUserBo) {
this.createUserBo = createUserBo;
}
public LocalDateTime getCreatedDateTime() {
return createdDateTime;
}
public void setCreatedDateTime(LocalDateTime createdDateTime) {
this.createdDateTime = createdDateTime;
}
public String getUpdateUserBo() {
return updateUserBo;
}
public void setUpdateUserBo(String updateUserBo) {
this.updateUserBo = updateUserBo;
}
public LocalDateTime getUpdatedDateTime() {
return updatedDateTime;
}
public void setUpdatedDateTime(LocalDateTime updatedDateTime) {
this.updatedDateTime = updatedDateTime;
}
public static final String HANDLE = "HANDLE";
public static final String SITE = "SITE";
public static final String INVENTORY = "INVENTORY";
public static final String PARENT_INVENTORY = "PARENT_INVENTORY";
public static final String ITEM_BO = "ITEM_BO";
public static final String LENGHT = "LENGHT";
public static final String WIDTH = "WIDTH";
public static final String QTY = "QTY";
public static final String CREATE_USER_BO = "CREATE_USER_BO";
public static final String CREATED_DATE_TIME = "CREATED_DATE_TIME";
public static final String UPDATE_USER_BO = "UPDATE_USER_BO";
public static final String UPDATED_DATE_TIME = "UPDATED_DATE_TIME";
@Override
protected Serializable pkVal() {
return this.handle;
}
@Override
public String toString() {
return "SurplusItemReturn{" +
"handle = " + handle +
", site = " + site +
", inventory = " + inventory +
", parentInventory = " + parentInventory +
", itemBo = " + itemBo +
", lenght = " + lenght +
", width = " + width +
", qty = " + qty +
", createUserBo = " + createUserBo +
", createdDateTime = " + createdDateTime +
", updateUserBo = " + updateUserBo +
", updatedDateTime = " + updatedDateTime +
"}";
}
}

@ -0,0 +1,20 @@
package com.foreverwin.mesnac.dispatch.service;
;
import com.foreverwin.mesnac.dispatch.model.IssueItem;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.Map;
/**
* <p>
*
* </p>
*
* @author Leon.L
* @since 2021-07-09
*/
public interface IssueItemService extends IService<IssueItem> {
Map<String, Object> scanIssueInventory(String site, String item, String inventory);
}

@ -1,9 +1,8 @@
package com.foreverwin.mesnac.dispatch.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.foreverwin.mesnac.dispatch.model.ItemBatch;
import com.baomidou.mybatisplus.extension.service.IService;
import com.foreverwin.modular.core.util.FrontPage;
import java.util.List;
@ -18,11 +17,12 @@ import java.util.List;
public interface ItemBatchService extends IService<ItemBatch> {
/**
*
* @param frontPage
*
*
* @param site
* @param item
* @param batch
* @return
*/
IPage<ItemBatch> selectPage(FrontPage<ItemBatch> frontPage, ItemBatch itemBatch);
List<ItemBatch> selectList(ItemBatch itemBatch);
List<ItemBatch> findItemBatch(String site, String item, String batch);
}

@ -0,0 +1,29 @@
package com.foreverwin.mesnac.dispatch.service;
import com.foreverwin.mesnac.dispatch.model.SurplusItemReturn;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.Map;
/**
* <p>
* 退
* </p>
*
* @author Leon.L
* @since 2021-07-10
*/
public interface SurplusItemReturnService extends IService<SurplusItemReturn> {
/**
*
* --&
* --
* --
*
* @param site
* @param inventory
* @return
*/
Map<String, Object> getInventoryData(String site, String inventory);
}

@ -0,0 +1,81 @@
package com.foreverwin.mesnac.dispatch.service.impl;
import com.foreverwin.mesnac.common.enums.HandleEnum;
import com.foreverwin.mesnac.dispatch.model.IssueItem;
import com.foreverwin.mesnac.dispatch.mapper.IssueItemMapper;
import com.foreverwin.mesnac.dispatch.model.ItemBatch;
import com.foreverwin.mesnac.dispatch.service.IssueItemService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.foreverwin.mesnac.dispatch.service.ItemBatchService;
import com.foreverwin.mesnac.meapi.model.Inventory;
import com.foreverwin.mesnac.meapi.model.Item;
import com.foreverwin.mesnac.meapi.service.InventoryService;
import com.foreverwin.mesnac.meapi.service.ItemService;
import com.foreverwin.modular.core.exception.BusinessException;
import com.sap.me.common.MaterialType;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* <p>
*
* </p>
*
* @author Leon.L
* @since 2021-07-09
*/
@Service
@Transactional(rollbackFor = Exception.class)
public class IssueItemServiceImpl extends ServiceImpl<IssueItemMapper, IssueItem> implements IssueItemService {
@Autowired
private ItemService itemService;
@Autowired
private IssueItemMapper issueItemMapper;
@Autowired
private ItemBatchService itemBatchService;
@Autowired
private InventoryService inventoryService;
@Override
public Map<String, Object> scanIssueInventory(String site, String item, String inventory) {
Item itemModel = itemService.selectCurrent(site, item);
if (itemModel == null) {
throw BusinessException.build("物料【" +item+"】当前版本不存在!");
}
String itemBo = itemModel.getHandle();
String materialType = itemModel.getMaterialType();
Map<String, Object> map = new HashMap<>();
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if (MaterialType.RAW.value().equals(materialType)){
//原材料
List<ItemBatch> itemBatchList = itemBatchService.findItemBatch(site, item, inventory);
if (itemBatchList == null || itemBatchList.size() <= 0) {
throw BusinessException.build("扫描的物料条码【 "+ inventory +" 】不存在!");
}
} else {
//半成品
String inventoryBo = HandleEnum.INVENTORY.getHandle(site, inventory);
Inventory inventoryModel = inventoryService.getById(inventoryBo);
if (inventoryModel == null) {
throw BusinessException.build("扫描的物料条码【 "+ inventory +" 】不存在!");
}
String invItemBo = inventoryModel.getItemBo();
if (invItemBo.equals(itemBo)) {
throw BusinessException.build("扫描的物料条码【 "+ inventory +" 】不是物料【"+ item +"】的库存!");
}
map.put("qty", inventoryModel.getQtyOnHand());
}
return map;
}
}

@ -1,8 +1,7 @@
package com.foreverwin.mesnac.dispatch.service.impl;
import com.foreverwin.modular.core.util.FrontPage;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.foreverwin.mesnac.common.util.StringUtil;
import com.foreverwin.mesnac.dispatch.model.ItemBatch;
import com.foreverwin.mesnac.dispatch.mapper.ItemBatchMapper;
import com.foreverwin.mesnac.dispatch.service.ItemBatchService;
@ -11,7 +10,11 @@ import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* <p>
*
@ -28,19 +31,16 @@ public class ItemBatchServiceImpl extends ServiceImpl<ItemBatchMapper, ItemBatch
@Autowired
private ItemBatchMapper itemBatchMapper;
@Override
public IPage<ItemBatch> selectPage(FrontPage<ItemBatch> frontPage, ItemBatch itemBatch) {
QueryWrapper<ItemBatch> queryWrapper = new QueryWrapper<>();
queryWrapper.setEntity(itemBatch);
return super.page(frontPage.getPagePlus(), queryWrapper);
}
@Override
public List<ItemBatch> selectList(ItemBatch itemBatch) {
QueryWrapper<ItemBatch> queryWrapper = new QueryWrapper<>();
queryWrapper.setEntity(itemBatch);
return super.list(queryWrapper);
public List<ItemBatch> findItemBatch(String site, String item, String batch) {
Map<String, Object> queryMap = new HashMap<>();
queryMap.put(ItemBatch.SITE, site);
queryMap.put(ItemBatch.ITEM, item);
if (StringUtil.notBlank(batch)) {
queryMap.put(ItemBatch.BATCH, batch);
}
return itemBatchMapper.selectByMap(queryMap);
}
}

@ -0,0 +1,73 @@
package com.foreverwin.mesnac.dispatch.service.impl;
import com.foreverwin.mesnac.common.enums.HandleEnum;
import com.foreverwin.mesnac.common.util.NumberUtil;
import com.foreverwin.mesnac.common.util.StringUtil;
import com.foreverwin.mesnac.meapi.model.Inventory;
import com.foreverwin.mesnac.meapi.service.InventoryService;
import com.foreverwin.modular.core.exception.BusinessException;
import com.foreverwin.modular.core.util.FrontPage;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.foreverwin.mesnac.dispatch.model.SurplusItemReturn;
import com.foreverwin.mesnac.dispatch.mapper.SurplusItemReturnMapper;
import com.foreverwin.mesnac.dispatch.service.SurplusItemReturnService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Map;
/**
* <p>
* 退
* </p>
*
* @author Leon.L
* @since 2021-07-10
*/
@Service
@Transactional(rollbackFor = Exception.class)
public class SurplusItemReturnServiceImpl extends ServiceImpl<SurplusItemReturnMapper, SurplusItemReturn> implements SurplusItemReturnService {
@Autowired
private InventoryService inventoryService;
@Autowired
private SurplusItemReturnMapper surplusItemReturnMapper;
@Override
public Map<String, Object> getInventoryData(String site, String inventory) {
String inventoryBo = HandleEnum.INVENTORY.getHandle(site, inventory);
Inventory inventoryModel = inventoryService.getById(inventoryBo);
if (inventoryModel == null) {
throw BusinessException.build("物料条码【" + inventory +"】不存在!");
}
if (inventoryModel.getQtyOnHand() <= 0) {
throw BusinessException.build("物料条码【" + inventory +"】没有可用数量!");
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Map<String, Object> map = surplusItemReturnMapper.selectInventoryData(inventoryBo);
if (map == null || map.size() <= 0) {
throw BusinessException.build("物料条码【" + inventory +"】不存在!");
}
String item = (String) map.get("ITEM");
String perMater = (String) map.get("PER_METER");
String perSquareMeter = (String) map.get("PER_SQUARE_METER");
if (StringUtil.isBlank(perMater) && StringUtil.isBlank(perSquareMeter)) {
throw BusinessException.build("物料【" +item+ "】的自定义字段【每米重量】和【每平米重量】都没维护!");
}
if (StringUtil.notBlank(perMater) && !NumberUtil.isNumber(perMater)) {
throw BusinessException.build("物料【" +item+ "】的自定义字段【每米重量】只能维护数值!");
}
if (StringUtil.notBlank(perSquareMeter) && !NumberUtil.isNumber(perSquareMeter)) {
throw BusinessException.build("物料【" +item+ "】的自定义字段【每平米重量】只能维护数值!");
}
return map;
}
}

@ -0,0 +1,388 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.foreverwin.mesnac.dispatch.mapper.IssueItemMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.foreverwin.mesnac.dispatch.model.IssueItem">
<result column="HANDLE" property="handle" />
<result column="SITE" property="site" />
<result column="CALL_ITEM_NO" property="callItemNo" />
<result column="SHOP_ORDER" property="shopOrder" />
<result column="SFC" property="sfc" />
<result column="ITEM" property="item" />
<result column="INVENTORY" property="inventory" />
<result column="QTY" property="qty" />
<result column="CREATE_USER" property="createUser" />
<result column="CREATED_DATE_TIME" property="createdDateTime" />
<result column="MODIFY_USER" property="modifyUser" />
<result column="MODIFIED_DATE_TIME" property="modifiedDateTime" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
HANDLE, SITE, CALL_ITEM_NO, SHOP_ORDER, SFC, ITEM, INVENTORY, QTY, CREATE_USER, CREATED_DATE_TIME, MODIFY_USER, MODIFIED_DATE_TIME
</sql>
<!-- BaseMapper标准查询/修改/删除 -->
<select id="selectByMap" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include>
FROM Z_ISSUE_ITEM
<if test="cm!=null and !cm.isEmpty">
<where>
<foreach collection="cm.keys" item="k" separator="AND">
<if test="cm[k] != null">
${k} = #{cm[${k}]}
</if>
</foreach>
</where>
</if>
</select>
<select id="selectOne" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include> FROM Z_ISSUE_ITEM
<where>
<if test="ew.entity.handle!=null">
HANDLE=#{ew.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.callItemNo!=null"> AND CALL_ITEM_NO=#{ew.entity.callItemNo}</if>
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<if test="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
<if test="ew.entity.inventory!=null"> AND INVENTORY=#{ew.entity.inventory}</if>
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</where>
</select>
<select id="selectCount" resultType="Integer">
SELECT COUNT(1) FROM Z_ISSUE_ITEM
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.callItemNo!=null"> AND CALL_ITEM_NO=#{ew.entity.callItemNo}</if>
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<if test="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
<if test="ew.entity.inventory!=null"> AND INVENTORY=#{ew.entity.inventory}</if>
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectList" resultMap="BaseResultMap">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_ISSUE_ITEM
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.callItemNo!=null"> AND CALL_ITEM_NO=#{ew.entity.callItemNo}</if>
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<if test="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
<if test="ew.entity.inventory!=null"> AND INVENTORY=#{ew.entity.inventory}</if>
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectMaps" resultType="HashMap">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_ISSUE_ITEM
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.callItemNo!=null"> AND CALL_ITEM_NO=#{ew.entity.callItemNo}</if>
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<if test="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
<if test="ew.entity.inventory!=null"> AND INVENTORY=#{ew.entity.inventory}</if>
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectObjs" resultType="Object">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_ISSUE_ITEM
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.callItemNo!=null"> AND CALL_ITEM_NO=#{ew.entity.callItemNo}</if>
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<if test="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
<if test="ew.entity.inventory!=null"> AND INVENTORY=#{ew.entity.inventory}</if>
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectPage" resultMap="BaseResultMap">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_ISSUE_ITEM
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.callItemNo!=null"> AND CALL_ITEM_NO=#{ew.entity.callItemNo}</if>
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<if test="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
<if test="ew.entity.inventory!=null"> AND INVENTORY=#{ew.entity.inventory}</if>
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectMapsPage" resultType="HashMap">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_ISSUE_ITEM
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.callItemNo!=null"> AND CALL_ITEM_NO=#{ew.entity.callItemNo}</if>
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<if test="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
<if test="ew.entity.inventory!=null"> AND INVENTORY=#{ew.entity.inventory}</if>
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<insert id="insert" parameterType="com.foreverwin.mesnac.dispatch.model.IssueItem">
INSERT INTO Z_ISSUE_ITEM
<trim prefix="(" suffix=")" suffixOverrides=",">
HANDLE,
<if test="site!=null">SITE,</if>
<if test="callItemNo!=null">CALL_ITEM_NO,</if>
<if test="shopOrder!=null">SHOP_ORDER,</if>
<if test="sfc!=null">SFC,</if>
<if test="item!=null">ITEM,</if>
<if test="inventory!=null">INVENTORY,</if>
<if test="qty!=null">QTY,</if>
<if test="createUser!=null">CREATE_USER,</if>
<if test="createdDateTime!=null">CREATED_DATE_TIME,</if>
<if test="modifyUser!=null">MODIFY_USER,</if>
<if test="modifiedDateTime!=null">MODIFIED_DATE_TIME,</if>
</trim> VALUES
<trim prefix="(" suffix=")" suffixOverrides=",">
#{handle},
<if test="site!=null">#{site},</if>
<if test="callItemNo!=null">#{callItemNo},</if>
<if test="shopOrder!=null">#{shopOrder},</if>
<if test="sfc!=null">#{sfc},</if>
<if test="item!=null">#{item},</if>
<if test="inventory!=null">#{inventory},</if>
<if test="qty!=null">#{qty},</if>
<if test="createUser!=null">#{createUser},</if>
<if test="createdDateTime!=null">#{createdDateTime},</if>
<if test="modifyUser!=null">#{modifyUser},</if>
<if test="modifiedDateTime!=null">#{modifiedDateTime},</if>
</trim>
</insert>
<insert id="insertAllColumn" parameterType="com.foreverwin.mesnac.dispatch.model.IssueItem">
INSERT INTO Z_ISSUE_ITEM
<trim prefix="(" suffix=")" suffixOverrides=",">
<include refid="Base_Column_List"></include>
</trim> VALUES
<trim prefix="(" suffix=")" suffixOverrides=",">
#{handle},
#{site},
#{callItemNo},
#{shopOrder},
#{sfc},
#{item},
#{inventory},
#{qty},
#{createUser},
#{createdDateTime},
#{modifyUser},
#{modifiedDateTime},
</trim>
</insert>
<update id="update">
UPDATE Z_ISSUE_ITEM <trim prefix="SET" suffixOverrides=",">
<if test="et.handle!=null">HANDLE=#{et.handle},</if>
<if test="et.site!=null">SITE=#{et.site},</if>
<if test="et.callItemNo!=null">CALL_ITEM_NO=#{et.callItemNo},</if>
<if test="et.shopOrder!=null">SHOP_ORDER=#{et.shopOrder},</if>
<if test="et.sfc!=null">SFC=#{et.sfc},</if>
<if test="et.item!=null">ITEM=#{et.item},</if>
<if test="et.inventory!=null">INVENTORY=#{et.inventory},</if>
<if test="et.qty!=null">QTY=#{et.qty},</if>
<if test="et.createUser!=null">CREATE_USER=#{et.createUser},</if>
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
<if test="et.modifyUser!=null">MODIFY_USER=#{et.modifyUser},</if>
<if test="et.modifiedDateTime!=null">MODIFIED_DATE_TIME=#{et.modifiedDateTime},</if>
</trim>
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
HANDLE=#{ew.entity.handle}
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.callItemNo!=null"> AND CALL_ITEM_NO=#{ew.entity.callItemNo}</if>
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<if test="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
<if test="ew.entity.inventory!=null"> AND INVENTORY=#{ew.entity.inventory}</if>
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</update>
<delete id="deleteByMap">
DELETE FROM Z_ISSUE_ITEM
<if test="cm!=null and !cm.isEmpty">
<where>
<foreach collection="cm.keys" item="k" separator="AND">
<if test="cm[k] != null">
${k} = #{cm[${k}]}
</if>
</foreach>
</where>
</if>
</delete>
<delete id="delete">
DELETE FROM Z_ISSUE_ITEM
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.callItemNo!=null"> AND CALL_ITEM_NO=#{ew.entity.callItemNo}</if>
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<if test="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
<if test="ew.entity.inventory!=null"> AND INVENTORY=#{ew.entity.inventory}</if>
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</delete>
<!-- BaseMapper标准查询/修改/删除 -->
</mapper>

@ -0,0 +1,444 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.foreverwin.mesnac.dispatch.mapper.SurplusItemReturnMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.foreverwin.mesnac.dispatch.model.SurplusItemReturn">
<id column="HANDLE" property="handle" />
<result column="SITE" property="site" />
<result column="INVENTORY" property="inventory" />
<result column="PARENT_INVENTORY" property="parentInventory" />
<result column="ITEM_BO" property="itemBo" />
<result column="LENGHT" property="lenght" />
<result column="WIDTH" property="width" />
<result column="QTY" property="qty" />
<result column="CREATE_USER_BO" property="createUserBo" />
<result column="CREATED_DATE_TIME" property="createdDateTime" />
<result column="UPDATE_USER_BO" property="updateUserBo" />
<result column="UPDATED_DATE_TIME" property="updatedDateTime" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
HANDLE, SITE, INVENTORY, PARENT_INVENTORY, ITEM_BO, LENGHT, WIDTH, QTY, CREATE_USER_BO, CREATED_DATE_TIME, UPDATE_USER_BO, UPDATED_DATE_TIME
</sql>
<!-- BaseMapper标准查询/修改/删除 -->
<select id="selectById" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include> FROM Z_SURPLUS_ITEM_RETURN WHERE HANDLE=#{handle}
</select>
<select id="selectByMap" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include>
FROM Z_SURPLUS_ITEM_RETURN
<if test="cm!=null and !cm.isEmpty">
<where>
<foreach collection="cm.keys" item="k" separator="AND">
<if test="cm[k] != null">
${k} = #{cm[${k}]}
</if>
</foreach>
</where>
</if>
</select>
<select id="selectBatchIds" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include>
FROM Z_SURPLUS_ITEM_RETURN WHERE HANDLE IN (
<foreach item="item" index="index" collection="coll" separator=",">#{item}
</foreach>)
</select>
<select id="selectOne" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include> FROM Z_SURPLUS_ITEM_RETURN
<where>
<if test="ew.entity.handle!=null">
HANDLE=#{ew.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.inventory!=null"> AND INVENTORY=#{ew.entity.inventory}</if>
<if test="ew.entity.parentInventory!=null"> AND PARENT_INVENTORY=#{ew.entity.parentInventory}</if>
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
<if test="ew.entity.lenght!=null"> AND LENGHT=#{ew.entity.lenght}</if>
<if test="ew.entity.width!=null"> AND WIDTH=#{ew.entity.width}</if>
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
<if test="ew.entity.createUserBo!=null"> AND CREATE_USER_BO=#{ew.entity.createUserBo}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.updateUserBo!=null"> AND UPDATE_USER_BO=#{ew.entity.updateUserBo}</if>
<if test="ew.entity.updatedDateTime!=null"> AND UPDATED_DATE_TIME=#{ew.entity.updatedDateTime}</if>
</where>
</select>
<select id="selectCount" resultType="Integer">
SELECT COUNT(1) FROM Z_SURPLUS_ITEM_RETURN
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.inventory!=null"> AND INVENTORY=#{ew.entity.inventory}</if>
<if test="ew.entity.parentInventory!=null"> AND PARENT_INVENTORY=#{ew.entity.parentInventory}</if>
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
<if test="ew.entity.lenght!=null"> AND LENGHT=#{ew.entity.lenght}</if>
<if test="ew.entity.width!=null"> AND WIDTH=#{ew.entity.width}</if>
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
<if test="ew.entity.createUserBo!=null"> AND CREATE_USER_BO=#{ew.entity.createUserBo}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.updateUserBo!=null"> AND UPDATE_USER_BO=#{ew.entity.updateUserBo}</if>
<if test="ew.entity.updatedDateTime!=null"> AND UPDATED_DATE_TIME=#{ew.entity.updatedDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectList" resultMap="BaseResultMap">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_SURPLUS_ITEM_RETURN
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.inventory!=null"> AND INVENTORY=#{ew.entity.inventory}</if>
<if test="ew.entity.parentInventory!=null"> AND PARENT_INVENTORY=#{ew.entity.parentInventory}</if>
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
<if test="ew.entity.lenght!=null"> AND LENGHT=#{ew.entity.lenght}</if>
<if test="ew.entity.width!=null"> AND WIDTH=#{ew.entity.width}</if>
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
<if test="ew.entity.createUserBo!=null"> AND CREATE_USER_BO=#{ew.entity.createUserBo}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.updateUserBo!=null"> AND UPDATE_USER_BO=#{ew.entity.updateUserBo}</if>
<if test="ew.entity.updatedDateTime!=null"> AND UPDATED_DATE_TIME=#{ew.entity.updatedDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectMaps" resultType="HashMap">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_SURPLUS_ITEM_RETURN
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.inventory!=null"> AND INVENTORY=#{ew.entity.inventory}</if>
<if test="ew.entity.parentInventory!=null"> AND PARENT_INVENTORY=#{ew.entity.parentInventory}</if>
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
<if test="ew.entity.lenght!=null"> AND LENGHT=#{ew.entity.lenght}</if>
<if test="ew.entity.width!=null"> AND WIDTH=#{ew.entity.width}</if>
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
<if test="ew.entity.createUserBo!=null"> AND CREATE_USER_BO=#{ew.entity.createUserBo}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.updateUserBo!=null"> AND UPDATE_USER_BO=#{ew.entity.updateUserBo}</if>
<if test="ew.entity.updatedDateTime!=null"> AND UPDATED_DATE_TIME=#{ew.entity.updatedDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectObjs" resultType="Object">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_SURPLUS_ITEM_RETURN
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.inventory!=null"> AND INVENTORY=#{ew.entity.inventory}</if>
<if test="ew.entity.parentInventory!=null"> AND PARENT_INVENTORY=#{ew.entity.parentInventory}</if>
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
<if test="ew.entity.lenght!=null"> AND LENGHT=#{ew.entity.lenght}</if>
<if test="ew.entity.width!=null"> AND WIDTH=#{ew.entity.width}</if>
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
<if test="ew.entity.createUserBo!=null"> AND CREATE_USER_BO=#{ew.entity.createUserBo}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.updateUserBo!=null"> AND UPDATE_USER_BO=#{ew.entity.updateUserBo}</if>
<if test="ew.entity.updatedDateTime!=null"> AND UPDATED_DATE_TIME=#{ew.entity.updatedDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectPage" resultMap="BaseResultMap">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_SURPLUS_ITEM_RETURN
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.inventory!=null"> AND INVENTORY=#{ew.entity.inventory}</if>
<if test="ew.entity.parentInventory!=null"> AND PARENT_INVENTORY=#{ew.entity.parentInventory}</if>
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
<if test="ew.entity.lenght!=null"> AND LENGHT=#{ew.entity.lenght}</if>
<if test="ew.entity.width!=null"> AND WIDTH=#{ew.entity.width}</if>
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
<if test="ew.entity.createUserBo!=null"> AND CREATE_USER_BO=#{ew.entity.createUserBo}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.updateUserBo!=null"> AND UPDATE_USER_BO=#{ew.entity.updateUserBo}</if>
<if test="ew.entity.updatedDateTime!=null"> AND UPDATED_DATE_TIME=#{ew.entity.updatedDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectMapsPage" resultType="HashMap">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_SURPLUS_ITEM_RETURN
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.inventory!=null"> AND INVENTORY=#{ew.entity.inventory}</if>
<if test="ew.entity.parentInventory!=null"> AND PARENT_INVENTORY=#{ew.entity.parentInventory}</if>
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
<if test="ew.entity.lenght!=null"> AND LENGHT=#{ew.entity.lenght}</if>
<if test="ew.entity.width!=null"> AND WIDTH=#{ew.entity.width}</if>
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
<if test="ew.entity.createUserBo!=null"> AND CREATE_USER_BO=#{ew.entity.createUserBo}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.updateUserBo!=null"> AND UPDATE_USER_BO=#{ew.entity.updateUserBo}</if>
<if test="ew.entity.updatedDateTime!=null"> AND UPDATED_DATE_TIME=#{ew.entity.updatedDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<insert id="insert" parameterType="com.foreverwin.mesnac.dispatch.model.SurplusItemReturn">
INSERT INTO Z_SURPLUS_ITEM_RETURN
<trim prefix="(" suffix=")" suffixOverrides=",">
HANDLE,
<if test="site!=null">SITE,</if>
<if test="inventory!=null">INVENTORY,</if>
<if test="parentInventory!=null">PARENT_INVENTORY,</if>
<if test="itemBo!=null">ITEM_BO,</if>
<if test="lenght!=null">LENGHT,</if>
<if test="width!=null">WIDTH,</if>
<if test="qty!=null">QTY,</if>
<if test="createUserBo!=null">CREATE_USER_BO,</if>
<if test="createdDateTime!=null">CREATED_DATE_TIME,</if>
<if test="updateUserBo!=null">UPDATE_USER_BO,</if>
<if test="updatedDateTime!=null">UPDATED_DATE_TIME,</if>
</trim> VALUES
<trim prefix="(" suffix=")" suffixOverrides=",">
#{handle},
<if test="site!=null">#{site},</if>
<if test="inventory!=null">#{inventory},</if>
<if test="parentInventory!=null">#{parentInventory},</if>
<if test="itemBo!=null">#{itemBo},</if>
<if test="lenght!=null">#{lenght},</if>
<if test="width!=null">#{width},</if>
<if test="qty!=null">#{qty},</if>
<if test="createUserBo!=null">#{createUserBo},</if>
<if test="createdDateTime!=null">#{createdDateTime},</if>
<if test="updateUserBo!=null">#{updateUserBo},</if>
<if test="updatedDateTime!=null">#{updatedDateTime},</if>
</trim>
</insert>
<insert id="insertAllColumn" parameterType="com.foreverwin.mesnac.dispatch.model.SurplusItemReturn">
INSERT INTO Z_SURPLUS_ITEM_RETURN
<trim prefix="(" suffix=")" suffixOverrides=",">
<include refid="Base_Column_List"></include>
</trim> VALUES
<trim prefix="(" suffix=")" suffixOverrides=",">
#{handle},
#{site},
#{inventory},
#{parentInventory},
#{itemBo},
#{lenght},
#{width},
#{qty},
#{createUserBo},
#{createdDateTime},
#{updateUserBo},
#{updatedDateTime},
</trim>
</insert>
<update id="updateById">
UPDATE Z_SURPLUS_ITEM_RETURN <trim prefix="SET" suffixOverrides=",">
<if test="et.site!=null">SITE=#{et.site},</if>
<if test="et.inventory!=null">INVENTORY=#{et.inventory},</if>
<if test="et.parentInventory!=null">PARENT_INVENTORY=#{et.parentInventory},</if>
<if test="et.itemBo!=null">ITEM_BO=#{et.itemBo},</if>
<if test="et.lenght!=null">LENGHT=#{et.lenght},</if>
<if test="et.width!=null">WIDTH=#{et.width},</if>
<if test="et.qty!=null">QTY=#{et.qty},</if>
<if test="et.createUserBo!=null">CREATE_USER_BO=#{et.createUserBo},</if>
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
<if test="et.updateUserBo!=null">UPDATE_USER_BO=#{et.updateUserBo},</if>
<if test="et.updatedDateTime!=null">UPDATED_DATE_TIME=#{et.updatedDateTime},</if>
</trim> WHERE HANDLE=#{et.handle} <if test="et instanceof java.util.Map"><if test="et.MP_OPTLOCK_VERSION_ORIGINAL!=null">and ${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}</if></if>
</update>
<update id="updateAllColumnById">
UPDATE Z_SURPLUS_ITEM_RETURN <trim prefix="SET" suffixOverrides=",">
SITE=#{et.site},
INVENTORY=#{et.inventory},
PARENT_INVENTORY=#{et.parentInventory},
ITEM_BO=#{et.itemBo},
LENGHT=#{et.lenght},
WIDTH=#{et.width},
QTY=#{et.qty},
CREATE_USER_BO=#{et.createUserBo},
CREATED_DATE_TIME=#{et.createdDateTime},
UPDATE_USER_BO=#{et.updateUserBo},
UPDATED_DATE_TIME=#{et.updatedDateTime},
</trim> WHERE HANDLE=#{et.handle} <if test="et instanceof java.util.Map"><if test="et.MP_OPTLOCK_VERSION_ORIGINAL!=null">and ${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}</if></if>
</update>
<update id="update">
UPDATE Z_SURPLUS_ITEM_RETURN <trim prefix="SET" suffixOverrides=",">
<if test="et.site!=null">SITE=#{et.site},</if>
<if test="et.inventory!=null">INVENTORY=#{et.inventory},</if>
<if test="et.parentInventory!=null">PARENT_INVENTORY=#{et.parentInventory},</if>
<if test="et.itemBo!=null">ITEM_BO=#{et.itemBo},</if>
<if test="et.lenght!=null">LENGHT=#{et.lenght},</if>
<if test="et.width!=null">WIDTH=#{et.width},</if>
<if test="et.qty!=null">QTY=#{et.qty},</if>
<if test="et.createUserBo!=null">CREATE_USER_BO=#{et.createUserBo},</if>
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
<if test="et.updateUserBo!=null">UPDATE_USER_BO=#{et.updateUserBo},</if>
<if test="et.updatedDateTime!=null">UPDATED_DATE_TIME=#{et.updatedDateTime},</if>
</trim>
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
HANDLE=#{ew.entity.handle}
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.inventory!=null"> AND INVENTORY=#{ew.entity.inventory}</if>
<if test="ew.entity.parentInventory!=null"> AND PARENT_INVENTORY=#{ew.entity.parentInventory}</if>
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
<if test="ew.entity.lenght!=null"> AND LENGHT=#{ew.entity.lenght}</if>
<if test="ew.entity.width!=null"> AND WIDTH=#{ew.entity.width}</if>
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
<if test="ew.entity.createUserBo!=null"> AND CREATE_USER_BO=#{ew.entity.createUserBo}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.updateUserBo!=null"> AND UPDATE_USER_BO=#{ew.entity.updateUserBo}</if>
<if test="ew.entity.updatedDateTime!=null"> AND UPDATED_DATE_TIME=#{ew.entity.updatedDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</update>
<delete id="deleteById">
DELETE FROM Z_SURPLUS_ITEM_RETURN WHERE HANDLE=#{handle}
</delete>
<delete id="deleteByMap">
DELETE FROM Z_SURPLUS_ITEM_RETURN
<if test="cm!=null and !cm.isEmpty">
<where>
<foreach collection="cm.keys" item="k" separator="AND">
<if test="cm[k] != null">
${k} = #{cm[${k}]}
</if>
</foreach>
</where>
</if>
</delete>
<delete id="delete">
DELETE FROM Z_SURPLUS_ITEM_RETURN
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.inventory!=null"> AND INVENTORY=#{ew.entity.inventory}</if>
<if test="ew.entity.parentInventory!=null"> AND PARENT_INVENTORY=#{ew.entity.parentInventory}</if>
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
<if test="ew.entity.lenght!=null"> AND LENGHT=#{ew.entity.lenght}</if>
<if test="ew.entity.width!=null"> AND WIDTH=#{ew.entity.width}</if>
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
<if test="ew.entity.createUserBo!=null"> AND CREATE_USER_BO=#{ew.entity.createUserBo}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.updateUserBo!=null"> AND UPDATE_USER_BO=#{ew.entity.updateUserBo}</if>
<if test="ew.entity.updatedDateTime!=null"> AND UPDATED_DATE_TIME=#{ew.entity.updatedDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</delete>
<delete id="deleteBatchIds">
DELETE FROM Z_SURPLUS_ITEM_RETURN WHERE HANDLE IN (
<foreach item="item" index="index" collection="coll" separator=",">#{item}
</foreach>)
</delete>
<!-- BaseMapper标准查询/修改/删除 -->
<select id="selectInventoryData" resultType="hashMap">
SELECT IV.HANDLE, IV.SITE, IV.INVENTORY_ID, IV.QTY_ON_HAND, IM.ITEM, IT.DESCRIPTION, CS1.VALUE PER_METER, CS2.VALUE PER_SQUARE_METER
FROM INVENTORY IV
INNER JOIN ITEM IM ON IM.HANDLE = IV.ITEM_BO
LEFT JOIN ITEM_T IT ON IT.ITEM_BO = IM.HANDLE AND IT.LOCALE = 'zh'
LEFT JOIN CUSTOM_FIELDS CS1 ON CS1.HANDLE = IM.HANDLE AND CS1.ATTRIBUTE = 'PER_METER'
LEFT JOIN CUSTOM_FIELDS CS2 ON CS2.HANDLE = IM.HANDLE AND CS2.ATTRIBUTE = 'PER_SQUARE_METER'
WHERE IV.HANDLE = #{inventoryBo}
</select>
</mapper>

@ -33,9 +33,9 @@ public class GeneratorApplication {
dataSourceConfig.setTypeConvert( new OracleTypeConvert() );
MpGenerator mpGenerator = mpGeneratorBuilder.dataSourceConfig(dataSourceConfig)
.tablePrefix( "APS_", "DS_", "Z_" )
.packageName( "com.foreverwin.mesnac.equip" )
.tables("Z_RESOURCE_INSPECT_TASK_SPARE")
.author("pavel.Liu")
.packageName( "com.foreverwin.mesnac.dispatch" )
.tables("Z_SURPLUS_ITEM_RETURN")
.author("Leon.L")
.uiAppId("com.foreverwin.me")
.uiPackage("com.foreverwin.me.migration")
.build();

@ -576,11 +576,7 @@ public class InterfaceServiceImpl implements InterfaceService {
String factory = itemBatchDto.getFACTORY();
//查询物料和批次是否已经存在记录
ItemBatch queryBatch = new ItemBatch();
queryBatch.setBatch(site);
queryBatch.setItem(item);
queryBatch.setBatch(batch);
List<ItemBatch> itemBatchList = itemBatchService.selectList(queryBatch);
List<ItemBatch> itemBatchList = itemBatchService.findItemBatch(site, item, batch);
if (itemBatchList != null && itemBatchList.size() > 0) {
//更新时间
ItemBatch itemBatch = itemBatchList.get(0);

@ -0,0 +1,18 @@
package com.foreverwin.mesnac.meapi.mapper;
import com.foreverwin.mesnac.meapi.model.Inventory;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
/**
* <p>
* Mapper
* </p>
*
* @author Leon.L
* @since 2021-07-09
*/
@Repository
public interface InventoryMapper extends BaseMapper<Inventory> {
}

@ -29,27 +29,4 @@ public interface ItemMapper extends BaseMapper<Item> {
Item selectById(@Param("locale") String locale, @Param("handle") String handle);
List<Item> selectListByCriteria(@Param("locale") String locale, @Param("ew") Wrapper<Item> wrapper);
Item getItemDescription(@Param("item") String item,@Param("locale")String locale, @Param("site") String site);
List<Item> getItemDetailList(@Param("site") String site,@Param("local")String local);
List<Item> selectItemControlList(@Param("locale") String locale, @Param("ew") Wrapper<Item> wrapper);
IPage<Item>getItemPageByProdVer(IPage page,@Param("site") String site,@Param("local")String local,@Param("query") String query);
IPage<Item> getBklasItem(IPage page,@Param("site")String site,@Param("local")String local,@Param("itemOrDesc")String itemOrDesc);
IPage<Item>getRawMaterial(IPage page,@Param("site")String site,@Param("local")String local,@Param("itemOrDesc")String itemOrDesc);
int checkItemUnit(@Param("unit")String unit,@Param("site")String site,@Param("item")String item);
Item selectItemBo(@Param("site") String site,@Param("item") String item);
Integer findItemNum(@Param("site") String site,@Param("item") String item);
List<Item> selectInnerOrder(@Param("site") String site, @Param("itemBo") String handle);
List<Item> selectItemSnp(@Param("site") String site,@Param("item") String item);
Item selectBatchReview(@Param("site") String site,@Param("item") String item);
}

@ -0,0 +1,443 @@
package com.foreverwin.mesnac.meapi.model;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.IdType;
/**
* <p>
*
* </p>
*
* @author Leon.L
* @since 2021-07-09
*/
@TableName("INVENTORY")
public class Inventory extends Model<Inventory> {
private static final long serialVersionUID = 1L;
@TableId(value = "HANDLE", type = IdType.INPUT)
private String handle;
@TableField("CHANGE_STAMP")
private Long changeStamp;
@TableField("SITE")
private String site;
@TableField("INVENTORY_ID")
private String inventoryId;
@TableField("ITEM_BO")
private String itemBo;
@TableField("INVENTORY_CONTEXT_GBO")
private String inventoryContextGbo;
@TableField("DESCRIPTION")
private String description;
@TableField("QTY_ON_HAND")
private Double qtyOnHand;
@TableField("ASSY_DATA_TYPE_BO")
private String assyDataTypeBo;
@TableField("USAGE_COUNT")
private Long usageCount;
@TableField("MAXIMUM_USAGE")
private Long maximumUsage;
@TableField("STATUS_BO")
private String statusBo;
@TableField("ORIGINAL_QTY")
private Double originalQty;
@TableField("WORK_CENTER_LOC_BO")
private String workCenterLocBo;
@TableField("WORK_CENTER_LOC_RES")
private String workCenterLocRes;
@TableField("OPERATION_LOC_BO")
private String operationLocBo;
@TableField("OPERATION_LOC_RES")
private String operationLocRes;
@TableField("RESOURCE_LOC_BO")
private String resourceLocBo;
@TableField("RESOURCE_LOC_RES")
private String resourceLocRes;
@TableField("SHOP_ORDER_LOC_BO")
private String shopOrderLocBo;
@TableField("SHOP_ORDER_LOC_RES")
private String shopOrderLocRes;
@TableField("SHOP_ORDER_SET_BY_ERP")
private String shopOrderSetByErp;
@TableField("ORIGINAL_USER_BO")
private String originalUserBo;
@TableField("STORAGE_LOCATION_BO")
private String storageLocationBo;
@TableField("HAS_BEEN_USED")
private String hasBeenUsed;
@TableField("RECEIVE_DATE_TIME")
private LocalDateTime receiveDateTime;
@TableField("CREATED_DATE_TIME")
private LocalDateTime createdDateTime;
@TableField("MODIFIED_DATE_TIME")
private LocalDateTime modifiedDateTime;
@TableField("PARTITION_DATE")
private LocalDateTime partitionDate;
@TableField("PARENT_INVENTORY_BO")
private String parentInventoryBo;
@TableField("ERP_INVENTORY")
private String erpInventory;
public String getHandle() {
return handle;
}
public void setHandle(String handle) {
this.handle = handle;
}
public Long getChangeStamp() {
return changeStamp;
}
public void setChangeStamp(Long changeStamp) {
this.changeStamp = changeStamp;
}
public String getSite() {
return site;
}
public void setSite(String site) {
this.site = site;
}
public String getInventoryId() {
return inventoryId;
}
public void setInventoryId(String inventoryId) {
this.inventoryId = inventoryId;
}
public String getItemBo() {
return itemBo;
}
public void setItemBo(String itemBo) {
this.itemBo = itemBo;
}
public String getInventoryContextGbo() {
return inventoryContextGbo;
}
public void setInventoryContextGbo(String inventoryContextGbo) {
this.inventoryContextGbo = inventoryContextGbo;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public Double getQtyOnHand() {
return qtyOnHand;
}
public void setQtyOnHand(Double qtyOnHand) {
this.qtyOnHand = qtyOnHand;
}
public String getAssyDataTypeBo() {
return assyDataTypeBo;
}
public void setAssyDataTypeBo(String assyDataTypeBo) {
this.assyDataTypeBo = assyDataTypeBo;
}
public Long getUsageCount() {
return usageCount;
}
public void setUsageCount(Long usageCount) {
this.usageCount = usageCount;
}
public Long getMaximumUsage() {
return maximumUsage;
}
public void setMaximumUsage(Long maximumUsage) {
this.maximumUsage = maximumUsage;
}
public String getStatusBo() {
return statusBo;
}
public void setStatusBo(String statusBo) {
this.statusBo = statusBo;
}
public Double getOriginalQty() {
return originalQty;
}
public void setOriginalQty(Double originalQty) {
this.originalQty = originalQty;
}
public String getWorkCenterLocBo() {
return workCenterLocBo;
}
public void setWorkCenterLocBo(String workCenterLocBo) {
this.workCenterLocBo = workCenterLocBo;
}
public String getWorkCenterLocRes() {
return workCenterLocRes;
}
public void setWorkCenterLocRes(String workCenterLocRes) {
this.workCenterLocRes = workCenterLocRes;
}
public String getOperationLocBo() {
return operationLocBo;
}
public void setOperationLocBo(String operationLocBo) {
this.operationLocBo = operationLocBo;
}
public String getOperationLocRes() {
return operationLocRes;
}
public void setOperationLocRes(String operationLocRes) {
this.operationLocRes = operationLocRes;
}
public String getResourceLocBo() {
return resourceLocBo;
}
public void setResourceLocBo(String resourceLocBo) {
this.resourceLocBo = resourceLocBo;
}
public String getResourceLocRes() {
return resourceLocRes;
}
public void setResourceLocRes(String resourceLocRes) {
this.resourceLocRes = resourceLocRes;
}
public String getShopOrderLocBo() {
return shopOrderLocBo;
}
public void setShopOrderLocBo(String shopOrderLocBo) {
this.shopOrderLocBo = shopOrderLocBo;
}
public String getShopOrderLocRes() {
return shopOrderLocRes;
}
public void setShopOrderLocRes(String shopOrderLocRes) {
this.shopOrderLocRes = shopOrderLocRes;
}
public String getShopOrderSetByErp() {
return shopOrderSetByErp;
}
public void setShopOrderSetByErp(String shopOrderSetByErp) {
this.shopOrderSetByErp = shopOrderSetByErp;
}
public String getOriginalUserBo() {
return originalUserBo;
}
public void setOriginalUserBo(String originalUserBo) {
this.originalUserBo = originalUserBo;
}
public String getStorageLocationBo() {
return storageLocationBo;
}
public void setStorageLocationBo(String storageLocationBo) {
this.storageLocationBo = storageLocationBo;
}
public String getHasBeenUsed() {
return hasBeenUsed;
}
public void setHasBeenUsed(String hasBeenUsed) {
this.hasBeenUsed = hasBeenUsed;
}
public LocalDateTime getReceiveDateTime() {
return receiveDateTime;
}
public void setReceiveDateTime(LocalDateTime receiveDateTime) {
this.receiveDateTime = receiveDateTime;
}
public LocalDateTime getCreatedDateTime() {
return createdDateTime;
}
public void setCreatedDateTime(LocalDateTime createdDateTime) {
this.createdDateTime = createdDateTime;
}
public LocalDateTime getModifiedDateTime() {
return modifiedDateTime;
}
public void setModifiedDateTime(LocalDateTime modifiedDateTime) {
this.modifiedDateTime = modifiedDateTime;
}
public LocalDateTime getPartitionDate() {
return partitionDate;
}
public void setPartitionDate(LocalDateTime partitionDate) {
this.partitionDate = partitionDate;
}
public String getParentInventoryBo() {
return parentInventoryBo;
}
public void setParentInventoryBo(String parentInventoryBo) {
this.parentInventoryBo = parentInventoryBo;
}
public String getErpInventory() {
return erpInventory;
}
public void setErpInventory(String erpInventory) {
this.erpInventory = erpInventory;
}
public static final String HANDLE = "HANDLE";
public static final String CHANGE_STAMP = "CHANGE_STAMP";
public static final String SITE = "SITE";
public static final String INVENTORY_ID = "INVENTORY_ID";
public static final String ITEM_BO = "ITEM_BO";
public static final String INVENTORY_CONTEXT_GBO = "INVENTORY_CONTEXT_GBO";
public static final String DESCRIPTION = "DESCRIPTION";
public static final String QTY_ON_HAND = "QTY_ON_HAND";
public static final String ASSY_DATA_TYPE_BO = "ASSY_DATA_TYPE_BO";
public static final String USAGE_COUNT = "USAGE_COUNT";
public static final String MAXIMUM_USAGE = "MAXIMUM_USAGE";
public static final String STATUS_BO = "STATUS_BO";
public static final String ORIGINAL_QTY = "ORIGINAL_QTY";
public static final String WORK_CENTER_LOC_BO = "WORK_CENTER_LOC_BO";
public static final String WORK_CENTER_LOC_RES = "WORK_CENTER_LOC_RES";
public static final String OPERATION_LOC_BO = "OPERATION_LOC_BO";
public static final String OPERATION_LOC_RES = "OPERATION_LOC_RES";
public static final String RESOURCE_LOC_BO = "RESOURCE_LOC_BO";
public static final String RESOURCE_LOC_RES = "RESOURCE_LOC_RES";
public static final String SHOP_ORDER_LOC_BO = "SHOP_ORDER_LOC_BO";
public static final String SHOP_ORDER_LOC_RES = "SHOP_ORDER_LOC_RES";
public static final String SHOP_ORDER_SET_BY_ERP = "SHOP_ORDER_SET_BY_ERP";
public static final String ORIGINAL_USER_BO = "ORIGINAL_USER_BO";
public static final String STORAGE_LOCATION_BO = "STORAGE_LOCATION_BO";
public static final String HAS_BEEN_USED = "HAS_BEEN_USED";
public static final String RECEIVE_DATE_TIME = "RECEIVE_DATE_TIME";
public static final String CREATED_DATE_TIME = "CREATED_DATE_TIME";
public static final String MODIFIED_DATE_TIME = "MODIFIED_DATE_TIME";
public static final String PARTITION_DATE = "PARTITION_DATE";
public static final String PARENT_INVENTORY_BO = "PARENT_INVENTORY_BO";
public static final String ERP_INVENTORY = "ERP_INVENTORY";
@Override
protected Serializable pkVal() {
return this.handle;
}
@Override
public String toString() {
return "Inventory{" +
"handle = " + handle +
", changeStamp = " + changeStamp +
", site = " + site +
", inventoryId = " + inventoryId +
", itemBo = " + itemBo +
", inventoryContextGbo = " + inventoryContextGbo +
", description = " + description +
", qtyOnHand = " + qtyOnHand +
", assyDataTypeBo = " + assyDataTypeBo +
", usageCount = " + usageCount +
", maximumUsage = " + maximumUsage +
", statusBo = " + statusBo +
", originalQty = " + originalQty +
", workCenterLocBo = " + workCenterLocBo +
", workCenterLocRes = " + workCenterLocRes +
", operationLocBo = " + operationLocBo +
", operationLocRes = " + operationLocRes +
", resourceLocBo = " + resourceLocBo +
", resourceLocRes = " + resourceLocRes +
", shopOrderLocBo = " + shopOrderLocBo +
", shopOrderLocRes = " + shopOrderLocRes +
", shopOrderSetByErp = " + shopOrderSetByErp +
", originalUserBo = " + originalUserBo +
", storageLocationBo = " + storageLocationBo +
", hasBeenUsed = " + hasBeenUsed +
", receiveDateTime = " + receiveDateTime +
", createdDateTime = " + createdDateTime +
", modifiedDateTime = " + modifiedDateTime +
", partitionDate = " + partitionDate +
", parentInventoryBo = " + parentInventoryBo +
", erpInventory = " + erpInventory +
"}";
}
}

@ -0,0 +1,28 @@
package com.foreverwin.mesnac.meapi.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.foreverwin.mesnac.meapi.model.Inventory;
import com.baomidou.mybatisplus.extension.service.IService;
import com.foreverwin.modular.core.util.FrontPage;
import java.util.List;
/**
* <p>
*
* </p>
*
* @author Leon.L
* @since 2021-07-09
*/
public interface InventoryService extends IService<Inventory> {
/**
*
* @param frontPage
* @return
*/
IPage<Inventory> selectPage(FrontPage<Inventory> frontPage, Inventory inventory);
List<Inventory> selectList(Inventory inventory);
}

@ -31,41 +31,11 @@ public interface ItemService extends IService<Item> {
List<Item> selectList(Item item);
List<Item> selectItemWithDesc(Item item);
List<Item> selectItemWithDesc(QueryWrapper<Item> queryWrapper);
List<Item> selectList(Wrapper<Item> queryWrapper);
List<Item> getItemDetailList();
Item getItemDescription(String item);
String selectCurrent(String handle);
Item selectCurrent(String site, String item);
List<Item> selectItemLabelControl(QueryWrapper<Item> queryWrapper);
IPage<Item>getItemPageByProdVer(IPage page, String query);
IPage<Item> getBklasItem(IPage page,String itemOrDesc);
IPage<Item>getRawMaterial(IPage page,String item);
Integer checkItemUnit(String unit,String site,String item);
/**
*
* @param item
* @param local
* @return
*/
Item getItemDescription(String item, String local);
List<Item> selectInnerOrder(String site, String handle);
List<Item> selectItemSnp(String site, String item);
Item selectBatchReview(String site, String item);
}

@ -0,0 +1,46 @@
package com.foreverwin.mesnac.meapi.service.impl;
import com.foreverwin.modular.core.util.FrontPage;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.foreverwin.mesnac.meapi.model.Inventory;
import com.foreverwin.mesnac.meapi.mapper.InventoryMapper;
import com.foreverwin.mesnac.meapi.service.InventoryService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.logging.Handler;
/**
* <p>
*
* </p>
*
* @author Leon.L
* @since 2021-07-09
*/
@Service
@Transactional(rollbackFor = Exception.class)
public class InventoryServiceImpl extends ServiceImpl<InventoryMapper, Inventory> implements InventoryService {
@Autowired
private InventoryMapper inventoryMapper;
@Override
public IPage<Inventory> selectPage(FrontPage<Inventory> frontPage, Inventory inventory) {
QueryWrapper<Inventory> queryWrapper = new QueryWrapper<>();
queryWrapper.setEntity(inventory);
return super.page(frontPage.getPagePlus(), queryWrapper);
}
@Override
public List<Inventory> selectList(Inventory inventory) {
QueryWrapper<Inventory> queryWrapper = new QueryWrapper<>();
queryWrapper.setEntity(inventory);
return super.list(queryWrapper);
}
}

@ -72,40 +72,6 @@ public class ItemServiceImpl extends ServiceImpl<ItemMapper, Item> implements It
}
@Override
public List<Item> getItemDetailList() {
String site= CommonMethods.getSite();
String local=LocaleContextHolder.getLocale().getLanguage();
return itemMapper.getItemDetailList(site,local);
}
@Override
public Item getItemDescription(String item) {
String site= CommonMethods.getSite();
String local=LocaleContextHolder.getLocale().getLanguage();
return itemMapper.getItemDescription(item,local,site);
}
@Override
public List<Item> selectItemWithDesc(Item item) {
Locale locale = LocaleContextHolder.getLocale();
String site = CommonMethods.getSite();
QueryWrapper<Item> queryWrapper = new QueryWrapper<>();
queryWrapper.eq(Item.SITE, site);
if( item.getItem() != null){
queryWrapper.like(Item.ITEM, item.getItem());
}
if(item.getDescription()!= null){
queryWrapper.like(Item.DESCRIPTION, item.getDescription());
}
return itemMapper.selectListByCriteria(locale.getLanguage(), queryWrapper);
}
@Override
public List<Item> selectItemWithDesc(QueryWrapper<Item> queryWrapper) {
return itemMapper.selectListByCriteria(LocaleContextHolder.getLocale().getLanguage(), queryWrapper);
}
@Override
public String selectCurrent(String handle){
if(handle.endsWith("#")) {
@ -129,61 +95,4 @@ public class ItemServiceImpl extends ServiceImpl<ItemMapper, Item> implements It
//----------------------------------------------------------------------------------
return resultLit != null && resultLit.size() > 0 ? resultLit.get(0) : null;
}
@Override
public List<Item> selectItemLabelControl(QueryWrapper<Item> queryWrapper) {
return itemMapper.selectItemControlList(LocaleContextHolder.getLocale().getLanguage(), queryWrapper);
}
@Override
public IPage<Item> getItemPageByProdVer(IPage page, String query) {
String site=CommonMethods.getSite();
String local=LocaleContextHolder.getLocale().getLanguage();
return itemMapper.getItemPageByProdVer(page,site,local,query);
}
@Override
public IPage<Item> getBklasItem(IPage page, String itemOrDesc) {
String site=CommonMethods.getSite();
String local=LocaleContextHolder.getLocale().getLanguage();
return itemMapper.getBklasItem(page,site,local,itemOrDesc);
}
@Override
public IPage<Item> getRawMaterial(IPage page, String item) {
String local=LocaleContextHolder.getLocale().getLanguage();
String site=CommonMethods.getSite();
return itemMapper.getRawMaterial(page,site,local,item);
}
@Override
public Integer checkItemUnit(String unit, String site, String item) {
return itemMapper.checkItemUnit(unit,site,item);
}
@Override
public Item getItemDescription(String item, String local) {
String site = CommonMethods.getSite();
return itemMapper.getItemDescription(item, local, site);
}
@Override
public List<Item> selectInnerOrder(String site, String handle) {
return itemMapper.selectInnerOrder(site, handle);
}
@Override
public List<Item> selectItemSnp(String site, String item) {
return itemMapper.selectItemSnp(site, item);
}
@Override
public Item selectBatchReview(String site, String item) {
return itemMapper.selectBatchReview(site,item);
}
}

@ -0,0 +1,654 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.foreverwin.mesnac.meapi.mapper.InventoryMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.foreverwin.mesnac.meapi.model.Inventory">
<result column="HANDLE" property="handle" />
<result column="CHANGE_STAMP" property="changeStamp" />
<result column="SITE" property="site" />
<result column="INVENTORY_ID" property="inventoryId" />
<result column="ITEM_BO" property="itemBo" />
<result column="INVENTORY_CONTEXT_GBO" property="inventoryContextGbo" />
<result column="DESCRIPTION" property="description" />
<result column="QTY_ON_HAND" property="qtyOnHand" />
<result column="ASSY_DATA_TYPE_BO" property="assyDataTypeBo" />
<result column="USAGE_COUNT" property="usageCount" />
<result column="MAXIMUM_USAGE" property="maximumUsage" />
<result column="STATUS_BO" property="statusBo" />
<result column="ORIGINAL_QTY" property="originalQty" />
<result column="WORK_CENTER_LOC_BO" property="workCenterLocBo" />
<result column="WORK_CENTER_LOC_RES" property="workCenterLocRes" />
<result column="OPERATION_LOC_BO" property="operationLocBo" />
<result column="OPERATION_LOC_RES" property="operationLocRes" />
<result column="RESOURCE_LOC_BO" property="resourceLocBo" />
<result column="RESOURCE_LOC_RES" property="resourceLocRes" />
<result column="SHOP_ORDER_LOC_BO" property="shopOrderLocBo" />
<result column="SHOP_ORDER_LOC_RES" property="shopOrderLocRes" />
<result column="SHOP_ORDER_SET_BY_ERP" property="shopOrderSetByErp" />
<result column="ORIGINAL_USER_BO" property="originalUserBo" />
<result column="STORAGE_LOCATION_BO" property="storageLocationBo" />
<result column="HAS_BEEN_USED" property="hasBeenUsed" />
<result column="RECEIVE_DATE_TIME" property="receiveDateTime" />
<result column="CREATED_DATE_TIME" property="createdDateTime" />
<result column="MODIFIED_DATE_TIME" property="modifiedDateTime" />
<result column="PARTITION_DATE" property="partitionDate" />
<result column="PARENT_INVENTORY_BO" property="parentInventoryBo" />
<result column="ERP_INVENTORY" property="erpInventory" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
HANDLE, CHANGE_STAMP, SITE, INVENTORY_ID, ITEM_BO, INVENTORY_CONTEXT_GBO, DESCRIPTION, QTY_ON_HAND, ASSY_DATA_TYPE_BO, USAGE_COUNT, MAXIMUM_USAGE, STATUS_BO, ORIGINAL_QTY, WORK_CENTER_LOC_BO, WORK_CENTER_LOC_RES, OPERATION_LOC_BO, OPERATION_LOC_RES, RESOURCE_LOC_BO, RESOURCE_LOC_RES, SHOP_ORDER_LOC_BO, SHOP_ORDER_LOC_RES, SHOP_ORDER_SET_BY_ERP, ORIGINAL_USER_BO, STORAGE_LOCATION_BO, HAS_BEEN_USED, RECEIVE_DATE_TIME, CREATED_DATE_TIME, MODIFIED_DATE_TIME, PARTITION_DATE, PARENT_INVENTORY_BO, ERP_INVENTORY
</sql>
<!-- BaseMapper标准查询/修改/删除 -->
<select id="selectByMap" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include>
FROM INVENTORY
<if test="cm!=null and !cm.isEmpty">
<where>
<foreach collection="cm.keys" item="k" separator="AND">
<if test="cm[k] != null">
${k} = #{cm[${k}]}
</if>
</foreach>
</where>
</if>
</select>
<select id="selectOne" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include> FROM INVENTORY
<where>
<if test="ew.entity.handle!=null">
HANDLE=#{ew.handle}
</if>
<if test="ew.entity.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.inventoryId!=null"> AND INVENTORY_ID=#{ew.entity.inventoryId}</if>
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
<if test="ew.entity.inventoryContextGbo!=null"> AND INVENTORY_CONTEXT_GBO=#{ew.entity.inventoryContextGbo}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.qtyOnHand!=null"> AND QTY_ON_HAND=#{ew.entity.qtyOnHand}</if>
<if test="ew.entity.assyDataTypeBo!=null"> AND ASSY_DATA_TYPE_BO=#{ew.entity.assyDataTypeBo}</if>
<if test="ew.entity.usageCount!=null"> AND USAGE_COUNT=#{ew.entity.usageCount}</if>
<if test="ew.entity.maximumUsage!=null"> AND MAXIMUM_USAGE=#{ew.entity.maximumUsage}</if>
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
<if test="ew.entity.originalQty!=null"> AND ORIGINAL_QTY=#{ew.entity.originalQty}</if>
<if test="ew.entity.workCenterLocBo!=null"> AND WORK_CENTER_LOC_BO=#{ew.entity.workCenterLocBo}</if>
<if test="ew.entity.workCenterLocRes!=null"> AND WORK_CENTER_LOC_RES=#{ew.entity.workCenterLocRes}</if>
<if test="ew.entity.operationLocBo!=null"> AND OPERATION_LOC_BO=#{ew.entity.operationLocBo}</if>
<if test="ew.entity.operationLocRes!=null"> AND OPERATION_LOC_RES=#{ew.entity.operationLocRes}</if>
<if test="ew.entity.resourceLocBo!=null"> AND RESOURCE_LOC_BO=#{ew.entity.resourceLocBo}</if>
<if test="ew.entity.resourceLocRes!=null"> AND RESOURCE_LOC_RES=#{ew.entity.resourceLocRes}</if>
<if test="ew.entity.shopOrderLocBo!=null"> AND SHOP_ORDER_LOC_BO=#{ew.entity.shopOrderLocBo}</if>
<if test="ew.entity.shopOrderLocRes!=null"> AND SHOP_ORDER_LOC_RES=#{ew.entity.shopOrderLocRes}</if>
<if test="ew.entity.shopOrderSetByErp!=null"> AND SHOP_ORDER_SET_BY_ERP=#{ew.entity.shopOrderSetByErp}</if>
<if test="ew.entity.originalUserBo!=null"> AND ORIGINAL_USER_BO=#{ew.entity.originalUserBo}</if>
<if test="ew.entity.storageLocationBo!=null"> AND STORAGE_LOCATION_BO=#{ew.entity.storageLocationBo}</if>
<if test="ew.entity.hasBeenUsed!=null"> AND HAS_BEEN_USED=#{ew.entity.hasBeenUsed}</if>
<if test="ew.entity.receiveDateTime!=null"> AND RECEIVE_DATE_TIME=#{ew.entity.receiveDateTime}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<if test="ew.entity.partitionDate!=null"> AND PARTITION_DATE=#{ew.entity.partitionDate}</if>
<if test="ew.entity.parentInventoryBo!=null"> AND PARENT_INVENTORY_BO=#{ew.entity.parentInventoryBo}</if>
<if test="ew.entity.erpInventory!=null"> AND ERP_INVENTORY=#{ew.entity.erpInventory}</if>
</where>
</select>
<select id="selectCount" resultType="Integer">
SELECT COUNT(1) FROM INVENTORY
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.inventoryId!=null"> AND INVENTORY_ID=#{ew.entity.inventoryId}</if>
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
<if test="ew.entity.inventoryContextGbo!=null"> AND INVENTORY_CONTEXT_GBO=#{ew.entity.inventoryContextGbo}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.qtyOnHand!=null"> AND QTY_ON_HAND=#{ew.entity.qtyOnHand}</if>
<if test="ew.entity.assyDataTypeBo!=null"> AND ASSY_DATA_TYPE_BO=#{ew.entity.assyDataTypeBo}</if>
<if test="ew.entity.usageCount!=null"> AND USAGE_COUNT=#{ew.entity.usageCount}</if>
<if test="ew.entity.maximumUsage!=null"> AND MAXIMUM_USAGE=#{ew.entity.maximumUsage}</if>
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
<if test="ew.entity.originalQty!=null"> AND ORIGINAL_QTY=#{ew.entity.originalQty}</if>
<if test="ew.entity.workCenterLocBo!=null"> AND WORK_CENTER_LOC_BO=#{ew.entity.workCenterLocBo}</if>
<if test="ew.entity.workCenterLocRes!=null"> AND WORK_CENTER_LOC_RES=#{ew.entity.workCenterLocRes}</if>
<if test="ew.entity.operationLocBo!=null"> AND OPERATION_LOC_BO=#{ew.entity.operationLocBo}</if>
<if test="ew.entity.operationLocRes!=null"> AND OPERATION_LOC_RES=#{ew.entity.operationLocRes}</if>
<if test="ew.entity.resourceLocBo!=null"> AND RESOURCE_LOC_BO=#{ew.entity.resourceLocBo}</if>
<if test="ew.entity.resourceLocRes!=null"> AND RESOURCE_LOC_RES=#{ew.entity.resourceLocRes}</if>
<if test="ew.entity.shopOrderLocBo!=null"> AND SHOP_ORDER_LOC_BO=#{ew.entity.shopOrderLocBo}</if>
<if test="ew.entity.shopOrderLocRes!=null"> AND SHOP_ORDER_LOC_RES=#{ew.entity.shopOrderLocRes}</if>
<if test="ew.entity.shopOrderSetByErp!=null"> AND SHOP_ORDER_SET_BY_ERP=#{ew.entity.shopOrderSetByErp}</if>
<if test="ew.entity.originalUserBo!=null"> AND ORIGINAL_USER_BO=#{ew.entity.originalUserBo}</if>
<if test="ew.entity.storageLocationBo!=null"> AND STORAGE_LOCATION_BO=#{ew.entity.storageLocationBo}</if>
<if test="ew.entity.hasBeenUsed!=null"> AND HAS_BEEN_USED=#{ew.entity.hasBeenUsed}</if>
<if test="ew.entity.receiveDateTime!=null"> AND RECEIVE_DATE_TIME=#{ew.entity.receiveDateTime}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<if test="ew.entity.partitionDate!=null"> AND PARTITION_DATE=#{ew.entity.partitionDate}</if>
<if test="ew.entity.parentInventoryBo!=null"> AND PARENT_INVENTORY_BO=#{ew.entity.parentInventoryBo}</if>
<if test="ew.entity.erpInventory!=null"> AND ERP_INVENTORY=#{ew.entity.erpInventory}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectList" resultMap="BaseResultMap">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM INVENTORY
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.inventoryId!=null"> AND INVENTORY_ID=#{ew.entity.inventoryId}</if>
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
<if test="ew.entity.inventoryContextGbo!=null"> AND INVENTORY_CONTEXT_GBO=#{ew.entity.inventoryContextGbo}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.qtyOnHand!=null"> AND QTY_ON_HAND=#{ew.entity.qtyOnHand}</if>
<if test="ew.entity.assyDataTypeBo!=null"> AND ASSY_DATA_TYPE_BO=#{ew.entity.assyDataTypeBo}</if>
<if test="ew.entity.usageCount!=null"> AND USAGE_COUNT=#{ew.entity.usageCount}</if>
<if test="ew.entity.maximumUsage!=null"> AND MAXIMUM_USAGE=#{ew.entity.maximumUsage}</if>
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
<if test="ew.entity.originalQty!=null"> AND ORIGINAL_QTY=#{ew.entity.originalQty}</if>
<if test="ew.entity.workCenterLocBo!=null"> AND WORK_CENTER_LOC_BO=#{ew.entity.workCenterLocBo}</if>
<if test="ew.entity.workCenterLocRes!=null"> AND WORK_CENTER_LOC_RES=#{ew.entity.workCenterLocRes}</if>
<if test="ew.entity.operationLocBo!=null"> AND OPERATION_LOC_BO=#{ew.entity.operationLocBo}</if>
<if test="ew.entity.operationLocRes!=null"> AND OPERATION_LOC_RES=#{ew.entity.operationLocRes}</if>
<if test="ew.entity.resourceLocBo!=null"> AND RESOURCE_LOC_BO=#{ew.entity.resourceLocBo}</if>
<if test="ew.entity.resourceLocRes!=null"> AND RESOURCE_LOC_RES=#{ew.entity.resourceLocRes}</if>
<if test="ew.entity.shopOrderLocBo!=null"> AND SHOP_ORDER_LOC_BO=#{ew.entity.shopOrderLocBo}</if>
<if test="ew.entity.shopOrderLocRes!=null"> AND SHOP_ORDER_LOC_RES=#{ew.entity.shopOrderLocRes}</if>
<if test="ew.entity.shopOrderSetByErp!=null"> AND SHOP_ORDER_SET_BY_ERP=#{ew.entity.shopOrderSetByErp}</if>
<if test="ew.entity.originalUserBo!=null"> AND ORIGINAL_USER_BO=#{ew.entity.originalUserBo}</if>
<if test="ew.entity.storageLocationBo!=null"> AND STORAGE_LOCATION_BO=#{ew.entity.storageLocationBo}</if>
<if test="ew.entity.hasBeenUsed!=null"> AND HAS_BEEN_USED=#{ew.entity.hasBeenUsed}</if>
<if test="ew.entity.receiveDateTime!=null"> AND RECEIVE_DATE_TIME=#{ew.entity.receiveDateTime}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<if test="ew.entity.partitionDate!=null"> AND PARTITION_DATE=#{ew.entity.partitionDate}</if>
<if test="ew.entity.parentInventoryBo!=null"> AND PARENT_INVENTORY_BO=#{ew.entity.parentInventoryBo}</if>
<if test="ew.entity.erpInventory!=null"> AND ERP_INVENTORY=#{ew.entity.erpInventory}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectMaps" resultType="HashMap">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM INVENTORY
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.inventoryId!=null"> AND INVENTORY_ID=#{ew.entity.inventoryId}</if>
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
<if test="ew.entity.inventoryContextGbo!=null"> AND INVENTORY_CONTEXT_GBO=#{ew.entity.inventoryContextGbo}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.qtyOnHand!=null"> AND QTY_ON_HAND=#{ew.entity.qtyOnHand}</if>
<if test="ew.entity.assyDataTypeBo!=null"> AND ASSY_DATA_TYPE_BO=#{ew.entity.assyDataTypeBo}</if>
<if test="ew.entity.usageCount!=null"> AND USAGE_COUNT=#{ew.entity.usageCount}</if>
<if test="ew.entity.maximumUsage!=null"> AND MAXIMUM_USAGE=#{ew.entity.maximumUsage}</if>
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
<if test="ew.entity.originalQty!=null"> AND ORIGINAL_QTY=#{ew.entity.originalQty}</if>
<if test="ew.entity.workCenterLocBo!=null"> AND WORK_CENTER_LOC_BO=#{ew.entity.workCenterLocBo}</if>
<if test="ew.entity.workCenterLocRes!=null"> AND WORK_CENTER_LOC_RES=#{ew.entity.workCenterLocRes}</if>
<if test="ew.entity.operationLocBo!=null"> AND OPERATION_LOC_BO=#{ew.entity.operationLocBo}</if>
<if test="ew.entity.operationLocRes!=null"> AND OPERATION_LOC_RES=#{ew.entity.operationLocRes}</if>
<if test="ew.entity.resourceLocBo!=null"> AND RESOURCE_LOC_BO=#{ew.entity.resourceLocBo}</if>
<if test="ew.entity.resourceLocRes!=null"> AND RESOURCE_LOC_RES=#{ew.entity.resourceLocRes}</if>
<if test="ew.entity.shopOrderLocBo!=null"> AND SHOP_ORDER_LOC_BO=#{ew.entity.shopOrderLocBo}</if>
<if test="ew.entity.shopOrderLocRes!=null"> AND SHOP_ORDER_LOC_RES=#{ew.entity.shopOrderLocRes}</if>
<if test="ew.entity.shopOrderSetByErp!=null"> AND SHOP_ORDER_SET_BY_ERP=#{ew.entity.shopOrderSetByErp}</if>
<if test="ew.entity.originalUserBo!=null"> AND ORIGINAL_USER_BO=#{ew.entity.originalUserBo}</if>
<if test="ew.entity.storageLocationBo!=null"> AND STORAGE_LOCATION_BO=#{ew.entity.storageLocationBo}</if>
<if test="ew.entity.hasBeenUsed!=null"> AND HAS_BEEN_USED=#{ew.entity.hasBeenUsed}</if>
<if test="ew.entity.receiveDateTime!=null"> AND RECEIVE_DATE_TIME=#{ew.entity.receiveDateTime}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<if test="ew.entity.partitionDate!=null"> AND PARTITION_DATE=#{ew.entity.partitionDate}</if>
<if test="ew.entity.parentInventoryBo!=null"> AND PARENT_INVENTORY_BO=#{ew.entity.parentInventoryBo}</if>
<if test="ew.entity.erpInventory!=null"> AND ERP_INVENTORY=#{ew.entity.erpInventory}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectObjs" resultType="Object">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM INVENTORY
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.inventoryId!=null"> AND INVENTORY_ID=#{ew.entity.inventoryId}</if>
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
<if test="ew.entity.inventoryContextGbo!=null"> AND INVENTORY_CONTEXT_GBO=#{ew.entity.inventoryContextGbo}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.qtyOnHand!=null"> AND QTY_ON_HAND=#{ew.entity.qtyOnHand}</if>
<if test="ew.entity.assyDataTypeBo!=null"> AND ASSY_DATA_TYPE_BO=#{ew.entity.assyDataTypeBo}</if>
<if test="ew.entity.usageCount!=null"> AND USAGE_COUNT=#{ew.entity.usageCount}</if>
<if test="ew.entity.maximumUsage!=null"> AND MAXIMUM_USAGE=#{ew.entity.maximumUsage}</if>
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
<if test="ew.entity.originalQty!=null"> AND ORIGINAL_QTY=#{ew.entity.originalQty}</if>
<if test="ew.entity.workCenterLocBo!=null"> AND WORK_CENTER_LOC_BO=#{ew.entity.workCenterLocBo}</if>
<if test="ew.entity.workCenterLocRes!=null"> AND WORK_CENTER_LOC_RES=#{ew.entity.workCenterLocRes}</if>
<if test="ew.entity.operationLocBo!=null"> AND OPERATION_LOC_BO=#{ew.entity.operationLocBo}</if>
<if test="ew.entity.operationLocRes!=null"> AND OPERATION_LOC_RES=#{ew.entity.operationLocRes}</if>
<if test="ew.entity.resourceLocBo!=null"> AND RESOURCE_LOC_BO=#{ew.entity.resourceLocBo}</if>
<if test="ew.entity.resourceLocRes!=null"> AND RESOURCE_LOC_RES=#{ew.entity.resourceLocRes}</if>
<if test="ew.entity.shopOrderLocBo!=null"> AND SHOP_ORDER_LOC_BO=#{ew.entity.shopOrderLocBo}</if>
<if test="ew.entity.shopOrderLocRes!=null"> AND SHOP_ORDER_LOC_RES=#{ew.entity.shopOrderLocRes}</if>
<if test="ew.entity.shopOrderSetByErp!=null"> AND SHOP_ORDER_SET_BY_ERP=#{ew.entity.shopOrderSetByErp}</if>
<if test="ew.entity.originalUserBo!=null"> AND ORIGINAL_USER_BO=#{ew.entity.originalUserBo}</if>
<if test="ew.entity.storageLocationBo!=null"> AND STORAGE_LOCATION_BO=#{ew.entity.storageLocationBo}</if>
<if test="ew.entity.hasBeenUsed!=null"> AND HAS_BEEN_USED=#{ew.entity.hasBeenUsed}</if>
<if test="ew.entity.receiveDateTime!=null"> AND RECEIVE_DATE_TIME=#{ew.entity.receiveDateTime}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<if test="ew.entity.partitionDate!=null"> AND PARTITION_DATE=#{ew.entity.partitionDate}</if>
<if test="ew.entity.parentInventoryBo!=null"> AND PARENT_INVENTORY_BO=#{ew.entity.parentInventoryBo}</if>
<if test="ew.entity.erpInventory!=null"> AND ERP_INVENTORY=#{ew.entity.erpInventory}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectPage" resultMap="BaseResultMap">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM INVENTORY
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.inventoryId!=null"> AND INVENTORY_ID=#{ew.entity.inventoryId}</if>
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
<if test="ew.entity.inventoryContextGbo!=null"> AND INVENTORY_CONTEXT_GBO=#{ew.entity.inventoryContextGbo}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.qtyOnHand!=null"> AND QTY_ON_HAND=#{ew.entity.qtyOnHand}</if>
<if test="ew.entity.assyDataTypeBo!=null"> AND ASSY_DATA_TYPE_BO=#{ew.entity.assyDataTypeBo}</if>
<if test="ew.entity.usageCount!=null"> AND USAGE_COUNT=#{ew.entity.usageCount}</if>
<if test="ew.entity.maximumUsage!=null"> AND MAXIMUM_USAGE=#{ew.entity.maximumUsage}</if>
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
<if test="ew.entity.originalQty!=null"> AND ORIGINAL_QTY=#{ew.entity.originalQty}</if>
<if test="ew.entity.workCenterLocBo!=null"> AND WORK_CENTER_LOC_BO=#{ew.entity.workCenterLocBo}</if>
<if test="ew.entity.workCenterLocRes!=null"> AND WORK_CENTER_LOC_RES=#{ew.entity.workCenterLocRes}</if>
<if test="ew.entity.operationLocBo!=null"> AND OPERATION_LOC_BO=#{ew.entity.operationLocBo}</if>
<if test="ew.entity.operationLocRes!=null"> AND OPERATION_LOC_RES=#{ew.entity.operationLocRes}</if>
<if test="ew.entity.resourceLocBo!=null"> AND RESOURCE_LOC_BO=#{ew.entity.resourceLocBo}</if>
<if test="ew.entity.resourceLocRes!=null"> AND RESOURCE_LOC_RES=#{ew.entity.resourceLocRes}</if>
<if test="ew.entity.shopOrderLocBo!=null"> AND SHOP_ORDER_LOC_BO=#{ew.entity.shopOrderLocBo}</if>
<if test="ew.entity.shopOrderLocRes!=null"> AND SHOP_ORDER_LOC_RES=#{ew.entity.shopOrderLocRes}</if>
<if test="ew.entity.shopOrderSetByErp!=null"> AND SHOP_ORDER_SET_BY_ERP=#{ew.entity.shopOrderSetByErp}</if>
<if test="ew.entity.originalUserBo!=null"> AND ORIGINAL_USER_BO=#{ew.entity.originalUserBo}</if>
<if test="ew.entity.storageLocationBo!=null"> AND STORAGE_LOCATION_BO=#{ew.entity.storageLocationBo}</if>
<if test="ew.entity.hasBeenUsed!=null"> AND HAS_BEEN_USED=#{ew.entity.hasBeenUsed}</if>
<if test="ew.entity.receiveDateTime!=null"> AND RECEIVE_DATE_TIME=#{ew.entity.receiveDateTime}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<if test="ew.entity.partitionDate!=null"> AND PARTITION_DATE=#{ew.entity.partitionDate}</if>
<if test="ew.entity.parentInventoryBo!=null"> AND PARENT_INVENTORY_BO=#{ew.entity.parentInventoryBo}</if>
<if test="ew.entity.erpInventory!=null"> AND ERP_INVENTORY=#{ew.entity.erpInventory}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectMapsPage" resultType="HashMap">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM INVENTORY
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.inventoryId!=null"> AND INVENTORY_ID=#{ew.entity.inventoryId}</if>
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
<if test="ew.entity.inventoryContextGbo!=null"> AND INVENTORY_CONTEXT_GBO=#{ew.entity.inventoryContextGbo}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.qtyOnHand!=null"> AND QTY_ON_HAND=#{ew.entity.qtyOnHand}</if>
<if test="ew.entity.assyDataTypeBo!=null"> AND ASSY_DATA_TYPE_BO=#{ew.entity.assyDataTypeBo}</if>
<if test="ew.entity.usageCount!=null"> AND USAGE_COUNT=#{ew.entity.usageCount}</if>
<if test="ew.entity.maximumUsage!=null"> AND MAXIMUM_USAGE=#{ew.entity.maximumUsage}</if>
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
<if test="ew.entity.originalQty!=null"> AND ORIGINAL_QTY=#{ew.entity.originalQty}</if>
<if test="ew.entity.workCenterLocBo!=null"> AND WORK_CENTER_LOC_BO=#{ew.entity.workCenterLocBo}</if>
<if test="ew.entity.workCenterLocRes!=null"> AND WORK_CENTER_LOC_RES=#{ew.entity.workCenterLocRes}</if>
<if test="ew.entity.operationLocBo!=null"> AND OPERATION_LOC_BO=#{ew.entity.operationLocBo}</if>
<if test="ew.entity.operationLocRes!=null"> AND OPERATION_LOC_RES=#{ew.entity.operationLocRes}</if>
<if test="ew.entity.resourceLocBo!=null"> AND RESOURCE_LOC_BO=#{ew.entity.resourceLocBo}</if>
<if test="ew.entity.resourceLocRes!=null"> AND RESOURCE_LOC_RES=#{ew.entity.resourceLocRes}</if>
<if test="ew.entity.shopOrderLocBo!=null"> AND SHOP_ORDER_LOC_BO=#{ew.entity.shopOrderLocBo}</if>
<if test="ew.entity.shopOrderLocRes!=null"> AND SHOP_ORDER_LOC_RES=#{ew.entity.shopOrderLocRes}</if>
<if test="ew.entity.shopOrderSetByErp!=null"> AND SHOP_ORDER_SET_BY_ERP=#{ew.entity.shopOrderSetByErp}</if>
<if test="ew.entity.originalUserBo!=null"> AND ORIGINAL_USER_BO=#{ew.entity.originalUserBo}</if>
<if test="ew.entity.storageLocationBo!=null"> AND STORAGE_LOCATION_BO=#{ew.entity.storageLocationBo}</if>
<if test="ew.entity.hasBeenUsed!=null"> AND HAS_BEEN_USED=#{ew.entity.hasBeenUsed}</if>
<if test="ew.entity.receiveDateTime!=null"> AND RECEIVE_DATE_TIME=#{ew.entity.receiveDateTime}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<if test="ew.entity.partitionDate!=null"> AND PARTITION_DATE=#{ew.entity.partitionDate}</if>
<if test="ew.entity.parentInventoryBo!=null"> AND PARENT_INVENTORY_BO=#{ew.entity.parentInventoryBo}</if>
<if test="ew.entity.erpInventory!=null"> AND ERP_INVENTORY=#{ew.entity.erpInventory}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<insert id="insert" parameterType="com.foreverwin.mesnac.meapi.model.Inventory">
INSERT INTO INVENTORY
<trim prefix="(" suffix=")" suffixOverrides=",">
HANDLE,
<if test="changeStamp!=null">CHANGE_STAMP,</if>
<if test="site!=null">SITE,</if>
<if test="inventoryId!=null">INVENTORY_ID,</if>
<if test="itemBo!=null">ITEM_BO,</if>
<if test="inventoryContextGbo!=null">INVENTORY_CONTEXT_GBO,</if>
<if test="description!=null">DESCRIPTION,</if>
<if test="qtyOnHand!=null">QTY_ON_HAND,</if>
<if test="assyDataTypeBo!=null">ASSY_DATA_TYPE_BO,</if>
<if test="usageCount!=null">USAGE_COUNT,</if>
<if test="maximumUsage!=null">MAXIMUM_USAGE,</if>
<if test="statusBo!=null">STATUS_BO,</if>
<if test="originalQty!=null">ORIGINAL_QTY,</if>
<if test="workCenterLocBo!=null">WORK_CENTER_LOC_BO,</if>
<if test="workCenterLocRes!=null">WORK_CENTER_LOC_RES,</if>
<if test="operationLocBo!=null">OPERATION_LOC_BO,</if>
<if test="operationLocRes!=null">OPERATION_LOC_RES,</if>
<if test="resourceLocBo!=null">RESOURCE_LOC_BO,</if>
<if test="resourceLocRes!=null">RESOURCE_LOC_RES,</if>
<if test="shopOrderLocBo!=null">SHOP_ORDER_LOC_BO,</if>
<if test="shopOrderLocRes!=null">SHOP_ORDER_LOC_RES,</if>
<if test="shopOrderSetByErp!=null">SHOP_ORDER_SET_BY_ERP,</if>
<if test="originalUserBo!=null">ORIGINAL_USER_BO,</if>
<if test="storageLocationBo!=null">STORAGE_LOCATION_BO,</if>
<if test="hasBeenUsed!=null">HAS_BEEN_USED,</if>
<if test="receiveDateTime!=null">RECEIVE_DATE_TIME,</if>
<if test="createdDateTime!=null">CREATED_DATE_TIME,</if>
<if test="modifiedDateTime!=null">MODIFIED_DATE_TIME,</if>
<if test="partitionDate!=null">PARTITION_DATE,</if>
<if test="parentInventoryBo!=null">PARENT_INVENTORY_BO,</if>
<if test="erpInventory!=null">ERP_INVENTORY,</if>
</trim> VALUES
<trim prefix="(" suffix=")" suffixOverrides=",">
#{handle},
<if test="changeStamp!=null">#{changeStamp},</if>
<if test="site!=null">#{site},</if>
<if test="inventoryId!=null">#{inventoryId},</if>
<if test="itemBo!=null">#{itemBo},</if>
<if test="inventoryContextGbo!=null">#{inventoryContextGbo},</if>
<if test="description!=null">#{description},</if>
<if test="qtyOnHand!=null">#{qtyOnHand},</if>
<if test="assyDataTypeBo!=null">#{assyDataTypeBo},</if>
<if test="usageCount!=null">#{usageCount},</if>
<if test="maximumUsage!=null">#{maximumUsage},</if>
<if test="statusBo!=null">#{statusBo},</if>
<if test="originalQty!=null">#{originalQty},</if>
<if test="workCenterLocBo!=null">#{workCenterLocBo},</if>
<if test="workCenterLocRes!=null">#{workCenterLocRes},</if>
<if test="operationLocBo!=null">#{operationLocBo},</if>
<if test="operationLocRes!=null">#{operationLocRes},</if>
<if test="resourceLocBo!=null">#{resourceLocBo},</if>
<if test="resourceLocRes!=null">#{resourceLocRes},</if>
<if test="shopOrderLocBo!=null">#{shopOrderLocBo},</if>
<if test="shopOrderLocRes!=null">#{shopOrderLocRes},</if>
<if test="shopOrderSetByErp!=null">#{shopOrderSetByErp},</if>
<if test="originalUserBo!=null">#{originalUserBo},</if>
<if test="storageLocationBo!=null">#{storageLocationBo},</if>
<if test="hasBeenUsed!=null">#{hasBeenUsed},</if>
<if test="receiveDateTime!=null">#{receiveDateTime},</if>
<if test="createdDateTime!=null">#{createdDateTime},</if>
<if test="modifiedDateTime!=null">#{modifiedDateTime},</if>
<if test="partitionDate!=null">#{partitionDate},</if>
<if test="parentInventoryBo!=null">#{parentInventoryBo},</if>
<if test="erpInventory!=null">#{erpInventory},</if>
</trim>
</insert>
<insert id="insertAllColumn" parameterType="com.foreverwin.mesnac.meapi.model.Inventory">
INSERT INTO INVENTORY
<trim prefix="(" suffix=")" suffixOverrides=",">
<include refid="Base_Column_List"></include>
</trim> VALUES
<trim prefix="(" suffix=")" suffixOverrides=",">
#{handle},
#{changeStamp},
#{site},
#{inventoryId},
#{itemBo},
#{inventoryContextGbo},
#{description},
#{qtyOnHand},
#{assyDataTypeBo},
#{usageCount},
#{maximumUsage},
#{statusBo},
#{originalQty},
#{workCenterLocBo},
#{workCenterLocRes},
#{operationLocBo},
#{operationLocRes},
#{resourceLocBo},
#{resourceLocRes},
#{shopOrderLocBo},
#{shopOrderLocRes},
#{shopOrderSetByErp},
#{originalUserBo},
#{storageLocationBo},
#{hasBeenUsed},
#{receiveDateTime},
#{createdDateTime},
#{modifiedDateTime},
#{partitionDate},
#{parentInventoryBo},
#{erpInventory},
</trim>
</insert>
<update id="update">
UPDATE INVENTORY <trim prefix="SET" suffixOverrides=",">
<if test="et.handle!=null">HANDLE=#{et.handle},</if>
<if test="et.changeStamp!=null">CHANGE_STAMP=#{et.changeStamp},</if>
<if test="et.site!=null">SITE=#{et.site},</if>
<if test="et.inventoryId!=null">INVENTORY_ID=#{et.inventoryId},</if>
<if test="et.itemBo!=null">ITEM_BO=#{et.itemBo},</if>
<if test="et.inventoryContextGbo!=null">INVENTORY_CONTEXT_GBO=#{et.inventoryContextGbo},</if>
<if test="et.description!=null">DESCRIPTION=#{et.description},</if>
<if test="et.qtyOnHand!=null">QTY_ON_HAND=#{et.qtyOnHand},</if>
<if test="et.assyDataTypeBo!=null">ASSY_DATA_TYPE_BO=#{et.assyDataTypeBo},</if>
<if test="et.usageCount!=null">USAGE_COUNT=#{et.usageCount},</if>
<if test="et.maximumUsage!=null">MAXIMUM_USAGE=#{et.maximumUsage},</if>
<if test="et.statusBo!=null">STATUS_BO=#{et.statusBo},</if>
<if test="et.originalQty!=null">ORIGINAL_QTY=#{et.originalQty},</if>
<if test="et.workCenterLocBo!=null">WORK_CENTER_LOC_BO=#{et.workCenterLocBo},</if>
<if test="et.workCenterLocRes!=null">WORK_CENTER_LOC_RES=#{et.workCenterLocRes},</if>
<if test="et.operationLocBo!=null">OPERATION_LOC_BO=#{et.operationLocBo},</if>
<if test="et.operationLocRes!=null">OPERATION_LOC_RES=#{et.operationLocRes},</if>
<if test="et.resourceLocBo!=null">RESOURCE_LOC_BO=#{et.resourceLocBo},</if>
<if test="et.resourceLocRes!=null">RESOURCE_LOC_RES=#{et.resourceLocRes},</if>
<if test="et.shopOrderLocBo!=null">SHOP_ORDER_LOC_BO=#{et.shopOrderLocBo},</if>
<if test="et.shopOrderLocRes!=null">SHOP_ORDER_LOC_RES=#{et.shopOrderLocRes},</if>
<if test="et.shopOrderSetByErp!=null">SHOP_ORDER_SET_BY_ERP=#{et.shopOrderSetByErp},</if>
<if test="et.originalUserBo!=null">ORIGINAL_USER_BO=#{et.originalUserBo},</if>
<if test="et.storageLocationBo!=null">STORAGE_LOCATION_BO=#{et.storageLocationBo},</if>
<if test="et.hasBeenUsed!=null">HAS_BEEN_USED=#{et.hasBeenUsed},</if>
<if test="et.receiveDateTime!=null">RECEIVE_DATE_TIME=#{et.receiveDateTime},</if>
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
<if test="et.modifiedDateTime!=null">MODIFIED_DATE_TIME=#{et.modifiedDateTime},</if>
<if test="et.partitionDate!=null">PARTITION_DATE=#{et.partitionDate},</if>
<if test="et.parentInventoryBo!=null">PARENT_INVENTORY_BO=#{et.parentInventoryBo},</if>
<if test="et.erpInventory!=null">ERP_INVENTORY=#{et.erpInventory},</if>
</trim>
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
HANDLE=#{ew.entity.handle}
<if test="ew.entity.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.inventoryId!=null"> AND INVENTORY_ID=#{ew.entity.inventoryId}</if>
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
<if test="ew.entity.inventoryContextGbo!=null"> AND INVENTORY_CONTEXT_GBO=#{ew.entity.inventoryContextGbo}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.qtyOnHand!=null"> AND QTY_ON_HAND=#{ew.entity.qtyOnHand}</if>
<if test="ew.entity.assyDataTypeBo!=null"> AND ASSY_DATA_TYPE_BO=#{ew.entity.assyDataTypeBo}</if>
<if test="ew.entity.usageCount!=null"> AND USAGE_COUNT=#{ew.entity.usageCount}</if>
<if test="ew.entity.maximumUsage!=null"> AND MAXIMUM_USAGE=#{ew.entity.maximumUsage}</if>
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
<if test="ew.entity.originalQty!=null"> AND ORIGINAL_QTY=#{ew.entity.originalQty}</if>
<if test="ew.entity.workCenterLocBo!=null"> AND WORK_CENTER_LOC_BO=#{ew.entity.workCenterLocBo}</if>
<if test="ew.entity.workCenterLocRes!=null"> AND WORK_CENTER_LOC_RES=#{ew.entity.workCenterLocRes}</if>
<if test="ew.entity.operationLocBo!=null"> AND OPERATION_LOC_BO=#{ew.entity.operationLocBo}</if>
<if test="ew.entity.operationLocRes!=null"> AND OPERATION_LOC_RES=#{ew.entity.operationLocRes}</if>
<if test="ew.entity.resourceLocBo!=null"> AND RESOURCE_LOC_BO=#{ew.entity.resourceLocBo}</if>
<if test="ew.entity.resourceLocRes!=null"> AND RESOURCE_LOC_RES=#{ew.entity.resourceLocRes}</if>
<if test="ew.entity.shopOrderLocBo!=null"> AND SHOP_ORDER_LOC_BO=#{ew.entity.shopOrderLocBo}</if>
<if test="ew.entity.shopOrderLocRes!=null"> AND SHOP_ORDER_LOC_RES=#{ew.entity.shopOrderLocRes}</if>
<if test="ew.entity.shopOrderSetByErp!=null"> AND SHOP_ORDER_SET_BY_ERP=#{ew.entity.shopOrderSetByErp}</if>
<if test="ew.entity.originalUserBo!=null"> AND ORIGINAL_USER_BO=#{ew.entity.originalUserBo}</if>
<if test="ew.entity.storageLocationBo!=null"> AND STORAGE_LOCATION_BO=#{ew.entity.storageLocationBo}</if>
<if test="ew.entity.hasBeenUsed!=null"> AND HAS_BEEN_USED=#{ew.entity.hasBeenUsed}</if>
<if test="ew.entity.receiveDateTime!=null"> AND RECEIVE_DATE_TIME=#{ew.entity.receiveDateTime}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<if test="ew.entity.partitionDate!=null"> AND PARTITION_DATE=#{ew.entity.partitionDate}</if>
<if test="ew.entity.parentInventoryBo!=null"> AND PARENT_INVENTORY_BO=#{ew.entity.parentInventoryBo}</if>
<if test="ew.entity.erpInventory!=null"> AND ERP_INVENTORY=#{ew.entity.erpInventory}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</update>
<delete id="deleteByMap">
DELETE FROM INVENTORY
<if test="cm!=null and !cm.isEmpty">
<where>
<foreach collection="cm.keys" item="k" separator="AND">
<if test="cm[k] != null">
${k} = #{cm[${k}]}
</if>
</foreach>
</where>
</if>
</delete>
<delete id="delete">
DELETE FROM INVENTORY
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.inventoryId!=null"> AND INVENTORY_ID=#{ew.entity.inventoryId}</if>
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
<if test="ew.entity.inventoryContextGbo!=null"> AND INVENTORY_CONTEXT_GBO=#{ew.entity.inventoryContextGbo}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.qtyOnHand!=null"> AND QTY_ON_HAND=#{ew.entity.qtyOnHand}</if>
<if test="ew.entity.assyDataTypeBo!=null"> AND ASSY_DATA_TYPE_BO=#{ew.entity.assyDataTypeBo}</if>
<if test="ew.entity.usageCount!=null"> AND USAGE_COUNT=#{ew.entity.usageCount}</if>
<if test="ew.entity.maximumUsage!=null"> AND MAXIMUM_USAGE=#{ew.entity.maximumUsage}</if>
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
<if test="ew.entity.originalQty!=null"> AND ORIGINAL_QTY=#{ew.entity.originalQty}</if>
<if test="ew.entity.workCenterLocBo!=null"> AND WORK_CENTER_LOC_BO=#{ew.entity.workCenterLocBo}</if>
<if test="ew.entity.workCenterLocRes!=null"> AND WORK_CENTER_LOC_RES=#{ew.entity.workCenterLocRes}</if>
<if test="ew.entity.operationLocBo!=null"> AND OPERATION_LOC_BO=#{ew.entity.operationLocBo}</if>
<if test="ew.entity.operationLocRes!=null"> AND OPERATION_LOC_RES=#{ew.entity.operationLocRes}</if>
<if test="ew.entity.resourceLocBo!=null"> AND RESOURCE_LOC_BO=#{ew.entity.resourceLocBo}</if>
<if test="ew.entity.resourceLocRes!=null"> AND RESOURCE_LOC_RES=#{ew.entity.resourceLocRes}</if>
<if test="ew.entity.shopOrderLocBo!=null"> AND SHOP_ORDER_LOC_BO=#{ew.entity.shopOrderLocBo}</if>
<if test="ew.entity.shopOrderLocRes!=null"> AND SHOP_ORDER_LOC_RES=#{ew.entity.shopOrderLocRes}</if>
<if test="ew.entity.shopOrderSetByErp!=null"> AND SHOP_ORDER_SET_BY_ERP=#{ew.entity.shopOrderSetByErp}</if>
<if test="ew.entity.originalUserBo!=null"> AND ORIGINAL_USER_BO=#{ew.entity.originalUserBo}</if>
<if test="ew.entity.storageLocationBo!=null"> AND STORAGE_LOCATION_BO=#{ew.entity.storageLocationBo}</if>
<if test="ew.entity.hasBeenUsed!=null"> AND HAS_BEEN_USED=#{ew.entity.hasBeenUsed}</if>
<if test="ew.entity.receiveDateTime!=null"> AND RECEIVE_DATE_TIME=#{ew.entity.receiveDateTime}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<if test="ew.entity.partitionDate!=null"> AND PARTITION_DATE=#{ew.entity.partitionDate}</if>
<if test="ew.entity.parentInventoryBo!=null"> AND PARENT_INVENTORY_BO=#{ew.entity.parentInventoryBo}</if>
<if test="ew.entity.erpInventory!=null"> AND ERP_INVENTORY=#{ew.entity.erpInventory}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</delete>
<!-- BaseMapper标准查询/修改/删除 -->
</mapper>

@ -74,7 +74,7 @@
</sql>
<sql id="Full_Column_List">
I.HANDLE, I.CHANGE_STAMP, I.SITE, I.ITEM, IT.DESCRIPTION, I.STATUS_BO, I.ITEM_TYPE, I.ERP_GTIN, I.AIN_MODEL_EXTERNAL_ID, I.EFF_START_SEQ, I.EFF_END_SEQ, I.LOT_SIZE, I.QUANTITY_RESTRICTION, I.ROUTER_BO, I.BOM_BO, I.COMPONENT_GROUP_BO, I.ITEM_GROUP_BO, I.LAST_RELEASED_DATE, I.ASSY_DATA_TYPE_BO, I.PRE_ASSEMBLED, I.REVISION, I.CURRENT_REVISION, I.EFF_START_DATE, I.EFF_END_DATE, I.SELECTOR_ACTIVITY_BO, I.SELECTOR_NOTE, I.ASSIGN_SERIAL_AT_RELEASE, I.CREATED_DATE_TIME, I.MODIFIED_DATE_TIME, I.DRAWING_NAME, I.MAXIMUM_USAGE, I.USE_COMP_FROM_DRAWING, I.PANEL, I.REMOVAL_ASSY_DATA_TYPE_BO, I.INV_ASSY_DATA_TYPE_BO, I.ORIGINAL_STATUS_BO, I.QTY_MULTIPLIER, I.CREATE_TRACKABLE_SFC, I.MASK_GROUP_BO, I.TRANSFER_ITEM_GROUP_BO, I.UNIT_OF_MEASURE, I.HOLD_ID, I.COLLECT_PARENT_SERIAL, I.REQ_SERIAL_CHANGE, I.IS_COLLECTOR, I.INC_BATCH_NUMBER, I.TIME_SENSITIVE, I.MAX_SHELF_LIFE, I.MAX_SHELF_LIFE_UNITS, I.MAX_FLOOR_LIFE, I.MAX_FLOOR_LIFE_UNITS, I.NOTES, I.TB_COMP_TYPE, I.CONSUMPTION_TOL, I.ERP_BACKFLUSHING, I.STORAGE_LOCATION_BO, I.ERP_PUTAWAY_STORLOC, I.PRODUCTION_SUPPLY_AREA, I.USE_ORDER_ID_REL1
I.HANDLE, I.CHANGE_STAMP, I.SITE, I.ITEM, IT.DESCRIPTION, I.STATUS_BO, I.ITEM_TYPE, I.MATERIAL_TYPE, I.ERP_GTIN, I.AIN_MODEL_EXTERNAL_ID, I.EFF_START_SEQ, I.EFF_END_SEQ, I.LOT_SIZE, I.QUANTITY_RESTRICTION, I.ROUTER_BO, I.BOM_BO, I.COMPONENT_GROUP_BO, I.ITEM_GROUP_BO, I.LAST_RELEASED_DATE, I.ASSY_DATA_TYPE_BO, I.PRE_ASSEMBLED, I.REVISION, I.CURRENT_REVISION, I.EFF_START_DATE, I.EFF_END_DATE, I.SELECTOR_ACTIVITY_BO, I.SELECTOR_NOTE, I.ASSIGN_SERIAL_AT_RELEASE, I.CREATED_DATE_TIME, I.MODIFIED_DATE_TIME, I.DRAWING_NAME, I.MAXIMUM_USAGE, I.USE_COMP_FROM_DRAWING, I.PANEL, I.REMOVAL_ASSY_DATA_TYPE_BO, I.INV_ASSY_DATA_TYPE_BO, I.ORIGINAL_STATUS_BO, I.QTY_MULTIPLIER, I.CREATE_TRACKABLE_SFC, I.MASK_GROUP_BO, I.TRANSFER_ITEM_GROUP_BO, I.UNIT_OF_MEASURE, I.HOLD_ID, I.COLLECT_PARENT_SERIAL, I.REQ_SERIAL_CHANGE, I.IS_COLLECTOR, I.INC_BATCH_NUMBER, I.TIME_SENSITIVE, I.MAX_SHELF_LIFE, I.MAX_SHELF_LIFE_UNITS, I.MAX_FLOOR_LIFE, I.MAX_FLOOR_LIFE_UNITS, I.NOTES, I.TB_COMP_TYPE, I.CONSUMPTION_TOL, I.ERP_BACKFLUSHING, I.STORAGE_LOCATION_BO, I.ERP_PUTAWAY_STORLOC, I.PRODUCTION_SUPPLY_AREA, I.USE_ORDER_ID_REL1
</sql>
<!-- BaseMapper标准查询/修改/删除 -->
@ -993,6 +993,7 @@
${ew.sqlSegment}
</if>
</delete>
<!-- BaseMapper标准查询/修改/删除 -->
<select id="selectListByCriteria" resultMap="BaseResultMap">
select * from (
@ -1005,5 +1006,4 @@
</if>
</where>
</select>
</mapper>

Loading…
Cancel
Save