Commit 51c6f913 authored by eddie.woo's avatar eddie.woo

Merge branch 'dev_ken' into lg_temp

# Conflicts:
#	atms-api/src/main/java/pwc/taxtech/atms/constant/enums/EnumInputInvoiceEntityType.java
#	atms-api/src/main/java/pwc/taxtech/atms/constant/enums/EnumInputInvoiceRefundReason.java
#	atms-api/src/main/java/pwc/taxtech/atms/constant/enums/EnumInputInvoiceSourceType.java
#	atms-api/src/main/java/pwc/taxtech/atms/constant/enums/EnumInputInvoiceStatusType.java
#	atms-api/src/main/java/pwc/taxtech/atms/constant/enums/EnumInputInvoiceType.java
#	atms-api/src/main/java/pwc/taxtech/atms/constant/enums/EnumInputInvoiceUploadType.java
#	atms-api/src/main/java/pwc/taxtech/atms/constant/enums/EnumIsIncludedInTaxAmountType.java
#	atms-api/src/main/java/pwc/taxtech/atms/constant/enums/EnumProductionServiceType.java
#	atms-api/src/main/java/pwc/taxtech/atms/constant/enums/EnumProductionType.java
#	atms-api/src/main/java/pwc/taxtech/atms/controller/input/InvoiceManageController.java
#	atms-api/src/main/java/pwc/taxtech/atms/dao/InputInvoiceMapper.java
#	atms-api/src/main/java/pwc/taxtech/atms/dto/input/InputInvoiceDto.java
#	atms-api/src/main/java/pwc/taxtech/atms/dto/input/InputInvoiceQuery.java
#	atms-api/src/main/java/pwc/taxtech/atms/service/InvoiceManageService.java
#	atms-api/src/main/java/pwc/taxtech/atms/service/impl/InvoiceManageServiceImpl.java
#	atms-api/src/main/resources/sqlMapConfig.xml
parent 4af71232
package pwc.taxtech.atms.constant.input;
public class ScanConstant {
public enum ScanType{
}
}
......@@ -10,6 +10,7 @@ import pwc.taxtech.atms.controller.BaseController;
import pwc.taxtech.atms.dto.ApiResultDto;
import pwc.taxtech.atms.dto.input.*;
import pwc.taxtech.atms.service.InvoiceManageService;
import pwc.taxtech.atms.service.vendor.ScanService;
import pwc.taxtech.atms.thirdparty.ExcelUtil;
import javax.servlet.http.HttpServletResponse;
......@@ -23,6 +24,8 @@ public class InvoiceManageController extends BaseController {
@Autowired
private InvoiceManageService invoiceManageService;
@Autowired
private ScanService scanService;
@ApiOperation(value = "查询所有发票")
@ResponseBody
......@@ -128,12 +131,12 @@ public class InvoiceManageController extends BaseController {
}
@ResponseBody
@RequestMapping(value = "scan", method = RequestMethod.GET)
public ApiResultDto scan() {
@RequestMapping(value = "scan", method = RequestMethod.POST)
public ApiResultDto scan(@RequestBody ScanParamDto scanParamDto) {
try {
return ApiResultDto.success(invoiceManageService.scan());
return ApiResultDto.success(invoiceManageService.scan(scanParamDto));
} catch (Exception e) {
logger.error(" create scan error.", e);
logger.error("create scan error.", e);
}
return ApiResultDto.fail("创建扫描失败");
}
......@@ -142,10 +145,13 @@ public class InvoiceManageController extends BaseController {
@RequestMapping(value = "scanResult", method = RequestMethod.GET)
public ApiResultDto getScanResult(@RequestParam Long taskId) {
try {
return ApiResultDto.success(invoiceManageService.scan());
if (null == taskId || taskId < 0) {
return ApiResultDto.fail();
}
return ApiResultDto.success(scanService.getCache(taskId));
} catch (Exception e) {
logger.error(" create scan error.", e);
logger.error("getScanResult error.", e);
}
return ApiResultDto.fail("创建扫描失败");
return ApiResultDto.fail("获取扫描结果失败");
}
}
......@@ -9,26 +9,23 @@ import org.springframework.web.bind.annotation.RestController;
import pwc.taxtech.atms.common.ServiceException;
import pwc.taxtech.atms.controller.BaseController;
import pwc.taxtech.atms.dto.ApiResultDto;
import pwc.taxtech.atms.dto.vendor.LgItemDto;
import pwc.taxtech.atms.dto.vendor.LgVendorDto;
import pwc.taxtech.atms.service.vendor.LongiService;
import java.util.List;
import pwc.taxtech.atms.dto.input.ScanResultDto;
import pwc.taxtech.atms.service.vendor.ScanService;
@RestController
@RequestMapping("/vendor/api/v1/scan")
public class ScanController extends BaseController {
@Autowired
private LongiService longiService;
private ScanService scanService;
@ApiOperation(value = "批量更新扫描结果")
@RequestMapping(value = "update", method = RequestMethod.POST)
public ApiResultDto updateItems(@RequestBody List<LgItemDto> lgItemDtoList) {
@ApiOperation(value = "扫描结果回调")
@RequestMapping(value = "cb", method = RequestMethod.POST)
public ApiResultDto updateItems(@RequestBody ScanResultDto scanResultDto) {
try {
longiService.updateItems(lgItemDtoList);
} catch (ServiceException e) {
return ApiResultDto.fail(e.getMessage());
scanService.cacheResult(scanResultDto);
} catch (Exception e) {
return ApiResultDto.fail();
}
return ApiResultDto.success();
}
......
......@@ -4,11 +4,13 @@ import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Repository;
import pwc.taxtech.atms.MyMapper;
import pwc.taxtech.atms.entitiy.InputInvoiceFile;
import pwc.taxtech.atms.entitiy.InputInvoiceFileExample;
@Mapper
@Repository
public interface InputInvoiceFileMapper extends MyMapper {
/**
* This method was generated by MyBatis Generator.
......
......@@ -50,6 +50,10 @@ public class ApiResultDto {
return new ApiResultDto(FAILED, null, message);
}
public static ApiResultDto fail() {
return new ApiResultDto(FAILED, null, StringUtils.EMPTY);
}
public ApiResultDto() {
}
......
......@@ -6,6 +6,7 @@ public class ScanParamDto {
private String ftpHost;
private Integer ftpPort;
private Long jobId;//任务ID
private Integer scanType;
public String getFtpUser() {
return ftpUser;
......@@ -46,4 +47,12 @@ public class ScanParamDto {
public void setJobId(Long jobId) {
this.jobId = jobId;
}
public Integer getScanType() {
return scanType;
}
public void setScanType(Integer scanType) {
this.scanType = scanType;
}
}
......@@ -9,6 +9,7 @@ public class ScanResultDto {
private List<VoucherDto> scanList = new ArrayList<>();
private List<InvoiceScanDto> manualList = new ArrayList<>();
private Long jobId;//任务ID
private Integer scanType;
public Integer getTotal() {
return total;
......@@ -49,4 +50,12 @@ public class ScanResultDto {
public void setManualList(List<InvoiceScanDto> manualList) {
this.manualList = manualList;
}
public Integer getScanType() {
return scanType;
}
public void setScanType(Integer scanType) {
this.scanType = scanType;
}
}
package pwc.taxtech.atms.entitiy;
import java.io.Serializable;
/**
*
* This class was generated by MyBatis Generator.
......@@ -9,7 +7,7 @@ import java.io.Serializable;
*
* @mbg.generated do_not_delete_during_merge
*/
public class InputInvoiceFile extends BaseEntity implements Serializable {
public class InputInvoiceFile extends BaseEntity {
/**
*
* This field was generated by MyBatis Generator.
......@@ -21,25 +19,25 @@ public class InputInvoiceFile extends BaseEntity implements Serializable {
/**
* Database Column Remarks:
* 文件路径
* 文件url
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column input_invoice_file.file_path
* This field corresponds to the database column input_invoice_file.url
*
* @mbg.generated
*/
private String filePath;
private String url;
/**
* Database Column Remarks:
* PDF文件路径
* 文件路径
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column input_invoice_file.pdf_file_path
* This field corresponds to the database column input_invoice_file.file_path
*
* @mbg.generated
*/
private String pdfFilePath;
private String filePath;
/**
* Database Column Remarks:
......@@ -52,28 +50,6 @@ public class InputInvoiceFile extends BaseEntity implements Serializable {
*/
private String fileName;
/**
* Database Column Remarks:
* 原始文件名称
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column input_invoice_file.original_file_name
*
* @mbg.generated
*/
private String originalFileName;
/**
* Database Column Remarks:
* DMS文件路径
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column input_invoice_file.dms_file_path
*
* @mbg.generated
*/
private String dmsFilePath;
/**
* Database Column Remarks:
* 文件后缀名
......@@ -85,14 +61,6 @@ public class InputInvoiceFile extends BaseEntity implements Serializable {
*/
private String fileExtension;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table input_invoice_file
*
* @mbg.generated
*/
private static final long serialVersionUID = 1L;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column input_invoice_file.id
......@@ -119,50 +87,50 @@ public class InputInvoiceFile extends BaseEntity implements Serializable {
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column input_invoice_file.file_path
* This method returns the value of the database column input_invoice_file.url
*
* @return the value of input_invoice_file.file_path
* @return the value of input_invoice_file.url
*
* @mbg.generated
*/
public String getFilePath() {
return filePath;
public String getUrl() {
return url;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column input_invoice_file.file_path
* This method sets the value of the database column input_invoice_file.url
*
* @param filePath the value for input_invoice_file.file_path
* @param url the value for input_invoice_file.url
*
* @mbg.generated
*/
public void setFilePath(String filePath) {
this.filePath = filePath == null ? null : filePath.trim();
public void setUrl(String url) {
this.url = url == null ? null : url.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column input_invoice_file.pdf_file_path
* This method returns the value of the database column input_invoice_file.file_path
*
* @return the value of input_invoice_file.pdf_file_path
* @return the value of input_invoice_file.file_path
*
* @mbg.generated
*/
public String getPdfFilePath() {
return pdfFilePath;
public String getFilePath() {
return filePath;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column input_invoice_file.pdf_file_path
* This method sets the value of the database column input_invoice_file.file_path
*
* @param pdfFilePath the value for input_invoice_file.pdf_file_path
* @param filePath the value for input_invoice_file.file_path
*
* @mbg.generated
*/
public void setPdfFilePath(String pdfFilePath) {
this.pdfFilePath = pdfFilePath == null ? null : pdfFilePath.trim();
public void setFilePath(String filePath) {
this.filePath = filePath == null ? null : filePath.trim();
}
/**
......@@ -189,54 +157,6 @@ public class InputInvoiceFile extends BaseEntity implements Serializable {
this.fileName = fileName == null ? null : fileName.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column input_invoice_file.original_file_name
*
* @return the value of input_invoice_file.original_file_name
*
* @mbg.generated
*/
public String getOriginalFileName() {
return originalFileName;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column input_invoice_file.original_file_name
*
* @param originalFileName the value for input_invoice_file.original_file_name
*
* @mbg.generated
*/
public void setOriginalFileName(String originalFileName) {
this.originalFileName = originalFileName == null ? null : originalFileName.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column input_invoice_file.dms_file_path
*
* @return the value of input_invoice_file.dms_file_path
*
* @mbg.generated
*/
public String getDmsFilePath() {
return dmsFilePath;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column input_invoice_file.dms_file_path
*
* @param dmsFilePath the value for input_invoice_file.dms_file_path
*
* @mbg.generated
*/
public void setDmsFilePath(String dmsFilePath) {
this.dmsFilePath = dmsFilePath == null ? null : dmsFilePath.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column input_invoice_file.file_extension
......@@ -274,11 +194,9 @@ public class InputInvoiceFile extends BaseEntity implements Serializable {
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", url=").append(url);
sb.append(", filePath=").append(filePath);
sb.append(", pdfFilePath=").append(pdfFilePath);
sb.append(", fileName=").append(fileName);
sb.append(", originalFileName=").append(originalFileName);
sb.append(", dmsFilePath=").append(dmsFilePath);
sb.append(", fileExtension=").append(fileExtension);
sb.append("]");
return sb.toString();
......
......@@ -52,6 +52,28 @@ public class TaskList extends BaseEntity {
*/
private Integer status;
/**
* Database Column Remarks:
* 业务总数
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column task_list.total_count
*
* @mbg.generated
*/
private Integer totalCount;
/**
* Database Column Remarks:
* 失败计数
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column task_list.error_count
*
* @mbg.generated
*/
private Integer errorCount;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column task_list.id
......@@ -148,6 +170,54 @@ public class TaskList extends BaseEntity {
this.status = status;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column task_list.total_count
*
* @return the value of task_list.total_count
*
* @mbg.generated
*/
public Integer getTotalCount() {
return totalCount;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column task_list.total_count
*
* @param totalCount the value for task_list.total_count
*
* @mbg.generated
*/
public void setTotalCount(Integer totalCount) {
this.totalCount = totalCount;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column task_list.error_count
*
* @return the value of task_list.error_count
*
* @mbg.generated
*/
public Integer getErrorCount() {
return errorCount;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column task_list.error_count
*
* @param errorCount the value for task_list.error_count
*
* @mbg.generated
*/
public void setErrorCount(Integer errorCount) {
this.errorCount = errorCount;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table task_list
......@@ -164,6 +234,8 @@ public class TaskList extends BaseEntity {
sb.append(", name=").append(name);
sb.append(", type=").append(type);
sb.append(", status=").append(status);
sb.append(", totalCount=").append(totalCount);
sb.append(", errorCount=").append(errorCount);
sb.append("]");
return sb.toString();
}
......
......@@ -445,6 +445,126 @@ public class TaskListExample {
return (Criteria) this;
}
public Criteria andTotalCountIsNull() {
addCriterion("total_count is null");
return (Criteria) this;
}
public Criteria andTotalCountIsNotNull() {
addCriterion("total_count is not null");
return (Criteria) this;
}
public Criteria andTotalCountEqualTo(Integer value) {
addCriterion("total_count =", value, "totalCount");
return (Criteria) this;
}
public Criteria andTotalCountNotEqualTo(Integer value) {
addCriterion("total_count <>", value, "totalCount");
return (Criteria) this;
}
public Criteria andTotalCountGreaterThan(Integer value) {
addCriterion("total_count >", value, "totalCount");
return (Criteria) this;
}
public Criteria andTotalCountGreaterThanOrEqualTo(Integer value) {
addCriterion("total_count >=", value, "totalCount");
return (Criteria) this;
}
public Criteria andTotalCountLessThan(Integer value) {
addCriterion("total_count <", value, "totalCount");
return (Criteria) this;
}
public Criteria andTotalCountLessThanOrEqualTo(Integer value) {
addCriterion("total_count <=", value, "totalCount");
return (Criteria) this;
}
public Criteria andTotalCountIn(List<Integer> values) {
addCriterion("total_count in", values, "totalCount");
return (Criteria) this;
}
public Criteria andTotalCountNotIn(List<Integer> values) {
addCriterion("total_count not in", values, "totalCount");
return (Criteria) this;
}
public Criteria andTotalCountBetween(Integer value1, Integer value2) {
addCriterion("total_count between", value1, value2, "totalCount");
return (Criteria) this;
}
public Criteria andTotalCountNotBetween(Integer value1, Integer value2) {
addCriterion("total_count not between", value1, value2, "totalCount");
return (Criteria) this;
}
public Criteria andErrorCountIsNull() {
addCriterion("error_count is null");
return (Criteria) this;
}
public Criteria andErrorCountIsNotNull() {
addCriterion("error_count is not null");
return (Criteria) this;
}
public Criteria andErrorCountEqualTo(Integer value) {
addCriterion("error_count =", value, "errorCount");
return (Criteria) this;
}
public Criteria andErrorCountNotEqualTo(Integer value) {
addCriterion("error_count <>", value, "errorCount");
return (Criteria) this;
}
public Criteria andErrorCountGreaterThan(Integer value) {
addCriterion("error_count >", value, "errorCount");
return (Criteria) this;
}
public Criteria andErrorCountGreaterThanOrEqualTo(Integer value) {
addCriterion("error_count >=", value, "errorCount");
return (Criteria) this;
}
public Criteria andErrorCountLessThan(Integer value) {
addCriterion("error_count <", value, "errorCount");
return (Criteria) this;
}
public Criteria andErrorCountLessThanOrEqualTo(Integer value) {
addCriterion("error_count <=", value, "errorCount");
return (Criteria) this;
}
public Criteria andErrorCountIn(List<Integer> values) {
addCriterion("error_count in", values, "errorCount");
return (Criteria) this;
}
public Criteria andErrorCountNotIn(List<Integer> values) {
addCriterion("error_count not in", values, "errorCount");
return (Criteria) this;
}
public Criteria andErrorCountBetween(Integer value1, Integer value2) {
addCriterion("error_count between", value1, value2, "errorCount");
return (Criteria) this;
}
public Criteria andErrorCountNotBetween(Integer value1, Integer value2) {
addCriterion("error_count not between", value1, value2, "errorCount");
return (Criteria) this;
}
public Criteria andCreateByIsNull() {
addCriterion("create_by is null");
return (Criteria) this;
......
......@@ -17,7 +17,6 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
@Component
public class JwtAuthenticationFilter extends AbstractAuthenticationProcessingFilter {
@Value("${jwt.expireSecond}")
......
......@@ -3,13 +3,7 @@ package pwc.taxtech.atms.service;
import java.util.List;
import java.util.Optional;
import pwc.taxtech.atms.dto.input.CamelPagingDto;
import pwc.taxtech.atms.dto.input.CamelPagingResultDto;
import pwc.taxtech.atms.dto.input.InputInvoiceDto;
import pwc.taxtech.atms.dto.input.InputInvoiceItemDto;
import pwc.taxtech.atms.dto.input.InputInvoiceQuery;
import pwc.taxtech.atms.dto.input.InputInvoiceQueryDto;
import pwc.taxtech.atms.dto.input.InvoiceFilterDto;
import pwc.taxtech.atms.dto.input.*;
public interface InvoiceManageService {
/**
......@@ -53,5 +47,5 @@ public interface InvoiceManageService {
* 扫描识别
* @return task id
*/
Optional<Long> scan();
Optional<Long> scan(ScanParamDto scanParamDto);
}
......@@ -346,7 +346,7 @@ public class InvoiceManageServiceImpl extends BaseService implements InvoiceMana
@Transactional
@Override
public Optional<Long> scan() {
public Optional<Long> scan(ScanParamDto scanParamDto) {
Optional<InputDevice> optional = inputDeviceDao.getScan();
if (!optional.isPresent()) {
return Optional.empty();
......@@ -360,6 +360,7 @@ public class InvoiceManageServiceImpl extends BaseService implements InvoiceMana
paramDto.setFtpPwd(config.getPassword());
paramDto.setFtpUser(config.getUsername());
paramDto.setJobId(id);
paramDto.setScanType(scanParamDto.getScanType());
String url = StringUtils.appendIfMissing(inputDevice.getUrl(), "/") + SCAN_REQUEST_URL;
ApiResultDto resultDto = restTemplate.postForObject(url, paramDto, ApiResultDto.class);
if (resultDto.getCode() == ApiResultDto.FAILED) {
......
package pwc.taxtech.atms.service.vendor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.common.ServiceException;
import pwc.taxtech.atms.dto.input.ScanResultDto;
import pwc.taxtech.atms.service.impl.BaseService;
import pwc.taxtech.atms.service.impl.TaskListService;
@Service
public class ScanService extends BaseService {
@Autowired
private TaskListService taskListService;
public void update(ScanResultDto resultDto){
@Cacheable(value = "scanResultCache", key = "#resultDto.getJobId()",
condition = "#resultDto != null && #resultDto.getJobId() != null", unless = "#result == null")
public ScanResultDto cacheResult(ScanResultDto resultDto) {
if (null == resultDto) {
return null;
}
//todo 分词纠正
return resultDto;
}
@Cacheable(value = "scanResultCache", key = "#id", unless = "#result == null")
public ScanResultDto getCache(Long id) {
return null;
}
@CacheEvict(value = "scanResultCache", key = "#jobId")
public void removeCache(Long jobId) {
}
public void save(ScanResultDto resultDto) throws ServiceException {
}
}
......@@ -13,8 +13,8 @@
maxElementsOnDisk="1000"
maxElementsInMemory="2000"
eternal="false"
overflowToDisk="true"
diskPersistent="true"/>
overflowToDisk="false"
diskPersistent="false"/>
<!-- reflect缓存 -->
<cache name="reflectCache"
......@@ -24,6 +24,16 @@
overflowToDisk="false"
diskPersistent="false"/>
<!-- 扫描结果缓存 -->
<cache name="scanResultCache"
maxElementsOnDisk="100"
maxElementsInMemory="100"
eternal="false"
timeToIdleSeconds="86400"
timeToLiveSeconds="86400"
overflowToDisk="false"
diskPersistent="false"/>
</ehcache>
<!--
<diskStore>==========当内存缓存中对象数量超过maxElementsInMemory时,将缓存对象写到磁盘缓存中(需对象实现序列化接口)
......
......@@ -7,11 +7,9 @@
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="url" jdbcType="VARCHAR" property="url" />
<result column="file_path" jdbcType="VARCHAR" property="filePath" />
<result column="pdf_file_path" jdbcType="VARCHAR" property="pdfFilePath" />
<result column="file_name" jdbcType="VARCHAR" property="fileName" />
<result column="original_file_name" jdbcType="VARCHAR" property="originalFileName" />
<result column="dms_file_path" jdbcType="VARCHAR" property="dmsFilePath" />
<result column="file_extension" jdbcType="VARCHAR" property="fileExtension" />
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
......@@ -89,8 +87,8 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, file_path, pdf_file_path, file_name, original_file_name, dms_file_path, file_extension,
create_by, update_by, create_time, update_time
id, url, file_path, file_name, file_extension, create_by, update_by, create_time,
update_time
</sql>
<select id="selectByExample" parameterType="pwc.taxtech.atms.entitiy.InputInvoiceFileExample" resultMap="BaseResultMap">
<!--
......@@ -143,14 +141,14 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into input_invoice_file (id, file_path, pdf_file_path,
file_name, original_file_name, dms_file_path,
file_extension, create_by, update_by,
create_time, update_time)
values (#{id,jdbcType=BIGINT}, #{filePath,jdbcType=VARCHAR}, #{pdfFilePath,jdbcType=VARCHAR},
#{fileName,jdbcType=VARCHAR}, #{originalFileName,jdbcType=VARCHAR}, #{dmsFilePath,jdbcType=VARCHAR},
#{fileExtension,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{updateBy,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
insert into input_invoice_file (id, url, file_path,
file_name, file_extension, create_by,
update_by, create_time, update_time
)
values (#{id,jdbcType=BIGINT}, #{url,jdbcType=VARCHAR}, #{filePath,jdbcType=VARCHAR},
#{fileName,jdbcType=VARCHAR}, #{fileExtension,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR},
#{updateBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="pwc.taxtech.atms.entitiy.InputInvoiceFile">
<!--
......@@ -162,21 +160,15 @@
<if test="id != null">
id,
</if>
<if test="url != null">
url,
</if>
<if test="filePath != null">
file_path,
</if>
<if test="pdfFilePath != null">
pdf_file_path,
</if>
<if test="fileName != null">
file_name,
</if>
<if test="originalFileName != null">
original_file_name,
</if>
<if test="dmsFilePath != null">
dms_file_path,
</if>
<if test="fileExtension != null">
file_extension,
</if>
......@@ -197,21 +189,15 @@
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="url != null">
#{url,jdbcType=VARCHAR},
</if>
<if test="filePath != null">
#{filePath,jdbcType=VARCHAR},
</if>
<if test="pdfFilePath != null">
#{pdfFilePath,jdbcType=VARCHAR},
</if>
<if test="fileName != null">
#{fileName,jdbcType=VARCHAR},
</if>
<if test="originalFileName != null">
#{originalFileName,jdbcType=VARCHAR},
</if>
<if test="dmsFilePath != null">
#{dmsFilePath,jdbcType=VARCHAR},
</if>
<if test="fileExtension != null">
#{fileExtension,jdbcType=VARCHAR},
</if>
......@@ -249,21 +235,15 @@
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.url != null">
url = #{record.url,jdbcType=VARCHAR},
</if>
<if test="record.filePath != null">
file_path = #{record.filePath,jdbcType=VARCHAR},
</if>
<if test="record.pdfFilePath != null">
pdf_file_path = #{record.pdfFilePath,jdbcType=VARCHAR},
</if>
<if test="record.fileName != null">
file_name = #{record.fileName,jdbcType=VARCHAR},
</if>
<if test="record.originalFileName != null">
original_file_name = #{record.originalFileName,jdbcType=VARCHAR},
</if>
<if test="record.dmsFilePath != null">
dms_file_path = #{record.dmsFilePath,jdbcType=VARCHAR},
</if>
<if test="record.fileExtension != null">
file_extension = #{record.fileExtension,jdbcType=VARCHAR},
</if>
......@@ -291,11 +271,9 @@
-->
update input_invoice_file
set id = #{record.id,jdbcType=BIGINT},
url = #{record.url,jdbcType=VARCHAR},
file_path = #{record.filePath,jdbcType=VARCHAR},
pdf_file_path = #{record.pdfFilePath,jdbcType=VARCHAR},
file_name = #{record.fileName,jdbcType=VARCHAR},
original_file_name = #{record.originalFileName,jdbcType=VARCHAR},
dms_file_path = #{record.dmsFilePath,jdbcType=VARCHAR},
file_extension = #{record.fileExtension,jdbcType=VARCHAR},
create_by = #{record.createBy,jdbcType=VARCHAR},
update_by = #{record.updateBy,jdbcType=VARCHAR},
......@@ -312,21 +290,15 @@
-->
update input_invoice_file
<set>
<if test="url != null">
url = #{url,jdbcType=VARCHAR},
</if>
<if test="filePath != null">
file_path = #{filePath,jdbcType=VARCHAR},
</if>
<if test="pdfFilePath != null">
pdf_file_path = #{pdfFilePath,jdbcType=VARCHAR},
</if>
<if test="fileName != null">
file_name = #{fileName,jdbcType=VARCHAR},
</if>
<if test="originalFileName != null">
original_file_name = #{originalFileName,jdbcType=VARCHAR},
</if>
<if test="dmsFilePath != null">
dms_file_path = #{dmsFilePath,jdbcType=VARCHAR},
</if>
<if test="fileExtension != null">
file_extension = #{fileExtension,jdbcType=VARCHAR},
</if>
......@@ -351,11 +323,9 @@
This element is automatically generated by MyBatis Generator, do not modify.
-->
update input_invoice_file
set file_path = #{filePath,jdbcType=VARCHAR},
pdf_file_path = #{pdfFilePath,jdbcType=VARCHAR},
set url = #{url,jdbcType=VARCHAR},
file_path = #{filePath,jdbcType=VARCHAR},
file_name = #{fileName,jdbcType=VARCHAR},
original_file_name = #{originalFileName,jdbcType=VARCHAR},
dms_file_path = #{dmsFilePath,jdbcType=VARCHAR},
file_extension = #{fileExtension,jdbcType=VARCHAR},
create_by = #{createBy,jdbcType=VARCHAR},
update_by = #{updateBy,jdbcType=VARCHAR},
......
......@@ -10,6 +10,8 @@
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="type" jdbcType="SMALLINT" property="type" />
<result column="status" jdbcType="SMALLINT" property="status" />
<result column="total_count" jdbcType="INTEGER" property="totalCount" />
<result column="error_count" jdbcType="INTEGER" property="errorCount" />
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
......@@ -86,7 +88,8 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, `name`, `type`, `status`, create_by, update_by, create_time, update_time
id, `name`, `type`, `status`, total_count, error_count, create_by, update_by, create_time,
update_time
</sql>
<select id="selectByExample" parameterType="pwc.taxtech.atms.entitiy.TaskListExample" resultMap="BaseResultMap">
<!--
......@@ -140,11 +143,13 @@
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into task_list (id, `name`, `type`,
`status`, create_by, update_by,
create_time, update_time)
`status`, total_count, error_count,
create_by, update_by, create_time,
update_time)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{type,jdbcType=SMALLINT},
#{status,jdbcType=SMALLINT}, #{createBy,jdbcType=VARCHAR}, #{updateBy,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
#{status,jdbcType=SMALLINT}, #{totalCount,jdbcType=INTEGER}, #{errorCount,jdbcType=INTEGER},
#{createBy,jdbcType=VARCHAR}, #{updateBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="pwc.taxtech.atms.entitiy.TaskList">
<!--
......@@ -165,6 +170,12 @@
<if test="status != null">
`status`,
</if>
<if test="totalCount != null">
total_count,
</if>
<if test="errorCount != null">
error_count,
</if>
<if test="createBy != null">
create_by,
</if>
......@@ -191,6 +202,12 @@
<if test="status != null">
#{status,jdbcType=SMALLINT},
</if>
<if test="totalCount != null">
#{totalCount,jdbcType=INTEGER},
</if>
<if test="errorCount != null">
#{errorCount,jdbcType=INTEGER},
</if>
<if test="createBy != null">
#{createBy,jdbcType=VARCHAR},
</if>
......@@ -234,6 +251,12 @@
<if test="record.status != null">
`status` = #{record.status,jdbcType=SMALLINT},
</if>
<if test="record.totalCount != null">
total_count = #{record.totalCount,jdbcType=INTEGER},
</if>
<if test="record.errorCount != null">
error_count = #{record.errorCount,jdbcType=INTEGER},
</if>
<if test="record.createBy != null">
create_by = #{record.createBy,jdbcType=VARCHAR},
</if>
......@@ -261,6 +284,8 @@
`name` = #{record.name,jdbcType=VARCHAR},
`type` = #{record.type,jdbcType=SMALLINT},
`status` = #{record.status,jdbcType=SMALLINT},
total_count = #{record.totalCount,jdbcType=INTEGER},
error_count = #{record.errorCount,jdbcType=INTEGER},
create_by = #{record.createBy,jdbcType=VARCHAR},
update_by = #{record.updateBy,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
......@@ -285,6 +310,12 @@
<if test="status != null">
`status` = #{status,jdbcType=SMALLINT},
</if>
<if test="totalCount != null">
total_count = #{totalCount,jdbcType=INTEGER},
</if>
<if test="errorCount != null">
error_count = #{errorCount,jdbcType=INTEGER},
</if>
<if test="createBy != null">
create_by = #{createBy,jdbcType=VARCHAR},
</if>
......@@ -309,6 +340,8 @@
set `name` = #{name,jdbcType=VARCHAR},
`type` = #{type,jdbcType=SMALLINT},
`status` = #{status,jdbcType=SMALLINT},
total_count = #{totalCount,jdbcType=INTEGER},
error_count = #{errorCount,jdbcType=INTEGER},
create_by = #{createBy,jdbcType=VARCHAR},
update_by = #{updateBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
......
......@@ -60,9 +60,9 @@
<!--<columnOverride column="type" javaType="java.lang.Integer"/>-->
<!--</table>-->
<!--<table tableName="input_invoice_file" domainObjectName="InputInvoiceFile">-->
<!--<property name="ignoreQualifiersAtRuntime" value="true"/>-->
<!--</table>-->
<table tableName="input_invoice_file" domainObjectName="InputInvoiceFile">
<property name="ignoreQualifiersAtRuntime" value="true"/>
</table>
<!--<table tableName="input_invoice_item" domainObjectName="InputInvoiceItem">-->
<!--<property name="ignoreQualifiersAtRuntime" value="true"/>-->
......@@ -128,15 +128,15 @@
<!--<table tableName="input_vendor_site" domainObjectName="InputVendorSite">-->
<!--<property name="ignoreQualifiersAtRuntime" value="true"/>-->
<!--</table>-->
<table tableName="input_device" domainObjectName="InputDevice">
<property name="ignoreQualifiersAtRuntime" value="true"/>
<columnOverride column="type" javaType="java.lang.Integer"/>
</table>
<table tableName="task_list" domainObjectName="TaskList">
<property name="ignoreQualifiersAtRuntime" value="true"/>
<columnOverride column="type" javaType="java.lang.Integer"/>
<columnOverride column="status" javaType="java.lang.Integer"/>
</table>
<!--<table tableName="input_device" domainObjectName="InputDevice">-->
<!--<property name="ignoreQualifiersAtRuntime" value="true"/>-->
<!--<columnOverride column="type" javaType="java.lang.Integer"/>-->
<!--</table>-->
<!--<table tableName="task_list" domainObjectName="TaskList">-->
<!--<property name="ignoreQualifiersAtRuntime" value="true"/>-->
<!--<columnOverride column="type" javaType="java.lang.Integer"/>-->
<!--<columnOverride column="status" javaType="java.lang.Integer"/>-->
<!--</table>-->
</context>
</generatorConfiguration>
\ 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