diff --git a/common/src/main/java/com/foreverwin/mesnac/common/constant/Constants.java b/common/src/main/java/com/foreverwin/mesnac/common/constant/Constants.java index 954a830d..8c9bf8a5 100644 --- a/common/src/main/java/com/foreverwin/mesnac/common/constant/Constants.java +++ b/common/src/main/java/com/foreverwin/mesnac/common/constant/Constants.java @@ -17,4 +17,8 @@ public interface Constants { String STATUS_N = "N"; String SITE_ADMIN = "SITE_ADMIN"; + + //叫料类型 + String CALL_TYPE_MATERIAL = "MATERIAL"; + String CALL_TYPE_OPERATION = "OPERATION"; } diff --git a/common/src/main/java/com/foreverwin/mesnac/common/dto/SfcDispatchDto.java b/common/src/main/java/com/foreverwin/mesnac/common/dto/SfcDispatchDto.java index 74a86a02..bae3f554 100644 --- a/common/src/main/java/com/foreverwin/mesnac/common/dto/SfcDispatchDto.java +++ b/common/src/main/java/com/foreverwin/mesnac/common/dto/SfcDispatchDto.java @@ -135,6 +135,7 @@ public class SfcDispatchDto implements Serializable { /** * 前置工序 */ + private String prepositionStepId; private String prepositionOperation; /** * 是否首工序 @@ -143,6 +144,7 @@ public class SfcDispatchDto implements Serializable { /** * 物料编号&描述 */ + private String itemBo; private String item; private String itemDescription; private String qtyToBuild; @@ -442,6 +444,14 @@ public class SfcDispatchDto implements Serializable { this.remark = remark; } + public String getPrepositionStepId() { + return prepositionStepId; + } + + public void setPrepositionStepId(String prepositionStepId) { + this.prepositionStepId = prepositionStepId; + } + public String getPrepositionOperation() { return prepositionOperation; } @@ -458,6 +468,14 @@ public class SfcDispatchDto implements Serializable { this.isFirstOperation = isFirstOperation; } + public String getItemBo() { + return itemBo; + } + + public void setItemBo(String itemBo) { + this.itemBo = itemBo; + } + public String getItem() { return item; } diff --git a/common/src/main/java/com/foreverwin/mesnac/common/enums/HandleEnum.java b/common/src/main/java/com/foreverwin/mesnac/common/enums/HandleEnum.java index 633abb1a..07e27bcc 100644 --- a/common/src/main/java/com/foreverwin/mesnac/common/enums/HandleEnum.java +++ b/common/src/main/java/com/foreverwin/mesnac/common/enums/HandleEnum.java @@ -20,6 +20,9 @@ public enum HandleEnum { /**物料清单**/ BOM("BOMBO:","BOMBO:{0},{1},{2},{3}"), + /**叫料**/ + CALL_ITEM("CallItemBO:", "CallItemBO:{0},{1}"), + /**工单*/ SHOP_ORDER( "ShopOrderBO:", "ShopOrderBO:{0},{1}" ), diff --git a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/controller/CallItemController.java b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/controller/CallItemController.java index 3fc22a44..4e7e12f6 100644 --- a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/controller/CallItemController.java +++ b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/controller/CallItemController.java @@ -16,7 +16,7 @@ import java.util.List; /** * * @author Leon.L - * @since 2021-06-24 + * @since 2021-06-30 */ @RestController @RequestMapping("/Z-CALL-ITEM") @@ -72,7 +72,7 @@ public class CallItemController { .or().like(CallItem::getCallItemNo, frontPage.getGlobalQuery()) .or().like(CallItem::getShopOrder, frontPage.getGlobalQuery()) .or().like(CallItem::getSfc, frontPage.getGlobalQuery()) - .or().like(CallItem::getDispatchNo, frontPage.getGlobalQuery()) + .or().like(CallItem::getSfcDispatchBo, frontPage.getGlobalQuery()) .or().like(CallItem::getOperation, frontPage.getGlobalQuery()) .or().like(CallItem::getStepId, frontPage.getGlobalQuery()) .or().like(CallItem::getResrce, frontPage.getGlobalQuery()) @@ -80,9 +80,9 @@ public class CallItemController { .or().like(CallItem::getCallType, frontPage.getGlobalQuery()) .or().like(CallItem::getStatus, frontPage.getGlobalQuery()) .or().like(CallItem::getCallStatus, frontPage.getGlobalQuery()) - .or().like(CallItem::getSendStatus, frontPage.getGlobalQuery()) - .or().like(CallItem::getCreateUserBo, frontPage.getGlobalQuery()) - .or().like(CallItem::getUpdateUserBo, frontPage.getGlobalQuery()) + .or().like(CallItem::getIssueStatus, frontPage.getGlobalQuery()) + .or().like(CallItem::getCreateUser, frontPage.getGlobalQuery()) + .or().like(CallItem::getUpdateUser, frontPage.getGlobalQuery()) ); } result = callItemService.page(frontPage.getPagePlus(), queryWrapper); diff --git a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/controller/SfcDispatchController.java b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/controller/SfcDispatchController.java index 4057dbcd..8a00ce6d 100644 --- a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/controller/SfcDispatchController.java +++ b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/controller/SfcDispatchController.java @@ -229,7 +229,7 @@ public class SfcDispatchController { String user = CommonMethods.getUser(); flag = sfcDispatchService.releaseDispatch(site, user, message, sfcDispatchList); } catch (Exception e) { - return R.failed(e.getMessage()); + return R.failed("派工发布失败:" + e.getMessage()); } diff --git a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/mapper/CallItemMapper.java b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/mapper/CallItemMapper.java index bce1f5aa..c7c2b63f 100644 --- a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/mapper/CallItemMapper.java +++ b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/mapper/CallItemMapper.java @@ -1,18 +1,36 @@ package com.foreverwin.mesnac.dispatch.mapper; +import com.foreverwin.mesnac.common.dto.SfcDispatchDto; import com.foreverwin.mesnac.dispatch.model.CallItem; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.foreverwin.mesnac.dispatch.model.SfcDispatch; import org.springframework.stereotype.Repository; +import java.util.List; + /** * <p> * Mapper 接口 * </p> * * @author Leon.L - * @since 2021-06-24 + * @since 2021-06-30 */ @Repository public interface CallItemMapper extends BaseMapper<CallItem> { + /** + * 派工叫料组件数据删除 + * + * @param list + */ + void deleteDispatchCallItem(List<SfcDispatchDto> list); + + /** + * 查询叫料组件 + * + * @param list + * @return + */ + List<CallItem> selectDispatchCallItem(List<SfcDispatchDto> list); } \ No newline at end of file diff --git a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/model/CallItem.java b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/model/CallItem.java index 50d8ec6e..0db327df 100644 --- a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/model/CallItem.java +++ b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/model/CallItem.java @@ -5,6 +5,8 @@ import java.io.Serializable; import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.extension.activerecord.Model; import com.baomidou.mybatisplus.annotation.TableId; + +import java.math.BigDecimal; import java.time.LocalDateTime; import com.baomidou.mybatisplus.annotation.TableField; import java.io.Serializable; @@ -16,10 +18,11 @@ import com.baomidou.mybatisplus.annotation.IdType; * </p> * * @author Leon.L - * @since 2021-06-24 + * @since 2021-06-30 */ @TableName("Z_CALL_ITEM") + public class CallItem extends Model<CallItem> { private static final long serialVersionUID = 1L; @@ -34,6 +37,11 @@ public class CallItem extends Model<CallItem> { */ @TableField("SITE") private String site; + /** + * 派工单号 + */ + @TableField("SFC_DISPATCH_BO") + private String sfcDispatchBo; /** * 叫料单号 */ @@ -50,22 +58,17 @@ public class CallItem extends Model<CallItem> { @TableField("SFC") private String sfc; /** - * 派工单号 - */ - @TableField("DISPATCH_NO") - private String dispatchNo; - /** - * 工序编号 + * 操作编号 */ @TableField("OPERATION") private String operation; /** - * 步骤标识 + * 步骤标示 */ @TableField("STEP_ID") private String stepId; /** - * 资源编号 + * 设备编号 */ @TableField("RESRCE") private String resrce; @@ -75,7 +78,7 @@ public class CallItem extends Model<CallItem> { @TableField("COMPONENT_BO") private String componentBo; /** - * 叫料类型:MATERIAL/OPERATION + * 叫料类型 */ @TableField("CALL_TYPE") private String callType; @@ -89,6 +92,11 @@ public class CallItem extends Model<CallItem> { */ @TableField("REQUIRED_DATE_TIME") private LocalDateTime requiredDateTime; + /** + * 发料数量 + */ + @TableField("ISSUE_QTY") + private Double issueQty; /** * 状态 */ @@ -102,30 +110,46 @@ public class CallItem extends Model<CallItem> { /** * 发料状态 */ - @TableField("SEND_STATUS") - private String sendStatus; + @TableField("ISSUE_STATUS") + private String issueStatus; /** * 创建用户 */ - @TableField("CREATE_USER_BO") - private String createUserBo; + @TableField("CREATE_USER") + private String createUser; /** * 创建时间 */ @TableField("CREATED_DATE_TIME") private LocalDateTime createdDateTime; /** - * 更新用户 + * 修改用户 */ - @TableField("UPDATE_USER_BO") - private String updateUserBo; + @TableField("UPDATE_USER") + private String updateUser; /** - * 更新时间 + * 修改时间 */ @TableField("UPDATED_DATE_TIME") private LocalDateTime updatedDateTime; + @TableField(exist = false) + private String workOrder; + @TableField(exist = false) + private String resourceType; + @TableField(exist = false) + private String blankingSize; + @TableField(exist = false) + private BigDecimal dispatchQty; + @TableField(exist = false) + private String itemDescription; + @TableField(exist = false) + private String operationDescription; + @TableField(exist = false) + private String remark; + + public String getHandle() { return handle; } @@ -166,12 +190,12 @@ public class CallItem extends Model<CallItem> { this.sfc = sfc; } - public String getDispatchNo() { - return dispatchNo; + public String getSfcDispatchBo() { + return sfcDispatchBo; } - public void setDispatchNo(String dispatchNo) { - this.dispatchNo = dispatchNo; + public void setSfcDispatchBo(String sfcDispatchBo) { + this.sfcDispatchBo = sfcDispatchBo; } public String getOperation() { @@ -230,6 +254,14 @@ public class CallItem extends Model<CallItem> { this.requiredDateTime = requiredDateTime; } + public Double getIssueQty() { + return issueQty; + } + + public void setIssueQty(Double issueQty) { + this.issueQty = issueQty; + } + public String getStatus() { return status; } @@ -246,20 +278,20 @@ public class CallItem extends Model<CallItem> { this.callStatus = callStatus; } - public String getSendStatus() { - return sendStatus; + public String getIssueStatus() { + return issueStatus; } - public void setSendStatus(String sendStatus) { - this.sendStatus = sendStatus; + public void setIssueStatus(String issueStatus) { + this.issueStatus = issueStatus; } - public String getCreateUserBo() { - return createUserBo; + public String getCreateUser() { + return createUser; } - public void setCreateUserBo(String createUserBo) { - this.createUserBo = createUserBo; + public void setCreateUser(String createUser) { + this.createUser = createUser; } public LocalDateTime getCreatedDateTime() { @@ -270,12 +302,12 @@ public class CallItem extends Model<CallItem> { this.createdDateTime = createdDateTime; } - public String getUpdateUserBo() { - return updateUserBo; + public String getUpdateUser() { + return updateUser; } - public void setUpdateUserBo(String updateUserBo) { - this.updateUserBo = updateUserBo; + public void setUpdateUser(String updateUser) { + this.updateUser = updateUser; } public LocalDateTime getUpdatedDateTime() { @@ -286,18 +318,74 @@ public class CallItem extends Model<CallItem> { this.updatedDateTime = updatedDateTime; } + public String getWorkOrder() { + return workOrder; + } + + public void setWorkOrder(String workOrder) { + this.workOrder = workOrder; + } + + public String getResourceType() { + return resourceType; + } + + public void setResourceType(String resourceType) { + this.resourceType = resourceType; + } + + public String getBlankingSize() { + return blankingSize; + } + + public void setBlankingSize(String blankingSize) { + this.blankingSize = blankingSize; + } + + public BigDecimal getDispatchQty() { + return dispatchQty; + } + + public void setDispatchQty(BigDecimal dispatchQty) { + this.dispatchQty = dispatchQty; + } + + public String getItemDescription() { + return itemDescription; + } + + public void setItemDescription(String itemDescription) { + this.itemDescription = itemDescription; + } + + public String getOperationDescription() { + return operationDescription; + } + + public void setOperationDescription(String operationDescription) { + this.operationDescription = operationDescription; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + public static final String HANDLE = "HANDLE"; public static final String SITE = "SITE"; + public static final String SFC_DISPATCH_BO = "SFC_DISPATCH_BO"; + public static final String CALL_ITEM_NO = "CALL_ITEM_NO"; public static final String SHOP_ORDER = "SHOP_ORDER"; public static final String SFC = "SFC"; - public static final String DISPATCH_NO = "DISPATCH_NO"; - public static final String OPERATION = "OPERATION"; public static final String STEP_ID = "STEP_ID"; @@ -312,17 +400,19 @@ public class CallItem extends Model<CallItem> { public static final String REQUIRED_DATE_TIME = "REQUIRED_DATE_TIME"; + public static final String ISSUE_QTY = "ISSUE_QTY"; + public static final String STATUS = "STATUS"; public static final String CALL_STATUS = "CALL_STATUS"; - public static final String SEND_STATUS = "SEND_STATUS"; + public static final String ISSUE_STATUS = "ISSUE_STATUS"; - public static final String CREATE_USER_BO = "CREATE_USER_BO"; + public static final String CREATE_USER = "CREATE_USER"; public static final String CREATED_DATE_TIME = "CREATED_DATE_TIME"; - public static final String UPDATE_USER_BO = "UPDATE_USER_BO"; + public static final String UPDATE_USER = "UPDATE_USER"; public static final String UPDATED_DATE_TIME = "UPDATED_DATE_TIME"; @@ -337,10 +427,10 @@ public class CallItem extends Model<CallItem> { return "CallItem{" + "handle = " + handle + ", site = " + site + + ", sfcDispatchBo = " + sfcDispatchBo + ", callItemNo = " + callItemNo + ", shopOrder = " + shopOrder + ", sfc = " + sfc + - ", dispatchNo = " + dispatchNo + ", operation = " + operation + ", stepId = " + stepId + ", resrce = " + resrce + @@ -348,12 +438,13 @@ public class CallItem extends Model<CallItem> { ", callType = " + callType + ", requiredQty = " + requiredQty + ", requiredDateTime = " + requiredDateTime + + ", issueQty = " + issueQty + ", status = " + status + ", callStatus = " + callStatus + - ", sendStatus = " + sendStatus + - ", createUserBo = " + createUserBo + + ", issueStatus = " + issueStatus + + ", createUser = " + createUser + ", createdDateTime = " + createdDateTime + - ", updateUserBo = " + updateUserBo + + ", updateUser = " + updateUser + ", updatedDateTime = " + updatedDateTime + "}"; } diff --git a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/model/SfcDispatch.java b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/model/SfcDispatch.java index 2306c167..8b5c9cd1 100644 --- a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/model/SfcDispatch.java +++ b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/model/SfcDispatch.java @@ -16,10 +16,11 @@ import com.baomidou.mybatisplus.annotation.IdType; * </p> * * @author Leon.L - * @since 2021-06-21 + * @since 2021-06-30 */ @TableName("Z_SFC_DISPATCH") + public class SfcDispatch extends Model<SfcDispatch> { private static final long serialVersionUID = 1L; @@ -192,6 +193,8 @@ public class SfcDispatch extends Model<SfcDispatch> { /** * 前置工序 */ + @TableField("PREPOSITION_STEP_ID") + private String prepositionStepId; @TableField("PREPOSITION_OPERATION") private String prepositionOperation; /** @@ -586,93 +589,103 @@ public class SfcDispatch extends Model<SfcDispatch> { this.other5 = other5; } -public static final String HANDLE = "HANDLE"; + public String getPrepositionStepId() { + return prepositionStepId; + } + + public void setPrepositionStepId(String prepositionStepId) { + this.prepositionStepId = prepositionStepId; + } + + public static final String HANDLE = "HANDLE"; + + public static final String SITE = "SITE"; -public static final String SITE = "SITE"; + public static final String SHOP_ORDER = "SHOP_ORDER"; -public static final String SHOP_ORDER = "SHOP_ORDER"; + public static final String SFC = "SFC"; -public static final String SFC = "SFC"; + public static final String BLANKING_SIZE = "BLANKING_SIZE"; -public static final String BLANKING_SIZE = "BLANKING_SIZE"; + public static final String DISPATCH_SEQ = "DISPATCH_SEQ"; -public static final String DISPATCH_SEQ = "DISPATCH_SEQ"; + public static final String DISPATCH_NO = "DISPATCH_NO"; -public static final String DISPATCH_NO = "DISPATCH_NO"; + public static final String DISPATCH_STATUS = "DISPATCH_STATUS"; -public static final String DISPATCH_STATUS = "DISPATCH_STATUS"; + public static final String DRAWINGS_NO = "DRAWINGS_NO"; -public static final String DRAWINGS_NO = "DRAWINGS_NO"; + public static final String DRAWINGS_REVISION = "DRAWINGS_REVISION"; -public static final String DRAWINGS_REVISION = "DRAWINGS_REVISION"; + public static final String IS_LOCK = "IS_LOCK"; -public static final String IS_LOCK = "IS_LOCK"; + public static final String ROUTER_BO = "ROUTER_BO"; -public static final String ROUTER_BO = "ROUTER_BO"; + public static final String STEP_ID = "STEP_ID"; -public static final String STEP_ID = "STEP_ID"; + public static final String OPERATION = "OPERATION"; -public static final String OPERATION = "OPERATION"; + public static final String RESOURCE_TYPE = "RESOURCE_TYPE"; -public static final String RESOURCE_TYPE = "RESOURCE_TYPE"; + public static final String WORK_CENTER = "WORK_CENTER"; -public static final String WORK_CENTER = "WORK_CENTER"; + public static final String RESRCE = "RESRCE"; -public static final String RESRCE = "RESRCE"; + public static final String EMPLOYEE = "EMPLOYEE"; -public static final String EMPLOYEE = "EMPLOYEE"; + public static final String TURN_OPERATION = "TURN_OPERATION"; -public static final String TURN_OPERATION = "TURN_OPERATION"; + public static final String DISPATCH_QTY = "DISPATCH_QTY"; -public static final String DISPATCH_QTY = "DISPATCH_QTY"; + public static final String PROD_HOURS = "PROD_HOURS"; -public static final String PROD_HOURS = "PROD_HOURS"; + public static final String PLANNED_START_DATE = "PLANNED_START_DATE"; -public static final String PLANNED_START_DATE = "PLANNED_START_DATE"; + public static final String PLANNED_COMP_DATE = "PLANNED_COMP_DATE"; -public static final String PLANNED_COMP_DATE = "PLANNED_COMP_DATE"; + public static final String EARLIEST_START_DATE = "EARLIEST_START_DATE"; -public static final String EARLIEST_START_DATE = "EARLIEST_START_DATE"; + public static final String LATEST_END_DATE = "LATEST_END_DATE"; -public static final String LATEST_END_DATE = "LATEST_END_DATE"; + public static final String SO_RELEASED_DATE = "SO_RELEASED_DATE"; -public static final String SO_RELEASED_DATE = "SO_RELEASED_DATE"; + public static final String SFC_RELEASED_DATE = "SFC_RELEASED_DATE"; -public static final String SFC_RELEASED_DATE = "SFC_RELEASED_DATE"; + public static final String RELEASED_COMPLETE_DATE = "RELEASED_COMPLETE_DATE"; -public static final String RELEASED_COMPLETE_DATE = "RELEASED_COMPLETE_DATE"; + public static final String ACTUAL_START_DATE = "ACTUAL_START_DATE"; -public static final String ACTUAL_START_DATE = "ACTUAL_START_DATE"; + public static final String ACTUAL_COMPLETE_DATE = "ACTUAL_COMPLETE_DATE"; -public static final String ACTUAL_COMPLETE_DATE = "ACTUAL_COMPLETE_DATE"; + public static final String IS_DISPATCH = "IS_DISPATCH"; -public static final String IS_DISPATCH = "IS_DISPATCH"; + public static final String IS_IMPORT = "IS_IMPORT"; -public static final String IS_IMPORT = "IS_IMPORT"; + public static final String REMARK = "REMARK"; -public static final String REMARK = "REMARK"; + public static final String PREPOSITION_OPERATION = "PREPOSITION_OPERATION"; -public static final String PREPOSITION_OPERATION = "PREPOSITION_OPERATION"; + public static final String IS_FIRST_OPERATION = "IS_FIRST_OPERATION"; -public static final String IS_FIRST_OPERATION = "IS_FIRST_OPERATION"; + public static final String CREATE_USER = "CREATE_USER"; -public static final String CREATE_USER = "CREATE_USER"; + public static final String CREATED_DATE_TIME = "CREATED_DATE_TIME"; -public static final String CREATED_DATE_TIME = "CREATED_DATE_TIME"; + public static final String MODIFY_USER = "MODIFY_USER"; -public static final String MODIFY_USER = "MODIFY_USER"; + public static final String MODIFIED_DATE_TIME = "MODIFIED_DATE_TIME"; -public static final String MODIFIED_DATE_TIME = "MODIFIED_DATE_TIME"; + public static final String OTHER_1 = "OTHER_1"; -public static final String OTHER_1 = "OTHER_1"; + public static final String OTHER_2 = "OTHER_2"; -public static final String OTHER_2 = "OTHER_2"; + public static final String OTHER_3 = "OTHER_3"; -public static final String OTHER_3 = "OTHER_3"; + public static final String OTHER_4 = "OTHER_4"; -public static final String OTHER_4 = "OTHER_4"; + public static final String OTHER_5 = "OTHER_5"; -public static final String OTHER_5 = "OTHER_5"; + public static final String PREPOSITION_STEP_ID = "PREPOSITION_STEP_ID"; @Override @@ -716,6 +729,7 @@ public static final String OTHER_5 = "OTHER_5"; ", isDispatch = " + isDispatch + ", isImport = " + isImport + ", remark = " + remark + + ", prepositionStepId = " + prepositionStepId + ", prepositionOperation = " + prepositionOperation + ", isFirstOperation = " + isFirstOperation + ", createUser = " + createUser + diff --git a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/model/ShopOrderRelease.java b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/model/ShopOrderRelease.java index 6cc271ad..a03785ee 100644 --- a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/model/ShopOrderRelease.java +++ b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/model/ShopOrderRelease.java @@ -35,6 +35,7 @@ public class ShopOrderRelease extends SfcDispatch { /** * 物料编号&描述 */ + private String itemBo; private String item; private String itemDescription; private String qtyToBuild; @@ -101,6 +102,14 @@ public class ShopOrderRelease extends SfcDispatch { this.statusName = statusName; } + public String getItemBo() { + return itemBo; + } + + public void setItemBo(String itemBo) { + this.itemBo = itemBo; + } + public String getItem() { return item; } diff --git a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/CallItemService.java b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/CallItemService.java index f9a58bcb..5c89329e 100644 --- a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/CallItemService.java +++ b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/CallItemService.java @@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.foreverwin.mesnac.common.dto.SfcDispatchDto; import com.foreverwin.mesnac.dispatch.model.CallItem; import com.baomidou.mybatisplus.extension.service.IService; -import com.foreverwin.mesnac.dispatch.model.ShopOrderRelease; import com.foreverwin.modular.core.util.FrontPage; import java.util.List; @@ -15,7 +14,7 @@ import java.util.List; * </p> * * @author Leon.L - * @since 2021-06-24 + * @since 2021-06-30 */ public interface CallItemService extends IService<CallItem> { @@ -28,5 +27,12 @@ public interface CallItemService extends IService<CallItem> { List<CallItem> selectList(CallItem callItem); + /** + * 保存叫料数据 + * + * @param site + * @param user + * @param sfcDispatchList + */ void saveCallItem(String site, String user, List<SfcDispatchDto> sfcDispatchList); } \ No newline at end of file diff --git a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/SfcDispatchService.java b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/SfcDispatchService.java index be1bb738..aecfc5ea 100644 --- a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/SfcDispatchService.java +++ b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/SfcDispatchService.java @@ -53,6 +53,7 @@ public interface SfcDispatchService extends IService<SfcDispatch> { * 1.可用状态包括(新建、暂挂) * 2.需校验资源、计划开始时间、计划结束时间不为空 * 3.需校验派工资源的类型和需求资源类型一致 + * * @param site * @param user * @param message |派工保存返回提示 diff --git a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/CallItemServiceImpl.java b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/CallItemServiceImpl.java index 5bfaa977..7dcbd9e1 100644 --- a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/CallItemServiceImpl.java +++ b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/CallItemServiceImpl.java @@ -1,7 +1,10 @@ package com.foreverwin.mesnac.dispatch.service.impl; +import com.foreverwin.mesnac.common.constant.Constants; import com.foreverwin.mesnac.common.dto.SfcDispatchDto; -import com.foreverwin.mesnac.dispatch.model.ShopOrderRelease; +import com.foreverwin.mesnac.common.enums.HandleEnum; +import com.foreverwin.mesnac.common.util.StringUtil; +import com.foreverwin.modular.core.exception.BusinessException; import com.foreverwin.modular.core.util.FrontPage; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; @@ -13,6 +16,8 @@ import org.springframework.stereotype.Service; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.annotation.Transactional; +import java.time.LocalDateTime; +import java.util.ArrayList; import java.util.List; /** * <p> @@ -20,7 +25,7 @@ import java.util.List; * </p> * * @author Leon.L - * @since 2021-06-24 + * @since 2021-06-30 */ @Service @Transactional(rollbackFor = Exception.class) @@ -49,9 +54,73 @@ public class CallItemServiceImpl extends ServiceImpl<CallItemMapper, CallItem> i if (sfcDispatchList == null || sfcDispatchList.size() <= 0) { return; } + LocalDateTime nowDate = LocalDateTime.now(); + //查询叫料组件 + List<CallItem> callItemList = callItemMapper.selectDispatchCallItem(sfcDispatchList); + if (callItemList == null || callItemList.size() <= 0) { + throw BusinessException.build("发布的派工单没有物料清单组件"); + } + List<CallItem> list = new ArrayList<>(); - } + //删除原来的数据 + callItemMapper.deleteDispatchCallItem(sfcDispatchList); + + //工序叫料数据 + for (SfcDispatchDto sfcDispatchDto : sfcDispatchList) { + String prepositionStepId = sfcDispatchDto.getPrepositionStepId(); + if (StringUtil.isBlank(prepositionStepId)) { + continue; + } + + String callItemNo = sfcDispatchDto.getSfc() + sfcDispatchDto.getStepId() + prepositionStepId; + CallItem callItem = new CallItem(); + callItem.setCallItemNo(callItemNo); + callItem.setHandle(HandleEnum.CALL_ITEM.getHandle(site, callItemNo)); + callItem.setSite(site); + callItem.setShopOrder(sfcDispatchDto.getShopOrder()); + callItem.setSfc(sfcDispatchDto.getSfc()); + callItem.setSfcDispatchBo(sfcDispatchDto.getHandle()); + callItem.setOperation(sfcDispatchDto.getOperation()); + callItem.setStepId(sfcDispatchDto.getStepId()); + callItem.setResrce(sfcDispatchDto.getResrce()); + callItem.setCallType(Constants.CALL_TYPE_OPERATION); + callItem.setComponentBo(sfcDispatchDto.getItemBo()); + callItem.setRequiredQty(sfcDispatchDto.getDispatchQty()); + callItem.setRequiredDateTime(sfcDispatchDto.getPlannedStartDate()); + callItem.setStatus(Constants.STATUS_NEW); + callItem.setCallStatus(Constants.STATUS_NEW); + callItem.setIssueStatus(Constants.STATUS_NEW); + callItem.setCreateUser(user); + callItem.setCreatedDateTime(nowDate); + callItem.setUpdateUser(user); + callItem.setUpdatedDateTime(nowDate); + list.add(callItem); + } + //组件叫料数据 + for (int i = 0; i< callItemList.size(); i++) { + CallItem callItem = callItemList.get(i); + String component = StringUtil.trimHandle(callItem.getComponentBo()); + String callItemNo = callItem.getSfc() + callItem.getStepId() + callItem.getOperation() + component; + callItem.setCallItemNo(callItemNo); + callItem.setHandle(HandleEnum.CALL_ITEM.getHandle(site, callItemNo)); + callItem.setCallType(Constants.CALL_TYPE_MATERIAL); + callItem.setStatus(Constants.STATUS_NEW); + callItem.setCallStatus(Constants.STATUS_NEW); + callItem.setIssueStatus(Constants.STATUS_NEW); + callItem.setCreateUser(user); + callItem.setCreatedDateTime(nowDate); + callItem.setUpdateUser(user); + callItem.setUpdatedDateTime(nowDate); + list.add(callItem); + } + + + //数据保存 + if (list != null && list.size() > 0) { + this.saveBatch(list); + } + } } \ No newline at end of file diff --git a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/SfcDispatchServiceImpl.java b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/SfcDispatchServiceImpl.java index 9561b9ce..1fa57092 100644 --- a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/SfcDispatchServiceImpl.java +++ b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/SfcDispatchServiceImpl.java @@ -73,8 +73,10 @@ public class SfcDispatchServiceImpl extends ServiceImpl<SfcDispatchMapper, SfcDi public Boolean releaseDispatch(String site, String user, StringBuffer message, List<SfcDispatchDto> sfcDispatchList) { Boolean flag = this.sfcDispatch(site, user, DispatchStatusEnum.RELEASE.getCode(), message, sfcDispatchList); - //保存叫料数据 - callItemService.saveCallItem(site, user, sfcDispatchList); + if (flag) { + //保存叫料数据 + callItemService.saveCallItem(site, user, sfcDispatchList); + } return flag; } @@ -387,6 +389,11 @@ public class SfcDispatchServiceImpl extends ServiceImpl<SfcDispatchMapper, SfcDi sfcDispatch.setBlankingSize(sfcDispatchDto.getBlankingSize()); sfcDispatch.setPlannedStartDate(sfcDispatchDto.getPlannedStartDate()); sfcDispatch.setPlannedCompDate(sfcDispatchDto.getPlannedCompDate()); + + //是否分配资源 + if (StringUtil.notBlank(resource)) { + sfcDispatch.setIsDispatch("true"); + } list.add(sfcDispatch); } diff --git a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/ShopOrderReleaseServiceImpl.java b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/ShopOrderReleaseServiceImpl.java index 24010c26..28df3ab7 100644 --- a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/ShopOrderReleaseServiceImpl.java +++ b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/ShopOrderReleaseServiceImpl.java @@ -195,6 +195,10 @@ public class ShopOrderReleaseServiceImpl implements ShopOrderReleaseService { //LocalDateTime plannedStartDate = shopOrderModel.getPlannedStartDate(); //LocalDateTime plannedCompleteDate = shopOrderModel.getPlannedStartDate(); + //前置步骤&工序 + String prepositionStepId = null; + String prepositionOperation = null; + //派工表集合 List<SfcDispatch> sfcDispatchList = new ArrayList<>(); //-------------------------------------------------------------------------------------------------------------- @@ -247,6 +251,8 @@ public class ShopOrderReleaseServiceImpl implements ShopOrderReleaseService { sfcDispatchModel.setIsDispatch(Constants.BOOL_FALSE); sfcDispatchModel.setIsImport(Constants.BOOL_FALSE); sfcDispatchModel.setIsFirstOperation(isFirstOperation); + sfcDispatchModel.setPrepositionStepId(prepositionStepId); + sfcDispatchModel.setPrepositionOperation(prepositionOperation); sfcDispatchModel.setCreateUser(user); sfcDispatchModel.setCreatedDateTime(nowDate); sfcDispatchModel.setModifyUser(user); @@ -259,6 +265,10 @@ public class ShopOrderReleaseServiceImpl implements ShopOrderReleaseService { //赋值下一步骤 routerStepBo = routerDTO.getNextStepBo(); + + //前置工序&步骤赋值 + prepositionStepId = stepId; + prepositionOperation = operation; } //批量插入工位&人员派工数据 diff --git a/dispatch/src/main/resources/mapper/CallItemMapper.xml b/dispatch/src/main/resources/mapper/CallItemMapper.xml index 27652c5e..23b5622c 100644 --- a/dispatch/src/main/resources/mapper/CallItemMapper.xml +++ b/dispatch/src/main/resources/mapper/CallItemMapper.xml @@ -6,10 +6,10 @@ <resultMap id="BaseResultMap" type="com.foreverwin.mesnac.dispatch.model.CallItem"> <id column="HANDLE" property="handle" /> <result column="SITE" property="site" /> + <result column="SFC_DISPATCH_BO" property="sfcDispatchBo" /> <result column="CALL_ITEM_NO" property="callItemNo" /> <result column="SHOP_ORDER" property="shopOrder" /> <result column="SFC" property="sfc" /> - <result column="DISPATCH_NO" property="dispatchNo" /> <result column="OPERATION" property="operation" /> <result column="STEP_ID" property="stepId" /> <result column="RESRCE" property="resrce" /> @@ -19,16 +19,25 @@ <result column="REQUIRED_DATE_TIME" property="requiredDateTime" /> <result column="STATUS" property="status" /> <result column="CALL_STATUS" property="callStatus" /> - <result column="SEND_STATUS" property="sendStatus" /> - <result column="CREATE_USER_BO" property="createUserBo" /> + <result column="ISSUE_STATUS" property="issueStatus" /> + <result column="CREATE_USER" property="createUser" /> <result column="CREATED_DATE_TIME" property="createdDateTime" /> - <result column="UPDATE_USER_BO" property="updateUserBo" /> + <result column="UPDATE_USER" property="updateUser" /> <result column="UPDATED_DATE_TIME" property="updatedDateTime" /> + + + <result column="WORK_ORDER" property="workOrder" /> + <result column="RESOURCE_TYPE" property="resourceType" /> + <result column="DISPATCH_QTY" property="dispatchQty" /> + <result column="BLANKING_SIZE" property="blankingSize" /> + <result column="ITEM_DESCRIPTION" property="itemDescription" /> + <result column="OPERATION_DESCRIPTION" property="operationDescription" /> + <result column="REMARK" property="remark" /> </resultMap> <!-- 通用查询结果列 --> <sql id="Base_Column_List"> - HANDLE, SITE, CALL_ITEM_NO, SHOP_ORDER, SFC, DISPATCH_NO, OPERATION, STEP_ID, RESRCE, COMPONENT_BO, CALL_TYPE, REQUIRED_QTY, REQUIRED_DATE_TIME, STATUS, CALL_STATUS, SEND_STATUS, CREATE_USER_BO, CREATED_DATE_TIME, UPDATE_USER_BO, UPDATED_DATE_TIME + HANDLE, SITE, SFC_DISPATCH_BO, CALL_ITEM_NO, SHOP_ORDER, SFC, OPERATION, STEP_ID, RESRCE, COMPONENT_BO, CALL_TYPE, REQUIRED_QTY, REQUIRED_DATE_TIME, STATUS, CALL_STATUS, ISSUE_STATUS, CREATE_USER, CREATED_DATE_TIME, UPDATE_USER, UPDATED_DATE_TIME </sql> <!-- BaseMapper标准查询/修改/删除 --> @@ -61,13 +70,13 @@ SELECT <include refid="Base_Column_List"></include> FROM Z_CALL_ITEM <where> <if test="ew.entity.handle!=null"> - HANDLE=#{ew.handle} + HANDLE=#{ew.handle} </if> <if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if> + <if test="ew.entity.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if> <if test="ew.entity.callItemNo!=null"> AND CALL_ITEM_NO=#{ew.entity.callItemNo}</if> <if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if> <if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if> - <if test="ew.entity.dispatchNo!=null"> AND DISPATCH_NO=#{ew.entity.dispatchNo}</if> <if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if> <if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if> <if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if> @@ -75,12 +84,13 @@ <if test="ew.entity.callType!=null"> AND CALL_TYPE=#{ew.entity.callType}</if> <if test="ew.entity.requiredQty!=null"> AND REQUIRED_QTY=#{ew.entity.requiredQty}</if> <if test="ew.entity.requiredDateTime!=null"> AND REQUIRED_DATE_TIME=#{ew.entity.requiredDateTime}</if> + <if test="ew.entity.issueQty!=null"> AND ISSUE_QTY=#{ew.entity.issueQty}</if> <if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if> <if test="ew.entity.callStatus!=null"> AND CALL_STATUS=#{ew.entity.callStatus}</if> - <if test="ew.entity.sendStatus!=null"> AND SEND_STATUS=#{ew.entity.sendStatus}</if> - <if test="ew.entity.createUserBo!=null"> AND CREATE_USER_BO=#{ew.entity.createUserBo}</if> + <if test="ew.entity.issueStatus!=null"> AND ISSUE_STATUS=#{ew.entity.issueStatus}</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.updateUserBo!=null"> AND UPDATE_USER_BO=#{ew.entity.updateUserBo}</if> + <if test="ew.entity.updateUser!=null"> AND UPDATE_USER=#{ew.entity.updateUser}</if> <if test="ew.entity.updatedDateTime!=null"> AND UPDATED_DATE_TIME=#{ew.entity.updatedDateTime}</if> </where> </select> @@ -90,28 +100,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.site!=null"> AND SITE=#{ew.entity.site}</if> - <if test="ew.entity.callItemNo!=null"> AND CALL_ITEM_NO=#{ew.entity.callItemNo}</if> - <if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if> - <if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if> - <if test="ew.entity.dispatchNo!=null"> AND DISPATCH_NO=#{ew.entity.dispatchNo}</if> - <if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if> - <if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if> - <if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if> - <if test="ew.entity.componentBo!=null"> AND COMPONENT_BO=#{ew.entity.componentBo}</if> - <if test="ew.entity.callType!=null"> AND CALL_TYPE=#{ew.entity.callType}</if> - <if test="ew.entity.requiredQty!=null"> AND REQUIRED_QTY=#{ew.entity.requiredQty}</if> - <if test="ew.entity.requiredDateTime!=null"> AND REQUIRED_DATE_TIME=#{ew.entity.requiredDateTime}</if> - <if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if> - <if test="ew.entity.callStatus!=null"> AND CALL_STATUS=#{ew.entity.callStatus}</if> - <if test="ew.entity.sendStatus!=null"> AND SEND_STATUS=#{ew.entity.sendStatus}</if> - <if test="ew.entity.createUserBo!=null"> AND CREATE_USER_BO=#{ew.entity.createUserBo}</if> - <if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if> - <if test="ew.entity.updateUserBo!=null"> AND UPDATE_USER_BO=#{ew.entity.updateUserBo}</if> - <if test="ew.entity.updatedDateTime!=null"> AND UPDATED_DATE_TIME=#{ew.entity.updatedDateTime}</if> + <if 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.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if> + <if test="ew.entity.callItemNo!=null"> AND CALL_ITEM_NO=#{ew.entity.callItemNo}</if> + <if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if> + <if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if> + <if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if> + <if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if> + <if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if> + <if test="ew.entity.componentBo!=null"> AND COMPONENT_BO=#{ew.entity.componentBo}</if> + <if test="ew.entity.callType!=null"> AND CALL_TYPE=#{ew.entity.callType}</if> + <if test="ew.entity.requiredQty!=null"> AND REQUIRED_QTY=#{ew.entity.requiredQty}</if> + <if test="ew.entity.requiredDateTime!=null"> AND REQUIRED_DATE_TIME=#{ew.entity.requiredDateTime}</if> + <if test="ew.entity.issueQty!=null"> AND ISSUE_QTY=#{ew.entity.issueQty}</if> + <if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if> + <if test="ew.entity.callStatus!=null"> AND CALL_STATUS=#{ew.entity.callStatus}</if> + <if test="ew.entity.issueStatus!=null"> AND ISSUE_STATUS=#{ew.entity.issueStatus}</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.updateUser!=null"> AND UPDATE_USER=#{ew.entity.updateUser}</if> + <if test="ew.entity.updatedDateTime!=null"> AND UPDATED_DATE_TIME=#{ew.entity.updatedDateTime}</if> </if> <if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere"> ${ew.sqlSegment} @@ -132,10 +143,10 @@ HANDLE=#{ew.entity.handle} </if> <if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if> + <if test="ew.entity.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if> <if test="ew.entity.callItemNo!=null"> AND CALL_ITEM_NO=#{ew.entity.callItemNo}</if> <if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if> <if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if> - <if test="ew.entity.dispatchNo!=null"> AND DISPATCH_NO=#{ew.entity.dispatchNo}</if> <if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if> <if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if> <if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if> @@ -143,12 +154,13 @@ <if test="ew.entity.callType!=null"> AND CALL_TYPE=#{ew.entity.callType}</if> <if test="ew.entity.requiredQty!=null"> AND REQUIRED_QTY=#{ew.entity.requiredQty}</if> <if test="ew.entity.requiredDateTime!=null"> AND REQUIRED_DATE_TIME=#{ew.entity.requiredDateTime}</if> + <if test="ew.entity.issueQty!=null"> AND ISSUE_QTY=#{ew.entity.issueQty}</if> <if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if> <if test="ew.entity.callStatus!=null"> AND CALL_STATUS=#{ew.entity.callStatus}</if> - <if test="ew.entity.sendStatus!=null"> AND SEND_STATUS=#{ew.entity.sendStatus}</if> - <if test="ew.entity.createUserBo!=null"> AND CREATE_USER_BO=#{ew.entity.createUserBo}</if> + <if test="ew.entity.issueStatus!=null"> AND ISSUE_STATUS=#{ew.entity.issueStatus}</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.updateUserBo!=null"> AND UPDATE_USER_BO=#{ew.entity.updateUserBo}</if> + <if test="ew.entity.updateUser!=null"> AND UPDATE_USER=#{ew.entity.updateUser}</if> <if test="ew.entity.updatedDateTime!=null"> AND UPDATED_DATE_TIME=#{ew.entity.updatedDateTime}</if> </if> <if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere"> @@ -170,10 +182,10 @@ HANDLE=#{ew.entity.handle} </if> <if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if> + <if test="ew.entity.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if> <if test="ew.entity.callItemNo!=null"> AND CALL_ITEM_NO=#{ew.entity.callItemNo}</if> <if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if> <if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if> - <if test="ew.entity.dispatchNo!=null"> AND DISPATCH_NO=#{ew.entity.dispatchNo}</if> <if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if> <if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if> <if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if> @@ -181,12 +193,13 @@ <if test="ew.entity.callType!=null"> AND CALL_TYPE=#{ew.entity.callType}</if> <if test="ew.entity.requiredQty!=null"> AND REQUIRED_QTY=#{ew.entity.requiredQty}</if> <if test="ew.entity.requiredDateTime!=null"> AND REQUIRED_DATE_TIME=#{ew.entity.requiredDateTime}</if> + <if test="ew.entity.issueQty!=null"> AND ISSUE_QTY=#{ew.entity.issueQty}</if> <if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if> <if test="ew.entity.callStatus!=null"> AND CALL_STATUS=#{ew.entity.callStatus}</if> - <if test="ew.entity.sendStatus!=null"> AND SEND_STATUS=#{ew.entity.sendStatus}</if> - <if test="ew.entity.createUserBo!=null"> AND CREATE_USER_BO=#{ew.entity.createUserBo}</if> + <if test="ew.entity.issueStatus!=null"> AND ISSUE_STATUS=#{ew.entity.issueStatus}</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.updateUserBo!=null"> AND UPDATE_USER_BO=#{ew.entity.updateUserBo}</if> + <if test="ew.entity.updateUser!=null"> AND UPDATE_USER=#{ew.entity.updateUser}</if> <if test="ew.entity.updatedDateTime!=null"> AND UPDATED_DATE_TIME=#{ew.entity.updatedDateTime}</if> </if> <if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere"> @@ -208,10 +221,10 @@ HANDLE=#{ew.entity.handle} </if> <if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if> + <if test="ew.entity.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if> <if test="ew.entity.callItemNo!=null"> AND CALL_ITEM_NO=#{ew.entity.callItemNo}</if> <if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if> <if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if> - <if test="ew.entity.dispatchNo!=null"> AND DISPATCH_NO=#{ew.entity.dispatchNo}</if> <if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if> <if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if> <if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if> @@ -219,12 +232,13 @@ <if test="ew.entity.callType!=null"> AND CALL_TYPE=#{ew.entity.callType}</if> <if test="ew.entity.requiredQty!=null"> AND REQUIRED_QTY=#{ew.entity.requiredQty}</if> <if test="ew.entity.requiredDateTime!=null"> AND REQUIRED_DATE_TIME=#{ew.entity.requiredDateTime}</if> + <if test="ew.entity.issueQty!=null"> AND ISSUE_QTY=#{ew.entity.issueQty}</if> <if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if> <if test="ew.entity.callStatus!=null"> AND CALL_STATUS=#{ew.entity.callStatus}</if> - <if test="ew.entity.sendStatus!=null"> AND SEND_STATUS=#{ew.entity.sendStatus}</if> - <if test="ew.entity.createUserBo!=null"> AND CREATE_USER_BO=#{ew.entity.createUserBo}</if> + <if test="ew.entity.issueStatus!=null"> AND ISSUE_STATUS=#{ew.entity.issueStatus}</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.updateUserBo!=null"> AND UPDATE_USER_BO=#{ew.entity.updateUserBo}</if> + <if test="ew.entity.updateUser!=null"> AND UPDATE_USER=#{ew.entity.updateUser}</if> <if test="ew.entity.updatedDateTime!=null"> AND UPDATED_DATE_TIME=#{ew.entity.updatedDateTime}</if> </if> <if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere"> @@ -246,10 +260,10 @@ HANDLE=#{ew.entity.handle} </if> <if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if> + <if test="ew.entity.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if> <if test="ew.entity.callItemNo!=null"> AND CALL_ITEM_NO=#{ew.entity.callItemNo}</if> <if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if> <if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if> - <if test="ew.entity.dispatchNo!=null"> AND DISPATCH_NO=#{ew.entity.dispatchNo}</if> <if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if> <if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if> <if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if> @@ -257,12 +271,13 @@ <if test="ew.entity.callType!=null"> AND CALL_TYPE=#{ew.entity.callType}</if> <if test="ew.entity.requiredQty!=null"> AND REQUIRED_QTY=#{ew.entity.requiredQty}</if> <if test="ew.entity.requiredDateTime!=null"> AND REQUIRED_DATE_TIME=#{ew.entity.requiredDateTime}</if> + <if test="ew.entity.issueQty!=null"> AND ISSUE_QTY=#{ew.entity.issueQty}</if> <if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if> <if test="ew.entity.callStatus!=null"> AND CALL_STATUS=#{ew.entity.callStatus}</if> - <if test="ew.entity.sendStatus!=null"> AND SEND_STATUS=#{ew.entity.sendStatus}</if> - <if test="ew.entity.createUserBo!=null"> AND CREATE_USER_BO=#{ew.entity.createUserBo}</if> + <if test="ew.entity.issueStatus!=null"> AND ISSUE_STATUS=#{ew.entity.issueStatus}</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.updateUserBo!=null"> AND UPDATE_USER_BO=#{ew.entity.updateUserBo}</if> + <if test="ew.entity.updateUser!=null"> AND UPDATE_USER=#{ew.entity.updateUser}</if> <if test="ew.entity.updatedDateTime!=null"> AND UPDATED_DATE_TIME=#{ew.entity.updatedDateTime}</if> </if> <if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere"> @@ -284,10 +299,10 @@ HANDLE=#{ew.entity.handle} </if> <if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if> + <if test="ew.entity.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if> <if test="ew.entity.callItemNo!=null"> AND CALL_ITEM_NO=#{ew.entity.callItemNo}</if> <if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if> <if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if> - <if test="ew.entity.dispatchNo!=null"> AND DISPATCH_NO=#{ew.entity.dispatchNo}</if> <if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if> <if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if> <if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if> @@ -295,12 +310,13 @@ <if test="ew.entity.callType!=null"> AND CALL_TYPE=#{ew.entity.callType}</if> <if test="ew.entity.requiredQty!=null"> AND REQUIRED_QTY=#{ew.entity.requiredQty}</if> <if test="ew.entity.requiredDateTime!=null"> AND REQUIRED_DATE_TIME=#{ew.entity.requiredDateTime}</if> + <if test="ew.entity.issueQty!=null"> AND ISSUE_QTY=#{ew.entity.issueQty}</if> <if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if> <if test="ew.entity.callStatus!=null"> AND CALL_STATUS=#{ew.entity.callStatus}</if> - <if test="ew.entity.sendStatus!=null"> AND SEND_STATUS=#{ew.entity.sendStatus}</if> - <if test="ew.entity.createUserBo!=null"> AND CREATE_USER_BO=#{ew.entity.createUserBo}</if> + <if test="ew.entity.issueStatus!=null"> AND ISSUE_STATUS=#{ew.entity.issueStatus}</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.updateUserBo!=null"> AND UPDATE_USER_BO=#{ew.entity.updateUserBo}</if> + <if test="ew.entity.updateUser!=null"> AND UPDATE_USER=#{ew.entity.updateUser}</if> <if test="ew.entity.updatedDateTime!=null"> AND UPDATED_DATE_TIME=#{ew.entity.updatedDateTime}</if> </if> <if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere"> @@ -318,10 +334,10 @@ <trim prefix="(" suffix=")" suffixOverrides=","> HANDLE, <if test="site!=null">SITE,</if> + <if test="sfcDispatchBo!=null">SFC_DISPATCH_BO,</if> <if test="callItemNo!=null">CALL_ITEM_NO,</if> <if test="shopOrder!=null">SHOP_ORDER,</if> <if test="sfc!=null">SFC,</if> - <if test="dispatchNo!=null">DISPATCH_NO,</if> <if test="operation!=null">OPERATION,</if> <if test="stepId!=null">STEP_ID,</if> <if test="resrce!=null">RESRCE,</if> @@ -329,21 +345,22 @@ <if test="callType!=null">CALL_TYPE,</if> <if test="requiredQty!=null">REQUIRED_QTY,</if> <if test="requiredDateTime!=null">REQUIRED_DATE_TIME,</if> + <if test="issueQty!=null">ISSUE_QTY,</if> <if test="status!=null">STATUS,</if> <if test="callStatus!=null">CALL_STATUS,</if> - <if test="sendStatus!=null">SEND_STATUS,</if> - <if test="createUserBo!=null">CREATE_USER_BO,</if> + <if test="issueStatus!=null">ISSUE_STATUS,</if> + <if test="createUser!=null">CREATE_USER,</if> <if test="createdDateTime!=null">CREATED_DATE_TIME,</if> - <if test="updateUserBo!=null">UPDATE_USER_BO,</if> + <if test="updateUser!=null">UPDATE_USER,</if> <if test="updatedDateTime!=null">UPDATED_DATE_TIME,</if> </trim> VALUES <trim prefix="(" suffix=")" suffixOverrides=","> #{handle}, <if test="site!=null">#{site},</if> + <if test="sfcDispatchBo!=null">#{sfcDispatchBo},</if> <if test="callItemNo!=null">#{callItemNo},</if> <if test="shopOrder!=null">#{shopOrder},</if> <if test="sfc!=null">#{sfc},</if> - <if test="dispatchNo!=null">#{dispatchNo},</if> <if test="operation!=null">#{operation},</if> <if test="stepId!=null">#{stepId},</if> <if test="resrce!=null">#{resrce},</if> @@ -351,12 +368,13 @@ <if test="callType!=null">#{callType},</if> <if test="requiredQty!=null">#{requiredQty},</if> <if test="requiredDateTime!=null">#{requiredDateTime},</if> + <if test="issueQty!=null">#{issueQty},</if> <if test="status!=null">#{status},</if> <if test="callStatus!=null">#{callStatus},</if> - <if test="sendStatus!=null">#{sendStatus},</if> - <if test="createUserBo!=null">#{createUserBo},</if> + <if test="issueStatus!=null">#{issueStatus},</if> + <if test="createUser!=null">#{createUser},</if> <if test="createdDateTime!=null">#{createdDateTime},</if> - <if test="updateUserBo!=null">#{updateUserBo},</if> + <if test="updateUser!=null">#{updateUser},</if> <if test="updatedDateTime!=null">#{updatedDateTime},</if> </trim> </insert> @@ -369,10 +387,10 @@ <trim prefix="(" suffix=")" suffixOverrides=","> #{handle}, #{site}, + #{sfcDispatchBo}, #{callItemNo}, #{shopOrder}, #{sfc}, - #{dispatchNo}, #{operation}, #{stepId}, #{resrce}, @@ -380,12 +398,13 @@ #{callType}, #{requiredQty}, #{requiredDateTime}, + #{issueQty}, #{status}, #{callStatus}, - #{sendStatus}, - #{createUserBo}, + #{issueStatus}, + #{createUser}, #{createdDateTime}, - #{updateUserBo}, + #{updateUser}, #{updatedDateTime}, </trim> </insert> @@ -394,10 +413,10 @@ <update id="updateById"> UPDATE Z_CALL_ITEM <trim prefix="SET" suffixOverrides=","> <if test="et.site!=null">SITE=#{et.site},</if> + <if test="et.sfcDispatchBo!=null">SFC_DISPATCH_BO=#{et.sfcDispatchBo},</if> <if test="et.callItemNo!=null">CALL_ITEM_NO=#{et.callItemNo},</if> <if test="et.shopOrder!=null">SHOP_ORDER=#{et.shopOrder},</if> <if test="et.sfc!=null">SFC=#{et.sfc},</if> - <if test="et.dispatchNo!=null">DISPATCH_NO=#{et.dispatchNo},</if> <if test="et.operation!=null">OPERATION=#{et.operation},</if> <if test="et.stepId!=null">STEP_ID=#{et.stepId},</if> <if test="et.resrce!=null">RESRCE=#{et.resrce},</if> @@ -405,24 +424,25 @@ <if test="et.callType!=null">CALL_TYPE=#{et.callType},</if> <if test="et.requiredQty!=null">REQUIRED_QTY=#{et.requiredQty},</if> <if test="et.requiredDateTime!=null">REQUIRED_DATE_TIME=#{et.requiredDateTime},</if> + <if test="et.issueQty!=null">ISSUE_QTY=#{et.issueQty},</if> <if test="et.status!=null">STATUS=#{et.status},</if> <if test="et.callStatus!=null">CALL_STATUS=#{et.callStatus},</if> - <if test="et.sendStatus!=null">SEND_STATUS=#{et.sendStatus},</if> - <if test="et.createUserBo!=null">CREATE_USER_BO=#{et.createUserBo},</if> + <if test="et.issueStatus!=null">ISSUE_STATUS=#{et.issueStatus},</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.updateUserBo!=null">UPDATE_USER_BO=#{et.updateUserBo},</if> + <if test="et.updateUser!=null">UPDATE_USER=#{et.updateUser},</if> <if test="et.updatedDateTime!=null">UPDATED_DATE_TIME=#{et.updatedDateTime},</if> - </trim> WHERE HANDLE=#{et.handle} <if test="et instanceof java.util.Map"><if test="et.MP_OPTLOCK_VERSION_ORIGINAL!=null">and ${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}</if></if> + </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_CALL_ITEM <trim prefix="SET" suffixOverrides=","> SITE=#{et.site}, + SFC_DISPATCH_BO=#{et.sfcDispatchBo}, CALL_ITEM_NO=#{et.callItemNo}, SHOP_ORDER=#{et.shopOrder}, SFC=#{et.sfc}, - DISPATCH_NO=#{et.dispatchNo}, OPERATION=#{et.operation}, STEP_ID=#{et.stepId}, RESRCE=#{et.resrce}, @@ -430,24 +450,25 @@ CALL_TYPE=#{et.callType}, REQUIRED_QTY=#{et.requiredQty}, REQUIRED_DATE_TIME=#{et.requiredDateTime}, + ISSUE_QTY=#{et.issueQty}, STATUS=#{et.status}, CALL_STATUS=#{et.callStatus}, - SEND_STATUS=#{et.sendStatus}, - CREATE_USER_BO=#{et.createUserBo}, + ISSUE_STATUS=#{et.issueStatus}, + CREATE_USER=#{et.createUser}, CREATED_DATE_TIME=#{et.createdDateTime}, - UPDATE_USER_BO=#{et.updateUserBo}, + UPDATE_USER=#{et.updateUser}, UPDATED_DATE_TIME=#{et.updatedDateTime}, - </trim> WHERE HANDLE=#{et.handle} <if test="et instanceof java.util.Map"><if test="et.MP_OPTLOCK_VERSION_ORIGINAL!=null">and ${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}</if></if> + </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_CALL_ITEM <trim prefix="SET" suffixOverrides=","> <if test="et.site!=null">SITE=#{et.site},</if> + <if test="et.sfcDispatchBo!=null">SFC_DISPATCH_BO=#{et.sfcDispatchBo},</if> <if test="et.callItemNo!=null">CALL_ITEM_NO=#{et.callItemNo},</if> <if test="et.shopOrder!=null">SHOP_ORDER=#{et.shopOrder},</if> <if test="et.sfc!=null">SFC=#{et.sfc},</if> - <if test="et.dispatchNo!=null">DISPATCH_NO=#{et.dispatchNo},</if> <if test="et.operation!=null">OPERATION=#{et.operation},</if> <if test="et.stepId!=null">STEP_ID=#{et.stepId},</if> <if test="et.resrce!=null">RESRCE=#{et.resrce},</if> @@ -455,12 +476,13 @@ <if test="et.callType!=null">CALL_TYPE=#{et.callType},</if> <if test="et.requiredQty!=null">REQUIRED_QTY=#{et.requiredQty},</if> <if test="et.requiredDateTime!=null">REQUIRED_DATE_TIME=#{et.requiredDateTime},</if> + <if test="et.issueQty!=null">ISSUE_QTY=#{et.issueQty},</if> <if test="et.status!=null">STATUS=#{et.status},</if> <if test="et.callStatus!=null">CALL_STATUS=#{et.callStatus},</if> - <if test="et.sendStatus!=null">SEND_STATUS=#{et.sendStatus},</if> - <if test="et.createUserBo!=null">CREATE_USER_BO=#{et.createUserBo},</if> + <if test="et.issueStatus!=null">ISSUE_STATUS=#{et.issueStatus},</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.updateUserBo!=null">UPDATE_USER_BO=#{et.updateUserBo},</if> + <if test="et.updateUser!=null">UPDATE_USER=#{et.updateUser},</if> <if test="et.updatedDateTime!=null">UPDATED_DATE_TIME=#{et.updatedDateTime},</if> </trim> <where> @@ -468,10 +490,10 @@ <if test="ew.entity!=null"> HANDLE=#{ew.entity.handle} <if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if> + <if test="ew.entity.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if> <if test="ew.entity.callItemNo!=null"> AND CALL_ITEM_NO=#{ew.entity.callItemNo}</if> <if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if> <if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if> - <if test="ew.entity.dispatchNo!=null"> AND DISPATCH_NO=#{ew.entity.dispatchNo}</if> <if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if> <if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if> <if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if> @@ -479,12 +501,13 @@ <if test="ew.entity.callType!=null"> AND CALL_TYPE=#{ew.entity.callType}</if> <if test="ew.entity.requiredQty!=null"> AND REQUIRED_QTY=#{ew.entity.requiredQty}</if> <if test="ew.entity.requiredDateTime!=null"> AND REQUIRED_DATE_TIME=#{ew.entity.requiredDateTime}</if> + <if test="ew.entity.issueQty!=null"> AND ISSUE_QTY=#{ew.entity.issueQty}</if> <if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if> <if test="ew.entity.callStatus!=null"> AND CALL_STATUS=#{ew.entity.callStatus}</if> - <if test="ew.entity.sendStatus!=null"> AND SEND_STATUS=#{ew.entity.sendStatus}</if> - <if test="ew.entity.createUserBo!=null"> AND CREATE_USER_BO=#{ew.entity.createUserBo}</if> + <if test="ew.entity.issueStatus!=null"> AND ISSUE_STATUS=#{ew.entity.issueStatus}</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.updateUserBo!=null"> AND UPDATE_USER_BO=#{ew.entity.updateUserBo}</if> + <if test="ew.entity.updateUser!=null"> AND UPDATE_USER=#{ew.entity.updateUser}</if> <if test="ew.entity.updatedDateTime!=null"> AND UPDATED_DATE_TIME=#{ew.entity.updatedDateTime}</if> </if> <if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere"> @@ -523,10 +546,10 @@ HANDLE=#{ew.entity.handle} </if> <if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if> + <if test="ew.entity.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if> <if test="ew.entity.callItemNo!=null"> AND CALL_ITEM_NO=#{ew.entity.callItemNo}</if> <if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if> <if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if> - <if test="ew.entity.dispatchNo!=null"> AND DISPATCH_NO=#{ew.entity.dispatchNo}</if> <if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if> <if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if> <if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if> @@ -534,12 +557,13 @@ <if test="ew.entity.callType!=null"> AND CALL_TYPE=#{ew.entity.callType}</if> <if test="ew.entity.requiredQty!=null"> AND REQUIRED_QTY=#{ew.entity.requiredQty}</if> <if test="ew.entity.requiredDateTime!=null"> AND REQUIRED_DATE_TIME=#{ew.entity.requiredDateTime}</if> + <if test="ew.entity.issueQty!=null"> AND ISSUE_QTY=#{ew.entity.issueQty}</if> <if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if> <if test="ew.entity.callStatus!=null"> AND CALL_STATUS=#{ew.entity.callStatus}</if> - <if test="ew.entity.sendStatus!=null"> AND SEND_STATUS=#{ew.entity.sendStatus}</if> - <if test="ew.entity.createUserBo!=null"> AND CREATE_USER_BO=#{ew.entity.createUserBo}</if> + <if test="ew.entity.issueStatus!=null"> AND ISSUE_STATUS=#{ew.entity.issueStatus}</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.updateUserBo!=null"> AND UPDATE_USER_BO=#{ew.entity.updateUserBo}</if> + <if test="ew.entity.updateUser!=null"> AND UPDATE_USER=#{ew.entity.updateUser}</if> <if test="ew.entity.updatedDateTime!=null"> AND UPDATED_DATE_TIME=#{ew.entity.updatedDateTime}</if> </if> <if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere"> @@ -559,4 +583,40 @@ </delete> <!-- BaseMapper标准查询/修改/删除 --> + <delete id="deleteDispatchCallItem"> + DELETE FROM Z_CALL_ITEM WHERE SFC_DISPATCH_BO IN + <foreach item="item" collection="list" separator="," open="(" close=")" index=""> + #{item.handle} + </foreach> + </delete> + + <select id="selectDispatchCallItem" resultMap="BaseResultMap"> + SELECT ZSD.HANDLE SFC_DISPATCH_BO, ZSD.SITE, ZSD.SHOP_ORDER, ZSD.SFC, ZSD.DISPATCH_NO, ZSD.OPERATION, ZSD.STEP_ID, ZSD.RESRCE, BC.COMPONENT_GBO COMPONENT_BO, + SC.QTY*BC.QTY REQUIRED_QTY, ZSD.PLANNED_START_DATE REQUIRED_DATE_TIME + FROM Z_SFC_DISPATCH ZSD + INNER JOIN SFC SC ON SC.SITE = ZSD.SITE AND SC.SFC = ZSD.SFC + 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 + 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 + WHERE ZSD.HANDLE IN + <foreach item="item" collection="list" separator="," open="(" close=")" index=""> + #{item.handle} + </foreach> + </select> + + <select id="findCallItemList" resultMap=""> + SELECT ZCI.HANDLE, ZCI.SITE, CF.VALUE WORK_ORDER, ZSD.WORK_CENTER, ZSD.SHOP_ORDER, ZSD.SFC, ZSD.DISPATCH_NO, CP.ITEM, IT.DESCRIPTION ITEM_DESCRIPTION, ZSD.BLANKING_SIZE, + ZSD.DISPATCH_STATUS, ZCI.OPERATION, OPT.DESCRIPTION OPERATION_DESCRIPTION, ZSD.RESOURCE_TYPE, ZCI.RESRCE, ZSD.DISPATCH_QTY, ZSD.PLANNED_START_DATE, ZSD.REMARK + FROM Z_SFC_DISPATCH ZSD + INNER JOIN Z_CALL_ITEM ZCI ON ZCI.SFC_DISPATCH_BO = ZSD.HANDLE + INNER JOIN SHOP_ORDER SO ON SO.SITE = ZSD.SITE AND ZSD.SHOP_ORDER = SO.SHOP_ORDER + LEFT JOIN CUSTOM_FIELDS CF ON CF.HANDLE = SO.HANDLE AND CF.ATTRIBUTE = 'WORK_ORDER' + INNER JOIN ITEM CP ON CP.HANDLE = ZCI.COMPONENT_BO + LEFT JOIN ITEM_T IT ON IT.ITEM_BO = CP.HANDLE AND IT.LOCALE = 'zh' + INNER JOIN OPERATION OP ON OP.SITE = ZCI.SITE AND OP.OPERATION = ZCI.OPERATION AND OP.CURRENT_REVISION = 'true' + LEFT JOIN OPERATION_T OPT ON OPT.OPERATION_BO = OP.HANDLE AND OPT.LOCALE = 'zh' + ORDER BY ZSD.SFC, ZSD.STEP_ID, ZCI.CALL_TYPE + </select> </mapper> diff --git a/dispatch/src/main/resources/mapper/SfcDispatchMapper.xml b/dispatch/src/main/resources/mapper/SfcDispatchMapper.xml index 618d504b..dc205d9d 100644 --- a/dispatch/src/main/resources/mapper/SfcDispatchMapper.xml +++ b/dispatch/src/main/resources/mapper/SfcDispatchMapper.xml @@ -37,6 +37,7 @@ <result column="IS_DISPATCH" property="isDispatch" /> <result column="IS_IMPORT" property="isImport" /> <result column="REMARK" property="remark" /> + <result column="PREPOSITION_STEP_ID" property="prepositionStepId" /> <result column="PREPOSITION_OPERATION" property="prepositionOperation" /> <result column="IS_FIRST_OPERATION" property="isFirstOperation" /> <result column="CREATE_USER" property="createUser" /> @@ -52,6 +53,7 @@ <resultMap id="FullResultMap" type="com.foreverwin.mesnac.dispatch.model.ShopOrderRelease"> <result column="IS_COMPLETED" property="isCompleted" /> + <result column="ITEM_BO" property="itemBo" /> <result column="ITEM" property="item" /> <result column="STATUS_NAME" property="statusName" /> <result column="IS_MAJOR" property="isMajor" /> @@ -69,7 +71,7 @@ <!-- 通用查询结果列 --> <sql id="Base_Column_List"> - HANDLE, SITE, SHOP_ORDER, SFC, BLANKING_SIZE, DISPATCH_SEQ, DISPATCH_NO, DISPATCH_STATUS, DRAWINGS_NO, DRAWINGS_REVISION, IS_LOCK, ROUTER_BO, STEP_ID, OPERATION, RESOURCE_TYPE, WORK_CENTER, RESRCE, EMPLOYEE, TURN_OPERATION, DISPATCH_QTY, PROD_HOURS, PLANNED_START_DATE, PLANNED_COMP_DATE, EARLIEST_START_DATE, LATEST_END_DATE, SO_RELEASED_DATE, SFC_RELEASED_DATE, RELEASED_COMPLETE_DATE, ACTUAL_START_DATE, ACTUAL_COMPLETE_DATE, IS_DISPATCH, IS_IMPORT, REMARK, PREPOSITION_OPERATION, IS_FIRST_OPERATION, CREATE_USER, CREATED_DATE_TIME, MODIFY_USER, MODIFIED_DATE_TIME, OTHER_1, OTHER_2, OTHER_3, OTHER_4, OTHER_5 + HANDLE, SITE, SHOP_ORDER, SFC, BLANKING_SIZE, DISPATCH_SEQ, DISPATCH_NO, DISPATCH_STATUS, DRAWINGS_NO, DRAWINGS_REVISION, IS_LOCK, ROUTER_BO, STEP_ID, OPERATION, RESOURCE_TYPE, WORK_CENTER, RESRCE, EMPLOYEE, TURN_OPERATION, DISPATCH_QTY, PROD_HOURS, PLANNED_START_DATE, PLANNED_COMP_DATE, EARLIEST_START_DATE, LATEST_END_DATE, SO_RELEASED_DATE, SFC_RELEASED_DATE, RELEASED_COMPLETE_DATE, ACTUAL_START_DATE, ACTUAL_COMPLETE_DATE, IS_DISPATCH, IS_IMPORT, REMARK, PREPOSITION_STEP_ID, PREPOSITION_OPERATION, IS_FIRST_OPERATION, CREATE_USER, CREATED_DATE_TIME, MODIFY_USER, MODIFIED_DATE_TIME, OTHER_1, OTHER_2, OTHER_3, OTHER_4, OTHER_5 </sql> <!-- BaseMapper标准查询/修改/删除 --> @@ -136,6 +138,8 @@ <if test="ew.entity.isDispatch!=null"> AND IS_DISPATCH=#{ew.entity.isDispatch}</if> <if test="ew.entity.isImport!=null"> AND IS_IMPORT=#{ew.entity.isImport}</if> <if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if> + <if test="ew.entity.prepositionStepId!=null"> AND PREPOSITION_STEP_ID=#{ew.entity.prepositionStepId}</if> + <if test="ew.entity.prepositionOperation!=null"> AND PREPOSITION_OPERATION=#{ew.entity.prepositionOperation}</if> <if test="ew.entity.isFirstOperation!=null"> AND IS_FIRST_OPERATION=#{ew.entity.isFirstOperation}</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> @@ -189,6 +193,8 @@ <if test="ew.entity.isDispatch!=null"> AND IS_DISPATCH=#{ew.entity.isDispatch}</if> <if test="ew.entity.isImport!=null"> AND IS_IMPORT=#{ew.entity.isImport}</if> <if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if> + <if test="ew.entity.prepositionStepId!=null"> AND PREPOSITION_STEP_ID=#{ew.entity.prepositionStepId}</if> + <if test="ew.entity.prepositionOperation!=null"> AND PREPOSITION_OPERATION=#{ew.entity.prepositionOperation}</if> <if test="ew.entity.isFirstOperation!=null"> AND IS_FIRST_OPERATION=#{ew.entity.isFirstOperation}</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> @@ -250,6 +256,8 @@ <if test="ew.entity.isDispatch!=null"> AND IS_DISPATCH=#{ew.entity.isDispatch}</if> <if test="ew.entity.isImport!=null"> AND IS_IMPORT=#{ew.entity.isImport}</if> <if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if> + <if test="ew.entity.prepositionStepId!=null"> AND PREPOSITION_STEP_ID=#{ew.entity.prepositionStepId}</if> + <if test="ew.entity.prepositionOperation!=null"> AND PREPOSITION_OPERATION=#{ew.entity.prepositionOperation}</if> <if test="ew.entity.isFirstOperation!=null"> AND IS_FIRST_OPERATION=#{ew.entity.isFirstOperation}</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> @@ -311,6 +319,8 @@ <if test="ew.entity.isDispatch!=null"> AND IS_DISPATCH=#{ew.entity.isDispatch}</if> <if test="ew.entity.isImport!=null"> AND IS_IMPORT=#{ew.entity.isImport}</if> <if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if> + <if test="ew.entity.prepositionStepId!=null"> AND PREPOSITION_STEP_ID=#{ew.entity.prepositionStepId}</if> + <if test="ew.entity.prepositionOperation!=null"> AND PREPOSITION_OPERATION=#{ew.entity.prepositionOperation}</if> <if test="ew.entity.isFirstOperation!=null"> AND IS_FIRST_OPERATION=#{ew.entity.isFirstOperation}</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> @@ -372,6 +382,8 @@ <if test="ew.entity.isDispatch!=null"> AND IS_DISPATCH=#{ew.entity.isDispatch}</if> <if test="ew.entity.isImport!=null"> AND IS_IMPORT=#{ew.entity.isImport}</if> <if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if> + <if test="ew.entity.prepositionStepId!=null"> AND PREPOSITION_STEP_ID=#{ew.entity.prepositionStepId}</if> + <if test="ew.entity.prepositionOperation!=null"> AND PREPOSITION_OPERATION=#{ew.entity.prepositionOperation}</if> <if test="ew.entity.isFirstOperation!=null"> AND IS_FIRST_OPERATION=#{ew.entity.isFirstOperation}</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> @@ -433,6 +445,8 @@ <if test="ew.entity.isDispatch!=null"> AND IS_DISPATCH=#{ew.entity.isDispatch}</if> <if test="ew.entity.isImport!=null"> AND IS_IMPORT=#{ew.entity.isImport}</if> <if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if> + <if test="ew.entity.prepositionStepId!=null"> AND PREPOSITION_STEP_ID=#{ew.entity.prepositionStepId}</if> + <if test="ew.entity.prepositionOperation!=null"> AND PREPOSITION_OPERATION=#{ew.entity.prepositionOperation}</if> <if test="ew.entity.isFirstOperation!=null"> AND IS_FIRST_OPERATION=#{ew.entity.isFirstOperation}</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> @@ -494,6 +508,8 @@ <if test="ew.entity.isDispatch!=null"> AND IS_DISPATCH=#{ew.entity.isDispatch}</if> <if test="ew.entity.isImport!=null"> AND IS_IMPORT=#{ew.entity.isImport}</if> <if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if> + <if test="ew.entity.prepositionStepId!=null"> AND PREPOSITION_STEP_ID=#{ew.entity.prepositionStepId}</if> + <if test="ew.entity.prepositionOperation!=null"> AND PREPOSITION_OPERATION=#{ew.entity.prepositionOperation}</if> <if test="ew.entity.isFirstOperation!=null"> AND IS_FIRST_OPERATION=#{ew.entity.isFirstOperation}</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> @@ -551,6 +567,7 @@ <if test="isDispatch!=null">IS_DISPATCH,</if> <if test="isImport!=null">IS_IMPORT,</if> <if test="remark!=null">REMARK,</if> + <if test="prepositionStepId!=null">PREPOSITION_STEP_ID,</if> <if test="prepositionOperation!=null">PREPOSITION_OPERATION,</if> <if test="isFirstOperation!=null">IS_FIRST_OPERATION,</if> <if test="createUser!=null">CREATE_USER,</if> @@ -597,6 +614,7 @@ <if test="isDispatch!=null">#{isDispatch},</if> <if test="isImport!=null">#{isImport},</if> <if test="remark!=null">#{remark},</if> + <if test="prepositionStepId!=null">#{prepositionStepId},</if> <if test="prepositionOperation!=null">#{prepositionOperation},</if> <if test="isFirstOperation!=null">#{isFirstOperation},</if> <if test="createUser!=null">#{createUser},</if> @@ -650,6 +668,7 @@ #{isDispatch}, #{isImport}, #{remark}, + #{prepositionStepId}, #{prepositionOperation}, #{isFirstOperation}, #{createUser}, @@ -699,6 +718,7 @@ <if test="et.isDispatch!=null">IS_DISPATCH=#{et.isDispatch},</if> <if test="et.isImport!=null">IS_IMPORT=#{et.isImport},</if> <if test="et.remark!=null">REMARK=#{et.remark},</if> + <if test="et.prepositionStepId!=null">PREPOSITION_STEP_ID=#{et.prepositionStepId},</if> <if test="et.prepositionOperation!=null">PREPOSITION_OPERATION=#{et.prepositionOperation},</if> <if test="et.isFirstOperation!=null">IS_FIRST_OPERATION=#{et.isFirstOperation},</if> <if test="et.createUser!=null">CREATE_USER=#{et.createUser},</if> @@ -748,6 +768,7 @@ IS_DISPATCH=#{et.isDispatch}, IS_IMPORT=#{et.isImport}, REMARK=#{et.remark}, + PREPOSITION_STEP_ID=#{et.prepositionStepId}, PREPOSITION_OPERATION=#{et.prepositionOperation}, IS_FIRST_OPERATION=#{et.isFirstOperation}, CREATE_USER=#{et.createUser}, @@ -797,6 +818,7 @@ <if test="et.isDispatch!=null">IS_DISPATCH=#{et.isDispatch},</if> <if test="et.isImport!=null">IS_IMPORT=#{et.isImport},</if> <if test="et.remark!=null">REMARK=#{et.remark},</if> + <if test="et.prepositionStepId!=null">PREPOSITION_STEP_ID=#{et.prepositionStepId},</if> <if test="et.prepositionOperation!=null">PREPOSITION_OPERATION=#{et.prepositionOperation},</if> <if test="et.isFirstOperation!=null">IS_FIRST_OPERATION=#{et.isFirstOperation},</if> <if test="et.createUser!=null">CREATE_USER=#{et.createUser},</if> @@ -845,6 +867,7 @@ <if test="ew.entity.isDispatch!=null"> AND IS_DISPATCH=#{ew.entity.isDispatch}</if> <if test="ew.entity.isImport!=null"> AND IS_IMPORT=#{ew.entity.isImport}</if> <if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if> + <if test="ew.entity.prepositionStepId!=null"> AND PREPOSITION_STEP_ID=#{ew.entity.prepositionStepId}</if> <if test="ew.entity.prepositionOperation!=null"> AND PREPOSITION_OPERATION=#{ew.entity.prepositionOperation}</if> <if test="ew.entity.isFirstOperation!=null"> AND IS_FIRST_OPERATION=#{ew.entity.isFirstOperation}</if> <if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if> @@ -924,6 +947,8 @@ <if test="ew.entity.isDispatch!=null"> AND IS_DISPATCH=#{ew.entity.isDispatch}</if> <if test="ew.entity.isImport!=null"> AND IS_IMPORT=#{ew.entity.isImport}</if> <if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if> + <if test="ew.entity.prepositionStepId!=null"> AND PREPOSITION_STEP_ID=#{ew.entity.prepositionStepId}</if> + <if test="ew.entity.prepositionOperation!=null"> AND PREPOSITION_OPERATION=#{ew.entity.prepositionOperation}</if> <if test="ew.entity.isFirstOperation!=null"> AND IS_FIRST_OPERATION=#{ew.entity.isFirstOperation}</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> @@ -969,12 +994,13 @@ <select id="findSfcDispatchList" resultMap="FullResultMap"> SELECT WIP.*, CASE WHEN WIP.DISPATCH_SEQ = 1 THEN WIP.PLANNED_START_DATE ELSE V1.PLANNED_COMP_DATE END EARLIEST_START_DATE, CASE WHEN V2.HANDLE IS NOT NULL THEN V2.PLANNED_START_DATE ELSE WIP.PLANNED_COMP_DATE END LATEST_END_DATE, + V1.STEP_ID PREPOSITION_STEP_ID, V1.OPERATION PREPOSITION_OPERATION, CASE WHEN WIP.DISPATCH_SEQ = 1 OR V1.OTHER_1 = 'true' THEN N'是' ELSE N'否' END IS_COMPLETED, CASE WHEN WIP.DISPATCH_STATUS = 'NEW' THEN N'新建' WHEN WIP.DISPATCH_STATUS = 'CANCEL' THEN N'取消' WHEN WIP.DISPATCH_STATUS = 'PAUSE' THEN N'暂停' WHEN WIP.DISPATCH_STATUS = 'RELEASE' THEN N'发布' END AS STATUS_NAME FROM ( - SELECT DISTINCT SD.HANDLE, SD.SITE, SD.SHOP_ORDER, SD.DISPATCH_NO, C1.VALUE WORK_ORDER, IM.ITEM, IT.DESCRIPTION ITEM_DESCRIPTION, SD.SFC, SD.DISPATCH_STATUS, + SELECT DISTINCT SD.HANDLE, SD.SITE, SD.SHOP_ORDER, SD.DISPATCH_NO, C1.VALUE WORK_ORDER, IM.HANDLE ITEM_BO, IM.ITEM, IT.DESCRIPTION ITEM_DESCRIPTION, SD.SFC, SD.DISPATCH_STATUS, SD.STEP_ID, SD.OPERATION, OT.DESCRIPTION OPERATION_DESCRIPTION, SD.RESOURCE_TYPE, SD.RESRCE, SD.EMPLOYEE, SD.EMPLOYEE USER_NAME, SD.DISPATCH_QTY, SD.PROD_HOURS, CASE WHEN OTHER_1 = 'true' THEN SD.DISPATCH_QTY ELSE 0 END COMPLETED_QTY, SD.PLANNED_START_DATE, SD.PLANNED_COMP_DATE, SD.WORK_CENTER, SD.IS_DISPATCH, SD.ACTUAL_START_DATE, SD.ACTUAL_COMPLETE_DATE, SD.REMARK, SD.DISPATCH_SEQ, SD.DISPATCH_SEQ-1 BEFORE_SEQ, SD.DISPATCH_SEQ+1 AFTER_SEQ, diff --git a/meapi/src/main/java/com/foreverwin/mesnac/meapi/controller/ResrceController.java b/meapi/src/main/java/com/foreverwin/mesnac/meapi/controller/ResrceController.java index f5e70c66..818de140 100644 --- a/meapi/src/main/java/com/foreverwin/mesnac/meapi/controller/ResrceController.java +++ b/meapi/src/main/java/com/foreverwin/mesnac/meapi/controller/ResrceController.java @@ -19,7 +19,7 @@ import java.util.List; * @since 2021-05-26 */ @RestController -@RequestMapping("/RESOURCE") + @RequestMapping("/RESOURCE") public class ResrceController { @Autowired @@ -41,6 +41,27 @@ public class ResrceController { return R.ok(result); } + @ResponseBody + @GetMapping("getEnabledResourceList") + public R getEnabledResourceList(Resrce resrce) { + List<Resrce> result; + try { + String site = CommonMethods.getSite(); + //已启用状态 + String status301Bo = "StatusBO:" + site + ",301"; + + resrce.setSite(site); + resrce.setStatusBo(status301Bo); + QueryWrapper<Resrce> queryWrapper = new QueryWrapper<>(); + queryWrapper.setEntity(resrce); + result = resrceService.list(queryWrapper); + } catch (Exception e) { + return R.failed(e.getMessage()); + } + + return R.ok(result); + } + @GetMapping("/getResourceListByType") public R getResourceListByType(String resourceType) { List<Resrce> result; diff --git a/production/src/main/java/com/foreverwin/mesnac/production/mapper/SfcDataMapper.java b/production/src/main/java/com/foreverwin/mesnac/production/mapper/SfcDataMapper.java index 556c728c..1781d714 100644 --- a/production/src/main/java/com/foreverwin/mesnac/production/mapper/SfcDataMapper.java +++ b/production/src/main/java/com/foreverwin/mesnac/production/mapper/SfcDataMapper.java @@ -15,4 +15,5 @@ import org.springframework.stereotype.Repository; @Repository public interface SfcDataMapper extends BaseMapper<SfcData> { + void updateDataAttr(SfcData sfcData); } \ No newline at end of file diff --git a/production/src/main/java/com/foreverwin/mesnac/production/service/impl/SfcDataServiceImpl.java b/production/src/main/java/com/foreverwin/mesnac/production/service/impl/SfcDataServiceImpl.java index d41a2dcc..48fe6929 100644 --- a/production/src/main/java/com/foreverwin/mesnac/production/service/impl/SfcDataServiceImpl.java +++ b/production/src/main/java/com/foreverwin/mesnac/production/service/impl/SfcDataServiceImpl.java @@ -97,16 +97,11 @@ public class SfcDataServiceImpl extends ServiceImpl<SfcDataMapper, SfcData> impl } else { //更新位置到SFC SfcData sfcData = sfcDataList.get(0); + sfcData.setSfcBo(sfcBo); + sfcData.setDataField(CustomFieldConstant.SFC_DATA_LOCATION); sfcData.setDataAttr(location); - sfcData.setDateTime(nowDate); sfcData.setModifiedDateTime(nowDate); - - Wrapper<SfcData> updateWrapper = new UpdateWrapper<>(); - SfcData tjSfcData = new SfcData(); - tjSfcData.setSfcBo(sfcBo); - tjSfcData.setDataField(CustomFieldConstant.SFC_DATA_LOCATION); - ((UpdateWrapper<SfcData>) updateWrapper).setEntity(tjSfcData); - sfcDataMapper.update(sfcData, updateWrapper); + sfcDataMapper.updateDataAttr(sfcData); } } diff --git a/production/src/main/resources/mapper/SfcDataMapper.xml b/production/src/main/resources/mapper/SfcDataMapper.xml index 5c4a147f..aeb76531 100644 --- a/production/src/main/resources/mapper/SfcDataMapper.xml +++ b/production/src/main/resources/mapper/SfcDataMapper.xml @@ -329,4 +329,8 @@ <!-- BaseMapper标准查询/修改/删除 --> + <update id="updateDataAttr"> + UPDATE SFC_DATA SET DATA_ATTR = #{dataAttr}, MODIFIED_DATE_TIME = #{modifiedDateTime} + WHERE SFC_BO = #{sfcBo} AND DATA_FIELD = #{dataField} + </update> </mapper>