master
wangh 3 years ago
parent cc3905ae2c
commit c6345e41d5

@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
import com.foreverwin.mesnac.meapi.dto.LogisticsDto;
import com.foreverwin.mesnac.meapi.enums.HandleEnum;
import com.foreverwin.mesnac.meapi.model.LogisticsBill;
import com.foreverwin.mesnac.meapi.model.StoreSfcInfo;
import com.foreverwin.mesnac.meapi.model.UserGroup;
import com.foreverwin.mesnac.meapi.service.LogisticsBillService;
import com.foreverwin.mesnac.meapi.service.UserGroupService;
@ -13,6 +14,7 @@ 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.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -281,4 +283,18 @@ public class LogisticsTurnoverController {
}
}
@PostMapping("/selectSFC")
@ResponseBody
public String selectSFC(String sfc){
StoreSfcInfo storeSfcInfo= logisticsTurnoverService.storeSelectSfc(sfc);
return Optional.ofNullable(storeSfcInfo).map(t->JSONObject.toJSONString(t)).orElse("null");
}
@PostMapping("/submentInStore")
@ResponseBody
public String selectSFC(String sfc,double qty,int inStoreType,String user,
@RequestParam(value = "storeLocation",defaultValue = "") String storeLocation){
return logisticsTurnoverService.submentInStore(sfc,qty, inStoreType, user,storeLocation);
}
}

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.foreverwin.mesnac.meapi.dto.LogisticsDto;
import com.foreverwin.mesnac.meapi.model.LogisticsTurnover;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.foreverwin.mesnac.meapi.model.StoreSfcInfo;
import com.foreverwin.modular.core.util.FrontPage;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
@ -28,4 +29,21 @@ public interface LogisticsTurnoverMapper extends BaseMapper<LogisticsTurnover> {
LogisticsTurnover queryNewtistTurnoverTask(String InspectionTaskNo);
List<LogisticsDto> selectlogisticsturnoverlist(LogisticsDto logisticsDto);
StoreSfcInfo storeSelectSfc(String sfc);
int insertRecordInStore(@Param("sfc") String sfc,
@Param("qty") double qty,
@Param("inStoreType") int inStoreType,
@Param("user") String user,
@Param("storeLocation") String storeLocation);
int countLedgerBySfc(String sfc);
void updateRecordLedger(@Param("sfc") String sfc,
@Param("qty") double qty);
void insertRecordLedger(@Param("sfc") String sfc,
@Param("qty") double qty,
@Param("storeLocation") String storeLocation);
}

@ -0,0 +1,125 @@
package com.foreverwin.mesnac.meapi.model;
import javax.xml.ws.Dispatch;
/**
* @author wanghao
* @date 2022/8/31 13:46
*/
public class StoreSfcInfo {
private String sfc,
shop_order,
item_bo,
description,
work_order,
item_number,
store_location,
work_user;
private double dispatch_qty,
in_qty,
in_type, zs_qty,ls_qty;
public String getSfc() {
return sfc;
}
public void setSfc(String sfc) {
this.sfc = sfc;
}
public String getShop_order() {
return shop_order;
}
public void setShop_order(String shop_order) {
this.shop_order = shop_order;
}
public String getItem_bo() {
return item_bo;
}
public double getZs_qty() {
return zs_qty;
}
public void setZs_qty(double zs_qty) {
this.zs_qty = zs_qty;
}
public double getLs_qty() {
return ls_qty;
}
public void setLs_qty(double ls_qty) {
this.ls_qty = ls_qty;
}
public void setItem_bo(String item_bo) {
this.item_bo = item_bo;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getWork_order() {
return work_order;
}
public void setWork_order(String work_order) {
this.work_order = work_order;
}
public String getItem_number() {
return item_number;
}
public void setItem_number(String item_number) {
this.item_number = item_number;
}
public String getStore_location() {
return store_location;
}
public void setStore_location(String store_location) {
this.store_location = store_location;
}
public String getWork_user() {
return work_user;
}
public void setWork_user(String work_user) {
this.work_user = work_user;
}
public double getDispatch_qty() {
return dispatch_qty;
}
public void setDispatch_qty(double dispatch_qty) {
this.dispatch_qty = dispatch_qty;
}
public double getIn_qty() {
return in_qty;
}
public void setIn_qty(double in_qty) {
this.in_qty = in_qty;
}
public double getIn_type() {
return in_type;
}
public void setIn_type(double in_type) {
this.in_type = in_type;
}
}

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.foreverwin.mesnac.meapi.dto.LogisticsDto;
import com.foreverwin.mesnac.meapi.model.LogisticsTurnover;
import com.baomidou.mybatisplus.extension.service.IService;
import com.foreverwin.mesnac.meapi.model.StoreSfcInfo;
import com.foreverwin.modular.core.util.FrontPage;
import java.util.List;
@ -35,4 +36,8 @@ public interface LogisticsTurnoverService extends IService<LogisticsTurnover> {
IPage<LogisticsDto> selectLogisticsDtoPage(FrontPage<LogisticsDto> frontPage, LogisticsDto logisticsDto);
List<LogisticsDto> selectlogisticsturnoverlist(LogisticsDto logisticsDto);
StoreSfcInfo storeSelectSfc(String sfc);
String submentInStore(String sfc, double qty, int inStoreType, String user,String storeLocation);
}

@ -1,6 +1,7 @@
package com.foreverwin.mesnac.meapi.service.impl;
import com.foreverwin.mesnac.meapi.dto.LogisticsDto;
import com.foreverwin.mesnac.meapi.model.StoreSfcInfo;
import com.foreverwin.modular.core.util.FrontPage;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@ -63,5 +64,27 @@ public class LogisticsTurnoverServiceImpl extends ServiceImpl<LogisticsTurnoverM
return logisticsTurnoverMapper.selectlogisticsturnoverlist(logisticsDto);
}
@Override
public StoreSfcInfo storeSelectSfc(String sfc) {
return logisticsTurnoverMapper.storeSelectSfc(sfc);
}
@Override
public String submentInStore(String sfc, double qty, int inStoreType, String user,String storeLocation) {
int i =logisticsTurnoverMapper.insertRecordInStore(sfc,qty, inStoreType, user,storeLocation);
if (i>0){
if (inStoreType==0){
int tag=logisticsTurnoverMapper.countLedgerBySfc(sfc);
if (tag==0){
logisticsTurnoverMapper.insertRecordLedger(sfc,qty,storeLocation);
}else {
logisticsTurnoverMapper.updateRecordLedger(sfc,qty);
}
}
return "suess";
}else {
return "error";
}
}
}

@ -4,34 +4,34 @@
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.foreverwin.mesnac.meapi.model.LogisticsTurnover">
<id column="HANDLE" property="handle" />
<result column="SFC_DISPATCH_BO" property="sfcDispatchBo" />
<result column="STATUS" property="status" />
<result column="CREATED_DATE_TIME" property="createdDateTime" />
<result column="USER" property="user" />
<result column="USER_NAME" property="userName" />
<result column="OTHER1" property="other1" />
<result column="OTHER2" property="other2" />
<result column="OTHER3" property="other3" />
<result column="STORAGE_LOCATION" property="storageLocation" />
<result column="TURNOVER_WORK_CENTER" property="turnoverWorkCenter" />
<result column="COM_DATE_TIME" property="comDateTime" />
<result column="IS_RECEIVE" property="isReceive" />
<result column="TURNOUT_WORKCENTER" property="turnoutWorkcenter" />
<result column="TURNOUT_ITEM" property="turnoutItem" />
<result column="OTHER4" property="other4" />
<result column="OTHER5" property="other5" />
<result column="OTHER6" property="other6" />
<result column="NEXT_WORK_CENTER" property="nextWorkcenter" />
<result column="SHOP_ORDER" property="shopOrder" />
<result column="SFC" property="sfc" />
<result column="WORK_ORDER" property="workOrder" />
<result column="ITEM_DESC" property="itemdesc" />
<result column="ITEM_DESC" property="itemdesc" />
<result column="TEXTURE" property="texture" />
<result column="BLANKING_SIZE" property="blankingSize" />
<result column="QTY_TO_BUILD" property="qtyToBuild" />
<id column="HANDLE" property="handle"/>
<result column="SFC_DISPATCH_BO" property="sfcDispatchBo"/>
<result column="STATUS" property="status"/>
<result column="CREATED_DATE_TIME" property="createdDateTime"/>
<result column="USER" property="user"/>
<result column="USER_NAME" property="userName"/>
<result column="OTHER1" property="other1"/>
<result column="OTHER2" property="other2"/>
<result column="OTHER3" property="other3"/>
<result column="STORAGE_LOCATION" property="storageLocation"/>
<result column="TURNOVER_WORK_CENTER" property="turnoverWorkCenter"/>
<result column="COM_DATE_TIME" property="comDateTime"/>
<result column="IS_RECEIVE" property="isReceive"/>
<result column="TURNOUT_WORKCENTER" property="turnoutWorkcenter"/>
<result column="TURNOUT_ITEM" property="turnoutItem"/>
<result column="OTHER4" property="other4"/>
<result column="OTHER5" property="other5"/>
<result column="OTHER6" property="other6"/>
<result column="NEXT_WORK_CENTER" property="nextWorkcenter"/>
<result column="SHOP_ORDER" property="shopOrder"/>
<result column="SFC" property="sfc"/>
<result column="WORK_ORDER" property="workOrder"/>
<result column="ITEM_DESC" property="itemdesc"/>
<result column="ITEM_DESC" property="itemdesc"/>
<result column="TEXTURE" property="texture"/>
<result column="BLANKING_SIZE" property="blankingSize"/>
<result column="QTY_TO_BUILD" property="qtyToBuild"/>
</resultMap>
@ -46,7 +46,8 @@
</select>
<select id="selectByMap" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include>
SELECT
<include refid="Base_Column_List"></include>
FROM Z_LOGISTICS_TURNOVER
<if test="cm!=null and !cm.isEmpty">
<where>
@ -60,7 +61,8 @@
</select>
<select id="selectBatchIds" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include>
SELECT
<include refid="Base_Column_List"></include>
FROM Z_LOGISTICS_TURNOVER WHERE HANDLE IN (
<foreach item="item" index="index" collection="coll" separator=",">#{item}
</foreach>)
@ -70,25 +72,25 @@
SELECT <include refid="Base_Column_List"></include> FROM Z_LOGISTICS_TURNOVER
<where>
<if test="ew.entity.handle!=null">
HANDLE=#{ew.handle}
HANDLE=#{ew.handle}
</if>
<if test="ew.entity.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.user!=null"> AND USER=#{ew.entity.user}</if>
<if test="ew.entity.userName!=null"> AND USER_NAME=#{ew.entity.userName}</if>
<if test="ew.entity.other1!=null"> AND OTHER1=#{ew.entity.other1}</if>
<if test="ew.entity.other2!=null"> AND OTHER2=#{ew.entity.other2}</if>
<if test="ew.entity.other3!=null"> AND OTHER3=#{ew.entity.other3}</if>
<if test="ew.entity.storageLocation!=null"> AND STORAGE_LOCATION=#{ew.entity.storageLocation}</if>
<if test="ew.entity.turnoverWorkCenter!=null"> AND TURNOVER_WORK_CENTER=#{ew.entity.turnoverWorkCenter}</if>
<if test="ew.entity.comDateTime!=null"> AND COM_DATE_TIME=#{ew.entity.comDateTime}</if>
<if test="ew.entity.isReceive!=null"> AND IS_RECEIVE=#{ew.entity.isReceive}</if>
<if test="ew.entity.turnoutWorkcenter!=null"> AND TURNOUT_WORKCENTER=#{ew.entity.turnoutWorkcenter}</if>
<if test="ew.entity.turnoutItem!=null"> AND TURNOUT_ITEM=#{ew.entity.turnoutItem}</if>
<if test="ew.entity.other4!=null"> AND OTHER4=#{ew.entity.other4}</if>
<if test="ew.entity.other5!=null"> AND OTHER5=#{ew.entity.other5}</if>
<if test="ew.entity.other6!=null"> AND OTHER6=#{ew.entity.other6}</if>
<if test="ew.entity.sfcDispatchBo!=null">AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test="ew.entity.status!=null">AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.createdDateTime!=null">AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.user!=null">AND USER=#{ew.entity.user}</if>
<if test="ew.entity.userName!=null">AND USER_NAME=#{ew.entity.userName}</if>
<if test="ew.entity.other1!=null">AND OTHER1=#{ew.entity.other1}</if>
<if test="ew.entity.other2!=null">AND OTHER2=#{ew.entity.other2}</if>
<if test="ew.entity.other3!=null">AND OTHER3=#{ew.entity.other3}</if>
<if test="ew.entity.storageLocation!=null">AND STORAGE_LOCATION=#{ew.entity.storageLocation}</if>
<if test="ew.entity.turnoverWorkCenter!=null">AND TURNOVER_WORK_CENTER=#{ew.entity.turnoverWorkCenter}</if>
<if test="ew.entity.comDateTime!=null">AND COM_DATE_TIME=#{ew.entity.comDateTime}</if>
<if test="ew.entity.isReceive!=null">AND IS_RECEIVE=#{ew.entity.isReceive}</if>
<if test="ew.entity.turnoutWorkcenter!=null">AND TURNOUT_WORKCENTER=#{ew.entity.turnoutWorkcenter}</if>
<if test="ew.entity.turnoutItem!=null">AND TURNOUT_ITEM=#{ew.entity.turnoutItem}</if>
<if test="ew.entity.other4!=null">AND OTHER4=#{ew.entity.other4}</if>
<if test="ew.entity.other5!=null">AND OTHER5=#{ew.entity.other5}</if>
<if test="ew.entity.other6!=null">AND OTHER6=#{ew.entity.other6}</if>
</where>
</select>
@ -97,26 +99,29 @@
<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.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.user!=null"> AND USER=#{ew.entity.user}</if>
<if test="ew.entity.userName!=null"> AND USER_NAME=#{ew.entity.userName}</if>
<if test="ew.entity.other1!=null"> AND OTHER1=#{ew.entity.other1}</if>
<if test="ew.entity.other2!=null"> AND OTHER2=#{ew.entity.other2}</if>
<if test="ew.entity.other3!=null"> AND OTHER3=#{ew.entity.other3}</if>
<if test="ew.entity.storageLocation!=null"> AND STORAGE_LOCATION=#{ew.entity.storageLocation}</if>
<if test="ew.entity.turnoverWorkCenter!=null"> AND TURNOVER_WORK_CENTER=#{ew.entity.turnoverWorkCenter}</if>
<if test="ew.entity.comDateTime!=null"> AND COM_DATE_TIME=#{ew.entity.comDateTime}</if>
<if test="ew.entity.isReceive!=null"> AND IS_RECEIVE=#{ew.entity.isReceive}</if>
<if test="ew.entity.turnoutWorkcenter!=null"> AND TURNOUT_WORKCENTER=#{ew.entity.turnoutWorkcenter}</if>
<if test="ew.entity.turnoutItem!=null"> AND TURNOUT_ITEM=#{ew.entity.turnoutItem}</if>
<if test="ew.entity.other4!=null"> AND OTHER4=#{ew.entity.other4}</if>
<if test="ew.entity.other5!=null"> AND OTHER5=#{ew.entity.other5}</if>
<if test="ew.entity.other6!=null"> AND OTHER6=#{ew.entity.other6}</if>
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.sfcDispatchBo!=null">AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test="ew.entity.status!=null">AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.createdDateTime!=null">AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.user!=null">AND USER=#{ew.entity.user}</if>
<if test="ew.entity.userName!=null">AND USER_NAME=#{ew.entity.userName}</if>
<if test="ew.entity.other1!=null">AND OTHER1=#{ew.entity.other1}</if>
<if test="ew.entity.other2!=null">AND OTHER2=#{ew.entity.other2}</if>
<if test="ew.entity.other3!=null">AND OTHER3=#{ew.entity.other3}</if>
<if test="ew.entity.storageLocation!=null">AND STORAGE_LOCATION=#{ew.entity.storageLocation}</if>
<if test="ew.entity.turnoverWorkCenter!=null">AND
TURNOVER_WORK_CENTER=#{ew.entity.turnoverWorkCenter}
</if>
<if test="ew.entity.comDateTime!=null">AND COM_DATE_TIME=#{ew.entity.comDateTime}</if>
<if test="ew.entity.isReceive!=null">AND IS_RECEIVE=#{ew.entity.isReceive}</if>
<if test="ew.entity.turnoutWorkcenter!=null">AND TURNOUT_WORKCENTER=#{ew.entity.turnoutWorkcenter}
</if>
<if test="ew.entity.turnoutItem!=null">AND TURNOUT_ITEM=#{ew.entity.turnoutItem}</if>
<if test="ew.entity.other4!=null">AND OTHER4=#{ew.entity.other4}</if>
<if test="ew.entity.other5!=null">AND OTHER5=#{ew.entity.other5}</if>
<if test="ew.entity.other6!=null">AND OTHER6=#{ew.entity.other6}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
@ -129,30 +134,40 @@
</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_LOGISTICS_TURNOVER
SELECT
<choose>
<when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when>
<otherwise>
<include refid="Base_Column_List"></include>
</otherwise>
</choose>
FROM Z_LOGISTICS_TURNOVER
<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.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.user!=null"> AND USER=#{ew.entity.user}</if>
<if test="ew.entity.userName!=null"> AND USER_NAME=#{ew.entity.userName}</if>
<if test="ew.entity.other1!=null"> AND OTHER1=#{ew.entity.other1}</if>
<if test="ew.entity.other2!=null"> AND OTHER2=#{ew.entity.other2}</if>
<if test="ew.entity.other3!=null"> AND OTHER3=#{ew.entity.other3}</if>
<if test="ew.entity.storageLocation!=null"> AND STORAGE_LOCATION=#{ew.entity.storageLocation}</if>
<if test="ew.entity.turnoverWorkCenter!=null"> AND TURNOVER_WORK_CENTER=#{ew.entity.turnoverWorkCenter}</if>
<if test="ew.entity.comDateTime!=null"> AND COM_DATE_TIME=#{ew.entity.comDateTime}</if>
<if test="ew.entity.isReceive!=null"> AND IS_RECEIVE=#{ew.entity.isReceive}</if>
<if test="ew.entity.turnoutWorkcenter!=null"> AND TURNOUT_WORKCENTER=#{ew.entity.turnoutWorkcenter}</if>
<if test="ew.entity.turnoutItem!=null"> AND TURNOUT_ITEM=#{ew.entity.turnoutItem}</if>
<if test="ew.entity.other4!=null"> AND OTHER4=#{ew.entity.other4}</if>
<if test="ew.entity.other5!=null"> AND OTHER5=#{ew.entity.other5}</if>
<if test="ew.entity.other6!=null"> AND OTHER6=#{ew.entity.other6}</if>
<if test="ew.entity.sfcDispatchBo!=null">AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test="ew.entity.status!=null">AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.createdDateTime!=null">AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.user!=null">AND USER=#{ew.entity.user}</if>
<if test="ew.entity.userName!=null">AND USER_NAME=#{ew.entity.userName}</if>
<if test="ew.entity.other1!=null">AND OTHER1=#{ew.entity.other1}</if>
<if test="ew.entity.other2!=null">AND OTHER2=#{ew.entity.other2}</if>
<if test="ew.entity.other3!=null">AND OTHER3=#{ew.entity.other3}</if>
<if test="ew.entity.storageLocation!=null">AND STORAGE_LOCATION=#{ew.entity.storageLocation}</if>
<if test="ew.entity.turnoverWorkCenter!=null">AND
TURNOVER_WORK_CENTER=#{ew.entity.turnoverWorkCenter}
</if>
<if test="ew.entity.comDateTime!=null">AND COM_DATE_TIME=#{ew.entity.comDateTime}</if>
<if test="ew.entity.isReceive!=null">AND IS_RECEIVE=#{ew.entity.isReceive}</if>
<if test="ew.entity.turnoutWorkcenter!=null">AND TURNOUT_WORKCENTER=#{ew.entity.turnoutWorkcenter}
</if>
<if test="ew.entity.turnoutItem!=null">AND TURNOUT_ITEM=#{ew.entity.turnoutItem}</if>
<if test="ew.entity.other4!=null">AND OTHER4=#{ew.entity.other4}</if>
<if test="ew.entity.other5!=null">AND OTHER5=#{ew.entity.other5}</if>
<if test="ew.entity.other6!=null">AND OTHER6=#{ew.entity.other6}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
@ -165,30 +180,40 @@
</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_LOGISTICS_TURNOVER
SELECT
<choose>
<when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when>
<otherwise>
<include refid="Base_Column_List"></include>
</otherwise>
</choose>
FROM Z_LOGISTICS_TURNOVER
<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.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.user!=null"> AND USER=#{ew.entity.user}</if>
<if test="ew.entity.userName!=null"> AND USER_NAME=#{ew.entity.userName}</if>
<if test="ew.entity.other1!=null"> AND OTHER1=#{ew.entity.other1}</if>
<if test="ew.entity.other2!=null"> AND OTHER2=#{ew.entity.other2}</if>
<if test="ew.entity.other3!=null"> AND OTHER3=#{ew.entity.other3}</if>
<if test="ew.entity.storageLocation!=null"> AND STORAGE_LOCATION=#{ew.entity.storageLocation}</if>
<if test="ew.entity.turnoverWorkCenter!=null"> AND TURNOVER_WORK_CENTER=#{ew.entity.turnoverWorkCenter}</if>
<if test="ew.entity.comDateTime!=null"> AND COM_DATE_TIME=#{ew.entity.comDateTime}</if>
<if test="ew.entity.isReceive!=null"> AND IS_RECEIVE=#{ew.entity.isReceive}</if>
<if test="ew.entity.turnoutWorkcenter!=null"> AND TURNOUT_WORKCENTER=#{ew.entity.turnoutWorkcenter}</if>
<if test="ew.entity.turnoutItem!=null"> AND TURNOUT_ITEM=#{ew.entity.turnoutItem}</if>
<if test="ew.entity.other4!=null"> AND OTHER4=#{ew.entity.other4}</if>
<if test="ew.entity.other5!=null"> AND OTHER5=#{ew.entity.other5}</if>
<if test="ew.entity.other6!=null"> AND OTHER6=#{ew.entity.other6}</if>
<if test="ew.entity.sfcDispatchBo!=null">AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test="ew.entity.status!=null">AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.createdDateTime!=null">AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.user!=null">AND USER=#{ew.entity.user}</if>
<if test="ew.entity.userName!=null">AND USER_NAME=#{ew.entity.userName}</if>
<if test="ew.entity.other1!=null">AND OTHER1=#{ew.entity.other1}</if>
<if test="ew.entity.other2!=null">AND OTHER2=#{ew.entity.other2}</if>
<if test="ew.entity.other3!=null">AND OTHER3=#{ew.entity.other3}</if>
<if test="ew.entity.storageLocation!=null">AND STORAGE_LOCATION=#{ew.entity.storageLocation}</if>
<if test="ew.entity.turnoverWorkCenter!=null">AND
TURNOVER_WORK_CENTER=#{ew.entity.turnoverWorkCenter}
</if>
<if test="ew.entity.comDateTime!=null">AND COM_DATE_TIME=#{ew.entity.comDateTime}</if>
<if test="ew.entity.isReceive!=null">AND IS_RECEIVE=#{ew.entity.isReceive}</if>
<if test="ew.entity.turnoutWorkcenter!=null">AND TURNOUT_WORKCENTER=#{ew.entity.turnoutWorkcenter}
</if>
<if test="ew.entity.turnoutItem!=null">AND TURNOUT_ITEM=#{ew.entity.turnoutItem}</if>
<if test="ew.entity.other4!=null">AND OTHER4=#{ew.entity.other4}</if>
<if test="ew.entity.other5!=null">AND OTHER5=#{ew.entity.other5}</if>
<if test="ew.entity.other6!=null">AND OTHER6=#{ew.entity.other6}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
@ -201,30 +226,40 @@
</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_LOGISTICS_TURNOVER
SELECT
<choose>
<when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when>
<otherwise>
<include refid="Base_Column_List"></include>
</otherwise>
</choose>
FROM Z_LOGISTICS_TURNOVER
<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.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.user!=null"> AND USER=#{ew.entity.user}</if>
<if test="ew.entity.userName!=null"> AND USER_NAME=#{ew.entity.userName}</if>
<if test="ew.entity.other1!=null"> AND OTHER1=#{ew.entity.other1}</if>
<if test="ew.entity.other2!=null"> AND OTHER2=#{ew.entity.other2}</if>
<if test="ew.entity.other3!=null"> AND OTHER3=#{ew.entity.other3}</if>
<if test="ew.entity.storageLocation!=null"> AND STORAGE_LOCATION=#{ew.entity.storageLocation}</if>
<if test="ew.entity.turnoverWorkCenter!=null"> AND TURNOVER_WORK_CENTER=#{ew.entity.turnoverWorkCenter}</if>
<if test="ew.entity.comDateTime!=null"> AND COM_DATE_TIME=#{ew.entity.comDateTime}</if>
<if test="ew.entity.isReceive!=null"> AND IS_RECEIVE=#{ew.entity.isReceive}</if>
<if test="ew.entity.turnoutWorkcenter!=null"> AND TURNOUT_WORKCENTER=#{ew.entity.turnoutWorkcenter}</if>
<if test="ew.entity.turnoutItem!=null"> AND TURNOUT_ITEM=#{ew.entity.turnoutItem}</if>
<if test="ew.entity.other4!=null"> AND OTHER4=#{ew.entity.other4}</if>
<if test="ew.entity.other5!=null"> AND OTHER5=#{ew.entity.other5}</if>
<if test="ew.entity.other6!=null"> AND OTHER6=#{ew.entity.other6}</if>
<if test="ew.entity.sfcDispatchBo!=null">AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test="ew.entity.status!=null">AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.createdDateTime!=null">AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.user!=null">AND USER=#{ew.entity.user}</if>
<if test="ew.entity.userName!=null">AND USER_NAME=#{ew.entity.userName}</if>
<if test="ew.entity.other1!=null">AND OTHER1=#{ew.entity.other1}</if>
<if test="ew.entity.other2!=null">AND OTHER2=#{ew.entity.other2}</if>
<if test="ew.entity.other3!=null">AND OTHER3=#{ew.entity.other3}</if>
<if test="ew.entity.storageLocation!=null">AND STORAGE_LOCATION=#{ew.entity.storageLocation}</if>
<if test="ew.entity.turnoverWorkCenter!=null">AND
TURNOVER_WORK_CENTER=#{ew.entity.turnoverWorkCenter}
</if>
<if test="ew.entity.comDateTime!=null">AND COM_DATE_TIME=#{ew.entity.comDateTime}</if>
<if test="ew.entity.isReceive!=null">AND IS_RECEIVE=#{ew.entity.isReceive}</if>
<if test="ew.entity.turnoutWorkcenter!=null">AND TURNOUT_WORKCENTER=#{ew.entity.turnoutWorkcenter}
</if>
<if test="ew.entity.turnoutItem!=null">AND TURNOUT_ITEM=#{ew.entity.turnoutItem}</if>
<if test="ew.entity.other4!=null">AND OTHER4=#{ew.entity.other4}</if>
<if test="ew.entity.other5!=null">AND OTHER5=#{ew.entity.other5}</if>
<if test="ew.entity.other6!=null">AND OTHER6=#{ew.entity.other6}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
@ -252,7 +287,14 @@
</sql>
<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_LOGISTICS_TURNOVER ZLT
SELECT
<choose>
<when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when>
<otherwise>
<include refid="Base_Column_List"></include>
</otherwise>
</choose>
FROM Z_LOGISTICS_TURNOVER ZLT
<where>
<if test="ew!=null">
@ -260,23 +302,26 @@
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.user!=null"> AND USER=#{ew.entity.user}</if>
<if test="ew.entity.userName!=null"> AND USER_NAME=#{ew.entity.userName}</if>
<if test="ew.entity.other1!=null"> AND OTHER1=#{ew.entity.other1}</if>
<if test="ew.entity.other2!=null"> AND OTHER2=#{ew.entity.other2}</if>
<if test="ew.entity.other3!=null"> AND OTHER3=#{ew.entity.other3}</if>
<if test="ew.entity.storageLocation!=null"> AND STORAGE_LOCATION=#{ew.entity.storageLocation}</if>
<if test="ew.entity.turnoverWorkCenter!=null"> AND TURNOVER_WORK_CENTER=#{ew.entity.turnoverWorkCenter}</if>
<if test="ew.entity.comDateTime!=null"> AND COM_DATE_TIME=#{ew.entity.comDateTime}</if>
<if test="ew.entity.isReceive!=null"> AND IS_RECEIVE=#{ew.entity.isReceive}</if>
<if test="ew.entity.turnoutWorkcenter!=null"> AND TURNOUT_WORKCENTER=#{ew.entity.turnoutWorkcenter}</if>
<if test="ew.entity.turnoutItem!=null"> AND TURNOUT_ITEM=#{ew.entity.turnoutItem}</if>
<if test="ew.entity.other4!=null"> AND OTHER4=#{ew.entity.other4}</if>
<if test="ew.entity.other5!=null"> AND OTHER5=#{ew.entity.other5}</if>
<if test="ew.entity.other6!=null"> AND OTHER6=#{ew.entity.other6}</if>
<if test="ew.entity.sfcDispatchBo!=null">AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test="ew.entity.status!=null">AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.createdDateTime!=null">AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.user!=null">AND USER=#{ew.entity.user}</if>
<if test="ew.entity.userName!=null">AND USER_NAME=#{ew.entity.userName}</if>
<if test="ew.entity.other1!=null">AND OTHER1=#{ew.entity.other1}</if>
<if test="ew.entity.other2!=null">AND OTHER2=#{ew.entity.other2}</if>
<if test="ew.entity.other3!=null">AND OTHER3=#{ew.entity.other3}</if>
<if test="ew.entity.storageLocation!=null">AND STORAGE_LOCATION=#{ew.entity.storageLocation}</if>
<if test="ew.entity.turnoverWorkCenter!=null">AND
TURNOVER_WORK_CENTER=#{ew.entity.turnoverWorkCenter}
</if>
<if test="ew.entity.comDateTime!=null">AND COM_DATE_TIME=#{ew.entity.comDateTime}</if>
<if test="ew.entity.isReceive!=null">AND IS_RECEIVE=#{ew.entity.isReceive}</if>
<if test="ew.entity.turnoutWorkcenter!=null">AND TURNOUT_WORKCENTER=#{ew.entity.turnoutWorkcenter}
</if>
<if test="ew.entity.turnoutItem!=null">AND TURNOUT_ITEM=#{ew.entity.turnoutItem}</if>
<if test="ew.entity.other4!=null">AND OTHER4=#{ew.entity.other4}</if>
<if test="ew.entity.other5!=null">AND OTHER5=#{ew.entity.other5}</if>
<if test="ew.entity.other6!=null">AND OTHER6=#{ew.entity.other6}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
@ -289,30 +334,40 @@
</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_LOGISTICS_TURNOVER
SELECT
<choose>
<when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when>
<otherwise>
<include refid="Base_Column_List"></include>
</otherwise>
</choose>
FROM Z_LOGISTICS_TURNOVER
<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.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.user!=null"> AND USER=#{ew.entity.user}</if>
<if test="ew.entity.userName!=null"> AND USER_NAME=#{ew.entity.userName}</if>
<if test="ew.entity.other1!=null"> AND OTHER1=#{ew.entity.other1}</if>
<if test="ew.entity.other2!=null"> AND OTHER2=#{ew.entity.other2}</if>
<if test="ew.entity.other3!=null"> AND OTHER3=#{ew.entity.other3}</if>
<if test="ew.entity.storageLocation!=null"> AND STORAGE_LOCATION=#{ew.entity.storageLocation}</if>
<if test="ew.entity.turnoverWorkCenter!=null"> AND TURNOVER_WORK_CENTER=#{ew.entity.turnoverWorkCenter}</if>
<if test="ew.entity.comDateTime!=null"> AND COM_DATE_TIME=#{ew.entity.comDateTime}</if>
<if test="ew.entity.isReceive!=null"> AND IS_RECEIVE=#{ew.entity.isReceive}</if>
<if test="ew.entity.turnoutWorkcenter!=null"> AND TURNOUT_WORKCENTER=#{ew.entity.turnoutWorkcenter}</if>
<if test="ew.entity.turnoutItem!=null"> AND TURNOUT_ITEM=#{ew.entity.turnoutItem}</if>
<if test="ew.entity.other4!=null"> AND OTHER4=#{ew.entity.other4}</if>
<if test="ew.entity.other5!=null"> AND OTHER5=#{ew.entity.other5}</if>
<if test="ew.entity.other6!=null"> AND OTHER6=#{ew.entity.other6}</if>
<if test="ew.entity.sfcDispatchBo!=null">AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test="ew.entity.status!=null">AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.createdDateTime!=null">AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.user!=null">AND USER=#{ew.entity.user}</if>
<if test="ew.entity.userName!=null">AND USER_NAME=#{ew.entity.userName}</if>
<if test="ew.entity.other1!=null">AND OTHER1=#{ew.entity.other1}</if>
<if test="ew.entity.other2!=null">AND OTHER2=#{ew.entity.other2}</if>
<if test="ew.entity.other3!=null">AND OTHER3=#{ew.entity.other3}</if>
<if test="ew.entity.storageLocation!=null">AND STORAGE_LOCATION=#{ew.entity.storageLocation}</if>
<if test="ew.entity.turnoverWorkCenter!=null">AND
TURNOVER_WORK_CENTER=#{ew.entity.turnoverWorkCenter}
</if>
<if test="ew.entity.comDateTime!=null">AND COM_DATE_TIME=#{ew.entity.comDateTime}</if>
<if test="ew.entity.isReceive!=null">AND IS_RECEIVE=#{ew.entity.isReceive}</if>
<if test="ew.entity.turnoutWorkcenter!=null">AND TURNOUT_WORKCENTER=#{ew.entity.turnoutWorkcenter}
</if>
<if test="ew.entity.turnoutItem!=null">AND TURNOUT_ITEM=#{ew.entity.turnoutItem}</if>
<if test="ew.entity.other4!=null">AND OTHER4=#{ew.entity.other4}</if>
<if test="ew.entity.other5!=null">AND OTHER5=#{ew.entity.other5}</if>
<if test="ew.entity.other6!=null">AND OTHER6=#{ew.entity.other6}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
@ -345,7 +400,8 @@
<if test="other4!=null">OTHER4,</if>
<if test="other5!=null">OTHER5,</if>
<if test="other6!=null">OTHER6,</if>
</trim> VALUES
</trim>
VALUES
<trim prefix="(" suffix=")" suffixOverrides=",">
#{handle},
<if test="sfcDispatchBo!=null">#{sfcDispatchBo},</if>
@ -372,7 +428,8 @@
INSERT INTO Z_LOGISTICS_TURNOVER
<trim prefix="(" suffix=")" suffixOverrides=",">
<include refid="Base_Column_List"></include>
</trim> VALUES
</trim>
VALUES
<trim prefix="(" suffix=")" suffixOverrides=",">
#{handle},
#{sfcDispatchBo},
@ -397,25 +454,32 @@
<update id="updateById">
UPDATE Z_LOGISTICS_TURNOVER <trim prefix="SET" suffixOverrides=",">
<if test="et.sfcDispatchBo!=null">SFC_DISPATCH_BO=#{et.sfcDispatchBo},</if>
<if test="et.status!=null">STATUS=#{et.status},</if>
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
<if test="et.user!=null">USER=#{et.user},</if>
<if test="et.userName!=null">USER_NAME=#{et.userName},</if>
<if test="et.other1!=null">OTHER1=#{et.other1},</if>
<if test="et.other2!=null">OTHER2=#{et.other2},</if>
<if test="et.other3!=null">OTHER3=#{et.other3},</if>
<if test="et.storageLocation!=null">STORAGE_LOCATION=#{et.storageLocation},</if>
<if test="et.turnoverWorkCenter!=null">TURNOVER_WORK_CENTER=#{et.turnoverWorkCenter},</if>
<if test="et.comDateTime!=null">COM_DATE_TIME=#{et.comDateTime},</if>
<if test="et.isReceive!=null">IS_RECEIVE=#{et.isReceive},</if>
<if test="et.turnoutWorkcenter!=null">TURNOUT_WORKCENTER=#{et.turnoutWorkcenter},</if>
<if test="et.turnoutItem!=null">TURNOUT_ITEM=#{et.turnoutItem},</if>
<if test="et.other4!=null">OTHER4=#{et.other4},</if>
<if test="et.other5!=null">OTHER5=#{et.other5},</if>
<if test="et.other6!=null">OTHER6=#{et.other6},</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 Z_LOGISTICS_TURNOVER
<trim prefix="SET" suffixOverrides=",">
<if test="et.sfcDispatchBo!=null">SFC_DISPATCH_BO=#{et.sfcDispatchBo},</if>
<if test="et.status!=null">STATUS=#{et.status},</if>
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
<if test="et.user!=null">USER=#{et.user},</if>
<if test="et.userName!=null">USER_NAME=#{et.userName},</if>
<if test="et.other1!=null">OTHER1=#{et.other1},</if>
<if test="et.other2!=null">OTHER2=#{et.other2},</if>
<if test="et.other3!=null">OTHER3=#{et.other3},</if>
<if test="et.storageLocation!=null">STORAGE_LOCATION=#{et.storageLocation},</if>
<if test="et.turnoverWorkCenter!=null">TURNOVER_WORK_CENTER=#{et.turnoverWorkCenter},</if>
<if test="et.comDateTime!=null">COM_DATE_TIME=#{et.comDateTime},</if>
<if test="et.isReceive!=null">IS_RECEIVE=#{et.isReceive},</if>
<if test="et.turnoutWorkcenter!=null">TURNOUT_WORKCENTER=#{et.turnoutWorkcenter},</if>
<if test="et.turnoutItem!=null">TURNOUT_ITEM=#{et.turnoutItem},</if>
<if test="et.other4!=null">OTHER4=#{et.other4},</if>
<if test="et.other5!=null">OTHER5=#{et.other5},</if>
<if test="et.other6!=null">OTHER6=#{et.other6},</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>
@ -438,51 +502,60 @@
OTHER4=#{et.other4},
OTHER5=#{et.other5},
OTHER6=#{et.other6},
</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>
</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_LOGISTICS_TURNOVER <trim prefix="SET" suffixOverrides=",">
<if test="et.sfcDispatchBo!=null">SFC_DISPATCH_BO=#{et.sfcDispatchBo},</if>
<if test="et.status!=null">STATUS=#{et.status},</if>
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
<if test="et.user!=null">USER=#{et.user},</if>
<if test="et.userName!=null">USER_NAME=#{et.userName},</if>
<if test="et.other1!=null">OTHER1=#{et.other1},</if>
<if test="et.other2!=null">OTHER2=#{et.other2},</if>
<if test="et.other3!=null">OTHER3=#{et.other3},</if>
<if test="et.storageLocation!=null">STORAGE_LOCATION=#{et.storageLocation},</if>
<if test="et.turnoverWorkCenter!=null">TURNOVER_WORK_CENTER=#{et.turnoverWorkCenter},</if>
<if test="et.comDateTime!=null">COM_DATE_TIME=#{et.comDateTime},</if>
<if test="et.isReceive!=null">IS_RECEIVE=#{et.isReceive},</if>
<if test="et.turnoutWorkcenter!=null">TURNOUT_WORKCENTER=#{et.turnoutWorkcenter},</if>
<if test="et.turnoutItem!=null">TURNOUT_ITEM=#{et.turnoutItem},</if>
<if test="et.other4!=null">OTHER4=#{et.other4},</if>
<if test="et.other5!=null">OTHER5=#{et.other5},</if>
<if test="et.other6!=null">OTHER6=#{et.other6},</if>
</trim>
UPDATE Z_LOGISTICS_TURNOVER
<trim prefix="SET" suffixOverrides=",">
<if test="et.sfcDispatchBo!=null">SFC_DISPATCH_BO=#{et.sfcDispatchBo},</if>
<if test="et.status!=null">STATUS=#{et.status},</if>
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
<if test="et.user!=null">USER=#{et.user},</if>
<if test="et.userName!=null">USER_NAME=#{et.userName},</if>
<if test="et.other1!=null">OTHER1=#{et.other1},</if>
<if test="et.other2!=null">OTHER2=#{et.other2},</if>
<if test="et.other3!=null">OTHER3=#{et.other3},</if>
<if test="et.storageLocation!=null">STORAGE_LOCATION=#{et.storageLocation},</if>
<if test="et.turnoverWorkCenter!=null">TURNOVER_WORK_CENTER=#{et.turnoverWorkCenter},</if>
<if test="et.comDateTime!=null">COM_DATE_TIME=#{et.comDateTime},</if>
<if test="et.isReceive!=null">IS_RECEIVE=#{et.isReceive},</if>
<if test="et.turnoutWorkcenter!=null">TURNOUT_WORKCENTER=#{et.turnoutWorkcenter},</if>
<if test="et.turnoutItem!=null">TURNOUT_ITEM=#{et.turnoutItem},</if>
<if test="et.other4!=null">OTHER4=#{et.other4},</if>
<if test="et.other5!=null">OTHER5=#{et.other5},</if>
<if test="et.other6!=null">OTHER6=#{et.other6},</if>
</trim>
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
HANDLE=#{ew.entity.handle}
<if test="ew.entity.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.user!=null"> AND USER=#{ew.entity.user}</if>
<if test="ew.entity.userName!=null"> AND USER_NAME=#{ew.entity.userName}</if>
<if test="ew.entity.other1!=null"> AND OTHER1=#{ew.entity.other1}</if>
<if test="ew.entity.other2!=null"> AND OTHER2=#{ew.entity.other2}</if>
<if test="ew.entity.other3!=null"> AND OTHER3=#{ew.entity.other3}</if>
<if test="ew.entity.storageLocation!=null"> AND STORAGE_LOCATION=#{ew.entity.storageLocation}</if>
<if test="ew.entity.turnoverWorkCenter!=null"> AND TURNOVER_WORK_CENTER=#{ew.entity.turnoverWorkCenter}</if>
<if test="ew.entity.comDateTime!=null"> AND COM_DATE_TIME=#{ew.entity.comDateTime}</if>
<if test="ew.entity.isReceive!=null"> AND IS_RECEIVE=#{ew.entity.isReceive}</if>
<if test="ew.entity.turnoutWorkcenter!=null"> AND TURNOUT_WORKCENTER=#{ew.entity.turnoutWorkcenter}</if>
<if test="ew.entity.turnoutItem!=null"> AND TURNOUT_ITEM=#{ew.entity.turnoutItem}</if>
<if test="ew.entity.other4!=null"> AND OTHER4=#{ew.entity.other4}</if>
<if test="ew.entity.other5!=null"> AND OTHER5=#{ew.entity.other5}</if>
<if test="ew.entity.other6!=null"> AND OTHER6=#{ew.entity.other6}</if>
<if test="ew.entity.sfcDispatchBo!=null">AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test="ew.entity.status!=null">AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.createdDateTime!=null">AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.user!=null">AND USER=#{ew.entity.user}</if>
<if test="ew.entity.userName!=null">AND USER_NAME=#{ew.entity.userName}</if>
<if test="ew.entity.other1!=null">AND OTHER1=#{ew.entity.other1}</if>
<if test="ew.entity.other2!=null">AND OTHER2=#{ew.entity.other2}</if>
<if test="ew.entity.other3!=null">AND OTHER3=#{ew.entity.other3}</if>
<if test="ew.entity.storageLocation!=null">AND STORAGE_LOCATION=#{ew.entity.storageLocation}</if>
<if test="ew.entity.turnoverWorkCenter!=null">AND
TURNOVER_WORK_CENTER=#{ew.entity.turnoverWorkCenter}
</if>
<if test="ew.entity.comDateTime!=null">AND COM_DATE_TIME=#{ew.entity.comDateTime}</if>
<if test="ew.entity.isReceive!=null">AND IS_RECEIVE=#{ew.entity.isReceive}</if>
<if test="ew.entity.turnoutWorkcenter!=null">AND TURNOUT_WORKCENTER=#{ew.entity.turnoutWorkcenter}
</if>
<if test="ew.entity.turnoutItem!=null">AND TURNOUT_ITEM=#{ew.entity.turnoutItem}</if>
<if test="ew.entity.other4!=null">AND OTHER4=#{ew.entity.other4}</if>
<if test="ew.entity.other5!=null">AND OTHER5=#{ew.entity.other5}</if>
<if test="ew.entity.other6!=null">AND OTHER6=#{ew.entity.other6}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
@ -519,23 +592,26 @@
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.user!=null"> AND USER=#{ew.entity.user}</if>
<if test="ew.entity.userName!=null"> AND USER_NAME=#{ew.entity.userName}</if>
<if test="ew.entity.other1!=null"> AND OTHER1=#{ew.entity.other1}</if>
<if test="ew.entity.other2!=null"> AND OTHER2=#{ew.entity.other2}</if>
<if test="ew.entity.other3!=null"> AND OTHER3=#{ew.entity.other3}</if>
<if test="ew.entity.storageLocation!=null"> AND STORAGE_LOCATION=#{ew.entity.storageLocation}</if>
<if test="ew.entity.turnoverWorkCenter!=null"> AND TURNOVER_WORK_CENTER=#{ew.entity.turnoverWorkCenter}</if>
<if test="ew.entity.comDateTime!=null"> AND COM_DATE_TIME=#{ew.entity.comDateTime}</if>
<if test="ew.entity.isReceive!=null"> AND IS_RECEIVE=#{ew.entity.isReceive}</if>
<if test="ew.entity.turnoutWorkcenter!=null"> AND TURNOUT_WORKCENTER=#{ew.entity.turnoutWorkcenter}</if>
<if test="ew.entity.turnoutItem!=null"> AND TURNOUT_ITEM=#{ew.entity.turnoutItem}</if>
<if test="ew.entity.other4!=null"> AND OTHER4=#{ew.entity.other4}</if>
<if test="ew.entity.other5!=null"> AND OTHER5=#{ew.entity.other5}</if>
<if test="ew.entity.other6!=null"> AND OTHER6=#{ew.entity.other6}</if>
<if test="ew.entity.sfcDispatchBo!=null">AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test="ew.entity.status!=null">AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.createdDateTime!=null">AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.user!=null">AND USER=#{ew.entity.user}</if>
<if test="ew.entity.userName!=null">AND USER_NAME=#{ew.entity.userName}</if>
<if test="ew.entity.other1!=null">AND OTHER1=#{ew.entity.other1}</if>
<if test="ew.entity.other2!=null">AND OTHER2=#{ew.entity.other2}</if>
<if test="ew.entity.other3!=null">AND OTHER3=#{ew.entity.other3}</if>
<if test="ew.entity.storageLocation!=null">AND STORAGE_LOCATION=#{ew.entity.storageLocation}</if>
<if test="ew.entity.turnoverWorkCenter!=null">AND
TURNOVER_WORK_CENTER=#{ew.entity.turnoverWorkCenter}
</if>
<if test="ew.entity.comDateTime!=null">AND COM_DATE_TIME=#{ew.entity.comDateTime}</if>
<if test="ew.entity.isReceive!=null">AND IS_RECEIVE=#{ew.entity.isReceive}</if>
<if test="ew.entity.turnoutWorkcenter!=null">AND TURNOUT_WORKCENTER=#{ew.entity.turnoutWorkcenter}
</if>
<if test="ew.entity.turnoutItem!=null">AND TURNOUT_ITEM=#{ew.entity.turnoutItem}</if>
<if test="ew.entity.other4!=null">AND OTHER4=#{ew.entity.other4}</if>
<if test="ew.entity.other5!=null">AND OTHER5=#{ew.entity.other5}</if>
<if test="ew.entity.other6!=null">AND OTHER6=#{ew.entity.other6}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
@ -568,59 +644,59 @@
</select>
<select id="queryLogisticsTurnoverList" resultType="com.foreverwin.mesnac.meapi.dto.LogisticsDto">
SELECT
WCT.DESCRIPTION NEXT_WORK_CENTER,
ZSD.SFC,
C1.VALUE WORK_ORDER,
IT.DESCRIPTION ITEM_DESCRIPTION,
ZSD.BLANKING_SIZE,
ZSD.DISPATCH_QTY,
OT1.DESCRIPTION OVER_OPERATION,
OT.DESCRIPTION NEXT_OPERATION,
ZSD.EMPLOYEE_DESCRIPTION,
ZLT.TURNOVER_WORK_CENTER,
ZLT.CREATED_DATE_TIME
FROM
Z_LOGISTICS_TURNOVER ZLT
LEFT JOIN WORK_CENTER WC ON WC.WORK_CENTER = ZLT.TURNOVER_WORK_CENTER
LEFT JOIN WORK_CENTER_T WCT ON WCT.WORK_CENTER_BO = WC.HANDLE
LEFT JOIN Z_SFC_DISPATCH ZSD ON ZLT.SFC_DISPATCH_BO = ZSD.HANDLE
LEFT JOIN OPERATION O1 ON O1.OPERATION = ZSD.OPERATION
LEFT JOIN OPERATION_T OT1 ON OT1.OPERATION_BO = O1.HANDLE
LEFT JOIN OPERATION O ON O.OPERATION = ZLT.OTHER1
LEFT JOIN OPERATION_T OT ON OT.OPERATION_BO = O.HANDLE
INNER JOIN SHOP_ORDER SO ON SO.SITE = ZSD.SITE
AND SO.SHOP_ORDER = ZSD.SHOP_ORDER
LEFT JOIN CUSTOM_FIELDS C1 ON C1.HANDLE = SO.HANDLE
AND C1."ATTRIBUTE" = 'WORK_ORDER'
INNER JOIN ITEM IM ON IM.HANDLE = SO.ITEM_BO
LEFT JOIN ITEM_T IT ON IT.ITEM_BO = IM.HANDLE
AND IT.LOCALE = 'zh'
INNER JOIN OPERATION O ON O.SITE = ZSD.SITE
AND O.OPERATION = ZSD.OPERATION
AND O.CURRENT_REVISION = 'true'
LEFT JOIN OPERATION_T OT ON OT.OPERATION_BO = O.HANDLE
AND OT.LOCALE = 'zh'
WHERE ZLT.STATUS = 'NEW'
<if test="HJHJ!=null"> AND ZLT.TURNOUT_ITEM like '02%' AND ZLT.TURNOUT_WORKCENTER = 'HJ' </if>
<if test="HJXL!=null"> AND ZLT.TURNOUT_ITEM like '03%' AND ZLT.TURNOUT_WORKCENTER = 'HJ' </if>
<if test="JJ!=null">AND ZLT.TURNOUT_WORKCENTER = 'JJ' </if>
<if test="WX!=null">AND ZLT.TURNOUT_WORKCENTER = 'WX' </if>
<if test="RC!=null">AND ZLT.TURNOUT_WORKCENTER = 'RC' </if>
<if test="ZP!=null">AND ZLT.TURNOUT_WORKCENTER = 'ZP' </if>
GROUP BY WCT.DESCRIPTION,
ZSD.SFC,
C1.VALUE,
IT.DESCRIPTION,
ZSD.BLANKING_SIZE,
ZSD.DISPATCH_QTY,
OT1.DESCRIPTION,
OT.DESCRIPTION,
ZSD.EMPLOYEE_DESCRIPTION,
ZLT.TURNOVER_WORK_CENTER,
ZLT.CREATED_DATE_TIME
ORDER BY ZLT.CREATED_DATE_TIME DESC
SELECT
WCT.DESCRIPTION NEXT_WORK_CENTER,
ZSD.SFC,
C1.VALUE WORK_ORDER,
IT.DESCRIPTION ITEM_DESCRIPTION,
ZSD.BLANKING_SIZE,
ZSD.DISPATCH_QTY,
OT1.DESCRIPTION OVER_OPERATION,
OT.DESCRIPTION NEXT_OPERATION,
ZSD.EMPLOYEE_DESCRIPTION,
ZLT.TURNOVER_WORK_CENTER,
ZLT.CREATED_DATE_TIME
FROM
Z_LOGISTICS_TURNOVER ZLT
LEFT JOIN WORK_CENTER WC ON WC.WORK_CENTER = ZLT.TURNOVER_WORK_CENTER
LEFT JOIN WORK_CENTER_T WCT ON WCT.WORK_CENTER_BO = WC.HANDLE
LEFT JOIN Z_SFC_DISPATCH ZSD ON ZLT.SFC_DISPATCH_BO = ZSD.HANDLE
LEFT JOIN OPERATION O1 ON O1.OPERATION = ZSD.OPERATION
LEFT JOIN OPERATION_T OT1 ON OT1.OPERATION_BO = O1.HANDLE
LEFT JOIN OPERATION O ON O.OPERATION = ZLT.OTHER1
LEFT JOIN OPERATION_T OT ON OT.OPERATION_BO = O.HANDLE
INNER JOIN SHOP_ORDER SO ON SO.SITE = ZSD.SITE
AND SO.SHOP_ORDER = ZSD.SHOP_ORDER
LEFT JOIN CUSTOM_FIELDS C1 ON C1.HANDLE = SO.HANDLE
AND C1."ATTRIBUTE" = 'WORK_ORDER'
INNER JOIN ITEM IM ON IM.HANDLE = SO.ITEM_BO
LEFT JOIN ITEM_T IT ON IT.ITEM_BO = IM.HANDLE
AND IT.LOCALE = 'zh'
INNER JOIN OPERATION O ON O.SITE = ZSD.SITE
AND O.OPERATION = ZSD.OPERATION
AND O.CURRENT_REVISION = 'true'
LEFT JOIN OPERATION_T OT ON OT.OPERATION_BO = O.HANDLE
AND OT.LOCALE = 'zh'
WHERE ZLT.STATUS = 'NEW'
<if test="HJHJ!=null">AND ZLT.TURNOUT_ITEM like '02%' AND ZLT.TURNOUT_WORKCENTER = 'HJ'</if>
<if test="HJXL!=null">AND ZLT.TURNOUT_ITEM like '03%' AND ZLT.TURNOUT_WORKCENTER = 'HJ'</if>
<if test="JJ!=null">AND ZLT.TURNOUT_WORKCENTER = 'JJ'</if>
<if test="WX!=null">AND ZLT.TURNOUT_WORKCENTER = 'WX'</if>
<if test="RC!=null">AND ZLT.TURNOUT_WORKCENTER = 'RC'</if>
<if test="ZP!=null">AND ZLT.TURNOUT_WORKCENTER = 'ZP'</if>
GROUP BY WCT.DESCRIPTION,
ZSD.SFC,
C1.VALUE,
IT.DESCRIPTION,
ZSD.BLANKING_SIZE,
ZSD.DISPATCH_QTY,
OT1.DESCRIPTION,
OT.DESCRIPTION,
ZSD.EMPLOYEE_DESCRIPTION,
ZLT.TURNOVER_WORK_CENTER,
ZLT.CREATED_DATE_TIME
ORDER BY ZLT.CREATED_DATE_TIME DESC
</select>
<sql id="Select_LogisticsTurnOver_List">
WCT.DESCRIPTION NEXT_WORK_CENTER,
@ -636,7 +712,7 @@
ZLT.CREATED_DATE_TIME
</sql>
<select id="selectLogisticsDtoPage" resultType="com.foreverwin.mesnac.meapi.dto.LogisticsDto">
SELECT <include refid="Select_LogisticsTurnOver_List"></include> FROM Z_LOGISTICS_TURNOVER ZLT
SELECT <include refid="Select_LogisticsTurnOver_List"></include> FROM Z_LOGISTICS_TURNOVER ZLT
LEFT JOIN WORK_CENTER WC ON WC.WORK_CENTER = ZLT.TURNOVER_WORK_CENTER
LEFT JOIN WORK_CENTER_T WCT ON WCT.WORK_CENTER_BO = WC.HANDLE
LEFT JOIN Z_SFC_DISPATCH ZSD ON ZLT.SFC_DISPATCH_BO = ZSD.HANDLE
@ -662,23 +738,26 @@
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.user!=null"> AND USER=#{ew.entity.user}</if>
<if test="ew.entity.userName!=null"> AND USER_NAME=#{ew.entity.userName}</if>
<if test="ew.entity.other1!=null"> AND OTHER1=#{ew.entity.other1}</if>
<if test="ew.entity.other2!=null"> AND OTHER2=#{ew.entity.other2}</if>
<if test="ew.entity.other3!=null"> AND OTHER3=#{ew.entity.other3}</if>
<if test="ew.entity.storageLocation!=null"> AND STORAGE_LOCATION=#{ew.entity.storageLocation}</if>
<if test="ew.entity.turnoverWorkCenter!=null"> AND TURNOVER_WORK_CENTER=#{ew.entity.turnoverWorkCenter}</if>
<if test="ew.entity.comDateTime!=null"> AND COM_DATE_TIME=#{ew.entity.comDateTime}</if>
<if test="ew.entity.isReceive!=null"> AND IS_RECEIVE=#{ew.entity.isReceive}</if>
<if test="ew.entity.turnoutWorkcenter!=null"> AND TURNOUT_WORKCENTER=#{ew.entity.turnoutWorkcenter}</if>
<if test="ew.entity.turnoutItem!=null"> AND TURNOUT_ITEM=#{ew.entity.turnoutItem}</if>
<if test="ew.entity.other4!=null"> AND OTHER4=#{ew.entity.other4}</if>
<if test="ew.entity.other5!=null"> AND OTHER5=#{ew.entity.other5}</if>
<if test="ew.entity.other6!=null"> AND OTHER6=#{ew.entity.other6}</if>
<if test="ew.entity.sfcDispatchBo!=null">AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
<if test="ew.entity.status!=null">AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.createdDateTime!=null">AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.user!=null">AND USER=#{ew.entity.user}</if>
<if test="ew.entity.userName!=null">AND USER_NAME=#{ew.entity.userName}</if>
<if test="ew.entity.other1!=null">AND OTHER1=#{ew.entity.other1}</if>
<if test="ew.entity.other2!=null">AND OTHER2=#{ew.entity.other2}</if>
<if test="ew.entity.other3!=null">AND OTHER3=#{ew.entity.other3}</if>
<if test="ew.entity.storageLocation!=null">AND STORAGE_LOCATION=#{ew.entity.storageLocation}</if>
<if test="ew.entity.turnoverWorkCenter!=null">AND
TURNOVER_WORK_CENTER=#{ew.entity.turnoverWorkCenter}
</if>
<if test="ew.entity.comDateTime!=null">AND COM_DATE_TIME=#{ew.entity.comDateTime}</if>
<if test="ew.entity.isReceive!=null">AND IS_RECEIVE=#{ew.entity.isReceive}</if>
<if test="ew.entity.turnoutWorkcenter!=null">AND TURNOUT_WORKCENTER=#{ew.entity.turnoutWorkcenter}
</if>
<if test="ew.entity.turnoutItem!=null">AND TURNOUT_ITEM=#{ew.entity.turnoutItem}</if>
<if test="ew.entity.other4!=null">AND OTHER4=#{ew.entity.other4}</if>
<if test="ew.entity.other5!=null">AND OTHER5=#{ew.entity.other5}</if>
<if test="ew.entity.other6!=null">AND OTHER6=#{ew.entity.other6}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
@ -690,60 +769,114 @@
</if>
</select>
<select id="selectlogisticsturnoverlist" resultType="com.foreverwin.mesnac.meapi.dto.LogisticsDto" parameterType="com.foreverwin.mesnac.meapi.dto.LogisticsDto">
SELECT distinct
ZLT.HANDLE,
WCT.DESCRIPTION NEXT_WORK_CENTER,
ZSD.SFC,
C1.VALUE WORK_ORDER,
IT.DESCRIPTION ITEM_DESCRIPTION,
ZSD.BLANKING_SIZE,
ZSD.DISPATCH_QTY,
OT1.DESCRIPTION OVER_OPERATION,
OT.DESCRIPTION NEXT_OPERATION,
ZSD.EMPLOYEE_DESCRIPTION,
ZLT.TURNOVER_WORK_CENTER,
ZLT.CREATED_DATE_TIME,
C2.VALUE TEXTURE,
SO.QTY_TO_BUILD,
SO.SHOP_ORDER,
ZL.DESCRIPTION ZL_DESCRIPTION,
CASE WHEN ZLT.STATUS = 'NEW' THEN '待转运' ELSE '转运完成' END STATUS,
CASE WHEN ZLT.IS_RECEIVE = 'Y' THEN '已接收' ELSE '未接收' END IS_RECEIVE,
ZLT.OTHER5 COMFIRM_USER
FROM
Z_LOGISTICS_TURNOVER ZLT
LEFT JOIN WORK_CENTER WC ON WC.WORK_CENTER = ZLT.TURNOVER_WORK_CENTER
LEFT JOIN WORK_CENTER_T WCT ON WCT.WORK_CENTER_BO = WC.HANDLE
LEFT JOIN Z_SFC_DISPATCH ZSD ON ZLT.SFC_DISPATCH_BO = ZSD.HANDLE
LEFT JOIN OPERATION O1 ON O1.OPERATION = ZSD.OPERATION
LEFT JOIN OPERATION_T OT1 ON OT1.OPERATION_BO = O1.HANDLE
LEFT JOIN OPERATION O ON O.OPERATION = ZLT.OTHER1
LEFT JOIN OPERATION_T OT ON OT.OPERATION_BO = O.HANDLE
LEFT JOIN Z_LOCATION ZL ON ZL.LOCATION_CODE = ZLT.STORAGE_LOCATION
INNER JOIN SHOP_ORDER SO ON SO.SITE = ZSD.SITE
AND SO.SHOP_ORDER = ZSD.SHOP_ORDER
LEFT JOIN CUSTOM_FIELDS C1 ON C1.HANDLE = SO.HANDLE
AND C1."ATTRIBUTE" = 'WORK_ORDER'
INNER JOIN ITEM IM ON IM.HANDLE = SO.ITEM_BO
LEFT JOIN CUSTOM_FIELDS C2 ON C2.HANDLE = IM.HANDLE AND C2.ATTRIBUTE = 'TEXTTURE'
LEFT JOIN ITEM_T IT ON IT.ITEM_BO = IM.HANDLE
AND IT.LOCALE = 'zh'
INNER JOIN OPERATION O ON O.SITE = ZSD.SITE
AND O.OPERATION = ZSD.OPERATION
AND O.CURRENT_REVISION = 'true'
LEFT JOIN OPERATION_T OT ON OT.OPERATION_BO = O.HANDLE
AND OT.LOCALE = 'zh'
<select id="selectlogisticsturnoverlist" resultType="com.foreverwin.mesnac.meapi.dto.LogisticsDto"
parameterType="com.foreverwin.mesnac.meapi.dto.LogisticsDto">
SELECT distinct
ZLT.HANDLE,
WCT.DESCRIPTION NEXT_WORK_CENTER,
ZSD.SFC,
C1.VALUE WORK_ORDER,
IT.DESCRIPTION ITEM_DESCRIPTION,
ZSD.BLANKING_SIZE,
ZSD.DISPATCH_QTY,
OT1.DESCRIPTION OVER_OPERATION,
OT.DESCRIPTION NEXT_OPERATION,
ZSD.EMPLOYEE_DESCRIPTION,
ZLT.TURNOVER_WORK_CENTER,
ZLT.CREATED_DATE_TIME,
C2.VALUE TEXTURE,
SO.QTY_TO_BUILD,
SO.SHOP_ORDER,
ZL.DESCRIPTION ZL_DESCRIPTION,
CASE WHEN ZLT.STATUS = 'NEW' THEN '待转运' ELSE '转运完成' END STATUS,
CASE WHEN ZLT.IS_RECEIVE = 'Y' THEN '已接收' ELSE '未接收' END IS_RECEIVE,
ZLT.OTHER5 COMFIRM_USER
FROM
Z_LOGISTICS_TURNOVER ZLT
LEFT JOIN WORK_CENTER WC ON WC.WORK_CENTER = ZLT.TURNOVER_WORK_CENTER
LEFT JOIN WORK_CENTER_T WCT ON WCT.WORK_CENTER_BO = WC.HANDLE
LEFT JOIN Z_SFC_DISPATCH ZSD ON ZLT.SFC_DISPATCH_BO = ZSD.HANDLE
LEFT JOIN OPERATION O1 ON O1.OPERATION = ZSD.OPERATION
LEFT JOIN OPERATION_T OT1 ON OT1.OPERATION_BO = O1.HANDLE
LEFT JOIN OPERATION O ON O.OPERATION = ZLT.OTHER1
LEFT JOIN OPERATION_T OT ON OT.OPERATION_BO = O.HANDLE
LEFT JOIN Z_LOCATION ZL ON ZL.LOCATION_CODE = ZLT.STORAGE_LOCATION
INNER JOIN SHOP_ORDER SO ON SO.SITE = ZSD.SITE
AND SO.SHOP_ORDER = ZSD.SHOP_ORDER
LEFT JOIN CUSTOM_FIELDS C1 ON C1.HANDLE = SO.HANDLE
AND C1."ATTRIBUTE" = 'WORK_ORDER'
INNER JOIN ITEM IM ON IM.HANDLE = SO.ITEM_BO
LEFT JOIN CUSTOM_FIELDS C2 ON C2.HANDLE = IM.HANDLE AND C2.ATTRIBUTE = 'TEXTTURE'
LEFT JOIN ITEM_T IT ON IT.ITEM_BO = IM.HANDLE
AND IT.LOCALE = 'zh'
INNER JOIN OPERATION O ON O.SITE = ZSD.SITE
AND O.OPERATION = ZSD.OPERATION
AND O.CURRENT_REVISION = 'true'
LEFT JOIN OPERATION_T OT ON OT.OPERATION_BO = O.HANDLE
AND OT.LOCALE = 'zh'
<where>
<if test="status!=null"> AND STATUS=#{status}</if>
<if test="nextWorkCenter!=null"> AND TURNOVER_WORK_CENTER=#{nextWorkCenter}</if>
<if test="isReceive!=null"> AND IS_RECEIVE=#{isReceive}</if>
<if test="turnoutItem!=null"> AND TURNOUT_ITEM=#{turnoutItem}</if>
<if test="itemDescription!=null"> AND IT.DESCRIPTION LIKE '%'||#{itemDescription}||'%'</if>
<if test="workOrder!=null"> AND C1.VALUE LIKE '%'||#{workOrder}||'%'</if>
<if test="status!=null">AND STATUS=#{status}</if>
<if test="nextWorkCenter!=null">AND TURNOVER_WORK_CENTER=#{nextWorkCenter}</if>
<if test="isReceive!=null">AND IS_RECEIVE=#{isReceive}</if>
<if test="turnoutItem!=null">AND TURNOUT_ITEM=#{turnoutItem}</if>
<if test="itemDescription!=null">AND IT.DESCRIPTION LIKE '%'||#{itemDescription}||'%'</if>
<if test="workOrder!=null">AND C1.VALUE LIKE '%'||#{workOrder}||'%'</if>
</where>
</select>
<resultMap id="StoreSfcInfoM" type="com.foreverwin.mesnac.meapi.model.StoreSfcInfo">
<result column="SFC" property="sfc"/>
<result column="DISPATCH_QTY" property="dispatch_qty"/>
<result column="ITEM_BO" property="item_bo"/>
<result column="DESCRIPTION" property="description"/>
<result column="WORK_ORDER" property="work_order"/>
<result column="ITEM_NUMBER" property="item_number"/>
<result column="zs_qty" property="zs_qty"/>
<result column="ls_qty" property="ls_qty"/>
</resultMap>
<select id="storeSelectSfc" resultMap="StoreSfcInfoM">
SELECT *
FROM (SELECT zsd.sfc,
DISPATCH_QTY,
so.SHOP_ORDER,
substr(it.ITEM_BO,
instr(it.ITEM_BO, ',', 1, 1) + 1,
instr(it.ITEM_BO, ',', 1, 2) - instr(it.ITEM_BO, ',', 1, 1) - 1) as ITEM_BO,
it.DESCRIPTION,
ATTRIBUTE,
VALUE ,
IN_QTY,
IN_TYPE
FROM (select *
from (SELECT sfc, DISPATCH_QTY, SHOP_ORDER
FROM Z_SFC_DISPATCH
WHERE SFC = #{sfc}
ORDER BY ACTUAL_COMPLETE_DATE DESC)
where ROWNUM = 1) zsd
left join SHOP_ORDER so on so.SHOP_ORDER = zsd.SHOP_ORDER
left join ITEM_T it on it.ITEM_BO = so.ITEM_BO
LEFT JOIN CUSTOM_FIELDS cf
ON cf.HANDLE = SO.HANDLE AND cf.ATTRIBUTE in ('WORK_ORDER', 'ITEM_NUMBER')
left join STORE_RECORD_IN ri on ri.SFC = zsd.SFC
) a PIVOT (max(VALUE) FOR ATTRIBUTE IN ('WORK_ORDER' AS WORK_ORDER,'ITEM_NUMBER' AS ITEM_NUMBER))
PIVOT (sum(IN_QTY) FOR IN_TYPE IN ('0' AS zs_qty,'1' AS ls_qty) )
</select>
<insert id="insertRecordInStore">
INSERT INTO WIP.STORE_RECORD_IN (SFC, IN_QTY, STORE_LOCATION, WORK_USER, IN_TYPE)
VALUES (#{sfc}, #{qty}, #{storeLocation}, #{user}, #{inStoreType})
</insert>
<select id="countLedgerBySfc" resultType="integer">
select count(1) from STORE_RECORD_LEDGER where SFC=#{sfc}
</select>
<insert id="insertRecordLedger">
INSERT INTO WIP.STORE_RECORD_LEDGER (SFC, IN_QTY, STORE_LOCATION) VALUES (#{sfc}, #{qty}, #{storeLocation})
</insert>
<update id="updateRecordLedger">
update WIP.STORE_RECORD_LEDGER set IN_QTY=IN_QTY+#{qty} where SFC=#{sfc}
</update>
</mapper>

Loading…
Cancel
Save