Commit 762c7f77 authored by neo's avatar neo

[bugfix] fixed temp batch inster triem blank string

parent 79879fa2
......@@ -3,6 +3,7 @@ package pwc.taxtech.atms.vat.service.impl;
import com.alibaba.fastjson.JSON;
import com.google.common.collect.Lists;
import org.apache.commons.lang3.StringUtils;
import org.reflections.util.Utils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -266,10 +267,10 @@ public class ReportServiceImpl {
periodTemplate.setUpdateTime(template.getUpdateTime());
periodTemplate.setIsSystemType(template.getIsSystemType());
periodTemplate.setIsActiveAssociation(template.getIsActiveAssociation());
periodTemplate.setParentId(template.getParentId());
periodTemplate.setParentId(Utils.isEmpty(template.getParentId()) ? null : template.getParentId());
periodTemplate.setTemplateId(template.getId());
periodTemplate.setCreateBy(template.getCreateBy());
periodTemplate.setUpdateBy(template.getUpdateBy());
periodTemplate.setCreateBy(Utils.isEmpty(template.getCreateBy()) ? "admin" : template.getCreateBy());
periodTemplate.setUpdateBy(Utils.isEmpty(template.getUpdateBy()) ? "admin" : template.getUpdateBy());
periodTemplate.setProjectId(projectId);
periodTemplateList.add(periodTemplate);
logger.debug("template copy end,used time: " + (System.currentTimeMillis() - startTime) + " ms");
......@@ -304,8 +305,8 @@ public class ReportServiceImpl {
periodCellTemplate.setDataType(cellTemplate.getDataType());
periodCellTemplate.setIsReadOnly(cellTemplate.getIsReadOnly() ? 1 : 0);
periodCellTemplate.setCopyFromId(cellTemplate.getCopyFromId());
periodCellTemplate.setCreateBy(cellTemplate.getCreateBy());
periodCellTemplate.setUpdateBy(cellTemplate.getUpdateBy());
periodCellTemplate.setCreateBy(Utils.isEmpty(cellTemplate.getCreateBy()) ? "admin" : cellTemplate.getCreateBy());
periodCellTemplate.setUpdateBy(Utils.isEmpty(cellTemplate.getUpdateBy()) ? "admin" : cellTemplate.getUpdateBy());
periodCellTemplate.setProjectId(projectId);
periodCellTemplateList.add(periodCellTemplate);
//logger.debug("celltemplate copy end,used time: " + (System.currentTimeMillis() - startTime) + " ms");
......@@ -339,9 +340,9 @@ public class ReportServiceImpl {
periodCellTemplateConfig.setTaxRate(cellTemplateConfig.getTaxRate());
periodCellTemplateConfig.setInvoiceAmountType(cellTemplateConfig.getInvoiceAmountType());
periodCellTemplateConfig.setModelIds(cellTemplateConfig.getModelIds());
periodCellTemplateConfig.setCreateBy(cellTemplateConfig.getCreateBy());
periodCellTemplateConfig.setCreateBy(Utils.isEmpty(cellTemplateConfig.getCreateBy()) ? "admin" : cellTemplateConfig.getCreateBy());
periodCellTemplateConfig.setCreateTime(cellTemplateConfig.getCreateTime());
periodCellTemplateConfig.setUpdateBy(cellTemplateConfig.getUpdateBy());
periodCellTemplateConfig.setUpdateBy(Utils.isEmpty(cellTemplateConfig.getUpdateBy()) ? "admin" : cellTemplateConfig.getUpdateBy());
periodCellTemplateConfig.setUpdateTime(cellTemplateConfig.getUpdateTime());
periodCellTemplateConfig.setInvoiceCategory(cellTemplateConfig.getInvoiceCategory());
periodCellTemplateConfig.setFormulaDataSource(cellTemplateConfig.getFormulaDataSource());
......
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