工单整理刷新派工单功能
parent
11d0634a97
commit
582e283785
@ -0,0 +1,152 @@
|
||||
package com.foreverwin.mesnac.dispatch.controller;
|
||||
|
||||
import com.foreverwin.modular.core.util.R;
|
||||
import com.foreverwin.modular.core.util.FrontPage;
|
||||
import com.foreverwin.modular.core.util.CommonMethods;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.foreverwin.mesnac.dispatch.service.SfcDispatchService;
|
||||
import com.foreverwin.mesnac.dispatch.model.SfcDispatch;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Leon.L
|
||||
* @since 2021-06-02
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/Z-SFC-DISPATCH")
|
||||
public class SfcDispatchController {
|
||||
|
||||
@Autowired
|
||||
public SfcDispatchService sfcDispatchService;
|
||||
|
||||
|
||||
@ResponseBody
|
||||
@PostMapping("querySfcDispatch")
|
||||
public R querySfcDispatch(@RequestBody SfcDispatch sfcDispatch) {
|
||||
List<SfcDispatch> list = null;
|
||||
try {
|
||||
|
||||
sfcDispatch.setSite(CommonMethods.getSite());
|
||||
|
||||
list = sfcDispatchService.selectList(sfcDispatch);
|
||||
} catch (Exception e) {
|
||||
return R.failed(e.getMessage());
|
||||
}
|
||||
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询所有数据
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@GetMapping("")
|
||||
public R getSfcDispatchList(SfcDispatch sfcDispatch){
|
||||
List<SfcDispatch> result;
|
||||
QueryWrapper<SfcDispatch> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(sfcDispatch);
|
||||
result = sfcDispatchService.list(queryWrapper);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询数据
|
||||
*
|
||||
* @param frontPage 分页信息
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@GetMapping("/page")
|
||||
public R page(FrontPage<SfcDispatch> frontPage, SfcDispatch sfcDispatch){
|
||||
IPage result;
|
||||
QueryWrapper<SfcDispatch> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(sfcDispatch);
|
||||
if (frontPage.getGlobalQuery() != null && !"".equals(frontPage.getGlobalQuery().trim())) {
|
||||
//TODO modify global query
|
||||
queryWrapper.lambda().and(wrapper -> wrapper
|
||||
.like(SfcDispatch::getHandle, frontPage.getGlobalQuery())
|
||||
.or().like(SfcDispatch::getSite, frontPage.getGlobalQuery())
|
||||
.or().like(SfcDispatch::getShopOrder, frontPage.getGlobalQuery())
|
||||
.or().like(SfcDispatch::getWorkOrder, frontPage.getGlobalQuery())
|
||||
.or().like(SfcDispatch::getSfc, frontPage.getGlobalQuery())
|
||||
.or().like(SfcDispatch::getIsMajor, frontPage.getGlobalQuery())
|
||||
.or().like(SfcDispatch::getDispatchSeq, frontPage.getGlobalQuery())
|
||||
.or().like(SfcDispatch::getDispatchNo, frontPage.getGlobalQuery())
|
||||
.or().like(SfcDispatch::getDispatchStatus, frontPage.getGlobalQuery())
|
||||
.or().like(SfcDispatch::getDrawingsNo, frontPage.getGlobalQuery())
|
||||
.or().like(SfcDispatch::getDrawingsRevision, frontPage.getGlobalQuery())
|
||||
.or().like(SfcDispatch::getIsLock, frontPage.getGlobalQuery())
|
||||
.or().like(SfcDispatch::getRouterBo, frontPage.getGlobalQuery())
|
||||
.or().like(SfcDispatch::getStepId, frontPage.getGlobalQuery())
|
||||
.or().like(SfcDispatch::getOperation, frontPage.getGlobalQuery())
|
||||
.or().like(SfcDispatch::getResourceType, frontPage.getGlobalQuery())
|
||||
.or().like(SfcDispatch::getWorkCenter, frontPage.getGlobalQuery())
|
||||
.or().like(SfcDispatch::getResrce, frontPage.getGlobalQuery())
|
||||
.or().like(SfcDispatch::getEmployee, frontPage.getGlobalQuery())
|
||||
.or().like(SfcDispatch::getTurnOrder, frontPage.getGlobalQuery())
|
||||
.or().like(SfcDispatch::getIsAllot, frontPage.getGlobalQuery())
|
||||
.or().like(SfcDispatch::getIsImport, frontPage.getGlobalQuery())
|
||||
.or().like(SfcDispatch::getRemark, frontPage.getGlobalQuery())
|
||||
.or().like(SfcDispatch::getCreateUser, frontPage.getGlobalQuery())
|
||||
.or().like(SfcDispatch::getModifyUser, frontPage.getGlobalQuery())
|
||||
.or().like(SfcDispatch::getOther1, frontPage.getGlobalQuery())
|
||||
.or().like(SfcDispatch::getOther2, frontPage.getGlobalQuery())
|
||||
.or().like(SfcDispatch::getOther3, frontPage.getGlobalQuery())
|
||||
.or().like(SfcDispatch::getOther4, frontPage.getGlobalQuery())
|
||||
.or().like(SfcDispatch::getOther5, frontPage.getGlobalQuery())
|
||||
);
|
||||
}
|
||||
result = sfcDispatchService.page(frontPage.getPagePlus(), queryWrapper);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增
|
||||
* @param sfcDispatch 传递的实体
|
||||
* @return null 失败 实体成功
|
||||
*/
|
||||
@PostMapping
|
||||
public R save(@RequestBody SfcDispatch sfcDispatch) {
|
||||
return R.ok(sfcDispatchService.save(sfcDispatch));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* @param sfcDispatch 传递的实体
|
||||
* @return null 失败 实体成功
|
||||
*/
|
||||
@PutMapping
|
||||
public R updateById(@RequestBody SfcDispatch sfcDispatch) {
|
||||
return R.ok(sfcDispatchService.updateById(sfcDispatch));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id删除对象
|
||||
* @param id 实体ID
|
||||
* @return 0 失败 1 成功
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping(method = RequestMethod.DELETE, value = "/{id:.+}")
|
||||
public R removeById(@PathVariable("id") String id){
|
||||
return R.ok(sfcDispatchService.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(sfcDispatchService.removeByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,94 @@
|
||||
package com.foreverwin.mesnac.dispatch.controller;
|
||||
|
||||
import com.foreverwin.mesnac.dispatch.model.ShopOrderRelease;
|
||||
import com.foreverwin.mesnac.dispatch.service.ShopOrderReleaseService;
|
||||
import com.foreverwin.modular.core.util.CommonMethods;
|
||||
import com.foreverwin.modular.core.util.R;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* ClassName: ShopOrderReleaseController
|
||||
*
|
||||
* @author Leon
|
||||
*
|
||||
* Copyright (C) 2018-2019 上海昊声电子信息技术有限公司.
|
||||
*
|
||||
* All Rights Reserved
|
||||
*
|
||||
* http://www.foreverwin.com.cn
|
||||
*
|
||||
* Create Time: 2021/06/02
|
||||
*/
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/shopOrderRelease")
|
||||
public class ShopOrderReleaseController {
|
||||
|
||||
@Autowired
|
||||
private ShopOrderReleaseService shopOrderReleaseService;
|
||||
|
||||
@ResponseBody
|
||||
@PostMapping("queryShopOrder")
|
||||
public R queryShopOrder(@RequestBody ShopOrderRelease shopOrderRelease) {
|
||||
List<ShopOrderRelease> list = null;
|
||||
try {
|
||||
if (shopOrderRelease == null) {
|
||||
shopOrderRelease = new ShopOrderRelease();
|
||||
}
|
||||
shopOrderRelease.setSite(CommonMethods.getSite());
|
||||
|
||||
list = shopOrderReleaseService.findShopOrderList(shopOrderRelease);
|
||||
} catch (Exception e) {
|
||||
return R.failed(e.getMessage());
|
||||
}
|
||||
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 工单整理- 下达
|
||||
*
|
||||
* @param shopOrderList
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@PostMapping("shopOrderRelease")
|
||||
public R shopOrderRelease(@RequestBody List<ShopOrderRelease> shopOrderList) {
|
||||
|
||||
try {
|
||||
String site = CommonMethods.getSite();
|
||||
String user = CommonMethods.getUser();
|
||||
shopOrderReleaseService.shopOrderRelease(site, user, shopOrderList);
|
||||
} catch (Exception e) {
|
||||
return R.failed(1, e.getMessage());
|
||||
}
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 工单整理- 刷新派工单
|
||||
*
|
||||
* @param shopOrderList
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@PostMapping("dispatchRefresh")
|
||||
public R dispatchRefresh(@RequestBody List<ShopOrderRelease> shopOrderList) {
|
||||
|
||||
try {
|
||||
String site = CommonMethods.getSite();
|
||||
String user = CommonMethods.getUser();
|
||||
shopOrderReleaseService.dispatchRefresh(site, user, shopOrderList);
|
||||
} catch (Exception e) {
|
||||
return R.failed(1, e.getMessage());
|
||||
}
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
}
|
@ -0,0 +1,197 @@
|
||||
package com.foreverwin.mesnac.dispatch.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class RouterDTO implements Serializable {
|
||||
|
||||
/**主键**/
|
||||
private String handle;
|
||||
/**站点**/
|
||||
private String site;
|
||||
/**工艺路线 HANDLE**/
|
||||
private String routerBo;
|
||||
/**工艺路线**/
|
||||
private String router;
|
||||
/**工艺路线版本**/
|
||||
private String revision;
|
||||
/**工艺路线描述**/
|
||||
private String description;
|
||||
/**工艺路线状态**/
|
||||
private String statusBo;
|
||||
/**工艺路线工序步骤**/
|
||||
private String stepId;
|
||||
/**工艺路线工序**/
|
||||
private String operation;
|
||||
/**工艺路线工序**/
|
||||
private String operationBo;
|
||||
/**工艺路线工序描述**/
|
||||
private String operationDescription;
|
||||
/**资源类型**/
|
||||
private String resourceType;
|
||||
/**工艺路线工序步骤自定义字段-派工类型**/
|
||||
private String dispatchType;
|
||||
/**工艺路线工序步骤自定义字段-工序工时**/
|
||||
private String prodHours;
|
||||
/**工艺路线工序步骤自定义字段-标准人数**/
|
||||
private String standardNumber;
|
||||
/**员工类型**/
|
||||
private String employeeType;
|
||||
/**工艺路线工步BO**/
|
||||
private String routerStepBo;
|
||||
/**工艺路线入口工步BO**/
|
||||
private String entryRouterStepBo;
|
||||
/**下一步骤**/
|
||||
private String nextStepBo;
|
||||
|
||||
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 getRouterBo() {
|
||||
return routerBo;
|
||||
}
|
||||
|
||||
public void setRouterBo(String routerBo) {
|
||||
this.routerBo = routerBo;
|
||||
}
|
||||
|
||||
public String getRouter() {
|
||||
return router;
|
||||
}
|
||||
|
||||
public void setRouter(String router) {
|
||||
this.router = router;
|
||||
}
|
||||
|
||||
public String getRevision() {
|
||||
return revision;
|
||||
}
|
||||
|
||||
public void setRevision(String revision) {
|
||||
this.revision = revision;
|
||||
}
|
||||
|
||||
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 getStepId() {
|
||||
return stepId;
|
||||
}
|
||||
|
||||
public void setStepId(String stepId) {
|
||||
this.stepId = stepId;
|
||||
}
|
||||
|
||||
public String getOperation() {
|
||||
return operation;
|
||||
}
|
||||
|
||||
public void setOperation(String operation) {
|
||||
this.operation = operation;
|
||||
}
|
||||
|
||||
public String getOperationBo() {
|
||||
return operationBo;
|
||||
}
|
||||
|
||||
public void setOperationBo(String operationBo) {
|
||||
this.operationBo = operationBo;
|
||||
}
|
||||
|
||||
public String getOperationDescription() {
|
||||
return operationDescription;
|
||||
}
|
||||
|
||||
public void setOperationDescription(String operationDescription) {
|
||||
this.operationDescription = operationDescription;
|
||||
}
|
||||
|
||||
public String getResourceType() {
|
||||
return resourceType;
|
||||
}
|
||||
|
||||
public void setResourceType(String resourceType) {
|
||||
this.resourceType = resourceType;
|
||||
}
|
||||
|
||||
public String getDispatchType() {
|
||||
return dispatchType;
|
||||
}
|
||||
|
||||
public void setDispatchType(String dispatchType) {
|
||||
this.dispatchType = dispatchType;
|
||||
}
|
||||
|
||||
public String getProdHours() {
|
||||
return prodHours;
|
||||
}
|
||||
|
||||
public void setProdHours(String prodHours) {
|
||||
this.prodHours = prodHours;
|
||||
}
|
||||
|
||||
public String getStandardNumber() {
|
||||
return standardNumber;
|
||||
}
|
||||
|
||||
public void setStandardNumber(String standardNumber) {
|
||||
this.standardNumber = standardNumber;
|
||||
}
|
||||
|
||||
public String getEmployeeType() {
|
||||
return employeeType;
|
||||
}
|
||||
|
||||
public void setEmployeeType(String employeeType) {
|
||||
this.employeeType = employeeType;
|
||||
}
|
||||
|
||||
public String getRouterStepBo() {
|
||||
return routerStepBo;
|
||||
}
|
||||
|
||||
public void setRouterStepBo(String routerStepBo) {
|
||||
this.routerStepBo = routerStepBo;
|
||||
}
|
||||
|
||||
public String getEntryRouterStepBo() {
|
||||
return entryRouterStepBo;
|
||||
}
|
||||
|
||||
public void setEntryRouterStepBo(String entryRouterStepBo) {
|
||||
this.entryRouterStepBo = entryRouterStepBo;
|
||||
}
|
||||
|
||||
public String getNextStepBo() {
|
||||
return nextStepBo;
|
||||
}
|
||||
|
||||
public void setNextStepBo(String nextStepBo) {
|
||||
this.nextStepBo = nextStepBo;
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.foreverwin.mesnac.dispatch.mapper;
|
||||
|
||||
import com.foreverwin.mesnac.dispatch.model.SfcDispatch;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author Leon.L
|
||||
* @since 2021-06-02
|
||||
*/
|
||||
@Repository
|
||||
public interface SfcDispatchMapper extends BaseMapper<SfcDispatch> {
|
||||
|
||||
List<SfcDispatch> findSfcDispatch(@Param("site") String site, @Param("sfc") String sfc, @Param("operation") String operation, @Param("stepId") String stepId);
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
package com.foreverwin.mesnac.dispatch.mapper;
|
||||
|
||||
import com.foreverwin.mesnac.dispatch.dto.RouterDTO;
|
||||
import com.foreverwin.mesnac.dispatch.model.ShopOrderRelease;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Repository
|
||||
public interface ShopOrderReleaseMapper {
|
||||
|
||||
/**
|
||||
* 查询可下达的工单
|
||||
*
|
||||
* @param shopOrderRelease
|
||||
* @return
|
||||
*/
|
||||
List<ShopOrderRelease> findShopOrderList(ShopOrderRelease shopOrderRelease);
|
||||
|
||||
/**
|
||||
* 查询工单的工艺路线详细步骤
|
||||
*
|
||||
* @param routerBo
|
||||
* @return
|
||||
*/
|
||||
List<RouterDTO> selectShopOrderRouter(@Param("routerBo") String routerBo);
|
||||
|
||||
/**
|
||||
* 查看同时发生组下步骤标识
|
||||
*
|
||||
* @param routerStepBo
|
||||
* @return
|
||||
*/
|
||||
List<RouterDTO> selectRouterStepGroup(@Param("routerStepBo") String routerStepBo);
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,39 @@
|
||||
package com.foreverwin.mesnac.dispatch.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.foreverwin.mesnac.dispatch.model.SfcDispatch;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.foreverwin.modular.core.util.FrontPage;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author Leon.L
|
||||
* @since 2021-06-02
|
||||
*/
|
||||
public interface SfcDispatchService extends IService<SfcDispatch> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param frontPage
|
||||
* @return
|
||||
*/
|
||||
IPage<SfcDispatch> selectPage(FrontPage<SfcDispatch> frontPage, SfcDispatch sfcDispatch);
|
||||
|
||||
List<SfcDispatch> selectList(SfcDispatch sfcDispatch);
|
||||
|
||||
/**
|
||||
* 查询派工数据
|
||||
*
|
||||
* @param site
|
||||
* @param sfc
|
||||
* @param operation 非必须
|
||||
* @param stepId 非必须
|
||||
* @return
|
||||
*/
|
||||
List<SfcDispatch> findSfcDispatch(String site, String sfc, String operation, String stepId);
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
package com.foreverwin.mesnac.dispatch.service;
|
||||
|
||||
import com.foreverwin.mesnac.dispatch.model.ShopOrderRelease;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* ClassName: ShopOrderReleaseService
|
||||
*
|
||||
* @author Leon
|
||||
*
|
||||
* Copyright (C) 2018-2019 上海昊声电子信息技术有限公司.
|
||||
*
|
||||
* All Rights Reserved
|
||||
*
|
||||
* http://www.foreverwin.com.cn
|
||||
*
|
||||
* Create Time: 2021/06/02
|
||||
*/
|
||||
|
||||
public interface ShopOrderReleaseService {
|
||||
|
||||
List<ShopOrderRelease> findShopOrderList(ShopOrderRelease shopOrderRelease);
|
||||
|
||||
/**
|
||||
* 工单整理- 下达
|
||||
*
|
||||
* 1.工单下达
|
||||
* 2.写入派工表数据
|
||||
*
|
||||
* @param site
|
||||
* @param user
|
||||
* @param shopOrderList
|
||||
*/
|
||||
void shopOrderRelease(String site, String user, List<ShopOrderRelease> shopOrderList);
|
||||
|
||||
/**
|
||||
* 工单整理- 刷新派工单
|
||||
*
|
||||
* 1.只允许操作已下达的工单
|
||||
* 2.新建状态的派工单重新计算
|
||||
* 3.其他状态的派工数据做更新
|
||||
*
|
||||
* @param site
|
||||
* @param user
|
||||
* @param shopOrderList
|
||||
*/
|
||||
void dispatchRefresh(String site, String user, List<ShopOrderRelease> shopOrderList);
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
package com.foreverwin.mesnac.dispatch.service.impl;
|
||||
|
||||
import com.foreverwin.modular.core.util.FrontPage;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.foreverwin.mesnac.dispatch.model.SfcDispatch;
|
||||
import com.foreverwin.mesnac.dispatch.mapper.SfcDispatchMapper;
|
||||
import com.foreverwin.mesnac.dispatch.service.SfcDispatchService;
|
||||
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 Leon.L
|
||||
* @since 2021-06-02
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class SfcDispatchServiceImpl extends ServiceImpl<SfcDispatchMapper, SfcDispatch> implements SfcDispatchService {
|
||||
|
||||
|
||||
@Autowired
|
||||
private SfcDispatchMapper sfcDispatchMapper;
|
||||
|
||||
@Override
|
||||
public IPage<SfcDispatch> selectPage(FrontPage<SfcDispatch> frontPage, SfcDispatch sfcDispatch) {
|
||||
QueryWrapper<SfcDispatch> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(sfcDispatch);
|
||||
return super.page(frontPage.getPagePlus(), queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SfcDispatch> selectList(SfcDispatch sfcDispatch) {
|
||||
QueryWrapper<SfcDispatch> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(sfcDispatch);
|
||||
return super.list(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SfcDispatch> findSfcDispatch(String site, String sfc, String operation, String stepId) {
|
||||
return sfcDispatchMapper.findSfcDispatch(site, sfc, operation, stepId);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,941 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.foreverwin.mesnac.dispatch.mapper.SfcDispatchMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.foreverwin.mesnac.dispatch.model.SfcDispatch">
|
||||
<id column="HANDLE" property="handle" />
|
||||
<result column="SITE" property="site" />
|
||||
<result column="SHOP_ORDER" property="shopOrder" />
|
||||
<result column="WORK_ORDER" property="workOrder" />
|
||||
<result column="SFC" property="sfc" />
|
||||
<result column="IS_MAJOR" property="isMajor" />
|
||||
<result column="DISPATCH_SEQ" property="dispatchSeq" />
|
||||
<result column="DISPATCH_NO" property="dispatchNo" />
|
||||
<result column="DISPATCH_STATUS" property="dispatchStatus" />
|
||||
<result column="DRAWINGS_NO" property="drawingsNo" />
|
||||
<result column="DRAWINGS_REVISION" property="drawingsRevision" />
|
||||
<result column="IS_LOCK" property="isLock" />
|
||||
<result column="ROUTER_BO" property="routerBo" />
|
||||
<result column="STEP_ID" property="stepId" />
|
||||
<result column="OPERATION" property="operation" />
|
||||
<result column="RESOURCE_TYPE" property="resourceType" />
|
||||
<result column="WORK_CENTER" property="workCenter" />
|
||||
<result column="RESRCE" property="resrce" />
|
||||
<result column="EMPLOYEE" property="employee" />
|
||||
<result column="TURN_ORDER" property="turnOrder" />
|
||||
<result column="DISPATCH_QTY" property="dispatchQty" />
|
||||
<result column="PROD_HOURS" property="prodHours" />
|
||||
<result column="PLANNED_START_DATE" property="plannedStartDate" />
|
||||
<result column="PLANNED_COMPLETE_DATE" property="plannedCompleteDate" />
|
||||
<result column="EARLIEST_START_DATE" property="earliestStartDate" />
|
||||
<result column="LATEST_END_DATE" property="latestEndDate" />
|
||||
<result column="SO_RELEASED_DATE" property="soReleasedDate" />
|
||||
<result column="SFC_RELEASED_DATE" property="sfcReleasedDate" />
|
||||
<result column="RELEASED_COMPLETE_DATE" property="releasedCompleteDate" />
|
||||
<result column="ACTUAL_COMPLETE_DATE" property="actualCompleteDate" />
|
||||
<result column="IS_ALLOT" property="isAllot" />
|
||||
<result column="IS_IMPORT" property="isImport" />
|
||||
<result column="REMARK" property="remark" />
|
||||
<result column="IS_FIRST_OPERATION" property="isFirstOperation" />
|
||||
<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="OTHER_1" property="other1" />
|
||||
<result column="OTHER_2" property="other2" />
|
||||
<result column="OTHER_3" property="other3" />
|
||||
<result column="OTHER_4" property="other4" />
|
||||
<result column="OTHER_5" property="other5" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
HANDLE, SITE, SHOP_ORDER, WORK_ORDER, SFC, IS_MAJOR, DISPATCH_SEQ, DISPATCH_NO, DISPATCH_STATUS, DRAWINGS_NO, DRAWINGS_REVISION, IS_LOCK, ROUTER_BO, STEP_ID, OPERATION, RESOURCE_TYPE, WORK_CENTER, RESRCE, EMPLOYEE, TURN_ORDER, DISPATCH_QTY, PROD_HOURS, PLANNED_START_DATE, PLANNED_COMPLETE_DATE, EARLIEST_START_DATE, LATEST_END_DATE, SO_RELEASED_DATE, SFC_RELEASED_DATE, RELEASED_COMPLETE_DATE, ACTUAL_COMPLETE_DATE, IS_ALLOT, IS_IMPORT, REMARK, IS_FIRST_OPERATION, CREATE_USER, CREATED_DATE_TIME, MODIFY_USER, MODIFIED_DATE_TIME, OTHER_1, OTHER_2, OTHER_3, OTHER_4, OTHER_5
|
||||
</sql>
|
||||
|
||||
<!-- BaseMapper标准查询/修改/删除 -->
|
||||
<select id="selectById" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"></include> FROM Z_SFC_DISPATCH WHERE HANDLE=#{handle}
|
||||
</select>
|
||||
|
||||
<select id="selectByMap" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"></include>
|
||||
FROM Z_SFC_DISPATCH
|
||||
<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_SFC_DISPATCH 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_SFC_DISPATCH
|
||||
<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.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
|
||||
<if test="ew.entity.workOrder!=null"> AND WORK_ORDER=#{ew.entity.workOrder}</if>
|
||||
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||
<if test="ew.entity.isMajor!=null"> AND IS_MAJOR=#{ew.entity.isMajor}</if>
|
||||
<if test="ew.entity.dispatchSeq!=null"> AND DISPATCH_SEQ=#{ew.entity.dispatchSeq}</if>
|
||||
<if test="ew.entity.dispatchNo!=null"> AND DISPATCH_NO=#{ew.entity.dispatchNo}</if>
|
||||
<if test="ew.entity.dispatchStatus!=null"> AND DISPATCH_STATUS=#{ew.entity.dispatchStatus}</if>
|
||||
<if test="ew.entity.drawingsNo!=null"> AND DRAWINGS_NO=#{ew.entity.drawingsNo}</if>
|
||||
<if test="ew.entity.drawingsRevision!=null"> AND DRAWINGS_REVISION=#{ew.entity.drawingsRevision}</if>
|
||||
<if test="ew.entity.isLock!=null"> AND IS_LOCK=#{ew.entity.isLock}</if>
|
||||
<if test="ew.entity.routerBo!=null"> AND ROUTER_BO=#{ew.entity.routerBo}</if>
|
||||
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
|
||||
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
|
||||
<if test="ew.entity.resourceType!=null"> AND RESOURCE_TYPE=#{ew.entity.resourceType}</if>
|
||||
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
|
||||
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
|
||||
<if test="ew.entity.employee!=null"> AND EMPLOYEE=#{ew.entity.employee}</if>
|
||||
<if test="ew.entity.turnOrder!=null"> AND TURN_ORDER=#{ew.entity.turnOrder}</if>
|
||||
<if test="ew.entity.dispatchQty!=null"> AND DISPATCH_QTY=#{ew.entity.dispatchQty}</if>
|
||||
<if test="ew.entity.prodHours!=null"> AND PROD_HOURS=#{ew.entity.prodHours}</if>
|
||||
<if test="ew.entity.plannedStartDate!=null"> AND PLANNED_START_DATE=#{ew.entity.plannedStartDate}</if>
|
||||
<if test="ew.entity.plannedCompleteDate!=null"> AND PLANNED_COMPLETE_DATE=#{ew.entity.plannedCompleteDate}</if>
|
||||
<if test="ew.entity.earliestStartDate!=null"> AND EARLIEST_START_DATE=#{ew.entity.earliestStartDate}</if>
|
||||
<if test="ew.entity.latestEndDate!=null"> AND LATEST_END_DATE=#{ew.entity.latestEndDate}</if>
|
||||
<if test="ew.entity.soReleasedDate!=null"> AND SO_RELEASED_DATE=#{ew.entity.soReleasedDate}</if>
|
||||
<if test="ew.entity.sfcReleasedDate!=null"> AND SFC_RELEASED_DATE=#{ew.entity.sfcReleasedDate}</if>
|
||||
<if test="ew.entity.releasedCompleteDate!=null"> AND RELEASED_COMPLETE_DATE=#{ew.entity.releasedCompleteDate}</if>
|
||||
<if test="ew.entity.actualCompleteDate!=null"> AND ACTUAL_COMPLETE_DATE=#{ew.entity.actualCompleteDate}</if>
|
||||
<if test="ew.entity.isAllot!=null"> AND IS_ALLOT=#{ew.entity.isAllot}</if>
|
||||
<if test="ew.entity.isImport!=null"> AND IS_IMPORT=#{ew.entity.isImport}</if>
|
||||
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
|
||||
<if test="ew.entity.isFirstOperation!=null"> AND IS_FIRST_OPERATION=#{ew.entity.isFirstOperation}</if>
|
||||
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<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.other1!=null"> AND OTHER_1=#{ew.entity.other1}</if>
|
||||
<if test="ew.entity.other2!=null"> AND OTHER_2=#{ew.entity.other2}</if>
|
||||
<if test="ew.entity.other3!=null"> AND OTHER_3=#{ew.entity.other3}</if>
|
||||
<if test="ew.entity.other4!=null"> AND OTHER_4=#{ew.entity.other4}</if>
|
||||
<if test="ew.entity.other5!=null"> AND OTHER_5=#{ew.entity.other5}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCount" resultType="Integer">
|
||||
SELECT COUNT(1) FROM Z_SFC_DISPATCH
|
||||
<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.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
|
||||
<if test="ew.entity.workOrder!=null"> AND WORK_ORDER=#{ew.entity.workOrder}</if>
|
||||
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||
<if test="ew.entity.isMajor!=null"> AND IS_MAJOR=#{ew.entity.isMajor}</if>
|
||||
<if test="ew.entity.dispatchSeq!=null"> AND DISPATCH_SEQ=#{ew.entity.dispatchSeq}</if>
|
||||
<if test="ew.entity.dispatchNo!=null"> AND DISPATCH_NO=#{ew.entity.dispatchNo}</if>
|
||||
<if test="ew.entity.dispatchStatus!=null"> AND DISPATCH_STATUS=#{ew.entity.dispatchStatus}</if>
|
||||
<if test="ew.entity.drawingsNo!=null"> AND DRAWINGS_NO=#{ew.entity.drawingsNo}</if>
|
||||
<if test="ew.entity.drawingsRevision!=null"> AND DRAWINGS_REVISION=#{ew.entity.drawingsRevision}</if>
|
||||
<if test="ew.entity.isLock!=null"> AND IS_LOCK=#{ew.entity.isLock}</if>
|
||||
<if test="ew.entity.routerBo!=null"> AND ROUTER_BO=#{ew.entity.routerBo}</if>
|
||||
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
|
||||
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
|
||||
<if test="ew.entity.resourceType!=null"> AND RESOURCE_TYPE=#{ew.entity.resourceType}</if>
|
||||
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
|
||||
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
|
||||
<if test="ew.entity.employee!=null"> AND EMPLOYEE=#{ew.entity.employee}</if>
|
||||
<if test="ew.entity.turnOrder!=null"> AND TURN_ORDER=#{ew.entity.turnOrder}</if>
|
||||
<if test="ew.entity.dispatchQty!=null"> AND DISPATCH_QTY=#{ew.entity.dispatchQty}</if>
|
||||
<if test="ew.entity.prodHours!=null"> AND PROD_HOURS=#{ew.entity.prodHours}</if>
|
||||
<if test="ew.entity.plannedStartDate!=null"> AND PLANNED_START_DATE=#{ew.entity.plannedStartDate}</if>
|
||||
<if test="ew.entity.plannedCompleteDate!=null"> AND PLANNED_COMPLETE_DATE=#{ew.entity.plannedCompleteDate}</if>
|
||||
<if test="ew.entity.earliestStartDate!=null"> AND EARLIEST_START_DATE=#{ew.entity.earliestStartDate}</if>
|
||||
<if test="ew.entity.latestEndDate!=null"> AND LATEST_END_DATE=#{ew.entity.latestEndDate}</if>
|
||||
<if test="ew.entity.soReleasedDate!=null"> AND SO_RELEASED_DATE=#{ew.entity.soReleasedDate}</if>
|
||||
<if test="ew.entity.sfcReleasedDate!=null"> AND SFC_RELEASED_DATE=#{ew.entity.sfcReleasedDate}</if>
|
||||
<if test="ew.entity.releasedCompleteDate!=null"> AND RELEASED_COMPLETE_DATE=#{ew.entity.releasedCompleteDate}</if>
|
||||
<if test="ew.entity.actualCompleteDate!=null"> AND ACTUAL_COMPLETE_DATE=#{ew.entity.actualCompleteDate}</if>
|
||||
<if test="ew.entity.isAllot!=null"> AND IS_ALLOT=#{ew.entity.isAllot}</if>
|
||||
<if test="ew.entity.isImport!=null"> AND IS_IMPORT=#{ew.entity.isImport}</if>
|
||||
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
|
||||
<if test="ew.entity.isFirstOperation!=null"> AND IS_FIRST_OPERATION=#{ew.entity.isFirstOperation}</if>
|
||||
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<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.other1!=null"> AND OTHER_1=#{ew.entity.other1}</if>
|
||||
<if test="ew.entity.other2!=null"> AND OTHER_2=#{ew.entity.other2}</if>
|
||||
<if test="ew.entity.other3!=null"> AND OTHER_3=#{ew.entity.other3}</if>
|
||||
<if test="ew.entity.other4!=null"> AND OTHER_4=#{ew.entity.other4}</if>
|
||||
<if test="ew.entity.other5!=null"> AND OTHER_5=#{ew.entity.other5}</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_SFC_DISPATCH
|
||||
<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.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
|
||||
<if test="ew.entity.workOrder!=null"> AND WORK_ORDER=#{ew.entity.workOrder}</if>
|
||||
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||
<if test="ew.entity.isMajor!=null"> AND IS_MAJOR=#{ew.entity.isMajor}</if>
|
||||
<if test="ew.entity.dispatchSeq!=null"> AND DISPATCH_SEQ=#{ew.entity.dispatchSeq}</if>
|
||||
<if test="ew.entity.dispatchNo!=null"> AND DISPATCH_NO=#{ew.entity.dispatchNo}</if>
|
||||
<if test="ew.entity.dispatchStatus!=null"> AND DISPATCH_STATUS=#{ew.entity.dispatchStatus}</if>
|
||||
<if test="ew.entity.drawingsNo!=null"> AND DRAWINGS_NO=#{ew.entity.drawingsNo}</if>
|
||||
<if test="ew.entity.drawingsRevision!=null"> AND DRAWINGS_REVISION=#{ew.entity.drawingsRevision}</if>
|
||||
<if test="ew.entity.isLock!=null"> AND IS_LOCK=#{ew.entity.isLock}</if>
|
||||
<if test="ew.entity.routerBo!=null"> AND ROUTER_BO=#{ew.entity.routerBo}</if>
|
||||
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
|
||||
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
|
||||
<if test="ew.entity.resourceType!=null"> AND RESOURCE_TYPE=#{ew.entity.resourceType}</if>
|
||||
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
|
||||
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
|
||||
<if test="ew.entity.employee!=null"> AND EMPLOYEE=#{ew.entity.employee}</if>
|
||||
<if test="ew.entity.turnOrder!=null"> AND TURN_ORDER=#{ew.entity.turnOrder}</if>
|
||||
<if test="ew.entity.dispatchQty!=null"> AND DISPATCH_QTY=#{ew.entity.dispatchQty}</if>
|
||||
<if test="ew.entity.prodHours!=null"> AND PROD_HOURS=#{ew.entity.prodHours}</if>
|
||||
<if test="ew.entity.plannedStartDate!=null"> AND PLANNED_START_DATE=#{ew.entity.plannedStartDate}</if>
|
||||
<if test="ew.entity.plannedCompleteDate!=null"> AND PLANNED_COMPLETE_DATE=#{ew.entity.plannedCompleteDate}</if>
|
||||
<if test="ew.entity.earliestStartDate!=null"> AND EARLIEST_START_DATE=#{ew.entity.earliestStartDate}</if>
|
||||
<if test="ew.entity.latestEndDate!=null"> AND LATEST_END_DATE=#{ew.entity.latestEndDate}</if>
|
||||
<if test="ew.entity.soReleasedDate!=null"> AND SO_RELEASED_DATE=#{ew.entity.soReleasedDate}</if>
|
||||
<if test="ew.entity.sfcReleasedDate!=null"> AND SFC_RELEASED_DATE=#{ew.entity.sfcReleasedDate}</if>
|
||||
<if test="ew.entity.releasedCompleteDate!=null"> AND RELEASED_COMPLETE_DATE=#{ew.entity.releasedCompleteDate}</if>
|
||||
<if test="ew.entity.actualCompleteDate!=null"> AND ACTUAL_COMPLETE_DATE=#{ew.entity.actualCompleteDate}</if>
|
||||
<if test="ew.entity.isAllot!=null"> AND IS_ALLOT=#{ew.entity.isAllot}</if>
|
||||
<if test="ew.entity.isImport!=null"> AND IS_IMPORT=#{ew.entity.isImport}</if>
|
||||
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
|
||||
<if test="ew.entity.isFirstOperation!=null"> AND IS_FIRST_OPERATION=#{ew.entity.isFirstOperation}</if>
|
||||
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<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.other1!=null"> AND OTHER_1=#{ew.entity.other1}</if>
|
||||
<if test="ew.entity.other2!=null"> AND OTHER_2=#{ew.entity.other2}</if>
|
||||
<if test="ew.entity.other3!=null"> AND OTHER_3=#{ew.entity.other3}</if>
|
||||
<if test="ew.entity.other4!=null"> AND OTHER_4=#{ew.entity.other4}</if>
|
||||
<if test="ew.entity.other5!=null"> AND OTHER_5=#{ew.entity.other5}</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_SFC_DISPATCH
|
||||
<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.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
|
||||
<if test="ew.entity.workOrder!=null"> AND WORK_ORDER=#{ew.entity.workOrder}</if>
|
||||
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||
<if test="ew.entity.isMajor!=null"> AND IS_MAJOR=#{ew.entity.isMajor}</if>
|
||||
<if test="ew.entity.dispatchSeq!=null"> AND DISPATCH_SEQ=#{ew.entity.dispatchSeq}</if>
|
||||
<if test="ew.entity.dispatchNo!=null"> AND DISPATCH_NO=#{ew.entity.dispatchNo}</if>
|
||||
<if test="ew.entity.dispatchStatus!=null"> AND DISPATCH_STATUS=#{ew.entity.dispatchStatus}</if>
|
||||
<if test="ew.entity.drawingsNo!=null"> AND DRAWINGS_NO=#{ew.entity.drawingsNo}</if>
|
||||
<if test="ew.entity.drawingsRevision!=null"> AND DRAWINGS_REVISION=#{ew.entity.drawingsRevision}</if>
|
||||
<if test="ew.entity.isLock!=null"> AND IS_LOCK=#{ew.entity.isLock}</if>
|
||||
<if test="ew.entity.routerBo!=null"> AND ROUTER_BO=#{ew.entity.routerBo}</if>
|
||||
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
|
||||
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
|
||||
<if test="ew.entity.resourceType!=null"> AND RESOURCE_TYPE=#{ew.entity.resourceType}</if>
|
||||
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
|
||||
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
|
||||
<if test="ew.entity.employee!=null"> AND EMPLOYEE=#{ew.entity.employee}</if>
|
||||
<if test="ew.entity.turnOrder!=null"> AND TURN_ORDER=#{ew.entity.turnOrder}</if>
|
||||
<if test="ew.entity.dispatchQty!=null"> AND DISPATCH_QTY=#{ew.entity.dispatchQty}</if>
|
||||
<if test="ew.entity.prodHours!=null"> AND PROD_HOURS=#{ew.entity.prodHours}</if>
|
||||
<if test="ew.entity.plannedStartDate!=null"> AND PLANNED_START_DATE=#{ew.entity.plannedStartDate}</if>
|
||||
<if test="ew.entity.plannedCompleteDate!=null"> AND PLANNED_COMPLETE_DATE=#{ew.entity.plannedCompleteDate}</if>
|
||||
<if test="ew.entity.earliestStartDate!=null"> AND EARLIEST_START_DATE=#{ew.entity.earliestStartDate}</if>
|
||||
<if test="ew.entity.latestEndDate!=null"> AND LATEST_END_DATE=#{ew.entity.latestEndDate}</if>
|
||||
<if test="ew.entity.soReleasedDate!=null"> AND SO_RELEASED_DATE=#{ew.entity.soReleasedDate}</if>
|
||||
<if test="ew.entity.sfcReleasedDate!=null"> AND SFC_RELEASED_DATE=#{ew.entity.sfcReleasedDate}</if>
|
||||
<if test="ew.entity.releasedCompleteDate!=null"> AND RELEASED_COMPLETE_DATE=#{ew.entity.releasedCompleteDate}</if>
|
||||
<if test="ew.entity.actualCompleteDate!=null"> AND ACTUAL_COMPLETE_DATE=#{ew.entity.actualCompleteDate}</if>
|
||||
<if test="ew.entity.isAllot!=null"> AND IS_ALLOT=#{ew.entity.isAllot}</if>
|
||||
<if test="ew.entity.isImport!=null"> AND IS_IMPORT=#{ew.entity.isImport}</if>
|
||||
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
|
||||
<if test="ew.entity.isFirstOperation!=null"> AND IS_FIRST_OPERATION=#{ew.entity.isFirstOperation}</if>
|
||||
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<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.other1!=null"> AND OTHER_1=#{ew.entity.other1}</if>
|
||||
<if test="ew.entity.other2!=null"> AND OTHER_2=#{ew.entity.other2}</if>
|
||||
<if test="ew.entity.other3!=null"> AND OTHER_3=#{ew.entity.other3}</if>
|
||||
<if test="ew.entity.other4!=null"> AND OTHER_4=#{ew.entity.other4}</if>
|
||||
<if test="ew.entity.other5!=null"> AND OTHER_5=#{ew.entity.other5}</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_SFC_DISPATCH
|
||||
<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.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
|
||||
<if test="ew.entity.workOrder!=null"> AND WORK_ORDER=#{ew.entity.workOrder}</if>
|
||||
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||
<if test="ew.entity.isMajor!=null"> AND IS_MAJOR=#{ew.entity.isMajor}</if>
|
||||
<if test="ew.entity.dispatchSeq!=null"> AND DISPATCH_SEQ=#{ew.entity.dispatchSeq}</if>
|
||||
<if test="ew.entity.dispatchNo!=null"> AND DISPATCH_NO=#{ew.entity.dispatchNo}</if>
|
||||
<if test="ew.entity.dispatchStatus!=null"> AND DISPATCH_STATUS=#{ew.entity.dispatchStatus}</if>
|
||||
<if test="ew.entity.drawingsNo!=null"> AND DRAWINGS_NO=#{ew.entity.drawingsNo}</if>
|
||||
<if test="ew.entity.drawingsRevision!=null"> AND DRAWINGS_REVISION=#{ew.entity.drawingsRevision}</if>
|
||||
<if test="ew.entity.isLock!=null"> AND IS_LOCK=#{ew.entity.isLock}</if>
|
||||
<if test="ew.entity.routerBo!=null"> AND ROUTER_BO=#{ew.entity.routerBo}</if>
|
||||
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
|
||||
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
|
||||
<if test="ew.entity.resourceType!=null"> AND RESOURCE_TYPE=#{ew.entity.resourceType}</if>
|
||||
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
|
||||
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
|
||||
<if test="ew.entity.employee!=null"> AND EMPLOYEE=#{ew.entity.employee}</if>
|
||||
<if test="ew.entity.turnOrder!=null"> AND TURN_ORDER=#{ew.entity.turnOrder}</if>
|
||||
<if test="ew.entity.dispatchQty!=null"> AND DISPATCH_QTY=#{ew.entity.dispatchQty}</if>
|
||||
<if test="ew.entity.prodHours!=null"> AND PROD_HOURS=#{ew.entity.prodHours}</if>
|
||||
<if test="ew.entity.plannedStartDate!=null"> AND PLANNED_START_DATE=#{ew.entity.plannedStartDate}</if>
|
||||
<if test="ew.entity.plannedCompleteDate!=null"> AND PLANNED_COMPLETE_DATE=#{ew.entity.plannedCompleteDate}</if>
|
||||
<if test="ew.entity.earliestStartDate!=null"> AND EARLIEST_START_DATE=#{ew.entity.earliestStartDate}</if>
|
||||
<if test="ew.entity.latestEndDate!=null"> AND LATEST_END_DATE=#{ew.entity.latestEndDate}</if>
|
||||
<if test="ew.entity.soReleasedDate!=null"> AND SO_RELEASED_DATE=#{ew.entity.soReleasedDate}</if>
|
||||
<if test="ew.entity.sfcReleasedDate!=null"> AND SFC_RELEASED_DATE=#{ew.entity.sfcReleasedDate}</if>
|
||||
<if test="ew.entity.releasedCompleteDate!=null"> AND RELEASED_COMPLETE_DATE=#{ew.entity.releasedCompleteDate}</if>
|
||||
<if test="ew.entity.actualCompleteDate!=null"> AND ACTUAL_COMPLETE_DATE=#{ew.entity.actualCompleteDate}</if>
|
||||
<if test="ew.entity.isAllot!=null"> AND IS_ALLOT=#{ew.entity.isAllot}</if>
|
||||
<if test="ew.entity.isImport!=null"> AND IS_IMPORT=#{ew.entity.isImport}</if>
|
||||
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
|
||||
<if test="ew.entity.isFirstOperation!=null"> AND IS_FIRST_OPERATION=#{ew.entity.isFirstOperation}</if>
|
||||
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<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.other1!=null"> AND OTHER_1=#{ew.entity.other1}</if>
|
||||
<if test="ew.entity.other2!=null"> AND OTHER_2=#{ew.entity.other2}</if>
|
||||
<if test="ew.entity.other3!=null"> AND OTHER_3=#{ew.entity.other3}</if>
|
||||
<if test="ew.entity.other4!=null"> AND OTHER_4=#{ew.entity.other4}</if>
|
||||
<if test="ew.entity.other5!=null"> AND OTHER_5=#{ew.entity.other5}</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_SFC_DISPATCH
|
||||
<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.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
|
||||
<if test="ew.entity.workOrder!=null"> AND WORK_ORDER=#{ew.entity.workOrder}</if>
|
||||
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||
<if test="ew.entity.isMajor!=null"> AND IS_MAJOR=#{ew.entity.isMajor}</if>
|
||||
<if test="ew.entity.dispatchSeq!=null"> AND DISPATCH_SEQ=#{ew.entity.dispatchSeq}</if>
|
||||
<if test="ew.entity.dispatchNo!=null"> AND DISPATCH_NO=#{ew.entity.dispatchNo}</if>
|
||||
<if test="ew.entity.dispatchStatus!=null"> AND DISPATCH_STATUS=#{ew.entity.dispatchStatus}</if>
|
||||
<if test="ew.entity.drawingsNo!=null"> AND DRAWINGS_NO=#{ew.entity.drawingsNo}</if>
|
||||
<if test="ew.entity.drawingsRevision!=null"> AND DRAWINGS_REVISION=#{ew.entity.drawingsRevision}</if>
|
||||
<if test="ew.entity.isLock!=null"> AND IS_LOCK=#{ew.entity.isLock}</if>
|
||||
<if test="ew.entity.routerBo!=null"> AND ROUTER_BO=#{ew.entity.routerBo}</if>
|
||||
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
|
||||
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
|
||||
<if test="ew.entity.resourceType!=null"> AND RESOURCE_TYPE=#{ew.entity.resourceType}</if>
|
||||
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
|
||||
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
|
||||
<if test="ew.entity.employee!=null"> AND EMPLOYEE=#{ew.entity.employee}</if>
|
||||
<if test="ew.entity.turnOrder!=null"> AND TURN_ORDER=#{ew.entity.turnOrder}</if>
|
||||
<if test="ew.entity.dispatchQty!=null"> AND DISPATCH_QTY=#{ew.entity.dispatchQty}</if>
|
||||
<if test="ew.entity.prodHours!=null"> AND PROD_HOURS=#{ew.entity.prodHours}</if>
|
||||
<if test="ew.entity.plannedStartDate!=null"> AND PLANNED_START_DATE=#{ew.entity.plannedStartDate}</if>
|
||||
<if test="ew.entity.plannedCompleteDate!=null"> AND PLANNED_COMPLETE_DATE=#{ew.entity.plannedCompleteDate}</if>
|
||||
<if test="ew.entity.earliestStartDate!=null"> AND EARLIEST_START_DATE=#{ew.entity.earliestStartDate}</if>
|
||||
<if test="ew.entity.latestEndDate!=null"> AND LATEST_END_DATE=#{ew.entity.latestEndDate}</if>
|
||||
<if test="ew.entity.soReleasedDate!=null"> AND SO_RELEASED_DATE=#{ew.entity.soReleasedDate}</if>
|
||||
<if test="ew.entity.sfcReleasedDate!=null"> AND SFC_RELEASED_DATE=#{ew.entity.sfcReleasedDate}</if>
|
||||
<if test="ew.entity.releasedCompleteDate!=null"> AND RELEASED_COMPLETE_DATE=#{ew.entity.releasedCompleteDate}</if>
|
||||
<if test="ew.entity.actualCompleteDate!=null"> AND ACTUAL_COMPLETE_DATE=#{ew.entity.actualCompleteDate}</if>
|
||||
<if test="ew.entity.isAllot!=null"> AND IS_ALLOT=#{ew.entity.isAllot}</if>
|
||||
<if test="ew.entity.isImport!=null"> AND IS_IMPORT=#{ew.entity.isImport}</if>
|
||||
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
|
||||
<if test="ew.entity.isFirstOperation!=null"> AND IS_FIRST_OPERATION=#{ew.entity.isFirstOperation}</if>
|
||||
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<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.other1!=null"> AND OTHER_1=#{ew.entity.other1}</if>
|
||||
<if test="ew.entity.other2!=null"> AND OTHER_2=#{ew.entity.other2}</if>
|
||||
<if test="ew.entity.other3!=null"> AND OTHER_3=#{ew.entity.other3}</if>
|
||||
<if test="ew.entity.other4!=null"> AND OTHER_4=#{ew.entity.other4}</if>
|
||||
<if test="ew.entity.other5!=null"> AND OTHER_5=#{ew.entity.other5}</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_SFC_DISPATCH
|
||||
<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.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
|
||||
<if test="ew.entity.workOrder!=null"> AND WORK_ORDER=#{ew.entity.workOrder}</if>
|
||||
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||
<if test="ew.entity.isMajor!=null"> AND IS_MAJOR=#{ew.entity.isMajor}</if>
|
||||
<if test="ew.entity.dispatchSeq!=null"> AND DISPATCH_SEQ=#{ew.entity.dispatchSeq}</if>
|
||||
<if test="ew.entity.dispatchNo!=null"> AND DISPATCH_NO=#{ew.entity.dispatchNo}</if>
|
||||
<if test="ew.entity.dispatchStatus!=null"> AND DISPATCH_STATUS=#{ew.entity.dispatchStatus}</if>
|
||||
<if test="ew.entity.drawingsNo!=null"> AND DRAWINGS_NO=#{ew.entity.drawingsNo}</if>
|
||||
<if test="ew.entity.drawingsRevision!=null"> AND DRAWINGS_REVISION=#{ew.entity.drawingsRevision}</if>
|
||||
<if test="ew.entity.isLock!=null"> AND IS_LOCK=#{ew.entity.isLock}</if>
|
||||
<if test="ew.entity.routerBo!=null"> AND ROUTER_BO=#{ew.entity.routerBo}</if>
|
||||
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
|
||||
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
|
||||
<if test="ew.entity.resourceType!=null"> AND RESOURCE_TYPE=#{ew.entity.resourceType}</if>
|
||||
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
|
||||
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
|
||||
<if test="ew.entity.employee!=null"> AND EMPLOYEE=#{ew.entity.employee}</if>
|
||||
<if test="ew.entity.turnOrder!=null"> AND TURN_ORDER=#{ew.entity.turnOrder}</if>
|
||||
<if test="ew.entity.dispatchQty!=null"> AND DISPATCH_QTY=#{ew.entity.dispatchQty}</if>
|
||||
<if test="ew.entity.prodHours!=null"> AND PROD_HOURS=#{ew.entity.prodHours}</if>
|
||||
<if test="ew.entity.plannedStartDate!=null"> AND PLANNED_START_DATE=#{ew.entity.plannedStartDate}</if>
|
||||
<if test="ew.entity.plannedCompleteDate!=null"> AND PLANNED_COMPLETE_DATE=#{ew.entity.plannedCompleteDate}</if>
|
||||
<if test="ew.entity.earliestStartDate!=null"> AND EARLIEST_START_DATE=#{ew.entity.earliestStartDate}</if>
|
||||
<if test="ew.entity.latestEndDate!=null"> AND LATEST_END_DATE=#{ew.entity.latestEndDate}</if>
|
||||
<if test="ew.entity.soReleasedDate!=null"> AND SO_RELEASED_DATE=#{ew.entity.soReleasedDate}</if>
|
||||
<if test="ew.entity.sfcReleasedDate!=null"> AND SFC_RELEASED_DATE=#{ew.entity.sfcReleasedDate}</if>
|
||||
<if test="ew.entity.releasedCompleteDate!=null"> AND RELEASED_COMPLETE_DATE=#{ew.entity.releasedCompleteDate}</if>
|
||||
<if test="ew.entity.actualCompleteDate!=null"> AND ACTUAL_COMPLETE_DATE=#{ew.entity.actualCompleteDate}</if>
|
||||
<if test="ew.entity.isAllot!=null"> AND IS_ALLOT=#{ew.entity.isAllot}</if>
|
||||
<if test="ew.entity.isImport!=null"> AND IS_IMPORT=#{ew.entity.isImport}</if>
|
||||
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
|
||||
<if test="ew.entity.isFirstOperation!=null"> AND IS_FIRST_OPERATION=#{ew.entity.isFirstOperation}</if>
|
||||
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<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.other1!=null"> AND OTHER_1=#{ew.entity.other1}</if>
|
||||
<if test="ew.entity.other2!=null"> AND OTHER_2=#{ew.entity.other2}</if>
|
||||
<if test="ew.entity.other3!=null"> AND OTHER_3=#{ew.entity.other3}</if>
|
||||
<if test="ew.entity.other4!=null"> AND OTHER_4=#{ew.entity.other4}</if>
|
||||
<if test="ew.entity.other5!=null"> AND OTHER_5=#{ew.entity.other5}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="com.foreverwin.mesnac.dispatch.model.SfcDispatch">
|
||||
INSERT INTO Z_SFC_DISPATCH
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
HANDLE,
|
||||
<if test="site!=null">SITE,</if>
|
||||
<if test="shopOrder!=null">SHOP_ORDER,</if>
|
||||
<if test="workOrder!=null">WORK_ORDER,</if>
|
||||
<if test="sfc!=null">SFC,</if>
|
||||
<if test="isMajor!=null">IS_MAJOR,</if>
|
||||
<if test="dispatchSeq!=null">DISPATCH_SEQ,</if>
|
||||
<if test="dispatchNo!=null">DISPATCH_NO,</if>
|
||||
<if test="dispatchStatus!=null">DISPATCH_STATUS,</if>
|
||||
<if test="drawingsNo!=null">DRAWINGS_NO,</if>
|
||||
<if test="drawingsRevision!=null">DRAWINGS_REVISION,</if>
|
||||
<if test="isLock!=null">IS_LOCK,</if>
|
||||
<if test="routerBo!=null">ROUTER_BO,</if>
|
||||
<if test="stepId!=null">STEP_ID,</if>
|
||||
<if test="operation!=null">OPERATION,</if>
|
||||
<if test="resourceType!=null">RESOURCE_TYPE,</if>
|
||||
<if test="workCenter!=null">WORK_CENTER,</if>
|
||||
<if test="resrce!=null">RESRCE,</if>
|
||||
<if test="employee!=null">EMPLOYEE,</if>
|
||||
<if test="turnOrder!=null">TURN_ORDER,</if>
|
||||
<if test="dispatchQty!=null">DISPATCH_QTY,</if>
|
||||
<if test="prodHours!=null">PROD_HOURS,</if>
|
||||
<if test="plannedStartDate!=null">PLANNED_START_DATE,</if>
|
||||
<if test="plannedCompleteDate!=null">PLANNED_COMPLETE_DATE,</if>
|
||||
<if test="earliestStartDate!=null">EARLIEST_START_DATE,</if>
|
||||
<if test="latestEndDate!=null">LATEST_END_DATE,</if>
|
||||
<if test="soReleasedDate!=null">SO_RELEASED_DATE,</if>
|
||||
<if test="sfcReleasedDate!=null">SFC_RELEASED_DATE,</if>
|
||||
<if test="releasedCompleteDate!=null">RELEASED_COMPLETE_DATE,</if>
|
||||
<if test="actualCompleteDate!=null">ACTUAL_COMPLETE_DATE,</if>
|
||||
<if test="isAllot!=null">IS_ALLOT,</if>
|
||||
<if test="isImport!=null">IS_IMPORT,</if>
|
||||
<if test="remark!=null">REMARK,</if>
|
||||
<if test="isFirstOperation!=null">IS_FIRST_OPERATION,</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="other1!=null">OTHER_1,</if>
|
||||
<if test="other2!=null">OTHER_2,</if>
|
||||
<if test="other3!=null">OTHER_3,</if>
|
||||
<if test="other4!=null">OTHER_4,</if>
|
||||
<if test="other5!=null">OTHER_5,</if>
|
||||
</trim> VALUES
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
#{handle},
|
||||
<if test="site!=null">#{site},</if>
|
||||
<if test="shopOrder!=null">#{shopOrder},</if>
|
||||
<if test="workOrder!=null">#{workOrder},</if>
|
||||
<if test="sfc!=null">#{sfc},</if>
|
||||
<if test="isMajor!=null">#{isMajor},</if>
|
||||
<if test="dispatchSeq!=null">#{dispatchSeq},</if>
|
||||
<if test="dispatchNo!=null">#{dispatchNo},</if>
|
||||
<if test="dispatchStatus!=null">#{dispatchStatus},</if>
|
||||
<if test="drawingsNo!=null">#{drawingsNo},</if>
|
||||
<if test="drawingsRevision!=null">#{drawingsRevision},</if>
|
||||
<if test="isLock!=null">#{isLock},</if>
|
||||
<if test="routerBo!=null">#{routerBo},</if>
|
||||
<if test="stepId!=null">#{stepId},</if>
|
||||
<if test="operation!=null">#{operation},</if>
|
||||
<if test="resourceType!=null">#{resourceType},</if>
|
||||
<if test="workCenter!=null">#{workCenter},</if>
|
||||
<if test="resrce!=null">#{resrce},</if>
|
||||
<if test="employee!=null">#{employee},</if>
|
||||
<if test="turnOrder!=null">#{turnOrder},</if>
|
||||
<if test="dispatchQty!=null">#{dispatchQty},</if>
|
||||
<if test="prodHours!=null">#{prodHours},</if>
|
||||
<if test="plannedStartDate!=null">#{plannedStartDate},</if>
|
||||
<if test="plannedCompleteDate!=null">#{plannedCompleteDate},</if>
|
||||
<if test="earliestStartDate!=null">#{earliestStartDate},</if>
|
||||
<if test="latestEndDate!=null">#{latestEndDate},</if>
|
||||
<if test="soReleasedDate!=null">#{soReleasedDate},</if>
|
||||
<if test="sfcReleasedDate!=null">#{sfcReleasedDate},</if>
|
||||
<if test="releasedCompleteDate!=null">#{releasedCompleteDate},</if>
|
||||
<if test="actualCompleteDate!=null">#{actualCompleteDate},</if>
|
||||
<if test="isAllot!=null">#{isAllot},</if>
|
||||
<if test="isImport!=null">#{isImport},</if>
|
||||
<if test="remark!=null">#{remark},</if>
|
||||
<if test="isFirstOperation!=null">#{isFirstOperation},</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="other1!=null">#{other1},</if>
|
||||
<if test="other2!=null">#{other2},</if>
|
||||
<if test="other3!=null">#{other3},</if>
|
||||
<if test="other4!=null">#{other4},</if>
|
||||
<if test="other5!=null">#{other5},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<insert id="insertAllColumn" parameterType="com.foreverwin.mesnac.dispatch.model.SfcDispatch">
|
||||
INSERT INTO Z_SFC_DISPATCH
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<include refid="Base_Column_List"></include>
|
||||
</trim> VALUES
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
#{handle},
|
||||
#{site},
|
||||
#{shopOrder},
|
||||
#{workOrder},
|
||||
#{sfc},
|
||||
#{isMajor},
|
||||
#{dispatchSeq},
|
||||
#{dispatchNo},
|
||||
#{dispatchStatus},
|
||||
#{drawingsNo},
|
||||
#{drawingsRevision},
|
||||
#{isLock},
|
||||
#{routerBo},
|
||||
#{stepId},
|
||||
#{operation},
|
||||
#{resourceType},
|
||||
#{workCenter},
|
||||
#{resrce},
|
||||
#{employee},
|
||||
#{turnOrder},
|
||||
#{dispatchQty},
|
||||
#{prodHours},
|
||||
#{plannedStartDate},
|
||||
#{plannedCompleteDate},
|
||||
#{earliestStartDate},
|
||||
#{latestEndDate},
|
||||
#{soReleasedDate},
|
||||
#{sfcReleasedDate},
|
||||
#{releasedCompleteDate},
|
||||
#{actualCompleteDate},
|
||||
#{isAllot},
|
||||
#{isImport},
|
||||
#{remark},
|
||||
#{isFirstOperation},
|
||||
#{createUser},
|
||||
#{createdDateTime},
|
||||
#{modifyUser},
|
||||
#{modifiedDateTime},
|
||||
#{other1},
|
||||
#{other2},
|
||||
#{other3},
|
||||
#{other4},
|
||||
#{other5},
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
||||
<update id="updateById">
|
||||
UPDATE Z_SFC_DISPATCH <trim prefix="SET" suffixOverrides=",">
|
||||
<if test="et.site!=null">SITE=#{et.site},</if>
|
||||
<if test="et.shopOrder!=null">SHOP_ORDER=#{et.shopOrder},</if>
|
||||
<if test="et.workOrder!=null">WORK_ORDER=#{et.workOrder},</if>
|
||||
<if test="et.sfc!=null">SFC=#{et.sfc},</if>
|
||||
<if test="et.isMajor!=null">IS_MAJOR=#{et.isMajor},</if>
|
||||
<if test="et.dispatchSeq!=null">DISPATCH_SEQ=#{et.dispatchSeq},</if>
|
||||
<if test="et.dispatchNo!=null">DISPATCH_NO=#{et.dispatchNo},</if>
|
||||
<if test="et.dispatchStatus!=null">DISPATCH_STATUS=#{et.dispatchStatus},</if>
|
||||
<if test="et.drawingsNo!=null">DRAWINGS_NO=#{et.drawingsNo},</if>
|
||||
<if test="et.drawingsRevision!=null">DRAWINGS_REVISION=#{et.drawingsRevision},</if>
|
||||
<if test="et.isLock!=null">IS_LOCK=#{et.isLock},</if>
|
||||
<if test="et.routerBo!=null">ROUTER_BO=#{et.routerBo},</if>
|
||||
<if test="et.stepId!=null">STEP_ID=#{et.stepId},</if>
|
||||
<if test="et.operation!=null">OPERATION=#{et.operation},</if>
|
||||
<if test="et.resourceType!=null">RESOURCE_TYPE=#{et.resourceType},</if>
|
||||
<if test="et.workCenter!=null">WORK_CENTER=#{et.workCenter},</if>
|
||||
<if test="et.resrce!=null">RESRCE=#{et.resrce},</if>
|
||||
<if test="et.employee!=null">EMPLOYEE=#{et.employee},</if>
|
||||
<if test="et.turnOrder!=null">TURN_ORDER=#{et.turnOrder},</if>
|
||||
<if test="et.dispatchQty!=null">DISPATCH_QTY=#{et.dispatchQty},</if>
|
||||
<if test="et.prodHours!=null">PROD_HOURS=#{et.prodHours},</if>
|
||||
<if test="et.plannedStartDate!=null">PLANNED_START_DATE=#{et.plannedStartDate},</if>
|
||||
<if test="et.plannedCompleteDate!=null">PLANNED_COMPLETE_DATE=#{et.plannedCompleteDate},</if>
|
||||
<if test="et.earliestStartDate!=null">EARLIEST_START_DATE=#{et.earliestStartDate},</if>
|
||||
<if test="et.latestEndDate!=null">LATEST_END_DATE=#{et.latestEndDate},</if>
|
||||
<if test="et.soReleasedDate!=null">SO_RELEASED_DATE=#{et.soReleasedDate},</if>
|
||||
<if test="et.sfcReleasedDate!=null">SFC_RELEASED_DATE=#{et.sfcReleasedDate},</if>
|
||||
<if test="et.releasedCompleteDate!=null">RELEASED_COMPLETE_DATE=#{et.releasedCompleteDate},</if>
|
||||
<if test="et.actualCompleteDate!=null">ACTUAL_COMPLETE_DATE=#{et.actualCompleteDate},</if>
|
||||
<if test="et.isAllot!=null">IS_ALLOT=#{et.isAllot},</if>
|
||||
<if test="et.isImport!=null">IS_IMPORT=#{et.isImport},</if>
|
||||
<if test="et.remark!=null">REMARK=#{et.remark},</if>
|
||||
<if test="et.isFirstOperation!=null">IS_FIRST_OPERATION=#{et.isFirstOperation},</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.other1!=null">OTHER_1=#{et.other1},</if>
|
||||
<if test="et.other2!=null">OTHER_2=#{et.other2},</if>
|
||||
<if test="et.other3!=null">OTHER_3=#{et.other3},</if>
|
||||
<if test="et.other4!=null">OTHER_4=#{et.other4},</if>
|
||||
<if test="et.other5!=null">OTHER_5=#{et.other5},</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_SFC_DISPATCH <trim prefix="SET" suffixOverrides=",">
|
||||
SITE=#{et.site},
|
||||
SHOP_ORDER=#{et.shopOrder},
|
||||
WORK_ORDER=#{et.workOrder},
|
||||
SFC=#{et.sfc},
|
||||
IS_MAJOR=#{et.isMajor},
|
||||
DISPATCH_SEQ=#{et.dispatchSeq},
|
||||
DISPATCH_NO=#{et.dispatchNo},
|
||||
DISPATCH_STATUS=#{et.dispatchStatus},
|
||||
DRAWINGS_NO=#{et.drawingsNo},
|
||||
DRAWINGS_REVISION=#{et.drawingsRevision},
|
||||
IS_LOCK=#{et.isLock},
|
||||
ROUTER_BO=#{et.routerBo},
|
||||
STEP_ID=#{et.stepId},
|
||||
OPERATION=#{et.operation},
|
||||
RESOURCE_TYPE=#{et.resourceType},
|
||||
WORK_CENTER=#{et.workCenter},
|
||||
RESRCE=#{et.resrce},
|
||||
EMPLOYEE=#{et.employee},
|
||||
TURN_ORDER=#{et.turnOrder},
|
||||
DISPATCH_QTY=#{et.dispatchQty},
|
||||
PROD_HOURS=#{et.prodHours},
|
||||
PLANNED_START_DATE=#{et.plannedStartDate},
|
||||
PLANNED_COMPLETE_DATE=#{et.plannedCompleteDate},
|
||||
EARLIEST_START_DATE=#{et.earliestStartDate},
|
||||
LATEST_END_DATE=#{et.latestEndDate},
|
||||
SO_RELEASED_DATE=#{et.soReleasedDate},
|
||||
SFC_RELEASED_DATE=#{et.sfcReleasedDate},
|
||||
RELEASED_COMPLETE_DATE=#{et.releasedCompleteDate},
|
||||
ACTUAL_COMPLETE_DATE=#{et.actualCompleteDate},
|
||||
IS_ALLOT=#{et.isAllot},
|
||||
IS_IMPORT=#{et.isImport},
|
||||
REMARK=#{et.remark},
|
||||
IS_FIRST_OPERATION=#{et.isFirstOperation},
|
||||
CREATE_USER=#{et.createUser},
|
||||
CREATED_DATE_TIME=#{et.createdDateTime},
|
||||
MODIFY_USER=#{et.modifyUser},
|
||||
MODIFIED_DATE_TIME=#{et.modifiedDateTime},
|
||||
OTHER_1=#{et.other1},
|
||||
OTHER_2=#{et.other2},
|
||||
OTHER_3=#{et.other3},
|
||||
OTHER_4=#{et.other4},
|
||||
OTHER_5=#{et.other5},
|
||||
</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_SFC_DISPATCH <trim prefix="SET" suffixOverrides=",">
|
||||
<if test="et.site!=null">SITE=#{et.site},</if>
|
||||
<if test="et.shopOrder!=null">SHOP_ORDER=#{et.shopOrder},</if>
|
||||
<if test="et.workOrder!=null">WORK_ORDER=#{et.workOrder},</if>
|
||||
<if test="et.sfc!=null">SFC=#{et.sfc},</if>
|
||||
<if test="et.isMajor!=null">IS_MAJOR=#{et.isMajor},</if>
|
||||
<if test="et.dispatchSeq!=null">DISPATCH_SEQ=#{et.dispatchSeq},</if>
|
||||
<if test="et.dispatchNo!=null">DISPATCH_NO=#{et.dispatchNo},</if>
|
||||
<if test="et.dispatchStatus!=null">DISPATCH_STATUS=#{et.dispatchStatus},</if>
|
||||
<if test="et.drawingsNo!=null">DRAWINGS_NO=#{et.drawingsNo},</if>
|
||||
<if test="et.drawingsRevision!=null">DRAWINGS_REVISION=#{et.drawingsRevision},</if>
|
||||
<if test="et.isLock!=null">IS_LOCK=#{et.isLock},</if>
|
||||
<if test="et.routerBo!=null">ROUTER_BO=#{et.routerBo},</if>
|
||||
<if test="et.stepId!=null">STEP_ID=#{et.stepId},</if>
|
||||
<if test="et.operation!=null">OPERATION=#{et.operation},</if>
|
||||
<if test="et.resourceType!=null">RESOURCE_TYPE=#{et.resourceType},</if>
|
||||
<if test="et.workCenter!=null">WORK_CENTER=#{et.workCenter},</if>
|
||||
<if test="et.resrce!=null">RESRCE=#{et.resrce},</if>
|
||||
<if test="et.employee!=null">EMPLOYEE=#{et.employee},</if>
|
||||
<if test="et.turnOrder!=null">TURN_ORDER=#{et.turnOrder},</if>
|
||||
<if test="et.dispatchQty!=null">DISPATCH_QTY=#{et.dispatchQty},</if>
|
||||
<if test="et.prodHours!=null">PROD_HOURS=#{et.prodHours},</if>
|
||||
<if test="et.plannedStartDate!=null">PLANNED_START_DATE=#{et.plannedStartDate},</if>
|
||||
<if test="et.plannedCompleteDate!=null">PLANNED_COMPLETE_DATE=#{et.plannedCompleteDate},</if>
|
||||
<if test="et.earliestStartDate!=null">EARLIEST_START_DATE=#{et.earliestStartDate},</if>
|
||||
<if test="et.latestEndDate!=null">LATEST_END_DATE=#{et.latestEndDate},</if>
|
||||
<if test="et.soReleasedDate!=null">SO_RELEASED_DATE=#{et.soReleasedDate},</if>
|
||||
<if test="et.sfcReleasedDate!=null">SFC_RELEASED_DATE=#{et.sfcReleasedDate},</if>
|
||||
<if test="et.releasedCompleteDate!=null">RELEASED_COMPLETE_DATE=#{et.releasedCompleteDate},</if>
|
||||
<if test="et.actualCompleteDate!=null">ACTUAL_COMPLETE_DATE=#{et.actualCompleteDate},</if>
|
||||
<if test="et.isAllot!=null">IS_ALLOT=#{et.isAllot},</if>
|
||||
<if test="et.isImport!=null">IS_IMPORT=#{et.isImport},</if>
|
||||
<if test="et.remark!=null">REMARK=#{et.remark},</if>
|
||||
<if test="et.isFirstOperation!=null">IS_FIRST_OPERATION=#{et.isFirstOperation},</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.other1!=null">OTHER_1=#{et.other1},</if>
|
||||
<if test="et.other2!=null">OTHER_2=#{et.other2},</if>
|
||||
<if test="et.other3!=null">OTHER_3=#{et.other3},</if>
|
||||
<if test="et.other4!=null">OTHER_4=#{et.other4},</if>
|
||||
<if test="et.other5!=null">OTHER_5=#{et.other5},</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.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
|
||||
<if test="ew.entity.workOrder!=null"> AND WORK_ORDER=#{ew.entity.workOrder}</if>
|
||||
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||
<if test="ew.entity.isMajor!=null"> AND IS_MAJOR=#{ew.entity.isMajor}</if>
|
||||
<if test="ew.entity.dispatchSeq!=null"> AND DISPATCH_SEQ=#{ew.entity.dispatchSeq}</if>
|
||||
<if test="ew.entity.dispatchNo!=null"> AND DISPATCH_NO=#{ew.entity.dispatchNo}</if>
|
||||
<if test="ew.entity.dispatchStatus!=null"> AND DISPATCH_STATUS=#{ew.entity.dispatchStatus}</if>
|
||||
<if test="ew.entity.drawingsNo!=null"> AND DRAWINGS_NO=#{ew.entity.drawingsNo}</if>
|
||||
<if test="ew.entity.drawingsRevision!=null"> AND DRAWINGS_REVISION=#{ew.entity.drawingsRevision}</if>
|
||||
<if test="ew.entity.isLock!=null"> AND IS_LOCK=#{ew.entity.isLock}</if>
|
||||
<if test="ew.entity.routerBo!=null"> AND ROUTER_BO=#{ew.entity.routerBo}</if>
|
||||
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
|
||||
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
|
||||
<if test="ew.entity.resourceType!=null"> AND RESOURCE_TYPE=#{ew.entity.resourceType}</if>
|
||||
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
|
||||
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
|
||||
<if test="ew.entity.employee!=null"> AND EMPLOYEE=#{ew.entity.employee}</if>
|
||||
<if test="ew.entity.turnOrder!=null"> AND TURN_ORDER=#{ew.entity.turnOrder}</if>
|
||||
<if test="ew.entity.dispatchQty!=null"> AND DISPATCH_QTY=#{ew.entity.dispatchQty}</if>
|
||||
<if test="ew.entity.prodHours!=null"> AND PROD_HOURS=#{ew.entity.prodHours}</if>
|
||||
<if test="ew.entity.plannedStartDate!=null"> AND PLANNED_START_DATE=#{ew.entity.plannedStartDate}</if>
|
||||
<if test="ew.entity.plannedCompleteDate!=null"> AND PLANNED_COMPLETE_DATE=#{ew.entity.plannedCompleteDate}</if>
|
||||
<if test="ew.entity.earliestStartDate!=null"> AND EARLIEST_START_DATE=#{ew.entity.earliestStartDate}</if>
|
||||
<if test="ew.entity.latestEndDate!=null"> AND LATEST_END_DATE=#{ew.entity.latestEndDate}</if>
|
||||
<if test="ew.entity.soReleasedDate!=null"> AND SO_RELEASED_DATE=#{ew.entity.soReleasedDate}</if>
|
||||
<if test="ew.entity.sfcReleasedDate!=null"> AND SFC_RELEASED_DATE=#{ew.entity.sfcReleasedDate}</if>
|
||||
<if test="ew.entity.releasedCompleteDate!=null"> AND RELEASED_COMPLETE_DATE=#{ew.entity.releasedCompleteDate}</if>
|
||||
<if test="ew.entity.actualCompleteDate!=null"> AND ACTUAL_COMPLETE_DATE=#{ew.entity.actualCompleteDate}</if>
|
||||
<if test="ew.entity.isAllot!=null"> AND IS_ALLOT=#{ew.entity.isAllot}</if>
|
||||
<if test="ew.entity.isImport!=null"> AND IS_IMPORT=#{ew.entity.isImport}</if>
|
||||
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
|
||||
<if test="ew.entity.isFirstOperation!=null"> AND IS_FIRST_OPERATION=#{ew.entity.isFirstOperation}</if>
|
||||
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<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.other1!=null"> AND OTHER_1=#{ew.entity.other1}</if>
|
||||
<if test="ew.entity.other2!=null"> AND OTHER_2=#{ew.entity.other2}</if>
|
||||
<if test="ew.entity.other3!=null"> AND OTHER_3=#{ew.entity.other3}</if>
|
||||
<if test="ew.entity.other4!=null"> AND OTHER_4=#{ew.entity.other4}</if>
|
||||
<if test="ew.entity.other5!=null"> AND OTHER_5=#{ew.entity.other5}</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_SFC_DISPATCH WHERE HANDLE=#{handle}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByMap">
|
||||
DELETE FROM Z_SFC_DISPATCH
|
||||
<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_SFC_DISPATCH
|
||||
<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.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
|
||||
<if test="ew.entity.workOrder!=null"> AND WORK_ORDER=#{ew.entity.workOrder}</if>
|
||||
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||
<if test="ew.entity.isMajor!=null"> AND IS_MAJOR=#{ew.entity.isMajor}</if>
|
||||
<if test="ew.entity.dispatchSeq!=null"> AND DISPATCH_SEQ=#{ew.entity.dispatchSeq}</if>
|
||||
<if test="ew.entity.dispatchNo!=null"> AND DISPATCH_NO=#{ew.entity.dispatchNo}</if>
|
||||
<if test="ew.entity.dispatchStatus!=null"> AND DISPATCH_STATUS=#{ew.entity.dispatchStatus}</if>
|
||||
<if test="ew.entity.drawingsNo!=null"> AND DRAWINGS_NO=#{ew.entity.drawingsNo}</if>
|
||||
<if test="ew.entity.drawingsRevision!=null"> AND DRAWINGS_REVISION=#{ew.entity.drawingsRevision}</if>
|
||||
<if test="ew.entity.isLock!=null"> AND IS_LOCK=#{ew.entity.isLock}</if>
|
||||
<if test="ew.entity.routerBo!=null"> AND ROUTER_BO=#{ew.entity.routerBo}</if>
|
||||
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
|
||||
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
|
||||
<if test="ew.entity.resourceType!=null"> AND RESOURCE_TYPE=#{ew.entity.resourceType}</if>
|
||||
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
|
||||
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
|
||||
<if test="ew.entity.employee!=null"> AND EMPLOYEE=#{ew.entity.employee}</if>
|
||||
<if test="ew.entity.turnOrder!=null"> AND TURN_ORDER=#{ew.entity.turnOrder}</if>
|
||||
<if test="ew.entity.dispatchQty!=null"> AND DISPATCH_QTY=#{ew.entity.dispatchQty}</if>
|
||||
<if test="ew.entity.prodHours!=null"> AND PROD_HOURS=#{ew.entity.prodHours}</if>
|
||||
<if test="ew.entity.plannedStartDate!=null"> AND PLANNED_START_DATE=#{ew.entity.plannedStartDate}</if>
|
||||
<if test="ew.entity.plannedCompleteDate!=null"> AND PLANNED_COMPLETE_DATE=#{ew.entity.plannedCompleteDate}</if>
|
||||
<if test="ew.entity.earliestStartDate!=null"> AND EARLIEST_START_DATE=#{ew.entity.earliestStartDate}</if>
|
||||
<if test="ew.entity.latestEndDate!=null"> AND LATEST_END_DATE=#{ew.entity.latestEndDate}</if>
|
||||
<if test="ew.entity.soReleasedDate!=null"> AND SO_RELEASED_DATE=#{ew.entity.soReleasedDate}</if>
|
||||
<if test="ew.entity.sfcReleasedDate!=null"> AND SFC_RELEASED_DATE=#{ew.entity.sfcReleasedDate}</if>
|
||||
<if test="ew.entity.releasedCompleteDate!=null"> AND RELEASED_COMPLETE_DATE=#{ew.entity.releasedCompleteDate}</if>
|
||||
<if test="ew.entity.actualCompleteDate!=null"> AND ACTUAL_COMPLETE_DATE=#{ew.entity.actualCompleteDate}</if>
|
||||
<if test="ew.entity.isAllot!=null"> AND IS_ALLOT=#{ew.entity.isAllot}</if>
|
||||
<if test="ew.entity.isImport!=null"> AND IS_IMPORT=#{ew.entity.isImport}</if>
|
||||
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
|
||||
<if test="ew.entity.isFirstOperation!=null"> AND IS_FIRST_OPERATION=#{ew.entity.isFirstOperation}</if>
|
||||
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<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.other1!=null"> AND OTHER_1=#{ew.entity.other1}</if>
|
||||
<if test="ew.entity.other2!=null"> AND OTHER_2=#{ew.entity.other2}</if>
|
||||
<if test="ew.entity.other3!=null"> AND OTHER_3=#{ew.entity.other3}</if>
|
||||
<if test="ew.entity.other4!=null"> AND OTHER_4=#{ew.entity.other4}</if>
|
||||
<if test="ew.entity.other5!=null"> AND OTHER_5=#{ew.entity.other5}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
AND ${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
AND ${ew.sqlSegment}
|
||||
</if>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBatchIds">
|
||||
DELETE FROM Z_SFC_DISPATCH WHERE HANDLE IN (
|
||||
<foreach item="item" index="index" collection="coll" separator=",">#{item}
|
||||
</foreach>)
|
||||
</delete>
|
||||
<!-- BaseMapper标准查询/修改/删除 -->
|
||||
|
||||
<select id="findSfcDispatch" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List" />
|
||||
FROM Z_SFC_DISPATCH
|
||||
WHERE SITE = #{site} AND SFC = #{sfc}
|
||||
<if test="operation != null and operation != ''">
|
||||
AND OPERATION = #{operation}
|
||||
</if>
|
||||
<if test="stepId != null and stepId != ''">
|
||||
AND STEP_ID = #{stepId}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.foreverwin.mesnac.dispatch.mapper.ShopOrderReleaseMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.foreverwin.mesnac.dispatch.model.ShopOrderRelease">
|
||||
<id column="HANDLE" property="handle" />
|
||||
<result column="SITE" property="site" />
|
||||
<result column="SHOP_ORDER" property="shopOrder" />
|
||||
<result column="SHOP_ORDER_BO" property="shopOrderBo" />
|
||||
<result column="STATUS" property="status" />
|
||||
<result column="RESOURCE_TYPE" property="resourceType" />
|
||||
<result column="WORK_CENTER" property="workCenter" />
|
||||
<result column="CATEGORY" property="category" />
|
||||
<result column="WORK_ORDER" property="workOrder" />
|
||||
<result column="COMMENTS" property="comments" />
|
||||
<result column="ITEM_DESCRIPTION" property="itemDescription" />
|
||||
<result column="QTY_TO_BUILD" property="qtyToBuild" />
|
||||
<result column="PLANNED_START_DATE" property="plannedStartDate" />
|
||||
<result column="PLANNED_COMP_DATE" property="plannedCompDate" />
|
||||
<result column="DISPATCH_COMPLETE_DATE" property="dispatchCompleteDate" />
|
||||
</resultMap>
|
||||
|
||||
<select id="findShopOrderList" resultMap="BaseResultMap">
|
||||
SELECT MVP.*
|
||||
FROM (
|
||||
SELECT SO.HANDLE, SO.HANDLE SHOP_ORDER_BO, SO.SITE, SO.SHOP_ORDER, CF1.VALUE WORK_ORDER, CF2.VALUE CATEGORY, CF3.VALUE COMMENTS,
|
||||
IM.ITEM, IMT.DESCRIPTION ITEM_DESCRIPTION, SO.QTY_TO_BUILD, SO.PLANNED_START_DATE, SO.PLANNED_COMP_DATE, MAX(ZSD.PLANNED_COMPLETE_DATE) DISPATCH_COMPLETE_DATE,
|
||||
SUBSTR(SPLIT(OP.RESOURCE_TYPE_BO, 2),0,INSTR(SPLIT(OP.RESOURCE_TYPE_BO, 2), '_')-1) WORK_CENTER,
|
||||
CASE WHEN ST.STATUS = '502' OR ST.STATUS = '503' OR ST.STATUS = '504' THEN ST.STATUS
|
||||
WHEN ST.STATUS = '501' AND SO.QTY_RELEASED <= 0 THEN N'501'
|
||||
WHEN MAX(SS.SHOP_ORDER_BO) IS NULL THEN N'505' ELSE N'506' END STATUS
|
||||
FROM SHOP_ORDER SO
|
||||
INNER JOIN ITEM IM ON SO.PLANNED_ITEM_BO = IM.HANDLE
|
||||
INNER JOIN STATUS ST ON SO.STATUS_BO = ST.HANDLE AND ST.STATUS_GROUP = 'ORDERS'
|
||||
INNER JOIN ROUTER RT ON SO.PLANNED_ROUTER_BO = RT.HANDLE
|
||||
INNER JOIN ROUTER_OPERATION RO ON RT.ENTRY_ROUTER_STEP_BO = RO.ROUTER_STEP_BO
|
||||
INNER JOIN OPERATION OP ON SO.SITE = OP.SITE AND SPLIT(RO.OPERATION_BO,2) = OP.OPERATION AND OP.CURRENT_REVISION = 'true'
|
||||
LEFT JOIN (
|
||||
SELECT SHOP_ORDER_BO
|
||||
FROM SFC SC
|
||||
INNER JOIN STATUS ST ON SC.STATUS_BO = ST.HANDLE AND ST.STATUS_GROUP = 'SFC'
|
||||
WHERE ST.STATUS != '401'
|
||||
GROUP BY SHOP_ORDER_BO
|
||||
) SS ON SS.SHOP_ORDER_BO = SO.HANDLE
|
||||
LEFT JOIN ITEM_T IMT ON IM.HANDLE = IMT.ITEM_BO AND IMT.LOCALE = 'zh'
|
||||
LEFT JOIN CUSTOM_FIELDS CF1 ON CF1.HANDLE = SO.HANDLE AND CF1.ATTRIBUTE = 'ITEM_NUMBER'
|
||||
LEFT JOIN CUSTOM_FIELDS CF2 ON CF2.HANDLE = SO.HANDLE AND CF2.ATTRIBUTE = 'CATEGORY'
|
||||
LEFT JOIN CUSTOM_FIELDS CF3 ON CF3.HANDLE = SO.HANDLE AND CF3.ATTRIBUTE = 'COMMENTS'
|
||||
LEFT JOIN Z_SFC_DISPATCH ZSD ON SO.SITE = ZSD.SITE AND SO.SHOP_ORDER = ZSD.SHOP_ORDER
|
||||
WHERE SO.SITE = #{site}
|
||||
<if test="shopOrder != null and shopOrder != ''">
|
||||
AND SO.SHOP_ORDER = #{shopOrder}
|
||||
</if>
|
||||
<if test="workOrder != null and workOrder != ''">
|
||||
AND CF1.VALUE LIKE '%'|| #{workOrder} || '%'
|
||||
</if>
|
||||
<if test="category != null and category != ''">
|
||||
AND CF2.VALUE LIKE '%'|| #{category} || '%'
|
||||
</if>
|
||||
<if test="item != null and item != ''">
|
||||
AND IM.ITEM = #{item}
|
||||
</if>
|
||||
<if test="startFromDate != null">
|
||||
AND SO.PLANNED_START_DATE >= #{startFromDate}
|
||||
</if>
|
||||
<if test="startToDate != null">
|
||||
AND SO.PLANNED_START_DATE <= #{startToDate}
|
||||
</if>
|
||||
<if test="completeFromDate != null">
|
||||
AND SO.PLANNED_COMP_DATE >= #{completeFromDate}
|
||||
</if>
|
||||
<if test="completeToDate != null">
|
||||
AND SO.PLANNED_COMP_DATE <= #{completeToDate}
|
||||
</if>
|
||||
GROUP BY SO.HANDLE, SO.SITE, SO.SHOP_ORDER, SO.QTY_RELEASED, ST.STATUS, CF1.VALUE, CF2.VALUE, CF3.VALUE,
|
||||
OP.RESOURCE_TYPE_BO, IM.ITEM, IMT.DESCRIPTION, SO.QTY_TO_BUILD, SO.PLANNED_START_DATE, SO.PLANNED_COMP_DATE,
|
||||
SO.PLANNED_WORK_CENTER_BO
|
||||
) MVP
|
||||
WHERE 1 = 1
|
||||
<if test="status != null and status != ''">
|
||||
AND MVP.STATUS = #{status}
|
||||
</if>
|
||||
<if test="workCenter != null and workCenter != ''">
|
||||
AND MVP.WORK_CENTER = #{workCenter}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectShopOrderRouter" resultType="com.foreverwin.mesnac.dispatch.dto.RouterDTO">
|
||||
SELECT RT.HANDLE, RT.HANDLE ROUTER_BO, RT.SITE, RT.ROUTER, RT.DESCRIPTION, RT.REVISION, RT.ENTRY_ROUTER_STEP_BO, RT.STATUS_BO, RS.HANDLE ROUTER_STEP_BO, RS.STEP_ID, OP.OPERATION, OP.HANDLE OPERATION_BO,
|
||||
RNS.NEXT_STEP_BO, OT.DESCRIPTION OPERATION_DESCRIPTION, RT.RESOURCE_TYPE, CF1.VALUE PROD_HOURS
|
||||
FROM ROUTER RT
|
||||
INNER JOIN ROUTER_STEP RS ON RT.HANDLE = RS.ROUTER_BO AND RS.QUEUE_DECISION_TYPE IS NOT NULL
|
||||
LEFT JOIN ROUTER_OPERATION RO ON RS.HANDLE = RO.ROUTER_STEP_BO
|
||||
LEFT JOIN OPERATION OP ON RO.OPERATION_BO = 'OperationBO:'||OP.SITE||','||OP.OPERATION||',#' AND OP.CURRENT_REVISION = 'true'
|
||||
LEFT JOIN RESOURCE_TYPE RT ON OP.RESOURCE_TYPE_BO = RT.HANDLE
|
||||
LEFT JOIN ROUTER_NEXT_STEP RNS ON RS.HANDLE = RNS.ROUTER_STEP_BO
|
||||
LEFT JOIN OPERATION_T OT ON OP.HANDLE = OT.OPERATION_BO AND OT.LOCALE = 'zh'
|
||||
LEFT JOIN CUSTOM_FIELDS CF1 ON CF1.HANDLE = RO.HANDLE AND CF1.ATTRIBUTE = 'PROD_TIME'
|
||||
WHERE RT.HANDLE = #{routerBo}
|
||||
ORDER BY TO_NUMBER(RS.STEP_ID)
|
||||
</select>
|
||||
|
||||
<select id="selectRouterStepGroup" resultType="com.foreverwin.mesnac.dispatch.dto.RouterDTO">
|
||||
SELECT RS.HANDLE ROUTER_STEP_BO, RS.STEP_ID, OP.OPERATION, OP.HANDLE OPERATION_BO, RNS.NEXT_STEP_BO, OT.DESCRIPTION OPERATION_DESCRIPTION, RT.RESOURCE_TYPE, CF1.VALUE PROD_HOURS
|
||||
FROM ROUTER_STEP_GROUP RSG
|
||||
INNER JOIN ROUTER_STEP_GROUP_STEP RSGS ON RSGS.ROUTER_STEP_GROUP_BO = RSG.HANDLE
|
||||
INNER JOIN ROUTER_STEP RS ON RS.HANDLE = RSGS.ROUTER_STEP_BO AND RS.QUEUE_DECISION_TYPE IS NOT NULL
|
||||
LEFT JOIN ROUTER_OPERATION RO ON RS.HANDLE = RO.ROUTER_STEP_BO
|
||||
LEFT JOIN OPERATION OP ON RO.OPERATION_BO = 'OperationBO:'||OP.SITE||','||OP.OPERATION||',#' AND OP.CURRENT_REVISION = 'true'
|
||||
LEFT JOIN RESOURCE_TYPE RT ON OP.RESOURCE_TYPE_BO = RT.HANDLE
|
||||
LEFT JOIN ROUTER_NEXT_STEP RNS ON RS.HANDLE = RNS.ROUTER_STEP_BO
|
||||
LEFT JOIN OPERATION_T OT ON OP.HANDLE = OT.OPERATION_BO AND OT.LOCALE = 'zh'
|
||||
LEFT JOIN CUSTOM_FIELDS CF1 ON CF1.HANDLE = RO.HANDLE AND CF1.ATTRIBUTE = 'PROD_TIME'
|
||||
WHERE RSG.ROUTER_STEP_BO = #{routerStepBo}
|
||||
ORDER BY TO_NUMBER(RS.STEP_ID)
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,141 @@
|
||||
package com.foreverwin.mesnac.meapi.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.meapi.service.RouterService;
|
||||
import com.foreverwin.mesnac.meapi.model.Router;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Leon.L
|
||||
* @since 2021-06-02
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/ROUTER")
|
||||
public class RouterController {
|
||||
|
||||
@Autowired
|
||||
public RouterService routerService;
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id 主键
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@GetMapping("/{id:.+}")
|
||||
public R getRouterById(@PathVariable String id) {
|
||||
return R.ok( routerService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询所有数据
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@GetMapping("")
|
||||
public R getRouterList(Router router){
|
||||
List<Router> result;
|
||||
QueryWrapper<Router> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(router);
|
||||
result = routerService.list(queryWrapper);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询数据
|
||||
*
|
||||
* @param frontPage 分页信息
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@GetMapping("/page")
|
||||
public R page(FrontPage<Router> frontPage, Router router){
|
||||
IPage result;
|
||||
QueryWrapper<Router> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(router);
|
||||
if (frontPage.getGlobalQuery() != null && !"".equals(frontPage.getGlobalQuery().trim())) {
|
||||
//TODO modify global query
|
||||
queryWrapper.lambda().and(wrapper -> wrapper
|
||||
.like(Router::getHandle, frontPage.getGlobalQuery())
|
||||
.or().like(Router::getSite, frontPage.getGlobalQuery())
|
||||
.or().like(Router::getRouter, frontPage.getGlobalQuery())
|
||||
.or().like(Router::getRouterType, frontPage.getGlobalQuery())
|
||||
.or().like(Router::getDescription, frontPage.getGlobalQuery())
|
||||
.or().like(Router::getTemporaryRouter, frontPage.getGlobalQuery())
|
||||
.or().like(Router::getStatusBo, frontPage.getGlobalQuery())
|
||||
.or().like(Router::getEntryRouterStepBo, frontPage.getGlobalQuery())
|
||||
.or().like(Router::getCopiedFromRouterBo, frontPage.getGlobalQuery())
|
||||
.or().like(Router::getRevision, frontPage.getGlobalQuery())
|
||||
.or().like(Router::getCurrentRevision, frontPage.getGlobalQuery())
|
||||
.or().like(Router::getHasBeenReleased, frontPage.getGlobalQuery())
|
||||
.or().like(Router::getGuiRepresentation, frontPage.getGlobalQuery())
|
||||
.or().like(Router::getOriginalStatusBo, frontPage.getGlobalQuery())
|
||||
.or().like(Router::getDispositionGroupBo, frontPage.getGlobalQuery())
|
||||
.or().like(Router::getPrevSite, frontPage.getGlobalQuery())
|
||||
.or().like(Router::getOriginalTransferKey, frontPage.getGlobalQuery())
|
||||
.or().like(Router::getDisplayType, frontPage.getGlobalQuery())
|
||||
.or().like(Router::getSendAsShared, frontPage.getGlobalQuery())
|
||||
.or().like(Router::getSentToErp, frontPage.getGlobalQuery())
|
||||
.or().like(Router::getErpChangeNumber, frontPage.getGlobalQuery())
|
||||
.or().like(Router::getRelaxedFlow, frontPage.getGlobalQuery())
|
||||
.or().like(Router::getBomBo, frontPage.getGlobalQuery())
|
||||
.or().like(Router::getOrigin, frontPage.getGlobalQuery())
|
||||
);
|
||||
}
|
||||
result = routerService.page(frontPage.getPagePlus(), queryWrapper);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增
|
||||
* @param router 传递的实体
|
||||
* @return null 失败 实体成功
|
||||
*/
|
||||
@PostMapping
|
||||
public R save(@RequestBody Router router) {
|
||||
return R.ok(routerService.save(router));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* @param router 传递的实体
|
||||
* @return null 失败 实体成功
|
||||
*/
|
||||
@PutMapping
|
||||
public R updateById(@RequestBody Router router) {
|
||||
return R.ok(routerService.updateById(router));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id删除对象
|
||||
* @param id 实体ID
|
||||
* @return 0 失败 1 成功
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping(method = RequestMethod.DELETE, value = "/{id:.+}")
|
||||
public R removeById(@PathVariable("id") String id){
|
||||
return R.ok(routerService.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(routerService.removeByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,122 @@
|
||||
package com.foreverwin.mesnac.meapi.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.meapi.service.SfcService;
|
||||
import com.foreverwin.mesnac.meapi.model.Sfc;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Leon.L
|
||||
* @since 2021-06-02
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/SFC")
|
||||
public class SfcController {
|
||||
|
||||
@Autowired
|
||||
public SfcService sfcService;
|
||||
|
||||
|
||||
/**
|
||||
* 查询所有数据
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@GetMapping("")
|
||||
public R getSfcList(Sfc sfc){
|
||||
List<Sfc> result;
|
||||
QueryWrapper<Sfc> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(sfc);
|
||||
result = sfcService.list(queryWrapper);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询数据
|
||||
*
|
||||
* @param frontPage 分页信息
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@GetMapping("/page")
|
||||
public R page(FrontPage<Sfc> frontPage, Sfc sfc){
|
||||
IPage result;
|
||||
QueryWrapper<Sfc> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(sfc);
|
||||
if (frontPage.getGlobalQuery() != null && !"".equals(frontPage.getGlobalQuery().trim())) {
|
||||
//TODO modify global query
|
||||
queryWrapper.lambda().and(wrapper -> wrapper
|
||||
.like(Sfc::getHandle, frontPage.getGlobalQuery())
|
||||
.or().like(Sfc::getSite, frontPage.getGlobalQuery())
|
||||
.or().like(Sfc::getSfc, frontPage.getGlobalQuery())
|
||||
.or().like(Sfc::getStatusBo, frontPage.getGlobalQuery())
|
||||
.or().like(Sfc::getShopOrderBo, frontPage.getGlobalQuery())
|
||||
.or().like(Sfc::getItemBo, frontPage.getGlobalQuery())
|
||||
.or().like(Sfc::getLocation, frontPage.getGlobalQuery())
|
||||
.or().like(Sfc::getLccBo, frontPage.getGlobalQuery())
|
||||
.or().like(Sfc::getOriginalStatusBo, frontPage.getGlobalQuery())
|
||||
.or().like(Sfc::getQtyMultPerformed, frontPage.getGlobalQuery())
|
||||
.or().like(Sfc::getPrevSite, frontPage.getGlobalQuery())
|
||||
.or().like(Sfc::getOriginalTransferKey, frontPage.getGlobalQuery())
|
||||
.or().like(Sfc::getImmediateArchive, frontPage.getGlobalQuery())
|
||||
.or().like(Sfc::getTransferUser, frontPage.getGlobalQuery())
|
||||
.or().like(Sfc::getSnDone, frontPage.getGlobalQuery())
|
||||
.or().like(Sfc::getAinEquipmentId, frontPage.getGlobalQuery())
|
||||
);
|
||||
}
|
||||
result = sfcService.page(frontPage.getPagePlus(), queryWrapper);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增
|
||||
* @param sfc 传递的实体
|
||||
* @return null 失败 实体成功
|
||||
*/
|
||||
@PostMapping
|
||||
public R save(@RequestBody Sfc sfc) {
|
||||
return R.ok(sfcService.save(sfc));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* @param sfc 传递的实体
|
||||
* @return null 失败 实体成功
|
||||
*/
|
||||
@PutMapping
|
||||
public R updateById(@RequestBody Sfc sfc) {
|
||||
return R.ok(sfcService.updateById(sfc));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id删除对象
|
||||
* @param id 实体ID
|
||||
* @return 0 失败 1 成功
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping(method = RequestMethod.DELETE, value = "/{id:.+}")
|
||||
public R removeById(@PathVariable("id") String id){
|
||||
return R.ok(sfcService.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(sfcService.removeByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.foreverwin.mesnac.meapi.mapper;
|
||||
|
||||
import com.foreverwin.mesnac.meapi.model.Router;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author Leon.L
|
||||
* @since 2021-06-02
|
||||
*/
|
||||
@Repository
|
||||
public interface RouterMapper extends BaseMapper<Router> {
|
||||
|
||||
Router selectRouterBySfcBo(@Param("sfcBo") String sfcBo);
|
||||
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.foreverwin.mesnac.meapi.mapper;
|
||||
|
||||
import com.foreverwin.mesnac.meapi.model.Sfc;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author Leon.L
|
||||
* @since 2021-06-02
|
||||
*/
|
||||
@Repository
|
||||
public interface SfcMapper extends BaseMapper<Sfc> {
|
||||
|
||||
}
|
@ -0,0 +1,428 @@
|
||||
package com.foreverwin.mesnac.meapi.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author Leon.L
|
||||
* @since 2021-06-02
|
||||
*/
|
||||
|
||||
@TableName("ROUTER")
|
||||
public class Router extends Model<Router> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId("HANDLE")
|
||||
private String handle;
|
||||
@TableField("CHANGE_STAMP")
|
||||
private Long changeStamp;
|
||||
@TableField("SITE")
|
||||
private String site;
|
||||
@TableField("ROUTER")
|
||||
private String router;
|
||||
@TableField("ROUTER_TYPE")
|
||||
private String routerType;
|
||||
@TableField("DESCRIPTION")
|
||||
private String description;
|
||||
@TableField("TEMPORARY_ROUTER")
|
||||
private String temporaryRouter;
|
||||
@TableField("STATUS_BO")
|
||||
private String statusBo;
|
||||
@TableField("ENTRY_ROUTER_STEP_BO")
|
||||
private String entryRouterStepBo;
|
||||
@TableField("COPIED_FROM_ROUTER_BO")
|
||||
private String copiedFromRouterBo;
|
||||
@TableField("REVISION")
|
||||
private String revision;
|
||||
@TableField("CURRENT_REVISION")
|
||||
private String currentRevision;
|
||||
@TableField("HAS_BEEN_RELEASED")
|
||||
private String hasBeenReleased;
|
||||
@TableField("EFF_START_DATE")
|
||||
private LocalDateTime effStartDate;
|
||||
@TableField("EFF_END_DATE")
|
||||
private LocalDateTime effEndDate;
|
||||
@TableField("CREATED_DATE_TIME")
|
||||
private LocalDateTime createdDateTime;
|
||||
@TableField("MODIFIED_DATE_TIME")
|
||||
private LocalDateTime modifiedDateTime;
|
||||
@TableField("GUI_REPRESENTATION")
|
||||
private String guiRepresentation;
|
||||
@TableField("ORIGINAL_STATUS_BO")
|
||||
private String originalStatusBo;
|
||||
@TableField("DISPOSITION_GROUP_BO")
|
||||
private String dispositionGroupBo;
|
||||
@TableField("PREV_SITE")
|
||||
private String prevSite;
|
||||
@TableField("ORIGINAL_TRANSFER_KEY")
|
||||
private String originalTransferKey;
|
||||
@TableField("DISPLAY_TYPE")
|
||||
private String displayType;
|
||||
@TableField("HOLD_ID")
|
||||
private Long holdId;
|
||||
@TableField("SEND_AS_SHARED")
|
||||
private String sendAsShared;
|
||||
@TableField("SENT_TO_ERP")
|
||||
private String sentToErp;
|
||||
@TableField("ERP_CHANGE_NUMBER")
|
||||
private String erpChangeNumber;
|
||||
@TableField("RELAXED_FLOW")
|
||||
private String relaxedFlow;
|
||||
@TableField("BOM_BO")
|
||||
private String bomBo;
|
||||
@TableField("ORIGIN")
|
||||
private String origin;
|
||||
|
||||
|
||||
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 getRouter() {
|
||||
return router;
|
||||
}
|
||||
|
||||
public void setRouter(String router) {
|
||||
this.router = router;
|
||||
}
|
||||
|
||||
public String getRouterType() {
|
||||
return routerType;
|
||||
}
|
||||
|
||||
public void setRouterType(String routerType) {
|
||||
this.routerType = routerType;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getTemporaryRouter() {
|
||||
return temporaryRouter;
|
||||
}
|
||||
|
||||
public void setTemporaryRouter(String temporaryRouter) {
|
||||
this.temporaryRouter = temporaryRouter;
|
||||
}
|
||||
|
||||
public String getStatusBo() {
|
||||
return statusBo;
|
||||
}
|
||||
|
||||
public void setStatusBo(String statusBo) {
|
||||
this.statusBo = statusBo;
|
||||
}
|
||||
|
||||
public String getEntryRouterStepBo() {
|
||||
return entryRouterStepBo;
|
||||
}
|
||||
|
||||
public void setEntryRouterStepBo(String entryRouterStepBo) {
|
||||
this.entryRouterStepBo = entryRouterStepBo;
|
||||
}
|
||||
|
||||
public String getCopiedFromRouterBo() {
|
||||
return copiedFromRouterBo;
|
||||
}
|
||||
|
||||
public void setCopiedFromRouterBo(String copiedFromRouterBo) {
|
||||
this.copiedFromRouterBo = copiedFromRouterBo;
|
||||
}
|
||||
|
||||
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 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 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 getGuiRepresentation() {
|
||||
return guiRepresentation;
|
||||
}
|
||||
|
||||
public void setGuiRepresentation(String guiRepresentation) {
|
||||
this.guiRepresentation = guiRepresentation;
|
||||
}
|
||||
|
||||
public String getOriginalStatusBo() {
|
||||
return originalStatusBo;
|
||||
}
|
||||
|
||||
public void setOriginalStatusBo(String originalStatusBo) {
|
||||
this.originalStatusBo = originalStatusBo;
|
||||
}
|
||||
|
||||
public String getDispositionGroupBo() {
|
||||
return dispositionGroupBo;
|
||||
}
|
||||
|
||||
public void setDispositionGroupBo(String dispositionGroupBo) {
|
||||
this.dispositionGroupBo = dispositionGroupBo;
|
||||
}
|
||||
|
||||
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 getDisplayType() {
|
||||
return displayType;
|
||||
}
|
||||
|
||||
public void setDisplayType(String displayType) {
|
||||
this.displayType = displayType;
|
||||
}
|
||||
|
||||
public Long getHoldId() {
|
||||
return holdId;
|
||||
}
|
||||
|
||||
public void setHoldId(Long holdId) {
|
||||
this.holdId = holdId;
|
||||
}
|
||||
|
||||
public String getSendAsShared() {
|
||||
return sendAsShared;
|
||||
}
|
||||
|
||||
public void setSendAsShared(String sendAsShared) {
|
||||
this.sendAsShared = sendAsShared;
|
||||
}
|
||||
|
||||
public String getSentToErp() {
|
||||
return sentToErp;
|
||||
}
|
||||
|
||||
public void setSentToErp(String sentToErp) {
|
||||
this.sentToErp = sentToErp;
|
||||
}
|
||||
|
||||
public String getErpChangeNumber() {
|
||||
return erpChangeNumber;
|
||||
}
|
||||
|
||||
public void setErpChangeNumber(String erpChangeNumber) {
|
||||
this.erpChangeNumber = erpChangeNumber;
|
||||
}
|
||||
|
||||
public String getRelaxedFlow() {
|
||||
return relaxedFlow;
|
||||
}
|
||||
|
||||
public void setRelaxedFlow(String relaxedFlow) {
|
||||
this.relaxedFlow = relaxedFlow;
|
||||
}
|
||||
|
||||
public String getBomBo() {
|
||||
return bomBo;
|
||||
}
|
||||
|
||||
public void setBomBo(String bomBo) {
|
||||
this.bomBo = bomBo;
|
||||
}
|
||||
|
||||
public String getOrigin() {
|
||||
return origin;
|
||||
}
|
||||
|
||||
public void setOrigin(String origin) {
|
||||
this.origin = origin;
|
||||
}
|
||||
|
||||
public static final String HANDLE = "HANDLE";
|
||||
|
||||
public static final String CHANGE_STAMP = "CHANGE_STAMP";
|
||||
|
||||
public static final String SITE = "SITE";
|
||||
|
||||
public static final String ROUTER = "ROUTER";
|
||||
|
||||
public static final String ROUTER_TYPE = "ROUTER_TYPE";
|
||||
|
||||
public static final String DESCRIPTION = "DESCRIPTION";
|
||||
|
||||
public static final String TEMPORARY_ROUTER = "TEMPORARY_ROUTER";
|
||||
|
||||
public static final String STATUS_BO = "STATUS_BO";
|
||||
|
||||
public static final String ENTRY_ROUTER_STEP_BO = "ENTRY_ROUTER_STEP_BO";
|
||||
|
||||
public static final String COPIED_FROM_ROUTER_BO = "COPIED_FROM_ROUTER_BO";
|
||||
|
||||
public static final String REVISION = "REVISION";
|
||||
|
||||
public static final String CURRENT_REVISION = "CURRENT_REVISION";
|
||||
|
||||
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 CREATED_DATE_TIME = "CREATED_DATE_TIME";
|
||||
|
||||
public static final String MODIFIED_DATE_TIME = "MODIFIED_DATE_TIME";
|
||||
|
||||
public static final String GUI_REPRESENTATION = "GUI_REPRESENTATION";
|
||||
|
||||
public static final String ORIGINAL_STATUS_BO = "ORIGINAL_STATUS_BO";
|
||||
|
||||
public static final String DISPOSITION_GROUP_BO = "DISPOSITION_GROUP_BO";
|
||||
|
||||
public static final String PREV_SITE = "PREV_SITE";
|
||||
|
||||
public static final String ORIGINAL_TRANSFER_KEY = "ORIGINAL_TRANSFER_KEY";
|
||||
|
||||
public static final String DISPLAY_TYPE = "DISPLAY_TYPE";
|
||||
|
||||
public static final String HOLD_ID = "HOLD_ID";
|
||||
|
||||
public static final String SEND_AS_SHARED = "SEND_AS_SHARED";
|
||||
|
||||
public static final String SENT_TO_ERP = "SENT_TO_ERP";
|
||||
|
||||
public static final String ERP_CHANGE_NUMBER = "ERP_CHANGE_NUMBER";
|
||||
|
||||
public static final String RELAXED_FLOW = "RELAXED_FLOW";
|
||||
|
||||
public static final String BOM_BO = "BOM_BO";
|
||||
|
||||
public static final String ORIGIN = "ORIGIN";
|
||||
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.handle;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Router{" +
|
||||
"handle = " + handle +
|
||||
", changeStamp = " + changeStamp +
|
||||
", site = " + site +
|
||||
", router = " + router +
|
||||
", routerType = " + routerType +
|
||||
", description = " + description +
|
||||
", temporaryRouter = " + temporaryRouter +
|
||||
", statusBo = " + statusBo +
|
||||
", entryRouterStepBo = " + entryRouterStepBo +
|
||||
", copiedFromRouterBo = " + copiedFromRouterBo +
|
||||
", revision = " + revision +
|
||||
", currentRevision = " + currentRevision +
|
||||
", hasBeenReleased = " + hasBeenReleased +
|
||||
", effStartDate = " + effStartDate +
|
||||
", effEndDate = " + effEndDate +
|
||||
", createdDateTime = " + createdDateTime +
|
||||
", modifiedDateTime = " + modifiedDateTime +
|
||||
", guiRepresentation = " + guiRepresentation +
|
||||
", originalStatusBo = " + originalStatusBo +
|
||||
", dispositionGroupBo = " + dispositionGroupBo +
|
||||
", prevSite = " + prevSite +
|
||||
", originalTransferKey = " + originalTransferKey +
|
||||
", displayType = " + displayType +
|
||||
", holdId = " + holdId +
|
||||
", sendAsShared = " + sendAsShared +
|
||||
", sentToErp = " + sentToErp +
|
||||
", erpChangeNumber = " + erpChangeNumber +
|
||||
", relaxedFlow = " + relaxedFlow +
|
||||
", bomBo = " + bomBo +
|
||||
", origin = " + origin +
|
||||
"}";
|
||||
}
|
||||
}
|
@ -0,0 +1,415 @@
|
||||
package com.foreverwin.mesnac.meapi.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author Leon.L
|
||||
* @since 2021-06-02
|
||||
*/
|
||||
|
||||
@TableName("SFC")
|
||||
public class Sfc extends Model<Sfc> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId("HANDLE")
|
||||
private String handle;
|
||||
@TableField("CHANGE_STAMP")
|
||||
private Long changeStamp;
|
||||
@TableField("SITE")
|
||||
private String site;
|
||||
@TableField("SFC")
|
||||
private String sfc;
|
||||
@TableField("STATUS_BO")
|
||||
private String statusBo;
|
||||
@TableField("SHOP_ORDER_BO")
|
||||
private String shopOrderBo;
|
||||
@TableField("QTY")
|
||||
private Double qty;
|
||||
@TableField("QTY_DONE")
|
||||
private Double qtyDone;
|
||||
@TableField("QTY_SCRAPPED")
|
||||
private Double qtyScrapped;
|
||||
@TableField("QTY_HISTORICAL_MIN")
|
||||
private Double qtyHistoricalMin;
|
||||
@TableField("QTY_HISTORICAL_MAX")
|
||||
private Double qtyHistoricalMax;
|
||||
@TableField("ITEM_BO")
|
||||
private String itemBo;
|
||||
@TableField("PRIORITY")
|
||||
private Long priority;
|
||||
@TableField("LOCATION")
|
||||
private String location;
|
||||
@TableField("RMA_MAX_TIMES_PROCESSED")
|
||||
private Long rmaMaxTimesProcessed;
|
||||
@TableField("LCC_BO")
|
||||
private String lccBo;
|
||||
@TableField("ORIGINAL_STATUS_BO")
|
||||
private String originalStatusBo;
|
||||
@TableField("QTY_MULT_PERFORMED")
|
||||
private String qtyMultPerformed;
|
||||
@TableField("ACTUAL_COMP_DATE")
|
||||
private LocalDateTime actualCompDate;
|
||||
@TableField("PREV_SITE")
|
||||
private String prevSite;
|
||||
@TableField("ORIGINAL_TRANSFER_KEY")
|
||||
private String originalTransferKey;
|
||||
@TableField("IMMEDIATE_ARCHIVE")
|
||||
private String immediateArchive;
|
||||
@TableField("TRANSFER_DATETIME")
|
||||
private LocalDateTime transferDatetime;
|
||||
@TableField("TRANSFER_USER")
|
||||
private String transferUser;
|
||||
@TableField("SN_DONE")
|
||||
private String snDone;
|
||||
@TableField("AIN_EQUIPMENT_ID")
|
||||
private String ainEquipmentId;
|
||||
@TableField("CREATED_DATE_TIME")
|
||||
private LocalDateTime createdDateTime;
|
||||
@TableField("MODIFIED_DATE_TIME")
|
||||
private LocalDateTime modifiedDateTime;
|
||||
@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 getSite() {
|
||||
return site;
|
||||
}
|
||||
|
||||
public void setSite(String site) {
|
||||
this.site = site;
|
||||
}
|
||||
|
||||
public String getSfc() {
|
||||
return sfc;
|
||||
}
|
||||
|
||||
public void setSfc(String sfc) {
|
||||
this.sfc = sfc;
|
||||
}
|
||||
|
||||
public String getStatusBo() {
|
||||
return statusBo;
|
||||
}
|
||||
|
||||
public void setStatusBo(String statusBo) {
|
||||
this.statusBo = statusBo;
|
||||
}
|
||||
|
||||
public String getShopOrderBo() {
|
||||
return shopOrderBo;
|
||||
}
|
||||
|
||||
public void setShopOrderBo(String shopOrderBo) {
|
||||
this.shopOrderBo = shopOrderBo;
|
||||
}
|
||||
|
||||
public Double getQty() {
|
||||
return qty;
|
||||
}
|
||||
|
||||
public void setQty(Double qty) {
|
||||
this.qty = qty;
|
||||
}
|
||||
|
||||
public Double getQtyDone() {
|
||||
return qtyDone;
|
||||
}
|
||||
|
||||
public void setQtyDone(Double qtyDone) {
|
||||
this.qtyDone = qtyDone;
|
||||
}
|
||||
|
||||
public Double getQtyScrapped() {
|
||||
return qtyScrapped;
|
||||
}
|
||||
|
||||
public void setQtyScrapped(Double qtyScrapped) {
|
||||
this.qtyScrapped = qtyScrapped;
|
||||
}
|
||||
|
||||
public Double getQtyHistoricalMin() {
|
||||
return qtyHistoricalMin;
|
||||
}
|
||||
|
||||
public void setQtyHistoricalMin(Double qtyHistoricalMin) {
|
||||
this.qtyHistoricalMin = qtyHistoricalMin;
|
||||
}
|
||||
|
||||
public Double getQtyHistoricalMax() {
|
||||
return qtyHistoricalMax;
|
||||
}
|
||||
|
||||
public void setQtyHistoricalMax(Double qtyHistoricalMax) {
|
||||
this.qtyHistoricalMax = qtyHistoricalMax;
|
||||
}
|
||||
|
||||
public String getItemBo() {
|
||||
return itemBo;
|
||||
}
|
||||
|
||||
public void setItemBo(String itemBo) {
|
||||
this.itemBo = itemBo;
|
||||
}
|
||||
|
||||
public Long getPriority() {
|
||||
return priority;
|
||||
}
|
||||
|
||||
public void setPriority(Long priority) {
|
||||
this.priority = priority;
|
||||
}
|
||||
|
||||
public String getLocation() {
|
||||
return location;
|
||||
}
|
||||
|
||||
public void setLocation(String location) {
|
||||
this.location = location;
|
||||
}
|
||||
|
||||
public Long getRmaMaxTimesProcessed() {
|
||||
return rmaMaxTimesProcessed;
|
||||
}
|
||||
|
||||
public void setRmaMaxTimesProcessed(Long rmaMaxTimesProcessed) {
|
||||
this.rmaMaxTimesProcessed = rmaMaxTimesProcessed;
|
||||
}
|
||||
|
||||
public String getLccBo() {
|
||||
return lccBo;
|
||||
}
|
||||
|
||||
public void setLccBo(String lccBo) {
|
||||
this.lccBo = lccBo;
|
||||
}
|
||||
|
||||
public String getOriginalStatusBo() {
|
||||
return originalStatusBo;
|
||||
}
|
||||
|
||||
public void setOriginalStatusBo(String originalStatusBo) {
|
||||
this.originalStatusBo = originalStatusBo;
|
||||
}
|
||||
|
||||
public String getQtyMultPerformed() {
|
||||
return qtyMultPerformed;
|
||||
}
|
||||
|
||||
public void setQtyMultPerformed(String qtyMultPerformed) {
|
||||
this.qtyMultPerformed = qtyMultPerformed;
|
||||
}
|
||||
|
||||
public LocalDateTime getActualCompDate() {
|
||||
return actualCompDate;
|
||||
}
|
||||
|
||||
public void setActualCompDate(LocalDateTime actualCompDate) {
|
||||
this.actualCompDate = actualCompDate;
|
||||
}
|
||||
|
||||
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 getImmediateArchive() {
|
||||
return immediateArchive;
|
||||
}
|
||||
|
||||
public void setImmediateArchive(String immediateArchive) {
|
||||
this.immediateArchive = immediateArchive;
|
||||
}
|
||||
|
||||
public LocalDateTime getTransferDatetime() {
|
||||
return transferDatetime;
|
||||
}
|
||||
|
||||
public void setTransferDatetime(LocalDateTime transferDatetime) {
|
||||
this.transferDatetime = transferDatetime;
|
||||
}
|
||||
|
||||
public String getTransferUser() {
|
||||
return transferUser;
|
||||
}
|
||||
|
||||
public void setTransferUser(String transferUser) {
|
||||
this.transferUser = transferUser;
|
||||
}
|
||||
|
||||
public String getSnDone() {
|
||||
return snDone;
|
||||
}
|
||||
|
||||
public void setSnDone(String snDone) {
|
||||
this.snDone = snDone;
|
||||
}
|
||||
|
||||
public String getAinEquipmentId() {
|
||||
return ainEquipmentId;
|
||||
}
|
||||
|
||||
public void setAinEquipmentId(String ainEquipmentId) {
|
||||
this.ainEquipmentId = ainEquipmentId;
|
||||
}
|
||||
|
||||
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 static final String HANDLE = "HANDLE";
|
||||
|
||||
public static final String CHANGE_STAMP = "CHANGE_STAMP";
|
||||
|
||||
public static final String SITE = "SITE";
|
||||
|
||||
public static final String SFC = "SFC";
|
||||
|
||||
public static final String STATUS_BO = "STATUS_BO";
|
||||
|
||||
public static final String SHOP_ORDER_BO = "SHOP_ORDER_BO";
|
||||
|
||||
public static final String QTY = "QTY";
|
||||
|
||||
public static final String QTY_DONE = "QTY_DONE";
|
||||
|
||||
public static final String QTY_SCRAPPED = "QTY_SCRAPPED";
|
||||
|
||||
public static final String QTY_HISTORICAL_MIN = "QTY_HISTORICAL_MIN";
|
||||
|
||||
public static final String QTY_HISTORICAL_MAX = "QTY_HISTORICAL_MAX";
|
||||
|
||||
public static final String ITEM_BO = "ITEM_BO";
|
||||
|
||||
public static final String PRIORITY = "PRIORITY";
|
||||
|
||||
public static final String LOCATION = "LOCATION";
|
||||
|
||||
public static final String RMA_MAX_TIMES_PROCESSED = "RMA_MAX_TIMES_PROCESSED";
|
||||
|
||||
public static final String LCC_BO = "LCC_BO";
|
||||
|
||||
public static final String ORIGINAL_STATUS_BO = "ORIGINAL_STATUS_BO";
|
||||
|
||||
public static final String QTY_MULT_PERFORMED = "QTY_MULT_PERFORMED";
|
||||
|
||||
public static final String ACTUAL_COMP_DATE = "ACTUAL_COMP_DATE";
|
||||
|
||||
public static final String PREV_SITE = "PREV_SITE";
|
||||
|
||||
public static final String ORIGINAL_TRANSFER_KEY = "ORIGINAL_TRANSFER_KEY";
|
||||
|
||||
public static final String IMMEDIATE_ARCHIVE = "IMMEDIATE_ARCHIVE";
|
||||
|
||||
public static final String TRANSFER_DATETIME = "TRANSFER_DATETIME";
|
||||
|
||||
public static final String TRANSFER_USER = "TRANSFER_USER";
|
||||
|
||||
public static final String SN_DONE = "SN_DONE";
|
||||
|
||||
public static final String AIN_EQUIPMENT_ID = "AIN_EQUIPMENT_ID";
|
||||
|
||||
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";
|
||||
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.handle;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Sfc{" +
|
||||
"handle = " + handle +
|
||||
", changeStamp = " + changeStamp +
|
||||
", site = " + site +
|
||||
", sfc = " + sfc +
|
||||
", statusBo = " + statusBo +
|
||||
", shopOrderBo = " + shopOrderBo +
|
||||
", qty = " + qty +
|
||||
", qtyDone = " + qtyDone +
|
||||
", qtyScrapped = " + qtyScrapped +
|
||||
", qtyHistoricalMin = " + qtyHistoricalMin +
|
||||
", qtyHistoricalMax = " + qtyHistoricalMax +
|
||||
", itemBo = " + itemBo +
|
||||
", priority = " + priority +
|
||||
", location = " + location +
|
||||
", rmaMaxTimesProcessed = " + rmaMaxTimesProcessed +
|
||||
", lccBo = " + lccBo +
|
||||
", originalStatusBo = " + originalStatusBo +
|
||||
", qtyMultPerformed = " + qtyMultPerformed +
|
||||
", actualCompDate = " + actualCompDate +
|
||||
", prevSite = " + prevSite +
|
||||
", originalTransferKey = " + originalTransferKey +
|
||||
", immediateArchive = " + immediateArchive +
|
||||
", transferDatetime = " + transferDatetime +
|
||||
", transferUser = " + transferUser +
|
||||
", snDone = " + snDone +
|
||||
", ainEquipmentId = " + ainEquipmentId +
|
||||
", createdDateTime = " + createdDateTime +
|
||||
", modifiedDateTime = " + modifiedDateTime +
|
||||
", partitionDate = " + partitionDate +
|
||||
"}";
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.foreverwin.mesnac.meapi.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.foreverwin.mesnac.meapi.model.Router;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.foreverwin.modular.core.util.FrontPage;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author Leon.L
|
||||
* @since 2021-06-02
|
||||
*/
|
||||
public interface RouterService extends IService<Router> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param frontPage
|
||||
* @return
|
||||
*/
|
||||
IPage<Router> selectPage(FrontPage<Router> frontPage, Router router);
|
||||
|
||||
List<Router> selectList(Router router);
|
||||
|
||||
Router getRouterBySfcBo(String sfcBo);
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.foreverwin.mesnac.meapi.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.foreverwin.mesnac.meapi.model.Sfc;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.foreverwin.modular.core.util.FrontPage;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author Leon.L
|
||||
* @since 2021-06-02
|
||||
*/
|
||||
public interface SfcService extends IService<Sfc> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param frontPage
|
||||
* @return
|
||||
*/
|
||||
IPage<Sfc> selectPage(FrontPage<Sfc> frontPage, Sfc sfc);
|
||||
|
||||
List<Sfc> selectList(Sfc sfc);
|
||||
|
||||
/**
|
||||
* 查询工单下生产批次
|
||||
*/
|
||||
List<Sfc> getSfcListByShopOrderBo(String shopOrderBo);
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
package com.foreverwin.mesnac.meapi.service.impl;
|
||||
|
||||
import com.foreverwin.modular.core.util.FrontPage;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.foreverwin.mesnac.meapi.model.Router;
|
||||
import com.foreverwin.mesnac.meapi.mapper.RouterMapper;
|
||||
import com.foreverwin.mesnac.meapi.service.RouterService;
|
||||
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 Leon.L
|
||||
* @since 2021-06-02
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class RouterServiceImpl extends ServiceImpl<RouterMapper, Router> implements RouterService {
|
||||
|
||||
|
||||
@Autowired
|
||||
private RouterMapper routerMapper;
|
||||
|
||||
@Override
|
||||
public IPage<Router> selectPage(FrontPage<Router> frontPage, Router router) {
|
||||
QueryWrapper<Router> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(router);
|
||||
return super.page(frontPage.getPagePlus(), queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Router> selectList(Router router) {
|
||||
QueryWrapper<Router> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(router);
|
||||
return super.list(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Router getRouterBySfcBo(String sfcBo) {
|
||||
return routerMapper.selectRouterBySfcBo(sfcBo);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
package com.foreverwin.mesnac.meapi.service.impl;
|
||||
|
||||
import com.foreverwin.modular.core.util.FrontPage;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.foreverwin.mesnac.meapi.model.Sfc;
|
||||
import com.foreverwin.mesnac.meapi.mapper.SfcMapper;
|
||||
import com.foreverwin.mesnac.meapi.service.SfcService;
|
||||
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 Leon.L
|
||||
* @since 2021-06-02
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class SfcServiceImpl extends ServiceImpl<SfcMapper, Sfc> implements SfcService {
|
||||
|
||||
|
||||
@Autowired
|
||||
private SfcMapper sfcMapper;
|
||||
|
||||
@Override
|
||||
public IPage<Sfc> selectPage(FrontPage<Sfc> frontPage, Sfc sfc) {
|
||||
QueryWrapper<Sfc> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(sfc);
|
||||
return super.page(frontPage.getPagePlus(), queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Sfc> selectList(Sfc sfc) {
|
||||
QueryWrapper<Sfc> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(sfc);
|
||||
return super.list(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Sfc> getSfcListByShopOrderBo(String shopOrderBo) {
|
||||
QueryWrapper<Sfc> queryWrapper = new QueryWrapper<>();
|
||||
Sfc sfc = new Sfc();
|
||||
sfc.setShopOrderBo(shopOrderBo);
|
||||
queryWrapper.setEntity(sfc);
|
||||
return super.list(queryWrapper);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,648 @@
|
||||
<?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.RouterMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.foreverwin.mesnac.meapi.model.Router">
|
||||
<result column="HANDLE" property="handle" />
|
||||
<result column="CHANGE_STAMP" property="changeStamp" />
|
||||
<result column="SITE" property="site" />
|
||||
<result column="ROUTER" property="router" />
|
||||
<result column="ROUTER_TYPE" property="routerType" />
|
||||
<result column="DESCRIPTION" property="description" />
|
||||
<result column="TEMPORARY_ROUTER" property="temporaryRouter" />
|
||||
<result column="STATUS_BO" property="statusBo" />
|
||||
<result column="ENTRY_ROUTER_STEP_BO" property="entryRouterStepBo" />
|
||||
<result column="COPIED_FROM_ROUTER_BO" property="copiedFromRouterBo" />
|
||||
<result column="REVISION" property="revision" />
|
||||
<result column="CURRENT_REVISION" property="currentRevision" />
|
||||
<result column="HAS_BEEN_RELEASED" property="hasBeenReleased" />
|
||||
<result column="EFF_START_DATE" property="effStartDate" />
|
||||
<result column="EFF_END_DATE" property="effEndDate" />
|
||||
<result column="CREATED_DATE_TIME" property="createdDateTime" />
|
||||
<result column="MODIFIED_DATE_TIME" property="modifiedDateTime" />
|
||||
<result column="GUI_REPRESENTATION" property="guiRepresentation" />
|
||||
<result column="ORIGINAL_STATUS_BO" property="originalStatusBo" />
|
||||
<result column="DISPOSITION_GROUP_BO" property="dispositionGroupBo" />
|
||||
<result column="PREV_SITE" property="prevSite" />
|
||||
<result column="ORIGINAL_TRANSFER_KEY" property="originalTransferKey" />
|
||||
<result column="DISPLAY_TYPE" property="displayType" />
|
||||
<result column="HOLD_ID" property="holdId" />
|
||||
<result column="SEND_AS_SHARED" property="sendAsShared" />
|
||||
<result column="SENT_TO_ERP" property="sentToErp" />
|
||||
<result column="ERP_CHANGE_NUMBER" property="erpChangeNumber" />
|
||||
<result column="RELAXED_FLOW" property="relaxedFlow" />
|
||||
<result column="BOM_BO" property="bomBo" />
|
||||
<result column="ORIGIN" property="origin" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
HANDLE, CHANGE_STAMP, SITE, ROUTER, ROUTER_TYPE, DESCRIPTION, TEMPORARY_ROUTER, STATUS_BO, ENTRY_ROUTER_STEP_BO, COPIED_FROM_ROUTER_BO, REVISION, CURRENT_REVISION, HAS_BEEN_RELEASED, EFF_START_DATE, EFF_END_DATE, CREATED_DATE_TIME, MODIFIED_DATE_TIME, GUI_REPRESENTATION, ORIGINAL_STATUS_BO, DISPOSITION_GROUP_BO, PREV_SITE, ORIGINAL_TRANSFER_KEY, DISPLAY_TYPE, HOLD_ID, SEND_AS_SHARED, SENT_TO_ERP, ERP_CHANGE_NUMBER, RELAXED_FLOW, BOM_BO, ORIGIN
|
||||
</sql>
|
||||
|
||||
<!-- BaseMapper标准查询/修改/删除 -->
|
||||
|
||||
<select id="selectByMap" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"></include>
|
||||
FROM ROUTER
|
||||
<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 ROUTER
|
||||
<where>
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.handle}
|
||||
</if>
|
||||
<if test="ew.entity.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
|
||||
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||||
<if test="ew.entity.router!=null"> AND ROUTER=#{ew.entity.router}</if>
|
||||
<if test="ew.entity.routerType!=null"> AND ROUTER_TYPE=#{ew.entity.routerType}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.temporaryRouter!=null"> AND TEMPORARY_ROUTER=#{ew.entity.temporaryRouter}</if>
|
||||
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
|
||||
<if test="ew.entity.entryRouterStepBo!=null"> AND ENTRY_ROUTER_STEP_BO=#{ew.entity.entryRouterStepBo}</if>
|
||||
<if test="ew.entity.copiedFromRouterBo!=null"> AND COPIED_FROM_ROUTER_BO=#{ew.entity.copiedFromRouterBo}</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.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.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.guiRepresentation!=null"> AND GUI_REPRESENTATION=#{ew.entity.guiRepresentation}</if>
|
||||
<if test="ew.entity.originalStatusBo!=null"> AND ORIGINAL_STATUS_BO=#{ew.entity.originalStatusBo}</if>
|
||||
<if test="ew.entity.dispositionGroupBo!=null"> AND DISPOSITION_GROUP_BO=#{ew.entity.dispositionGroupBo}</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.displayType!=null"> AND DISPLAY_TYPE=#{ew.entity.displayType}</if>
|
||||
<if test="ew.entity.holdId!=null"> AND HOLD_ID=#{ew.entity.holdId}</if>
|
||||
<if test="ew.entity.sendAsShared!=null"> AND SEND_AS_SHARED=#{ew.entity.sendAsShared}</if>
|
||||
<if test="ew.entity.sentToErp!=null"> AND SENT_TO_ERP=#{ew.entity.sentToErp}</if>
|
||||
<if test="ew.entity.erpChangeNumber!=null"> AND ERP_CHANGE_NUMBER=#{ew.entity.erpChangeNumber}</if>
|
||||
<if test="ew.entity.relaxedFlow!=null"> AND RELAXED_FLOW=#{ew.entity.relaxedFlow}</if>
|
||||
<if test="ew.entity.bomBo!=null"> AND BOM_BO=#{ew.entity.bomBo}</if>
|
||||
<if test="ew.entity.origin!=null"> AND ORIGIN=#{ew.entity.origin}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCount" resultType="Integer">
|
||||
SELECT COUNT(1) FROM ROUTER
|
||||
<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.router!=null"> AND ROUTER=#{ew.entity.router}</if>
|
||||
<if test="ew.entity.routerType!=null"> AND ROUTER_TYPE=#{ew.entity.routerType}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.temporaryRouter!=null"> AND TEMPORARY_ROUTER=#{ew.entity.temporaryRouter}</if>
|
||||
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
|
||||
<if test="ew.entity.entryRouterStepBo!=null"> AND ENTRY_ROUTER_STEP_BO=#{ew.entity.entryRouterStepBo}</if>
|
||||
<if test="ew.entity.copiedFromRouterBo!=null"> AND COPIED_FROM_ROUTER_BO=#{ew.entity.copiedFromRouterBo}</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.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.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.guiRepresentation!=null"> AND GUI_REPRESENTATION=#{ew.entity.guiRepresentation}</if>
|
||||
<if test="ew.entity.originalStatusBo!=null"> AND ORIGINAL_STATUS_BO=#{ew.entity.originalStatusBo}</if>
|
||||
<if test="ew.entity.dispositionGroupBo!=null"> AND DISPOSITION_GROUP_BO=#{ew.entity.dispositionGroupBo}</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.displayType!=null"> AND DISPLAY_TYPE=#{ew.entity.displayType}</if>
|
||||
<if test="ew.entity.holdId!=null"> AND HOLD_ID=#{ew.entity.holdId}</if>
|
||||
<if test="ew.entity.sendAsShared!=null"> AND SEND_AS_SHARED=#{ew.entity.sendAsShared}</if>
|
||||
<if test="ew.entity.sentToErp!=null"> AND SENT_TO_ERP=#{ew.entity.sentToErp}</if>
|
||||
<if test="ew.entity.erpChangeNumber!=null"> AND ERP_CHANGE_NUMBER=#{ew.entity.erpChangeNumber}</if>
|
||||
<if test="ew.entity.relaxedFlow!=null"> AND RELAXED_FLOW=#{ew.entity.relaxedFlow}</if>
|
||||
<if test="ew.entity.bomBo!=null"> AND BOM_BO=#{ew.entity.bomBo}</if>
|
||||
<if test="ew.entity.origin!=null"> AND ORIGIN=#{ew.entity.origin}</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 ROUTER
|
||||
<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.router!=null"> AND ROUTER=#{ew.entity.router}</if>
|
||||
<if test="ew.entity.routerType!=null"> AND ROUTER_TYPE=#{ew.entity.routerType}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.temporaryRouter!=null"> AND TEMPORARY_ROUTER=#{ew.entity.temporaryRouter}</if>
|
||||
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
|
||||
<if test="ew.entity.entryRouterStepBo!=null"> AND ENTRY_ROUTER_STEP_BO=#{ew.entity.entryRouterStepBo}</if>
|
||||
<if test="ew.entity.copiedFromRouterBo!=null"> AND COPIED_FROM_ROUTER_BO=#{ew.entity.copiedFromRouterBo}</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.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.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.guiRepresentation!=null"> AND GUI_REPRESENTATION=#{ew.entity.guiRepresentation}</if>
|
||||
<if test="ew.entity.originalStatusBo!=null"> AND ORIGINAL_STATUS_BO=#{ew.entity.originalStatusBo}</if>
|
||||
<if test="ew.entity.dispositionGroupBo!=null"> AND DISPOSITION_GROUP_BO=#{ew.entity.dispositionGroupBo}</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.displayType!=null"> AND DISPLAY_TYPE=#{ew.entity.displayType}</if>
|
||||
<if test="ew.entity.holdId!=null"> AND HOLD_ID=#{ew.entity.holdId}</if>
|
||||
<if test="ew.entity.sendAsShared!=null"> AND SEND_AS_SHARED=#{ew.entity.sendAsShared}</if>
|
||||
<if test="ew.entity.sentToErp!=null"> AND SENT_TO_ERP=#{ew.entity.sentToErp}</if>
|
||||
<if test="ew.entity.erpChangeNumber!=null"> AND ERP_CHANGE_NUMBER=#{ew.entity.erpChangeNumber}</if>
|
||||
<if test="ew.entity.relaxedFlow!=null"> AND RELAXED_FLOW=#{ew.entity.relaxedFlow}</if>
|
||||
<if test="ew.entity.bomBo!=null"> AND BOM_BO=#{ew.entity.bomBo}</if>
|
||||
<if test="ew.entity.origin!=null"> AND ORIGIN=#{ew.entity.origin}</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 ROUTER
|
||||
<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.router!=null"> AND ROUTER=#{ew.entity.router}</if>
|
||||
<if test="ew.entity.routerType!=null"> AND ROUTER_TYPE=#{ew.entity.routerType}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.temporaryRouter!=null"> AND TEMPORARY_ROUTER=#{ew.entity.temporaryRouter}</if>
|
||||
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
|
||||
<if test="ew.entity.entryRouterStepBo!=null"> AND ENTRY_ROUTER_STEP_BO=#{ew.entity.entryRouterStepBo}</if>
|
||||
<if test="ew.entity.copiedFromRouterBo!=null"> AND COPIED_FROM_ROUTER_BO=#{ew.entity.copiedFromRouterBo}</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.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.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.guiRepresentation!=null"> AND GUI_REPRESENTATION=#{ew.entity.guiRepresentation}</if>
|
||||
<if test="ew.entity.originalStatusBo!=null"> AND ORIGINAL_STATUS_BO=#{ew.entity.originalStatusBo}</if>
|
||||
<if test="ew.entity.dispositionGroupBo!=null"> AND DISPOSITION_GROUP_BO=#{ew.entity.dispositionGroupBo}</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.displayType!=null"> AND DISPLAY_TYPE=#{ew.entity.displayType}</if>
|
||||
<if test="ew.entity.holdId!=null"> AND HOLD_ID=#{ew.entity.holdId}</if>
|
||||
<if test="ew.entity.sendAsShared!=null"> AND SEND_AS_SHARED=#{ew.entity.sendAsShared}</if>
|
||||
<if test="ew.entity.sentToErp!=null"> AND SENT_TO_ERP=#{ew.entity.sentToErp}</if>
|
||||
<if test="ew.entity.erpChangeNumber!=null"> AND ERP_CHANGE_NUMBER=#{ew.entity.erpChangeNumber}</if>
|
||||
<if test="ew.entity.relaxedFlow!=null"> AND RELAXED_FLOW=#{ew.entity.relaxedFlow}</if>
|
||||
<if test="ew.entity.bomBo!=null"> AND BOM_BO=#{ew.entity.bomBo}</if>
|
||||
<if test="ew.entity.origin!=null"> AND ORIGIN=#{ew.entity.origin}</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 ROUTER
|
||||
<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.router!=null"> AND ROUTER=#{ew.entity.router}</if>
|
||||
<if test="ew.entity.routerType!=null"> AND ROUTER_TYPE=#{ew.entity.routerType}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.temporaryRouter!=null"> AND TEMPORARY_ROUTER=#{ew.entity.temporaryRouter}</if>
|
||||
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
|
||||
<if test="ew.entity.entryRouterStepBo!=null"> AND ENTRY_ROUTER_STEP_BO=#{ew.entity.entryRouterStepBo}</if>
|
||||
<if test="ew.entity.copiedFromRouterBo!=null"> AND COPIED_FROM_ROUTER_BO=#{ew.entity.copiedFromRouterBo}</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.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.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.guiRepresentation!=null"> AND GUI_REPRESENTATION=#{ew.entity.guiRepresentation}</if>
|
||||
<if test="ew.entity.originalStatusBo!=null"> AND ORIGINAL_STATUS_BO=#{ew.entity.originalStatusBo}</if>
|
||||
<if test="ew.entity.dispositionGroupBo!=null"> AND DISPOSITION_GROUP_BO=#{ew.entity.dispositionGroupBo}</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.displayType!=null"> AND DISPLAY_TYPE=#{ew.entity.displayType}</if>
|
||||
<if test="ew.entity.holdId!=null"> AND HOLD_ID=#{ew.entity.holdId}</if>
|
||||
<if test="ew.entity.sendAsShared!=null"> AND SEND_AS_SHARED=#{ew.entity.sendAsShared}</if>
|
||||
<if test="ew.entity.sentToErp!=null"> AND SENT_TO_ERP=#{ew.entity.sentToErp}</if>
|
||||
<if test="ew.entity.erpChangeNumber!=null"> AND ERP_CHANGE_NUMBER=#{ew.entity.erpChangeNumber}</if>
|
||||
<if test="ew.entity.relaxedFlow!=null"> AND RELAXED_FLOW=#{ew.entity.relaxedFlow}</if>
|
||||
<if test="ew.entity.bomBo!=null"> AND BOM_BO=#{ew.entity.bomBo}</if>
|
||||
<if test="ew.entity.origin!=null"> AND ORIGIN=#{ew.entity.origin}</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 ROUTER
|
||||
<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.router!=null"> AND ROUTER=#{ew.entity.router}</if>
|
||||
<if test="ew.entity.routerType!=null"> AND ROUTER_TYPE=#{ew.entity.routerType}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.temporaryRouter!=null"> AND TEMPORARY_ROUTER=#{ew.entity.temporaryRouter}</if>
|
||||
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
|
||||
<if test="ew.entity.entryRouterStepBo!=null"> AND ENTRY_ROUTER_STEP_BO=#{ew.entity.entryRouterStepBo}</if>
|
||||
<if test="ew.entity.copiedFromRouterBo!=null"> AND COPIED_FROM_ROUTER_BO=#{ew.entity.copiedFromRouterBo}</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.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.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.guiRepresentation!=null"> AND GUI_REPRESENTATION=#{ew.entity.guiRepresentation}</if>
|
||||
<if test="ew.entity.originalStatusBo!=null"> AND ORIGINAL_STATUS_BO=#{ew.entity.originalStatusBo}</if>
|
||||
<if test="ew.entity.dispositionGroupBo!=null"> AND DISPOSITION_GROUP_BO=#{ew.entity.dispositionGroupBo}</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.displayType!=null"> AND DISPLAY_TYPE=#{ew.entity.displayType}</if>
|
||||
<if test="ew.entity.holdId!=null"> AND HOLD_ID=#{ew.entity.holdId}</if>
|
||||
<if test="ew.entity.sendAsShared!=null"> AND SEND_AS_SHARED=#{ew.entity.sendAsShared}</if>
|
||||
<if test="ew.entity.sentToErp!=null"> AND SENT_TO_ERP=#{ew.entity.sentToErp}</if>
|
||||
<if test="ew.entity.erpChangeNumber!=null"> AND ERP_CHANGE_NUMBER=#{ew.entity.erpChangeNumber}</if>
|
||||
<if test="ew.entity.relaxedFlow!=null"> AND RELAXED_FLOW=#{ew.entity.relaxedFlow}</if>
|
||||
<if test="ew.entity.bomBo!=null"> AND BOM_BO=#{ew.entity.bomBo}</if>
|
||||
<if test="ew.entity.origin!=null"> AND ORIGIN=#{ew.entity.origin}</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 ROUTER
|
||||
<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.router!=null"> AND ROUTER=#{ew.entity.router}</if>
|
||||
<if test="ew.entity.routerType!=null"> AND ROUTER_TYPE=#{ew.entity.routerType}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.temporaryRouter!=null"> AND TEMPORARY_ROUTER=#{ew.entity.temporaryRouter}</if>
|
||||
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
|
||||
<if test="ew.entity.entryRouterStepBo!=null"> AND ENTRY_ROUTER_STEP_BO=#{ew.entity.entryRouterStepBo}</if>
|
||||
<if test="ew.entity.copiedFromRouterBo!=null"> AND COPIED_FROM_ROUTER_BO=#{ew.entity.copiedFromRouterBo}</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.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.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.guiRepresentation!=null"> AND GUI_REPRESENTATION=#{ew.entity.guiRepresentation}</if>
|
||||
<if test="ew.entity.originalStatusBo!=null"> AND ORIGINAL_STATUS_BO=#{ew.entity.originalStatusBo}</if>
|
||||
<if test="ew.entity.dispositionGroupBo!=null"> AND DISPOSITION_GROUP_BO=#{ew.entity.dispositionGroupBo}</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.displayType!=null"> AND DISPLAY_TYPE=#{ew.entity.displayType}</if>
|
||||
<if test="ew.entity.holdId!=null"> AND HOLD_ID=#{ew.entity.holdId}</if>
|
||||
<if test="ew.entity.sendAsShared!=null"> AND SEND_AS_SHARED=#{ew.entity.sendAsShared}</if>
|
||||
<if test="ew.entity.sentToErp!=null"> AND SENT_TO_ERP=#{ew.entity.sentToErp}</if>
|
||||
<if test="ew.entity.erpChangeNumber!=null"> AND ERP_CHANGE_NUMBER=#{ew.entity.erpChangeNumber}</if>
|
||||
<if test="ew.entity.relaxedFlow!=null"> AND RELAXED_FLOW=#{ew.entity.relaxedFlow}</if>
|
||||
<if test="ew.entity.bomBo!=null"> AND BOM_BO=#{ew.entity.bomBo}</if>
|
||||
<if test="ew.entity.origin!=null"> AND ORIGIN=#{ew.entity.origin}</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.Router">
|
||||
INSERT INTO ROUTER
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
HANDLE,
|
||||
<if test="changeStamp!=null">CHANGE_STAMP,</if>
|
||||
<if test="site!=null">SITE,</if>
|
||||
<if test="router!=null">ROUTER,</if>
|
||||
<if test="routerType!=null">ROUTER_TYPE,</if>
|
||||
<if test="description!=null">DESCRIPTION,</if>
|
||||
<if test="temporaryRouter!=null">TEMPORARY_ROUTER,</if>
|
||||
<if test="statusBo!=null">STATUS_BO,</if>
|
||||
<if test="entryRouterStepBo!=null">ENTRY_ROUTER_STEP_BO,</if>
|
||||
<if test="copiedFromRouterBo!=null">COPIED_FROM_ROUTER_BO,</if>
|
||||
<if test="revision!=null">REVISION,</if>
|
||||
<if test="currentRevision!=null">CURRENT_REVISION,</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="createdDateTime!=null">CREATED_DATE_TIME,</if>
|
||||
<if test="modifiedDateTime!=null">MODIFIED_DATE_TIME,</if>
|
||||
<if test="guiRepresentation!=null">GUI_REPRESENTATION,</if>
|
||||
<if test="originalStatusBo!=null">ORIGINAL_STATUS_BO,</if>
|
||||
<if test="dispositionGroupBo!=null">DISPOSITION_GROUP_BO,</if>
|
||||
<if test="prevSite!=null">PREV_SITE,</if>
|
||||
<if test="originalTransferKey!=null">ORIGINAL_TRANSFER_KEY,</if>
|
||||
<if test="displayType!=null">DISPLAY_TYPE,</if>
|
||||
<if test="holdId!=null">HOLD_ID,</if>
|
||||
<if test="sendAsShared!=null">SEND_AS_SHARED,</if>
|
||||
<if test="sentToErp!=null">SENT_TO_ERP,</if>
|
||||
<if test="erpChangeNumber!=null">ERP_CHANGE_NUMBER,</if>
|
||||
<if test="relaxedFlow!=null">RELAXED_FLOW,</if>
|
||||
<if test="bomBo!=null">BOM_BO,</if>
|
||||
<if test="origin!=null">ORIGIN,</if>
|
||||
</trim> VALUES
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
#{handle},
|
||||
<if test="changeStamp!=null">#{changeStamp},</if>
|
||||
<if test="site!=null">#{site},</if>
|
||||
<if test="router!=null">#{router},</if>
|
||||
<if test="routerType!=null">#{routerType},</if>
|
||||
<if test="description!=null">#{description},</if>
|
||||
<if test="temporaryRouter!=null">#{temporaryRouter},</if>
|
||||
<if test="statusBo!=null">#{statusBo},</if>
|
||||
<if test="entryRouterStepBo!=null">#{entryRouterStepBo},</if>
|
||||
<if test="copiedFromRouterBo!=null">#{copiedFromRouterBo},</if>
|
||||
<if test="revision!=null">#{revision},</if>
|
||||
<if test="currentRevision!=null">#{currentRevision},</if>
|
||||
<if test="hasBeenReleased!=null">#{hasBeenReleased},</if>
|
||||
<if test="effStartDate!=null">#{effStartDate},</if>
|
||||
<if test="effEndDate!=null">#{effEndDate},</if>
|
||||
<if test="createdDateTime!=null">#{createdDateTime},</if>
|
||||
<if test="modifiedDateTime!=null">#{modifiedDateTime},</if>
|
||||
<if test="guiRepresentation!=null">#{guiRepresentation},</if>
|
||||
<if test="originalStatusBo!=null">#{originalStatusBo},</if>
|
||||
<if test="dispositionGroupBo!=null">#{dispositionGroupBo},</if>
|
||||
<if test="prevSite!=null">#{prevSite},</if>
|
||||
<if test="originalTransferKey!=null">#{originalTransferKey},</if>
|
||||
<if test="displayType!=null">#{displayType},</if>
|
||||
<if test="holdId!=null">#{holdId},</if>
|
||||
<if test="sendAsShared!=null">#{sendAsShared},</if>
|
||||
<if test="sentToErp!=null">#{sentToErp},</if>
|
||||
<if test="erpChangeNumber!=null">#{erpChangeNumber},</if>
|
||||
<if test="relaxedFlow!=null">#{relaxedFlow},</if>
|
||||
<if test="bomBo!=null">#{bomBo},</if>
|
||||
<if test="origin!=null">#{origin},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<insert id="insertAllColumn" parameterType="com.foreverwin.mesnac.meapi.model.Router">
|
||||
INSERT INTO ROUTER
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<include refid="Base_Column_List"></include>
|
||||
</trim> VALUES
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
#{handle},
|
||||
#{changeStamp},
|
||||
#{site},
|
||||
#{router},
|
||||
#{routerType},
|
||||
#{description},
|
||||
#{temporaryRouter},
|
||||
#{statusBo},
|
||||
#{entryRouterStepBo},
|
||||
#{copiedFromRouterBo},
|
||||
#{revision},
|
||||
#{currentRevision},
|
||||
#{hasBeenReleased},
|
||||
#{effStartDate},
|
||||
#{effEndDate},
|
||||
#{createdDateTime},
|
||||
#{modifiedDateTime},
|
||||
#{guiRepresentation},
|
||||
#{originalStatusBo},
|
||||
#{dispositionGroupBo},
|
||||
#{prevSite},
|
||||
#{originalTransferKey},
|
||||
#{displayType},
|
||||
#{holdId},
|
||||
#{sendAsShared},
|
||||
#{sentToErp},
|
||||
#{erpChangeNumber},
|
||||
#{relaxedFlow},
|
||||
#{bomBo},
|
||||
#{origin},
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<update id="update">
|
||||
UPDATE ROUTER <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.router!=null">ROUTER=#{et.router},</if>
|
||||
<if test="et.routerType!=null">ROUTER_TYPE=#{et.routerType},</if>
|
||||
<if test="et.description!=null">DESCRIPTION=#{et.description},</if>
|
||||
<if test="et.temporaryRouter!=null">TEMPORARY_ROUTER=#{et.temporaryRouter},</if>
|
||||
<if test="et.statusBo!=null">STATUS_BO=#{et.statusBo},</if>
|
||||
<if test="et.entryRouterStepBo!=null">ENTRY_ROUTER_STEP_BO=#{et.entryRouterStepBo},</if>
|
||||
<if test="et.copiedFromRouterBo!=null">COPIED_FROM_ROUTER_BO=#{et.copiedFromRouterBo},</if>
|
||||
<if test="et.revision!=null">REVISION=#{et.revision},</if>
|
||||
<if test="et.currentRevision!=null">CURRENT_REVISION=#{et.currentRevision},</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.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
|
||||
<if test="et.modifiedDateTime!=null">MODIFIED_DATE_TIME=#{et.modifiedDateTime},</if>
|
||||
<if test="et.guiRepresentation!=null">GUI_REPRESENTATION=#{et.guiRepresentation},</if>
|
||||
<if test="et.originalStatusBo!=null">ORIGINAL_STATUS_BO=#{et.originalStatusBo},</if>
|
||||
<if test="et.dispositionGroupBo!=null">DISPOSITION_GROUP_BO=#{et.dispositionGroupBo},</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.displayType!=null">DISPLAY_TYPE=#{et.displayType},</if>
|
||||
<if test="et.holdId!=null">HOLD_ID=#{et.holdId},</if>
|
||||
<if test="et.sendAsShared!=null">SEND_AS_SHARED=#{et.sendAsShared},</if>
|
||||
<if test="et.sentToErp!=null">SENT_TO_ERP=#{et.sentToErp},</if>
|
||||
<if test="et.erpChangeNumber!=null">ERP_CHANGE_NUMBER=#{et.erpChangeNumber},</if>
|
||||
<if test="et.relaxedFlow!=null">RELAXED_FLOW=#{et.relaxedFlow},</if>
|
||||
<if test="et.bomBo!=null">BOM_BO=#{et.bomBo},</if>
|
||||
<if test="et.origin!=null">ORIGIN=#{et.origin},</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.router!=null"> AND ROUTER=#{ew.entity.router}</if>
|
||||
<if test="ew.entity.routerType!=null"> AND ROUTER_TYPE=#{ew.entity.routerType}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.temporaryRouter!=null"> AND TEMPORARY_ROUTER=#{ew.entity.temporaryRouter}</if>
|
||||
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
|
||||
<if test="ew.entity.entryRouterStepBo!=null"> AND ENTRY_ROUTER_STEP_BO=#{ew.entity.entryRouterStepBo}</if>
|
||||
<if test="ew.entity.copiedFromRouterBo!=null"> AND COPIED_FROM_ROUTER_BO=#{ew.entity.copiedFromRouterBo}</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.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.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.guiRepresentation!=null"> AND GUI_REPRESENTATION=#{ew.entity.guiRepresentation}</if>
|
||||
<if test="ew.entity.originalStatusBo!=null"> AND ORIGINAL_STATUS_BO=#{ew.entity.originalStatusBo}</if>
|
||||
<if test="ew.entity.dispositionGroupBo!=null"> AND DISPOSITION_GROUP_BO=#{ew.entity.dispositionGroupBo}</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.displayType!=null"> AND DISPLAY_TYPE=#{ew.entity.displayType}</if>
|
||||
<if test="ew.entity.holdId!=null"> AND HOLD_ID=#{ew.entity.holdId}</if>
|
||||
<if test="ew.entity.sendAsShared!=null"> AND SEND_AS_SHARED=#{ew.entity.sendAsShared}</if>
|
||||
<if test="ew.entity.sentToErp!=null"> AND SENT_TO_ERP=#{ew.entity.sentToErp}</if>
|
||||
<if test="ew.entity.erpChangeNumber!=null"> AND ERP_CHANGE_NUMBER=#{ew.entity.erpChangeNumber}</if>
|
||||
<if test="ew.entity.relaxedFlow!=null"> AND RELAXED_FLOW=#{ew.entity.relaxedFlow}</if>
|
||||
<if test="ew.entity.bomBo!=null"> AND BOM_BO=#{ew.entity.bomBo}</if>
|
||||
<if test="ew.entity.origin!=null"> AND ORIGIN=#{ew.entity.origin}</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 ROUTER
|
||||
<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 ROUTER
|
||||
<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.router!=null"> AND ROUTER=#{ew.entity.router}</if>
|
||||
<if test="ew.entity.routerType!=null"> AND ROUTER_TYPE=#{ew.entity.routerType}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.temporaryRouter!=null"> AND TEMPORARY_ROUTER=#{ew.entity.temporaryRouter}</if>
|
||||
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
|
||||
<if test="ew.entity.entryRouterStepBo!=null"> AND ENTRY_ROUTER_STEP_BO=#{ew.entity.entryRouterStepBo}</if>
|
||||
<if test="ew.entity.copiedFromRouterBo!=null"> AND COPIED_FROM_ROUTER_BO=#{ew.entity.copiedFromRouterBo}</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.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.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.guiRepresentation!=null"> AND GUI_REPRESENTATION=#{ew.entity.guiRepresentation}</if>
|
||||
<if test="ew.entity.originalStatusBo!=null"> AND ORIGINAL_STATUS_BO=#{ew.entity.originalStatusBo}</if>
|
||||
<if test="ew.entity.dispositionGroupBo!=null"> AND DISPOSITION_GROUP_BO=#{ew.entity.dispositionGroupBo}</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.displayType!=null"> AND DISPLAY_TYPE=#{ew.entity.displayType}</if>
|
||||
<if test="ew.entity.holdId!=null"> AND HOLD_ID=#{ew.entity.holdId}</if>
|
||||
<if test="ew.entity.sendAsShared!=null"> AND SEND_AS_SHARED=#{ew.entity.sendAsShared}</if>
|
||||
<if test="ew.entity.sentToErp!=null"> AND SENT_TO_ERP=#{ew.entity.sentToErp}</if>
|
||||
<if test="ew.entity.erpChangeNumber!=null"> AND ERP_CHANGE_NUMBER=#{ew.entity.erpChangeNumber}</if>
|
||||
<if test="ew.entity.relaxedFlow!=null"> AND RELAXED_FLOW=#{ew.entity.relaxedFlow}</if>
|
||||
<if test="ew.entity.bomBo!=null"> AND BOM_BO=#{ew.entity.bomBo}</if>
|
||||
<if test="ew.entity.origin!=null"> AND ORIGIN=#{ew.entity.origin}</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="selectRouterBySfcBo" resultType="com.foreverwin.mesnac.meapi.model.Router">
|
||||
SELECT R.HANDLE, R.SITE, R.ROUTER, R.ROUTER_TYPE, R.DESCRIPTION, R.TEMPORARY_ROUTER, R.STATUS_BO, R.ENTRY_ROUTER_STEP_BO, R.COPIED_FROM_ROUTER_BO, R.REVISION, R.CURRENT_REVISION, R.HAS_BEEN_RELEASED
|
||||
FROM SFC SC
|
||||
INNER JOIN SFC_ROUTING SG ON SG.SFC_BO = SC.HANDLE
|
||||
INNER JOIN SFC_ROUTER SR ON SR.SFC_ROUTING_BO = SG.HANDLE AND SR.IN_USE = 'true'
|
||||
INNER JOIN ROUTER R ON R.HANDLE = SR.ROUTER_BO
|
||||
WHERE SFC_BO = #{sfcBo}
|
||||
</select>
|
||||
</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.meapi.mapper.SfcMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.foreverwin.mesnac.meapi.model.Sfc">
|
||||
<result column="HANDLE" property="handle" />
|
||||
<result column="CHANGE_STAMP" property="changeStamp" />
|
||||
<result column="SITE" property="site" />
|
||||
<result column="SFC" property="sfc" />
|
||||
<result column="STATUS_BO" property="statusBo" />
|
||||
<result column="SHOP_ORDER_BO" property="shopOrderBo" />
|
||||
<result column="QTY" property="qty" />
|
||||
<result column="QTY_DONE" property="qtyDone" />
|
||||
<result column="QTY_SCRAPPED" property="qtyScrapped" />
|
||||
<result column="QTY_HISTORICAL_MIN" property="qtyHistoricalMin" />
|
||||
<result column="QTY_HISTORICAL_MAX" property="qtyHistoricalMax" />
|
||||
<result column="ITEM_BO" property="itemBo" />
|
||||
<result column="PRIORITY" property="priority" />
|
||||
<result column="LOCATION" property="location" />
|
||||
<result column="RMA_MAX_TIMES_PROCESSED" property="rmaMaxTimesProcessed" />
|
||||
<result column="LCC_BO" property="lccBo" />
|
||||
<result column="ORIGINAL_STATUS_BO" property="originalStatusBo" />
|
||||
<result column="QTY_MULT_PERFORMED" property="qtyMultPerformed" />
|
||||
<result column="ACTUAL_COMP_DATE" property="actualCompDate" />
|
||||
<result column="PREV_SITE" property="prevSite" />
|
||||
<result column="ORIGINAL_TRANSFER_KEY" property="originalTransferKey" />
|
||||
<result column="IMMEDIATE_ARCHIVE" property="immediateArchive" />
|
||||
<result column="TRANSFER_DATETIME" property="transferDatetime" />
|
||||
<result column="TRANSFER_USER" property="transferUser" />
|
||||
<result column="SN_DONE" property="snDone" />
|
||||
<result column="AIN_EQUIPMENT_ID" property="ainEquipmentId" />
|
||||
<result column="CREATED_DATE_TIME" property="createdDateTime" />
|
||||
<result column="MODIFIED_DATE_TIME" property="modifiedDateTime" />
|
||||
<result column="PARTITION_DATE" property="partitionDate" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
HANDLE, CHANGE_STAMP, SITE, SFC, STATUS_BO, SHOP_ORDER_BO, QTY, QTY_DONE, QTY_SCRAPPED, QTY_HISTORICAL_MIN, QTY_HISTORICAL_MAX, ITEM_BO, PRIORITY, LOCATION, RMA_MAX_TIMES_PROCESSED, LCC_BO, ORIGINAL_STATUS_BO, QTY_MULT_PERFORMED, ACTUAL_COMP_DATE, PREV_SITE, ORIGINAL_TRANSFER_KEY, IMMEDIATE_ARCHIVE, TRANSFER_DATETIME, TRANSFER_USER, SN_DONE, AIN_EQUIPMENT_ID, CREATED_DATE_TIME, MODIFIED_DATE_TIME, PARTITION_DATE
|
||||
</sql>
|
||||
|
||||
<!-- BaseMapper标准查询/修改/删除 -->
|
||||
|
||||
<select id="selectByMap" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"></include>
|
||||
FROM SFC
|
||||
<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
|
||||
<where>
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.handle}
|
||||
</if>
|
||||
<if test="ew.entity.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
|
||||
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||||
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
|
||||
<if test="ew.entity.shopOrderBo!=null"> AND SHOP_ORDER_BO=#{ew.entity.shopOrderBo}</if>
|
||||
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
|
||||
<if test="ew.entity.qtyDone!=null"> AND QTY_DONE=#{ew.entity.qtyDone}</if>
|
||||
<if test="ew.entity.qtyScrapped!=null"> AND QTY_SCRAPPED=#{ew.entity.qtyScrapped}</if>
|
||||
<if test="ew.entity.qtyHistoricalMin!=null"> AND QTY_HISTORICAL_MIN=#{ew.entity.qtyHistoricalMin}</if>
|
||||
<if test="ew.entity.qtyHistoricalMax!=null"> AND QTY_HISTORICAL_MAX=#{ew.entity.qtyHistoricalMax}</if>
|
||||
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
|
||||
<if test="ew.entity.priority!=null"> AND PRIORITY=#{ew.entity.priority}</if>
|
||||
<if test="ew.entity.location!=null"> AND LOCATION=#{ew.entity.location}</if>
|
||||
<if test="ew.entity.rmaMaxTimesProcessed!=null"> AND RMA_MAX_TIMES_PROCESSED=#{ew.entity.rmaMaxTimesProcessed}</if>
|
||||
<if test="ew.entity.lccBo!=null"> AND LCC_BO=#{ew.entity.lccBo}</if>
|
||||
<if test="ew.entity.originalStatusBo!=null"> AND ORIGINAL_STATUS_BO=#{ew.entity.originalStatusBo}</if>
|
||||
<if test="ew.entity.qtyMultPerformed!=null"> AND QTY_MULT_PERFORMED=#{ew.entity.qtyMultPerformed}</if>
|
||||
<if test="ew.entity.actualCompDate!=null"> AND ACTUAL_COMP_DATE=#{ew.entity.actualCompDate}</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.immediateArchive!=null"> AND IMMEDIATE_ARCHIVE=#{ew.entity.immediateArchive}</if>
|
||||
<if test="ew.entity.transferDatetime!=null"> AND TRANSFER_DATETIME=#{ew.entity.transferDatetime}</if>
|
||||
<if test="ew.entity.transferUser!=null"> AND TRANSFER_USER=#{ew.entity.transferUser}</if>
|
||||
<if test="ew.entity.snDone!=null"> AND SN_DONE=#{ew.entity.snDone}</if>
|
||||
<if test="ew.entity.ainEquipmentId!=null"> AND AIN_EQUIPMENT_ID=#{ew.entity.ainEquipmentId}</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>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCount" resultType="Integer">
|
||||
SELECT COUNT(1) FROM SFC
|
||||
<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.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
|
||||
<if test="ew.entity.shopOrderBo!=null"> AND SHOP_ORDER_BO=#{ew.entity.shopOrderBo}</if>
|
||||
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
|
||||
<if test="ew.entity.qtyDone!=null"> AND QTY_DONE=#{ew.entity.qtyDone}</if>
|
||||
<if test="ew.entity.qtyScrapped!=null"> AND QTY_SCRAPPED=#{ew.entity.qtyScrapped}</if>
|
||||
<if test="ew.entity.qtyHistoricalMin!=null"> AND QTY_HISTORICAL_MIN=#{ew.entity.qtyHistoricalMin}</if>
|
||||
<if test="ew.entity.qtyHistoricalMax!=null"> AND QTY_HISTORICAL_MAX=#{ew.entity.qtyHistoricalMax}</if>
|
||||
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
|
||||
<if test="ew.entity.priority!=null"> AND PRIORITY=#{ew.entity.priority}</if>
|
||||
<if test="ew.entity.location!=null"> AND LOCATION=#{ew.entity.location}</if>
|
||||
<if test="ew.entity.rmaMaxTimesProcessed!=null"> AND RMA_MAX_TIMES_PROCESSED=#{ew.entity.rmaMaxTimesProcessed}</if>
|
||||
<if test="ew.entity.lccBo!=null"> AND LCC_BO=#{ew.entity.lccBo}</if>
|
||||
<if test="ew.entity.originalStatusBo!=null"> AND ORIGINAL_STATUS_BO=#{ew.entity.originalStatusBo}</if>
|
||||
<if test="ew.entity.qtyMultPerformed!=null"> AND QTY_MULT_PERFORMED=#{ew.entity.qtyMultPerformed}</if>
|
||||
<if test="ew.entity.actualCompDate!=null"> AND ACTUAL_COMP_DATE=#{ew.entity.actualCompDate}</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.immediateArchive!=null"> AND IMMEDIATE_ARCHIVE=#{ew.entity.immediateArchive}</if>
|
||||
<if test="ew.entity.transferDatetime!=null"> AND TRANSFER_DATETIME=#{ew.entity.transferDatetime}</if>
|
||||
<if test="ew.entity.transferUser!=null"> AND TRANSFER_USER=#{ew.entity.transferUser}</if>
|
||||
<if test="ew.entity.snDone!=null"> AND SN_DONE=#{ew.entity.snDone}</if>
|
||||
<if test="ew.entity.ainEquipmentId!=null"> AND AIN_EQUIPMENT_ID=#{ew.entity.ainEquipmentId}</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>
|
||||
<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
|
||||
<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.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
|
||||
<if test="ew.entity.shopOrderBo!=null"> AND SHOP_ORDER_BO=#{ew.entity.shopOrderBo}</if>
|
||||
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
|
||||
<if test="ew.entity.qtyDone!=null"> AND QTY_DONE=#{ew.entity.qtyDone}</if>
|
||||
<if test="ew.entity.qtyScrapped!=null"> AND QTY_SCRAPPED=#{ew.entity.qtyScrapped}</if>
|
||||
<if test="ew.entity.qtyHistoricalMin!=null"> AND QTY_HISTORICAL_MIN=#{ew.entity.qtyHistoricalMin}</if>
|
||||
<if test="ew.entity.qtyHistoricalMax!=null"> AND QTY_HISTORICAL_MAX=#{ew.entity.qtyHistoricalMax}</if>
|
||||
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
|
||||
<if test="ew.entity.priority!=null"> AND PRIORITY=#{ew.entity.priority}</if>
|
||||
<if test="ew.entity.location!=null"> AND LOCATION=#{ew.entity.location}</if>
|
||||
<if test="ew.entity.rmaMaxTimesProcessed!=null"> AND RMA_MAX_TIMES_PROCESSED=#{ew.entity.rmaMaxTimesProcessed}</if>
|
||||
<if test="ew.entity.lccBo!=null"> AND LCC_BO=#{ew.entity.lccBo}</if>
|
||||
<if test="ew.entity.originalStatusBo!=null"> AND ORIGINAL_STATUS_BO=#{ew.entity.originalStatusBo}</if>
|
||||
<if test="ew.entity.qtyMultPerformed!=null"> AND QTY_MULT_PERFORMED=#{ew.entity.qtyMultPerformed}</if>
|
||||
<if test="ew.entity.actualCompDate!=null"> AND ACTUAL_COMP_DATE=#{ew.entity.actualCompDate}</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.immediateArchive!=null"> AND IMMEDIATE_ARCHIVE=#{ew.entity.immediateArchive}</if>
|
||||
<if test="ew.entity.transferDatetime!=null"> AND TRANSFER_DATETIME=#{ew.entity.transferDatetime}</if>
|
||||
<if test="ew.entity.transferUser!=null"> AND TRANSFER_USER=#{ew.entity.transferUser}</if>
|
||||
<if test="ew.entity.snDone!=null"> AND SN_DONE=#{ew.entity.snDone}</if>
|
||||
<if test="ew.entity.ainEquipmentId!=null"> AND AIN_EQUIPMENT_ID=#{ew.entity.ainEquipmentId}</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>
|
||||
<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
|
||||
<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.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
|
||||
<if test="ew.entity.shopOrderBo!=null"> AND SHOP_ORDER_BO=#{ew.entity.shopOrderBo}</if>
|
||||
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
|
||||
<if test="ew.entity.qtyDone!=null"> AND QTY_DONE=#{ew.entity.qtyDone}</if>
|
||||
<if test="ew.entity.qtyScrapped!=null"> AND QTY_SCRAPPED=#{ew.entity.qtyScrapped}</if>
|
||||
<if test="ew.entity.qtyHistoricalMin!=null"> AND QTY_HISTORICAL_MIN=#{ew.entity.qtyHistoricalMin}</if>
|
||||
<if test="ew.entity.qtyHistoricalMax!=null"> AND QTY_HISTORICAL_MAX=#{ew.entity.qtyHistoricalMax}</if>
|
||||
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
|
||||
<if test="ew.entity.priority!=null"> AND PRIORITY=#{ew.entity.priority}</if>
|
||||
<if test="ew.entity.location!=null"> AND LOCATION=#{ew.entity.location}</if>
|
||||
<if test="ew.entity.rmaMaxTimesProcessed!=null"> AND RMA_MAX_TIMES_PROCESSED=#{ew.entity.rmaMaxTimesProcessed}</if>
|
||||
<if test="ew.entity.lccBo!=null"> AND LCC_BO=#{ew.entity.lccBo}</if>
|
||||
<if test="ew.entity.originalStatusBo!=null"> AND ORIGINAL_STATUS_BO=#{ew.entity.originalStatusBo}</if>
|
||||
<if test="ew.entity.qtyMultPerformed!=null"> AND QTY_MULT_PERFORMED=#{ew.entity.qtyMultPerformed}</if>
|
||||
<if test="ew.entity.actualCompDate!=null"> AND ACTUAL_COMP_DATE=#{ew.entity.actualCompDate}</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.immediateArchive!=null"> AND IMMEDIATE_ARCHIVE=#{ew.entity.immediateArchive}</if>
|
||||
<if test="ew.entity.transferDatetime!=null"> AND TRANSFER_DATETIME=#{ew.entity.transferDatetime}</if>
|
||||
<if test="ew.entity.transferUser!=null"> AND TRANSFER_USER=#{ew.entity.transferUser}</if>
|
||||
<if test="ew.entity.snDone!=null"> AND SN_DONE=#{ew.entity.snDone}</if>
|
||||
<if test="ew.entity.ainEquipmentId!=null"> AND AIN_EQUIPMENT_ID=#{ew.entity.ainEquipmentId}</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>
|
||||
<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
|
||||
<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.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
|
||||
<if test="ew.entity.shopOrderBo!=null"> AND SHOP_ORDER_BO=#{ew.entity.shopOrderBo}</if>
|
||||
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
|
||||
<if test="ew.entity.qtyDone!=null"> AND QTY_DONE=#{ew.entity.qtyDone}</if>
|
||||
<if test="ew.entity.qtyScrapped!=null"> AND QTY_SCRAPPED=#{ew.entity.qtyScrapped}</if>
|
||||
<if test="ew.entity.qtyHistoricalMin!=null"> AND QTY_HISTORICAL_MIN=#{ew.entity.qtyHistoricalMin}</if>
|
||||
<if test="ew.entity.qtyHistoricalMax!=null"> AND QTY_HISTORICAL_MAX=#{ew.entity.qtyHistoricalMax}</if>
|
||||
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
|
||||
<if test="ew.entity.priority!=null"> AND PRIORITY=#{ew.entity.priority}</if>
|
||||
<if test="ew.entity.location!=null"> AND LOCATION=#{ew.entity.location}</if>
|
||||
<if test="ew.entity.rmaMaxTimesProcessed!=null"> AND RMA_MAX_TIMES_PROCESSED=#{ew.entity.rmaMaxTimesProcessed}</if>
|
||||
<if test="ew.entity.lccBo!=null"> AND LCC_BO=#{ew.entity.lccBo}</if>
|
||||
<if test="ew.entity.originalStatusBo!=null"> AND ORIGINAL_STATUS_BO=#{ew.entity.originalStatusBo}</if>
|
||||
<if test="ew.entity.qtyMultPerformed!=null"> AND QTY_MULT_PERFORMED=#{ew.entity.qtyMultPerformed}</if>
|
||||
<if test="ew.entity.actualCompDate!=null"> AND ACTUAL_COMP_DATE=#{ew.entity.actualCompDate}</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.immediateArchive!=null"> AND IMMEDIATE_ARCHIVE=#{ew.entity.immediateArchive}</if>
|
||||
<if test="ew.entity.transferDatetime!=null"> AND TRANSFER_DATETIME=#{ew.entity.transferDatetime}</if>
|
||||
<if test="ew.entity.transferUser!=null"> AND TRANSFER_USER=#{ew.entity.transferUser}</if>
|
||||
<if test="ew.entity.snDone!=null"> AND SN_DONE=#{ew.entity.snDone}</if>
|
||||
<if test="ew.entity.ainEquipmentId!=null"> AND AIN_EQUIPMENT_ID=#{ew.entity.ainEquipmentId}</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>
|
||||
<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
|
||||
<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.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
|
||||
<if test="ew.entity.shopOrderBo!=null"> AND SHOP_ORDER_BO=#{ew.entity.shopOrderBo}</if>
|
||||
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
|
||||
<if test="ew.entity.qtyDone!=null"> AND QTY_DONE=#{ew.entity.qtyDone}</if>
|
||||
<if test="ew.entity.qtyScrapped!=null"> AND QTY_SCRAPPED=#{ew.entity.qtyScrapped}</if>
|
||||
<if test="ew.entity.qtyHistoricalMin!=null"> AND QTY_HISTORICAL_MIN=#{ew.entity.qtyHistoricalMin}</if>
|
||||
<if test="ew.entity.qtyHistoricalMax!=null"> AND QTY_HISTORICAL_MAX=#{ew.entity.qtyHistoricalMax}</if>
|
||||
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
|
||||
<if test="ew.entity.priority!=null"> AND PRIORITY=#{ew.entity.priority}</if>
|
||||
<if test="ew.entity.location!=null"> AND LOCATION=#{ew.entity.location}</if>
|
||||
<if test="ew.entity.rmaMaxTimesProcessed!=null"> AND RMA_MAX_TIMES_PROCESSED=#{ew.entity.rmaMaxTimesProcessed}</if>
|
||||
<if test="ew.entity.lccBo!=null"> AND LCC_BO=#{ew.entity.lccBo}</if>
|
||||
<if test="ew.entity.originalStatusBo!=null"> AND ORIGINAL_STATUS_BO=#{ew.entity.originalStatusBo}</if>
|
||||
<if test="ew.entity.qtyMultPerformed!=null"> AND QTY_MULT_PERFORMED=#{ew.entity.qtyMultPerformed}</if>
|
||||
<if test="ew.entity.actualCompDate!=null"> AND ACTUAL_COMP_DATE=#{ew.entity.actualCompDate}</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.immediateArchive!=null"> AND IMMEDIATE_ARCHIVE=#{ew.entity.immediateArchive}</if>
|
||||
<if test="ew.entity.transferDatetime!=null"> AND TRANSFER_DATETIME=#{ew.entity.transferDatetime}</if>
|
||||
<if test="ew.entity.transferUser!=null"> AND TRANSFER_USER=#{ew.entity.transferUser}</if>
|
||||
<if test="ew.entity.snDone!=null"> AND SN_DONE=#{ew.entity.snDone}</if>
|
||||
<if test="ew.entity.ainEquipmentId!=null"> AND AIN_EQUIPMENT_ID=#{ew.entity.ainEquipmentId}</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>
|
||||
<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
|
||||
<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.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
|
||||
<if test="ew.entity.shopOrderBo!=null"> AND SHOP_ORDER_BO=#{ew.entity.shopOrderBo}</if>
|
||||
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
|
||||
<if test="ew.entity.qtyDone!=null"> AND QTY_DONE=#{ew.entity.qtyDone}</if>
|
||||
<if test="ew.entity.qtyScrapped!=null"> AND QTY_SCRAPPED=#{ew.entity.qtyScrapped}</if>
|
||||
<if test="ew.entity.qtyHistoricalMin!=null"> AND QTY_HISTORICAL_MIN=#{ew.entity.qtyHistoricalMin}</if>
|
||||
<if test="ew.entity.qtyHistoricalMax!=null"> AND QTY_HISTORICAL_MAX=#{ew.entity.qtyHistoricalMax}</if>
|
||||
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
|
||||
<if test="ew.entity.priority!=null"> AND PRIORITY=#{ew.entity.priority}</if>
|
||||
<if test="ew.entity.location!=null"> AND LOCATION=#{ew.entity.location}</if>
|
||||
<if test="ew.entity.rmaMaxTimesProcessed!=null"> AND RMA_MAX_TIMES_PROCESSED=#{ew.entity.rmaMaxTimesProcessed}</if>
|
||||
<if test="ew.entity.lccBo!=null"> AND LCC_BO=#{ew.entity.lccBo}</if>
|
||||
<if test="ew.entity.originalStatusBo!=null"> AND ORIGINAL_STATUS_BO=#{ew.entity.originalStatusBo}</if>
|
||||
<if test="ew.entity.qtyMultPerformed!=null"> AND QTY_MULT_PERFORMED=#{ew.entity.qtyMultPerformed}</if>
|
||||
<if test="ew.entity.actualCompDate!=null"> AND ACTUAL_COMP_DATE=#{ew.entity.actualCompDate}</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.immediateArchive!=null"> AND IMMEDIATE_ARCHIVE=#{ew.entity.immediateArchive}</if>
|
||||
<if test="ew.entity.transferDatetime!=null"> AND TRANSFER_DATETIME=#{ew.entity.transferDatetime}</if>
|
||||
<if test="ew.entity.transferUser!=null"> AND TRANSFER_USER=#{ew.entity.transferUser}</if>
|
||||
<if test="ew.entity.snDone!=null"> AND SN_DONE=#{ew.entity.snDone}</if>
|
||||
<if test="ew.entity.ainEquipmentId!=null"> AND AIN_EQUIPMENT_ID=#{ew.entity.ainEquipmentId}</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>
|
||||
<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.Sfc">
|
||||
INSERT INTO SFC
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
HANDLE,
|
||||
<if test="changeStamp!=null">CHANGE_STAMP,</if>
|
||||
<if test="site!=null">SITE,</if>
|
||||
<if test="sfc!=null">SFC,</if>
|
||||
<if test="statusBo!=null">STATUS_BO,</if>
|
||||
<if test="shopOrderBo!=null">SHOP_ORDER_BO,</if>
|
||||
<if test="qty!=null">QTY,</if>
|
||||
<if test="qtyDone!=null">QTY_DONE,</if>
|
||||
<if test="qtyScrapped!=null">QTY_SCRAPPED,</if>
|
||||
<if test="qtyHistoricalMin!=null">QTY_HISTORICAL_MIN,</if>
|
||||
<if test="qtyHistoricalMax!=null">QTY_HISTORICAL_MAX,</if>
|
||||
<if test="itemBo!=null">ITEM_BO,</if>
|
||||
<if test="priority!=null">PRIORITY,</if>
|
||||
<if test="location!=null">LOCATION,</if>
|
||||
<if test="rmaMaxTimesProcessed!=null">RMA_MAX_TIMES_PROCESSED,</if>
|
||||
<if test="lccBo!=null">LCC_BO,</if>
|
||||
<if test="originalStatusBo!=null">ORIGINAL_STATUS_BO,</if>
|
||||
<if test="qtyMultPerformed!=null">QTY_MULT_PERFORMED,</if>
|
||||
<if test="actualCompDate!=null">ACTUAL_COMP_DATE,</if>
|
||||
<if test="prevSite!=null">PREV_SITE,</if>
|
||||
<if test="originalTransferKey!=null">ORIGINAL_TRANSFER_KEY,</if>
|
||||
<if test="immediateArchive!=null">IMMEDIATE_ARCHIVE,</if>
|
||||
<if test="transferDatetime!=null">TRANSFER_DATETIME,</if>
|
||||
<if test="transferUser!=null">TRANSFER_USER,</if>
|
||||
<if test="snDone!=null">SN_DONE,</if>
|
||||
<if test="ainEquipmentId!=null">AIN_EQUIPMENT_ID,</if>
|
||||
<if test="createdDateTime!=null">CREATED_DATE_TIME,</if>
|
||||
<if test="modifiedDateTime!=null">MODIFIED_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="site!=null">#{site},</if>
|
||||
<if test="sfc!=null">#{sfc},</if>
|
||||
<if test="statusBo!=null">#{statusBo},</if>
|
||||
<if test="shopOrderBo!=null">#{shopOrderBo},</if>
|
||||
<if test="qty!=null">#{qty},</if>
|
||||
<if test="qtyDone!=null">#{qtyDone},</if>
|
||||
<if test="qtyScrapped!=null">#{qtyScrapped},</if>
|
||||
<if test="qtyHistoricalMin!=null">#{qtyHistoricalMin},</if>
|
||||
<if test="qtyHistoricalMax!=null">#{qtyHistoricalMax},</if>
|
||||
<if test="itemBo!=null">#{itemBo},</if>
|
||||
<if test="priority!=null">#{priority},</if>
|
||||
<if test="location!=null">#{location},</if>
|
||||
<if test="rmaMaxTimesProcessed!=null">#{rmaMaxTimesProcessed},</if>
|
||||
<if test="lccBo!=null">#{lccBo},</if>
|
||||
<if test="originalStatusBo!=null">#{originalStatusBo},</if>
|
||||
<if test="qtyMultPerformed!=null">#{qtyMultPerformed},</if>
|
||||
<if test="actualCompDate!=null">#{actualCompDate},</if>
|
||||
<if test="prevSite!=null">#{prevSite},</if>
|
||||
<if test="originalTransferKey!=null">#{originalTransferKey},</if>
|
||||
<if test="immediateArchive!=null">#{immediateArchive},</if>
|
||||
<if test="transferDatetime!=null">#{transferDatetime},</if>
|
||||
<if test="transferUser!=null">#{transferUser},</if>
|
||||
<if test="snDone!=null">#{snDone},</if>
|
||||
<if test="ainEquipmentId!=null">#{ainEquipmentId},</if>
|
||||
<if test="createdDateTime!=null">#{createdDateTime},</if>
|
||||
<if test="modifiedDateTime!=null">#{modifiedDateTime},</if>
|
||||
<if test="partitionDate!=null">#{partitionDate},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<insert id="insertAllColumn" parameterType="com.foreverwin.mesnac.meapi.model.Sfc">
|
||||
INSERT INTO SFC
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<include refid="Base_Column_List"></include>
|
||||
</trim> VALUES
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
#{handle},
|
||||
#{changeStamp},
|
||||
#{site},
|
||||
#{sfc},
|
||||
#{statusBo},
|
||||
#{shopOrderBo},
|
||||
#{qty},
|
||||
#{qtyDone},
|
||||
#{qtyScrapped},
|
||||
#{qtyHistoricalMin},
|
||||
#{qtyHistoricalMax},
|
||||
#{itemBo},
|
||||
#{priority},
|
||||
#{location},
|
||||
#{rmaMaxTimesProcessed},
|
||||
#{lccBo},
|
||||
#{originalStatusBo},
|
||||
#{qtyMultPerformed},
|
||||
#{actualCompDate},
|
||||
#{prevSite},
|
||||
#{originalTransferKey},
|
||||
#{immediateArchive},
|
||||
#{transferDatetime},
|
||||
#{transferUser},
|
||||
#{snDone},
|
||||
#{ainEquipmentId},
|
||||
#{createdDateTime},
|
||||
#{modifiedDateTime},
|
||||
#{partitionDate},
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<update id="update">
|
||||
UPDATE SFC <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.sfc!=null">SFC=#{et.sfc},</if>
|
||||
<if test="et.statusBo!=null">STATUS_BO=#{et.statusBo},</if>
|
||||
<if test="et.shopOrderBo!=null">SHOP_ORDER_BO=#{et.shopOrderBo},</if>
|
||||
<if test="et.qty!=null">QTY=#{et.qty},</if>
|
||||
<if test="et.qtyDone!=null">QTY_DONE=#{et.qtyDone},</if>
|
||||
<if test="et.qtyScrapped!=null">QTY_SCRAPPED=#{et.qtyScrapped},</if>
|
||||
<if test="et.qtyHistoricalMin!=null">QTY_HISTORICAL_MIN=#{et.qtyHistoricalMin},</if>
|
||||
<if test="et.qtyHistoricalMax!=null">QTY_HISTORICAL_MAX=#{et.qtyHistoricalMax},</if>
|
||||
<if test="et.itemBo!=null">ITEM_BO=#{et.itemBo},</if>
|
||||
<if test="et.priority!=null">PRIORITY=#{et.priority},</if>
|
||||
<if test="et.location!=null">LOCATION=#{et.location},</if>
|
||||
<if test="et.rmaMaxTimesProcessed!=null">RMA_MAX_TIMES_PROCESSED=#{et.rmaMaxTimesProcessed},</if>
|
||||
<if test="et.lccBo!=null">LCC_BO=#{et.lccBo},</if>
|
||||
<if test="et.originalStatusBo!=null">ORIGINAL_STATUS_BO=#{et.originalStatusBo},</if>
|
||||
<if test="et.qtyMultPerformed!=null">QTY_MULT_PERFORMED=#{et.qtyMultPerformed},</if>
|
||||
<if test="et.actualCompDate!=null">ACTUAL_COMP_DATE=#{et.actualCompDate},</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.immediateArchive!=null">IMMEDIATE_ARCHIVE=#{et.immediateArchive},</if>
|
||||
<if test="et.transferDatetime!=null">TRANSFER_DATETIME=#{et.transferDatetime},</if>
|
||||
<if test="et.transferUser!=null">TRANSFER_USER=#{et.transferUser},</if>
|
||||
<if test="et.snDone!=null">SN_DONE=#{et.snDone},</if>
|
||||
<if test="et.ainEquipmentId!=null">AIN_EQUIPMENT_ID=#{et.ainEquipmentId},</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>
|
||||
</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.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
|
||||
<if test="ew.entity.shopOrderBo!=null"> AND SHOP_ORDER_BO=#{ew.entity.shopOrderBo}</if>
|
||||
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
|
||||
<if test="ew.entity.qtyDone!=null"> AND QTY_DONE=#{ew.entity.qtyDone}</if>
|
||||
<if test="ew.entity.qtyScrapped!=null"> AND QTY_SCRAPPED=#{ew.entity.qtyScrapped}</if>
|
||||
<if test="ew.entity.qtyHistoricalMin!=null"> AND QTY_HISTORICAL_MIN=#{ew.entity.qtyHistoricalMin}</if>
|
||||
<if test="ew.entity.qtyHistoricalMax!=null"> AND QTY_HISTORICAL_MAX=#{ew.entity.qtyHistoricalMax}</if>
|
||||
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
|
||||
<if test="ew.entity.priority!=null"> AND PRIORITY=#{ew.entity.priority}</if>
|
||||
<if test="ew.entity.location!=null"> AND LOCATION=#{ew.entity.location}</if>
|
||||
<if test="ew.entity.rmaMaxTimesProcessed!=null"> AND RMA_MAX_TIMES_PROCESSED=#{ew.entity.rmaMaxTimesProcessed}</if>
|
||||
<if test="ew.entity.lccBo!=null"> AND LCC_BO=#{ew.entity.lccBo}</if>
|
||||
<if test="ew.entity.originalStatusBo!=null"> AND ORIGINAL_STATUS_BO=#{ew.entity.originalStatusBo}</if>
|
||||
<if test="ew.entity.qtyMultPerformed!=null"> AND QTY_MULT_PERFORMED=#{ew.entity.qtyMultPerformed}</if>
|
||||
<if test="ew.entity.actualCompDate!=null"> AND ACTUAL_COMP_DATE=#{ew.entity.actualCompDate}</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.immediateArchive!=null"> AND IMMEDIATE_ARCHIVE=#{ew.entity.immediateArchive}</if>
|
||||
<if test="ew.entity.transferDatetime!=null"> AND TRANSFER_DATETIME=#{ew.entity.transferDatetime}</if>
|
||||
<if test="ew.entity.transferUser!=null"> AND TRANSFER_USER=#{ew.entity.transferUser}</if>
|
||||
<if test="ew.entity.snDone!=null"> AND SN_DONE=#{ew.entity.snDone}</if>
|
||||
<if test="ew.entity.ainEquipmentId!=null"> AND AIN_EQUIPMENT_ID=#{ew.entity.ainEquipmentId}</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>
|
||||
<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
|
||||
<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
|
||||
<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.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||
<if test="ew.entity.statusBo!=null"> AND STATUS_BO=#{ew.entity.statusBo}</if>
|
||||
<if test="ew.entity.shopOrderBo!=null"> AND SHOP_ORDER_BO=#{ew.entity.shopOrderBo}</if>
|
||||
<if test="ew.entity.qty!=null"> AND QTY=#{ew.entity.qty}</if>
|
||||
<if test="ew.entity.qtyDone!=null"> AND QTY_DONE=#{ew.entity.qtyDone}</if>
|
||||
<if test="ew.entity.qtyScrapped!=null"> AND QTY_SCRAPPED=#{ew.entity.qtyScrapped}</if>
|
||||
<if test="ew.entity.qtyHistoricalMin!=null"> AND QTY_HISTORICAL_MIN=#{ew.entity.qtyHistoricalMin}</if>
|
||||
<if test="ew.entity.qtyHistoricalMax!=null"> AND QTY_HISTORICAL_MAX=#{ew.entity.qtyHistoricalMax}</if>
|
||||
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
|
||||
<if test="ew.entity.priority!=null"> AND PRIORITY=#{ew.entity.priority}</if>
|
||||
<if test="ew.entity.location!=null"> AND LOCATION=#{ew.entity.location}</if>
|
||||
<if test="ew.entity.rmaMaxTimesProcessed!=null"> AND RMA_MAX_TIMES_PROCESSED=#{ew.entity.rmaMaxTimesProcessed}</if>
|
||||
<if test="ew.entity.lccBo!=null"> AND LCC_BO=#{ew.entity.lccBo}</if>
|
||||
<if test="ew.entity.originalStatusBo!=null"> AND ORIGINAL_STATUS_BO=#{ew.entity.originalStatusBo}</if>
|
||||
<if test="ew.entity.qtyMultPerformed!=null"> AND QTY_MULT_PERFORMED=#{ew.entity.qtyMultPerformed}</if>
|
||||
<if test="ew.entity.actualCompDate!=null"> AND ACTUAL_COMP_DATE=#{ew.entity.actualCompDate}</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.immediateArchive!=null"> AND IMMEDIATE_ARCHIVE=#{ew.entity.immediateArchive}</if>
|
||||
<if test="ew.entity.transferDatetime!=null"> AND TRANSFER_DATETIME=#{ew.entity.transferDatetime}</if>
|
||||
<if test="ew.entity.transferUser!=null"> AND TRANSFER_USER=#{ew.entity.transferUser}</if>
|
||||
<if test="ew.entity.snDone!=null"> AND SN_DONE=#{ew.entity.snDone}</if>
|
||||
<if test="ew.entity.ainEquipmentId!=null"> AND AIN_EQUIPMENT_ID=#{ew.entity.ainEquipmentId}</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>
|
||||
<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