Commit 76ffda90 authored by eddie.woo's avatar eddie.woo

Merge branch 'dev_oracle' of http://code.tech.tax.asia.pwcinternal.com/root/atms into dev_oracle

parents b582ad6b b31299b6
......@@ -49,6 +49,11 @@
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>3.1.1.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
......
......@@ -26,6 +26,10 @@ public class MyAsserts {
if (obj == null || obj.isEmpty()) throw exception;
}
public static void assertEmpty(String obj, ApiException exception) {
if (obj != null && !obj.isEmpty()) throw exception;
}
public static void assertNotEmpty(String obj, FormulaException exception) {
if (obj == null || obj.isEmpty()) throw exception;
}
......@@ -33,4 +37,8 @@ public class MyAsserts {
public static void assertNotEmpty(Collection obj, ApiException exception) {
if (obj == null || obj.isEmpty()) throw exception;
}
public static void assertEmpty(Collection obj, ApiException exception) {
if (obj != null && !obj.isEmpty()) throw exception;
}
}
......@@ -58,6 +58,13 @@ public final class Constant {
public static final String OUTPUT_KPZT_NO="0";
public static final String OUTPUT_KPZT_YES="2";
public static final String APPROVAL_COMMITTED="committed";
public static final String APPROVAL_AGREED="agreed";
public static final String APPROVAL_DISAGREED="disagreed";
public static final String ASSIGNEE_MANAGER="manager";
public static final String ASSIGNEE_ACCOUNTANT="accountant";
public static class DataSourceName {
public static final String KeyValueDataSource = "KeyValueDataSource";
public static final String InputInvoiceDataSource = "IncomeDataSource";
......
......@@ -4,22 +4,20 @@ import org.activiti.engine.RepositoryService;
import org.activiti.engine.RuntimeService;
import org.activiti.engine.TaskService;
import org.activiti.engine.repository.ProcessDefinition;
import org.activiti.engine.runtime.ProcessInstance;
import org.activiti.engine.task.Task;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import pwc.taxtech.atms.common.util.MyAsserts;
import pwc.taxtech.atms.dto.approval.ApprovalDto;
import pwc.taxtech.atms.dto.approval.ApprovalTask;
import pwc.taxtech.atms.exception.Exceptions;
import pwc.taxtech.atms.vat.service.impl.ApprovalService;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@RestController
@RequestMapping(value = "/api/v1/approval")
......@@ -30,8 +28,11 @@ public class ApprovalController {
@Autowired
TaskService taskService;
@Autowired
ApprovalService approvalService;
@Autowired
RepositoryService repositoryService;
@ResponseBody
@RequestMapping(value = "/deploy", method = RequestMethod.POST)
public ResponseEntity deploy() {
......@@ -42,47 +43,24 @@ public class ApprovalController {
@ResponseBody
@RequestMapping(value = "/commit", method = RequestMethod.POST)
public ApprovalDto approval(@RequestBody ApprovalDto dto) {
ProcessInstance pi = runtimeService.startProcessInstanceByKey("approvalProcess");
dto.setInstaceId(pi.getId());
mocoInsert(dto);
MyAsserts.assertNotEmpty(dto.getProjectId(), Exceptions.EMPTY_PROJECT_PARAM);
MyAsserts.assertNotEmpty(dto.getPeriodDate(), Exceptions.EMPTY_PRIODDATE_PARAM);
approvalService.startInstanceAndAssignee(dto);
return dto;
}
@ResponseBody
@RequestMapping(value = "/tasks/{assignee}")
public List<ApprovalTask> data(@PathVariable String assignee) {
List<Task> tasks = taskService.createTaskQuery().taskAssignee(assignee).list();
List<ApprovalTask> list = new ArrayList<>();
for (Task task : tasks) {
ApprovalTask t = new ApprovalTask();
list.add(t.copyfrom(task));
}
return list;
public List<ApprovalTask> data(@PathVariable String assignee) {//accountant manager
return approvalService.getTask(assignee);
}
@ResponseBody
@RequestMapping(value = "/check/{taskId}")
public String check(@PathVariable String taskId, @RequestParam(required = false) Integer committed,
@RequestParam(required = false) Integer decide) {
Map<String, Object> map = new HashMap<>();
if (committed != null && (committed == 0 || committed == 1)) {
map.put("committed", committed);
taskService.complete(taskId, map);
if (committed == 1) mocoHasCommittedAndOver();
} else if (decide != null && (decide == 0 || decide == 1)) {
map.put("decide", decide);
taskService.complete(taskId, map);
if (decide == 1) mocoAggreAndOver();
else mocoDisAggreAndOver();
}
return taskId;
public void check(@PathVariable String taskId, @RequestParam String decide) {//only for manager role
approvalService.checkTask(taskId, decide);
}
private void mocoHasCommitted() {
}
@RequestMapping(value = "/show/{procDefId}")//获取流程图
public void showImg(@PathVariable String procDefId, HttpServletResponse response) {
try {
......
package pwc.taxtech.atms.controller;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import pwc.taxtech.atms.common.message.ErrorMessage;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.exception.ServiceException;
import pwc.taxtech.atms.service.impl.ExcelDataServiceImpl;
@RestController
@RequestMapping(value = "api/v1/excelData")
public class ExcelDataController {
private static final Logger logger = LoggerFactory.getLogger(ExcelDataController.class);
@Autowired
private ExcelDataServiceImpl excelDataService;
@ResponseBody
@ApiOperation(value = "导入报表数据")
@RequestMapping(value = "importExcelDataFile", method = RequestMethod.POST)
public OperationResultDto parseExcelData(@RequestParam MultipartFile file,
@RequestParam Long templateID,
@RequestParam String projectID){
try {
excelDataService.parseExcelData(file, templateID, projectID);
return OperationResultDto.success();
} catch (ServiceException e) {
return OperationResultDto.error(e.getMessage());
} catch (Exception e) {
logger.error("importTemplateExcelFile error.", e);
}
return OperationResultDto.error(ErrorMessage.SystemError);
}
}
......@@ -121,13 +121,13 @@ public class TemplateGroupController {
@ApiOperation(value = "导入报表")
@RequestMapping(value = "importTemplateExcelFile", method = RequestMethod.POST)
public OperationResultDto importTemplateExcelFile(@RequestParam MultipartFile file,
@RequestParam Long templateGroupId,
@RequestParam Long templateGroupID,
@RequestParam String sheetList,
@RequestParam String tempFileName,
@RequestParam String reportType,
@RequestParam String filename) {
try {
templateGroupService.importTemplateExcelFile(file, templateGroupId, reportType, sheetList);
templateGroupService.importTemplateExcelFile(file, templateGroupID, reportType, sheetList);
return OperationResultDto.success();
} catch (ServiceException e) {
return OperationResultDto.error(e.getMessage());
......
......@@ -9,7 +9,7 @@ public class ApprovalDto {
private String projectId;
private Long reportId;
private String periodDate;
private String instaceId;
private String instanceId;
private String status;//committed,agreed,disagreed
@Override
......@@ -18,8 +18,16 @@ public class ApprovalDto {
"projectId='" + projectId + '\'' +
", reportId=" + reportId +
", period=" + periodDate +
", instaceId='" + instaceId + '\'' +
", instaceId='" + instanceId + '\'' +
", status='" + status + '\'' +
'}';
}
public Integer getPeriod() {
return Integer.parseInt(periodDate.split("\\.")[1]);
}
public Integer getYear(){
return Integer.parseInt(periodDate.split("\\.")[0]);
}
}
package pwc.taxtech.atms.exception;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
public class AlreadyExistsException extends ApiException {
public AlreadyExistsException() {
super();
}
public AlreadyExistsException(String message) {
super(message);
}
public AlreadyExistsException(String message, Throwable cause) {
super(message, cause);
}
public AlreadyExistsException(Throwable cause) {
super(cause);
}
@Override
public <Object> ResponseEntity handle() {
return ResponseEntity.status(HttpStatus.CONFLICT).build();
}
}
......@@ -3,6 +3,22 @@ package pwc.taxtech.atms.exception;
import org.springframework.http.ResponseEntity;
public class BadParameterException extends ApiException {
public BadParameterException() {
super();
}
public BadParameterException(String message) {
super(message);
}
public BadParameterException(String message, Throwable cause) {
super(message, cause);
}
public BadParameterException(Throwable cause) {
super(cause);
}
@Override
public <Object> ResponseEntity handle() {
return ResponseEntity.badRequest().build();
......
......@@ -7,4 +7,8 @@ public class Exceptions {
public static final FormulaException BB_CELL_DATA_EMPTY = new FormulaException("cell data is empty");
public static final FormulaException PROJECT_EMPTY = new FormulaException("project is empty");
public static final FormulaException BAD_BBVO_PARAMS = new FormulaException("bad params for bb fromular express data");
}
public static final ApiException EMPTY_PROJECT_PARAM = new BadParameterException("project is empty");
public static final ApiException EMPTY_PRIODDATE_PARAM = new BadParameterException("period data is empty");
public static final ApiException NOT_FOUND_REPORT_EXCEPTION = new NotFoundException("not found report");
public static final ApiException REPORT_HAS_COMMIT_EXCEPTION = new AlreadyExistsException("report approval has commit");
}
......@@ -3,6 +3,22 @@ package pwc.taxtech.atms.exception;
import org.springframework.http.ResponseEntity;
public class NotFoundException extends ApiException {
public NotFoundException() {
super();
}
public NotFoundException(String message) {
super(message);
}
public NotFoundException(String message, Throwable cause) {
super(message, cause);
}
public NotFoundException(Throwable cause) {
super(cause);
}
@Override
public <Object> ResponseEntity handle() {
return ResponseEntity.notFound().build();
......
package pwc.taxtech.atms.service.impl;
import com.google.common.collect.Lists;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.usermodel.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import pwc.taxtech.atms.common.message.ErrorMessage;
import pwc.taxtech.atms.exception.ServiceException;
import pwc.taxtech.atms.vat.dao.PeriodCellDataMapper;
import pwc.taxtech.atms.vat.dao.PeriodCellTemplateMapper;
import pwc.taxtech.atms.vat.dao.PeriodReportMapper;
import pwc.taxtech.atms.vat.entity.*;
import java.io.InputStream;
import java.util.Date;
import java.util.List;
@Service
public class ExcelDataServiceImpl extends AbstractService {
@Autowired
private PeriodCellTemplateMapper periodCellTemplateMapper;
@Autowired
private PeriodCellDataMapper periodCellDataMapper;
@Autowired
private PeriodReportMapper periodReportMapper;
public void parseExcelData(MultipartFile file, Long periodTemplateId, String projectId) throws ServiceException{
if (null == file) {
throw new ServiceException(ErrorMessage.NoFile);
}
try{
InputStream inputStream = file.getInputStream();
Workbook workbook = WorkbookFactory.create(inputStream);
Sheet sheet = workbook.getSheetAt(0);
Date now = new Date();
// insert a record into PERIOD_REPORT
PeriodReport pr = new PeriodReport();
pr.setProjectId(projectId);
pr.setCreateBy("Admin");
pr.setCreateTime(now);
pr.setPeriod(0);
pr.setTemplateId(periodTemplateId);
pr.setUpdateBy("Admin");
pr.setUpdateTime(now);
pr.setId(distributedIdService.nextId());
periodReportMapper.insertSelective(pr);
// get cell template according to templateId
PeriodCellTemplateExample pctExample = new PeriodCellTemplateExample();
pctExample.createCriteria().andReportTemplateIdEqualTo(periodTemplateId);
List<PeriodCellTemplate> templates = periodCellTemplateMapper.selectByExample(pctExample);
// save cell data into PERIOD_CELL_DATA
List<PeriodCellData> list = Lists.newArrayList();
for(PeriodCellTemplate template : templates){
Row r = sheet.getRow(template.getRowIndex());
Cell c = r.getCell(template.getColumnIndex());
if(StringUtils.isBlank(c.getStringCellValue())){
continue;
}
PeriodCellData periodCellData = new PeriodCellData();
periodCellData.setData(c.getStringCellValue());
periodCellData.setId(distributedIdService.nextId());
periodCellData.setCellTemplateId(template.getId());
periodCellData.setUpdateTime(now);
periodCellData.setCreateBy("Admin");
periodCellData.setCreateTime(now);
periodCellData.setPeriod(1);
periodCellData.setUpdateBy("Admin");
periodCellData.setFormulaExp(periodCellData.getData());
periodCellData.setProjectId(projectId);
periodCellData.setReportId(pr.getId());
list.add(periodCellData);
}
periodCellDataMapper.batchInsert(list);
// periodCellDataMapper.batchInsert2(list);
} catch (Exception e){
logger.error("importTemplateExcelFile error.", e);
throw new ServiceException(ErrorMessage.SystemError);
}
}
}
package pwc.taxtech.atms.vat.service.impl;
import org.activiti.engine.RuntimeService;
import org.activiti.engine.TaskService;
import org.activiti.engine.runtime.ProcessInstance;
import org.activiti.engine.task.Attachment;
import org.activiti.engine.task.Task;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import pwc.taxtech.atms.common.util.MyAsserts;
import pwc.taxtech.atms.constant.Constant;
import pwc.taxtech.atms.dto.approval.ApprovalDto;
import pwc.taxtech.atms.dto.approval.ApprovalTask;
import pwc.taxtech.atms.exception.BadParameterException;
import pwc.taxtech.atms.exception.Exceptions;
import pwc.taxtech.atms.vat.dao.PeriodApproveMapper;
import pwc.taxtech.atms.vat.dao.PeriodReportMapper;
import pwc.taxtech.atms.vat.entity.PeriodApprove;
import pwc.taxtech.atms.vat.entity.PeriodApproveExample;
import pwc.taxtech.atms.vat.entity.PeriodReport;
import pwc.taxtech.atms.vat.entity.PeriodReportExample;
import java.util.*;
@Service
public class ApprovalService {
private static Logger logger = LoggerFactory.getLogger(ApprovalService.class);
@Autowired
RuntimeService runtimeService;
@Autowired
TaskService taskService;
@Autowired
PeriodApproveMapper periodApproveMapper;
@Autowired
PeriodReportMapper reportMapper;
@Transactional
public void startInstanceAndAssignee(ApprovalDto dto) {
PeriodReportExample pre = new PeriodReportExample();
pre.createCriteria().andProjectIdEqualTo(dto.getProjectId()).andPeriodEqualTo(dto.getPeriod());
List<PeriodReport> currentReports = reportMapper.selectByExample(pre);
MyAsserts.assertNotEmpty(currentReports, Exceptions.NOT_FOUND_REPORT_EXCEPTION);
PeriodApprove pa = new PeriodApprove();
pa.setId(UUID.randomUUID().toString());
pa.setPeriod(dto.getPeriod());
pa.setYear(dto.getYear());
StringBuilder reportIds = new StringBuilder("");
StringBuilder reportTemplateIds = new StringBuilder("");
currentReports.forEach(m -> {
reportIds.append(m.getId()).append(",");
reportTemplateIds.append(m.getTemplateId()).append(",");
});
PeriodApproveExample pae = new PeriodApproveExample();
pae.createCriteria().andProjectIdEqualTo(dto.getProjectId()).andPeriodEqualTo(dto.getPeriod())
.andYearEqualTo(dto.getYear()).andReportIdsEqualTo(reportIds.toString())
.andTemplateIdsEqualTo(reportTemplateIds.toString()).andStatusEqualTo(Constant.APPROVAL_COMMITTED);
List<PeriodApprove> pas = periodApproveMapper.selectByExample(pae);
MyAsserts.assertEmpty(pas, Exceptions.REPORT_HAS_COMMIT_EXCEPTION);
ProcessInstance pi = runtimeService.startProcessInstanceByKey("approvalProcess");
dto.setInstanceId(pi.getId());
pa.setInstanceId(pi.getId());
pa.setReportIds(reportIds.toString());
pa.setTemplateIds(reportTemplateIds.toString());
pa.setStatus(Constant.APPROVAL_COMMITTED);
List<Task> tasks = taskService.createTaskQuery().taskAssignee(Constant.ASSIGNEE_ACCOUNTANT).processInstanceId(
pi.getId()).list();
if (tasks != null && tasks.size() == 1) {
Task task = tasks.get(0);
Map<String, Object> map = new HashMap<>();
map.put("committed", 0);
taskService.complete(task.getId(), map);
taskService.createAttachment("java.lang.String", task.getId(), task.getProcessInstanceId(),
"period_approval_uuid", pa.getId(), "");
periodApproveMapper.insert(pa);
} else {
logger.warn("task must not null or size gt 1");
}
}
public List<ApprovalTask> getTask(String assignee) {
List<Task> tasks = taskService.createTaskQuery().taskAssignee(assignee).list();
List<ApprovalTask> list = new ArrayList<>();
for (Task task : tasks) {
ApprovalTask t = new ApprovalTask();
list.add(t.copyfrom(task));
}
return list;
}
@Transactional
public void checkTask(String taskId, String decide) {
Map<String, Object> map = new HashMap<>();
PeriodApprove pa = new PeriodApprove();
switch (decide) {
case Constant.APPROVAL_AGREED:
pa.setStatus(Constant.APPROVAL_AGREED);
map.put("decide", 1);
break;
case Constant.APPROVAL_DISAGREED:
pa.setStatus(Constant.APPROVAL_DISAGREED);
map.put("decide", 0);
break;
default:
throw new BadParameterException("not support decide param type");
}
List<Attachment> attachments = taskService.getTaskAttachments(taskId);
if (attachments != null && attachments.size() == 1) {
String uuid = attachments.get(0).getDescription();
taskService.complete(taskId, map);
pa.setId(uuid);
periodApproveMapper.updateByPrimaryKeySelective(pa);
PeriodApprove result = periodApproveMapper.selectByPrimaryKey(uuid);
//save report on service
} else {
logger.warn("task must not null or size gt 1");
}
}
}
......@@ -75,9 +75,16 @@ public class OutputInvoiceServiceImpl {
Organization organization = organizationMapper.selectByPrimaryKey(project.getOrganizationId());
OutputInvoiceExample outputInvoiceExample = new OutputInvoiceExample();
outputInvoiceExample.createCriteria().andXFSHEqualTo(organization.getTaxPayerNumber()).andKPZTEqualTo(OUTPUT_KPZT_YES).
andKPRQBetween(DateUtils.getPeriodBegin(project.getYear(), queryDto.getPeriodStart()),
DateUtils.getPeriodEnd(project.getYear(), queryDto.getPeriodEnd()));
if(organization.getTaxPayerNumber() == null){
outputInvoiceExample.createCriteria().andXFSHIsNull().andKPZTEqualTo(OUTPUT_KPZT_YES).
andKPRQBetween(DateUtils.getPeriodBegin(project.getYear(), queryDto.getPeriodStart()),
DateUtils.getPeriodEnd(project.getYear(), queryDto.getPeriodEnd()));
} else {
outputInvoiceExample.createCriteria().andXFSHEqualTo(organization.getTaxPayerNumber()).andKPZTEqualTo(OUTPUT_KPZT_YES).
andKPRQBetween(DateUtils.getPeriodBegin(project.getYear(), queryDto.getPeriodStart()),
DateUtils.getPeriodEnd(project.getYear(), queryDto.getPeriodEnd()));
}
PageHelper.startPage(queryDto.getPageInfo().getPageIndex(), queryDto.getPageInfo().getPageSize());
List<OutputInvoice> invoices = outputInvoiceMapper.selectByExample(outputInvoiceExample);
......
......@@ -289,10 +289,12 @@ public class ReportGeneratorImpl {
}
//如果有正则匹配就进行更新公式解析
// if (isFind) {
periodCellTemplateConfig.setParsedFormula(resultFormula);
periodCellTemplateConfigMapper.updateByPrimaryKeySelective(periodCellTemplateConfig);
// }
if (isFind) {
periodCellTemplateConfig.setParsedFormula(StringUtils.isNotBlank(resultFormula) ? resultFormula : null);
if (periodCellTemplateConfig.getFormula() != null && !periodCellTemplateConfig.getFormula().contains("BB("))
periodCellTemplateConfig.setFormula(StringUtils.isNotBlank(periodCellTemplateConfig.getFormula()) ? resultFormula : null);
periodCellTemplateConfigMapper.updateByPrimaryKeySelective(periodCellTemplateConfig);
}
String regexNormalCell = "[A-Z]{1,2}((?!0)[0-9]{1,3})";
p = Pattern.compile(regexNormalCell);
......@@ -366,7 +368,7 @@ public class ReportGeneratorImpl {
if (data != null && data.equals("#VALUE!")) {
data = "0.0";
}
//evaluator.evaluate(cell)
//evaluator.evaluate(cell);
// if (cell.getCellTypeEnum().equals(CellType.NUMERIC)||cell.getCellTypeEnum().equals(CellType.FORMULA)) {
// data = Double.toString(cell.getNumericCellValue());
// } else {
......@@ -393,6 +395,9 @@ public class ReportGeneratorImpl {
// periodFormulaBlockExample.createCriteria().andPeriodEqualTo(period)
// .andCellTemplateIdEqualTo(tempPeriodCellTemplate.get().getCellTemplateId());
if (StringUtils.isBlank(resultFormula)) {
resultFormula = null;
}
// if (isFind) {
cellData.setFormulaExp(resultFormula);
// } else {
......
......@@ -85,11 +85,11 @@ public class JXFPMX extends FunctionBase implements FreeRefFunction {
// List<InputVATInvoiceResultDto> inputInvoice = SpringContextUtil.inputVatInvoiceMapper.getInputVATInvoiceResultDto(dbName);
List<InputInvoiceResultDto> inputInvoice = SpringContextUtil.inputInvoiceMapper.getInputInvoiceResultDto();
if (!goodsName.equals("99")) {
inputInvoice = inputInvoice.stream()
.filter(a -> a.getInputInvoiceDetail() != null && StringUtils.isNotBlank(goodsName) && goodsName.equals(a.getInputInvoiceDetail().getSPMC()))
.collect(Collectors.toList());
}
// if (!goodsName.equals("99")) {
// inputInvoice = inputInvoice.stream()
// .filter(a -> a.getInputInvoiceDetail() != null && StringUtils.isNotBlank(goodsName) && goodsName.equals(a.getInputInvoiceDetail().getSPMC()))
// .collect(Collectors.toList());
// }
if (taxRateVal.compareTo(new BigDecimal("-1")) == 0) {
inputInvoice = inputInvoice.stream()
......
#log4j.debug = true
log4j.debug = true
log4j.rootLogger=INFO,stdout,fileoutall,fileoutwarn,fileouterror
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
......
rem see http://www.mybatis.org/generator/running/runningFromCmdLine.html
cd /d %~dp0
call java -classpath .;./* org.mybatis.generator.api.ShellRunner -configfile vatGeneratorConfig.xml -overwrite -verbose -tables PERIOD_APPROVE
call java -classpath .;./* org.mybatis.generator.api.ShellRunner -configfile vatGeneratorConfig.xml -overwrite -verbose
echo @@@@@@@@@@@ DONE @@@@@@@@@@@
pause
\ No newline at end of file
package pwc.taxtech.atms.vat.dao;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import pwc.taxtech.atms.MyVatMapper;
import pwc.taxtech.atms.vat.entity.PeriodApprove;
import pwc.taxtech.atms.vat.entity.PeriodApproveExample;
@Mapper
public interface PeriodApproveMapper extends MyVatMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
long countByExample(PeriodApproveExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
int deleteByExample(PeriodApproveExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
int deleteByPrimaryKey(String id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
int insert(PeriodApprove record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
int insertSelective(PeriodApprove record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
List<PeriodApprove> selectByExampleWithRowbounds(PeriodApproveExample example, RowBounds rowBounds);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
List<PeriodApprove> selectByExample(PeriodApproveExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
PeriodApprove selectByPrimaryKey(String id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") PeriodApprove record, @Param("example") PeriodApproveExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
int updateByExample(@Param("record") PeriodApprove record, @Param("example") PeriodApproveExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(PeriodApprove record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
int updateByPrimaryKey(PeriodApprove record);
}
\ No newline at end of file
......@@ -110,6 +110,10 @@ public interface PeriodCellDataMapper extends MyVatMapper {
*/
int updateByPrimaryKey(PeriodCellData record);
int batchInsert2(List<PeriodCellData> list);
int batchInsert(List<PeriodCellData> list);
@Select("<script>" +
"SELECT " +
" R.PERIOD, C.CELL_TEMPLATE_ID AS CELLTEMPLATEID, DATA " +
......
......@@ -7,18 +7,18 @@ import java.util.Date;
public class CellInvoiceDto {
String id;
Integer period;
Date invoiceDate;
String invoiceDate;
String invoiceNumber;
String invoiceCode;
BigDecimal amount;
BigDecimal taxAmount;
BigDecimal rate;
String amount;
String taxAmount;
String rate;
String productionName;
String dataSourceId;
//数据源名称
String dataSourceName;
Integer operationType;
Integer invoiceType;
String operationType;
String invoiceType;
public String getId() {
return id;
......@@ -36,11 +36,11 @@ public class CellInvoiceDto {
this.period = period;
}
public Date getInvoiceDate() {
public String getInvoiceDate() {
return invoiceDate;
}
public void setInvoiceDate(Date invoiceDate) {
public void setInvoiceDate(String invoiceDate) {
this.invoiceDate = invoiceDate;
}
......@@ -60,27 +60,27 @@ public class CellInvoiceDto {
this.invoiceCode = invoiceCode;
}
public BigDecimal getAmount() {
public String getAmount() {
return amount;
}
public void setAmount(BigDecimal amount) {
public void setAmount(String amount) {
this.amount = amount;
}
public BigDecimal getTaxAmount() {
public String getTaxAmount() {
return taxAmount;
}
public void setTaxAmount(BigDecimal taxAmount) {
public void setTaxAmount(String taxAmount) {
this.taxAmount = taxAmount;
}
public BigDecimal getRate() {
public String getRate() {
return rate;
}
public void setRate(BigDecimal rate) {
public void setRate(String rate) {
this.rate = rate;
}
......@@ -108,19 +108,19 @@ public class CellInvoiceDto {
this.dataSourceName = dataSourceName;
}
public Integer getOperationType() {
public String getOperationType() {
return operationType;
}
public void setOperationType(Integer operationType) {
public void setOperationType(String operationType) {
this.operationType = operationType;
}
public Integer getInvoiceType() {
public String getInvoiceType() {
return invoiceType;
}
public void setInvoiceType(Integer invoiceType) {
public void setInvoiceType(String invoiceType) {
this.invoiceType = invoiceType;
}
}
......@@ -8,14 +8,15 @@ public class OutputInvoiceDataSourceDto {
private Integer type;
private String id;
private Integer period;
private Date invoiceDate;
private String invoiceDate;
private String buyerName;
private String invoiceCode;
private String invoiceNumber;
private BigDecimal taxRate;
private BigDecimal taxAmount;
private Integer invoiceType;
private String taxRate;
private String taxAmount;
private String invoiceType;
private String dataSourceId;
private String amount;
//数据源名称
private String dataSourceName;
......@@ -35,11 +36,11 @@ public class OutputInvoiceDataSourceDto {
this.period = period;
}
public Date getInvoiceDate() {
public String getInvoiceDate() {
return invoiceDate;
}
public void setInvoiceDate(Date invoiceDate) {
public void setInvoiceDate(String invoiceDate) {
this.invoiceDate = invoiceDate;
}
......@@ -67,27 +68,24 @@ public class OutputInvoiceDataSourceDto {
this.invoiceNumber = invoiceNumber;
}
public BigDecimal getTaxRate() {
public String getTaxRate() {
return taxRate;
}
public void setTaxRate(BigDecimal taxRate) {
public void setTaxRate(String taxRate) {
this.taxRate = taxRate;
}
public BigDecimal getTaxAmount() {
public String getTaxAmount() {
return taxAmount;
}
public void setTaxAmount(BigDecimal taxAmount) {
this.taxAmount = taxAmount;
}
public Integer getInvoiceType() {
public String getInvoiceType() {
return invoiceType;
}
public void setInvoiceType(Integer invoiceType) {
public void setInvoiceType(String invoiceType) {
this.invoiceType = invoiceType;
}
......@@ -114,4 +112,16 @@ public class OutputInvoiceDataSourceDto {
public void setType(Integer type) {
this.type = type;
}
public String getAmount() {
return amount;
}
public void setAmount(String amount) {
this.amount = amount;
}
public void setTaxAmount(String taxAmount) {
this.taxAmount = taxAmount;
}
}
package pwc.taxtech.atms.vat.entity;
import java.io.Serializable;
/**
*
* This class was generated by MyBatis Generator.
* This class corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated do_not_delete_during_merge
*/
public class PeriodApprove implements Serializable {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_ADMIN.PERIOD_APPROVE.ID
*
* @mbg.generated
*/
private String id;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_ADMIN.PERIOD_APPROVE.PROJECT_ID
*
* @mbg.generated
*/
private String projectId;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_ADMIN.PERIOD_APPROVE.PERIOD
*
* @mbg.generated
*/
private Integer period;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_ADMIN.PERIOD_APPROVE.REPORT_IDS
*
* @mbg.generated
*/
private String reportIds;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_ADMIN.PERIOD_APPROVE.REPORT_PATHS
*
* @mbg.generated
*/
private String reportPaths;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_ADMIN.PERIOD_APPROVE.STATUS
*
* @mbg.generated
*/
private String status;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_ADMIN.PERIOD_APPROVE.INSTANCE_ID
*
* @mbg.generated
*/
private String instanceId;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_ADMIN.PERIOD_APPROVE.YEAR
*
* @mbg.generated
*/
private Integer year;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column TAX_ADMIN.PERIOD_APPROVE.TEMPLATE_IDS
*
* @mbg.generated
*/
private String templateIds;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
private static final long serialVersionUID = 1L;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TAX_ADMIN.PERIOD_APPROVE.ID
*
* @return the value of TAX_ADMIN.PERIOD_APPROVE.ID
*
* @mbg.generated
*/
public String getId() {
return id;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_ADMIN.PERIOD_APPROVE.ID
*
* @param id the value for TAX_ADMIN.PERIOD_APPROVE.ID
*
* @mbg.generated
*/
public void setId(String id) {
this.id = id == null ? null : id.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TAX_ADMIN.PERIOD_APPROVE.PROJECT_ID
*
* @return the value of TAX_ADMIN.PERIOD_APPROVE.PROJECT_ID
*
* @mbg.generated
*/
public String getProjectId() {
return projectId;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_ADMIN.PERIOD_APPROVE.PROJECT_ID
*
* @param projectId the value for TAX_ADMIN.PERIOD_APPROVE.PROJECT_ID
*
* @mbg.generated
*/
public void setProjectId(String projectId) {
this.projectId = projectId == null ? null : projectId.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TAX_ADMIN.PERIOD_APPROVE.PERIOD
*
* @return the value of TAX_ADMIN.PERIOD_APPROVE.PERIOD
*
* @mbg.generated
*/
public Integer getPeriod() {
return period;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_ADMIN.PERIOD_APPROVE.PERIOD
*
* @param period the value for TAX_ADMIN.PERIOD_APPROVE.PERIOD
*
* @mbg.generated
*/
public void setPeriod(Integer period) {
this.period = period;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TAX_ADMIN.PERIOD_APPROVE.REPORT_IDS
*
* @return the value of TAX_ADMIN.PERIOD_APPROVE.REPORT_IDS
*
* @mbg.generated
*/
public String getReportIds() {
return reportIds;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_ADMIN.PERIOD_APPROVE.REPORT_IDS
*
* @param reportIds the value for TAX_ADMIN.PERIOD_APPROVE.REPORT_IDS
*
* @mbg.generated
*/
public void setReportIds(String reportIds) {
this.reportIds = reportIds == null ? null : reportIds.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TAX_ADMIN.PERIOD_APPROVE.REPORT_PATHS
*
* @return the value of TAX_ADMIN.PERIOD_APPROVE.REPORT_PATHS
*
* @mbg.generated
*/
public String getReportPaths() {
return reportPaths;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_ADMIN.PERIOD_APPROVE.REPORT_PATHS
*
* @param reportPaths the value for TAX_ADMIN.PERIOD_APPROVE.REPORT_PATHS
*
* @mbg.generated
*/
public void setReportPaths(String reportPaths) {
this.reportPaths = reportPaths == null ? null : reportPaths.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TAX_ADMIN.PERIOD_APPROVE.STATUS
*
* @return the value of TAX_ADMIN.PERIOD_APPROVE.STATUS
*
* @mbg.generated
*/
public String getStatus() {
return status;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_ADMIN.PERIOD_APPROVE.STATUS
*
* @param status the value for TAX_ADMIN.PERIOD_APPROVE.STATUS
*
* @mbg.generated
*/
public void setStatus(String status) {
this.status = status == null ? null : status.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TAX_ADMIN.PERIOD_APPROVE.INSTANCE_ID
*
* @return the value of TAX_ADMIN.PERIOD_APPROVE.INSTANCE_ID
*
* @mbg.generated
*/
public String getInstanceId() {
return instanceId;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_ADMIN.PERIOD_APPROVE.INSTANCE_ID
*
* @param instanceId the value for TAX_ADMIN.PERIOD_APPROVE.INSTANCE_ID
*
* @mbg.generated
*/
public void setInstanceId(String instanceId) {
this.instanceId = instanceId == null ? null : instanceId.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TAX_ADMIN.PERIOD_APPROVE.YEAR
*
* @return the value of TAX_ADMIN.PERIOD_APPROVE.YEAR
*
* @mbg.generated
*/
public Integer getYear() {
return year;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_ADMIN.PERIOD_APPROVE.YEAR
*
* @param year the value for TAX_ADMIN.PERIOD_APPROVE.YEAR
*
* @mbg.generated
*/
public void setYear(Integer year) {
this.year = year;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column TAX_ADMIN.PERIOD_APPROVE.TEMPLATE_IDS
*
* @return the value of TAX_ADMIN.PERIOD_APPROVE.TEMPLATE_IDS
*
* @mbg.generated
*/
public String getTemplateIds() {
return templateIds;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column TAX_ADMIN.PERIOD_APPROVE.TEMPLATE_IDS
*
* @param templateIds the value for TAX_ADMIN.PERIOD_APPROVE.TEMPLATE_IDS
*
* @mbg.generated
*/
public void setTemplateIds(String templateIds) {
this.templateIds = templateIds == null ? null : templateIds.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", projectId=").append(projectId);
sb.append(", period=").append(period);
sb.append(", reportIds=").append(reportIds);
sb.append(", reportPaths=").append(reportPaths);
sb.append(", status=").append(status);
sb.append(", instanceId=").append(instanceId);
sb.append(", year=").append(year);
sb.append(", templateIds=").append(templateIds);
sb.append("]");
return sb.toString();
}
}
\ No newline at end of file
package pwc.taxtech.atms.vat.entity;
import java.util.ArrayList;
import java.util.List;
public class PeriodApproveExample {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
protected String orderByClause;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
protected boolean distinct;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
protected List<Criteria> oredCriteria;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
public PeriodApproveExample() {
oredCriteria = new ArrayList<Criteria>();
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
public String getOrderByClause() {
return orderByClause;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
public boolean isDistinct() {
return distinct;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("ID is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("ID is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(String value) {
addCriterion("ID =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(String value) {
addCriterion("ID <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(String value) {
addCriterion("ID >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(String value) {
addCriterion("ID >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(String value) {
addCriterion("ID <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(String value) {
addCriterion("ID <=", value, "id");
return (Criteria) this;
}
public Criteria andIdLike(String value) {
addCriterion("ID like", value, "id");
return (Criteria) this;
}
public Criteria andIdNotLike(String value) {
addCriterion("ID not like", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<String> values) {
addCriterion("ID in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<String> values) {
addCriterion("ID not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(String value1, String value2) {
addCriterion("ID between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(String value1, String value2) {
addCriterion("ID not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andProjectIdIsNull() {
addCriterion("PROJECT_ID is null");
return (Criteria) this;
}
public Criteria andProjectIdIsNotNull() {
addCriterion("PROJECT_ID is not null");
return (Criteria) this;
}
public Criteria andProjectIdEqualTo(String value) {
addCriterion("PROJECT_ID =", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdNotEqualTo(String value) {
addCriterion("PROJECT_ID <>", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdGreaterThan(String value) {
addCriterion("PROJECT_ID >", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdGreaterThanOrEqualTo(String value) {
addCriterion("PROJECT_ID >=", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdLessThan(String value) {
addCriterion("PROJECT_ID <", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdLessThanOrEqualTo(String value) {
addCriterion("PROJECT_ID <=", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdLike(String value) {
addCriterion("PROJECT_ID like", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdNotLike(String value) {
addCriterion("PROJECT_ID not like", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdIn(List<String> values) {
addCriterion("PROJECT_ID in", values, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdNotIn(List<String> values) {
addCriterion("PROJECT_ID not in", values, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdBetween(String value1, String value2) {
addCriterion("PROJECT_ID between", value1, value2, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdNotBetween(String value1, String value2) {
addCriterion("PROJECT_ID not between", value1, value2, "projectId");
return (Criteria) this;
}
public Criteria andPeriodIsNull() {
addCriterion("PERIOD is null");
return (Criteria) this;
}
public Criteria andPeriodIsNotNull() {
addCriterion("PERIOD is not null");
return (Criteria) this;
}
public Criteria andPeriodEqualTo(Integer value) {
addCriterion("PERIOD =", value, "period");
return (Criteria) this;
}
public Criteria andPeriodNotEqualTo(Integer value) {
addCriterion("PERIOD <>", value, "period");
return (Criteria) this;
}
public Criteria andPeriodGreaterThan(Integer value) {
addCriterion("PERIOD >", value, "period");
return (Criteria) this;
}
public Criteria andPeriodGreaterThanOrEqualTo(Integer value) {
addCriterion("PERIOD >=", value, "period");
return (Criteria) this;
}
public Criteria andPeriodLessThan(Integer value) {
addCriterion("PERIOD <", value, "period");
return (Criteria) this;
}
public Criteria andPeriodLessThanOrEqualTo(Integer value) {
addCriterion("PERIOD <=", value, "period");
return (Criteria) this;
}
public Criteria andPeriodIn(List<Integer> values) {
addCriterion("PERIOD in", values, "period");
return (Criteria) this;
}
public Criteria andPeriodNotIn(List<Integer> values) {
addCriterion("PERIOD not in", values, "period");
return (Criteria) this;
}
public Criteria andPeriodBetween(Integer value1, Integer value2) {
addCriterion("PERIOD between", value1, value2, "period");
return (Criteria) this;
}
public Criteria andPeriodNotBetween(Integer value1, Integer value2) {
addCriterion("PERIOD not between", value1, value2, "period");
return (Criteria) this;
}
public Criteria andReportIdsIsNull() {
addCriterion("REPORT_IDS is null");
return (Criteria) this;
}
public Criteria andReportIdsIsNotNull() {
addCriterion("REPORT_IDS is not null");
return (Criteria) this;
}
public Criteria andReportIdsEqualTo(String value) {
addCriterion("REPORT_IDS =", value, "reportIds");
return (Criteria) this;
}
public Criteria andReportIdsNotEqualTo(String value) {
addCriterion("REPORT_IDS <>", value, "reportIds");
return (Criteria) this;
}
public Criteria andReportIdsGreaterThan(String value) {
addCriterion("REPORT_IDS >", value, "reportIds");
return (Criteria) this;
}
public Criteria andReportIdsGreaterThanOrEqualTo(String value) {
addCriterion("REPORT_IDS >=", value, "reportIds");
return (Criteria) this;
}
public Criteria andReportIdsLessThan(String value) {
addCriterion("REPORT_IDS <", value, "reportIds");
return (Criteria) this;
}
public Criteria andReportIdsLessThanOrEqualTo(String value) {
addCriterion("REPORT_IDS <=", value, "reportIds");
return (Criteria) this;
}
public Criteria andReportIdsLike(String value) {
addCriterion("REPORT_IDS like", value, "reportIds");
return (Criteria) this;
}
public Criteria andReportIdsNotLike(String value) {
addCriterion("REPORT_IDS not like", value, "reportIds");
return (Criteria) this;
}
public Criteria andReportIdsIn(List<String> values) {
addCriterion("REPORT_IDS in", values, "reportIds");
return (Criteria) this;
}
public Criteria andReportIdsNotIn(List<String> values) {
addCriterion("REPORT_IDS not in", values, "reportIds");
return (Criteria) this;
}
public Criteria andReportIdsBetween(String value1, String value2) {
addCriterion("REPORT_IDS between", value1, value2, "reportIds");
return (Criteria) this;
}
public Criteria andReportIdsNotBetween(String value1, String value2) {
addCriterion("REPORT_IDS not between", value1, value2, "reportIds");
return (Criteria) this;
}
public Criteria andReportPathsIsNull() {
addCriterion("REPORT_PATHS is null");
return (Criteria) this;
}
public Criteria andReportPathsIsNotNull() {
addCriterion("REPORT_PATHS is not null");
return (Criteria) this;
}
public Criteria andReportPathsEqualTo(String value) {
addCriterion("REPORT_PATHS =", value, "reportPaths");
return (Criteria) this;
}
public Criteria andReportPathsNotEqualTo(String value) {
addCriterion("REPORT_PATHS <>", value, "reportPaths");
return (Criteria) this;
}
public Criteria andReportPathsGreaterThan(String value) {
addCriterion("REPORT_PATHS >", value, "reportPaths");
return (Criteria) this;
}
public Criteria andReportPathsGreaterThanOrEqualTo(String value) {
addCriterion("REPORT_PATHS >=", value, "reportPaths");
return (Criteria) this;
}
public Criteria andReportPathsLessThan(String value) {
addCriterion("REPORT_PATHS <", value, "reportPaths");
return (Criteria) this;
}
public Criteria andReportPathsLessThanOrEqualTo(String value) {
addCriterion("REPORT_PATHS <=", value, "reportPaths");
return (Criteria) this;
}
public Criteria andReportPathsLike(String value) {
addCriterion("REPORT_PATHS like", value, "reportPaths");
return (Criteria) this;
}
public Criteria andReportPathsNotLike(String value) {
addCriterion("REPORT_PATHS not like", value, "reportPaths");
return (Criteria) this;
}
public Criteria andReportPathsIn(List<String> values) {
addCriterion("REPORT_PATHS in", values, "reportPaths");
return (Criteria) this;
}
public Criteria andReportPathsNotIn(List<String> values) {
addCriterion("REPORT_PATHS not in", values, "reportPaths");
return (Criteria) this;
}
public Criteria andReportPathsBetween(String value1, String value2) {
addCriterion("REPORT_PATHS between", value1, value2, "reportPaths");
return (Criteria) this;
}
public Criteria andReportPathsNotBetween(String value1, String value2) {
addCriterion("REPORT_PATHS not between", value1, value2, "reportPaths");
return (Criteria) this;
}
public Criteria andStatusIsNull() {
addCriterion("\"STATUS\" is null");
return (Criteria) this;
}
public Criteria andStatusIsNotNull() {
addCriterion("\"STATUS\" is not null");
return (Criteria) this;
}
public Criteria andStatusEqualTo(String value) {
addCriterion("\"STATUS\" =", value, "status");
return (Criteria) this;
}
public Criteria andStatusNotEqualTo(String value) {
addCriterion("\"STATUS\" <>", value, "status");
return (Criteria) this;
}
public Criteria andStatusGreaterThan(String value) {
addCriterion("\"STATUS\" >", value, "status");
return (Criteria) this;
}
public Criteria andStatusGreaterThanOrEqualTo(String value) {
addCriterion("\"STATUS\" >=", value, "status");
return (Criteria) this;
}
public Criteria andStatusLessThan(String value) {
addCriterion("\"STATUS\" <", value, "status");
return (Criteria) this;
}
public Criteria andStatusLessThanOrEqualTo(String value) {
addCriterion("\"STATUS\" <=", value, "status");
return (Criteria) this;
}
public Criteria andStatusLike(String value) {
addCriterion("\"STATUS\" like", value, "status");
return (Criteria) this;
}
public Criteria andStatusNotLike(String value) {
addCriterion("\"STATUS\" not like", value, "status");
return (Criteria) this;
}
public Criteria andStatusIn(List<String> values) {
addCriterion("\"STATUS\" in", values, "status");
return (Criteria) this;
}
public Criteria andStatusNotIn(List<String> values) {
addCriterion("\"STATUS\" not in", values, "status");
return (Criteria) this;
}
public Criteria andStatusBetween(String value1, String value2) {
addCriterion("\"STATUS\" between", value1, value2, "status");
return (Criteria) this;
}
public Criteria andStatusNotBetween(String value1, String value2) {
addCriterion("\"STATUS\" not between", value1, value2, "status");
return (Criteria) this;
}
public Criteria andInstanceIdIsNull() {
addCriterion("INSTANCE_ID is null");
return (Criteria) this;
}
public Criteria andInstanceIdIsNotNull() {
addCriterion("INSTANCE_ID is not null");
return (Criteria) this;
}
public Criteria andInstanceIdEqualTo(String value) {
addCriterion("INSTANCE_ID =", value, "instanceId");
return (Criteria) this;
}
public Criteria andInstanceIdNotEqualTo(String value) {
addCriterion("INSTANCE_ID <>", value, "instanceId");
return (Criteria) this;
}
public Criteria andInstanceIdGreaterThan(String value) {
addCriterion("INSTANCE_ID >", value, "instanceId");
return (Criteria) this;
}
public Criteria andInstanceIdGreaterThanOrEqualTo(String value) {
addCriterion("INSTANCE_ID >=", value, "instanceId");
return (Criteria) this;
}
public Criteria andInstanceIdLessThan(String value) {
addCriterion("INSTANCE_ID <", value, "instanceId");
return (Criteria) this;
}
public Criteria andInstanceIdLessThanOrEqualTo(String value) {
addCriterion("INSTANCE_ID <=", value, "instanceId");
return (Criteria) this;
}
public Criteria andInstanceIdLike(String value) {
addCriterion("INSTANCE_ID like", value, "instanceId");
return (Criteria) this;
}
public Criteria andInstanceIdNotLike(String value) {
addCriterion("INSTANCE_ID not like", value, "instanceId");
return (Criteria) this;
}
public Criteria andInstanceIdIn(List<String> values) {
addCriterion("INSTANCE_ID in", values, "instanceId");
return (Criteria) this;
}
public Criteria andInstanceIdNotIn(List<String> values) {
addCriterion("INSTANCE_ID not in", values, "instanceId");
return (Criteria) this;
}
public Criteria andInstanceIdBetween(String value1, String value2) {
addCriterion("INSTANCE_ID between", value1, value2, "instanceId");
return (Criteria) this;
}
public Criteria andInstanceIdNotBetween(String value1, String value2) {
addCriterion("INSTANCE_ID not between", value1, value2, "instanceId");
return (Criteria) this;
}
public Criteria andYearIsNull() {
addCriterion("\"YEAR\" is null");
return (Criteria) this;
}
public Criteria andYearIsNotNull() {
addCriterion("\"YEAR\" is not null");
return (Criteria) this;
}
public Criteria andYearEqualTo(Integer value) {
addCriterion("\"YEAR\" =", value, "year");
return (Criteria) this;
}
public Criteria andYearNotEqualTo(Integer value) {
addCriterion("\"YEAR\" <>", value, "year");
return (Criteria) this;
}
public Criteria andYearGreaterThan(Integer value) {
addCriterion("\"YEAR\" >", value, "year");
return (Criteria) this;
}
public Criteria andYearGreaterThanOrEqualTo(Integer value) {
addCriterion("\"YEAR\" >=", value, "year");
return (Criteria) this;
}
public Criteria andYearLessThan(Integer value) {
addCriterion("\"YEAR\" <", value, "year");
return (Criteria) this;
}
public Criteria andYearLessThanOrEqualTo(Integer value) {
addCriterion("\"YEAR\" <=", value, "year");
return (Criteria) this;
}
public Criteria andYearIn(List<Integer> values) {
addCriterion("\"YEAR\" in", values, "year");
return (Criteria) this;
}
public Criteria andYearNotIn(List<Integer> values) {
addCriterion("\"YEAR\" not in", values, "year");
return (Criteria) this;
}
public Criteria andYearBetween(Integer value1, Integer value2) {
addCriterion("\"YEAR\" between", value1, value2, "year");
return (Criteria) this;
}
public Criteria andYearNotBetween(Integer value1, Integer value2) {
addCriterion("\"YEAR\" not between", value1, value2, "year");
return (Criteria) this;
}
public Criteria andTemplateIdsIsNull() {
addCriterion("TEMPLATE_IDS is null");
return (Criteria) this;
}
public Criteria andTemplateIdsIsNotNull() {
addCriterion("TEMPLATE_IDS is not null");
return (Criteria) this;
}
public Criteria andTemplateIdsEqualTo(String value) {
addCriterion("TEMPLATE_IDS =", value, "templateIds");
return (Criteria) this;
}
public Criteria andTemplateIdsNotEqualTo(String value) {
addCriterion("TEMPLATE_IDS <>", value, "templateIds");
return (Criteria) this;
}
public Criteria andTemplateIdsGreaterThan(String value) {
addCriterion("TEMPLATE_IDS >", value, "templateIds");
return (Criteria) this;
}
public Criteria andTemplateIdsGreaterThanOrEqualTo(String value) {
addCriterion("TEMPLATE_IDS >=", value, "templateIds");
return (Criteria) this;
}
public Criteria andTemplateIdsLessThan(String value) {
addCriterion("TEMPLATE_IDS <", value, "templateIds");
return (Criteria) this;
}
public Criteria andTemplateIdsLessThanOrEqualTo(String value) {
addCriterion("TEMPLATE_IDS <=", value, "templateIds");
return (Criteria) this;
}
public Criteria andTemplateIdsLike(String value) {
addCriterion("TEMPLATE_IDS like", value, "templateIds");
return (Criteria) this;
}
public Criteria andTemplateIdsNotLike(String value) {
addCriterion("TEMPLATE_IDS not like", value, "templateIds");
return (Criteria) this;
}
public Criteria andTemplateIdsIn(List<String> values) {
addCriterion("TEMPLATE_IDS in", values, "templateIds");
return (Criteria) this;
}
public Criteria andTemplateIdsNotIn(List<String> values) {
addCriterion("TEMPLATE_IDS not in", values, "templateIds");
return (Criteria) this;
}
public Criteria andTemplateIdsBetween(String value1, String value2) {
addCriterion("TEMPLATE_IDS between", value1, value2, "templateIds");
return (Criteria) this;
}
public Criteria andTemplateIdsNotBetween(String value1, String value2) {
addCriterion("TEMPLATE_IDS not between", value1, value2, "templateIds");
return (Criteria) this;
}
}
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated do_not_delete_during_merge
*/
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table TAX_ADMIN.PERIOD_APPROVE
*
* @mbg.generated
*/
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="pwc.taxtech.atms.vat.dao.PeriodApproveMapper">
<resultMap id="BaseResultMap" type="pwc.taxtech.atms.vat.entity.PeriodApprove">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="ID" jdbcType="VARCHAR" property="id" />
<result column="PROJECT_ID" jdbcType="VARCHAR" property="projectId" />
<result column="PERIOD" jdbcType="DECIMAL" property="period" />
<result column="REPORT_IDS" jdbcType="VARCHAR" property="reportIds" />
<result column="REPORT_PATHS" jdbcType="VARCHAR" property="reportPaths" />
<result column="STATUS" jdbcType="VARCHAR" property="status" />
<result column="INSTANCE_ID" jdbcType="VARCHAR" property="instanceId" />
<result column="YEAR" jdbcType="DECIMAL" property="year" />
<result column="TEMPLATE_IDS" jdbcType="VARCHAR" property="templateIds" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
ID, PROJECT_ID, PERIOD, REPORT_IDS, REPORT_PATHS, "STATUS", INSTANCE_ID, "YEAR",
TEMPLATE_IDS
</sql>
<select id="selectByExample" parameterType="pwc.taxtech.atms.vat.entity.PeriodApproveExample" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from PERIOD_APPROVE
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from PERIOD_APPROVE
where ID = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from PERIOD_APPROVE
where ID = #{id,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="pwc.taxtech.atms.vat.entity.PeriodApproveExample">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from PERIOD_APPROVE
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="pwc.taxtech.atms.vat.entity.PeriodApprove">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into PERIOD_APPROVE (ID, PROJECT_ID, PERIOD,
REPORT_IDS, REPORT_PATHS, "STATUS",
INSTANCE_ID, "YEAR", TEMPLATE_IDS
)
values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{period,jdbcType=DECIMAL},
#{reportIds,jdbcType=VARCHAR}, #{reportPaths,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR},
#{instanceId,jdbcType=VARCHAR}, #{year,jdbcType=DECIMAL}, #{templateIds,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="pwc.taxtech.atms.vat.entity.PeriodApprove">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into PERIOD_APPROVE
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
ID,
</if>
<if test="projectId != null">
PROJECT_ID,
</if>
<if test="period != null">
PERIOD,
</if>
<if test="reportIds != null">
REPORT_IDS,
</if>
<if test="reportPaths != null">
REPORT_PATHS,
</if>
<if test="status != null">
"STATUS",
</if>
<if test="instanceId != null">
INSTANCE_ID,
</if>
<if test="year != null">
"YEAR",
</if>
<if test="templateIds != null">
TEMPLATE_IDS,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="projectId != null">
#{projectId,jdbcType=VARCHAR},
</if>
<if test="period != null">
#{period,jdbcType=DECIMAL},
</if>
<if test="reportIds != null">
#{reportIds,jdbcType=VARCHAR},
</if>
<if test="reportPaths != null">
#{reportPaths,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=VARCHAR},
</if>
<if test="instanceId != null">
#{instanceId,jdbcType=VARCHAR},
</if>
<if test="year != null">
#{year,jdbcType=DECIMAL},
</if>
<if test="templateIds != null">
#{templateIds,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="pwc.taxtech.atms.vat.entity.PeriodApproveExample" resultType="java.lang.Long">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from PERIOD_APPROVE
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update PERIOD_APPROVE
<set>
<if test="record.id != null">
ID = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.projectId != null">
PROJECT_ID = #{record.projectId,jdbcType=VARCHAR},
</if>
<if test="record.period != null">
PERIOD = #{record.period,jdbcType=DECIMAL},
</if>
<if test="record.reportIds != null">
REPORT_IDS = #{record.reportIds,jdbcType=VARCHAR},
</if>
<if test="record.reportPaths != null">
REPORT_PATHS = #{record.reportPaths,jdbcType=VARCHAR},
</if>
<if test="record.status != null">
"STATUS" = #{record.status,jdbcType=VARCHAR},
</if>
<if test="record.instanceId != null">
INSTANCE_ID = #{record.instanceId,jdbcType=VARCHAR},
</if>
<if test="record.year != null">
"YEAR" = #{record.year,jdbcType=DECIMAL},
</if>
<if test="record.templateIds != null">
TEMPLATE_IDS = #{record.templateIds,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update PERIOD_APPROVE
set ID = #{record.id,jdbcType=VARCHAR},
PROJECT_ID = #{record.projectId,jdbcType=VARCHAR},
PERIOD = #{record.period,jdbcType=DECIMAL},
REPORT_IDS = #{record.reportIds,jdbcType=VARCHAR},
REPORT_PATHS = #{record.reportPaths,jdbcType=VARCHAR},
"STATUS" = #{record.status,jdbcType=VARCHAR},
INSTANCE_ID = #{record.instanceId,jdbcType=VARCHAR},
"YEAR" = #{record.year,jdbcType=DECIMAL},
TEMPLATE_IDS = #{record.templateIds,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="pwc.taxtech.atms.vat.entity.PeriodApprove">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update PERIOD_APPROVE
<set>
<if test="projectId != null">
PROJECT_ID = #{projectId,jdbcType=VARCHAR},
</if>
<if test="period != null">
PERIOD = #{period,jdbcType=DECIMAL},
</if>
<if test="reportIds != null">
REPORT_IDS = #{reportIds,jdbcType=VARCHAR},
</if>
<if test="reportPaths != null">
REPORT_PATHS = #{reportPaths,jdbcType=VARCHAR},
</if>
<if test="status != null">
"STATUS" = #{status,jdbcType=VARCHAR},
</if>
<if test="instanceId != null">
INSTANCE_ID = #{instanceId,jdbcType=VARCHAR},
</if>
<if test="year != null">
"YEAR" = #{year,jdbcType=DECIMAL},
</if>
<if test="templateIds != null">
TEMPLATE_IDS = #{templateIds,jdbcType=VARCHAR},
</if>
</set>
where ID = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="pwc.taxtech.atms.vat.entity.PeriodApprove">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update PERIOD_APPROVE
set PROJECT_ID = #{projectId,jdbcType=VARCHAR},
PERIOD = #{period,jdbcType=DECIMAL},
REPORT_IDS = #{reportIds,jdbcType=VARCHAR},
REPORT_PATHS = #{reportPaths,jdbcType=VARCHAR},
"STATUS" = #{status,jdbcType=VARCHAR},
INSTANCE_ID = #{instanceId,jdbcType=VARCHAR},
"YEAR" = #{year,jdbcType=DECIMAL},
TEMPLATE_IDS = #{templateIds,jdbcType=VARCHAR}
where ID = #{id,jdbcType=VARCHAR}
</update>
<select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.vat.entity.PeriodApproveExample" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from PERIOD_APPROVE
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
</mapper>
\ No newline at end of file
<?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.PeriodCellTemplateMapper">
<mapper namespace="pwc.taxtech.atms.vat.dao.PeriodCellDataMapper">
<insert id="batchInsert2" parameterType="pwc.taxtech.atms.vat.entity.PeriodCellData">
INSERT ALL
<foreach collection="list" item="item">
INTO PERIOD_CELL_DATA VALUES
(
#{item.id,jdbcType=DECIMAL},
#{item.reportId,jdbcType=DECIMAL},
#{item.cellTemplateId,jdbcType=DECIMAL},
#{item.data,jdbcType=VARCHAR},
#{item.formulaExp,jdbcType=VARCHAR},
#{item.createBy,jdbcType=VARCHAR},
#{item.createTime,jdbcType=TIMESTAMP},
#{item.updateTime,jdbcType=TIMESTAMP},
#{item.updateBy,jdbcType=VARCHAR},
#{item.projectId,jdbcType=VARCHAR},
#{item.period,jdbcType=DECIMAL}
)
</foreach>
SELECT 1 FROM DUAL
</insert>
<insert id="batchInsert" parameterType="pwc.taxtech.atms.vat.entity.PeriodCellData">
INSERT ALL
<foreach collection="list" item="item">
INTO PERIOD_CELL_DATA (
ID,
PERIOD,
REPORT_ID,
CELL_TEMPLATE_ID,
"DATA",
FORMULA_EXP,
CREATE_TIME,
UPDATE_TIME,
CREATE_BY,
UPDATE_BY,
PROJECT_ID
) VALUES
<trim prefix="(" suffix=")" suffixOverrides=",">
<choose>
<when test="item.id != null">#{item.id,jdbcType=INTEGER},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.period != null">#{item.period,jdbcType=INTEGER},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.reportId != null">#{item.reportId,jdbcType=VARCHAR},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.cellTemplateId != null">#{item.cellTemplateId,jdbcType=INTEGER},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.data != null">#{item.data,jdbcType=VARCHAR},</when>
<otherwise>' ',</otherwise>
</choose>
<choose>
<when test="item.formulaExp != null">#{item.formulaExp,jdbcType=VARCHAR},</when>
<otherwise>' ',</otherwise>
</choose>
<choose>
<when test="item.createTime != null">#{item.createTime,jdbcType=TIMESTAMP},</when>
<otherwise>to_date('1970-01-01 08:00:00','yyyy-mm-dd hh24:mi:ss'),</otherwise>
</choose>
<choose>
<when test="item.updateTime != null">#{item.updateTime,jdbcType=TIMESTAMP},</when>
<otherwise>to_date('1970-01-01 08:00:00','yyyy-mm-dd hh24:mi:ss'),</otherwise>
</choose>
<choose>
<when test="item.createBy != null">#{item.createBy,jdbcType=VARCHAR},</when>
<otherwise>' ',</otherwise>
</choose>
<choose>
<when test="item.updateBy != null">#{item.updateBy,jdbcType=VARCHAR},</when>
<otherwise>' ',</otherwise>
</choose>
<choose>
<when test="item.projectId != null">#{item.projectId,jdbcType=VARCHAR},</when>
<otherwise>' ',</otherwise>
</choose>
</trim>
</foreach>
SELECT 1 FROM DUAL
</insert>
</mapper>
\ No newline at end of file
......@@ -641,22 +641,22 @@ var vatModule = angular.module('app.vat', ['ui.grid', 'ui.grid.selection', 'ui.g
sticky: true
});
$stateProvider.state({
name: 'vat.reductionData.goodsMapping',
url: '/goodsMapping',
views: {
'@vat.reductionData': {
controller: ['$scope', '$stateParams', 'appTranslation',
function ($scope, $stateParams, appTranslation) {
appTranslation.load([appTranslation.vat]);
}],
template: '<vat-goods-mapping></vat-goods-mapping>',
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.vat),
deepStateRedirect: true,
sticky: true
});
// $stateProvider.state({
// name: 'vat.reductionData.goodsMapping',
// url: '/goodsMapping',
// views: {
// '@vat.reductionData': {
// controller: ['$scope', '$stateParams', 'appTranslation',
// function ($scope, $stateParams, appTranslation) {
// appTranslation.load([appTranslation.vat]);
// }],
// template: '<vat-goods-mapping></vat-goods-mapping>',
// }
// },
// resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.vat),
// deepStateRedirect: true,
// sticky: true
// });
$stateProvider.state({
name: 'vat.reductionData.caculateData',
......
......@@ -445,8 +445,7 @@
// 根据已有信息通过spreadJS计算各单元格的值
var setData = function () {
//todo: change to 0 at here,just for test now
var sheet = scope.spread.sheets[1];
var sheet = scope.spread.sheets[0];
var isExportData = false;
if (angular.isArray(scope.reportSource)) {
spreadJsTipService.initialize(sheet);
......
......@@ -441,8 +441,7 @@
//纳税申报表
var sheets = $scope.spread.sheets;
if (sheets && sheets.length > 0) {
//todo: change to sheets[0] here later
var tagInfo = sheets[1].getTag(row, column);
var tagInfo = sheets[0].getTag(row, column);
if (constant.regesterInformation.active) {
tagInfo = sheets[0].getTag(row, column);
}
......
......@@ -62,7 +62,7 @@
</a>
</div>
<div class="nav-element-right" style="width: 180px;">
<!--<div class="nav-element-right" style="width: 180px;">
<div class="form-group input-group">
<input type="text" class="form-control" style="margin-top: 9px;height: 36px;">
<span class="input-group-btn">
......@@ -71,7 +71,7 @@
</button>
</span>
</div>
</div>
</div>-->
<div class="clear"></div>
</div>
......
......@@ -885,10 +885,10 @@
constant.vatPermission.dataPreview.outputInvoice.queryCode,
constant.vatPermission.dataPreview.inputInvoice.queryCode,
constant.vatPermission.dataManage.accountMappingCode,
constant.vatPermission.dataManage.goodsMappingCode,
// constant.vatPermission.dataManage.accountMappingCode,
// constant.vatPermission.dataManage.goodsMappingCode,
constant.vatPermission.dataManage.caculateDataCode,
constant.vatPermission.dataManage.unbilledInvoiceCode,
// constant.vatPermission.dataManage.unbilledInvoiceCode,
constant.vatPermission.reportView.bsplCode,
constant.vatPermission.reportView.taxReturnCode,
......@@ -932,15 +932,16 @@
// else if (data[constant.vatPermission.dataPreview.customInvoice.queryCode]) {
// $state.go('vat.previewData.customInvoice');
// }
else if (data[constant.vatPermission.dataManage.accountMappingCode]) {
$state.go('vat.reductionData.accountMapping');
} else if (data[constant.vatPermission.dataManage.goodsMappingCode]) {
$state.go('vat.reductionData.goodsMapping');
} else if (data[constant.vatPermission.dataManage.caculateDataCode]) {
// else if (data[constant.vatPermission.dataManage.accountMappingCode]) {
// $state.go('vat.reductionData.accountMapping');
// } else if (data[constant.vatPermission.dataManage.goodsMappingCode]) {
// $state.go('vat.reductionData.goodsMapping');
// }
else if (data[constant.vatPermission.dataManage.caculateDataCode]) {
$state.go('vat.reductionData.caculateData');
} else if (data[constant.vatPermission.dataManage.unbilledInvoiceCode]) {
} /*else if (data[constant.vatPermission.dataManage.unbilledInvoiceCode]) {
$state.go('vat.reductionData.unbilledInvoice');
} else if (data[constant.vatPermission.reportView.bsplCode] || data[constant.vatPermission.reportView.taxReturnCode]) {
}*/ else if (data[constant.vatPermission.reportView.bsplCode] || data[constant.vatPermission.reportView.taxReturnCode]) {
$state.go('vat.generateReport');
} else if (data[constant.vatPermission.dataAnalysis.modelAnalysisCode]) {
$state.go('vat.analyzeLayout.analyzeReport');
......
......@@ -76,8 +76,8 @@
<button type="button" class="btn btn-in-grid" ng-show="serviceTypeId ==='12' && updateStatus" ngf-select="" ng-model="productFileName" ngf-drag-over-class="'dragover'" accept=".xls,.xlsx" ngf-multiple="false" ngf-allow-dir="false"><i class="material-icons middle">add_circle_outline</i>导入</button>
</div>
<a href="" ng-click="toggleView('workflowView')" ng-class="{true:'active',false:'inactive'}[currentView == 'workflowView']"><i class="fa fa-tasks" aria-hidden="true"></i></a>
<a href="" ng-click="toggleView('listView')" ng-class="{true:'active',false:'inactive'}[currentView == 'listView']"><i class="fa fa-list-ul" aria-hidden="true"></i></a>
<a href="" ng-click="toggleView('cardView')" ng-class="{true:'active',false:'inactive'}[currentView == 'cardView']"><i class="fa fa-th" aria-hidden="true"></i></a>
<!--<a href="" ng-click="toggleView('listView')" ng-class="{true:'active',false:'inactive'}[currentView == 'listView']"><i class="fa fa-list-ul" aria-hidden="true"></i></a>-->
<!-- <a href="" ng-click="toggleView('cardView')" ng-class="{true:'active',false:'inactive'}[currentView == 'cardView']"><i class="fa fa-th" aria-hidden="true"></i></a>-->
<div class="button-sort" ng-if="currentView == 'cardView'">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{{ 'OrderBy' | translate }}<span class="glyphicon glyphicon-sort"></span>
......
......@@ -571,39 +571,39 @@ var vatModule = angular.module('app.vat', ['ui.grid', 'ui.grid.selection', 'ui.g
sticky: true
});
$stateProvider.state({
name: 'vat.reductionData.accountMapping',
url: '/accountMapping',
views: {
'@vat.reductionData': {
controller: ['$scope', '$stateParams', 'appTranslation',
function ($scope, $stateParams, appTranslation) {
appTranslation.load([appTranslation.vat]);
}],
template: '<vat-account-mapping></vat-account-mapping>',
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.vat),
deepStateRedirect: true,
sticky: true
});
$stateProvider.state({
name: 'vat.reductionData.goodsMapping',
url: '/goodsMapping',
views: {
'@vat.reductionData': {
controller: ['$scope', '$stateParams', 'appTranslation',
function ($scope, $stateParams, appTranslation) {
appTranslation.load([appTranslation.vat]);
}],
template: '<vat-goods-mapping></vat-goods-mapping>',
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.vat),
deepStateRedirect: true,
sticky: true
});
// $stateProvider.state({
// name: 'vat.reductionData.accountMapping',
// url: '/accountMapping',
// views: {
// '@vat.reductionData': {
// controller: ['$scope', '$stateParams', 'appTranslation',
// function ($scope, $stateParams, appTranslation) {
// appTranslation.load([appTranslation.vat]);
// }],
// template: '<vat-account-mapping></vat-account-mapping>',
// }
// },
// resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.vat),
// deepStateRedirect: true,
// sticky: true
// });
//
// $stateProvider.state({
// name: 'vat.reductionData.goodsMapping',
// url: '/goodsMapping',
// views: {
// '@vat.reductionData': {
// controller: ['$scope', '$stateParams', 'appTranslation',
// function ($scope, $stateParams, appTranslation) {
// appTranslation.load([appTranslation.vat]);
// }],
// template: '<vat-goods-mapping></vat-goods-mapping>',
// }
// },
// resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.vat),
// deepStateRedirect: true,
// sticky: true
// });
$stateProvider.state({
name: 'vat.reductionData.caculateData',
......
......@@ -760,7 +760,7 @@ var citModule = angular.module('app.cit', ['ui.grid', 'ui.grid.selection', 'ui.g
sticky: true
});
$stateProvider.state({
/*$stateProvider.state({
name: 'cit.reductionData.goodsMapping',
url: '/goodsMapping',
views: {
......@@ -775,7 +775,7 @@ var citModule = angular.module('app.cit', ['ui.grid', 'ui.grid.selection', 'ui.g
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.cit),
deepStateRedirect: true,
sticky: true
});
});*/
$stateProvider.state({
name: 'cit.reductionData.caculateData',
......
......@@ -51,18 +51,18 @@ function ($scope, $log, $translate, $location, loginContext, enums, vatSessionSe
name: 'caculateData', permission: constant.vatPermission.dataManage.caculateDataCode,
text: $translate.instant('caculateData'), icon: 'fa fa-random', show: true
},
{
name: 'accountMapping', permission: constant.vatPermission.dataManage.accountMappingCode,
text: $translate.instant('accountMapping'), icon: 'fa fa-map', show: true
},
{
name: 'goodsMapping', permission: constant.vatPermission.dataManage.goodsMappingCode,
text: $translate.instant('goodsMapping'), icon: 'fa fa-map-signs', show: true
},
{
name: 'unbilledInvoice', permission: constant.vatPermission.dataManage.unbilledInvoiceCode,
text: $translate.instant('unbilledInvoice'), icon: 'fa fa-shield', show: true
}, ];
/*{
name: 'accountMapping', permission: constant.vatPermission.dataManage.accountMappingCode,
text: $translate.instant('accountMapping'), icon: 'fa fa-map', show: true
},
{
name: 'goodsMapping', permission: constant.vatPermission.dataManage.goodsMappingCode,
text: $translate.instant('goodsMapping'), icon: 'fa fa-map-signs', show: true
},
{
name: 'unbilledInvoice', permission: constant.vatPermission.dataManage.unbilledInvoiceCode,
text: $translate.instant('unbilledInvoice'), icon: 'fa fa-shield', show: true
},*/ ];
}
else {
$scope.nodeDicKey = constant.DictionaryDictKey.DataImport;
......
......@@ -131,9 +131,9 @@ function ($scope, $rootScope, $q, $log, $timeout, $state, $translate, projectSer
constant.vatPermission.dataPreview.inputInvoice.queryCode,
constant.vatPermission.dataManage.caculateDataCode,
constant.vatPermission.dataManage.accountMappingCode,
constant.vatPermission.dataManage.goodsMappingCode,
constant.vatPermission.dataManage.unbilledInvoiceCode,
// constant.vatPermission.dataManage.accountMappingCode,
// constant.vatPermission.dataManage.goodsMappingCode,
// constant.vatPermission.dataManage.unbilledInvoiceCode,
constant.vatPermission.reportView.bsplCode,
constant.vatPermission.reportView.taxReturnCode,
......@@ -323,30 +323,30 @@ function ($scope, $rootScope, $q, $log, $timeout, $state, $translate, projectSer
name: 'reductionData', state: 'reductionData', num: 3,
permission: constant.vatPermission.dataManage.dataManageCode, url: '#/vat/reductionData'
});
subMenus.push({
/* subMenus.push({
name: 'reductionData.accountMapping', state: 'reductionData.accountMapping', num: 3,
permission: constant.vatPermission.dataManage.accountMappingCode, url: '#/vat/reductionData/accountMapping'
});
});*/
}
else if (data[constant.vatPermission.dataManage.goodsMappingCode]) {
$scope.menus.push({
name: 'reductionData', state: 'reductionData', num: 3,
permission: constant.vatPermission.dataManage.dataManageCode, url: '#/vat/reductionData'
});
subMenus.push({
/* subMenus.push({
name: 'reductionData.goodsMapping', state: 'reductionData.goodsMapping', num: 3,
permission: constant.vatPermission.dataManage.goodsMappingCode, url: '#/vat/reductionData/goodsMapping'
});
});*/
}
else if (data[constant.vatPermission.dataManage.unbilledInvoiceCode]) {
$scope.menus.push({
name: 'reductionData', state: 'reductionData', num: 3,
permission: constant.vatPermission.dataManage.dataManageCode, url: '#/vat/reductionData'
});
subMenus.push({
/*subMenus.push({
name: 'reductionData.unbilledInvoice', state: 'reductionData.unbilledInvoice', num: 3,
permission: constant.vatPermission.dataManage.unbilledInvoiceCode, url: '#/vat/reductionData/unbilledInvoice'
});
});*/
}
if (data[constant.vatPermission.reportView.bsplCode] || data[constant.vatPermission.reportView.taxReturnCode]) {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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