Commit 62616331 authored by neo.wang's avatar neo.wang

Merge branch 'dev_oracle_neo' into 'dev_oracle'

[dev] approval with db logic impl

See merge request root/atms!147
parents d07c0dbc 1465c69e
......@@ -26,6 +26,10 @@ public class MyAsserts {
if (obj == null || obj.isEmpty()) throw exception;
}
public static void assertEmpty(String obj, ApiException exception) {
if (obj != null && !obj.isEmpty()) throw exception;
}
public static void assertNotEmpty(String obj, FormulaException exception) {
if (obj == null || obj.isEmpty()) throw exception;
}
......@@ -33,4 +37,8 @@ public class MyAsserts {
public static void assertNotEmpty(Collection obj, ApiException exception) {
if (obj == null || obj.isEmpty()) throw exception;
}
public static void assertEmpty(Collection obj, ApiException exception) {
if (obj != null && !obj.isEmpty()) throw exception;
}
}
......@@ -58,6 +58,13 @@ public final class Constant {
public static final String OUTPUT_KPZT_NO="0";
public static final String OUTPUT_KPZT_YES="2";
public static final String APPROVAL_COMMITTED="committed";
public static final String APPROVAL_AGREED="agreed";
public static final String APPROVAL_DISAGREED="disagreed";
public static final String ASSIGNEE_MANAGER="manager";
public static final String ASSIGNEE_ACCOUNTANT="accountant";
public static class DataSourceName {
public static final String KeyValueDataSource = "KeyValueDataSource";
public static final String InputInvoiceDataSource = "IncomeDataSource";
......
......@@ -11,8 +11,11 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import pwc.taxtech.atms.common.util.MyAsserts;
import pwc.taxtech.atms.dto.approval.ApprovalDto;
import pwc.taxtech.atms.dto.approval.ApprovalTask;
import pwc.taxtech.atms.exception.Exceptions;
import pwc.taxtech.atms.vat.service.impl.ApprovalService;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
......@@ -30,8 +33,11 @@ public class ApprovalController {
@Autowired
TaskService taskService;
@Autowired
ApprovalService approvalService;
@Autowired
RepositoryService repositoryService;
@ResponseBody
@RequestMapping(value = "/deploy", method = RequestMethod.POST)
public ResponseEntity deploy() {
......@@ -42,47 +48,24 @@ public class ApprovalController {
@ResponseBody
@RequestMapping(value = "/commit", method = RequestMethod.POST)
public ApprovalDto approval(@RequestBody ApprovalDto dto) {
ProcessInstance pi = runtimeService.startProcessInstanceByKey("approvalProcess");
dto.setInstaceId(pi.getId());
mocoInsert(dto);
MyAsserts.assertNotEmpty(dto.getProjectId(), Exceptions.EMPTY_PROJECT_PARAM);
MyAsserts.assertNotEmpty(dto.getPeriodDate(), Exceptions.EMPTY_PRIODDATE_PARAM);
approvalService.startInstanceAndAssignee(dto);
return dto;
}
@ResponseBody
@RequestMapping(value = "/tasks/{assignee}")
public List<ApprovalTask> data(@PathVariable String assignee) {
List<Task> tasks = taskService.createTaskQuery().taskAssignee(assignee).list();
List<ApprovalTask> list = new ArrayList<>();
for (Task task : tasks) {
ApprovalTask t = new ApprovalTask();
list.add(t.copyfrom(task));
}
return list;
public List<ApprovalTask> data(@PathVariable String assignee) {//accountant manager
return approvalService.getTask(assignee);
}
@ResponseBody
@RequestMapping(value = "/check/{taskId}")
public String check(@PathVariable String taskId, @RequestParam(required = false) Integer committed,
@RequestParam(required = false) Integer decide) {
Map<String, Object> map = new HashMap<>();
if (committed != null && (committed == 0 || committed == 1)) {
map.put("committed", committed);
taskService.complete(taskId, map);
if (committed == 1) mocoHasCommittedAndOver();
} else if (decide != null && (decide == 0 || decide == 1)) {
map.put("decide", decide);
taskService.complete(taskId, map);
if (decide == 1) mocoAggreAndOver();
else mocoDisAggreAndOver();
}
return taskId;
public void check(@PathVariable String taskId, @RequestParam String decide) {//only for manager role
approvalService.checkTask(taskId, decide);
}
private void mocoHasCommitted() {
}
@RequestMapping(value = "/show/{procDefId}")//获取流程图
public void showImg(@PathVariable String procDefId, HttpServletResponse response) {
try {
......
......@@ -9,7 +9,7 @@ public class ApprovalDto {
private String projectId;
private Long reportId;
private String periodDate;
private String instaceId;
private String instanceId;
private String status;//committed,agreed,disagreed
@Override
......@@ -18,8 +18,16 @@ public class ApprovalDto {
"projectId='" + projectId + '\'' +
", reportId=" + reportId +
", period=" + periodDate +
", instaceId='" + instaceId + '\'' +
", instaceId='" + instanceId + '\'' +
", status='" + status + '\'' +
'}';
}
public Integer getPeriod() {
return Integer.parseInt(periodDate.split(".")[1]);
}
public Integer getYear(){
return Integer.parseInt(periodDate.split(".")[0]);
}
}
package pwc.taxtech.atms.exception;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
public class AlreadyExistsException extends ApiException {
public AlreadyExistsException() {
super();
}
public AlreadyExistsException(String message) {
super(message);
}
public AlreadyExistsException(String message, Throwable cause) {
super(message, cause);
}
public AlreadyExistsException(Throwable cause) {
super(cause);
}
@Override
public <Object> ResponseEntity handle() {
return ResponseEntity.status(HttpStatus.CONFLICT).build();
}
}
......@@ -3,6 +3,18 @@ package pwc.taxtech.atms.exception;
import org.springframework.http.ResponseEntity;
public class BadParameterException extends ApiException {
public BadParameterException(String message) {
super(message);
}
public BadParameterException(String message, Throwable cause) {
super(message, cause);
}
public BadParameterException(Throwable cause) {
super(cause);
}
@Override
public <Object> ResponseEntity handle() {
return ResponseEntity.badRequest().build();
......
......@@ -7,4 +7,8 @@ public class Exceptions {
public static final FormulaException BB_CELL_DATA_EMPTY = new FormulaException("cell data is empty");
public static final FormulaException PROJECT_EMPTY = new FormulaException("project is empty");
public static final FormulaException BAD_BBVO_PARAMS = new FormulaException("bad params for bb fromular express data");
}
public static final ApiException EMPTY_PROJECT_PARAM = new BadParameterException("project is empty");
public static final ApiException EMPTY_PRIODDATE_PARAM = new BadParameterException("period data is empty");
public static final ApiException NOT_FOUND_REPORT_EXCEPTION = new NotFoundException("not found report");
public static final ApiException REPORT_HAS_COMMIT_EXCEPTION = new AlreadyExistsException("report approval has commit");
}
......@@ -3,6 +3,22 @@ package pwc.taxtech.atms.exception;
import org.springframework.http.ResponseEntity;
public class NotFoundException extends ApiException {
public NotFoundException() {
super();
}
public NotFoundException(String message) {
super(message);
}
public NotFoundException(String message, Throwable cause) {
super(message, cause);
}
public NotFoundException(Throwable cause) {
super(cause);
}
@Override
public <Object> ResponseEntity handle() {
return ResponseEntity.notFound().build();
......
package pwc.taxtech.atms.vat.service.impl;
import org.activiti.engine.RepositoryService;
import org.activiti.engine.RuntimeService;
import org.activiti.engine.TaskService;
import org.activiti.engine.runtime.ProcessInstance;
import org.activiti.engine.task.Attachment;
import org.activiti.engine.task.Task;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import pwc.taxtech.atms.common.util.MyAsserts;
import pwc.taxtech.atms.constant.Constant;
import pwc.taxtech.atms.dto.approval.ApprovalDto;
import pwc.taxtech.atms.dto.approval.ApprovalTask;
import pwc.taxtech.atms.exception.BadParameterException;
import pwc.taxtech.atms.exception.Exceptions;
import pwc.taxtech.atms.vat.dao.PeriodApproveMapper;
import pwc.taxtech.atms.vat.dao.PeriodReportMapper;
import pwc.taxtech.atms.vat.entity.PeriodApprove;
import pwc.taxtech.atms.vat.entity.PeriodApproveExample;
import pwc.taxtech.atms.vat.entity.PeriodReport;
import pwc.taxtech.atms.vat.entity.PeriodReportExample;
import java.util.*;
public class ApprovalService {
private static Logger logger = LoggerFactory.getLogger(ApprovalService.class);
@Autowired
RuntimeService runtimeService;
@Autowired
TaskService taskService;
@Autowired
PeriodApproveMapper periodApproveMapper;
@Autowired
PeriodReportMapper reportMapper;
public void startInstanceAndAssignee(ApprovalDto dto) {
PeriodReportExample pre = new PeriodReportExample();
pre.createCriteria().andProjectIdEqualTo(dto.getProjectId()).andPeriodEqualTo(dto.getPeriod());
List<PeriodReport> currentReports = reportMapper.selectByExample(pre);
MyAsserts.assertNotEmpty(currentReports, Exceptions.NOT_FOUND_REPORT_EXCEPTION);
PeriodApprove pa = new PeriodApprove();
pa.setId(UUID.randomUUID().toString());
pa.setPeriod(dto.getPeriod());
pa.setYear(dto.getYear());
StringBuilder reportIds = new StringBuilder("");
StringBuilder reportTemplateIds = new StringBuilder("");
currentReports.forEach(m -> {
reportIds.append(m.getId()).append(",");
reportTemplateIds.append(m.getTemplateId()).append(",");
});
PeriodApproveExample pae = new PeriodApproveExample();
pae.createCriteria().andProjectIdEqualTo(dto.getProjectId()).andPeriodEqualTo(dto.getPeriod())
.andYearEqualTo(dto.getYear()).andReportIdsEqualTo(reportIds.toString())
.andTemplateIdsEqualTo(reportTemplateIds.toString()).andStatusEqualTo(Constant.APPROVAL_COMMITTED);
List<PeriodApprove> pas = periodApproveMapper.selectByExample(pae);
MyAsserts.assertEmpty(pas, Exceptions.REPORT_HAS_COMMIT_EXCEPTION);
ProcessInstance pi = runtimeService.startProcessInstanceByKey("approvalProcess");
dto.setInstanceId(pi.getId());
pa.setInstanceId(pi.getId());
pa.setReportIds(reportIds.toString());
pa.setTemplateIds(reportTemplateIds.toString());
pa.setStatus(Constant.APPROVAL_COMMITTED);
List<Task> tasks = taskService.createTaskQuery().taskAssignee(Constant.ASSIGNEE_ACCOUNTANT).processInstanceId(
pi.getId()).list();
if (tasks != null && tasks.size() == 1) {
Task task = tasks.get(0);
Map<String, Object> map = new HashMap<>();
map.put("committed", 0);
taskService.complete(task.getId(), map);
taskService.createAttachment("java.lang.String", task.getId(), task.getProcessInstanceId(),
"period_approval_uuid", pa.getId(), "");
periodApproveMapper.insert(pa);
} else {
logger.warn("task must not null or size gt 1");
}
}
public List<ApprovalTask> getTask(String assignee) {
List<Task> tasks = taskService.createTaskQuery().taskAssignee(assignee).list();
List<ApprovalTask> list = new ArrayList<>();
for (Task task : tasks) {
ApprovalTask t = new ApprovalTask();
list.add(t.copyfrom(task));
}
return list;
}
public void checkTask(String taskId, String decide) {
Map<String, Object> map = new HashMap<>();
PeriodApprove pa = new PeriodApprove();
switch (decide) {
case Constant.APPROVAL_AGREED:
pa.setStatus(Constant.APPROVAL_AGREED);
map.put("decide", 1);
break;
case Constant.APPROVAL_DISAGREED:
pa.setStatus(Constant.APPROVAL_DISAGREED);
map.put("decide", 0);
break;
default:
throw new BadParameterException("not support decide param type");
}
List<Attachment> attachments = taskService.getTaskAttachments(taskId);
if (attachments != null && attachments.size() == 1) {
String uuid = attachments.get(0).getDescription();
taskService.complete(taskId, map);
pa.setId(uuid);
periodApproveMapper.updateByPrimaryKeySelective(pa);
PeriodApprove result=periodApproveMapper.selectByPrimaryKey(uuid);
//save report on service
} else {
logger.warn("task must not null or size gt 1");
}
}
}
rem see http://www.mybatis.org/generator/running/runningFromCmdLine.html
cd /d %~dp0
call java -classpath .;./* org.mybatis.generator.api.ShellRunner -configfile vatGeneratorConfig.xml -overwrite -verbose -tables PERIOD_APPROVE
call java -classpath .;./* org.mybatis.generator.api.ShellRunner -configfile vatGeneratorConfig.xml -overwrite -verbose
echo @@@@@@@@@@@ DONE @@@@@@@@@@@
pause
\ No newline at end of file
package pwc.taxtech.atms.vat.dao;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import pwc.taxtech.atms.MyVatMapper;
import pwc.taxtech.atms.vat.entity.PeriodApprove;
import pwc.taxtech.atms.vat.entity.PeriodApproveExample;
@Mapper
public interface PeriodApproveMapper extends MyVatMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
long countByExample(PeriodApproveExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
int deleteByExample(PeriodApproveExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
int deleteByPrimaryKey(String id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
int insert(PeriodApprove record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
int insertSelective(PeriodApprove record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
List<PeriodApprove> selectByExampleWithRowbounds(PeriodApproveExample example, RowBounds rowBounds);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
List<PeriodApprove> selectByExample(PeriodApproveExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
PeriodApprove selectByPrimaryKey(String id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") PeriodApprove record, @Param("example") PeriodApproveExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
int updateByExample(@Param("record") PeriodApprove record, @Param("example") PeriodApproveExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(PeriodApprove record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
int updateByPrimaryKey(PeriodApprove record);
}
\ No newline at end of file
package pwc.taxtech.atms.vat.entity;
import java.io.Serializable;
/**
*
* This class was generated by MyBatis Generator.
* This class corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated do_not_delete_during_merge
*/
public class PeriodApprove implements Serializable {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_ADMIN.PERIOD_APPROVE.ID
*
* @mbg.generated
*/
private String id;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_ADMIN.PERIOD_APPROVE.PROJECT_ID
*
* @mbg.generated
*/
private String projectId;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_ADMIN.PERIOD_APPROVE.PERIOD
*
* @mbg.generated
*/
private Integer period;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_ADMIN.PERIOD_APPROVE.REPORT_IDS
*
* @mbg.generated
*/
private String reportIds;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_ADMIN.PERIOD_APPROVE.REPORT_PATHS
*
* @mbg.generated
*/
private String reportPaths;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_ADMIN.PERIOD_APPROVE.STATUS
*
* @mbg.generated
*/
private String status;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_ADMIN.PERIOD_APPROVE.INSTANCE_ID
*
* @mbg.generated
*/
private String instanceId;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_ADMIN.PERIOD_APPROVE.YEAR
*
* @mbg.generated
*/
private Integer year;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_ADMIN.PERIOD_APPROVE.TEMPLATE_IDS
*
* @mbg.generated
*/
private String templateIds;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
private static final long serialVersionUID = 1L;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TAX_ADMIN.PERIOD_APPROVE.ID
*
* @return the value of TAX_ADMIN.PERIOD_APPROVE.ID
*
* @mbg.generated
*/
public String getId() {
return id;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_ADMIN.PERIOD_APPROVE.ID
*
* @param id the value for TAX_ADMIN.PERIOD_APPROVE.ID
*
* @mbg.generated
*/
public void setId(String id) {
this.id = id == null ? null : id.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TAX_ADMIN.PERIOD_APPROVE.PROJECT_ID
*
* @return the value of TAX_ADMIN.PERIOD_APPROVE.PROJECT_ID
*
* @mbg.generated
*/
public String getProjectId() {
return projectId;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_ADMIN.PERIOD_APPROVE.PROJECT_ID
*
* @param projectId the value for TAX_ADMIN.PERIOD_APPROVE.PROJECT_ID
*
* @mbg.generated
*/
public void setProjectId(String projectId) {
this.projectId = projectId == null ? null : projectId.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TAX_ADMIN.PERIOD_APPROVE.PERIOD
*
* @return the value of TAX_ADMIN.PERIOD_APPROVE.PERIOD
*
* @mbg.generated
*/
public Integer getPeriod() {
return period;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_ADMIN.PERIOD_APPROVE.PERIOD
*
* @param period the value for TAX_ADMIN.PERIOD_APPROVE.PERIOD
*
* @mbg.generated
*/
public void setPeriod(Integer period) {
this.period = period;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TAX_ADMIN.PERIOD_APPROVE.REPORT_IDS
*
* @return the value of TAX_ADMIN.PERIOD_APPROVE.REPORT_IDS
*
* @mbg.generated
*/
public String getReportIds() {
return reportIds;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_ADMIN.PERIOD_APPROVE.REPORT_IDS
*
* @param reportIds the value for TAX_ADMIN.PERIOD_APPROVE.REPORT_IDS
*
* @mbg.generated
*/
public void setReportIds(String reportIds) {
this.reportIds = reportIds == null ? null : reportIds.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TAX_ADMIN.PERIOD_APPROVE.REPORT_PATHS
*
* @return the value of TAX_ADMIN.PERIOD_APPROVE.REPORT_PATHS
*
* @mbg.generated
*/
public String getReportPaths() {
return reportPaths;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_ADMIN.PERIOD_APPROVE.REPORT_PATHS
*
* @param reportPaths the value for TAX_ADMIN.PERIOD_APPROVE.REPORT_PATHS
*
* @mbg.generated
*/
public void setReportPaths(String reportPaths) {
this.reportPaths = reportPaths == null ? null : reportPaths.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TAX_ADMIN.PERIOD_APPROVE.STATUS
*
* @return the value of TAX_ADMIN.PERIOD_APPROVE.STATUS
*
* @mbg.generated
*/
public String getStatus() {
return status;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_ADMIN.PERIOD_APPROVE.STATUS
*
* @param status the value for TAX_ADMIN.PERIOD_APPROVE.STATUS
*
* @mbg.generated
*/
public void setStatus(String status) {
this.status = status == null ? null : status.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TAX_ADMIN.PERIOD_APPROVE.INSTANCE_ID
*
* @return the value of TAX_ADMIN.PERIOD_APPROVE.INSTANCE_ID
*
* @mbg.generated
*/
public String getInstanceId() {
return instanceId;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_ADMIN.PERIOD_APPROVE.INSTANCE_ID
*
* @param instanceId the value for TAX_ADMIN.PERIOD_APPROVE.INSTANCE_ID
*
* @mbg.generated
*/
public void setInstanceId(String instanceId) {
this.instanceId = instanceId == null ? null : instanceId.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TAX_ADMIN.PERIOD_APPROVE.YEAR
*
* @return the value of TAX_ADMIN.PERIOD_APPROVE.YEAR
*
* @mbg.generated
*/
public Integer getYear() {
return year;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_ADMIN.PERIOD_APPROVE.YEAR
*
* @param year the value for TAX_ADMIN.PERIOD_APPROVE.YEAR
*
* @mbg.generated
*/
public void setYear(Integer year) {
this.year = year;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TAX_ADMIN.PERIOD_APPROVE.TEMPLATE_IDS
*
* @return the value of TAX_ADMIN.PERIOD_APPROVE.TEMPLATE_IDS
*
* @mbg.generated
*/
public String getTemplateIds() {
return templateIds;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_ADMIN.PERIOD_APPROVE.TEMPLATE_IDS
*
* @param templateIds the value for TAX_ADMIN.PERIOD_APPROVE.TEMPLATE_IDS
*
* @mbg.generated
*/
public void setTemplateIds(String templateIds) {
this.templateIds = templateIds == null ? null : templateIds.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", projectId=").append(projectId);
sb.append(", period=").append(period);
sb.append(", reportIds=").append(reportIds);
sb.append(", reportPaths=").append(reportPaths);
sb.append(", status=").append(status);
sb.append(", instanceId=").append(instanceId);
sb.append(", year=").append(year);
sb.append(", templateIds=").append(templateIds);
sb.append("]");
return sb.toString();
}
}
\ No newline at end of file
package pwc.taxtech.atms.vat.entity;
import java.util.ArrayList;
import java.util.List;
public class PeriodApproveExample {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
protected String orderByClause;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
protected boolean distinct;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
protected List<Criteria> oredCriteria;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
public PeriodApproveExample() {
oredCriteria = new ArrayList<Criteria>();
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
public String getOrderByClause() {
return orderByClause;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
public boolean isDistinct() {
return distinct;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("ID is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("ID is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(String value) {
addCriterion("ID =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(String value) {
addCriterion("ID <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(String value) {
addCriterion("ID >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(String value) {
addCriterion("ID >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(String value) {
addCriterion("ID <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(String value) {
addCriterion("ID <=", value, "id");
return (Criteria) this;
}
public Criteria andIdLike(String value) {
addCriterion("ID like", value, "id");
return (Criteria) this;
}
public Criteria andIdNotLike(String value) {
addCriterion("ID not like", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<String> values) {
addCriterion("ID in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<String> values) {
addCriterion("ID not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(String value1, String value2) {
addCriterion("ID between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(String value1, String value2) {
addCriterion("ID not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andProjectIdIsNull() {
addCriterion("PROJECT_ID is null");
return (Criteria) this;
}
public Criteria andProjectIdIsNotNull() {
addCriterion("PROJECT_ID is not null");
return (Criteria) this;
}
public Criteria andProjectIdEqualTo(String value) {
addCriterion("PROJECT_ID =", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdNotEqualTo(String value) {
addCriterion("PROJECT_ID <>", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdGreaterThan(String value) {
addCriterion("PROJECT_ID >", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdGreaterThanOrEqualTo(String value) {
addCriterion("PROJECT_ID >=", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdLessThan(String value) {
addCriterion("PROJECT_ID <", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdLessThanOrEqualTo(String value) {
addCriterion("PROJECT_ID <=", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdLike(String value) {
addCriterion("PROJECT_ID like", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdNotLike(String value) {
addCriterion("PROJECT_ID not like", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdIn(List<String> values) {
addCriterion("PROJECT_ID in", values, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdNotIn(List<String> values) {
addCriterion("PROJECT_ID not in", values, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdBetween(String value1, String value2) {
addCriterion("PROJECT_ID between", value1, value2, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdNotBetween(String value1, String value2) {
addCriterion("PROJECT_ID not between", value1, value2, "projectId");
return (Criteria) this;
}
public Criteria andPeriodIsNull() {
addCriterion("PERIOD is null");
return (Criteria) this;
}
public Criteria andPeriodIsNotNull() {
addCriterion("PERIOD is not null");
return (Criteria) this;
}
public Criteria andPeriodEqualTo(Integer value) {
addCriterion("PERIOD =", value, "period");
return (Criteria) this;
}
public Criteria andPeriodNotEqualTo(Integer value) {
addCriterion("PERIOD <>", value, "period");
return (Criteria) this;
}
public Criteria andPeriodGreaterThan(Integer value) {
addCriterion("PERIOD >", value, "period");
return (Criteria) this;
}
public Criteria andPeriodGreaterThanOrEqualTo(Integer value) {
addCriterion("PERIOD >=", value, "period");
return (Criteria) this;
}
public Criteria andPeriodLessThan(Integer value) {
addCriterion("PERIOD <", value, "period");
return (Criteria) this;
}
public Criteria andPeriodLessThanOrEqualTo(Integer value) {
addCriterion("PERIOD <=", value, "period");
return (Criteria) this;
}
public Criteria andPeriodIn(List<Integer> values) {
addCriterion("PERIOD in", values, "period");
return (Criteria) this;
}
public Criteria andPeriodNotIn(List<Integer> values) {
addCriterion("PERIOD not in", values, "period");
return (Criteria) this;
}
public Criteria andPeriodBetween(Integer value1, Integer value2) {
addCriterion("PERIOD between", value1, value2, "period");
return (Criteria) this;
}
public Criteria andPeriodNotBetween(Integer value1, Integer value2) {
addCriterion("PERIOD not between", value1, value2, "period");
return (Criteria) this;
}
public Criteria andReportIdsIsNull() {
addCriterion("REPORT_IDS is null");
return (Criteria) this;
}
public Criteria andReportIdsIsNotNull() {
addCriterion("REPORT_IDS is not null");
return (Criteria) this;
}
public Criteria andReportIdsEqualTo(String value) {
addCriterion("REPORT_IDS =", value, "reportIds");
return (Criteria) this;
}
public Criteria andReportIdsNotEqualTo(String value) {
addCriterion("REPORT_IDS <>", value, "reportIds");
return (Criteria) this;
}
public Criteria andReportIdsGreaterThan(String value) {
addCriterion("REPORT_IDS >", value, "reportIds");
return (Criteria) this;
}
public Criteria andReportIdsGreaterThanOrEqualTo(String value) {
addCriterion("REPORT_IDS >=", value, "reportIds");
return (Criteria) this;
}
public Criteria andReportIdsLessThan(String value) {
addCriterion("REPORT_IDS <", value, "reportIds");
return (Criteria) this;
}
public Criteria andReportIdsLessThanOrEqualTo(String value) {
addCriterion("REPORT_IDS <=", value, "reportIds");
return (Criteria) this;
}
public Criteria andReportIdsLike(String value) {
addCriterion("REPORT_IDS like", value, "reportIds");
return (Criteria) this;
}
public Criteria andReportIdsNotLike(String value) {
addCriterion("REPORT_IDS not like", value, "reportIds");
return (Criteria) this;
}
public Criteria andReportIdsIn(List<String> values) {
addCriterion("REPORT_IDS in", values, "reportIds");
return (Criteria) this;
}
public Criteria andReportIdsNotIn(List<String> values) {
addCriterion("REPORT_IDS not in", values, "reportIds");
return (Criteria) this;
}
public Criteria andReportIdsBetween(String value1, String value2) {
addCriterion("REPORT_IDS between", value1, value2, "reportIds");
return (Criteria) this;
}
public Criteria andReportIdsNotBetween(String value1, String value2) {
addCriterion("REPORT_IDS not between", value1, value2, "reportIds");
return (Criteria) this;
}
public Criteria andReportPathsIsNull() {
addCriterion("REPORT_PATHS is null");
return (Criteria) this;
}
public Criteria andReportPathsIsNotNull() {
addCriterion("REPORT_PATHS is not null");
return (Criteria) this;
}
public Criteria andReportPathsEqualTo(String value) {
addCriterion("REPORT_PATHS =", value, "reportPaths");
return (Criteria) this;
}
public Criteria andReportPathsNotEqualTo(String value) {
addCriterion("REPORT_PATHS <>", value, "reportPaths");
return (Criteria) this;
}
public Criteria andReportPathsGreaterThan(String value) {
addCriterion("REPORT_PATHS >", value, "reportPaths");
return (Criteria) this;
}
public Criteria andReportPathsGreaterThanOrEqualTo(String value) {
addCriterion("REPORT_PATHS >=", value, "reportPaths");
return (Criteria) this;
}
public Criteria andReportPathsLessThan(String value) {
addCriterion("REPORT_PATHS <", value, "reportPaths");
return (Criteria) this;
}
public Criteria andReportPathsLessThanOrEqualTo(String value) {
addCriterion("REPORT_PATHS <=", value, "reportPaths");
return (Criteria) this;
}
public Criteria andReportPathsLike(String value) {
addCriterion("REPORT_PATHS like", value, "reportPaths");
return (Criteria) this;
}
public Criteria andReportPathsNotLike(String value) {
addCriterion("REPORT_PATHS not like", value, "reportPaths");
return (Criteria) this;
}
public Criteria andReportPathsIn(List<String> values) {
addCriterion("REPORT_PATHS in", values, "reportPaths");
return (Criteria) this;
}
public Criteria andReportPathsNotIn(List<String> values) {
addCriterion("REPORT_PATHS not in", values, "reportPaths");
return (Criteria) this;
}
public Criteria andReportPathsBetween(String value1, String value2) {
addCriterion("REPORT_PATHS between", value1, value2, "reportPaths");
return (Criteria) this;
}
public Criteria andReportPathsNotBetween(String value1, String value2) {
addCriterion("REPORT_PATHS not between", value1, value2, "reportPaths");
return (Criteria) this;
}
public Criteria andStatusIsNull() {
addCriterion("\"STATUS\" is null");
return (Criteria) this;
}
public Criteria andStatusIsNotNull() {
addCriterion("\"STATUS\" is not null");
return (Criteria) this;
}
public Criteria andStatusEqualTo(String value) {
addCriterion("\"STATUS\" =", value, "status");
return (Criteria) this;
}
public Criteria andStatusNotEqualTo(String value) {
addCriterion("\"STATUS\" <>", value, "status");
return (Criteria) this;
}
public Criteria andStatusGreaterThan(String value) {
addCriterion("\"STATUS\" >", value, "status");
return (Criteria) this;
}
public Criteria andStatusGreaterThanOrEqualTo(String value) {
addCriterion("\"STATUS\" >=", value, "status");
return (Criteria) this;
}
public Criteria andStatusLessThan(String value) {
addCriterion("\"STATUS\" <", value, "status");
return (Criteria) this;
}
public Criteria andStatusLessThanOrEqualTo(String value) {
addCriterion("\"STATUS\" <=", value, "status");
return (Criteria) this;
}
public Criteria andStatusLike(String value) {
addCriterion("\"STATUS\" like", value, "status");
return (Criteria) this;
}
public Criteria andStatusNotLike(String value) {
addCriterion("\"STATUS\" not like", value, "status");
return (Criteria) this;
}
public Criteria andStatusIn(List<String> values) {
addCriterion("\"STATUS\" in", values, "status");
return (Criteria) this;
}
public Criteria andStatusNotIn(List<String> values) {
addCriterion("\"STATUS\" not in", values, "status");
return (Criteria) this;
}
public Criteria andStatusBetween(String value1, String value2) {
addCriterion("\"STATUS\" between", value1, value2, "status");
return (Criteria) this;
}
public Criteria andStatusNotBetween(String value1, String value2) {
addCriterion("\"STATUS\" not between", value1, value2, "status");
return (Criteria) this;
}
public Criteria andInstanceIdIsNull() {
addCriterion("INSTANCE_ID is null");
return (Criteria) this;
}
public Criteria andInstanceIdIsNotNull() {
addCriterion("INSTANCE_ID is not null");
return (Criteria) this;
}
public Criteria andInstanceIdEqualTo(String value) {
addCriterion("INSTANCE_ID =", value, "instanceId");
return (Criteria) this;
}
public Criteria andInstanceIdNotEqualTo(String value) {
addCriterion("INSTANCE_ID <>", value, "instanceId");
return (Criteria) this;
}
public Criteria andInstanceIdGreaterThan(String value) {
addCriterion("INSTANCE_ID >", value, "instanceId");
return (Criteria) this;
}
public Criteria andInstanceIdGreaterThanOrEqualTo(String value) {
addCriterion("INSTANCE_ID >=", value, "instanceId");
return (Criteria) this;
}
public Criteria andInstanceIdLessThan(String value) {
addCriterion("INSTANCE_ID <", value, "instanceId");
return (Criteria) this;
}
public Criteria andInstanceIdLessThanOrEqualTo(String value) {
addCriterion("INSTANCE_ID <=", value, "instanceId");
return (Criteria) this;
}
public Criteria andInstanceIdLike(String value) {
addCriterion("INSTANCE_ID like", value, "instanceId");
return (Criteria) this;
}
public Criteria andInstanceIdNotLike(String value) {
addCriterion("INSTANCE_ID not like", value, "instanceId");
return (Criteria) this;
}
public Criteria andInstanceIdIn(List<String> values) {
addCriterion("INSTANCE_ID in", values, "instanceId");
return (Criteria) this;
}
public Criteria andInstanceIdNotIn(List<String> values) {
addCriterion("INSTANCE_ID not in", values, "instanceId");
return (Criteria) this;
}
public Criteria andInstanceIdBetween(String value1, String value2) {
addCriterion("INSTANCE_ID between", value1, value2, "instanceId");
return (Criteria) this;
}
public Criteria andInstanceIdNotBetween(String value1, String value2) {
addCriterion("INSTANCE_ID not between", value1, value2, "instanceId");
return (Criteria) this;
}
public Criteria andYearIsNull() {
addCriterion("\"YEAR\" is null");
return (Criteria) this;
}
public Criteria andYearIsNotNull() {
addCriterion("\"YEAR\" is not null");
return (Criteria) this;
}
public Criteria andYearEqualTo(Integer value) {
addCriterion("\"YEAR\" =", value, "year");
return (Criteria) this;
}
public Criteria andYearNotEqualTo(Integer value) {
addCriterion("\"YEAR\" <>", value, "year");
return (Criteria) this;
}
public Criteria andYearGreaterThan(Integer value) {
addCriterion("\"YEAR\" >", value, "year");
return (Criteria) this;
}
public Criteria andYearGreaterThanOrEqualTo(Integer value) {
addCriterion("\"YEAR\" >=", value, "year");
return (Criteria) this;
}
public Criteria andYearLessThan(Integer value) {
addCriterion("\"YEAR\" <", value, "year");
return (Criteria) this;
}
public Criteria andYearLessThanOrEqualTo(Integer value) {
addCriterion("\"YEAR\" <=", value, "year");
return (Criteria) this;
}
public Criteria andYearIn(List<Integer> values) {
addCriterion("\"YEAR\" in", values, "year");
return (Criteria) this;
}
public Criteria andYearNotIn(List<Integer> values) {
addCriterion("\"YEAR\" not in", values, "year");
return (Criteria) this;
}
public Criteria andYearBetween(Integer value1, Integer value2) {
addCriterion("\"YEAR\" between", value1, value2, "year");
return (Criteria) this;
}
public Criteria andYearNotBetween(Integer value1, Integer value2) {
addCriterion("\"YEAR\" not between", value1, value2, "year");
return (Criteria) this;
}
public Criteria andTemplateIdsIsNull() {
addCriterion("TEMPLATE_IDS is null");
return (Criteria) this;
}
public Criteria andTemplateIdsIsNotNull() {
addCriterion("TEMPLATE_IDS is not null");
return (Criteria) this;
}
public Criteria andTemplateIdsEqualTo(String value) {
addCriterion("TEMPLATE_IDS =", value, "templateIds");
return (Criteria) this;
}
public Criteria andTemplateIdsNotEqualTo(String value) {
addCriterion("TEMPLATE_IDS <>", value, "templateIds");
return (Criteria) this;
}
public Criteria andTemplateIdsGreaterThan(String value) {
addCriterion("TEMPLATE_IDS >", value, "templateIds");
return (Criteria) this;
}
public Criteria andTemplateIdsGreaterThanOrEqualTo(String value) {
addCriterion("TEMPLATE_IDS >=", value, "templateIds");
return (Criteria) this;
}
public Criteria andTemplateIdsLessThan(String value) {
addCriterion("TEMPLATE_IDS <", value, "templateIds");
return (Criteria) this;
}
public Criteria andTemplateIdsLessThanOrEqualTo(String value) {
addCriterion("TEMPLATE_IDS <=", value, "templateIds");
return (Criteria) this;
}
public Criteria andTemplateIdsLike(String value) {
addCriterion("TEMPLATE_IDS like", value, "templateIds");
return (Criteria) this;
}
public Criteria andTemplateIdsNotLike(String value) {
addCriterion("TEMPLATE_IDS not like", value, "templateIds");
return (Criteria) this;
}
public Criteria andTemplateIdsIn(List<String> values) {
addCriterion("TEMPLATE_IDS in", values, "templateIds");
return (Criteria) this;
}
public Criteria andTemplateIdsNotIn(List<String> values) {
addCriterion("TEMPLATE_IDS not in", values, "templateIds");
return (Criteria) this;
}
public Criteria andTemplateIdsBetween(String value1, String value2) {
addCriterion("TEMPLATE_IDS between", value1, value2, "templateIds");
return (Criteria) this;
}
public Criteria andTemplateIdsNotBetween(String value1, String value2) {
addCriterion("TEMPLATE_IDS not between", value1, value2, "templateIds");
return (Criteria) this;
}
}
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated do_not_delete_during_merge
*/
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}
\ No newline at end of file
<?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="pwc.taxtech.atms.vat.dao.PeriodApproveMapper">
<resultMap id="BaseResultMap" type="pwc.taxtech.atms.vat.entity.PeriodApprove">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="ID" jdbcType="VARCHAR" property="id" />
<result column="PROJECT_ID" jdbcType="VARCHAR" property="projectId" />
<result column="PERIOD" jdbcType="DECIMAL" property="period" />
<result column="REPORT_IDS" jdbcType="VARCHAR" property="reportIds" />
<result column="REPORT_PATHS" jdbcType="VARCHAR" property="reportPaths" />
<result column="STATUS" jdbcType="VARCHAR" property="status" />
<result column="INSTANCE_ID" jdbcType="VARCHAR" property="instanceId" />
<result column="YEAR" jdbcType="DECIMAL" property="year" />
<result column="TEMPLATE_IDS" jdbcType="VARCHAR" property="templateIds" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
ID, PROJECT_ID, PERIOD, REPORT_IDS, REPORT_PATHS, "STATUS", INSTANCE_ID, "YEAR",
TEMPLATE_IDS
</sql>
<select id="selectByExample" parameterType="pwc.taxtech.atms.vat.entity.PeriodApproveExample" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from PERIOD_APPROVE
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from PERIOD_APPROVE
where ID = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from PERIOD_APPROVE
where ID = #{id,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="pwc.taxtech.atms.vat.entity.PeriodApproveExample">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from PERIOD_APPROVE
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="pwc.taxtech.atms.vat.entity.PeriodApprove">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into PERIOD_APPROVE (ID, PROJECT_ID, PERIOD,
REPORT_IDS, REPORT_PATHS, "STATUS",
INSTANCE_ID, "YEAR", TEMPLATE_IDS
)
values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{period,jdbcType=DECIMAL},
#{reportIds,jdbcType=VARCHAR}, #{reportPaths,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR},
#{instanceId,jdbcType=VARCHAR}, #{year,jdbcType=DECIMAL}, #{templateIds,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="pwc.taxtech.atms.vat.entity.PeriodApprove">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into PERIOD_APPROVE
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
ID,
</if>
<if test="projectId != null">
PROJECT_ID,
</if>
<if test="period != null">
PERIOD,
</if>
<if test="reportIds != null">
REPORT_IDS,
</if>
<if test="reportPaths != null">
REPORT_PATHS,
</if>
<if test="status != null">
"STATUS",
</if>
<if test="instanceId != null">
INSTANCE_ID,
</if>
<if test="year != null">
"YEAR",
</if>
<if test="templateIds != null">
TEMPLATE_IDS,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="projectId != null">
#{projectId,jdbcType=VARCHAR},
</if>
<if test="period != null">
#{period,jdbcType=DECIMAL},
</if>
<if test="reportIds != null">
#{reportIds,jdbcType=VARCHAR},
</if>
<if test="reportPaths != null">
#{reportPaths,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=VARCHAR},
</if>
<if test="instanceId != null">
#{instanceId,jdbcType=VARCHAR},
</if>
<if test="year != null">
#{year,jdbcType=DECIMAL},
</if>
<if test="templateIds != null">
#{templateIds,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="pwc.taxtech.atms.vat.entity.PeriodApproveExample" resultType="java.lang.Long">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from PERIOD_APPROVE
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update PERIOD_APPROVE
<set>
<if test="record.id != null">
ID = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.projectId != null">
PROJECT_ID = #{record.projectId,jdbcType=VARCHAR},
</if>
<if test="record.period != null">
PERIOD = #{record.period,jdbcType=DECIMAL},
</if>
<if test="record.reportIds != null">
REPORT_IDS = #{record.reportIds,jdbcType=VARCHAR},
</if>
<if test="record.reportPaths != null">
REPORT_PATHS = #{record.reportPaths,jdbcType=VARCHAR},
</if>
<if test="record.status != null">
"STATUS" = #{record.status,jdbcType=VARCHAR},
</if>
<if test="record.instanceId != null">
INSTANCE_ID = #{record.instanceId,jdbcType=VARCHAR},
</if>
<if test="record.year != null">
"YEAR" = #{record.year,jdbcType=DECIMAL},
</if>
<if test="record.templateIds != null">
TEMPLATE_IDS = #{record.templateIds,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update PERIOD_APPROVE
set ID = #{record.id,jdbcType=VARCHAR},
PROJECT_ID = #{record.projectId,jdbcType=VARCHAR},
PERIOD = #{record.period,jdbcType=DECIMAL},
REPORT_IDS = #{record.reportIds,jdbcType=VARCHAR},
REPORT_PATHS = #{record.reportPaths,jdbcType=VARCHAR},
"STATUS" = #{record.status,jdbcType=VARCHAR},
INSTANCE_ID = #{record.instanceId,jdbcType=VARCHAR},
"YEAR" = #{record.year,jdbcType=DECIMAL},
TEMPLATE_IDS = #{record.templateIds,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="pwc.taxtech.atms.vat.entity.PeriodApprove">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update PERIOD_APPROVE
<set>
<if test="projectId != null">
PROJECT_ID = #{projectId,jdbcType=VARCHAR},
</if>
<if test="period != null">
PERIOD = #{period,jdbcType=DECIMAL},
</if>
<if test="reportIds != null">
REPORT_IDS = #{reportIds,jdbcType=VARCHAR},
</if>
<if test="reportPaths != null">
REPORT_PATHS = #{reportPaths,jdbcType=VARCHAR},
</if>
<if test="status != null">
"STATUS" = #{status,jdbcType=VARCHAR},
</if>
<if test="instanceId != null">
INSTANCE_ID = #{instanceId,jdbcType=VARCHAR},
</if>
<if test="year != null">
"YEAR" = #{year,jdbcType=DECIMAL},
</if>
<if test="templateIds != null">
TEMPLATE_IDS = #{templateIds,jdbcType=VARCHAR},
</if>
</set>
where ID = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="pwc.taxtech.atms.vat.entity.PeriodApprove">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update PERIOD_APPROVE
set PROJECT_ID = #{projectId,jdbcType=VARCHAR},
PERIOD = #{period,jdbcType=DECIMAL},
REPORT_IDS = #{reportIds,jdbcType=VARCHAR},
REPORT_PATHS = #{reportPaths,jdbcType=VARCHAR},
"STATUS" = #{status,jdbcType=VARCHAR},
INSTANCE_ID = #{instanceId,jdbcType=VARCHAR},
"YEAR" = #{year,jdbcType=DECIMAL},
TEMPLATE_IDS = #{templateIds,jdbcType=VARCHAR}
where ID = #{id,jdbcType=VARCHAR}
</update>
<select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.vat.entity.PeriodApproveExample" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from PERIOD_APPROVE
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment