Commit a1399503 authored by gary's avatar gary

1、数据抽取

2、fixbug
parent c6bee104
package pwc.taxtech.atms.common.schedule; package pwc.taxtech.atms.common.schedule;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.google.common.collect.Lists;
import org.quartz.JobDataMap; import org.quartz.JobDataMap;
import org.quartz.JobExecutionContext; import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException; import org.quartz.JobExecutionException;
...@@ -50,11 +52,13 @@ public class OrgSyncJob extends QuartzJobBean { ...@@ -50,11 +52,13 @@ public class OrgSyncJob extends QuartzJobBean {
headers.put("Content-Type", "application/x-www-form-urlencoded"); headers.put("Content-Type", "application/x-www-form-urlencoded");
headers.put("Idap", "eddie.wu_v"); headers.put("Idap", "eddie.wu_v");
int pageSize = 1; int pageSize = 1;
List<OrgSyncData> failObjs = Lists.newArrayList();
try { try {
for (int i = 1; i <= pageSize; i++) { for (int i = 1; i <= pageSize; i++) {
String response = HttpUtil.get(orgSyncUrl+"?currentPage="+i, headers); String response = HttpUtil.get(orgSyncUrl+"?currentPage="+i, headers);
logger.info("机构信息同步记录:"+response);
DDSyncOrgInfo ddSyncOrgInfo = JSONObject.parseObject(response, DDSyncOrgInfo.class); DDSyncOrgInfo ddSyncOrgInfo = JSONObject.parseObject(response, DDSyncOrgInfo.class);
pageSize = ddSyncOrgInfo.getPageSize(); pageSize = ddSyncOrgInfo.getTotalPage();
List<OrgSyncData> orgSyncDatas = ddSyncOrgInfo.getData(); List<OrgSyncData> orgSyncDatas = ddSyncOrgInfo.getData();
orgSyncDatas.forEach(osd -> { orgSyncDatas.forEach(osd -> {
OrganizationExample example = new OrganizationExample(); OrganizationExample example = new OrganizationExample();
...@@ -77,10 +81,13 @@ public class OrgSyncJob extends QuartzJobBean { ...@@ -77,10 +81,13 @@ public class OrgSyncJob extends QuartzJobBean {
if (regions.size() > 0) { if (regions.size() > 0) {
o.setRegionId(regions.get(0).getId()); o.setRegionId(regions.get(0).getId());
} }
if(organizationMapper.countByExample(example)<1){
failObjs.add(osd);
}
organizationMapper.updateByExampleSelective(o, example); organizationMapper.updateByExampleSelective(o, example);
}); });
} }
logger.info("同步未匹配的机构记录:"+ JSON.toJSONString(failObjs));
} catch (Exception e) { } catch (Exception e) {
logger.error(String.format("机构信息同步异常:[%s]", e.getMessage()), e); logger.error(String.format("机构信息同步异常:[%s]", e.getMessage()), e);
} }
......
package pwc.taxtech.atms.common.util;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.atomic.AtomicInteger;
/**
* @Auther: Gary J Li
* @Date: 16/03/2019 10:11
* @Description:
*/
public class BaseThreadFactory implements ThreadFactory {
private static final AtomicInteger poolNumber = new AtomicInteger(1);
private final ThreadGroup group;
private final AtomicInteger threadNumber = new AtomicInteger(1);
private final String namePrefix;
public BaseThreadFactory(String poolName) {
SecurityManager s = System.getSecurityManager();
group = (s != null) ? s.getThreadGroup() :
Thread.currentThread().getThreadGroup();
namePrefix = poolName+"-pool-" +
poolNumber.getAndIncrement() +
"-thread-";
}
@Override
public Thread newThread(Runnable r) {
Thread t = new Thread(group, r,
namePrefix + threadNumber.getAndIncrement(),
0);
if (t.isDaemon())
t.setDaemon(false);
if (t.getPriority() != Thread.NORM_PRIORITY)
t.setPriority(Thread.NORM_PRIORITY);
return t;
}
}
...@@ -630,6 +630,38 @@ public class DateUtils { ...@@ -630,6 +630,38 @@ public class DateUtils {
return true; return true;
} }
/**
* 获得该月第一天
* @param year
* @param month
* @return
*/
public static String getFirstDayOfMonth(int year,int month){
Calendar cal = Calendar.getInstance();
cal.set(Calendar.YEAR,year);
cal.set(Calendar.MONTH, month-1);
int firstDay = cal.getActualMinimum(Calendar.DAY_OF_MONTH);
cal.set(Calendar.DAY_OF_MONTH, firstDay);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
return sdf.format(cal.getTime());
}
/**
* 获得该月最后一天
* @param year
* @param month
* @return
*/
public static String getLastDayOfMonth(int year,int month){
Calendar cal = Calendar.getInstance();
cal.set(Calendar.YEAR,year);
cal.set(Calendar.MONTH, month-1);
int lastDay = cal.getActualMaximum(Calendar.DAY_OF_MONTH);
cal.set(Calendar.DAY_OF_MONTH, lastDay);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
return sdf.format(cal.getTime());
}
public static String getPeriodBegin(int year, int period) { public static String getPeriodBegin(int year, int period) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Calendar calendar = Calendar.getInstance(); Calendar calendar = Calendar.getInstance();
......
package pwc.taxtech.atms.constant;
/**
* @Auther: Gary J Li
* @Date: 16/03/2019 00:44
* @Description:
*/
public class EbsExtractTypeConstant {
public static final int TB = 100;
public static final int JE = 101;
public static final int BSPRC = 102;
public static final int PLPRC = 103;
public static final int BS = 104;
public static final int PL = 105;
public static final int CF = 106;
public static final int OCTB = 107;
public static final int RATE = 108;
}
package pwc.taxtech.atms.constant.enums; package pwc.taxtech.atms.constant.enums;
public enum EnumErrorCodeMsg { public enum EnumApiCodeMsg {
SUCCESS(0, "成功"), SUCCESS(0, "成功"),
APIERROR(-1, "接口异常"), APIERROR(-1, "接口异常"),
APIDATAEMPTY(-2, "接口输入数据为空"); APIDATAEMPTY(-2, "接口输入数据为空"),
/** ebs调用Msg**/
CALLSUCCESS(10000, "调用成功,获取数据中![%s]"),
CALLFAILED(-10000, "调用EBS接口失败![%s]"),
BUSY(-10001, "接口调用失败,系统正忙!"),
;
private Integer code; private Integer code;
private String msg; private String msg;
EnumErrorCodeMsg(Integer code, String msg) { EnumApiCodeMsg(Integer code, String msg) {
this.code = code; this.code = code;
this.msg = msg; this.msg = msg;
} }
...@@ -22,19 +29,19 @@ public enum EnumErrorCodeMsg { ...@@ -22,19 +29,19 @@ public enum EnumErrorCodeMsg {
return msg; return msg;
} }
public static EnumErrorCodeMsg fromCode(Integer code){ public static EnumApiCodeMsg fromCode(Integer code){
for(EnumErrorCodeMsg error: EnumErrorCodeMsg.values()){ for(EnumApiCodeMsg error: EnumApiCodeMsg.values()){
if(error.getCode().intValue()==code.intValue())return error; if(error.getCode().intValue()==code.intValue())return error;
} }
// 超出范围值默认返回异常 // 超出范围值默认返回异常
return EnumErrorCodeMsg.APIERROR; return EnumApiCodeMsg.APIERROR;
} }
public static String getMsg(Integer code){ public static String getMsg(Integer code){
for(EnumErrorCodeMsg error: EnumErrorCodeMsg.values()){ for(EnumApiCodeMsg error: EnumApiCodeMsg.values()){
if(error.getCode().intValue()==code.intValue())return error.msg; if(error.getCode().intValue()==code.intValue())return error.msg;
} }
// 超出范围值默认返回异常 // 超出范围值默认返回异常
return EnumErrorCodeMsg.APIERROR.msg; return EnumApiCodeMsg.APIERROR.msg;
} }
} }
package pwc.taxtech.atms.constant.enums;
public enum EnumEbsExtractType {
TB(100,"月度科目余额表"),
JE(101,"日记账"),
BSPRC(102,"资产负债表PRC"),
PLPRC(103,"利润表PRC"),
BS(104,"资产负债表"),
PL(105,"利润表"),
CF(106,"直接法现金流量表"),
OCTB(107,"所有者权益变动表"),
RATE(108,"汇率表");
private int code;
private String file;
EnumEbsExtractType(int code, String file) {
this.code = code;
this.file = file;
}
public int getCode() {
return code;
}
public String getFile() {
return file;
}
public static String getNameByCode(int code){
for(EnumEbsExtractType enumImportType : EnumEbsExtractType.values()){
if(Integer.compare(code, enumImportType.getCode())==0){
return enumImportType.getFile();
}
}
return null;
}
}
...@@ -4,7 +4,7 @@ import org.slf4j.Logger; ...@@ -4,7 +4,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import pwc.taxtech.atms.constant.enums.EnumErrorCodeMsg; import pwc.taxtech.atms.constant.enums.EnumApiCodeMsg;
import pwc.taxtech.atms.dto.ApiResultDto; import pwc.taxtech.atms.dto.ApiResultDto;
import pwc.taxtech.atms.dto.ebsdto.*; import pwc.taxtech.atms.dto.ebsdto.*;
import pwc.taxtech.atms.service.EbsApiService; import pwc.taxtech.atms.service.EbsApiService;
...@@ -28,18 +28,18 @@ public class EbsApiController { ...@@ -28,18 +28,18 @@ public class EbsApiController {
ApiResultDto apiResultDto = new ApiResultDto(); ApiResultDto apiResultDto = new ApiResultDto();
if (CollectionUtils.isEmpty(items)) { if (CollectionUtils.isEmpty(items)) {
logger.debug("the updateJE return items is empty"); logger.debug("the updateJE return items is empty");
setApiResult(apiResultDto,EnumErrorCodeMsg.APIDATAEMPTY); setApiResult(apiResultDto, EnumApiCodeMsg.APIDATAEMPTY);
return apiResultDto; return apiResultDto;
} }
try{ try{
ebsApiService.queryRemoteServerThenUpdateJE(id,items); ebsApiService.queryRemoteServerThenUpdateJE(id,items);
logger.debug("日记账同步更新 success"); logger.debug("日记账同步更新 success");
setApiResult(apiResultDto,EnumErrorCodeMsg.SUCCESS); setApiResult(apiResultDto, EnumApiCodeMsg.SUCCESS);
return apiResultDto; return apiResultDto;
}catch(Exception e){ }catch(Exception e){
logger.error("updateJE error.", e); logger.error("updateJE error.", e);
e.printStackTrace(); e.printStackTrace();
setApiResult(apiResultDto,EnumErrorCodeMsg.APIERROR); setApiResult(apiResultDto, EnumApiCodeMsg.APIERROR);
return apiResultDto; return apiResultDto;
} }
} }
...@@ -50,18 +50,18 @@ public class EbsApiController { ...@@ -50,18 +50,18 @@ public class EbsApiController {
ApiResultDto apiResultDto = new ApiResultDto(); ApiResultDto apiResultDto = new ApiResultDto();
if (CollectionUtils.isEmpty(items)) { if (CollectionUtils.isEmpty(items)) {
logger.debug("the updateTB return items is empty"); logger.debug("the updateTB return items is empty");
setApiResult(apiResultDto,EnumErrorCodeMsg.APIDATAEMPTY); setApiResult(apiResultDto, EnumApiCodeMsg.APIDATAEMPTY);
return apiResultDto; return apiResultDto;
} }
try{ try{
ebsApiService.queryRemoteServerThenUpdateTB(id,items); ebsApiService.queryRemoteServerThenUpdateTB(id,items);
logger.debug("科目余额数据同步更新 success"); logger.debug("科目余额数据同步更新 success");
setApiResult(apiResultDto,EnumErrorCodeMsg.SUCCESS); setApiResult(apiResultDto, EnumApiCodeMsg.SUCCESS);
return apiResultDto; return apiResultDto;
}catch(Exception e){ }catch(Exception e){
logger.error("updateTB error.", e); logger.error("updateTB error.", e);
e.printStackTrace(); e.printStackTrace();
setApiResult(apiResultDto,EnumErrorCodeMsg.APIERROR); setApiResult(apiResultDto, EnumApiCodeMsg.APIERROR);
return apiResultDto; return apiResultDto;
} }
} }
...@@ -72,18 +72,18 @@ public class EbsApiController { ...@@ -72,18 +72,18 @@ public class EbsApiController {
ApiResultDto apiResultDto = new ApiResultDto(); ApiResultDto apiResultDto = new ApiResultDto();
if (CollectionUtils.isEmpty(items)) { if (CollectionUtils.isEmpty(items)) {
logger.debug("the updateCF return items is empty"); logger.debug("the updateCF return items is empty");
setApiResult(apiResultDto,EnumErrorCodeMsg.APIDATAEMPTY); setApiResult(apiResultDto, EnumApiCodeMsg.APIDATAEMPTY);
return apiResultDto; return apiResultDto;
} }
try{ try{
ebsApiService.queryRemoteServerThenUpdateCF(id,items); ebsApiService.queryRemoteServerThenUpdateCF(id,items);
logger.debug("现金流量数据同步更新 success"); logger.debug("现金流量数据同步更新 success");
setApiResult(apiResultDto,EnumErrorCodeMsg.SUCCESS); setApiResult(apiResultDto, EnumApiCodeMsg.SUCCESS);
return apiResultDto; return apiResultDto;
}catch(Exception e){ }catch(Exception e){
logger.error("updateCF error.", e); logger.error("updateCF error.", e);
e.printStackTrace(); e.printStackTrace();
setApiResult(apiResultDto,EnumErrorCodeMsg.APIERROR); setApiResult(apiResultDto, EnumApiCodeMsg.APIERROR);
return apiResultDto; return apiResultDto;
} }
} }
...@@ -94,18 +94,18 @@ public class EbsApiController { ...@@ -94,18 +94,18 @@ public class EbsApiController {
ApiResultDto apiResultDto = new ApiResultDto(); ApiResultDto apiResultDto = new ApiResultDto();
if (CollectionUtils.isEmpty(items)) { if (CollectionUtils.isEmpty(items)) {
logger.debug("the updateBS return items is empty"); logger.debug("the updateBS return items is empty");
setApiResult(apiResultDto,EnumErrorCodeMsg.APIDATAEMPTY); setApiResult(apiResultDto, EnumApiCodeMsg.APIDATAEMPTY);
return apiResultDto; return apiResultDto;
} }
try{ try{
ebsApiService.queryRemoteServerThenUpdateBS(id,items); ebsApiService.queryRemoteServerThenUpdateBS(id,items);
logger.debug("资产负债数据同步更新 success"); logger.debug("资产负债数据同步更新 success");
setApiResult(apiResultDto,EnumErrorCodeMsg.SUCCESS); setApiResult(apiResultDto, EnumApiCodeMsg.SUCCESS);
return apiResultDto; return apiResultDto;
}catch(Exception e){ }catch(Exception e){
logger.error("updateBS error.", e); logger.error("updateBS error.", e);
e.printStackTrace(); e.printStackTrace();
setApiResult(apiResultDto,EnumErrorCodeMsg.APIERROR); setApiResult(apiResultDto, EnumApiCodeMsg.APIERROR);
return apiResultDto; return apiResultDto;
} }
} }
...@@ -116,18 +116,18 @@ public class EbsApiController { ...@@ -116,18 +116,18 @@ public class EbsApiController {
ApiResultDto apiResultDto = new ApiResultDto(); ApiResultDto apiResultDto = new ApiResultDto();
if (CollectionUtils.isEmpty(items)) { if (CollectionUtils.isEmpty(items)) {
logger.debug("the updatePL return items is empty"); logger.debug("the updatePL return items is empty");
setApiResult(apiResultDto,EnumErrorCodeMsg.APIDATAEMPTY); setApiResult(apiResultDto, EnumApiCodeMsg.APIDATAEMPTY);
return apiResultDto; return apiResultDto;
} }
try{ try{
ebsApiService.queryRemoteServerThenUpdatePL(id,items); ebsApiService.queryRemoteServerThenUpdatePL(id,items);
logger.debug("利润数据同步更新 success"); logger.debug("利润数据同步更新 success");
setApiResult(apiResultDto,EnumErrorCodeMsg.SUCCESS); setApiResult(apiResultDto, EnumApiCodeMsg.SUCCESS);
return apiResultDto; return apiResultDto;
}catch(Exception e){ }catch(Exception e){
logger.error("updatePL error.", e); logger.error("updatePL error.", e);
e.printStackTrace(); e.printStackTrace();
setApiResult(apiResultDto,EnumErrorCodeMsg.APIERROR); setApiResult(apiResultDto, EnumApiCodeMsg.APIERROR);
return apiResultDto; return apiResultDto;
} }
} }
...@@ -138,17 +138,17 @@ public class EbsApiController { ...@@ -138,17 +138,17 @@ public class EbsApiController {
ApiResultDto apiResultDto = new ApiResultDto(); ApiResultDto apiResultDto = new ApiResultDto();
if (CollectionUtils.isEmpty(items)) { if (CollectionUtils.isEmpty(items)) {
logger.debug("the updateBSprc return items is empty"); logger.debug("the updateBSprc return items is empty");
setApiResult(apiResultDto,EnumErrorCodeMsg.APIDATAEMPTY); setApiResult(apiResultDto, EnumApiCodeMsg.APIDATAEMPTY);
return apiResultDto; return apiResultDto;
} }
try{ try{
ebsApiService.queryRemoteServerThenUpdateBSprc(id,items); ebsApiService.queryRemoteServerThenUpdateBSprc(id,items);
logger.debug("资产负债PRC数据同步更新 success"); logger.debug("资产负债PRC数据同步更新 success");
setApiResult(apiResultDto,EnumErrorCodeMsg.SUCCESS); setApiResult(apiResultDto, EnumApiCodeMsg.SUCCESS);
return apiResultDto; return apiResultDto;
}catch(Exception e){ }catch(Exception e){
logger.error("updateBSprc error.", e); logger.error("updateBSprc error.", e);
setApiResult(apiResultDto,EnumErrorCodeMsg.APIERROR); setApiResult(apiResultDto, EnumApiCodeMsg.APIERROR);
return apiResultDto; return apiResultDto;
} }
} }
...@@ -159,17 +159,17 @@ public class EbsApiController { ...@@ -159,17 +159,17 @@ public class EbsApiController {
ApiResultDto apiResultDto = new ApiResultDto(); ApiResultDto apiResultDto = new ApiResultDto();
if (CollectionUtils.isEmpty(items)) { if (CollectionUtils.isEmpty(items)) {
logger.debug("the updatePLprc return items is empty"); logger.debug("the updatePLprc return items is empty");
setApiResult(apiResultDto,EnumErrorCodeMsg.APIDATAEMPTY); setApiResult(apiResultDto, EnumApiCodeMsg.APIDATAEMPTY);
return apiResultDto; return apiResultDto;
} }
try{ try{
ebsApiService.queryRemoteServerThenUpdatePLprc(id,items); ebsApiService.queryRemoteServerThenUpdatePLprc(id,items);
logger.debug("利润PRC数据同步更新 success"); logger.debug("利润PRC数据同步更新 success");
setApiResult(apiResultDto,EnumErrorCodeMsg.SUCCESS); setApiResult(apiResultDto, EnumApiCodeMsg.SUCCESS);
return apiResultDto; return apiResultDto;
}catch(Exception e){ }catch(Exception e){
logger.error("updatePLprc error.", e); logger.error("updatePLprc error.", e);
setApiResult(apiResultDto,EnumErrorCodeMsg.APIERROR); setApiResult(apiResultDto, EnumApiCodeMsg.APIERROR);
return apiResultDto; return apiResultDto;
} }
} }
...@@ -180,17 +180,17 @@ public class EbsApiController { ...@@ -180,17 +180,17 @@ public class EbsApiController {
ApiResultDto apiResultDto = new ApiResultDto(); ApiResultDto apiResultDto = new ApiResultDto();
if (CollectionUtils.isEmpty(items)) { if (CollectionUtils.isEmpty(items)) {
logger.debug("the updateOAR return items is empty"); logger.debug("the updateOAR return items is empty");
setApiResult(apiResultDto,EnumErrorCodeMsg.APIDATAEMPTY); setApiResult(apiResultDto, EnumApiCodeMsg.APIDATAEMPTY);
return apiResultDto; return apiResultDto;
} }
try{ try{
ebsApiService.queryRemoteServerThenUpdateOAR(id,items); ebsApiService.queryRemoteServerThenUpdateOAR(id,items);
logger.debug("汇率数据同步更新 success"); logger.debug("汇率数据同步更新 success");
setApiResult(apiResultDto,EnumErrorCodeMsg.SUCCESS); setApiResult(apiResultDto, EnumApiCodeMsg.SUCCESS);
return apiResultDto; return apiResultDto;
}catch(Exception e){ }catch(Exception e){
logger.error("updateOAR error.", e); logger.error("updateOAR error.", e);
setApiResult(apiResultDto,EnumErrorCodeMsg.APIERROR); setApiResult(apiResultDto, EnumApiCodeMsg.APIERROR);
return apiResultDto; return apiResultDto;
} }
} }
...@@ -200,17 +200,17 @@ public class EbsApiController { ...@@ -200,17 +200,17 @@ public class EbsApiController {
ApiResultDto apiResultDto = new ApiResultDto(); ApiResultDto apiResultDto = new ApiResultDto();
if (CollectionUtils.isEmpty(items)) { if (CollectionUtils.isEmpty(items)) {
logger.debug("the updateOrg return items is empty"); logger.debug("the updateOrg return items is empty");
setApiResult(apiResultDto,EnumErrorCodeMsg.APIDATAEMPTY); setApiResult(apiResultDto, EnumApiCodeMsg.APIDATAEMPTY);
return apiResultDto; return apiResultDto;
} }
try{ try{
ebsApiService.queryRemoteServerThenUpdateOrg(id,items); ebsApiService.queryRemoteServerThenUpdateOrg(id,items);
logger.debug("机构信息数据同步更新 success"); logger.debug("机构信息数据同步更新 success");
setApiResult(apiResultDto,EnumErrorCodeMsg.SUCCESS); setApiResult(apiResultDto, EnumApiCodeMsg.SUCCESS);
return apiResultDto; return apiResultDto;
}catch(Exception e){ }catch(Exception e){
logger.error("updateOrg error.", e); logger.error("updateOrg error.", e);
setApiResult(apiResultDto,EnumErrorCodeMsg.APIERROR); setApiResult(apiResultDto, EnumApiCodeMsg.APIERROR);
return apiResultDto; return apiResultDto;
} }
} }
...@@ -227,16 +227,16 @@ public class EbsApiController { ...@@ -227,16 +227,16 @@ public class EbsApiController {
try{ try{
ebsApiService.changeCallBackStatus(callBackDto); ebsApiService.changeCallBackStatus(callBackDto);
logger.debug("ebs callback taskId:{},status:{} end ",callBackDto.getTaskId(),callBackDto.getTaskStatus()); logger.debug("ebs callback taskId:{},status:{} end ",callBackDto.getTaskId(),callBackDto.getTaskStatus());
setApiResult(apiResultDto,EnumErrorCodeMsg.SUCCESS); setApiResult(apiResultDto, EnumApiCodeMsg.SUCCESS);
return apiResultDto; return apiResultDto;
}catch(Exception e){ }catch(Exception e){
logger.error("ebs callback error.", e); logger.error("ebs callback error.", e);
setApiResult(apiResultDto,EnumErrorCodeMsg.APIERROR); setApiResult(apiResultDto, EnumApiCodeMsg.APIERROR);
return apiResultDto; return apiResultDto;
} }
} }
private void setApiResult(ApiResultDto apiResultDto,EnumErrorCodeMsg error) { private void setApiResult(ApiResultDto apiResultDto, EnumApiCodeMsg error) {
apiResultDto.setCode(error.getCode()); apiResultDto.setCode(error.getCode());
apiResultDto.setMessage(error.getMsg()); apiResultDto.setMessage(error.getMsg());
} }
......
...@@ -11,6 +11,10 @@ public class DataExtractParam { ...@@ -11,6 +11,10 @@ public class DataExtractParam {
private List<Integer> dataTypes; private List<Integer> dataTypes;
private String effectiveDateFrom;
private String effectiveDateTo;
public String getPeriod() { public String getPeriod() {
return period; return period;
} }
...@@ -34,4 +38,20 @@ public class DataExtractParam { ...@@ -34,4 +38,20 @@ public class DataExtractParam {
public void setDataTypes(List<Integer> dataTypes) { public void setDataTypes(List<Integer> dataTypes) {
this.dataTypes = dataTypes; this.dataTypes = dataTypes;
} }
public String getEffectiveDateFrom() {
return effectiveDateFrom;
}
public void setEffectiveDateFrom(String effectiveDateFrom) {
this.effectiveDateFrom = effectiveDateFrom;
}
public String getEffectiveDateTo() {
return effectiveDateTo;
}
public void setEffectiveDateTo(String effectiveDateTo) {
this.effectiveDateTo = effectiveDateTo;
}
} }
package pwc.taxtech.atms.dto.ebsdto;
/**
* @Auther: eddie.wu_v
* @Date: 2019/3/16 16:55
* @Description:
*/
public class EbsCallRateResp {
private String companyCode;
private int requestStatus;
private String errorMessage;
private String records;
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
public String getCompanyCode() {
return companyCode;
}
public void setRequestStatus(int requestStatus) {
this.requestStatus = requestStatus;
}
public int getRequestStatus() {
return requestStatus;
}
public void setErrorMessage(String errorMessage) {
this.errorMessage = errorMessage;
}
public String getErrorMessage() {
return errorMessage;
}
public void setRecords(String records) {
this.records = records;
}
public String getRecords() {
return records;
}
}
package pwc.taxtech.atms.dto.ebsdto;
import java.util.Date;
/**
* @Auther: eddie.wu_v
* @Date: 2019/3/15 17:07
* @Description:
*/
public class EbsCallResp {
private String errBuf;
private String retCode;
private int ledgerId;
private String companyCode;
private String period;
private String prcFlag;
private int taskId;
private String taskStatus;
private String taskDesc;
public void setErrBuf(String errBuf) {
this.errBuf = errBuf;
}
public String getErrBuf() {
return errBuf;
}
public void setRetCode(String retCode) {
this.retCode = retCode;
}
public String getRetCode() {
return retCode;
}
public void setLedgerId(int ledgerId) {
this.ledgerId = ledgerId;
}
public int getLedgerId() {
return ledgerId;
}
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
public String getCompanyCode() {
return companyCode;
}
public void setPeriod(String period) {
this.period = period;
}
public String getPeriod() {
return period;
}
public void setPrcFlag(String prcFlag) {
this.prcFlag = prcFlag;
}
public String getPrcFlag() {
return prcFlag;
}
public void setTaskId(int taskId) {
this.taskId = taskId;
}
public int getTaskId() {
return taskId;
}
public void setTaskStatus(String taskStatus) {
this.taskStatus = taskStatus;
}
public String getTaskStatus() {
return taskStatus;
}
public void setTaskDesc(String taskDesc) {
this.taskDesc = taskDesc;
}
public String getTaskDesc() {
return taskDesc;
}
}
package pwc.taxtech.atms.service.impl; package pwc.taxtech.atms.service.impl;
import java.util.Date; import java.util.Date;
import com.alibaba.fastjson.JSON;
import com.github.pagehelper.Page; import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
...@@ -9,15 +10,22 @@ import org.apache.commons.collections.CollectionUtils; ...@@ -9,15 +10,22 @@ import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.usermodel.*; import org.apache.poi.ss.usermodel.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import pwc.taxtech.atms.analysis.dao.*; import pwc.taxtech.atms.common.AuthUserHelper;
import pwc.taxtech.atms.analysis.entity.*;
import pwc.taxtech.atms.common.message.ErrorMessage; import pwc.taxtech.atms.common.message.ErrorMessage;
import pwc.taxtech.atms.common.message.ErrorMessageCN; import pwc.taxtech.atms.common.message.ErrorMessageCN;
import pwc.taxtech.atms.common.util.BaseThreadFactory;
import pwc.taxtech.atms.common.util.DateUtils; import pwc.taxtech.atms.common.util.DateUtils;
import pwc.taxtech.atms.common.util.HttpUtil;
import pwc.taxtech.atms.constant.Constant; import pwc.taxtech.atms.constant.Constant;
import pwc.taxtech.atms.constant.EbsExtractTypeConstant;
import pwc.taxtech.atms.constant.enums.EnumApiCodeMsg;
import pwc.taxtech.atms.constant.enums.EnumEbsExtractType;
import pwc.taxtech.atms.constant.enums.EnumImportType; import pwc.taxtech.atms.constant.enums.EnumImportType;
import pwc.taxtech.atms.constant.enums.EnumTbImportType; import pwc.taxtech.atms.constant.enums.EnumTbImportType;
import pwc.taxtech.atms.dao.*; import pwc.taxtech.atms.dao.*;
...@@ -28,6 +36,8 @@ import pwc.taxtech.atms.dto.DataValidateLogDto; ...@@ -28,6 +36,8 @@ import pwc.taxtech.atms.dto.DataValidateLogDto;
import pwc.taxtech.atms.dto.OperationResultDto; import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.dataimport.DataImportParam; import pwc.taxtech.atms.dto.dataimport.DataImportParam;
import pwc.taxtech.atms.dto.dataimport.DataProcessParam; import pwc.taxtech.atms.dto.dataimport.DataProcessParam;
import pwc.taxtech.atms.dto.ebsdto.EbsCallRateResp;
import pwc.taxtech.atms.dto.ebsdto.EbsCallResp;
import pwc.taxtech.atms.dto.vatdto.TrialBalanceDto; import pwc.taxtech.atms.dto.vatdto.TrialBalanceDto;
import pwc.taxtech.atms.dto.vatdto.TrialBalanceParam; import pwc.taxtech.atms.dto.vatdto.TrialBalanceParam;
import pwc.taxtech.atms.entity.*; import pwc.taxtech.atms.entity.*;
...@@ -40,6 +50,7 @@ import java.io.InputStream; ...@@ -40,6 +50,7 @@ import java.io.InputStream;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
import java.util.concurrent.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@Service @Service
...@@ -85,33 +96,28 @@ public class DataImportService extends BaseService { ...@@ -85,33 +96,28 @@ public class DataImportService extends BaseService {
private InvoiceRecordMapper invoiceRecordMapper; private InvoiceRecordMapper invoiceRecordMapper;
@Resource @Resource
private ProjectMapper projectMapper; private ProjectMapper projectMapper;
@Resource
private AnalysisDriverNumMapper analysisDriverNumMapper;
@Resource
private AnalysisEmployeeNumMapper analysisEmployeeNumMapper;
@Resource
private AnalysisExpectedTaxReturnMapper analysisExpectedTaxReturnMapper;
@Resource
private AnalysisActualTaxReturnMapper analysisActualTaxReturnMapper;
@Resource
private AnalysisFeeMapper analysisFeeMapper;
@Resource
private AnalysisFileManagementMapper analysisFileManagementMapper;
@Resource
private AnalysisGmvSubsidyMapper analysisGmvSubsidyMapper;
@Resource
private AnalysisInternationalBusinessDataMapper analysisInternationalBusinessDataMapper;
@Resource
private AnalysisInternationalTaxDataMapper analysisInternationalTaxDataMapper;
@Resource
private AnalysisMasterMapper analysisMasterMapper;
@Resource
private AnalysisSalesMapper analysisSalesMapper;
@Resource
private AnalysisTaxMapper analysisTaxMapper;
@Autowired @Autowired
private OrganizationServiceImpl organizationService; private OrganizationServiceImpl organizationService;
private static String ebsCallUrl;
@Value("${ebs_call_url}")
public void setEbsCallUrl(String url){
this.ebsCallUrl = url;
}
private static int corePoolSize = 15;
private static int maxPoolSize = 15;
private static int qSize = 5000;
private static BaseThreadFactory factory = new BaseThreadFactory("callEbs");
private static ExecutorService executorService = new ThreadPoolExecutor(corePoolSize, maxPoolSize,
0L,TimeUnit.MILLISECONDS,
new LinkedBlockingQueue<>(qSize),factory,new ThreadPoolExecutor.AbortPolicy());
/** /**
* TB表查询 * TB表查询
* *
...@@ -1673,7 +1679,6 @@ public class DataImportService extends BaseService { ...@@ -1673,7 +1679,6 @@ public class DataImportService extends BaseService {
List<String> orgIds = organizationService.getMyOrgList().stream().map(OrgSelectDto::getId).collect(Collectors.toList()); List<String> orgIds = organizationService.getMyOrgList().stream().map(OrgSelectDto::getId).collect(Collectors.toList());
// 这里会导致任何人都可以看到未映射到主体的数据 // 这里会导致任何人都可以看到未映射到主体的数据
orgIds.add(""); orgIds.add("");
if(!EnumImportType.Undefined.getCode().equals(param.getType())){ if(!EnumImportType.Undefined.getCode().equals(param.getType())){
criteria.andTypeEqualTo(param.getType()).andDisplayEqualTo(true); criteria.andTypeEqualTo(param.getType()).andDisplayEqualTo(true);
criteria.andOrganizationIdIn(orgIds); criteria.andOrganizationIdIn(orgIds);
...@@ -1716,18 +1721,71 @@ public class DataImportService extends BaseService { ...@@ -1716,18 +1721,71 @@ public class DataImportService extends BaseService {
return pageInfo; return pageInfo;
} }
public OperationResultDto callExtractFinancialData(DataExtractParam dataExtractParam) { /**
// todo 调用滴滴的http财务数据抽取调用接口 List<String> codes, Integer period, List<Integer> dataTypes * 16/03/2019 12:43
* 1、根据类型调用EBS接口
* 2、定长线程池超过最长时丢弃记录日志
* 3、调用成功使用taskId作为日志id,未成功使用随机id
* [param]
* @author Gary J Li
* @return
*/
public OperationResultDto callExtractFinancialData(DataExtractParam param) {
OrganizationExample example = new OrganizationExample(); OrganizationExample example = new OrganizationExample();
example.createCriteria().andIdIn(dataExtractParam.getOrgIds()); example.createCriteria().andIdIn(param.getOrgIds());
List<Organization> orgs = organizationMapper.selectByExample(example); List<Organization> orgs = organizationMapper.selectByExample(example);
// HttpUtil.post(); Integer periodInt = DateUtils.strToPeriod(param.getPeriod());
Integer tmsPeriod = DateUtils.strToPeriod(dataExtractParam.getPeriod()); String period = param.getPeriod();
// data_import_log 日志记录为 EnumImportType.ExtractFinancialData // 这两个参数未来可能有用
String effectiveDateFrom = param.getEffectiveDateFrom();
String effectiveDateTo = param.getEffectiveDateTo();
List<Future> resList = Lists.newArrayList();
List<Integer> dataTypes = param.getDataTypes();
dataTypes.forEach(type -> {
orgs.forEach(o -> {
try {
Callable callEbs = new CallEbsThread(type, o,ebsCallUrl,dataImportLogMapper,authUserHelper,
idService,period, effectiveDateFrom, effectiveDateTo);
executorService.submit(callEbs);
// resList.add(future);
} catch (RejectedExecutionException rje) {
// 这里可以考虑简化 没想好还
DataImportLog log = new DataImportLog();
log.setId(idService.nextId());
log.setTaxpayerIdNum(o.getTaxPayerNumber());
log.setCompanyCode(o.getCode());
log.setCompanyName(o.getName());
log.setPeriodYear(periodInt / 100);
log.setPeriodMonth(periodInt % 100);
log.setType(EnumImportType.ExtractFinancialData.getCode());
log.setFileType(EnumEbsExtractType.getNameByCode(type));
log.setImportResult(false);
log.setPeriodStatus("EBS抽取");
log.setOperator(authUserHelper.getCurrentAuditor().get());
log.setErrorMsg(EnumApiCodeMsg.BUSY.getMsg());
dataImportLogMapper.insertSelective(log);
} catch (Exception e) {
logger.error(String.format(EnumApiCodeMsg.CALLFAILED.getMsg(), e.getMessage()), e);
}
});
});
// 校验是否全部调用成功 这里有点问题
/*int res = 0;
try{
for(Future future : resList){
res += future.get()!=null?(Integer)future.get():0;
}
System.out.println(res);
if(res!=orgs.size()*dataTypes.size()){
return OperationResultDto.error("抽取失败");
}
}catch (Exception e){
logger.error("获取结果异常");
}*/
resList=null;
return OperationResultDto.success(); return OperationResultDto.success();
} }
/** /**
* 25/02/2019 18:26 * 25/02/2019 18:26
* *
...@@ -1767,4 +1825,146 @@ public class DataImportService extends BaseService { ...@@ -1767,4 +1825,146 @@ public class DataImportService extends BaseService {
return ""; return "";
} }
// get 测试获取数据 post 触发任务请求
/**
* "http://172.20.201.201:8020/ebs-proxy-test/dts/glMonthlyBal?ledgerId=2021&companyCode=120200&period=2018-11"
* "http://172.20.201.201:8020/ebs-proxy-test/dts/fsgCash/?ledgerId=2021&companyCode=120200&period=2019-02"
* "http://172.20.201.201:8020/ebs-proxy-test/dts/fsgAsset?ledgerId=2021&period=2018-12&companyCode=120113&prcFlag=N"
* "http://172.20.201.201:8020/ebs-proxy-test/dts//fsgProfit?ledgerId=2021&companyCode=120200&period=2018-10&prcFlag=Y"
* "http://172.20.201.201:8020/ebs-proxy-test/dts/glJeLines/?ledgerId=2041&companyCode=110100&effectiveDateFrom=2018-02-01&effectiveDateTo=2018-02-10"
* "http://172.20.201.201:8020/ebs-proxy-test/dts/dailyRates?period=2018-10"
*/
private static class CallEbsThread implements Callable {
protected final Logger logger = LoggerFactory.getLogger(this.getClass());
private int type;
private Organization org;
private String period;
private String ebsCallUrl;
private DataImportLogMapper dataImportLogMapper;
private AuthUserHelper authUserHelper;
private DistributedIdService idService;
private String effectiveDateFrom;
private String effectiveDateTo;
CallEbsThread(int type, Organization org,String ebsCallUrl,DataImportLogMapper dataImportLogMapper,
AuthUserHelper authUserHelper,DistributedIdService idService,String period,
String effectiveDateFrom, String effectiveDateTo) {
this.type = type;
this.org = org;
this.period = period;
this.ebsCallUrl = ebsCallUrl;
this.authUserHelper = authUserHelper;
this.idService = idService;
this.dataImportLogMapper = dataImportLogMapper;
this.effectiveDateFrom = effectiveDateFrom;
this.effectiveDateTo = effectiveDateTo;
}
@Override
public Object call(){
String response = null;
String ledgerId = org.getEnterpriseAccountCode();
String code = org.getCode();
Integer periodInt = DateUtils.strToPeriod(period);
int year = periodInt / 100;
int month = periodInt % 100;
DataImportLog log = new DataImportLog();
log.setTaxpayerIdNum(org.getTaxPayerNumber());
log.setOrganizationId(org.getId());
log.setCompanyCode(code);
log.setCompanyName(org.getName());
log.setPeriodYear(year);
log.setPeriodMonth(month);
log.setType(EnumImportType.ExtractFinancialData.getCode());
log.setFileType(EnumEbsExtractType.getNameByCode(type));
log.setPeriodStatus("EBS抽取");
log.setOperator(authUserHelper.getCurrentAuditor().get());
try {
switch (type) {
case EbsExtractTypeConstant.TB:
response = HttpUtil.post(ebsCallUrl + "/glMonthlyBal?ledgerId="+ledgerId+"&companyCode="+ code + "&period=" + period,
"","application/json;charset=utf-8", "UTF-8", 10000, 10000);
break;
case EbsExtractTypeConstant.JE:
// 这里BA反馈可按期间获取当月日记账即可
String effecDateFrom = DateUtils.getFirstDayOfMonth(year,month);
String effecDateTo = DateUtils.getLastDayOfMonth(year,month);
response = HttpUtil.post(ebsCallUrl + "/glJeLines"+"?ledgerId=" + ledgerId + "&companyCode=" + code + "&effectiveDateFrom=" + effecDateFrom+"&effectiveDateTo="+effecDateTo,
"","application/json;charset=utf-8", "UTF-8", 10000, 10000);
break;
case EbsExtractTypeConstant.BSPRC:
response = HttpUtil.post(ebsCallUrl + "/fsgAsset"+"?ledgerId=" + ledgerId + "&companyCode=" + code + "&period=" + period+"&prcFlag=Y",
"",
"application/json;charset=utf-8", "UTF-8", 10000, 10000);
break;
case EbsExtractTypeConstant.PLPRC:
response = HttpUtil.post(ebsCallUrl + "/fsgProfit"+"?ledgerId=" + ledgerId + "&companyCode=" + code + "&period=" + period+"&prcFlag=Y",
"","application/json;charset=utf-8", "UTF-8", 10000, 10000);
break;
case EbsExtractTypeConstant.BS:
response = HttpUtil.post(ebsCallUrl + "/fsgAsset"+"?ledgerId=" + ledgerId + "&companyCode=" + code + "&period=" + period+"&prcFlag=N",
"","application/json;charset=utf-8", "UTF-8", 10000, 10000);
break;
case EbsExtractTypeConstant.PL:
response = HttpUtil.post(ebsCallUrl + "/fsgProfit"+"?ledgerId=" + ledgerId + "&companyCode=" + code + "&period=" + period+"&prcFlag=N",
"","application/json;charset=utf-8", "UTF-8", 10000, 10000);
break;
case EbsExtractTypeConstant.CF:
response = HttpUtil.post(ebsCallUrl + "/fsgCash"+"?ledgerId=" + ledgerId + "&companyCode=" + code + "&period=" + period,
"","application/json;charset=utf-8", "UTF-8", 10000, 10000);
break;
case EbsExtractTypeConstant.OCTB:
break;
case EbsExtractTypeConstant.RATE:
response = HttpUtil.post(ebsCallUrl + "/fsgCash"+"?dailyRates=" + period,
"","application/json;charset=utf-8", "UTF-8", 10000, 10000);
break;
default:
break;
}
if (StringUtils.isNotEmpty(response)) {
if(EbsExtractTypeConstant.RATE==type){
EbsCallRateResp resp = JSON.parseObject(response, EbsCallRateResp.class);
log.setId(idService.nextId());
log.setImportResult(true);
log.setErrorMsg(String.format(EnumApiCodeMsg.CALLSUCCESS.getMsg(),resp.getRequestStatus()));
}else{
EbsCallResp resp = JSON.parseObject(response, EbsCallResp.class);
long taskId = Long.valueOf(resp.getTaskId());
if (taskId == -1) {
log.setId(idService.nextId());
log.setImportResult(false);
log.setErrorMsg(String.format(EnumApiCodeMsg.CALLFAILED.getMsg(), resp.getTaskDesc()));
} else {
log.setId(taskId);
log.setImportResult(true);
log.setErrorMsg(String.format(EnumApiCodeMsg.CALLSUCCESS.getMsg(), resp.getTaskDesc()));
}
}
dataImportLogMapper.insertSelective(log);
}
} catch (Exception e) {
log.setId(idService.nextId());
log.setImportResult(false);
log.setErrorMsg(String.format(EnumApiCodeMsg.CALLFAILED.getMsg(), e.getMessage()));
dataImportLogMapper.insertSelective(log);
logger.error(String.format(EnumApiCodeMsg.CALLFAILED.getMsg(), e.getMessage()), e);
}
return null;
}
}
} }
...@@ -2013,7 +2013,7 @@ public class OrganizationServiceImpl extends BaseService{ ...@@ -2013,7 +2013,7 @@ public class OrganizationServiceImpl extends BaseService{
if (StringUtils.isEmpty(org.getStructureId())) { if (StringUtils.isEmpty(org.getStructureId())) {
org.setStructureId("null"); org.setStructureId("null");
} }
organizationMapper.insert(org); organizationMapper.insertSelective(org);
OperationResultDto<Object> validateSetRet = validateEnterpriseAccountSetDateTimeOverlap( OperationResultDto<Object> validateSetRet = validateEnterpriseAccountSetDateTimeOverlap(
orgDto.getEnterpriseAccountSetOrgList()); orgDto.getEnterpriseAccountSetOrgList());
if (!validateSetRet.getResult()) { if (!validateSetRet.getResult()) {
...@@ -2023,63 +2023,65 @@ public class OrganizationServiceImpl extends BaseService{ ...@@ -2023,63 +2023,65 @@ public class OrganizationServiceImpl extends BaseService{
} }
// 添加账套 // 添加账套
for (EnterpriseAccountSetOrgDto p : orgDto.getEnterpriseAccountSetOrgList()) { if(!orgDto.getOversea()){
EnterpriseAccountSetOrg enterpriseAccountSetOrg = new EnterpriseAccountSetOrg(); for (EnterpriseAccountSetOrgDto p : orgDto.getEnterpriseAccountSetOrgList()) {
enterpriseAccountSetOrg.setId(CommonUtils.getUUID()); EnterpriseAccountSetOrg enterpriseAccountSetOrg = new EnterpriseAccountSetOrg();
enterpriseAccountSetOrg.setEnterpriseAccountSetId(p.getEnterpriseAccountSetId()); enterpriseAccountSetOrg.setId(CommonUtils.getUUID());
enterpriseAccountSetOrg.setOrganizationId(orgDto.getId()); enterpriseAccountSetOrg.setEnterpriseAccountSetId(p.getEnterpriseAccountSetId());
if (!Strings.isEmpty(p.getEffectiveDateStr())) { enterpriseAccountSetOrg.setOrganizationId(orgDto.getId());
enterpriseAccountSetOrg.setEffectiveDate(DateTimeFormat.forPattern("yyyy-MM-dd") if (!Strings.isEmpty(p.getEffectiveDateStr())) {
.parseDateTime(p.getEffectiveDateStr() + "-01").toDate()); enterpriseAccountSetOrg.setEffectiveDate(DateTimeFormat.forPattern("yyyy-MM-dd")
p.setEffectiveDate(DateTimeFormat.forPattern("yyyy-MM-dd") .parseDateTime(p.getEffectiveDateStr() + "-01").toDate());
.parseDateTime(p.getEffectiveDateStr() + "-01").toDate()); p.setEffectiveDate(DateTimeFormat.forPattern("yyyy-MM-dd")
} .parseDateTime(p.getEffectiveDateStr() + "-01").toDate());
}
if (!Strings.isEmpty(p.getExpiredDateStr())) { if (!Strings.isEmpty(p.getExpiredDateStr())) {
enterpriseAccountSetOrg.setExpiredDate(DateTimeFormat.forPattern("yyyy-MM-dd") enterpriseAccountSetOrg.setExpiredDate(DateTimeFormat.forPattern("yyyy-MM-dd")
.parseDateTime(p.getExpiredDateStr() + "-01").plusMonths(1).minusDays(1).toDate()); .parseDateTime(p.getExpiredDateStr() + "-01").plusMonths(1).minusDays(1).toDate());
p.setExpiredDate(DateTimeFormat.forPattern("yyyy-MM-dd") p.setExpiredDate(DateTimeFormat.forPattern("yyyy-MM-dd")
.parseDateTime(p.getExpiredDateStr() + "-01").plusMonths(1).minusDays(1).toDate()); .parseDateTime(p.getExpiredDateStr() + "-01").plusMonths(1).minusDays(1).toDate());
}
enterpriseAccountSetOrgMapper.insert(enterpriseAccountSetOrg);
} }
enterpriseAccountSetOrgMapper.insert(enterpriseAccountSetOrg);
}
// 添加服务 // 添加服务
// For VAT, update Rule Engine tables after updating // For VAT, update Rule Engine tables after updating
// OrganizationServiceTemplateGroup // OrganizationServiceTemplateGroup
// .NET中定义了以下变量,但未被使用,故在此处注释 defaultRule, reportRules // .NET中定义了以下变量,但未被使用,故在此处注释 defaultRule, reportRules
OrganizationServiceTemplateGroupDto vatSetting = orgDto.getOrganizationServiceTemplateGroupList().stream() OrganizationServiceTemplateGroupDto vatSetting = orgDto.getOrganizationServiceTemplateGroupList().stream()
.filter(t -> ServiceTypeEnum.VAT.toString().equals(t.getServiceTypeId())).findFirst().orElse(null); .filter(t -> ServiceTypeEnum.VAT.toString().equals(t.getServiceTypeId())).findFirst().orElse(null);
if (vatSetting != null) { // If currently no rule and new rule should be added if (vatSetting != null) { // If currently no rule and new rule should be added
TemplateGroup templateGrp = vatSetting.getTemplateGroupId() != null TemplateGroup templateGrp = vatSetting.getTemplateGroupId() != null
? templateGroupMapper.selectByPrimaryKey(vatSetting.getTemplateGroupId()) ? templateGroupMapper.selectByPrimaryKey(vatSetting.getTemplateGroupId())
: null; : null;
// In organization module tax payer type is 1&2 while 0&1 in rule engine // In organization module tax payer type is 1&2 while 0&1 in rule engine
Integer newTaxPayerType = (templateGrp != null && templateGrp.getPayTaxType() != null) Integer newTaxPayerType = (templateGrp != null && templateGrp.getPayTaxType() != null)
? templateGrp.getPayTaxType() - 1 ? templateGrp.getPayTaxType() - 1
: VatTaxPayerTypeEnum.General.value(); : VatTaxPayerTypeEnum.General.value();
TaxPayerReportRule newRule = new TaxPayerReportRule(); TaxPayerReportRule newRule = new TaxPayerReportRule();
newRule.setId(distributedIdService.nextId()); newRule.setId(distributedIdService.nextId());
newRule.setIsDefault(false); newRule.setIsDefault(false);
newRule.setOrganizationId(orgDto.getId()); newRule.setOrganizationId(orgDto.getId());
newRule.setTemplateGroupId(vatSetting.getTemplateGroupId()); newRule.setTemplateGroupId(vatSetting.getTemplateGroupId());
newRule.setTaxPayerType(newTaxPayerType); // Use tax payer type related to template group newRule.setTaxPayerType(newTaxPayerType); // Use tax payer type related to template group
newRule.setCreateTime(now); newRule.setCreateTime(now);
newRule.setUpdateTime(now); newRule.setUpdateTime(now);
taxPayerReportRuleMapper.insert(newRule); taxPayerReportRuleMapper.insert(newRule);
} }
for (OrganizationServiceTemplateGroupDto p : orgDto.getOrganizationServiceTemplateGroupList()) { for (OrganizationServiceTemplateGroupDto p : orgDto.getOrganizationServiceTemplateGroupList()) {
OrganizationServiceTemplateGroup orgServiceTempGroup = new OrganizationServiceTemplateGroup(); OrganizationServiceTemplateGroup orgServiceTempGroup = new OrganizationServiceTemplateGroup();
orgServiceTempGroup.setId(distributedIdService.nextId()); orgServiceTempGroup.setId(distributedIdService.nextId());
orgServiceTempGroup.setOrganizationId(orgDto.getId()); orgServiceTempGroup.setOrganizationId(orgDto.getId());
orgServiceTempGroup.setServiceTypeId(p.getServiceTypeId()); orgServiceTempGroup.setServiceTypeId(p.getServiceTypeId());
orgServiceTempGroup.setTemplateGroupId(p.getTemplateGroupId()); orgServiceTempGroup.setTemplateGroupId(p.getTemplateGroupId());
organizationServiceTemplateGroupMapper.insert(orgServiceTempGroup); organizationServiceTemplateGroupMapper.insert(orgServiceTempGroup);
} }
// CopyModelTree(orgDto);//__restoreroy__ // CopyModelTree(orgDto);//__restoreroy__
addOrgSelfDimensionList(orgDto); addOrgSelfDimensionList(orgDto);
}
// C#中的内部类CommonLogParams 在JAVA中已经被合并到OperationLogDto中 // C#中的内部类CommonLogParams 在JAVA中已经被合并到OperationLogDto中
UpdateLogParams tempCommonLogParms = new UpdateLogParams(); UpdateLogParams tempCommonLogParms = new UpdateLogParams();
tempCommonLogParms.setOperationModule(Organization.value()); tempCommonLogParms.setOperationModule(Organization.value());
......
...@@ -55,4 +55,6 @@ app_key=${app_key} ...@@ -55,4 +55,6 @@ app_key=${app_key}
cookie.maxAgeSeconds=${cookie.maxAgeSeconds} cookie.maxAgeSeconds=${cookie.maxAgeSeconds}
api_white_list=${api_white_list} api_white_list=${api_white_list}
org_sync_url=${org_sync_url} org_sync_url=${org_sync_url}
org_sync_token=${org_sync_token} org_sync_token=${org_sync_token}
\ No newline at end of file
ebs_call_url=${ebs_call_url}
\ No newline at end of file
...@@ -54,3 +54,5 @@ cookie.maxAgeSeconds=86400 ...@@ -54,3 +54,5 @@ cookie.maxAgeSeconds=86400
api_white_list=/ebs/api/v1/dd; api_white_list=/ebs/api/v1/dd;
org_sync_url=http://10.96.238.10/erp-main-data-test-v2/api/companies org_sync_url=http://10.96.238.10/erp-main-data-test-v2/api/companies
org_sync_token=174af08f org_sync_token=174af08f
ebs_call_url=http://172.20.201.201:8020/ebs-proxy-test/dts
...@@ -56,4 +56,6 @@ app_key=983258e7fd04d7fa0534735f7b1c33f3 ...@@ -56,4 +56,6 @@ app_key=983258e7fd04d7fa0534735f7b1c33f3
cookie.maxAgeSeconds=18000 cookie.maxAgeSeconds=18000
api_white_list=/ebs/api/v1/dd; api_white_list=/ebs/api/v1/dd;
org_sync_url=http://10.96.238.10/erp-main-data-test-v2/api/companies org_sync_url=http://10.96.238.10/erp-main-data-test-v2/api/companies
org_sync_token=174af08f org_sync_token=174af08f
\ No newline at end of file
ebs_call_url=http://172.20.201.201:8020/ebs-proxy-test/dts
...@@ -48,4 +48,9 @@ check_ticket=false ...@@ -48,4 +48,9 @@ check_ticket=false
get_user_info_url=http://mis-test.diditaxi.com.cn/auth/sso/api/ get_user_info_url=http://mis-test.diditaxi.com.cn/auth/sso/api/
app_id=2500 app_id=2500
app_key=983258e7fd04d7fa0534735f7b1c33f3 app_key=983258e7fd04d7fa0534735f7b1c33f3
cookie.maxAgeSeconds=86400 cookie.maxAgeSeconds=86400
\ No newline at end of file api_white_list=/ebs/api/v1/dd;
org_sync_url=http://10.96.238.10/erp-main-data-test-v2/api/companies
org_sync_token=174af08f
ebs_call_url=http://172.20.201.201:8020/ebs-proxy-test/dts
...@@ -53,6 +53,8 @@ public abstract class CommonIT { ...@@ -53,6 +53,8 @@ public abstract class CommonIT {
private SqlSessionFactory sqlSessionFactory; private SqlSessionFactory sqlSessionFactory;
@Autowired @Autowired
protected ObjectMapper objectMapper; protected ObjectMapper objectMapper;
@Autowired
protected DataImportLogMapper dataImportLogMapper;
@Autowired @Autowired
protected AreaMapper areaMapper; protected AreaMapper areaMapper;
......
package pwc.taxtech.atms.service.impl; package pwc.taxtech.atms.service.impl;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.StringUtils;
import org.assertj.core.util.Lists;
import org.junit.Test; import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import pwc.taxtech.atms.CommonIT; import pwc.taxtech.atms.CommonIT;
import pwc.taxtech.atms.common.AuthUserHelper;
import pwc.taxtech.atms.common.schedule.OrgSyncJob;
import pwc.taxtech.atms.common.util.BaseThreadFactory;
import pwc.taxtech.atms.common.util.DateUtils;
import pwc.taxtech.atms.common.util.HttpUtil;
import pwc.taxtech.atms.constant.EbsExtractTypeConstant;
import pwc.taxtech.atms.constant.enums.EnumApiCodeMsg;
import pwc.taxtech.atms.constant.enums.EnumEbsExtractType;
import pwc.taxtech.atms.constant.enums.EnumImportType;
import pwc.taxtech.atms.dao.DataImportLogMapper;
import pwc.taxtech.atms.dto.DataExtractParam;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.ebsdto.*; import pwc.taxtech.atms.dto.ebsdto.*;
import pwc.taxtech.atms.dto.organization.DDSyncOrgInfo;
import pwc.taxtech.atms.dto.organization.OrgSyncData;
import pwc.taxtech.atms.entity.*;
import pwc.taxtech.atms.service.EbsApiService; import pwc.taxtech.atms.service.EbsApiService;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.concurrent.*;
public class EbsApiServiceImplTest extends CommonIT { public class EbsApiServiceImplTest extends CommonIT {
private static final Logger logger = LoggerFactory.getLogger(EbsApiServiceImplTest.class);
@Resource @Resource
private EbsApiService ebsApiService; private EbsApiService ebsApiService;
@Resource @Resource
private DistributedIdService distributedIdService; private DistributedIdService idService;
@Autowired
private DataImportService dataImportService;
@Value("${org_sync_url}")
private String orgSyncUrl;
@Value("${org_sync_token}")
private String token;
private static String ebsCallUrl = "http://172.20.201.201:8020/ebs-proxy-test/dts";
private static int corePoolSize = 15;
private static int maxPoolSize = 15;
private static int qSize = 5000;
private static BaseThreadFactory factory = new BaseThreadFactory("callEbs");
private static ExecutorService executorService = new ThreadPoolExecutor(corePoolSize, maxPoolSize,
0L, TimeUnit.MILLISECONDS,
new LinkedBlockingQueue<>(qSize),factory,new ThreadPoolExecutor.AbortPolicy());
@Test
public void testExtractTB(){
try{
String response = HttpUtil.post("http://172.20.201.201:8020/ebs-proxy-test/dts/glMonthlyBal?ledgerId=2021&companyCode=120200&period=2018-11",
"",
"application/json;charset=utf-8", "UTF-8", 10000, 10000);
String ledgerId = "2021";
String code = "120200";
String period = "2018-11";
String url = ebsCallUrl + "/glMonthlyBal?ledgerId="+ledgerId+"&companyCode="+ code + "&period=" + period;
System.out.println(url);
response = HttpUtil.post(url,"","application/json;charset=utf-8", "UTF-8", 10000, 10000);
DataImportLog log = new DataImportLog();
log.setTaxpayerIdNum("123");
log.setOrganizationId(ledgerId);
log.setCompanyCode(code);
log.setCompanyName(ledgerId);
log.setPeriodYear(2018);
log.setPeriodMonth(11);
log.setType(EnumImportType.ExtractFinancialData.getCode());
log.setFileType("caicai");
log.setPeriodStatus("EBS抽取");
log.setOperator("admin");
System.out.println(response);
if (StringUtils.isNotEmpty(response)) {
EbsCallResp resp = JSON.parseObject(response, EbsCallResp.class);
long taskId = Long.valueOf(resp.getTaskId());
if (taskId == -1) {
log.setId(idService.nextId());
log.setImportResult(false);
log.setErrorMsg(String.format(EnumApiCodeMsg.CALLFAILED.getMsg(), resp.getTaskDesc()));
} else {
log.setId(taskId);
log.setImportResult(true);
log.setErrorMsg(String.format(EnumApiCodeMsg.CALLSUCCESS.getMsg(), resp.getTaskDesc()));
}
int i = dataImportLogMapper.insertSelective(log);
System.out.println(i);
}
System.out.println(response);
}catch (Exception e){
e.printStackTrace();
}
}
@Test
public void testExtract(){
DataExtractParam param = new DataExtractParam();
List<String> orgs = Lists.newArrayList();
orgs.add("5bbd739c-1a13-4b0f-aba6-32ba41e4de69");
List<Integer> dataTypes = Lists.newArrayList();
dataTypes.add(100);
dataTypes.add(101);
dataTypes.add(102);
dataTypes.add(103);
dataTypes.add(104);
dataTypes.add(105);
dataTypes.add(106);
dataTypes.add(108);
param.setOrgIds(orgs);
param.setDataTypes(dataTypes);
param.setPeriod("2019-03");
callExtractFinancialData(param);
}
public OperationResultDto callExtractFinancialData(DataExtractParam param) {
OrganizationExample example = new OrganizationExample();
example.createCriteria().andIdIn(param.getOrgIds());
List<Organization> orgs = organizationMapper.selectByExample(example);
Integer periodInt = DateUtils.strToPeriod(param.getPeriod());
String period = param.getPeriod();
// 这两个参数未来可能有用
String effectiveDateFrom = param.getEffectiveDateFrom();
String effectiveDateTo = param.getEffectiveDateTo();
List<Future> list = Lists.newArrayList();
param.getDataTypes().forEach(type -> {
orgs.forEach(o -> {
try {
Callable callEbs = new CallEbsThread(type, o,ebsCallUrl,dataImportLogMapper,period, effectiveDateFrom, effectiveDateTo);
Future future = executorService.submit(callEbs);
list.add(future);
} catch (RejectedExecutionException rje) {
// 这里可以考虑简化 没想好还
DataImportLog log = new DataImportLog();
log.setId(idService.nextId());
log.setTaxpayerIdNum(o.getTaxPayerNumber());
log.setCompanyCode(o.getCode());
log.setCompanyName(o.getName());
log.setPeriodYear(periodInt / 100);
log.setPeriodMonth(periodInt % 100);
log.setType(EnumImportType.ExtractFinancialData.getCode());
log.setFileType(EnumEbsExtractType.getNameByCode(type));
log.setImportResult(false);
log.setPeriodStatus("EBS抽取");
log.setOperator("test");
log.setErrorMsg(EnumApiCodeMsg.BUSY.getMsg());
dataImportLogMapper.insertSelective(log);
} catch (Exception e) {
e.printStackTrace();
}
});
});
int res = 0;
try{
for(Future future : list){
res += (Integer)list.get(0).get();
}
System.out.println(res);
}catch (Exception e){
e.printStackTrace();
}
return OperationResultDto.success();
}
@Test
public void testOrgApi(){
Map<String, String> headers = new HashMap<>();
headers.put("token", token);
headers.put("Content-Type", "application/x-www-form-urlencoded");
headers.put("Idap", "eddie.wu_v");
int pageSize = 1;
List<String> failedCnList = Lists.newArrayList();
List<String> failedList = Lists.newArrayList();
List<OrgSyncData> failedObjList = Lists.newArrayList();
try {
for (int i = 1; i <= pageSize; i++) {
String response = HttpUtil.get(orgSyncUrl+"?currentPage="+i, headers);
System.out.println(response);
DDSyncOrgInfo ddSyncOrgInfo = JSONObject.parseObject(response, DDSyncOrgInfo.class);
pageSize = ddSyncOrgInfo.getTotalPage();
List<OrgSyncData> orgSyncDatas = ddSyncOrgInfo.getData();
orgSyncDatas.forEach(osd -> {
OrganizationExample example = new OrganizationExample();
example.createCriteria().andNameEqualTo(osd.getNameCN());
Organization o = new Organization();
o.setClientCode(osd.getCode());
o.setCode(osd.getCode());
o.setEnterpriseAccountCode(String.valueOf(osd.getSobId()));
o.setEnterpriseAccountName(osd.getSobName());
o.setCurrencyCode(osd.getCurrencyCode());
o.setLegalEntity(osd.getLegalEntity());
o.setLegalPersonName(osd.getLegalRepresentative());
o.setAddress(osd.getAddress());
o.setCreateTime(osd.getGmtCreate());
o.setUpdateTime(osd.getGmtModified());
o.setPsCode(osd.getPsCode());
RegionExample regionExample = new RegionExample();
regionExample.createCriteria().andShortNameEqualTo(osd.getCompanyLocation());
List<Region> regions = regionMapper.selectByExample(regionExample);
if (regions.size() > 0) {
o.setRegionId(regions.get(0).getId());
}
if(organizationMapper.countByExample(example)<1){
failedCnList.add(osd.getNameCN());
failedList.add(osd.getOrgName());
failedObjList.add(osd);
}
organizationMapper.updateByExampleSelective(o, example);
});
}
System.out.println(failedCnList);
System.out.println(failedList);
System.out.println(JSON.toJSONString(failedObjList));
} catch (Exception e) {
System.out.println(String.format("机构信息同步异常:[%s]", e.getMessage()));
}
}
@Test @Test
public void testApi(){ public void testApi(){
...@@ -347,4 +567,135 @@ public class EbsApiServiceImplTest extends CommonIT { ...@@ -347,4 +567,135 @@ public class EbsApiServiceImplTest extends CommonIT {
} }
return period; return period;
} }
private static class CallEbsThread implements Callable {
protected final Logger logger = LoggerFactory.getLogger(this.getClass());
private int type;
private Organization org;
private String period;
private String ebsCallUrl;
private String effectiveDateFrom;
private String effectiveDateTo;
private DataImportLogMapper dataImportLogMapper;
@Autowired
private AuthUserHelper authUserHelper;
@Autowired
private DistributedIdService idService;
CallEbsThread(int type, Organization org,String ebsCallUrl,DataImportLogMapper dataImportLogMapper,
String period, String effectiveDateFrom, String effectiveDateTo) {
this.type = type;
this.org = org;
this.ebsCallUrl = ebsCallUrl;
this.dataImportLogMapper = dataImportLogMapper;
this.period = period;
this.effectiveDateFrom = effectiveDateFrom;
this.effectiveDateTo = effectiveDateTo;
}
@Override
public Object call(){
String response = null;
String ledgerId = org.getEnterpriseAccountCode();
String code = org.getCode();
Integer periodInt = DateUtils.strToPeriod(period);
int year = periodInt / 100;
int month = periodInt % 100;
DataImportLog log = new DataImportLog();
log.setTaxpayerIdNum(org.getTaxPayerNumber());
log.setOrganizationId(org.getId());
log.setCompanyCode(code);
log.setCompanyName(org.getName());
log.setPeriodYear(year);
log.setPeriodMonth(month);
log.setType(EnumImportType.ExtractFinancialData.getCode());
log.setFileType(EnumEbsExtractType.getNameByCode(type));
log.setPeriodStatus("EBS抽取");
log.setOperator("admin");
try {
switch (type) {
case EbsExtractTypeConstant.TB:
response = HttpUtil.post(ebsCallUrl + "/glMonthlyBal?ledgerId="+ledgerId+"&companyCode="+ code + "&period=" + period,
"","application/json;charset=utf-8", "UTF-8", 10000, 10000);
break;
case EbsExtractTypeConstant.JE:
// 这里BA反馈可按期间获取当月日记账即可
String effecDateFrom = DateUtils.getFirstDayOfMonth(year,month);
String effecDateTo = DateUtils.getLastDayOfMonth(year,month);
response = HttpUtil.post(ebsCallUrl + "/glJeLines"+"?ledgerId=" + ledgerId + "&companyCode=" + code + "&effectiveDateFrom=" + effecDateFrom+"&effectiveDateTo="+effecDateTo,
"","application/json;charset=utf-8", "UTF-8", 10000, 10000);
break;
case EbsExtractTypeConstant.BSPRC:
response = HttpUtil.post(ebsCallUrl + "/fsgAsset"+"?ledgerId=" + ledgerId + "&companyCode=" + code + "&period=" + period+"&prcFlag=Y",
"",
"application/json;charset=utf-8", "UTF-8", 10000, 10000);
break;
case EbsExtractTypeConstant.PLPRC:
response = HttpUtil.post(ebsCallUrl + "/fsgProfit"+"?ledgerId=" + ledgerId + "&companyCode=" + code + "&period=" + period+"&prcFlag=Y",
"","application/json;charset=utf-8", "UTF-8", 10000, 10000);
break;
case EbsExtractTypeConstant.BS:
response = HttpUtil.post(ebsCallUrl + "/fsgAsset"+"?ledgerId=" + ledgerId + "&companyCode=" + code + "&period=" + period+"&prcFlag=N",
"","application/json;charset=utf-8", "UTF-8", 10000, 10000);
break;
case EbsExtractTypeConstant.PL:
response = HttpUtil.post(ebsCallUrl + "/fsgProfit"+"?ledgerId=" + ledgerId + "&companyCode=" + code + "&period=" + period+"&prcFlag=N",
"","application/json;charset=utf-8", "UTF-8", 10000, 10000);
break;
case EbsExtractTypeConstant.CF:
response = HttpUtil.post(ebsCallUrl + "/fsgCash"+"?ledgerId=" + ledgerId + "&companyCode=" + code + "&period=" + period,
"","application/json;charset=utf-8", "UTF-8", 10000, 10000);
break;
case EbsExtractTypeConstant.OCTB:
break;
case EbsExtractTypeConstant.RATE:
response = HttpUtil.post(ebsCallUrl + "/fsgCash"+"?dailyRates=" + period,
"",
"application/json;charset=utf-8", "UTF-8", 10000, 10000);
break;
default:
break;
}
System.out.println("call"+EnumEbsExtractType.getNameByCode(type)+":"+response);
if (StringUtils.isNotEmpty(response)) {
if(EbsExtractTypeConstant.RATE==type){
EbsCallRateResp resp = JSON.parseObject(response, EbsCallRateResp.class);
log.setId(idService.nextId());
log.setImportResult(true);
log.setErrorMsg(String.format(EnumApiCodeMsg.CALLSUCCESS.getMsg(),resp.getRequestStatus()));
}else{
EbsCallResp resp = JSON.parseObject(response, EbsCallResp.class);
long taskId = Long.valueOf(resp.getTaskId());
if (taskId == -1) {
log.setId(idService.nextId());
log.setImportResult(false);
log.setErrorMsg(String.format(EnumApiCodeMsg.CALLFAILED.getMsg(), resp.getTaskDesc()));
} else {
log.setId(taskId);
log.setImportResult(true);
log.setErrorMsg(String.format(EnumApiCodeMsg.CALLSUCCESS.getMsg(), resp.getTaskDesc()));
}
}
dataImportLogMapper.insertSelective(log);
}
} catch (Exception e) {
log.setId(idService.nextId());
log.setImportResult(false);
log.setErrorMsg(String.format(EnumApiCodeMsg.CALLFAILED.getMsg(), e.getMessage()));
dataImportLogMapper.insertSelective(log);
e.printStackTrace();
}
return new Integer(1);
}
}
} }
\ No newline at end of file
package pwc.taxtech.atms.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.google.common.collect.Lists;
import org.junit.Test;
import java.util.List;
/**
* @Auther: Gary J Li
* @Date: 15/03/2019 20:42
* @Description:
*/
public class GaryTest {
@Test
public void gagaga(){
String originJson = "[\n" +
" \"Angola-安哥拉-0244\",\n" +
" \"Afghanistan-阿富汗-93\",\n" +
" \"Albania-阿尔巴尼亚-335\",\n" +
" \"Algeria-阿尔及利亚-213\",\n" +
" \"Andorra-安道尔共和国-376\",\n" +
" \"Anguilla-安圭拉岛-1254\",\n" +
" \"Antigua and Barbuda-安提瓜和巴布达-1268\",\n" +
" \"Argentina-阿根廷-54\",\n" +
" \"Armenia-亚美尼亚-374\",\n" +
" \"Ascension-阿森松-247\",\n" +
" \"Australia-澳大利亚-61\",\n" +
" \"Austria-奥地利-43\",\n" +
" \"Azerbaijan-阿塞拜疆-994\",\n" +
" \"Bahamas-巴哈马-1242\",\n" +
" \"Bahrain-巴林-973\",\n" +
" \"Bangladesh-孟加拉国-880\",\n" +
" \"Barbados-巴巴多斯-1246\",\n" +
" \"Belarus-白俄罗斯-375\",\n" +
" \"Belgium-比利时-32\",\n" +
" \"Belize-伯利兹-501\",\n" +
" \"Benin-贝宁-229\",\n" +
" \"Bermuda Is-百慕大群岛-1441\",\n" +
" \"Bolivia-玻利维亚-591\",\n" +
" \"Botswana-博茨瓦纳-267\",\n" +
" \"Brazil-巴西-55\",\n" +
" \"Brunei-文莱-673\",\n" +
" \"Bulgaria-保加利亚-359\",\n" +
" \"Burkina Faso-布基纳法索-226\",\n" +
" \"Burma-缅甸-95\",\n" +
" \"Burundi-布隆迪-257\",\n" +
" \"Cameroon-喀麦隆-237\",\n" +
" \"Canada-加拿大-1\",\n" +
" \"Cayman Is-开曼群岛-1345\",\n" +
" \"Central African Republic-中非共和国-236\",\n" +
" \"Chad-乍得-235\",\n" +
" \"Chile-智利-56\",\n" +
" \"China-中国-86\",\n" +
" \"Colombia-哥伦比亚-57\",\n" +
" \"Congo-刚果-242\",\n" +
" \"Cook Is-库克群岛-682\",\n" +
" \"Costa Rica-哥斯达黎加-506\",\n" +
" \"Cuba-古巴-53\",\n" +
" \"Cyprus-塞浦路斯-357\",\n" +
" \"Czech Republic-捷克-420\",\n" +
" \"Denmark-丹麦-45\",\n" +
" \"Djibouti-吉布提-253\",\n" +
" \"Dominica Rep-多米尼加共和国-1890\",\n" +
" \"Ecuador-厄瓜多尔-593\",\n" +
" \"Egypt-埃及-20\",\n" +
" \"EI Salvador-萨尔瓦多-503\",\n" +
" \"Estonia-爱沙尼亚-372\",\n" +
" \"Ethiopia-埃塞俄比亚-251\",\n" +
" \"Fiji-斐济-679\",\n" +
" \"Finland-芬兰-358\",\n" +
" \"France-法国-33\",\n" +
" \"French Guiana-法属圭亚那-594\",\n" +
" \"French Polynesia-法属玻利尼西亚-689\",\n" +
" \"Gabon-加蓬-241\",\n" +
" \"Gambia-冈比亚-220\",\n" +
" \"Georgia-格鲁吉亚-995\",\n" +
" \"Germany-德国-49\",\n" +
" \"Ghana-加纳-233\",\n" +
" \"Gibraltar-直布罗陀-350\",\n" +
" \"Greece-希腊-30\",\n" +
" \"Grenada-格林纳达-1809\",\n" +
" \"Guam-关岛-1671\",\n" +
" \"Guatemala-危地马拉-502\",\n" +
" \"Guinea-几内亚-224\",\n" +
" \"Guyana-圭亚那-592\",\n" +
" \"Haiti-海地-509\",\n" +
" \"Honduras-洪都拉斯-504\",\n" +
" \"Hongkong-香港-852\",\n" +
" \"Hungary-匈牙利-36\",\n" +
" \"Iceland-冰岛-354\",\n" +
" \"India-印度-91\",\n" +
" \"Indonesia-印度尼西亚-62\",\n" +
" \"Iran-伊朗-98\",\n" +
" \"Iraq-伊拉克-964\",\n" +
" \"Ireland-爱尔兰-353\",\n" +
" \"Israel-以色列-972\",\n" +
" \"Italy-意大利-39\",\n" +
" \"Ivory Coast-科特迪瓦-225\",\n" +
" \"Jamaica-牙买加-1876\",\n" +
" \"Japan-日本-81\",\n" +
" \"Jordan-约旦-962\",\n" +
" \"Kampuchea (Cambodia )-柬埔寨-855\",\n" +
" \"Kazakstan-哈萨克斯坦-327\",\n" +
" \"Kenya-肯尼亚-254\",\n" +
" \"Korea-韩国-82\",\n" +
" \"Kuwait-科威特-965\",\n" +
" \"Kyrgyzstan-吉尔吉斯坦-331\",\n" +
" \"Laos-老挝-856\",\n" +
" \"Latvia-拉脱维亚-371\",\n" +
" \"Lebanon-黎巴嫩-961\",\n" +
" \"Lesotho-莱索托-266\",\n" +
" \"Liberia-利比里亚-231\",\n" +
" \"Libya-利比亚-218\",\n" +
" \"Liechtenstein-列支敦士登--423\",\n" +
" \"Lithuania-立陶宛-370\",\n" +
" \"Luxembourg-卢森堡-352\",\n" +
" \"Macao-澳门-853\",\n" +
" \"Madagascar-马达加斯加-261\",\n" +
" \"Malawi-马拉维-265\",\n" +
" \"Malaysia-马来西亚-60\",\n" +
" \"Maldives-马尔代夫-960\",\n" +
" \"Mali-马里-223\",\n" +
" \"Malta-马耳他-356\",\n" +
" \"Mariana Is-马里亚那群岛-1670\",\n" +
" \"Martinique-马提尼克-596\",\n" +
" \"Mauritius-毛里求斯-230\",\n" +
" \"Mexico-墨西哥-52\",\n" +
" \"Moldova-摩尔多瓦-373\",\n" +
" \"Monaco-摩纳哥-377\",\n" +
" \"Mongolia-蒙古-976\",\n" +
" \"Montserrat Is-蒙特塞拉特岛-1664\",\n" +
" \"Morocco-摩洛哥-212\",\n" +
" \"Mozambique-莫桑比克-258\",\n" +
" \"Namibia-纳米比亚-264\",\n" +
" \"Nauru-瑙鲁-674\",\n" +
" \"Nepal-尼泊尔-977\",\n" +
" \"Netheriands Antilles-荷属安的列斯-599\",\n" +
" \"Netherlands-荷兰-31\",\n" +
" \"New Zealand-新西兰-64\",\n" +
" \"Nicaragua-尼加拉瓜-505\",\n" +
" \"Niger-尼日尔-227\",\n" +
" \"Nigeria-尼日利亚-234\",\n" +
" \"North Korea-朝鲜-850\",\n" +
" \"Norway-挪威-47\",\n" +
" \"Oman-阿曼-968\",\n" +
" \"Pakistan-巴基斯坦-92\",\n" +
" \"Panama-巴拿马-507\",\n" +
" \"Papua New Cuinea-巴布亚新几内亚-675\",\n" +
" \"Paraguay-巴拉圭-595\",\n" +
" \"Peru-秘鲁-51\",\n" +
" \"Philippines-菲律宾-63\",\n" +
" \"Poland-波兰-48\",\n" +
" \"Portugal-葡萄牙-351\",\n" +
" \"Puerto Rico-波多黎各-1787\",\n" +
" \"Qatar-卡塔尔-974\",\n" +
" \"Reunion-留尼旺-262\",\n" +
" \"Romania-罗马尼亚-40\",\n" +
" \"Russia-俄罗斯-7\",\n" +
" \"Saint Lueia-圣卢西亚-1758\",\n" +
" \"Saint Vincent-圣文森特岛-1784\",\n" +
" \"Samoa Eastern-东萨摩亚(美)-684\",\n" +
" \"Samoa Western-西萨摩亚-685\",\n" +
" \"San Marino-圣马力诺-378\",\n" +
" \"Sao Tome and Principe-圣多美和普林西比-239\",\n" +
" \"Saudi Arabia-沙特阿拉伯-966\",\n" +
" \"Senegal-塞内加尔-221\",\n" +
" \"Seychelles-塞舌尔-248\",\n" +
" \"Sierra Leone-塞拉利昂-232\",\n" +
" \"Singapore-新加坡-65\",\n" +
" \"Slovakia-斯洛伐克-421\",\n" +
" \"Slovenia-斯洛文尼亚-386\",\n" +
" \"Solomon Is-所罗门群岛-677\",\n" +
" \"Somali-索马里-252\",\n" +
" \"South Africa-南非-27\",\n" +
" \"Spain-西班牙-34\",\n" +
" \"SriLanka-斯里兰卡-94\",\n" +
" \"St.Lucia-圣卢西亚-1758\",\n" +
" \"St.Vincent-圣文森特-1784\",\n" +
" \"Sudan-苏丹-249\",\n" +
" \"Suriname-苏里南-597\",\n" +
" \"Swaziland-斯威士兰-268\",\n" +
" \"Sweden-瑞典-46\",\n" +
" \"Switzerland-瑞士-41\",\n" +
" \"Syria-叙利亚-963\",\n" +
" \"Taiwan-台湾省-886\",\n" +
" \"Tajikstan-塔吉克斯坦-992\",\n" +
" \"Tanzania-坦桑尼亚-255\",\n" +
" \"Thailand-泰国-66\",\n" +
" \"Togo-多哥-228\",\n" +
" \"Tonga-汤加-676\",\n" +
" \"Trinidad and Tobago-特立尼达和多巴哥-1809\",\n" +
" \"Tunisia-突尼斯-216\",\n" +
" \"Turkey-土耳其-90\",\n" +
" \"Turkmenistan-土库曼斯坦-993\",\n" +
" \"Uganda-乌干达-256\",\n" +
" \"Ukraine-乌克兰-380\",\n" +
" \"United Arab Emirates-阿拉伯联合酋长国-971\",\n" +
" \"United Kiongdom-英国-44\",\n" +
" \"United States of America-美国-1\",\n" +
" \"Uruguay-乌拉圭-598\",\n" +
" \"Uzbekistan-乌兹别克斯坦-233\",\n" +
" \"Venezuela-委内瑞拉-58\",\n" +
" \"Vietnam-越南-84\",\n" +
" \"Yemen-也门-967\",\n" +
" \"Yugoslavia-南斯拉夫-381\",\n" +
" \"Zimbabwe-津巴布韦-263\",\n" +
" \"Zaire-扎伊尔-243\",\n" +
" \"Zambia-赞比亚-260\"\n" +
"]";
List<String> lists = (List)JSONArray.parseArray(originJson);
List<String> cnNameList = Lists.newArrayList();
List<String> enNameList = Lists.newArrayList();
lists.forEach(l->{
String cnName = l.split("-")[1];
String enName = l.split("-")[0];
cnNameList.add("'"+cnName+"'");
enNameList.add("'"+enName+"'");
});
System.out.println("cnNameList"+ cnNameList);
System.out.println("enNameList"+enNameList);
}
}
...@@ -809,6 +809,7 @@ ...@@ -809,6 +809,7 @@
"dateFormat4YearMonthDay": "yyyy-mm-dd", "dateFormat4YearMonthDay": "yyyy-mm-dd",
"dateFormat4YearMonthDayCh": "yyyy-mm-dd", "dateFormat4YearMonthDayCh": "yyyy-mm-dd",
"RecordSize": "Record Size", "RecordSize": "Record Size",
"ExtractFile": "Extract File",
"TaxPayerIdNum": "纳税人识别号", "TaxPayerIdNum": "纳税人识别号",
"ExtractDistribution": "Extract Distribution", "ExtractDistribution": "Extract Distribution",
......
...@@ -1913,5 +1913,8 @@ ...@@ -1913,5 +1913,8 @@
"Company": "Company", "Company": "Company",
"CompanySimpleName": "Company Simple Name", "CompanySimpleName": "Company Simple Name",
"DriverType": "Driver Type", "DriverType": "Driver Type",
"FileExportSuccess": "File Export Success",
"FileExportFailed": "File Export Failed",
"~MustBeEndOneApp": "I Must be the End One, please!" "~MustBeEndOneApp": "I Must be the End One, please!"
} }
\ No newline at end of file
...@@ -856,6 +856,7 @@ ...@@ -856,6 +856,7 @@
"startsWith": "起始于", "startsWith": "起始于",
"RecordSize": "记录条数", "RecordSize": "记录条数",
"ExtractFile": "抽取类型",
"TaxPayerIdNum": "纳税人识别号", "TaxPayerIdNum": "纳税人识别号",
"ExtractDistribution": "抽取分发", "ExtractDistribution": "抽取分发",
"Log":"日志", "Log":"日志",
......
...@@ -2276,6 +2276,8 @@ ...@@ -2276,6 +2276,8 @@
"CompanySimpleName": "公司简称", "CompanySimpleName": "公司简称",
"DriverType": "司机类型", "DriverType": "司机类型",
"FileExportSuccess": "文件下载成功!",
"FileExportFailed": "文件下载失败!",
"~MustBeEndOneApp": "我必须是最后一个!" "~MustBeEndOneApp": "我必须是最后一个!"
} }
\ No newline at end of file
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
$scope.selectCountry = ''; $scope.selectCountry = '';
$scope.internationalDataList = constant.internationalDataList; $scope.internationalDataList = constant.internationalDataList;
$scope.countryList = []; $scope.countryList = constant.countryCNList;
$scope.companyList = []; $scope.companyList = [];
var date = new Date(); var date = new Date();
...@@ -540,23 +540,15 @@ ...@@ -540,23 +540,15 @@
}; };
var initCompanyList = function () { var initCompanyList = function () {
vatImportService.getAnalysisInternationalCompanyList($scope.importType,$scope.UploadPeriodTime).success(function (data) { orgService.getOrgListByUserId().success(function (data) {
if (data) { if (data) {
$scope.companyList = data; $scope.companyList = data;
} }
}); });
}; };
var initCountryList = function () { $scope.selectCompanyEvent = function(i){
vatImportService.getAnalysisInternationalCountryList($scope.importType,$scope.UploadPeriodTime).success(function (data) { $scope.selectCompany=i.name;
if (data) {
$scope.countryList = data;
}
});
};
$scope.selectCompanyEvent = function(company){
$scope.selectCompany=company;
refreshGrid(); refreshGrid();
}; };
...@@ -632,8 +624,6 @@ ...@@ -632,8 +624,6 @@
default: default:
break; break;
} }
initCompanyList();
initCountryList();
}; };
//开始 //开始
...@@ -643,6 +633,7 @@ ...@@ -643,6 +633,7 @@
checkUserOrganizationPermissionList(); checkUserOrganizationPermissionList();
getUserPermission(); getUserPermission();
initDatePicker(); initDatePicker();
initCompanyList();
$scope.$watch('importExcelFile', function (newValue, oldValue) { $scope.$watch('importExcelFile', function (newValue, oldValue) {
if (newValue !== null && newValue !== oldValue) { if (newValue !== null && newValue !== oldValue) {
......
...@@ -15,11 +15,11 @@ ...@@ -15,11 +15,11 @@
<span class="text-bold" translate="SelectedImportType"></span>: <span class="text-bold" translate="SelectedImportType"></span>:
<div class="dropdown" style="margin-left:10px"> <div class="dropdown" style="margin-left:10px">
<button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu2" <button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu2"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" style="width: 120px;"> data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" style="width: 140px;">
{{selectType ? ((selectType)|translate):('PleaseSelect' | translate)}} {{selectType ? ((selectType)|translate):('PleaseSelect' | translate)}}
<span class="caret" style="float: right "></span> <span class="caret" style="float: right "></span>
</button> </button>
<ul class="dropdown-menu" style="width: 120px;" aria-labelledby="dropdownMenu2"> <ul class="dropdown-menu" style="width: 140px;" aria-labelledby="dropdownMenu2">
<li ng-repeat="i in internationalDataList" ng-click="changeTab(i)"> <li ng-repeat="i in internationalDataList" ng-click="changeTab(i)">
<div class="checkbox-custom checkbox-default"> <div class="checkbox-custom checkbox-default">
<span style="margin-left:15px; float: left;">{{(i.type)|translate}}</span> <span style="margin-left:15px; float: left;">{{(i.type)|translate}}</span>
...@@ -36,11 +36,11 @@ ...@@ -36,11 +36,11 @@
<span class="text-bold" translate="Country"></span>: <span class="text-bold" translate="Country"></span>:
<div class="dropdown" style="margin-left:10px"> <div class="dropdown" style="margin-left:10px">
<button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu3" <button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu3"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" style="width: 120px;"> data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" style="width: 150px;">
{{selectCountry ? ((selectCountry)|translate):('PleaseSelect' | translate)}} {{selectCountry ? ((selectCountry)|translate):('PleaseSelect' | translate)}}
<span class="caret" style="float: right "></span> <span class="caret" style="float: right "></span>
</button> </button>
<ul class="dropdown-menu" style="width: 120px;" aria-labelledby="dropdownMenu3"> <ul class="dropdown-menu" style="width: 150px;max-height: 300px;overflow-y: auto;" aria-labelledby="dropdownMenu3">
<li ng-repeat="i in countryList" ng-click="selectCountryEvent(i)"> <li ng-repeat="i in countryList" ng-click="selectCountryEvent(i)">
<div class="checkbox-custom checkbox-default"> <div class="checkbox-custom checkbox-default">
<span style="margin-left:15px; float: left;">{{i}}</span> <span style="margin-left:15px; float: left;">{{i}}</span>
...@@ -51,14 +51,14 @@ ...@@ -51,14 +51,14 @@
<span class="text-bold" translate="Company"></span>: <span class="text-bold" translate="Company"></span>:
<div class="dropdown" style="margin-left:10px"> <div class="dropdown" style="margin-left:10px">
<button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu4" <button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu4"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" style="width: 120px;"> data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" style="width: 250px;">
{{selectCompany ? ((selectCompany)|translate):('PleaseSelect' | translate)}} {{selectCompany ? ((selectCompany)|translate):('PleaseSelect' | translate)}}
<span class="caret" style="float: right "></span> <span class="caret" style="float: right "></span>
</button> </button>
<ul class="dropdown-menu" style="width: 120px;" aria-labelledby="dropdownMenu4"> <ul class="dropdown-menu" style="width: 250px;max-height: 300px;overflow-y: auto;" aria-labelledby="dropdownMenu4">
<li ng-repeat="i in companyList" ng-click="selectCompanyEvent(i)"> <li ng-repeat="i in companyList" ng-click="selectCompanyEvent(i)">
<div class="checkbox-custom checkbox-default"> <div class="checkbox-custom checkbox-default">
<span style="margin-left:15px; float: left;">{{i}}</span> <span style="margin-left:15px; float: left;">{{i.name}}</span>
</div> </div>
</li> </li>
</ul> </ul>
...@@ -66,22 +66,22 @@ ...@@ -66,22 +66,22 @@
<button type="button" <button type="button"
ngf-select="" type="file" ng-model="importExcelFile" ngf-drag-over-class="'dragover'" accept=".xls,.xlsx" ngf-multiple="false" ngf-select="" type="file" ng-model="importExcelFile" ngf-drag-over-class="'dragover'" accept=".xls,.xlsx" ngf-multiple="false"
ngf-allow-dir="false" class="btn btn-vat-third" style="margin-right:10px;margin-left:10px"> ngf-allow-dir="false" class="btn btn-vat-third" style="margin-right:10px;margin-left:10px;max-width: 30px;">
{{fileName ? ((fileName)|limitString:maxTitleLength):'SelectFile' | translate}} {{fileName ? ((fileName)|limitString:5):'SelectFile' | translate}}
</button> </button>
<button type="button" atms-permission permission-control-type="ngIf" permission-code="{{$root.vatPermission.dataImport.balanceSheet.importCode}}" <button type="button" atms-permission permission-control-type="ngIf"
class="btn btn-vat-primary" style="float:right; margin-right: 10px;margin-left: 30px;margin-top: 8px;" class="btn btn-vat-primary" style="float:right;margin-left: 15px;margin-top: 8px;"
translate="ExportBtn" translate="ExportBtn"
ng-click="doExport()"></button> ng-click="doExport()"></button>
<button type="button" atms-permission permission-control-type="ngIf" <button type="button" atms-permission permission-control-type="ngIf"
class="btn btn-vat-primary" style="float:right; margin-right: 10px;margin-left: 30px;margin-top: 8px;" class="btn btn-vat-primary" style="float:right;margin-top: 8px;"
translate="ImportBtn" translate="ImportBtn"
ng-click="doUpload()"></button> ng-click="doUpload()"></button>
<button type="button" atms-permission permission-control-type="ngIf" <button type="button" atms-permission permission-control-type="ngIf"
class="btn btn-vat-primary" style="float:right; margin-right: 10px;margin-left: 30px;margin-top: 8px;" class="btn btn-vat-primary" style="float:right;margin-top: 8px;"
translate="TemplateBtn" translate="TemplateBtn"
ng-click="downloadTemplate()"></button> ng-click="downloadTemplate()"></button>
</div> </div>
......
...@@ -7,7 +7,7 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', ' ...@@ -7,7 +7,7 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
$scope.pleaseSelect = $translate.instant('PleaseSelect'); $scope.pleaseSelect = $translate.instant('PleaseSelect');
$scope.startDate = new Date(new Date().getFullYear() - 20, 1, 1); $scope.startDate = new Date(new Date().getFullYear() - 20, 1, 1);
$scope.endDate = new Date(new Date().getFullYear() + 20, 1, 1); $scope.endDate = new Date(new Date().getFullYear() + 20, 1, 1);
$scope.viewMode = 1; $scope.viewMode = days;
var defaultSelcectRegion = { var defaultSelcectRegion = {
id: 0, id: 0,
...@@ -114,6 +114,18 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', ' ...@@ -114,6 +114,18 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
// 是否为境外企业 // 是否为境外企业
editModel.oversea = $scope.isInternational; editModel.oversea = $scope.isInternational;
if((typeof $scope.editOrgModel.logoutTime) ==="string"){
if (""!==($scope.editOrgModel.logoutTime)) {
$scope.editOrgModel.logoutTime = new Date($scope.editOrgModel.logoutTime);
}
}
if((typeof $scope.editOrgModel.foundationDate) ==="string"){
if (""!==($scope.editOrgModel.foundationDate)) {
$scope.editOrgModel.foundationDate = new Date($scope.editOrgModel.foundationDate);
}
}
if ($scope.isAdd) { if ($scope.isAdd) {
editModel.isActive = true; editModel.isActive = true;
orgService.addOrg(editModel).success(function (orgId) { orgService.addOrg(editModel).success(function (orgId) {
...@@ -250,9 +262,10 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', ' ...@@ -250,9 +262,10 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
if ($scope.componentSelectedArea) { if ($scope.componentSelectedArea) {
editModel.areaID = $scope.selectedAreaId; editModel.areaID = $scope.selectedAreaId;
} }
if((typeof $scope.editOrgModel.foundationDate) ==="string"){ if((typeof $scope.editOrgModel.foundationDate) ==="string"){
if (""!==($scope.editOrgModel.foundationDate)) { if (""!==($scope.editOrgModel.foundationDate)) {
$scope.editOrgModel.foundationDate = new Date(Date.parse($scope.editOrgModel.foundationDate.replace(/-/g, "/"))); $scope.editOrgModel.foundationDate = new Date($scope.editOrgModel.foundationDate);
} }
} }
......
...@@ -85,6 +85,8 @@ ...@@ -85,6 +85,8 @@
.dropdown-menu { .dropdown-menu {
min-width: 100px; min-width: 100px;
max-height: 300px;
overflow-y: auto;
li { li {
text-align: center; text-align: center;
......
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
.dropdown-menu { .dropdown-menu {
min-width: 100px; min-width: 100px;
max-height: 300px;
overflow-y: auto;
li { li {
padding: 5px; padding: 5px;
......
...@@ -85,6 +85,8 @@ ...@@ -85,6 +85,8 @@
.dropdown-menu { .dropdown-menu {
min-width: 100px; min-width: 100px;
max-height: 300px;
overflow-y: auto;
li { li {
text-align: center; text-align: center;
......
...@@ -85,6 +85,8 @@ ...@@ -85,6 +85,8 @@
.dropdown-menu { .dropdown-menu {
min-width: 100px; min-width: 100px;
max-height: 300px;
overflow-y: auto;
li { li {
text-align: center; text-align: center;
......
...@@ -85,6 +85,8 @@ ...@@ -85,6 +85,8 @@
.dropdown-menu { .dropdown-menu {
min-width: 100px; min-width: 100px;
max-height: 300px;
overflow-y: auto;
li { li {
text-align: center; text-align: center;
......
...@@ -85,6 +85,8 @@ ...@@ -85,6 +85,8 @@
.dropdown-menu { .dropdown-menu {
min-width: 100px; min-width: 100px;
max-height: 300px;
overflow-y: auto;
li { li {
text-align: center; text-align: center;
......
...@@ -85,6 +85,8 @@ ...@@ -85,6 +85,8 @@
.dropdown-menu { .dropdown-menu {
min-width: 100px; min-width: 100px;
max-height: 300px;
overflow-y: auto;
li { li {
text-align: center; text-align: center;
......
...@@ -85,6 +85,8 @@ ...@@ -85,6 +85,8 @@
.dropdown-menu { .dropdown-menu {
min-width: 100px; min-width: 100px;
max-height: 300px;
overflow-y: auto;
li { li {
text-align: center; text-align: center;
......
...@@ -85,6 +85,8 @@ ...@@ -85,6 +85,8 @@
.dropdown-menu { .dropdown-menu {
min-width: 100px; min-width: 100px;
max-height: 300px;
overflow-y: auto;
li { li {
text-align: center; text-align: center;
......
...@@ -85,6 +85,8 @@ ...@@ -85,6 +85,8 @@
.dropdown-menu { .dropdown-menu {
min-width: 100px; min-width: 100px;
max-height: 300px;
overflow-y: auto;
li { li {
text-align: center; text-align: center;
......
...@@ -85,6 +85,8 @@ ...@@ -85,6 +85,8 @@
.dropdown-menu { .dropdown-menu {
min-width: 100px; min-width: 100px;
max-height: 300px;
overflow-y: auto;
li { li {
text-align: center; text-align: center;
......
...@@ -85,6 +85,8 @@ ...@@ -85,6 +85,8 @@
.dropdown-menu { .dropdown-menu {
min-width: 100px; min-width: 100px;
max-height: 300px;
overflow-y: auto;
li { li {
text-align: center; text-align: center;
......
...@@ -85,6 +85,8 @@ ...@@ -85,6 +85,8 @@
.dropdown-menu { .dropdown-menu {
min-width: 100px; min-width: 100px;
max-height: 300px;
overflow-y: auto;
li { li {
text-align: center; text-align: center;
......
...@@ -85,6 +85,8 @@ ...@@ -85,6 +85,8 @@
.dropdown-menu { .dropdown-menu {
min-width: 100px; min-width: 100px;
max-height: 300px;
overflow-y: auto;
li { li {
text-align: center; text-align: center;
......
...@@ -85,6 +85,8 @@ ...@@ -85,6 +85,8 @@
.dropdown-menu { .dropdown-menu {
min-width: 100px; min-width: 100px;
max-height: 300px;
overflow-y: auto;
li { li {
text-align: center; text-align: center;
......
...@@ -82,6 +82,8 @@ ...@@ -82,6 +82,8 @@
.dropdown-menu { .dropdown-menu {
min-width: 100px; min-width: 100px;
max-height: 300px;
overflow-y: auto;
li { li {
text-align: center; text-align: center;
......
...@@ -85,6 +85,8 @@ ...@@ -85,6 +85,8 @@
.dropdown-menu { .dropdown-menu {
min-width: 100px; min-width: 100px;
max-height: 300px;
overflow-y: auto;
li { li {
text-align: center; text-align: center;
......
...@@ -85,6 +85,8 @@ ...@@ -85,6 +85,8 @@
.dropdown-menu { .dropdown-menu {
min-width: 100px; min-width: 100px;
max-height: 300px;
overflow-y: auto;
li { li {
text-align: center; text-align: center;
......
...@@ -85,6 +85,8 @@ ...@@ -85,6 +85,8 @@
.dropdown-menu { .dropdown-menu {
min-width: 100px; min-width: 100px;
max-height: 300px;
overflow-y: auto;
li { li {
text-align: center; text-align: center;
......
...@@ -1538,15 +1538,15 @@ constant.citImportFileType = { ...@@ -1538,15 +1538,15 @@ constant.citImportFileType = {
}; };
constant.fileTypeList = [ constant.fileTypeList = [
{code:0,type:"月度科目余额表"}, {code:100,type:"月度科目余额表"},
{code:1,type:"日记账"}, {code:101,type:"日记账"},
{code:2,type:"资产负债表PRC"}, {code:102,type:"资产负债表PRC"},
{code:3,type:"利润表PRC"}, {code:103,type:"利润表PRC"},
{code:4,type:"资产负债表"}, {code:104,type:"资产负债表"},
{code:5,type:"利润表"}, {code:105,type:"利润表"},
{code:6,type:"直接法现金流量表"}, {code:106,type:"直接法现金流量表"},
{code:7,type:"所有者权益变动表"}, {code:107,type:"所有者权益变动表"},
{code:8,type:"汇率表"} {code:108,type:"汇率表"}
]; ];
constant.domesticDataList = [ constant.domesticDataList = [
...@@ -1615,7 +1615,7 @@ constant.anlDownLoadFileNameList = [ ...@@ -1615,7 +1615,7 @@ constant.anlDownLoadFileNameList = [
{code:101,name:"国际税税务数据_"} {code:101,name:"国际税税务数据_"}
]; ];
constant.countryCNList = ['安哥拉', '阿富汗', '阿尔巴尼亚', '阿尔及利亚', '安道尔共和国', '安圭拉岛', '安提瓜和巴布达', '阿根廷', '亚美尼亚', '阿森松', '澳大利亚', '奥地利', '阿塞拜疆', '巴哈马', '巴林', '孟加拉国', '巴巴多斯', '白俄罗斯', '比利时', '伯利兹', '贝宁', '百慕大群岛', '玻利维亚', '博茨瓦纳', '巴西', '文莱', '保加利亚', '布基纳法索', '缅甸', '布隆迪', '喀麦隆', '加拿大', '开曼群岛', '中非共和国', '乍得', '智利', '中国', '哥伦比亚', '刚果', '库克群岛', '哥斯达黎加', '古巴', '塞浦路斯', '捷克', '丹麦', '吉布提', '多米尼加共和国', '厄瓜多尔', '埃及', '萨尔瓦多', '爱沙尼亚', '埃塞俄比亚', '斐济', '芬兰', '法国', '法属圭亚那', '法属玻利尼西亚', '加蓬', '冈比亚', '格鲁吉亚', '德国', '加纳', '直布罗陀', '希腊', '格林纳达', '关岛', '危地马拉', '几内亚', '圭亚那', '海地', '洪都拉斯', '香港', '匈牙利', '冰岛', '印度', '印度尼西亚', '伊朗', '伊拉克', '爱尔兰', '以色列', '意大利', '科特迪瓦', '牙买加', '日本', '约旦', '柬埔寨', '哈萨克斯坦', '肯尼亚', '韩国', '科威特', '吉尔吉斯坦', '老挝', '拉脱维亚', '黎巴嫩', '莱索托', '利比里亚', '利比亚', '列支敦士登', '立陶宛', '卢森堡', '澳门', '马达加斯加', '马拉维', '马来西亚', '马尔代夫', '马里', '马耳他', '马里亚那群岛', '马提尼克', '毛里求斯', '墨西哥', '摩尔多瓦', '摩纳哥', '蒙古', '蒙特塞拉特岛', '摩洛哥', '莫桑比克', '纳米比亚', '瑙鲁', '尼泊尔', '荷属安的列斯', '荷兰', '新西兰', '尼加拉瓜', '尼日尔', '尼日利亚', '朝鲜', '挪威', '阿曼', '巴基斯坦', '巴拿马', '巴布亚新几内亚', '巴拉圭', '秘鲁', '菲律宾', '波兰', '葡萄牙', '波多黎各', '卡塔尔', '留尼旺', '罗马尼亚', '俄罗斯', '圣卢西亚', '圣文森特岛', '东萨摩亚(美)', '西萨摩亚', '圣马力诺', '圣多美和普林西比', '沙特阿拉伯', '塞内加尔', '塞舌尔', '塞拉利昂', '新加坡', '斯洛伐克', '斯洛文尼亚', '所罗门群岛', '索马里', '南非', '西班牙', '斯里兰卡', '圣卢西亚', '圣文森特', '苏丹', '苏里南', '斯威士兰', '瑞典', '瑞士', '叙利亚', '台湾省', '塔吉克斯坦', '坦桑尼亚', '泰国', '多哥', '汤加', '特立尼达和多巴哥', '突尼斯', '土耳其', '土库曼斯坦', '乌干达', '乌克兰', '阿拉伯联合酋长国', '英国', '美国', '乌拉圭', '乌兹别克斯坦', '委内瑞拉', '越南', '也门', '南斯拉夫', '津巴布韦', '扎伊尔', '赞比亚']; constant.countryCNList = ['安哥拉', '阿富汗', '阿尔巴尼亚', '阿尔及利亚', '安道尔共和国', '安圭拉岛', '安提瓜和巴布达', '阿根廷', '亚美尼亚', '阿森松', '澳大利亚', '奥地利', '阿塞拜疆', '巴哈马', '巴林', '孟加拉国', '巴巴多斯', '白俄罗斯', '比利时', '伯利兹', '贝宁', '百慕大群岛', '玻利维亚', '博茨瓦纳', '巴西', '文莱', '保加利亚', '布基纳法索', '缅甸', '布隆迪', '喀麦隆', '加拿大', '开曼群岛', '中非共和国', '乍得', '智利', '中国', '哥伦比亚', '刚果', '库克群岛', '哥斯达黎加', '古巴', '塞浦路斯', '捷克', '丹麦', '吉布提', '多米尼加共和国', '厄瓜多尔', '埃及', '萨尔瓦多', '爱沙尼亚', '埃塞俄比亚', '斐济', '芬兰', '法国', '法属圭亚那', '法属玻利尼西亚', '加蓬', '冈比亚', '格鲁吉亚', '德国', '加纳', '直布罗陀', '希腊', '格林纳达', '关岛', '危地马拉', '几内亚', '圭亚那', '海地', '洪都拉斯', '香港', '匈牙利', '冰岛', '印度', '印度尼西亚', '伊朗', '伊拉克', '爱尔兰', '以色列', '意大利', '科特迪瓦', '牙买加', '日本', '约旦', '柬埔寨', '哈萨克斯坦', '肯尼亚', '韩国', '科威特', '吉尔吉斯坦', '老挝', '拉脱维亚', '黎巴嫩', '莱索托', '利比里亚', '利比亚', '列支敦士登', '立陶宛', '卢森堡', '澳门', '马达加斯加', '马拉维', '马来西亚', '马尔代夫', '马里', '马耳他', '马里亚那群岛', '马提尼克', '毛里求斯', '墨西哥', '摩尔多瓦', '摩纳哥', '蒙古', '蒙特塞拉特岛', '摩洛哥', '莫桑比克', '纳米比亚', '瑙鲁', '尼泊尔', '荷属安的列斯', '荷兰', '新西兰', '尼加拉瓜', '尼日尔', '尼日利亚', '朝鲜', '挪威', '阿曼', '巴基斯坦', '巴拿马', '巴布亚新几内亚', '巴拉圭', '秘鲁', '菲律宾', '波兰', '葡萄牙', '波多黎各', '卡塔尔', '留尼旺', '罗马尼亚', '俄罗斯', '圣卢西亚', '圣文森特岛', '东萨摩亚(美)', '西萨摩亚', '圣马力诺', '圣多美和普林西比', '沙特阿拉伯', '塞内加尔', '塞舌尔', '塞拉利昂', '新加坡', '斯洛伐克', '斯洛文尼亚', '所罗门群岛', '索马里', '南非', '西班牙', '斯里兰卡', '圣文森特', '苏丹', '苏里南', '斯威士兰', '瑞典', '瑞士', '叙利亚', '台湾省', '塔吉克斯坦', '坦桑尼亚', '泰国', '多哥', '汤加', '特立尼达和多巴哥', '突尼斯', '土耳其', '土库曼斯坦', '乌干达', '乌克兰', '阿拉伯联合酋长国', '英国', '美国', '乌拉圭', '乌兹别克斯坦', '委内瑞拉', '越南', '也门', '南斯拉夫', '津巴布韦', '扎伊尔', '赞比亚'];
constant.countryENList = ['Angola', 'Afghanistan', 'Albania', 'Algeria', 'Andorra', 'Anguilla', 'Antigua and Barbuda', 'Argentina', 'Armenia', 'Ascension', 'Australia', 'Austria', 'Azerbaijan', 'Bahamas', 'Bahrain', 'Bangladesh', 'Barbados', 'Belarus', 'Belgium', 'Belize', 'Benin', 'Bermuda Is', 'Bolivia', 'Botswana', 'Brazil', 'Brunei', 'Bulgaria', 'Burkina Faso', 'Burma', 'Burundi', 'Cameroon', 'Canada', 'Cayman Is', 'Central African Republic', 'Chad', 'Chile', 'China', 'Colombia', 'Congo', 'Cook Is', 'Costa Rica', 'Cuba', 'Cyprus', 'Czech Republic', 'Denmark', 'Djibouti', 'Dominica Rep', 'Ecuador', 'Egypt', 'EI Salvador', 'Estonia', 'Ethiopia', 'Fiji', 'Finland', 'France', 'French Guiana', 'French Polynesia', 'Gabon', 'Gambia', 'Georgia', 'Germany', 'Ghana', 'Gibraltar', 'Greece', 'Grenada', 'Guam', 'Guatemala', 'Guinea', 'Guyana', 'Haiti', 'Honduras', 'Hongkong', 'Hungary', 'Iceland', 'India', 'Indonesia', 'Iran', 'Iraq', 'Ireland', 'Israel', 'Italy', 'Ivory Coast', 'Jamaica', 'Japan', 'Jordan', 'Kampuchea (Cambodia )', 'Kazakstan', 'Kenya', 'Korea', 'Kuwait', 'Kyrgyzstan', 'Laos', 'Latvia', 'Lebanon', 'Lesotho', 'Liberia', 'Libya', 'Liechtenstein', 'Lithuania', 'Luxembourg', 'Macao', 'Madagascar', 'Malawi', 'Malaysia', 'Maldives', 'Mali', 'Malta', 'Mariana Is', 'Martinique', 'Mauritius', 'Mexico', 'Moldova', 'Monaco', 'Mongolia', 'Montserrat Is', 'Morocco', 'Mozambique', 'Namibia', 'Nauru', 'Nepal', 'Netheriands Antilles', 'Netherlands', 'New Zealand', 'Nicaragua', 'Niger', 'Nigeria', 'North Korea', 'Norway', 'Oman', 'Pakistan', 'Panama', 'Papua New Cuinea', 'Paraguay', 'Peru', 'Philippines', 'Poland', 'Portugal', 'Puerto Rico', 'Qatar', 'Reunion', 'Romania', 'Russia', 'Saint Lueia', 'Saint Vincent', 'Samoa Eastern', 'Samoa Western', 'San Marino', 'Sao Tome and Principe', 'Saudi Arabia', 'Senegal', 'Seychelles', 'Sierra Leone', 'Singapore', 'Slovakia', 'Slovenia', 'Solomon Is', 'Somali', 'South Africa', 'Spain', 'SriLanka', 'St.Lucia', 'St.Vincent', 'Sudan', 'Suriname', 'Swaziland', 'Sweden', 'Switzerland', 'Syria', 'Taiwan', 'Tajikstan', 'Tanzania', 'Thailand', 'Togo', 'Tonga', 'Trinidad and Tobago', 'Tunisia', 'Turkey', 'Turkmenistan', 'Uganda', 'Ukraine', 'United Arab Emirates', 'United Kiongdom', 'United States of America', 'Uruguay', 'Uzbekistan', 'Venezuela', 'Vietnam', 'Yemen', 'Yugoslavia', 'Zimbabwe', 'Zaire', 'Zambia']; constant.countryENList = ['Angola', 'Afghanistan', 'Albania', 'Algeria', 'Andorra', 'Anguilla', 'Antigua and Barbuda', 'Argentina', 'Armenia', 'Ascension', 'Australia', 'Austria', 'Azerbaijan', 'Bahamas', 'Bahrain', 'Bangladesh', 'Barbados', 'Belarus', 'Belgium', 'Belize', 'Benin', 'Bermuda Is', 'Bolivia', 'Botswana', 'Brazil', 'Brunei', 'Bulgaria', 'Burkina Faso', 'Burma', 'Burundi', 'Cameroon', 'Canada', 'Cayman Is', 'Central African Republic', 'Chad', 'Chile', 'China', 'Colombia', 'Congo', 'Cook Is', 'Costa Rica', 'Cuba', 'Cyprus', 'Czech Republic', 'Denmark', 'Djibouti', 'Dominica Rep', 'Ecuador', 'Egypt', 'EI Salvador', 'Estonia', 'Ethiopia', 'Fiji', 'Finland', 'France', 'French Guiana', 'French Polynesia', 'Gabon', 'Gambia', 'Georgia', 'Germany', 'Ghana', 'Gibraltar', 'Greece', 'Grenada', 'Guam', 'Guatemala', 'Guinea', 'Guyana', 'Haiti', 'Honduras', 'Hongkong', 'Hungary', 'Iceland', 'India', 'Indonesia', 'Iran', 'Iraq', 'Ireland', 'Israel', 'Italy', 'Ivory Coast', 'Jamaica', 'Japan', 'Jordan', 'Kampuchea (Cambodia )', 'Kazakstan', 'Kenya', 'Korea', 'Kuwait', 'Kyrgyzstan', 'Laos', 'Latvia', 'Lebanon', 'Lesotho', 'Liberia', 'Libya', 'Liechtenstein', 'Lithuania', 'Luxembourg', 'Macao', 'Madagascar', 'Malawi', 'Malaysia', 'Maldives', 'Mali', 'Malta', 'Mariana Is', 'Martinique', 'Mauritius', 'Mexico', 'Moldova', 'Monaco', 'Mongolia', 'Montserrat Is', 'Morocco', 'Mozambique', 'Namibia', 'Nauru', 'Nepal', 'Netheriands Antilles', 'Netherlands', 'New Zealand', 'Nicaragua', 'Niger', 'Nigeria', 'North Korea', 'Norway', 'Oman', 'Pakistan', 'Panama', 'Papua New Cuinea', 'Paraguay', 'Peru', 'Philippines', 'Poland', 'Portugal', 'Puerto Rico', 'Qatar', 'Reunion', 'Romania', 'Russia', 'Saint Lueia', 'Saint Vincent', 'Samoa Eastern', 'Samoa Western', 'San Marino', 'Sao Tome and Principe', 'Saudi Arabia', 'Senegal', 'Seychelles', 'Sierra Leone', 'Singapore', 'Slovakia', 'Slovenia', 'Solomon Is', 'Somali', 'South Africa', 'Spain', 'SriLanka', 'St.Lucia', 'St.Vincent', 'Sudan', 'Suriname', 'Swaziland', 'Sweden', 'Switzerland', 'Syria', 'Taiwan', 'Tajikstan', 'Tanzania', 'Thailand', 'Togo', 'Tonga', 'Trinidad and Tobago', 'Tunisia', 'Turkey', 'Turkmenistan', 'Uganda', 'Ukraine', 'United Arab Emirates', 'United Kiongdom', 'United States of America', 'Uruguay', 'Uzbekistan', 'Venezuela', 'Vietnam', 'Yemen', 'Yugoslavia', 'Zimbabwe', 'Zaire', 'Zambia'];
......
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
}; };
//导入事件 //导入事件
var callApi = function () { var callFinancialApi = function () {
var periodStr = $scope.UploadPeriodTime; var periodStr = $scope.UploadPeriodTime;
dataImportService.callExtractFinancialData($scope.checkedCompanyCodeList,periodStr,$scope.checkedFileCodeList).success(function (data) { dataImportService.callExtractFinancialData($scope.checkedCompanyCodeList,periodStr,$scope.checkedFileCodeList).success(function (data) {
if (data) { if (data) {
...@@ -150,17 +150,24 @@ ...@@ -150,17 +150,24 @@
allowHeaderFiltering: false, allowHeaderFiltering: false,
width: '27%', width: '27%',
caption: $translate.instant('CompanyName') caption: $translate.instant('CompanyName')
}, {
dataField: "fileType",
allowHeaderFiltering: false,
width: '27%',
caption: $translate.instant('ExtractFile')
}, { }, {
dataField: "periodYear", dataField: "periodYear",
allowHeaderFiltering: false, allowHeaderFiltering: false,
width: '5%', width: '5%',
caption: $translate.instant('YearPeriod') caption: $translate.instant('YearPeriod')
}, { },
/*{
dataField: "periodMonth", dataField: "periodMonth",
allowHeaderFiltering: false, allowHeaderFiltering: false,
width: '10%', width: '10%',
caption: $translate.instant('TMSPeriod') caption: $translate.instant('TMSPeriod')
}, { }, */
{
dataField: "periodMonth", dataField: "periodMonth",
allowHeaderFiltering: false, allowHeaderFiltering: false,
width: '5%', width: '5%',
...@@ -389,7 +396,7 @@ ...@@ -389,7 +396,7 @@
}; };
var initParam = function () { var initParam = function () {
$scope.callApi = callApi; $scope.callFinancialApi = callFinancialApi;
$scope.initPagingControl = initPagingControl; $scope.initPagingControl = initPagingControl;
$scope.setButtonWrapStyle = setButtonWrapStyle; $scope.setButtonWrapStyle = setButtonWrapStyle;
$scope.getGridHeight = getGridHeight; $scope.getGridHeight = getGridHeight;
......
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
<button type="button" atms-permission permission-control-type="ngIf" permission-code="{{$root.vatPermission.dataImport.balanceSheet.importCode}}" <button type="button" atms-permission permission-control-type="ngIf" permission-code="{{$root.vatPermission.dataImport.balanceSheet.importCode}}"
class="btn btn-vat-primary" style="float:right; margin-right: 10px;margin-left: 30px;margin-top: 8px;" class="btn btn-vat-primary" style="float:right; margin-right: 10px;margin-left: 30px;margin-top: 8px;"
translate="ImportBtn" translate="ImportBtn"
ng-click="callApi()"></button> ng-click="callFinancialApi()"></button>
</div> </div>
</div> </div>
</form> </form>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
serviceTypeId: "=?", serviceTypeId: "=?",
periodId: "=?" periodId: "=?"
}, },
controller: 'extractInvoiceDataController', controller: 'extractFinancialDataController',
link: function (scope, element) { link: function (scope, element) {
$('.main-contents')[0].style.width = "260px"; $('.main-contents')[0].style.width = "260px";
$('.data-import-contents')[0].style.display = "block"; $('.data-import-contents')[0].style.display = "block";
......
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
}; };
//导入事件 //导入事件
var callApi = function () { var callInvoiceApi = function () {
var periodStr = $scope.UploadPeriodTime; var periodStr = $scope.UploadPeriodTime;
dataImportService.callExtractInvoiceData($scope.checkedCompanyCodeList,periodStr,$scope.checkedFileCodeList).success(function (data) { dataImportService.callExtractInvoiceData($scope.checkedCompanyCodeList,periodStr,$scope.checkedFileCodeList).success(function (data) {
...@@ -389,7 +389,7 @@ ...@@ -389,7 +389,7 @@
}; };
var initParam = function () { var initParam = function () {
$scope.callApi = callApi; $scope.callInvoiceApi = callInvoiceApi;
$scope.initPagingControl = initPagingControl; $scope.initPagingControl = initPagingControl;
$scope.setButtonWrapStyle = setButtonWrapStyle; $scope.setButtonWrapStyle = setButtonWrapStyle;
$scope.getGridHeight = getGridHeight; $scope.getGridHeight = getGridHeight;
......
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
<button type="button" atms-permission permission-control-type="ngIf" permission-code="{{$root.vatPermission.dataImport.balanceSheet.importCode}}" <button type="button" atms-permission permission-control-type="ngIf" permission-code="{{$root.vatPermission.dataImport.balanceSheet.importCode}}"
class="btn btn-vat-primary" style="float:right; margin-right: 10px;margin-left: 30px;margin-top: 8px;" class="btn btn-vat-primary" style="float:right; margin-right: 10px;margin-left: 30px;margin-top: 8px;"
translate="ImportBtn" translate="ImportBtn"
ng-click="callApi()"></button> ng-click="callInvoiceApi()"></button>
</div> </div>
</div> </div>
</form> </form>
......
...@@ -279,13 +279,9 @@ ...@@ -279,13 +279,9 @@
var localDate=$filter('date')(new Date(), 'yyyyMMddHHmmss'); var localDate=$filter('date')(new Date(), 'yyyyMMddHHmmss');
var fileName= constant.exportExcelFileName.invoiceData + localDate; var fileName= constant.exportExcelFileName.invoiceData + localDate;
vatPreviewService.initExportIDData($scope.queryParams,fileName).then(function (data) { vatPreviewService.initExportIDData($scope.queryParams,fileName).then(function (data) {
if (data) {
ackMessageBox.success(translate('FileExportSuccess'));
}
}); });
}; };
$scope.gridOptions = { $scope.gridOptions = {
rowHeight: constant.UIGrid.rowHeight, rowHeight: constant.UIGrid.rowHeight,
selectionRowHeaderWidth: constant.UIGrid.rowHeight, selectionRowHeaderWidth: constant.UIGrid.rowHeight,
......
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