打印日志记录
parent
c8cc9310d8
commit
296aa3ba86
@ -0,0 +1,136 @@
|
||||
package com.foreverwin.mesnac.common.controller;
|
||||
|
||||
import com.foreverwin.modular.core.util.R;
|
||||
import com.foreverwin.modular.core.util.FrontPage;
|
||||
import com.foreverwin.modular.core.util.CommonMethods;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.foreverwin.mesnac.common.service.PrintLogService;
|
||||
import com.foreverwin.mesnac.common.model.PrintLog;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Philip
|
||||
* @since 2021-07-16
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/Z-PRINT-LOG")
|
||||
public class PrintLogController {
|
||||
|
||||
@Autowired
|
||||
public PrintLogService printLogService;
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id 主键
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@GetMapping("/{id:.+}")
|
||||
public R getPrintLogById(@PathVariable String id) {
|
||||
return R.ok( printLogService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询所有数据
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@GetMapping("")
|
||||
public R getPrintLogList(PrintLog printLog){
|
||||
List<PrintLog> result;
|
||||
QueryWrapper<PrintLog> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(printLog);
|
||||
result = printLogService.list(queryWrapper);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询数据
|
||||
*
|
||||
* @param frontPage 分页信息
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@GetMapping("/page")
|
||||
public R page(FrontPage<PrintLog> frontPage, PrintLog printLog){
|
||||
IPage result;
|
||||
QueryWrapper<PrintLog> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(printLog);
|
||||
if (frontPage.getGlobalQuery() != null && !"".equals(frontPage.getGlobalQuery().trim())) {
|
||||
//TODO modify global query
|
||||
queryWrapper.lambda().and(wrapper -> wrapper
|
||||
.like(PrintLog::getHandle, frontPage.getGlobalQuery())
|
||||
.or().like(PrintLog::getSite, frontPage.getGlobalQuery())
|
||||
.or().like(PrintLog::getCategory, frontPage.getGlobalQuery())
|
||||
.or().like(PrintLog::getPrintName, frontPage.getGlobalQuery())
|
||||
.or().like(PrintLog::getPrintTemplate, frontPage.getGlobalQuery())
|
||||
.or().like(PrintLog::getPrintParam, frontPage.getGlobalQuery())
|
||||
.or().like(PrintLog::getSfc, frontPage.getGlobalQuery())
|
||||
.or().like(PrintLog::getResrce, frontPage.getGlobalQuery())
|
||||
.or().like(PrintLog::getStepId, frontPage.getGlobalQuery())
|
||||
.or().like(PrintLog::getOperation, frontPage.getGlobalQuery())
|
||||
.or().like(PrintLog::getInventory, frontPage.getGlobalQuery())
|
||||
.or().like(PrintLog::getComments, frontPage.getGlobalQuery())
|
||||
.or().like(PrintLog::getOther1, frontPage.getGlobalQuery())
|
||||
.or().like(PrintLog::getOther2, frontPage.getGlobalQuery())
|
||||
.or().like(PrintLog::getOther3, frontPage.getGlobalQuery())
|
||||
.or().like(PrintLog::getOther4, frontPage.getGlobalQuery())
|
||||
.or().like(PrintLog::getOther5, frontPage.getGlobalQuery())
|
||||
.or().like(PrintLog::getCreateUser, frontPage.getGlobalQuery())
|
||||
.or().like(PrintLog::getModifyUser, frontPage.getGlobalQuery())
|
||||
);
|
||||
}
|
||||
result = printLogService.page(frontPage.getPagePlus(), queryWrapper);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增
|
||||
* @param printLog 传递的实体
|
||||
* @return null 失败 实体成功
|
||||
*/
|
||||
@PostMapping
|
||||
public R save(@RequestBody PrintLog printLog) {
|
||||
return R.ok(printLogService.save(printLog));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* @param printLog 传递的实体
|
||||
* @return null 失败 实体成功
|
||||
*/
|
||||
@PutMapping
|
||||
public R updateById(@RequestBody PrintLog printLog) {
|
||||
return R.ok(printLogService.updateById(printLog));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id删除对象
|
||||
* @param id 实体ID
|
||||
* @return 0 失败 1 成功
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping(method = RequestMethod.DELETE, value = "/{id:.+}")
|
||||
public R removeById(@PathVariable("id") String id){
|
||||
return R.ok(printLogService.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(printLogService.removeByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.foreverwin.mesnac.common.mapper;
|
||||
|
||||
import com.foreverwin.mesnac.common.model.PrintLog;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author Philip
|
||||
* @since 2021-07-16
|
||||
*/
|
||||
@Repository
|
||||
public interface PrintLogMapper extends BaseMapper<PrintLog> {
|
||||
|
||||
}
|
@ -0,0 +1,358 @@
|
||||
package com.foreverwin.mesnac.common.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import java.io.Serializable;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author Philip
|
||||
* @since 2021-07-16
|
||||
*/
|
||||
|
||||
@TableName("Z_PRINT_LOG")
|
||||
public class PrintLog extends Model<PrintLog> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "HANDLE", type = IdType.INPUT)
|
||||
private String handle;
|
||||
/**
|
||||
* 站点
|
||||
*/
|
||||
@TableField("SITE")
|
||||
private String site;
|
||||
/**
|
||||
* 打印类别
|
||||
*/
|
||||
@TableField("CATEGORY")
|
||||
private String category;
|
||||
/**
|
||||
* 打印机
|
||||
*/
|
||||
@TableField("PRINT_NAME")
|
||||
private String printName;
|
||||
/**
|
||||
* 打印模板
|
||||
*/
|
||||
@TableField("PRINT_TEMPLATE")
|
||||
private String printTemplate;
|
||||
/**
|
||||
* 打印参数
|
||||
*/
|
||||
@TableField("PRINT_PARAM")
|
||||
private String printParam;
|
||||
/**
|
||||
* 生产批次
|
||||
*/
|
||||
@TableField("SFC")
|
||||
private String sfc;
|
||||
/**
|
||||
* 资源编号
|
||||
*/
|
||||
@TableField("RESRCE")
|
||||
private String resrce;
|
||||
/**
|
||||
* 步骤标识
|
||||
*/
|
||||
@TableField("STEP_ID")
|
||||
private String stepId;
|
||||
/**
|
||||
* 工序编号
|
||||
*/
|
||||
@TableField("OPERATION")
|
||||
private String operation;
|
||||
/**
|
||||
* 库存批次
|
||||
*/
|
||||
@TableField("INVENTORY")
|
||||
private String inventory;
|
||||
@TableField("COMMENTS")
|
||||
private String comments;
|
||||
@TableField("OTHER_1")
|
||||
private String other1;
|
||||
@TableField("OTHER_2")
|
||||
private String other2;
|
||||
@TableField("OTHER_3")
|
||||
private String other3;
|
||||
@TableField("OTHER_4")
|
||||
private String other4;
|
||||
@TableField("OTHER_5")
|
||||
private String other5;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField("CREATE_USER")
|
||||
private String createUser;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("CREATED_DATE_TIME")
|
||||
private LocalDateTime createdDateTime;
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
@TableField("MODIFY_USER")
|
||||
private String modifyUser;
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@TableField("MODIFIED_DATE_TIME")
|
||||
private LocalDateTime modifiedDateTime;
|
||||
|
||||
|
||||
public String getHandle() {
|
||||
return handle;
|
||||
}
|
||||
|
||||
public void setHandle(String handle) {
|
||||
this.handle = handle;
|
||||
}
|
||||
|
||||
public String getSite() {
|
||||
return site;
|
||||
}
|
||||
|
||||
public void setSite(String site) {
|
||||
this.site = site;
|
||||
}
|
||||
|
||||
public String getCategory() {
|
||||
return category;
|
||||
}
|
||||
|
||||
public void setCategory(String category) {
|
||||
this.category = category;
|
||||
}
|
||||
|
||||
public String getPrintName() {
|
||||
return printName;
|
||||
}
|
||||
|
||||
public void setPrintName(String printName) {
|
||||
this.printName = printName;
|
||||
}
|
||||
|
||||
public String getPrintTemplate() {
|
||||
return printTemplate;
|
||||
}
|
||||
|
||||
public void setPrintTemplate(String printTemplate) {
|
||||
this.printTemplate = printTemplate;
|
||||
}
|
||||
|
||||
public String getPrintParam() {
|
||||
return printParam;
|
||||
}
|
||||
|
||||
public void setPrintParam(String printParam) {
|
||||
this.printParam = printParam;
|
||||
}
|
||||
|
||||
public String getSfc() {
|
||||
return sfc;
|
||||
}
|
||||
|
||||
public void setSfc(String sfc) {
|
||||
this.sfc = sfc;
|
||||
}
|
||||
|
||||
public String getResrce() {
|
||||
return resrce;
|
||||
}
|
||||
|
||||
public void setResrce(String resrce) {
|
||||
this.resrce = resrce;
|
||||
}
|
||||
|
||||
public String getStepId() {
|
||||
return stepId;
|
||||
}
|
||||
|
||||
public void setStepId(String stepId) {
|
||||
this.stepId = stepId;
|
||||
}
|
||||
|
||||
public String getOperation() {
|
||||
return operation;
|
||||
}
|
||||
|
||||
public void setOperation(String operation) {
|
||||
this.operation = operation;
|
||||
}
|
||||
|
||||
public String getInventory() {
|
||||
return inventory;
|
||||
}
|
||||
|
||||
public void setInventory(String inventory) {
|
||||
this.inventory = inventory;
|
||||
}
|
||||
|
||||
public String getComments() {
|
||||
return comments;
|
||||
}
|
||||
|
||||
public void setComments(String comments) {
|
||||
this.comments = comments;
|
||||
}
|
||||
|
||||
public String getOther1() {
|
||||
return other1;
|
||||
}
|
||||
|
||||
public void setOther1(String other1) {
|
||||
this.other1 = other1;
|
||||
}
|
||||
|
||||
public String getOther2() {
|
||||
return other2;
|
||||
}
|
||||
|
||||
public void setOther2(String other2) {
|
||||
this.other2 = other2;
|
||||
}
|
||||
|
||||
public String getOther3() {
|
||||
return other3;
|
||||
}
|
||||
|
||||
public void setOther3(String other3) {
|
||||
this.other3 = other3;
|
||||
}
|
||||
|
||||
public String getOther4() {
|
||||
return other4;
|
||||
}
|
||||
|
||||
public void setOther4(String other4) {
|
||||
this.other4 = other4;
|
||||
}
|
||||
|
||||
public String getOther5() {
|
||||
return other5;
|
||||
}
|
||||
|
||||
public void setOther5(String other5) {
|
||||
this.other5 = other5;
|
||||
}
|
||||
|
||||
public String getCreateUser() {
|
||||
return createUser;
|
||||
}
|
||||
|
||||
public void setCreateUser(String createUser) {
|
||||
this.createUser = createUser;
|
||||
}
|
||||
|
||||
public LocalDateTime getCreatedDateTime() {
|
||||
return createdDateTime;
|
||||
}
|
||||
|
||||
public void setCreatedDateTime(LocalDateTime createdDateTime) {
|
||||
this.createdDateTime = createdDateTime;
|
||||
}
|
||||
|
||||
public String getModifyUser() {
|
||||
return modifyUser;
|
||||
}
|
||||
|
||||
public void setModifyUser(String modifyUser) {
|
||||
this.modifyUser = modifyUser;
|
||||
}
|
||||
|
||||
public LocalDateTime getModifiedDateTime() {
|
||||
return modifiedDateTime;
|
||||
}
|
||||
|
||||
public void setModifiedDateTime(LocalDateTime modifiedDateTime) {
|
||||
this.modifiedDateTime = modifiedDateTime;
|
||||
}
|
||||
|
||||
public static final String HANDLE = "HANDLE";
|
||||
|
||||
public static final String SITE = "SITE";
|
||||
|
||||
public static final String CATEGORY = "CATEGORY";
|
||||
|
||||
public static final String PRINT_NAME = "PRINT_NAME";
|
||||
|
||||
public static final String PRINT_TEMPLATE = "PRINT_TEMPLATE";
|
||||
|
||||
public static final String PRINT_PARAM = "PRINT_PARAM";
|
||||
|
||||
public static final String SFC = "SFC";
|
||||
|
||||
public static final String RESRCE = "RESRCE";
|
||||
|
||||
public static final String STEP_ID = "STEP_ID";
|
||||
|
||||
public static final String OPERATION = "OPERATION";
|
||||
|
||||
public static final String INVENTORY = "INVENTORY";
|
||||
|
||||
public static final String COMMENTS = "COMMENTS";
|
||||
|
||||
public static final String OTHER_1 = "OTHER_1";
|
||||
|
||||
public static final String OTHER_2 = "OTHER_2";
|
||||
|
||||
public static final String OTHER_3 = "OTHER_3";
|
||||
|
||||
public static final String OTHER_4 = "OTHER_4";
|
||||
|
||||
public static final String OTHER_5 = "OTHER_5";
|
||||
|
||||
public static final String CREATE_USER = "CREATE_USER";
|
||||
|
||||
public static final String CREATED_DATE_TIME = "CREATED_DATE_TIME";
|
||||
|
||||
public static final String MODIFY_USER = "MODIFY_USER";
|
||||
|
||||
public static final String MODIFIED_DATE_TIME = "MODIFIED_DATE_TIME";
|
||||
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.handle;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "PrintLog{" +
|
||||
"handle = " + handle +
|
||||
", site = " + site +
|
||||
", category = " + category +
|
||||
", printName = " + printName +
|
||||
", printTemplate = " + printTemplate +
|
||||
", printParam = " + printParam +
|
||||
", sfc = " + sfc +
|
||||
", resrce = " + resrce +
|
||||
", stepId = " + stepId +
|
||||
", operation = " + operation +
|
||||
", inventory = " + inventory +
|
||||
", comments = " + comments +
|
||||
", other1 = " + other1 +
|
||||
", other2 = " + other2 +
|
||||
", other3 = " + other3 +
|
||||
", other4 = " + other4 +
|
||||
", other5 = " + other5 +
|
||||
", createUser = " + createUser +
|
||||
", createdDateTime = " + createdDateTime +
|
||||
", modifyUser = " + modifyUser +
|
||||
", modifiedDateTime = " + modifiedDateTime +
|
||||
"}";
|
||||
}
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
package com.foreverwin.mesnac.common.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 打印参数实体类
|
||||
*
|
||||
*/
|
||||
public class PrintRequest implements Serializable {
|
||||
|
||||
//打印数量
|
||||
private int labelQty;
|
||||
//打印机
|
||||
private String printer;
|
||||
//打印模板
|
||||
private String template;
|
||||
//打印参数
|
||||
private Map<String, Object> paramMap;
|
||||
|
||||
public int getLabelQty() {
|
||||
return labelQty;
|
||||
}
|
||||
|
||||
public void setLabelQty(int labelQty) {
|
||||
this.labelQty = labelQty;
|
||||
}
|
||||
|
||||
public String getPrinter() {
|
||||
return printer;
|
||||
}
|
||||
|
||||
public void setPrinter(String printer) {
|
||||
this.printer = printer;
|
||||
}
|
||||
|
||||
public String getTemplate() {
|
||||
return template;
|
||||
}
|
||||
|
||||
public void setTemplate(String template) {
|
||||
this.template = template;
|
||||
}
|
||||
|
||||
public Map<String, Object> getParamMap() {
|
||||
return paramMap;
|
||||
}
|
||||
|
||||
public void setParamMap(Map<String, Object> paramMap) {
|
||||
this.paramMap = paramMap;
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.foreverwin.mesnac.common.service;
|
||||
|
||||
import com.foreverwin.mesnac.common.model.PrintLog;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author Philip
|
||||
* @since 2021-07-16
|
||||
*/
|
||||
public interface PrintLogService extends IService<PrintLog> {
|
||||
|
||||
/**
|
||||
* 记录打印日志
|
||||
*
|
||||
* @param printLog
|
||||
*/
|
||||
void savePrintLog(String site, String user, PrintLog printLog);
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package com.foreverwin.mesnac.common.service;
|
||||
|
||||
|
||||
import com.foreverwin.mesnac.common.model.PrintRequest;
|
||||
|
||||
/**
|
||||
* @author Ervin Chen
|
||||
* @date 2020/3/6 13:37
|
||||
*/
|
||||
public interface PrintService {
|
||||
|
||||
void print(PrintRequest printRequest);
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
package com.foreverwin.mesnac.common.service.impl;
|
||||
|
||||
|
||||
import com.foreverwin.mesnac.common.model.PrintLog;
|
||||
import com.foreverwin.mesnac.common.mapper.PrintLogMapper;
|
||||
import com.foreverwin.mesnac.common.service.PrintLogService;
|
||||
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.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author Philip
|
||||
* @since 2021-07-16
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class PrintLogServiceImpl extends ServiceImpl<PrintLogMapper, PrintLog> implements PrintLogService {
|
||||
|
||||
|
||||
@Autowired
|
||||
private PrintLogMapper printLogMapper;
|
||||
|
||||
@Override
|
||||
@Transactional(propagation = Propagation.REQUIRES_NEW)
|
||||
public void savePrintLog(String site, String user, PrintLog printLog) {
|
||||
LocalDateTime dateTime = LocalDateTime.now();
|
||||
|
||||
printLog.setSite(site);
|
||||
printLog.setCreateUser(user);
|
||||
printLog.setCreatedDateTime(dateTime);
|
||||
printLog.setModifyUser(user);
|
||||
printLog.setModifiedDateTime(dateTime);
|
||||
this.save(printLog);
|
||||
}
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package com.foreverwin.mesnac.common.service.impl;
|
||||
|
||||
|
||||
import com.foreverwin.mesnac.common.model.PrintRequest;
|
||||
import com.foreverwin.mesnac.common.service.PrintService;
|
||||
import com.foreverwin.mesnac.common.util.HttpUtils;
|
||||
import com.foreverwin.mesnac.meapi.util.StringUtils;
|
||||
import com.foreverwin.modular.core.exception.BusinessException;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
||||
/**
|
||||
* @author Ervin Chen
|
||||
* @date 2020/3/6 13:38
|
||||
*/
|
||||
@Service
|
||||
public class PrintServiceImpl implements PrintService {
|
||||
|
||||
@Value("${print.server}")
|
||||
private String printServer;
|
||||
|
||||
@Override
|
||||
public void print(PrintRequest printRequest) {
|
||||
String printer = printRequest.getPrinter();
|
||||
String printTemplate = printRequest.getTemplate();
|
||||
|
||||
if (StringUtils.isBlank(printer)) {
|
||||
throw BusinessException.build("打印机未维护");
|
||||
}
|
||||
if (StringUtils.isBlank(printTemplate)) {
|
||||
throw BusinessException.build("打印模板未维护");
|
||||
}
|
||||
|
||||
//发送打印请求
|
||||
ResponseEntity responseEntity = HttpUtils.callPost(printServer, "REQUEST_DATA=" + printRequest.toString());
|
||||
}
|
||||
}
|
@ -0,0 +1,578 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.foreverwin.mesnac.common.mapper.PrintLogMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.foreverwin.mesnac.common.model.PrintLog">
|
||||
<id column="HANDLE" property="handle" />
|
||||
<result column="SITE" property="site" />
|
||||
<result column="CATEGORY" property="category" />
|
||||
<result column="PRINT_NAME" property="printName" />
|
||||
<result column="PRINT_TEMPLATE" property="printTemplate" />
|
||||
<result column="PRINT_PARAM" property="printParam" />
|
||||
<result column="SFC" property="sfc" />
|
||||
<result column="RESRCE" property="resrce" />
|
||||
<result column="STEP_ID" property="stepId" />
|
||||
<result column="OPERATION" property="operation" />
|
||||
<result column="INVENTORY" property="inventory" />
|
||||
<result column="COMMENTS" property="comments" />
|
||||
<result column="OTHER_1" property="other1" />
|
||||
<result column="OTHER_2" property="other2" />
|
||||
<result column="OTHER_3" property="other3" />
|
||||
<result column="OTHER_4" property="other4" />
|
||||
<result column="OTHER_5" property="other5" />
|
||||
<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, CATEGORY, PRINT_NAME, PRINT_TEMPLATE, PRINT_PARAM, SFC, RESRCE, STEP_ID, OPERATION, INVENTORY, COMMENTS, OTHER_1, OTHER_2, OTHER_3, OTHER_4, OTHER_5, 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_PRINT_LOG WHERE HANDLE=#{handle}
|
||||
</select>
|
||||
|
||||
<select id="selectByMap" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"></include>
|
||||
FROM Z_PRINT_LOG
|
||||
<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_PRINT_LOG 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_PRINT_LOG
|
||||
<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.category!=null"> AND CATEGORY=#{ew.entity.category}</if>
|
||||
<if test="ew.entity.printName!=null"> AND PRINT_NAME=#{ew.entity.printName}</if>
|
||||
<if test="ew.entity.printTemplate!=null"> AND PRINT_TEMPLATE=#{ew.entity.printTemplate}</if>
|
||||
<if test="ew.entity.printParam!=null"> AND PRINT_PARAM=#{ew.entity.printParam}</if>
|
||||
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
|
||||
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
|
||||
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
|
||||
<if test="ew.entity.inventory!=null"> AND INVENTORY=#{ew.entity.inventory}</if>
|
||||
<if test="ew.entity.comments!=null"> AND COMMENTS=#{ew.entity.comments}</if>
|
||||
<if test="ew.entity.other1!=null"> AND OTHER_1=#{ew.entity.other1}</if>
|
||||
<if test="ew.entity.other2!=null"> AND OTHER_2=#{ew.entity.other2}</if>
|
||||
<if test="ew.entity.other3!=null"> AND OTHER_3=#{ew.entity.other3}</if>
|
||||
<if test="ew.entity.other4!=null"> AND OTHER_4=#{ew.entity.other4}</if>
|
||||
<if test="ew.entity.other5!=null"> AND OTHER_5=#{ew.entity.other5}</if>
|
||||
<if 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_PRINT_LOG
|
||||
<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.category!=null"> AND CATEGORY=#{ew.entity.category}</if>
|
||||
<if test="ew.entity.printName!=null"> AND PRINT_NAME=#{ew.entity.printName}</if>
|
||||
<if test="ew.entity.printTemplate!=null"> AND PRINT_TEMPLATE=#{ew.entity.printTemplate}</if>
|
||||
<if test="ew.entity.printParam!=null"> AND PRINT_PARAM=#{ew.entity.printParam}</if>
|
||||
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
|
||||
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
|
||||
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
|
||||
<if test="ew.entity.inventory!=null"> AND INVENTORY=#{ew.entity.inventory}</if>
|
||||
<if test="ew.entity.comments!=null"> AND COMMENTS=#{ew.entity.comments}</if>
|
||||
<if test="ew.entity.other1!=null"> AND OTHER_1=#{ew.entity.other1}</if>
|
||||
<if test="ew.entity.other2!=null"> AND OTHER_2=#{ew.entity.other2}</if>
|
||||
<if test="ew.entity.other3!=null"> AND OTHER_3=#{ew.entity.other3}</if>
|
||||
<if test="ew.entity.other4!=null"> AND OTHER_4=#{ew.entity.other4}</if>
|
||||
<if test="ew.entity.other5!=null"> AND OTHER_5=#{ew.entity.other5}</if>
|
||||
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectList" resultMap="BaseResultMap">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_PRINT_LOG
|
||||
<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.category!=null"> AND CATEGORY=#{ew.entity.category}</if>
|
||||
<if test="ew.entity.printName!=null"> AND PRINT_NAME=#{ew.entity.printName}</if>
|
||||
<if test="ew.entity.printTemplate!=null"> AND PRINT_TEMPLATE=#{ew.entity.printTemplate}</if>
|
||||
<if test="ew.entity.printParam!=null"> AND PRINT_PARAM=#{ew.entity.printParam}</if>
|
||||
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
|
||||
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
|
||||
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
|
||||
<if test="ew.entity.inventory!=null"> AND INVENTORY=#{ew.entity.inventory}</if>
|
||||
<if test="ew.entity.comments!=null"> AND COMMENTS=#{ew.entity.comments}</if>
|
||||
<if test="ew.entity.other1!=null"> AND OTHER_1=#{ew.entity.other1}</if>
|
||||
<if test="ew.entity.other2!=null"> AND OTHER_2=#{ew.entity.other2}</if>
|
||||
<if test="ew.entity.other3!=null"> AND OTHER_3=#{ew.entity.other3}</if>
|
||||
<if test="ew.entity.other4!=null"> AND OTHER_4=#{ew.entity.other4}</if>
|
||||
<if test="ew.entity.other5!=null"> AND OTHER_5=#{ew.entity.other5}</if>
|
||||
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectMaps" resultType="HashMap">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_PRINT_LOG
|
||||
<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.category!=null"> AND CATEGORY=#{ew.entity.category}</if>
|
||||
<if test="ew.entity.printName!=null"> AND PRINT_NAME=#{ew.entity.printName}</if>
|
||||
<if test="ew.entity.printTemplate!=null"> AND PRINT_TEMPLATE=#{ew.entity.printTemplate}</if>
|
||||
<if test="ew.entity.printParam!=null"> AND PRINT_PARAM=#{ew.entity.printParam}</if>
|
||||
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
|
||||
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
|
||||
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
|
||||
<if test="ew.entity.inventory!=null"> AND INVENTORY=#{ew.entity.inventory}</if>
|
||||
<if test="ew.entity.comments!=null"> AND COMMENTS=#{ew.entity.comments}</if>
|
||||
<if test="ew.entity.other1!=null"> AND OTHER_1=#{ew.entity.other1}</if>
|
||||
<if test="ew.entity.other2!=null"> AND OTHER_2=#{ew.entity.other2}</if>
|
||||
<if test="ew.entity.other3!=null"> AND OTHER_3=#{ew.entity.other3}</if>
|
||||
<if test="ew.entity.other4!=null"> AND OTHER_4=#{ew.entity.other4}</if>
|
||||
<if test="ew.entity.other5!=null"> AND OTHER_5=#{ew.entity.other5}</if>
|
||||
<if 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_PRINT_LOG
|
||||
<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.category!=null"> AND CATEGORY=#{ew.entity.category}</if>
|
||||
<if test="ew.entity.printName!=null"> AND PRINT_NAME=#{ew.entity.printName}</if>
|
||||
<if test="ew.entity.printTemplate!=null"> AND PRINT_TEMPLATE=#{ew.entity.printTemplate}</if>
|
||||
<if test="ew.entity.printParam!=null"> AND PRINT_PARAM=#{ew.entity.printParam}</if>
|
||||
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
|
||||
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
|
||||
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
|
||||
<if test="ew.entity.inventory!=null"> AND INVENTORY=#{ew.entity.inventory}</if>
|
||||
<if test="ew.entity.comments!=null"> AND COMMENTS=#{ew.entity.comments}</if>
|
||||
<if test="ew.entity.other1!=null"> AND OTHER_1=#{ew.entity.other1}</if>
|
||||
<if test="ew.entity.other2!=null"> AND OTHER_2=#{ew.entity.other2}</if>
|
||||
<if test="ew.entity.other3!=null"> AND OTHER_3=#{ew.entity.other3}</if>
|
||||
<if test="ew.entity.other4!=null"> AND OTHER_4=#{ew.entity.other4}</if>
|
||||
<if test="ew.entity.other5!=null"> AND OTHER_5=#{ew.entity.other5}</if>
|
||||
<if 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_PRINT_LOG
|
||||
<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.category!=null"> AND CATEGORY=#{ew.entity.category}</if>
|
||||
<if test="ew.entity.printName!=null"> AND PRINT_NAME=#{ew.entity.printName}</if>
|
||||
<if test="ew.entity.printTemplate!=null"> AND PRINT_TEMPLATE=#{ew.entity.printTemplate}</if>
|
||||
<if test="ew.entity.printParam!=null"> AND PRINT_PARAM=#{ew.entity.printParam}</if>
|
||||
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
|
||||
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
|
||||
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
|
||||
<if test="ew.entity.inventory!=null"> AND INVENTORY=#{ew.entity.inventory}</if>
|
||||
<if test="ew.entity.comments!=null"> AND COMMENTS=#{ew.entity.comments}</if>
|
||||
<if test="ew.entity.other1!=null"> AND OTHER_1=#{ew.entity.other1}</if>
|
||||
<if test="ew.entity.other2!=null"> AND OTHER_2=#{ew.entity.other2}</if>
|
||||
<if test="ew.entity.other3!=null"> AND OTHER_3=#{ew.entity.other3}</if>
|
||||
<if test="ew.entity.other4!=null"> AND OTHER_4=#{ew.entity.other4}</if>
|
||||
<if test="ew.entity.other5!=null"> AND OTHER_5=#{ew.entity.other5}</if>
|
||||
<if 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_PRINT_LOG
|
||||
<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.category!=null"> AND CATEGORY=#{ew.entity.category}</if>
|
||||
<if test="ew.entity.printName!=null"> AND PRINT_NAME=#{ew.entity.printName}</if>
|
||||
<if test="ew.entity.printTemplate!=null"> AND PRINT_TEMPLATE=#{ew.entity.printTemplate}</if>
|
||||
<if test="ew.entity.printParam!=null"> AND PRINT_PARAM=#{ew.entity.printParam}</if>
|
||||
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
|
||||
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
|
||||
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
|
||||
<if test="ew.entity.inventory!=null"> AND INVENTORY=#{ew.entity.inventory}</if>
|
||||
<if test="ew.entity.comments!=null"> AND COMMENTS=#{ew.entity.comments}</if>
|
||||
<if test="ew.entity.other1!=null"> AND OTHER_1=#{ew.entity.other1}</if>
|
||||
<if test="ew.entity.other2!=null"> AND OTHER_2=#{ew.entity.other2}</if>
|
||||
<if test="ew.entity.other3!=null"> AND OTHER_3=#{ew.entity.other3}</if>
|
||||
<if test="ew.entity.other4!=null"> AND OTHER_4=#{ew.entity.other4}</if>
|
||||
<if test="ew.entity.other5!=null"> AND OTHER_5=#{ew.entity.other5}</if>
|
||||
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="com.foreverwin.mesnac.common.model.PrintLog">
|
||||
INSERT INTO Z_PRINT_LOG
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
HANDLE,
|
||||
<if test="site!=null">SITE,</if>
|
||||
<if test="category!=null">CATEGORY,</if>
|
||||
<if test="printName!=null">PRINT_NAME,</if>
|
||||
<if test="printTemplate!=null">PRINT_TEMPLATE,</if>
|
||||
<if test="printParam!=null">PRINT_PARAM,</if>
|
||||
<if test="sfc!=null">SFC,</if>
|
||||
<if test="resrce!=null">RESRCE,</if>
|
||||
<if test="stepId!=null">STEP_ID,</if>
|
||||
<if test="operation!=null">OPERATION,</if>
|
||||
<if test="inventory!=null">INVENTORY,</if>
|
||||
<if test="comments!=null">COMMENTS,</if>
|
||||
<if test="other1!=null">OTHER_1,</if>
|
||||
<if test="other2!=null">OTHER_2,</if>
|
||||
<if test="other3!=null">OTHER_3,</if>
|
||||
<if test="other4!=null">OTHER_4,</if>
|
||||
<if test="other5!=null">OTHER_5,</if>
|
||||
<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="category!=null">#{category},</if>
|
||||
<if test="printName!=null">#{printName},</if>
|
||||
<if test="printTemplate!=null">#{printTemplate},</if>
|
||||
<if test="printParam!=null">#{printParam},</if>
|
||||
<if test="sfc!=null">#{sfc},</if>
|
||||
<if test="resrce!=null">#{resrce},</if>
|
||||
<if test="stepId!=null">#{stepId},</if>
|
||||
<if test="operation!=null">#{operation},</if>
|
||||
<if test="inventory!=null">#{inventory},</if>
|
||||
<if test="comments!=null">#{comments},</if>
|
||||
<if test="other1!=null">#{other1},</if>
|
||||
<if test="other2!=null">#{other2},</if>
|
||||
<if test="other3!=null">#{other3},</if>
|
||||
<if test="other4!=null">#{other4},</if>
|
||||
<if test="other5!=null">#{other5},</if>
|
||||
<if test="createUser!=null">#{createUser},</if>
|
||||
<if test="createdDateTime!=null">#{createdDateTime},</if>
|
||||
<if test="modifyUser!=null">#{modifyUser},</if>
|
||||
<if test="modifiedDateTime!=null">#{modifiedDateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<insert id="insertAllColumn" parameterType="com.foreverwin.mesnac.common.model.PrintLog">
|
||||
INSERT INTO Z_PRINT_LOG
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<include refid="Base_Column_List"></include>
|
||||
</trim> VALUES
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
#{handle},
|
||||
#{site},
|
||||
#{category},
|
||||
#{printName},
|
||||
#{printTemplate},
|
||||
#{printParam},
|
||||
#{sfc},
|
||||
#{resrce},
|
||||
#{stepId},
|
||||
#{operation},
|
||||
#{inventory},
|
||||
#{comments},
|
||||
#{other1},
|
||||
#{other2},
|
||||
#{other3},
|
||||
#{other4},
|
||||
#{other5},
|
||||
#{createUser},
|
||||
#{createdDateTime},
|
||||
#{modifyUser},
|
||||
#{modifiedDateTime},
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
||||
<update id="updateById">
|
||||
UPDATE Z_PRINT_LOG <trim prefix="SET" suffixOverrides=",">
|
||||
<if test="et.site!=null">SITE=#{et.site},</if>
|
||||
<if test="et.category!=null">CATEGORY=#{et.category},</if>
|
||||
<if test="et.printName!=null">PRINT_NAME=#{et.printName},</if>
|
||||
<if test="et.printTemplate!=null">PRINT_TEMPLATE=#{et.printTemplate},</if>
|
||||
<if test="et.printParam!=null">PRINT_PARAM=#{et.printParam},</if>
|
||||
<if test="et.sfc!=null">SFC=#{et.sfc},</if>
|
||||
<if test="et.resrce!=null">RESRCE=#{et.resrce},</if>
|
||||
<if test="et.stepId!=null">STEP_ID=#{et.stepId},</if>
|
||||
<if test="et.operation!=null">OPERATION=#{et.operation},</if>
|
||||
<if test="et.inventory!=null">INVENTORY=#{et.inventory},</if>
|
||||
<if test="et.comments!=null">COMMENTS=#{et.comments},</if>
|
||||
<if test="et.other1!=null">OTHER_1=#{et.other1},</if>
|
||||
<if test="et.other2!=null">OTHER_2=#{et.other2},</if>
|
||||
<if test="et.other3!=null">OTHER_3=#{et.other3},</if>
|
||||
<if test="et.other4!=null">OTHER_4=#{et.other4},</if>
|
||||
<if test="et.other5!=null">OTHER_5=#{et.other5},</if>
|
||||
<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_PRINT_LOG <trim prefix="SET" suffixOverrides=",">
|
||||
SITE=#{et.site},
|
||||
CATEGORY=#{et.category},
|
||||
PRINT_NAME=#{et.printName},
|
||||
PRINT_TEMPLATE=#{et.printTemplate},
|
||||
PRINT_PARAM=#{et.printParam},
|
||||
SFC=#{et.sfc},
|
||||
RESRCE=#{et.resrce},
|
||||
STEP_ID=#{et.stepId},
|
||||
OPERATION=#{et.operation},
|
||||
INVENTORY=#{et.inventory},
|
||||
COMMENTS=#{et.comments},
|
||||
OTHER_1=#{et.other1},
|
||||
OTHER_2=#{et.other2},
|
||||
OTHER_3=#{et.other3},
|
||||
OTHER_4=#{et.other4},
|
||||
OTHER_5=#{et.other5},
|
||||
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_PRINT_LOG <trim prefix="SET" suffixOverrides=",">
|
||||
<if test="et.site!=null">SITE=#{et.site},</if>
|
||||
<if test="et.category!=null">CATEGORY=#{et.category},</if>
|
||||
<if test="et.printName!=null">PRINT_NAME=#{et.printName},</if>
|
||||
<if test="et.printTemplate!=null">PRINT_TEMPLATE=#{et.printTemplate},</if>
|
||||
<if test="et.printParam!=null">PRINT_PARAM=#{et.printParam},</if>
|
||||
<if test="et.sfc!=null">SFC=#{et.sfc},</if>
|
||||
<if test="et.resrce!=null">RESRCE=#{et.resrce},</if>
|
||||
<if test="et.stepId!=null">STEP_ID=#{et.stepId},</if>
|
||||
<if test="et.operation!=null">OPERATION=#{et.operation},</if>
|
||||
<if test="et.inventory!=null">INVENTORY=#{et.inventory},</if>
|
||||
<if test="et.comments!=null">COMMENTS=#{et.comments},</if>
|
||||
<if test="et.other1!=null">OTHER_1=#{et.other1},</if>
|
||||
<if test="et.other2!=null">OTHER_2=#{et.other2},</if>
|
||||
<if test="et.other3!=null">OTHER_3=#{et.other3},</if>
|
||||
<if test="et.other4!=null">OTHER_4=#{et.other4},</if>
|
||||
<if test="et.other5!=null">OTHER_5=#{et.other5},</if>
|
||||
<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.category!=null"> AND CATEGORY=#{ew.entity.category}</if>
|
||||
<if test="ew.entity.printName!=null"> AND PRINT_NAME=#{ew.entity.printName}</if>
|
||||
<if test="ew.entity.printTemplate!=null"> AND PRINT_TEMPLATE=#{ew.entity.printTemplate}</if>
|
||||
<if test="ew.entity.printParam!=null"> AND PRINT_PARAM=#{ew.entity.printParam}</if>
|
||||
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
|
||||
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
|
||||
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
|
||||
<if test="ew.entity.inventory!=null"> AND INVENTORY=#{ew.entity.inventory}</if>
|
||||
<if test="ew.entity.comments!=null"> AND COMMENTS=#{ew.entity.comments}</if>
|
||||
<if test="ew.entity.other1!=null"> AND OTHER_1=#{ew.entity.other1}</if>
|
||||
<if test="ew.entity.other2!=null"> AND OTHER_2=#{ew.entity.other2}</if>
|
||||
<if test="ew.entity.other3!=null"> AND OTHER_3=#{ew.entity.other3}</if>
|
||||
<if test="ew.entity.other4!=null"> AND OTHER_4=#{ew.entity.other4}</if>
|
||||
<if test="ew.entity.other5!=null"> AND OTHER_5=#{ew.entity.other5}</if>
|
||||
<if 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_PRINT_LOG WHERE HANDLE=#{handle}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByMap">
|
||||
DELETE FROM Z_PRINT_LOG
|
||||
<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_PRINT_LOG
|
||||
<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.category!=null"> AND CATEGORY=#{ew.entity.category}</if>
|
||||
<if test="ew.entity.printName!=null"> AND PRINT_NAME=#{ew.entity.printName}</if>
|
||||
<if test="ew.entity.printTemplate!=null"> AND PRINT_TEMPLATE=#{ew.entity.printTemplate}</if>
|
||||
<if test="ew.entity.printParam!=null"> AND PRINT_PARAM=#{ew.entity.printParam}</if>
|
||||
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
|
||||
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
|
||||
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
|
||||
<if test="ew.entity.inventory!=null"> AND INVENTORY=#{ew.entity.inventory}</if>
|
||||
<if test="ew.entity.comments!=null"> AND COMMENTS=#{ew.entity.comments}</if>
|
||||
<if test="ew.entity.other1!=null"> AND OTHER_1=#{ew.entity.other1}</if>
|
||||
<if test="ew.entity.other2!=null"> AND OTHER_2=#{ew.entity.other2}</if>
|
||||
<if test="ew.entity.other3!=null"> AND OTHER_3=#{ew.entity.other3}</if>
|
||||
<if test="ew.entity.other4!=null"> AND OTHER_4=#{ew.entity.other4}</if>
|
||||
<if test="ew.entity.other5!=null"> AND OTHER_5=#{ew.entity.other5}</if>
|
||||
<if 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_PRINT_LOG WHERE HANDLE IN (
|
||||
<foreach item="item" index="index" collection="coll" separator=",">#{item}
|
||||
</foreach>)
|
||||
</delete>
|
||||
<!-- BaseMapper标准查询/修改/删除 -->
|
||||
|
||||
</mapper>
|
Loading…
Reference in New Issue