产前准备
parent
4148378a4b
commit
387393941f
@ -1,271 +0,0 @@
|
||||
package com.foreverwin.mesnac.quality.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.foreverwin.mesnac.common.util.StringUtil;
|
||||
import com.foreverwin.mesnac.quality.mapper.InspectionProjectDetailMapper;
|
||||
import com.foreverwin.mesnac.quality.mapper.InspectionProjectMapper;
|
||||
import com.foreverwin.mesnac.quality.model.InspectionProject;
|
||||
import com.foreverwin.mesnac.quality.model.InspectionProjectDetail;
|
||||
import com.foreverwin.mesnac.quality.service.InspectionProjectDetailService;
|
||||
import com.foreverwin.mesnac.quality.service.InspectionProjectService;
|
||||
import com.foreverwin.modular.core.util.CommonMethods;
|
||||
import com.foreverwin.modular.core.util.FrontPage;
|
||||
import com.foreverwin.modular.core.util.R;
|
||||
import com.visiprise.common.exception.BaseException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Robert
|
||||
* @since 2021-06-03
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/Z-INSPECTION-PROJECT")
|
||||
public class InspectionProjectController {
|
||||
|
||||
@Autowired
|
||||
public InspectionProjectService inspectionProjectService;
|
||||
|
||||
@Autowired
|
||||
public InspectionProjectMapper inspectionProjectMapper;
|
||||
|
||||
@Autowired
|
||||
public InspectionProjectDetailMapper inspectionProjectDetailMapper;
|
||||
|
||||
@Autowired
|
||||
public InspectionProjectDetailService inspectionProjectDetailService;
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id 主键
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@GetMapping("/{id:.+}")
|
||||
public R getInspectionProjectById(@PathVariable String id) {
|
||||
return R.ok( inspectionProjectService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询所有数据
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@GetMapping("")
|
||||
public R getInspectionProjectList(InspectionProject inspectionProject){
|
||||
List<InspectionProject> result;
|
||||
QueryWrapper<InspectionProject> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(inspectionProject);
|
||||
result = inspectionProjectService.list(queryWrapper);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询数据
|
||||
*
|
||||
* @param frontPage 分页信息
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@GetMapping("/page")
|
||||
public R page(FrontPage<InspectionProject> frontPage, InspectionProject inspectionProject){
|
||||
IPage result;
|
||||
QueryWrapper<InspectionProject> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(inspectionProject);
|
||||
if (frontPage.getGlobalQuery() != null && !"".equals(frontPage.getGlobalQuery().trim())) {
|
||||
//TODO modify global query
|
||||
queryWrapper.lambda().and(wrapper -> wrapper
|
||||
.like(InspectionProject::getHandle, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionProject::getSite, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionProject::getInspectProjectNo, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionProject::getInspectType, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionProject::getRevision, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionProject::getCurrentRevision, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionProject::getDescription, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionProject::getStatus, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionProject::getItemBo, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionProject::getItem, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionProject::getOperation, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionProject::getStepId, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionProject::getSubStep, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionProject::getCreateUser, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionProject::getModifyUser, frontPage.getGlobalQuery())
|
||||
);
|
||||
}
|
||||
result = inspectionProjectService.page(frontPage.getPagePlus(), queryWrapper);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增
|
||||
* @param inspectionProject 传递的实体
|
||||
* @return null 失败 实体成功
|
||||
*/
|
||||
@PostMapping
|
||||
public R save(@RequestBody InspectionProject inspectionProject) {
|
||||
return R.ok(inspectionProjectService.save(inspectionProject));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* @param inspectionProject 传递的实体
|
||||
* @return null 失败 实体成功
|
||||
*/
|
||||
@PutMapping
|
||||
public R updateById(@RequestBody InspectionProject inspectionProject) {
|
||||
return R.ok(inspectionProjectService.updateById(inspectionProject));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id删除对象
|
||||
* @param id 实体ID
|
||||
* @return 0 失败 1 成功
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping(method = RequestMethod.DELETE, value = "/{id:.+}")
|
||||
public R removeById(@PathVariable("id") String id){
|
||||
return R.ok(inspectionProjectService.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(inspectionProjectService.removeByIds(ids));
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/saveAll")
|
||||
public R saveAll(@RequestBody InspectionProject inspectionProject){
|
||||
boolean b = false;
|
||||
if(StringUtil.isEmpty(inspectionProject.getInspectProjectNo())){
|
||||
b = true;
|
||||
inspectionProject.setInspectProjectNo(inspectionProjectService.InspectProjectNoGenerationRules(inspectionProject));
|
||||
}
|
||||
inspectionProject.setSite(CommonMethods.getSite());
|
||||
inspectionProject.setHandle("InspectionProjectBO:"+inspectionProject.getSite()+","+inspectionProject.getInspectProjectNo()+","+inspectionProject.getRevision());
|
||||
//保存检验项目维护-副
|
||||
//移除
|
||||
HashMap<String, Object> removeCondition = new HashMap<>();
|
||||
removeCondition.put("INSPECT_PROJECT_BO",inspectionProject.getHandle());
|
||||
inspectionProjectDetailService.removeByMap(removeCondition);
|
||||
if(null != inspectionProject.getInspectionProjectDetailList() && inspectionProject.getInspectionProjectDetailList().size() > 0){
|
||||
List<InspectionProjectDetail> inspectionProjectDetailList = inspectionProject.getInspectionProjectDetailList();
|
||||
for (InspectionProjectDetail inspectionProjectDetail : inspectionProjectDetailList) {
|
||||
inspectionProjectDetail.setHandle(UUID.randomUUID().toString());
|
||||
inspectionProjectDetail.setInspectProjectBo(inspectionProject.getHandle());
|
||||
inspectionProjectDetail.setCreatedDateTime(LocalDateTime.now());
|
||||
inspectionProjectDetail.setCreateUser(CommonMethods.getUser());
|
||||
inspectionProjectDetail.setModifiedDateTime(LocalDateTime.now());
|
||||
inspectionProjectDetail.setModifyUser(CommonMethods.getUser());
|
||||
}
|
||||
//保存
|
||||
inspectionProjectDetailService.saveBatch(inspectionProjectDetailList);
|
||||
|
||||
}
|
||||
//保存检验项目维护-主
|
||||
if(inspectionProject.selectById(inspectionProject.getHandle()) == null){
|
||||
inspectionProject.setCreatedDateTime(LocalDateTime.now());
|
||||
inspectionProject.setCreateUser(CommonMethods.getUser());
|
||||
inspectionProject.setModifiedDateTime(LocalDateTime.now());
|
||||
inspectionProject.setModifyUser(CommonMethods.getUser());
|
||||
inspectionProjectService.save(inspectionProject);
|
||||
}else{
|
||||
inspectionProject.setModifiedDateTime(LocalDateTime.now());
|
||||
inspectionProject.setModifyUser(CommonMethods.getUser());
|
||||
if(b){
|
||||
throw new BaseException("请先检索再保存");
|
||||
}
|
||||
inspectionProjectService.saveOrUpdate(inspectionProject);
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
@PostMapping("/deleteById")
|
||||
public R deleteById(@RequestBody InspectionProject inspectionProject){
|
||||
boolean bool = false;
|
||||
if(StringUtil.isEmpty(inspectionProject.getInspectProjectNo())){
|
||||
inspectionProject.setInspectProjectNo(inspectionProjectService.InspectProjectNoGenerationRules(inspectionProject));
|
||||
bool = true;
|
||||
}
|
||||
inspectionProject.setSite(CommonMethods.getSite());
|
||||
inspectionProject.setHandle("InspectionProjectBO:"+inspectionProject.getSite()+","+inspectionProject.getInspectProjectNo()+","+inspectionProject.getRevision());
|
||||
HashMap<String, Object> removeCondition = new HashMap<>();
|
||||
removeCondition.put("INSPECT_PROJECT_BO",inspectionProject.getHandle());
|
||||
inspectionProjectDetailService.removeByMap(removeCondition);
|
||||
boolean b = inspectionProjectService.removeById(inspectionProject);
|
||||
if(bool){
|
||||
if(b){
|
||||
throw new BaseException("请先检索再保存");
|
||||
}
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
@GetMapping("/queryAll")
|
||||
public R queryAll(InspectionProject inspectionProject){
|
||||
if(StringUtil.isEmpty(inspectionProject.getInspectProjectNo())){
|
||||
inspectionProject.setInspectProjectNo(inspectionProjectService.InspectProjectNoGenerationRules(inspectionProject));
|
||||
}
|
||||
if(StringUtil.isEmpty(inspectionProject.getRevision())){
|
||||
String revision = inspectionProjectService.findRevisionByCurrentRevision(inspectionProject.getInspectProjectNo());
|
||||
if(StringUtil.isEmpty(revision)){
|
||||
throw new BaseException("请输入版本号");
|
||||
}
|
||||
inspectionProject.setRevision(revision);
|
||||
}
|
||||
inspectionProject.setSite(CommonMethods.getSite());
|
||||
inspectionProject.setHandle("InspectionProjectBO:"+inspectionProject.getSite()+","+inspectionProject.getInspectProjectNo()+","+inspectionProject.getRevision());
|
||||
|
||||
HashMap<String, Object> findCondition = new HashMap<>();
|
||||
findCondition.put("INSPECT_PROJECT_BO",inspectionProject.getHandle());
|
||||
List<InspectionProjectDetail> inspectionProjectDetails = inspectionProjectDetailMapper.selectByMap(findCondition);
|
||||
InspectionProject handle = inspectionProjectMapper.selectById(inspectionProject.getHandle());
|
||||
handle.setInspectionProjectDetailList(inspectionProjectDetails);
|
||||
if(null == handle){
|
||||
throw new BaseException("根据此项目编号以及版本未检索到数据");
|
||||
}
|
||||
return R.ok(handle);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,130 +0,0 @@
|
||||
package com.foreverwin.mesnac.quality.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.quality.service.InspectionProjectDetailService;
|
||||
import com.foreverwin.mesnac.quality.model.InspectionProjectDetail;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Robert
|
||||
* @since 2021-06-03
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/Z-INSPECTION-PROJECT-DETAIL")
|
||||
public class InspectionProjectDetailController {
|
||||
|
||||
@Autowired
|
||||
public InspectionProjectDetailService inspectionProjectDetailService;
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id 主键
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@GetMapping("/{id:.+}")
|
||||
public R getInspectionProjectDetailById(@PathVariable String id) {
|
||||
return R.ok( inspectionProjectDetailService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询所有数据
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@GetMapping("")
|
||||
public R getInspectionProjectDetailList(InspectionProjectDetail inspectionProjectDetail){
|
||||
List<InspectionProjectDetail> result;
|
||||
QueryWrapper<InspectionProjectDetail> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(inspectionProjectDetail);
|
||||
result = inspectionProjectDetailService.list(queryWrapper);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询数据
|
||||
*
|
||||
* @param frontPage 分页信息
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@GetMapping("/page")
|
||||
public R page(FrontPage<InspectionProjectDetail> frontPage, InspectionProjectDetail inspectionProjectDetail){
|
||||
IPage result;
|
||||
QueryWrapper<InspectionProjectDetail> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(inspectionProjectDetail);
|
||||
if (frontPage.getGlobalQuery() != null && !"".equals(frontPage.getGlobalQuery().trim())) {
|
||||
//TODO modify global query
|
||||
queryWrapper.lambda().and(wrapper -> wrapper
|
||||
.like(InspectionProjectDetail::getHandle, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionProjectDetail::getInspectProjectBo, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionProjectDetail::getParamNo, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionProjectDetail::getDescription, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionProjectDetail::getInspectMethod, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionProjectDetail::getParamType, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionProjectDetail::getParamUnit, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionProjectDetail::getStandardValue, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionProjectDetail::getFalseValue, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionProjectDetail::getTrueValue, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionProjectDetail::getIsRequired, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionProjectDetail::getCreateUser, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionProjectDetail::getModifyUser, frontPage.getGlobalQuery())
|
||||
);
|
||||
}
|
||||
result = inspectionProjectDetailService.page(frontPage.getPagePlus(), queryWrapper);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增
|
||||
* @param inspectionProjectDetail 传递的实体
|
||||
* @return null 失败 实体成功
|
||||
*/
|
||||
@PostMapping
|
||||
public R save(@RequestBody InspectionProjectDetail inspectionProjectDetail) {
|
||||
return R.ok(inspectionProjectDetailService.save(inspectionProjectDetail));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* @param inspectionProjectDetail 传递的实体
|
||||
* @return null 失败 实体成功
|
||||
*/
|
||||
@PutMapping
|
||||
public R updateById(@RequestBody InspectionProjectDetail inspectionProjectDetail) {
|
||||
return R.ok(inspectionProjectDetailService.updateById(inspectionProjectDetail));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id删除对象
|
||||
* @param id 实体ID
|
||||
* @return 0 失败 1 成功
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping(method = RequestMethod.DELETE, value = "/{id:.+}")
|
||||
public R removeById(@PathVariable("id") String id){
|
||||
return R.ok(inspectionProjectDetailService.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(inspectionProjectDetailService.removeByIds(ids));
|
||||
}
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
package com.foreverwin.mesnac.quality.dto;
|
||||
|
||||
import com.foreverwin.mesnac.quality.model.InspectionProject;
|
||||
|
||||
/**
|
||||
* @Description TODO
|
||||
* @Author zhaojiawei
|
||||
* @Since 2021-06-03
|
||||
*/
|
||||
public class inspectionProjectDto extends InspectionProject {
|
||||
private String seq;
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
package com.foreverwin.mesnac.quality.mapper;
|
||||
|
||||
import com.foreverwin.mesnac.quality.model.InspectionProjectDetail;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 检验项目维护-副 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author Robert
|
||||
* @since 2021-06-03
|
||||
*/
|
||||
@Repository
|
||||
public interface InspectionProjectDetailMapper extends BaseMapper<InspectionProjectDetail> {
|
||||
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
package com.foreverwin.mesnac.quality.mapper;
|
||||
|
||||
import com.foreverwin.mesnac.quality.model.InspectionProject;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 检验项目维护-主 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author Robert
|
||||
* @since 2021-06-03
|
||||
*/
|
||||
@Repository
|
||||
public interface InspectionProjectMapper extends BaseMapper<InspectionProject> {
|
||||
|
||||
String findRevisionByCurrentRevision(@Param("site")String site, @Param("inspectProjectNo") String inspectProjectNo);
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
package com.foreverwin.mesnac.quality.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.foreverwin.mesnac.quality.model.InspectionProjectDetail;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.foreverwin.modular.core.util.FrontPage;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 检验项目维护-副 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author Robert
|
||||
* @since 2021-06-03
|
||||
*/
|
||||
public interface InspectionProjectDetailService extends IService<InspectionProjectDetail> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param frontPage
|
||||
* @return
|
||||
*/
|
||||
IPage<InspectionProjectDetail> selectPage(FrontPage<InspectionProjectDetail> frontPage, InspectionProjectDetail inspectionProjectDetail);
|
||||
|
||||
List<InspectionProjectDetail> selectList(InspectionProjectDetail inspectionProjectDetail);
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
package com.foreverwin.mesnac.quality.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.foreverwin.mesnac.quality.model.InspectionProject;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.foreverwin.modular.core.util.FrontPage;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 检验项目维护-主 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author Robert
|
||||
* @since 2021-06-03
|
||||
*/
|
||||
public interface InspectionProjectService extends IService<InspectionProject> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param frontPage
|
||||
* @return
|
||||
*/
|
||||
IPage<InspectionProject> selectPage(FrontPage<InspectionProject> frontPage, InspectionProject inspectionProject);
|
||||
|
||||
List<InspectionProject> selectList(InspectionProject inspectionProject);
|
||||
|
||||
String InspectProjectNoGenerationRules(InspectionProject inspectionProject);
|
||||
|
||||
String findRevisionByCurrentRevision(String inspectProjectNo);
|
||||
|
||||
}
|
@ -1,46 +0,0 @@
|
||||
package com.foreverwin.mesnac.quality.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.quality.model.InspectionProjectDetail;
|
||||
import com.foreverwin.mesnac.quality.mapper.InspectionProjectDetailMapper;
|
||||
import com.foreverwin.mesnac.quality.service.InspectionProjectDetailService;
|
||||
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 Robert
|
||||
* @since 2021-06-03
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class InspectionProjectDetailServiceImpl extends ServiceImpl<InspectionProjectDetailMapper, InspectionProjectDetail> implements InspectionProjectDetailService {
|
||||
|
||||
|
||||
@Autowired
|
||||
private InspectionProjectDetailMapper inspectionProjectDetailMapper;
|
||||
|
||||
@Override
|
||||
public IPage<InspectionProjectDetail> selectPage(FrontPage<InspectionProjectDetail> frontPage, InspectionProjectDetail inspectionProjectDetail) {
|
||||
QueryWrapper<InspectionProjectDetail> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(inspectionProjectDetail);
|
||||
return super.page(frontPage.getPagePlus(), queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<InspectionProjectDetail> selectList(InspectionProjectDetail inspectionProjectDetail) {
|
||||
QueryWrapper<InspectionProjectDetail> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(inspectionProjectDetail);
|
||||
return super.list(queryWrapper);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,80 +0,0 @@
|
||||
package com.foreverwin.mesnac.quality.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.foreverwin.mesnac.common.util.StringUtil;
|
||||
import com.foreverwin.mesnac.quality.mapper.InspectionProjectMapper;
|
||||
import com.foreverwin.mesnac.quality.model.InspectionProject;
|
||||
import com.foreverwin.mesnac.quality.service.InspectionProjectService;
|
||||
import com.foreverwin.modular.core.util.CommonMethods;
|
||||
import com.foreverwin.modular.core.util.FrontPage;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
/**
|
||||
* <p>
|
||||
* 检验项目维护-主 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author Robert
|
||||
* @since 2021-06-03
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class InspectionProjectServiceImpl extends ServiceImpl<InspectionProjectMapper, InspectionProject> implements InspectionProjectService {
|
||||
|
||||
|
||||
@Autowired
|
||||
private InspectionProjectMapper inspectionProjectMapper;
|
||||
|
||||
@Override
|
||||
public IPage<InspectionProject> selectPage(FrontPage<InspectionProject> frontPage, InspectionProject inspectionProject) {
|
||||
QueryWrapper<InspectionProject> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(inspectionProject);
|
||||
return super.page(frontPage.getPagePlus(), queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<InspectionProject> selectList(InspectionProject inspectionProject) {
|
||||
QueryWrapper<InspectionProject> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(inspectionProject);
|
||||
return super.list(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String InspectProjectNoGenerationRules(InspectionProject inspectionProject) {
|
||||
if(StringUtil.isEmpty(inspectionProject.getItem())){
|
||||
inspectionProject.setInspectProjectNo(inspectionProject.getInspectType()+",*"+",*"+",*"+",*");
|
||||
inspectionProject.setItemBo("*");
|
||||
inspectionProject.setItem("*");
|
||||
inspectionProject.setOperation("*");
|
||||
inspectionProject.setStepId("*");
|
||||
inspectionProject.setSubStep("*");
|
||||
}else if(StringUtil.isEmpty(inspectionProject.getOperation())){
|
||||
inspectionProject.setInspectProjectNo(inspectionProject.getInspectType()+","+inspectionProject.getItem()+",*"+",*"+",*");
|
||||
inspectionProject.setOperation("*");
|
||||
inspectionProject.setStepId("*");
|
||||
inspectionProject.setSubStep("*");
|
||||
|
||||
}else if(StringUtil.isEmpty(inspectionProject.getSubStep())){
|
||||
inspectionProject.setInspectProjectNo(inspectionProject.getInspectType()+","+inspectionProject.getItem()+","
|
||||
+inspectionProject.getOperation()+","+inspectionProject.getStepId()+",*");
|
||||
inspectionProject.setSubStep("*");
|
||||
}else {
|
||||
inspectionProject.setInspectProjectNo(inspectionProject.getInspectType()+","+inspectionProject.getItem()+","
|
||||
+inspectionProject.getOperation()+","+inspectionProject.getStepId()+","+inspectionProject.getSubStep());
|
||||
}
|
||||
return inspectionProject.getInspectProjectNo();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String findRevisionByCurrentRevision(String inspectProjectNo) {
|
||||
String site = CommonMethods.getSite();
|
||||
return inspectionProjectMapper.findRevisionByCurrentRevision(site,inspectProjectNo);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,562 +0,0 @@
|
||||
<?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.quality.mapper.InspectionProjectDetailMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.foreverwin.mesnac.quality.model.InspectionProjectDetail">
|
||||
<id column="HANDLE" property="handle" />
|
||||
<result column="INSPECT_PROJECT_BO" property="inspectProjectBo" />
|
||||
<result column="SEQ" property="seq" />
|
||||
<result column="PARAM_NO" property="paramNo" />
|
||||
<result column="DESCRIPTION" property="description" />
|
||||
<result column="INSPECT_METHOD" property="inspectMethod" />
|
||||
<result column="PARAM_TYPE" property="paramType" />
|
||||
<result column="PARAM_UNIT" property="paramUnit" />
|
||||
<result column="DECIMAL_NUM" property="decimalNum" />
|
||||
<result column="MIN_VALUE" property="minValue" />
|
||||
<result column="STANDARD_VALUE" property="standardValue" />
|
||||
<result column="MAX_VALUE" property="maxValue" />
|
||||
<result column="FALSE_VALUE" property="falseValue" />
|
||||
<result column="TRUE_VALUE" property="trueValue" />
|
||||
<result column="IS_REQUIRED" property="isRequired" />
|
||||
<result column="CHECK_NUM" property="checkNum" />
|
||||
<result column="CREATE_USER" property="createUser" />
|
||||
<result column="CREATED_DATE_TIME" property="createdDateTime" />
|
||||
<result column="MODIFY_USER" property="modifyUser" />
|
||||
<result column="MODIFIED_DATE_TIME" property="modifiedDateTime" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
HANDLE, INSPECT_PROJECT_BO, SEQ, PARAM_NO, DESCRIPTION, INSPECT_METHOD, PARAM_TYPE, PARAM_UNIT, DECIMAL_NUM, MIN_VALUE, STANDARD_VALUE, MAX_VALUE, FALSE_VALUE, TRUE_VALUE, IS_REQUIRED, CHECK_NUM, CREATE_USER, CREATED_DATE_TIME, MODIFY_USER, MODIFIED_DATE_TIME
|
||||
</sql>
|
||||
|
||||
<!-- BaseMapper标准查询/修改/删除 -->
|
||||
<select id="selectById" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"></include> FROM Z_INSPECTION_PROJECT_DETAIL WHERE HANDLE=#{handle}
|
||||
</select>
|
||||
|
||||
<select id="selectByMap" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"></include>
|
||||
FROM Z_INSPECTION_PROJECT_DETAIL
|
||||
<if test="cm!=null and !cm.isEmpty">
|
||||
<where>
|
||||
<foreach collection="cm.keys" item="k" separator="AND">
|
||||
<if test="cm[k] != null">
|
||||
${k} = #{cm[${k}]}
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectBatchIds" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"></include>
|
||||
FROM Z_INSPECTION_PROJECT_DETAIL WHERE HANDLE IN (
|
||||
<foreach item="item" index="index" collection="coll" separator=",">#{item}
|
||||
</foreach>)
|
||||
</select>
|
||||
|
||||
<select id="selectOne" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"></include> FROM Z_INSPECTION_PROJECT_DETAIL
|
||||
<where>
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.handle}
|
||||
</if>
|
||||
<if test="ew.entity.inspectProjectBo!=null"> AND INSPECT_PROJECT_BO=#{ew.entity.inspectProjectBo}</if>
|
||||
<if test="ew.entity.seq!=null"> AND SEQ=#{ew.entity.seq}</if>
|
||||
<if test="ew.entity.paramNo!=null"> AND PARAM_NO=#{ew.entity.paramNo}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.inspectMethod!=null"> AND INSPECT_METHOD=#{ew.entity.inspectMethod}</if>
|
||||
<if test="ew.entity.paramType!=null"> AND PARAM_TYPE=#{ew.entity.paramType}</if>
|
||||
<if test="ew.entity.paramUnit!=null"> AND PARAM_UNIT=#{ew.entity.paramUnit}</if>
|
||||
<if test="ew.entity.decimalNum!=null"> AND DECIMAL_NUM=#{ew.entity.decimalNum}</if>
|
||||
<if test="ew.entity.minValue!=null"> AND MIN_VALUE=#{ew.entity.minValue}</if>
|
||||
<if test="ew.entity.standardValue!=null"> AND STANDARD_VALUE=#{ew.entity.standardValue}</if>
|
||||
<if test="ew.entity.maxValue!=null"> AND MAX_VALUE=#{ew.entity.maxValue}</if>
|
||||
<if test="ew.entity.falseValue!=null"> AND FALSE_VALUE=#{ew.entity.falseValue}</if>
|
||||
<if test="ew.entity.trueValue!=null"> AND TRUE_VALUE=#{ew.entity.trueValue}</if>
|
||||
<if test="ew.entity.isRequired!=null"> AND IS_REQUIRED=#{ew.entity.isRequired}</if>
|
||||
<if test="ew.entity.checkNum!=null"> AND CHECK_NUM=#{ew.entity.checkNum}</if>
|
||||
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCount" resultType="Integer">
|
||||
SELECT COUNT(1) FROM Z_INSPECTION_PROJECT_DETAIL
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
</if>
|
||||
<if test="ew.entity.inspectProjectBo!=null"> AND INSPECT_PROJECT_BO=#{ew.entity.inspectProjectBo}</if>
|
||||
<if test="ew.entity.seq!=null"> AND SEQ=#{ew.entity.seq}</if>
|
||||
<if test="ew.entity.paramNo!=null"> AND PARAM_NO=#{ew.entity.paramNo}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.inspectMethod!=null"> AND INSPECT_METHOD=#{ew.entity.inspectMethod}</if>
|
||||
<if test="ew.entity.paramType!=null"> AND PARAM_TYPE=#{ew.entity.paramType}</if>
|
||||
<if test="ew.entity.paramUnit!=null"> AND PARAM_UNIT=#{ew.entity.paramUnit}</if>
|
||||
<if test="ew.entity.decimalNum!=null"> AND DECIMAL_NUM=#{ew.entity.decimalNum}</if>
|
||||
<if test="ew.entity.minValue!=null"> AND MIN_VALUE=#{ew.entity.minValue}</if>
|
||||
<if test="ew.entity.standardValue!=null"> AND STANDARD_VALUE=#{ew.entity.standardValue}</if>
|
||||
<if test="ew.entity.maxValue!=null"> AND MAX_VALUE=#{ew.entity.maxValue}</if>
|
||||
<if test="ew.entity.falseValue!=null"> AND FALSE_VALUE=#{ew.entity.falseValue}</if>
|
||||
<if test="ew.entity.trueValue!=null"> AND TRUE_VALUE=#{ew.entity.trueValue}</if>
|
||||
<if test="ew.entity.isRequired!=null"> AND IS_REQUIRED=#{ew.entity.isRequired}</if>
|
||||
<if test="ew.entity.checkNum!=null"> AND CHECK_NUM=#{ew.entity.checkNum}</if>
|
||||
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectList" resultMap="BaseResultMap">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_INSPECTION_PROJECT_DETAIL
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
</if>
|
||||
<if test="ew.entity.inspectProjectBo!=null"> AND INSPECT_PROJECT_BO=#{ew.entity.inspectProjectBo}</if>
|
||||
<if test="ew.entity.seq!=null"> AND SEQ=#{ew.entity.seq}</if>
|
||||
<if test="ew.entity.paramNo!=null"> AND PARAM_NO=#{ew.entity.paramNo}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.inspectMethod!=null"> AND INSPECT_METHOD=#{ew.entity.inspectMethod}</if>
|
||||
<if test="ew.entity.paramType!=null"> AND PARAM_TYPE=#{ew.entity.paramType}</if>
|
||||
<if test="ew.entity.paramUnit!=null"> AND PARAM_UNIT=#{ew.entity.paramUnit}</if>
|
||||
<if test="ew.entity.decimalNum!=null"> AND DECIMAL_NUM=#{ew.entity.decimalNum}</if>
|
||||
<if test="ew.entity.minValue!=null"> AND MIN_VALUE=#{ew.entity.minValue}</if>
|
||||
<if test="ew.entity.standardValue!=null"> AND STANDARD_VALUE=#{ew.entity.standardValue}</if>
|
||||
<if test="ew.entity.maxValue!=null"> AND MAX_VALUE=#{ew.entity.maxValue}</if>
|
||||
<if test="ew.entity.falseValue!=null"> AND FALSE_VALUE=#{ew.entity.falseValue}</if>
|
||||
<if test="ew.entity.trueValue!=null"> AND TRUE_VALUE=#{ew.entity.trueValue}</if>
|
||||
<if test="ew.entity.isRequired!=null"> AND IS_REQUIRED=#{ew.entity.isRequired}</if>
|
||||
<if test="ew.entity.checkNum!=null"> AND CHECK_NUM=#{ew.entity.checkNum}</if>
|
||||
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectMaps" resultType="HashMap">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_INSPECTION_PROJECT_DETAIL
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
</if>
|
||||
<if test="ew.entity.inspectProjectBo!=null"> AND INSPECT_PROJECT_BO=#{ew.entity.inspectProjectBo}</if>
|
||||
<if test="ew.entity.seq!=null"> AND SEQ=#{ew.entity.seq}</if>
|
||||
<if test="ew.entity.paramNo!=null"> AND PARAM_NO=#{ew.entity.paramNo}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.inspectMethod!=null"> AND INSPECT_METHOD=#{ew.entity.inspectMethod}</if>
|
||||
<if test="ew.entity.paramType!=null"> AND PARAM_TYPE=#{ew.entity.paramType}</if>
|
||||
<if test="ew.entity.paramUnit!=null"> AND PARAM_UNIT=#{ew.entity.paramUnit}</if>
|
||||
<if test="ew.entity.decimalNum!=null"> AND DECIMAL_NUM=#{ew.entity.decimalNum}</if>
|
||||
<if test="ew.entity.minValue!=null"> AND MIN_VALUE=#{ew.entity.minValue}</if>
|
||||
<if test="ew.entity.standardValue!=null"> AND STANDARD_VALUE=#{ew.entity.standardValue}</if>
|
||||
<if test="ew.entity.maxValue!=null"> AND MAX_VALUE=#{ew.entity.maxValue}</if>
|
||||
<if test="ew.entity.falseValue!=null"> AND FALSE_VALUE=#{ew.entity.falseValue}</if>
|
||||
<if test="ew.entity.trueValue!=null"> AND TRUE_VALUE=#{ew.entity.trueValue}</if>
|
||||
<if test="ew.entity.isRequired!=null"> AND IS_REQUIRED=#{ew.entity.isRequired}</if>
|
||||
<if test="ew.entity.checkNum!=null"> AND CHECK_NUM=#{ew.entity.checkNum}</if>
|
||||
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectObjs" resultType="Object">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_INSPECTION_PROJECT_DETAIL
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
</if>
|
||||
<if test="ew.entity.inspectProjectBo!=null"> AND INSPECT_PROJECT_BO=#{ew.entity.inspectProjectBo}</if>
|
||||
<if test="ew.entity.seq!=null"> AND SEQ=#{ew.entity.seq}</if>
|
||||
<if test="ew.entity.paramNo!=null"> AND PARAM_NO=#{ew.entity.paramNo}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.inspectMethod!=null"> AND INSPECT_METHOD=#{ew.entity.inspectMethod}</if>
|
||||
<if test="ew.entity.paramType!=null"> AND PARAM_TYPE=#{ew.entity.paramType}</if>
|
||||
<if test="ew.entity.paramUnit!=null"> AND PARAM_UNIT=#{ew.entity.paramUnit}</if>
|
||||
<if test="ew.entity.decimalNum!=null"> AND DECIMAL_NUM=#{ew.entity.decimalNum}</if>
|
||||
<if test="ew.entity.minValue!=null"> AND MIN_VALUE=#{ew.entity.minValue}</if>
|
||||
<if test="ew.entity.standardValue!=null"> AND STANDARD_VALUE=#{ew.entity.standardValue}</if>
|
||||
<if test="ew.entity.maxValue!=null"> AND MAX_VALUE=#{ew.entity.maxValue}</if>
|
||||
<if test="ew.entity.falseValue!=null"> AND FALSE_VALUE=#{ew.entity.falseValue}</if>
|
||||
<if test="ew.entity.trueValue!=null"> AND TRUE_VALUE=#{ew.entity.trueValue}</if>
|
||||
<if test="ew.entity.isRequired!=null"> AND IS_REQUIRED=#{ew.entity.isRequired}</if>
|
||||
<if test="ew.entity.checkNum!=null"> AND CHECK_NUM=#{ew.entity.checkNum}</if>
|
||||
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectPage" resultMap="BaseResultMap">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_INSPECTION_PROJECT_DETAIL
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
</if>
|
||||
<if test="ew.entity.inspectProjectBo!=null"> AND INSPECT_PROJECT_BO=#{ew.entity.inspectProjectBo}</if>
|
||||
<if test="ew.entity.seq!=null"> AND SEQ=#{ew.entity.seq}</if>
|
||||
<if test="ew.entity.paramNo!=null"> AND PARAM_NO=#{ew.entity.paramNo}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.inspectMethod!=null"> AND INSPECT_METHOD=#{ew.entity.inspectMethod}</if>
|
||||
<if test="ew.entity.paramType!=null"> AND PARAM_TYPE=#{ew.entity.paramType}</if>
|
||||
<if test="ew.entity.paramUnit!=null"> AND PARAM_UNIT=#{ew.entity.paramUnit}</if>
|
||||
<if test="ew.entity.decimalNum!=null"> AND DECIMAL_NUM=#{ew.entity.decimalNum}</if>
|
||||
<if test="ew.entity.minValue!=null"> AND MIN_VALUE=#{ew.entity.minValue}</if>
|
||||
<if test="ew.entity.standardValue!=null"> AND STANDARD_VALUE=#{ew.entity.standardValue}</if>
|
||||
<if test="ew.entity.maxValue!=null"> AND MAX_VALUE=#{ew.entity.maxValue}</if>
|
||||
<if test="ew.entity.falseValue!=null"> AND FALSE_VALUE=#{ew.entity.falseValue}</if>
|
||||
<if test="ew.entity.trueValue!=null"> AND TRUE_VALUE=#{ew.entity.trueValue}</if>
|
||||
<if test="ew.entity.isRequired!=null"> AND IS_REQUIRED=#{ew.entity.isRequired}</if>
|
||||
<if test="ew.entity.checkNum!=null"> AND CHECK_NUM=#{ew.entity.checkNum}</if>
|
||||
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectMapsPage" resultType="HashMap">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_INSPECTION_PROJECT_DETAIL
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
</if>
|
||||
<if test="ew.entity.inspectProjectBo!=null"> AND INSPECT_PROJECT_BO=#{ew.entity.inspectProjectBo}</if>
|
||||
<if test="ew.entity.seq!=null"> AND SEQ=#{ew.entity.seq}</if>
|
||||
<if test="ew.entity.paramNo!=null"> AND PARAM_NO=#{ew.entity.paramNo}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.inspectMethod!=null"> AND INSPECT_METHOD=#{ew.entity.inspectMethod}</if>
|
||||
<if test="ew.entity.paramType!=null"> AND PARAM_TYPE=#{ew.entity.paramType}</if>
|
||||
<if test="ew.entity.paramUnit!=null"> AND PARAM_UNIT=#{ew.entity.paramUnit}</if>
|
||||
<if test="ew.entity.decimalNum!=null"> AND DECIMAL_NUM=#{ew.entity.decimalNum}</if>
|
||||
<if test="ew.entity.minValue!=null"> AND MIN_VALUE=#{ew.entity.minValue}</if>
|
||||
<if test="ew.entity.standardValue!=null"> AND STANDARD_VALUE=#{ew.entity.standardValue}</if>
|
||||
<if test="ew.entity.maxValue!=null"> AND MAX_VALUE=#{ew.entity.maxValue}</if>
|
||||
<if test="ew.entity.falseValue!=null"> AND FALSE_VALUE=#{ew.entity.falseValue}</if>
|
||||
<if test="ew.entity.trueValue!=null"> AND TRUE_VALUE=#{ew.entity.trueValue}</if>
|
||||
<if test="ew.entity.isRequired!=null"> AND IS_REQUIRED=#{ew.entity.isRequired}</if>
|
||||
<if test="ew.entity.checkNum!=null"> AND CHECK_NUM=#{ew.entity.checkNum}</if>
|
||||
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="com.foreverwin.mesnac.quality.model.InspectionProjectDetail">
|
||||
INSERT INTO Z_INSPECTION_PROJECT_DETAIL
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
HANDLE,
|
||||
<if test="inspectProjectBo!=null">INSPECT_PROJECT_BO,</if>
|
||||
<if test="seq!=null">SEQ,</if>
|
||||
<if test="paramNo!=null">PARAM_NO,</if>
|
||||
<if test="description!=null">DESCRIPTION,</if>
|
||||
<if test="inspectMethod!=null">INSPECT_METHOD,</if>
|
||||
<if test="paramType!=null">PARAM_TYPE,</if>
|
||||
<if test="paramUnit!=null">PARAM_UNIT,</if>
|
||||
<if test="decimalNum!=null">DECIMAL_NUM,</if>
|
||||
<if test="minValue!=null">MIN_VALUE,</if>
|
||||
<if test="standardValue!=null">STANDARD_VALUE,</if>
|
||||
<if test="maxValue!=null">MAX_VALUE,</if>
|
||||
<if test="falseValue!=null">FALSE_VALUE,</if>
|
||||
<if test="trueValue!=null">TRUE_VALUE,</if>
|
||||
<if test="isRequired!=null">IS_REQUIRED,</if>
|
||||
<if test="checkNum!=null">CHECK_NUM,</if>
|
||||
<if test="createUser!=null">CREATE_USER,</if>
|
||||
<if test="createdDateTime!=null">CREATED_DATE_TIME,</if>
|
||||
<if test="modifyUser!=null">MODIFY_USER,</if>
|
||||
<if test="modifiedDateTime!=null">MODIFIED_DATE_TIME,</if>
|
||||
</trim> VALUES
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
#{handle},
|
||||
<if test="inspectProjectBo!=null">#{inspectProjectBo},</if>
|
||||
<if test="seq!=null">#{seq},</if>
|
||||
<if test="paramNo!=null">#{paramNo},</if>
|
||||
<if test="description!=null">#{description},</if>
|
||||
<if test="inspectMethod!=null">#{inspectMethod},</if>
|
||||
<if test="paramType!=null">#{paramType},</if>
|
||||
<if test="paramUnit!=null">#{paramUnit},</if>
|
||||
<if test="decimalNum!=null">#{decimalNum},</if>
|
||||
<if test="minValue!=null">#{minValue},</if>
|
||||
<if test="standardValue!=null">#{standardValue},</if>
|
||||
<if test="maxValue!=null">#{maxValue},</if>
|
||||
<if test="falseValue!=null">#{falseValue},</if>
|
||||
<if test="trueValue!=null">#{trueValue},</if>
|
||||
<if test="isRequired!=null">#{isRequired},</if>
|
||||
<if test="checkNum!=null">#{checkNum},</if>
|
||||
<if test="createUser!=null">#{createUser},</if>
|
||||
<if test="createdDateTime!=null">#{createdDateTime},</if>
|
||||
<if test="modifyUser!=null">#{modifyUser},</if>
|
||||
<if test="modifiedDateTime!=null">#{modifiedDateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<insert id="insertAllColumn" parameterType="com.foreverwin.mesnac.quality.model.InspectionProjectDetail">
|
||||
INSERT INTO Z_INSPECTION_PROJECT_DETAIL
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<include refid="Base_Column_List"></include>
|
||||
</trim> VALUES
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
#{handle},
|
||||
#{inspectProjectBo},
|
||||
#{seq},
|
||||
#{paramNo},
|
||||
#{description},
|
||||
#{inspectMethod},
|
||||
#{paramType},
|
||||
#{paramUnit},
|
||||
#{decimalNum},
|
||||
#{minValue},
|
||||
#{standardValue},
|
||||
#{maxValue},
|
||||
#{falseValue},
|
||||
#{trueValue},
|
||||
#{isRequired},
|
||||
#{checkNum},
|
||||
#{createUser},
|
||||
#{createdDateTime},
|
||||
#{modifyUser},
|
||||
#{modifiedDateTime},
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
||||
<update id="updateById">
|
||||
UPDATE Z_INSPECTION_PROJECT_DETAIL <trim prefix="SET" suffixOverrides=",">
|
||||
<if test="et.inspectProjectBo!=null">INSPECT_PROJECT_BO=#{et.inspectProjectBo},</if>
|
||||
<if test="et.seq!=null">SEQ=#{et.seq},</if>
|
||||
<if test="et.paramNo!=null">PARAM_NO=#{et.paramNo},</if>
|
||||
<if test="et.description!=null">DESCRIPTION=#{et.description},</if>
|
||||
<if test="et.inspectMethod!=null">INSPECT_METHOD=#{et.inspectMethod},</if>
|
||||
<if test="et.paramType!=null">PARAM_TYPE=#{et.paramType},</if>
|
||||
<if test="et.paramUnit!=null">PARAM_UNIT=#{et.paramUnit},</if>
|
||||
<if test="et.decimalNum!=null">DECIMAL_NUM=#{et.decimalNum},</if>
|
||||
<if test="et.minValue!=null">MIN_VALUE=#{et.minValue},</if>
|
||||
<if test="et.standardValue!=null">STANDARD_VALUE=#{et.standardValue},</if>
|
||||
<if test="et.maxValue!=null">MAX_VALUE=#{et.maxValue},</if>
|
||||
<if test="et.falseValue!=null">FALSE_VALUE=#{et.falseValue},</if>
|
||||
<if test="et.trueValue!=null">TRUE_VALUE=#{et.trueValue},</if>
|
||||
<if test="et.isRequired!=null">IS_REQUIRED=#{et.isRequired},</if>
|
||||
<if test="et.checkNum!=null">CHECK_NUM=#{et.checkNum},</if>
|
||||
<if test="et.createUser!=null">CREATE_USER=#{et.createUser},</if>
|
||||
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
|
||||
<if test="et.modifyUser!=null">MODIFY_USER=#{et.modifyUser},</if>
|
||||
<if test="et.modifiedDateTime!=null">MODIFIED_DATE_TIME=#{et.modifiedDateTime},</if>
|
||||
</trim> WHERE HANDLE=#{et.handle} <if test="et instanceof java.util.Map"><if test="et.MP_OPTLOCK_VERSION_ORIGINAL!=null">and ${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}</if></if>
|
||||
</update>
|
||||
|
||||
|
||||
<update id="updateAllColumnById">
|
||||
UPDATE Z_INSPECTION_PROJECT_DETAIL <trim prefix="SET" suffixOverrides=",">
|
||||
INSPECT_PROJECT_BO=#{et.inspectProjectBo},
|
||||
SEQ=#{et.seq},
|
||||
PARAM_NO=#{et.paramNo},
|
||||
DESCRIPTION=#{et.description},
|
||||
INSPECT_METHOD=#{et.inspectMethod},
|
||||
PARAM_TYPE=#{et.paramType},
|
||||
PARAM_UNIT=#{et.paramUnit},
|
||||
DECIMAL_NUM=#{et.decimalNum},
|
||||
MIN_VALUE=#{et.minValue},
|
||||
STANDARD_VALUE=#{et.standardValue},
|
||||
MAX_VALUE=#{et.maxValue},
|
||||
FALSE_VALUE=#{et.falseValue},
|
||||
TRUE_VALUE=#{et.trueValue},
|
||||
IS_REQUIRED=#{et.isRequired},
|
||||
CHECK_NUM=#{et.checkNum},
|
||||
CREATE_USER=#{et.createUser},
|
||||
CREATED_DATE_TIME=#{et.createdDateTime},
|
||||
MODIFY_USER=#{et.modifyUser},
|
||||
MODIFIED_DATE_TIME=#{et.modifiedDateTime},
|
||||
</trim> WHERE HANDLE=#{et.handle} <if test="et instanceof java.util.Map"><if test="et.MP_OPTLOCK_VERSION_ORIGINAL!=null">and ${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}</if></if>
|
||||
</update>
|
||||
|
||||
|
||||
<update id="update">
|
||||
UPDATE Z_INSPECTION_PROJECT_DETAIL <trim prefix="SET" suffixOverrides=",">
|
||||
<if test="et.inspectProjectBo!=null">INSPECT_PROJECT_BO=#{et.inspectProjectBo},</if>
|
||||
<if test="et.seq!=null">SEQ=#{et.seq},</if>
|
||||
<if test="et.paramNo!=null">PARAM_NO=#{et.paramNo},</if>
|
||||
<if test="et.description!=null">DESCRIPTION=#{et.description},</if>
|
||||
<if test="et.inspectMethod!=null">INSPECT_METHOD=#{et.inspectMethod},</if>
|
||||
<if test="et.paramType!=null">PARAM_TYPE=#{et.paramType},</if>
|
||||
<if test="et.paramUnit!=null">PARAM_UNIT=#{et.paramUnit},</if>
|
||||
<if test="et.decimalNum!=null">DECIMAL_NUM=#{et.decimalNum},</if>
|
||||
<if test="et.minValue!=null">MIN_VALUE=#{et.minValue},</if>
|
||||
<if test="et.standardValue!=null">STANDARD_VALUE=#{et.standardValue},</if>
|
||||
<if test="et.maxValue!=null">MAX_VALUE=#{et.maxValue},</if>
|
||||
<if test="et.falseValue!=null">FALSE_VALUE=#{et.falseValue},</if>
|
||||
<if test="et.trueValue!=null">TRUE_VALUE=#{et.trueValue},</if>
|
||||
<if test="et.isRequired!=null">IS_REQUIRED=#{et.isRequired},</if>
|
||||
<if test="et.checkNum!=null">CHECK_NUM=#{et.checkNum},</if>
|
||||
<if test="et.createUser!=null">CREATE_USER=#{et.createUser},</if>
|
||||
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
|
||||
<if test="et.modifyUser!=null">MODIFY_USER=#{et.modifyUser},</if>
|
||||
<if test="et.modifiedDateTime!=null">MODIFIED_DATE_TIME=#{et.modifiedDateTime},</if>
|
||||
</trim>
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
<if test="ew.entity.inspectProjectBo!=null"> AND INSPECT_PROJECT_BO=#{ew.entity.inspectProjectBo}</if>
|
||||
<if test="ew.entity.seq!=null"> AND SEQ=#{ew.entity.seq}</if>
|
||||
<if test="ew.entity.paramNo!=null"> AND PARAM_NO=#{ew.entity.paramNo}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.inspectMethod!=null"> AND INSPECT_METHOD=#{ew.entity.inspectMethod}</if>
|
||||
<if test="ew.entity.paramType!=null"> AND PARAM_TYPE=#{ew.entity.paramType}</if>
|
||||
<if test="ew.entity.paramUnit!=null"> AND PARAM_UNIT=#{ew.entity.paramUnit}</if>
|
||||
<if test="ew.entity.decimalNum!=null"> AND DECIMAL_NUM=#{ew.entity.decimalNum}</if>
|
||||
<if test="ew.entity.minValue!=null"> AND MIN_VALUE=#{ew.entity.minValue}</if>
|
||||
<if test="ew.entity.standardValue!=null"> AND STANDARD_VALUE=#{ew.entity.standardValue}</if>
|
||||
<if test="ew.entity.maxValue!=null"> AND MAX_VALUE=#{ew.entity.maxValue}</if>
|
||||
<if test="ew.entity.falseValue!=null"> AND FALSE_VALUE=#{ew.entity.falseValue}</if>
|
||||
<if test="ew.entity.trueValue!=null"> AND TRUE_VALUE=#{ew.entity.trueValue}</if>
|
||||
<if test="ew.entity.isRequired!=null"> AND IS_REQUIRED=#{ew.entity.isRequired}</if>
|
||||
<if test="ew.entity.checkNum!=null"> AND CHECK_NUM=#{ew.entity.checkNum}</if>
|
||||
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</update>
|
||||
|
||||
<delete id="deleteById">
|
||||
DELETE FROM Z_INSPECTION_PROJECT_DETAIL WHERE HANDLE=#{handle}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByMap">
|
||||
DELETE FROM Z_INSPECTION_PROJECT_DETAIL
|
||||
<if test="cm!=null and !cm.isEmpty">
|
||||
<where>
|
||||
<foreach collection="cm.keys" item="k" separator="AND">
|
||||
<if test="cm[k] != null">
|
||||
${k} = #{cm[${k}]}
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</if>
|
||||
</delete>
|
||||
|
||||
<delete id="delete">
|
||||
DELETE FROM Z_INSPECTION_PROJECT_DETAIL
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
</if>
|
||||
<if test="ew.entity.inspectProjectBo!=null"> AND INSPECT_PROJECT_BO=#{ew.entity.inspectProjectBo}</if>
|
||||
<if test="ew.entity.seq!=null"> AND SEQ=#{ew.entity.seq}</if>
|
||||
<if test="ew.entity.paramNo!=null"> AND PARAM_NO=#{ew.entity.paramNo}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.inspectMethod!=null"> AND INSPECT_METHOD=#{ew.entity.inspectMethod}</if>
|
||||
<if test="ew.entity.paramType!=null"> AND PARAM_TYPE=#{ew.entity.paramType}</if>
|
||||
<if test="ew.entity.paramUnit!=null"> AND PARAM_UNIT=#{ew.entity.paramUnit}</if>
|
||||
<if test="ew.entity.decimalNum!=null"> AND DECIMAL_NUM=#{ew.entity.decimalNum}</if>
|
||||
<if test="ew.entity.minValue!=null"> AND MIN_VALUE=#{ew.entity.minValue}</if>
|
||||
<if test="ew.entity.standardValue!=null"> AND STANDARD_VALUE=#{ew.entity.standardValue}</if>
|
||||
<if test="ew.entity.maxValue!=null"> AND MAX_VALUE=#{ew.entity.maxValue}</if>
|
||||
<if test="ew.entity.falseValue!=null"> AND FALSE_VALUE=#{ew.entity.falseValue}</if>
|
||||
<if test="ew.entity.trueValue!=null"> AND TRUE_VALUE=#{ew.entity.trueValue}</if>
|
||||
<if test="ew.entity.isRequired!=null"> AND IS_REQUIRED=#{ew.entity.isRequired}</if>
|
||||
<if test="ew.entity.checkNum!=null"> AND CHECK_NUM=#{ew.entity.checkNum}</if>
|
||||
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBatchIds">
|
||||
DELETE FROM Z_INSPECTION_PROJECT_DETAIL WHERE HANDLE IN (
|
||||
<foreach item="item" index="index" collection="coll" separator=",">#{item}
|
||||
</foreach>)
|
||||
</delete>
|
||||
<!-- BaseMapper标准查询/修改/删除 -->
|
||||
|
||||
</mapper>
|
@ -1,520 +0,0 @@
|
||||
<?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.quality.mapper.InspectionProjectMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.foreverwin.mesnac.quality.model.InspectionProject">
|
||||
<id column="HANDLE" property="handle" />
|
||||
<result column="SITE" property="site" />
|
||||
<result column="INSPECT_PROJECT_NO" property="inspectProjectNo" />
|
||||
<result column="INSPECT_TYPE" property="inspectType" />
|
||||
<result column="REVISION" property="revision" />
|
||||
<result column="CURRENT_REVISION" property="currentRevision" />
|
||||
<result column="DESCRIPTION" property="description" />
|
||||
<result column="STATUS" property="status" />
|
||||
<result column="ITEM_BO" property="itemBo" />
|
||||
<result column="ITEM" property="item" />
|
||||
<result column="OPERATION" property="operation" />
|
||||
<result column="STEP_ID" property="stepId" />
|
||||
<result column="SUB_STEP" property="subStep" />
|
||||
<result column="CREATE_USER" property="createUser" />
|
||||
<result column="CREATED_DATE_TIME" property="createdDateTime" />
|
||||
<result column="MODIFY_USER" property="modifyUser" />
|
||||
<result column="MODIFIED_DATE_TIME" property="modifiedDateTime" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
HANDLE, SITE, INSPECT_PROJECT_NO, INSPECT_TYPE, REVISION, CURRENT_REVISION, DESCRIPTION, STATUS, ITEM_BO, ITEM, OPERATION, STEP_ID, SUB_STEP, CREATE_USER, CREATED_DATE_TIME, MODIFY_USER, MODIFIED_DATE_TIME
|
||||
</sql>
|
||||
|
||||
<!-- BaseMapper标准查询/修改/删除 -->
|
||||
<select id="selectById" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"></include> FROM Z_INSPECTION_PROJECT WHERE HANDLE=#{handle}
|
||||
</select>
|
||||
|
||||
<select id="selectByMap" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"></include>
|
||||
FROM Z_INSPECTION_PROJECT
|
||||
<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_INSPECTION_PROJECT 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_INSPECTION_PROJECT
|
||||
<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.inspectProjectNo!=null"> AND INSPECT_PROJECT_NO=#{ew.entity.inspectProjectNo}</if>
|
||||
<if test="ew.entity.inspectType!=null"> AND INSPECT_TYPE=#{ew.entity.inspectType}</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.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
|
||||
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
|
||||
<if test="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
|
||||
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
|
||||
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
|
||||
<if test="ew.entity.subStep!=null"> AND SUB_STEP=#{ew.entity.subStep}</if>
|
||||
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCount" resultType="Integer">
|
||||
SELECT COUNT(1) FROM Z_INSPECTION_PROJECT
|
||||
<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.inspectProjectNo!=null"> AND INSPECT_PROJECT_NO=#{ew.entity.inspectProjectNo}</if>
|
||||
<if test="ew.entity.inspectType!=null"> AND INSPECT_TYPE=#{ew.entity.inspectType}</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.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
|
||||
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
|
||||
<if test="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
|
||||
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
|
||||
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
|
||||
<if test="ew.entity.subStep!=null"> AND SUB_STEP=#{ew.entity.subStep}</if>
|
||||
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectList" resultMap="BaseResultMap">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_INSPECTION_PROJECT
|
||||
<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.inspectProjectNo!=null"> AND INSPECT_PROJECT_NO=#{ew.entity.inspectProjectNo}</if>
|
||||
<if test="ew.entity.inspectType!=null"> AND INSPECT_TYPE=#{ew.entity.inspectType}</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.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
|
||||
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
|
||||
<if test="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
|
||||
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
|
||||
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
|
||||
<if test="ew.entity.subStep!=null"> AND SUB_STEP=#{ew.entity.subStep}</if>
|
||||
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectMaps" resultType="HashMap">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_INSPECTION_PROJECT
|
||||
<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.inspectProjectNo!=null"> AND INSPECT_PROJECT_NO=#{ew.entity.inspectProjectNo}</if>
|
||||
<if test="ew.entity.inspectType!=null"> AND INSPECT_TYPE=#{ew.entity.inspectType}</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.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
|
||||
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
|
||||
<if test="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
|
||||
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
|
||||
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
|
||||
<if test="ew.entity.subStep!=null"> AND SUB_STEP=#{ew.entity.subStep}</if>
|
||||
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectObjs" resultType="Object">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_INSPECTION_PROJECT
|
||||
<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.inspectProjectNo!=null"> AND INSPECT_PROJECT_NO=#{ew.entity.inspectProjectNo}</if>
|
||||
<if test="ew.entity.inspectType!=null"> AND INSPECT_TYPE=#{ew.entity.inspectType}</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.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
|
||||
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
|
||||
<if test="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
|
||||
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
|
||||
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
|
||||
<if test="ew.entity.subStep!=null"> AND SUB_STEP=#{ew.entity.subStep}</if>
|
||||
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectPage" resultMap="BaseResultMap">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_INSPECTION_PROJECT
|
||||
<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.inspectProjectNo!=null"> AND INSPECT_PROJECT_NO=#{ew.entity.inspectProjectNo}</if>
|
||||
<if test="ew.entity.inspectType!=null"> AND INSPECT_TYPE=#{ew.entity.inspectType}</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.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
|
||||
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
|
||||
<if test="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
|
||||
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
|
||||
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
|
||||
<if test="ew.entity.subStep!=null"> AND SUB_STEP=#{ew.entity.subStep}</if>
|
||||
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectMapsPage" resultType="HashMap">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_INSPECTION_PROJECT
|
||||
<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.inspectProjectNo!=null"> AND INSPECT_PROJECT_NO=#{ew.entity.inspectProjectNo}</if>
|
||||
<if test="ew.entity.inspectType!=null"> AND INSPECT_TYPE=#{ew.entity.inspectType}</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.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
|
||||
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
|
||||
<if test="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
|
||||
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
|
||||
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
|
||||
<if test="ew.entity.subStep!=null"> AND SUB_STEP=#{ew.entity.subStep}</if>
|
||||
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="com.foreverwin.mesnac.quality.model.InspectionProject">
|
||||
INSERT INTO Z_INSPECTION_PROJECT
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
HANDLE,
|
||||
<if test="site!=null">SITE,</if>
|
||||
<if test="inspectProjectNo!=null">INSPECT_PROJECT_NO,</if>
|
||||
<if test="inspectType!=null">INSPECT_TYPE,</if>
|
||||
<if test="revision!=null">REVISION,</if>
|
||||
<if test="currentRevision!=null">CURRENT_REVISION,</if>
|
||||
<if test="description!=null">DESCRIPTION,</if>
|
||||
<if test="status!=null">STATUS,</if>
|
||||
<if test="itemBo!=null">ITEM_BO,</if>
|
||||
<if test="item!=null">ITEM,</if>
|
||||
<if test="operation!=null">OPERATION,</if>
|
||||
<if test="stepId!=null">STEP_ID,</if>
|
||||
<if test="subStep!=null">SUB_STEP,</if>
|
||||
<if test="createUser!=null">CREATE_USER,</if>
|
||||
<if test="createdDateTime!=null">CREATED_DATE_TIME,</if>
|
||||
<if test="modifyUser!=null">MODIFY_USER,</if>
|
||||
<if test="modifiedDateTime!=null">MODIFIED_DATE_TIME,</if>
|
||||
</trim> VALUES
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
#{handle},
|
||||
<if test="site!=null">#{site},</if>
|
||||
<if test="inspectProjectNo!=null">#{inspectProjectNo},</if>
|
||||
<if test="inspectType!=null">#{inspectType},</if>
|
||||
<if test="revision!=null">#{revision},</if>
|
||||
<if test="currentRevision!=null">#{currentRevision},</if>
|
||||
<if test="description!=null">#{description},</if>
|
||||
<if test="status!=null">#{status},</if>
|
||||
<if test="itemBo!=null">#{itemBo},</if>
|
||||
<if test="item!=null">#{item},</if>
|
||||
<if test="operation!=null">#{operation},</if>
|
||||
<if test="stepId!=null">#{stepId},</if>
|
||||
<if test="subStep!=null">#{subStep},</if>
|
||||
<if test="createUser!=null">#{createUser},</if>
|
||||
<if test="createdDateTime!=null">#{createdDateTime},</if>
|
||||
<if test="modifyUser!=null">#{modifyUser},</if>
|
||||
<if test="modifiedDateTime!=null">#{modifiedDateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<insert id="insertAllColumn" parameterType="com.foreverwin.mesnac.quality.model.InspectionProject">
|
||||
INSERT INTO Z_INSPECTION_PROJECT
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<include refid="Base_Column_List"></include>
|
||||
</trim> VALUES
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
#{handle},
|
||||
#{site},
|
||||
#{inspectProjectNo},
|
||||
#{inspectType},
|
||||
#{revision},
|
||||
#{currentRevision},
|
||||
#{description},
|
||||
#{status},
|
||||
#{itemBo},
|
||||
#{item},
|
||||
#{operation},
|
||||
#{stepId},
|
||||
#{subStep},
|
||||
#{createUser},
|
||||
#{createdDateTime},
|
||||
#{modifyUser},
|
||||
#{modifiedDateTime},
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
||||
<update id="updateById">
|
||||
UPDATE Z_INSPECTION_PROJECT <trim prefix="SET" suffixOverrides=",">
|
||||
<if test="et.site!=null">SITE=#{et.site},</if>
|
||||
<if test="et.inspectProjectNo!=null">INSPECT_PROJECT_NO=#{et.inspectProjectNo},</if>
|
||||
<if test="et.inspectType!=null">INSPECT_TYPE=#{et.inspectType},</if>
|
||||
<if test="et.revision!=null">REVISION=#{et.revision},</if>
|
||||
<if test="et.currentRevision!=null">CURRENT_REVISION=#{et.currentRevision},</if>
|
||||
<if test="et.description!=null">DESCRIPTION=#{et.description},</if>
|
||||
<if test="et.status!=null">STATUS=#{et.status},</if>
|
||||
<if test="et.itemBo!=null">ITEM_BO=#{et.itemBo},</if>
|
||||
<if test="et.item!=null">ITEM=#{et.item},</if>
|
||||
<if test="et.operation!=null">OPERATION=#{et.operation},</if>
|
||||
<if test="et.stepId!=null">STEP_ID=#{et.stepId},</if>
|
||||
<if test="et.subStep!=null">SUB_STEP=#{et.subStep},</if>
|
||||
<if test="et.createUser!=null">CREATE_USER=#{et.createUser},</if>
|
||||
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
|
||||
<if test="et.modifyUser!=null">MODIFY_USER=#{et.modifyUser},</if>
|
||||
<if test="et.modifiedDateTime!=null">MODIFIED_DATE_TIME=#{et.modifiedDateTime},</if>
|
||||
</trim> WHERE HANDLE=#{et.handle} <if test="et instanceof java.util.Map"><if test="et.MP_OPTLOCK_VERSION_ORIGINAL!=null">and ${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}</if></if>
|
||||
</update>
|
||||
|
||||
|
||||
<update id="updateAllColumnById">
|
||||
UPDATE Z_INSPECTION_PROJECT <trim prefix="SET" suffixOverrides=",">
|
||||
SITE=#{et.site},
|
||||
INSPECT_PROJECT_NO=#{et.inspectProjectNo},
|
||||
INSPECT_TYPE=#{et.inspectType},
|
||||
REVISION=#{et.revision},
|
||||
CURRENT_REVISION=#{et.currentRevision},
|
||||
DESCRIPTION=#{et.description},
|
||||
STATUS=#{et.status},
|
||||
ITEM_BO=#{et.itemBo},
|
||||
ITEM=#{et.item},
|
||||
OPERATION=#{et.operation},
|
||||
STEP_ID=#{et.stepId},
|
||||
SUB_STEP=#{et.subStep},
|
||||
CREATE_USER=#{et.createUser},
|
||||
CREATED_DATE_TIME=#{et.createdDateTime},
|
||||
MODIFY_USER=#{et.modifyUser},
|
||||
MODIFIED_DATE_TIME=#{et.modifiedDateTime},
|
||||
</trim> WHERE HANDLE=#{et.handle} <if test="et instanceof java.util.Map"><if test="et.MP_OPTLOCK_VERSION_ORIGINAL!=null">and ${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}</if></if>
|
||||
</update>
|
||||
|
||||
|
||||
<update id="update">
|
||||
UPDATE Z_INSPECTION_PROJECT <trim prefix="SET" suffixOverrides=",">
|
||||
<if test="et.site!=null">SITE=#{et.site},</if>
|
||||
<if test="et.inspectProjectNo!=null">INSPECT_PROJECT_NO=#{et.inspectProjectNo},</if>
|
||||
<if test="et.inspectType!=null">INSPECT_TYPE=#{et.inspectType},</if>
|
||||
<if test="et.revision!=null">REVISION=#{et.revision},</if>
|
||||
<if test="et.currentRevision!=null">CURRENT_REVISION=#{et.currentRevision},</if>
|
||||
<if test="et.description!=null">DESCRIPTION=#{et.description},</if>
|
||||
<if test="et.status!=null">STATUS=#{et.status},</if>
|
||||
<if test="et.itemBo!=null">ITEM_BO=#{et.itemBo},</if>
|
||||
<if test="et.item!=null">ITEM=#{et.item},</if>
|
||||
<if test="et.operation!=null">OPERATION=#{et.operation},</if>
|
||||
<if test="et.stepId!=null">STEP_ID=#{et.stepId},</if>
|
||||
<if test="et.subStep!=null">SUB_STEP=#{et.subStep},</if>
|
||||
<if test="et.createUser!=null">CREATE_USER=#{et.createUser},</if>
|
||||
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
|
||||
<if test="et.modifyUser!=null">MODIFY_USER=#{et.modifyUser},</if>
|
||||
<if test="et.modifiedDateTime!=null">MODIFIED_DATE_TIME=#{et.modifiedDateTime},</if>
|
||||
</trim>
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||||
<if test="ew.entity.inspectProjectNo!=null"> AND INSPECT_PROJECT_NO=#{ew.entity.inspectProjectNo}</if>
|
||||
<if test="ew.entity.inspectType!=null"> AND INSPECT_TYPE=#{ew.entity.inspectType}</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.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
|
||||
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
|
||||
<if test="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
|
||||
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
|
||||
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
|
||||
<if test="ew.entity.subStep!=null"> AND SUB_STEP=#{ew.entity.subStep}</if>
|
||||
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</update>
|
||||
|
||||
<delete id="deleteById">
|
||||
DELETE FROM Z_INSPECTION_PROJECT WHERE HANDLE=#{handle}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByMap">
|
||||
DELETE FROM Z_INSPECTION_PROJECT
|
||||
<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_INSPECTION_PROJECT
|
||||
<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.inspectProjectNo!=null"> AND INSPECT_PROJECT_NO=#{ew.entity.inspectProjectNo}</if>
|
||||
<if test="ew.entity.inspectType!=null"> AND INSPECT_TYPE=#{ew.entity.inspectType}</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.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
|
||||
<if test="ew.entity.itemBo!=null"> AND ITEM_BO=#{ew.entity.itemBo}</if>
|
||||
<if test="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
|
||||
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
|
||||
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
|
||||
<if test="ew.entity.subStep!=null"> AND SUB_STEP=#{ew.entity.subStep}</if>
|
||||
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBatchIds">
|
||||
DELETE FROM Z_INSPECTION_PROJECT WHERE HANDLE IN (
|
||||
<foreach item="item" index="index" collection="coll" separator=",">#{item}
|
||||
</foreach>)
|
||||
</delete>
|
||||
<!-- BaseMapper标准查询/修改/删除 -->
|
||||
|
||||
<select id="findRevisionByCurrentRevision" resultType="java.lang.String">
|
||||
SELECT REVISION
|
||||
FROM Z_INSPECTION_PROJECT
|
||||
WHERE CURRENT_REVISION = 'true' AND INSPECT_PROJECT_NO = #{inspectProjectNo}
|
||||
AND SITE = #{site}
|
||||
</select>
|
||||
</mapper>
|
Loading…
Reference in New Issue