Commit 673007bb authored by chase's avatar chase

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

parents 8c1745f2 164b07be
......@@ -446,6 +446,7 @@
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<filters>
<filter>src/main/resources/conf/conf_profile_dev.properties</filter>
......
package pwc.taxtech.atms.common.pwc.Exception;
/**
* @version 1.0
* @program: atms
* @description: Controller统一处理
* @author: Kevin
* @create: 2019-04-22 19:22
**/
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.propertyeditors.CustomDateEditor;
import org.springframework.ui.Model;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import pwc.taxtech.atms.dto.OperationResultDto;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
* 异常统一处理
* @author lhzhian
* @date 2016年4月28日
*/
@ControllerAdvice
class GloalHander{
private final static String ERROR_PAGE = "系统错误";
private static Logger logger = LoggerFactory.getLogger(GloalHander.class);
@ExceptionHandler(PwcException.class)
@ResponseBody
public OperationResultDto handle(Exception e){
OperationResultDto operationResultDto = new OperationResultDto();
/* ModelAndView mv = new ModelAndView();
mv.addObject("message", e.getMessage());
mv.setViewName(ERROR_PAGE);*/
operationResultDto.error(e.getMessage());
return operationResultDto;
}
@ExceptionHandler(PageException.class)
@ResponseBody
public ModelAndView handSql(Exception ex){
logger.info("-->to error view " + ex.getMessage());
ModelAndView mv = new ModelAndView();
if(ex == null){
mv.addObject("message",ERROR_PAGE);
}
mv.setViewName("error.html");
return mv;
}
@ModelAttribute
//应用到所有@RequestMapping注解方法
//此处将键值对添加到全局,注解了@RequestMapping的方法都可以获得此键值对
public void addUser(Model model) {
//model.addAttribute("pwc.message", "sizegang");
}
@InitBinder
//应用到所有@RequestMapping注解方法,在其执行之前初始化数据绑定器
//用来设置WebDataBinder,用于自动绑定前台请求参数到Model中。
public void initBinder(WebDataBinder binder) {
DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
CustomDateEditor orderDateEditor = new CustomDateEditor(dateFormat, true);
binder.registerCustomEditor(Date.class, orderDateEditor);
}
}
\ No newline at end of file
package pwc.taxtech.atms.common.pwc.Exception;
/**
* @version 1.0
* @program: atms
* @description: 跳转页面异常
* @author: Kevin
* @create: 2019-04-22 19:33
**/
public class PageException extends Exception {
private static final long serialVersionUID = 1L;
//业务类型
private String bizType;
//业务代码
private int bizCode;
//错误信息
private String message;
public PageException(String bizType, int bizCode, String message){
super(message);
this.bizType = bizType;
this.bizCode = bizCode;
this.message = message;
}
public PageException(String message){
super(message);
this.bizType = "";
this.bizCode = -1;
this.message = message;
}
public PageException(String bizType, String message){
super(message);
this.bizType = bizType;
this.bizCode = -1;
this.message = message;
}
public PageException(int bizCode, String message){
super(message);
this.bizType = "";
this.bizCode = bizCode;
this.message = message;
}
public String getBizType() {
return bizType;
}
public void setBizType(String bizType) {
this.bizType = bizType;
}
public int getBizCode() {
return bizCode;
}
public void setBizCode(int bizCode) {
this.bizCode = bizCode;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}
package pwc.taxtech.atms.common.pwc.Exception;
/**
* @version 1.0
* @program: atms
* @description: 自定义运行时异常
* @author: Kevin
* @create: 2019-04-22 19:26
**/
public class PwcException extends Exception {
private static final long serialVersionUID = 1L;
//业务类型
private String bizType;
//业务代码
private int bizCode;
//错误信息
private String message;
public PwcException(String bizType, int bizCode, String message){
super(message);
this.bizType = bizType;
this.bizCode = bizCode;
this.message = message;
}
public PwcException(String message){
super(message);
this.bizType = "";
this.bizCode = -1;
this.message = message;
}
public PwcException(String bizType, String message){
super(message);
this.bizType = bizType;
this.bizCode = -1;
this.message = message;
}
public PwcException(int bizCode, String message){
super(message);
this.bizType = "";
this.bizCode = bizCode;
this.message = message;
}
public String getBizType() {
return bizType;
}
public void setBizType(String bizType) {
this.bizType = bizType;
}
public int getBizCode() {
return bizCode;
}
public void setBizCode(int bizCode) {
this.bizCode = bizCode;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}
......@@ -3,15 +3,14 @@ package pwc.taxtech.atms.controller;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import pwc.taxtech.atms.common.message.ErrorMessage;
import pwc.taxtech.atms.controller.BaseController;
import pwc.taxtech.atms.dto.ApiResultDto;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.analysis.AnalysisDomesticlParam;
import pwc.taxtech.atms.dto.analysis.AnalysisInternationlParam;
import pwc.taxtech.atms.dto.vatdto.CertifiedInvoicesListParam;
import pwc.taxtech.atms.exception.ServiceException;
import pwc.taxtech.atms.service.impl.AnalysisServiceImpl;
......@@ -79,7 +78,7 @@ 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, Model model) {
try {
String valMsg = valParameter(file,period,type);
if(StringUtils.isNotEmpty(valMsg)){
......@@ -87,9 +86,7 @@ public class AnalysisController extends BaseController {
}
return analysisServiceImpl.importDomesitcExcelFile(file,period, type);
} catch (ServiceException e) {
String message = e.getMessage();
String[] split = message.split(":");
return OperationResultDto.error(split[1]);
return OperationResultDto.error(e.getMessage());
} catch (Exception e) {
logger.error("importDomesitcExcelFile error.", e);
return OperationResultDto.error(ErrorMessage.SystemError);
......
......@@ -362,17 +362,16 @@ public class ReportController {
* 批量导出利润表
*/
@RequestMapping("manyExport")
public ResponseEntity manyExport(@RequestBody RequestParameterDto requestParameterDto, HttpServletResponse response, HttpServletRequest request) {
public OperationResultDto manyExport(@RequestBody RequestParameterDto requestParameterDto, HttpServletResponse response, HttpServletRequest request) {
OperationResultDto operationResultDto = new OperationResultDto();
try {
//taskExecutor.execute(new EbitBatchExportJob( reportService,requestParameterDto, request, response));
reportService.manyExport(requestParameterDto, request, response);
} catch (Exception e) {
e.printStackTrace();
operationResultDto.error(e.getMessage());
return new ResponseEntity(HttpStatus.NO_CONTENT);
return operationResultDto.error(e.getMessage());
}
return new ResponseEntity(HttpStatus.OK);
return OperationResultDto.success();
}
@Autowired
......
......@@ -289,7 +289,7 @@ public class AnalysisServiceImpl extends BaseService {
} catch (Exception e) {
throw new ServiceException(e);
}
return notMatchOrg.append(orgNotList + "机构匹配失败");
return notMatchOrg.append(orgNotList + "行, 机构匹配失败");
}
private AnalysisTax getAnalysisTax(Integer period, Sheet sheet, int k, int j, Organization org) {
......
......@@ -362,7 +362,7 @@ public class AssetListServiceImpl extends BaseService {
//获取财务原值---计算方法:原值+原值调整值,暂时不考虑调整值
citAsset.setAccountAcquisitionValue(acquisitionValue);
//获取财务每月折旧额----(原值-残值额)/折旧期限
citAsset.setAccountMonthDepreciationAmount(acquisitionValue.subtract(residualRate).divide(new BigDecimal(depreciationPeriod), 2));
citAsset.setAccountMonthDepreciationAmount((acquisitionValue.subtract(residualRate)).divide(new BigDecimal(depreciationPeriod), 2));
//获取财务累计折旧额,接下来计算需要用到,所以赋给一个对象
value = CitCommonUtil.getValue(rowData.getCell(25));
......@@ -480,7 +480,7 @@ public class AssetListServiceImpl extends BaseService {
switch(enumCitAssetType){
case FixedAssets:
//获取税务折旧期限
citAsset.setTaxDepreciationPeriod(Math.max(citAsset.getDepreciationPeriod(),assetDetailGroup.getGroupYear()));
citAsset.setTaxDepreciationPeriod(Math.max(citAsset.getDepreciationPeriod(),assetDetailGroup.getGroupYear()*12));
//把购入日期放入到Calendar
cal.setTime(citAsset.getBuyDate());
......@@ -524,7 +524,7 @@ public class AssetListServiceImpl extends BaseService {
case InvisibleAssets:
//获取税务折旧期限
citAsset.setTaxDepreciationPeriod(Math.max(citAsset.getDepreciationPeriod(),assetDetailGroup.getGroupYear()));
citAsset.setTaxDepreciationPeriod(Math.max(citAsset.getDepreciationPeriod(),assetDetailGroup.getGroupYear()*12));
//把购入日期放入到Calendar
cal.setTime(citAsset.getBuyDate());
......@@ -546,7 +546,7 @@ public class AssetListServiceImpl extends BaseService {
//获取本年折旧期间 ,截至本年累计折旧期间-截至去年累计折旧期间
citAsset.setTaxYearDepreciationPeriod(citAsset.getTaxToCurrentYearDepreciationPeriod()-citAsset.getTaxToLastYearDepreciationPeriod());
//获取税务每月折旧额,(原值-残值)/税法折旧期间
citAsset.setTaxMonthDepreciationAmount(citAsset.getAcquisitionValue().subtract(citAsset.getResidualRate()).divide(new BigDecimal(assetGroupResult.getTaxDepreciationPeriod()), 2));
citAsset.setTaxMonthDepreciationAmount((citAsset.getAcquisitionValue().subtract(citAsset.getResidualRate())).divide(new BigDecimal(citAsset.getTaxDepreciationPeriod()), 2));
//获取税务截止本年累计折旧额, 本年折旧期间* 每月折旧额
citAsset.setTaxToCurrentYearDepreciationAmount(citAsset.getTaxMonthDepreciationAmount().multiply(new BigDecimal(citAsset.getTaxToCurrentYearDepreciationPeriod())));
//获取税务本年折旧额, 截至本年累计折旧期间*每月折旧额
......
......@@ -201,6 +201,7 @@ public class CitImportExcelServiceImpl extends BaseService {
if(rowData == null){
citDataImportLogError.setErrorMsg("数据错误,第"+(rowNum+1)+"整行为空");
citDataImportLogList.add(citDataImportLogError);
continue;
}
//拼接日记账调整版的实体
CitJournalEntryAdjust citJournal = new CitJournalEntryAdjust();
......
......@@ -1495,7 +1495,7 @@ public class CitReportServiceImpl extends BaseService {
}
/**
* 生成总分机构分配表
* 生成总分机构分配表,从生成的报表中取数
*/
public CitDistributionDto generateTotalBranchOrgDisTable(String projectId) {
......@@ -1694,6 +1694,146 @@ public class CitReportServiceImpl extends BaseService {
return citDistributionDto;
}
/**
* 生成总分机构分配表,从根源上取数
*/
public CitDistributionDto geneTotalBranchOrgDT(String projectId) {
CitDistributionDto citDistributionDto = new CitDistributionDto();
Project project = projectMapper.selectByPrimaryKey(projectId);
//判断是不是总机构,若机构的parentId为空则代表为父机构
Organization organization = organizationMapper.selectByPrimaryKey(project.getOrganizationId());
if(organization.getParentId() == null){
//此时代表该机构为总机构,需要生成总分机构分配表,
// 1、生成之前先删除之前生成的数据
CitDistributionExample citDistributionExample = new CitDistributionExample();
citDistributionExample.createCriteria().andProjectIdEqualTo(projectId);
citDistributionMapper.deleteByExample(citDistributionExample);
//获取当前卡片所在期间(就是年数)
Integer period = project.getYear();
//2生成总分机构分配表 start
//2.1 查出所有所有分支机构
OrganizationExample example = new OrganizationExample();
example.createCriteria().andCodeLike(project.getCode().substring(0, project.getCode().length() - 2)+"%");
List<Organization> organizations = organizationMapper.selectByExample(example);
//2、取出各个分支机构的三项因素,并算出各个三项因素的合计
//比较变量,其余值和该值进行比较,判断其余变量是否为0
BigDecimal compareVariable = new BigDecimal(0.000000);
//营业收入合计变量
BigDecimal totalBusinessIncome = new BigDecimal(0.000000);
//职工薪酬合计变量
BigDecimal totalEmployeeRemuneration = new BigDecimal(0.000000);
//资产总额合计变量
BigDecimal totalTotalAssets = new BigDecimal(0.000000);
//分配所得税额合计变量
BigDecimal totalDistributionAmount = new BigDecimal(0.000000);
//第六行G列的值
BigDecimal sixRowGCouValue = new BigDecimal(0.000000);
List<CitDistribution> citDistributionList = new ArrayList<>();
for (Organization org : organizations) {
//2.1 查出该机构该期间对应的卡片
ProjectExample projectExample = new ProjectExample();
projectExample.createCriteria().andOrganizationIdEqualTo(org.getId()).andYearEqualTo(period);
List<Project> projects = projectMapper.selectByExample(projectExample);
if (projects == null || projects.size() == 0) {
continue;
}
CitDistribution citDistribution = new CitDistribution();
citDistribution.setId(idService.nextId());
citDistribution.setOrganizationId(org.getId());
citDistribution.setPeriod(period);
citDistribution.setProjectId(project.getId());
citDistribution.setOrgName(org.getName());
citDistribution.setTaxPayerNumber(org.getTaxPayerNumber());
citDistribution.setCode(org.getCode());
//2.2 获取该机构该期间的营业收入--A101010《一版企业收入明细表》的营业收入金额C4抓取
// TODO 获取该机构该期间的营业收入
CitTbamExample citTbamExample = new CitTbamExample();
citTbamExample.createCriteria().andAttributeIn(Arrays.asList(attributeArr)).andProjectIdEqualTo(projects.get(0).getId());
List<CitTbam> citTbams = citTbamMapper.selectByExample(citTbamExample);
BigDecimal businessIncome = new BigDecimal(0.000000);
for (CitTbam citTbam : citTbams) {
businessIncome.add(citTbam.getEndingBalance());
}
totalBusinessIncome.add(businessIncome);
citDistribution.setBusinessIncome(businessIncome);
//2.3 获取该机构该期间的职工薪酬--WP008职工薪酬表的“职工薪酬”的小计项D20抓取,系统原有的方法
BigDecimal wp008CellValue = reportAnalysisService.getCellValue(projects.get(0).getId(), 0, "CIT.WP008", 20, 4);
citDistribution.setEmployeeRemuneration(wp008CellValue);
totalEmployeeRemuneration.add(wp008CellValue);
//判断当前循环的机构是不是总机构,若是总机构要查找出A200000的15栏
if (org.getCode().equals(project.getCode())){
BigDecimal a200000CellValue = reportAnalysisService.getCellValue(projects.get(0).getId(), 0, "CIT.A200000", 25, 3);
sixRowGCouValue.add(a200000CellValue);
}
CitBalanceSheetPrcAdjustExample citBsExample = new CitBalanceSheetPrcAdjustExample();
citBsExample.createCriteria().andProjectIdEqualTo(projects.get(0).getId()).andItemNameEqualTo("非流动资产合计");
List<CitBalanceSheetPrcAdjust> citBalanceSheetPrcAdjusts = citBsPrcAdjustMapper.selectByExample(citBsExample);
citDistribution.setTotalAssets(citBalanceSheetPrcAdjusts == null||citBalanceSheetPrcAdjusts.size()==0 ? new BigDecimal(0.000000):citBalanceSheetPrcAdjusts.get(0).getBegBal());
totalTotalAssets.add(citDistribution.getTotalAssets());
citDistributionList.add(citDistribution);
}
//计算各个机构的分配比例及分配税额
for (CitDistribution citDistribution : citDistributionList) {
//计算分配比例
citDistribution.setDistributionRatio(citDistribution.getBusinessIncome().
divide(totalBusinessIncome.compareTo(compareVariable)==0?new BigDecimal(1):totalBusinessIncome).multiply(new BigDecimal("0.35")).
add(citDistribution.getEmployeeRemuneration().divide(totalEmployeeRemuneration.compareTo(compareVariable)==0?new BigDecimal(1):totalEmployeeRemuneration).
multiply(new BigDecimal("0.35"))).
add(citDistribution.getTotalAssets().divide(totalTotalAssets.compareTo(compareVariable)==0?new BigDecimal(1):totalTotalAssets).multiply(new BigDecimal("0.30"))));
//拼写分配比例的公式
StringBuilder sb = new StringBuilder();
sb.append(citDistribution.getBusinessIncome());
sb.append("/");
sb.append(totalBusinessIncome);
sb.append("*0.35");
sb.append("+");
sb.append(citDistribution.getEmployeeRemuneration());
sb.append("/");
sb.append(totalEmployeeRemuneration);
sb.append("*0.35");
sb.append("+");
sb.append(citDistribution.getTotalAssets());
sb.append("/");
sb.append(totalTotalAssets);
sb.append("*0.30");
citDistribution.setDistributionRatioFormula(citDistribution.getBusinessIncome().toString());
//计算分配税额
citDistribution.setDistributionAmount(sixRowGCouValue.multiply(citDistribution.getDistributionRatio()));
totalDistributionAmount.add(citDistribution.getDistributionAmount());
// TODO 拼写分配税额的计算公式
}
citDistributionList.stream().forEach(citDistribution -> {
int insert = citDistributionMapper.insertSelective(citDistribution);
});
citDistributionDto.setTotalBusinessIncome(totalBusinessIncome);
citDistributionDto.setTotalEmployeeRemuneration(totalEmployeeRemuneration);
citDistributionDto.setTotalTotalAssets(totalTotalAssets);
}
return citDistributionDto;
}
/**
* 报表导出及上传保存所用
* @param reportIds
* @param projectId
* @param period
* @return
*/
public Workbook generateReportData(List<Long> reportIds, String projectId, Integer period) {
PeriodReportExample reportExample = new PeriodReportExample();
reportExample.createCriteria().andIdIn(reportIds);
......
......@@ -101,6 +101,8 @@ public class DataImportService extends BaseService {
private ProjectMapper projectMapper;
@Autowired
private OrganizationServiceImpl organizationService;
@Autowired
private OrganizationAccountingRateMapper organizationAccountingRateMapper;
private static String ebsCallUrl;
......@@ -960,7 +962,7 @@ public class DataImportService extends BaseService {
for (int i = 0; i < workbook.getNumberOfSheets(); i++) {
Sheet sheet = workbook.getSheetAt(i);
if (isSheetEmpty(sheet)) continue;
List<RedLetterInfoTable> rlits = generalRLITs(sheet,evaluator);
List<RedLetterInfoTable> rlits = generalRLITs(sheet,tmsPeriod, evaluator);
if (rlits.size() < 1) continue;
// 根据主体分组处理
Map<String, List<RedLetterInfoTable>> atsGroupRes =
......@@ -1740,8 +1742,9 @@ public class DataImportService extends BaseService {
dataImportLogs.add(dataImportLog);
}
private List<RedLetterInfoTable> generalRLITs(Sheet sheet,FormulaEvaluator evaluator) {
private List<RedLetterInfoTable> generalRLITs(Sheet sheet, Integer periodDate, FormulaEvaluator evaluator) {
List<RedLetterInfoTable> rlits = Lists.newArrayList();
SimpleDateFormat format = new SimpleDateFormat("yyyyMM");
for (int j = 1; j <= sheet.getLastRowNum(); j++) {
RedLetterInfoTable rlit = new RedLetterInfoTable();
Long plId = idService.nextId();
......@@ -1756,8 +1759,11 @@ public class DataImportService extends BaseService {
if (!"".equals(value)) {
rlit.setRedLetterInvoiceInfoTableNum(new BigDecimal(value.toString()).toPlainString());
}
rlit.setPeriod(DateUtils.dateToPeriod(row.getCell(3).getDateCellValue()));
rlit.setFillInDate(row.getCell(3).getDateCellValue());
rlit.setPeriod(periodDate);
try{
rlit.setFillInDate(row.getCell(1).getDateCellValue());
}catch (Exception e){
}
rlit.setSalesTaxNumber(getCellStringValue(row.getCell(4)));
rlit.setSalespersonName(getCellStringValue(row.getCell(5)));
rlit.setTotalAmount(getCellBigDecimalValue(row.getCell(6),evaluator));
......@@ -2261,7 +2267,7 @@ public class DataImportService extends BaseService {
tmpOrgList.forEach(o -> {
try {
Callable callEbs = new CallEbsThread(type, o, ebsCallUrl, dataImportLogMapper, authUserHelper,
idService, dtsTokenService, period, effectiveDateFrom, effectiveDateTo, operator);
idService, dtsTokenService, period, effectiveDateFrom, effectiveDateTo, operator,organizationAccountingRateMapper);
executorService.submit(callEbs);
// resList.add(future);
} catch (RejectedExecutionException rje) {
......@@ -2382,9 +2388,12 @@ public class DataImportService extends BaseService {
private String effectiveDateTo;
private String operator;
private OrganizationAccountingRateMapper organizationAccountingRateMapper;
CallEbsThread(int type, Organization org, String ebsCallUrl, DataImportLogMapper dataImportLogMapper,
AuthUserHelper authUserHelper, DistributedIdService idService, DtsTokenService dtsTokenService,
String period, String effectiveDateFrom, String effectiveDateTo, String operator) {
String period, String effectiveDateFrom, String effectiveDateTo, String operator,
OrganizationAccountingRateMapper organizationAccountingRateMapper) {
this.type = type;
this.org = org;
this.period = period;
......@@ -2393,6 +2402,7 @@ public class DataImportService extends BaseService {
this.dtsTokenService = dtsTokenService;
this.idService = idService;
this.dataImportLogMapper = dataImportLogMapper;
this.organizationAccountingRateMapper = organizationAccountingRateMapper;
this.effectiveDateFrom = effectiveDateFrom;
this.effectiveDateTo = effectiveDateTo;
this.operator = operator;
......@@ -2494,6 +2504,16 @@ public class DataImportService extends BaseService {
} else {
if (EbsExtractTypeConstant.JE == type) {
resp.setCompanyCode(null != resp.getSegment1() ? resp.getSegment1() : "");
}else if(EbsExtractTypeConstant.RATE == type){
//只有汇率表是同步进行操作,所以在得到response之前已经进行数据插入及记录的更新,
// 在此进行记录条数的设置
logger.info("此时操作汇率表");
OrganizationAccountingRateExample example = new OrganizationAccountingRateExample();
//期间
example.createCriteria().andPeriodEqualTo(convertPeriodStr2Int(period)).andTaskIdEqualTo(String.valueOf(taskId));
List<OrganizationAccountingRate> itemList = organizationAccountingRateMapper.selectByExample(example);
logger.info("查询的汇率条数:"+itemList.size());
log.setRecordSize(itemList.size());
}
log.setId(taskId);
log.setImportResult(true);
......@@ -2509,7 +2529,16 @@ public class DataImportService extends BaseService {
}
return 1;
}
/**
* 期间格式转换为原始的int类型
* @param periodStr
* @return
*/
private Integer convertPeriodStr2Int(String periodStr){
periodStr=StringUtils.replace(periodStr, "-", "");
Integer period=Integer.parseInt(periodStr);
return period;
}
}
}
......@@ -26,6 +26,7 @@ import org.springframework.web.multipart.MultipartHttpServletRequest;
import pwc.taxtech.atms.common.CommonUtils;
import pwc.taxtech.atms.common.POIUtil;
import pwc.taxtech.atms.common.message.ErrorMessage;
import pwc.taxtech.atms.common.pwc.Exception.PwcException;
import pwc.taxtech.atms.common.util.*;
import pwc.taxtech.atms.constant.Constant;
import pwc.taxtech.atms.constant.enums.*;
......@@ -232,7 +233,8 @@ public class ReportServiceImpl extends BaseService {
return operationResult;
}
private void clearPeriodData(String projectId, Integer period, boolean isMergeManualData) {
private void clearPeriodData(String projectId, Integer period, List<Long> templateIds, boolean isMergeManualData) {
if (templateIds.isEmpty()) templateIds.add(Long.MAX_VALUE);
PeriodFormulaBlockExample periodFormulaBlockExample = new PeriodFormulaBlockExample();
periodFormulaBlockExample.createCriteria().andProjectIdEqualTo(projectId).andPeriodEqualTo(period);
periodFormulaBlockMapper.deleteByExample(periodFormulaBlockExample);
......@@ -242,15 +244,15 @@ public class ReportServiceImpl extends BaseService {
periodTaxRuleSettingMapper.deleteByExample(periodTaxRuleSettingExample);
PeriodCellTemplateExample periodCellTemplateExample = new PeriodCellTemplateExample();
periodCellTemplateExample.createCriteria().andProjectIdEqualTo(projectId).andPeriodEqualTo(period);
periodCellTemplateExample.createCriteria().andProjectIdEqualTo(projectId).andPeriodEqualTo(period).andReportTemplateIdNotIn(templateIds);
periodCellTemplateMapper.deleteByExample(periodCellTemplateExample);
PeriodCellTemplateConfigExample periodCellTemplateConfigExample = new PeriodCellTemplateConfigExample();
periodCellTemplateConfigExample.createCriteria().andProjectIdEqualTo(projectId).andPeriodEqualTo(period);
periodCellTemplateConfigExample.createCriteria().andProjectIdEqualTo(projectId).andPeriodEqualTo(period).andReportTemplateIdNotIn(templateIds);
periodCellTemplateConfigMapper.deleteByExample(periodCellTemplateConfigExample);
PeriodTemplateExample periodTemplateExample = new PeriodTemplateExample();
periodTemplateExample.createCriteria().andProjectIdEqualTo(projectId).andPeriodEqualTo(period);
periodTemplateExample.createCriteria().andProjectIdEqualTo(projectId).andPeriodEqualTo(period).andTemplateIdNotIn(templateIds);
periodTemplateMapper.deleteByExample(periodTemplateExample);
PeriodTaxPayerReportRuleExample periodTaxPayerReportRuleExample = new PeriodTaxPayerReportRuleExample();
......@@ -304,13 +306,12 @@ public class ReportServiceImpl extends BaseService {
}
private void updateConfig(String projectId, Integer period, Boolean isMergeManualData, List<Template> templates, PeriodJob job) {
//财务报表不删除,这个逻辑用不到,先注释掉
// List<Long> exceptTemplateIds = templateMapper.getIdsForExceptTemplate();
List<Long> exceptTemplateIds = templateMapper.getIdsForExceptTemplate();
//根据收入类型映射生成开票记录关联数据
assembleInvoiceRecord(projectId, period, isMergeManualData);
//生成trial_balance_final数据
assembleTrialBalanceFinal(projectId, period);
clearPeriodData(projectId, period, isMergeManualData);
clearPeriodData(projectId, period, exceptTemplateIds, isMergeManualData);
copyTemplateAndConfigFromAdmin(projectId, templates, period);
setStatus(job, STATUS_END);
periodJobMapper.updateByPrimaryKey(job);
......@@ -374,10 +375,8 @@ public class ReportServiceImpl extends BaseService {
destRecord.setRevenueCofId(map.get(mapping.getContent()));
InvoiceRecordExample recordExample = new InvoiceRecordExample();
recordExample.createCriteria().andProjectIdEqualTo(projectId)
.andOrganizationIdEqualTo(mapping.getOrgId()).andBillingContentEqualTo(mapping.getContent())
.andTaxRateEqualTo(mapping.getTaxRate())
.andDepartmentEqualTo(mapping.getOuName())
.andPeriodEqualTo(Integer.valueOf(queryDate.replace("-", "")));
.andOrganizationIdEqualTo(mapping.getOrgId()).andBillingContentEqualTo(mapping.getContent()).
andPeriodEqualTo(Integer.valueOf(queryDate.replace("-", "")));
invoiceRecordMapper.updateByExampleSelective(destRecord, recordExample);
}
}
......@@ -878,8 +877,8 @@ public class ReportServiceImpl extends BaseService {
row.getCell(TaxesCalculateReportEnum.Column.Column_4.getIndex()).setCellValue(0.00);
} else if (1 == config.getAccountType()) {//科目
row.getCell(TaxesCalculateReportEnum.Column.Column_4.getIndex()).setCellValue(
"DFFS(\"" + config.getTbSegment3() + "\"," + project.getYear() + "," + period + ",3,\"" + config.getTbSegment5() + "\",\"" + config.getTbSegment6() + "\")-"
+ "JFFS(\"" + config.getTbSegment3() + "\"," + project.getYear() + "," + period + ",3,\"" + config.getTbSegment5() + "\",\"" + config.getTbSegment6() + "\")");
"DFFS(\"" + config.getTbSegment3() + "\"," + project.getYear() + "," + period + ",1,\"" + config.getTbSegment5() + "\",\"" + config.getTbSegment6() + "\")-"
+ "JFFS(\"" + config.getTbSegment3() + "\"," + project.getYear() + "," + period + ",1,\"" + config.getTbSegment5() + "\",\"" + config.getTbSegment6() + "\")");
} else if (2 == config.getAccountType()) {//手工输入
} else {
......@@ -897,9 +896,9 @@ public class ReportServiceImpl extends BaseService {
} else if (3 == config.getTaxBase()) {//手工录入
} else if (4 == config.getTaxBase()) {//借方发生额
row.getCell(TaxesCalculateReportEnum.Column.Column_9.getIndex()).setCellValue("JFFS(\"" + config.getBaseDrCode() + "\"," + project.getYear() + "," + period + ",3,,)");
row.getCell(TaxesCalculateReportEnum.Column.Column_9.getIndex()).setCellValue("JFFS(\"" + config.getBaseDrCode() + "\"," + project.getYear() + "," + period + ",1,,)");
} else if (5 == config.getTaxBase()) {//贷方发生额
row.getCell(TaxesCalculateReportEnum.Column.Column_9.getIndex()).setCellValue("DFFS(\"" + config.getBaseCrCode() + "\"," + project.getYear() + "," + period + ",3,,)");
row.getCell(TaxesCalculateReportEnum.Column.Column_9.getIndex()).setCellValue("DFFS(\"" + config.getBaseCrCode() + "\"," + project.getYear() + "," + period + ",1,,)");
} else {
row.getCell(TaxesCalculateReportEnum.Column.Column_9.getIndex()).setCellValue("");
}
......@@ -935,7 +934,7 @@ public class ReportServiceImpl extends BaseService {
sumStr += cellNum + ",";
}
sumStr += "\")";
// sumStr = sumStr.replace(",\")", "\")");
sumStr = sumStr.replace(",\")", "\")");
sumRow.getCell(entry.getKey()).setCellValue(sumStr);
}
......@@ -2092,17 +2091,16 @@ public class ReportServiceImpl extends BaseService {
PeriodDataSource dataSourceModel = null;
if (dataSourceExtendDtos.size() > 0) {
dataSourceModel = dataSourceExtendDtos.get(0).getDataSource();
dataSourceModel= periodDataSourceMapper.selectByPrimaryKey(dataSourceModel.getId());
if (StringUtils.isBlank(data.getKeyinData()))
updateCellValueForDataSourceChange(dataSourceModel, data.getAmount());
originalAmount = dataSourceModel.getAmount() != null ? dataSourceModel.getAmount() : new BigDecimal("0");
dataSourceModel.setName(data.getName());
dataSourceModel.setDescription(data.getDescription());
dataSourceModel.setAmount(data.getAmount()==null?new BigDecimal(0):data.getAmount());
dataSourceModel.setAmount(data.getAmount());
dataSourceModel.setUpdateBy("Admin");
dataSourceModel.setKeyinData(data.getKeyinData());
dataSourceModel.setUpdateTime(new Date());
periodDataSourceMapper.updateByPrimaryKey(dataSourceModel);
periodDataSourceMapper.updateByPrimaryKeySelective(dataSourceModel);
} else {
dataSourceModel = new PeriodDataSource();
Long cellDataSourceId = distributedIdService.nextId();
......@@ -2659,7 +2657,7 @@ public class ReportServiceImpl extends BaseService {
templateExample.createCriteria().andCodeEqualTo(EBITTemplateCode).andNameEqualTo(EBITTemplateCode);//todo 这里是利润表模板的固定code,禁止重复
List<Template> templates1 = templateMapper.selectByExample(templateExample);
if (templates1.size() == 0)
throw new Exception("没有利润表模板,无法批量导出,请上传模板");
throw new PwcException("没有利润表模板,无法批量导出,请上传模板");
MyAsserts.assertNotEmpty(templates1, new NotFoundException());
Template template = templates1.get(0);
String templatePath = template.getPath();
......
......@@ -62,15 +62,16 @@ dd_pubkey=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKUfMPRKV6I5num1dDWcxTrgTjXf5LctsVj0Cp
ebs_call_url=http://172.20.3.109:8010/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/Others?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/sheet40?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/InternationalOverview?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/Mexico?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/Australia?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/Brazil?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_get_ticket=http://172.20.2.220:8080/trusted?username=%s
tableau_unreturned_tax=http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/sheet0?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_tax_comparison=http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/sheet3?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_other_countries=http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/Others?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_cost_analysis=http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/sheet4?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_profit_and_loss=http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/sheet5?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_other_domestic_data=http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/sheet7?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_doc_situation=http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/sheet9?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_global_overview=http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/InternationalOverview?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_mexican_tax=http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/Mexico?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_australian_tax=http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/Australia?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_brazilian_tax=http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/Brazil?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_dashboard=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/Brazil?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
......@@ -453,7 +453,7 @@
accounted_dr, accounted_cr, entered_dr, entered_cr, cf_item, attribute1, attribute2, attribute3, attribute4, attribute5,
attribute6, attribute7, attribute8, attribute9, attribute10, attribute11, attribute12, attribute13, attribute14, attribute15,
attribute16, created_by, created_date, late_updated_by, late_updated_date, create_time, update_time, is_select
from journal_entry where tms_period like CONCAT('%' ,#{record.period},'%')
from journal_entry where tms_period like CONCAT(#{record.period},'%')
<if test="orgList != null and orgList.size > 0">
AND organization_id in
<foreach item="item" index="index" collection="orgList" open="(" separator="," close=")">
......
......@@ -34,6 +34,7 @@
from cash_flow
where
<include refid="QueryCondition"/>
order by id desc
</select>
<select id="selectCountByCondition" parameterType="pwc.taxtech.atms.vat.dpo.CashFlowCondition" resultType="Integer">
select
......
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="&#x56FE;&#x5C42;_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
y="0px" viewBox="0 0 28 28" style="enable-background:new 0 0 28 28;" xml:space="preserve">
<path d="M27,4H1C0.448,4,0,3.552,0,3v0c0-0.552,0.448-1,1-1h26c0.552,0,1,0.448,1,1v0C28,3.552,27.552,4,27,4z"/>
<path d="M27,15H1c-0.552,0-1-0.448-1-1v0c0-0.552,0.448-1,1-1h26c0.552,0,1,0.448,1,1v0C28,14.552,27.552,15,27,15z"/>
<path d="M27,26H1c-0.552,0-1-0.448-1-1v0c0-0.552,0.448-1,1-1h26c0.552,0,1,0.448,1,1v0C28,25.552,27.552,26,27,26z"/>
</svg>
<template>
<v-container >
<v-container>
<v-navigation-drawer
v-model="drawerRight"
fixed
......@@ -48,7 +48,7 @@
fixed
app
clipped-right
height="90"
height="45"
color="#ffffff"
style="border-bottom: 1px solid #dddddd"
>
......@@ -59,10 +59,10 @@
<span class="body-2"
@click.stop="drawerRight = !drawerRight" style="vertical-align: middle; margin-right: 5px; width:100%"
>
<svg class="icon" aria-hidden="true" ><use
<svg class="icon" aria-hidden="true" style="height:14px"><use
:xlink:href="selectedItem.iconName"></use></svg>
<span style="vertical-align: middle; margin-left: 10px;font-weight:normal; font-size:26px" v-text="selectedItem.title"></span>
<v-icon style="vertical-align: middle;margin-top:5px;float:right;height:28px;width:28px;color:#333333;">menu</v-icon>
<span style="vertical-align: middle; margin-left: 10px;font-weight:normal; font-size:12px/16px" v-text="selectedItem.title"></span>
<img src="../assets/menu.svg" style="vertical-align: middle;margin-top:5px;float:right;height:14px;width:14px;color:#333333;"></img>
</span>
<!-- <v-btn large-->
......@@ -73,10 +73,9 @@
<!-- </v-btn>-->
<!-- <v-toolbar-side-icon @click.stop="drawerRight = !drawerRight"></v-toolbar-side-icon>-->
</v-toolbar>
<v-container ma-0 pa-0>
<v-container ma-0 pa-0 >
<Tableau :url="chartUrl"
width="100%"
ref="tableau"
:apiUrl="tableauApiUrl"
>
......@@ -246,8 +245,5 @@
<style scoped>
.head {
height: 90px;
background-color: red;
}
</style>
\ No newline at end of file
......@@ -8,6 +8,7 @@
:active.sync="bottomNav"
:value="true"
color="#ffffff"
height="48px"
absolute
style=" overflow: hidden;
position: fixed;
......@@ -16,26 +17,24 @@
border-top:1px solid #dddddd;"
>
<v-btn
color="#333333"
<v-btn @click="clickOne()"
flat
value="panel"
depressed
:to="{name: 'panel'}"
>
<span style="font-size:20px ; ">仪表盘</span>
<v-icon >table_chart</v-icon>
<span :color="color_font1" style="font-size:10px ; ">仪表盘</span>
<v-icon :color="color_icon1" >table_chart</v-icon>
</v-btn>
<v-btn
color="#333333"
<v-btn @click="clickTwo()"
flat
value="mine"
depressed
:to="{name: 'mine'}"
>
<span style="font-size:20px ; " > 我的</span>
<v-icon >account_box</v-icon>
<span :color="color_font2" style="font-size:10px ; " > 我的</span>
<v-icon :color="color_icon2" >account_box</v-icon>
</v-btn>
</v-bottom-nav>
......@@ -47,9 +46,31 @@
export default {
data() {
return {
color_icon2:'#dddddd',
color_icon1:'#333333',
color_font2:'#999999',
color_font1:'#333333',
bottomNav: 'panel'
}
},
methods: {
clickOne() {
this.color_icon1='#333333'
this.color_icon2='#dddddd'
this.color_font1='#333333'
this.color_font2='#999999'
},
clickTwo() {
this.color_icon2='#333333'
this.color_icon1='#dddddd'
this.color_font2='#333333'
this.color_font1='#999999'
}
},
components: {
......@@ -83,7 +104,5 @@
</script>
<style scoped>
.color_active{
color:red!important;
}
</style>
\ No newline at end of file
api.url=http://dts.erp.didichuxing.com
api.url=http://dts.erp.didichuxing.com:8180/
jwt.base64Secret=TXppQjFlZFBSbnJzMHc0Tg==
jwt.powerToken=xxxx
......
......@@ -3144,7 +3144,6 @@
}
setTimeout(function(){spreadTODb();}, 1000)
}
$scope.singleExport = function () {
if ($scope.spread != undefined && $scope.spread) {
var excelIo = new GC.Spread.Excel.IO();
......@@ -3153,7 +3152,6 @@
fileName += '.xlsx';
}
var json = $scope.spread.toJSON();
// here is excel IO API
excelIo.save(json, function (blob) {
saveAs(blob, ($scope.relation.orgName != undefined ? $scope.relation.orgName : "" + $scope.relation.period) + fileName);
......@@ -3171,45 +3169,8 @@
templateId: $scope.templateId
}
/* $timeout(function () {
$('#busy-indicator-container').show();
var mainSpread = new GC.Spread.Sheets.Workbook(document.getElementById("report"), {sheetCount: 1});
mainSpread.isPaintSuspended(true);
mainSpread.sheets.pop();
for (var index = 0; index < $scope.spreads.length; index++) {
var currentSheet = $scope.spreads[index].getActiveSheet();
currentSheet.options.isProtected = false;
for (var rowIndex = 0; rowIndex < currentSheet.getRowCount(); rowIndex++) {
for (var columnIndex = 0; columnIndex < currentSheet.getColumnCount(); columnIndex++) {
var cellStyle = currentSheet.getActualStyle(rowIndex, columnIndex, GC.Spread.Sheets.SheetArea.viewport, true);
currentSheet.setStyle(rowIndex, columnIndex, cellStyle, GC.Spread.Sheets.SheetArea.viewport);
}
}
mainSpread.sheets.push(currentSheet);
}
var excelIo = new GC.Spread.Excel.IO();
excelIo.save(mainSpread.toJSON(), function (blob) {
if ('export' == $scope.evenType) {
saveAs(blob, vatSessionService.project.name + '-' + vatSessionService.month + '-纳税申报.xlsx');
$('#busy-indicator-container').hide();
}
}, function (e) {
alert(e);
});
$('.export-container').html('');
$('#export').html('');
$log.debug(mainSpread);
}, 500);*/
vatReportService.manyExport(param);
};
/* $scope.relation._orgId = null;
$scope.$watch('relation._orgId', function (n, o) {
if (n != undefined)
$scope.relation.orgId = n.pop();
});*/
var initCompanyList = function () {
var joinText = "";
......
......@@ -330,6 +330,7 @@
assetListService.getAssetResultListPage($scope.citAssetsListDto).success(function (assetListData) {
debugger;
var data = assetListData.data.list;
$('.filter-button').popover("hide");
if (data) {
var index = 1;
// data.forEach(function (v) {
......@@ -355,6 +356,7 @@
$scope.TotalCount = assetListData.data.total;
$scope.pagingOptions.totalItems = assetListData.data.total;
$scope.pageOptions.totalItems = assetListData.data.total;
});
}
......@@ -1266,7 +1268,7 @@
//开始
(function initialize() {
debugger;
/**************************************** function start*************************************************/
$scope.displayType = 2;
$scope.saveGroupType = 1;
......
......@@ -290,8 +290,8 @@
width: 100
},
{
caption: $translate.instant('PerMonthDepreciationAmount'),
dataField: "perMonthDepreciationAmount",
caption: $translate.instant('TaxMonthDepreciationAmount'),
dataField: "taxMonthDepreciationAmount",
format: {type: 'fixedPoint', precision: 2},
width: 100
},
......
......@@ -71,18 +71,10 @@
manyExport: function (param) {
var toParam = JSON.stringify(param);
return $http.post('/Report/manyExport', toParam, apiConfig.createVat({responseType: 'arraybuffer'})).then(function (response) {
if(response.status == 204){
SweetAlert.error("当前期间没有可导出的数据");
return
if(!response.result){
SweetAlert.error(response.resultMsg);
}
var a = document.createElement('a');
var data = new Blob([response.data], {type: response.headers('Content-Type')});
//FileSaver.saveAs(data, '利润表.zip');
a.href = URL.createObjectURL(data);
a.download = param.period + "-汇总利润表.xlsx";
a.click();
PWC.downloadCallBack(new Blob([response.data], {type: response.headers('Content-Type')}),null, null,param.period + "-汇总利润表.xlsx" );
});
}
,
......
......@@ -5,8 +5,8 @@
$scope.startDate = new Date(vatSessionService.project.year, 0, 1);
$scope.endDate = new Date(vatSessionService.project.year, 11, 31);
$scope.dateFormat = $translate.instant('dateFormat4YearMonthDay');
$scope.startMonth = vatSessionService.year + vatSessionService.month;
$scope.endMonth = vatSessionService.year + vatSessionService.month;
$scope.startMonth = vatSessionService.year + '' + vatSessionService.month;
$scope.endMonth = vatSessionService.year + '' + vatSessionService.month;
$scope.totalMoneyAmount = 0;
$scope.totalTaxAmount = 0;
$scope.pageSize = constant.vatPagesize;
......@@ -205,6 +205,7 @@
pageInfo: {},
periodStart: '',
periodEnd: '',
orgId: '',
segment3: null,
segment3Name: null,
segment5: null,
......@@ -216,6 +217,7 @@
};
$scope.queryParams.periodStart = $scope.startMonth;
$scope.queryParams.periodEnd = $scope.endMonth;
$scope.queryParams.orgId = vatSessionService.project.organizationID;
loadJournalEntryDataFromDB(1);
$('.filter-button').popover("hide");
};
......
......@@ -5,8 +5,8 @@
$scope.startDate = new Date(vatSessionService.project.year, 0, 1);
$scope.endDate = new Date(vatSessionService.project.year, 11, 31);
$scope.dateFormat = $translate.instant('dateFormat4YearMonthDay');
$scope.startMonth =vatExportService.year+vatSessionService.month;
$scope.endMonth = vatExportService.year+vatSessionService.month;
$scope.startMonth =vatSessionService.year+''+vatSessionService.month;
$scope.endMonth = vatSessionService.year+''+vatSessionService.month;
$scope.totalMoneyAmount = 0;
$scope.totalTaxAmount = 0;
$scope.pageSize = constant.vatPagesize;
......@@ -202,6 +202,7 @@
pageInfo: {},
periodStart: '',
periodEnd: '',
orgId:'',
segment3 : null,
segment3Name : null,
segment2 : null,
......@@ -212,6 +213,7 @@
};
$scope.queryParams.periodStart = $scope.startMonth;
$scope.queryParams.periodEnd = $scope.endMonth;
$scope.queryParams.orgId = vatSessionService.project.organizationID;
loadTrialBalanceDataFromDB(1);
$('.filter-button').popover("hide");
};
......
......@@ -381,7 +381,9 @@
var year=now.getFullYear();
var vatMonth=vatSessionService.month;
if(vatSessionService.year==year){
if(vatMonth<month-1){
if(vatMonth===month-1){
return false;
}else{
return true;
}
}
......@@ -390,25 +392,35 @@
}
return true;
}
var startCaculate3 = function () {
var bool=checkYearMonthCaculate2();
if(bool){
swal({
title: "warning!",
text: $translate.instant('IsConfirmTimeNotSame'),
var confirmWithContinue=function (title, text, customClass) {
var deferred = $q.defer();
SweetAlert.swal({
title: title,
text: text,
html: true,
type: "warning",
customClass: customClass || '',
showCancelButton: true,
confirmButtonColor: "#dd6b55",
allowOutsideClick: false,
confirmButtonText: $translate.instant('Yes'),
cancelButtonText: $translate.instant('No'),
closeOnConfirm: true,
closeOnCancel: true
},
function (isConfirm) {
deferred.resolve(isConfirm);
});
return deferred.promise;
}
var startCaculate4=function(){
if(checkYearMonthCaculate2()){
confirmWithContinue($translate.instant('IsConfirmTimeNotSame')).then(function (isConfirm) {
if(isConfirm){
startCaculate2();
}else{
return ;
}
})
}else{
......@@ -416,9 +428,8 @@
}
}
var startCaculate2 = function () {
if (vatSessionService.project.projectStatusList[vatSessionService.month] >= constant.ProjectStatusEnum.Generated) {
swal({
title: "warning!",
......@@ -727,7 +738,7 @@
$scope.resolveRef = [];
initTasks();
$scope.startCaculate = startCaculate;
$scope.startCaculate3 = startCaculate3;
$scope.startCaculate4 = startCaculate4;
$scope.$on('$destroy',function(){
if($scope.timer)$interval.cancel($scope.timer);
});
......
......@@ -3,7 +3,7 @@
<div class="vat-caculate-data-title" ng-if="tasks.length > 0">
<!--<span translate="vatCaculateDataDesc"></span>-->
<!--<button class="btn btn-vat-primary" translate="startCaculateData" ng-disabled="readonly" ng-click="startCaculate()"></button>-->
<button class="btn btn-vat-primary" translate="startCaculateData" ng-disabled="readonly" ng-click="startCaculate3()"></button>
<button class="btn btn-vat-primary" translate="startCaculateData" ng-disabled="readonly" ng-click="startCaculate4()"></button>
<span ng-click="showOperateLogPop()"><i class="fa fa-file-excel-o" aria-hidden="true"></i>{{'Remarks' | translate}}</span>
</div>
......
.color_active[data-v-60ac6546]{color:red!important}.head[data-v-18a52f4a]{height:90px;background-color:red}.icon{width:1em;height:1em;vertical-align:-.15em;fill:currentColor;overflow:hidden}
\ No newline at end of file
.icon{width:1em;height:1em;vertical-align:-.15em;fill:currentColor;overflow:hidden}
\ No newline at end of file
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="&#x56FE;&#x5C42;_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
y="0px" viewBox="0 0 28 28" style="enable-background:new 0 0 28 28;" xml:space="preserve">
<path d="M27,4H1C0.448,4,0,3.552,0,3v0c0-0.552,0.448-1,1-1h26c0.552,0,1,0.448,1,1v0C28,3.552,27.552,4,27,4z"/>
<path d="M27,15H1c-0.552,0-1-0.448-1-1v0c0-0.552,0.448-1,1-1h26c0.552,0,1,0.448,1,1v0C28,14.552,27.552,15,27,15z"/>
<path d="M27,26H1c-0.552,0-1-0.448-1-1v0c0-0.552,0.448-1,1-1h26c0.552,0,1,0.448,1,1v0C28,25.552,27.552,26,27,26z"/>
</svg>
......@@ -49,4 +49,4 @@
//send 发送
xmlhttp.send();
}*/</script><link rel=icon href=favicon.ico><title>didi2</title><link rel=stylesheet href=font_roboto.css><link rel=stylesheet href=font_material.css><link href=js/about.17654e8a.js rel=prefetch><link href=css/app.73dfc5ab.css rel=preload as=style><link href=css/chunk-vendors.ce5e3dd4.css rel=preload as=style><link href=js/app.07374ae8.js rel=preload as=script><link href=js/chunk-vendors.670ff040.js rel=preload as=script><link href=css/chunk-vendors.ce5e3dd4.css rel=stylesheet><link href=css/app.73dfc5ab.css rel=stylesheet></head><body><noscript><strong>We're sorry but didi2 doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=js/chunk-vendors.670ff040.js></script><script src=js/app.07374ae8.js></script></body></html>
\ No newline at end of file
}*/</script><link rel=icon href=favicon.ico><title>didi2</title><link rel=stylesheet href=font_roboto.css><link rel=stylesheet href=font_material.css><link href=js/about.17654e8a.js rel=prefetch><link href=css/app.cf16809e.css rel=preload as=style><link href=css/chunk-vendors.ce5e3dd4.css rel=preload as=style><link href=js/app.49c9c2b6.js rel=preload as=script><link href=js/chunk-vendors.670ff040.js rel=preload as=script><link href=css/chunk-vendors.ce5e3dd4.css rel=stylesheet><link href=css/app.cf16809e.css rel=stylesheet></head><body><noscript><strong>We're sorry but didi2 doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=js/chunk-vendors.670ff040.js></script><script src=js/app.49c9c2b6.js></script></body></html>
\ No newline at end of file
This diff is collapsed.
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