自报待办
parent
6112e89710
commit
220f1c026f
@ -0,0 +1,137 @@
|
|||||||
|
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.quality.model.SelfReport;
|
||||||
|
import com.foreverwin.mesnac.quality.service.SelfReportService;
|
||||||
|
import com.foreverwin.modular.core.util.CommonMethods;
|
||||||
|
import com.foreverwin.modular.core.util.FrontPage;
|
||||||
|
import com.foreverwin.modular.core.util.R;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.context.i18n.LocaleContextHolder;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Philip
|
||||||
|
* @since 2021-06-17
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/Z-SELF-REPORT")
|
||||||
|
public class SelfReportController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public SelfReportService selfReportService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ResponseBody
|
||||||
|
@GetMapping("/{id:.+}")
|
||||||
|
public R getSelfReportById(@PathVariable String id) {
|
||||||
|
return R.ok( selfReportService.getById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有数据
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ResponseBody
|
||||||
|
@GetMapping("/selectList")
|
||||||
|
public R getSelfReportList(SelfReport selfReport){
|
||||||
|
List<SelfReport> result;
|
||||||
|
QueryWrapper<SelfReport> queryWrapper = new QueryWrapper<>();
|
||||||
|
selfReport.setSite(CommonMethods.getSite());
|
||||||
|
queryWrapper.setEntity(selfReport);
|
||||||
|
result = selfReportService.selectList(queryWrapper, LocaleContextHolder.getLocale().getLanguage(),selfReport.getStartTime(),selfReport.getEndTime());
|
||||||
|
return R.ok(result);
|
||||||
|
}
|
||||||
|
@ResponseBody
|
||||||
|
@RequestMapping("/reject")
|
||||||
|
public R updateById(String handle){
|
||||||
|
return R.ok(selfReportService.reject(handle));
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 分页查询数据
|
||||||
|
*
|
||||||
|
* @param frontPage 分页信息
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ResponseBody
|
||||||
|
@GetMapping("/page")
|
||||||
|
public R page(FrontPage<SelfReport> frontPage, SelfReport selfReport){
|
||||||
|
IPage result;
|
||||||
|
QueryWrapper<SelfReport> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.setEntity(selfReport);
|
||||||
|
if (frontPage.getGlobalQuery() != null && !"".equals(frontPage.getGlobalQuery().trim())) {
|
||||||
|
//TODO modify global query
|
||||||
|
queryWrapper.lambda().and(wrapper -> wrapper
|
||||||
|
.like(SelfReport::getHandle, frontPage.getGlobalQuery())
|
||||||
|
.or().like(SelfReport::getSite, frontPage.getGlobalQuery())
|
||||||
|
.or().like(SelfReport::getTaskNo, frontPage.getGlobalQuery())
|
||||||
|
.or().like(SelfReport::getWorkCenter, frontPage.getGlobalQuery())
|
||||||
|
.or().like(SelfReport::getShopOrder, frontPage.getGlobalQuery())
|
||||||
|
.or().like(SelfReport::getItem, frontPage.getGlobalQuery())
|
||||||
|
.or().like(SelfReport::getOpStep, frontPage.getGlobalQuery())
|
||||||
|
.or().like(SelfReport::getResrce, frontPage.getGlobalQuery())
|
||||||
|
.or().like(SelfReport::getSfc, frontPage.getGlobalQuery())
|
||||||
|
.or().like(SelfReport::getNcCode, frontPage.getGlobalQuery())
|
||||||
|
.or().like(SelfReport::getLocation, frontPage.getGlobalQuery())
|
||||||
|
.or().like(SelfReport::getState, frontPage.getGlobalQuery())
|
||||||
|
.or().like(SelfReport::getRemark, frontPage.getGlobalQuery())
|
||||||
|
.or().like(SelfReport::getCreateUser, frontPage.getGlobalQuery())
|
||||||
|
.or().like(SelfReport::getModifyUser, frontPage.getGlobalQuery())
|
||||||
|
);
|
||||||
|
}
|
||||||
|
result = selfReportService.page(frontPage.getPagePlus(), queryWrapper);
|
||||||
|
return R.ok(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增
|
||||||
|
* @param selfReport 传递的实体
|
||||||
|
* @return null 失败 实体成功
|
||||||
|
*/
|
||||||
|
@PostMapping
|
||||||
|
public R save(@RequestBody SelfReport selfReport) {
|
||||||
|
return R.ok(selfReportService.save(selfReport));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改
|
||||||
|
* @param selfReport 传递的实体
|
||||||
|
* @return null 失败 实体成功
|
||||||
|
*/
|
||||||
|
@PutMapping
|
||||||
|
public R updateById(@RequestBody SelfReport selfReport) {
|
||||||
|
return R.ok(selfReportService.updateById(selfReport));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id删除对象
|
||||||
|
* @param id 实体ID
|
||||||
|
* @return 0 失败 1 成功
|
||||||
|
*/
|
||||||
|
@ResponseBody
|
||||||
|
@RequestMapping(method = RequestMethod.DELETE, value = "/{id:.+}")
|
||||||
|
public R removeById(@PathVariable("id") String id){
|
||||||
|
return R.ok(selfReportService.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(selfReportService.removeByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
package com.foreverwin.mesnac.quality.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.foreverwin.mesnac.quality.model.SelfReport;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 自报代办事项 Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author Philip
|
||||||
|
* @since 2021-06-17
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public interface SelfReportMapper extends BaseMapper<SelfReport> {
|
||||||
|
|
||||||
|
List<SelfReport> selectList(@Param("ew") QueryWrapper<SelfReport> ew, @Param("locale") String locale,@Param("startTime") LocalDate startTime,@Param("endTime") LocalDate endTime);
|
||||||
|
}
|
@ -0,0 +1,34 @@
|
|||||||
|
package com.foreverwin.mesnac.quality.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.foreverwin.mesnac.quality.model.SelfReport;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.foreverwin.modular.core.util.FrontPage;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 自报代办事项 服务类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author Philip
|
||||||
|
* @since 2021-06-17
|
||||||
|
*/
|
||||||
|
public interface SelfReportService extends IService<SelfReport> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
* @param frontPage
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
IPage<SelfReport> selectPage(FrontPage<SelfReport> frontPage, SelfReport selfReport);
|
||||||
|
|
||||||
|
List<SelfReport> selectList(SelfReport selfReport);
|
||||||
|
|
||||||
|
Object reject(String handle);
|
||||||
|
|
||||||
|
List<SelfReport> selectList(QueryWrapper<SelfReport> queryWrapper, String locale, LocalDate startTime, LocalDate endTime);
|
||||||
|
}
|
@ -0,0 +1,72 @@
|
|||||||
|
package com.foreverwin.mesnac.quality.service.impl;
|
||||||
|
|
||||||
|
import com.foreverwin.modular.core.util.CommonMethods;
|
||||||
|
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.SelfReport;
|
||||||
|
import com.foreverwin.mesnac.quality.mapper.SelfReportMapper;
|
||||||
|
import com.foreverwin.mesnac.quality.service.SelfReportService;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.visiprise.common.exception.BaseException;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 自报代办事项 服务实现类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author Philip
|
||||||
|
* @since 2021-06-17
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public class SelfReportServiceImpl extends ServiceImpl<SelfReportMapper, SelfReport> implements SelfReportService {
|
||||||
|
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SelfReportMapper selfReportMapper;
|
||||||
|
|
||||||
|
static final String STATE_NEW="NEW";
|
||||||
|
|
||||||
|
static final String STATE_CONFIRM="CONF";
|
||||||
|
|
||||||
|
static final String STATE_REJECT="REJ";
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage<SelfReport> selectPage(FrontPage<SelfReport> frontPage, SelfReport selfReport) {
|
||||||
|
QueryWrapper<SelfReport> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.setEntity(selfReport);
|
||||||
|
return super.page(frontPage.getPagePlus(), queryWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SelfReport> selectList(SelfReport selfReport) {
|
||||||
|
QueryWrapper<SelfReport> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.setEntity(selfReport);
|
||||||
|
return super.list(queryWrapper);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public List<SelfReport> selectList(QueryWrapper<SelfReport> queryWrapper, String locale, LocalDate startTime, LocalDate endTime) {
|
||||||
|
return selfReportMapper.selectList(queryWrapper,locale,startTime,endTime);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object reject(String handle) {
|
||||||
|
SelfReport selfReport = getById(handle);
|
||||||
|
if (!selfReport.getState().equals(STATE_NEW)){
|
||||||
|
throw new BaseException("状态不为新建,请重新检索");
|
||||||
|
}
|
||||||
|
selfReport.setState(STATE_REJECT);
|
||||||
|
selfReport.setModifiedDateTime(LocalDateTime.now());
|
||||||
|
selfReport.setModifyUser(CommonMethods.getUser());
|
||||||
|
return updateById(selfReport);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,534 @@
|
|||||||
|
<?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.SelfReportMapper">
|
||||||
|
|
||||||
|
<!-- 通用查询映射结果 -->
|
||||||
|
<resultMap id="BaseResultMap" type="com.foreverwin.mesnac.quality.model.SelfReport">
|
||||||
|
<id column="HANDLE" property="handle" />
|
||||||
|
<result column="SITE" property="site" />
|
||||||
|
<result column="TASK_NO" property="taskNo" />
|
||||||
|
<result column="WORK_CENTER" property="workCenter" />
|
||||||
|
<result column="SHOP_ORDER" property="shopOrder" />
|
||||||
|
<result column="ITEM" property="item" />
|
||||||
|
<result column="OP_STEP" property="opStep" />
|
||||||
|
<result column="RESRCE" property="resrce" />
|
||||||
|
<result column="SFC" property="sfc" />
|
||||||
|
<result column="NC_CODE" property="ncCode" />
|
||||||
|
<result column="NC_QTY" property="ncQty" />
|
||||||
|
<result column="LOCATION" property="location" />
|
||||||
|
<result column="STATE" property="state" />
|
||||||
|
<result column="REMARK" property="remark" />
|
||||||
|
<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, TASK_NO, WORK_CENTER, SHOP_ORDER, ITEM, OP_STEP, RESRCE, SFC, NC_CODE, NC_QTY, LOCATION, STATE, REMARK, 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_SELF_REPORT WHERE HANDLE=#{handle}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectByMap" resultMap="BaseResultMap">
|
||||||
|
SELECT <include refid="Base_Column_List"></include>
|
||||||
|
FROM Z_SELF_REPORT
|
||||||
|
<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_SELF_REPORT 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_SELF_REPORT
|
||||||
|
<where>
|
||||||
|
<if test="ew.entity.handle!=null">
|
||||||
|
HANDLE=#{ew.handle}
|
||||||
|
</if>
|
||||||
|
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||||||
|
<if test="ew.entity.taskNo!=null"> AND TASK_NO=#{ew.entity.taskNo}</if>
|
||||||
|
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
|
||||||
|
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
|
||||||
|
<if test="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
|
||||||
|
<if test="ew.entity.opStep!=null"> AND OP_STEP=#{ew.entity.opStep}</if>
|
||||||
|
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
|
||||||
|
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||||
|
<if test="ew.entity.ncCode!=null"> AND NC_CODE=#{ew.entity.ncCode}</if>
|
||||||
|
<if test="ew.entity.ncQty!=null"> AND NC_QTY=#{ew.entity.ncQty}</if>
|
||||||
|
<if test="ew.entity.location!=null"> AND LOCATION=#{ew.entity.location}</if>
|
||||||
|
<if test="ew.entity.state!=null"> AND STATE=#{ew.entity.state}</if>
|
||||||
|
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</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_SELF_REPORT
|
||||||
|
<where>
|
||||||
|
<if test="ew!=null">
|
||||||
|
<if test="ew.entity!=null">
|
||||||
|
<if test="ew.entity.handle!=null">
|
||||||
|
HANDLE=#{ew.entity.handle}
|
||||||
|
</if>
|
||||||
|
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||||||
|
<if test="ew.entity.taskNo!=null"> AND TASK_NO=#{ew.entity.taskNo}</if>
|
||||||
|
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
|
||||||
|
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
|
||||||
|
<if test="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
|
||||||
|
<if test="ew.entity.opStep!=null"> AND OP_STEP=#{ew.entity.opStep}</if>
|
||||||
|
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
|
||||||
|
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||||
|
<if test="ew.entity.ncCode!=null"> AND NC_CODE=#{ew.entity.ncCode}</if>
|
||||||
|
<if test="ew.entity.ncQty!=null"> AND NC_QTY=#{ew.entity.ncQty}</if>
|
||||||
|
<if test="ew.entity.location!=null"> AND LOCATION=#{ew.entity.location}</if>
|
||||||
|
<if test="ew.entity.state!=null"> AND STATE=#{ew.entity.state}</if>
|
||||||
|
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</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 ZSR.HANDLE, ZSR.SITE, ZSR.TASK_NO, ZSR.WORK_CENTER, ZSR.SHOP_ORDER, ZSR.ITEM, ZSR.OP_STEP, ZSR.RESRCE, ZSR.SFC, ZSR.NC_CODE, ZSR.NC_QTY, ZSR.LOCATION, ZSR.STATE, ZSR.REMARK, ZSR.CREATE_USER,ZSR. CREATED_DATE_TIME,IT.DESCRIPTION FROM Z_SELF_REPORT ZSR
|
||||||
|
JOIN ITEM I ON I.ITEM = ZSR.ITEM AND I.CURRENT_REVISION='true'
|
||||||
|
LEFT JOIN ITEM_T IT ON I.HANDLE = IT.ITEM_BO AND IT.LOCALE = #{locale}
|
||||||
|
<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 ZSR.SITE=#{ew.entity.site}</if>
|
||||||
|
<if test="ew.entity.taskNo!=null"> AND ZSR.TASK_NO=#{ew.entity.taskNo}</if>
|
||||||
|
<if test="ew.entity.workCenter!=null and ew.entity.workCenter!='' "> AND ZSR.WORK_CENTER=#{ew.entity.workCenter}</if>
|
||||||
|
<if test="ew.entity.shopOrder!=null and ew.entity.shopOrder!=''"> AND ZSR.SHOP_ORDER=#{ew.entity.shopOrder}</if>
|
||||||
|
<if test="ew.entity.item!=null and ew.entity.item!=''"> AND ZSR.ITEM=#{ew.entity.item}</if>
|
||||||
|
<if test="ew.entity.opStep!=null and ew.entity.opStep!=''"> AND ZSR.OP_STEP=#{ew.entity.opStep}</if>
|
||||||
|
<if test="ew.entity.resrce!=null"> AND ZSR.RESRCE=#{ew.entity.resrce}</if>
|
||||||
|
<if test="ew.entity.sfc!=null and ew.entity.sfc!='' "> AND ZSR.SFC=#{ew.entity.sfc}</if>
|
||||||
|
<if test="ew.entity.ncCode!=null"> AND ZSR.NC_CODE=#{ew.entity.ncCode}</if>
|
||||||
|
<if test="ew.entity.ncQty!=null"> AND ZSR.NC_QTY=#{ew.entity.ncQty}</if>
|
||||||
|
<if test="ew.entity.location!=null"> AND ZSR.LOCATION=#{ew.entity.location}</if>
|
||||||
|
<if test="ew.entity.state!=null and ew.entity.state!=''"> AND ZSR.STATE=#{ew.entity.state}</if>
|
||||||
|
<if test="ew.entity.remark!=null"> AND ZSR.REMARK=#{ew.entity.remark}</if>
|
||||||
|
<if test="ew.entity.createUser!=null"> AND ZSR.CREATE_USER=#{ew.entity.createUser}</if>
|
||||||
|
<if test="ew.entity.createdDateTime!=null"> AND ZSR.CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||||
|
<if test="ew.entity.modifyUser!=null"> AND ZSR.MODIFY_USER=#{ew.entity.modifyUser}</if>
|
||||||
|
<if test="ew.entity.modifiedDateTime!=null"> AND ZSR.MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||||
|
</if>
|
||||||
|
<if test="startTime!=null"> AND ZSR.CREATED_DATE_TIME >=#{startTime}</if>
|
||||||
|
<if test="endTime!=null"> AND ZSR.CREATED_DATE_TIME <=#{endTime}</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_SELF_REPORT
|
||||||
|
<where>
|
||||||
|
<if test="ew!=null">
|
||||||
|
<if test="ew.entity!=null">
|
||||||
|
<if test="ew.entity.handle!=null">
|
||||||
|
HANDLE=#{ew.entity.handle}
|
||||||
|
</if>
|
||||||
|
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||||||
|
<if test="ew.entity.taskNo!=null"> AND TASK_NO=#{ew.entity.taskNo}</if>
|
||||||
|
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
|
||||||
|
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
|
||||||
|
<if test="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
|
||||||
|
<if test="ew.entity.opStep!=null"> AND OP_STEP=#{ew.entity.opStep}</if>
|
||||||
|
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
|
||||||
|
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||||
|
<if test="ew.entity.ncCode!=null"> AND NC_CODE=#{ew.entity.ncCode}</if>
|
||||||
|
<if test="ew.entity.ncQty!=null"> AND NC_QTY=#{ew.entity.ncQty}</if>
|
||||||
|
<if test="ew.entity.location!=null"> AND LOCATION=#{ew.entity.location}</if>
|
||||||
|
<if test="ew.entity.state!=null"> AND STATE=#{ew.entity.state}</if>
|
||||||
|
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</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_SELF_REPORT
|
||||||
|
<where>
|
||||||
|
<if test="ew!=null">
|
||||||
|
<if test="ew.entity!=null">
|
||||||
|
<if test="ew.entity.handle!=null">
|
||||||
|
HANDLE=#{ew.entity.handle}
|
||||||
|
</if>
|
||||||
|
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||||||
|
<if test="ew.entity.taskNo!=null"> AND TASK_NO=#{ew.entity.taskNo}</if>
|
||||||
|
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
|
||||||
|
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
|
||||||
|
<if test="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
|
||||||
|
<if test="ew.entity.opStep!=null"> AND OP_STEP=#{ew.entity.opStep}</if>
|
||||||
|
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
|
||||||
|
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||||
|
<if test="ew.entity.ncCode!=null"> AND NC_CODE=#{ew.entity.ncCode}</if>
|
||||||
|
<if test="ew.entity.ncQty!=null"> AND NC_QTY=#{ew.entity.ncQty}</if>
|
||||||
|
<if test="ew.entity.location!=null"> AND LOCATION=#{ew.entity.location}</if>
|
||||||
|
<if test="ew.entity.state!=null"> AND STATE=#{ew.entity.state}</if>
|
||||||
|
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</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_SELF_REPORT
|
||||||
|
<where>
|
||||||
|
<if test="ew!=null">
|
||||||
|
<if test="ew.entity!=null">
|
||||||
|
<if test="ew.entity.handle!=null">
|
||||||
|
HANDLE=#{ew.entity.handle}
|
||||||
|
</if>
|
||||||
|
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||||||
|
<if test="ew.entity.taskNo!=null"> AND TASK_NO=#{ew.entity.taskNo}</if>
|
||||||
|
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
|
||||||
|
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
|
||||||
|
<if test="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
|
||||||
|
<if test="ew.entity.opStep!=null"> AND OP_STEP=#{ew.entity.opStep}</if>
|
||||||
|
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
|
||||||
|
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||||
|
<if test="ew.entity.ncCode!=null"> AND NC_CODE=#{ew.entity.ncCode}</if>
|
||||||
|
<if test="ew.entity.ncQty!=null"> AND NC_QTY=#{ew.entity.ncQty}</if>
|
||||||
|
<if test="ew.entity.location!=null"> AND LOCATION=#{ew.entity.location}</if>
|
||||||
|
<if test="ew.entity.state!=null"> AND STATE=#{ew.entity.state}</if>
|
||||||
|
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</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_SELF_REPORT
|
||||||
|
<where>
|
||||||
|
<if test="ew!=null">
|
||||||
|
<if test="ew.entity!=null">
|
||||||
|
<if test="ew.entity.handle!=null">
|
||||||
|
HANDLE=#{ew.entity.handle}
|
||||||
|
</if>
|
||||||
|
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||||||
|
<if test="ew.entity.taskNo!=null"> AND TASK_NO=#{ew.entity.taskNo}</if>
|
||||||
|
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
|
||||||
|
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
|
||||||
|
<if test="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
|
||||||
|
<if test="ew.entity.opStep!=null"> AND OP_STEP=#{ew.entity.opStep}</if>
|
||||||
|
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
|
||||||
|
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||||
|
<if test="ew.entity.ncCode!=null"> AND NC_CODE=#{ew.entity.ncCode}</if>
|
||||||
|
<if test="ew.entity.ncQty!=null"> AND NC_QTY=#{ew.entity.ncQty}</if>
|
||||||
|
<if test="ew.entity.location!=null"> AND LOCATION=#{ew.entity.location}</if>
|
||||||
|
<if test="ew.entity.state!=null"> AND STATE=#{ew.entity.state}</if>
|
||||||
|
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</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.SelfReport">
|
||||||
|
INSERT INTO Z_SELF_REPORT
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
HANDLE,
|
||||||
|
<if test="site!=null">SITE,</if>
|
||||||
|
<if test="taskNo!=null">TASK_NO,</if>
|
||||||
|
<if test="workCenter!=null">WORK_CENTER,</if>
|
||||||
|
<if test="shopOrder!=null">SHOP_ORDER,</if>
|
||||||
|
<if test="item!=null">ITEM,</if>
|
||||||
|
<if test="opStep!=null">OP_STEP,</if>
|
||||||
|
<if test="resrce!=null">RESRCE,</if>
|
||||||
|
<if test="sfc!=null">SFC,</if>
|
||||||
|
<if test="ncCode!=null">NC_CODE,</if>
|
||||||
|
<if test="ncQty!=null">NC_QTY,</if>
|
||||||
|
<if test="location!=null">LOCATION,</if>
|
||||||
|
<if test="state!=null">STATE,</if>
|
||||||
|
<if test="remark!=null">REMARK,</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="taskNo!=null">#{taskNo},</if>
|
||||||
|
<if test="workCenter!=null">#{workCenter},</if>
|
||||||
|
<if test="shopOrder!=null">#{shopOrder},</if>
|
||||||
|
<if test="item!=null">#{item},</if>
|
||||||
|
<if test="opStep!=null">#{opStep},</if>
|
||||||
|
<if test="resrce!=null">#{resrce},</if>
|
||||||
|
<if test="sfc!=null">#{sfc},</if>
|
||||||
|
<if test="ncCode!=null">#{ncCode},</if>
|
||||||
|
<if test="ncQty!=null">#{ncQty},</if>
|
||||||
|
<if test="location!=null">#{location},</if>
|
||||||
|
<if test="state!=null">#{state},</if>
|
||||||
|
<if test="remark!=null">#{remark},</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.SelfReport">
|
||||||
|
INSERT INTO Z_SELF_REPORT
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<include refid="Base_Column_List"></include>
|
||||||
|
</trim> VALUES
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
#{handle},
|
||||||
|
#{site},
|
||||||
|
#{taskNo},
|
||||||
|
#{workCenter},
|
||||||
|
#{shopOrder},
|
||||||
|
#{item},
|
||||||
|
#{opStep},
|
||||||
|
#{resrce},
|
||||||
|
#{sfc},
|
||||||
|
#{ncCode},
|
||||||
|
#{ncQty},
|
||||||
|
#{location},
|
||||||
|
#{state},
|
||||||
|
#{remark},
|
||||||
|
#{createUser},
|
||||||
|
#{createdDateTime},
|
||||||
|
#{modifyUser},
|
||||||
|
#{modifiedDateTime},
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
|
||||||
|
<update id="updateById">
|
||||||
|
UPDATE Z_SELF_REPORT <trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="et.site!=null">SITE=#{et.site},</if>
|
||||||
|
<if test="et.taskNo!=null">TASK_NO=#{et.taskNo},</if>
|
||||||
|
<if test="et.workCenter!=null">WORK_CENTER=#{et.workCenter},</if>
|
||||||
|
<if test="et.shopOrder!=null">SHOP_ORDER=#{et.shopOrder},</if>
|
||||||
|
<if test="et.item!=null">ITEM=#{et.item},</if>
|
||||||
|
<if test="et.opStep!=null">OP_STEP=#{et.opStep},</if>
|
||||||
|
<if test="et.resrce!=null">RESRCE=#{et.resrce},</if>
|
||||||
|
<if test="et.sfc!=null">SFC=#{et.sfc},</if>
|
||||||
|
<if test="et.ncCode!=null">NC_CODE=#{et.ncCode},</if>
|
||||||
|
<if test="et.ncQty!=null">NC_QTY=#{et.ncQty},</if>
|
||||||
|
<if test="et.location!=null">LOCATION=#{et.location},</if>
|
||||||
|
<if test="et.state!=null">STATE=#{et.state},</if>
|
||||||
|
<if test="et.remark!=null">REMARK=#{et.remark},</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_SELF_REPORT <trim prefix="SET" suffixOverrides=",">
|
||||||
|
SITE=#{et.site},
|
||||||
|
TASK_NO=#{et.taskNo},
|
||||||
|
WORK_CENTER=#{et.workCenter},
|
||||||
|
SHOP_ORDER=#{et.shopOrder},
|
||||||
|
ITEM=#{et.item},
|
||||||
|
OP_STEP=#{et.opStep},
|
||||||
|
RESRCE=#{et.resrce},
|
||||||
|
SFC=#{et.sfc},
|
||||||
|
NC_CODE=#{et.ncCode},
|
||||||
|
NC_QTY=#{et.ncQty},
|
||||||
|
LOCATION=#{et.location},
|
||||||
|
STATE=#{et.state},
|
||||||
|
REMARK=#{et.remark},
|
||||||
|
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_SELF_REPORT <trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="et.site!=null">SITE=#{et.site},</if>
|
||||||
|
<if test="et.taskNo!=null">TASK_NO=#{et.taskNo},</if>
|
||||||
|
<if test="et.workCenter!=null">WORK_CENTER=#{et.workCenter},</if>
|
||||||
|
<if test="et.shopOrder!=null">SHOP_ORDER=#{et.shopOrder},</if>
|
||||||
|
<if test="et.item!=null">ITEM=#{et.item},</if>
|
||||||
|
<if test="et.opStep!=null">OP_STEP=#{et.opStep},</if>
|
||||||
|
<if test="et.resrce!=null">RESRCE=#{et.resrce},</if>
|
||||||
|
<if test="et.sfc!=null">SFC=#{et.sfc},</if>
|
||||||
|
<if test="et.ncCode!=null">NC_CODE=#{et.ncCode},</if>
|
||||||
|
<if test="et.ncQty!=null">NC_QTY=#{et.ncQty},</if>
|
||||||
|
<if test="et.location!=null">LOCATION=#{et.location},</if>
|
||||||
|
<if test="et.state!=null">STATE=#{et.state},</if>
|
||||||
|
<if test="et.remark!=null">REMARK=#{et.remark},</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.taskNo!=null"> AND TASK_NO=#{ew.entity.taskNo}</if>
|
||||||
|
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
|
||||||
|
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
|
||||||
|
<if test="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
|
||||||
|
<if test="ew.entity.opStep!=null"> AND OP_STEP=#{ew.entity.opStep}</if>
|
||||||
|
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
|
||||||
|
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||||
|
<if test="ew.entity.ncCode!=null"> AND NC_CODE=#{ew.entity.ncCode}</if>
|
||||||
|
<if test="ew.entity.ncQty!=null"> AND NC_QTY=#{ew.entity.ncQty}</if>
|
||||||
|
<if test="ew.entity.location!=null"> AND LOCATION=#{ew.entity.location}</if>
|
||||||
|
<if test="ew.entity.state!=null"> AND STATE=#{ew.entity.state}</if>
|
||||||
|
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</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_SELF_REPORT WHERE HANDLE=#{handle}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteByMap">
|
||||||
|
DELETE FROM Z_SELF_REPORT
|
||||||
|
<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_SELF_REPORT
|
||||||
|
<where>
|
||||||
|
<if test="ew!=null">
|
||||||
|
<if test="ew.entity!=null">
|
||||||
|
<if test="ew.entity.handle!=null">
|
||||||
|
HANDLE=#{ew.entity.handle}
|
||||||
|
</if>
|
||||||
|
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||||||
|
<if test="ew.entity.taskNo!=null"> AND TASK_NO=#{ew.entity.taskNo}</if>
|
||||||
|
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
|
||||||
|
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
|
||||||
|
<if test="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
|
||||||
|
<if test="ew.entity.opStep!=null"> AND OP_STEP=#{ew.entity.opStep}</if>
|
||||||
|
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
|
||||||
|
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||||
|
<if test="ew.entity.ncCode!=null"> AND NC_CODE=#{ew.entity.ncCode}</if>
|
||||||
|
<if test="ew.entity.ncQty!=null"> AND NC_QTY=#{ew.entity.ncQty}</if>
|
||||||
|
<if test="ew.entity.location!=null"> AND LOCATION=#{ew.entity.location}</if>
|
||||||
|
<if test="ew.entity.state!=null"> AND STATE=#{ew.entity.state}</if>
|
||||||
|
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</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_SELF_REPORT WHERE HANDLE IN (
|
||||||
|
<foreach item="item" index="index" collection="coll" separator=",">#{item}
|
||||||
|
</foreach>)
|
||||||
|
</delete>
|
||||||
|
<!-- BaseMapper标准查询/修改/删除 -->
|
||||||
|
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue