Commit 9e7efe14 authored by neo.wang's avatar neo.wang

Merge branch 'dev_oracle_neo' into 'dev_oracle'

Dev oracle neo

See merge request root/atms!123
parents 5d382a4d e890c39b
......@@ -19,14 +19,14 @@ 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;
public static PeriodCellTemplateMapper periodCellTemplateMapper;
public static ProjectServiceTypeMapper projectServiceTypeMapper;
public static PeriodTemplateMapper periodTemplateMapper;
public static VatStandardAccountMapper vatStandardAccountMapper;
public static PeriodStandardAccountMapper periodStandardAccountMapper;
public static ProjectDao projectDao;
public static BalanceMapper balanceMapper;
public static DataSourceMapper dataSourceMapper;
......@@ -59,14 +59,14 @@ 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);
periodCellTemplateMapper = webApplicationContext.getBean(PeriodCellTemplateMapper.class);
projectServiceTypeMapper = webApplicationContext.getBean(ProjectServiceTypeMapper.class);
periodTemplateMapper = webApplicationContext.getBean(PeriodTemplateMapper.class);
vatStandardAccountMapper = webApplicationContext.getBean(VatStandardAccountMapper.class);
periodStandardAccountMapper = webApplicationContext.getBean(PeriodStandardAccountMapper.class);
projectDao = webApplicationContext.getBean(ProjectDao.class);
balanceMapper = webApplicationContext.getBean(BalanceMapper.class);
dataSourceMapper = webApplicationContext.getBean(DataSourceMapper.class);
......
......@@ -2,7 +2,13 @@ package pwc.taxtech.atms.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import pwc.taxtech.atms.constant.enums.EnumServiceType;
import pwc.taxtech.atms.dpo.ReportDto;
import pwc.taxtech.atms.dto.OperationResultDto;
......@@ -48,24 +54,24 @@ public class ReportController {
}
@RequestMapping(value = "reportData/{reportId}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public OperationResultDto<ReportDataDto> getReportData(@PathVariable Long reportId) {
public OperationResultDto<ReportDataDto> getReportData(@PathVariable Long reportId, @RequestHeader String from) {
OperationResultDto resultDto = new OperationResultDto();
if (reportId == null || reportId == 0L) {
resultDto.setResult(false);
return resultDto;
}
return reportService.getCellData(reportId);
return reportService.getCellData(reportId, from);
}
@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)
......@@ -84,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)
......
......@@ -2,7 +2,6 @@ package pwc.taxtech.atms.service.impl;
import com.google.common.base.Predicate;
import com.google.common.collect.Lists;
import org.mybatis.spring.SqlSessionTemplate;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -15,7 +14,6 @@ import pwc.taxtech.atms.dao.ProjectClientMapper;
import pwc.taxtech.atms.dao.ProjectMapper;
import pwc.taxtech.atms.dao.ProjectServiceTypeMapper;
import pwc.taxtech.atms.dao.ServiceTypeMapper;
import pwc.taxtech.atms.dao.StandardAccountMapper;
import pwc.taxtech.atms.dao.TemplateGroupMapper;
import pwc.taxtech.atms.dpo.ProjectDisplayDto;
import pwc.taxtech.atms.dto.FieldsMapper;
......@@ -26,9 +24,7 @@ import pwc.taxtech.atms.dto.taxadmin.AddProjectResult;
import pwc.taxtech.atms.dto.taxadmin.ProjectYearParam;
import pwc.taxtech.atms.entity.*;
import pwc.taxtech.atms.entity.ProjectClientExample.Criteria;
import pwc.taxtech.atms.service.OperationLogService;
import pwc.taxtech.atms.service.ProjectService;
import pwc.taxtech.atms.vat.dao.VatStandardAccountMapper;
import java.util.ArrayList;
import java.util.Calendar;
......@@ -64,17 +60,6 @@ public class ProjectServiceImpl implements ProjectService {
@Autowired
private ProjectServiceTypeMapper projectServiceTypeMapper;
@Autowired
private OperationLogService operationLogService;
@Autowired
private SqlSessionTemplate dynamicSqlSessionTemplate;
@Autowired
private StandardAccountMapper standardAccountMapper;
@Autowired
private VatStandardAccountMapper vatStandardAccountMapper;
@Value("${jdbc_admin_db}")
private String adminDbName;
......
......@@ -24,9 +24,9 @@ public interface ReportService {
List<CellTemplateReferenceDto> getTemplateReferences(int period);
OperationResultDto<ReportDataDto> getCellData(Long reportId);
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
......@@ -70,7 +71,7 @@ public class ReportGeneratorImpl extends VatAbstractService implements ReportGen
Project project = projectMapper.selectByPrimaryKey(projectId);
PeriodTemplateExample periodTemplateExample = new PeriodTemplateExample();
periodTemplateExample.createCriteria().andIdIn(templateIds);
periodTemplateExample.createCriteria().andProjectIdEqualTo(projectId).andPeriodEqualTo(period).andIdIn(templateIds);
List<PeriodTemplate> periodTemplateList = periodTemplateMapper.selectByExample(periodTemplateExample);
List<Long> periodTemplateIdList = periodTemplateList.stream()
.map(PeriodTemplate::getTemplateId)
......@@ -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()
......
......@@ -367,13 +367,16 @@ public class ReportServiceImpl extends VatAbstractService implements ReportServi
PeriodTemplateExample periodTemplateExample = new PeriodTemplateExample();
periodTemplateExample.createCriteria()
.andTemplateGroupIdEqualTo(templateGroupId.get())
.andProjectIdEqualTo(projectId)
.andPeriodEqualTo(period)
.andIsActiveAssociationEqualTo(true)
.andReportTypeEqualTo(reportType);
templateIds = periodTemplateMapper.selectByExample(periodTemplateExample).stream().map(PeriodTemplate::getId).collect(Collectors.toList());
} else {
PeriodTemplateExample periodTemplateExample = new PeriodTemplateExample();
periodTemplateExample.createCriteria().andTemplateGroupIdEqualTo(templateGroupId.get()).andPeriodEqualTo(period).andIsActiveAssociationEqualTo(true);
periodTemplateExample.createCriteria().andTemplateGroupIdEqualTo(templateGroupId.get())
.andProjectIdEqualTo(projectId)
.andPeriodEqualTo(period).andIsActiveAssociationEqualTo(true);
templateIds = periodTemplateMapper.selectByExample(periodTemplateExample).stream().map(PeriodTemplate::getId).collect(Collectors.toList());
}
......@@ -396,11 +399,11 @@ public class ReportServiceImpl extends VatAbstractService implements ReportServi
}
@Override
public OperationResultDto<ReportDataDto> getCellData(Long reportId) {
public OperationResultDto<ReportDataDto> getCellData(Long reportId, String projectId) {
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");
......@@ -408,7 +411,7 @@ public class ReportServiceImpl extends VatAbstractService implements ReportServi
}
PeriodTemplateExample example = new PeriodTemplateExample();
example.createCriteria().andTemplateIdEqualTo(report.getTemplateId()).andPeriodEqualTo(report.getPeriod());
example.createCriteria().andProjectIdEqualTo(projectId).andTemplateIdEqualTo(report.getTemplateId()).andPeriodEqualTo(report.getPeriod());
Optional<PeriodTemplate> reportTemplate = periodTemplateMapper.selectByExample(example).stream().findFirst();
if (!reportTemplate.isPresent()) {
resultDto.setResult(false);
......@@ -425,6 +428,7 @@ public class ReportServiceImpl extends VatAbstractService implements ReportServi
PeriodTemplateExample periodTemplateExample = new PeriodTemplateExample();
periodTemplateExample.createCriteria()
.andProjectIdEqualTo(projectId)
.andTemplateGroupIdEqualTo(reportTemplate.get().getTemplateGroupId())
.andPeriodEqualTo(report.getPeriod())
.andIsActiveAssociationEqualTo(true);
......@@ -604,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();
......@@ -717,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 {
......@@ -806,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();
......
......@@ -20,7 +20,7 @@ public class VatAbstractService {
@Autowired
public VatEnterpriseAccountMapper vatEnterpriseAccountMapper;
@Autowired
public VatStandardAccountMapper vatStandardAccountMapper;
public PeriodStandardAccountMapper periodStandardAccountMapper;
@Autowired
public InputVatInvoiceMapper inputVATInvoiceMapper;
@Autowired
......@@ -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)
......
......@@ -67,7 +67,8 @@ public class FSJZ extends FunctionBase implements FreeRefFunction {
if (accountType == 0) {
//标准账套
VatStandardAccount vatStandardAccount = SpringContextUtil.vatStandardAccountMapper.selectOneByAccountCode(accountCode);
VatStandardAccount vatStandardAccount = SpringContextUtil.periodStandardAccountMapper.selectOneByAccountCode(accountCode,
formulaContext.getProjectId());
if (vatStandardAccount == null) {
return NumberEval.ZERO;
}
......@@ -132,7 +133,7 @@ public class FSJZ extends FunctionBase implements FreeRefFunction {
}
//todo: sava data
//save datasource
Long dataSourceId = saveDataSource(ec, formulaDataSourceDtoList, FormulaDataSourceDetailType.BSPLFormulaDataSourceDto, val,period,formulaContext.getReportTemplateGroupId());
Long dataSourceId = saveDataSource(ec, formulaDataSourceDtoList, FormulaDataSourceDetailType.BSPLFormulaDataSourceDto, val, period, formulaContext.getReportTemplateGroupId());
//save formulablock
saveFormulaBlock(period, ec, formulaExpression, val, dataSourceId);
......@@ -196,7 +197,7 @@ public class FSJZ extends FunctionBase implements FreeRefFunction {
//todo: sava data
//save datasource
Long dataSourceId = saveDataSource(ec, dsList, FormulaDataSourceDetailType.BSPLFormulaDataSourceDto, val,
period,formulaContext.getReportTemplateGroupId());
period, formulaContext.getReportTemplateGroupId());
//save formulablock
saveFormulaBlock(period, ec, formulaExpression, val, dataSourceId);
return new NumberEval(val.doubleValue());
......
......@@ -2,12 +2,9 @@ package pwc.taxtech.atms.vat.service.impl.report.functions;
import pwc.taxtech.atms.common.util.SpringContextUtil;
import pwc.taxtech.atms.constant.enums.KeyValueConfigResultType;
import pwc.taxtech.atms.vat.entity.PeriodTemplate;
import pwc.taxtech.atms.vat.entity.PeriodTemplateExample;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class FormulaHelper {
......
......@@ -69,11 +69,11 @@ public class GZSD extends FunctionBase implements FreeRefFunction {
List<PeriodTaxRuleSetting> taxRuleSettings =
SpringContextUtil.periodTaxRuleSettingMapper.getTaxRuleSetting(formulaContext.getOrganizationId(),
taxName, formulaContext.getPeriod());
taxName, formulaContext.getPeriod(), formulaContext.getProjectId());
Optional<PeriodTaxRuleSetting> matchedRule = taxRuleSettings.stream().filter(a -> a.getIsDefault() != Constant.IsDefault.Yes).findFirst();
if (!matchedRule.isPresent()) {
matchedRule = Optional.ofNullable(taxRuleSettings.size()>0?taxRuleSettings.get(0):null);
matchedRule = Optional.ofNullable(taxRuleSettings.size() > 0 ? taxRuleSettings.get(0) : null);
if (!matchedRule.isPresent()) {
NumberFormat nf = NumberFormat.getPercentInstance();
......
......@@ -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.dpo.TrialBalanceDto;
import pwc.taxtech.atms.vat.entity.PeriodStandardAccount;
import pwc.taxtech.atms.vat.entity.PeriodStandardAccountExample;
import pwc.taxtech.atms.vat.entity.VatStandardAccount;
import java.util.List;
@Mapper
public interface PeriodStandardAccountMapper extends MyVatMapper {
......@@ -105,4 +108,9 @@ public interface PeriodStandardAccountMapper extends MyVatMapper {
* @mbg.generated
*/
int updateByPrimaryKey(PeriodStandardAccount record);
List<TrialBalanceDto> selectProjectStandardAccountLeftJoinBalanceStdManual(@Param("fromMonth") String fromMonth, @Param("toMonth") String toMonth,
@Param("projectId") String projectId);
VatStandardAccount selectOneByAccountCode(@Param("accountCode") String accountCode, @Param("projectId") String projectId);
}
\ No newline at end of file
......@@ -109,5 +109,6 @@ public interface PeriodTaxRuleSettingMapper extends MyVatMapper {
List<PeriodTaxRuleSetting> getTaxRuleSetting(@Param("organizationId") String organizationId,
@Param("taxName") String taxName, @Param("period") int period);
@Param("taxName") String taxName, @Param("period") int period,
@Param("projectId") String projectId);
}
\ 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.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.dao;
import java.util.List;
import java.util.Map;
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.dpo.TrialBalanceDto;
import pwc.taxtech.atms.vat.entity.VatStandardAccount;
import pwc.taxtech.atms.vat.entity.VatStandardAccountExample;
@Mapper
public interface VatStandardAccountMapper extends MyVatMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. StandardAccount
*
* @mbg.generated
*/
long countByExample(VatStandardAccountExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. StandardAccount
*
* @mbg.generated
*/
int deleteByExample(VatStandardAccountExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. StandardAccount
*
* @mbg.generated
*/
int deleteByPrimaryKey(String id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. StandardAccount
*
* @mbg.generated
*/
int insert(VatStandardAccount record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. StandardAccount
*
* @mbg.generated
*/
int insertSelective(VatStandardAccount record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. StandardAccount
*
* @mbg.generated
*/
List<VatStandardAccount> selectByExampleWithRowbounds(VatStandardAccountExample example, RowBounds rowBounds);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. StandardAccount
*
* @mbg.generated
*/
List<VatStandardAccount> selectByExample(VatStandardAccountExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. StandardAccount
*
* @mbg.generated
*/
VatStandardAccount selectByPrimaryKey(String id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. StandardAccount
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") VatStandardAccount record, @Param("example") VatStandardAccountExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. StandardAccount
*
* @mbg.generated
*/
int updateByExample(@Param("record") VatStandardAccount record, @Param("example") VatStandardAccountExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. StandardAccount
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(VatStandardAccount record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. StandardAccount
*
* @mbg.generated
*/
int updateByPrimaryKey(VatStandardAccount record);
List<TrialBalanceDto> selectProjectStandardAccountLeftJoinBalanceStdManual(@Param("fromMonth") String fromMonth, @Param("toMonth") String toMonth);
VatStandardAccount selectOneByAccountCode(@Param("accountCode") String accountCode);
}
\ 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
<?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.VatStandardAccountMapper">
<resultMap id="BaseResultMap" type="pwc.taxtech.atms.vat.entity.VatStandardAccount">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="ID" jdbcType="VARCHAR" property="id" />
<result column="Code" jdbcType="VARCHAR" property="code" />
<result column="Name" jdbcType="VARCHAR" property="name" />
<result column="ParentCode" jdbcType="VARCHAR" property="parentCode" />
<result column="FullName" jdbcType="VARCHAR" property="fullName" />
<result column="AcctProp" jdbcType="INTEGER" property="acctProp" />
<result column="SubProp" jdbcType="INTEGER" property="subProp" />
<result column="AcctLevel" jdbcType="INTEGER" property="acctLevel" />
<result column="Direction" jdbcType="INTEGER" property="direction" />
<result column="IsLeaf" jdbcType="SMALLINT" property="isLeaf" />
<result column="RuleType" jdbcType="INTEGER" property="ruleType" />
<result column="IsActive" jdbcType="SMALLINT" property="isActive" />
<result column="EnglishName" jdbcType="VARCHAR" property="englishName" />
<result column="IndustryID" jdbcType="VARCHAR" property="industryID" />
</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, Code, `Name`, ParentCode, FullName, AcctProp, SubProp, AcctLevel, Direction,
IsLeaf, RuleType, IsActive, EnglishName, IndustryID
</sql>
<select id="selectByExample" parameterType="pwc.taxtech.atms.vat.entity.VatStandardAccountExample" 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 StandardAccount
<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 StandardAccount
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 StandardAccount
where ID = #{ID,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="pwc.taxtech.atms.vat.entity.VatStandardAccountExample">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from StandardAccount
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="pwc.taxtech.atms.vat.entity.VatStandardAccount">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into StandardAccount (ID, Code, `Name`,
ParentCode, FullName, AcctProp,
SubProp, AcctLevel, Direction,
IsLeaf, RuleType, IsActive,
EnglishName, IndustryID)
values (#{ID,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{parentCode,jdbcType=VARCHAR}, #{fullName,jdbcType=VARCHAR}, #{acctProp,jdbcType=INTEGER},
#{subProp,jdbcType=INTEGER}, #{acctLevel,jdbcType=INTEGER}, #{direction,jdbcType=INTEGER},
#{isLeaf,jdbcType=SMALLINT}, #{ruleType,jdbcType=INTEGER}, #{isActive,jdbcType=SMALLINT},
#{englishName,jdbcType=VARCHAR}, #{industryID,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="pwc.taxtech.atms.vat.entity.VatStandardAccount">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into StandardAccount
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="ID != null">
ID,
</if>
<if test="code != null">
Code,
</if>
<if test="name != null">
`Name`,
</if>
<if test="parentCode != null">
ParentCode,
</if>
<if test="fullName != null">
FullName,
</if>
<if test="acctProp != null">
AcctProp,
</if>
<if test="subProp != null">
SubProp,
</if>
<if test="acctLevel != null">
AcctLevel,
</if>
<if test="direction != null">
Direction,
</if>
<if test="isLeaf != null">
IsLeaf,
</if>
<if test="ruleType != null">
RuleType,
</if>
<if test="isActive != null">
IsActive,
</if>
<if test="englishName != null">
EnglishName,
</if>
<if test="industryID != null">
IndustryID,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="ID != null">
#{ID,jdbcType=VARCHAR},
</if>
<if test="code != null">
#{code,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="parentCode != null">
#{parentCode,jdbcType=VARCHAR},
</if>
<if test="fullName != null">
#{fullName,jdbcType=VARCHAR},
</if>
<if test="acctProp != null">
#{acctProp,jdbcType=INTEGER},
</if>
<if test="subProp != null">
#{subProp,jdbcType=INTEGER},
</if>
<if test="acctLevel != null">
#{acctLevel,jdbcType=INTEGER},
</if>
<if test="direction != null">
#{direction,jdbcType=INTEGER},
</if>
<if test="isLeaf != null">
#{isLeaf,jdbcType=SMALLINT},
</if>
<if test="ruleType != null">
#{ruleType,jdbcType=INTEGER},
</if>
<if test="isActive != null">
#{isActive,jdbcType=SMALLINT},
</if>
<if test="englishName != null">
#{englishName,jdbcType=VARCHAR},
</if>
<if test="industryID != null">
#{industryID,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="pwc.taxtech.atms.vat.entity.VatStandardAccountExample" resultType="java.lang.Long">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from StandardAccount
<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 StandardAccount
<set>
<if test="record.ID != null">
ID = #{record.ID,jdbcType=VARCHAR},
</if>
<if test="record.code != null">
Code = #{record.code,jdbcType=VARCHAR},
</if>
<if test="record.name != null">
`Name` = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.parentCode != null">
ParentCode = #{record.parentCode,jdbcType=VARCHAR},
</if>
<if test="record.fullName != null">
FullName = #{record.fullName,jdbcType=VARCHAR},
</if>
<if test="record.acctProp != null">
AcctProp = #{record.acctProp,jdbcType=INTEGER},
</if>
<if test="record.subProp != null">
SubProp = #{record.subProp,jdbcType=INTEGER},
</if>
<if test="record.acctLevel != null">
AcctLevel = #{record.acctLevel,jdbcType=INTEGER},
</if>
<if test="record.direction != null">
Direction = #{record.direction,jdbcType=INTEGER},
</if>
<if test="record.isLeaf != null">
IsLeaf = #{record.isLeaf,jdbcType=SMALLINT},
</if>
<if test="record.ruleType != null">
RuleType = #{record.ruleType,jdbcType=INTEGER},
</if>
<if test="record.isActive != null">
IsActive = #{record.isActive,jdbcType=SMALLINT},
</if>
<if test="record.englishName != null">
EnglishName = #{record.englishName,jdbcType=VARCHAR},
</if>
<if test="record.industryID != null">
IndustryID = #{record.industryID,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 StandardAccount
set ID = #{record.ID,jdbcType=VARCHAR},
Code = #{record.code,jdbcType=VARCHAR},
`Name` = #{record.name,jdbcType=VARCHAR},
ParentCode = #{record.parentCode,jdbcType=VARCHAR},
FullName = #{record.fullName,jdbcType=VARCHAR},
AcctProp = #{record.acctProp,jdbcType=INTEGER},
SubProp = #{record.subProp,jdbcType=INTEGER},
AcctLevel = #{record.acctLevel,jdbcType=INTEGER},
Direction = #{record.direction,jdbcType=INTEGER},
IsLeaf = #{record.isLeaf,jdbcType=SMALLINT},
RuleType = #{record.ruleType,jdbcType=INTEGER},
IsActive = #{record.isActive,jdbcType=SMALLINT},
EnglishName = #{record.englishName,jdbcType=VARCHAR},
IndustryID = #{record.industryID,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="pwc.taxtech.atms.vat.entity.VatStandardAccount">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update StandardAccount
<set>
<if test="code != null">
Code = #{code,jdbcType=VARCHAR},
</if>
<if test="name != null">
`Name` = #{name,jdbcType=VARCHAR},
</if>
<if test="parentCode != null">
ParentCode = #{parentCode,jdbcType=VARCHAR},
</if>
<if test="fullName != null">
FullName = #{fullName,jdbcType=VARCHAR},
</if>
<if test="acctProp != null">
AcctProp = #{acctProp,jdbcType=INTEGER},
</if>
<if test="subProp != null">
SubProp = #{subProp,jdbcType=INTEGER},
</if>
<if test="acctLevel != null">
AcctLevel = #{acctLevel,jdbcType=INTEGER},
</if>
<if test="direction != null">
Direction = #{direction,jdbcType=INTEGER},
</if>
<if test="isLeaf != null">
IsLeaf = #{isLeaf,jdbcType=SMALLINT},
</if>
<if test="ruleType != null">
RuleType = #{ruleType,jdbcType=INTEGER},
</if>
<if test="isActive != null">
IsActive = #{isActive,jdbcType=SMALLINT},
</if>
<if test="englishName != null">
EnglishName = #{englishName,jdbcType=VARCHAR},
</if>
<if test="industryID != null">
IndustryID = #{industryID,jdbcType=VARCHAR},
</if>
</set>
where ID = #{ID,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="pwc.taxtech.atms.vat.entity.VatStandardAccount">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update StandardAccount
set Code = #{code,jdbcType=VARCHAR},
`Name` = #{name,jdbcType=VARCHAR},
ParentCode = #{parentCode,jdbcType=VARCHAR},
FullName = #{fullName,jdbcType=VARCHAR},
AcctProp = #{acctProp,jdbcType=INTEGER},
SubProp = #{subProp,jdbcType=INTEGER},
AcctLevel = #{acctLevel,jdbcType=INTEGER},
Direction = #{direction,jdbcType=INTEGER},
IsLeaf = #{isLeaf,jdbcType=SMALLINT},
RuleType = #{ruleType,jdbcType=INTEGER},
IsActive = #{isActive,jdbcType=SMALLINT},
EnglishName = #{englishName,jdbcType=VARCHAR},
IndustryID = #{industryID,jdbcType=VARCHAR}
where ID = #{ID,jdbcType=VARCHAR}
</update>
<select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.vat.entity.VatStandardAccountExample" 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 StandardAccount
<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
<?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.VatStandardAccountMapper">
<mapper namespace="pwc.taxtech.atms.vat.dao.PeriodStandardAccountMapper">
<resultMap id="TrialBalanceDto" type="pwc.taxtech.atms.dto.vatdto.TrialBalanceDto">
<id column="BalanceId" jdbcType="VARCHAR" property="balanceId"/>
......@@ -52,13 +52,14 @@
A.ACCT_PROP,
A.DIRECTION
FROM
STANDARD_ACCOUNT A
PERIOD_STANDARD_ACCOUNT A
JOIN
BALANCE_STD_MANUAL B
PERIOD_BALANCE_STD_MANUAL B
ON
A.`CODE` = B.ACCT_CODE
WHERE
1=1
AND A.PROJECT_ID= #{projectId,jdbcType=VARCHAR}
<if test="fromMonth!=null">
AND B.PERIOD_ID &gt;= #{fromMonth,jdbcType=VARCHAR}
</if>
......@@ -73,9 +74,11 @@
SELECT
*
FROM
STANDARD_ACCOUNT A
PERIOD_STANDARD_ACCOUNT A
WHERE
A.CODE= #{accountCode,jdbcType=VARCHAR} LIMIT 1
A.CODE= #{accountCode,jdbcType=VARCHAR}
AND A.PROJECT_ID= #{projectId,jdbcType=VARCHAR}
LIMIT 1
</select>
</mapper>
\ No newline at end of file
......@@ -20,6 +20,7 @@
)
AND TRS.NAME = #{taxName,jdbcType=VARCHAR}
AND TRS.PERIOD = #{period,jdbcType=INTEGER}
AND TRS.PROJECT_ID = #{projectId,jdbcType=INTEGER}
</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