Commit 097ae99c authored by zhkwei's avatar zhkwei

Merge remote-tracking branch 'origin/dev_mysql' into dev_mysql

# Conflicts:
#	atms-web/src/main/webapp/Scripts/module-part2.js
#	atms-web/src/main/webapp/app/common/controls/import/import-cit-journal-adjust/import-cit-journal-adjust.ctrl.js
parents 618f7876 772a2824
......@@ -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;
}
/**
* 得到现在时间
*
......
......@@ -10,7 +10,6 @@ import pwc.taxtech.atms.invoice.OutputInvoiceDetailMapper;
import pwc.taxtech.atms.invoice.OutputInvoiceMapper;
import pwc.taxtech.atms.service.impl.DistributedIdService;
import pwc.taxtech.atms.vat.dao.*;
import pwc.taxtech.atms.vat.entity.OutputInvoiceDetail;
//用来获取spring托管的bean
@Component
......@@ -53,6 +52,9 @@ public class SpringContextUtil implements ApplicationContextAware {
public static OrganizationMapper organizationMapper;
public static EnterpriseAccountSetOrgMapper enterpriseAccountSetOrgMapper;
public static AccountMappingMapper accountMappingMapper;
public static TrialBalanceMapper trialBalanceMapper;
public static AdjustmentTableMapper adjustmentTableMapper;
public static TrialBalanceFinalMapper trialBalanceFinalMapper;
/**
* 获取bean
......@@ -106,5 +108,8 @@ public class SpringContextUtil implements ApplicationContextAware {
enterpriseAccountSetOrgMapper = webApplicationContext.getBean(EnterpriseAccountSetOrgMapper.class);
accountMappingMapper = webApplicationContext.getBean(AccountMappingMapper.class);
glBalanceMapper = webApplicationContext.getBean(GlBalanceMapper.class);
trialBalanceMapper = webApplicationContext.getBean(TrialBalanceMapper.class);
adjustmentTableMapper = webApplicationContext.getBean(AdjustmentTableMapper.class);
trialBalanceFinalMapper = webApplicationContext.getBean(TrialBalanceFinalMapper.class);
}
}
......@@ -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) {
......
......@@ -2,12 +2,13 @@ package pwc.taxtech.atms.controller;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import pwc.taxtech.atms.dto.ApiResultDto;
import pwc.taxtech.atms.dto.ebsdto.JEqueryDto;
import pwc.taxtech.atms.dto.ebsdto.*;
import pwc.taxtech.atms.service.EbsApiService;
import javax.annotation.Resource;
......@@ -18,13 +19,14 @@ import java.util.List;
@RequestMapping("/ebs/api/v1/dd")
public class EbsApiController {
private static final Logger logger= LoggerFactory.getLogger(EbsApiController.class);
private static final Logger logger = LoggerFactory.getLogger(EbsApiController.class);
@Resource
private EbsApiService ebsApiService;
@RequestMapping(value = "/queryRemoteServerThenUpdateJE", method = RequestMethod.POST)
public ApiResultDto queryRemoteServerThenUpdateJE(@RequestBody List<JEqueryDto> items) {
if (items!=null&&!items.isEmpty()) {
public ApiResultDto queryRemoteServerThenUpdateJE(@RequestBody List<JournalEntryQueryDto> items) {
if (CollectionUtils.isEmpty(items)) {
logger.debug("the queryRemoteServerThenUpdateJE return items is empty");
return ApiResultDto.success(Collections.emptyList());
}
try {
......@@ -36,5 +38,109 @@ public class EbsApiController {
return ApiResultDto.fail();
}
@RequestMapping(value = "/queryRemoteServerThenUpdateTB", method = RequestMethod.POST)
public ApiResultDto queryRemoteServerThenUpdateTB(@RequestBody List<TrialBalanceQueryDto> items) {
if (CollectionUtils.isEmpty(items)) {
logger.debug("the queryRemoteServerThenUpdateTB return items is empty");
return ApiResultDto.success(Collections.emptyList());
}
try {
ebsApiService.queryRemoteServerThenUpdateTB(items);
return ApiResultDto.success();
} catch (Exception e) {
logger.error("queryRemoteServerThenUpdateTB error.", e);
}
return ApiResultDto.fail();
}
@RequestMapping(value = "/queryRemoteServerThenUpdateCF", method = RequestMethod.POST)
public ApiResultDto queryRemoteServerThenUpdateCF(@RequestBody List<CashFlowQueryDto> items) {
if (CollectionUtils.isEmpty(items)) {
logger.debug("the queryRemoteServerThenUpdateCF return items is empty");
return ApiResultDto.success(Collections.emptyList());
}
try {
ebsApiService.queryRemoteServerThenUpdateCF(items);
return ApiResultDto.success();
} catch (Exception e) {
logger.error("queryRemoteServerThenUpdateCF error.", e);
}
return ApiResultDto.fail();
}
@RequestMapping(value = "/queryRemoteServerThenUpdateBS", method = RequestMethod.POST)
public ApiResultDto queryRemoteServerThenUpdateBS(@RequestBody List<BalanceSheetQueryDto> items) {
if (CollectionUtils.isEmpty(items)) {
logger.debug("the queryRemoteServerThenUpdateBS return items is empty");
return ApiResultDto.success(Collections.emptyList());
}
try {
ebsApiService.queryRemoteServerThenUpdateBS(items);
return ApiResultDto.success();
} catch (Exception e) {
logger.error("queryRemoteServerThenUpdateBS error.", e);
}
return ApiResultDto.fail();
}
@RequestMapping(value = "/queryRemoteServerThenUpdatePL", method = RequestMethod.POST)
public ApiResultDto queryRemoteServerThenUpdatePL(@RequestBody List<ProfitLossStatementQueryDto> items) {
if (CollectionUtils.isEmpty(items)) {
logger.debug("the queryRemoteServerThenUpdatePL return items is empty");
return ApiResultDto.success(Collections.emptyList());
}
try {
ebsApiService.queryRemoteServerThenUpdatePL(items);
return ApiResultDto.success();
} catch (Exception e) {
logger.error("queryRemoteServerThenUpdatePL error.", e);
}
return ApiResultDto.fail();
}
@RequestMapping(value = "/queryRemoteServerThenUpdateBSprc", method = RequestMethod.POST)
public ApiResultDto queryRemoteServerThenUpdateBSprc(@RequestBody List<BalanceSheetPrcQueryDto> items) {
if (CollectionUtils.isEmpty(items)) {
logger.debug("the queryRemoteServerThenUpdateBSprc return items is empty");
return ApiResultDto.success(Collections.emptyList());
}
try {
ebsApiService.queryRemoteServerThenUpdateBSprc(items);
return ApiResultDto.success();
} catch (Exception e) {
logger.error("queryRemoteServerThenUpdateBSprc error.", e);
}
return ApiResultDto.fail();
}
@RequestMapping(value = "/queryRemoteServerThenUpdatePLprc", method = RequestMethod.POST)
public ApiResultDto queryRemoteServerThenUpdatePLprc(@RequestBody List<ProfitLossStatementPrcQueryDto> items) {
if (CollectionUtils.isEmpty(items)) {
logger.debug("the queryRemoteServerThenUpdatePL return items is empty");
return ApiResultDto.success(Collections.emptyList());
}
try {
ebsApiService.queryRemoteServerThenUpdatePLprc(items);
return ApiResultDto.success();
} catch (Exception e) {
logger.error("queryRemoteServerThenUpdatePLprc error.", e);
}
return ApiResultDto.fail();
}
@RequestMapping(value = "/queryRemoteServerThenUpdateOAR", method = RequestMethod.POST)
public ApiResultDto queryRemoteServerThenUpdateOAR(@RequestBody List<OrganizationAccountingRateQueryDto> items) {
if (CollectionUtils.isEmpty(items)) {
logger.debug("the queryRemoteServerThenUpdateOAR return items is empty");
return ApiResultDto.success(Collections.emptyList());
}
try {
ebsApiService.queryRemoteServerThenUpdateOAR(items);
return ApiResultDto.success();
} catch (Exception e) {
logger.error("queryRemoteServerThenUpdateOAR error.", e);
}
return ApiResultDto.fail();
}
}
......@@ -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();
}
......
......@@ -37,6 +37,28 @@ public class OrganizationAccountingRateDto implements Serializable {
*/
private String organizationId;
/**
* Database Column Remarks:
* 期间
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column organization_accounting_rate.period
*
* @mbg.generated
*/
private Integer period;
/**
* Database Column Remarks:
* 汇率类型
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column organization_accounting_rate.convertion_type
*
* @mbg.generated
*/
private String convertionType;
/**
* Database Column Remarks:
* 货币自
......@@ -170,6 +192,54 @@ public class OrganizationAccountingRateDto implements Serializable {
this.organizationId = organizationId == null ? null : organizationId.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column organization_accounting_rate.period
*
* @return the value of organization_accounting_rate.period
*
* @mbg.generated
*/
public Integer getPeriod() {
return period;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column organization_accounting_rate.period
*
* @param period the value for organization_accounting_rate.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 organization_accounting_rate.convertion_type
*
* @return the value of organization_accounting_rate.convertion_type
*
* @mbg.generated
*/
public String getConvertionType() {
return convertionType;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column organization_accounting_rate.convertion_type
*
* @param convertionType the value for organization_accounting_rate.convertion_type
*
* @mbg.generated
*/
public void setConvertionType(String convertionType) {
this.convertionType = convertionType == null ? null : convertionType.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column organization_accounting_rate.currency_from
......@@ -352,6 +422,8 @@ public class OrganizationAccountingRateDto implements Serializable {
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", organizationId=").append(organizationId);
sb.append(", period=").append(period);
sb.append(", convertionType=").append(convertionType);
sb.append(", currencyFrom=").append(currencyFrom);
sb.append(", currencyTo=").append(currencyTo);
sb.append(", startDate=").append(startDate);
......
package pwc.taxtech.atms.service;
import pwc.taxtech.atms.dto.ebsdto.JEqueryDto;
import pwc.taxtech.atms.dto.ebsdto.*;
import java.util.List;
......@@ -8,7 +8,57 @@ public interface EbsApiService {
/**
* EBS 日记账同步更新
*
* @param items
*/
void queryRemoteServerThenUpdateJE(List<JEqueryDto> items);
void queryRemoteServerThenUpdateJE(List<JournalEntryQueryDto> items);
/**
* ebs 科目余额表同步更新
*
* @param items
*/
void queryRemoteServerThenUpdateTB(List<TrialBalanceQueryDto> items);
/**
* ebs 现金流量表同步更新
*
* @param items
*/
void queryRemoteServerThenUpdateCF(List<CashFlowQueryDto> items);
/**
* ebs 资产负债表同步更新
*
* @param items
*/
void queryRemoteServerThenUpdateBS(List<BalanceSheetQueryDto> items);
/**
* ebs 资产负债表PRC同步更新
*
* @param items
*/
void queryRemoteServerThenUpdateBSprc(List<BalanceSheetPrcQueryDto> items);
/**
* ebs 利润表同步更新
*
* @param items
*/
void queryRemoteServerThenUpdatePL(List<ProfitLossStatementQueryDto> items);
/**
* ebs 利润表PRC同步更新
*
* @param items
*/
void queryRemoteServerThenUpdatePLprc(List<ProfitLossStatementPrcQueryDto> items);
/**
* ebs 汇率表同步更新
*
* @param items
*/
void queryRemoteServerThenUpdateOAR(List<OrganizationAccountingRateQueryDto> items);
}
......@@ -188,7 +188,7 @@
}
}
.importPLStatusGridContainer {
.importIRStatusGridContainer {
height: calc(~'100% - 30px');
overflow: hidden;
position: absolute;
......
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