Commit 7fc4b237 authored by chase's avatar chase

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

parents 90650fb9 1b5a2580
......@@ -12,6 +12,32 @@ public class SystemConfig {
@Value("${longi_api_gl_balance}")
private String longiApiGlBalance;
//tableau相关配置
@Value("${tableau_get_ticket}")
private String tableauGetTicket;
@Value("${tableau_unreturned_tax}")
private String tableauUnreturnedTax;
@Value("${tableau_tax_comparison}")
private String tableauTaxComparison;
@Value("${tableau_other_countries}")
private String tableauOtherCountries;
@Value("${tableau_cost_analysis}")
private String tableauCostAnalysis;
@Value("${tableau_profit_and_loss}")
private String tableauProfitAndLoss;
@Value("${tableau_other_domestic_data}")
private String tableauOtherDomesticData;
@Value("${tableau_doc_situation}")
private String tableauDocSituation;
@Value("${tableau_global_overview}")
private String tableauGlobalOverview;
@Value("${tableau_mexican_tax}")
private String tableauMexicanTax;
@Value("${tableau_australian_tax}")
private String tableauAustralianTax;
@Value("${tableau_brazilian_tax}")
private String tableauBrazilianTax;
public String getLongiApiBasicUser() {
return this.longiApiBasicUser;
}
......@@ -35,4 +61,100 @@ public class SystemConfig {
public void setLongiApiGlBalance(String longiApiGlBalance) {
this.longiApiGlBalance = longiApiGlBalance;
}
public String getTableauGetTicket() {
return this.tableauGetTicket;
}
public void setTableauGetTicket(String tableauGetTicket) {
this.tableauGetTicket = tableauGetTicket;
}
public String getTableauUnreturnedTax() {
return this.tableauUnreturnedTax;
}
public void setTableauUnreturnedTax(String tableauUnreturnedTax) {
this.tableauUnreturnedTax = tableauUnreturnedTax;
}
public String getTableauTaxComparison() {
return this.tableauTaxComparison;
}
public void setTableauTaxComparison(String tableauTaxComparison) {
this.tableauTaxComparison = tableauTaxComparison;
}
public String getTableauOtherCountries() {
return this.tableauOtherCountries;
}
public void setTableauOtherCountries(String tableauOtherCountries) {
this.tableauOtherCountries = tableauOtherCountries;
}
public String getTableauCostAnalysis() {
return this.tableauCostAnalysis;
}
public void setTableauCostAnalysis(String tableauCostAnalysis) {
this.tableauCostAnalysis = tableauCostAnalysis;
}
public String getTableauProfitAndLoss() {
return this.tableauProfitAndLoss;
}
public void setTableauProfitAndLoss(String tableauProfitAndLoss) {
this.tableauProfitAndLoss = tableauProfitAndLoss;
}
public String getTableauOtherDomesticData() {
return this.tableauOtherDomesticData;
}
public void setTableauOtherDomesticData(String tableauOtherDomesticData) {
this.tableauOtherDomesticData = tableauOtherDomesticData;
}
public String getTableauDocSituation() {
return this.tableauDocSituation;
}
public void setTableauDocSituation(String tableauDocSituation) {
this.tableauDocSituation = tableauDocSituation;
}
public String getTableauGlobalOverview() {
return this.tableauGlobalOverview;
}
public void setTableauGlobalOverview(String tableauGlobalOverview) {
this.tableauGlobalOverview = tableauGlobalOverview;
}
public String getTableauMexicanTax() {
return this.tableauMexicanTax;
}
public void setTableauMexicanTax(String tableauMexicanTax) {
this.tableauMexicanTax = tableauMexicanTax;
}
public String getTableauAustralianTax() {
return this.tableauAustralianTax;
}
public void setTableauAustralianTax(String tableauAustralianTax) {
this.tableauAustralianTax = tableauAustralianTax;
}
public String getTableauBrazilianTax() {
return this.tableauBrazilianTax;
}
public void setTableauBrazilianTax(String tableauBrazilianTax) {
this.tableauBrazilianTax = tableauBrazilianTax;
}
}
package pwc.taxtech.atms.common.schedule;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.quartz.QuartzJobBean;
import pwc.taxtech.atms.common.util.DateUtils;
import pwc.taxtech.atms.constant.enums.EnumTbImportType;
import pwc.taxtech.atms.dao.OrganizationMapper;
import pwc.taxtech.atms.entity.Organization;
import pwc.taxtech.atms.entity.OrganizationExample;
import pwc.taxtech.atms.service.impl.AnalysisJobServiceImpl;
import pwc.taxtech.atms.service.impl.AnalysisServiceImpl;
import javax.annotation.Resource;
import java.util.List;
public class AnylysisJob extends QuartzJobBean {
private static final Logger logger = LoggerFactory.getLogger(AnylysisJob.class);
@Resource
private OrganizationMapper organizationMapper;
@Value("${org_sync_url}")
private String orgSyncUrl;
@Value("${org_sync_token}")
private String token;
@Autowired
private AnalysisJobServiceImpl analysisJobService;
@Override
protected void executeInternal(JobExecutionContext jobExecutionContext) throws JobExecutionException {
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());
logger.info(String.format("开始分析%s预期返还税数据",period));
analysisJobService.analysisFee(orgs,period, EnumTbImportType.CoverImport.getCode());
logger.info(String.format("开始分析%s预期返还税数据",period));
analysisJobService.analysisFileManagement(orgs,period, EnumTbImportType.CoverImport.getCode());
logger.info(String.format("开始分析%s预期返还税数据",period));
analysisJobService.analysisMaster(orgs,period, EnumTbImportType.CoverImport.getCode());
logger.info(String.format("开始分析%s预期返还税数据",period));
analysisJobService.analysisSales(orgs,period, EnumTbImportType.CoverImport.getCode());
logger.info(String.format("开始分析%s预期返还税数据",period));
analysisJobService.analysisTaxReturnEnd(orgs,period, EnumTbImportType.CoverImport.getCode());
}
}
package pwc.taxtech.atms.common.util;
import java.math.BigDecimal;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class CommonUtil {
......@@ -16,4 +18,21 @@ public class CommonUtil {
v2 = null == v2 ? BigDecimal.ZERO : v2;
return v1.add(v2);
}
public static int getNum(String str){
String regEx="[^0-9]";
Pattern p = Pattern.compile(regEx);
Matcher m = p.matcher(str);
return Integer.valueOf(m.replaceAll("").trim());
}
public static boolean hasDigit(String content) {
boolean flag = false;
Pattern p = Pattern.compile(".*\\d+.*");
Matcher m = p.matcher(content);
if (m.matches()) {
flag = true;
}
return flag;
}
}
......@@ -604,6 +604,17 @@ public class DateUtils {
return newday;
}
public static Integer getNowMonth(){
Calendar cale = Calendar.getInstance();
return cale.get(Calendar.MONTH) + 1;
}
public static Integer getNowYear(){
Calendar cale = Calendar.getInstance();
return cale.get(Calendar.YEAR);
}
/**
* 取得数据库主键 生成格式为yyyymmddhhmmss+k位随机数
*
......
......@@ -48,7 +48,7 @@ public class SpringContextUtil implements ApplicationContextAware {
public static InputInvoiceDao inputInvoiceDao;
public static InputInvoiceMapper inputInvoiceMapper;
public static InputVatInvoiceMapper inputVatInvoiceMapper;
public static AssetsListMapper assetsListMapper;
public static CitAssetsListMapper assetsListMapper;
public static ProjectMapper projectMapper;
public static CellDataSourceMapper cellDataSourceMapper;
public static PeriodCellDataSourceMapper periodCellDataSourceMapper;
......@@ -121,7 +121,7 @@ public class SpringContextUtil implements ApplicationContextAware {
inputVatInvoiceMapper = webApplicationContext.getBean(InputVatInvoiceMapper.class);
inputInvoiceDao = webApplicationContext.getBean(InputInvoiceDao.class);
inputInvoiceMapper = webApplicationContext.getBean(InputInvoiceMapper.class);
assetsListMapper = webApplicationContext.getBean(AssetsListMapper.class);
assetsListMapper = webApplicationContext.getBean(CitAssetsListMapper.class);
projectMapper = webApplicationContext.getBean(ProjectMapper.class);
cellDataSourceMapper = webApplicationContext.getBean(CellDataSourceMapper.class);
periodCellDataSourceMapper = webApplicationContext.getBean(PeriodCellDataSourceMapper.class);
......
package pwc.taxtech.atms.constant.enums;
public enum EnumAnalysisImportType {
TaxData(0,"各税种税额 _所属期间_模版"),
ReturnTaxData(1,"实际返还税额 _所属期间_模版"),
GMVSubsidy(2,"業務線_所属期间_模版"),
EmployeeNum(3,"职工人数_所属期间_模版"),
DriverNum(4,"司機人數_所属期间_模版"),
InternationalBuData(100,"国际税业务数据_国家_公司_所属期间_模版"),
InternationalTaxData(101,"国际税税务数据_国家_公司_所属期间_模版");
TaxData(0,"各税种税额"),
ReturnTaxData(1,"实际返还税额"),
GMVSubsidy(2,"业务线"),
EmployeeNum(3,"职工人数"),
DriverNum(4,"司机人数"),
InternationalBuData(100,"国际税业务数据"),
InternationalTaxData(101,"国际税税务数据");
private Integer code;
......
package pwc.taxtech.atms;
package pwc.taxtech.atms.controller;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -31,10 +31,10 @@ public class AnalysisController extends BaseController {
private AnalysisServiceImpl analysisServiceImpl;
@ResponseBody
@RequestMapping(value = "displayAnalysisImportData", method = RequestMethod.GET)
public ApiResultDto displayAnalysisImportData(@RequestParam Integer type, @RequestParam String period) {
@RequestMapping(value = "displayAnalysisImportData", method = RequestMethod.POST)
public ApiResultDto displayAnalysisImportData(@RequestBody AnalysisDomesticlParam param) {
try{
return ApiResultDto.success(analysisServiceImpl.displayAnalysisImportData(type,period));
return ApiResultDto.success(analysisServiceImpl.displayAnalysisImportData(param));
}catch (Exception e){
return ApiResultDto.fail();
}
......@@ -79,13 +79,13 @@ public class AnalysisController extends BaseController {
@ResponseBody
@RequestMapping(value = "DomesitcExcelFile", method = RequestMethod.POST)
public OperationResultDto importDomesitcExcelFile(@RequestParam MultipartFile file, @RequestParam String period, @RequestParam Integer type) {
public OperationResultDto importDomesitcExcelFile(@RequestParam MultipartFile file, @RequestParam String period, @RequestParam Integer type,@RequestParam String companyName) {
try {
String valMsg = valParameter(file,period,type);
if(StringUtils.isNotEmpty(valMsg)){
return OperationResultDto.error(valMsg);
}
return analysisServiceImpl.importDomesitcExcelFile(file,period, type);
return analysisServiceImpl.importDomesitcExcelFile(file,period, type,companyName);
} catch (ServiceException e) {
return OperationResultDto.error(e.getMessage());
} catch (Exception e) {
......
package pwc.taxtech.atms.controller;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.jdbc.core.JdbcTemplate;
......@@ -8,22 +9,20 @@ import org.springframework.web.bind.annotation.*;
import pwc.taxtech.atms.dao.CitJournalEntryAdjustMapper;
import pwc.taxtech.atms.dao.CitTbamMapper;
import pwc.taxtech.atms.dao.OperationLogEntryLogMapper;
import pwc.taxtech.atms.dpo.CitTbamDto;
import pwc.taxtech.atms.dto.CitTbamDto;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.entity.CitJournalEntryAdjust;
import pwc.taxtech.atms.entity.CitTbam;
import pwc.taxtech.atms.entity.OperationLogEntryLog;
import pwc.taxtech.atms.entity.OperationLogEntryLogExample;
import pwc.taxtech.atms.service.impl.DistributedIdService;
import pwc.taxtech.atms.vat.dao.JournalEntryMapper;
import pwc.taxtech.atms.vat.dao.PeriodFormulaBlockMapper;
import pwc.taxtech.atms.vat.entity.CellComment;
import pwc.taxtech.atms.vat.entity.PeriodCellComment;
import pwc.taxtech.atms.vat.entity.PeriodFormulaBlock;
import pwc.taxtech.atms.vat.service.impl.CellCommentServiceImpl;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Optional;
@RestController
......@@ -40,6 +39,7 @@ public class CellCommentController {
}
return cellCommentService.getCellComments(cellDataId, projectId);
}
@Autowired
private CitTbamMapper citTbamMapper;
@Autowired
......@@ -49,26 +49,34 @@ public class CellCommentController {
private JdbcTemplate jdbcTemplate;
//通过sql获取展示表格展示数据
@RequestMapping(value = "getCellInformation")
public OperationResultDto getCellInformation(String sql){
@RequestMapping(value = "getCellInformation")
public OperationResultDto getCellInformation(String sql) {
OperationResultDto operationResultDto = new OperationResultDto();
int from = sql.indexOf("from");
sql = sql.substring(from);
operationResultDto.setData(citTbamMapper.selectBySql(sql));
List<CitTbam> citTbams = citTbamMapper.selectBySql(sql);
List<CitTbamDto> citTbamDtos = new ArrayList<>();
for (CitTbam citTbam : citTbams) {
CitTbamDto citTbamDto = new CitTbamDto();
BeanUtils.copyProperties(citTbam, citTbamDto);
citTbamDtos.add(citTbamDto);
}
operationResultDto.setData(citTbamDtos);
operationResultDto.setResultMsg("success");
return operationResultDto;
return operationResultDto;
}
//加载分录表格数据
@RequestMapping("loadEntryListDataList")
public OperationResultDto loadEntryListDataList(String code){
public OperationResultDto loadEntryListDataList(String code) {
OperationResultDto operationResultDto = new OperationResultDto();
CitJournalEntryAdjust citJournalEntryAdjust = new CitJournalEntryAdjust();
citJournalEntryAdjust.setSubjectCode(code);
List<CitJournalEntryAdjust> journalMerge = citJournalEntryAdjustMapper.getJournalMerge(citJournalEntryAdjust);
operationResultDto.setData(journalMerge);
operationResultDto.setResultMsg("success");
return operationResultDto;
return operationResultDto;
}
@Autowired
......@@ -78,21 +86,25 @@ public class CellCommentController {
private OperationLogEntryLogMapper operationLogEntryLogMapper;
@Autowired
private DistributedIdService distributedIdService;
//更新调整后金额
@RequestMapping("updateAdjust")
public OperationResultDto updateAdjust(@RequestBody CitTbam[] citTbams){
@RequestMapping(value = "updateAdjust", method = RequestMethod.POST,
produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public OperationResultDto updateAdjust(@RequestBody List<CitTbamDto> citTbams) {
OperationResultDto operationResultDto = new OperationResultDto();
CitTbam citTbam = new CitTbam();
for(CitTbam citTbam1 : citTbams){
citTbam.setId(citTbam1.getId());
citTbamMapper.updateByPrimaryKey(citTbam);
for (CitTbamDto citTbamDto : citTbams) {
BeanUtils.copyProperties(citTbamDto, citTbam);
citTbam.setId(citTbam.getId());
citTbam.setAdjustAccount(citTbam.getAdjustAccount());
citTbamMapper.updateByPrimaryKeySelective(citTbam);
}
operationResultDto.setResultMsg("success");
return operationResultDto;
}
@RequestMapping("selectEntryLog")
public OperationResultDto selectEntryLog(String code){
public OperationResultDto selectEntryLog(String code) {
OperationResultDto operationResultDto = new OperationResultDto();
OperationLogEntryLogExample operationLogEntryLogExample = new OperationLogEntryLogExample();
OperationLogEntryLogExample.Criteria criteria = operationLogEntryLogExample.createCriteria();
......@@ -105,8 +117,9 @@ public class CellCommentController {
* 添加日志
*/
@RequestMapping("addLog")
public OperationResultDto addLog(@RequestBody OperationLogEntryLog[] operationLogEntryLogs ){
for(OperationLogEntryLog operationLogEntryLog : operationLogEntryLogs){
public OperationResultDto addLog(@RequestBody List<OperationLogEntryLog> operationLogEntryLogs) {
for (OperationLogEntryLog operationLogEntryLog : operationLogEntryLogs) {
operationLogEntryLog.setMyId(distributedIdService.nextId());
operationLogEntryLogMapper.insert(operationLogEntryLog);
}
OperationResultDto<Object> objectOperationResultDto = new OperationResultDto<>();
......
......@@ -6,6 +6,7 @@ import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.*;
import pwc.taxtech.atms.constant.enums.EnumApiCodeMsg;
import pwc.taxtech.atms.dto.ApiResultDto;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.ebsdto.*;
import pwc.taxtech.atms.service.EbsApiService;
......@@ -236,6 +237,12 @@ public class EbsApiController {
}
}
@RequestMapping(value = "syncOrg", method = RequestMethod.GET)
public @ResponseBody
OperationResultDto syncOrg() {
return ebsApiService.syncOrg();
}
private void setApiResult(ApiResultDto apiResultDto, EnumApiCodeMsg error) {
apiResultDto.setCode(error.getCode());
apiResultDto.setMessage(error.getMsg());
......
package pwc.taxtech.atms.controller;
import org.apache.commons.lang3.StringUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import pwc.taxtech.atms.dto.ApiResultDto;
import pwc.taxtech.atms.service.impl.TableauService;
import javax.annotation.Resource;
@RestController
@RequestMapping("/api/v1/tableau")
public class TableauController extends BaseController {
@Resource
private TableauService tableauService;
@ResponseBody
@GetMapping("unreturnedTax")
public ApiResultDto getUnreturnedTax() {
return ApiResultDto.success(tableauService.getUnreturnedTax().orElse(StringUtils.EMPTY));
}
@ResponseBody
@GetMapping("taxComparison")
public ApiResultDto getTaxComparison() {
return ApiResultDto.success(tableauService.getTaxComparison().orElse(StringUtils.EMPTY));
}
@ResponseBody
@GetMapping("otherCountries")
public ApiResultDto getOtherCountries() {
return ApiResultDto.success(tableauService.getOtherCountries().orElse(StringUtils.EMPTY));
}
@ResponseBody
@GetMapping("costAnalysis")
public ApiResultDto getCostAnalysis() {
return ApiResultDto.success(tableauService.getCostAnalysis().orElse(StringUtils.EMPTY));
}
@ResponseBody
@GetMapping("profitAndLoss")
public ApiResultDto getProfitAndLoss() {
return ApiResultDto.success(tableauService.getProfitAndLoss().orElse(StringUtils.EMPTY));
}
@ResponseBody
@GetMapping("otherDomesticData")
public ApiResultDto getOtherDomesticData() {
return ApiResultDto.success(tableauService.getOtherDomesticData().orElse(StringUtils.EMPTY));
}
@ResponseBody
@GetMapping("docSituation")
public ApiResultDto getDocSituation() {
return ApiResultDto.success(tableauService.getDocSituation().orElse(StringUtils.EMPTY));
}
@ResponseBody
@GetMapping("globalOverview")
public ApiResultDto getGlobalOverview() {
return ApiResultDto.success(tableauService.getGlobalOverview().orElse(StringUtils.EMPTY));
}
@ResponseBody
@GetMapping("mexicanTax")
public ApiResultDto getMexicanTax() {
return ApiResultDto.success(tableauService.getMexicanTax().orElse(StringUtils.EMPTY));
}
@ResponseBody
@GetMapping("australianTax")
public ApiResultDto getAustralianTax() {
return ApiResultDto.success(tableauService.getAustralianTax().orElse(StringUtils.EMPTY));
}
@ResponseBody
@GetMapping("brazilianTax")
public ApiResultDto getBrazilianTax() {
return ApiResultDto.success(tableauService.getBrazilianTax().orElse(StringUtils.EMPTY));
}
}
This diff is collapsed.
......@@ -620,6 +620,8 @@ public class OrganizationExtraDto implements Serializable {
*/
private String auditRequirements;
private String architectureType;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table organization_extra
......@@ -1948,6 +1950,14 @@ public class OrganizationExtraDto implements Serializable {
this.auditRequirements = auditRequirements == null ? null : auditRequirements.trim();
}
public String getArchitectureType() {
return architectureType;
}
public void setArchitectureType(String architectureType) {
this.architectureType = architectureType;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table organization_extra
......
package pwc.taxtech.atms.security.dd;
import org.apache.commons.codec.binary.Base64;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import pwc.taxtech.atms.exception.ServiceException;
import pwc.taxtech.atms.service.impl.ProjectServiceImpl;
import sun.misc.BASE64Decoder;
import sun.misc.BASE64Encoder;
//import org.apache.tomcat.util.codec.binary.Base64;
import javax.crypto.Cipher;
import java.security.KeyFactory;
import java.security.PublicKey;
import java.security.spec.X509EncodedKeySpec;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.TimeZone;
/**
* @Auther: Gary J Li
* @Date: 20/03/2019 20:41
* @Description:
*/
public class DtsTokenService {
private static final Logger logger = LoggerFactory.getLogger(ProjectServiceImpl.class);
private static String PUBKEY;
@Value("${dd_pubkey}")
public void setDriver(String pubkey) {
PUBKEY= pubkey;
}
public static final String KEY_ALGORITHM = "RSA";
private static final String PUBLIC_KEY = "RSAPublicKey";
private static final String PRIVATE_KEY = "RSAPrivateKey";
private static final int KEY_SIZE = 512;
/**
* 生成加密token
* @return
* @throws
*/
public String encryptInput(){
String pubKey = PUBKEY;
BASE64Encoder base64 = new BASE64Encoder();
BASE64Decoder base64Decoder = new BASE64Decoder();
byte[] encodeData;
try {
byte[] publicKey = base64Decoder.decodeBuffer(pubKey);
String nonce = generateNonce();
String sDate = generateDate();
long rNum = generateRandomNumber();
String inputStr1 = sDate + "@@" + "DTS" + "@@" + nonce+rNum;
byte[] data1 = inputStr1.getBytes();
logger.info("原文:" + inputStr1);
encodeData = encryptByPublicKey(data1, publicKey);
logger.info("公钥加密后:" + base64.encode(encodeData));
} catch (Exception ex) {
throw new ServiceException("cus" + ex);
}
return base64.encode(encodeData);
}
private String generateNonce() throws Exception {
String dateTimeString = Long.toString(System.currentTimeMillis());
byte[] nonceByte = dateTimeString.getBytes();
return Base64.encodeBase64String(nonceByte);
}
private String generateDate() throws Exception {
DateFormat dateFormatter = new SimpleDateFormat("yyyy-MM-dd");
dateFormatter.setTimeZone(TimeZone.getTimeZone("UTC"));
Date today = Calendar.getInstance().getTime();
String created = dateFormatter.format(today);
return created;
}
private long generateRandomNumber() throws Exception {
final double d = Math.random();
final long num = (int)(d*100000000000000L);
return num;
}
private byte[] encryptByPublicKey(byte[] data, byte[] key) throws Exception {
X509EncodedKeySpec x509KeySpec = new X509EncodedKeySpec(key);
KeyFactory keyFactory = KeyFactory.getInstance(KEY_ALGORITHM);
PublicKey publicKey = keyFactory.generatePublic(x509KeySpec);
Cipher cipher = Cipher.getInstance(keyFactory.getAlgorithm());
cipher.init(Cipher.ENCRYPT_MODE, publicKey);
return cipher.doFinal(data);
}
}
package pwc.taxtech.atms.service;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.ebsdto.*;
import java.util.List;
......@@ -74,4 +75,10 @@ public interface EbsApiService {
* @param ebsCallBackDto
*/
void changeCallBackStatus(EbsCallBackDto ebsCallBackDto);
/**
* ebs 触发同步机构信息
* @param
*/
OperationResultDto syncOrg();
}
......@@ -225,7 +225,7 @@ public class AssetListServiceImpl extends BaseService {
importResult.setResultMsg("行数据为空或格式错误!");
}
//目前没有进行税法分类,标注状态
citAsset.setStatus(0);
// citAsset.setStatus(0);
citAssetsLists.add(citAsset);
}
......@@ -332,11 +332,15 @@ public class AssetListServiceImpl extends BaseService {
.filter(groupResult -> groupResult.getAssetName().equals(citAsset.getAssetGroupName())).collect(Collectors.toList());
//通过判断过滤后的集合来确认是否已经对该资产类别进行过分类
if(groupResults != null && groupResults.size()>0){
//目前已经进行税法分类,标注状态
citAsset.setStatus(1);
AssetDetailGroup assetDetailGroup = selectAssetDetailGroup(groupResults.get(0).getAssetDetailGroupId());
// Integer assetGroupType = selectAssetDetailGroup(groupResults.get(0).getAssetDetailGroupId()).getAssetGroupType();
//进行税务的计算
setCitAssetTaxData(citAsset,groupResults.get(0),assetDetailGroup);
}else{
//目前没有进行税法分类,标注状态
citAsset.setStatus(0);
//没有进行过分类,放入Set集合里面
assetNameSet.add(assetName);
}
......@@ -411,6 +415,7 @@ public class AssetListServiceImpl extends BaseService {
Calendar cal = Calendar.getInstance();
//设置税法分类
citAsset.setTaxGroupName(assetDetailGroup.getDetailGroupName());
citAsset.setAssetDetailGroupId(assetDetailGroup.getId());
Integer assetGroupType = assetDetailGroup.getAssetGroupType();
//获取税务折旧期限,此值根据分类查数据库带出的值不在此进行操作
citAsset.setTaxDepreciationPeriod(assetGroupResult.getTaxDepreciationPeriod());
......
......@@ -61,7 +61,7 @@ import static pwc.taxtech.atms.dto.vatdto.WrapPeriodJobDto.*;
public class CitReportServiceImpl extends BaseService {
private final static Logger logger = LoggerFactory.getLogger(CitReportServiceImpl.class);
private final static String[] functions = {"SGSR", "FSJZ", "ND", "BB", "XXFP", "GZSD", "PC", "JXFPMX",
"JXFP", "PSUM", "DFFS", "JFFS", "WPSR", "WPNAME", "WPTYPE", "SUM2", "RSUMIF", "QMYE"};
"JXFP", "PSUM", "DFFS", "JFFS", "WPSR", "WPNAME", "WPTYPE", "SUM2", "RSUMIF", "QMYE", "ZC"};
@Autowired
private OrganizationServiceTemplateGroupMapper orgServiceTemplateGroupMapper;
......@@ -197,7 +197,7 @@ public class CitReportServiceImpl extends BaseService {
Workbook workbook = reportGenerator.createWorkBookByPeriodTemplate(resources.getPeriodTemplates(), genJob);
reportGenerator.addFunctionsAndContext(workbook, functions, reportGenerator.initContext(resources, periodParam));
reportGenerator.addCitFunctionsAndContext(workbook, functions, reportGenerator.initContext(resources, periodParam));
reportGenerator.setConfigAndDataToWorkBook(workbook, resources);
FormulaEvaluator evaluator = workbook.getCreationHelper().createFormulaEvaluator();
......
package pwc.taxtech.atms.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.google.common.collect.Lists;
import org.apache.commons.lang3.StringUtils;
import org.nutz.lang.Lang;
import org.nutz.lang.Strings;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.common.util.BeanUtil;
import pwc.taxtech.atms.common.util.HttpUtil;
import pwc.taxtech.atms.dao.*;
import pwc.taxtech.atms.dto.OperationResultDto;
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.vat.dao.*;
......@@ -20,10 +27,7 @@ import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Optional;
import java.util.UUID;
import java.util.*;
@Service
public class EbsApiServiceImpl implements EbsApiService {
......@@ -64,12 +68,19 @@ public class EbsApiServiceImpl implements EbsApiService {
private OrganizationExtraMapper organizationExtraMapper;
@Resource
private DataImportLogMapper dataImportLogMapper;
@Resource
private RegionMapper regionMapper;
@Resource
private DistributedIdService distributedIdService;
@Resource
private BeanUtil beanUtil;
@Value("${org_sync_url}")
private String orgSyncUrl;
@Value("${org_sync_token}")
private String token;
private static final Logger logger = LoggerFactory.getLogger(EbsApiServiceImpl.class);
@Override
......@@ -870,6 +881,59 @@ public class EbsApiServiceImpl implements EbsApiService {
}
}
@Override
public OperationResultDto syncOrg() {
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<OrgSyncData> failObjs = Lists.newArrayList();
int totalCount = 0;
int success = 0;
try {
for (int i = 1; i <= pageSize; i++) {
String response = HttpUtil.get(orgSyncUrl + "?currentPage=" + i, headers);
logger.info("机构信息同步记录:" + response);
DDSyncOrgInfo ddSyncOrgInfo = JSONObject.parseObject(response, DDSyncOrgInfo.class);
pageSize = ddSyncOrgInfo.getTotalPage();
totalCount = ddSyncOrgInfo.getTotalCount();
List<OrgSyncData> orgSyncDatas = ddSyncOrgInfo.getData();
for (OrgSyncData osd : orgSyncDatas) {
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) {
failObjs.add(osd);
}
success += organizationMapper.updateByExampleSelective(o, example);
}
}
logger.info("同步未匹配的机构记录:"+ JSON.toJSONString(failObjs));
} catch (Exception e) {
logger.error(String.format("机构信息同步异常:[%s]", e.getMessage()), e);
}
String msg = String.format("主数据中共[%s]条记录;成功匹配[%s]条;未匹配内容为[%s]",totalCount,success,JSON.toJSONString(failObjs));
return OperationResultDto.success(msg);
}
/**
* 获取操作人信息
* @param id
......
......@@ -7,14 +7,14 @@ import pwc.taxtech.atms.common.OperateLogType;
import pwc.taxtech.atms.common.OperationAction;
import pwc.taxtech.atms.common.OperationModule;
import pwc.taxtech.atms.common.message.LogMessage;
import pwc.taxtech.atms.common.util.CommonUtil;
import pwc.taxtech.atms.dao.EquityInformationHistoryMapper;
import pwc.taxtech.atms.dao.EquityInformationMapper;
import pwc.taxtech.atms.dao.OrganizationMapper;
import pwc.taxtech.atms.dto.equity.EquityInfoDto;
import pwc.taxtech.atms.dto.OperationLogDto;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.entity.EquityInformation;
import pwc.taxtech.atms.entity.EquityInformationExample;
import pwc.taxtech.atms.entity.OperationLogBasicData;
import pwc.taxtech.atms.entity.*;
import pwc.taxtech.atms.exception.ApplicationException;
import javax.annotation.Resource;
......@@ -31,9 +31,13 @@ public class EquityServiceImpl extends BaseService{
@Resource
private EquityInformationMapper equityInformationMapper;
@Resource
private EquityInformationHistoryMapper equityInformationHistoryMapper;
@Resource
private OrganizationMapper organizationMapper;
public List<EquityInfoDto> getEquityListByOrgId(String orgId) {
List<EquityInfoDto> equityInfoDtos = new ArrayList<>();
try {
......@@ -166,6 +170,9 @@ public class EquityServiceImpl extends BaseService{
// remark-1 无股权记录时,初始变更为新增
String orgId = equityInfoDtos.get(0).getOrganizationId();
Organization org = organizationMapper.selectByPrimaryKey(orgId);
List<EquityInformation> oldData = null;
if (null != oldId) {
// 1、根据id(原始)查出旧数据 equity_infomation
......@@ -187,6 +194,11 @@ public class EquityServiceImpl extends BaseService{
BeanUtils.copyProperties(equityInfoDto, newData);
newData.setId(newId);
newData.seteNum(i);
float investRadio = 0L;
if(CommonUtil.hasDigit(org.getRegistrationCapital())&&null!=newData.getInvestmentAmount()){
investRadio = (float)newData.getInvestmentAmount()/(float)CommonUtil.getNum(org.getRegistrationCapital());
}
newData.setInvestmentRadio(investRadio);
newData.setOrganizationId(orgId);
Date now = new Date();
newData.setCreateTime(now);
......
package pwc.taxtech.atms.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.google.common.collect.Lists;
import com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException;
import org.apache.commons.collections.CollectionUtils;
......@@ -13,6 +14,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.dao.DuplicateKeyException;
import org.springframework.stereotype.Service;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
......@@ -28,6 +30,7 @@ import pwc.taxtech.atms.common.message.EnterpriseAccountSetOrgMessage;
import pwc.taxtech.atms.common.message.LogMessage;
import pwc.taxtech.atms.common.message.OrganizationMessage;
import pwc.taxtech.atms.common.util.BeanUtil;
import pwc.taxtech.atms.common.util.HttpUtil;
import pwc.taxtech.atms.constant.*;
import pwc.taxtech.atms.dao.*;
import pwc.taxtech.atms.dpo.*;
......
......@@ -144,13 +144,13 @@ public class OrganizationStructureServiceImpl {
OrganizationStructureExample example = new OrganizationStructureExample();
example.createCriteria().andIdNotEqualTo(organizationStructureDto.getId());
boolean nameNotExist = organizationStructureMapper.countByExample(example) < 1;
example.createCriteria().andIdNotEqualTo(organizationStructureDto.getId()).andNameEqualTo(organizationStructureDto.getName());
boolean nameExist = organizationStructureMapper.countByExample(example) > 0;
if (notChange) {
return ApiResultDto.fail(ErrorMessageCN.OrgStructureFailed);
}
if (!nameNotExist) {
if (nameExist) {
return ApiResultDto.fail(ErrorMessageCN.OrgStructureNameExist);
}
......
package pwc.taxtech.atms.service.impl;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.common.config.SystemConfig;
import javax.annotation.Resource;
import java.io.IOException;
import java.util.Optional;
@Service
public class TableauService extends BaseService {
@Resource
private SystemConfig systemConfig;
/**
* 获取ticket
*
* @param username 用户名
* @return Optional<String>
*/
public Optional<String> getTicket(String username) {
CloseableHttpClient httpClient = null;
try {
String ticketUrl = String.format(systemConfig.getTableauGetTicket(), username);
httpClient = HttpClients.createDefault();
HttpPost httpPost = new HttpPost(ticketUrl);
HttpResponse httpResponse = httpClient.execute(httpPost);
String response = IOUtils.toString(httpResponse.getEntity().getContent(), "UTF-8");
return StringUtils.equals(response, "-1") ? Optional.empty() : Optional.of(response);
} catch (Exception e) {
logger.error("getTicket error.", e);
} finally {
if (null != httpClient) {
try {
httpClient.close();
} catch (IOException e) {
logger.error("close httpClient error.", e);
}
}
}
return Optional.empty();
}
public Optional<String> getUnreturnedTax() {
Optional<String> optional = authUserHelper.getCurrentAuditor();
return optional.map(s -> String.format(systemConfig.getTableauUnreturnedTax(),
getTicket(s).orElse(StringUtils.EMPTY)));
}
public Optional<String> getTaxComparison() {
Optional<String> optional = authUserHelper.getCurrentAuditor();
return optional.map(s -> String.format(systemConfig.getTableauTaxComparison(),
getTicket(s).orElse(StringUtils.EMPTY)));
}
public Optional<String> getOtherCountries() {
Optional<String> optional = authUserHelper.getCurrentAuditor();
return optional.map(s -> String.format(systemConfig.getTableauOtherCountries(),
getTicket(s).orElse(StringUtils.EMPTY)));
}
public Optional<String> getCostAnalysis() {
Optional<String> optional = authUserHelper.getCurrentAuditor();
return optional.map(s -> String.format(systemConfig.getTableauCostAnalysis(),
getTicket(s).orElse(StringUtils.EMPTY)));
}
public Optional<String> getProfitAndLoss() {
Optional<String> optional = authUserHelper.getCurrentAuditor();
return optional.map(s -> String.format(systemConfig.getTableauProfitAndLoss(),
getTicket(s).orElse(StringUtils.EMPTY)));
}
public Optional<String> getOtherDomesticData() {
Optional<String> optional = authUserHelper.getCurrentAuditor();
return optional.map(s -> String.format(systemConfig.getTableauOtherDomesticData(),
getTicket(s).orElse(StringUtils.EMPTY)));
}
public Optional<String> getDocSituation() {
Optional<String> optional = authUserHelper.getCurrentAuditor();
return optional.map(s -> String.format(systemConfig.getTableauDocSituation(),
getTicket(s).orElse(StringUtils.EMPTY)));
}
public Optional<String> getGlobalOverview() {
Optional<String> optional = authUserHelper.getCurrentAuditor();
return optional.map(s -> String.format(systemConfig.getTableauGlobalOverview(),
getTicket(s).orElse(StringUtils.EMPTY)));
}
public Optional<String> getMexicanTax() {
Optional<String> optional = authUserHelper.getCurrentAuditor();
return optional.map(s -> String.format(systemConfig.getTableauMexicanTax(),
getTicket(s).orElse(StringUtils.EMPTY)));
}
public Optional<String> getAustralianTax() {
Optional<String> optional = authUserHelper.getCurrentAuditor();
return optional.map(s -> String.format(systemConfig.getTableauAustralianTax(),
getTicket(s).orElse(StringUtils.EMPTY)));
}
public Optional<String> getBrazilianTax() {
Optional<String> optional = authUserHelper.getCurrentAuditor();
return optional.map(s -> String.format(systemConfig.getTableauBrazilianTax(),
getTicket(s).orElse(StringUtils.EMPTY)));
}
}
......@@ -314,7 +314,7 @@ public class UserRoleServiceImpl extends AbstractService {
}
public List<UserRoleDisplayInfo> getAllUserRoleList(String serviceTypeId) {
List<UserRoleQuery> query = userRoleMapper.selectUserRoleQueryByServiceTypeId(serviceTypeId);
List<UserRoleQuery> query = userRoleMapper.selectUserRoleQueryByServiceTypeIdAll(serviceTypeId);
List<UserRoleDisplayInfo> userRoleDtoList = new ArrayList<>();
List<UserRoleQueryDto> userList = query.stream().map(u -> CommonUtils.copyProperties(u, new UserRoleQueryDto()))
.distinct().collect(Collectors.toList());
......
......@@ -23,6 +23,7 @@ import pwc.taxtech.atms.vat.entity.*;
import pwc.taxtech.atms.vat.service.impl.report.functions.FormulaContext;
import java.math.BigDecimal;
import java.util.Calendar;
import java.util.List;
import java.util.Map;
......@@ -151,7 +152,7 @@ public class FormulaAgent {
public static String buildSql(String tableName, String getField, String filter, String filterValue, Integer period, String year, FormulaContext formulaContext) {
public static String buildSql(String tableName, String getField, String filter, String filterValue, Integer period, Integer year, FormulaContext formulaContext) {
/*
if (split[0].indexOf(">=") != -1) {
......@@ -179,8 +180,10 @@ public class FormulaAgent {
}
public static String _buildSql(String getField, String tableName, String filter, String filterValue, Integer period, FormulaContext formulaContext, String year, boolean bool, boolean getSql) throws Exception {
public static String _buildSql(String getField, String tableName, String filter, String filterValue, Integer period, FormulaContext formulaContext, Integer year, boolean bool, boolean getSql) throws Exception {
String sql = "";
//统一判断年度
year = formulaContext.getYear() + year;
if(getSql){
tableName = tableName.toLowerCase();
sql = "select * from " + tableName + " where 1=1 and " + filter + filterValue;
......@@ -188,7 +191,6 @@ public class FormulaAgent {
}else{
sql = "select sum(" + getField + ") as " + getField + " from " + tableName + " where 1=1 and " + filter + filterValue;
}
String _p = insertZero(formulaContext.getPeriod() - Math.abs(period));
String _period = insertZero(formulaContext.getPeriod());
String per = insertZero((formulaContext.getPeriod() - 1));
......@@ -224,15 +226,15 @@ public class FormulaAgent {
@Autowired
JdbcTemplate jdbcTemplate;
/*
public static void main(String[] args) {
FormulaAgent formulaAgent = new FormulaAgent();
FormulaContext formulaContext = new FormulaContext();
formulaContext.setPeriod(3);
formulaAgent.getTableDataByName("CIT_TBAM", "ending_balance", "attribute", "= '销售费用-财产损耗、盘亏及毁损损失'", 0, "2018", formulaContext);
}*/
formulaAgent.getTableDataByName("CIT_TBAM", "ending_balance", "attribute", "= '销售费用-财产损耗、盘亏及毁损损失'", 0, 0, null);
}
public BigDecimal getTableDataByName(String tableName, String getField, String filter, String filterValue, Integer period, String year, FormulaContext formulaContext) {
public BigDecimal getTableDataByName(String tableName, String getField, String filter, String filterValue, Integer period, Integer year, FormulaContext formulaContext) {
Map<String, Object> stringObjectMap = jdbcTemplate.queryForMap(buildSql(TableRule.map.get(tableName), getField, filter, filterValue, period, year, formulaContext));
......
......@@ -147,7 +147,6 @@ public class ReportGeneratorImpl {
List<PeriodFormulaBlock> periodFormulaBlocks = periodFormulaBlockMapper.selectByExample(periodFormulaBlockExample2);
//TODO:如果formula 为 ND(100) +ND(22) ,需要使用正则表达式拆分出自定义公式,然后根据自定义公式取formulablock 的数据进行替换
//原始版本正则表达式,update by zhikai.z.wei at 20190319 19:00
// String regex = "[A-Z]*\\([\\-A-Za-z0-9\\\"\\,\\.\\:\\u4e00-\\u9fa5\\%]*\\)";
String regex = "[A-Z]*\\([^(^)]*\\)";
Pattern p = Pattern.compile(regex);
......@@ -539,16 +538,19 @@ public class ReportGeneratorImpl {
workbook.addToolPack(udfToolpack);
}
/**
* 注册所有的自定义方法到工作簿
* 为CIT复制的一份注册自定义公式,和上面的addFunctionsAndContext方法基本相同
* CIT 注册所有的自定义方法到工作簿
*
* @param workbook 工作簿
*/
public void addCitFunctionsAndContext(Workbook workbook, String[] functions, FormulaContext formulaContext) {
//**************************** 为CIT复制的一份注册自定义公式 ****************************
FreeRefFunction[] functionImpls = {new SGSR(formulaContext), new FSJZ(formulaContext), new ND(formulaContext),
new BB(formulaContext), new XXFP(formulaContext), new GZSD(formulaContext), new PC(formulaContext)
, new JXFPMX(formulaContext), new JXFP(formulaContext), new PSUM(formulaContext), new DFFS(formulaContext),
new JFFS(formulaContext), new WPSR(formulaContext), new WPNAME(formulaContext), new WPTYPE(formulaContext),
new SUM2(formulaContext), new RSUMIF(formulaContext), new QMYE(formulaContext)};
new SUM2(formulaContext), new RSUMIF(formulaContext), new QMYE(formulaContext), new ZC(formulaContext)}; //为CIT复制的一份注册自定义公式
//**************************** 为CIT复制的一份注册自定义公式 ****************************
UDFFinder udfs = new DefaultUDFFinder(functions, functionImpls);
UDFFinder udfToolpack = new AggregatingUDFFinder(udfs);
workbook.addToolPack(udfToolpack);
......
......@@ -57,7 +57,7 @@ public class RSUMIF extends FunctionBase implements FreeRefFunction {
Integer argsLength;
String getField;
Integer period;
String year;
Integer year;
@Override
public ValueEval evaluate(ValueEval[] args, OperationEvaluationContext ec) {
......@@ -75,8 +75,8 @@ public class RSUMIF extends FunctionBase implements FreeRefFunction {
getField = resolverString(args, ec, 1);
filter= resolverString(args, ec, 2);
filterValue= resolverString(args, ec, 3);
period = resolverInteger(args, ec, 4);//会计期间
year = resolverString(args, ec, 5);//会计年度
year = resolverInteger(args, ec, 4);//会计年度
period = Integer.parseInt(resolverString(args, ec, 5));//会计期间
cellValue = agent.getTableDataByName(tableName, getField, filter, filterValue, period, year, formulaContext);
return new NumberEval(cellValue.doubleValue());
} catch (EvaluationException e) {
......
......@@ -56,5 +56,20 @@ cookie.maxAgeSeconds=${cookie.maxAgeSeconds}
api_white_list=${api_white_list}
org_sync_url=${org_sync_url}
org_sync_token=${org_sync_token}
dd_pubkey=${dd_pubkey}
ebs_call_url=${ebs_call_url}
\ No newline at end of file
ebs_call_url=${ebs_call_url}
#tableau config
tableau_get_ticket=${tableau_get_ticket}
tableau_unreturned_tax=${tableau_unreturned_tax}
tableau_tax_comparison=${tableau_tax_comparison}
tableau_other_countries=${tableau_other_countries}
tableau_cost_analysis=${tableau_cost_analysis}
tableau_profit_and_loss=${tableau_profit_and_loss}
tableau_other_domestic_data=${tableau_other_domestic_data}
tableau_doc_situation=${tableau_doc_situation}
tableau_global_overview=${tableau_global_overview}
tableau_mexican_tax=${tableau_mexican_tax}
tableau_australian_tax=${tableau_australian_tax}
tableau_brazilian_tax=${tableau_brazilian_tax}
\ No newline at end of file
......@@ -45,7 +45,7 @@ file_upload_query_url=http://47.94.233.173:11006/resource/erp_tax_system
#didi-config
#ϵַget_user_info_url=http://mis.diditaxi.com.cn/auth/sso/api/
#���ϵ�ַget_user_info_url=http://mis.diditaxi.com.cn/auth/sso/api/
check_ticket=false
get_user_info_url=http://mis.diditaxi.com.cn/auth/sso/api/
app_id=2500
......@@ -54,5 +54,20 @@ cookie.maxAgeSeconds=86400
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
dd_pubkey=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKUfMPRKV6I5num1dDWcxTrgTjXf5LctsVj0CpbwHE83mmjUO5CAlvA0Fwy30ajCX5sLmsyi+Eu/4uNmM6GQF3kCAwEAAQ==
ebs_call_url=http://172.20.201.201:8020/ebs-proxy-test/dts
#tableau config
tableau_get_ticket=http://47.94.233.173:16010/trusted?username=%s
tableau_unreturned_tax=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet8?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_tax_comparison=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet14?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_other_countries=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet8?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_cost_analysis=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet19?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_profit_and_loss=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet26?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_other_domestic_data=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet32?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_doc_situation=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet8?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_global_overview=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet8?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_mexican_tax=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet8?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_australian_tax=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet8?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_brazilian_tax=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet8?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
......@@ -48,7 +48,7 @@ env_type=pub
file_upload_post_url=http://100.69.238.155:8000/resource/erp_tax_system
file_upload_query_url=http://100.69.238.155:8001/resource/erp_tax_system
#ϵַget_user_info_url=http://mis.diditaxi.com.cn/auth/sso/api/
#���ϵ�ַget_user_info_url=http://mis.diditaxi.com.cn/auth/sso/api/
check_ticket=true
get_user_info_url=http://mis.diditaxi.com.cn/auth/sso/api/
app_id=2500
......@@ -57,5 +57,21 @@ cookie.maxAgeSeconds=18000
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
dd_pubkey=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKUfMPRKV6I5num1dDWcxTrgTjXf5LctsVj0CpbwHE83mmjUO5CAlvA0Fwy30ajCX5sLmsyi+Eu/4uNmM6GQF3kCAwEAAQ==
ebs_call_url=http://172.20.201.201:8020/ebs-proxy-test/dts
#tableau config
tableau_get_ticket=http://47.94.233.173:16010/trusted?username=%s
tableau_unreturned_tax=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet8?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_tax_comparison=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet14?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_other_countries=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet8?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_cost_analysis=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet19?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_profit_and_loss=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet26?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_other_domestic_data=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet32?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_doc_situation=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet8?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_global_overview=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet8?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_mexican_tax=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet8?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_australian_tax=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet8?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_brazilian_tax=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet8?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
......@@ -43,7 +43,7 @@ env_type=dev
file_upload_post_url=http://47.94.233.173:11005/resource/erp_tax_system
file_upload_query_url=http://47.94.233.173:11006/resource/erp_tax_system
#ϵַget_user_info_url=http://mis.diditaxi.com.cn/auth/sso/api/
#���ϵ�ַget_user_info_url=http://mis.diditaxi.com.cn/auth/sso/api/
check_ticket=false
get_user_info_url=http://mis.diditaxi.com.cn/auth/sso/api/
app_id=2500
......@@ -52,5 +52,21 @@ cookie.maxAgeSeconds=86400
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
dd_pubkey=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKUfMPRKV6I5num1dDWcxTrgTjXf5LctsVj0CpbwHE83mmjUO5CAlvA0Fwy30ajCX5sLmsyi+Eu/4uNmM6GQF3kCAwEAAQ==
ebs_call_url=http://172.20.201.201:8020/ebs-proxy-test/dts
#tableau config
tableau_get_ticket=http://47.94.233.173:16010/trusted?username=%s
tableau_unreturned_tax=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet8?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_tax_comparison=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet14?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_other_countries=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet8?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_cost_analysis=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet19?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_profit_and_loss=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet26?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_other_domestic_data=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet32?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_doc_situation=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet8?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_global_overview=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet8?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_mexican_tax=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet8?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_australian_tax=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet8?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_brazilian_tax=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet8?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
......@@ -79,6 +79,8 @@ public abstract class CommonIT {
@Autowired
protected OrganizationMapper organizationMapper;
@Autowired
protected OrganizationExtraMapper organizationExtraMapper;
@Autowired
protected CustomerMapper customerMapper;
@Autowired
protected UserMapper userMapper;
......
......@@ -3,7 +3,14 @@ package pwc.taxtech.atms.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.google.common.collect.Lists;
import org.apache.commons.lang3.StringUtils;
import org.junit.Test;
import pwc.taxtech.atms.CommonIT;
import pwc.taxtech.atms.common.util.StringUtil;
import pwc.taxtech.atms.entity.Organization;
import pwc.taxtech.atms.entity.OrganizationExample;
import pwc.taxtech.atms.entity.OrganizationExtra;
import pwc.taxtech.atms.entity.OrganizationExtraExample;
import java.util.List;
......@@ -12,7 +19,7 @@ import java.util.List;
* @Date: 15/03/2019 20:42
* @Description:
*/
public class GaryTest {
public class GaryTest extends CommonIT {
@Test
public void gagaga(){
......@@ -223,4 +230,20 @@ public class GaryTest {
System.out.println("enNameList"+enNameList);
}
@Test
public void syncArc(){
List<Organization> orgs = organizationMapper.selectByExample(new OrganizationExample());
orgs.forEach(o->{
if(StringUtils.isNotEmpty(o.getArchitectureType())){
OrganizationExtra oe = new OrganizationExtra();
oe.setArchitectureType(o.getArchitectureType());
OrganizationExtraExample e1 = new OrganizationExtraExample();
e1.createCriteria().andOrganizationIdEqualTo(o.getId());
if(organizationExtraMapper.updateByExampleSelective(oe,e1)>0){
System.out.println("更新"+o.getName()+"架构类型"+o.getArchitectureType()+"成功");
}
}
});
}
}
package pwc.taxtech.atms.analysis.dao;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import pwc.taxtech.atms.MyAnalysisMapper;
import pwc.taxtech.atms.analysis.entity.AnalysisTaxReturnEnd;
import pwc.taxtech.atms.analysis.entity.AnalysisTaxReturnEndExample;
@Mapper
public interface AnalysisTaxReturnEndMapper extends MyAnalysisMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table analysis_tax_return_end
*
* @mbg.generated
*/
long countByExample(AnalysisTaxReturnEndExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table analysis_tax_return_end
*
* @mbg.generated
*/
int deleteByExample(AnalysisTaxReturnEndExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table analysis_tax_return_end
*
* @mbg.generated
*/
int deleteByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table analysis_tax_return_end
*
* @mbg.generated
*/
int insert(AnalysisTaxReturnEnd record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table analysis_tax_return_end
*
* @mbg.generated
*/
int insertSelective(AnalysisTaxReturnEnd record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table analysis_tax_return_end
*
* @mbg.generated
*/
List<AnalysisTaxReturnEnd> selectByExampleWithRowbounds(AnalysisTaxReturnEndExample example, RowBounds rowBounds);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table analysis_tax_return_end
*
* @mbg.generated
*/
List<AnalysisTaxReturnEnd> selectByExample(AnalysisTaxReturnEndExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table analysis_tax_return_end
*
* @mbg.generated
*/
AnalysisTaxReturnEnd selectByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table analysis_tax_return_end
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") AnalysisTaxReturnEnd record, @Param("example") AnalysisTaxReturnEndExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table analysis_tax_return_end
*
* @mbg.generated
*/
int updateByExample(@Param("record") AnalysisTaxReturnEnd record, @Param("example") AnalysisTaxReturnEndExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table analysis_tax_return_end
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(AnalysisTaxReturnEnd record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table analysis_tax_return_end
*
* @mbg.generated
*/
int updateByPrimaryKey(AnalysisTaxReturnEnd record);
}
\ No newline at end of file
package pwc.taxtech.atms.analysis.entity;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import pwc.taxtech.atms.entity.BaseEntity;
......@@ -55,7 +54,7 @@ public class AnalysisFileManagement extends BaseEntity implements Serializable {
*
* @mbg.generated
*/
private BigDecimal reportingFrequency;
private String reportingFrequency;
/**
* Database Column Remarks:
......@@ -66,7 +65,7 @@ public class AnalysisFileManagement extends BaseEntity implements Serializable {
*
* @mbg.generated
*/
private BigDecimal archivingStatus;
private String archivingStatus;
/**
* Database Column Remarks:
......@@ -211,7 +210,7 @@ public class AnalysisFileManagement extends BaseEntity implements Serializable {
*
* @mbg.generated
*/
public BigDecimal getReportingFrequency() {
public String getReportingFrequency() {
return reportingFrequency;
}
......@@ -223,8 +222,8 @@ public class AnalysisFileManagement extends BaseEntity implements Serializable {
*
* @mbg.generated
*/
public void setReportingFrequency(BigDecimal reportingFrequency) {
this.reportingFrequency = reportingFrequency;
public void setReportingFrequency(String reportingFrequency) {
this.reportingFrequency = reportingFrequency == null ? null : reportingFrequency.trim();
}
/**
......@@ -235,7 +234,7 @@ public class AnalysisFileManagement extends BaseEntity implements Serializable {
*
* @mbg.generated
*/
public BigDecimal getArchivingStatus() {
public String getArchivingStatus() {
return archivingStatus;
}
......@@ -247,8 +246,8 @@ public class AnalysisFileManagement extends BaseEntity implements Serializable {
*
* @mbg.generated
*/
public void setArchivingStatus(BigDecimal archivingStatus) {
this.archivingStatus = archivingStatus;
public void setArchivingStatus(String archivingStatus) {
this.archivingStatus = archivingStatus == null ? null : archivingStatus.trim();
}
/**
......
package pwc.taxtech.atms.analysis.entity;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
......@@ -406,52 +405,62 @@ public class AnalysisFileManagementExample {
return (Criteria) this;
}
public Criteria andReportingFrequencyEqualTo(BigDecimal value) {
public Criteria andReportingFrequencyEqualTo(String value) {
addCriterion("reporting_frequency =", value, "reportingFrequency");
return (Criteria) this;
}
public Criteria andReportingFrequencyNotEqualTo(BigDecimal value) {
public Criteria andReportingFrequencyNotEqualTo(String value) {
addCriterion("reporting_frequency <>", value, "reportingFrequency");
return (Criteria) this;
}
public Criteria andReportingFrequencyGreaterThan(BigDecimal value) {
public Criteria andReportingFrequencyGreaterThan(String value) {
addCriterion("reporting_frequency >", value, "reportingFrequency");
return (Criteria) this;
}
public Criteria andReportingFrequencyGreaterThanOrEqualTo(BigDecimal value) {
public Criteria andReportingFrequencyGreaterThanOrEqualTo(String value) {
addCriterion("reporting_frequency >=", value, "reportingFrequency");
return (Criteria) this;
}
public Criteria andReportingFrequencyLessThan(BigDecimal value) {
public Criteria andReportingFrequencyLessThan(String value) {
addCriterion("reporting_frequency <", value, "reportingFrequency");
return (Criteria) this;
}
public Criteria andReportingFrequencyLessThanOrEqualTo(BigDecimal value) {
public Criteria andReportingFrequencyLessThanOrEqualTo(String value) {
addCriterion("reporting_frequency <=", value, "reportingFrequency");
return (Criteria) this;
}
public Criteria andReportingFrequencyIn(List<BigDecimal> values) {
public Criteria andReportingFrequencyLike(String value) {
addCriterion("reporting_frequency like", value, "reportingFrequency");
return (Criteria) this;
}
public Criteria andReportingFrequencyNotLike(String value) {
addCriterion("reporting_frequency not like", value, "reportingFrequency");
return (Criteria) this;
}
public Criteria andReportingFrequencyIn(List<String> values) {
addCriterion("reporting_frequency in", values, "reportingFrequency");
return (Criteria) this;
}
public Criteria andReportingFrequencyNotIn(List<BigDecimal> values) {
public Criteria andReportingFrequencyNotIn(List<String> values) {
addCriterion("reporting_frequency not in", values, "reportingFrequency");
return (Criteria) this;
}
public Criteria andReportingFrequencyBetween(BigDecimal value1, BigDecimal value2) {
public Criteria andReportingFrequencyBetween(String value1, String value2) {
addCriterion("reporting_frequency between", value1, value2, "reportingFrequency");
return (Criteria) this;
}
public Criteria andReportingFrequencyNotBetween(BigDecimal value1, BigDecimal value2) {
public Criteria andReportingFrequencyNotBetween(String value1, String value2) {
addCriterion("reporting_frequency not between", value1, value2, "reportingFrequency");
return (Criteria) this;
}
......@@ -466,52 +475,62 @@ public class AnalysisFileManagementExample {
return (Criteria) this;
}
public Criteria andArchivingStatusEqualTo(BigDecimal value) {
public Criteria andArchivingStatusEqualTo(String value) {
addCriterion("archiving_status =", value, "archivingStatus");
return (Criteria) this;
}
public Criteria andArchivingStatusNotEqualTo(BigDecimal value) {
public Criteria andArchivingStatusNotEqualTo(String value) {
addCriterion("archiving_status <>", value, "archivingStatus");
return (Criteria) this;
}
public Criteria andArchivingStatusGreaterThan(BigDecimal value) {
public Criteria andArchivingStatusGreaterThan(String value) {
addCriterion("archiving_status >", value, "archivingStatus");
return (Criteria) this;
}
public Criteria andArchivingStatusGreaterThanOrEqualTo(BigDecimal value) {
public Criteria andArchivingStatusGreaterThanOrEqualTo(String value) {
addCriterion("archiving_status >=", value, "archivingStatus");
return (Criteria) this;
}
public Criteria andArchivingStatusLessThan(BigDecimal value) {
public Criteria andArchivingStatusLessThan(String value) {
addCriterion("archiving_status <", value, "archivingStatus");
return (Criteria) this;
}
public Criteria andArchivingStatusLessThanOrEqualTo(BigDecimal value) {
public Criteria andArchivingStatusLessThanOrEqualTo(String value) {
addCriterion("archiving_status <=", value, "archivingStatus");
return (Criteria) this;
}
public Criteria andArchivingStatusIn(List<BigDecimal> values) {
public Criteria andArchivingStatusLike(String value) {
addCriterion("archiving_status like", value, "archivingStatus");
return (Criteria) this;
}
public Criteria andArchivingStatusNotLike(String value) {
addCriterion("archiving_status not like", value, "archivingStatus");
return (Criteria) this;
}
public Criteria andArchivingStatusIn(List<String> values) {
addCriterion("archiving_status in", values, "archivingStatus");
return (Criteria) this;
}
public Criteria andArchivingStatusNotIn(List<BigDecimal> values) {
public Criteria andArchivingStatusNotIn(List<String> values) {
addCriterion("archiving_status not in", values, "archivingStatus");
return (Criteria) this;
}
public Criteria andArchivingStatusBetween(BigDecimal value1, BigDecimal value2) {
public Criteria andArchivingStatusBetween(String value1, String value2) {
addCriterion("archiving_status between", value1, value2, "archivingStatus");
return (Criteria) this;
}
public Criteria andArchivingStatusNotBetween(BigDecimal value1, BigDecimal value2) {
public Criteria andArchivingStatusNotBetween(String value1, String value2) {
addCriterion("archiving_status not between", value1, value2, "archivingStatus");
return (Criteria) this;
}
......
......@@ -5,6 +5,7 @@ import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import pwc.taxtech.atms.MyMapper;
import pwc.taxtech.atms.dpo.CitAssetDetailResultDto;
import pwc.taxtech.atms.dpo.CitAssetEamMappingDto;
import pwc.taxtech.atms.entity.CitAssetsList;
import pwc.taxtech.atms.entity.CitAssetsListExample;
......@@ -116,4 +117,7 @@ public interface CitAssetsListMapper extends MyMapper {
* @return Result<XxxxDO>
*/
List<CitAssetEamMappingDto> getAssetEamMapping(CitAssetsList citAsset);
List<CitAssetDetailResultDto> getCitAssetDetialResult(@Param("assetType") Integer assetType,
@Param("assetDetailType") Integer assetDetailType);
}
\ No newline at end of file
......@@ -5,7 +5,6 @@ import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import pwc.taxtech.atms.MyMapper;
import pwc.taxtech.atms.dpo.CitTbamDto;
import pwc.taxtech.atms.entity.CitTbam;
import pwc.taxtech.atms.entity.CitTbamExample;
......@@ -115,5 +114,5 @@ public interface CitTbamMapper extends MyMapper {
*/
int insertBatch(List<CitTbam> citTbamList);
List<CitTbamDto> selectBySql(@Param("sql") String sql);
List<CitTbam> selectBySql(@Param("sql") String sql);
}
\ No newline at end of file
......@@ -6,6 +6,7 @@ import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.session.RowBounds;
import pwc.taxtech.atms.MyMapper;
import pwc.taxtech.atms.dpo.ProjectAnaylsisDto;
import pwc.taxtech.atms.dpo.ProjectDisplayDto;
import pwc.taxtech.atms.entity.Project;
import pwc.taxtech.atms.entity.ProjectExample;
......@@ -244,4 +245,8 @@ public interface ProjectMapper extends MyMapper {
"WHERE a.id = #{projectId} " +
" AND b.service_type_id = #{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> getTemlateWithServiceType2(@Param("orgId")String orgId, @Param("year") Integer year, @Param("month") Integer month,@Param("code")String code);
}
\ No newline at end of file
......@@ -112,5 +112,7 @@ public interface UserRoleMapper extends MyMapper {
List<UserRoleQuery> selectUserRoleQueryByServiceTypeId(String serviceTypeId);
List<UserRoleQuery> selectUserRoleQueryByServiceTypeIdAll(String serviceTypeId);
List<UserOrgRoleDto> getOriginalRoleList();
}
\ No newline at end of file
package pwc.taxtech.atms.dpo;
/**
* @Auther: Gary J Li
* @Date: 20/03/2019 11:17
* @Description:
*/
public class AnalysisSalesValueDto {
private String data;
private Integer rowIndex;
private Integer columnIndex;
public String getData() {
return data;
}
public void setData(String data) {
this.data = data;
}
public Integer getRowIndex() {
return rowIndex;
}
public void setRowIndex(Integer rowIndex) {
this.rowIndex = rowIndex;
}
public Integer getColumnIndex() {
return columnIndex;
}
public void setColumnIndex(Integer columnIndex) {
this.columnIndex = columnIndex;
}
}
package pwc.taxtech.atms.dpo;
import pwc.taxtech.atms.entity.AssetDetailGroup;
import pwc.taxtech.atms.entity.CitAssetsList;
public class CitAssetDetailResultDto {
String id;
CitAssetsList assetsList;
AssetDetailGroup assetDetailGroup;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public CitAssetsList getAssetsList() {
return assetsList;
}
public void setAssetsList(CitAssetsList assetsList) {
this.assetsList = assetsList;
}
public AssetDetailGroup getAssetDetailGroup() {
return assetDetailGroup;
}
public void setAssetDetailGroup(AssetDetailGroup assetDetailGroup) {
this.assetDetailGroup = assetDetailGroup;
}
}
package pwc.taxtech.atms.dpo;
import pwc.taxtech.atms.entity.CitTbam;
/**
* @ClassName CitTbamDto
* Description TODO
* @Author pwc kevin
* @Date 3/15/2019 3:46 PM
* Version 1.0
**/
public class CitTbamDto extends CitTbam {
}
......@@ -618,6 +618,8 @@ public class OrganizationExtraDto implements Serializable {
*/
private String auditRequirements;
private String architectureType;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table organization_extra
......@@ -1946,6 +1948,14 @@ public class OrganizationExtraDto implements Serializable {
this.auditRequirements = auditRequirements == null ? null : auditRequirements.trim();
}
public String getArchitectureType() {
return architectureType;
}
public void setArchitectureType(String architectureType) {
this.architectureType = architectureType;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table organization_extra
......
package pwc.taxtech.atms.dpo;
/**
* @Auther: Gary J Li
* @Date: 20/03/2019 11:17
* @Description:
*/
public class ProjectAnaylsisDto {
private String reportId;
private String projectId;
private String orgId;
private String templateName;
private String serviceTypeId;
public String getReportId() {
return reportId;
}
public void setReportId(String reportId) {
this.reportId = reportId;
}
public String getProjectId() {
return projectId;
}
public void setProjectId(String projectId) {
this.projectId = projectId;
}
public String getTemplateName() {
return templateName;
}
public void setTemplateName(String templateName) {
this.templateName = templateName;
}
public String getOrgId() {
return orgId;
}
public void setOrgId(String orgId) {
this.orgId = orgId;
}
public String getServiceTypeId() {
return serviceTypeId;
}
public void setServiceTypeId(String serviceTypeId) {
this.serviceTypeId = serviceTypeId;
}
}
......@@ -22,6 +22,7 @@ public class CitTbam extends BaseEntity implements Serializable {
*
* @mbg.generated
*/
private Long id;
/**
......
......@@ -616,6 +616,35 @@ public class OrganizationExtra extends BaseEntity implements Serializable {
*/
private String auditRequirements;
/**
* Database Column Remarks:
* 架构类型
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column organization_extra.architecture_type
*
* @mbg.generated
*/
private String architectureType;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column organization_extra.create_time
*
* @mbg.generated
*/
private Date createTime;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column organization_extra.update_time
*
* @mbg.generated
*/
private Date updateTime;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table organization_extra
......@@ -1944,6 +1973,78 @@ public class OrganizationExtra extends BaseEntity implements Serializable {
this.auditRequirements = auditRequirements == null ? null : auditRequirements.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column organization_extra.architecture_type
*
* @return the value of organization_extra.architecture_type
*
* @mbg.generated
*/
public String getArchitectureType() {
return architectureType;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column organization_extra.architecture_type
*
* @param architectureType the value for organization_extra.architecture_type
*
* @mbg.generated
*/
public void setArchitectureType(String architectureType) {
this.architectureType = architectureType == null ? null : architectureType.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column organization_extra.create_time
*
* @return the value of organization_extra.create_time
*
* @mbg.generated
*/
public Date getCreateTime() {
return createTime;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column organization_extra.create_time
*
* @param createTime the value for organization_extra.create_time
*
* @mbg.generated
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column organization_extra.update_time
*
* @return the value of organization_extra.update_time
*
* @mbg.generated
*/
public Date getUpdateTime() {
return updateTime;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column organization_extra.update_time
*
* @param updateTime the value for organization_extra.update_time
*
* @mbg.generated
*/
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table organization_extra
......@@ -2011,6 +2112,9 @@ public class OrganizationExtra extends BaseEntity implements Serializable {
sb.append(", actualBusinessAddress=").append(actualBusinessAddress);
sb.append(", taxRuleIntroduction=").append(taxRuleIntroduction);
sb.append(", auditRequirements=").append(auditRequirements);
sb.append(", architectureType=").append(architectureType);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append("]");
return sb.toString();
}
......
......@@ -5,6 +5,7 @@ import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import pwc.taxtech.atms.MyVatMapper;
import pwc.taxtech.atms.dpo.AnalysisSalesValueDto;
import pwc.taxtech.atms.vat.entity.PeriodCellData;
import pwc.taxtech.atms.vat.entity.PeriodCellDataExample;
......@@ -109,4 +110,6 @@ public interface PeriodCellDataMapper extends MyVatMapper {
int batchInsert(List<PeriodCellData> list);
List<PeriodCellData> selectDataByCellTemplateIdAround(@Param("bufferString") String bufferString);
List<AnalysisSalesValueDto> selectAnalysisSalesValueDto(@Param("reportId")String reportId, @Param("projectId")String projectId);
}
\ No newline at end of file
......@@ -431,6 +431,9 @@
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="adjustAccount != null">
adjust_account = #{adjustAccount,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
......
......@@ -82,7 +82,7 @@
SELECT 1 FROM DUAL;
</insert>
<select id="selectBySql" parameterType="java.lang.String" resultType="pwc.taxtech.atms.dpo.CitTbamDto">
<select id="selectBySql" parameterType="java.lang.String" resultType="pwc.taxtech.atms.entity.CitTbam">
select
id as id,
attribute attribute,
......@@ -91,7 +91,8 @@
debit_amount as debitAmount ,
credit_amount as creditAmount,
beginning_balance as beginningBalance,
IFNULL(adjust_account, ending_balance) as endingBalance
adjust_account as adjustAccount,
ending_balance as endingBalance
<if test="sql != null and sql != '' ">
${sql}
</if>
......
......@@ -99,4 +99,15 @@
and t.cell_template_id in #{bufferString}
</if>
</select>
<select id = "selectAnalysisSalesValueDto" resultType="pwc.taxtech.atms.dpo.AnalysisSalesValueDto">
select pcd.data as data,pct.column_index as columnIndex,pct.row_index as rowIndex,
from
period_cell_data pcd
left join period_cell_template pct
on pcd.cell_template_id = pct.id
where
pcd.report_id = #{reportId} and
pcd.project_id = #{projectId}
</select>
</mapper>
\ No newline at end of file
......@@ -910,6 +910,7 @@
"StartRowNum": "Start Row:",
"StartRowNumberCheckMsg": "The Starting Line Cannot be Greater Than The Total Number of Currently Imported Data!",
"StartingDate": "Start Date",
"EndDate": "End Date",
"StdAccountMappingResult": "Standard Account Mapping Result",
"StdCodeDirection": "Standard Account Direction",
"StdGoodsName": "Standard Goods Name",
......
......@@ -918,6 +918,7 @@
"StartRowNum": "起始行:",
"StartRowNumberCheckMsg": "起始行不能大于当前导入数据总数!",
"StartingDate": "开始日期",
"EndDate": "结束日期",
"StdAccountMappingResult": "标准科目对应结果",
"StdCodeDirection": "标准科目借贷方向",
"StdGoodsName": "标准货物名称",
......
<div id="vizContainer" style="display: flex; justify-content: center; height: 90%"></div>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment