产前准备任务生成
parent
b1d42a38f0
commit
a4d0209f80
@ -0,0 +1,136 @@
|
||||
package com.foreverwin.mesnac.common.controller;
|
||||
|
||||
import com.foreverwin.modular.core.util.R;
|
||||
import com.foreverwin.modular.core.util.FrontPage;
|
||||
import com.foreverwin.modular.core.util.CommonMethods;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.foreverwin.mesnac.common.service.ProdReadyTaskService;
|
||||
import com.foreverwin.mesnac.common.model.ProdReadyTask;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Philip
|
||||
* @since 2021-06-23
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/Z-PROD-READY-TASK")
|
||||
public class ProdReadyTaskController {
|
||||
|
||||
@Autowired
|
||||
public ProdReadyTaskService prodReadyTaskService;
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id 主键
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@GetMapping("/{id:.+}")
|
||||
public R getProdReadyTaskById(@PathVariable String id) {
|
||||
return R.ok( prodReadyTaskService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询所有数据
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@GetMapping("")
|
||||
public R getProdReadyTaskList(ProdReadyTask prodReadyTask){
|
||||
List<ProdReadyTask> result;
|
||||
QueryWrapper<ProdReadyTask> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(prodReadyTask);
|
||||
result = prodReadyTaskService.list(queryWrapper);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询数据
|
||||
*
|
||||
* @param frontPage 分页信息
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@GetMapping("/page")
|
||||
public R page(FrontPage<ProdReadyTask> frontPage, ProdReadyTask prodReadyTask){
|
||||
IPage result;
|
||||
QueryWrapper<ProdReadyTask> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(prodReadyTask);
|
||||
if (frontPage.getGlobalQuery() != null && !"".equals(frontPage.getGlobalQuery().trim())) {
|
||||
//TODO modify global query
|
||||
queryWrapper.lambda().and(wrapper -> wrapper
|
||||
.like(ProdReadyTask::getHandle, frontPage.getGlobalQuery())
|
||||
.or().like(ProdReadyTask::getSite, frontPage.getGlobalQuery())
|
||||
.or().like(ProdReadyTask::getTaskNo, frontPage.getGlobalQuery())
|
||||
.or().like(ProdReadyTask::getSfcDispatchBo, frontPage.getGlobalQuery())
|
||||
.or().like(ProdReadyTask::getShopOrder, frontPage.getGlobalQuery())
|
||||
.or().like(ProdReadyTask::getWorkCenter, frontPage.getGlobalQuery())
|
||||
.or().like(ProdReadyTask::getSfc, frontPage.getGlobalQuery())
|
||||
.or().like(ProdReadyTask::getOperation, frontPage.getGlobalQuery())
|
||||
.or().like(ProdReadyTask::getStepId, frontPage.getGlobalQuery())
|
||||
.or().like(ProdReadyTask::getItem, frontPage.getGlobalQuery())
|
||||
.or().like(ProdReadyTask::getResrce, frontPage.getGlobalQuery())
|
||||
.or().like(ProdReadyTask::getReslut, frontPage.getGlobalQuery())
|
||||
.or().like(ProdReadyTask::getStatus, frontPage.getGlobalQuery())
|
||||
.or().like(ProdReadyTask::getCreateUser, frontPage.getGlobalQuery())
|
||||
.or().like(ProdReadyTask::getModifyUser, frontPage.getGlobalQuery())
|
||||
.or().like(ProdReadyTask::getReadyUser, frontPage.getGlobalQuery())
|
||||
.or().like(ProdReadyTask::getCompleteUser, frontPage.getGlobalQuery())
|
||||
.or().like(ProdReadyTask::getCancelUser, frontPage.getGlobalQuery())
|
||||
.or().like(ProdReadyTask::getRemarks, frontPage.getGlobalQuery())
|
||||
);
|
||||
}
|
||||
result = prodReadyTaskService.page(frontPage.getPagePlus(), queryWrapper);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增
|
||||
* @param prodReadyTask 传递的实体
|
||||
* @return null 失败 实体成功
|
||||
*/
|
||||
@PostMapping
|
||||
public R save(@RequestBody ProdReadyTask prodReadyTask) {
|
||||
return R.ok(prodReadyTaskService.save(prodReadyTask));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* @param prodReadyTask 传递的实体
|
||||
* @return null 失败 实体成功
|
||||
*/
|
||||
@PutMapping
|
||||
public R updateById(@RequestBody ProdReadyTask prodReadyTask) {
|
||||
return R.ok(prodReadyTaskService.updateById(prodReadyTask));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id删除对象
|
||||
* @param id 实体ID
|
||||
* @return 0 失败 1 成功
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping(method = RequestMethod.DELETE, value = "/{id:.+}")
|
||||
public R removeById(@PathVariable("id") String id){
|
||||
return R.ok(prodReadyTaskService.removeById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除对象
|
||||
* @param ids 实体集合ID
|
||||
* @return 0 失败 1 成功
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping(method = RequestMethod.POST, value = "/delete-batch")
|
||||
public R removeByIds(List<String> ids){
|
||||
return R.ok(prodReadyTaskService.removeByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,124 @@
|
||||
package com.foreverwin.mesnac.common.controller;
|
||||
|
||||
import com.foreverwin.modular.core.util.R;
|
||||
import com.foreverwin.modular.core.util.FrontPage;
|
||||
import com.foreverwin.modular.core.util.CommonMethods;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.foreverwin.mesnac.common.service.ProdReadyTaskDetailService;
|
||||
import com.foreverwin.mesnac.common.model.ProdReadyTaskDetail;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Philip
|
||||
* @since 2021-06-23
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/Z-PROD-READY-TASK-DETAIL")
|
||||
public class ProdReadyTaskDetailController {
|
||||
|
||||
@Autowired
|
||||
public ProdReadyTaskDetailService prodReadyTaskDetailService;
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id 主键
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@GetMapping("/{id:.+}")
|
||||
public R getProdReadyTaskDetailById(@PathVariable String id) {
|
||||
return R.ok( prodReadyTaskDetailService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询所有数据
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@GetMapping("")
|
||||
public R getProdReadyTaskDetailList(ProdReadyTaskDetail prodReadyTaskDetail){
|
||||
List<ProdReadyTaskDetail> result;
|
||||
QueryWrapper<ProdReadyTaskDetail> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(prodReadyTaskDetail);
|
||||
result = prodReadyTaskDetailService.list(queryWrapper);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询数据
|
||||
*
|
||||
* @param frontPage 分页信息
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@GetMapping("/page")
|
||||
public R page(FrontPage<ProdReadyTaskDetail> frontPage, ProdReadyTaskDetail prodReadyTaskDetail){
|
||||
IPage result;
|
||||
QueryWrapper<ProdReadyTaskDetail> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(prodReadyTaskDetail);
|
||||
if (frontPage.getGlobalQuery() != null && !"".equals(frontPage.getGlobalQuery().trim())) {
|
||||
//TODO modify global query
|
||||
queryWrapper.lambda().and(wrapper -> wrapper
|
||||
.like(ProdReadyTaskDetail::getHandle, frontPage.getGlobalQuery())
|
||||
.or().like(ProdReadyTaskDetail::getProdReadyTaskBo, frontPage.getGlobalQuery())
|
||||
.or().like(ProdReadyTaskDetail::getInspectionItem, frontPage.getGlobalQuery())
|
||||
.or().like(ProdReadyTaskDetail::getReslut, frontPage.getGlobalQuery())
|
||||
.or().like(ProdReadyTaskDetail::getRemarks, frontPage.getGlobalQuery())
|
||||
.or().like(ProdReadyTaskDetail::getCreateUser, frontPage.getGlobalQuery())
|
||||
.or().like(ProdReadyTaskDetail::getModifyUser, frontPage.getGlobalQuery())
|
||||
);
|
||||
}
|
||||
result = prodReadyTaskDetailService.page(frontPage.getPagePlus(), queryWrapper);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增
|
||||
* @param prodReadyTaskDetail 传递的实体
|
||||
* @return null 失败 实体成功
|
||||
*/
|
||||
@PostMapping
|
||||
public R save(@RequestBody ProdReadyTaskDetail prodReadyTaskDetail) {
|
||||
return R.ok(prodReadyTaskDetailService.save(prodReadyTaskDetail));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* @param prodReadyTaskDetail 传递的实体
|
||||
* @return null 失败 实体成功
|
||||
*/
|
||||
@PutMapping
|
||||
public R updateById(@RequestBody ProdReadyTaskDetail prodReadyTaskDetail) {
|
||||
return R.ok(prodReadyTaskDetailService.updateById(prodReadyTaskDetail));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id删除对象
|
||||
* @param id 实体ID
|
||||
* @return 0 失败 1 成功
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping(method = RequestMethod.DELETE, value = "/{id:.+}")
|
||||
public R removeById(@PathVariable("id") String id){
|
||||
return R.ok(prodReadyTaskDetailService.removeById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除对象
|
||||
* @param ids 实体集合ID
|
||||
* @return 0 失败 1 成功
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping(method = RequestMethod.POST, value = "/delete-batch")
|
||||
public R removeByIds(List<String> ids){
|
||||
return R.ok(prodReadyTaskDetailService.removeByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.foreverwin.mesnac.common.mapper;
|
||||
|
||||
import com.foreverwin.mesnac.common.model.ProdReadyTaskDetail;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 生产准备任务明细表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author Philip
|
||||
* @since 2021-06-23
|
||||
*/
|
||||
@Repository
|
||||
public interface ProdReadyTaskDetailMapper extends BaseMapper<ProdReadyTaskDetail> {
|
||||
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.foreverwin.mesnac.common.mapper;
|
||||
|
||||
import com.foreverwin.mesnac.common.model.ProdReadyTask;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 生产准备任务主表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author Philip
|
||||
* @since 2021-06-23
|
||||
*/
|
||||
@Repository
|
||||
public interface ProdReadyTaskMapper extends BaseMapper<ProdReadyTask> {
|
||||
|
||||
}
|
@ -0,0 +1,424 @@
|
||||
package com.foreverwin.mesnac.common.model;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 生产准备任务主表
|
||||
* </p>
|
||||
*
|
||||
* @author Philip
|
||||
* @since 2021-06-23
|
||||
*/
|
||||
|
||||
@TableName("Z_PROD_READY_TASK")
|
||||
|
||||
public class ProdReadyTask extends Model<ProdReadyTask> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "HANDLE", type = IdType.INPUT)
|
||||
private String handle;
|
||||
/**
|
||||
* 站点
|
||||
*/
|
||||
@TableField("SITE")
|
||||
private String site;
|
||||
/**
|
||||
* 任务号
|
||||
*/
|
||||
@TableField("TASK_NO")
|
||||
private String taskNo;
|
||||
/**
|
||||
* 派工任务handle
|
||||
*/
|
||||
@TableField("SFC_DISPATCH_BO")
|
||||
private String sfcDispatchBo;
|
||||
/**
|
||||
* 工单
|
||||
*/
|
||||
@TableField("SHOP_ORDER")
|
||||
private String shopOrder;
|
||||
/**
|
||||
* 车间
|
||||
*/
|
||||
@TableField("WORK_CENTER")
|
||||
private String workCenter;
|
||||
/**
|
||||
* 产品条码
|
||||
*/
|
||||
@TableField("SFC")
|
||||
private String sfc;
|
||||
/**
|
||||
* 工序
|
||||
*/
|
||||
@TableField("OPERATION")
|
||||
private String operation;
|
||||
/**
|
||||
* 步骤
|
||||
*/
|
||||
@TableField("STEP_ID")
|
||||
private String stepId;
|
||||
/**
|
||||
* 物料
|
||||
*/
|
||||
@TableField("ITEM")
|
||||
private String item;
|
||||
/**
|
||||
* 资源
|
||||
*/
|
||||
@TableField("RESRCE")
|
||||
private String resrce;
|
||||
/**
|
||||
* 检验结果
|
||||
*/
|
||||
@TableField("RESLUT")
|
||||
private String reslut;
|
||||
/**
|
||||
* 待准备、准备中、完成、取消
|
||||
*/
|
||||
@TableField("STATUS")
|
||||
private String status;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField("CREATE_USER")
|
||||
private String createUser;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("CREATED_DATE_TIME")
|
||||
private LocalDateTime createdDateTime;
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
@TableField("MODIFY_USER")
|
||||
private String modifyUser;
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@TableField("MODIFIED_DATE_TIME")
|
||||
private LocalDateTime modifiedDateTime;
|
||||
/**
|
||||
* 准备人
|
||||
*/
|
||||
@TableField("READY_USER")
|
||||
private String readyUser;
|
||||
/**
|
||||
* 准备时间
|
||||
*/
|
||||
@TableField("READY_DATE_TIME")
|
||||
private LocalDateTime readyDateTime;
|
||||
/**
|
||||
* 完成时间
|
||||
*/
|
||||
@TableField("COMPLETE_DATE_TIME")
|
||||
private LocalDateTime completeDateTime;
|
||||
/**
|
||||
* 完成人
|
||||
*/
|
||||
@TableField("COMPLETE_USER")
|
||||
private String completeUser;
|
||||
/**
|
||||
* 取消时间
|
||||
*/
|
||||
@TableField("CANCEL_DATE_TIME")
|
||||
private LocalDateTime cancelDateTime;
|
||||
/**
|
||||
* 取消人
|
||||
*/
|
||||
@TableField("CANCEL_USER")
|
||||
private String cancelUser;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("REMARKS")
|
||||
private String remarks;
|
||||
|
||||
|
||||
public String getHandle() {
|
||||
return handle;
|
||||
}
|
||||
|
||||
public void setHandle(String handle) {
|
||||
this.handle = handle;
|
||||
}
|
||||
|
||||
public String getSite() {
|
||||
return site;
|
||||
}
|
||||
|
||||
public void setSite(String site) {
|
||||
this.site = site;
|
||||
}
|
||||
|
||||
public String getTaskNo() {
|
||||
return taskNo;
|
||||
}
|
||||
|
||||
public void setTaskNo(String taskNo) {
|
||||
this.taskNo = taskNo;
|
||||
}
|
||||
|
||||
public String getSfcDispatchBo() {
|
||||
return sfcDispatchBo;
|
||||
}
|
||||
|
||||
public void setSfcDispatchBo(String sfcDispatchBo) {
|
||||
this.sfcDispatchBo = sfcDispatchBo;
|
||||
}
|
||||
|
||||
public String getShopOrder() {
|
||||
return shopOrder;
|
||||
}
|
||||
|
||||
public void setShopOrder(String shopOrder) {
|
||||
this.shopOrder = shopOrder;
|
||||
}
|
||||
|
||||
public String getWorkCenter() {
|
||||
return workCenter;
|
||||
}
|
||||
|
||||
public void setWorkCenter(String workCenter) {
|
||||
this.workCenter = workCenter;
|
||||
}
|
||||
|
||||
public String getSfc() {
|
||||
return sfc;
|
||||
}
|
||||
|
||||
public void setSfc(String sfc) {
|
||||
this.sfc = sfc;
|
||||
}
|
||||
|
||||
public String getOperation() {
|
||||
return operation;
|
||||
}
|
||||
|
||||
public void setOperation(String operation) {
|
||||
this.operation = operation;
|
||||
}
|
||||
|
||||
public String getStepId() {
|
||||
return stepId;
|
||||
}
|
||||
|
||||
public void setStepId(String stepId) {
|
||||
this.stepId = stepId;
|
||||
}
|
||||
|
||||
public String getItem() {
|
||||
return item;
|
||||
}
|
||||
|
||||
public void setItem(String item) {
|
||||
this.item = item;
|
||||
}
|
||||
|
||||
public String getResrce() {
|
||||
return resrce;
|
||||
}
|
||||
|
||||
public void setResrce(String resrce) {
|
||||
this.resrce = resrce;
|
||||
}
|
||||
|
||||
public String getReslut() {
|
||||
return reslut;
|
||||
}
|
||||
|
||||
public void setReslut(String reslut) {
|
||||
this.reslut = reslut;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getCreateUser() {
|
||||
return createUser;
|
||||
}
|
||||
|
||||
public void setCreateUser(String createUser) {
|
||||
this.createUser = createUser;
|
||||
}
|
||||
|
||||
public LocalDateTime getCreatedDateTime() {
|
||||
return createdDateTime;
|
||||
}
|
||||
|
||||
public void setCreatedDateTime(LocalDateTime createdDateTime) {
|
||||
this.createdDateTime = createdDateTime;
|
||||
}
|
||||
|
||||
public String getModifyUser() {
|
||||
return modifyUser;
|
||||
}
|
||||
|
||||
public void setModifyUser(String modifyUser) {
|
||||
this.modifyUser = modifyUser;
|
||||
}
|
||||
|
||||
public LocalDateTime getModifiedDateTime() {
|
||||
return modifiedDateTime;
|
||||
}
|
||||
|
||||
public void setModifiedDateTime(LocalDateTime modifiedDateTime) {
|
||||
this.modifiedDateTime = modifiedDateTime;
|
||||
}
|
||||
|
||||
public String getReadyUser() {
|
||||
return readyUser;
|
||||
}
|
||||
|
||||
public void setReadyUser(String readyUser) {
|
||||
this.readyUser = readyUser;
|
||||
}
|
||||
|
||||
public LocalDateTime getReadyDateTime() {
|
||||
return readyDateTime;
|
||||
}
|
||||
|
||||
public void setReadyDateTime(LocalDateTime readyDateTime) {
|
||||
this.readyDateTime = readyDateTime;
|
||||
}
|
||||
|
||||
public LocalDateTime getCompleteDateTime() {
|
||||
return completeDateTime;
|
||||
}
|
||||
|
||||
public void setCompleteDateTime(LocalDateTime completeDateTime) {
|
||||
this.completeDateTime = completeDateTime;
|
||||
}
|
||||
|
||||
public String getCompleteUser() {
|
||||
return completeUser;
|
||||
}
|
||||
|
||||
public void setCompleteUser(String completeUser) {
|
||||
this.completeUser = completeUser;
|
||||
}
|
||||
|
||||
public LocalDateTime getCancelDateTime() {
|
||||
return cancelDateTime;
|
||||
}
|
||||
|
||||
public void setCancelDateTime(LocalDateTime cancelDateTime) {
|
||||
this.cancelDateTime = cancelDateTime;
|
||||
}
|
||||
|
||||
public String getCancelUser() {
|
||||
return cancelUser;
|
||||
}
|
||||
|
||||
public void setCancelUser(String cancelUser) {
|
||||
this.cancelUser = cancelUser;
|
||||
}
|
||||
|
||||
public String getRemarks() {
|
||||
return remarks;
|
||||
}
|
||||
|
||||
public void setRemarks(String remarks) {
|
||||
this.remarks = remarks;
|
||||
}
|
||||
|
||||
public static final String HANDLE = "HANDLE";
|
||||
|
||||
public static final String SITE = "SITE";
|
||||
|
||||
public static final String TASK_NO = "TASK_NO";
|
||||
|
||||
public static final String SFC_DISPATCH_BO = "SFC_DISPATCH_BO";
|
||||
|
||||
public static final String SHOP_ORDER = "SHOP_ORDER";
|
||||
|
||||
public static final String WORK_CENTER = "WORK_CENTER";
|
||||
|
||||
public static final String SFC = "SFC";
|
||||
|
||||
public static final String OPERATION = "OPERATION";
|
||||
|
||||
public static final String STEP_ID = "STEP_ID";
|
||||
|
||||
public static final String ITEM = "ITEM";
|
||||
|
||||
public static final String RESRCE = "RESRCE";
|
||||
|
||||
public static final String RESLUT = "RESLUT";
|
||||
|
||||
public static final String STATUS = "STATUS";
|
||||
|
||||
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 READY_USER = "READY_USER";
|
||||
|
||||
public static final String READY_DATE_TIME = "READY_DATE_TIME";
|
||||
|
||||
public static final String COMPLETE_DATE_TIME = "COMPLETE_DATE_TIME";
|
||||
|
||||
public static final String COMPLETE_USER = "COMPLETE_USER";
|
||||
|
||||
public static final String CANCEL_DATE_TIME = "CANCEL_DATE_TIME";
|
||||
|
||||
public static final String CANCEL_USER = "CANCEL_USER";
|
||||
|
||||
public static final String REMARKS = "REMARKS";
|
||||
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.handle;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ProdReadyTask{" +
|
||||
"handle = " + handle +
|
||||
", site = " + site +
|
||||
", taskNo = " + taskNo +
|
||||
", sfcDispatchBo = " + sfcDispatchBo +
|
||||
", shopOrder = " + shopOrder +
|
||||
", workCenter = " + workCenter +
|
||||
", sfc = " + sfc +
|
||||
", operation = " + operation +
|
||||
", stepId = " + stepId +
|
||||
", item = " + item +
|
||||
", resrce = " + resrce +
|
||||
", reslut = " + reslut +
|
||||
", status = " + status +
|
||||
", createUser = " + createUser +
|
||||
", createdDateTime = " + createdDateTime +
|
||||
", modifyUser = " + modifyUser +
|
||||
", modifiedDateTime = " + modifiedDateTime +
|
||||
", readyUser = " + readyUser +
|
||||
", readyDateTime = " + readyDateTime +
|
||||
", completeDateTime = " + completeDateTime +
|
||||
", completeUser = " + completeUser +
|
||||
", cancelDateTime = " + cancelDateTime +
|
||||
", cancelUser = " + cancelUser +
|
||||
", remarks = " + remarks +
|
||||
"}";
|
||||
}
|
||||
}
|
@ -0,0 +1,185 @@
|
||||
package com.foreverwin.mesnac.common.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import java.io.Serializable;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 生产准备任务明细表
|
||||
* </p>
|
||||
*
|
||||
* @author Philip
|
||||
* @since 2021-06-23
|
||||
*/
|
||||
|
||||
@TableName("Z_PROD_READY_TASK_DETAIL")
|
||||
|
||||
public class ProdReadyTaskDetail extends Model<ProdReadyTaskDetail> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "HANDLE", type = IdType.INPUT)
|
||||
private String handle;
|
||||
/**
|
||||
* 检验任务handle
|
||||
*/
|
||||
@TableField("PROD_READY_TASK_BO")
|
||||
private String prodReadyTaskBo;
|
||||
/**
|
||||
* 检验参数
|
||||
*/
|
||||
@TableField("INSPECTION_ITEM")
|
||||
private String inspectionItem;
|
||||
/**
|
||||
* 检验结果
|
||||
*/
|
||||
@TableField("RESLUT")
|
||||
private String reslut;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("REMARKS")
|
||||
private String remarks;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField("CREATE_USER")
|
||||
private String createUser;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("CREATED_DATE_TIME")
|
||||
private LocalDateTime createdDateTime;
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
@TableField("MODIFY_USER")
|
||||
private String modifyUser;
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@TableField("MODIFIED_DATE_TIME")
|
||||
private LocalDateTime modifiedDateTime;
|
||||
|
||||
|
||||
public String getHandle() {
|
||||
return handle;
|
||||
}
|
||||
|
||||
public void setHandle(String handle) {
|
||||
this.handle = handle;
|
||||
}
|
||||
|
||||
public String getProdReadyTaskBo() {
|
||||
return prodReadyTaskBo;
|
||||
}
|
||||
|
||||
public void setProdReadyTaskBo(String prodReadyTaskBo) {
|
||||
this.prodReadyTaskBo = prodReadyTaskBo;
|
||||
}
|
||||
|
||||
public String getInspectionItem() {
|
||||
return inspectionItem;
|
||||
}
|
||||
|
||||
public void setInspectionItem(String inspectionItem) {
|
||||
this.inspectionItem = inspectionItem;
|
||||
}
|
||||
|
||||
public String getReslut() {
|
||||
return reslut;
|
||||
}
|
||||
|
||||
public void setReslut(String reslut) {
|
||||
this.reslut = reslut;
|
||||
}
|
||||
|
||||
public String getRemarks() {
|
||||
return remarks;
|
||||
}
|
||||
|
||||
public void setRemarks(String remarks) {
|
||||
this.remarks = remarks;
|
||||
}
|
||||
|
||||
public String getCreateUser() {
|
||||
return createUser;
|
||||
}
|
||||
|
||||
public void setCreateUser(String createUser) {
|
||||
this.createUser = createUser;
|
||||
}
|
||||
|
||||
public LocalDateTime getCreatedDateTime() {
|
||||
return createdDateTime;
|
||||
}
|
||||
|
||||
public void setCreatedDateTime(LocalDateTime createdDateTime) {
|
||||
this.createdDateTime = createdDateTime;
|
||||
}
|
||||
|
||||
public String getModifyUser() {
|
||||
return modifyUser;
|
||||
}
|
||||
|
||||
public void setModifyUser(String modifyUser) {
|
||||
this.modifyUser = modifyUser;
|
||||
}
|
||||
|
||||
public LocalDateTime getModifiedDateTime() {
|
||||
return modifiedDateTime;
|
||||
}
|
||||
|
||||
public void setModifiedDateTime(LocalDateTime modifiedDateTime) {
|
||||
this.modifiedDateTime = modifiedDateTime;
|
||||
}
|
||||
|
||||
public static final String HANDLE = "HANDLE";
|
||||
|
||||
public static final String PROD_READY_TASK_BO = "PROD_READY_TASK_BO";
|
||||
|
||||
public static final String INSPECTION_ITEM = "INSPECTION_ITEM";
|
||||
|
||||
public static final String RESLUT = "RESLUT";
|
||||
|
||||
public static final String REMARKS = "REMARKS";
|
||||
|
||||
public static final String CREATE_USER = "CREATE_USER";
|
||||
|
||||
public static final String CREATED_DATE_TIME = "CREATED_DATE_TIME";
|
||||
|
||||
public static final String MODIFY_USER = "MODIFY_USER";
|
||||
|
||||
public static final String MODIFIED_DATE_TIME = "MODIFIED_DATE_TIME";
|
||||
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.handle;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ProdReadyTaskDetail{" +
|
||||
"handle = " + handle +
|
||||
", prodReadyTaskBo = " + prodReadyTaskBo +
|
||||
", inspectionItem = " + inspectionItem +
|
||||
", reslut = " + reslut +
|
||||
", remarks = " + remarks +
|
||||
", createUser = " + createUser +
|
||||
", createdDateTime = " + createdDateTime +
|
||||
", modifyUser = " + modifyUser +
|
||||
", modifiedDateTime = " + modifiedDateTime +
|
||||
"}";
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package com.foreverwin.mesnac.common.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.foreverwin.mesnac.common.model.ProdReadyTaskDetail;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.foreverwin.modular.core.util.FrontPage;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 生产准备任务明细表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author Philip
|
||||
* @since 2021-06-23
|
||||
*/
|
||||
public interface ProdReadyTaskDetailService extends IService<ProdReadyTaskDetail> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param frontPage
|
||||
* @return
|
||||
*/
|
||||
IPage<ProdReadyTaskDetail> selectPage(FrontPage<ProdReadyTaskDetail> frontPage, ProdReadyTaskDetail prodReadyTaskDetail);
|
||||
|
||||
List<ProdReadyTaskDetail> selectList(ProdReadyTaskDetail prodReadyTaskDetail);
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.foreverwin.mesnac.common.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.foreverwin.mesnac.common.model.ProdReadyTask;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.foreverwin.modular.core.util.FrontPage;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 生产准备任务主表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author Philip
|
||||
* @since 2021-06-23
|
||||
*/
|
||||
public interface ProdReadyTaskService extends IService<ProdReadyTask> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param frontPage
|
||||
* @return
|
||||
*/
|
||||
IPage<ProdReadyTask> selectPage(FrontPage<ProdReadyTask> frontPage, ProdReadyTask prodReadyTask);
|
||||
|
||||
List<ProdReadyTask> selectList(ProdReadyTask prodReadyTask);
|
||||
|
||||
void createTask(String sfcDispatchBO, String dispatchStatus, String shopOrder, String sfc,String operation, String resrce, String stepId, String workCenter, String planStartTime);
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
package com.foreverwin.mesnac.common.service.impl;
|
||||
|
||||
import com.foreverwin.modular.core.util.FrontPage;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.foreverwin.mesnac.common.model.ProdReadyTaskDetail;
|
||||
import com.foreverwin.mesnac.common.mapper.ProdReadyTaskDetailMapper;
|
||||
import com.foreverwin.mesnac.common.service.ProdReadyTaskDetailService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
/**
|
||||
* <p>
|
||||
* 生产准备任务明细表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author Philip
|
||||
* @since 2021-06-23
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class ProdReadyTaskDetailServiceImpl extends ServiceImpl<ProdReadyTaskDetailMapper, ProdReadyTaskDetail> implements ProdReadyTaskDetailService {
|
||||
|
||||
|
||||
@Autowired
|
||||
private ProdReadyTaskDetailMapper prodReadyTaskDetailMapper;
|
||||
|
||||
@Override
|
||||
public IPage<ProdReadyTaskDetail> selectPage(FrontPage<ProdReadyTaskDetail> frontPage, ProdReadyTaskDetail prodReadyTaskDetail) {
|
||||
QueryWrapper<ProdReadyTaskDetail> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(prodReadyTaskDetail);
|
||||
return super.page(frontPage.getPagePlus(), queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProdReadyTaskDetail> selectList(ProdReadyTaskDetail prodReadyTaskDetail) {
|
||||
QueryWrapper<ProdReadyTaskDetail> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(prodReadyTaskDetail);
|
||||
return super.list(queryWrapper);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,386 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.foreverwin.mesnac.common.mapper.ProdReadyTaskDetailMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.foreverwin.mesnac.common.model.ProdReadyTaskDetail">
|
||||
<id column="HANDLE" property="handle" />
|
||||
<result column="PROD_READY_TASK_BO" property="prodReadyTaskBo" />
|
||||
<result column="INSPECTION_ITEM" property="inspectionItem" />
|
||||
<result column="RESLUT" property="reslut" />
|
||||
<result column="REMARKS" property="remarks" />
|
||||
<result column="CREATE_USER" property="createUser" />
|
||||
<result column="CREATED_DATE_TIME" property="createdDateTime" />
|
||||
<result column="MODIFY_USER" property="modifyUser" />
|
||||
<result column="MODIFIED_DATE_TIME" property="modifiedDateTime" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
HANDLE, PROD_READY_TASK_BO, INSPECTION_ITEM, RESLUT, REMARKS, CREATE_USER, CREATED_DATE_TIME, MODIFY_USER, MODIFIED_DATE_TIME
|
||||
</sql>
|
||||
|
||||
<!-- BaseMapper标准查询/修改/删除 -->
|
||||
<select id="selectById" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"></include> FROM Z_PROD_READY_TASK_DETAIL WHERE HANDLE=#{handle}
|
||||
</select>
|
||||
|
||||
<select id="selectByMap" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"></include>
|
||||
FROM Z_PROD_READY_TASK_DETAIL
|
||||
<if test="cm!=null and !cm.isEmpty">
|
||||
<where>
|
||||
<foreach collection="cm.keys" item="k" separator="AND">
|
||||
<if test="cm[k] != null">
|
||||
${k} = #{cm[${k}]}
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectBatchIds" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"></include>
|
||||
FROM Z_PROD_READY_TASK_DETAIL WHERE HANDLE IN (
|
||||
<foreach item="item" index="index" collection="coll" separator=",">#{item}
|
||||
</foreach>)
|
||||
</select>
|
||||
|
||||
<select id="selectOne" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"></include> FROM Z_PROD_READY_TASK_DETAIL
|
||||
<where>
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.handle}
|
||||
</if>
|
||||
<if test="ew.entity.prodReadyTaskBo!=null"> AND PROD_READY_TASK_BO=#{ew.entity.prodReadyTaskBo}</if>
|
||||
<if test="ew.entity.inspectionItem!=null"> AND INSPECTION_ITEM=#{ew.entity.inspectionItem}</if>
|
||||
<if test="ew.entity.reslut!=null"> AND RESLUT=#{ew.entity.reslut}</if>
|
||||
<if test="ew.entity.remarks!=null"> AND REMARKS=#{ew.entity.remarks}</if>
|
||||
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCount" resultType="Integer">
|
||||
SELECT COUNT(1) FROM Z_PROD_READY_TASK_DETAIL
|
||||
<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.prodReadyTaskBo!=null"> AND PROD_READY_TASK_BO=#{ew.entity.prodReadyTaskBo}</if>
|
||||
<if test="ew.entity.inspectionItem!=null"> AND INSPECTION_ITEM=#{ew.entity.inspectionItem}</if>
|
||||
<if test="ew.entity.reslut!=null"> AND RESLUT=#{ew.entity.reslut}</if>
|
||||
<if test="ew.entity.remarks!=null"> AND REMARKS=#{ew.entity.remarks}</if>
|
||||
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectList" resultMap="BaseResultMap">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_PROD_READY_TASK_DETAIL
|
||||
<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.prodReadyTaskBo!=null"> AND PROD_READY_TASK_BO=#{ew.entity.prodReadyTaskBo}</if>
|
||||
<if test="ew.entity.inspectionItem!=null"> AND INSPECTION_ITEM=#{ew.entity.inspectionItem}</if>
|
||||
<if test="ew.entity.reslut!=null"> AND RESLUT=#{ew.entity.reslut}</if>
|
||||
<if test="ew.entity.remarks!=null"> AND REMARKS=#{ew.entity.remarks}</if>
|
||||
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectMaps" resultType="HashMap">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_PROD_READY_TASK_DETAIL
|
||||
<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.prodReadyTaskBo!=null"> AND PROD_READY_TASK_BO=#{ew.entity.prodReadyTaskBo}</if>
|
||||
<if test="ew.entity.inspectionItem!=null"> AND INSPECTION_ITEM=#{ew.entity.inspectionItem}</if>
|
||||
<if test="ew.entity.reslut!=null"> AND RESLUT=#{ew.entity.reslut}</if>
|
||||
<if test="ew.entity.remarks!=null"> AND REMARKS=#{ew.entity.remarks}</if>
|
||||
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectObjs" resultType="Object">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_PROD_READY_TASK_DETAIL
|
||||
<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.prodReadyTaskBo!=null"> AND PROD_READY_TASK_BO=#{ew.entity.prodReadyTaskBo}</if>
|
||||
<if test="ew.entity.inspectionItem!=null"> AND INSPECTION_ITEM=#{ew.entity.inspectionItem}</if>
|
||||
<if test="ew.entity.reslut!=null"> AND RESLUT=#{ew.entity.reslut}</if>
|
||||
<if test="ew.entity.remarks!=null"> AND REMARKS=#{ew.entity.remarks}</if>
|
||||
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectPage" resultMap="BaseResultMap">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_PROD_READY_TASK_DETAIL
|
||||
<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.prodReadyTaskBo!=null"> AND PROD_READY_TASK_BO=#{ew.entity.prodReadyTaskBo}</if>
|
||||
<if test="ew.entity.inspectionItem!=null"> AND INSPECTION_ITEM=#{ew.entity.inspectionItem}</if>
|
||||
<if test="ew.entity.reslut!=null"> AND RESLUT=#{ew.entity.reslut}</if>
|
||||
<if test="ew.entity.remarks!=null"> AND REMARKS=#{ew.entity.remarks}</if>
|
||||
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectMapsPage" resultType="HashMap">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_PROD_READY_TASK_DETAIL
|
||||
<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.prodReadyTaskBo!=null"> AND PROD_READY_TASK_BO=#{ew.entity.prodReadyTaskBo}</if>
|
||||
<if test="ew.entity.inspectionItem!=null"> AND INSPECTION_ITEM=#{ew.entity.inspectionItem}</if>
|
||||
<if test="ew.entity.reslut!=null"> AND RESLUT=#{ew.entity.reslut}</if>
|
||||
<if test="ew.entity.remarks!=null"> AND REMARKS=#{ew.entity.remarks}</if>
|
||||
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="com.foreverwin.mesnac.common.model.ProdReadyTaskDetail">
|
||||
INSERT INTO Z_PROD_READY_TASK_DETAIL
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
HANDLE,
|
||||
<if test="prodReadyTaskBo!=null">PROD_READY_TASK_BO,</if>
|
||||
<if test="inspectionItem!=null">INSPECTION_ITEM,</if>
|
||||
<if test="reslut!=null">RESLUT,</if>
|
||||
<if test="remarks!=null">REMARKS,</if>
|
||||
<if test="createUser!=null">CREATE_USER,</if>
|
||||
<if test="createdDateTime!=null">CREATED_DATE_TIME,</if>
|
||||
<if test="modifyUser!=null">MODIFY_USER,</if>
|
||||
<if test="modifiedDateTime!=null">MODIFIED_DATE_TIME,</if>
|
||||
</trim> VALUES
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
#{handle},
|
||||
<if test="prodReadyTaskBo!=null">#{prodReadyTaskBo},</if>
|
||||
<if test="inspectionItem!=null">#{inspectionItem},</if>
|
||||
<if test="reslut!=null">#{reslut},</if>
|
||||
<if test="remarks!=null">#{remarks},</if>
|
||||
<if test="createUser!=null">#{createUser},</if>
|
||||
<if test="createdDateTime!=null">#{createdDateTime},</if>
|
||||
<if test="modifyUser!=null">#{modifyUser},</if>
|
||||
<if test="modifiedDateTime!=null">#{modifiedDateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<insert id="insertAllColumn" parameterType="com.foreverwin.mesnac.common.model.ProdReadyTaskDetail">
|
||||
INSERT INTO Z_PROD_READY_TASK_DETAIL
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<include refid="Base_Column_List"></include>
|
||||
</trim> VALUES
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
#{handle},
|
||||
#{prodReadyTaskBo},
|
||||
#{inspectionItem},
|
||||
#{reslut},
|
||||
#{remarks},
|
||||
#{createUser},
|
||||
#{createdDateTime},
|
||||
#{modifyUser},
|
||||
#{modifiedDateTime},
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
||||
<update id="updateById">
|
||||
UPDATE Z_PROD_READY_TASK_DETAIL <trim prefix="SET" suffixOverrides=",">
|
||||
<if test="et.prodReadyTaskBo!=null">PROD_READY_TASK_BO=#{et.prodReadyTaskBo},</if>
|
||||
<if test="et.inspectionItem!=null">INSPECTION_ITEM=#{et.inspectionItem},</if>
|
||||
<if test="et.reslut!=null">RESLUT=#{et.reslut},</if>
|
||||
<if test="et.remarks!=null">REMARKS=#{et.remarks},</if>
|
||||
<if test="et.createUser!=null">CREATE_USER=#{et.createUser},</if>
|
||||
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
|
||||
<if test="et.modifyUser!=null">MODIFY_USER=#{et.modifyUser},</if>
|
||||
<if test="et.modifiedDateTime!=null">MODIFIED_DATE_TIME=#{et.modifiedDateTime},</if>
|
||||
</trim> WHERE 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_PROD_READY_TASK_DETAIL <trim prefix="SET" suffixOverrides=",">
|
||||
PROD_READY_TASK_BO=#{et.prodReadyTaskBo},
|
||||
INSPECTION_ITEM=#{et.inspectionItem},
|
||||
RESLUT=#{et.reslut},
|
||||
REMARKS=#{et.remarks},
|
||||
CREATE_USER=#{et.createUser},
|
||||
CREATED_DATE_TIME=#{et.createdDateTime},
|
||||
MODIFY_USER=#{et.modifyUser},
|
||||
MODIFIED_DATE_TIME=#{et.modifiedDateTime},
|
||||
</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_PROD_READY_TASK_DETAIL <trim prefix="SET" suffixOverrides=",">
|
||||
<if test="et.prodReadyTaskBo!=null">PROD_READY_TASK_BO=#{et.prodReadyTaskBo},</if>
|
||||
<if test="et.inspectionItem!=null">INSPECTION_ITEM=#{et.inspectionItem},</if>
|
||||
<if test="et.reslut!=null">RESLUT=#{et.reslut},</if>
|
||||
<if test="et.remarks!=null">REMARKS=#{et.remarks},</if>
|
||||
<if test="et.createUser!=null">CREATE_USER=#{et.createUser},</if>
|
||||
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
|
||||
<if test="et.modifyUser!=null">MODIFY_USER=#{et.modifyUser},</if>
|
||||
<if test="et.modifiedDateTime!=null">MODIFIED_DATE_TIME=#{et.modifiedDateTime},</if>
|
||||
</trim>
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
<if test="ew.entity.prodReadyTaskBo!=null"> AND PROD_READY_TASK_BO=#{ew.entity.prodReadyTaskBo}</if>
|
||||
<if test="ew.entity.inspectionItem!=null"> AND INSPECTION_ITEM=#{ew.entity.inspectionItem}</if>
|
||||
<if test="ew.entity.reslut!=null"> AND RESLUT=#{ew.entity.reslut}</if>
|
||||
<if test="ew.entity.remarks!=null"> AND REMARKS=#{ew.entity.remarks}</if>
|
||||
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</update>
|
||||
|
||||
<delete id="deleteById">
|
||||
DELETE FROM Z_PROD_READY_TASK_DETAIL WHERE HANDLE=#{handle}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByMap">
|
||||
DELETE FROM Z_PROD_READY_TASK_DETAIL
|
||||
<if test="cm!=null and !cm.isEmpty">
|
||||
<where>
|
||||
<foreach collection="cm.keys" item="k" separator="AND">
|
||||
<if test="cm[k] != null">
|
||||
${k} = #{cm[${k}]}
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</if>
|
||||
</delete>
|
||||
|
||||
<delete id="delete">
|
||||
DELETE FROM Z_PROD_READY_TASK_DETAIL
|
||||
<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.prodReadyTaskBo!=null"> AND PROD_READY_TASK_BO=#{ew.entity.prodReadyTaskBo}</if>
|
||||
<if test="ew.entity.inspectionItem!=null"> AND INSPECTION_ITEM=#{ew.entity.inspectionItem}</if>
|
||||
<if test="ew.entity.reslut!=null"> AND RESLUT=#{ew.entity.reslut}</if>
|
||||
<if test="ew.entity.remarks!=null"> AND REMARKS=#{ew.entity.remarks}</if>
|
||||
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBatchIds">
|
||||
DELETE FROM Z_PROD_READY_TASK_DETAIL WHERE HANDLE IN (
|
||||
<foreach item="item" index="index" collection="coll" separator=",">#{item}
|
||||
</foreach>)
|
||||
</delete>
|
||||
<!-- BaseMapper标准查询/修改/删除 -->
|
||||
|
||||
</mapper>
|
@ -0,0 +1,626 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.foreverwin.mesnac.common.mapper.ProdReadyTaskMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.foreverwin.mesnac.common.model.ProdReadyTask">
|
||||
<id column="HANDLE" property="handle" />
|
||||
<result column="SITE" property="site" />
|
||||
<result column="TASK_NO" property="taskNo" />
|
||||
<result column="SFC_DISPATCH_BO" property="sfcDispatchBo" />
|
||||
<result column="SHOP_ORDER" property="shopOrder" />
|
||||
<result column="WORK_CENTER" property="workCenter" />
|
||||
<result column="SFC" property="sfc" />
|
||||
<result column="OPERATION" property="operation" />
|
||||
<result column="STEP_ID" property="stepId" />
|
||||
<result column="ITEM" property="item" />
|
||||
<result column="RESRCE" property="resrce" />
|
||||
<result column="RESLUT" property="reslut" />
|
||||
<result column="STATUS" property="status" />
|
||||
<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="READY_USER" property="readyUser" />
|
||||
<result column="READY_DATE_TIME" property="readyDateTime" />
|
||||
<result column="COMPLETE_DATE_TIME" property="completeDateTime" />
|
||||
<result column="COMPLETE_USER" property="completeUser" />
|
||||
<result column="CANCEL_DATE_TIME" property="cancelDateTime" />
|
||||
<result column="CANCEL_USER" property="cancelUser" />
|
||||
<result column="REMARKS" property="remarks" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
HANDLE, SITE, TASK_NO, SFC_DISPATCH_BO, SHOP_ORDER, WORK_CENTER, SFC, OPERATION, STEP_ID, ITEM, RESRCE, RESLUT, STATUS, CREATE_USER, CREATED_DATE_TIME, MODIFY_USER, MODIFIED_DATE_TIME, READY_USER, READY_DATE_TIME, COMPLETE_DATE_TIME, COMPLETE_USER, CANCEL_DATE_TIME, CANCEL_USER, REMARKS
|
||||
</sql>
|
||||
|
||||
<!-- BaseMapper标准查询/修改/删除 -->
|
||||
<select id="selectById" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"></include> FROM Z_PROD_READY_TASK WHERE HANDLE=#{handle}
|
||||
</select>
|
||||
|
||||
<select id="selectByMap" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"></include>
|
||||
FROM Z_PROD_READY_TASK
|
||||
<if test="cm!=null and !cm.isEmpty">
|
||||
<where>
|
||||
<foreach collection="cm.keys" item="k" separator="AND">
|
||||
<if test="cm[k] != null">
|
||||
${k} = #{cm[${k}]}
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectBatchIds" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"></include>
|
||||
FROM Z_PROD_READY_TASK WHERE HANDLE IN (
|
||||
<foreach item="item" index="index" collection="coll" separator=",">#{item}
|
||||
</foreach>)
|
||||
</select>
|
||||
|
||||
<select id="selectOne" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"></include> FROM Z_PROD_READY_TASK
|
||||
<where>
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.handle}
|
||||
</if>
|
||||
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||||
<if test="ew.entity.taskNo!=null"> AND TASK_NO=#{ew.entity.taskNo}</if>
|
||||
<if test="ew.entity.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
|
||||
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</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.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.item!=null"> AND ITEM=#{ew.entity.item}</if>
|
||||
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
|
||||
<if test="ew.entity.reslut!=null"> AND RESLUT=#{ew.entity.reslut}</if>
|
||||
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</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.readyUser!=null"> AND READY_USER=#{ew.entity.readyUser}</if>
|
||||
<if test="ew.entity.readyDateTime!=null"> AND READY_DATE_TIME=#{ew.entity.readyDateTime}</if>
|
||||
<if test="ew.entity.completeDateTime!=null"> AND COMPLETE_DATE_TIME=#{ew.entity.completeDateTime}</if>
|
||||
<if test="ew.entity.completeUser!=null"> AND COMPLETE_USER=#{ew.entity.completeUser}</if>
|
||||
<if test="ew.entity.cancelDateTime!=null"> AND CANCEL_DATE_TIME=#{ew.entity.cancelDateTime}</if>
|
||||
<if test="ew.entity.cancelUser!=null"> AND CANCEL_USER=#{ew.entity.cancelUser}</if>
|
||||
<if test="ew.entity.remarks!=null"> AND REMARKS=#{ew.entity.remarks}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCount" resultType="Integer">
|
||||
SELECT COUNT(1) FROM Z_PROD_READY_TASK
|
||||
<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.taskNo!=null"> AND TASK_NO=#{ew.entity.taskNo}</if>
|
||||
<if test="ew.entity.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
|
||||
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</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.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.item!=null"> AND ITEM=#{ew.entity.item}</if>
|
||||
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
|
||||
<if test="ew.entity.reslut!=null"> AND RESLUT=#{ew.entity.reslut}</if>
|
||||
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</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.readyUser!=null"> AND READY_USER=#{ew.entity.readyUser}</if>
|
||||
<if test="ew.entity.readyDateTime!=null"> AND READY_DATE_TIME=#{ew.entity.readyDateTime}</if>
|
||||
<if test="ew.entity.completeDateTime!=null"> AND COMPLETE_DATE_TIME=#{ew.entity.completeDateTime}</if>
|
||||
<if test="ew.entity.completeUser!=null"> AND COMPLETE_USER=#{ew.entity.completeUser}</if>
|
||||
<if test="ew.entity.cancelDateTime!=null"> AND CANCEL_DATE_TIME=#{ew.entity.cancelDateTime}</if>
|
||||
<if test="ew.entity.cancelUser!=null"> AND CANCEL_USER=#{ew.entity.cancelUser}</if>
|
||||
<if test="ew.entity.remarks!=null"> AND REMARKS=#{ew.entity.remarks}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectList" resultMap="BaseResultMap">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_PROD_READY_TASK
|
||||
<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.taskNo!=null"> AND TASK_NO=#{ew.entity.taskNo}</if>
|
||||
<if test="ew.entity.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
|
||||
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</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.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.item!=null"> AND ITEM=#{ew.entity.item}</if>
|
||||
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
|
||||
<if test="ew.entity.reslut!=null"> AND RESLUT=#{ew.entity.reslut}</if>
|
||||
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</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.readyUser!=null"> AND READY_USER=#{ew.entity.readyUser}</if>
|
||||
<if test="ew.entity.readyDateTime!=null"> AND READY_DATE_TIME=#{ew.entity.readyDateTime}</if>
|
||||
<if test="ew.entity.completeDateTime!=null"> AND COMPLETE_DATE_TIME=#{ew.entity.completeDateTime}</if>
|
||||
<if test="ew.entity.completeUser!=null"> AND COMPLETE_USER=#{ew.entity.completeUser}</if>
|
||||
<if test="ew.entity.cancelDateTime!=null"> AND CANCEL_DATE_TIME=#{ew.entity.cancelDateTime}</if>
|
||||
<if test="ew.entity.cancelUser!=null"> AND CANCEL_USER=#{ew.entity.cancelUser}</if>
|
||||
<if test="ew.entity.remarks!=null"> AND REMARKS=#{ew.entity.remarks}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectMaps" resultType="HashMap">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_PROD_READY_TASK
|
||||
<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.taskNo!=null"> AND TASK_NO=#{ew.entity.taskNo}</if>
|
||||
<if test="ew.entity.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
|
||||
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</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.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.item!=null"> AND ITEM=#{ew.entity.item}</if>
|
||||
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
|
||||
<if test="ew.entity.reslut!=null"> AND RESLUT=#{ew.entity.reslut}</if>
|
||||
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</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.readyUser!=null"> AND READY_USER=#{ew.entity.readyUser}</if>
|
||||
<if test="ew.entity.readyDateTime!=null"> AND READY_DATE_TIME=#{ew.entity.readyDateTime}</if>
|
||||
<if test="ew.entity.completeDateTime!=null"> AND COMPLETE_DATE_TIME=#{ew.entity.completeDateTime}</if>
|
||||
<if test="ew.entity.completeUser!=null"> AND COMPLETE_USER=#{ew.entity.completeUser}</if>
|
||||
<if test="ew.entity.cancelDateTime!=null"> AND CANCEL_DATE_TIME=#{ew.entity.cancelDateTime}</if>
|
||||
<if test="ew.entity.cancelUser!=null"> AND CANCEL_USER=#{ew.entity.cancelUser}</if>
|
||||
<if test="ew.entity.remarks!=null"> AND REMARKS=#{ew.entity.remarks}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectObjs" resultType="Object">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_PROD_READY_TASK
|
||||
<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.taskNo!=null"> AND TASK_NO=#{ew.entity.taskNo}</if>
|
||||
<if test="ew.entity.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
|
||||
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</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.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.item!=null"> AND ITEM=#{ew.entity.item}</if>
|
||||
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
|
||||
<if test="ew.entity.reslut!=null"> AND RESLUT=#{ew.entity.reslut}</if>
|
||||
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</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.readyUser!=null"> AND READY_USER=#{ew.entity.readyUser}</if>
|
||||
<if test="ew.entity.readyDateTime!=null"> AND READY_DATE_TIME=#{ew.entity.readyDateTime}</if>
|
||||
<if test="ew.entity.completeDateTime!=null"> AND COMPLETE_DATE_TIME=#{ew.entity.completeDateTime}</if>
|
||||
<if test="ew.entity.completeUser!=null"> AND COMPLETE_USER=#{ew.entity.completeUser}</if>
|
||||
<if test="ew.entity.cancelDateTime!=null"> AND CANCEL_DATE_TIME=#{ew.entity.cancelDateTime}</if>
|
||||
<if test="ew.entity.cancelUser!=null"> AND CANCEL_USER=#{ew.entity.cancelUser}</if>
|
||||
<if test="ew.entity.remarks!=null"> AND REMARKS=#{ew.entity.remarks}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectPage" resultMap="BaseResultMap">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_PROD_READY_TASK
|
||||
<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.taskNo!=null"> AND TASK_NO=#{ew.entity.taskNo}</if>
|
||||
<if test="ew.entity.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
|
||||
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</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.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.item!=null"> AND ITEM=#{ew.entity.item}</if>
|
||||
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
|
||||
<if test="ew.entity.reslut!=null"> AND RESLUT=#{ew.entity.reslut}</if>
|
||||
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</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.readyUser!=null"> AND READY_USER=#{ew.entity.readyUser}</if>
|
||||
<if test="ew.entity.readyDateTime!=null"> AND READY_DATE_TIME=#{ew.entity.readyDateTime}</if>
|
||||
<if test="ew.entity.completeDateTime!=null"> AND COMPLETE_DATE_TIME=#{ew.entity.completeDateTime}</if>
|
||||
<if test="ew.entity.completeUser!=null"> AND COMPLETE_USER=#{ew.entity.completeUser}</if>
|
||||
<if test="ew.entity.cancelDateTime!=null"> AND CANCEL_DATE_TIME=#{ew.entity.cancelDateTime}</if>
|
||||
<if test="ew.entity.cancelUser!=null"> AND CANCEL_USER=#{ew.entity.cancelUser}</if>
|
||||
<if test="ew.entity.remarks!=null"> AND REMARKS=#{ew.entity.remarks}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectMapsPage" resultType="HashMap">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_PROD_READY_TASK
|
||||
<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.taskNo!=null"> AND TASK_NO=#{ew.entity.taskNo}</if>
|
||||
<if test="ew.entity.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
|
||||
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</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.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.item!=null"> AND ITEM=#{ew.entity.item}</if>
|
||||
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
|
||||
<if test="ew.entity.reslut!=null"> AND RESLUT=#{ew.entity.reslut}</if>
|
||||
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</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.readyUser!=null"> AND READY_USER=#{ew.entity.readyUser}</if>
|
||||
<if test="ew.entity.readyDateTime!=null"> AND READY_DATE_TIME=#{ew.entity.readyDateTime}</if>
|
||||
<if test="ew.entity.completeDateTime!=null"> AND COMPLETE_DATE_TIME=#{ew.entity.completeDateTime}</if>
|
||||
<if test="ew.entity.completeUser!=null"> AND COMPLETE_USER=#{ew.entity.completeUser}</if>
|
||||
<if test="ew.entity.cancelDateTime!=null"> AND CANCEL_DATE_TIME=#{ew.entity.cancelDateTime}</if>
|
||||
<if test="ew.entity.cancelUser!=null"> AND CANCEL_USER=#{ew.entity.cancelUser}</if>
|
||||
<if test="ew.entity.remarks!=null"> AND REMARKS=#{ew.entity.remarks}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="com.foreverwin.mesnac.common.model.ProdReadyTask">
|
||||
INSERT INTO Z_PROD_READY_TASK
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
HANDLE,
|
||||
<if test="site!=null">SITE,</if>
|
||||
<if test="taskNo!=null">TASK_NO,</if>
|
||||
<if test="sfcDispatchBo!=null">SFC_DISPATCH_BO,</if>
|
||||
<if test="shopOrder!=null">SHOP_ORDER,</if>
|
||||
<if test="workCenter!=null">WORK_CENTER,</if>
|
||||
<if test="sfc!=null">SFC,</if>
|
||||
<if test="operation!=null">OPERATION,</if>
|
||||
<if test="stepId!=null">STEP_ID,</if>
|
||||
<if test="item!=null">ITEM,</if>
|
||||
<if test="resrce!=null">RESRCE,</if>
|
||||
<if test="reslut!=null">RESLUT,</if>
|
||||
<if test="status!=null">STATUS,</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="readyUser!=null">READY_USER,</if>
|
||||
<if test="readyDateTime!=null">READY_DATE_TIME,</if>
|
||||
<if test="completeDateTime!=null">COMPLETE_DATE_TIME,</if>
|
||||
<if test="completeUser!=null">COMPLETE_USER,</if>
|
||||
<if test="cancelDateTime!=null">CANCEL_DATE_TIME,</if>
|
||||
<if test="cancelUser!=null">CANCEL_USER,</if>
|
||||
<if test="remarks!=null">REMARKS,</if>
|
||||
</trim> VALUES
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
#{handle},
|
||||
<if test="site!=null">#{site},</if>
|
||||
<if test="taskNo!=null">#{taskNo},</if>
|
||||
<if test="sfcDispatchBo!=null">#{sfcDispatchBo},</if>
|
||||
<if test="shopOrder!=null">#{shopOrder},</if>
|
||||
<if test="workCenter!=null">#{workCenter},</if>
|
||||
<if test="sfc!=null">#{sfc},</if>
|
||||
<if test="operation!=null">#{operation},</if>
|
||||
<if test="stepId!=null">#{stepId},</if>
|
||||
<if test="item!=null">#{item},</if>
|
||||
<if test="resrce!=null">#{resrce},</if>
|
||||
<if test="reslut!=null">#{reslut},</if>
|
||||
<if test="status!=null">#{status},</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="readyUser!=null">#{readyUser},</if>
|
||||
<if test="readyDateTime!=null">#{readyDateTime},</if>
|
||||
<if test="completeDateTime!=null">#{completeDateTime},</if>
|
||||
<if test="completeUser!=null">#{completeUser},</if>
|
||||
<if test="cancelDateTime!=null">#{cancelDateTime},</if>
|
||||
<if test="cancelUser!=null">#{cancelUser},</if>
|
||||
<if test="remarks!=null">#{remarks},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<insert id="insertAllColumn" parameterType="com.foreverwin.mesnac.common.model.ProdReadyTask">
|
||||
INSERT INTO Z_PROD_READY_TASK
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<include refid="Base_Column_List"></include>
|
||||
</trim> VALUES
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
#{handle},
|
||||
#{site},
|
||||
#{taskNo},
|
||||
#{sfcDispatchBo},
|
||||
#{shopOrder},
|
||||
#{workCenter},
|
||||
#{sfc},
|
||||
#{operation},
|
||||
#{stepId},
|
||||
#{item},
|
||||
#{resrce},
|
||||
#{reslut},
|
||||
#{status},
|
||||
#{createUser},
|
||||
#{createdDateTime},
|
||||
#{modifyUser},
|
||||
#{modifiedDateTime},
|
||||
#{readyUser},
|
||||
#{readyDateTime},
|
||||
#{completeDateTime},
|
||||
#{completeUser},
|
||||
#{cancelDateTime},
|
||||
#{cancelUser},
|
||||
#{remarks},
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
||||
<update id="updateById">
|
||||
UPDATE Z_PROD_READY_TASK <trim prefix="SET" suffixOverrides=",">
|
||||
<if test="et.site!=null">SITE=#{et.site},</if>
|
||||
<if test="et.taskNo!=null">TASK_NO=#{et.taskNo},</if>
|
||||
<if test="et.sfcDispatchBo!=null">SFC_DISPATCH_BO=#{et.sfcDispatchBo},</if>
|
||||
<if test="et.shopOrder!=null">SHOP_ORDER=#{et.shopOrder},</if>
|
||||
<if test="et.workCenter!=null">WORK_CENTER=#{et.workCenter},</if>
|
||||
<if test="et.sfc!=null">SFC=#{et.sfc},</if>
|
||||
<if test="et.operation!=null">OPERATION=#{et.operation},</if>
|
||||
<if test="et.stepId!=null">STEP_ID=#{et.stepId},</if>
|
||||
<if test="et.item!=null">ITEM=#{et.item},</if>
|
||||
<if test="et.resrce!=null">RESRCE=#{et.resrce},</if>
|
||||
<if test="et.reslut!=null">RESLUT=#{et.reslut},</if>
|
||||
<if test="et.status!=null">STATUS=#{et.status},</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.readyUser!=null">READY_USER=#{et.readyUser},</if>
|
||||
<if test="et.readyDateTime!=null">READY_DATE_TIME=#{et.readyDateTime},</if>
|
||||
<if test="et.completeDateTime!=null">COMPLETE_DATE_TIME=#{et.completeDateTime},</if>
|
||||
<if test="et.completeUser!=null">COMPLETE_USER=#{et.completeUser},</if>
|
||||
<if test="et.cancelDateTime!=null">CANCEL_DATE_TIME=#{et.cancelDateTime},</if>
|
||||
<if test="et.cancelUser!=null">CANCEL_USER=#{et.cancelUser},</if>
|
||||
<if test="et.remarks!=null">REMARKS=#{et.remarks},</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_PROD_READY_TASK <trim prefix="SET" suffixOverrides=",">
|
||||
SITE=#{et.site},
|
||||
TASK_NO=#{et.taskNo},
|
||||
SFC_DISPATCH_BO=#{et.sfcDispatchBo},
|
||||
SHOP_ORDER=#{et.shopOrder},
|
||||
WORK_CENTER=#{et.workCenter},
|
||||
SFC=#{et.sfc},
|
||||
OPERATION=#{et.operation},
|
||||
STEP_ID=#{et.stepId},
|
||||
ITEM=#{et.item},
|
||||
RESRCE=#{et.resrce},
|
||||
RESLUT=#{et.reslut},
|
||||
STATUS=#{et.status},
|
||||
CREATE_USER=#{et.createUser},
|
||||
CREATED_DATE_TIME=#{et.createdDateTime},
|
||||
MODIFY_USER=#{et.modifyUser},
|
||||
MODIFIED_DATE_TIME=#{et.modifiedDateTime},
|
||||
READY_USER=#{et.readyUser},
|
||||
READY_DATE_TIME=#{et.readyDateTime},
|
||||
COMPLETE_DATE_TIME=#{et.completeDateTime},
|
||||
COMPLETE_USER=#{et.completeUser},
|
||||
CANCEL_DATE_TIME=#{et.cancelDateTime},
|
||||
CANCEL_USER=#{et.cancelUser},
|
||||
REMARKS=#{et.remarks},
|
||||
</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_PROD_READY_TASK <trim prefix="SET" suffixOverrides=",">
|
||||
<if test="et.site!=null">SITE=#{et.site},</if>
|
||||
<if test="et.taskNo!=null">TASK_NO=#{et.taskNo},</if>
|
||||
<if test="et.sfcDispatchBo!=null">SFC_DISPATCH_BO=#{et.sfcDispatchBo},</if>
|
||||
<if test="et.shopOrder!=null">SHOP_ORDER=#{et.shopOrder},</if>
|
||||
<if test="et.workCenter!=null">WORK_CENTER=#{et.workCenter},</if>
|
||||
<if test="et.sfc!=null">SFC=#{et.sfc},</if>
|
||||
<if test="et.operation!=null">OPERATION=#{et.operation},</if>
|
||||
<if test="et.stepId!=null">STEP_ID=#{et.stepId},</if>
|
||||
<if test="et.item!=null">ITEM=#{et.item},</if>
|
||||
<if test="et.resrce!=null">RESRCE=#{et.resrce},</if>
|
||||
<if test="et.reslut!=null">RESLUT=#{et.reslut},</if>
|
||||
<if test="et.status!=null">STATUS=#{et.status},</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.readyUser!=null">READY_USER=#{et.readyUser},</if>
|
||||
<if test="et.readyDateTime!=null">READY_DATE_TIME=#{et.readyDateTime},</if>
|
||||
<if test="et.completeDateTime!=null">COMPLETE_DATE_TIME=#{et.completeDateTime},</if>
|
||||
<if test="et.completeUser!=null">COMPLETE_USER=#{et.completeUser},</if>
|
||||
<if test="et.cancelDateTime!=null">CANCEL_DATE_TIME=#{et.cancelDateTime},</if>
|
||||
<if test="et.cancelUser!=null">CANCEL_USER=#{et.cancelUser},</if>
|
||||
<if test="et.remarks!=null">REMARKS=#{et.remarks},</if>
|
||||
</trim>
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||||
<if test="ew.entity.taskNo!=null"> AND TASK_NO=#{ew.entity.taskNo}</if>
|
||||
<if test="ew.entity.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
|
||||
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</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.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.item!=null"> AND ITEM=#{ew.entity.item}</if>
|
||||
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
|
||||
<if test="ew.entity.reslut!=null"> AND RESLUT=#{ew.entity.reslut}</if>
|
||||
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</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.readyUser!=null"> AND READY_USER=#{ew.entity.readyUser}</if>
|
||||
<if test="ew.entity.readyDateTime!=null"> AND READY_DATE_TIME=#{ew.entity.readyDateTime}</if>
|
||||
<if test="ew.entity.completeDateTime!=null"> AND COMPLETE_DATE_TIME=#{ew.entity.completeDateTime}</if>
|
||||
<if test="ew.entity.completeUser!=null"> AND COMPLETE_USER=#{ew.entity.completeUser}</if>
|
||||
<if test="ew.entity.cancelDateTime!=null"> AND CANCEL_DATE_TIME=#{ew.entity.cancelDateTime}</if>
|
||||
<if test="ew.entity.cancelUser!=null"> AND CANCEL_USER=#{ew.entity.cancelUser}</if>
|
||||
<if test="ew.entity.remarks!=null"> AND REMARKS=#{ew.entity.remarks}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</update>
|
||||
|
||||
<delete id="deleteById">
|
||||
DELETE FROM Z_PROD_READY_TASK WHERE HANDLE=#{handle}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByMap">
|
||||
DELETE FROM Z_PROD_READY_TASK
|
||||
<if test="cm!=null and !cm.isEmpty">
|
||||
<where>
|
||||
<foreach collection="cm.keys" item="k" separator="AND">
|
||||
<if test="cm[k] != null">
|
||||
${k} = #{cm[${k}]}
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</if>
|
||||
</delete>
|
||||
|
||||
<delete id="delete">
|
||||
DELETE FROM Z_PROD_READY_TASK
|
||||
<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.taskNo!=null"> AND TASK_NO=#{ew.entity.taskNo}</if>
|
||||
<if test="ew.entity.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
|
||||
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</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.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.item!=null"> AND ITEM=#{ew.entity.item}</if>
|
||||
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
|
||||
<if test="ew.entity.reslut!=null"> AND RESLUT=#{ew.entity.reslut}</if>
|
||||
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</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.readyUser!=null"> AND READY_USER=#{ew.entity.readyUser}</if>
|
||||
<if test="ew.entity.readyDateTime!=null"> AND READY_DATE_TIME=#{ew.entity.readyDateTime}</if>
|
||||
<if test="ew.entity.completeDateTime!=null"> AND COMPLETE_DATE_TIME=#{ew.entity.completeDateTime}</if>
|
||||
<if test="ew.entity.completeUser!=null"> AND COMPLETE_USER=#{ew.entity.completeUser}</if>
|
||||
<if test="ew.entity.cancelDateTime!=null"> AND CANCEL_DATE_TIME=#{ew.entity.cancelDateTime}</if>
|
||||
<if test="ew.entity.cancelUser!=null"> AND CANCEL_USER=#{ew.entity.cancelUser}</if>
|
||||
<if test="ew.entity.remarks!=null"> AND REMARKS=#{ew.entity.remarks}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBatchIds">
|
||||
DELETE FROM Z_PROD_READY_TASK WHERE HANDLE IN (
|
||||
<foreach item="item" index="index" collection="coll" separator=",">#{item}
|
||||
</foreach>)
|
||||
</delete>
|
||||
<!-- BaseMapper标准查询/修改/删除 -->
|
||||
|
||||
</mapper>
|
@ -0,0 +1,33 @@
|
||||
package com.foreverwin.mesnac.meapi.dto;
|
||||
|
||||
import com.foreverwin.mesnac.meapi.model.BomComponent;
|
||||
|
||||
public class BomComponentDto extends BomComponent {
|
||||
String accessoryType;
|
||||
String stepId;
|
||||
String operation;
|
||||
|
||||
public String getOperation() {
|
||||
return operation;
|
||||
}
|
||||
|
||||
public void setOperation(String operation) {
|
||||
this.operation = operation;
|
||||
}
|
||||
|
||||
public String getAccessoryType() {
|
||||
return accessoryType;
|
||||
}
|
||||
|
||||
public void setAccessoryType(String accessoryType) {
|
||||
this.accessoryType = accessoryType;
|
||||
}
|
||||
|
||||
public String getStepId() {
|
||||
return stepId;
|
||||
}
|
||||
|
||||
public void setStepId(String stepId) {
|
||||
this.stepId = stepId;
|
||||
}
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
package com.foreverwin.mesnac.meapi.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.foreverwin.mesnac.meapi.dto.BomComponentDto;
|
||||
import com.foreverwin.mesnac.meapi.model.BomComponent;
|
||||
import com.foreverwin.mesnac.meapi.model.CustomFields;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author Ervin Chen
|
||||
* @since 2020-10-19
|
||||
*/
|
||||
@Repository
|
||||
public interface BomComponentMapper extends BaseMapper<BomComponent> {
|
||||
|
||||
List<BomComponent> selectBomComponentByOperation(@Param("bomBo") String bomBo, @Param("operationBo") String operationBo);
|
||||
|
||||
List<BomComponent> selectByBomBo(@Param("locale") String locale, @Param("bomBo") String bomBo);
|
||||
|
||||
List<BomComponent> selectListByShopOrderBo(@Param("shopOrderBo") String shopOrderBo);
|
||||
|
||||
List<BomComponent> selectListByShopOrderBoItemBo(@Param("shopOrderBo") String shopOrderBo, @Param("itemBo") String itemBo, @Param("item") String item);
|
||||
|
||||
List<BomComponent> selectListBySfcBoOAndOperationBo(@Param("sfcBo") String sfcBo, @Param("operationBo") String operationBo);
|
||||
|
||||
CustomFields getBomComponentMainFlag(@Param("bomBo") String bomBo, @Param("componentBo") String componentBo);
|
||||
|
||||
|
||||
Integer selectNeedAssemblyQty(@Param("bomBo") String bomBo, @Param("operationBo") String operationBo);
|
||||
|
||||
List<BomComponent> selectListByBomBoAndBomItemNo(@Param("bomBo") String bomBo, @Param("bomItemNoList") List<String> bomItemNoList);
|
||||
|
||||
List<BomComponent> selectShopOrderBomComponentByWorkCenterBo(@Param("workCenterBO") String workCenterBO);
|
||||
|
||||
List<BomComponentDto> getSfcBomComponent(@Param("site")String site, @Param("sfcBo")String sfcBo);
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.foreverwin.mesnac.meapi.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.foreverwin.mesnac.meapi.model.Bom;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author Ervin Chen
|
||||
* @since 2020-10-19
|
||||
*/
|
||||
@Repository
|
||||
public interface BomMapper extends BaseMapper<Bom> {
|
||||
List<Bom> getBomByItem(@Param("site") String site, @Param("item") String item);
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.foreverwin.mesnac.meapi.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.foreverwin.mesnac.meapi.model.BomOperation;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author Ervin Chen
|
||||
* @since 2020-10-19
|
||||
*/
|
||||
@Repository
|
||||
public interface BomOperationMapper extends BaseMapper<BomOperation> {
|
||||
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.foreverwin.mesnac.meapi.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.foreverwin.mesnac.meapi.model.SfcBom;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author Philip
|
||||
* @since 2021-06-23
|
||||
*/
|
||||
@Repository
|
||||
public interface SfcBomMapper extends BaseMapper<SfcBom> {
|
||||
|
||||
}
|
@ -0,0 +1,348 @@
|
||||
package com.foreverwin.mesnac.meapi.model;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author Philip
|
||||
* @since 2021-6-23
|
||||
*/
|
||||
|
||||
@TableName("BOM")
|
||||
|
||||
public class Bom extends Model<Bom> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "HANDLE", type = IdType.INPUT)
|
||||
private String handle;
|
||||
@TableField("CHANGE_STAMP")
|
||||
private Long changeStamp;
|
||||
@TableField("SITE")
|
||||
private String site;
|
||||
@TableField("BOM")
|
||||
private String bom;
|
||||
@TableField("BOM_TYPE")
|
||||
private String bomType;
|
||||
@TableField("DESCRIPTION")
|
||||
private String description;
|
||||
@TableField("STATUS_BO")
|
||||
private String statusBo;
|
||||
@TableField("TMP_BOM")
|
||||
private String tmpBom;
|
||||
@TableField("COPIED_FROM_BOM_BO")
|
||||
private String copiedFromBomBo;
|
||||
@TableField("REVISION")
|
||||
private String revision;
|
||||
@TableField("CURRENT_REVISION")
|
||||
private String currentRevision;
|
||||
@TableField("BOM_TEMPLATE")
|
||||
private String bomTemplate;
|
||||
@TableField("HAS_BEEN_RELEASED")
|
||||
private String hasBeenReleased;
|
||||
@TableField("EFF_START_DATE")
|
||||
private LocalDateTime effStartDate;
|
||||
@TableField("EFF_END_DATE")
|
||||
private LocalDateTime effEndDate;
|
||||
@TableField("EFFECTIVITY_CONTROL")
|
||||
private String effectivityControl;
|
||||
@TableField("PREV_SITE")
|
||||
private String prevSite;
|
||||
@TableField("ORIGINAL_TRANSFER_KEY")
|
||||
private String originalTransferKey;
|
||||
@TableField("ERP_BILL_OF_MATERIAL")
|
||||
private String erpBillOfMaterial;
|
||||
@TableField("CREATED_DATE_TIME")
|
||||
private LocalDateTime createdDateTime;
|
||||
@TableField("MODIFIED_DATE_TIME")
|
||||
private LocalDateTime modifiedDateTime;
|
||||
@TableField("PARTITION_DATE")
|
||||
private LocalDateTime partitionDate;
|
||||
@TableField("MODEL")
|
||||
private String model;
|
||||
@TableField(exist = false)
|
||||
private List<BomComponent> bomComponentList;
|
||||
|
||||
public List<BomComponent> getBomComponentList() {
|
||||
return bomComponentList;
|
||||
}
|
||||
|
||||
public void setBomComponentList(List<BomComponent> bomComponentList) {
|
||||
this.bomComponentList = bomComponentList;
|
||||
}
|
||||
|
||||
public String getHandle() {
|
||||
return handle;
|
||||
}
|
||||
|
||||
public void setHandle(String handle) {
|
||||
this.handle = handle;
|
||||
}
|
||||
|
||||
public Long getChangeStamp() {
|
||||
return changeStamp;
|
||||
}
|
||||
|
||||
public void setChangeStamp(Long changeStamp) {
|
||||
this.changeStamp = changeStamp;
|
||||
}
|
||||
|
||||
public String getSite() {
|
||||
return site;
|
||||
}
|
||||
|
||||
public void setSite(String site) {
|
||||
this.site = site;
|
||||
}
|
||||
|
||||
public String getBom() {
|
||||
return bom;
|
||||
}
|
||||
|
||||
public void setBom(String bom) {
|
||||
this.bom = bom;
|
||||
}
|
||||
|
||||
public String getBomType() {
|
||||
return bomType;
|
||||
}
|
||||
|
||||
public void setBomType(String bomType) {
|
||||
this.bomType = bomType;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getStatusBo() {
|
||||
return statusBo;
|
||||
}
|
||||
|
||||
public void setStatusBo(String statusBo) {
|
||||
this.statusBo = statusBo;
|
||||
}
|
||||
|
||||
public String getTmpBom() {
|
||||
return tmpBom;
|
||||
}
|
||||
|
||||
public void setTmpBom(String tmpBom) {
|
||||
this.tmpBom = tmpBom;
|
||||
}
|
||||
|
||||
public String getCopiedFromBomBo() {
|
||||
return copiedFromBomBo;
|
||||
}
|
||||
|
||||
public void setCopiedFromBomBo(String copiedFromBomBo) {
|
||||
this.copiedFromBomBo = copiedFromBomBo;
|
||||
}
|
||||
|
||||
public String getRevision() {
|
||||
return revision;
|
||||
}
|
||||
|
||||
public void setRevision(String revision) {
|
||||
this.revision = revision;
|
||||
}
|
||||
|
||||
public String getCurrentRevision() {
|
||||
return currentRevision;
|
||||
}
|
||||
|
||||
public void setCurrentRevision(String currentRevision) {
|
||||
this.currentRevision = currentRevision;
|
||||
}
|
||||
|
||||
public String getBomTemplate() {
|
||||
return bomTemplate;
|
||||
}
|
||||
|
||||
public void setBomTemplate(String bomTemplate) {
|
||||
this.bomTemplate = bomTemplate;
|
||||
}
|
||||
|
||||
public String getHasBeenReleased() {
|
||||
return hasBeenReleased;
|
||||
}
|
||||
|
||||
public void setHasBeenReleased(String hasBeenReleased) {
|
||||
this.hasBeenReleased = hasBeenReleased;
|
||||
}
|
||||
|
||||
public LocalDateTime getEffStartDate() {
|
||||
return effStartDate;
|
||||
}
|
||||
|
||||
public void setEffStartDate(LocalDateTime effStartDate) {
|
||||
this.effStartDate = effStartDate;
|
||||
}
|
||||
|
||||
public LocalDateTime getEffEndDate() {
|
||||
return effEndDate;
|
||||
}
|
||||
|
||||
public void setEffEndDate(LocalDateTime effEndDate) {
|
||||
this.effEndDate = effEndDate;
|
||||
}
|
||||
|
||||
public String getEffectivityControl() {
|
||||
return effectivityControl;
|
||||
}
|
||||
|
||||
public void setEffectivityControl(String effectivityControl) {
|
||||
this.effectivityControl = effectivityControl;
|
||||
}
|
||||
|
||||
public String getPrevSite() {
|
||||
return prevSite;
|
||||
}
|
||||
|
||||
public void setPrevSite(String prevSite) {
|
||||
this.prevSite = prevSite;
|
||||
}
|
||||
|
||||
public String getOriginalTransferKey() {
|
||||
return originalTransferKey;
|
||||
}
|
||||
|
||||
public void setOriginalTransferKey(String originalTransferKey) {
|
||||
this.originalTransferKey = originalTransferKey;
|
||||
}
|
||||
|
||||
public String getErpBillOfMaterial() {
|
||||
return erpBillOfMaterial;
|
||||
}
|
||||
|
||||
public void setErpBillOfMaterial(String erpBillOfMaterial) {
|
||||
this.erpBillOfMaterial = erpBillOfMaterial;
|
||||
}
|
||||
|
||||
public LocalDateTime getCreatedDateTime() {
|
||||
return createdDateTime;
|
||||
}
|
||||
|
||||
public void setCreatedDateTime(LocalDateTime createdDateTime) {
|
||||
this.createdDateTime = createdDateTime;
|
||||
}
|
||||
|
||||
public LocalDateTime getModifiedDateTime() {
|
||||
return modifiedDateTime;
|
||||
}
|
||||
|
||||
public void setModifiedDateTime(LocalDateTime modifiedDateTime) {
|
||||
this.modifiedDateTime = modifiedDateTime;
|
||||
}
|
||||
|
||||
public LocalDateTime getPartitionDate() {
|
||||
return partitionDate;
|
||||
}
|
||||
|
||||
public void setPartitionDate(LocalDateTime partitionDate) {
|
||||
this.partitionDate = partitionDate;
|
||||
}
|
||||
|
||||
public String getModel() {
|
||||
return model;
|
||||
}
|
||||
|
||||
public void setModel(String model) {
|
||||
this.model = model;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.handle;
|
||||
}
|
||||
|
||||
public static final String HANDLE = "HANDLE";
|
||||
|
||||
public static final String CHANGE_STAMP = "CHANGE_STAMP";
|
||||
|
||||
public static final String SITE = "SITE";
|
||||
|
||||
public static final String BOM = "BOM";
|
||||
|
||||
public static final String BOM_TYPE = "BOM_TYPE";
|
||||
|
||||
public static final String DESCRIPTION = "DESCRIPTION";
|
||||
|
||||
public static final String STATUS_BO = "STATUS_BO";
|
||||
|
||||
public static final String TMP_BOM = "TMP_BOM";
|
||||
|
||||
public static final String COPIED_FROM_BOM_BO = "COPIED_FROM_BOM_BO";
|
||||
|
||||
public static final String REVISION = "REVISION";
|
||||
|
||||
public static final String CURRENT_REVISION = "CURRENT_REVISION";
|
||||
|
||||
public static final String BOM_TEMPLATE = "BOM_TEMPLATE";
|
||||
|
||||
public static final String HAS_BEEN_RELEASED = "HAS_BEEN_RELEASED";
|
||||
|
||||
public static final String EFF_START_DATE = "EFF_START_DATE";
|
||||
|
||||
public static final String EFF_END_DATE = "EFF_END_DATE";
|
||||
|
||||
public static final String EFFECTIVITY_CONTROL = "EFFECTIVITY_CONTROL";
|
||||
|
||||
public static final String PREV_SITE = "PREV_SITE";
|
||||
|
||||
public static final String ORIGINAL_TRANSFER_KEY = "ORIGINAL_TRANSFER_KEY";
|
||||
|
||||
public static final String ERP_BILL_OF_MATERIAL = "ERP_BILL_OF_MATERIAL";
|
||||
|
||||
public static final String CREATED_DATE_TIME = "CREATED_DATE_TIME";
|
||||
|
||||
public static final String MODIFIED_DATE_TIME = "MODIFIED_DATE_TIME";
|
||||
|
||||
public static final String PARTITION_DATE = "PARTITION_DATE";
|
||||
|
||||
public static final String MODEL = "MODEL";
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Bom{" +
|
||||
"handle = " + handle +
|
||||
", changeStamp = " + changeStamp +
|
||||
", site = " + site +
|
||||
", bom = " + bom +
|
||||
", bomType = " + bomType +
|
||||
", description = " + description +
|
||||
", statusBo = " + statusBo +
|
||||
", tmpBom = " + tmpBom +
|
||||
", copiedFromBomBo = " + copiedFromBomBo +
|
||||
", revision = " + revision +
|
||||
", currentRevision = " + currentRevision +
|
||||
", bomTemplate = " + bomTemplate +
|
||||
", hasBeenReleased = " + hasBeenReleased +
|
||||
", effStartDate = " + effStartDate +
|
||||
", effEndDate = " + effEndDate +
|
||||
", effectivityControl = " + effectivityControl +
|
||||
", prevSite = " + prevSite +
|
||||
", originalTransferKey = " + originalTransferKey +
|
||||
", erpBillOfMaterial = " + erpBillOfMaterial +
|
||||
", createdDateTime = " + createdDateTime +
|
||||
", modifiedDateTime = " + modifiedDateTime +
|
||||
", partitionDate = " + partitionDate +
|
||||
", model = " + model +
|
||||
"}";
|
||||
}
|
||||
}
|
@ -0,0 +1,401 @@
|
||||
package com.foreverwin.mesnac.meapi.model;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author Philip
|
||||
* @since 2021-6-23
|
||||
*/
|
||||
|
||||
@TableName("BOM_COMPONENT")
|
||||
|
||||
public class BomComponent extends Model<BomComponent> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableField("HANDLE")
|
||||
private String handle;
|
||||
@TableField("BOM_BO")
|
||||
private String bomBo;
|
||||
@TableField("COMPONENT_GBO")
|
||||
private String componentGbo;
|
||||
@TableField("SEQUENCE")
|
||||
private Long sequence;
|
||||
@TableField("ENABLED")
|
||||
private String enabled;
|
||||
@TableField("VALID_START")
|
||||
private LocalDateTime validStart;
|
||||
@TableField("VALID_END")
|
||||
private LocalDateTime validEnd;
|
||||
@TableField("USE_ITEM_DEFAULTS")
|
||||
private String useItemDefaults;
|
||||
@TableField("PRE_ASSEMBLED")
|
||||
private String preAssembled;
|
||||
@TableField("ASSY_DATA_TYPE_BO")
|
||||
private String assyDataTypeBo;
|
||||
@TableField("QTY")
|
||||
private Double qty;
|
||||
@TableField("TEST_PART")
|
||||
private String testPart;
|
||||
@TableField("BOM_TEMPLATE")
|
||||
private String bomTemplate;
|
||||
@TableField("DISASSEMBLE_OPERATION_BO")
|
||||
private String disassembleOperationBo;
|
||||
@TableField("CREATE_TRACKABLE_SFC")
|
||||
private String createTrackableSfc;
|
||||
@TableField("MAXIMUM_USAGE")
|
||||
private Long maximumUsage;
|
||||
@TableField("MAXIMUM_NC")
|
||||
private Long maximumNc;
|
||||
@TableField("ASSEMBLE_AS_REQ")
|
||||
private String assembleAsReq;
|
||||
@TableField("AUTO_CONSUME_KIT")
|
||||
private String autoConsumeKit;
|
||||
@TableField("CREATED_DATE_TIME")
|
||||
private LocalDateTime createdDateTime;
|
||||
@TableField("MODIFIED_DATE_TIME")
|
||||
private LocalDateTime modifiedDateTime;
|
||||
@TableField("BOM_COMPONENT_TYPE")
|
||||
private String bomComponentType;
|
||||
@TableField("PARENT_SEQUENCE")
|
||||
private Long parentSequence;
|
||||
@TableField("ERP_SEQUENCE")
|
||||
private Long erpSequence;
|
||||
@TableField("ORDER_ITEM_NUMBER")
|
||||
private String orderItemNumber;
|
||||
@TableField("ERP_CHANGE_NUMBER")
|
||||
private String erpChangeNumber;
|
||||
@TableField("IDENTIFIER")
|
||||
private String identifier;
|
||||
@TableField("STORAGE_LOCATION_BO")
|
||||
private String storageLocationBo;
|
||||
|
||||
|
||||
public String getHandle() {
|
||||
return handle;
|
||||
}
|
||||
|
||||
public void setHandle(String handle) {
|
||||
this.handle = handle;
|
||||
}
|
||||
|
||||
public String getBomBo() {
|
||||
return bomBo;
|
||||
}
|
||||
|
||||
public void setBomBo(String bomBo) {
|
||||
this.bomBo = bomBo;
|
||||
}
|
||||
|
||||
public String getComponentGbo() {
|
||||
return componentGbo;
|
||||
}
|
||||
|
||||
public void setComponentGbo(String componentGbo) {
|
||||
this.componentGbo = componentGbo;
|
||||
}
|
||||
|
||||
public Long getSequence() {
|
||||
return sequence;
|
||||
}
|
||||
|
||||
public void setSequence(Long sequence) {
|
||||
this.sequence = sequence;
|
||||
}
|
||||
|
||||
public String getEnabled() {
|
||||
return enabled;
|
||||
}
|
||||
|
||||
public void setEnabled(String enabled) {
|
||||
this.enabled = enabled;
|
||||
}
|
||||
|
||||
public LocalDateTime getValidStart() {
|
||||
return validStart;
|
||||
}
|
||||
|
||||
public void setValidStart(LocalDateTime validStart) {
|
||||
this.validStart = validStart;
|
||||
}
|
||||
|
||||
public LocalDateTime getValidEnd() {
|
||||
return validEnd;
|
||||
}
|
||||
|
||||
public void setValidEnd(LocalDateTime validEnd) {
|
||||
this.validEnd = validEnd;
|
||||
}
|
||||
|
||||
public String getUseItemDefaults() {
|
||||
return useItemDefaults;
|
||||
}
|
||||
|
||||
public void setUseItemDefaults(String useItemDefaults) {
|
||||
this.useItemDefaults = useItemDefaults;
|
||||
}
|
||||
|
||||
public String getPreAssembled() {
|
||||
return preAssembled;
|
||||
}
|
||||
|
||||
public void setPreAssembled(String preAssembled) {
|
||||
this.preAssembled = preAssembled;
|
||||
}
|
||||
|
||||
public String getAssyDataTypeBo() {
|
||||
return assyDataTypeBo;
|
||||
}
|
||||
|
||||
public void setAssyDataTypeBo(String assyDataTypeBo) {
|
||||
this.assyDataTypeBo = assyDataTypeBo;
|
||||
}
|
||||
|
||||
public Double getQty() {
|
||||
return qty;
|
||||
}
|
||||
|
||||
public void setQty(Double qty) {
|
||||
this.qty = qty;
|
||||
}
|
||||
|
||||
public String getTestPart() {
|
||||
return testPart;
|
||||
}
|
||||
|
||||
public void setTestPart(String testPart) {
|
||||
this.testPart = testPart;
|
||||
}
|
||||
|
||||
public String getBomTemplate() {
|
||||
return bomTemplate;
|
||||
}
|
||||
|
||||
public void setBomTemplate(String bomTemplate) {
|
||||
this.bomTemplate = bomTemplate;
|
||||
}
|
||||
|
||||
public String getDisassembleOperationBo() {
|
||||
return disassembleOperationBo;
|
||||
}
|
||||
|
||||
public void setDisassembleOperationBo(String disassembleOperationBo) {
|
||||
this.disassembleOperationBo = disassembleOperationBo;
|
||||
}
|
||||
|
||||
public String getCreateTrackableSfc() {
|
||||
return createTrackableSfc;
|
||||
}
|
||||
|
||||
public void setCreateTrackableSfc(String createTrackableSfc) {
|
||||
this.createTrackableSfc = createTrackableSfc;
|
||||
}
|
||||
|
||||
public Long getMaximumUsage() {
|
||||
return maximumUsage;
|
||||
}
|
||||
|
||||
public void setMaximumUsage(Long maximumUsage) {
|
||||
this.maximumUsage = maximumUsage;
|
||||
}
|
||||
|
||||
public Long getMaximumNc() {
|
||||
return maximumNc;
|
||||
}
|
||||
|
||||
public void setMaximumNc(Long maximumNc) {
|
||||
this.maximumNc = maximumNc;
|
||||
}
|
||||
|
||||
public String getAssembleAsReq() {
|
||||
return assembleAsReq;
|
||||
}
|
||||
|
||||
public void setAssembleAsReq(String assembleAsReq) {
|
||||
this.assembleAsReq = assembleAsReq;
|
||||
}
|
||||
|
||||
public String getAutoConsumeKit() {
|
||||
return autoConsumeKit;
|
||||
}
|
||||
|
||||
public void setAutoConsumeKit(String autoConsumeKit) {
|
||||
this.autoConsumeKit = autoConsumeKit;
|
||||
}
|
||||
|
||||
public LocalDateTime getCreatedDateTime() {
|
||||
return createdDateTime;
|
||||
}
|
||||
|
||||
public void setCreatedDateTime(LocalDateTime createdDateTime) {
|
||||
this.createdDateTime = createdDateTime;
|
||||
}
|
||||
|
||||
public LocalDateTime getModifiedDateTime() {
|
||||
return modifiedDateTime;
|
||||
}
|
||||
|
||||
public void setModifiedDateTime(LocalDateTime modifiedDateTime) {
|
||||
this.modifiedDateTime = modifiedDateTime;
|
||||
}
|
||||
|
||||
public String getBomComponentType() {
|
||||
return bomComponentType;
|
||||
}
|
||||
|
||||
public void setBomComponentType(String bomComponentType) {
|
||||
this.bomComponentType = bomComponentType;
|
||||
}
|
||||
|
||||
public Long getParentSequence() {
|
||||
return parentSequence;
|
||||
}
|
||||
|
||||
public void setParentSequence(Long parentSequence) {
|
||||
this.parentSequence = parentSequence;
|
||||
}
|
||||
|
||||
public Long getErpSequence() {
|
||||
return erpSequence;
|
||||
}
|
||||
|
||||
public void setErpSequence(Long erpSequence) {
|
||||
this.erpSequence = erpSequence;
|
||||
}
|
||||
|
||||
public String getOrderItemNumber() {
|
||||
return orderItemNumber;
|
||||
}
|
||||
|
||||
public void setOrderItemNumber(String orderItemNumber) {
|
||||
this.orderItemNumber = orderItemNumber;
|
||||
}
|
||||
|
||||
public String getErpChangeNumber() {
|
||||
return erpChangeNumber;
|
||||
}
|
||||
|
||||
public void setErpChangeNumber(String erpChangeNumber) {
|
||||
this.erpChangeNumber = erpChangeNumber;
|
||||
}
|
||||
|
||||
public String getIdentifier() {
|
||||
return identifier;
|
||||
}
|
||||
|
||||
public void setIdentifier(String identifier) {
|
||||
this.identifier = identifier;
|
||||
}
|
||||
|
||||
public String getStorageLocationBo() {
|
||||
return storageLocationBo;
|
||||
}
|
||||
|
||||
public void setStorageLocationBo(String storageLocationBo) {
|
||||
this.storageLocationBo = storageLocationBo;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.handle;
|
||||
}
|
||||
|
||||
public static final String HANDLE = "HANDLE";
|
||||
|
||||
public static final String BOM_BO = "BOM_BO";
|
||||
|
||||
public static final String COMPONENT_GBO = "COMPONENT_GBO";
|
||||
|
||||
public static final String SEQUENCE = "SEQUENCE";
|
||||
|
||||
public static final String ENABLED = "ENABLED";
|
||||
|
||||
public static final String VALID_START = "VALID_START";
|
||||
|
||||
public static final String VALID_END = "VALID_END";
|
||||
|
||||
public static final String USE_ITEM_DEFAULTS = "USE_ITEM_DEFAULTS";
|
||||
|
||||
public static final String PRE_ASSEMBLED = "PRE_ASSEMBLED";
|
||||
|
||||
public static final String ASSY_DATA_TYPE_BO = "ASSY_DATA_TYPE_BO";
|
||||
|
||||
public static final String QTY = "QTY";
|
||||
|
||||
public static final String TEST_PART = "TEST_PART";
|
||||
|
||||
public static final String BOM_TEMPLATE = "BOM_TEMPLATE";
|
||||
|
||||
public static final String DISASSEMBLE_OPERATION_BO = "DISASSEMBLE_OPERATION_BO";
|
||||
|
||||
public static final String CREATE_TRACKABLE_SFC = "CREATE_TRACKABLE_SFC";
|
||||
|
||||
public static final String MAXIMUM_USAGE = "MAXIMUM_USAGE";
|
||||
|
||||
public static final String MAXIMUM_NC = "MAXIMUM_NC";
|
||||
|
||||
public static final String ASSEMBLE_AS_REQ = "ASSEMBLE_AS_REQ";
|
||||
|
||||
public static final String AUTO_CONSUME_KIT = "AUTO_CONSUME_KIT";
|
||||
|
||||
public static final String CREATED_DATE_TIME = "CREATED_DATE_TIME";
|
||||
|
||||
public static final String MODIFIED_DATE_TIME = "MODIFIED_DATE_TIME";
|
||||
|
||||
public static final String BOM_COMPONENT_TYPE = "BOM_COMPONENT_TYPE";
|
||||
|
||||
public static final String PARENT_SEQUENCE = "PARENT_SEQUENCE";
|
||||
|
||||
public static final String ERP_SEQUENCE = "ERP_SEQUENCE";
|
||||
|
||||
public static final String ORDER_ITEM_NUMBER = "ORDER_ITEM_NUMBER";
|
||||
|
||||
public static final String ERP_CHANGE_NUMBER = "ERP_CHANGE_NUMBER";
|
||||
|
||||
public static final String IDENTIFIER = "IDENTIFIER";
|
||||
|
||||
public static final String STORAGE_LOCATION_BO = "STORAGE_LOCATION_BO";
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "BomComponent{" +
|
||||
"handle = " + handle +
|
||||
", bomBo = " + bomBo +
|
||||
", componentGbo = " + componentGbo +
|
||||
", sequence = " + sequence +
|
||||
", enabled = " + enabled +
|
||||
", validStart = " + validStart +
|
||||
", validEnd = " + validEnd +
|
||||
", useItemDefaults = " + useItemDefaults +
|
||||
", preAssembled = " + preAssembled +
|
||||
", assyDataTypeBo = " + assyDataTypeBo +
|
||||
", qty = " + qty +
|
||||
", testPart = " + testPart +
|
||||
", bomTemplate = " + bomTemplate +
|
||||
", disassembleOperationBo = " + disassembleOperationBo +
|
||||
", createTrackableSfc = " + createTrackableSfc +
|
||||
", maximumUsage = " + maximumUsage +
|
||||
", maximumNc = " + maximumNc +
|
||||
", assembleAsReq = " + assembleAsReq +
|
||||
", autoConsumeKit = " + autoConsumeKit +
|
||||
", createdDateTime = " + createdDateTime +
|
||||
", modifiedDateTime = " + modifiedDateTime +
|
||||
", bomComponentType = " + bomComponentType +
|
||||
", parentSequence = " + parentSequence +
|
||||
", erpSequence = " + erpSequence +
|
||||
", orderItemNumber = " + orderItemNumber +
|
||||
", erpChangeNumber = " + erpChangeNumber +
|
||||
", identifier = " + identifier +
|
||||
", storageLocationBo = " + storageLocationBo +
|
||||
"}";
|
||||
}
|
||||
}
|
@ -0,0 +1,82 @@
|
||||
package com.foreverwin.mesnac.meapi.model;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author Philip
|
||||
* @since 2021-6-23
|
||||
*/
|
||||
|
||||
@TableName("BOM_OPERATION")
|
||||
|
||||
public class BomOperation extends Model<BomOperation> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "HANDLE", type = IdType.INPUT)
|
||||
private String handle;
|
||||
@TableField("BOM_COMPONENT_BO")
|
||||
private String bomComponentBo;
|
||||
@TableField("OPERATION_BO")
|
||||
private String operationBo;
|
||||
@TableField("QTY")
|
||||
private Double qty;
|
||||
|
||||
|
||||
public String getHandle() {
|
||||
return handle;
|
||||
}
|
||||
|
||||
public void setHandle(String handle) {
|
||||
this.handle = handle;
|
||||
}
|
||||
|
||||
public String getBomComponentBo() {
|
||||
return bomComponentBo;
|
||||
}
|
||||
|
||||
public void setBomComponentBo(String bomComponentBo) {
|
||||
this.bomComponentBo = bomComponentBo;
|
||||
}
|
||||
|
||||
public String getOperationBo() {
|
||||
return operationBo;
|
||||
}
|
||||
|
||||
public void setOperationBo(String operationBo) {
|
||||
this.operationBo = operationBo;
|
||||
}
|
||||
|
||||
public Double getQty() {
|
||||
return qty;
|
||||
}
|
||||
|
||||
public void setQty(Double qty) {
|
||||
this.qty = qty;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.handle;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "BomOperation{" +
|
||||
"handle = " + handle +
|
||||
", bomComponentBo = " + bomComponentBo +
|
||||
", operationBo = " + operationBo +
|
||||
", qty = " + qty +
|
||||
"}";
|
||||
}
|
||||
}
|
@ -0,0 +1,155 @@
|
||||
package com.foreverwin.mesnac.meapi.model;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author Philip
|
||||
* @since 2021-6-23
|
||||
*/
|
||||
|
||||
@TableName("SFC_BOM")
|
||||
|
||||
public class SfcBom extends Model<SfcBom> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableField("HANDLE")
|
||||
private String handle;
|
||||
@TableField("CHANGE_STAMP")
|
||||
private Long changeStamp;
|
||||
@TableField("SFC_BO")
|
||||
private String sfcBo;
|
||||
@TableField("BOM_BO")
|
||||
private String bomBo;
|
||||
@TableField("PREV_SITE")
|
||||
private String prevSite;
|
||||
@TableField("ORIGINAL_TRANSFER_KEY")
|
||||
private String originalTransferKey;
|
||||
@TableField("MODIFIED_DATE_TIME")
|
||||
private LocalDateTime modifiedDateTime;
|
||||
@TableField("CREATED_DATE_TIME")
|
||||
private LocalDateTime createdDateTime;
|
||||
@TableField("PARTITION_DATE")
|
||||
private LocalDateTime partitionDate;
|
||||
|
||||
|
||||
public String getHandle() {
|
||||
return handle;
|
||||
}
|
||||
|
||||
public void setHandle(String handle) {
|
||||
this.handle = handle;
|
||||
}
|
||||
|
||||
public Long getChangeStamp() {
|
||||
return changeStamp;
|
||||
}
|
||||
|
||||
public void setChangeStamp(Long changeStamp) {
|
||||
this.changeStamp = changeStamp;
|
||||
}
|
||||
|
||||
public String getSfcBo() {
|
||||
return sfcBo;
|
||||
}
|
||||
|
||||
public void setSfcBo(String sfcBo) {
|
||||
this.sfcBo = sfcBo;
|
||||
}
|
||||
|
||||
public String getBomBo() {
|
||||
return bomBo;
|
||||
}
|
||||
|
||||
public void setBomBo(String bomBo) {
|
||||
this.bomBo = bomBo;
|
||||
}
|
||||
|
||||
public String getPrevSite() {
|
||||
return prevSite;
|
||||
}
|
||||
|
||||
public void setPrevSite(String prevSite) {
|
||||
this.prevSite = prevSite;
|
||||
}
|
||||
|
||||
public String getOriginalTransferKey() {
|
||||
return originalTransferKey;
|
||||
}
|
||||
|
||||
public void setOriginalTransferKey(String originalTransferKey) {
|
||||
this.originalTransferKey = originalTransferKey;
|
||||
}
|
||||
|
||||
public LocalDateTime getModifiedDateTime() {
|
||||
return modifiedDateTime;
|
||||
}
|
||||
|
||||
public void setModifiedDateTime(LocalDateTime modifiedDateTime) {
|
||||
this.modifiedDateTime = modifiedDateTime;
|
||||
}
|
||||
|
||||
public LocalDateTime getCreatedDateTime() {
|
||||
return createdDateTime;
|
||||
}
|
||||
|
||||
public void setCreatedDateTime(LocalDateTime createdDateTime) {
|
||||
this.createdDateTime = createdDateTime;
|
||||
}
|
||||
|
||||
public LocalDateTime getPartitionDate() {
|
||||
return partitionDate;
|
||||
}
|
||||
|
||||
public void setPartitionDate(LocalDateTime partitionDate) {
|
||||
this.partitionDate = partitionDate;
|
||||
}
|
||||
|
||||
public static final String HANDLE = "HANDLE";
|
||||
|
||||
public static final String CHANGE_STAMP = "CHANGE_STAMP";
|
||||
|
||||
public static final String SFC_BO = "SFC_BO";
|
||||
|
||||
public static final String BOM_BO = "BOM_BO";
|
||||
|
||||
public static final String PREV_SITE = "PREV_SITE";
|
||||
|
||||
public static final String ORIGINAL_TRANSFER_KEY = "ORIGINAL_TRANSFER_KEY";
|
||||
|
||||
public static final String MODIFIED_DATE_TIME = "MODIFIED_DATE_TIME";
|
||||
|
||||
public static final String CREATED_DATE_TIME = "CREATED_DATE_TIME";
|
||||
|
||||
public static final String PARTITION_DATE = "PARTITION_DATE";
|
||||
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.handle;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SfcBom{" +
|
||||
"handle = " + handle +
|
||||
", changeStamp = " + changeStamp +
|
||||
", sfcBo = " + sfcBo +
|
||||
", bomBo = " + bomBo +
|
||||
", prevSite = " + prevSite +
|
||||
", originalTransferKey = " + originalTransferKey +
|
||||
", modifiedDateTime = " + modifiedDateTime +
|
||||
", createdDateTime = " + createdDateTime +
|
||||
", partitionDate = " + partitionDate +
|
||||
"}";
|
||||
}
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
package com.foreverwin.mesnac.meapi.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.foreverwin.mesnac.meapi.dto.BomComponentDto;
|
||||
import com.foreverwin.mesnac.meapi.model.BomComponent;
|
||||
import com.foreverwin.modular.core.util.FrontPage;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author Ervin Chen
|
||||
* @since 2020-10-19
|
||||
*/
|
||||
public interface BomComponentService extends IService<BomComponent> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param frontPage
|
||||
* @return
|
||||
*/
|
||||
IPage<BomComponent> selectPage(FrontPage<BomComponent> frontPage, BomComponent bomComponent);
|
||||
|
||||
List<BomComponent> selectList(BomComponent bomComponent);
|
||||
|
||||
List<BomComponent> listByBomBo(String bomBo);
|
||||
|
||||
List<BomComponent> selectListByShopOrderBo(String shopOrderBo);
|
||||
|
||||
List<BomComponent> selectListByShopOrderBoItemBo(String shopOrderBo, String itemBo);
|
||||
|
||||
/**
|
||||
* 校验给定的物料组件在BOM中是否属于主物料
|
||||
* @param bomBo
|
||||
* @param componentBo 物料组件BO
|
||||
* @return
|
||||
*/
|
||||
boolean validateMainComponent(String bomBo, String componentBo);
|
||||
|
||||
/**
|
||||
* 校验物料是否属于当前物料清单组件
|
||||
* @param bomBo
|
||||
* @param item
|
||||
* @return
|
||||
*/
|
||||
boolean validateComponentOwnerBom(String bomBo, String item);
|
||||
|
||||
|
||||
/**
|
||||
* 装配查询精准追溯BOMComponent
|
||||
* @param bomBo
|
||||
* @param operationBo
|
||||
* @return
|
||||
*/
|
||||
|
||||
List<BomComponent> selectBomComponentByOperation(String bomBo, String operationBo);
|
||||
|
||||
/**
|
||||
* 查询需要装配的数量
|
||||
* @param bomBo
|
||||
* @param operationBo
|
||||
* @return
|
||||
*/
|
||||
Integer getNeedAssemblyQty(String bomBo, String operationBo);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 根据sfc和工序查物料清单组件
|
||||
* @param site
|
||||
* @param SfcBo
|
||||
* @param operation
|
||||
* @return
|
||||
*/
|
||||
List<BomComponent> selectListBySfcBoOAndOperationBo(String site, String SfcBo, String operation);
|
||||
|
||||
/**
|
||||
* 根据BOM和编码查询
|
||||
* @param bomBo
|
||||
* @param bomItemNoList
|
||||
* @return
|
||||
*/
|
||||
List<BomComponent> selectListByBomBoAndBomItemNo(String bomBo, List<String> bomItemNoList);
|
||||
|
||||
/**
|
||||
* 查找产线下未结案工单物料清单
|
||||
* @param workCenterBO
|
||||
*/
|
||||
List<BomComponent> selectShopOrderBomComponentByWorkCenterBo(String workCenterBO);
|
||||
|
||||
List<BomComponentDto> getSfcBomComponent(String sfcBo);
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package com.foreverwin.mesnac.meapi.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.foreverwin.mesnac.meapi.model.BomOperation;
|
||||
import com.foreverwin.modular.core.util.FrontPage;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author Ervin Chen
|
||||
* @since 2020-10-19
|
||||
*/
|
||||
public interface BomOperationService extends IService<BomOperation> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param frontPage
|
||||
* @return
|
||||
*/
|
||||
IPage<BomOperation> selectPage(FrontPage<BomOperation> frontPage, BomOperation bomOperation);
|
||||
|
||||
List<BomOperation> selectList(BomOperation bomOperation);
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
package com.foreverwin.mesnac.meapi.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.foreverwin.mesnac.meapi.model.Bom;
|
||||
import com.foreverwin.mesnac.meapi.model.BomComponent;
|
||||
import com.foreverwin.modular.core.util.FrontPage;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author Ervin Chen
|
||||
* @since 2020-10-19
|
||||
*/
|
||||
public interface BomService extends IService<Bom> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param frontPage
|
||||
* @return
|
||||
*/
|
||||
IPage<Bom> selectPage(FrontPage<Bom> frontPage, Bom bom);
|
||||
|
||||
List<Bom> selectList(Bom bom);
|
||||
|
||||
Bom getBomInfo(String site, String bomBo);
|
||||
|
||||
List<BomComponent> getBomOperationComponent(String site, String bomBo, String operation);
|
||||
|
||||
/**
|
||||
* 是否是当前工序的bom组件
|
||||
* @param site
|
||||
* @param bomBo
|
||||
* @param operation
|
||||
* @param itemBo
|
||||
* @return
|
||||
*/
|
||||
List<BomComponent> validateItemMatchBomAndOperation(String site, String bomBo, String operation, String itemBo);
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.foreverwin.mesnac.meapi.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.foreverwin.mesnac.meapi.model.SfcBom;
|
||||
import com.foreverwin.modular.core.util.FrontPage;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author Ervin Chen
|
||||
* @since 2020-10-19
|
||||
*/
|
||||
public interface SfcBomService extends IService<SfcBom> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param frontPage
|
||||
* @return
|
||||
*/
|
||||
IPage<SfcBom> selectPage(FrontPage<SfcBom> frontPage, SfcBom sfcBom);
|
||||
|
||||
List<SfcBom> selectList(SfcBom sfcBom);
|
||||
|
||||
String selectBomBO(String sfcBo);
|
||||
}
|
@ -0,0 +1,128 @@
|
||||
package com.foreverwin.mesnac.meapi.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;
|
||||
import com.foreverwin.mesnac.meapi.dto.BomComponentDto;
|
||||
import com.foreverwin.mesnac.meapi.mapper.BomComponentMapper;
|
||||
import com.foreverwin.mesnac.meapi.model.BomComponent;
|
||||
import com.foreverwin.mesnac.meapi.model.CustomFields;
|
||||
import com.foreverwin.mesnac.meapi.service.BomComponentService;
|
||||
import com.foreverwin.modular.core.util.CommonMethods;
|
||||
import com.foreverwin.modular.core.util.FrontPage;
|
||||
import com.sap.me.frame.Utils;
|
||||
import com.sap.me.productdefinition.ItemBOHandle;
|
||||
import com.sap.me.productdefinition.OperationBOHandle;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.i18n.LocaleContextHolder;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author Philip
|
||||
* @since 2021-6-23
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class BomComponentServiceImpl extends ServiceImpl<BomComponentMapper, BomComponent> implements BomComponentService {
|
||||
|
||||
|
||||
@Autowired
|
||||
private BomComponentMapper bomComponentMapper;
|
||||
|
||||
@Override
|
||||
public IPage<BomComponent> selectPage(FrontPage<BomComponent> frontPage, BomComponent bomComponent) {
|
||||
QueryWrapper<BomComponent> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(bomComponent);
|
||||
return super.page(frontPage.getPagePlus(), queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BomComponent> selectList(BomComponent bomComponent) {
|
||||
QueryWrapper<BomComponent> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(bomComponent);
|
||||
return super.list(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BomComponent> listByBomBo(String bomBo) {
|
||||
Locale locale = LocaleContextHolder.getLocale();
|
||||
return bomComponentMapper.selectByBomBo(locale.getLanguage(), bomBo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BomComponent> selectListByShopOrderBo(String shopOrderBo) {
|
||||
return bomComponentMapper.selectListByShopOrderBo(shopOrderBo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BomComponent> selectListByShopOrderBoItemBo(String shopOrderBo, String itemBo) {
|
||||
return bomComponentMapper.selectListByShopOrderBoItemBo(shopOrderBo, itemBo, itemBo.split(",")[1]);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean validateMainComponent(String bomBo, String componentBo) {
|
||||
CustomFields customFields = bomComponentMapper.getBomComponentMainFlag(bomBo, componentBo);
|
||||
if (customFields==null) {
|
||||
return false;
|
||||
}
|
||||
return "A".equals(customFields.getValue().toUpperCase());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean validateComponentOwnerBom(String bomBo, String item) {
|
||||
QueryWrapper<BomComponent> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("BOM_BO", bomBo);
|
||||
List<BomComponent> bomComponentList = bomComponentMapper.selectList(queryWrapper);
|
||||
boolean ownerComponent = false;
|
||||
if (Utils.isNotEmpty(bomComponentList)) {
|
||||
for (BomComponent bomComponent : bomComponentList) {
|
||||
if (Utils.isNotEmpty(item) && item.equals(new ItemBOHandle(bomComponent.getComponentGbo()).getItem())) {
|
||||
ownerComponent = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return ownerComponent;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<BomComponent> selectBomComponentByOperation(String bomBo, String operationBo) {
|
||||
return bomComponentMapper.selectBomComponentByOperation(bomBo, operationBo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getNeedAssemblyQty(String bomBo, String operationBo) {
|
||||
return bomComponentMapper.selectNeedAssemblyQty(bomBo, operationBo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BomComponent> selectListBySfcBoOAndOperationBo(String site, String SfcBo, String operation) {
|
||||
String OperationBo = new OperationBOHandle(site, operation, "#").getValue();
|
||||
return bomComponentMapper.selectListBySfcBoOAndOperationBo(SfcBo, OperationBo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BomComponent> selectListByBomBoAndBomItemNo(String bomBo, List<String> bomItemNoList) {
|
||||
return bomComponentMapper.selectListByBomBoAndBomItemNo(bomBo, bomItemNoList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BomComponent> selectShopOrderBomComponentByWorkCenterBo(String workCenterBO) {
|
||||
return bomComponentMapper.selectShopOrderBomComponentByWorkCenterBo(workCenterBO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BomComponentDto> getSfcBomComponent(String sfcBo) {
|
||||
return bomComponentMapper.getSfcBomComponent(CommonMethods.getSite(),sfcBo);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
package com.foreverwin.mesnac.meapi.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;
|
||||
import com.foreverwin.mesnac.meapi.mapper.BomOperationMapper;
|
||||
import com.foreverwin.mesnac.meapi.model.BomOperation;
|
||||
import com.foreverwin.mesnac.meapi.service.BomOperationService;
|
||||
import com.foreverwin.modular.core.util.FrontPage;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
** @author Philip
|
||||
* * @since 2021-6-23
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class BomOperationServiceImpl extends ServiceImpl<BomOperationMapper, BomOperation> implements BomOperationService {
|
||||
|
||||
|
||||
@Autowired
|
||||
private BomOperationMapper bomOperationMapper;
|
||||
|
||||
@Override
|
||||
public IPage<BomOperation> selectPage(FrontPage<BomOperation> frontPage, BomOperation bomOperation) {
|
||||
QueryWrapper<BomOperation> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(bomOperation);
|
||||
return super.page(frontPage.getPagePlus(), queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BomOperation> selectList(BomOperation bomOperation) {
|
||||
QueryWrapper<BomOperation> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(bomOperation);
|
||||
return super.list(queryWrapper);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,108 @@
|
||||
package com.foreverwin.mesnac.meapi.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;
|
||||
import com.foreverwin.mesnac.meapi.mapper.BomMapper;
|
||||
import com.foreverwin.mesnac.meapi.model.Bom;
|
||||
import com.foreverwin.mesnac.meapi.service.BomComponentService;
|
||||
import com.foreverwin.mesnac.meapi.service.BomService;
|
||||
import com.foreverwin.mesnac.meapi.service.ItemService;
|
||||
import com.foreverwin.mesnac.meapi.model.BomComponent;
|
||||
import com.foreverwin.modular.core.util.FrontPage;
|
||||
import com.sap.me.productdefinition.OperationBOHandle;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author Philip
|
||||
* @since 2021-6-23
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class BomServiceImpl extends ServiceImpl<BomMapper, Bom> implements BomService {
|
||||
|
||||
@Autowired
|
||||
ItemService itemService;
|
||||
@Autowired
|
||||
private BomMapper bomMapper;
|
||||
@Autowired
|
||||
private BomComponentService bomComponentService;
|
||||
@Override
|
||||
public IPage<Bom> selectPage(FrontPage<Bom> frontPage, Bom bom) {
|
||||
QueryWrapper<Bom> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(bom);
|
||||
return super.page(frontPage.getPagePlus(), queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Bom> selectList(Bom bom) {
|
||||
QueryWrapper<Bom> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(bom);
|
||||
return super.list(queryWrapper);
|
||||
}
|
||||
@Override
|
||||
public Bom getBomInfo(String site, String bomBo) {
|
||||
Bom bom = null;
|
||||
if(bomBo.endsWith("#")) {
|
||||
String[] temp = bomBo.split(",");
|
||||
String bomName = temp[1];
|
||||
String type = temp[2];
|
||||
Bom bom1 = new Bom();
|
||||
bom1.setSite(site);
|
||||
bom1.setBom(bomName);
|
||||
bom1.setBomType(type);
|
||||
bom1.setCurrentRevision("true");
|
||||
List<Bom> bomList = this.selectList(bom1);
|
||||
bom = bomList != null && bomList.size() > 0 ? bomList.get(0) : null;
|
||||
} else {
|
||||
bom = bomMapper.selectById(bomBo);
|
||||
}
|
||||
if(bom != null) {
|
||||
List<BomComponent> bomComponentList = bomComponentService.listByBomBo(bom.getHandle());
|
||||
bom.setBomComponentList(bomComponentList);
|
||||
}
|
||||
return bom;
|
||||
}
|
||||
@Override
|
||||
public List<BomComponent> getBomOperationComponent(String site, String bomBo,String operation) {
|
||||
Bom bom = null;
|
||||
if(bomBo.endsWith("#")) {
|
||||
String[] temp = bomBo.split(",");
|
||||
String bomName = temp[1];
|
||||
String type = temp[2];
|
||||
Bom bom1 = new Bom();
|
||||
bom1.setSite(site);
|
||||
bom1.setBom(bomName);
|
||||
bom1.setBomType(type);
|
||||
bom1.setCurrentRevision("true");
|
||||
List<Bom> bomList = this.selectList(bom1);
|
||||
bom = bomList != null && bomList.size() > 0 ? bomList.get(0) : null;
|
||||
} else {
|
||||
bom = bomMapper.selectById(bomBo);
|
||||
}
|
||||
if(bom != null) {
|
||||
String operationBo = new OperationBOHandle(site,operation,"#").getValue();
|
||||
List<BomComponent> bomComponentList = bomComponentService.selectBomComponentByOperation( bomBo, operationBo );
|
||||
return bomComponentList;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BomComponent> validateItemMatchBomAndOperation(String site, String bomBo, String operation, String itemBo) {
|
||||
String operationBo = new OperationBOHandle(site,operation,"#").getValue();
|
||||
List<BomComponent> bomComponents = bomComponentService.selectBomComponentByOperation( bomBo, operationBo );
|
||||
List<BomComponent> collect = bomComponents.stream().filter(e -> itemService.selectCurrent(e.getComponentGbo()).equals(itemBo)).collect(Collectors.toList());
|
||||
return collect;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
package com.foreverwin.mesnac.meapi.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.foreverwin.mesnac.meapi.mapper.SfcBomMapper;
|
||||
import com.foreverwin.mesnac.meapi.model.SfcBom;
|
||||
import com.foreverwin.mesnac.meapi.service.SfcBomService;
|
||||
import com.foreverwin.mesnac.meapi.util.StringUtils;
|
||||
import com.foreverwin.modular.core.exception.BaseException;
|
||||
import com.foreverwin.modular.core.util.FrontPage;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author Ervin Chen
|
||||
* @since 2020-10-19
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class SfcBomServiceImpl extends ServiceImpl<SfcBomMapper, SfcBom> implements SfcBomService {
|
||||
|
||||
|
||||
@Autowired
|
||||
private SfcBomMapper sfcBomMapper;
|
||||
|
||||
@Override
|
||||
public IPage<SfcBom> selectPage(FrontPage<SfcBom> frontPage, SfcBom sfcBom) {
|
||||
QueryWrapper<SfcBom> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(sfcBom);
|
||||
return super.page(frontPage.getPagePlus(), queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SfcBom> selectList(SfcBom sfcBom) {
|
||||
QueryWrapper<SfcBom> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(sfcBom);
|
||||
return super.list(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String selectBomBO(String sfcBo) {
|
||||
LambdaQueryWrapper<SfcBom> lambdaQueryWrapper =new LambdaQueryWrapper<>() ;
|
||||
lambdaQueryWrapper.eq(SfcBom::getSfcBo,sfcBo);
|
||||
List<SfcBom> list = list(lambdaQueryWrapper);
|
||||
if(list.isEmpty()){
|
||||
throw new BaseException("未找到sfc"+ StringUtils.trimHandle(sfcBo) +"的物料清单");
|
||||
}
|
||||
return list.get(0).getBomBo();
|
||||
}
|
||||
}
|
@ -0,0 +1,709 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.foreverwin.mesnac.meapi.mapper.BomComponentMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.foreverwin.mesnac.meapi.model.BomComponent">
|
||||
<result column="HANDLE" property="handle"/>
|
||||
<result column="BOM_BO" property="bomBo"/>
|
||||
<result column="COMPONENT_GBO" property="componentGbo"/>
|
||||
<result column="SEQUENCE" property="sequence"/>
|
||||
<result column="ENABLED" property="enabled"/>
|
||||
<result column="VALID_START" property="validStart"/>
|
||||
<result column="VALID_END" property="validEnd"/>
|
||||
<result column="USE_ITEM_DEFAULTS" property="useItemDefaults"/>
|
||||
<result column="PRE_ASSEMBLED" property="preAssembled"/>
|
||||
<result column="ASSY_DATA_TYPE_BO" property="assyDataTypeBo"/>
|
||||
<result column="QTY" property="qty"/>
|
||||
<result column="TEST_PART" property="testPart"/>
|
||||
<result column="BOM_TEMPLATE" property="bomTemplate"/>
|
||||
<result column="DISASSEMBLE_OPERATION_BO" property="disassembleOperationBo"/>
|
||||
<result column="CREATE_TRACKABLE_SFC" property="createTrackableSfc"/>
|
||||
<result column="MAXIMUM_USAGE" property="maximumUsage"/>
|
||||
<result column="MAXIMUM_NC" property="maximumNc"/>
|
||||
<result column="ASSEMBLE_AS_REQ" property="assembleAsReq"/>
|
||||
<result column="AUTO_CONSUME_KIT" property="autoConsumeKit"/>
|
||||
<result column="CREATED_DATE_TIME" property="createdDateTime"/>
|
||||
<result column="MODIFIED_DATE_TIME" property="modifiedDateTime"/>
|
||||
<result column="BOM_COMPONENT_TYPE" property="bomComponentType"/>
|
||||
<result column="PARENT_SEQUENCE" property="parentSequence"/>
|
||||
<result column="ERP_SEQUENCE" property="erpSequence"/>
|
||||
<result column="ORDER_ITEM_NUMBER" property="orderItemNumber"/>
|
||||
<result column="ERP_CHANGE_NUMBER" property="erpChangeNumber"/>
|
||||
<result column="IDENTIFIER" property="identifier"/>
|
||||
<result column="STORAGE_LOCATION_BO" property="storageLocationBo"/>
|
||||
<result column="STEP_ID" property="stepId"/>
|
||||
<result column="ACCESSORY_TYPE" property="accessoryType"/>
|
||||
<result column="OPERATION" property="operation"/>
|
||||
</resultMap>
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
HANDLE, BOM_BO, COMPONENT_GBO, SEQUENCE, ENABLED, VALID_START, VALID_END, USE_ITEM_DEFAULTS, PRE_ASSEMBLED, ASSY_DATA_TYPE_BO, QTY, TEST_PART, BOM_TEMPLATE, DISASSEMBLE_OPERATION_BO, CREATE_TRACKABLE_SFC, MAXIMUM_USAGE, MAXIMUM_NC, ASSEMBLE_AS_REQ, AUTO_CONSUME_KIT, CREATED_DATE_TIME, MODIFIED_DATE_TIME, BOM_COMPONENT_TYPE, PARENT_SEQUENCE, ERP_SEQUENCE, ORDER_ITEM_NUMBER, ERP_CHANGE_NUMBER, IDENTIFIER, STORAGE_LOCATION_BO
|
||||
</sql>
|
||||
|
||||
<!-- BaseMapper标准查询/修改/删除 -->
|
||||
|
||||
<select id="selectByMap" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"></include>
|
||||
FROM BOM_COMPONENT
|
||||
<if test="cm!=null and !cm.isEmpty">
|
||||
<where>
|
||||
<foreach collection="cm.keys" item="k" separator="AND">
|
||||
<if test="cm[k] != null">
|
||||
${k} = #{cm[${k}]}
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectOne" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"></include> FROM BOM_COMPONENT
|
||||
<where>
|
||||
<if test="ew.handle!=null">
|
||||
HANDLE=#{ew.handle}
|
||||
</if>
|
||||
<if test="ew.bomBo!=null"> AND BOM_BO=#{ew.bomBo}</if>
|
||||
<if test="ew.componentGbo!=null"> AND COMPONENT_GBO=#{ew.componentGbo}</if>
|
||||
<if test="ew.sequence!=null"> AND SEQUENCE=#{ew.sequence}</if>
|
||||
<if test="ew.enabled!=null"> AND ENABLED=#{ew.enabled}</if>
|
||||
<if test="ew.validStart!=null"> AND VALID_START=#{ew.validStart}</if>
|
||||
<if test="ew.validEnd!=null"> AND VALID_END=#{ew.validEnd}</if>
|
||||
<if test="ew.useItemDefaults!=null"> AND USE_ITEM_DEFAULTS=#{ew.useItemDefaults}</if>
|
||||
<if test="ew.preAssembled!=null"> AND PRE_ASSEMBLED=#{ew.preAssembled}</if>
|
||||
<if test="ew.assyDataTypeBo!=null"> AND ASSY_DATA_TYPE_BO=#{ew.assyDataTypeBo}</if>
|
||||
<if test="ew.qty!=null"> AND QTY=#{ew.qty}</if>
|
||||
<if test="ew.testPart!=null"> AND TEST_PART=#{ew.testPart}</if>
|
||||
<if test="ew.bomTemplate!=null"> AND BOM_TEMPLATE=#{ew.bomTemplate}</if>
|
||||
<if test="ew.disassembleOperationBo!=null"> AND DISASSEMBLE_OPERATION_BO=#{ew.disassembleOperationBo}</if>
|
||||
<if test="ew.createTrackableSfc!=null"> AND CREATE_TRACKABLE_SFC=#{ew.createTrackableSfc}</if>
|
||||
<if test="ew.maximumUsage!=null"> AND MAXIMUM_USAGE=#{ew.maximumUsage}</if>
|
||||
<if test="ew.maximumNc!=null"> AND MAXIMUM_NC=#{ew.maximumNc}</if>
|
||||
<if test="ew.assembleAsReq!=null"> AND ASSEMBLE_AS_REQ=#{ew.assembleAsReq}</if>
|
||||
<if test="ew.autoConsumeKit!=null"> AND AUTO_CONSUME_KIT=#{ew.autoConsumeKit}</if>
|
||||
<if test="ew.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.createdDateTime}</if>
|
||||
<if test="ew.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.modifiedDateTime}</if>
|
||||
<if test="ew.bomComponentType!=null"> AND BOM_COMPONENT_TYPE=#{ew.bomComponentType}</if>
|
||||
<if test="ew.parentSequence!=null"> AND PARENT_SEQUENCE=#{ew.parentSequence}</if>
|
||||
<if test="ew.erpSequence!=null"> AND ERP_SEQUENCE=#{ew.erpSequence}</if>
|
||||
<if test="ew.orderItemNumber!=null"> AND ORDER_ITEM_NUMBER=#{ew.orderItemNumber}</if>
|
||||
<if test="ew.erpChangeNumber!=null"> AND ERP_CHANGE_NUMBER=#{ew.erpChangeNumber}</if>
|
||||
<if test="ew.identifier!=null"> AND IDENTIFIER=#{ew.identifier}</if>
|
||||
<if test="ew.storageLocationBo!=null"> AND STORAGE_LOCATION_BO=#{ew.storageLocationBo}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCount" resultType="Integer">
|
||||
SELECT COUNT(1) FROM BOM_COMPONENT
|
||||
<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.bomBo!=null"> AND BOM_BO=#{ew.entity.bomBo}</if>
|
||||
<if test="ew.entity.componentGbo!=null"> AND COMPONENT_GBO=#{ew.entity.componentGbo}</if>
|
||||
<if test="ew.entity.sequence!=null"> AND SEQUENCE=#{ew.entity.sequence}</if>
|
||||
<if test="ew.entity.enabled!=null"> AND ENABLED=#{ew.entity.enabled}</if>
|
||||
<if test="ew.entity.validStart!=null"> AND VALID_START=#{ew.entity.validStart}</if>
|
||||
<if test="ew.entity.validEnd!=null"> AND VALID_END=#{ew.entity.validEnd}</if>
|
||||
<if test="ew.entity.useItemDefaults!=null"> AND USE_ITEM_DEFAULTS=#{ew.entity.useItemDefaults}</if>
|
||||
<if test="ew.entity.preAssembled!=null"> AND PRE_ASSEMBLED=#{ew.entity.preAssembled}</if>
|
||||
<if test="ew.entity.assyDataTypeBo!=null"> AND ASSY_DATA_TYPE_BO=#{ew.entity.assyDataTypeBo}</if>
|
||||
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
|
||||
<if test="ew.entity.testPart!=null"> AND TEST_PART=#{ew.entity.testPart}</if>
|
||||
<if test="ew.entity.bomTemplate!=null"> AND BOM_TEMPLATE=#{ew.entity.bomTemplate}</if>
|
||||
<if test="ew.entity.disassembleOperationBo!=null"> AND DISASSEMBLE_OPERATION_BO=#{ew.entity.disassembleOperationBo}</if>
|
||||
<if test="ew.entity.createTrackableSfc!=null"> AND CREATE_TRACKABLE_SFC=#{ew.entity.createTrackableSfc}</if>
|
||||
<if test="ew.entity.maximumUsage!=null"> AND MAXIMUM_USAGE=#{ew.entity.maximumUsage}</if>
|
||||
<if test="ew.entity.maximumNc!=null"> AND MAXIMUM_NC=#{ew.entity.maximumNc}</if>
|
||||
<if test="ew.entity.assembleAsReq!=null"> AND ASSEMBLE_AS_REQ=#{ew.entity.assembleAsReq}</if>
|
||||
<if test="ew.entity.autoConsumeKit!=null"> AND AUTO_CONSUME_KIT=#{ew.entity.autoConsumeKit}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
<if test="ew.entity.bomComponentType!=null"> AND BOM_COMPONENT_TYPE=#{ew.entity.bomComponentType}</if>
|
||||
<if test="ew.entity.parentSequence!=null"> AND PARENT_SEQUENCE=#{ew.entity.parentSequence}</if>
|
||||
<if test="ew.entity.erpSequence!=null"> AND ERP_SEQUENCE=#{ew.entity.erpSequence}</if>
|
||||
<if test="ew.entity.orderItemNumber!=null"> AND ORDER_ITEM_NUMBER=#{ew.entity.orderItemNumber}</if>
|
||||
<if test="ew.entity.erpChangeNumber!=null"> AND ERP_CHANGE_NUMBER=#{ew.entity.erpChangeNumber}</if>
|
||||
<if test="ew.entity.identifier!=null"> AND IDENTIFIER=#{ew.entity.identifier}</if>
|
||||
<if test="ew.entity.storageLocationBo!=null"> AND STORAGE_LOCATION_BO=#{ew.entity.storageLocationBo}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectList" resultMap="BaseResultMap">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM BOM_COMPONENT
|
||||
<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.bomBo!=null"> AND BOM_BO=#{ew.entity.bomBo}</if>
|
||||
<if test="ew.entity.componentGbo!=null"> AND COMPONENT_GBO=#{ew.entity.componentGbo}</if>
|
||||
<if test="ew.entity.sequence!=null"> AND SEQUENCE=#{ew.entity.sequence}</if>
|
||||
<if test="ew.entity.enabled!=null"> AND ENABLED=#{ew.entity.enabled}</if>
|
||||
<if test="ew.entity.validStart!=null"> AND VALID_START=#{ew.entity.validStart}</if>
|
||||
<if test="ew.entity.validEnd!=null"> AND VALID_END=#{ew.entity.validEnd}</if>
|
||||
<if test="ew.entity.useItemDefaults!=null"> AND USE_ITEM_DEFAULTS=#{ew.entity.useItemDefaults}</if>
|
||||
<if test="ew.entity.preAssembled!=null"> AND PRE_ASSEMBLED=#{ew.entity.preAssembled}</if>
|
||||
<if test="ew.entity.assyDataTypeBo!=null"> AND ASSY_DATA_TYPE_BO=#{ew.entity.assyDataTypeBo}</if>
|
||||
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
|
||||
<if test="ew.entity.testPart!=null"> AND TEST_PART=#{ew.entity.testPart}</if>
|
||||
<if test="ew.entity.bomTemplate!=null"> AND BOM_TEMPLATE=#{ew.entity.bomTemplate}</if>
|
||||
<if test="ew.entity.disassembleOperationBo!=null"> AND DISASSEMBLE_OPERATION_BO=#{ew.entity.disassembleOperationBo}</if>
|
||||
<if test="ew.entity.createTrackableSfc!=null"> AND CREATE_TRACKABLE_SFC=#{ew.entity.createTrackableSfc}</if>
|
||||
<if test="ew.entity.maximumUsage!=null"> AND MAXIMUM_USAGE=#{ew.entity.maximumUsage}</if>
|
||||
<if test="ew.entity.maximumNc!=null"> AND MAXIMUM_NC=#{ew.entity.maximumNc}</if>
|
||||
<if test="ew.entity.assembleAsReq!=null"> AND ASSEMBLE_AS_REQ=#{ew.entity.assembleAsReq}</if>
|
||||
<if test="ew.entity.autoConsumeKit!=null"> AND AUTO_CONSUME_KIT=#{ew.entity.autoConsumeKit}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
<if test="ew.entity.bomComponentType!=null"> AND BOM_COMPONENT_TYPE=#{ew.entity.bomComponentType}</if>
|
||||
<if test="ew.entity.parentSequence!=null"> AND PARENT_SEQUENCE=#{ew.entity.parentSequence}</if>
|
||||
<if test="ew.entity.erpSequence!=null"> AND ERP_SEQUENCE=#{ew.entity.erpSequence}</if>
|
||||
<if test="ew.entity.orderItemNumber!=null"> AND ORDER_ITEM_NUMBER=#{ew.entity.orderItemNumber}</if>
|
||||
<if test="ew.entity.erpChangeNumber!=null"> AND ERP_CHANGE_NUMBER=#{ew.entity.erpChangeNumber}</if>
|
||||
<if test="ew.entity.identifier!=null"> AND IDENTIFIER=#{ew.entity.identifier}</if>
|
||||
<if test="ew.entity.storageLocationBo!=null"> AND STORAGE_LOCATION_BO=#{ew.entity.storageLocationBo}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectMaps" resultType="HashMap">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM BOM_COMPONENT
|
||||
<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.bomBo!=null"> AND BOM_BO=#{ew.entity.bomBo}</if>
|
||||
<if test="ew.entity.componentGbo!=null"> AND COMPONENT_GBO=#{ew.entity.componentGbo}</if>
|
||||
<if test="ew.entity.sequence!=null"> AND SEQUENCE=#{ew.entity.sequence}</if>
|
||||
<if test="ew.entity.enabled!=null"> AND ENABLED=#{ew.entity.enabled}</if>
|
||||
<if test="ew.entity.validStart!=null"> AND VALID_START=#{ew.entity.validStart}</if>
|
||||
<if test="ew.entity.validEnd!=null"> AND VALID_END=#{ew.entity.validEnd}</if>
|
||||
<if test="ew.entity.useItemDefaults!=null"> AND USE_ITEM_DEFAULTS=#{ew.entity.useItemDefaults}</if>
|
||||
<if test="ew.entity.preAssembled!=null"> AND PRE_ASSEMBLED=#{ew.entity.preAssembled}</if>
|
||||
<if test="ew.entity.assyDataTypeBo!=null"> AND ASSY_DATA_TYPE_BO=#{ew.entity.assyDataTypeBo}</if>
|
||||
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
|
||||
<if test="ew.entity.testPart!=null"> AND TEST_PART=#{ew.entity.testPart}</if>
|
||||
<if test="ew.entity.bomTemplate!=null"> AND BOM_TEMPLATE=#{ew.entity.bomTemplate}</if>
|
||||
<if test="ew.entity.disassembleOperationBo!=null"> AND DISASSEMBLE_OPERATION_BO=#{ew.entity.disassembleOperationBo}</if>
|
||||
<if test="ew.entity.createTrackableSfc!=null"> AND CREATE_TRACKABLE_SFC=#{ew.entity.createTrackableSfc}</if>
|
||||
<if test="ew.entity.maximumUsage!=null"> AND MAXIMUM_USAGE=#{ew.entity.maximumUsage}</if>
|
||||
<if test="ew.entity.maximumNc!=null"> AND MAXIMUM_NC=#{ew.entity.maximumNc}</if>
|
||||
<if test="ew.entity.assembleAsReq!=null"> AND ASSEMBLE_AS_REQ=#{ew.entity.assembleAsReq}</if>
|
||||
<if test="ew.entity.autoConsumeKit!=null"> AND AUTO_CONSUME_KIT=#{ew.entity.autoConsumeKit}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
<if test="ew.entity.bomComponentType!=null"> AND BOM_COMPONENT_TYPE=#{ew.entity.bomComponentType}</if>
|
||||
<if test="ew.entity.parentSequence!=null"> AND PARENT_SEQUENCE=#{ew.entity.parentSequence}</if>
|
||||
<if test="ew.entity.erpSequence!=null"> AND ERP_SEQUENCE=#{ew.entity.erpSequence}</if>
|
||||
<if test="ew.entity.orderItemNumber!=null"> AND ORDER_ITEM_NUMBER=#{ew.entity.orderItemNumber}</if>
|
||||
<if test="ew.entity.erpChangeNumber!=null"> AND ERP_CHANGE_NUMBER=#{ew.entity.erpChangeNumber}</if>
|
||||
<if test="ew.entity.identifier!=null"> AND IDENTIFIER=#{ew.entity.identifier}</if>
|
||||
<if test="ew.entity.storageLocationBo!=null"> AND STORAGE_LOCATION_BO=#{ew.entity.storageLocationBo}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectObjs" resultType="Object">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM BOM_COMPONENT
|
||||
<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.bomBo!=null"> AND BOM_BO=#{ew.entity.bomBo}</if>
|
||||
<if test="ew.entity.componentGbo!=null"> AND COMPONENT_GBO=#{ew.entity.componentGbo}</if>
|
||||
<if test="ew.entity.sequence!=null"> AND SEQUENCE=#{ew.entity.sequence}</if>
|
||||
<if test="ew.entity.enabled!=null"> AND ENABLED=#{ew.entity.enabled}</if>
|
||||
<if test="ew.entity.validStart!=null"> AND VALID_START=#{ew.entity.validStart}</if>
|
||||
<if test="ew.entity.validEnd!=null"> AND VALID_END=#{ew.entity.validEnd}</if>
|
||||
<if test="ew.entity.useItemDefaults!=null"> AND USE_ITEM_DEFAULTS=#{ew.entity.useItemDefaults}</if>
|
||||
<if test="ew.entity.preAssembled!=null"> AND PRE_ASSEMBLED=#{ew.entity.preAssembled}</if>
|
||||
<if test="ew.entity.assyDataTypeBo!=null"> AND ASSY_DATA_TYPE_BO=#{ew.entity.assyDataTypeBo}</if>
|
||||
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
|
||||
<if test="ew.entity.testPart!=null"> AND TEST_PART=#{ew.entity.testPart}</if>
|
||||
<if test="ew.entity.bomTemplate!=null"> AND BOM_TEMPLATE=#{ew.entity.bomTemplate}</if>
|
||||
<if test="ew.entity.disassembleOperationBo!=null"> AND DISASSEMBLE_OPERATION_BO=#{ew.entity.disassembleOperationBo}</if>
|
||||
<if test="ew.entity.createTrackableSfc!=null"> AND CREATE_TRACKABLE_SFC=#{ew.entity.createTrackableSfc}</if>
|
||||
<if test="ew.entity.maximumUsage!=null"> AND MAXIMUM_USAGE=#{ew.entity.maximumUsage}</if>
|
||||
<if test="ew.entity.maximumNc!=null"> AND MAXIMUM_NC=#{ew.entity.maximumNc}</if>
|
||||
<if test="ew.entity.assembleAsReq!=null"> AND ASSEMBLE_AS_REQ=#{ew.entity.assembleAsReq}</if>
|
||||
<if test="ew.entity.autoConsumeKit!=null"> AND AUTO_CONSUME_KIT=#{ew.entity.autoConsumeKit}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
<if test="ew.entity.bomComponentType!=null"> AND BOM_COMPONENT_TYPE=#{ew.entity.bomComponentType}</if>
|
||||
<if test="ew.entity.parentSequence!=null"> AND PARENT_SEQUENCE=#{ew.entity.parentSequence}</if>
|
||||
<if test="ew.entity.erpSequence!=null"> AND ERP_SEQUENCE=#{ew.entity.erpSequence}</if>
|
||||
<if test="ew.entity.orderItemNumber!=null"> AND ORDER_ITEM_NUMBER=#{ew.entity.orderItemNumber}</if>
|
||||
<if test="ew.entity.erpChangeNumber!=null"> AND ERP_CHANGE_NUMBER=#{ew.entity.erpChangeNumber}</if>
|
||||
<if test="ew.entity.identifier!=null"> AND IDENTIFIER=#{ew.entity.identifier}</if>
|
||||
<if test="ew.entity.storageLocationBo!=null"> AND STORAGE_LOCATION_BO=#{ew.entity.storageLocationBo}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectPage" resultMap="BaseResultMap">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM BOM_COMPONENT
|
||||
<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.bomBo!=null"> AND BOM_BO=#{ew.entity.bomBo}</if>
|
||||
<if test="ew.entity.componentGbo!=null"> AND COMPONENT_GBO=#{ew.entity.componentGbo}</if>
|
||||
<if test="ew.entity.sequence!=null"> AND SEQUENCE=#{ew.entity.sequence}</if>
|
||||
<if test="ew.entity.enabled!=null"> AND ENABLED=#{ew.entity.enabled}</if>
|
||||
<if test="ew.entity.validStart!=null"> AND VALID_START=#{ew.entity.validStart}</if>
|
||||
<if test="ew.entity.validEnd!=null"> AND VALID_END=#{ew.entity.validEnd}</if>
|
||||
<if test="ew.entity.useItemDefaults!=null"> AND USE_ITEM_DEFAULTS=#{ew.entity.useItemDefaults}</if>
|
||||
<if test="ew.entity.preAssembled!=null"> AND PRE_ASSEMBLED=#{ew.entity.preAssembled}</if>
|
||||
<if test="ew.entity.assyDataTypeBo!=null"> AND ASSY_DATA_TYPE_BO=#{ew.entity.assyDataTypeBo}</if>
|
||||
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
|
||||
<if test="ew.entity.testPart!=null"> AND TEST_PART=#{ew.entity.testPart}</if>
|
||||
<if test="ew.entity.bomTemplate!=null"> AND BOM_TEMPLATE=#{ew.entity.bomTemplate}</if>
|
||||
<if test="ew.entity.disassembleOperationBo!=null"> AND DISASSEMBLE_OPERATION_BO=#{ew.entity.disassembleOperationBo}</if>
|
||||
<if test="ew.entity.createTrackableSfc!=null"> AND CREATE_TRACKABLE_SFC=#{ew.entity.createTrackableSfc}</if>
|
||||
<if test="ew.entity.maximumUsage!=null"> AND MAXIMUM_USAGE=#{ew.entity.maximumUsage}</if>
|
||||
<if test="ew.entity.maximumNc!=null"> AND MAXIMUM_NC=#{ew.entity.maximumNc}</if>
|
||||
<if test="ew.entity.assembleAsReq!=null"> AND ASSEMBLE_AS_REQ=#{ew.entity.assembleAsReq}</if>
|
||||
<if test="ew.entity.autoConsumeKit!=null"> AND AUTO_CONSUME_KIT=#{ew.entity.autoConsumeKit}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
<if test="ew.entity.bomComponentType!=null"> AND BOM_COMPONENT_TYPE=#{ew.entity.bomComponentType}</if>
|
||||
<if test="ew.entity.parentSequence!=null"> AND PARENT_SEQUENCE=#{ew.entity.parentSequence}</if>
|
||||
<if test="ew.entity.erpSequence!=null"> AND ERP_SEQUENCE=#{ew.entity.erpSequence}</if>
|
||||
<if test="ew.entity.orderItemNumber!=null"> AND ORDER_ITEM_NUMBER=#{ew.entity.orderItemNumber}</if>
|
||||
<if test="ew.entity.erpChangeNumber!=null"> AND ERP_CHANGE_NUMBER=#{ew.entity.erpChangeNumber}</if>
|
||||
<if test="ew.entity.identifier!=null"> AND IDENTIFIER=#{ew.entity.identifier}</if>
|
||||
<if test="ew.entity.storageLocationBo!=null"> AND STORAGE_LOCATION_BO=#{ew.entity.storageLocationBo}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectMapsPage" resultType="HashMap">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM BOM_COMPONENT
|
||||
<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.bomBo!=null"> AND BOM_BO=#{ew.entity.bomBo}</if>
|
||||
<if test="ew.entity.componentGbo!=null"> AND COMPONENT_GBO=#{ew.entity.componentGbo}</if>
|
||||
<if test="ew.entity.sequence!=null"> AND SEQUENCE=#{ew.entity.sequence}</if>
|
||||
<if test="ew.entity.enabled!=null"> AND ENABLED=#{ew.entity.enabled}</if>
|
||||
<if test="ew.entity.validStart!=null"> AND VALID_START=#{ew.entity.validStart}</if>
|
||||
<if test="ew.entity.validEnd!=null"> AND VALID_END=#{ew.entity.validEnd}</if>
|
||||
<if test="ew.entity.useItemDefaults!=null"> AND USE_ITEM_DEFAULTS=#{ew.entity.useItemDefaults}</if>
|
||||
<if test="ew.entity.preAssembled!=null"> AND PRE_ASSEMBLED=#{ew.entity.preAssembled}</if>
|
||||
<if test="ew.entity.assyDataTypeBo!=null"> AND ASSY_DATA_TYPE_BO=#{ew.entity.assyDataTypeBo}</if>
|
||||
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
|
||||
<if test="ew.entity.testPart!=null"> AND TEST_PART=#{ew.entity.testPart}</if>
|
||||
<if test="ew.entity.bomTemplate!=null"> AND BOM_TEMPLATE=#{ew.entity.bomTemplate}</if>
|
||||
<if test="ew.entity.disassembleOperationBo!=null"> AND DISASSEMBLE_OPERATION_BO=#{ew.entity.disassembleOperationBo}</if>
|
||||
<if test="ew.entity.createTrackableSfc!=null"> AND CREATE_TRACKABLE_SFC=#{ew.entity.createTrackableSfc}</if>
|
||||
<if test="ew.entity.maximumUsage!=null"> AND MAXIMUM_USAGE=#{ew.entity.maximumUsage}</if>
|
||||
<if test="ew.entity.maximumNc!=null"> AND MAXIMUM_NC=#{ew.entity.maximumNc}</if>
|
||||
<if test="ew.entity.assembleAsReq!=null"> AND ASSEMBLE_AS_REQ=#{ew.entity.assembleAsReq}</if>
|
||||
<if test="ew.entity.autoConsumeKit!=null"> AND AUTO_CONSUME_KIT=#{ew.entity.autoConsumeKit}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
<if test="ew.entity.bomComponentType!=null"> AND BOM_COMPONENT_TYPE=#{ew.entity.bomComponentType}</if>
|
||||
<if test="ew.entity.parentSequence!=null"> AND PARENT_SEQUENCE=#{ew.entity.parentSequence}</if>
|
||||
<if test="ew.entity.erpSequence!=null"> AND ERP_SEQUENCE=#{ew.entity.erpSequence}</if>
|
||||
<if test="ew.entity.orderItemNumber!=null"> AND ORDER_ITEM_NUMBER=#{ew.entity.orderItemNumber}</if>
|
||||
<if test="ew.entity.erpChangeNumber!=null"> AND ERP_CHANGE_NUMBER=#{ew.entity.erpChangeNumber}</if>
|
||||
<if test="ew.entity.identifier!=null"> AND IDENTIFIER=#{ew.entity.identifier}</if>
|
||||
<if test="ew.entity.storageLocationBo!=null"> AND STORAGE_LOCATION_BO=#{ew.entity.storageLocationBo}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="com.foreverwin.mesnac.meapi.model.BomComponent">
|
||||
INSERT INTO BOM_COMPONENT
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
HANDLE,
|
||||
<if test="bomBo!=null">BOM_BO,</if>
|
||||
<if test="componentGbo!=null">COMPONENT_GBO,</if>
|
||||
<if test="sequence!=null">SEQUENCE,</if>
|
||||
<if test="enabled!=null">ENABLED,</if>
|
||||
<if test="validStart!=null">VALID_START,</if>
|
||||
<if test="validEnd!=null">VALID_END,</if>
|
||||
<if test="useItemDefaults!=null">USE_ITEM_DEFAULTS,</if>
|
||||
<if test="preAssembled!=null">PRE_ASSEMBLED,</if>
|
||||
<if test="assyDataTypeBo!=null">ASSY_DATA_TYPE_BO,</if>
|
||||
<if test="qty!=null">QTY,</if>
|
||||
<if test="testPart!=null">TEST_PART,</if>
|
||||
<if test="bomTemplate!=null">BOM_TEMPLATE,</if>
|
||||
<if test="disassembleOperationBo!=null">DISASSEMBLE_OPERATION_BO,</if>
|
||||
<if test="createTrackableSfc!=null">CREATE_TRACKABLE_SFC,</if>
|
||||
<if test="maximumUsage!=null">MAXIMUM_USAGE,</if>
|
||||
<if test="maximumNc!=null">MAXIMUM_NC,</if>
|
||||
<if test="assembleAsReq!=null">ASSEMBLE_AS_REQ,</if>
|
||||
<if test="autoConsumeKit!=null">AUTO_CONSUME_KIT,</if>
|
||||
<if test="createdDateTime!=null">CREATED_DATE_TIME,</if>
|
||||
<if test="modifiedDateTime!=null">MODIFIED_DATE_TIME,</if>
|
||||
<if test="bomComponentType!=null">BOM_COMPONENT_TYPE,</if>
|
||||
<if test="parentSequence!=null">PARENT_SEQUENCE,</if>
|
||||
<if test="erpSequence!=null">ERP_SEQUENCE,</if>
|
||||
<if test="orderItemNumber!=null">ORDER_ITEM_NUMBER,</if>
|
||||
<if test="erpChangeNumber!=null">ERP_CHANGE_NUMBER,</if>
|
||||
<if test="identifier!=null">IDENTIFIER,</if>
|
||||
<if test="storageLocationBo!=null">STORAGE_LOCATION_BO,</if>
|
||||
</trim> VALUES
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
#{handle},
|
||||
<if test="bomBo!=null">#{bomBo},</if>
|
||||
<if test="componentGbo!=null">#{componentGbo},</if>
|
||||
<if test="sequence!=null">#{sequence},</if>
|
||||
<if test="enabled!=null">#{enabled},</if>
|
||||
<if test="validStart!=null">#{validStart},</if>
|
||||
<if test="validEnd!=null">#{validEnd},</if>
|
||||
<if test="useItemDefaults!=null">#{useItemDefaults},</if>
|
||||
<if test="preAssembled!=null">#{preAssembled},</if>
|
||||
<if test="assyDataTypeBo!=null">#{assyDataTypeBo},</if>
|
||||
<if test="qty!=null">#{qty},</if>
|
||||
<if test="testPart!=null">#{testPart},</if>
|
||||
<if test="bomTemplate!=null">#{bomTemplate},</if>
|
||||
<if test="disassembleOperationBo!=null">#{disassembleOperationBo},</if>
|
||||
<if test="createTrackableSfc!=null">#{createTrackableSfc},</if>
|
||||
<if test="maximumUsage!=null">#{maximumUsage},</if>
|
||||
<if test="maximumNc!=null">#{maximumNc},</if>
|
||||
<if test="assembleAsReq!=null">#{assembleAsReq},</if>
|
||||
<if test="autoConsumeKit!=null">#{autoConsumeKit},</if>
|
||||
<if test="createdDateTime!=null">#{createdDateTime},</if>
|
||||
<if test="modifiedDateTime!=null">#{modifiedDateTime},</if>
|
||||
<if test="bomComponentType!=null">#{bomComponentType},</if>
|
||||
<if test="parentSequence!=null">#{parentSequence},</if>
|
||||
<if test="erpSequence!=null">#{erpSequence},</if>
|
||||
<if test="orderItemNumber!=null">#{orderItemNumber},</if>
|
||||
<if test="erpChangeNumber!=null">#{erpChangeNumber},</if>
|
||||
<if test="identifier!=null">#{identifier},</if>
|
||||
<if test="storageLocationBo!=null">#{storageLocationBo},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<insert id="insertAllColumn" parameterType="com.foreverwin.mesnac.meapi.model.BomComponent">
|
||||
INSERT INTO BOM_COMPONENT
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<include refid="Base_Column_List"></include>
|
||||
</trim> VALUES
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
#{handle},
|
||||
#{bomBo},
|
||||
#{componentGbo},
|
||||
#{sequence},
|
||||
#{enabled},
|
||||
#{validStart},
|
||||
#{validEnd},
|
||||
#{useItemDefaults},
|
||||
#{preAssembled},
|
||||
#{assyDataTypeBo},
|
||||
#{qty},
|
||||
#{testPart},
|
||||
#{bomTemplate},
|
||||
#{disassembleOperationBo},
|
||||
#{createTrackableSfc},
|
||||
#{maximumUsage},
|
||||
#{maximumNc},
|
||||
#{assembleAsReq},
|
||||
#{autoConsumeKit},
|
||||
#{createdDateTime},
|
||||
#{modifiedDateTime},
|
||||
#{bomComponentType},
|
||||
#{parentSequence},
|
||||
#{erpSequence},
|
||||
#{orderItemNumber},
|
||||
#{erpChangeNumber},
|
||||
#{identifier},
|
||||
#{storageLocationBo},
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<update id="update">
|
||||
UPDATE BOM_COMPONENT <trim prefix="SET" suffixOverrides=",">
|
||||
<if test="et.handle!=null">HANDLE=#{et.handle},</if>
|
||||
<if test="et.bomBo!=null">BOM_BO=#{et.bomBo},</if>
|
||||
<if test="et.componentGbo!=null">COMPONENT_GBO=#{et.componentGbo},</if>
|
||||
<if test="et.sequence!=null">SEQUENCE=#{et.sequence},</if>
|
||||
<if test="et.enabled!=null">ENABLED=#{et.enabled},</if>
|
||||
<if test="et.validStart!=null">VALID_START=#{et.validStart},</if>
|
||||
<if test="et.validEnd!=null">VALID_END=#{et.validEnd},</if>
|
||||
<if test="et.useItemDefaults!=null">USE_ITEM_DEFAULTS=#{et.useItemDefaults},</if>
|
||||
<if test="et.preAssembled!=null">PRE_ASSEMBLED=#{et.preAssembled},</if>
|
||||
<if test="et.assyDataTypeBo!=null">ASSY_DATA_TYPE_BO=#{et.assyDataTypeBo},</if>
|
||||
<if test="et.qty!=null">QTY=#{et.qty},</if>
|
||||
<if test="et.testPart!=null">TEST_PART=#{et.testPart},</if>
|
||||
<if test="et.bomTemplate!=null">BOM_TEMPLATE=#{et.bomTemplate},</if>
|
||||
<if test="et.disassembleOperationBo!=null">DISASSEMBLE_OPERATION_BO=#{et.disassembleOperationBo},</if>
|
||||
<if test="et.createTrackableSfc!=null">CREATE_TRACKABLE_SFC=#{et.createTrackableSfc},</if>
|
||||
<if test="et.maximumUsage!=null">MAXIMUM_USAGE=#{et.maximumUsage},</if>
|
||||
<if test="et.maximumNc!=null">MAXIMUM_NC=#{et.maximumNc},</if>
|
||||
<if test="et.assembleAsReq!=null">ASSEMBLE_AS_REQ=#{et.assembleAsReq},</if>
|
||||
<if test="et.autoConsumeKit!=null">AUTO_CONSUME_KIT=#{et.autoConsumeKit},</if>
|
||||
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
|
||||
<if test="et.modifiedDateTime!=null">MODIFIED_DATE_TIME=#{et.modifiedDateTime},</if>
|
||||
<if test="et.bomComponentType!=null">BOM_COMPONENT_TYPE=#{et.bomComponentType},</if>
|
||||
<if test="et.parentSequence!=null">PARENT_SEQUENCE=#{et.parentSequence},</if>
|
||||
<if test="et.erpSequence!=null">ERP_SEQUENCE=#{et.erpSequence},</if>
|
||||
<if test="et.orderItemNumber!=null">ORDER_ITEM_NUMBER=#{et.orderItemNumber},</if>
|
||||
<if test="et.erpChangeNumber!=null">ERP_CHANGE_NUMBER=#{et.erpChangeNumber},</if>
|
||||
<if test="et.identifier!=null">IDENTIFIER=#{et.identifier},</if>
|
||||
<if test="et.storageLocationBo!=null">STORAGE_LOCATION_BO=#{et.storageLocationBo},</if>
|
||||
</trim>
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
<if test="ew.entity.bomBo!=null"> AND BOM_BO=#{ew.entity.bomBo}</if>
|
||||
<if test="ew.entity.componentGbo!=null"> AND COMPONENT_GBO=#{ew.entity.componentGbo}</if>
|
||||
<if test="ew.entity.sequence!=null"> AND SEQUENCE=#{ew.entity.sequence}</if>
|
||||
<if test="ew.entity.enabled!=null"> AND ENABLED=#{ew.entity.enabled}</if>
|
||||
<if test="ew.entity.validStart!=null"> AND VALID_START=#{ew.entity.validStart}</if>
|
||||
<if test="ew.entity.validEnd!=null"> AND VALID_END=#{ew.entity.validEnd}</if>
|
||||
<if test="ew.entity.useItemDefaults!=null"> AND USE_ITEM_DEFAULTS=#{ew.entity.useItemDefaults}</if>
|
||||
<if test="ew.entity.preAssembled!=null"> AND PRE_ASSEMBLED=#{ew.entity.preAssembled}</if>
|
||||
<if test="ew.entity.assyDataTypeBo!=null"> AND ASSY_DATA_TYPE_BO=#{ew.entity.assyDataTypeBo}</if>
|
||||
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
|
||||
<if test="ew.entity.testPart!=null"> AND TEST_PART=#{ew.entity.testPart}</if>
|
||||
<if test="ew.entity.bomTemplate!=null"> AND BOM_TEMPLATE=#{ew.entity.bomTemplate}</if>
|
||||
<if test="ew.entity.disassembleOperationBo!=null"> AND DISASSEMBLE_OPERATION_BO=#{ew.entity.disassembleOperationBo}</if>
|
||||
<if test="ew.entity.createTrackableSfc!=null"> AND CREATE_TRACKABLE_SFC=#{ew.entity.createTrackableSfc}</if>
|
||||
<if test="ew.entity.maximumUsage!=null"> AND MAXIMUM_USAGE=#{ew.entity.maximumUsage}</if>
|
||||
<if test="ew.entity.maximumNc!=null"> AND MAXIMUM_NC=#{ew.entity.maximumNc}</if>
|
||||
<if test="ew.entity.assembleAsReq!=null"> AND ASSEMBLE_AS_REQ=#{ew.entity.assembleAsReq}</if>
|
||||
<if test="ew.entity.autoConsumeKit!=null"> AND AUTO_CONSUME_KIT=#{ew.entity.autoConsumeKit}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
<if test="ew.entity.bomComponentType!=null"> AND BOM_COMPONENT_TYPE=#{ew.entity.bomComponentType}</if>
|
||||
<if test="ew.entity.parentSequence!=null"> AND PARENT_SEQUENCE=#{ew.entity.parentSequence}</if>
|
||||
<if test="ew.entity.erpSequence!=null"> AND ERP_SEQUENCE=#{ew.entity.erpSequence}</if>
|
||||
<if test="ew.entity.orderItemNumber!=null"> AND ORDER_ITEM_NUMBER=#{ew.entity.orderItemNumber}</if>
|
||||
<if test="ew.entity.erpChangeNumber!=null"> AND ERP_CHANGE_NUMBER=#{ew.entity.erpChangeNumber}</if>
|
||||
<if test="ew.entity.identifier!=null"> AND IDENTIFIER=#{ew.entity.identifier}</if>
|
||||
<if test="ew.entity.storageLocationBo!=null"> AND STORAGE_LOCATION_BO=#{ew.entity.storageLocationBo}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</update>
|
||||
|
||||
|
||||
<delete id="deleteByMap">
|
||||
DELETE FROM BOM_COMPONENT
|
||||
<if test="cm!=null and !cm.isEmpty">
|
||||
<where>
|
||||
<foreach collection="cm.keys" item="k" separator="AND">
|
||||
<if test="cm[k] != null">
|
||||
${k} = #{cm[${k}]}
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</if>
|
||||
</delete>
|
||||
|
||||
<delete id="delete">
|
||||
DELETE FROM BOM_COMPONENT
|
||||
<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.bomBo!=null"> AND BOM_BO=#{ew.entity.bomBo}</if>
|
||||
<if test="ew.entity.componentGbo!=null"> AND COMPONENT_GBO=#{ew.entity.componentGbo}</if>
|
||||
<if test="ew.entity.sequence!=null"> AND SEQUENCE=#{ew.entity.sequence}</if>
|
||||
<if test="ew.entity.enabled!=null"> AND ENABLED=#{ew.entity.enabled}</if>
|
||||
<if test="ew.entity.validStart!=null"> AND VALID_START=#{ew.entity.validStart}</if>
|
||||
<if test="ew.entity.validEnd!=null"> AND VALID_END=#{ew.entity.validEnd}</if>
|
||||
<if test="ew.entity.useItemDefaults!=null"> AND USE_ITEM_DEFAULTS=#{ew.entity.useItemDefaults}</if>
|
||||
<if test="ew.entity.preAssembled!=null"> AND PRE_ASSEMBLED=#{ew.entity.preAssembled}</if>
|
||||
<if test="ew.entity.assyDataTypeBo!=null"> AND ASSY_DATA_TYPE_BO=#{ew.entity.assyDataTypeBo}</if>
|
||||
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
|
||||
<if test="ew.entity.testPart!=null"> AND TEST_PART=#{ew.entity.testPart}</if>
|
||||
<if test="ew.entity.bomTemplate!=null"> AND BOM_TEMPLATE=#{ew.entity.bomTemplate}</if>
|
||||
<if test="ew.entity.disassembleOperationBo!=null"> AND DISASSEMBLE_OPERATION_BO=#{ew.entity.disassembleOperationBo}</if>
|
||||
<if test="ew.entity.createTrackableSfc!=null"> AND CREATE_TRACKABLE_SFC=#{ew.entity.createTrackableSfc}</if>
|
||||
<if test="ew.entity.maximumUsage!=null"> AND MAXIMUM_USAGE=#{ew.entity.maximumUsage}</if>
|
||||
<if test="ew.entity.maximumNc!=null"> AND MAXIMUM_NC=#{ew.entity.maximumNc}</if>
|
||||
<if test="ew.entity.assembleAsReq!=null"> AND ASSEMBLE_AS_REQ=#{ew.entity.assembleAsReq}</if>
|
||||
<if test="ew.entity.autoConsumeKit!=null"> AND AUTO_CONSUME_KIT=#{ew.entity.autoConsumeKit}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
<if test="ew.entity.bomComponentType!=null"> AND BOM_COMPONENT_TYPE=#{ew.entity.bomComponentType}</if>
|
||||
<if test="ew.entity.parentSequence!=null"> AND PARENT_SEQUENCE=#{ew.entity.parentSequence}</if>
|
||||
<if test="ew.entity.erpSequence!=null"> AND ERP_SEQUENCE=#{ew.entity.erpSequence}</if>
|
||||
<if test="ew.entity.orderItemNumber!=null"> AND ORDER_ITEM_NUMBER=#{ew.entity.orderItemNumber}</if>
|
||||
<if test="ew.entity.erpChangeNumber!=null"> AND ERP_CHANGE_NUMBER=#{ew.entity.erpChangeNumber}</if>
|
||||
<if test="ew.entity.identifier!=null"> AND IDENTIFIER=#{ew.entity.identifier}</if>
|
||||
<if test="ew.entity.storageLocationBo!=null"> AND STORAGE_LOCATION_BO=#{ew.entity.storageLocationBo}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</delete>
|
||||
|
||||
<!-- BaseMapper标准查询/修改/删除 -->
|
||||
<!--自定义查询/修改/删除-->
|
||||
<select id="selectBomComponentByOperation" resultMap="BaseResultMap">
|
||||
SELECT BC.* FROM BOM_COMPONENT BC
|
||||
JOIN BOM_OPERATION BO ON BO.BOM_COMPONENT_BO =BC.HANDLE AND BO.OPERATION_BO =#{operationBo}
|
||||
WHERE BC.BOM_BO =#{bomBo}
|
||||
</select>
|
||||
|
||||
<select id="selectByBomBo" resultMap="BaseResultMap">
|
||||
SELECT BC.*
|
||||
FROM BOM_COMPONENT BC
|
||||
INNER JOIN ITEM I ON I.HANDLE=BC.COMPONENT_GBO
|
||||
LEFT JOIN ITEM_T IT
|
||||
ON IT.ITEM_BO = I.HANDLE AND IT.LOCALE = #{locale}
|
||||
LEFT JOIN BOM_OPERATION BO
|
||||
ON BO.BOM_COMPONENT_BO = BC.HANDLE
|
||||
WHERE BC.BOM_BO = #{bomBo}
|
||||
</select>
|
||||
|
||||
<select id="getBomComponentMainFlag" resultMap="com.foreverwin.mesnac.meapi.mapper.CustomFieldsMapper.BaseResultMap">
|
||||
SELECT
|
||||
BEIKZ.VALUE
|
||||
FROM BOM BOM
|
||||
JOIN BOM_COMPONENT BC ON BOM.HANDLE = BC.BOM_BO
|
||||
JOIN CUSTOM_FIELDS BEIKZ ON BC.HANDLE = BEIKZ.HANDLE AND BEIKZ."ATTRIBUTE" = 'BEIKZ'
|
||||
WHERE BC.COMPONENT_GBO = #{componentBo}
|
||||
AND BOM.HANDLE = #{bomBo}
|
||||
</select>
|
||||
|
||||
<select id="selectNeedAssemblyQty" resultType="java.lang.Integer">
|
||||
SELECT SUM(bc.QTY) qty FROM BOM_COMPONENT BC
|
||||
JOIN ITEM IT ON ((BC.COMPONENT_GBO='ItemBO:'||IT.SITE||','||IT.ITEM||',#' AND IT.CURRENT_REVISION='true') OR IT.HANDLE=BC.COMPONENT_GBO)
|
||||
JOIN CUSTOM_FIELDS CFS ON IT.HANDLE = CFS.HANDLE AND CFS.ATTRIBUTE = 'ZZTRACEABIITY_TYPE' AND CFS.VALUE = '1'
|
||||
JOIN BOM_OPERATION BO ON BC.HANDLE =BO.BOM_COMPONENT_BO AND OPERATION_BO=#{operationBo}
|
||||
WHERE BC.BOM_BO =#{bomBo}
|
||||
</select>
|
||||
<select id="selectListBySfcBoOAndOperationBo" resultMap="BaseResultMap">
|
||||
SELECT BO.*
|
||||
FROM SFC_BOM S
|
||||
INNER JOIN BOM_COMPONENT M ON S.BOM_BO=M.BOM_BO
|
||||
INNER JOIN BOM_OPERATION BO ON BO.BOM_COMPONENT_BO=M.HANDLE
|
||||
INNER JOIN SFC SF ON SF.HANDLE=S.SFC_BO
|
||||
WHERE S.SFC_BO =#{sfcBo}
|
||||
<if test="operationBo != null and operationBo != ''">
|
||||
AND BO.OPERATION_BO =#{operationBo}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectListByBomBoAndBomItemNo" resultMap="BaseResultMap">
|
||||
SELECT *
|
||||
FROM BOM_COMPONENT
|
||||
WHERE BOM_BO = #{bomBo}
|
||||
AND SEQUENCE IN
|
||||
(
|
||||
<foreach item="item" index="index" collection="bomItemNoList" separator=",">#{item}</foreach>
|
||||
)
|
||||
</select>
|
||||
|
||||
<select id="selectListByShopOrderBo" resultMap="BaseResultMap">
|
||||
SELECT BC.*
|
||||
FROM SHOP_ORDER SO
|
||||
INNER JOIN BOM_COMPONENT BC
|
||||
ON CASE WHEN SO.BOM_BO IS NULL THEN SO.PLANNED_BOM_BO ELSE SO.BOM_BO END = BC.BOM_BO
|
||||
WHERE SO.HANDLE = #{shopOrderBo}
|
||||
</select>
|
||||
|
||||
<select id="selectListByShopOrderBoItemBo" resultMap="BaseResultMap">
|
||||
SELECT BC.*
|
||||
FROM SHOP_ORDER SO
|
||||
INNER JOIN BOM_COMPONENT BC
|
||||
ON CASE WHEN SO.BOM_BO IS NULL THEN SO.PLANNED_BOM_BO ELSE SO.BOM_BO END = BC.BOM_BO
|
||||
WHERE SO.HANDLE = #{shopOrderBo} AND (COMPONENT_GBO = #{itemBo} OR COMPONENT_GBO = 'ItemBO:' || SO.SITE || ',' || #{item} || ',#')
|
||||
</select>
|
||||
|
||||
<select id="selectShopOrderBomComponentByWorkCenterBo" resultMap="BaseResultMap">
|
||||
SELECT DISTINCT BC.COMPONENT_GBO
|
||||
FROM SHOP_ORDER S
|
||||
JOIN BOM_COMPONENT bc ON s.PLANNED_BOM_BO =bc.BOM_BO
|
||||
JOIN CUSTOM_FIELDS CF ON S.HANDLE = CF.HANDLE AND CF.ATTRIBUTE = 'WORK_ORDER_STATUS' AND CF.VALUE != '已完成' AND CF.VALUE != '取消'
|
||||
WHERE PLANNED_WORK_CENTER_BO = #{workCenterBO}
|
||||
</select>
|
||||
|
||||
<select id = "getSfcBomComponent" resultMap="BaseResultMap">
|
||||
SELECT RS.STEP_ID,OP.OPERATION,BC.COMPONENT_GBO,TP.VALUE ACCESSORY_TYPE
|
||||
FROM SFC SFC
|
||||
JOIN SFC_ROUTING SRI ON SRI.SFC_BO =SFC.HANDLE
|
||||
JOIN SFC_ROUTER SR ON SRI.HANDLE =SR.SFC_ROUTING_BO
|
||||
JOIN ROUTER_STEP rs ON RS.ROUTER_BO =SR.ROUTER_BO
|
||||
JOIN ROUTER_OPERATION ro ON rs.HANDLE =ro.ROUTER_STEP_BO
|
||||
JOIN SFC_BOM SB ON SFC.HANDLE =SB.SFC_BO
|
||||
JOIN BOM_COMPONENT BC ON SB.BOM_BO =BC.BOM_BO
|
||||
LEFT JOIN CUSTOM_FIELDS TP ON BC.COMPONENT_GBO =TP.HANDLE AND TP."ATTRIBUTE"='ACCESSORY_TYPE'
|
||||
LEFT JOIN CUSTOM_FIELDS CF ON BC.HANDLE =CF.HANDLE AND RS.STEP_ID=CF.VALUE AND CF."ATTRIBUTE"='STEP_ID'
|
||||
JOIN BOM_OPERATION BO ON BC.HANDLE =BO.BOM_COMPONENT_BO AND BO.OPERATION_BO = RO.OPERATION_BO
|
||||
JOIN OPERATION OP ON OP.HANDLE= BO.OPERATION_BO OR ('OperationBO:' || #{site} || ',' || OP.OPERATION || ',#' = BO.OPERATION_BO AND OP.CURRENT_REVISION = 'true')
|
||||
WHERE SFC.HANDLE=#{sfcBo}
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,550 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.foreverwin.mesnac.meapi.mapper.BomMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.foreverwin.mesnac.meapi.model.Bom">
|
||||
<id column="HANDLE" property="handle" />
|
||||
<result column="CHANGE_STAMP" property="changeStamp" />
|
||||
<result column="SITE" property="site" />
|
||||
<result column="BOM" property="bom" />
|
||||
<result column="BOM_TYPE" property="bomType" />
|
||||
<result column="DESCRIPTION" property="description" />
|
||||
<result column="STATUS_BO" property="statusBo" />
|
||||
<result column="TMP_BOM" property="tmpBom" />
|
||||
<result column="COPIED_FROM_BOM_BO" property="copiedFromBomBo" />
|
||||
<result column="REVISION" property="revision" />
|
||||
<result column="CURRENT_REVISION" property="currentRevision" />
|
||||
<result column="BOM_TEMPLATE" property="bomTemplate" />
|
||||
<result column="HAS_BEEN_RELEASED" property="hasBeenReleased" />
|
||||
<result column="EFF_START_DATE" property="effStartDate" />
|
||||
<result column="EFF_END_DATE" property="effEndDate" />
|
||||
<result column="EFFECTIVITY_CONTROL" property="effectivityControl" />
|
||||
<result column="PREV_SITE" property="prevSite" />
|
||||
<result column="ORIGINAL_TRANSFER_KEY" property="originalTransferKey" />
|
||||
<result column="ERP_BILL_OF_MATERIAL" property="erpBillOfMaterial" />
|
||||
<result column="CREATED_DATE_TIME" property="createdDateTime" />
|
||||
<result column="MODIFIED_DATE_TIME" property="modifiedDateTime" />
|
||||
<result column="PARTITION_DATE" property="partitionDate" />
|
||||
<result column="MODEL" property="model" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
HANDLE, CHANGE_STAMP, SITE, BOM, BOM_TYPE, DESCRIPTION, STATUS_BO, TMP_BOM, COPIED_FROM_BOM_BO, REVISION, CURRENT_REVISION, BOM_TEMPLATE, HAS_BEEN_RELEASED, EFF_START_DATE, EFF_END_DATE, EFFECTIVITY_CONTROL, PREV_SITE, ORIGINAL_TRANSFER_KEY, ERP_BILL_OF_MATERIAL, CREATED_DATE_TIME, MODIFIED_DATE_TIME, PARTITION_DATE, MODEL
|
||||
</sql>
|
||||
|
||||
<!-- BaseMapper标准查询/修改/删除 -->
|
||||
<select id="selectById" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"></include> FROM BOM WHERE HANDLE=#{handle}
|
||||
</select>
|
||||
<select id="selectByMap" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"></include>
|
||||
FROM BOM
|
||||
<if test="cm!=null and !cm.isEmpty">
|
||||
<where>
|
||||
<foreach collection="cm.keys" item="k" separator="AND">
|
||||
<if test="cm[k] != null">
|
||||
${k} = #{cm[${k}]}
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectOne" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"></include> FROM BOM
|
||||
<where>
|
||||
<if test="ew.handle!=null">
|
||||
HANDLE=#{ew.handle}
|
||||
</if>
|
||||
<if test="ew.changeStamp!=null"> AND CHANGE_STAMP=#{ew.changeStamp}</if>
|
||||
<if test="ew.site!=null"> AND SITE=#{ew.site}</if>
|
||||
<if test="ew.bom!=null"> AND BOM=#{ew.bom}</if>
|
||||
<if test="ew.bomType!=null"> AND BOM_TYPE=#{ew.bomType}</if>
|
||||
<if test="ew.description!=null"> AND DESCRIPTION=#{ew.description}</if>
|
||||
<if test="ew.statusBo!=null"> AND STATUS_BO=#{ew.statusBo}</if>
|
||||
<if test="ew.tmpBom!=null"> AND TMP_BOM=#{ew.tmpBom}</if>
|
||||
<if test="ew.copiedFromBomBo!=null"> AND COPIED_FROM_BOM_BO=#{ew.copiedFromBomBo}</if>
|
||||
<if test="ew.revision!=null"> AND REVISION=#{ew.revision}</if>
|
||||
<if test="ew.currentRevision!=null"> AND CURRENT_REVISION=#{ew.currentRevision}</if>
|
||||
<if test="ew.bomTemplate!=null"> AND BOM_TEMPLATE=#{ew.bomTemplate}</if>
|
||||
<if test="ew.hasBeenReleased!=null"> AND HAS_BEEN_RELEASED=#{ew.hasBeenReleased}</if>
|
||||
<if test="ew.effStartDate!=null"> AND EFF_START_DATE=#{ew.effStartDate}</if>
|
||||
<if test="ew.effEndDate!=null"> AND EFF_END_DATE=#{ew.effEndDate}</if>
|
||||
<if test="ew.effectivityControl!=null"> AND EFFECTIVITY_CONTROL=#{ew.effectivityControl}</if>
|
||||
<if test="ew.prevSite!=null"> AND PREV_SITE=#{ew.prevSite}</if>
|
||||
<if test="ew.originalTransferKey!=null"> AND ORIGINAL_TRANSFER_KEY=#{ew.originalTransferKey}</if>
|
||||
<if test="ew.erpBillOfMaterial!=null"> AND ERP_BILL_OF_MATERIAL=#{ew.erpBillOfMaterial}</if>
|
||||
<if test="ew.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.createdDateTime}</if>
|
||||
<if test="ew.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.modifiedDateTime}</if>
|
||||
<if test="ew.partitionDate!=null"> AND PARTITION_DATE=#{ew.partitionDate}</if>
|
||||
<if test="ew.model!=null"> AND MODEL=#{ew.model}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCount" resultType="Integer">
|
||||
SELECT COUNT(1) FROM BOM
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
</if>
|
||||
<if test="ew.entity.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
|
||||
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||||
<if test="ew.entity.bom!=null"> AND BOM=#{ew.entity.bom}</if>
|
||||
<if test="ew.entity.bomType!=null"> AND BOM_TYPE=#{ew.entity.bomType}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
|
||||
<if test="ew.entity.tmpBom!=null"> AND TMP_BOM=#{ew.entity.tmpBom}</if>
|
||||
<if test="ew.entity.copiedFromBomBo!=null"> AND COPIED_FROM_BOM_BO=#{ew.entity.copiedFromBomBo}</if>
|
||||
<if test="ew.entity.revision!=null"> AND REVISION=#{ew.entity.revision}</if>
|
||||
<if test="ew.entity.currentRevision!=null"> AND CURRENT_REVISION=#{ew.entity.currentRevision}</if>
|
||||
<if test="ew.entity.bomTemplate!=null"> AND BOM_TEMPLATE=#{ew.entity.bomTemplate}</if>
|
||||
<if test="ew.entity.hasBeenReleased!=null"> AND HAS_BEEN_RELEASED=#{ew.entity.hasBeenReleased}</if>
|
||||
<if test="ew.entity.effStartDate!=null"> AND EFF_START_DATE=#{ew.entity.effStartDate}</if>
|
||||
<if test="ew.entity.effEndDate!=null"> AND EFF_END_DATE=#{ew.entity.effEndDate}</if>
|
||||
<if test="ew.entity.effectivityControl!=null"> AND EFFECTIVITY_CONTROL=#{ew.entity.effectivityControl}</if>
|
||||
<if test="ew.entity.prevSite!=null"> AND PREV_SITE=#{ew.entity.prevSite}</if>
|
||||
<if test="ew.entity.originalTransferKey!=null"> AND ORIGINAL_TRANSFER_KEY=#{ew.entity.originalTransferKey}</if>
|
||||
<if test="ew.entity.erpBillOfMaterial!=null"> AND ERP_BILL_OF_MATERIAL=#{ew.entity.erpBillOfMaterial}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
<if test="ew.entity.partitionDate!=null"> AND PARTITION_DATE=#{ew.entity.partitionDate}</if>
|
||||
<if test="ew.entity.model!=null"> AND MODEL=#{ew.entity.model}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectList" resultMap="BaseResultMap">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM BOM
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
</if>
|
||||
<if test="ew.entity.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
|
||||
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||||
<if test="ew.entity.bom!=null"> AND BOM=#{ew.entity.bom}</if>
|
||||
<if test="ew.entity.bomType!=null"> AND BOM_TYPE=#{ew.entity.bomType}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
|
||||
<if test="ew.entity.tmpBom!=null"> AND TMP_BOM=#{ew.entity.tmpBom}</if>
|
||||
<if test="ew.entity.copiedFromBomBo!=null"> AND COPIED_FROM_BOM_BO=#{ew.entity.copiedFromBomBo}</if>
|
||||
<if test="ew.entity.revision!=null"> AND REVISION=#{ew.entity.revision}</if>
|
||||
<if test="ew.entity.currentRevision!=null"> AND CURRENT_REVISION=#{ew.entity.currentRevision}</if>
|
||||
<if test="ew.entity.bomTemplate!=null"> AND BOM_TEMPLATE=#{ew.entity.bomTemplate}</if>
|
||||
<if test="ew.entity.hasBeenReleased!=null"> AND HAS_BEEN_RELEASED=#{ew.entity.hasBeenReleased}</if>
|
||||
<if test="ew.entity.effStartDate!=null"> AND EFF_START_DATE=#{ew.entity.effStartDate}</if>
|
||||
<if test="ew.entity.effEndDate!=null"> AND EFF_END_DATE=#{ew.entity.effEndDate}</if>
|
||||
<if test="ew.entity.effectivityControl!=null"> AND EFFECTIVITY_CONTROL=#{ew.entity.effectivityControl}</if>
|
||||
<if test="ew.entity.prevSite!=null"> AND PREV_SITE=#{ew.entity.prevSite}</if>
|
||||
<if test="ew.entity.originalTransferKey!=null"> AND ORIGINAL_TRANSFER_KEY=#{ew.entity.originalTransferKey}</if>
|
||||
<if test="ew.entity.erpBillOfMaterial!=null"> AND ERP_BILL_OF_MATERIAL=#{ew.entity.erpBillOfMaterial}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
<if test="ew.entity.partitionDate!=null"> AND PARTITION_DATE=#{ew.entity.partitionDate}</if>
|
||||
<if test="ew.entity.model!=null"> AND MODEL=#{ew.entity.model}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectMaps" resultType="HashMap">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM BOM
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
</if>
|
||||
<if test="ew.entity.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
|
||||
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||||
<if test="ew.entity.bom!=null"> AND BOM=#{ew.entity.bom}</if>
|
||||
<if test="ew.entity.bomType!=null"> AND BOM_TYPE=#{ew.entity.bomType}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
|
||||
<if test="ew.entity.tmpBom!=null"> AND TMP_BOM=#{ew.entity.tmpBom}</if>
|
||||
<if test="ew.entity.copiedFromBomBo!=null"> AND COPIED_FROM_BOM_BO=#{ew.entity.copiedFromBomBo}</if>
|
||||
<if test="ew.entity.revision!=null"> AND REVISION=#{ew.entity.revision}</if>
|
||||
<if test="ew.entity.currentRevision!=null"> AND CURRENT_REVISION=#{ew.entity.currentRevision}</if>
|
||||
<if test="ew.entity.bomTemplate!=null"> AND BOM_TEMPLATE=#{ew.entity.bomTemplate}</if>
|
||||
<if test="ew.entity.hasBeenReleased!=null"> AND HAS_BEEN_RELEASED=#{ew.entity.hasBeenReleased}</if>
|
||||
<if test="ew.entity.effStartDate!=null"> AND EFF_START_DATE=#{ew.entity.effStartDate}</if>
|
||||
<if test="ew.entity.effEndDate!=null"> AND EFF_END_DATE=#{ew.entity.effEndDate}</if>
|
||||
<if test="ew.entity.effectivityControl!=null"> AND EFFECTIVITY_CONTROL=#{ew.entity.effectivityControl}</if>
|
||||
<if test="ew.entity.prevSite!=null"> AND PREV_SITE=#{ew.entity.prevSite}</if>
|
||||
<if test="ew.entity.originalTransferKey!=null"> AND ORIGINAL_TRANSFER_KEY=#{ew.entity.originalTransferKey}</if>
|
||||
<if test="ew.entity.erpBillOfMaterial!=null"> AND ERP_BILL_OF_MATERIAL=#{ew.entity.erpBillOfMaterial}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
<if test="ew.entity.partitionDate!=null"> AND PARTITION_DATE=#{ew.entity.partitionDate}</if>
|
||||
<if test="ew.entity.model!=null"> AND MODEL=#{ew.entity.model}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectObjs" resultType="Object">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM BOM
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
</if>
|
||||
<if test="ew.entity.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
|
||||
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||||
<if test="ew.entity.bom!=null"> AND BOM=#{ew.entity.bom}</if>
|
||||
<if test="ew.entity.bomType!=null"> AND BOM_TYPE=#{ew.entity.bomType}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
|
||||
<if test="ew.entity.tmpBom!=null"> AND TMP_BOM=#{ew.entity.tmpBom}</if>
|
||||
<if test="ew.entity.copiedFromBomBo!=null"> AND COPIED_FROM_BOM_BO=#{ew.entity.copiedFromBomBo}</if>
|
||||
<if test="ew.entity.revision!=null"> AND REVISION=#{ew.entity.revision}</if>
|
||||
<if test="ew.entity.currentRevision!=null"> AND CURRENT_REVISION=#{ew.entity.currentRevision}</if>
|
||||
<if test="ew.entity.bomTemplate!=null"> AND BOM_TEMPLATE=#{ew.entity.bomTemplate}</if>
|
||||
<if test="ew.entity.hasBeenReleased!=null"> AND HAS_BEEN_RELEASED=#{ew.entity.hasBeenReleased}</if>
|
||||
<if test="ew.entity.effStartDate!=null"> AND EFF_START_DATE=#{ew.entity.effStartDate}</if>
|
||||
<if test="ew.entity.effEndDate!=null"> AND EFF_END_DATE=#{ew.entity.effEndDate}</if>
|
||||
<if test="ew.entity.effectivityControl!=null"> AND EFFECTIVITY_CONTROL=#{ew.entity.effectivityControl}</if>
|
||||
<if test="ew.entity.prevSite!=null"> AND PREV_SITE=#{ew.entity.prevSite}</if>
|
||||
<if test="ew.entity.originalTransferKey!=null"> AND ORIGINAL_TRANSFER_KEY=#{ew.entity.originalTransferKey}</if>
|
||||
<if test="ew.entity.erpBillOfMaterial!=null"> AND ERP_BILL_OF_MATERIAL=#{ew.entity.erpBillOfMaterial}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
<if test="ew.entity.partitionDate!=null"> AND PARTITION_DATE=#{ew.entity.partitionDate}</if>
|
||||
<if test="ew.entity.model!=null"> AND MODEL=#{ew.entity.model}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectPage" resultMap="BaseResultMap">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM BOM
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
</if>
|
||||
<if test="ew.entity.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
|
||||
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||||
<if test="ew.entity.bom!=null"> AND BOM=#{ew.entity.bom}</if>
|
||||
<if test="ew.entity.bomType!=null"> AND BOM_TYPE=#{ew.entity.bomType}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
|
||||
<if test="ew.entity.tmpBom!=null"> AND TMP_BOM=#{ew.entity.tmpBom}</if>
|
||||
<if test="ew.entity.copiedFromBomBo!=null"> AND COPIED_FROM_BOM_BO=#{ew.entity.copiedFromBomBo}</if>
|
||||
<if test="ew.entity.revision!=null"> AND REVISION=#{ew.entity.revision}</if>
|
||||
<if test="ew.entity.currentRevision!=null"> AND CURRENT_REVISION=#{ew.entity.currentRevision}</if>
|
||||
<if test="ew.entity.bomTemplate!=null"> AND BOM_TEMPLATE=#{ew.entity.bomTemplate}</if>
|
||||
<if test="ew.entity.hasBeenReleased!=null"> AND HAS_BEEN_RELEASED=#{ew.entity.hasBeenReleased}</if>
|
||||
<if test="ew.entity.effStartDate!=null"> AND EFF_START_DATE=#{ew.entity.effStartDate}</if>
|
||||
<if test="ew.entity.effEndDate!=null"> AND EFF_END_DATE=#{ew.entity.effEndDate}</if>
|
||||
<if test="ew.entity.effectivityControl!=null"> AND EFFECTIVITY_CONTROL=#{ew.entity.effectivityControl}</if>
|
||||
<if test="ew.entity.prevSite!=null"> AND PREV_SITE=#{ew.entity.prevSite}</if>
|
||||
<if test="ew.entity.originalTransferKey!=null"> AND ORIGINAL_TRANSFER_KEY=#{ew.entity.originalTransferKey}</if>
|
||||
<if test="ew.entity.erpBillOfMaterial!=null"> AND ERP_BILL_OF_MATERIAL=#{ew.entity.erpBillOfMaterial}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
<if test="ew.entity.partitionDate!=null"> AND PARTITION_DATE=#{ew.entity.partitionDate}</if>
|
||||
<if test="ew.entity.model!=null"> AND MODEL=#{ew.entity.model}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectMapsPage" resultType="HashMap">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM BOM
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
</if>
|
||||
<if test="ew.entity.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
|
||||
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||||
<if test="ew.entity.bom!=null"> AND BOM=#{ew.entity.bom}</if>
|
||||
<if test="ew.entity.bomType!=null"> AND BOM_TYPE=#{ew.entity.bomType}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
|
||||
<if test="ew.entity.tmpBom!=null"> AND TMP_BOM=#{ew.entity.tmpBom}</if>
|
||||
<if test="ew.entity.copiedFromBomBo!=null"> AND COPIED_FROM_BOM_BO=#{ew.entity.copiedFromBomBo}</if>
|
||||
<if test="ew.entity.revision!=null"> AND REVISION=#{ew.entity.revision}</if>
|
||||
<if test="ew.entity.currentRevision!=null"> AND CURRENT_REVISION=#{ew.entity.currentRevision}</if>
|
||||
<if test="ew.entity.bomTemplate!=null"> AND BOM_TEMPLATE=#{ew.entity.bomTemplate}</if>
|
||||
<if test="ew.entity.hasBeenReleased!=null"> AND HAS_BEEN_RELEASED=#{ew.entity.hasBeenReleased}</if>
|
||||
<if test="ew.entity.effStartDate!=null"> AND EFF_START_DATE=#{ew.entity.effStartDate}</if>
|
||||
<if test="ew.entity.effEndDate!=null"> AND EFF_END_DATE=#{ew.entity.effEndDate}</if>
|
||||
<if test="ew.entity.effectivityControl!=null"> AND EFFECTIVITY_CONTROL=#{ew.entity.effectivityControl}</if>
|
||||
<if test="ew.entity.prevSite!=null"> AND PREV_SITE=#{ew.entity.prevSite}</if>
|
||||
<if test="ew.entity.originalTransferKey!=null"> AND ORIGINAL_TRANSFER_KEY=#{ew.entity.originalTransferKey}</if>
|
||||
<if test="ew.entity.erpBillOfMaterial!=null"> AND ERP_BILL_OF_MATERIAL=#{ew.entity.erpBillOfMaterial}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
<if test="ew.entity.partitionDate!=null"> AND PARTITION_DATE=#{ew.entity.partitionDate}</if>
|
||||
<if test="ew.entity.model!=null"> AND MODEL=#{ew.entity.model}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="com.foreverwin.mesnac.meapi.model.Bom">
|
||||
INSERT INTO BOM
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
HANDLE,
|
||||
<if test="changeStamp!=null">CHANGE_STAMP,</if>
|
||||
<if test="site!=null">SITE,</if>
|
||||
<if test="bom!=null">BOM,</if>
|
||||
<if test="bomType!=null">BOM_TYPE,</if>
|
||||
<if test="description!=null">DESCRIPTION,</if>
|
||||
<if test="statusBo!=null">STATUS_BO,</if>
|
||||
<if test="tmpBom!=null">TMP_BOM,</if>
|
||||
<if test="copiedFromBomBo!=null">COPIED_FROM_BOM_BO,</if>
|
||||
<if test="revision!=null">REVISION,</if>
|
||||
<if test="currentRevision!=null">CURRENT_REVISION,</if>
|
||||
<if test="bomTemplate!=null">BOM_TEMPLATE,</if>
|
||||
<if test="hasBeenReleased!=null">HAS_BEEN_RELEASED,</if>
|
||||
<if test="effStartDate!=null">EFF_START_DATE,</if>
|
||||
<if test="effEndDate!=null">EFF_END_DATE,</if>
|
||||
<if test="effectivityControl!=null">EFFECTIVITY_CONTROL,</if>
|
||||
<if test="prevSite!=null">PREV_SITE,</if>
|
||||
<if test="originalTransferKey!=null">ORIGINAL_TRANSFER_KEY,</if>
|
||||
<if test="erpBillOfMaterial!=null">ERP_BILL_OF_MATERIAL,</if>
|
||||
<if test="createdDateTime!=null">CREATED_DATE_TIME,</if>
|
||||
<if test="modifiedDateTime!=null">MODIFIED_DATE_TIME,</if>
|
||||
<if test="partitionDate!=null">PARTITION_DATE,</if>
|
||||
<if test="model!=null">MODEL,</if>
|
||||
</trim> VALUES
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
#{handle},
|
||||
<if test="changeStamp!=null">#{changeStamp},</if>
|
||||
<if test="site!=null">#{site},</if>
|
||||
<if test="bom!=null">#{bom},</if>
|
||||
<if test="bomType!=null">#{bomType},</if>
|
||||
<if test="description!=null">#{description},</if>
|
||||
<if test="statusBo!=null">#{statusBo},</if>
|
||||
<if test="tmpBom!=null">#{tmpBom},</if>
|
||||
<if test="copiedFromBomBo!=null">#{copiedFromBomBo},</if>
|
||||
<if test="revision!=null">#{revision},</if>
|
||||
<if test="currentRevision!=null">#{currentRevision},</if>
|
||||
<if test="bomTemplate!=null">#{bomTemplate},</if>
|
||||
<if test="hasBeenReleased!=null">#{hasBeenReleased},</if>
|
||||
<if test="effStartDate!=null">#{effStartDate},</if>
|
||||
<if test="effEndDate!=null">#{effEndDate},</if>
|
||||
<if test="effectivityControl!=null">#{effectivityControl},</if>
|
||||
<if test="prevSite!=null">#{prevSite},</if>
|
||||
<if test="originalTransferKey!=null">#{originalTransferKey},</if>
|
||||
<if test="erpBillOfMaterial!=null">#{erpBillOfMaterial},</if>
|
||||
<if test="createdDateTime!=null">#{createdDateTime},</if>
|
||||
<if test="modifiedDateTime!=null">#{modifiedDateTime},</if>
|
||||
<if test="partitionDate!=null">#{partitionDate},</if>
|
||||
<if test="model!=null">#{model},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<insert id="insertAllColumn" parameterType="com.foreverwin.mesnac.meapi.model.Bom">
|
||||
INSERT INTO BOM
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<include refid="Base_Column_List"></include>
|
||||
</trim> VALUES
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
#{handle},
|
||||
#{changeStamp},
|
||||
#{site},
|
||||
#{bom},
|
||||
#{bomType},
|
||||
#{description},
|
||||
#{statusBo},
|
||||
#{tmpBom},
|
||||
#{copiedFromBomBo},
|
||||
#{revision},
|
||||
#{currentRevision},
|
||||
#{bomTemplate},
|
||||
#{hasBeenReleased},
|
||||
#{effStartDate},
|
||||
#{effEndDate},
|
||||
#{effectivityControl},
|
||||
#{prevSite},
|
||||
#{originalTransferKey},
|
||||
#{erpBillOfMaterial},
|
||||
#{createdDateTime},
|
||||
#{modifiedDateTime},
|
||||
#{partitionDate},
|
||||
#{model},
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<update id="update">
|
||||
UPDATE BOM <trim prefix="SET" suffixOverrides=",">
|
||||
<if test="et.handle!=null">HANDLE=#{et.handle},</if>
|
||||
<if test="et.changeStamp!=null">CHANGE_STAMP=#{et.changeStamp},</if>
|
||||
<if test="et.site!=null">SITE=#{et.site},</if>
|
||||
<if test="et.bom!=null">BOM=#{et.bom},</if>
|
||||
<if test="et.bomType!=null">BOM_TYPE=#{et.bomType},</if>
|
||||
<if test="et.description!=null">DESCRIPTION=#{et.description},</if>
|
||||
<if test="et.statusBo!=null">STATUS_BO=#{et.statusBo},</if>
|
||||
<if test="et.tmpBom!=null">TMP_BOM=#{et.tmpBom},</if>
|
||||
<if test="et.copiedFromBomBo!=null">COPIED_FROM_BOM_BO=#{et.copiedFromBomBo},</if>
|
||||
<if test="et.revision!=null">REVISION=#{et.revision},</if>
|
||||
<if test="et.currentRevision!=null">CURRENT_REVISION=#{et.currentRevision},</if>
|
||||
<if test="et.bomTemplate!=null">BOM_TEMPLATE=#{et.bomTemplate},</if>
|
||||
<if test="et.hasBeenReleased!=null">HAS_BEEN_RELEASED=#{et.hasBeenReleased},</if>
|
||||
<if test="et.effStartDate!=null">EFF_START_DATE=#{et.effStartDate},</if>
|
||||
<if test="et.effEndDate!=null">EFF_END_DATE=#{et.effEndDate},</if>
|
||||
<if test="et.effectivityControl!=null">EFFECTIVITY_CONTROL=#{et.effectivityControl},</if>
|
||||
<if test="et.prevSite!=null">PREV_SITE=#{et.prevSite},</if>
|
||||
<if test="et.originalTransferKey!=null">ORIGINAL_TRANSFER_KEY=#{et.originalTransferKey},</if>
|
||||
<if test="et.erpBillOfMaterial!=null">ERP_BILL_OF_MATERIAL=#{et.erpBillOfMaterial},</if>
|
||||
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
|
||||
<if test="et.modifiedDateTime!=null">MODIFIED_DATE_TIME=#{et.modifiedDateTime},</if>
|
||||
<if test="et.partitionDate!=null">PARTITION_DATE=#{et.partitionDate},</if>
|
||||
<if test="et.model!=null">MODEL=#{et.model},</if>
|
||||
</trim>
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
<if test="ew.entity.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
|
||||
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||||
<if test="ew.entity.bom!=null"> AND BOM=#{ew.entity.bom}</if>
|
||||
<if test="ew.entity.bomType!=null"> AND BOM_TYPE=#{ew.entity.bomType}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
|
||||
<if test="ew.entity.tmpBom!=null"> AND TMP_BOM=#{ew.entity.tmpBom}</if>
|
||||
<if test="ew.entity.copiedFromBomBo!=null"> AND COPIED_FROM_BOM_BO=#{ew.entity.copiedFromBomBo}</if>
|
||||
<if test="ew.entity.revision!=null"> AND REVISION=#{ew.entity.revision}</if>
|
||||
<if test="ew.entity.currentRevision!=null"> AND CURRENT_REVISION=#{ew.entity.currentRevision}</if>
|
||||
<if test="ew.entity.bomTemplate!=null"> AND BOM_TEMPLATE=#{ew.entity.bomTemplate}</if>
|
||||
<if test="ew.entity.hasBeenReleased!=null"> AND HAS_BEEN_RELEASED=#{ew.entity.hasBeenReleased}</if>
|
||||
<if test="ew.entity.effStartDate!=null"> AND EFF_START_DATE=#{ew.entity.effStartDate}</if>
|
||||
<if test="ew.entity.effEndDate!=null"> AND EFF_END_DATE=#{ew.entity.effEndDate}</if>
|
||||
<if test="ew.entity.effectivityControl!=null"> AND EFFECTIVITY_CONTROL=#{ew.entity.effectivityControl}</if>
|
||||
<if test="ew.entity.prevSite!=null"> AND PREV_SITE=#{ew.entity.prevSite}</if>
|
||||
<if test="ew.entity.originalTransferKey!=null"> AND ORIGINAL_TRANSFER_KEY=#{ew.entity.originalTransferKey}</if>
|
||||
<if test="ew.entity.erpBillOfMaterial!=null"> AND ERP_BILL_OF_MATERIAL=#{ew.entity.erpBillOfMaterial}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
<if test="ew.entity.partitionDate!=null"> AND PARTITION_DATE=#{ew.entity.partitionDate}</if>
|
||||
<if test="ew.entity.model!=null"> AND MODEL=#{ew.entity.model}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</update>
|
||||
|
||||
|
||||
<delete id="deleteByMap">
|
||||
DELETE FROM BOM
|
||||
<if test="cm!=null and !cm.isEmpty">
|
||||
<where>
|
||||
<foreach collection="cm.keys" item="k" separator="AND">
|
||||
<if test="cm[k] != null">
|
||||
${k} = #{cm[${k}]}
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</if>
|
||||
</delete>
|
||||
|
||||
<delete id="delete">
|
||||
DELETE FROM BOM
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
</if>
|
||||
<if test="ew.entity.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
|
||||
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||||
<if test="ew.entity.bom!=null"> AND BOM=#{ew.entity.bom}</if>
|
||||
<if test="ew.entity.bomType!=null"> AND BOM_TYPE=#{ew.entity.bomType}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
|
||||
<if test="ew.entity.tmpBom!=null"> AND TMP_BOM=#{ew.entity.tmpBom}</if>
|
||||
<if test="ew.entity.copiedFromBomBo!=null"> AND COPIED_FROM_BOM_BO=#{ew.entity.copiedFromBomBo}</if>
|
||||
<if test="ew.entity.revision!=null"> AND REVISION=#{ew.entity.revision}</if>
|
||||
<if test="ew.entity.currentRevision!=null"> AND CURRENT_REVISION=#{ew.entity.currentRevision}</if>
|
||||
<if test="ew.entity.bomTemplate!=null"> AND BOM_TEMPLATE=#{ew.entity.bomTemplate}</if>
|
||||
<if test="ew.entity.hasBeenReleased!=null"> AND HAS_BEEN_RELEASED=#{ew.entity.hasBeenReleased}</if>
|
||||
<if test="ew.entity.effStartDate!=null"> AND EFF_START_DATE=#{ew.entity.effStartDate}</if>
|
||||
<if test="ew.entity.effEndDate!=null"> AND EFF_END_DATE=#{ew.entity.effEndDate}</if>
|
||||
<if test="ew.entity.effectivityControl!=null"> AND EFFECTIVITY_CONTROL=#{ew.entity.effectivityControl}</if>
|
||||
<if test="ew.entity.prevSite!=null"> AND PREV_SITE=#{ew.entity.prevSite}</if>
|
||||
<if test="ew.entity.originalTransferKey!=null"> AND ORIGINAL_TRANSFER_KEY=#{ew.entity.originalTransferKey}</if>
|
||||
<if test="ew.entity.erpBillOfMaterial!=null"> AND ERP_BILL_OF_MATERIAL=#{ew.entity.erpBillOfMaterial}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
<if test="ew.entity.partitionDate!=null"> AND PARTITION_DATE=#{ew.entity.partitionDate}</if>
|
||||
<if test="ew.entity.model!=null"> AND MODEL=#{ew.entity.model}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</delete>
|
||||
|
||||
<!-- BaseMapper标准查询/修改/删除 -->
|
||||
<select id="getBomByItem" resultMap="BaseResultMap">
|
||||
SELECT HANDLE FROM BOM
|
||||
WHERE SITE = #{site} AND BOM LIKE '%' || #{item} || '%' AND BOM_TYPE = 'U'
|
||||
AND REVISION LIKE '%-%'
|
||||
ORDER BY MODIFIED_DATE_TIME DESC
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,279 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.foreverwin.mesnac.meapi.mapper.BomOperationMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.foreverwin.mesnac.meapi.model.BomOperation">
|
||||
<result column="HANDLE" property="handle" />
|
||||
<result column="BOM_COMPONENT_BO" property="bomComponentBo" />
|
||||
<result column="OPERATION_BO" property="operationBo" />
|
||||
<result column="QTY" property="qty" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
HANDLE, BOM_COMPONENT_BO, OPERATION_BO, QTY
|
||||
</sql>
|
||||
|
||||
<!-- BaseMapper标准查询/修改/删除 -->
|
||||
<select id="selectById" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"></include> FROM BOM_OPERATION WHERE HANDLE=#{handle}
|
||||
</select>
|
||||
|
||||
<select id="selectByMap" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"></include>
|
||||
FROM BOM_OPERATION
|
||||
<if test="cm!=null and !cm.isEmpty">
|
||||
<where>
|
||||
<foreach collection="cm.keys" item="k" separator="AND">
|
||||
<if test="cm[k] != null">
|
||||
${k} = #{cm[${k}]}
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectOne" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"></include> FROM BOM_OPERATION
|
||||
<where>
|
||||
<if test="ew.handle!=null">
|
||||
HANDLE=#{ew.handle}
|
||||
</if>
|
||||
<if test="ew.bomComponentBo!=null"> AND BOM_COMPONENT_BO=#{ew.bomComponentBo}</if>
|
||||
<if test="ew.operationBo!=null"> AND OPERATION_BO=#{ew.operationBo}</if>
|
||||
<if test="ew.qty!=null"> AND QTY=#{ew.qty}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCount" resultType="Integer">
|
||||
SELECT COUNT(1) FROM BOM_OPERATION
|
||||
<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.bomComponentBo!=null"> AND BOM_COMPONENT_BO=#{ew.entity.bomComponentBo}</if>
|
||||
<if test="ew.entity.operationBo!=null"> AND OPERATION_BO=#{ew.entity.operationBo}</if>
|
||||
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectList" resultMap="BaseResultMap">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM BOM_OPERATION
|
||||
<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.bomComponentBo!=null"> AND BOM_COMPONENT_BO=#{ew.entity.bomComponentBo}</if>
|
||||
<if test="ew.entity.operationBo!=null"> AND OPERATION_BO=#{ew.entity.operationBo}</if>
|
||||
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectMaps" resultType="HashMap">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM BOM_OPERATION
|
||||
<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.bomComponentBo!=null"> AND BOM_COMPONENT_BO=#{ew.entity.bomComponentBo}</if>
|
||||
<if test="ew.entity.operationBo!=null"> AND OPERATION_BO=#{ew.entity.operationBo}</if>
|
||||
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectObjs" resultType="Object">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM BOM_OPERATION
|
||||
<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.bomComponentBo!=null"> AND BOM_COMPONENT_BO=#{ew.entity.bomComponentBo}</if>
|
||||
<if test="ew.entity.operationBo!=null"> AND OPERATION_BO=#{ew.entity.operationBo}</if>
|
||||
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectPage" resultMap="BaseResultMap">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM BOM_OPERATION
|
||||
<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.bomComponentBo!=null"> AND BOM_COMPONENT_BO=#{ew.entity.bomComponentBo}</if>
|
||||
<if test="ew.entity.operationBo!=null"> AND OPERATION_BO=#{ew.entity.operationBo}</if>
|
||||
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectMapsPage" resultType="HashMap">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM BOM_OPERATION
|
||||
<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.bomComponentBo!=null"> AND BOM_COMPONENT_BO=#{ew.entity.bomComponentBo}</if>
|
||||
<if test="ew.entity.operationBo!=null"> AND OPERATION_BO=#{ew.entity.operationBo}</if>
|
||||
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="com.foreverwin.mesnac.meapi.model.BomOperation">
|
||||
INSERT INTO BOM_OPERATION
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
HANDLE,
|
||||
<if test="bomComponentBo!=null">BOM_COMPONENT_BO,</if>
|
||||
<if test="operationBo!=null">OPERATION_BO,</if>
|
||||
<if test="qty!=null">QTY,</if>
|
||||
</trim> VALUES
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
#{handle},
|
||||
<if test="bomComponentBo!=null">#{bomComponentBo},</if>
|
||||
<if test="operationBo!=null">#{operationBo},</if>
|
||||
<if test="qty!=null">#{qty},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<insert id="insertAllColumn" parameterType="com.foreverwin.mesnac.meapi.model.BomOperation">
|
||||
INSERT INTO BOM_OPERATION
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<include refid="Base_Column_List"></include>
|
||||
</trim> VALUES
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
#{handle},
|
||||
#{bomComponentBo},
|
||||
#{operationBo},
|
||||
#{qty},
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<update id="update">
|
||||
UPDATE BOM_OPERATION <trim prefix="SET" suffixOverrides=",">
|
||||
<if test="et.handle!=null">HANDLE=#{et.handle},</if>
|
||||
<if test="et.bomComponentBo!=null">BOM_COMPONENT_BO=#{et.bomComponentBo},</if>
|
||||
<if test="et.operationBo!=null">OPERATION_BO=#{et.operationBo},</if>
|
||||
<if test="et.qty!=null">QTY=#{et.qty},</if>
|
||||
</trim>
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
<if test="ew.entity.bomComponentBo!=null"> AND BOM_COMPONENT_BO=#{ew.entity.bomComponentBo}</if>
|
||||
<if test="ew.entity.operationBo!=null"> AND OPERATION_BO=#{ew.entity.operationBo}</if>
|
||||
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</update>
|
||||
|
||||
|
||||
<delete id="deleteByMap">
|
||||
DELETE FROM BOM_OPERATION
|
||||
<if test="cm!=null and !cm.isEmpty">
|
||||
<where>
|
||||
<foreach collection="cm.keys" item="k" separator="AND">
|
||||
<if test="cm[k] != null">
|
||||
${k} = #{cm[${k}]}
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</if>
|
||||
</delete>
|
||||
|
||||
<delete id="delete">
|
||||
DELETE FROM BOM_OPERATION
|
||||
<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.bomComponentBo!=null"> AND BOM_COMPONENT_BO=#{ew.entity.bomComponentBo}</if>
|
||||
<if test="ew.entity.operationBo!=null"> AND OPERATION_BO=#{ew.entity.operationBo}</if>
|
||||
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</delete>
|
||||
|
||||
<!-- BaseMapper标准查询/修改/删除 -->
|
||||
|
||||
</mapper>
|
@ -0,0 +1,346 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.foreverwin.mesnac.common.mapper.SfcBomMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.foreverwin.mesnac.meapi.model.SfcBom">
|
||||
<result column="HANDLE" property="handle" />
|
||||
<result column="CHANGE_STAMP" property="changeStamp" />
|
||||
<result column="SFC_BO" property="sfcBo" />
|
||||
<result column="BOM_BO" property="bomBo" />
|
||||
<result column="PREV_SITE" property="prevSite" />
|
||||
<result column="ORIGINAL_TRANSFER_KEY" property="originalTransferKey" />
|
||||
<result column="MODIFIED_DATE_TIME" property="modifiedDateTime" />
|
||||
<result column="CREATED_DATE_TIME" property="createdDateTime" />
|
||||
<result column="PARTITION_DATE" property="partitionDate" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
HANDLE, CHANGE_STAMP, SFC_BO, BOM_BO, PREV_SITE, ORIGINAL_TRANSFER_KEY, MODIFIED_DATE_TIME, CREATED_DATE_TIME, PARTITION_DATE
|
||||
</sql>
|
||||
|
||||
<!-- BaseMapper标准查询/修改/删除 -->
|
||||
|
||||
<select id="selectByMap" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"></include>
|
||||
FROM SFC_BOM
|
||||
<if test="cm!=null and !cm.isEmpty">
|
||||
<where>
|
||||
<foreach collection="cm.keys" item="k" separator="AND">
|
||||
<if test="cm[k] != null">
|
||||
${k} = #{cm[${k}]}
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectOne" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"></include> FROM SFC_BOM
|
||||
<where>
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.handle}
|
||||
</if>
|
||||
<if test="ew.entity.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
|
||||
<if test="ew.entity.sfcBo!=null"> AND SFC_BO=#{ew.entity.sfcBo}</if>
|
||||
<if test="ew.entity.bomBo!=null"> AND BOM_BO=#{ew.entity.bomBo}</if>
|
||||
<if test="ew.entity.prevSite!=null"> AND PREV_SITE=#{ew.entity.prevSite}</if>
|
||||
<if test="ew.entity.originalTransferKey!=null"> AND ORIGINAL_TRANSFER_KEY=#{ew.entity.originalTransferKey}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.partitionDate!=null"> AND PARTITION_DATE=#{ew.entity.partitionDate}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCount" resultType="Integer">
|
||||
SELECT COUNT(1) FROM SFC_BOM
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
</if>
|
||||
<if test="ew.entity.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
|
||||
<if test="ew.entity.sfcBo!=null"> AND SFC_BO=#{ew.entity.sfcBo}</if>
|
||||
<if test="ew.entity.bomBo!=null"> AND BOM_BO=#{ew.entity.bomBo}</if>
|
||||
<if test="ew.entity.prevSite!=null"> AND PREV_SITE=#{ew.entity.prevSite}</if>
|
||||
<if test="ew.entity.originalTransferKey!=null"> AND ORIGINAL_TRANSFER_KEY=#{ew.entity.originalTransferKey}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.partitionDate!=null"> AND PARTITION_DATE=#{ew.entity.partitionDate}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectList" resultMap="BaseResultMap">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM SFC_BOM
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
</if>
|
||||
<if test="ew.entity.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
|
||||
<if test="ew.entity.sfcBo!=null"> AND SFC_BO=#{ew.entity.sfcBo}</if>
|
||||
<if test="ew.entity.bomBo!=null"> AND BOM_BO=#{ew.entity.bomBo}</if>
|
||||
<if test="ew.entity.prevSite!=null"> AND PREV_SITE=#{ew.entity.prevSite}</if>
|
||||
<if test="ew.entity.originalTransferKey!=null"> AND ORIGINAL_TRANSFER_KEY=#{ew.entity.originalTransferKey}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.partitionDate!=null"> AND PARTITION_DATE=#{ew.entity.partitionDate}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectMaps" resultType="HashMap">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM SFC_BOM
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
</if>
|
||||
<if test="ew.entity.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
|
||||
<if test="ew.entity.sfcBo!=null"> AND SFC_BO=#{ew.entity.sfcBo}</if>
|
||||
<if test="ew.entity.bomBo!=null"> AND BOM_BO=#{ew.entity.bomBo}</if>
|
||||
<if test="ew.entity.prevSite!=null"> AND PREV_SITE=#{ew.entity.prevSite}</if>
|
||||
<if test="ew.entity.originalTransferKey!=null"> AND ORIGINAL_TRANSFER_KEY=#{ew.entity.originalTransferKey}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.partitionDate!=null"> AND PARTITION_DATE=#{ew.entity.partitionDate}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectObjs" resultType="Object">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM SFC_BOM
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
</if>
|
||||
<if test="ew.entity.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
|
||||
<if test="ew.entity.sfcBo!=null"> AND SFC_BO=#{ew.entity.sfcBo}</if>
|
||||
<if test="ew.entity.bomBo!=null"> AND BOM_BO=#{ew.entity.bomBo}</if>
|
||||
<if test="ew.entity.prevSite!=null"> AND PREV_SITE=#{ew.entity.prevSite}</if>
|
||||
<if test="ew.entity.originalTransferKey!=null"> AND ORIGINAL_TRANSFER_KEY=#{ew.entity.originalTransferKey}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.partitionDate!=null"> AND PARTITION_DATE=#{ew.entity.partitionDate}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectPage" resultMap="BaseResultMap">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM SFC_BOM
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
</if>
|
||||
<if test="ew.entity.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
|
||||
<if test="ew.entity.sfcBo!=null"> AND SFC_BO=#{ew.entity.sfcBo}</if>
|
||||
<if test="ew.entity.bomBo!=null"> AND BOM_BO=#{ew.entity.bomBo}</if>
|
||||
<if test="ew.entity.prevSite!=null"> AND PREV_SITE=#{ew.entity.prevSite}</if>
|
||||
<if test="ew.entity.originalTransferKey!=null"> AND ORIGINAL_TRANSFER_KEY=#{ew.entity.originalTransferKey}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.partitionDate!=null"> AND PARTITION_DATE=#{ew.entity.partitionDate}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectMapsPage" resultType="HashMap">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM SFC_BOM
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
</if>
|
||||
<if test="ew.entity.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
|
||||
<if test="ew.entity.sfcBo!=null"> AND SFC_BO=#{ew.entity.sfcBo}</if>
|
||||
<if test="ew.entity.bomBo!=null"> AND BOM_BO=#{ew.entity.bomBo}</if>
|
||||
<if test="ew.entity.prevSite!=null"> AND PREV_SITE=#{ew.entity.prevSite}</if>
|
||||
<if test="ew.entity.originalTransferKey!=null"> AND ORIGINAL_TRANSFER_KEY=#{ew.entity.originalTransferKey}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.partitionDate!=null"> AND PARTITION_DATE=#{ew.entity.partitionDate}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="com.foreverwin.mesnac.meapi.model.SfcBom">
|
||||
INSERT INTO SFC_BOM
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
HANDLE,
|
||||
<if test="changeStamp!=null">CHANGE_STAMP,</if>
|
||||
<if test="sfcBo!=null">SFC_BO,</if>
|
||||
<if test="bomBo!=null">BOM_BO,</if>
|
||||
<if test="prevSite!=null">PREV_SITE,</if>
|
||||
<if test="originalTransferKey!=null">ORIGINAL_TRANSFER_KEY,</if>
|
||||
<if test="modifiedDateTime!=null">MODIFIED_DATE_TIME,</if>
|
||||
<if test="createdDateTime!=null">CREATED_DATE_TIME,</if>
|
||||
<if test="partitionDate!=null">PARTITION_DATE,</if>
|
||||
</trim> VALUES
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
#{handle},
|
||||
<if test="changeStamp!=null">#{changeStamp},</if>
|
||||
<if test="sfcBo!=null">#{sfcBo},</if>
|
||||
<if test="bomBo!=null">#{bomBo},</if>
|
||||
<if test="prevSite!=null">#{prevSite},</if>
|
||||
<if test="originalTransferKey!=null">#{originalTransferKey},</if>
|
||||
<if test="modifiedDateTime!=null">#{modifiedDateTime},</if>
|
||||
<if test="createdDateTime!=null">#{createdDateTime},</if>
|
||||
<if test="partitionDate!=null">#{partitionDate},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<insert id="insertAllColumn" parameterType="com.foreverwin.mesnac.meapi.model.SfcBom">
|
||||
INSERT INTO SFC_BOM
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<include refid="Base_Column_List"></include>
|
||||
</trim> VALUES
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
#{handle},
|
||||
#{changeStamp},
|
||||
#{sfcBo},
|
||||
#{bomBo},
|
||||
#{prevSite},
|
||||
#{originalTransferKey},
|
||||
#{modifiedDateTime},
|
||||
#{createdDateTime},
|
||||
#{partitionDate},
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<update id="update">
|
||||
UPDATE SFC_BOM <trim prefix="SET" suffixOverrides=",">
|
||||
<if test="et.handle!=null">HANDLE=#{et.handle},</if>
|
||||
<if test="et.changeStamp!=null">CHANGE_STAMP=#{et.changeStamp},</if>
|
||||
<if test="et.sfcBo!=null">SFC_BO=#{et.sfcBo},</if>
|
||||
<if test="et.bomBo!=null">BOM_BO=#{et.bomBo},</if>
|
||||
<if test="et.prevSite!=null">PREV_SITE=#{et.prevSite},</if>
|
||||
<if test="et.originalTransferKey!=null">ORIGINAL_TRANSFER_KEY=#{et.originalTransferKey},</if>
|
||||
<if test="et.modifiedDateTime!=null">MODIFIED_DATE_TIME=#{et.modifiedDateTime},</if>
|
||||
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
|
||||
<if test="et.partitionDate!=null">PARTITION_DATE=#{et.partitionDate},</if>
|
||||
</trim>
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
<if test="ew.entity.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
|
||||
<if test="ew.entity.sfcBo!=null"> AND SFC_BO=#{ew.entity.sfcBo}</if>
|
||||
<if test="ew.entity.bomBo!=null"> AND BOM_BO=#{ew.entity.bomBo}</if>
|
||||
<if test="ew.entity.prevSite!=null"> AND PREV_SITE=#{ew.entity.prevSite}</if>
|
||||
<if test="ew.entity.originalTransferKey!=null"> AND ORIGINAL_TRANSFER_KEY=#{ew.entity.originalTransferKey}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.partitionDate!=null"> AND PARTITION_DATE=#{ew.entity.partitionDate}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</update>
|
||||
|
||||
|
||||
<delete id="deleteByMap">
|
||||
DELETE FROM SFC_BOM
|
||||
<if test="cm!=null and !cm.isEmpty">
|
||||
<where>
|
||||
<foreach collection="cm.keys" item="k" separator="AND">
|
||||
<if test="cm[k] != null">
|
||||
${k} = #{cm[${k}]}
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</if>
|
||||
</delete>
|
||||
|
||||
<delete id="delete">
|
||||
DELETE FROM SFC_BOM
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
</if>
|
||||
<if test="ew.entity.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
|
||||
<if test="ew.entity.sfcBo!=null"> AND SFC_BO=#{ew.entity.sfcBo}</if>
|
||||
<if test="ew.entity.bomBo!=null"> AND BOM_BO=#{ew.entity.bomBo}</if>
|
||||
<if test="ew.entity.prevSite!=null"> AND PREV_SITE=#{ew.entity.prevSite}</if>
|
||||
<if test="ew.entity.originalTransferKey!=null"> AND ORIGINAL_TRANSFER_KEY=#{ew.entity.originalTransferKey}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.partitionDate!=null"> AND PARTITION_DATE=#{ew.entity.partitionDate}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</delete>
|
||||
|
||||
<!-- BaseMapper标准查询/修改/删除 -->
|
||||
|
||||
</mapper>
|
Loading…
Reference in New Issue