改善提案报告书维护
parent
75362ce7cf
commit
7d81d566eb
@ -0,0 +1,148 @@
|
||||
package com.foreverwin.mesnac.anomaly.controller;
|
||||
|
||||
import com.foreverwin.mesnac.anomaly.utils.DateReportUtils;
|
||||
import com.foreverwin.mesnac.common.util.StringUtil;
|
||||
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.anomaly.service.ImprovementProposalsService;
|
||||
import com.foreverwin.mesnac.anomaly.model.ImprovementProposals;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author YinQ
|
||||
* @since 2022-09-19
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/Z-IMPROVEMENT-PROPOSALS")
|
||||
public class ImprovementProposalsController {
|
||||
|
||||
@Autowired
|
||||
public ImprovementProposalsService improvementProposalsService;
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id 主键
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@GetMapping("/{id:.+}")
|
||||
public R getImprovementProposalsById(@PathVariable String id) {
|
||||
return R.ok(improvementProposalsService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询所有数据
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@GetMapping("")
|
||||
public R getImprovementProposalsList(@RequestParam(required = false) Map<String, String> paramMap) {
|
||||
List<ImprovementProposals> result;
|
||||
FrontPage<ImprovementProposals> frontPage = new FrontPage<>();
|
||||
frontPage.setPage(Integer.valueOf(paramMap.get("page")));
|
||||
frontPage.setRows(Integer.valueOf(paramMap.get("rows")));
|
||||
QueryWrapper<ImprovementProposals> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper
|
||||
.like(!StringUtil.isBlank(paramMap.get("uploadCenter")), "UPLOAD_CENTER", paramMap.get("uploadCenter"))
|
||||
.like(!StringUtil.isBlank(paramMap.get("uploadUser")), "UPLOAD_USER", paramMap.get("uploadUser"))
|
||||
.like(!StringUtil.isBlank(paramMap.get("sequenceCode")), "SEQUENCE_CODE", paramMap.get("sequenceCode"))
|
||||
.ge(!StringUtil.isBlank(paramMap.get("startDate")), "CREATED_TIME", DateReportUtils.stringToDate(paramMap.get("startDate") + " 00:00:00", "yyyy-MM-dd HH:mm:ss"))
|
||||
.le(!StringUtil.isBlank(paramMap.get("endDate")), "CREATED_TIME", DateReportUtils.stringToDate(paramMap.get("endDate") + " 23:59:59", "yyyy-MM-dd HH:mm:ss"))
|
||||
|
||||
;
|
||||
result = improvementProposalsService.list(queryWrapper);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询数据
|
||||
*
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@GetMapping("/page")
|
||||
public R page(@RequestParam(required = false) Map<String, String> paramMap) {
|
||||
IPage result;
|
||||
FrontPage<ImprovementProposals> frontPage = new FrontPage<>();
|
||||
frontPage.setPage(Integer.valueOf(paramMap.get("page")));
|
||||
frontPage.setRows(Integer.valueOf(paramMap.get("rows")));
|
||||
QueryWrapper<ImprovementProposals> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper
|
||||
.like(!StringUtil.isBlank(paramMap.get("uploadCenter")), "UPLOAD_CENTER", paramMap.get("uploadCenter"))
|
||||
.like(!StringUtil.isBlank(paramMap.get("uploadUser")), "UPLOAD_USER", paramMap.get("uploadUser"))
|
||||
.like(!StringUtil.isBlank(paramMap.get("sequenceCode")), "SEQUENCE_CODE", paramMap.get("sequenceCode"))
|
||||
.ge(!StringUtil.isBlank(paramMap.get("startDate")), "CREATED_TIME", DateReportUtils.stringToDate(paramMap.get("startDate") + " 00:00:00", "yyyy-MM-dd HH:mm:ss"))
|
||||
.le(!StringUtil.isBlank(paramMap.get("endDate")), "CREATED_TIME", DateReportUtils.stringToDate(paramMap.get("endDate") + " 23:59:59", "yyyy-MM-dd HH:mm:ss"))
|
||||
|
||||
;
|
||||
|
||||
result = improvementProposalsService.page(frontPage.getPagePlus(), queryWrapper);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*
|
||||
* @param improvementProposals 传递的实体
|
||||
* @return null 失败 实体成功
|
||||
*/
|
||||
@PostMapping
|
||||
public R save(@RequestBody ImprovementProposals improvementProposals) {
|
||||
improvementProposals = improvementProposalsService.insertData(improvementProposals);
|
||||
return R.ok(improvementProposalsService.save(improvementProposals));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*
|
||||
* @param improvementProposals 传递的实体
|
||||
* @return null 失败 实体成功
|
||||
*/
|
||||
@PutMapping
|
||||
public R updateById(@RequestBody ImprovementProposals improvementProposals) {
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
String user = CommonMethods.getUser();
|
||||
improvementProposals.setUpdatedBy(user);
|
||||
improvementProposals.setUpdatedTime(now);
|
||||
|
||||
return R.ok(improvementProposalsService.updateById(improvementProposals));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id删除对象
|
||||
*
|
||||
* @param id 实体ID
|
||||
* @return 0 失败 1 成功
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping(method = RequestMethod.DELETE, value = "/{id:.+}")
|
||||
public R removeById(@PathVariable("id") String id) {
|
||||
return R.ok(improvementProposalsService.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(improvementProposalsService.removeByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.foreverwin.mesnac.anomaly.mapper;
|
||||
|
||||
import com.foreverwin.mesnac.anomaly.model.ImprovementProposals;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 改善提案报告书 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author YinQ
|
||||
* @since 2022-09-19
|
||||
*/
|
||||
@Repository
|
||||
public interface ImprovementProposalsMapper extends BaseMapper<ImprovementProposals> {
|
||||
|
||||
}
|
@ -0,0 +1,178 @@
|
||||
package com.foreverwin.mesnac.anomaly.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.foreverwin.mesnac.common.model.ExcelColumn;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 改善提案报告书
|
||||
* </p>
|
||||
*
|
||||
* @author YinQ
|
||||
* @since 2022-09-19
|
||||
*/
|
||||
|
||||
@TableName("Z_IMPROVEMENT_PROPOSALS")
|
||||
@Data
|
||||
public class ImprovementProposals extends Model<ImprovementProposals> {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ExcelColumn(value = "HANDLE")
|
||||
@TableId(value = "HANDLE", type = IdType.INPUT)
|
||||
private String handle;
|
||||
/**
|
||||
* 场地
|
||||
*/
|
||||
@ExcelColumn(value = "SITE")
|
||||
@TableField("SITE")
|
||||
private String site;
|
||||
/**
|
||||
* 上传车间
|
||||
*/
|
||||
@ExcelColumn(value = "上传车间")
|
||||
@TableField("UPLOAD_CENTER")
|
||||
private String uploadCenter;
|
||||
/**
|
||||
* 上传人员
|
||||
*/
|
||||
@ExcelColumn(value = "上传人员")
|
||||
@TableField("UPLOAD_USER")
|
||||
private String uploadUser;
|
||||
/**
|
||||
* 序列码
|
||||
*/
|
||||
@ExcelColumn(value = "SEQUENCE_CODE")
|
||||
@TableField("SEQUENCE_CODE")
|
||||
private String sequenceCode;
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
@ExcelColumn(value = "项目名称")
|
||||
@TableField("PROJECT_NUMBER")
|
||||
private String projectNumber;
|
||||
/**
|
||||
* 改善类别
|
||||
*/
|
||||
@ExcelColumn(value = "改善类别")
|
||||
@TableField("CLASSIFY")
|
||||
private String classify;
|
||||
/**
|
||||
* 项目负责人
|
||||
*/
|
||||
@ExcelColumn(value = "项目负责人")
|
||||
@TableField("PROJECT_LEADER")
|
||||
private String projectLeader;
|
||||
/**
|
||||
* 实施成员
|
||||
*/
|
||||
@ExcelColumn(value = "实施成员")
|
||||
@TableField("MEMBERS")
|
||||
private String members;
|
||||
/**
|
||||
* 实施日期
|
||||
*/
|
||||
@ExcelColumn(value = "实施日期")
|
||||
@TableField("MATERIAL_DATE")
|
||||
private LocalDateTime materialDate;
|
||||
/**
|
||||
* 改善前具体问题描述
|
||||
*/
|
||||
@ExcelColumn(value = "改善前具体问题描述")
|
||||
@TableField("BEFORE_PROBLEMS")
|
||||
private String beforeProblems;
|
||||
/**
|
||||
* 改善前图片
|
||||
*/
|
||||
@ExcelColumn(value = "改善前图片")
|
||||
@TableField("BEFORE_PICTURE")
|
||||
private String beforePicture;
|
||||
/**
|
||||
* 改善后改善方案及过程
|
||||
*/
|
||||
@ExcelColumn(value = "改善后改善方案及过程")
|
||||
@TableField("AFTER_PLAN")
|
||||
private String afterPlan;
|
||||
/**
|
||||
* 改善后图片
|
||||
*/
|
||||
@ExcelColumn(value = "改善后图片")
|
||||
@TableField("AFTER_PICTURE")
|
||||
private String afterPicture;
|
||||
/**
|
||||
* 改善效果
|
||||
*/
|
||||
@ExcelColumn(value = "改善效果")
|
||||
@TableField("IMPROVE_EFFECT")
|
||||
private String improveEffect;
|
||||
/**
|
||||
* 部门负责人意见
|
||||
*/
|
||||
@ExcelColumn(value = "部门负责人意见")
|
||||
@TableField("PRINCIPAL_OPINION")
|
||||
private String principalOpinion;
|
||||
/**
|
||||
* 建议奖励金额
|
||||
*/
|
||||
@ExcelColumn(value = "建议奖励金额")
|
||||
@TableField("PROPOSED_AMOUNT")
|
||||
private String proposedAmount;
|
||||
/**
|
||||
* 最终奖励金额
|
||||
*/
|
||||
@ExcelColumn(value = "最终奖励金额")
|
||||
@TableField("FINAL_AMOUNT")
|
||||
private String finalAmount;
|
||||
/**
|
||||
* 提案改善推进小组意见
|
||||
*/
|
||||
@ExcelColumn(value = "提案改善推进小组意见")
|
||||
@TableField("GROUP_VIEWS")
|
||||
private String groupViews;
|
||||
/**
|
||||
* 总经理审批意见
|
||||
*/
|
||||
@ExcelColumn(value = "总经理审批意见")
|
||||
@TableField("MANAGER_VIEWS")
|
||||
private String managerViews;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@ExcelColumn(value = "CREATED_BY")
|
||||
@TableField("CREATED_BY")
|
||||
private String createdBy;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ExcelColumn(value = "CREATED_TIME")
|
||||
@TableField("CREATED_TIME")
|
||||
private LocalDateTime createdTime;
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@ExcelColumn(value = "UPDATED_BY")
|
||||
@TableField("UPDATED_BY")
|
||||
private String updatedBy;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ExcelColumn(value = "UPDATED_TIME")
|
||||
@TableField("UPDATED_TIME")
|
||||
private LocalDateTime updatedTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ExcelColumn(value = "SEQ")
|
||||
private Integer SEQ;
|
||||
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package com.foreverwin.mesnac.anomaly.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.foreverwin.mesnac.anomaly.model.ImprovementProposals;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.foreverwin.modular.core.util.FrontPage;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 改善提案报告书 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author YinQ
|
||||
* @since 2022-09-19
|
||||
*/
|
||||
public interface ImprovementProposalsService extends IService<ImprovementProposals> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param frontPage
|
||||
* @return
|
||||
*/
|
||||
IPage<ImprovementProposals> selectPage(FrontPage<ImprovementProposals> frontPage, ImprovementProposals improvementProposals);
|
||||
|
||||
List<ImprovementProposals> selectList(ImprovementProposals improvementProposals);
|
||||
|
||||
ImprovementProposals insertData(ImprovementProposals improvementProposals);
|
||||
|
||||
Boolean improvementProposalsListImportFile(List<ImprovementProposals> improvementProposals);
|
||||
}
|
@ -0,0 +1,98 @@
|
||||
package com.foreverwin.mesnac.anomaly.service.impl;
|
||||
|
||||
import com.foreverwin.mesnac.anomaly.model.OutStore;
|
||||
import com.foreverwin.mesnac.common.util.StringUtil;
|
||||
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.anomaly.model.ImprovementProposals;
|
||||
import com.foreverwin.mesnac.anomaly.mapper.ImprovementProposalsMapper;
|
||||
import com.foreverwin.mesnac.anomaly.service.ImprovementProposalsService;
|
||||
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.text.SimpleDateFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
/**
|
||||
* <p>
|
||||
* 改善提案报告书 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author YinQ
|
||||
* @since 2022-09-19
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class ImprovementProposalsServiceImpl extends ServiceImpl<ImprovementProposalsMapper, ImprovementProposals> implements ImprovementProposalsService {
|
||||
|
||||
|
||||
@Autowired
|
||||
private ImprovementProposalsMapper improvementProposalsMapper;
|
||||
|
||||
@Override
|
||||
public IPage<ImprovementProposals> selectPage(FrontPage<ImprovementProposals> frontPage, ImprovementProposals improvementProposals) {
|
||||
QueryWrapper<ImprovementProposals> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(improvementProposals);
|
||||
return super.page(frontPage.getPagePlus(), queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ImprovementProposals> selectList(ImprovementProposals improvementProposals) {
|
||||
QueryWrapper<ImprovementProposals> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(improvementProposals);
|
||||
return super.list(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ImprovementProposals insertData(ImprovementProposals improvementProposals) {
|
||||
String user = CommonMethods.getUser();
|
||||
String site = CommonMethods.getSite();
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
String handle = StringUtil.createQUID();
|
||||
|
||||
improvementProposals.setHandle(handle);
|
||||
improvementProposals.setSite(site);
|
||||
improvementProposals.setCreatedBy(user);
|
||||
improvementProposals.setCreatedTime(now);
|
||||
improvementProposals.setUpdatedBy(user);
|
||||
improvementProposals.setUpdatedTime(now);
|
||||
|
||||
StringBuffer sequenceCode = new StringBuffer();
|
||||
String format = now.format(DateTimeFormatter.ofPattern("yyyyMMdd"));
|
||||
for (int i = 0; i < format.length(); i++) {
|
||||
int random = (int)(Math.random() * 10);
|
||||
sequenceCode.append(format.charAt(i)).append(handle.substring(random, random + 1));
|
||||
}
|
||||
improvementProposals.setSequenceCode(sequenceCode.toString());
|
||||
|
||||
return improvementProposals;
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入
|
||||
* @param improvementProposals
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Boolean improvementProposalsListImportFile(List<ImprovementProposals> improvementProposals) {
|
||||
|
||||
try {
|
||||
for (ImprovementProposals improvementProposal : improvementProposals) {
|
||||
improvementProposal = this.insertData(improvementProposal);
|
||||
}
|
||||
super.saveBatch(improvementProposals);
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,626 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.foreverwin.mesnac.anomaly.mapper.ImprovementProposalsMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.foreverwin.mesnac.anomaly.model.ImprovementProposals">
|
||||
<id column="HANDLE" property="handle" />
|
||||
<result column="SITE" property="site" />
|
||||
<result column="UPLOAD_CENTER" property="uploadCenter" />
|
||||
<result column="UPLOAD_USER" property="uploadUser" />
|
||||
<result column="SEQUENCE_CODE" property="sequenceCode" />
|
||||
<result column="PROJECT_NUMBER" property="projectNumber" />
|
||||
<result column="CLASSIFY" property="classify" />
|
||||
<result column="PROJECT_LEADER" property="projectLeader" />
|
||||
<result column="MEMBERS" property="members" />
|
||||
<result column="MATERIAL_DATE" property="materialDate" />
|
||||
<result column="BEFORE_PROBLEMS" property="beforeProblems" />
|
||||
<result column="BEFORE_PICTURE" property="beforePicture" />
|
||||
<result column="AFTER_PLAN" property="afterPlan" />
|
||||
<result column="AFTER_PICTURE" property="afterPicture" />
|
||||
<result column="IMPROVE_EFFECT" property="improveEffect" />
|
||||
<result column="PRINCIPAL_OPINION" property="principalOpinion" />
|
||||
<result column="PROPOSED_AMOUNT" property="proposedAmount" />
|
||||
<result column="FINAL_AMOUNT" property="finalAmount" />
|
||||
<result column="GROUP_VIEWS" property="groupViews" />
|
||||
<result column="MANAGER_VIEWS" property="managerViews" />
|
||||
<result column="CREATED_BY" property="createdBy" />
|
||||
<result column="CREATED_TIME" property="createdTime" />
|
||||
<result column="UPDATED_BY" property="updatedBy" />
|
||||
<result column="UPDATED_TIME" property="updatedTime" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
HANDLE, SITE, UPLOAD_CENTER, UPLOAD_USER, SEQUENCE_CODE, PROJECT_NUMBER, CLASSIFY, PROJECT_LEADER, MEMBERS, MATERIAL_DATE, BEFORE_PROBLEMS, BEFORE_PICTURE, AFTER_PLAN, AFTER_PICTURE, IMPROVE_EFFECT, PRINCIPAL_OPINION, PROPOSED_AMOUNT, FINAL_AMOUNT, GROUP_VIEWS, MANAGER_VIEWS, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME,ROWNUM SEQ
|
||||
</sql>
|
||||
|
||||
<!-- BaseMapper标准查询/修改/删除 -->
|
||||
<select id="selectById" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"></include> FROM Z_IMPROVEMENT_PROPOSALS WHERE HANDLE=#{handle}
|
||||
</select>
|
||||
|
||||
<select id="selectByMap" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"></include>
|
||||
FROM Z_IMPROVEMENT_PROPOSALS
|
||||
<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_IMPROVEMENT_PROPOSALS 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_IMPROVEMENT_PROPOSALS
|
||||
<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.uploadCenter!=null"> AND UPLOAD_CENTER=#{ew.entity.uploadCenter}</if>
|
||||
<if test="ew.entity.uploadUser!=null"> AND UPLOAD_USER=#{ew.entity.uploadUser}</if>
|
||||
<if test="ew.entity.sequenceCode!=null"> AND SEQUENCE_CODE=#{ew.entity.sequenceCode}</if>
|
||||
<if test="ew.entity.projectNumber!=null"> AND PROJECT_NUMBER=#{ew.entity.projectNumber}</if>
|
||||
<if test="ew.entity.classify!=null"> AND CLASSIFY=#{ew.entity.classify}</if>
|
||||
<if test="ew.entity.projectLeader!=null"> AND PROJECT_LEADER=#{ew.entity.projectLeader}</if>
|
||||
<if test="ew.entity.members!=null"> AND MEMBERS=#{ew.entity.members}</if>
|
||||
<if test="ew.entity.materialDate!=null"> AND MATERIAL_DATE=#{ew.entity.materialDate}</if>
|
||||
<if test="ew.entity.beforeProblems!=null"> AND BEFORE_PROBLEMS=#{ew.entity.beforeProblems}</if>
|
||||
<if test="ew.entity.beforePicture!=null"> AND BEFORE_PICTURE=#{ew.entity.beforePicture}</if>
|
||||
<if test="ew.entity.afterPlan!=null"> AND AFTER_PLAN=#{ew.entity.afterPlan}</if>
|
||||
<if test="ew.entity.afterPicture!=null"> AND AFTER_PICTURE=#{ew.entity.afterPicture}</if>
|
||||
<if test="ew.entity.improveEffect!=null"> AND IMPROVE_EFFECT=#{ew.entity.improveEffect}</if>
|
||||
<if test="ew.entity.principalOpinion!=null"> AND PRINCIPAL_OPINION=#{ew.entity.principalOpinion}</if>
|
||||
<if test="ew.entity.proposedAmount!=null"> AND PROPOSED_AMOUNT=#{ew.entity.proposedAmount}</if>
|
||||
<if test="ew.entity.finalAmount!=null"> AND FINAL_AMOUNT=#{ew.entity.finalAmount}</if>
|
||||
<if test="ew.entity.groupViews!=null"> AND GROUP_VIEWS=#{ew.entity.groupViews}</if>
|
||||
<if test="ew.entity.managerViews!=null"> AND MANAGER_VIEWS=#{ew.entity.managerViews}</if>
|
||||
<if test="ew.entity.createdBy!=null"> AND CREATED_BY=#{ew.entity.createdBy}</if>
|
||||
<if test="ew.entity.createdTime!=null"> AND CREATED_TIME=#{ew.entity.createdTime}</if>
|
||||
<if test="ew.entity.updatedBy!=null"> AND UPDATED_BY=#{ew.entity.updatedBy}</if>
|
||||
<if test="ew.entity.updatedTime!=null"> AND UPDATED_TIME=#{ew.entity.updatedTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCount" resultType="Integer">
|
||||
SELECT COUNT(1) FROM Z_IMPROVEMENT_PROPOSALS
|
||||
<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.uploadCenter!=null"> AND UPLOAD_CENTER=#{ew.entity.uploadCenter}</if>
|
||||
<if test="ew.entity.uploadUser!=null"> AND UPLOAD_USER=#{ew.entity.uploadUser}</if>
|
||||
<if test="ew.entity.sequenceCode!=null"> AND SEQUENCE_CODE=#{ew.entity.sequenceCode}</if>
|
||||
<if test="ew.entity.projectNumber!=null"> AND PROJECT_NUMBER=#{ew.entity.projectNumber}</if>
|
||||
<if test="ew.entity.classify!=null"> AND CLASSIFY=#{ew.entity.classify}</if>
|
||||
<if test="ew.entity.projectLeader!=null"> AND PROJECT_LEADER=#{ew.entity.projectLeader}</if>
|
||||
<if test="ew.entity.members!=null"> AND MEMBERS=#{ew.entity.members}</if>
|
||||
<if test="ew.entity.materialDate!=null"> AND MATERIAL_DATE=#{ew.entity.materialDate}</if>
|
||||
<if test="ew.entity.beforeProblems!=null"> AND BEFORE_PROBLEMS=#{ew.entity.beforeProblems}</if>
|
||||
<if test="ew.entity.beforePicture!=null"> AND BEFORE_PICTURE=#{ew.entity.beforePicture}</if>
|
||||
<if test="ew.entity.afterPlan!=null"> AND AFTER_PLAN=#{ew.entity.afterPlan}</if>
|
||||
<if test="ew.entity.afterPicture!=null"> AND AFTER_PICTURE=#{ew.entity.afterPicture}</if>
|
||||
<if test="ew.entity.improveEffect!=null"> AND IMPROVE_EFFECT=#{ew.entity.improveEffect}</if>
|
||||
<if test="ew.entity.principalOpinion!=null"> AND PRINCIPAL_OPINION=#{ew.entity.principalOpinion}</if>
|
||||
<if test="ew.entity.proposedAmount!=null"> AND PROPOSED_AMOUNT=#{ew.entity.proposedAmount}</if>
|
||||
<if test="ew.entity.finalAmount!=null"> AND FINAL_AMOUNT=#{ew.entity.finalAmount}</if>
|
||||
<if test="ew.entity.groupViews!=null"> AND GROUP_VIEWS=#{ew.entity.groupViews}</if>
|
||||
<if test="ew.entity.managerViews!=null"> AND MANAGER_VIEWS=#{ew.entity.managerViews}</if>
|
||||
<if test="ew.entity.createdBy!=null"> AND CREATED_BY=#{ew.entity.createdBy}</if>
|
||||
<if test="ew.entity.createdTime!=null"> AND CREATED_TIME=#{ew.entity.createdTime}</if>
|
||||
<if test="ew.entity.updatedBy!=null"> AND UPDATED_BY=#{ew.entity.updatedBy}</if>
|
||||
<if test="ew.entity.updatedTime!=null"> AND UPDATED_TIME=#{ew.entity.updatedTime}</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_IMPROVEMENT_PROPOSALS
|
||||
<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.uploadCenter!=null"> AND UPLOAD_CENTER=#{ew.entity.uploadCenter}</if>
|
||||
<if test="ew.entity.uploadUser!=null"> AND UPLOAD_USER=#{ew.entity.uploadUser}</if>
|
||||
<if test="ew.entity.sequenceCode!=null"> AND SEQUENCE_CODE=#{ew.entity.sequenceCode}</if>
|
||||
<if test="ew.entity.projectNumber!=null"> AND PROJECT_NUMBER=#{ew.entity.projectNumber}</if>
|
||||
<if test="ew.entity.classify!=null"> AND CLASSIFY=#{ew.entity.classify}</if>
|
||||
<if test="ew.entity.projectLeader!=null"> AND PROJECT_LEADER=#{ew.entity.projectLeader}</if>
|
||||
<if test="ew.entity.members!=null"> AND MEMBERS=#{ew.entity.members}</if>
|
||||
<if test="ew.entity.materialDate!=null"> AND MATERIAL_DATE=#{ew.entity.materialDate}</if>
|
||||
<if test="ew.entity.beforeProblems!=null"> AND BEFORE_PROBLEMS=#{ew.entity.beforeProblems}</if>
|
||||
<if test="ew.entity.beforePicture!=null"> AND BEFORE_PICTURE=#{ew.entity.beforePicture}</if>
|
||||
<if test="ew.entity.afterPlan!=null"> AND AFTER_PLAN=#{ew.entity.afterPlan}</if>
|
||||
<if test="ew.entity.afterPicture!=null"> AND AFTER_PICTURE=#{ew.entity.afterPicture}</if>
|
||||
<if test="ew.entity.improveEffect!=null"> AND IMPROVE_EFFECT=#{ew.entity.improveEffect}</if>
|
||||
<if test="ew.entity.principalOpinion!=null"> AND PRINCIPAL_OPINION=#{ew.entity.principalOpinion}</if>
|
||||
<if test="ew.entity.proposedAmount!=null"> AND PROPOSED_AMOUNT=#{ew.entity.proposedAmount}</if>
|
||||
<if test="ew.entity.finalAmount!=null"> AND FINAL_AMOUNT=#{ew.entity.finalAmount}</if>
|
||||
<if test="ew.entity.groupViews!=null"> AND GROUP_VIEWS=#{ew.entity.groupViews}</if>
|
||||
<if test="ew.entity.managerViews!=null"> AND MANAGER_VIEWS=#{ew.entity.managerViews}</if>
|
||||
<if test="ew.entity.createdBy!=null"> AND CREATED_BY=#{ew.entity.createdBy}</if>
|
||||
<if test="ew.entity.createdTime!=null"> AND CREATED_TIME=#{ew.entity.createdTime}</if>
|
||||
<if test="ew.entity.updatedBy!=null"> AND UPDATED_BY=#{ew.entity.updatedBy}</if>
|
||||
<if test="ew.entity.updatedTime!=null"> AND UPDATED_TIME=#{ew.entity.updatedTime}</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_IMPROVEMENT_PROPOSALS
|
||||
<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.uploadCenter!=null"> AND UPLOAD_CENTER=#{ew.entity.uploadCenter}</if>
|
||||
<if test="ew.entity.uploadUser!=null"> AND UPLOAD_USER=#{ew.entity.uploadUser}</if>
|
||||
<if test="ew.entity.sequenceCode!=null"> AND SEQUENCE_CODE=#{ew.entity.sequenceCode}</if>
|
||||
<if test="ew.entity.projectNumber!=null"> AND PROJECT_NUMBER=#{ew.entity.projectNumber}</if>
|
||||
<if test="ew.entity.classify!=null"> AND CLASSIFY=#{ew.entity.classify}</if>
|
||||
<if test="ew.entity.projectLeader!=null"> AND PROJECT_LEADER=#{ew.entity.projectLeader}</if>
|
||||
<if test="ew.entity.members!=null"> AND MEMBERS=#{ew.entity.members}</if>
|
||||
<if test="ew.entity.materialDate!=null"> AND MATERIAL_DATE=#{ew.entity.materialDate}</if>
|
||||
<if test="ew.entity.beforeProblems!=null"> AND BEFORE_PROBLEMS=#{ew.entity.beforeProblems}</if>
|
||||
<if test="ew.entity.beforePicture!=null"> AND BEFORE_PICTURE=#{ew.entity.beforePicture}</if>
|
||||
<if test="ew.entity.afterPlan!=null"> AND AFTER_PLAN=#{ew.entity.afterPlan}</if>
|
||||
<if test="ew.entity.afterPicture!=null"> AND AFTER_PICTURE=#{ew.entity.afterPicture}</if>
|
||||
<if test="ew.entity.improveEffect!=null"> AND IMPROVE_EFFECT=#{ew.entity.improveEffect}</if>
|
||||
<if test="ew.entity.principalOpinion!=null"> AND PRINCIPAL_OPINION=#{ew.entity.principalOpinion}</if>
|
||||
<if test="ew.entity.proposedAmount!=null"> AND PROPOSED_AMOUNT=#{ew.entity.proposedAmount}</if>
|
||||
<if test="ew.entity.finalAmount!=null"> AND FINAL_AMOUNT=#{ew.entity.finalAmount}</if>
|
||||
<if test="ew.entity.groupViews!=null"> AND GROUP_VIEWS=#{ew.entity.groupViews}</if>
|
||||
<if test="ew.entity.managerViews!=null"> AND MANAGER_VIEWS=#{ew.entity.managerViews}</if>
|
||||
<if test="ew.entity.createdBy!=null"> AND CREATED_BY=#{ew.entity.createdBy}</if>
|
||||
<if test="ew.entity.createdTime!=null"> AND CREATED_TIME=#{ew.entity.createdTime}</if>
|
||||
<if test="ew.entity.updatedBy!=null"> AND UPDATED_BY=#{ew.entity.updatedBy}</if>
|
||||
<if test="ew.entity.updatedTime!=null"> AND UPDATED_TIME=#{ew.entity.updatedTime}</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_IMPROVEMENT_PROPOSALS
|
||||
<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.uploadCenter!=null"> AND UPLOAD_CENTER=#{ew.entity.uploadCenter}</if>
|
||||
<if test="ew.entity.uploadUser!=null"> AND UPLOAD_USER=#{ew.entity.uploadUser}</if>
|
||||
<if test="ew.entity.sequenceCode!=null"> AND SEQUENCE_CODE=#{ew.entity.sequenceCode}</if>
|
||||
<if test="ew.entity.projectNumber!=null"> AND PROJECT_NUMBER=#{ew.entity.projectNumber}</if>
|
||||
<if test="ew.entity.classify!=null"> AND CLASSIFY=#{ew.entity.classify}</if>
|
||||
<if test="ew.entity.projectLeader!=null"> AND PROJECT_LEADER=#{ew.entity.projectLeader}</if>
|
||||
<if test="ew.entity.members!=null"> AND MEMBERS=#{ew.entity.members}</if>
|
||||
<if test="ew.entity.materialDate!=null"> AND MATERIAL_DATE=#{ew.entity.materialDate}</if>
|
||||
<if test="ew.entity.beforeProblems!=null"> AND BEFORE_PROBLEMS=#{ew.entity.beforeProblems}</if>
|
||||
<if test="ew.entity.beforePicture!=null"> AND BEFORE_PICTURE=#{ew.entity.beforePicture}</if>
|
||||
<if test="ew.entity.afterPlan!=null"> AND AFTER_PLAN=#{ew.entity.afterPlan}</if>
|
||||
<if test="ew.entity.afterPicture!=null"> AND AFTER_PICTURE=#{ew.entity.afterPicture}</if>
|
||||
<if test="ew.entity.improveEffect!=null"> AND IMPROVE_EFFECT=#{ew.entity.improveEffect}</if>
|
||||
<if test="ew.entity.principalOpinion!=null"> AND PRINCIPAL_OPINION=#{ew.entity.principalOpinion}</if>
|
||||
<if test="ew.entity.proposedAmount!=null"> AND PROPOSED_AMOUNT=#{ew.entity.proposedAmount}</if>
|
||||
<if test="ew.entity.finalAmount!=null"> AND FINAL_AMOUNT=#{ew.entity.finalAmount}</if>
|
||||
<if test="ew.entity.groupViews!=null"> AND GROUP_VIEWS=#{ew.entity.groupViews}</if>
|
||||
<if test="ew.entity.managerViews!=null"> AND MANAGER_VIEWS=#{ew.entity.managerViews}</if>
|
||||
<if test="ew.entity.createdBy!=null"> AND CREATED_BY=#{ew.entity.createdBy}</if>
|
||||
<if test="ew.entity.createdTime!=null"> AND CREATED_TIME=#{ew.entity.createdTime}</if>
|
||||
<if test="ew.entity.updatedBy!=null"> AND UPDATED_BY=#{ew.entity.updatedBy}</if>
|
||||
<if test="ew.entity.updatedTime!=null"> AND UPDATED_TIME=#{ew.entity.updatedTime}</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_IMPROVEMENT_PROPOSALS
|
||||
<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.uploadCenter!=null"> AND UPLOAD_CENTER=#{ew.entity.uploadCenter}</if>
|
||||
<if test="ew.entity.uploadUser!=null"> AND UPLOAD_USER=#{ew.entity.uploadUser}</if>
|
||||
<if test="ew.entity.sequenceCode!=null"> AND SEQUENCE_CODE=#{ew.entity.sequenceCode}</if>
|
||||
<if test="ew.entity.projectNumber!=null"> AND PROJECT_NUMBER=#{ew.entity.projectNumber}</if>
|
||||
<if test="ew.entity.classify!=null"> AND CLASSIFY=#{ew.entity.classify}</if>
|
||||
<if test="ew.entity.projectLeader!=null"> AND PROJECT_LEADER=#{ew.entity.projectLeader}</if>
|
||||
<if test="ew.entity.members!=null"> AND MEMBERS=#{ew.entity.members}</if>
|
||||
<if test="ew.entity.materialDate!=null"> AND MATERIAL_DATE=#{ew.entity.materialDate}</if>
|
||||
<if test="ew.entity.beforeProblems!=null"> AND BEFORE_PROBLEMS=#{ew.entity.beforeProblems}</if>
|
||||
<if test="ew.entity.beforePicture!=null"> AND BEFORE_PICTURE=#{ew.entity.beforePicture}</if>
|
||||
<if test="ew.entity.afterPlan!=null"> AND AFTER_PLAN=#{ew.entity.afterPlan}</if>
|
||||
<if test="ew.entity.afterPicture!=null"> AND AFTER_PICTURE=#{ew.entity.afterPicture}</if>
|
||||
<if test="ew.entity.improveEffect!=null"> AND IMPROVE_EFFECT=#{ew.entity.improveEffect}</if>
|
||||
<if test="ew.entity.principalOpinion!=null"> AND PRINCIPAL_OPINION=#{ew.entity.principalOpinion}</if>
|
||||
<if test="ew.entity.proposedAmount!=null"> AND PROPOSED_AMOUNT=#{ew.entity.proposedAmount}</if>
|
||||
<if test="ew.entity.finalAmount!=null"> AND FINAL_AMOUNT=#{ew.entity.finalAmount}</if>
|
||||
<if test="ew.entity.groupViews!=null"> AND GROUP_VIEWS=#{ew.entity.groupViews}</if>
|
||||
<if test="ew.entity.managerViews!=null"> AND MANAGER_VIEWS=#{ew.entity.managerViews}</if>
|
||||
<if test="ew.entity.createdBy!=null"> AND CREATED_BY=#{ew.entity.createdBy}</if>
|
||||
<if test="ew.entity.createdTime!=null"> AND CREATED_TIME=#{ew.entity.createdTime}</if>
|
||||
<if test="ew.entity.updatedBy!=null"> AND UPDATED_BY=#{ew.entity.updatedBy}</if>
|
||||
<if test="ew.entity.updatedTime!=null"> AND UPDATED_TIME=#{ew.entity.updatedTime}</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_IMPROVEMENT_PROPOSALS
|
||||
<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.uploadCenter!=null"> AND UPLOAD_CENTER=#{ew.entity.uploadCenter}</if>
|
||||
<if test="ew.entity.uploadUser!=null"> AND UPLOAD_USER=#{ew.entity.uploadUser}</if>
|
||||
<if test="ew.entity.sequenceCode!=null"> AND SEQUENCE_CODE=#{ew.entity.sequenceCode}</if>
|
||||
<if test="ew.entity.projectNumber!=null"> AND PROJECT_NUMBER=#{ew.entity.projectNumber}</if>
|
||||
<if test="ew.entity.classify!=null"> AND CLASSIFY=#{ew.entity.classify}</if>
|
||||
<if test="ew.entity.projectLeader!=null"> AND PROJECT_LEADER=#{ew.entity.projectLeader}</if>
|
||||
<if test="ew.entity.members!=null"> AND MEMBERS=#{ew.entity.members}</if>
|
||||
<if test="ew.entity.materialDate!=null"> AND MATERIAL_DATE=#{ew.entity.materialDate}</if>
|
||||
<if test="ew.entity.beforeProblems!=null"> AND BEFORE_PROBLEMS=#{ew.entity.beforeProblems}</if>
|
||||
<if test="ew.entity.beforePicture!=null"> AND BEFORE_PICTURE=#{ew.entity.beforePicture}</if>
|
||||
<if test="ew.entity.afterPlan!=null"> AND AFTER_PLAN=#{ew.entity.afterPlan}</if>
|
||||
<if test="ew.entity.afterPicture!=null"> AND AFTER_PICTURE=#{ew.entity.afterPicture}</if>
|
||||
<if test="ew.entity.improveEffect!=null"> AND IMPROVE_EFFECT=#{ew.entity.improveEffect}</if>
|
||||
<if test="ew.entity.principalOpinion!=null"> AND PRINCIPAL_OPINION=#{ew.entity.principalOpinion}</if>
|
||||
<if test="ew.entity.proposedAmount!=null"> AND PROPOSED_AMOUNT=#{ew.entity.proposedAmount}</if>
|
||||
<if test="ew.entity.finalAmount!=null"> AND FINAL_AMOUNT=#{ew.entity.finalAmount}</if>
|
||||
<if test="ew.entity.groupViews!=null"> AND GROUP_VIEWS=#{ew.entity.groupViews}</if>
|
||||
<if test="ew.entity.managerViews!=null"> AND MANAGER_VIEWS=#{ew.entity.managerViews}</if>
|
||||
<if test="ew.entity.createdBy!=null"> AND CREATED_BY=#{ew.entity.createdBy}</if>
|
||||
<if test="ew.entity.createdTime!=null"> AND CREATED_TIME=#{ew.entity.createdTime}</if>
|
||||
<if test="ew.entity.updatedBy!=null"> AND UPDATED_BY=#{ew.entity.updatedBy}</if>
|
||||
<if test="ew.entity.updatedTime!=null"> AND UPDATED_TIME=#{ew.entity.updatedTime}</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.anomaly.model.ImprovementProposals">
|
||||
INSERT INTO Z_IMPROVEMENT_PROPOSALS
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
HANDLE,
|
||||
<if test="site!=null">SITE,</if>
|
||||
<if test="uploadCenter!=null">UPLOAD_CENTER,</if>
|
||||
<if test="uploadUser!=null">UPLOAD_USER,</if>
|
||||
<if test="sequenceCode!=null">SEQUENCE_CODE,</if>
|
||||
<if test="projectNumber!=null">PROJECT_NUMBER,</if>
|
||||
<if test="classify!=null">CLASSIFY,</if>
|
||||
<if test="projectLeader!=null">PROJECT_LEADER,</if>
|
||||
<if test="members!=null">MEMBERS,</if>
|
||||
<if test="materialDate!=null">MATERIAL_DATE,</if>
|
||||
<if test="beforeProblems!=null">BEFORE_PROBLEMS,</if>
|
||||
<if test="beforePicture!=null">BEFORE_PICTURE,</if>
|
||||
<if test="afterPlan!=null">AFTER_PLAN,</if>
|
||||
<if test="afterPicture!=null">AFTER_PICTURE,</if>
|
||||
<if test="improveEffect!=null">IMPROVE_EFFECT,</if>
|
||||
<if test="principalOpinion!=null">PRINCIPAL_OPINION,</if>
|
||||
<if test="proposedAmount!=null">PROPOSED_AMOUNT,</if>
|
||||
<if test="finalAmount!=null">FINAL_AMOUNT,</if>
|
||||
<if test="groupViews!=null">GROUP_VIEWS,</if>
|
||||
<if test="managerViews!=null">MANAGER_VIEWS,</if>
|
||||
<if test="createdBy!=null">CREATED_BY,</if>
|
||||
<if test="createdTime!=null">CREATED_TIME,</if>
|
||||
<if test="updatedBy!=null">UPDATED_BY,</if>
|
||||
<if test="updatedTime!=null">UPDATED_TIME,</if>
|
||||
</trim> VALUES
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
#{handle},
|
||||
<if test="site!=null">#{site},</if>
|
||||
<if test="uploadCenter!=null">#{uploadCenter},</if>
|
||||
<if test="uploadUser!=null">#{uploadUser},</if>
|
||||
<if test="sequenceCode!=null">#{sequenceCode},</if>
|
||||
<if test="projectNumber!=null">#{projectNumber},</if>
|
||||
<if test="classify!=null">#{classify},</if>
|
||||
<if test="projectLeader!=null">#{projectLeader},</if>
|
||||
<if test="members!=null">#{members},</if>
|
||||
<if test="materialDate!=null">#{materialDate},</if>
|
||||
<if test="beforeProblems!=null">#{beforeProblems},</if>
|
||||
<if test="beforePicture!=null">#{beforePicture},</if>
|
||||
<if test="afterPlan!=null">#{afterPlan},</if>
|
||||
<if test="afterPicture!=null">#{afterPicture},</if>
|
||||
<if test="improveEffect!=null">#{improveEffect},</if>
|
||||
<if test="principalOpinion!=null">#{principalOpinion},</if>
|
||||
<if test="proposedAmount!=null">#{proposedAmount},</if>
|
||||
<if test="finalAmount!=null">#{finalAmount},</if>
|
||||
<if test="groupViews!=null">#{groupViews},</if>
|
||||
<if test="managerViews!=null">#{managerViews},</if>
|
||||
<if test="createdBy!=null">#{createdBy},</if>
|
||||
<if test="createdTime!=null">#{createdTime},</if>
|
||||
<if test="updatedBy!=null">#{updatedBy},</if>
|
||||
<if test="updatedTime!=null">#{updatedTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<insert id="insertAllColumn" parameterType="com.foreverwin.mesnac.anomaly.model.ImprovementProposals">
|
||||
INSERT INTO Z_IMPROVEMENT_PROPOSALS
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<include refid="Base_Column_List"></include>
|
||||
</trim> VALUES
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
#{handle},
|
||||
#{site},
|
||||
#{uploadCenter},
|
||||
#{uploadUser},
|
||||
#{sequenceCode},
|
||||
#{projectNumber},
|
||||
#{classify},
|
||||
#{projectLeader},
|
||||
#{members},
|
||||
#{materialDate},
|
||||
#{beforeProblems},
|
||||
#{beforePicture},
|
||||
#{afterPlan},
|
||||
#{afterPicture},
|
||||
#{improveEffect},
|
||||
#{principalOpinion},
|
||||
#{proposedAmount},
|
||||
#{finalAmount},
|
||||
#{groupViews},
|
||||
#{managerViews},
|
||||
#{createdBy},
|
||||
#{createdTime},
|
||||
#{updatedBy},
|
||||
#{updatedTime},
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
||||
<update id="updateById">
|
||||
UPDATE Z_IMPROVEMENT_PROPOSALS <trim prefix="SET" suffixOverrides=",">
|
||||
<if test="et.site!=null">SITE=#{et.site},</if>
|
||||
<if test="et.uploadCenter!=null">UPLOAD_CENTER=#{et.uploadCenter},</if>
|
||||
<if test="et.uploadUser!=null">UPLOAD_USER=#{et.uploadUser},</if>
|
||||
<if test="et.sequenceCode!=null">SEQUENCE_CODE=#{et.sequenceCode},</if>
|
||||
<if test="et.projectNumber!=null">PROJECT_NUMBER=#{et.projectNumber},</if>
|
||||
<if test="et.classify!=null">CLASSIFY=#{et.classify},</if>
|
||||
<if test="et.projectLeader!=null">PROJECT_LEADER=#{et.projectLeader},</if>
|
||||
<if test="et.members!=null">MEMBERS=#{et.members},</if>
|
||||
<if test="et.materialDate!=null">MATERIAL_DATE=#{et.materialDate},</if>
|
||||
<if test="et.beforeProblems!=null">BEFORE_PROBLEMS=#{et.beforeProblems},</if>
|
||||
<if test="et.beforePicture!=null">BEFORE_PICTURE=#{et.beforePicture},</if>
|
||||
<if test="et.afterPlan!=null">AFTER_PLAN=#{et.afterPlan},</if>
|
||||
<if test="et.afterPicture!=null">AFTER_PICTURE=#{et.afterPicture},</if>
|
||||
<if test="et.improveEffect!=null">IMPROVE_EFFECT=#{et.improveEffect},</if>
|
||||
<if test="et.principalOpinion!=null">PRINCIPAL_OPINION=#{et.principalOpinion},</if>
|
||||
<if test="et.proposedAmount!=null">PROPOSED_AMOUNT=#{et.proposedAmount},</if>
|
||||
<if test="et.finalAmount!=null">FINAL_AMOUNT=#{et.finalAmount},</if>
|
||||
<if test="et.groupViews!=null">GROUP_VIEWS=#{et.groupViews},</if>
|
||||
<if test="et.managerViews!=null">MANAGER_VIEWS=#{et.managerViews},</if>
|
||||
<if test="et.createdBy!=null">CREATED_BY=#{et.createdBy},</if>
|
||||
<if test="et.createdTime!=null">CREATED_TIME=#{et.createdTime},</if>
|
||||
<if test="et.updatedBy!=null">UPDATED_BY=#{et.updatedBy},</if>
|
||||
<if test="et.updatedTime!=null">UPDATED_TIME=#{et.updatedTime},</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_IMPROVEMENT_PROPOSALS <trim prefix="SET" suffixOverrides=",">
|
||||
SITE=#{et.site},
|
||||
UPLOAD_CENTER=#{et.uploadCenter},
|
||||
UPLOAD_USER=#{et.uploadUser},
|
||||
SEQUENCE_CODE=#{et.sequenceCode},
|
||||
PROJECT_NUMBER=#{et.projectNumber},
|
||||
CLASSIFY=#{et.classify},
|
||||
PROJECT_LEADER=#{et.projectLeader},
|
||||
MEMBERS=#{et.members},
|
||||
MATERIAL_DATE=#{et.materialDate},
|
||||
BEFORE_PROBLEMS=#{et.beforeProblems},
|
||||
BEFORE_PICTURE=#{et.beforePicture},
|
||||
AFTER_PLAN=#{et.afterPlan},
|
||||
AFTER_PICTURE=#{et.afterPicture},
|
||||
IMPROVE_EFFECT=#{et.improveEffect},
|
||||
PRINCIPAL_OPINION=#{et.principalOpinion},
|
||||
PROPOSED_AMOUNT=#{et.proposedAmount},
|
||||
FINAL_AMOUNT=#{et.finalAmount},
|
||||
GROUP_VIEWS=#{et.groupViews},
|
||||
MANAGER_VIEWS=#{et.managerViews},
|
||||
CREATED_BY=#{et.createdBy},
|
||||
CREATED_TIME=#{et.createdTime},
|
||||
UPDATED_BY=#{et.updatedBy},
|
||||
UPDATED_TIME=#{et.updatedTime},
|
||||
</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_IMPROVEMENT_PROPOSALS <trim prefix="SET" suffixOverrides=",">
|
||||
<if test="et.site!=null">SITE=#{et.site},</if>
|
||||
<if test="et.uploadCenter!=null">UPLOAD_CENTER=#{et.uploadCenter},</if>
|
||||
<if test="et.uploadUser!=null">UPLOAD_USER=#{et.uploadUser},</if>
|
||||
<if test="et.sequenceCode!=null">SEQUENCE_CODE=#{et.sequenceCode},</if>
|
||||
<if test="et.projectNumber!=null">PROJECT_NUMBER=#{et.projectNumber},</if>
|
||||
<if test="et.classify!=null">CLASSIFY=#{et.classify},</if>
|
||||
<if test="et.projectLeader!=null">PROJECT_LEADER=#{et.projectLeader},</if>
|
||||
<if test="et.members!=null">MEMBERS=#{et.members},</if>
|
||||
<if test="et.materialDate!=null">MATERIAL_DATE=#{et.materialDate},</if>
|
||||
<if test="et.beforeProblems!=null">BEFORE_PROBLEMS=#{et.beforeProblems},</if>
|
||||
<if test="et.beforePicture!=null">BEFORE_PICTURE=#{et.beforePicture},</if>
|
||||
<if test="et.afterPlan!=null">AFTER_PLAN=#{et.afterPlan},</if>
|
||||
<if test="et.afterPicture!=null">AFTER_PICTURE=#{et.afterPicture},</if>
|
||||
<if test="et.improveEffect!=null">IMPROVE_EFFECT=#{et.improveEffect},</if>
|
||||
<if test="et.principalOpinion!=null">PRINCIPAL_OPINION=#{et.principalOpinion},</if>
|
||||
<if test="et.proposedAmount!=null">PROPOSED_AMOUNT=#{et.proposedAmount},</if>
|
||||
<if test="et.finalAmount!=null">FINAL_AMOUNT=#{et.finalAmount},</if>
|
||||
<if test="et.groupViews!=null">GROUP_VIEWS=#{et.groupViews},</if>
|
||||
<if test="et.managerViews!=null">MANAGER_VIEWS=#{et.managerViews},</if>
|
||||
<if test="et.createdBy!=null">CREATED_BY=#{et.createdBy},</if>
|
||||
<if test="et.createdTime!=null">CREATED_TIME=#{et.createdTime},</if>
|
||||
<if test="et.updatedBy!=null">UPDATED_BY=#{et.updatedBy},</if>
|
||||
<if test="et.updatedTime!=null">UPDATED_TIME=#{et.updatedTime},</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.uploadCenter!=null"> AND UPLOAD_CENTER=#{ew.entity.uploadCenter}</if>
|
||||
<if test="ew.entity.uploadUser!=null"> AND UPLOAD_USER=#{ew.entity.uploadUser}</if>
|
||||
<if test="ew.entity.sequenceCode!=null"> AND SEQUENCE_CODE=#{ew.entity.sequenceCode}</if>
|
||||
<if test="ew.entity.projectNumber!=null"> AND PROJECT_NUMBER=#{ew.entity.projectNumber}</if>
|
||||
<if test="ew.entity.classify!=null"> AND CLASSIFY=#{ew.entity.classify}</if>
|
||||
<if test="ew.entity.projectLeader!=null"> AND PROJECT_LEADER=#{ew.entity.projectLeader}</if>
|
||||
<if test="ew.entity.members!=null"> AND MEMBERS=#{ew.entity.members}</if>
|
||||
<if test="ew.entity.materialDate!=null"> AND MATERIAL_DATE=#{ew.entity.materialDate}</if>
|
||||
<if test="ew.entity.beforeProblems!=null"> AND BEFORE_PROBLEMS=#{ew.entity.beforeProblems}</if>
|
||||
<if test="ew.entity.beforePicture!=null"> AND BEFORE_PICTURE=#{ew.entity.beforePicture}</if>
|
||||
<if test="ew.entity.afterPlan!=null"> AND AFTER_PLAN=#{ew.entity.afterPlan}</if>
|
||||
<if test="ew.entity.afterPicture!=null"> AND AFTER_PICTURE=#{ew.entity.afterPicture}</if>
|
||||
<if test="ew.entity.improveEffect!=null"> AND IMPROVE_EFFECT=#{ew.entity.improveEffect}</if>
|
||||
<if test="ew.entity.principalOpinion!=null"> AND PRINCIPAL_OPINION=#{ew.entity.principalOpinion}</if>
|
||||
<if test="ew.entity.proposedAmount!=null"> AND PROPOSED_AMOUNT=#{ew.entity.proposedAmount}</if>
|
||||
<if test="ew.entity.finalAmount!=null"> AND FINAL_AMOUNT=#{ew.entity.finalAmount}</if>
|
||||
<if test="ew.entity.groupViews!=null"> AND GROUP_VIEWS=#{ew.entity.groupViews}</if>
|
||||
<if test="ew.entity.managerViews!=null"> AND MANAGER_VIEWS=#{ew.entity.managerViews}</if>
|
||||
<if test="ew.entity.createdBy!=null"> AND CREATED_BY=#{ew.entity.createdBy}</if>
|
||||
<if test="ew.entity.createdTime!=null"> AND CREATED_TIME=#{ew.entity.createdTime}</if>
|
||||
<if test="ew.entity.updatedBy!=null"> AND UPDATED_BY=#{ew.entity.updatedBy}</if>
|
||||
<if test="ew.entity.updatedTime!=null"> AND UPDATED_TIME=#{ew.entity.updatedTime}</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_IMPROVEMENT_PROPOSALS WHERE HANDLE=#{handle}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByMap">
|
||||
DELETE FROM Z_IMPROVEMENT_PROPOSALS
|
||||
<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_IMPROVEMENT_PROPOSALS
|
||||
<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.uploadCenter!=null"> AND UPLOAD_CENTER=#{ew.entity.uploadCenter}</if>
|
||||
<if test="ew.entity.uploadUser!=null"> AND UPLOAD_USER=#{ew.entity.uploadUser}</if>
|
||||
<if test="ew.entity.sequenceCode!=null"> AND SEQUENCE_CODE=#{ew.entity.sequenceCode}</if>
|
||||
<if test="ew.entity.projectNumber!=null"> AND PROJECT_NUMBER=#{ew.entity.projectNumber}</if>
|
||||
<if test="ew.entity.classify!=null"> AND CLASSIFY=#{ew.entity.classify}</if>
|
||||
<if test="ew.entity.projectLeader!=null"> AND PROJECT_LEADER=#{ew.entity.projectLeader}</if>
|
||||
<if test="ew.entity.members!=null"> AND MEMBERS=#{ew.entity.members}</if>
|
||||
<if test="ew.entity.materialDate!=null"> AND MATERIAL_DATE=#{ew.entity.materialDate}</if>
|
||||
<if test="ew.entity.beforeProblems!=null"> AND BEFORE_PROBLEMS=#{ew.entity.beforeProblems}</if>
|
||||
<if test="ew.entity.beforePicture!=null"> AND BEFORE_PICTURE=#{ew.entity.beforePicture}</if>
|
||||
<if test="ew.entity.afterPlan!=null"> AND AFTER_PLAN=#{ew.entity.afterPlan}</if>
|
||||
<if test="ew.entity.afterPicture!=null"> AND AFTER_PICTURE=#{ew.entity.afterPicture}</if>
|
||||
<if test="ew.entity.improveEffect!=null"> AND IMPROVE_EFFECT=#{ew.entity.improveEffect}</if>
|
||||
<if test="ew.entity.principalOpinion!=null"> AND PRINCIPAL_OPINION=#{ew.entity.principalOpinion}</if>
|
||||
<if test="ew.entity.proposedAmount!=null"> AND PROPOSED_AMOUNT=#{ew.entity.proposedAmount}</if>
|
||||
<if test="ew.entity.finalAmount!=null"> AND FINAL_AMOUNT=#{ew.entity.finalAmount}</if>
|
||||
<if test="ew.entity.groupViews!=null"> AND GROUP_VIEWS=#{ew.entity.groupViews}</if>
|
||||
<if test="ew.entity.managerViews!=null"> AND MANAGER_VIEWS=#{ew.entity.managerViews}</if>
|
||||
<if test="ew.entity.createdBy!=null"> AND CREATED_BY=#{ew.entity.createdBy}</if>
|
||||
<if test="ew.entity.createdTime!=null"> AND CREATED_TIME=#{ew.entity.createdTime}</if>
|
||||
<if test="ew.entity.updatedBy!=null"> AND UPDATED_BY=#{ew.entity.updatedBy}</if>
|
||||
<if test="ew.entity.updatedTime!=null"> AND UPDATED_TIME=#{ew.entity.updatedTime}</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_IMPROVEMENT_PROPOSALS WHERE HANDLE IN (
|
||||
<foreach item="item" index="index" collection="coll" separator=",">#{item}
|
||||
</foreach>)
|
||||
</delete>
|
||||
<!-- BaseMapper标准查询/修改/删除 -->
|
||||
|
||||
</mapper>
|
Loading…
Reference in New Issue