Commit d31ce086 authored by ZeGang Z Si's avatar ZeGang Z Si

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

parents ca50112f 6eb6dfe5
......@@ -135,6 +135,19 @@ public class DateUtils {
return period;
}
/**
* 将yyyymm 字符串转换为区间格式 yyyyMM
*
* @param dateStr
* @return
*/
public static Integer strToPeriod2(String dateStr) {
dateStr = dateStr.replace(" ","");
Integer period = Integer.valueOf(dateStr);
return period;
}
/**
* 将短时间格式字符串转换为时间 yyyy-MM-dd
*
......@@ -175,6 +188,19 @@ public class DateUtils {
return strtodate;
}
/**
* 将短时间格式字符串转换为时间 yyyy-MM-dd
*
* @param strDate
* @return
*/
public static Date strToDate4(String strDate) {
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
ParsePosition pos = new ParsePosition(0);
Date strtodate = formatter.parse(strDate, pos);
return strtodate;
}
/**
* 得到现在时间
*
......
......@@ -8,7 +8,9 @@ public enum EnumImportType {
AdjustmentTable(4),
CashFlow(5),
CoupaPurchasingReport(6),
InvoiceData(7)
InvoiceData(7),
CertifiedInvoicesList(8),
InvoiceRecord(9)
;
private Integer code;
......
......@@ -164,6 +164,39 @@ public class DataImportController extends BaseController {
}
}
@ResponseBody
@RequestMapping(value = "IRExcelFile", method = RequestMethod.POST)
public OperationResultDto importIRExcelFile(@RequestParam MultipartFile file,@RequestParam String orgIds,@RequestParam String periodDate,@RequestParam Integer importType) {
try {
if (null == file) {
return OperationResultDto.error(ErrorMessage.NoFile);
}
List<String> orgList = (List<String>)JSONArray.parse(orgIds);
return dataImportService.importIRExcelFile(file,orgList, periodDate,importType);
} catch (ServiceException e) {
return OperationResultDto.error(e.getMessage());
} catch (Exception e) {
logger.error("importIRExcelFile error.", e);
return OperationResultDto.error(ErrorMessage.SystemError);
}
}
@ResponseBody
@RequestMapping(value = "CILExcelFile", method = RequestMethod.POST)
public OperationResultDto importCILExcelFile(@RequestParam MultipartFile file,@RequestParam String periodDate,@RequestParam Integer importType) {
try {
if (null == file) {
return OperationResultDto.error(ErrorMessage.NoFile);
}
return dataImportService.importCILExcelFile(file, periodDate,importType);
} catch (ServiceException e) {
return OperationResultDto.error(e.getMessage());
} catch (Exception e) {
logger.error("importCILExcelFile error.", e);
return OperationResultDto.error(ErrorMessage.SystemError);
}
}
@ResponseBody
@RequestMapping(value = "displayImportLog", method = RequestMethod.GET)
public List<DataImportLogDto> displayImportLog(@RequestParam Integer type) {
......
......@@ -55,6 +55,30 @@ public class DataPreviewController extends BaseController {
return dataPreviewSerivceImpl.getBSDataForDisplay(param);
}
@PostMapping("getIRDataForDisplay")
public PageInfo<InvoiceRecordDto> getIRDataForDisplay(@RequestBody InvoiceRecordParam param) {
logger.debug(String.format("发票记录表查询 Condition:%s", JSON.toJSONString(param)));
return dataPreviewSerivceImpl.getIRDataForDisplay(param);
}
@PostMapping("getRLITDataForDisplay")
public PageInfo<RedLetterInfoTableDto> getRLITDataForDisplay(@RequestBody RedLetterInfoTableParam param) {
logger.debug(String.format("红字信息表查询 Condition:%s", JSON.toJSONString(param)));
return dataPreviewSerivceImpl.getRLITDataForDisplay(param);
}
@PostMapping("getCPRDataForDisplay")
public PageInfo<CoupaPurchasingReportDto> getCPRDataForDisplay(@RequestBody CoupaPurchasingReportParam param) {
logger.debug(String.format("Coupa发票报告表查询 Condition:%s", JSON.toJSONString(param)));
return dataPreviewSerivceImpl.getCPRDataForDisplay(param);
}
@PostMapping("getCILDataForDisplay")
public PageInfo<CertifiedInvoicesListDto> getCILDataForDisplay(@RequestBody CertifiedInvoicesListParam param) {
logger.debug(String.format("已认证发票清单查询 Condition:%s", JSON.toJSONString(param)));
return dataPreviewSerivceImpl.getCILDataForDisplay(param);
}
@RequestMapping(value = "exportCFData/get", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public void downloadCFQueryData(@RequestBody CashFlowParam param, HttpServletResponse response) {
logger.debug("enter downloadCFQueryData");
......
......@@ -278,6 +278,10 @@ public class TemplateController extends BaseController implements ServletContext
return EnumImportType.CoupaPurchasingReport.name();
}else if(EnumImportType.InvoiceData.getCode().equals(fileType)){
return EnumImportType.InvoiceData.name();
}else if(EnumImportType.CertifiedInvoicesList.getCode().equals(fileType)){
return EnumImportType.CertifiedInvoicesList.name();
}else if(EnumImportType.InvoiceRecord.getCode().equals(fileType)){
return EnumImportType.InvoiceRecord.name();
}else if(EnumImportType.Undefined.getCode().equals(fileType)){
return EnumImportType.Undefined.name();
}
......
package pwc.taxtech.atms.dto.vatdto;
import pwc.taxtech.atms.dpo.PagingDto;
public class CertifiedInvoicesListParam {
private PagingDto pageInfo;
private String orgId;
private Integer periodStart;
private Integer periodEnd;
public Integer getPeriodStart() {
return periodStart;
}
public void setPeriodStart(Integer periodStart) {
this.periodStart = periodStart;
}
public Integer getPeriodEnd() {
return periodEnd;
}
public void setPeriodEnd(Integer periodEnd) {
this.periodEnd = periodEnd;
}
public String getOrgId() {
return this.orgId;
}
public void setOrgId(String orgId) {
this.orgId = orgId;
}
public PagingDto getPageInfo() {
return pageInfo;
}
public void setPageInfo(PagingDto pageInfo) {
this.pageInfo = pageInfo;
}
}
package pwc.taxtech.atms.dto.vatdto;
import pwc.taxtech.atms.dpo.PagingDto;
public class CoupaPurchasingReportParam {
private PagingDto pageInfo;
private String orgId;
private Integer periodStart;
private Integer periodEnd;
public Integer getPeriodStart() {
return periodStart;
}
public void setPeriodStart(Integer periodStart) {
this.periodStart = periodStart;
}
public Integer getPeriodEnd() {
return periodEnd;
}
public void setPeriodEnd(Integer periodEnd) {
this.periodEnd = periodEnd;
}
public String getOrgId() {
return this.orgId;
}
public void setOrgId(String orgId) {
this.orgId = orgId;
}
public PagingDto getPageInfo() {
return pageInfo;
}
public void setPageInfo(PagingDto pageInfo) {
this.pageInfo = pageInfo;
}
}
package pwc.taxtech.atms.dto.vatdto;
import pwc.taxtech.atms.dpo.PagingDto;
public class InvoiceRecordParam {
private PagingDto pageInfo;
private String orgId;
private Integer periodStart;
private Integer periodEnd;
public Integer getPeriodStart() {
return periodStart;
}
public void setPeriodStart(Integer periodStart) {
this.periodStart = periodStart;
}
public Integer getPeriodEnd() {
return periodEnd;
}
public void setPeriodEnd(Integer periodEnd) {
this.periodEnd = periodEnd;
}
public String getOrgId() {
return this.orgId;
}
public void setOrgId(String orgId) {
this.orgId = orgId;
}
public PagingDto getPageInfo() {
return pageInfo;
}
public void setPageInfo(PagingDto pageInfo) {
this.pageInfo = pageInfo;
}
}
package pwc.taxtech.atms.dto.vatdto;
import pwc.taxtech.atms.dpo.PagingDto;
public class RedLetterInfoTableParam {
private PagingDto pageInfo;
private String orgId;
private Integer periodStart;
private Integer periodEnd;
public Integer getPeriodStart() {
return periodStart;
}
public void setPeriodStart(Integer periodStart) {
this.periodStart = periodStart;
}
public Integer getPeriodEnd() {
return periodEnd;
}
public void setPeriodEnd(Integer periodEnd) {
this.periodEnd = periodEnd;
}
public String getOrgId() {
return this.orgId;
}
public void setOrgId(String orgId) {
this.orgId = orgId;
}
public PagingDto getPageInfo() {
return pageInfo;
}
public void setPageInfo(PagingDto pageInfo) {
this.pageInfo = pageInfo;
}
}
package pwc.taxtech.atms.vat.dao;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import pwc.taxtech.atms.MyVatMapper;
import pwc.taxtech.atms.vat.dpo.CertifiedInvoicesListCondition;
import pwc.taxtech.atms.vat.entity.CertifiedInvoicesList;
import pwc.taxtech.atms.vat.entity.CertifiedInvoicesListExample;
@Mapper
public interface CertifiedInvoicesListMapper extends MyVatMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table certified_invoices_list
*
* @mbg.generated
*/
long countByExample(CertifiedInvoicesListExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table certified_invoices_list
*
* @mbg.generated
*/
int deleteByExample(CertifiedInvoicesListExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table certified_invoices_list
*
* @mbg.generated
*/
int deleteByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table certified_invoices_list
*
* @mbg.generated
*/
int insert(CertifiedInvoicesList record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table certified_invoices_list
*
* @mbg.generated
*/
int insertSelective(CertifiedInvoicesList record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table certified_invoices_list
*
* @mbg.generated
*/
List<CertifiedInvoicesList> selectByExampleWithRowbounds(CertifiedInvoicesListExample example, RowBounds rowBounds);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table certified_invoices_list
*
* @mbg.generated
*/
List<CertifiedInvoicesList> selectByExample(CertifiedInvoicesListExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table certified_invoices_list
*
* @mbg.generated
*/
CertifiedInvoicesList selectByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table certified_invoices_list
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") CertifiedInvoicesList record, @Param("example") CertifiedInvoicesListExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table certified_invoices_list
*
* @mbg.generated
*/
int updateByExample(@Param("record") CertifiedInvoicesList record, @Param("example") CertifiedInvoicesListExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table certified_invoices_list
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(CertifiedInvoicesList record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table certified_invoices_list
*
* @mbg.generated
*/
int updateByPrimaryKey(CertifiedInvoicesList record);
int insertBatch(List<CertifiedInvoicesList> cils);
List<CertifiedInvoicesList> selectByCondition(@Param("cilCondition") CertifiedInvoicesListCondition condition);
}
\ No newline at end of file
......@@ -5,6 +5,7 @@ import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import pwc.taxtech.atms.MyVatMapper;
import pwc.taxtech.atms.vat.dpo.CoupaPurchasingReportCondition;
import pwc.taxtech.atms.vat.entity.CoupaPurchasingReport;
import pwc.taxtech.atms.vat.entity.CoupaPurchasingReportExample;
......@@ -107,4 +108,6 @@ public interface CoupaPurchasingReportMapper extends MyVatMapper {
int updateByPrimaryKey(CoupaPurchasingReport record);
int insertBatch(List<CoupaPurchasingReport> cprs);
List<CoupaPurchasingReport> selectByCondition(@Param("cprCondition") CoupaPurchasingReportCondition condition);
}
\ No newline at end of file
......@@ -5,6 +5,7 @@ import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import pwc.taxtech.atms.MyVatMapper;
import pwc.taxtech.atms.vat.dpo.RedLetterInfoTableCondition;
import pwc.taxtech.atms.vat.entity.RedLetterInfoTable;
import pwc.taxtech.atms.vat.entity.RedLetterInfoTableExample;
......@@ -107,4 +108,6 @@ public interface RedLetterInfoTableMapper extends MyVatMapper {
int updateByPrimaryKey(RedLetterInfoTable record);
int insertBatch(List<RedLetterInfoTable> rlits);
List<RedLetterInfoTable> selectByCondition(@Param("rlitCondition") RedLetterInfoTableCondition condition);
}
\ No newline at end of file
......@@ -11,6 +11,7 @@
controller: 'importATController',
link: function (scope, element) {
$('.main-contents')[0].style.width = "260px";
$('.data-import-contents')[0].style.display = "block";
$('.main-contents')[0].style.float = "left";
$('.main-contents')[0].style.styleFloat = "left";
$('.main-contents')[0].style.cssFloat = "left";
......
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