Commit bc398078 authored by neo's avatar neo

[dev] add project for period report logic

parent d4ce6f59
......@@ -19,7 +19,7 @@ public class SpringContextUtil implements ApplicationContextAware {
private static ApplicationContext webApplicationContext;
public static FormulaAdminMapper formulaAdminMapper;
public static ReportMapper reportMapper;
public static PeriodReportMapper reportMapper;
public static CellDataMapper cellDataMapper;
public static DistributedIdService distributedIdService;
public static PeriodFormulaBlockMapper formulaBlockMapper;
......@@ -59,7 +59,7 @@ public class SpringContextUtil implements ApplicationContextAware {
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
webApplicationContext = applicationContext;
formulaAdminMapper = webApplicationContext.getBean(FormulaAdminMapper.class);
reportMapper = webApplicationContext.getBean(ReportMapper.class);
reportMapper = webApplicationContext.getBean(PeriodReportMapper.class);
cellDataMapper = webApplicationContext.getBean(CellDataMapper.class);
distributedIdService = webApplicationContext.getBean(DistributedIdService.class);
formulaBlockMapper = webApplicationContext.getBean(PeriodFormulaBlockMapper.class);
......
......@@ -64,14 +64,14 @@ public class ReportController {
}
@RequestMapping(value = "report/{templateId}/{period}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public OperationResultDto<ReportDto> getReportByTemplate(@PathVariable Long templateId, @PathVariable Integer period) {
public OperationResultDto<ReportDto> getReportByTemplate(@PathVariable Long templateId, @PathVariable Integer period, @RequestHeader String from) {
OperationResultDto resultDto = new OperationResultDto();
if (templateId == null || templateId == 0L || period == null || period == 0) {
resultDto.setResult(false);
resultDto.setResultMsg("templateId or period is invalid");
return resultDto;
}
return reportService.getReportByTemplate(templateId, period);
return reportService.getReportByTemplate(templateId, period, from);
}
@RequestMapping(value = "getCellTemplateConfig/{reportTemplateId}/{period}/{rowIndex}/{columnIndex}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
......@@ -90,8 +90,8 @@ public class ReportController {
}
@RequestMapping(value = "addCellManualData", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public OperationResultDto addCellManualDataSource(@RequestBody ManualDataSourceDto data) {
return reportService.addCellManualDataSource(data);
public OperationResultDto addCellManualDataSource(@RequestBody ManualDataSourceDto data, @RequestHeader String from) {
return reportService.addCellManualDataSource(data, from);
}
@RequestMapping(value = "addDataSource", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
......
......@@ -26,7 +26,7 @@ public interface ReportService {
OperationResultDto<ReportDataDto> getCellData(Long reportId, String porjectId);
OperationResultDto<ReportDto> getReportByTemplate(Long templateId, Integer period);
OperationResultDto<ReportDto> getReportByTemplate(Long templateId, Integer period, String projectId);
OperationResultDto<PeriodCellTemplateConfig> getCellTemplateConfig(Long reportTemplateId, Integer periodParam, int rowIndex, int columnIndex);
......@@ -40,7 +40,7 @@ public interface ReportService {
* @param data 数据源数据
* @return 添加结果
*/
OperationResultDto addCellManualDataSource(ManualDataSourceDto data);
OperationResultDto addCellManualDataSource(ManualDataSourceDto data, String projectId);
OperationResultDto<String> addDataSource(DataSourceDto datasource);
......
......@@ -11,11 +11,11 @@ import pwc.taxtech.atms.entity.ProjectServiceType;
import pwc.taxtech.atms.entity.ProjectServiceTypeExample;
import pwc.taxtech.atms.exception.Exceptions;
import pwc.taxtech.atms.vat.dao.CellDataMapper;
import pwc.taxtech.atms.vat.dao.ReportMapper;
import pwc.taxtech.atms.vat.dao.PeriodReportMapper;
import pwc.taxtech.atms.vat.entity.CellData;
import pwc.taxtech.atms.vat.entity.CellDataExample;
import pwc.taxtech.atms.vat.entity.Report;
import pwc.taxtech.atms.vat.entity.ReportExample;
import pwc.taxtech.atms.vat.entity.PeriodReport;
import pwc.taxtech.atms.vat.entity.PeriodReportExample;
import java.util.List;
......@@ -26,7 +26,7 @@ public class FormulaAgent extends VatAbstractService {
@Autowired
public FormulaAdminMapper adminMp;
@Autowired
public ReportMapper reportMapper;
public PeriodReportMapper periodReportMapper;
@Autowired
public CellDataMapper cellDataMapper;
......@@ -50,11 +50,11 @@ public class FormulaAgent extends VatAbstractService {
return cellTemplates;
}
private Report getReportByTemplate(String templateId, Integer periodId) {
ReportExample example = new ReportExample();
example.createCriteria().andTemplateIdEqualTo(Long.valueOf(templateId))
private PeriodReport getReportByTemplate(String templateId, Integer periodId, String projectId) {
PeriodReportExample example = new PeriodReportExample();
example.createCriteria().andProjectIdEqualTo(projectId).andTemplateIdEqualTo(Long.valueOf(templateId))
.andPeriodEqualTo(periodId);
List<Report> reports = reportMapper.selectByExample(example);
List<PeriodReport> reports = periodReportMapper.selectByExample(example);
if (reports != null && !reports.isEmpty()) return reports.get(FIRST_OR_DEFAULT);
return null;
......@@ -73,8 +73,8 @@ public class FormulaAgent extends VatAbstractService {
return adminMp.getPastProjectId(year, orgId);
}
public CellData getCellData(String templateId, String cellId, int periodId) {
Report report = getReportByTemplate(templateId, periodId);
public CellData getCellData(String templateId, String cellId, int periodId, String projectId) {
PeriodReport report = getReportByTemplate(templateId, periodId, projectId);
MyAsserts.assertNotNull(report, Exceptions.BB_REPORT_NULL);
CellData cellData = getCellDataListByTemplate(cellId, report.getId());
......
......@@ -49,6 +49,7 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import static pwc.taxtech.atms.common.util.SpringContextUtil.reportMapper;
import static pwc.taxtech.atms.constant.Constant.EMPTY;
@Component
......@@ -196,7 +197,7 @@ public class ReportGeneratorImpl extends VatAbstractService implements ReportGen
if (templateId > 0) {
//todo: create report into DB
Report report = new Report();
PeriodReport report = new PeriodReport();
Long reportId = distributedIdService.nextId();
report.setId(reportId);
report.setTemplateId(templateId);
......@@ -206,6 +207,7 @@ public class ReportGeneratorImpl extends VatAbstractService implements ReportGen
report.setCreateTime(createTime);
report.setUpdateBy("Admin");
report.setUpdateTime(createTime);
report.setProjectId(projectId);
reportMapper.insertSelective(report);
List<PeriodCellTemplateConfig> periodCellTemplateConfigs = periodCellTemplateConfigList.stream()
......
......@@ -403,7 +403,7 @@ public class ReportServiceImpl extends VatAbstractService implements ReportServi
OperationResultDto resultDto = new OperationResultDto();
ReportDataDto dataDto = new ReportDataDto();
try {
Report report = reportMapper.selectByPrimaryKey(reportId);
PeriodReport report = periodReportMapper.selectByPrimaryKey(reportId);
if (report == null) {
resultDto.setResult(false);
resultDto.setResultMsg("NoReport");
......@@ -608,12 +608,12 @@ public class ReportServiceImpl extends VatAbstractService implements ReportServi
}
@Override
public OperationResultDto<ReportDto> getReportByTemplate(Long templateId, Integer period) {
public OperationResultDto<ReportDto> getReportByTemplate(Long templateId, Integer period, String projectId) {
OperationResultDto resultDto = new OperationResultDto();
try {
ReportExample example = new ReportExample();
example.createCriteria().andTemplateIdEqualTo(templateId).andPeriodEqualTo(period);
Optional<Report> report = reportMapper.selectByExample(example).stream().findFirst();
PeriodReportExample example = new PeriodReportExample();
example.createCriteria().andProjectIdEqualTo(projectId).andTemplateIdEqualTo(templateId).andPeriodEqualTo(period);
Optional<PeriodReport> report = periodReportMapper.selectByExample(example).stream().findFirst();
if (report.isPresent()) {
resultDto.setResult(true);
ReportDto reportDto = new ReportDto();
......@@ -721,7 +721,7 @@ public class ReportServiceImpl extends VatAbstractService implements ReportServi
}
@Override
public OperationResultDto addCellManualDataSource(ManualDataSourceDto data) {
public OperationResultDto addCellManualDataSource(ManualDataSourceDto data, String projectId) {
OperationResultDto operationResultDto = new OperationResultDto();
try {
......@@ -810,9 +810,9 @@ public class ReportServiceImpl extends VatAbstractService implements ReportServi
templateId = periodCellTemplate.get().getReportTemplateId();
}
//3. use the template id get the reportid, use the reportid get the celltemplateids, then use the celltemplateids and cell name get the datasource which should be updated.
ReportExample reportExample = new ReportExample();
reportExample.createCriteria().andTemplateIdEqualTo(templateId).andPeriodEqualTo(data.getPeriod());
Optional<Report> report = reportMapper.selectByExample(reportExample).stream().findFirst();
PeriodReportExample reportExample = new PeriodReportExample();
reportExample.createCriteria().andProjectIdEqualTo(projectId).andTemplateIdEqualTo(templateId).andPeriodEqualTo(data.getPeriod());
Optional<PeriodReport> report = periodReportMapper.selectByExample(reportExample).stream().findFirst();
if (report.isPresent()) {
Long reportId = report.get().getId();
CellDataExample cellDataExample = new CellDataExample();
......
......@@ -72,7 +72,7 @@ public class VatAbstractService {
@Autowired
public PeriodFormulaBlockMapper periodFormulaBlockMapper;
@Autowired
public ReportMapper reportMapper;
public PeriodReportMapper periodReportMapper;
@Autowired
public CellDataMapper cellDataMapper;
@Autowired
......
......@@ -114,7 +114,7 @@ public class BB extends FunctionBase implements FreeRefFunction {
MyAsserts.assertNotEmpty(projectId, Exceptions.PROJECT_EMPTY);
cellData = agent.getCellData(cellTemplateData.getReportTemplateId(),
cellTemplateData.getCellTemplateId(), curPeriod.getCurPeriod());
cellTemplateData.getCellTemplateId(), curPeriod.getCurPeriod(), formulaContext.getProjectId());
nullCellDto.extractFromGroup(bo, curPeriod, cellData, cellTemplateData);
// todo: fix datasource name by templateList(neo)
......
......@@ -7,7 +7,7 @@ import org.apache.poi.ss.formula.eval.ValueEval;
import org.apache.poi.ss.formula.functions.FreeRefFunction;
import pwc.taxtech.atms.common.util.SpringContextUtil;
import pwc.taxtech.atms.constant.Constant;
import pwc.taxtech.atms.vat.entity.Report;
import pwc.taxtech.atms.vat.entity.PeriodReport;
import java.util.Calendar;
import java.util.Date;
......@@ -56,7 +56,7 @@ public class ProjectContext extends FunctionBase implements FreeRefFunction {
, formulaContext.getPeriod(), calendar.get(Calendar.DAY_OF_MONTH), formulaContext.getYear()
, formulaContext.getPeriod(), calendar2.get(Calendar.DAY_OF_MONTH)));
case "FillForm":
Report report = SpringContextUtil.reportMapper.selectByPrimaryKey(formulaContext.getReportId());
PeriodReport report = SpringContextUtil.reportMapper.selectByPrimaryKey(formulaContext.getReportId());
if (report != null) {
return new StringEval(String.format(Constant.ReportBuildInStringFormat.FillForm, report.getUpdateTime().getYear()
, report.getUpdateTime().getMonth(), report.getUpdateTime().getDay()));
......
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.Report;
import pwc.taxtech.atms.vat.entity.ReportExample;
@Mapper
public interface ReportMapper extends MyVatMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT.REPORT
*
* @mbg.generated
*/
long countByExample(ReportExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT.REPORT
*
* @mbg.generated
*/
int deleteByExample(ReportExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT.REPORT
*
* @mbg.generated
*/
int deleteByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT.REPORT
*
* @mbg.generated
*/
int insert(Report record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT.REPORT
*
* @mbg.generated
*/
int insertSelective(Report record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT.REPORT
*
* @mbg.generated
*/
List<Report> selectByExampleWithRowbounds(ReportExample example, RowBounds rowBounds);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT.REPORT
*
* @mbg.generated
*/
List<Report> selectByExample(ReportExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT.REPORT
*
* @mbg.generated
*/
Report selectByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT.REPORT
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") Report record, @Param("example") ReportExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT.REPORT
*
* @mbg.generated
*/
int updateByExample(@Param("record") Report record, @Param("example") ReportExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT.REPORT
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(Report record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT.REPORT
*
* @mbg.generated
*/
int updateByPrimaryKey(Report record);
}
\ No newline at end of file
package pwc.taxtech.atms.vat.entity;
import java.io.Serializable;
import java.util.Date;
/**
*
* This class was generated by MyBatis Generator.
* This class corresponds to the database table TAX_PROJECT.REPORT
*
* @mbg.generated do_not_delete_during_merge
*/
public class Report implements Serializable {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_PROJECT.REPORT.ID
*
* @mbg.generated
*/
private Long id;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_PROJECT.REPORT.TEMPLATE_ID
*
* @mbg.generated
*/
private Long templateId;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_PROJECT.REPORT.PERIOD
*
* @mbg.generated
*/
private Integer period;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_PROJECT.REPORT.PROJECT_ID
*
* @mbg.generated
*/
private String projectId;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_PROJECT.REPORT.CREATE_BY
*
* @mbg.generated
*/
private String createBy;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_PROJECT.REPORT.CREATE_TIME
*
* @mbg.generated
*/
private Date createTime;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_PROJECT.REPORT.UPDATE_BY
*
* @mbg.generated
*/
private String updateBy;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_PROJECT.REPORT.UPDATE_TIME
*
* @mbg.generated
*/
private Date updateTime;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table TAX_PROJECT.REPORT
*
* @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_PROJECT.REPORT.ID
*
* @return the value of TAX_PROJECT.REPORT.ID
*
* @mbg.generated
*/
public Long getId() {
return id;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_PROJECT.REPORT.ID
*
* @param id the value for TAX_PROJECT.REPORT.ID
*
* @mbg.generated
*/
public void setId(Long id) {
this.id = id;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TAX_PROJECT.REPORT.TEMPLATE_ID
*
* @return the value of TAX_PROJECT.REPORT.TEMPLATE_ID
*
* @mbg.generated
*/
public Long getTemplateId() {
return templateId;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_PROJECT.REPORT.TEMPLATE_ID
*
* @param templateId the value for TAX_PROJECT.REPORT.TEMPLATE_ID
*
* @mbg.generated
*/
public void setTemplateId(Long templateId) {
this.templateId = templateId;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TAX_PROJECT.REPORT.PERIOD
*
* @return the value of TAX_PROJECT.REPORT.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_PROJECT.REPORT.PERIOD
*
* @param period the value for TAX_PROJECT.REPORT.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_PROJECT.REPORT.PROJECT_ID
*
* @return the value of TAX_PROJECT.REPORT.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_PROJECT.REPORT.PROJECT_ID
*
* @param projectId the value for TAX_PROJECT.REPORT.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_PROJECT.REPORT.CREATE_BY
*
* @return the value of TAX_PROJECT.REPORT.CREATE_BY
*
* @mbg.generated
*/
public String getCreateBy() {
return createBy;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_PROJECT.REPORT.CREATE_BY
*
* @param createBy the value for TAX_PROJECT.REPORT.CREATE_BY
*
* @mbg.generated
*/
public void setCreateBy(String createBy) {
this.createBy = createBy == null ? null : createBy.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TAX_PROJECT.REPORT.CREATE_TIME
*
* @return the value of TAX_PROJECT.REPORT.CREATE_TIME
*
* @mbg.generated
*/
public Date getCreateTime() {
return createTime;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_PROJECT.REPORT.CREATE_TIME
*
* @param createTime the value for TAX_PROJECT.REPORT.CREATE_TIME
*
* @mbg.generated
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TAX_PROJECT.REPORT.UPDATE_BY
*
* @return the value of TAX_PROJECT.REPORT.UPDATE_BY
*
* @mbg.generated
*/
public String getUpdateBy() {
return updateBy;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_PROJECT.REPORT.UPDATE_BY
*
* @param updateBy the value for TAX_PROJECT.REPORT.UPDATE_BY
*
* @mbg.generated
*/
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy == null ? null : updateBy.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TAX_PROJECT.REPORT.UPDATE_TIME
*
* @return the value of TAX_PROJECT.REPORT.UPDATE_TIME
*
* @mbg.generated
*/
public Date getUpdateTime() {
return updateTime;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_PROJECT.REPORT.UPDATE_TIME
*
* @param updateTime the value for TAX_PROJECT.REPORT.UPDATE_TIME
*
* @mbg.generated
*/
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT.REPORT
*
* @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(", templateId=").append(templateId);
sb.append(", period=").append(period);
sb.append(", projectId=").append(projectId);
sb.append(", createBy=").append(createBy);
sb.append(", createTime=").append(createTime);
sb.append(", updateBy=").append(updateBy);
sb.append(", updateTime=").append(updateTime);
sb.append("]");
return sb.toString();
}
}
\ No newline at end of file
package pwc.taxtech.atms.vat.entity;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class ReportExample {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table TAX_PROJECT.REPORT
*
* @mbg.generated
*/
protected String orderByClause;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table TAX_PROJECT.REPORT
*
* @mbg.generated
*/
protected boolean distinct;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table TAX_PROJECT.REPORT
*
* @mbg.generated
*/
protected List<Criteria> oredCriteria;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT.REPORT
*
* @mbg.generated
*/
public ReportExample() {
oredCriteria = new ArrayList<Criteria>();
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT.REPORT
*
* @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_PROJECT.REPORT
*
* @mbg.generated
*/
public String getOrderByClause() {
return orderByClause;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT.REPORT
*
* @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_PROJECT.REPORT
*
* @mbg.generated
*/
public boolean isDistinct() {
return distinct;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT.REPORT
*
* @mbg.generated
*/
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT.REPORT
*
* @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_PROJECT.REPORT
*
* @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_PROJECT.REPORT
*
* @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_PROJECT.REPORT
*
* @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_PROJECT.REPORT
*
* @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_PROJECT.REPORT
*
* @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(Long value) {
addCriterion("ID =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("ID <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("ID >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("ID >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("ID <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("ID <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("ID in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("ID not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("ID between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("ID not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andTemplateIdIsNull() {
addCriterion("TEMPLATE_ID is null");
return (Criteria) this;
}
public Criteria andTemplateIdIsNotNull() {
addCriterion("TEMPLATE_ID is not null");
return (Criteria) this;
}
public Criteria andTemplateIdEqualTo(Long value) {
addCriterion("TEMPLATE_ID =", value, "templateId");
return (Criteria) this;
}
public Criteria andTemplateIdNotEqualTo(Long value) {
addCriterion("TEMPLATE_ID <>", value, "templateId");
return (Criteria) this;
}
public Criteria andTemplateIdGreaterThan(Long value) {
addCriterion("TEMPLATE_ID >", value, "templateId");
return (Criteria) this;
}
public Criteria andTemplateIdGreaterThanOrEqualTo(Long value) {
addCriterion("TEMPLATE_ID >=", value, "templateId");
return (Criteria) this;
}
public Criteria andTemplateIdLessThan(Long value) {
addCriterion("TEMPLATE_ID <", value, "templateId");
return (Criteria) this;
}
public Criteria andTemplateIdLessThanOrEqualTo(Long value) {
addCriterion("TEMPLATE_ID <=", value, "templateId");
return (Criteria) this;
}
public Criteria andTemplateIdIn(List<Long> values) {
addCriterion("TEMPLATE_ID in", values, "templateId");
return (Criteria) this;
}
public Criteria andTemplateIdNotIn(List<Long> values) {
addCriterion("TEMPLATE_ID not in", values, "templateId");
return (Criteria) this;
}
public Criteria andTemplateIdBetween(Long value1, Long value2) {
addCriterion("TEMPLATE_ID between", value1, value2, "templateId");
return (Criteria) this;
}
public Criteria andTemplateIdNotBetween(Long value1, Long value2) {
addCriterion("TEMPLATE_ID not between", value1, value2, "templateId");
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 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 andCreateByIsNull() {
addCriterion("CREATE_BY is null");
return (Criteria) this;
}
public Criteria andCreateByIsNotNull() {
addCriterion("CREATE_BY is not null");
return (Criteria) this;
}
public Criteria andCreateByEqualTo(String value) {
addCriterion("CREATE_BY =", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByNotEqualTo(String value) {
addCriterion("CREATE_BY <>", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByGreaterThan(String value) {
addCriterion("CREATE_BY >", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByGreaterThanOrEqualTo(String value) {
addCriterion("CREATE_BY >=", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByLessThan(String value) {
addCriterion("CREATE_BY <", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByLessThanOrEqualTo(String value) {
addCriterion("CREATE_BY <=", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByLike(String value) {
addCriterion("CREATE_BY like", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByNotLike(String value) {
addCriterion("CREATE_BY not like", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByIn(List<String> values) {
addCriterion("CREATE_BY in", values, "createBy");
return (Criteria) this;
}
public Criteria andCreateByNotIn(List<String> values) {
addCriterion("CREATE_BY not in", values, "createBy");
return (Criteria) this;
}
public Criteria andCreateByBetween(String value1, String value2) {
addCriterion("CREATE_BY between", value1, value2, "createBy");
return (Criteria) this;
}
public Criteria andCreateByNotBetween(String value1, String value2) {
addCriterion("CREATE_BY not between", value1, value2, "createBy");
return (Criteria) this;
}
public Criteria andCreateTimeIsNull() {
addCriterion("CREATE_TIME is null");
return (Criteria) this;
}
public Criteria andCreateTimeIsNotNull() {
addCriterion("CREATE_TIME is not null");
return (Criteria) this;
}
public Criteria andCreateTimeEqualTo(Date value) {
addCriterion("CREATE_TIME =", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotEqualTo(Date value) {
addCriterion("CREATE_TIME <>", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThan(Date value) {
addCriterion("CREATE_TIME >", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("CREATE_TIME >=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThan(Date value) {
addCriterion("CREATE_TIME <", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
addCriterion("CREATE_TIME <=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeIn(List<Date> values) {
addCriterion("CREATE_TIME in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotIn(List<Date> values) {
addCriterion("CREATE_TIME not in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeBetween(Date value1, Date value2) {
addCriterion("CREATE_TIME between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
addCriterion("CREATE_TIME not between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andUpdateByIsNull() {
addCriterion("UPDATE_BY is null");
return (Criteria) this;
}
public Criteria andUpdateByIsNotNull() {
addCriterion("UPDATE_BY is not null");
return (Criteria) this;
}
public Criteria andUpdateByEqualTo(String value) {
addCriterion("UPDATE_BY =", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByNotEqualTo(String value) {
addCriterion("UPDATE_BY <>", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByGreaterThan(String value) {
addCriterion("UPDATE_BY >", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByGreaterThanOrEqualTo(String value) {
addCriterion("UPDATE_BY >=", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByLessThan(String value) {
addCriterion("UPDATE_BY <", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByLessThanOrEqualTo(String value) {
addCriterion("UPDATE_BY <=", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByLike(String value) {
addCriterion("UPDATE_BY like", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByNotLike(String value) {
addCriterion("UPDATE_BY not like", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByIn(List<String> values) {
addCriterion("UPDATE_BY in", values, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByNotIn(List<String> values) {
addCriterion("UPDATE_BY not in", values, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByBetween(String value1, String value2) {
addCriterion("UPDATE_BY between", value1, value2, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByNotBetween(String value1, String value2) {
addCriterion("UPDATE_BY not between", value1, value2, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNull() {
addCriterion("UPDATE_TIME is null");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNotNull() {
addCriterion("UPDATE_TIME is not null");
return (Criteria) this;
}
public Criteria andUpdateTimeEqualTo(Date value) {
addCriterion("UPDATE_TIME =", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotEqualTo(Date value) {
addCriterion("UPDATE_TIME <>", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThan(Date value) {
addCriterion("UPDATE_TIME >", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("UPDATE_TIME >=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThan(Date value) {
addCriterion("UPDATE_TIME <", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
addCriterion("UPDATE_TIME <=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIn(List<Date> values) {
addCriterion("UPDATE_TIME in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotIn(List<Date> values) {
addCriterion("UPDATE_TIME not in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeBetween(Date value1, Date value2) {
addCriterion("UPDATE_TIME between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
addCriterion("UPDATE_TIME not between", value1, value2, "updateTime");
return (Criteria) this;
}
}
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table TAX_PROJECT.REPORT
*
* @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_PROJECT.REPORT
*
* @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.ReportMapper">
<resultMap id="BaseResultMap" type="pwc.taxtech.atms.vat.entity.Report">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="ID" jdbcType="DECIMAL" property="id" />
<result column="TEMPLATE_ID" jdbcType="DECIMAL" property="templateId" />
<result column="PERIOD" jdbcType="DECIMAL" property="period" />
<result column="PROJECT_ID" jdbcType="VARCHAR" property="projectId" />
<result column="CREATE_BY" jdbcType="VARCHAR" property="createBy" />
<result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime" />
<result column="UPDATE_BY" jdbcType="VARCHAR" property="updateBy" />
<result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
</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, TEMPLATE_ID, PERIOD, PROJECT_ID, CREATE_BY, CREATE_TIME, UPDATE_BY, UPDATE_TIME
</sql>
<select id="selectByExample" parameterType="pwc.taxtech.atms.vat.entity.ReportExample" 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 REPORT
<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.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from REPORT
where ID = #{id,jdbcType=DECIMAL}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from REPORT
where ID = #{id,jdbcType=DECIMAL}
</delete>
<delete id="deleteByExample" parameterType="pwc.taxtech.atms.vat.entity.ReportExample">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from REPORT
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="pwc.taxtech.atms.vat.entity.Report">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into REPORT (ID, TEMPLATE_ID, PERIOD,
PROJECT_ID, CREATE_BY, CREATE_TIME,
UPDATE_BY, UPDATE_TIME)
values (#{id,jdbcType=DECIMAL}, #{templateId,jdbcType=DECIMAL}, #{period,jdbcType=DECIMAL},
#{projectId,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="pwc.taxtech.atms.vat.entity.Report">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into REPORT
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
ID,
</if>
<if test="templateId != null">
TEMPLATE_ID,
</if>
<if test="period != null">
PERIOD,
</if>
<if test="projectId != null">
PROJECT_ID,
</if>
<if test="createBy != null">
CREATE_BY,
</if>
<if test="createTime != null">
CREATE_TIME,
</if>
<if test="updateBy != null">
UPDATE_BY,
</if>
<if test="updateTime != null">
UPDATE_TIME,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=DECIMAL},
</if>
<if test="templateId != null">
#{templateId,jdbcType=DECIMAL},
</if>
<if test="period != null">
#{period,jdbcType=DECIMAL},
</if>
<if test="projectId != null">
#{projectId,jdbcType=VARCHAR},
</if>
<if test="createBy != null">
#{createBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateBy != null">
#{updateBy,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="pwc.taxtech.atms.vat.entity.ReportExample" resultType="java.lang.Long">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from REPORT
<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 REPORT
<set>
<if test="record.id != null">
ID = #{record.id,jdbcType=DECIMAL},
</if>
<if test="record.templateId != null">
TEMPLATE_ID = #{record.templateId,jdbcType=DECIMAL},
</if>
<if test="record.period != null">
PERIOD = #{record.period,jdbcType=DECIMAL},
</if>
<if test="record.projectId != null">
PROJECT_ID = #{record.projectId,jdbcType=VARCHAR},
</if>
<if test="record.createBy != null">
CREATE_BY = #{record.createBy,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
CREATE_TIME = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updateBy != null">
UPDATE_BY = #{record.updateBy,jdbcType=VARCHAR},
</if>
<if test="record.updateTime != null">
UPDATE_TIME = #{record.updateTime,jdbcType=TIMESTAMP},
</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 REPORT
set ID = #{record.id,jdbcType=DECIMAL},
TEMPLATE_ID = #{record.templateId,jdbcType=DECIMAL},
PERIOD = #{record.period,jdbcType=DECIMAL},
PROJECT_ID = #{record.projectId,jdbcType=VARCHAR},
CREATE_BY = #{record.createBy,jdbcType=VARCHAR},
CREATE_TIME = #{record.createTime,jdbcType=TIMESTAMP},
UPDATE_BY = #{record.updateBy,jdbcType=VARCHAR},
UPDATE_TIME = #{record.updateTime,jdbcType=TIMESTAMP}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="pwc.taxtech.atms.vat.entity.Report">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update REPORT
<set>
<if test="templateId != null">
TEMPLATE_ID = #{templateId,jdbcType=DECIMAL},
</if>
<if test="period != null">
PERIOD = #{period,jdbcType=DECIMAL},
</if>
<if test="projectId != null">
PROJECT_ID = #{projectId,jdbcType=VARCHAR},
</if>
<if test="createBy != null">
CREATE_BY = #{createBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateBy != null">
UPDATE_BY = #{updateBy,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where ID = #{id,jdbcType=DECIMAL}
</update>
<update id="updateByPrimaryKey" parameterType="pwc.taxtech.atms.vat.entity.Report">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update REPORT
set TEMPLATE_ID = #{templateId,jdbcType=DECIMAL},
PERIOD = #{period,jdbcType=DECIMAL},
PROJECT_ID = #{projectId,jdbcType=VARCHAR},
CREATE_BY = #{createBy,jdbcType=VARCHAR},
CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
UPDATE_BY = #{updateBy,jdbcType=VARCHAR},
UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.vat.entity.ReportExample" 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 REPORT
<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