Merge remote-tracking branch 'origin/master'

master
赵嘉伟 4 years ago
commit f5a031ddd9

@ -172,6 +172,8 @@ public interface Constants {
String PRINT_TYPE_INV = "INV";
// 在制品标签
String PRINT_TYPE_SFC = "SFC";
// 在制品标签条件打印
String PRINT_TYPE_SFC_SPE = "SFC_SPE";
// 余料标签
String PRINT_TYPE_EXM = "EXM";

@ -115,21 +115,17 @@ public class InspectionItemController {
public R page(FrontPage<InspectionItem> frontPage, InspectionItem inspectionItem){
IPage result;
QueryWrapper<InspectionItem> queryWrapper = new QueryWrapper<>();
inspectionItem.setSite(CommonMethods.getSite());
queryWrapper.setEntity(inspectionItem);
if (frontPage.getGlobalQuery() != null && !"".equals(frontPage.getGlobalQuery().trim())) {
//TODO modify global query
queryWrapper.lambda().and(wrapper -> wrapper
.like(InspectionItem::getHandle, frontPage.getGlobalQuery())
.or().like(InspectionItem::getSite, frontPage.getGlobalQuery())
.or().like(InspectionItem::getInspectionItemNo, frontPage.getGlobalQuery())
.like(InspectionItem::getInspectionItemNo, frontPage.getGlobalQuery())
.or().like(InspectionItem::getInspectionType, frontPage.getGlobalQuery())
.or().like(InspectionItem::getRevision, frontPage.getGlobalQuery())
.or().like(InspectionItem::getCurrentRevision, frontPage.getGlobalQuery())
.or().like(InspectionItem::getDescription, frontPage.getGlobalQuery())
.or().like(InspectionItem::getStatus, frontPage.getGlobalQuery())
.or().like(InspectionItem::getCreateUser, frontPage.getGlobalQuery())
.or().like(InspectionItem::getModifyUser, frontPage.getGlobalQuery())
.or().like(InspectionItem::getCategory, frontPage.getGlobalQuery())
);
}
result = inspectionItemService.page(frontPage.getPagePlus(), queryWrapper);

@ -1,6 +1,7 @@
package com.foreverwin.mesnac.common.controller;
import cn.hutool.core.date.DateUtil;
import com.foreverwin.mesnac.common.dto.LabelPrintDto;
import com.foreverwin.modular.core.exception.BusinessException;
import com.foreverwin.modular.core.util.R;
import com.foreverwin.modular.core.util.FrontPage;
@ -14,6 +15,7 @@ import org.springframework.web.bind.annotation.*;
import com.foreverwin.mesnac.common.service.PrintLogService;
import com.foreverwin.mesnac.common.model.PrintLog;
import java.util.List;
import java.util.Map;
/**
*
@ -93,4 +95,33 @@ public class PrintLogController {
return R.ok();
}
/**
* sfcsfc
* @param sfc
* @return
*/
@ResponseBody
@GetMapping("/findSfcPrintInfoBySfc")
public R findSfcInfoBySfc(String sfc){
try {
return R.ok(printLogService.findSfcPrintInfoBySfc(sfc));
} catch (Exception e) {
return R.failed(e.getMessage());
}
}
@ResponseBody
@PostMapping("/sfcLabelPrint")
public R sfcLabelPrint(@RequestBody Map<String,Object> map) {
try {
printLogService.sfcLabelPrint(map);
} catch (Exception e) {
return R.failed(e.getMessage());
}
return R.ok();
}
}

@ -1,7 +1,9 @@
package com.foreverwin.mesnac.common.mapper;
import com.foreverwin.mesnac.common.dto.LabelPrintDto;
import com.foreverwin.mesnac.common.model.PrintLog;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
@ -24,4 +26,6 @@ public interface PrintLogMapper extends BaseMapper<PrintLog> {
*/
List<PrintLog> getPrintLogListByCondition(PrintLog printLog);
LabelPrintDto findSfcPrintInfoBySfc(@Param("sfc") String sfc, @Param("site") String site);
}

@ -1,9 +1,11 @@
package com.foreverwin.mesnac.common.service;
import com.foreverwin.mesnac.common.dto.LabelPrintDto;
import com.foreverwin.mesnac.common.model.PrintLog;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
import java.util.Map;
/**
* <p>
@ -37,4 +39,8 @@ public interface PrintLogService extends IService<PrintLog> {
* @return
*/
List<PrintLog> getPrintLogListByCondition(PrintLog printLog);
LabelPrintDto findSfcPrintInfoBySfc(String sfc);
void sfcLabelPrint(Map<String,Object> map);
}

@ -12,16 +12,19 @@ import com.foreverwin.mesnac.common.mapper.PrintLogMapper;
import com.foreverwin.mesnac.common.service.PrintLogService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.foreverwin.modular.core.exception.BusinessException;
import com.foreverwin.modular.core.util.CommonMethods;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.UUID;
/**
* <p>
@ -73,19 +76,9 @@ public class PrintLogServiceImpl extends ServiceImpl<PrintLogMapper, PrintLog> i
list.get(i).setPrintTemplate(printList.get(i).getPrintTemplate());
list.get(i).setPrintNum(printList.get(i).getPrintNum());
}
String post = HttpUtil.post(printServer, JSON.toJSONString(list), 60000);
/**
* {"msg":"打印成功","code":0}
* {"msg":"打印失败","code":500}
* -printNameisPrint
* */
JSONObject jsonObject = JSONObject.parseObject(post);
Integer code = jsonObject.getInteger("code");
String msg = jsonObject.getString("msg");
if (code != 0){
throw BusinessException.build(msg);
}
printServer(list);
// 更新打印记录:是否已打印、使用的打印机、打印次数
List<PrintLog> printLogList = new ArrayList<>();
for (PrintLog printLog : printList) {
@ -113,4 +106,66 @@ public class PrintLogServiceImpl extends ServiceImpl<PrintLogMapper, PrintLog> i
return printLogMapper.getPrintLogListByCondition(printLog);
}
@Override
public LabelPrintDto findSfcPrintInfoBySfc(String sfc) {
return printLogMapper.findSfcPrintInfoBySfc(sfc,CommonMethods.getSite());
}
@Override
public void sfcLabelPrint(Map<String,Object> map) {
Integer qty = (Integer) map.get("qty");
List<LabelPrintDto> labelPrintDtoList = (List<LabelPrintDto>) map.get("labelPrintDtoList");
printServer(labelPrintDtoList);
// 解决无法获取list中对象的问题
String parse = JSON.toJSONString(labelPrintDtoList);
List<LabelPrintDto> labelPrintDtos = JSONObject.parseArray(parse, LabelPrintDto.class);
// 打印张数
Integer printNum = 0;
for (LabelPrintDto labelP:labelPrintDtos) {
printNum += labelP.getPrintNum();
}
LabelPrintDto labelPrintDto = labelPrintDtos.get(0);
PrintLog printLog = new PrintLog();
printLog.setCategory(Constants.PRINT_TYPE_SFC_SPE);
printLog.setSfc(labelPrintDto.getSfc());
printLog.setSite(CommonMethods.getSite());
List<PrintLog> printLogListByCondition = printLogService.getPrintLogListByCondition(printLog);
if (printLogListByCondition.size() == 1){
PrintLog printLog1 = printLogListByCondition.get(0);
printLog1.setPrintNum(printNum);
printLog1.setModifiedDateTime(LocalDateTime.now());
printLog1.setModifyUser(CommonMethods.getUser());
printLogService.updateById(printLog1);
}else{
labelPrintDto.setQty(BigDecimal.valueOf(qty));
printLog.setCreateUser(labelPrintDto.getPrintTemplate());
printLog.setPrintParam(JSON.toJSONString(labelPrintDto));
printLog.setItem(labelPrintDto.getItem());
printLog.setPrintName(labelPrintDto.getPrinter());
printLog.setPrintTemplate(labelPrintDto.getPrintTemplate());
printLog.setIsPrint("true");
printLog.setPrintNum(printNum);
printLog.setHandle(UUID.randomUUID().toString());
printLog.setCreatedDateTime(LocalDateTime.now());
printLog.setCreateUser(CommonMethods.getUser());
printLogService.save(printLog);
}
}
public void printServer(List<LabelPrintDto> list){
/*String post = HttpUtil.post(printServer, JSON.toJSONString(list), 60000);
*//**
* {"msg":"打印成功","code":0}
* {"msg":"打印失败","code":500}
* -printNameisPrint
*//*
JSONObject jsonObject = JSONObject.parseObject(post);
Integer code = jsonObject.getInteger("code");
String msg = jsonObject.getString("msg");
if (code != 0){
throw BusinessException.build(msg);
}*/
}
}

@ -217,7 +217,7 @@
<if test="ew.entity.category!=null"> AND CATEGORY=#{ew.entity.category}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
and ${ew.sqlSegment}
</if>
</if>
</where>

@ -567,6 +567,20 @@
ORDER BY PL.CREATED_DATE_TIME DESC
</select>
<!--根据sfcBo查询当前条码的打印信息-->
<select id="findSfcPrintInfoBySfc" resultType="com.foreverwin.mesnac.common.dto.LabelPrintDto">
SELECT IM.ITEM ,S.SFC, IT.DESCRIPTION ITEM_DESCRIPTION, ZSD.SHOP_ORDER,
I.QTY_ON_HAND QTY ,ZSD.BLANKING_SIZE , CF.VALUE DRAWING_REVISION
FROM INVENTORY I
LEFT JOIN SFC S ON I.INVENTORY_CONTEXT_GBO = S.HANDLE
LEFT JOIN
(SELECT MAX(STEP_ID),BLANKING_SIZE,SFC,SHOP_ORDER FROM Z_SFC_DISPATCH
WHERE SFC = #{sfc} AND SITE = #{site} GROUP BY BLANKING_SIZE ,SFC,SHOP_ORDER) ZSD ON ZSD.SFC = S.SFC
LEFT JOIN ITEM IM ON IM.HANDLE = I.ITEM_BO
LEFT JOIN ITEM_T IT ON IT.ITEM_BO = IM.HANDLE AND IT.LOCALE = 'zh'
LEFT JOIN CUSTOM_FIELDS CF ON CF.HANDLE = I.ITEM_BO AND CF."ATTRIBUTE" = 'DRAWING_REVISION'
WHERE S.SFC = #{sfc} AND I.SITE = #{site}
</select>
<!--自定义sql-->

@ -612,13 +612,17 @@
SC.QTY*BC.QTY ISSUE_QTY, SC.QTY*BC.QTY-NVL(ZCI.REQUIRED_QTY,0) REQUIRED_QTY, ZSD.PLANNED_START_DATE REQUIRED_DATE_TIME, ZCI.HANDLE, ZCI.CALL_TYPE
FROM Z_SFC_DISPATCH ZSD
INNER JOIN SFC SC ON SC.SITE = ZSD.SITE AND SC.SFC = ZSD.SFC
INNER JOIN SHOP_ORDER SO ON SO.HANDLE = SC.SHOP_ORDER_BO
INNER JOIN CUSTOM_FIELDS CF ON CF.HANDLE = SO.HANDLE AND CF.ATTRIBUTE = 'FACTORY'
INNER JOIN SFC_BOM SB ON SB.SFC_BO = SC.HANDLE
INNER JOIN BOM_COMPONENT BC ON BC.BOM_BO = SB.BOM_BO
INNER JOIN ITEM CP ON CP.HANDLE = BC.COMPONENT_GBO
LEFT JOIN CUSTOM_FIELDS CS ON CS.HANDLE = CP.HANDLE AND CS.ATTRIBUTE = 'ACCESSORY_TYPE'
INNER JOIN BOM_OPERATION BO ON BO.BOM_COMPONENT_BO = BC.HANDLE AND BO.OPERATION_BO = 'OperationBO:'||SC.SITE||','||ZSD.OPERATION||',#'
INNER JOIN CUSTOM_FIELDS CF ON CF.HANDLE = BC.HANDLE AND CF."ATTRIBUTE" = 'STEP_ID' AND CF.VALUE = ZSD.STEP_ID
LEFT JOIN Z_CALL_ITEM ZCI ON ZCI.SFC_DISPATCH_BO = ZSD.HANDLE AND ZCI.COMPONENT_BO = CP.HANDLE AND ZCI.STEP_ID = ZSD.STEP_ID
WHERE ZSD.HANDLE IN
WHERE ( (CF.VALUE ='6100' AND CS.VALUE = '9') OR (CF.VALUE = '6106' OR CP.MATERIAL_TYPE='ROH') )
AND ZSD.HANDLE IN
<foreach item="item" collection="list" separator="," open="(" close=")" index="">
#{item.handle}
</foreach>

@ -2,8 +2,10 @@ package com.foreverwin.mesnac.production.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.foreverwin.mesnac.production.dto.WorkShopTransferDto;
import com.foreverwin.mesnac.production.model.WorkShopTransfer;
import com.foreverwin.mesnac.production.service.WorkShopTransferService;
import com.foreverwin.modular.core.util.CommonMethods;
import com.foreverwin.modular.core.util.FrontPage;
import com.foreverwin.modular.core.util.R;
import org.springframework.beans.factory.annotation.Autowired;
@ -14,7 +16,7 @@ import java.util.List;
/**
*
* @author Philip
* @since 2021-08-02
* @since 2021-08-23
*/
@RestController
@RequestMapping("/Z-WORK-SHOP-TRANSFER")
@ -23,18 +25,54 @@ public class WorkShopTransferController {
@Autowired
public WorkShopTransferService workShopTransferService;
/**
*
*
* @return
*/
@ResponseBody
@GetMapping("/sfcEnter")
public R sfcEnter(WorkShopTransfer workShopTransfer) {
return R.ok(workShopTransferService.sfcEnter(workShopTransfer));
@GetMapping("getOutList")
public R getOutList(WorkShopTransferDto workShopTransferDto){
List<WorkShopTransferDto> result;
result = workShopTransferService.getOutList(workShopTransferDto);
return R.ok(result);
}
/**
*
*
* @return
*/
@ResponseBody
@GetMapping("/transfer")
public R transfer(WorkShopTransfer workShopTransfer) {
return R.ok(workShopTransferService.transfer(workShopTransfer));
@GetMapping("getInList")
public R getInList(WorkShopTransferDto workShopTransferDto){
List<WorkShopTransferDto> result;
result = workShopTransferService.getInList(workShopTransferDto);
return R.ok(result);
}
/**
*
*
* @return
*/
@ResponseBody
@GetMapping("/transferOut")
public R getList(String sfcs){
return R.ok( workShopTransferService.transferOut(sfcs));
}
/**
*
*
* @return
*/
@ResponseBody
@PostMapping("/transferIn")
public R transferIn(@RequestBody List<String> handleList){
workShopTransferService.transferIn(handleList);
return R.ok();
}
/**
* id
*
@ -73,23 +111,12 @@ public class WorkShopTransferController {
public R page(FrontPage<WorkShopTransfer> frontPage, WorkShopTransfer workShopTransfer){
IPage result;
QueryWrapper<WorkShopTransfer> queryWrapper = new QueryWrapper<>();
workShopTransfer.setSite(CommonMethods.getSite());
queryWrapper.setEntity(workShopTransfer);
if (frontPage.getGlobalQuery() != null && !"".equals(frontPage.getGlobalQuery().trim())) {
//TODO modify global query
queryWrapper.lambda().and(wrapper -> wrapper
.like(WorkShopTransfer::getHandle, frontPage.getGlobalQuery())
.or().like(WorkShopTransfer::getSite, frontPage.getGlobalQuery())
.or().like(WorkShopTransfer::getWorkCenter, frontPage.getGlobalQuery())
.or().like(WorkShopTransfer::getSfc, frontPage.getGlobalQuery())
.or().like(WorkShopTransfer::getShopOrder, frontPage.getGlobalQuery())
.or().like(WorkShopTransfer::getItem, frontPage.getGlobalQuery())
.or().like(WorkShopTransfer::getLastOperation, frontPage.getGlobalQuery())
.or().like(WorkShopTransfer::getStepId, frontPage.getGlobalQuery())
.or().like(WorkShopTransfer::getOperation, frontPage.getGlobalQuery())
.or().like(WorkShopTransfer::getType, frontPage.getGlobalQuery())
.or().like(WorkShopTransfer::getIsOutSource, frontPage.getGlobalQuery())
.or().like(WorkShopTransfer::getComments, frontPage.getGlobalQuery())
.or().like(WorkShopTransfer::getCreateUser, frontPage.getGlobalQuery())
.like(WorkShopTransfer::getTransferNo, frontPage.getGlobalQuery())
);
}
result = workShopTransferService.page(frontPage.getPagePlus(), queryWrapper);

@ -2,21 +2,28 @@ package com.foreverwin.mesnac.production.dto;
import com.foreverwin.mesnac.production.model.WorkShopTransfer;
import java.math.BigDecimal;
public class WorkShopTransferDto extends WorkShopTransfer {
private String lastOperation;
private String lastOperationDesc;
private String map;
private String blankingSize;
private String workOrder;
private String itemDesc;
private String itemNumber;
private String operationDesc;
private BigDecimal qty;
private String status;
private String dispatchNo;
private String resrce;
private String workCenterDesc;
private String employeeDescription;
public String getEmployeeDescription() {
return employeeDescription;
}
public void setEmployeeDescription(String employeeDescription) {
this.employeeDescription = employeeDescription;
}
public String getWorkCenterDesc() {
return workCenterDesc;
@ -60,12 +67,12 @@ public class WorkShopTransferDto extends WorkShopTransfer {
this.lastOperationDesc = lastOperationDesc;
}
public String getMap() {
return map;
public String getBlankingSize() {
return blankingSize;
}
public void setMap(String map) {
this.map = map;
public void setBlankingSize(String blankingSize) {
this.blankingSize = blankingSize;
}
public String getWorkOrder() {
@ -100,15 +107,6 @@ public class WorkShopTransferDto extends WorkShopTransfer {
this.operationDesc = operationDesc;
}
@Override
public BigDecimal getQty() {
return qty;
}
public void setQty(BigDecimal qty) {
this.qty = qty;
}
public String getStatus() {
return status;
}

@ -6,16 +6,24 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* <p>
* Mapper
* </p>
*
* @author Philip
* @since 2021-07-30
* @since 2021-08-23
*/
@Repository
public interface WorkShopTransferMapper extends BaseMapper<WorkShopTransfer> {
List<WorkShopTransferDto> getOutList(@Param("site") String site, @Param("workCenter") String workCenter, @Param("transferWorkCenter") String transferWorkCenter, @Param("operation") String operation, @Param("status") String status, @Param("sfc") String sfc, @Param("stepId")String stepId);
WorkShopTransferDto getSfcData(@Param("site") String site,@Param("sfc") String sfc);
List<WorkShopTransferDto> getInList(@Param("site") String site, @Param("workCenter") String workCenter,@Param("transferWorkCenter") String transferWorkCenter, @Param("transferNo") String transferNo, @Param("status") String status,@Param("sfc") String sfc);
}

@ -16,7 +16,7 @@ import java.time.LocalDateTime;
* </p>
*
* @author Philip
* @since 2021-08-02
* @since 2021-08-24
*/
@TableName("Z_WORK_SHOP_TRANSFER")
@ -30,16 +30,31 @@ public class WorkShopTransfer extends Model<WorkShopTransfer> {
*/
@TableId(value = "HANDLE", type = IdType.INPUT)
private String handle;
/**
*
*/
@TableField("SFC_DISPATCH_BO")
private String sfcDispatchBo;
/**
*
*/
@TableField("SITE")
private String site;
/**
*
*/
@TableField("TRANSFER_NO")
private String transferNo;
/**
*
*/
@TableField("WORK_CENTER")
private String workCenter;
/**
*
*/
@TableField("TRANSFER_WORK_CENTER")
private String transferWorkCenter;
/**
*
*/
@ -50,16 +65,6 @@ public class WorkShopTransfer extends Model<WorkShopTransfer> {
*/
@TableField("SHOP_ORDER")
private String shopOrder;
/**
*
*/
@TableField("ITEM")
private String item;
/**
*
*/
@TableField("LAST_OPERATION")
private String lastOperation;
/**
*
*/
@ -70,26 +75,36 @@ public class WorkShopTransfer extends Model<WorkShopTransfer> {
*/
@TableField("OPERATION")
private String operation;
/**
*
*/
@TableField("LAST_OPERATION")
private String lastOperation;
/**
*
*/
@TableField("NEXT_OPERATION")
private String nextOperation;
/**
*
*/
@TableField("QTY")
private BigDecimal qty;
/**
* :
*
*/
@TableField("TYPE")
private String type;
@TableField("IS_OUT")
private String isOut;
/**
*
*/
@TableField("IS_IN")
private String isIn;
/**
*
*/
@TableField("IS_OUT_SOURCE")
private String isOutSource;
/**
*
*/
@TableField("COMMENTS")
private String comments;
/**
*
*/
@ -100,6 +115,36 @@ public class WorkShopTransfer extends Model<WorkShopTransfer> {
*/
@TableField("CREATED_DATE_TIME")
private LocalDateTime createdDateTime;
/**
*
*/
@TableField("MODIFY_USER")
private String modifyUser;
/**
*
*/
@TableField("MODIFIED_DATE_TIME")
private LocalDateTime modifiedDateTime;
/**
*
*/
@TableField("TRANSFER_IN_USER")
private String transferInUser;
/**
*
*/
@TableField("TRANSFER_IN_TIME")
private LocalDateTime transferInTime;
/**
*
*/
@TableField("TRANSFER_OUT_USER")
private String transferOutUser;
/**
*
*/
@TableField("TRANSFER_OUT_TIME")
private LocalDateTime transferOutTime;
public String getHandle() {
@ -110,6 +155,14 @@ public class WorkShopTransfer extends Model<WorkShopTransfer> {
this.handle = handle;
}
public String getSfcDispatchBo() {
return sfcDispatchBo;
}
public void setSfcDispatchBo(String sfcDispatchBo) {
this.sfcDispatchBo = sfcDispatchBo;
}
public String getSite() {
return site;
}
@ -118,6 +171,14 @@ public class WorkShopTransfer extends Model<WorkShopTransfer> {
this.site = site;
}
public String getTransferNo() {
return transferNo;
}
public void setTransferNo(String transferNo) {
this.transferNo = transferNo;
}
public String getWorkCenter() {
return workCenter;
}
@ -126,6 +187,14 @@ public class WorkShopTransfer extends Model<WorkShopTransfer> {
this.workCenter = workCenter;
}
public String getTransferWorkCenter() {
return transferWorkCenter;
}
public void setTransferWorkCenter(String transferWorkCenter) {
this.transferWorkCenter = transferWorkCenter;
}
public String getSfc() {
return sfc;
}
@ -142,22 +211,6 @@ public class WorkShopTransfer extends Model<WorkShopTransfer> {
this.shopOrder = shopOrder;
}
public String getItem() {
return item;
}
public void setItem(String item) {
this.item = item;
}
public String getLastOperation() {
return lastOperation;
}
public void setLastOperation(String lastOperation) {
this.lastOperation = lastOperation;
}
public String getStepId() {
return stepId;
}
@ -174,6 +227,22 @@ public class WorkShopTransfer extends Model<WorkShopTransfer> {
this.operation = operation;
}
public String getLastOperation() {
return lastOperation;
}
public void setLastOperation(String lastOperation) {
this.lastOperation = lastOperation;
}
public String getNextOperation() {
return nextOperation;
}
public void setNextOperation(String nextOperation) {
this.nextOperation = nextOperation;
}
public BigDecimal getQty() {
return qty;
}
@ -182,28 +251,28 @@ public class WorkShopTransfer extends Model<WorkShopTransfer> {
this.qty = qty;
}
public String getType() {
return type;
public String getIsOut() {
return isOut;
}
public void setType(String type) {
this.type = type;
public void setIsOut(String isOut) {
this.isOut = isOut;
}
public String getIsOutSource() {
return isOutSource;
public String getIsIn() {
return isIn;
}
public void setIsOutSource(String isOutSource) {
this.isOutSource = isOutSource;
public void setIsIn(String isIn) {
this.isIn = isIn;
}
public String getComments() {
return comments;
public String getIsOutSource() {
return isOutSource;
}
public void setComments(String comments) {
this.comments = comments;
public void setIsOutSource(String isOutSource) {
this.isOutSource = isOutSource;
}
public String getCreateUser() {
@ -222,36 +291,102 @@ public class WorkShopTransfer extends Model<WorkShopTransfer> {
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 String getTransferInUser() {
return transferInUser;
}
public void setTransferInUser(String transferInUser) {
this.transferInUser = transferInUser;
}
public LocalDateTime getTransferInTime() {
return transferInTime;
}
public void setTransferInTime(LocalDateTime transferInTime) {
this.transferInTime = transferInTime;
}
public String getTransferOutUser() {
return transferOutUser;
}
public void setTransferOutUser(String transferOutUser) {
this.transferOutUser = transferOutUser;
}
public LocalDateTime getTransferOutTime() {
return transferOutTime;
}
public void setTransferOutTime(LocalDateTime transferOutTime) {
this.transferOutTime = transferOutTime;
}
public static final String HANDLE = "HANDLE";
public static final String SFC_DISPATCH_BO = "SFC_DISPATCH_BO";
public static final String SITE = "SITE";
public static final String TRANSFER_NO = "TRANSFER_NO";
public static final String WORK_CENTER = "WORK_CENTER";
public static final String TRANSFER_WORK_CENTER = "TRANSFER_WORK_CENTER";
public static final String SFC = "SFC";
public static final String SHOP_ORDER = "SHOP_ORDER";
public static final String ITEM = "ITEM";
public static final String LAST_OPERATION = "LAST_OPERATION";
public static final String STEP_ID = "STEP_ID";
public static final String OPERATION = "OPERATION";
public static final String LAST_OPERATION = "LAST_OPERATION";
public static final String NEXT_OPERATION = "NEXT_OPERATION";
public static final String QTY = "QTY";
public static final String TYPE = "TYPE";
public static final String IS_OUT = "IS_OUT";
public static final String IS_OUT_SOURCE = "IS_OUT_SOURCE";
public static final String IS_IN = "IS_IN";
public static final String COMMENTS = "COMMENTS";
public static final String IS_OUT_SOURCE = "IS_OUT_SOURCE";
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";
public static final String TRANSFER_IN_USER = "TRANSFER_IN_USER";
public static final String TRANSFER_IN_TIME = "TRANSFER_IN_TIME";
public static final String TRANSFER_OUT_USER = "TRANSFER_OUT_USER";
public static final String TRANSFER_OUT_TIME = "TRANSFER_OUT_TIME";
@Override
protected Serializable pkVal() {
@ -262,20 +397,29 @@ public static final String CREATED_DATE_TIME = "CREATED_DATE_TIME";
public String toString() {
return "WorkShopTransfer{" +
"handle = " + handle +
", sfcDispatchBo = " + sfcDispatchBo +
", site = " + site +
", transferNo = " + transferNo +
", workCenter = " + workCenter +
", transferWorkCenter = " + transferWorkCenter +
", sfc = " + sfc +
", shopOrder = " + shopOrder +
", item = " + item +
", lastOperation = " + lastOperation +
", stepId = " + stepId +
", operation = " + operation +
", lastOperation = " + lastOperation +
", nextOperation = " + nextOperation +
", qty = " + qty +
", type = " + type +
", isOut = " + isOut +
", isIn = " + isIn +
", isOutSource = " + isOutSource +
", comments = " + comments +
", createUser = " + createUser +
", createdDateTime = " + createdDateTime +
", modifyUser = " + modifyUser +
", modifiedDateTime = " + modifiedDateTime +
", transferInUser = " + transferInUser +
", transferInTime = " + transferInTime +
", transferOutUser = " + transferOutUser +
", transferOutTime = " + transferOutTime +
"}";
}
}

@ -1,6 +1,7 @@
package com.foreverwin.mesnac.production.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.foreverwin.mesnac.production.dto.WorkShopTransferDto;
import com.foreverwin.mesnac.production.model.WorkShopTransfer;
import com.baomidou.mybatisplus.extension.service.IService;
import com.foreverwin.modular.core.util.FrontPage;
@ -26,7 +27,14 @@ public interface WorkShopTransferService extends IService<WorkShopTransfer> {
List<WorkShopTransfer> selectList(WorkShopTransfer workShopTransfer);
WorkShopTransfer sfcEnter(WorkShopTransfer workShopTransfer);
WorkShopTransfer sfcEnter(String sfc,String type);
List<WorkShopTransferDto> getOutList(WorkShopTransferDto workShopTransferDto);
List<WorkShopTransferDto> getInList(WorkShopTransferDto workShopTransferDto);
List<WorkShopTransferDto> transferOut(String sfcs);
void transferIn(List<String> handleList);
Object transfer(WorkShopTransfer workShopTransfer);
}

@ -1,5 +1,4 @@
package com.foreverwin.mesnac.production.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@ -11,7 +10,6 @@ import com.foreverwin.mesnac.common.util.StringUtil;
import com.foreverwin.mesnac.meapi.mapper.WorkCenterMapper;
import com.foreverwin.mesnac.meapi.model.Operation;
import com.foreverwin.mesnac.meapi.model.Router;
import com.foreverwin.mesnac.meapi.model.WorkCenter;
import com.foreverwin.mesnac.meapi.service.OperationService;
import com.foreverwin.mesnac.meapi.service.RouterService;
import com.foreverwin.mesnac.production.dto.WorkShopTransferDto;
@ -30,7 +28,10 @@ import org.springframework.context.i18n.LocaleContextHolder;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.UUID;
@ -76,15 +77,13 @@ public class WorkShopTransferServiceImpl extends ServiceImpl<WorkShopTransferMap
}
@Override
public WorkShopTransferDto sfcEnter(WorkShopTransfer workShopTransfer) {
public WorkShopTransferDto sfcEnter(String sfc,String type) {
//条码是否在工作中心下
String site = CommonMethods.getSite();
String sfc = workShopTransfer.getSfc();
if (StringUtil.isBlank(sfc)) {
throw new BaseException("产品条码不能为空");
}
String type = workShopTransfer.getType();
WorkShopTransferDto dto = workShopTransferMapper.getSfcData(site, sfc);
WorkShopTransferDto dto = workShopTransferMapper.getSfcData(site, sfc);
if (dto == null) {
throw new BaseException("未找到该产品条码");
}
@ -120,7 +119,7 @@ public class WorkShopTransferServiceImpl extends ServiceImpl<WorkShopTransferMap
dto.setLastOperationDesc(stepOperation.getDescription());
}
}
String workCenter;
/*String workCenter;
if (StringUtil.notBlank(operation)&&operation.contains("_")) {
workCenter = operation.split("_")[0];
} else {
@ -131,64 +130,136 @@ public class WorkShopTransferServiceImpl extends ServiceImpl<WorkShopTransferMap
throw BusinessException.build("生产车间【" +workCenter+ "】不存在");
}
dto.setWorkCenterDesc(workCenterModel.getDescription());
dto.setWorkCenter(workCenter);
dto.setWorkCenter(workCenter);*/
return dto;
}
@Override
public Object transfer(WorkShopTransfer workShopTransfer) {
public List<WorkShopTransferDto> transferOut(String handleList) {
String site = CommonMethods.getSite();
String user = CommonMethods.getUser();
WorkShopTransferDto dto = sfcEnter(workShopTransfer);
String isOutSource = dto.getIsOutSource();
String sfcBO = HandleEnum.SFC.getHandle(site, workShopTransfer.getSfc());
if (StringUtil.notBlank(isOutSource) && isOutSource.equals("Y")) {
//转出开始
try {
Operation currentRevisionRef = operationService.getCurrentRevisionRef(site, dto.getOperation());
if (workShopTransfer.getType().equals("OUT")) {
Date date = new Date(System.currentTimeMillis());
SimpleDateFormat dateFormat1 = new SimpleDateFormat("yyyyMMddHHmmss");
String taskNo = dateFormat1.format(date);
List<WorkShopTransferDto> returnList=new ArrayList<>();
String[] split = handleList.split(",");
for (String sfc:split){
WorkShopTransferDto dto = sfcEnter(sfc,"OUT");
String stepId = dto.getStepId();
String isOutSource = dto.getIsOutSource();
String sfcBO = HandleEnum.SFC.getHandle(site, sfc);
if (StringUtil.notBlank(isOutSource) && isOutSource.equals("Y")) {
try {
Operation currentRevisionRef = operationService.getCurrentRevisionRef(site, dto.getOperation());
sfcCrossService.startAction(site, currentRevisionRef.getHandle(), dto.getResrce(), sfcBO, dto.getQty());
//更改派工单状态
sfcDispatchCommonService.updateSfcDispatchStatus(site, CommonMethods.getUser(), dto.getDispatchNo(), DispatchStatusEnum.START.getCode());
} else {
//查询是否有转出记录
QueryWrapper<WorkShopTransfer> queryWrapper=new QueryWrapper<>();
queryWrapper.eq(WorkShopTransfer.SFC,workShopTransfer.getSfc());
queryWrapper.eq(WorkShopTransfer.STEP_ID,dto.getStepId());
queryWrapper.eq(WorkShopTransfer.TYPE,"OUT");
List<WorkShopTransfer> list = list(queryWrapper);
if (list.isEmpty()){
throw BusinessException.build("没有转出记录");
}
} catch (Exception e) {
ExceptionUtil.throwException(e);
}
}
List<WorkShopTransferDto> list = workShopTransferMapper.getOutList(site, null, null, null, null, sfc,stepId);
WorkShopTransferDto transferDto = list.get(0);
WorkShopTransfer transferLog = new WorkShopTransfer();
transferLog.setHandle(UUID.randomUUID().toString());
QueryWrapper<WorkShopTransfer> queryWrapper = new QueryWrapper<>();
queryWrapper.eq(WorkShopTransfer.SFC_DISPATCH_BO, dto.getSfcDispatchBo());
List<WorkShopTransfer> workShopTransfers = list(queryWrapper);
if (!workShopTransfers.isEmpty()) {
throw BusinessException.build("产品已转出");
}
transferLog.setSfcDispatchBo(dto.getSfcDispatchBo());
transferLog.setSite(site);
transferLog.setTransferNo(taskNo);
transferLog.setWorkCenter(transferDto.getWorkCenter());
transferLog.setTransferWorkCenter(null);
transferLog.setSfc(sfc);
transferLog.setShopOrder(transferDto.getShopOrder());
transferLog.setStepId(dto.getStepId());
transferLog.setOperation(dto.getOperation());
transferLog.setLastOperation(transferDto.getLastOperation());
transferLog.setQty(dto.getQty());
transferLog.setIsOut("Y");
transferLog.setIsOutSource(dto.getIsOutSource());
transferLog.setCreateUser(user);
transferLog.setCreatedDateTime(LocalDateTime.now());
transferLog.setModifyUser(user);
transferLog.setModifiedDateTime(LocalDateTime.now());
transferLog.setTransferOutUser(user);
transferLog.setTransferOutTime(LocalDateTime.now());
save(transferLog);
dto.setWorkCenter(transferDto.getWorkCenterDesc());
dto.setBlankingSize(transferDto.getBlankingSize());
dto.setTransferNo(taskNo);
dto.setEmployeeDescription(transferDto.getEmployeeDescription());
returnList.add(dto);
}
return returnList;
}
@Override
public void transferIn(List<String> handleList) {
String site = CommonMethods.getSite();
String user = CommonMethods.getUser();
for (String sfc:handleList) {
WorkShopTransferDto dto = sfcEnter(sfc, "IN");
String isOutSource = dto.getIsOutSource();
String sfcBO = HandleEnum.SFC.getHandle(site, sfc);
Operation currentRevisionRef = operationService.getCurrentRevisionRef(site, dto.getOperation());
//查询是否有转出记录
QueryWrapper<WorkShopTransfer> queryWrapper = new QueryWrapper<>();
queryWrapper.eq(WorkShopTransfer.SFC, sfc);
queryWrapper.eq(WorkShopTransfer.STEP_ID, dto.getStepId());
queryWrapper.eq(WorkShopTransfer.IS_OUT, "Y");
List<WorkShopTransfer> list = list(queryWrapper);
if (list.isEmpty()) {
throw BusinessException.build("没有转出记录");
}
if (StringUtil.notBlank(isOutSource) && isOutSource.equals("Y")) {
//转出开始
try {
//转入完成
sfcCrossService.completeAction(site, currentRevisionRef.getHandle(), dto.getResrce(), sfcBO, dto.getQty());
sfcCrossService.completeAction(site, currentRevisionRef.getHandle(), dto.getResrce(), sfcBO, dto.getQty());
//更改派工单状态
sfcDispatchCommonService.updateSfcDispatchStatus(site, CommonMethods.getUser(), dto.getDispatchNo(), DispatchStatusEnum.COMPLETE.getCode());
} catch (Exception e) {
ExceptionUtil.throwException(e);
}
} catch (Exception e) {
ExceptionUtil.throwException(e);
}
WorkShopTransfer transfer = list.get(0);
if (StringUtil.notBlank(transfer.getIsIn())){
throw BusinessException.build(sfc+"已转入");
}
LocalDateTime now = LocalDateTime.now();
transfer.setTransferInTime(now);
transfer.setTransferInUser(user);
transfer.setModifiedDateTime(now);
transfer.setModifyUser(user);
transfer.setIsIn("Y");
updateById(transfer);
}
}
WorkShopTransfer transferLog = new WorkShopTransfer();
transferLog.setHandle(UUID.randomUUID().toString());
transferLog.setSite(site);
transferLog.setWorkCenter(dto.getWorkCenter());
transferLog.setSfc(dto.getSfc());
transferLog.setShopOrder(dto.getShopOrder());
transferLog.setItem(dto.getItem());
transferLog.setLastOperation(dto.getLastOperation());
transferLog.setStepId(dto.getStepId());
transferLog.setOperation(dto.getOperation());
transferLog.setQty(dto.getQty());
transferLog.setType(workShopTransfer.getType());
transferLog.setIsOutSource(isOutSource);
transferLog.setComments(workShopTransfer.getComments());
transferLog.setCreateUser(user);
transferLog.setCreatedDateTime(LocalDateTime.now());
save(transferLog);
return null;
@Override
public List<WorkShopTransferDto> getOutList(WorkShopTransferDto workShopTransferDto) {
String site = CommonMethods.getSite();
String workCenter = workShopTransferDto.getWorkCenter();
String transferWorkCenter = workShopTransferDto.getTransferWorkCenter();
String operation = workShopTransferDto.getOperation();
String status = workShopTransferDto.getStatus();
return workShopTransferMapper.getOutList(site,workCenter,transferWorkCenter,operation,status,null, null);
}
@Override
public List<WorkShopTransferDto> getInList(WorkShopTransferDto workShopTransferDto) {
String site = CommonMethods.getSite();
String workCenter = workShopTransferDto.getWorkCenter();
String transferWorkCenter = workShopTransferDto.getTransferWorkCenter();
String transferNo = workShopTransferDto.getTransferNo();
String status = workShopTransferDto.getStatus();
return workShopTransferMapper.getInList(site,workCenter,transferWorkCenter,transferNo,status,null);
}
}

@ -5,35 +5,34 @@
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.foreverwin.mesnac.production.model.WorkShopTransfer">
<id column="HANDLE" property="handle" />
<result column="SFC_DISPATCH_BO" property="sfcDispatchBo" />
<result column="SITE" property="site" />
<result column="TRANSFER_NO" property="transferNo" />
<result column="WORK_CENTER" property="workCenter" />
<result column="TRANSFER_WORK_CENTER" property="transferWorkCenter" />
<result column="SFC" property="sfc" />
<result column="SHOP_ORDER" property="shopOrder" />
<result column="ITEM" property="item" />
<result column="LAST_OPERATION" property="lastOperation" />
<result column="STEP_ID" property="stepId" />
<result column="OPERATION" property="operation" />
<result column="LAST_OPERATION" property="lastOperation" />
<result column="NEXT_OPERATION" property="nextOperation" />
<result column="QTY" property="qty" />
<result column="TYPE" property="type" />
<result column="IS_OUT" property="isOut" />
<result column="IS_IN" property="isIn" />
<result column="IS_OUT_SOURCE" property="isOutSource" />
<result column="COMMENTS" property="comments" />
<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" />
<result column="TRANSFER_IN_USER" property="transferInUser" />
<result column="TRANSFER_IN_TIME" property="transferInTime" />
<result column="TRANSFER_OUT_USER" property="transferOutUser" />
<result column="TRANSFER_OUT_TIME" property="transferOutTime" />
</resultMap>
<resultMap id="FullResultMap" type="com.foreverwin.mesnac.production.dto.WorkShopTransferDto">
<result column="MAP" property="map" />
<result column="WORK_ORDER" property="workOrder" />
<result column="ITEM_DESC" property="itemDesc" />
<result column="ITEM_NUMBER" property="itemNumber" />
<result column="OPERATION_DESC" property="operationDesc" />
<result column="QTY" property="qty" />
<result column="STATUS" property="status" />
<result column="DISPATCH_NO" property="dispatchNo" />
<result column="RESRCE" property="resrce" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
HANDLE, SITE, WORK_CENTER, SFC, SHOP_ORDER, ITEM, LAST_OPERATION, STEP_ID, OPERATION, QTY, TYPE, IS_OUT_SOURCE, COMMENTS, CREATE_USER, CREATED_DATE_TIME
HANDLE, SFC_DISPATCH_BO, SITE, TRANSFER_NO, WORK_CENTER, TRANSFER_WORK_CENTER, SFC, SHOP_ORDER, STEP_ID, OPERATION, LAST_OPERATION, NEXT_OPERATION, QTY, IS_OUT, IS_IN, IS_OUT_SOURCE, CREATE_USER, CREATED_DATE_TIME, MODIFY_USER, MODIFIED_DATE_TIME, TRANSFER_IN_USER, TRANSFER_IN_TIME, TRANSFER_OUT_USER, TRANSFER_OUT_TIME
</sql>
<!-- BaseMapper标准查询/修改/删除 -->
@ -66,22 +65,31 @@
SELECT <include refid="Base_Column_List"></include> FROM Z_WORK_SHOP_TRANSFER
<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.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.transferNo!=null"> AND TRANSFER_NO=#{ew.entity.transferNo}</if>
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test="ew.entity.transferWorkCenter!=null"> AND TRANSFER_WORK_CENTER=#{ew.entity.transferWorkCenter}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
<if test="ew.entity.lastOperation!=null"> AND LAST_OPERATION=#{ew.entity.lastOperation}</if>
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
<if test="ew.entity.lastOperation!=null"> AND LAST_OPERATION=#{ew.entity.lastOperation}</if>
<if test="ew.entity.nextOperation!=null"> AND NEXT_OPERATION=#{ew.entity.nextOperation}</if>
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
<if test="ew.entity.type!=null"> AND TYPE=#{ew.entity.type}</if>
<if test="ew.entity.isOut!=null"> AND IS_OUT=#{ew.entity.isOut}</if>
<if test="ew.entity.isIn!=null"> AND IS_IN=#{ew.entity.isIn}</if>
<if test="ew.entity.isOutSource!=null"> AND IS_OUT_SOURCE=#{ew.entity.isOutSource}</if>
<if test="ew.entity.comments!=null"> AND COMMENTS=#{ew.entity.comments}</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 test="ew.entity.transferInUser!=null"> AND TRANSFER_IN_USER=#{ew.entity.transferInUser}</if>
<if test="ew.entity.transferInTime!=null"> AND TRANSFER_IN_TIME=#{ew.entity.transferInTime}</if>
<if test="ew.entity.transferOutUser!=null"> AND TRANSFER_OUT_USER=#{ew.entity.transferOutUser}</if>
<if test="ew.entity.transferOutTime!=null"> AND TRANSFER_OUT_TIME=#{ew.entity.transferOutTime}</if>
</where>
</select>
@ -90,23 +98,32 @@
<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.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
<if test="ew.entity.lastOperation!=null"> AND LAST_OPERATION=#{ew.entity.lastOperation}</if>
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
<if test="ew.entity.type!=null"> AND TYPE=#{ew.entity.type}</if>
<if test="ew.entity.isOutSource!=null"> AND IS_OUT_SOURCE=#{ew.entity.isOutSource}</if>
<if test="ew.entity.comments!=null"> AND COMMENTS=#{ew.entity.comments}</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.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.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.transferNo!=null"> AND TRANSFER_NO=#{ew.entity.transferNo}</if>
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test="ew.entity.transferWorkCenter!=null"> AND TRANSFER_WORK_CENTER=#{ew.entity.transferWorkCenter}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
<if test="ew.entity.lastOperation!=null"> AND LAST_OPERATION=#{ew.entity.lastOperation}</if>
<if test="ew.entity.nextOperation!=null"> AND NEXT_OPERATION=#{ew.entity.nextOperation}</if>
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
<if test="ew.entity.isOut!=null"> AND IS_OUT=#{ew.entity.isOut}</if>
<if test="ew.entity.isIn!=null"> AND IS_IN=#{ew.entity.isIn}</if>
<if test="ew.entity.isOutSource!=null"> AND IS_OUT_SOURCE=#{ew.entity.isOutSource}</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 test="ew.entity.transferInUser!=null"> AND TRANSFER_IN_USER=#{ew.entity.transferInUser}</if>
<if test="ew.entity.transferInTime!=null"> AND TRANSFER_IN_TIME=#{ew.entity.transferInTime}</if>
<if test="ew.entity.transferOutUser!=null"> AND TRANSFER_OUT_USER=#{ew.entity.transferOutUser}</if>
<if test="ew.entity.transferOutTime!=null"> AND TRANSFER_OUT_TIME=#{ew.entity.transferOutTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
@ -126,20 +143,29 @@
<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.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.transferNo!=null"> AND TRANSFER_NO=#{ew.entity.transferNo}</if>
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test="ew.entity.transferWorkCenter!=null"> AND TRANSFER_WORK_CENTER=#{ew.entity.transferWorkCenter}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
<if test="ew.entity.lastOperation!=null"> AND LAST_OPERATION=#{ew.entity.lastOperation}</if>
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
<if test="ew.entity.lastOperation!=null"> AND LAST_OPERATION=#{ew.entity.lastOperation}</if>
<if test="ew.entity.nextOperation!=null"> AND NEXT_OPERATION=#{ew.entity.nextOperation}</if>
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
<if test="ew.entity.type!=null"> AND TYPE=#{ew.entity.type}</if>
<if test="ew.entity.isOut!=null"> AND IS_OUT=#{ew.entity.isOut}</if>
<if test="ew.entity.isIn!=null"> AND IS_IN=#{ew.entity.isIn}</if>
<if test="ew.entity.isOutSource!=null"> AND IS_OUT_SOURCE=#{ew.entity.isOutSource}</if>
<if test="ew.entity.comments!=null"> AND COMMENTS=#{ew.entity.comments}</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 test="ew.entity.transferInUser!=null"> AND TRANSFER_IN_USER=#{ew.entity.transferInUser}</if>
<if test="ew.entity.transferInTime!=null"> AND TRANSFER_IN_TIME=#{ew.entity.transferInTime}</if>
<if test="ew.entity.transferOutUser!=null"> AND TRANSFER_OUT_USER=#{ew.entity.transferOutUser}</if>
<if test="ew.entity.transferOutTime!=null"> AND TRANSFER_OUT_TIME=#{ew.entity.transferOutTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
@ -159,20 +185,29 @@
<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.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.transferNo!=null"> AND TRANSFER_NO=#{ew.entity.transferNo}</if>
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test="ew.entity.transferWorkCenter!=null"> AND TRANSFER_WORK_CENTER=#{ew.entity.transferWorkCenter}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
<if test="ew.entity.lastOperation!=null"> AND LAST_OPERATION=#{ew.entity.lastOperation}</if>
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
<if test="ew.entity.lastOperation!=null"> AND LAST_OPERATION=#{ew.entity.lastOperation}</if>
<if test="ew.entity.nextOperation!=null"> AND NEXT_OPERATION=#{ew.entity.nextOperation}</if>
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
<if test="ew.entity.type!=null"> AND TYPE=#{ew.entity.type}</if>
<if test="ew.entity.isOut!=null"> AND IS_OUT=#{ew.entity.isOut}</if>
<if test="ew.entity.isIn!=null"> AND IS_IN=#{ew.entity.isIn}</if>
<if test="ew.entity.isOutSource!=null"> AND IS_OUT_SOURCE=#{ew.entity.isOutSource}</if>
<if test="ew.entity.comments!=null"> AND COMMENTS=#{ew.entity.comments}</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 test="ew.entity.transferInUser!=null"> AND TRANSFER_IN_USER=#{ew.entity.transferInUser}</if>
<if test="ew.entity.transferInTime!=null"> AND TRANSFER_IN_TIME=#{ew.entity.transferInTime}</if>
<if test="ew.entity.transferOutUser!=null"> AND TRANSFER_OUT_USER=#{ew.entity.transferOutUser}</if>
<if test="ew.entity.transferOutTime!=null"> AND TRANSFER_OUT_TIME=#{ew.entity.transferOutTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
@ -192,20 +227,29 @@
<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.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.transferNo!=null"> AND TRANSFER_NO=#{ew.entity.transferNo}</if>
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test="ew.entity.transferWorkCenter!=null"> AND TRANSFER_WORK_CENTER=#{ew.entity.transferWorkCenter}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
<if test="ew.entity.lastOperation!=null"> AND LAST_OPERATION=#{ew.entity.lastOperation}</if>
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
<if test="ew.entity.lastOperation!=null"> AND LAST_OPERATION=#{ew.entity.lastOperation}</if>
<if test="ew.entity.nextOperation!=null"> AND NEXT_OPERATION=#{ew.entity.nextOperation}</if>
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
<if test="ew.entity.type!=null"> AND TYPE=#{ew.entity.type}</if>
<if test="ew.entity.isOut!=null"> AND IS_OUT=#{ew.entity.isOut}</if>
<if test="ew.entity.isIn!=null"> AND IS_IN=#{ew.entity.isIn}</if>
<if test="ew.entity.isOutSource!=null"> AND IS_OUT_SOURCE=#{ew.entity.isOutSource}</if>
<if test="ew.entity.comments!=null"> AND COMMENTS=#{ew.entity.comments}</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 test="ew.entity.transferInUser!=null"> AND TRANSFER_IN_USER=#{ew.entity.transferInUser}</if>
<if test="ew.entity.transferInTime!=null"> AND TRANSFER_IN_TIME=#{ew.entity.transferInTime}</if>
<if test="ew.entity.transferOutUser!=null"> AND TRANSFER_OUT_USER=#{ew.entity.transferOutUser}</if>
<if test="ew.entity.transferOutTime!=null"> AND TRANSFER_OUT_TIME=#{ew.entity.transferOutTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
@ -225,23 +269,32 @@
<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.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.transferNo!=null"> AND TRANSFER_NO=#{ew.entity.transferNo}</if>
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test="ew.entity.transferWorkCenter!=null"> AND TRANSFER_WORK_CENTER=#{ew.entity.transferWorkCenter}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
<if test="ew.entity.lastOperation!=null"> AND LAST_OPERATION=#{ew.entity.lastOperation}</if>
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
<if test="ew.entity.lastOperation!=null"> AND LAST_OPERATION=#{ew.entity.lastOperation}</if>
<if test="ew.entity.nextOperation!=null"> AND NEXT_OPERATION=#{ew.entity.nextOperation}</if>
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
<if test="ew.entity.type!=null"> AND TYPE=#{ew.entity.type}</if>
<if test="ew.entity.isOut!=null"> AND IS_OUT=#{ew.entity.isOut}</if>
<if test="ew.entity.isIn!=null"> AND IS_IN=#{ew.entity.isIn}</if>
<if test="ew.entity.isOutSource!=null"> AND IS_OUT_SOURCE=#{ew.entity.isOutSource}</if>
<if test="ew.entity.comments!=null"> AND COMMENTS=#{ew.entity.comments}</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 test="ew.entity.transferInUser!=null"> AND TRANSFER_IN_USER=#{ew.entity.transferInUser}</if>
<if test="ew.entity.transferInTime!=null"> AND TRANSFER_IN_TIME=#{ew.entity.transferInTime}</if>
<if test="ew.entity.transferOutUser!=null"> AND TRANSFER_OUT_USER=#{ew.entity.transferOutUser}</if>
<if test="ew.entity.transferOutTime!=null"> AND TRANSFER_OUT_TIME=#{ew.entity.transferOutTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
AND ${ew.sqlSegment}
</if>
</if>
</where>
@ -258,20 +311,29 @@
<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.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.transferNo!=null"> AND TRANSFER_NO=#{ew.entity.transferNo}</if>
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test="ew.entity.transferWorkCenter!=null"> AND TRANSFER_WORK_CENTER=#{ew.entity.transferWorkCenter}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
<if test="ew.entity.lastOperation!=null"> AND LAST_OPERATION=#{ew.entity.lastOperation}</if>
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
<if test="ew.entity.lastOperation!=null"> AND LAST_OPERATION=#{ew.entity.lastOperation}</if>
<if test="ew.entity.nextOperation!=null"> AND NEXT_OPERATION=#{ew.entity.nextOperation}</if>
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
<if test="ew.entity.type!=null"> AND TYPE=#{ew.entity.type}</if>
<if test="ew.entity.isOut!=null"> AND IS_OUT=#{ew.entity.isOut}</if>
<if test="ew.entity.isIn!=null"> AND IS_IN=#{ew.entity.isIn}</if>
<if test="ew.entity.isOutSource!=null"> AND IS_OUT_SOURCE=#{ew.entity.isOutSource}</if>
<if test="ew.entity.comments!=null"> AND COMMENTS=#{ew.entity.comments}</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 test="ew.entity.transferInUser!=null"> AND TRANSFER_IN_USER=#{ew.entity.transferInUser}</if>
<if test="ew.entity.transferInTime!=null"> AND TRANSFER_IN_TIME=#{ew.entity.transferInTime}</if>
<if test="ew.entity.transferOutUser!=null"> AND TRANSFER_OUT_USER=#{ew.entity.transferOutUser}</if>
<if test="ew.entity.transferOutTime!=null"> AND TRANSFER_OUT_TIME=#{ew.entity.transferOutTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
@ -287,37 +349,55 @@
INSERT INTO Z_WORK_SHOP_TRANSFER
<trim prefix="(" suffix=")" suffixOverrides=",">
HANDLE,
<if test="sfcDispatchBo!=null">SFC_DISPATCH_BO,</if>
<if test="site!=null">SITE,</if>
<if test="transferNo!=null">TRANSFER_NO,</if>
<if test="workCenter!=null">WORK_CENTER,</if>
<if test="transferWorkCenter!=null">TRANSFER_WORK_CENTER,</if>
<if test="sfc!=null">SFC,</if>
<if test="shopOrder!=null">SHOP_ORDER,</if>
<if test="item!=null">ITEM,</if>
<if test="lastOperation!=null">LAST_OPERATION,</if>
<if test="stepId!=null">STEP_ID,</if>
<if test="operation!=null">OPERATION,</if>
<if test="lastOperation!=null">LAST_OPERATION,</if>
<if test="nextOperation!=null">NEXT_OPERATION,</if>
<if test="qty!=null">QTY,</if>
<if test="type!=null">TYPE,</if>
<if test="isOut!=null">IS_OUT,</if>
<if test="isIn!=null">IS_IN,</if>
<if test="isOutSource!=null">IS_OUT_SOURCE,</if>
<if test="comments!=null">COMMENTS,</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>
<if test="transferInUser!=null">TRANSFER_IN_USER,</if>
<if test="transferInTime!=null">TRANSFER_IN_TIME,</if>
<if test="transferOutUser!=null">TRANSFER_OUT_USER,</if>
<if test="transferOutTime!=null">TRANSFER_OUT_TIME,</if>
</trim> VALUES
<trim prefix="(" suffix=")" suffixOverrides=",">
#{handle},
<if test="sfcDispatchBo!=null">#{sfcDispatchBo},</if>
<if test="site!=null">#{site},</if>
<if test="transferNo!=null">#{transferNo},</if>
<if test="workCenter!=null">#{workCenter},</if>
<if test="transferWorkCenter!=null">#{transferWorkCenter},</if>
<if test="sfc!=null">#{sfc},</if>
<if test="shopOrder!=null">#{shopOrder},</if>
<if test="item!=null">#{item},</if>
<if test="lastOperation!=null">#{lastOperation},</if>
<if test="stepId!=null">#{stepId},</if>
<if test="operation!=null">#{operation},</if>
<if test="lastOperation!=null">#{lastOperation},</if>
<if test="nextOperation!=null">#{nextOperation},</if>
<if test="qty!=null">#{qty},</if>
<if test="type!=null">#{type},</if>
<if test="isOut!=null">#{isOut},</if>
<if test="isIn!=null">#{isIn},</if>
<if test="isOutSource!=null">#{isOutSource},</if>
<if test="comments!=null">#{comments},</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>
<if test="transferInUser!=null">#{transferInUser},</if>
<if test="transferInTime!=null">#{transferInTime},</if>
<if test="transferOutUser!=null">#{transferOutUser},</if>
<if test="transferOutTime!=null">#{transferOutTime},</if>
</trim>
</insert>
@ -328,99 +408,144 @@
</trim> VALUES
<trim prefix="(" suffix=")" suffixOverrides=",">
#{handle},
#{sfcDispatchBo},
#{site},
#{transferNo},
#{workCenter},
#{transferWorkCenter},
#{sfc},
#{shopOrder},
#{item},
#{lastOperation},
#{stepId},
#{operation},
#{lastOperation},
#{nextOperation},
#{qty},
#{type},
#{isOut},
#{isIn},
#{isOutSource},
#{comments},
#{createUser},
#{createdDateTime},
#{modifyUser},
#{modifiedDateTime},
#{transferInUser},
#{transferInTime},
#{transferOutUser},
#{transferOutTime},
</trim>
</insert>
<update id="updateById">
UPDATE Z_WORK_SHOP_TRANSFER <trim prefix="SET" suffixOverrides=",">
<if test="et.sfcDispatchBo!=null">SFC_DISPATCH_BO=#{et.sfcDispatchBo},</if>
<if test="et.site!=null">SITE=#{et.site},</if>
<if test="et.transferNo!=null">TRANSFER_NO=#{et.transferNo},</if>
<if test="et.workCenter!=null">WORK_CENTER=#{et.workCenter},</if>
<if test="et.transferWorkCenter!=null">TRANSFER_WORK_CENTER=#{et.transferWorkCenter},</if>
<if test="et.sfc!=null">SFC=#{et.sfc},</if>
<if test="et.shopOrder!=null">SHOP_ORDER=#{et.shopOrder},</if>
<if test="et.item!=null">ITEM=#{et.item},</if>
<if test="et.lastOperation!=null">LAST_OPERATION=#{et.lastOperation},</if>
<if test="et.stepId!=null">STEP_ID=#{et.stepId},</if>
<if test="et.operation!=null">OPERATION=#{et.operation},</if>
<if test="et.lastOperation!=null">LAST_OPERATION=#{et.lastOperation},</if>
<if test="et.nextOperation!=null">NEXT_OPERATION=#{et.nextOperation},</if>
<if test="et.qty!=null">QTY=#{et.qty},</if>
<if test="et.type!=null">TYPE=#{et.type},</if>
<if test="et.isOut!=null">IS_OUT=#{et.isOut},</if>
<if test="et.isIn!=null">IS_IN=#{et.isIn},</if>
<if test="et.isOutSource!=null">IS_OUT_SOURCE=#{et.isOutSource},</if>
<if test="et.comments!=null">COMMENTS=#{et.comments},</if>
<if test="et.createUser!=null">CREATE_USER=#{et.createUser},</if>
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</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>
<if test="et.modifyUser!=null">MODIFY_USER=#{et.modifyUser},</if>
<if test="et.modifiedDateTime!=null">MODIFIED_DATE_TIME=#{et.modifiedDateTime},</if>
<if test="et.transferInUser!=null">TRANSFER_IN_USER=#{et.transferInUser},</if>
<if test="et.transferInTime!=null">TRANSFER_IN_TIME=#{et.transferInTime},</if>
<if test="et.transferOutUser!=null">TRANSFER_OUT_USER=#{et.transferOutUser},</if>
<if test="et.transferOutTime!=null">TRANSFER_OUT_TIME=#{et.transferOutTime},</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_WORK_SHOP_TRANSFER <trim prefix="SET" suffixOverrides=",">
SFC_DISPATCH_BO=#{et.sfcDispatchBo},
SITE=#{et.site},
TRANSFER_NO=#{et.transferNo},
WORK_CENTER=#{et.workCenter},
TRANSFER_WORK_CENTER=#{et.transferWorkCenter},
SFC=#{et.sfc},
SHOP_ORDER=#{et.shopOrder},
ITEM=#{et.item},
LAST_OPERATION=#{et.lastOperation},
STEP_ID=#{et.stepId},
OPERATION=#{et.operation},
LAST_OPERATION=#{et.lastOperation},
NEXT_OPERATION=#{et.nextOperation},
QTY=#{et.qty},
TYPE=#{et.type},
IS_OUT=#{et.isOut},
IS_IN=#{et.isIn},
IS_OUT_SOURCE=#{et.isOutSource},
COMMENTS=#{et.comments},
CREATE_USER=#{et.createUser},
CREATED_DATE_TIME=#{et.createdDateTime},
</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>
MODIFY_USER=#{et.modifyUser},
MODIFIED_DATE_TIME=#{et.modifiedDateTime},
TRANSFER_IN_USER=#{et.transferInUser},
TRANSFER_IN_TIME=#{et.transferInTime},
TRANSFER_OUT_USER=#{et.transferOutUser},
TRANSFER_OUT_TIME=#{et.transferOutTime},
</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_WORK_SHOP_TRANSFER <trim prefix="SET" suffixOverrides=",">
<if test="et.sfcDispatchBo!=null">SFC_DISPATCH_BO=#{et.sfcDispatchBo},</if>
<if test="et.site!=null">SITE=#{et.site},</if>
<if test="et.transferNo!=null">TRANSFER_NO=#{et.transferNo},</if>
<if test="et.workCenter!=null">WORK_CENTER=#{et.workCenter},</if>
<if test="et.transferWorkCenter!=null">TRANSFER_WORK_CENTER=#{et.transferWorkCenter},</if>
<if test="et.sfc!=null">SFC=#{et.sfc},</if>
<if test="et.shopOrder!=null">SHOP_ORDER=#{et.shopOrder},</if>
<if test="et.item!=null">ITEM=#{et.item},</if>
<if test="et.lastOperation!=null">LAST_OPERATION=#{et.lastOperation},</if>
<if test="et.stepId!=null">STEP_ID=#{et.stepId},</if>
<if test="et.operation!=null">OPERATION=#{et.operation},</if>
<if test="et.lastOperation!=null">LAST_OPERATION=#{et.lastOperation},</if>
<if test="et.nextOperation!=null">NEXT_OPERATION=#{et.nextOperation},</if>
<if test="et.qty!=null">QTY=#{et.qty},</if>
<if test="et.type!=null">TYPE=#{et.type},</if>
<if test="et.isOut!=null">IS_OUT=#{et.isOut},</if>
<if test="et.isIn!=null">IS_IN=#{et.isIn},</if>
<if test="et.isOutSource!=null">IS_OUT_SOURCE=#{et.isOutSource},</if>
<if test="et.comments!=null">COMMENTS=#{et.comments},</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>
<if test="et.transferInUser!=null">TRANSFER_IN_USER=#{et.transferInUser},</if>
<if test="et.transferInTime!=null">TRANSFER_IN_TIME=#{et.transferInTime},</if>
<if test="et.transferOutUser!=null">TRANSFER_OUT_USER=#{et.transferOutUser},</if>
<if test="et.transferOutTime!=null">TRANSFER_OUT_TIME=#{et.transferOutTime},</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.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.transferNo!=null"> AND TRANSFER_NO=#{ew.entity.transferNo}</if>
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test="ew.entity.transferWorkCenter!=null"> AND TRANSFER_WORK_CENTER=#{ew.entity.transferWorkCenter}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
<if test="ew.entity.lastOperation!=null"> AND LAST_OPERATION=#{ew.entity.lastOperation}</if>
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
<if test="ew.entity.lastOperation!=null"> AND LAST_OPERATION=#{ew.entity.lastOperation}</if>
<if test="ew.entity.nextOperation!=null"> AND NEXT_OPERATION=#{ew.entity.nextOperation}</if>
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
<if test="ew.entity.type!=null"> AND TYPE=#{ew.entity.type}</if>
<if test="ew.entity.isOut!=null"> AND IS_OUT=#{ew.entity.isOut}</if>
<if test="ew.entity.isIn!=null"> AND IS_IN=#{ew.entity.isIn}</if>
<if test="ew.entity.isOutSource!=null"> AND IS_OUT_SOURCE=#{ew.entity.isOutSource}</if>
<if test="ew.entity.comments!=null"> AND COMMENTS=#{ew.entity.comments}</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 test="ew.entity.transferInUser!=null"> AND TRANSFER_IN_USER=#{ew.entity.transferInUser}</if>
<if test="ew.entity.transferInTime!=null"> AND TRANSFER_IN_TIME=#{ew.entity.transferInTime}</if>
<if test="ew.entity.transferOutUser!=null"> AND TRANSFER_OUT_USER=#{ew.entity.transferOutUser}</if>
<if test="ew.entity.transferOutTime!=null"> AND TRANSFER_OUT_TIME=#{ew.entity.transferOutTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
@ -457,20 +582,29 @@
<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.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.transferNo!=null"> AND TRANSFER_NO=#{ew.entity.transferNo}</if>
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test="ew.entity.transferWorkCenter!=null"> AND TRANSFER_WORK_CENTER=#{ew.entity.transferWorkCenter}</if>
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
<if test="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
<if test="ew.entity.lastOperation!=null"> AND LAST_OPERATION=#{ew.entity.lastOperation}</if>
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
<if test="ew.entity.lastOperation!=null"> AND LAST_OPERATION=#{ew.entity.lastOperation}</if>
<if test="ew.entity.nextOperation!=null"> AND NEXT_OPERATION=#{ew.entity.nextOperation}</if>
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
<if test="ew.entity.type!=null"> AND TYPE=#{ew.entity.type}</if>
<if test="ew.entity.isOut!=null"> AND IS_OUT=#{ew.entity.isOut}</if>
<if test="ew.entity.isIn!=null"> AND IS_IN=#{ew.entity.isIn}</if>
<if test="ew.entity.isOutSource!=null"> AND IS_OUT_SOURCE=#{ew.entity.isOutSource}</if>
<if test="ew.entity.comments!=null"> AND COMMENTS=#{ew.entity.comments}</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 test="ew.entity.transferInUser!=null"> AND TRANSFER_IN_USER=#{ew.entity.transferInUser}</if>
<if test="ew.entity.transferInTime!=null"> AND TRANSFER_IN_TIME=#{ew.entity.transferInTime}</if>
<if test="ew.entity.transferOutUser!=null"> AND TRANSFER_OUT_USER=#{ew.entity.transferOutUser}</if>
<if test="ew.entity.transferOutTime!=null"> AND TRANSFER_OUT_TIME=#{ew.entity.transferOutTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
@ -488,12 +622,58 @@
</foreach>)
</delete>
<!-- BaseMapper标准查询/修改/删除 -->
<select id="getSfcData" resultMap="FullResultMap">
SELECT ZSD.STEP_ID,ZSD.RESRCE,ZSD.DISPATCH_NO,ZSD.WORK_CENTER,SC.SFC, SO.SHOP_ORDER,SO_CF3.VALUE "MAP", SO_CF2.VALUE WORK_ORDER,SO_CF.VALUE ITEM_NUMBER,SC.QTY, IM.ITEM, IT.DESCRIPTION ITEM_DESC, OP.OPERATION, OT.DESCRIPTION OPERATION_DESC,
CASE WHEN ST.STATUS='403' THEN '活动中' WHEN ST.STATUS='402' THEN '排队中' WHEN ST.STATUS='401' THEN '新建' ELSE TO_CHAR(ST.STATUS) END STATUS,RO_CF.VALUE IS_OUT_SOURCE
<select id="getOutList" resultType="com.foreverwin.mesnac.production.dto.WorkShopTransferDto">
SELECT zsd.handle SFC_DISPATCH_BO,zsd.sfc, PREZSD.OPERATION LAST_OPERATION,PREZSD.WORK_CENTER TRANSFER_WORK_CENTER,zsd.WORK_CENTER,WCT.DESCRIPTION WORK_CENTER_DESC,zsd.SHOP_ORDER,c1.VALUE WORK_ORDER,IT.DESCRIPTION ITEM_DESC,ZSD.BLANKING_SIZE,SFC.QTY,PREOT.DESCRIPTION LAST_OPERATION_DESC,PREZSD.EMPLOYEE_DESCRIPTION,OT.DESCRIPTION OPERATION_DESC,
CASE WHEN ZWST.IS_IN='Y' THEN '已接收' WHEN ZWST.IS_OUT='Y' THEN '转序中' ELSE '待转出' END STATUS
FROM Z_SFC_DISPATCH zsd
JOIN sfc sfc ON sfc.sfc=zsd.sfc AND zsd.site=sfc.site
INNER JOIN SFC_ROUTING SG ON SG.SFC_BO = sfc.HANDLE
INNER JOIN SFC_ROUTER SR ON SR.SFC_ROUTING_BO = SG.HANDLE AND SR.IN_USE = 'true'
left JOIN SFC_STEP SP ON SP.SFC_ROUTER_BO = SR.HANDLE and sp.step_Id=zsd.STEP_ID
JOIN WORK_CENTER WC ON WC.WORK_CENTER = ZSD.WORK_CENTER AND WC.SITE = zsd.SITE
LEFT JOIN WORK_CENTER_T WCT ON WCT.WORK_CENTER_BO = WC.HANDLE AND WCT.LOCALE = 'zh'
LEFT JOIN Z_SFC_DISPATCH PREZSD ON zsd.SFC=PREZSD.SFC AND PREZSD.DISPATCH_SEQ=TO_NUMBER(zsd.DISPATCH_SEQ)-1
LEFT JOIN Z_WORK_SHOP_TRANSFER ZWST ON zsd.HANDLE=zwst.SFC_DISPATCH_BO
INNER JOIN SHOP_ORDER SO ON SO.SITE = zsd.SITE AND SO.SHOP_ORDER = zsd.SHOP_ORDER
JOIN OPERATION OP ON OP.OPERATION = zsd.OPERATION AND OP.SITE = ZSD.SITE AND OP.CURRENT_REVISION = 'true'
JOIN OPERATION_T OT ON OT.OPERATION_BO = OP.HANDLE AND OT.LOCALE ='zh'
LEFT JOIN CUSTOM_FIELDS C1 ON C1.HANDLE = SO.HANDLE AND C1."ATTRIBUTE" = 'WORK_ORDER'
INNER JOIN SFC SFC ON SFC.SITE = zsd.SITE AND SFC.SFC = zsd.SFC
INNER JOIN ITEM IM ON IM.HANDLE = SFC.ITEM_BO
LEFT JOIN ITEM_T IT ON IT.ITEM_BO = IM.HANDLE AND IT.LOCALE = 'zh'
LEFT JOIN OPERATION PREOP ON PREOP.OPERATION = zsd.PREPOSITION_OPERATION AND PREOP.SITE = ZSD.SITE AND PREOP.CURRENT_REVISION = 'true'
LEFT JOIN OPERATION_T PREOT ON PREOT.OPERATION_BO = PREOP.HANDLE AND PREOT.LOCALE ='zh'
WHERE ZSD.SITE=#{site} AND zsd.DISPATCH_STATUS!='COMPLETE' AND zsd.DISPATCH_STATUS!='CANCEL'
<if test="stepId!=null and stepId!=''">
AND zsd.STEP_ID=#{stepId}
</if>
<if test="workCenter!=null and workCenter!=''">
AND PREZSD.WORK_CENTER=#{workCenter}
</if>
<if test="transferWorkCenter!=null and transferWorkCenter!=''">
AND ZSD.WORK_CENTER=#{transferWorkCenter}
</if>
<if test="operation!=null and operation!=''">
AND ZSD.OPERATION=#{operation}
</if>
<if test="sfc!=null and sfc!=''">
AND ZSD.sfc=#{sfc}
</if>
<if test=" 2 eq status ">
AND ZWST.IS_IN='Y' AND ZWST.IS_OUT='Y'
</if>
<if test=" 1 eq status ">
AND ZWST.IS_OUT='Y' AND ZWST.IS_IN IS NULL AND (SP.QTY_IN_QUEUE > 0 OR SP.QTY_IN_WORK > 0)
</if>
<if test="0 eq status">
AND ZWST.IS_OUT IS NULL AND ZWST.IS_IN IS NULL AND (SP.QTY_IN_QUEUE > 0 OR SP.QTY_IN_WORK > 0)
</if>
</select>
<select id="getSfcData" resultType="com.foreverwin.mesnac.production.dto.WorkShopTransferDto">
SELECT ZSD.handle SFC_DISPATCH_BO,ZSD.STEP_ID,ZSD.RESRCE,ZSD.DISPATCH_NO,ZSD.WORK_CENTER,SC.SFC, SO.SHOP_ORDER, SO_CF2.VALUE WORK_ORDER,SO_CF.VALUE ITEM_NUMBER,SC.QTY, IM.ITEM, IT.DESCRIPTION ITEM_DESC, OP.OPERATION, OT.DESCRIPTION OPERATION_DESC,
ST.STATUS ,RO_CF.VALUE IS_OUT_SOURCE
FROM SFC SC
INNER JOIN SHOP_ORDER SO ON SO.HANDLE = SC.SHOP_ORDER_BO
LEFT JOIN CUSTOM_FIELDS SO_CF3 ON SO_CF3.HANDLE = SO.HANDLE AND SO_CF3."ATTRIBUTE" = 'MAP'
LEFT JOIN CUSTOM_FIELDS SO_CF2 ON SO_CF2.HANDLE = SO.HANDLE AND SO_CF2."ATTRIBUTE" = 'WORK_ORDER'
LEFT JOIN CUSTOM_FIELDS SO_CF ON SO_CF.HANDLE = SO.HANDLE AND SO_CF."ATTRIBUTE" = 'ITEM_NUMBER'
INNER JOIN STATUS ST ON ST.HANDLE = SC.STATUS_BO AND ST.STATUS_GROUP = 'SFC'
@ -510,4 +690,45 @@
JOIN Z_SFC_DISPATCH ZSD ON ZSD.SITE = SC.SITE AND ZSD.SFC = SC.SFC AND ZSD.OPERATION = OP.OPERATION AND ZSD.STEP_ID = SP.STEP_ID
WHERE SC.SITE = #{site} AND SC.SFC = #{sfc}
</select>
<select id="getInList" resultType="com.foreverwin.mesnac.production.dto.WorkShopTransferDto">
SELECT zsd.sfc,zsd.handle SFC_DISPATCH_BO,PREZSD.OPERATION NEXT_OPERATION,PREZSD.WORK_CENTER TRANSFER_WORK_CENTER,zsd.WORK_CENTER,WCT.DESCRIPTION WORK_CENTER_DESC,zsd.SHOP_ORDER,c1.VALUE WORK_ORDER,IT.DESCRIPTION ITEM_DESC,ZSD.BLANKING_SIZE,SFC.QTY,PREOT.DESCRIPTION LAST_OPERATION_DESC,PREZSD.EMPLOYEE_DESCRIPTION,OT.DESCRIPTION OPERATION_DESC,
CASE WHEN ZWST.IS_IN='Y' THEN '已接收' WHEN ZWST.IS_OUT='Y' THEN '转序中' ELSE NULL END STATUS
FROM Z_SFC_DISPATCH zsd
JOIN sfc sfc ON sfc.sfc=zsd.sfc AND zsd.site=sfc.site
INNER JOIN SFC_ROUTING SG ON SG.SFC_BO = sfc.HANDLE
INNER JOIN SFC_ROUTER SR ON SR.SFC_ROUTING_BO = SG.HANDLE AND SR.IN_USE = 'true'
left JOIN SFC_STEP SP ON SP.SFC_ROUTER_BO = SR.HANDLE and sp.step_Id=zsd.STEP_ID
JOIN WORK_CENTER WC ON WC.WORK_CENTER = ZSD.WORK_CENTER AND WC.SITE = zsd.SITE
LEFT JOIN WORK_CENTER_T WCT ON WCT.WORK_CENTER_BO = WC.HANDLE AND WCT.LOCALE = 'zh'
LEFT JOIN Z_SFC_DISPATCH PREZSD ON zsd.SFC=PREZSD.SFC AND PREZSD.DISPATCH_SEQ=TO_NUMBER(zsd.DISPATCH_SEQ)+1
LEFT JOIN Z_WORK_SHOP_TRANSFER ZWST ON zsd.HANDLE=zwst.SFC_DISPATCH_BO
INNER JOIN SHOP_ORDER SO ON SO.SITE = zsd.SITE AND SO.SHOP_ORDER = zsd.SHOP_ORDER
JOIN OPERATION OP ON OP.OPERATION = zsd.OPERATION AND OP.SITE = ZSD.SITE AND OP.CURRENT_REVISION = 'true'
JOIN OPERATION_T OT ON OT.OPERATION_BO = OP.HANDLE AND OT.LOCALE ='zh'
LEFT JOIN CUSTOM_FIELDS C1 ON C1.HANDLE = SO.HANDLE AND C1."ATTRIBUTE" = 'WORK_ORDER'
INNER JOIN SFC SFC ON SFC.SITE = zsd.SITE AND SFC.SFC = zsd.SFC
INNER JOIN ITEM IM ON IM.HANDLE = SFC.ITEM_BO
LEFT JOIN ITEM_T IT ON IT.ITEM_BO = IM.HANDLE AND IT.LOCALE = 'zh'
LEFT JOIN OPERATION PREOP ON PREOP.OPERATION = zsd.PREPOSITION_OPERATION AND PREOP.SITE = ZSD.SITE AND PREOP.CURRENT_REVISION = 'true'
LEFT JOIN OPERATION_T PREOT ON PREOT.OPERATION_BO = PREOP.HANDLE AND PREOT.LOCALE ='zh'
WHERE ZSD.SITE=#{site} AND zsd.DISPATCH_STATUS!='COMPLETE' AND zsd.DISPATCH_STATUS!='CANCEL'
AND ZSD.WORK_CENTER=#{workCenter}
<if test="transferWorkCenter!=null and transferWorkCenter!=''">
AND PREZSD.WORK_CENTER=#{transferWorkCenter}
</if>
<if test="transferNo!=null and transferNo!=''">
AND ZWST.TRANSFER_NO=#{transferNo}
</if>
<if test="sfc!=null and sfc!=''">
AND ZSD.sfc=#{sfc}
</if>
<if test="status eq 1">
AND ZWST.IS_IN='Y' AND ZWST.IS_OUT='Y'
</if>
<if test="status eq 0">
AND ZWST.IS_OUT='Y' AND ZWST.IS_IN IS NULL AND (SP.QTY_IN_QUEUE > 0 OR SP.QTY_IN_WORK > 0)
</if>
</select>
</mapper>

@ -42,5 +42,9 @@
<groupId>com.foreverwin.mesnac</groupId>
<artifactId>anomaly</artifactId>
</dependency>
<dependency>
<groupId>com.foreverwin.mesnac</groupId>
<artifactId>equip</artifactId>
</dependency>
</dependencies>
</project>
Loading…
Cancel
Save