Commit b2991ee2 authored by chase's avatar chase

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

parents 606f4439 8093e0da
...@@ -18,8 +18,8 @@ import pwc.taxtech.atms.service.impl.AnalysisServiceImpl; ...@@ -18,8 +18,8 @@ import pwc.taxtech.atms.service.impl.AnalysisServiceImpl;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.List; import java.util.List;
public class AnylysisJob extends QuartzJobBean { public class AnalysisJob extends QuartzJobBean {
private static final Logger logger = LoggerFactory.getLogger(AnylysisJob.class); private static final Logger logger = LoggerFactory.getLogger(AnalysisJob.class);
@Resource @Resource
private OrganizationMapper organizationMapper; private OrganizationMapper organizationMapper;
...@@ -43,19 +43,19 @@ public class AnylysisJob extends QuartzJobBean { ...@@ -43,19 +43,19 @@ public class AnylysisJob extends QuartzJobBean {
logger.info(String.format("开始分析%s预期返还税数据",period)); logger.info(String.format("开始分析%s预期返还税数据",period));
analysisJobService.analysisExpectedTax(orgs,period, EnumTbImportType.CoverImport.getCode()); analysisJobService.analysisExpectedTax(orgs,period, EnumTbImportType.CoverImport.getCode());
logger.info(String.format("开始分析%s预期返还税数据",period)); logger.info(String.format("开始分析%s费用数据",period));
analysisJobService.analysisFee(orgs,period, EnumTbImportType.CoverImport.getCode()); analysisJobService.analysisFee(orgs,period, EnumTbImportType.CoverImport.getCode());
logger.info(String.format("开始分析%s预期返还税数据",period)); logger.info(String.format("开始分析%s档案管理数据",period));
analysisJobService.analysisFileManagement(orgs,period, EnumTbImportType.CoverImport.getCode()); analysisJobService.analysisFileManagement(orgs,period, EnumTbImportType.CoverImport.getCode());
logger.info(String.format("开始分析%s预期返还税数据",period)); logger.info(String.format("开始分析%s机构数据",period));
analysisJobService.analysisMaster(orgs,period, EnumTbImportType.CoverImport.getCode()); analysisJobService.analysisMaster(orgs,period, EnumTbImportType.CoverImport.getCode());
logger.info(String.format("开始分析%s预期返还税数据",period)); logger.info(String.format("开始分析%s申报表数据",period));
analysisJobService.analysisSales(orgs,period, EnumTbImportType.CoverImport.getCode()); analysisJobService.analysisSales(orgs,period, EnumTbImportType.CoverImport.getCode());
logger.info(String.format("开始分析%s预期返还税数据",period)); logger.info(String.format("开始分析%s返还后税数据",period));
analysisJobService.analysisTaxReturnEnd(orgs,period, EnumTbImportType.CoverImport.getCode()); analysisJobService.analysisTaxReturnEnd(orgs,period, EnumTbImportType.CoverImport.getCode());
} }
......
...@@ -45,6 +45,7 @@ public class OrgSyncJob extends QuartzJobBean { ...@@ -45,6 +45,7 @@ public class OrgSyncJob extends QuartzJobBean {
protected void executeInternal(JobExecutionContext jobExecutionContext) throws JobExecutionException { protected void executeInternal(JobExecutionContext jobExecutionContext) throws JobExecutionException {
JobDataMap dataMap = jobExecutionContext.getJobDetail().getJobDataMap(); JobDataMap dataMap = jobExecutionContext.getJobDetail().getJobDataMap();
Map<String, String> headers = new HashMap<>(); Map<String, String> headers = new HashMap<>();
// todo 这里token需确认
headers.put("token", token); headers.put("token", token);
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");
......
...@@ -289,6 +289,25 @@ public class DateUtils { ...@@ -289,6 +289,25 @@ public class DateUtils {
return hour; return hour;
} }
public static Date getZero(){
Calendar calendar = Calendar.getInstance();
calendar.setTime(new Date());
calendar.set(Calendar.HOUR_OF_DAY, 0);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.SECOND, 0);
return calendar.getTime();
}
public static Date getThreeDayZero(){
Calendar calendar = Calendar.getInstance();
calendar.setTime(new Date());
calendar.set(Calendar.DAY_OF_MONTH,-3);
calendar.set(Calendar.HOUR_OF_DAY, 0);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.SECOND, 0);
return calendar.getTime();
}
/** /**
* 得到现在分钟 * 得到现在分钟
* *
......
...@@ -138,6 +138,47 @@ public class HttpUtil { ...@@ -138,6 +138,47 @@ public class HttpUtil {
return result; return result;
} }
public static String post(String url,Map<String, String> headers, String mimeType,String charset, Integer connTimeout, Integer readTimeout)
throws ConnectTimeoutException, SocketTimeoutException, Exception {
HttpClient client = null;
HttpPost post = new HttpPost(url);
String result = "";
try {
if (headers != null && !headers.isEmpty()) {
for (Entry<String, String> entry : headers.entrySet()) {
post.addHeader(entry.getKey(), entry.getValue());
}
}
// 设置参数
Builder customReqConf = RequestConfig.custom();
if (connTimeout != null) {
customReqConf.setConnectTimeout(connTimeout);
}
if (readTimeout != null) {
customReqConf.setSocketTimeout(readTimeout);
}
post.setConfig(customReqConf.build());
HttpResponse res;
if (url.startsWith("https")) {
// 执行 Https 请求.
client = createSSLInsecureClient();
res = client.execute(post);
} else {
// 执行 Http 请求.
client = HttpUtil.client;
res = client.execute(post);
}
result = IOUtils.toString(res.getEntity().getContent(), charset);
} finally {
post.releaseConnection();
if (url.startsWith("https") && client != null&& client instanceof CloseableHttpClient) {
((CloseableHttpClient) client).close();
}
}
return result;
}
/** /**
* 提交form表单 * 提交form表单
......
...@@ -50,6 +50,17 @@ public class RedLetterInfoTableDto implements Serializable { ...@@ -50,6 +50,17 @@ public class RedLetterInfoTableDto implements Serializable {
*/ */
private String projectId; private String projectId;
/**
* Database Column Remarks:
* 期间
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column red_letter_info_table.period
*
* @mbg.generated
*/
private Integer period;
/** /**
* Database Column Remarks: * Database Column Remarks:
* 税务系统期间 * 税务系统期间
...@@ -70,7 +81,7 @@ public class RedLetterInfoTableDto implements Serializable { ...@@ -70,7 +81,7 @@ public class RedLetterInfoTableDto implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
private Integer fillInDate; private Date fillInDate;
/** /**
* Database Column Remarks: * Database Column Remarks:
...@@ -295,6 +306,30 @@ public class RedLetterInfoTableDto implements Serializable { ...@@ -295,6 +306,30 @@ public class RedLetterInfoTableDto implements Serializable {
this.projectId = projectId == null ? null : projectId.trim(); this.projectId = projectId == null ? null : projectId.trim();
} }
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column red_letter_info_table.period
*
* @return the value of red_letter_info_table.period
*
* @mbg.generated
*/
public Integer getPeriod() {
return period;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column red_letter_info_table.period
*
* @param period the value for red_letter_info_table.period
*
* @mbg.generated
*/
public void setPeriod(Integer period) {
this.period = period;
}
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method returns the value of the database column red_letter_info_table.tms_period * This method returns the value of the database column red_letter_info_table.tms_period
...@@ -327,7 +362,7 @@ public class RedLetterInfoTableDto implements Serializable { ...@@ -327,7 +362,7 @@ public class RedLetterInfoTableDto implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
public Integer getFillInDate() { public Date getFillInDate() {
return fillInDate; return fillInDate;
} }
...@@ -339,7 +374,7 @@ public class RedLetterInfoTableDto implements Serializable { ...@@ -339,7 +374,7 @@ public class RedLetterInfoTableDto implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
public void setFillInDate(Integer fillInDate) { public void setFillInDate(Date fillInDate) {
this.fillInDate = fillInDate; this.fillInDate = fillInDate;
} }
...@@ -670,6 +705,7 @@ public class RedLetterInfoTableDto implements Serializable { ...@@ -670,6 +705,7 @@ public class RedLetterInfoTableDto implements Serializable {
sb.append(", id=").append(id); sb.append(", id=").append(id);
sb.append(", organizationId=").append(organizationId); sb.append(", organizationId=").append(organizationId);
sb.append(", projectId=").append(projectId); sb.append(", projectId=").append(projectId);
sb.append(", period=").append(period);
sb.append(", tmsPeriod=").append(tmsPeriod); sb.append(", tmsPeriod=").append(tmsPeriod);
sb.append(", fillInDate=").append(fillInDate); sb.append(", fillInDate=").append(fillInDate);
sb.append(", subjectNum=").append(subjectNum); sb.append(", subjectNum=").append(subjectNum);
......
...@@ -3,6 +3,7 @@ import org.apache.commons.codec.binary.Base64; ...@@ -3,6 +3,7 @@ import org.apache.commons.codec.binary.Base64;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.exception.ServiceException; import pwc.taxtech.atms.exception.ServiceException;
import pwc.taxtech.atms.service.impl.ProjectServiceImpl; import pwc.taxtech.atms.service.impl.ProjectServiceImpl;
import sun.misc.BASE64Decoder; import sun.misc.BASE64Decoder;
...@@ -24,16 +25,13 @@ import java.util.TimeZone; ...@@ -24,16 +25,13 @@ import java.util.TimeZone;
* @Date: 20/03/2019 20:41 * @Date: 20/03/2019 20:41
* @Description: * @Description:
*/ */
@Service
public class DtsTokenService { public class DtsTokenService {
private static final Logger logger = LoggerFactory.getLogger(ProjectServiceImpl.class); private static final Logger logger = LoggerFactory.getLogger(ProjectServiceImpl.class);
private static String PUBKEY;
@Value("${dd_pubkey}") @Value("${dd_pubkey}")
public void setDriver(String pubkey) { private String pubKey;
PUBKEY= pubkey;
}
public static final String KEY_ALGORITHM = "RSA"; public static final String KEY_ALGORITHM = "RSA";
...@@ -49,7 +47,6 @@ public class DtsTokenService { ...@@ -49,7 +47,6 @@ public class DtsTokenService {
* @throws * @throws
*/ */
public String encryptInput(){ public String encryptInput(){
String pubKey = PUBKEY;
BASE64Encoder base64 = new BASE64Encoder(); BASE64Encoder base64 = new BASE64Encoder();
BASE64Decoder base64Decoder = new BASE64Decoder(); BASE64Decoder base64Decoder = new BASE64Decoder();
byte[] encodeData; byte[] encodeData;
...@@ -60,11 +57,9 @@ public class DtsTokenService { ...@@ -60,11 +57,9 @@ public class DtsTokenService {
long rNum = generateRandomNumber(); long rNum = generateRandomNumber();
String inputStr1 = sDate + "@@" + "DTS" + "@@" + nonce+rNum; String inputStr1 = sDate + "@@" + "DTS" + "@@" + nonce+rNum;
byte[] data1 = inputStr1.getBytes(); byte[] data1 = inputStr1.getBytes();
logger.debug("原文:" + inputStr1);
logger.info("原文:" + inputStr1);
encodeData = encryptByPublicKey(data1, publicKey); encodeData = encryptByPublicKey(data1, publicKey);
logger.debug("公钥加密后:" + base64.encode(encodeData));
logger.info("公钥加密后:" + base64.encode(encodeData));
} catch (Exception ex) { } catch (Exception ex) {
throw new ServiceException("cus" + ex); throw new ServiceException("cus" + ex);
} }
...@@ -98,7 +93,7 @@ public class DtsTokenService { ...@@ -98,7 +93,7 @@ public class DtsTokenService {
private byte[] encryptByPublicKey(byte[] data, byte[] key) throws Exception { private static byte[] encryptByPublicKey(byte[] data, byte[] key) throws Exception {
X509EncodedKeySpec x509KeySpec = new X509EncodedKeySpec(key); X509EncodedKeySpec x509KeySpec = new X509EncodedKeySpec(key);
KeyFactory keyFactory = KeyFactory.getInstance(KEY_ALGORITHM); KeyFactory keyFactory = KeyFactory.getInstance(KEY_ALGORITHM);
PublicKey publicKey = keyFactory.generatePublic(x509KeySpec); PublicKey publicKey = keyFactory.generatePublic(x509KeySpec);
......
...@@ -8,6 +8,7 @@ import pwc.taxtech.atms.common.AtmsApiSettings; ...@@ -8,6 +8,7 @@ import pwc.taxtech.atms.common.AtmsApiSettings;
import pwc.taxtech.atms.common.AuthUserHelper; import pwc.taxtech.atms.common.AuthUserHelper;
import pwc.taxtech.atms.common.ResponseMessageBuilder; import pwc.taxtech.atms.common.ResponseMessageBuilder;
import pwc.taxtech.atms.common.util.BeanUtil; import pwc.taxtech.atms.common.util.BeanUtil;
import pwc.taxtech.atms.security.dd.DtsTokenService;
public class BaseService { public class BaseService {
protected final Logger logger = LoggerFactory.getLogger(this.getClass()); protected final Logger logger = LoggerFactory.getLogger(this.getClass());
...@@ -28,5 +29,7 @@ public class BaseService { ...@@ -28,5 +29,7 @@ public class BaseService {
protected CommonDocumentHelper commonDocumentHelper; protected CommonDocumentHelper commonDocumentHelper;
@Autowired @Autowired
protected ResponseMessageBuilder responseMessageBuilder; protected ResponseMessageBuilder responseMessageBuilder;
@Autowired
protected DtsTokenService dtsTokenService;
} }
...@@ -42,6 +42,7 @@ import pwc.taxtech.atms.dto.vatdto.TrialBalanceDto; ...@@ -42,6 +42,7 @@ 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.*;
import pwc.taxtech.atms.exception.ServiceException; import pwc.taxtech.atms.exception.ServiceException;
import pwc.taxtech.atms.security.dd.DtsTokenService;
import pwc.taxtech.atms.vat.dao.*; import pwc.taxtech.atms.vat.dao.*;
import pwc.taxtech.atms.vat.entity.*; import pwc.taxtech.atms.vat.entity.*;
...@@ -972,7 +973,7 @@ public class DataImportService extends BaseService { ...@@ -972,7 +973,7 @@ public class DataImportService extends BaseService {
OrganizationExample organizationExample = new OrganizationExample(); OrganizationExample organizationExample = new OrganizationExample();
organizationExample.createCriteria().andCodeEqualTo(companyCode); organizationExample.createCriteria().andCodeEqualTo(companyCode);
Integer period = rlits.get(0).getFillInDate(); Integer period = rlits.get(0).getPeriod();
List<Organization> orgs = organizationMapper.selectByExample(organizationExample); List<Organization> orgs = organizationMapper.selectByExample(organizationExample);
DataImportLog dataImportLog = generalDataImportLog(rlits.get(0).getSubjectNum(),"", "", DataImportLog dataImportLog = generalDataImportLog(rlits.get(0).getSubjectNum(),"", "",
...@@ -1535,7 +1536,8 @@ public class DataImportService extends BaseService { ...@@ -1535,7 +1536,8 @@ public class DataImportService extends BaseService {
rlit.setSubjectNum(getCellStringValue(row.getCell(0))); rlit.setSubjectNum(getCellStringValue(row.getCell(0)));
rlit.setSubjectName(getCellStringValue(row.getCell(1))); rlit.setSubjectName(getCellStringValue(row.getCell(1)));
rlit.setRedLetterInvoiceInfoTableNum(getCellStringValue(row.getCell(2))); rlit.setRedLetterInvoiceInfoTableNum(getCellStringValue(row.getCell(2)));
rlit.setFillInDate(DateUtils.dateToPeriod(row.getCell(3).getDateCellValue())); rlit.setPeriod(DateUtils.dateToPeriod(row.getCell(3).getDateCellValue()));
rlit.setFillInDate(row.getCell(3).getDateCellValue());
rlit.setSalesTaxNumber(getCellStringValue(row.getCell(4))); rlit.setSalesTaxNumber(getCellStringValue(row.getCell(4)));
rlit.setSalespersonName(getCellStringValue(row.getCell(5))); rlit.setSalespersonName(getCellStringValue(row.getCell(5)));
rlit.setTotalAmount(getCellBigDecimalValue(row.getCell(6))); rlit.setTotalAmount(getCellBigDecimalValue(row.getCell(6)));
...@@ -1849,7 +1851,7 @@ public class DataImportService extends BaseService { ...@@ -1849,7 +1851,7 @@ public class DataImportService extends BaseService {
orgs.forEach(o -> { orgs.forEach(o -> {
try { try {
Callable callEbs = new CallEbsThread(type, o,ebsCallUrl,dataImportLogMapper,authUserHelper, Callable callEbs = new CallEbsThread(type, o,ebsCallUrl,dataImportLogMapper,authUserHelper,
idService,period, effectiveDateFrom, effectiveDateTo); idService,dtsTokenService,period, effectiveDateFrom, effectiveDateTo);
executorService.submit(callEbs); executorService.submit(callEbs);
// resList.add(future); // resList.add(future);
} catch (RejectedExecutionException rje) { } catch (RejectedExecutionException rje) {
...@@ -1872,6 +1874,12 @@ public class DataImportService extends BaseService { ...@@ -1872,6 +1874,12 @@ public class DataImportService extends BaseService {
logger.error(String.format(EnumApiCodeMsg.CALLFAILED.getMsg(), e.getMessage()), e); logger.error(String.format(EnumApiCodeMsg.CALLFAILED.getMsg(), e.getMessage()), e);
} }
}); });
// 三天外的日志隐藏
DataImportLog dil = new DataImportLog();
dil.setDisplay(false);
DataImportLogExample e = new DataImportLogExample();
e.createCriteria().andCreateTimeLessThan(DateUtils.getThreeDayZero());
dataImportLogMapper.updateByExampleSelective(dil,e);
}); });
// 校验是否全部调用成功 这里有点问题 // 校验是否全部调用成功 这里有点问题
/*int res = 0; /*int res = 0;
...@@ -1957,18 +1965,21 @@ public class DataImportService extends BaseService { ...@@ -1957,18 +1965,21 @@ public class DataImportService extends BaseService {
private DistributedIdService idService; private DistributedIdService idService;
private DtsTokenService dtsTokenService;
private String effectiveDateFrom; private String effectiveDateFrom;
private String effectiveDateTo; private String effectiveDateTo;
CallEbsThread(int type, Organization org,String ebsCallUrl,DataImportLogMapper dataImportLogMapper, CallEbsThread(int type, Organization org, String ebsCallUrl, DataImportLogMapper dataImportLogMapper,
AuthUserHelper authUserHelper,DistributedIdService idService,String period, AuthUserHelper authUserHelper, DistributedIdService idService, DtsTokenService dtsTokenService,
String effectiveDateFrom, String effectiveDateTo) { String period,String effectiveDateFrom, String effectiveDateTo) {
this.type = type; this.type = type;
this.org = org; this.org = org;
this.period = period; this.period = period;
this.ebsCallUrl = ebsCallUrl; this.ebsCallUrl = ebsCallUrl;
this.authUserHelper = authUserHelper; this.authUserHelper = authUserHelper;
this.dtsTokenService = dtsTokenService;
this.idService = idService; this.idService = idService;
this.dataImportLogMapper = dataImportLogMapper; this.dataImportLogMapper = dataImportLogMapper;
this.effectiveDateFrom = effectiveDateFrom; this.effectiveDateFrom = effectiveDateFrom;
...@@ -2008,44 +2019,46 @@ public class DataImportService extends BaseService { ...@@ -2008,44 +2019,46 @@ public class DataImportService extends BaseService {
dataImportLogMapper.insertSelective(log); dataImportLogMapper.insertSelective(log);
return 0; return 0;
} }
String secureToken = dtsTokenService.encryptInput();
Map<String,String> headers = new HashMap<>();
headers.put("secureToken",secureToken);
switch (type) { switch (type) {
case EbsExtractTypeConstant.TB: case EbsExtractTypeConstant.TB:
response = HttpUtil.post(ebsCallUrl + "/glMonthlyBal?ledgerId="+ledgerId+"&companyCode="+ code + "&period=" + period, response = HttpUtil.post(ebsCallUrl + "/glMonthlyBal?ledgerId="+ledgerId+"&companyCode="+ code + "&period=" + period,
"","application/json;charset=utf-8", "UTF-8", 10000, 10000); headers,"application/json;charset=utf-8", "UTF-8", 10000, 10000);
break; break;
case EbsExtractTypeConstant.JE: case EbsExtractTypeConstant.JE:
// 这里BA反馈可按期间获取当月日记账即可 // 这里BA反馈可按期间获取当月日记账即可
String effecDateFrom = DateUtils.getFirstDayOfMonth(year,month); String effecDateFrom = DateUtils.getFirstDayOfMonth(year,month);
String effecDateTo = DateUtils.getLastDayOfMonth(year,month); String effecDateTo = DateUtils.getLastDayOfMonth(year,month);
response = HttpUtil.post(ebsCallUrl + "/glJeLines"+"?ledgerId=" + ledgerId + "&companyCode=" + code + "&effectiveDateFrom=" + effecDateFrom+"&effectiveDateTo="+effecDateTo, response = HttpUtil.post(ebsCallUrl + "/glJeLines"+"?ledgerId=" + ledgerId + "&companyCode=" + code + "&effectiveDateFrom=" + effecDateFrom+"&effectiveDateTo="+effecDateTo,
"","application/json;charset=utf-8", "UTF-8", 10000, 10000); headers,"application/json;charset=utf-8", "UTF-8", 10000, 10000);
break; break;
case EbsExtractTypeConstant.BSPRC: case EbsExtractTypeConstant.BSPRC:
response = HttpUtil.post(ebsCallUrl + "/fsgAsset"+"?ledgerId=" + ledgerId + "&companyCode=" + code + "&period=" + period+"&prcFlag=Y", response = HttpUtil.post(ebsCallUrl + "/fsgAsset"+"?ledgerId=" + ledgerId + "&companyCode=" + code + "&period=" + period+"&prcFlag=Y",
"", headers,"application/json;charset=utf-8", "UTF-8", 10000, 10000);
"application/json;charset=utf-8", "UTF-8", 10000, 10000);
break; break;
case EbsExtractTypeConstant.PLPRC: case EbsExtractTypeConstant.PLPRC:
response = HttpUtil.post(ebsCallUrl + "/fsgProfit"+"?ledgerId=" + ledgerId + "&companyCode=" + code + "&period=" + period+"&prcFlag=Y", response = HttpUtil.post(ebsCallUrl + "/fsgProfit"+"?ledgerId=" + ledgerId + "&companyCode=" + code + "&period=" + period+"&prcFlag=Y",
"","application/json;charset=utf-8", "UTF-8", 10000, 10000); headers,"application/json;charset=utf-8", "UTF-8", 10000, 10000);
break; break;
case EbsExtractTypeConstant.BS: case EbsExtractTypeConstant.BS:
response = HttpUtil.post(ebsCallUrl + "/fsgAsset"+"?ledgerId=" + ledgerId + "&companyCode=" + code + "&period=" + period+"&prcFlag=N", response = HttpUtil.post(ebsCallUrl + "/fsgAsset"+"?ledgerId=" + ledgerId + "&companyCode=" + code + "&period=" + period+"&prcFlag=N",
"","application/json;charset=utf-8", "UTF-8", 10000, 10000); headers,"application/json;charset=utf-8", "UTF-8", 10000, 10000);
break; break;
case EbsExtractTypeConstant.PL: case EbsExtractTypeConstant.PL:
response = HttpUtil.post(ebsCallUrl + "/fsgProfit"+"?ledgerId=" + ledgerId + "&companyCode=" + code + "&period=" + period+"&prcFlag=N", response = HttpUtil.post(ebsCallUrl + "/fsgProfit"+"?ledgerId=" + ledgerId + "&companyCode=" + code + "&period=" + period+"&prcFlag=N",
"","application/json;charset=utf-8", "UTF-8", 10000, 10000); headers,"application/json;charset=utf-8", "UTF-8", 10000, 10000);
break; break;
case EbsExtractTypeConstant.CF: case EbsExtractTypeConstant.CF:
response = HttpUtil.post(ebsCallUrl + "/fsgCash"+"?ledgerId=" + ledgerId + "&companyCode=" + code + "&period=" + period, response = HttpUtil.post(ebsCallUrl + "/fsgCash"+"?ledgerId=" + ledgerId + "&companyCode=" + code + "&period=" + period,
"","application/json;charset=utf-8", "UTF-8", 10000, 10000); headers,"application/json;charset=utf-8", "UTF-8", 10000, 10000);
break; break;
case EbsExtractTypeConstant.OCTB: case EbsExtractTypeConstant.OCTB:
break; break;
case EbsExtractTypeConstant.RATE: case EbsExtractTypeConstant.RATE:
response = HttpUtil.post(ebsCallUrl + "/dailyRates"+"?period=" + period, response = HttpUtil.post(ebsCallUrl + "/dailyRates"+"?period=" + period,
"","application/json;charset=utf-8", "UTF-8", 10000, 10000); headers,"application/json;charset=utf-8", "UTF-8", 10000, 10000);
break; break;
default: default:
break; break;
......
...@@ -1046,13 +1046,19 @@ public class UserServiceImpl extends AbstractService { ...@@ -1046,13 +1046,19 @@ public class UserServiceImpl extends AbstractService {
if(data.size()<1){ if(data.size()<1){
throw new ServiceException(ErrorMessage.ExportFailed); throw new ServiceException(ErrorMessage.ExportFailed);
} }
data.forEach(d->{ for(UserRoleInfo d :data){
if(!d.getRoleInfoList().isEmpty()){ if(!d.getRoleInfoList().isEmpty()){
List<String> rList = d.getRoleInfoList().stream().map(RoleInfo::getName).collect(Collectors.toList()); List<String> rList = d.getRoleInfoList().stream().map(RoleInfo::getName).collect(Collectors.toList());
d.setRoleList(JSON.toJSONString(rList)); d.setRoleList(JSON.toJSONString(rList));
} }
d.setStatusStr(d.getStatus()); String statusStr = "";
}); if(d.getStatus() == 0){
statusStr = "禁用";
}else{
statusStr = "启用";
}
d.setStatusStr(statusStr);
}
OutputStream outputStream = commonDocumentHelper.toXlsxFileUsingJxls(data, excelTemplatePathInClassPath); OutputStream outputStream = commonDocumentHelper.toXlsxFileUsingJxls(data, excelTemplatePathInClassPath);
try { try {
......
...@@ -36,12 +36,14 @@ ...@@ -36,12 +36,14 @@
<list> <list>
<ref bean="lgApiJobTrigger"/> <ref bean="lgApiJobTrigger"/>
<ref bean="orgSyncJobTrigger"/> <ref bean="orgSyncJobTrigger"/>
<ref bean="analysisJobTrigger"/>
</list> </list>
</property> </property>
<property name="jobDetails"> <property name="jobDetails">
<list> <list>
<ref bean="lgGlBalanceJob"/> <ref bean="lgGlBalanceJob"/>
<ref bean="orgSyncJob"/> <ref bean="orgSyncJob"/>
<ref bean="analysisJob"/>
</list> </list>
</property> </property>
<property name="taskExecutor" ref="executor"/> <property name="taskExecutor" ref="executor"/>
...@@ -68,11 +70,24 @@ ...@@ -68,11 +70,24 @@
<property name="description" value="机构信息同步"/> <property name="description" value="机构信息同步"/>
</bean> </bean>
<bean name="analysisJob" class="org.springframework.scheduling.quartz.JobDetailFactoryBean">
<property name="jobClass" value="pwc.taxtech.atms.common.schedule.AnalysisJob"/>
<property name="durability" value="true"/>
<property name="requestsRecovery" value="false"/>
<property name="description" value="分析模块"/>
</bean>
<!-- 每月1日执行一次--> <!-- 每月1日执行一次-->
<bean id="orgSyncJobTrigger" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean"> <bean id="orgSyncJobTrigger" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
<property name="jobDetail" ref="orgSyncJob"/> <property name="jobDetail" ref="orgSyncJob"/>
<property name="cronExpression" value="0 0 0 1 * ?"/> <property name="cronExpression" value="0 0 0 1 * ?"/>
</bean> </bean>
<!-- 每天凌晨一点执行一次-->
<bean id="analysisJobTrigger" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
<property name="jobDetail" ref="analysisJob"/>
<property name="cronExpression" value="0 0 1 * * ?"/>
</bean>
<!-- 分布式事务配置 end --> <!-- 分布式事务配置 end -->
</beans> </beans>
\ No newline at end of file
package pwc.taxtech.atms.service.impl;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import pwc.taxtech.atms.CommonIT;
import pwc.taxtech.atms.common.util.DateUtils;
import pwc.taxtech.atms.constant.enums.EnumTbImportType;
import pwc.taxtech.atms.entity.Organization;
import pwc.taxtech.atms.entity.OrganizationExample;
import java.util.List;
/**
* @Auther: Gary J Li
* @Date: 21/03/2019 11:37
* @Description:
*/
public class AnalysisTest extends CommonIT {
private static final Logger logger = LoggerFactory.getLogger(DataInitTest.class);
@Autowired
private AnalysisJobServiceImpl analysisJobService;
@Test
public void analysisExpectedTax(){
Integer period = DateUtils.getPeriodNow();
OrganizationExample e = new OrganizationExample();
e.createCriteria().andIsActiveEqualTo(true);
List<Organization> orgs = organizationMapper.selectByExample(e);
logger.info(String.format("开始分析%s预期返还税数据",period));
analysisJobService.analysisExpectedTax(orgs,period, EnumTbImportType.CoverImport.getCode());
}
@Test
public void analysisFee(){
Integer period = DateUtils.getPeriodNow();
OrganizationExample e = new OrganizationExample();
e.createCriteria().andIsActiveEqualTo(true);
List<Organization> orgs = organizationMapper.selectByExample(e);
logger.info(String.format("开始分析%s费用数据",period));
analysisJobService.analysisFee(orgs,period, EnumTbImportType.CoverImport.getCode());
}
@Test
public void analysisFileManagement(){
Integer period = DateUtils.getPeriodNow();
OrganizationExample e = new OrganizationExample();
e.createCriteria().andIsActiveEqualTo(true);
List<Organization> orgs = organizationMapper.selectByExample(e);
logger.info(String.format("开始分析%s文档管理数据",period));
analysisJobService.analysisFileManagement(orgs,period, EnumTbImportType.CoverImport.getCode());
}
@Test
public void analysisMaster(){
Integer period = DateUtils.getPeriodNow();
OrganizationExample e = new OrganizationExample();
e.createCriteria().andIsActiveEqualTo(true);
List<Organization> orgs = organizationMapper.selectByExample(e);
logger.info(String.format("开始分析%s机构数据",period));
analysisJobService.analysisMaster(orgs,period, EnumTbImportType.CoverImport.getCode());
}
@Test
public void analysisSales(){
Integer period = DateUtils.getPeriodNow();
OrganizationExample e = new OrganizationExample();
e.createCriteria().andIsActiveEqualTo(true);
List<Organization> orgs = organizationMapper.selectByExample(e);
logger.info(String.format("开始分析%s申报表数据",period));
analysisJobService.analysisSales(orgs,period, EnumTbImportType.CoverImport.getCode());
}
@Test
public void analysisTaxReturnEnd(){
Integer period = DateUtils.getPeriodNow();
OrganizationExample e = new OrganizationExample();
e.createCriteria().andIsActiveEqualTo(true);
List<Organization> orgs = organizationMapper.selectByExample(e);
logger.info(String.format("开始分析%s返还后税数据",period));
analysisJobService.analysisTaxReturnEnd(orgs,period, EnumTbImportType.CoverImport.getCode());
}
}
...@@ -11,6 +11,7 @@ import pwc.taxtech.atms.entity.Organization; ...@@ -11,6 +11,7 @@ import pwc.taxtech.atms.entity.Organization;
import pwc.taxtech.atms.entity.OrganizationExample; import pwc.taxtech.atms.entity.OrganizationExample;
import pwc.taxtech.atms.entity.OrganizationExtra; import pwc.taxtech.atms.entity.OrganizationExtra;
import pwc.taxtech.atms.entity.OrganizationExtraExample; import pwc.taxtech.atms.entity.OrganizationExtraExample;
import pwc.taxtech.atms.security.dd.DtsTokenService;
import java.util.List; import java.util.List;
......
...@@ -246,7 +246,7 @@ public interface ProjectMapper extends MyMapper { ...@@ -246,7 +246,7 @@ public interface ProjectMapper extends MyMapper {
" AND b.service_type_id = #{serviceType}") " AND b.service_type_id = #{serviceType}")
Long getTemplateGroupIdByProject(@Param("projectId") String projectId, @Param("serviceType") Integer serviceType); Long getTemplateGroupIdByProject(@Param("projectId") String projectId, @Param("serviceType") Integer serviceType);
List<ProjectAnaylsisDto> getTemlateWithServiceType(@Param("orgIds") List<String> orgIds, @Param("year") Integer year, @Param("month") Integer month,@Param("reportName")String reportName); List<ProjectAnaylsisDto> getTemlateWithServiceType(@Param("list") List<String> orgIds, @Param("year") Integer year, @Param("month") Integer month,@Param("reportName")String reportName);
List<ProjectAnaylsisDto> getTemlateWithServiceType2(@Param("orgId")String orgId, @Param("year") Integer year, @Param("month") Integer month,@Param("code")String code); List<ProjectAnaylsisDto> getTemlateWithServiceType2(@Param("orgId")String orgId, @Param("year") Integer year, @Param("month") Integer month,@Param("code")String code);
} }
\ No newline at end of file
...@@ -248,11 +248,4 @@ public class UserRoleInfo { ...@@ -248,11 +248,4 @@ public class UserRoleInfo {
public void setStatusStr(String statusStr) { public void setStatusStr(String statusStr) {
this.statusStr = statusStr; this.statusStr = statusStr;
} }
public void setStatusStr(Integer status) {
if(status == 0){
this.statusStr = "禁用";
}
this.statusStr = "启用";
}
} }
...@@ -46,6 +46,17 @@ public class RedLetterInfoTable extends BaseEntity implements Serializable { ...@@ -46,6 +46,17 @@ public class RedLetterInfoTable extends BaseEntity implements Serializable {
*/ */
private String projectId; private String projectId;
/**
* Database Column Remarks:
* 期间
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column red_letter_info_table.period
*
* @mbg.generated
*/
private Integer period;
/** /**
* Database Column Remarks: * Database Column Remarks:
* 税务系统期间 * 税务系统期间
...@@ -66,7 +77,7 @@ public class RedLetterInfoTable extends BaseEntity implements Serializable { ...@@ -66,7 +77,7 @@ public class RedLetterInfoTable extends BaseEntity implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
private Integer fillInDate; private Date fillInDate;
/** /**
* Database Column Remarks: * Database Column Remarks:
...@@ -291,6 +302,30 @@ public class RedLetterInfoTable extends BaseEntity implements Serializable { ...@@ -291,6 +302,30 @@ public class RedLetterInfoTable extends BaseEntity implements Serializable {
this.projectId = projectId == null ? null : projectId.trim(); this.projectId = projectId == null ? null : projectId.trim();
} }
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column red_letter_info_table.period
*
* @return the value of red_letter_info_table.period
*
* @mbg.generated
*/
public Integer getPeriod() {
return period;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column red_letter_info_table.period
*
* @param period the value for red_letter_info_table.period
*
* @mbg.generated
*/
public void setPeriod(Integer period) {
this.period = period;
}
/** /**
* This method was generated by MyBatis Generator. * This method was generated by MyBatis Generator.
* This method returns the value of the database column red_letter_info_table.tms_period * This method returns the value of the database column red_letter_info_table.tms_period
...@@ -323,7 +358,7 @@ public class RedLetterInfoTable extends BaseEntity implements Serializable { ...@@ -323,7 +358,7 @@ public class RedLetterInfoTable extends BaseEntity implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
public Integer getFillInDate() { public Date getFillInDate() {
return fillInDate; return fillInDate;
} }
...@@ -335,7 +370,7 @@ public class RedLetterInfoTable extends BaseEntity implements Serializable { ...@@ -335,7 +370,7 @@ public class RedLetterInfoTable extends BaseEntity implements Serializable {
* *
* @mbg.generated * @mbg.generated
*/ */
public void setFillInDate(Integer fillInDate) { public void setFillInDate(Date fillInDate) {
this.fillInDate = fillInDate; this.fillInDate = fillInDate;
} }
...@@ -666,6 +701,7 @@ public class RedLetterInfoTable extends BaseEntity implements Serializable { ...@@ -666,6 +701,7 @@ public class RedLetterInfoTable extends BaseEntity implements Serializable {
sb.append(", id=").append(id); sb.append(", id=").append(id);
sb.append(", organizationId=").append(organizationId); sb.append(", organizationId=").append(organizationId);
sb.append(", projectId=").append(projectId); sb.append(", projectId=").append(projectId);
sb.append(", period=").append(period);
sb.append(", tmsPeriod=").append(tmsPeriod); sb.append(", tmsPeriod=").append(tmsPeriod);
sb.append(", fillInDate=").append(fillInDate); sb.append(", fillInDate=").append(fillInDate);
sb.append(", subjectNum=").append(subjectNum); sb.append(", subjectNum=").append(subjectNum);
......
...@@ -396,6 +396,66 @@ public class RedLetterInfoTableExample { ...@@ -396,6 +396,66 @@ public class RedLetterInfoTableExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andPeriodIsNull() {
addCriterion("period is null");
return (Criteria) this;
}
public Criteria andPeriodIsNotNull() {
addCriterion("period is not null");
return (Criteria) this;
}
public Criteria andPeriodEqualTo(Integer value) {
addCriterion("period =", value, "period");
return (Criteria) this;
}
public Criteria andPeriodNotEqualTo(Integer value) {
addCriterion("period <>", value, "period");
return (Criteria) this;
}
public Criteria andPeriodGreaterThan(Integer value) {
addCriterion("period >", value, "period");
return (Criteria) this;
}
public Criteria andPeriodGreaterThanOrEqualTo(Integer value) {
addCriterion("period >=", value, "period");
return (Criteria) this;
}
public Criteria andPeriodLessThan(Integer value) {
addCriterion("period <", value, "period");
return (Criteria) this;
}
public Criteria andPeriodLessThanOrEqualTo(Integer value) {
addCriterion("period <=", value, "period");
return (Criteria) this;
}
public Criteria andPeriodIn(List<Integer> values) {
addCriterion("period in", values, "period");
return (Criteria) this;
}
public Criteria andPeriodNotIn(List<Integer> values) {
addCriterion("period not in", values, "period");
return (Criteria) this;
}
public Criteria andPeriodBetween(Integer value1, Integer value2) {
addCriterion("period between", value1, value2, "period");
return (Criteria) this;
}
public Criteria andPeriodNotBetween(Integer value1, Integer value2) {
addCriterion("period not between", value1, value2, "period");
return (Criteria) this;
}
public Criteria andTmsPeriodIsNull() { public Criteria andTmsPeriodIsNull() {
addCriterion("tms_period is null"); addCriterion("tms_period is null");
return (Criteria) this; return (Criteria) this;
...@@ -466,52 +526,52 @@ public class RedLetterInfoTableExample { ...@@ -466,52 +526,52 @@ public class RedLetterInfoTableExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andFillInDateEqualTo(Integer value) { public Criteria andFillInDateEqualTo(Date value) {
addCriterion("fill_in_date =", value, "fillInDate"); addCriterion("fill_in_date =", value, "fillInDate");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andFillInDateNotEqualTo(Integer value) { public Criteria andFillInDateNotEqualTo(Date value) {
addCriterion("fill_in_date <>", value, "fillInDate"); addCriterion("fill_in_date <>", value, "fillInDate");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andFillInDateGreaterThan(Integer value) { public Criteria andFillInDateGreaterThan(Date value) {
addCriterion("fill_in_date >", value, "fillInDate"); addCriterion("fill_in_date >", value, "fillInDate");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andFillInDateGreaterThanOrEqualTo(Integer value) { public Criteria andFillInDateGreaterThanOrEqualTo(Date value) {
addCriterion("fill_in_date >=", value, "fillInDate"); addCriterion("fill_in_date >=", value, "fillInDate");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andFillInDateLessThan(Integer value) { public Criteria andFillInDateLessThan(Date value) {
addCriterion("fill_in_date <", value, "fillInDate"); addCriterion("fill_in_date <", value, "fillInDate");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andFillInDateLessThanOrEqualTo(Integer value) { public Criteria andFillInDateLessThanOrEqualTo(Date value) {
addCriterion("fill_in_date <=", value, "fillInDate"); addCriterion("fill_in_date <=", value, "fillInDate");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andFillInDateIn(List<Integer> values) { public Criteria andFillInDateIn(List<Date> values) {
addCriterion("fill_in_date in", values, "fillInDate"); addCriterion("fill_in_date in", values, "fillInDate");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andFillInDateNotIn(List<Integer> values) { public Criteria andFillInDateNotIn(List<Date> values) {
addCriterion("fill_in_date not in", values, "fillInDate"); addCriterion("fill_in_date not in", values, "fillInDate");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andFillInDateBetween(Integer value1, Integer value2) { public Criteria andFillInDateBetween(Date value1, Date value2) {
addCriterion("fill_in_date between", value1, value2, "fillInDate"); addCriterion("fill_in_date between", value1, value2, "fillInDate");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andFillInDateNotBetween(Integer value1, Integer value2) { public Criteria andFillInDateNotBetween(Date value1, Date value2) {
addCriterion("fill_in_date not between", value1, value2, "fillInDate"); addCriterion("fill_in_date not between", value1, value2, "fillInDate");
return (Criteria) this; return (Criteria) this;
} }
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#{item} #{item}
</foreach> </foreach>
and p.year = #{year} and p.year = #{year}
and p.stat_period &lt; #{month} and p.start_period &lt; #{month}
and p.end_period &gt; #{month} and p.end_period &gt; #{month}
and t.name = #{reportName} and t.name = #{reportName}
</select> </select>
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
on pp.template_id = t.id on pp.template_id = t.id
where p.organization_id = #{orgId} where p.organization_id = #{orgId}
and p.year = #{year} and p.year = #{year}
and p.stat_period &lt; #{month} and p.start_period &lt; #{month}
and p.end_period &gt; #{month} and p.end_period &gt; #{month}
and t.code = #{code} and t.code = #{code}
</select> </select>
......
...@@ -9,8 +9,9 @@ ...@@ -9,8 +9,9 @@
<id column="id" jdbcType="BIGINT" property="id" /> <id column="id" jdbcType="BIGINT" property="id" />
<result column="organization_id" jdbcType="VARCHAR" property="organizationId" /> <result column="organization_id" jdbcType="VARCHAR" property="organizationId" />
<result column="project_id" jdbcType="VARCHAR" property="projectId" /> <result column="project_id" jdbcType="VARCHAR" property="projectId" />
<result column="period" jdbcType="INTEGER" property="period" />
<result column="tms_period" jdbcType="INTEGER" property="tmsPeriod" /> <result column="tms_period" jdbcType="INTEGER" property="tmsPeriod" />
<result column="fill_in_date" jdbcType="INTEGER" property="fillInDate" /> <result column="fill_in_date" jdbcType="TIMESTAMP" property="fillInDate" />
<result column="subject_num" jdbcType="VARCHAR" property="subjectNum" /> <result column="subject_num" jdbcType="VARCHAR" property="subjectNum" />
<result column="subject_name" jdbcType="VARCHAR" property="subjectName" /> <result column="subject_name" jdbcType="VARCHAR" property="subjectName" />
<result column="red_letter_invoice_info_table_num" jdbcType="VARCHAR" property="redLetterInvoiceInfoTableNum" /> <result column="red_letter_invoice_info_table_num" jdbcType="VARCHAR" property="redLetterInvoiceInfoTableNum" />
...@@ -96,7 +97,7 @@ ...@@ -96,7 +97,7 @@
WARNING - @mbg.generated WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
id, organization_id, project_id, tms_period, fill_in_date, subject_num, subject_name, id, organization_id, project_id, period, tms_period, fill_in_date, subject_num, subject_name,
red_letter_invoice_info_table_num, sales_tax_number, salesperson_name, total_amount, red_letter_invoice_info_table_num, sales_tax_number, salesperson_name, total_amount,
total_tax_amount, application_description, applicant_manager, invoice_code, invoice_number, total_tax_amount, application_description, applicant_manager, invoice_code, invoice_number,
create_time, update_time create_time, update_time
...@@ -153,15 +154,15 @@ ...@@ -153,15 +154,15 @@
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
insert into red_letter_info_table (id, organization_id, project_id, insert into red_letter_info_table (id, organization_id, project_id,
tms_period, fill_in_date, subject_num, period, tms_period, fill_in_date,
subject_name, red_letter_invoice_info_table_num, subject_num, subject_name, red_letter_invoice_info_table_num,
sales_tax_number, salesperson_name, total_amount, sales_tax_number, salesperson_name, total_amount,
total_tax_amount, application_description, total_tax_amount, application_description,
applicant_manager, invoice_code, invoice_number, applicant_manager, invoice_code, invoice_number,
create_time, update_time) create_time, update_time)
values (#{id,jdbcType=BIGINT}, #{organizationId,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, values (#{id,jdbcType=BIGINT}, #{organizationId,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR},
#{tmsPeriod,jdbcType=INTEGER}, #{fillInDate,jdbcType=INTEGER}, #{subjectNum,jdbcType=VARCHAR}, #{period,jdbcType=INTEGER}, #{tmsPeriod,jdbcType=INTEGER}, #{fillInDate,jdbcType=TIMESTAMP},
#{subjectName,jdbcType=VARCHAR}, #{redLetterInvoiceInfoTableNum,jdbcType=VARCHAR}, #{subjectNum,jdbcType=VARCHAR}, #{subjectName,jdbcType=VARCHAR}, #{redLetterInvoiceInfoTableNum,jdbcType=VARCHAR},
#{salesTaxNumber,jdbcType=VARCHAR}, #{salespersonName,jdbcType=VARCHAR}, #{totalAmount,jdbcType=DECIMAL}, #{salesTaxNumber,jdbcType=VARCHAR}, #{salespersonName,jdbcType=VARCHAR}, #{totalAmount,jdbcType=DECIMAL},
#{totalTaxAmount,jdbcType=DECIMAL}, #{applicationDescription,jdbcType=VARCHAR}, #{totalTaxAmount,jdbcType=DECIMAL}, #{applicationDescription,jdbcType=VARCHAR},
#{applicantManager,jdbcType=VARCHAR}, #{invoiceCode,jdbcType=VARCHAR}, #{invoiceNumber,jdbcType=VARCHAR}, #{applicantManager,jdbcType=VARCHAR}, #{invoiceCode,jdbcType=VARCHAR}, #{invoiceNumber,jdbcType=VARCHAR},
...@@ -183,6 +184,9 @@ ...@@ -183,6 +184,9 @@
<if test="projectId != null"> <if test="projectId != null">
project_id, project_id,
</if> </if>
<if test="period != null">
period,
</if>
<if test="tmsPeriod != null"> <if test="tmsPeriod != null">
tms_period, tms_period,
</if> </if>
...@@ -239,11 +243,14 @@ ...@@ -239,11 +243,14 @@
<if test="projectId != null"> <if test="projectId != null">
#{projectId,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR},
</if> </if>
<if test="period != null">
#{period,jdbcType=INTEGER},
</if>
<if test="tmsPeriod != null"> <if test="tmsPeriod != null">
#{tmsPeriod,jdbcType=INTEGER}, #{tmsPeriod,jdbcType=INTEGER},
</if> </if>
<if test="fillInDate != null"> <if test="fillInDate != null">
#{fillInDate,jdbcType=INTEGER}, #{fillInDate,jdbcType=TIMESTAMP},
</if> </if>
<if test="subjectNum != null"> <if test="subjectNum != null">
#{subjectNum,jdbcType=VARCHAR}, #{subjectNum,jdbcType=VARCHAR},
...@@ -312,11 +319,14 @@ ...@@ -312,11 +319,14 @@
<if test="record.projectId != null"> <if test="record.projectId != null">
project_id = #{record.projectId,jdbcType=VARCHAR}, project_id = #{record.projectId,jdbcType=VARCHAR},
</if> </if>
<if test="record.period != null">
period = #{record.period,jdbcType=INTEGER},
</if>
<if test="record.tmsPeriod != null"> <if test="record.tmsPeriod != null">
tms_period = #{record.tmsPeriod,jdbcType=INTEGER}, tms_period = #{record.tmsPeriod,jdbcType=INTEGER},
</if> </if>
<if test="record.fillInDate != null"> <if test="record.fillInDate != null">
fill_in_date = #{record.fillInDate,jdbcType=INTEGER}, fill_in_date = #{record.fillInDate,jdbcType=TIMESTAMP},
</if> </if>
<if test="record.subjectNum != null"> <if test="record.subjectNum != null">
subject_num = #{record.subjectNum,jdbcType=VARCHAR}, subject_num = #{record.subjectNum,jdbcType=VARCHAR},
...@@ -371,8 +381,9 @@ ...@@ -371,8 +381,9 @@
set id = #{record.id,jdbcType=BIGINT}, set id = #{record.id,jdbcType=BIGINT},
organization_id = #{record.organizationId,jdbcType=VARCHAR}, organization_id = #{record.organizationId,jdbcType=VARCHAR},
project_id = #{record.projectId,jdbcType=VARCHAR}, project_id = #{record.projectId,jdbcType=VARCHAR},
period = #{record.period,jdbcType=INTEGER},
tms_period = #{record.tmsPeriod,jdbcType=INTEGER}, tms_period = #{record.tmsPeriod,jdbcType=INTEGER},
fill_in_date = #{record.fillInDate,jdbcType=INTEGER}, fill_in_date = #{record.fillInDate,jdbcType=TIMESTAMP},
subject_num = #{record.subjectNum,jdbcType=VARCHAR}, subject_num = #{record.subjectNum,jdbcType=VARCHAR},
subject_name = #{record.subjectName,jdbcType=VARCHAR}, subject_name = #{record.subjectName,jdbcType=VARCHAR},
red_letter_invoice_info_table_num = #{record.redLetterInvoiceInfoTableNum,jdbcType=VARCHAR}, red_letter_invoice_info_table_num = #{record.redLetterInvoiceInfoTableNum,jdbcType=VARCHAR},
...@@ -403,11 +414,14 @@ ...@@ -403,11 +414,14 @@
<if test="projectId != null"> <if test="projectId != null">
project_id = #{projectId,jdbcType=VARCHAR}, project_id = #{projectId,jdbcType=VARCHAR},
</if> </if>
<if test="period != null">
period = #{period,jdbcType=INTEGER},
</if>
<if test="tmsPeriod != null"> <if test="tmsPeriod != null">
tms_period = #{tmsPeriod,jdbcType=INTEGER}, tms_period = #{tmsPeriod,jdbcType=INTEGER},
</if> </if>
<if test="fillInDate != null"> <if test="fillInDate != null">
fill_in_date = #{fillInDate,jdbcType=INTEGER}, fill_in_date = #{fillInDate,jdbcType=TIMESTAMP},
</if> </if>
<if test="subjectNum != null"> <if test="subjectNum != null">
subject_num = #{subjectNum,jdbcType=VARCHAR}, subject_num = #{subjectNum,jdbcType=VARCHAR},
...@@ -459,8 +473,9 @@ ...@@ -459,8 +473,9 @@
update red_letter_info_table update red_letter_info_table
set organization_id = #{organizationId,jdbcType=VARCHAR}, set organization_id = #{organizationId,jdbcType=VARCHAR},
project_id = #{projectId,jdbcType=VARCHAR}, project_id = #{projectId,jdbcType=VARCHAR},
period = #{period,jdbcType=INTEGER},
tms_period = #{tmsPeriod,jdbcType=INTEGER}, tms_period = #{tmsPeriod,jdbcType=INTEGER},
fill_in_date = #{fillInDate,jdbcType=INTEGER}, fill_in_date = #{fillInDate,jdbcType=TIMESTAMP},
subject_num = #{subjectNum,jdbcType=VARCHAR}, subject_num = #{subjectNum,jdbcType=VARCHAR},
subject_name = #{subjectName,jdbcType=VARCHAR}, subject_name = #{subjectName,jdbcType=VARCHAR},
red_letter_invoice_info_table_num = #{redLetterInvoiceInfoTableNum,jdbcType=VARCHAR}, red_letter_invoice_info_table_num = #{redLetterInvoiceInfoTableNum,jdbcType=VARCHAR},
......
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
</select> </select>
<select id = "selectAnalysisSalesValueDto" resultType="pwc.taxtech.atms.dpo.AnalysisSalesValueDto"> <select id = "selectAnalysisSalesValueDto" resultType="pwc.taxtech.atms.dpo.AnalysisSalesValueDto">
select pcd.data as data,pct.column_index as columnIndex,pct.row_index as rowIndex, select pcd.data as data,pct.column_index as columnIndex,pct.row_index as rowIndex
from from
period_cell_data pcd period_cell_data pcd
left join period_cell_template pct left join period_cell_template pct
......
...@@ -1157,6 +1157,8 @@ ...@@ -1157,6 +1157,8 @@
"StartRowNumberCheckMsg": "Starting Rows Should Not be Greater Than the Total Number of Currently Imported Data!", "StartRowNumberCheckMsg": "Starting Rows Should Not be Greater Than the Total Number of Currently Imported Data!",
"StartingDate": "Start Date", "StartingDate": "Start Date",
"EndDate": "End Date", "EndDate": "End Date",
"StartingPeriod": "Start Period",
"EndPeriod": "End Period",
"StatesColon": "States:", "StatesColon": "States:",
"Status": "Status", "Status": "Status",
"StdAccountMappingResult": "Standard Account Mapping Result...", "StdAccountMappingResult": "Standard Account Mapping Result...",
......
...@@ -1513,6 +1513,8 @@ ...@@ -1513,6 +1513,8 @@
"StartRowNumberCheckMsg": "起始行不能大于当前导入数据总数!", "StartRowNumberCheckMsg": "起始行不能大于当前导入数据总数!",
"StartingDate": "开始日期", "StartingDate": "开始日期",
"EndDate": "结束日期", "EndDate": "结束日期",
"StartingPeriod": "期间从",
"EndPeriod": "期间至",
"StatusColon": "状态:", "StatusColon": "状态:",
"StdAccountMappingResult": "标准科目对应结果", "StdAccountMappingResult": "标准科目对应结果",
"StdAccountNotLeaf": "请选择叶子节点", "StdAccountNotLeaf": "请选择叶子节点",
......
...@@ -1190,13 +1190,13 @@ ...@@ -1190,13 +1190,13 @@
allowHeaderFiltering: false, allowHeaderFiltering: false,
width: '20%', width: '20%',
dataType: "date", dataType: "date",
caption: $translate.instant('StartingDate') caption: $translate.instant('StartingPeriod')
}, { }, {
dataField: "endDate", dataField: "endDate",
allowHeaderFiltering: false, allowHeaderFiltering: false,
width: '20%', width: '20%',
dataType: "date", dataType: "date",
caption: $translate.instant('EndDate') caption: $translate.instant('EndPeriod')
}, { }, {
dataField: "rate", dataField: "rate",
allowHeaderFiltering: false, allowHeaderFiltering: false,
...@@ -1344,6 +1344,11 @@ ...@@ -1344,6 +1344,11 @@
dataField: "approvedLevyProject", dataField: "approvedLevyProject",
allowHeaderFiltering: false, allowHeaderFiltering: false,
caption: $translate.instant('ApprovedLevyProject'), caption: $translate.instant('ApprovedLevyProject'),
lookup: {
dataSource: constant.GroupTypeList,
displayExpr: "type",
valueExpr: "type"
},
width: '15%' width: '15%'
}, { }, {
dataField: "approvedValidityPeriodStartTime", dataField: "approvedValidityPeriodStartTime",
......
...@@ -549,6 +549,7 @@ ...@@ -549,6 +549,7 @@
.leftUp { .leftUp {
width: 50%; width: 50%;
margin-bottom: -40px;
} }
.rightUp { .rightUp {
......
...@@ -969,7 +969,7 @@ ...@@ -969,7 +969,7 @@
var doExport = function () { var doExport = function () {
var localDate=$filter('date')(new Date(), 'yyyyMMddHHmmss'); var localDate=$filter('date')(new Date(), 'yyyyMMddHHmmss');
var fileName = '用户信息列表'+localDate; var fileName = '用户信息列表'+localDate;
userService.downloadFile($scope.originalUserRoleList,fileName).then(function (data) { userService.downloadFile($scope.userRoleList,fileName).then(function (data) {
if (data) { if (data) {
ackMessageBox.success(translate('FileExportSuccess')); ackMessageBox.success(translate('FileExportSuccess'));
} }
......
...@@ -1444,10 +1444,11 @@ constant.TaxDecCycleList = [ ...@@ -1444,10 +1444,11 @@ constant.TaxDecCycleList = [
]; ];
constant.ApprovedLevyTermList = [ constant.ApprovedLevyTermList = [
{code:0,type:"月"}, {code:0,type:"次"},
{code:1,type:"季"}, {code:1,type:"月"},
{code:2,type:"半年"}, {code:2,type:"季"},
{code:3,type:"年"} {code:3,type:"半年"},
{code:4,type:"年"}
]; ];
constant.TaxpayerQualificationTypeList = [ constant.TaxpayerQualificationTypeList = [
......
...@@ -127,6 +127,7 @@ ...@@ -127,6 +127,7 @@
.success(function (res) { .success(function (res) {
if (res && 0 === res.code) { if (res && 0 === res.code) {
$scope.selectOrgList = res.data; $scope.selectOrgList = res.data;
$scope.refreshConfigGrid();
}else { }else {
SweetAlert.error($translate.instant('RevenueGetOrgError')); SweetAlert.error($translate.instant('RevenueGetOrgError'));
} }
...@@ -275,7 +276,7 @@ ...@@ -275,7 +276,7 @@
function init() { function init() {
getMyOrgList(); getMyOrgList();
$scope.refreshConfigGrid();
} }
init() init()
......
...@@ -155,6 +155,7 @@ ...@@ -155,6 +155,7 @@
.success(function (res) { .success(function (res) {
if (res && 0 === res.code) { if (res && 0 === res.code) {
$scope.selectOrgList = res.data; $scope.selectOrgList = res.data;
$scope.refreshConfigGrid();
}else { }else {
SweetAlert.error($translate.instant('RevenueGetOrgError')); SweetAlert.error($translate.instant('RevenueGetOrgError'));
} }
...@@ -344,7 +345,7 @@ ...@@ -344,7 +345,7 @@
function init() { function init() {
getMyOrgList(); getMyOrgList();
$scope.refreshConfigGrid();
} }
init() init()
......
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