Commit cc4c112b authored by gary's avatar gary

Merge remote-tracking branch 'origin/dev_mysql' into dev_mysql

parents f4c3950e acb91a82
......@@ -13,4 +13,5 @@ public class DataSourceName {
public static final String SAPDataSource = "SAPDataSource";
public static final String LandSellDataSource = "LandSellDataSource";
public static final String UnbilledDataSource = "UnbilledDataSource";
public static final String TableSumIfDataSource = "TableSumIfDataSource";
}
package pwc.taxtech.atms.constant.enums;
import pwc.taxtech.atms.dto.vatdto.ReportCellTableSUMIFDataSourceDto;
public enum FormulaDataSourceDetailType {
BSPLFormulaDataSourceDto(1, pwc.taxtech.atms.dto.vatdto.BSPLFormulaDataSourceDto.class),
......@@ -8,9 +10,9 @@ public enum FormulaDataSourceDetailType {
InputInvoiceDetailDataSourceDto(4, pwc.taxtech.atms.dto.vatdto.InputInvoiceDetailDataSourceDto.class),
OutputInvoiceDataSourceDto(5, pwc.taxtech.atms.dto.vatdto.OutputInvoiceDataSourceDto.class),
AssetDetailDataSourceDto(5, pwc.taxtech.atms.dto.vatdto.AssetDetailDataSourceDto.class),
ReportCellDataSourceDto(6, pwc.taxtech.atms.dto.vatdto.ReportCellDataSourceDto.class);
ReportCellDataSourceDto(6, pwc.taxtech.atms.dto.vatdto.ReportCellDataSourceDto.class),
ReportCellTableSUMIFDataSourceDto(7,ReportCellTableSUMIFDataSourceDto.class);
private Integer code;
private Class clas;
......
......@@ -41,6 +41,7 @@ public enum FormulaDataSourceType {
/// </summary>
SapDaily(7),
/// <summary>
/// 土地出让金数据源
/// </summary>
......@@ -58,9 +59,12 @@ public enum FormulaDataSourceType {
ModelSource(13),
WPSRSource(33),
TrialBalance(20),
AssetListSource(21);
AssetListSource(21),
// FSESource(14),
RSUMIF(22),
CIT_TBAM(50); //针对试算平衡表
private Integer code;
......@@ -100,8 +104,13 @@ public enum FormulaDataSourceType {
return FormulaDataSourceType.TrialBalance;
case 21:
return FormulaDataSourceType.AssetListSource;
case 22:
return FormulaDataSourceType.RSUMIF;
case 33:
return FormulaDataSourceType.WPSRSource;
case 50:
return FormulaDataSourceType.CIT_TBAM;
default:
return FormulaDataSourceType.Other;
}
......
......@@ -3,13 +3,17 @@ 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.jdbc.core.JdbcTemplate;
import org.springframework.web.bind.annotation.*;
import pwc.taxtech.atms.dao.CitTbamMapper;
import pwc.taxtech.atms.dpo.CitTbamDto;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.vat.entity.CellComment;
import pwc.taxtech.atms.vat.entity.PeriodCellComment;
import pwc.taxtech.atms.vat.service.impl.CellCommentServiceImpl;
import java.util.List;
import java.util.Map;
import java.util.Optional;
@RestController
......@@ -26,4 +30,18 @@ public class CellCommentController {
}
return cellCommentService.getCellComments(cellDataId, projectId);
}
@Autowired
private CitTbamMapper citTbamMapper;
@Autowired
private JdbcTemplate jdbcTemplate;
//通过sql获取展示表格展示数据
@RequestMapping(value = "getCellInformation")
public OperationResultDto getCellInformation(String sql){
OperationResultDto operationResultDto = new OperationResultDto();
operationResultDto.setResultMsg("success");
operationResultDto.setData(citTbamMapper.selectBySql(sql));
return operationResultDto;
}
}
......@@ -185,6 +185,7 @@ public class TemplateController extends BaseController {
@RequestParam(name = "projectId") String projectId,
HttpServletResponse response) throws URISyntaxException {
period = 0;
String filePath;
File templateFile;
InputStream inputStream = null;
......@@ -242,7 +243,6 @@ public class TemplateController extends BaseController {
}
out = null;
}
if (inputStream != null) {
try {
inputStream.close();
......
......@@ -5,6 +5,7 @@ public class CamelPagingDto {
private Integer pageIndex;
private Integer pageSize;
public Integer getTotalCount() {
return totalCount;
}
......
......@@ -27,6 +27,7 @@ public class DataSourceDto {
// 1: +, 2: -, 3: *, 4: /
Integer operationType;
String rel_sql;
// 1: Number, 2: Percentage, 3: Boolean, 4: String
Integer resultType;
......@@ -56,6 +57,14 @@ public class DataSourceDto {
@JsonProperty("reportTemplateID")
String reportTemplateId;
public String getRel_sql() {
return rel_sql;
}
public void setRel_sql(String rel_sql) {
this.rel_sql = rel_sql;
}
public String getId() {
return this.id;
}
......
package pwc.taxtech.atms.dto.vatdto;
import org.apache.poi.ss.formula.OperationEvaluationContext;
import org.apache.poi.ss.formula.eval.EvaluationException;
import org.apache.poi.ss.formula.eval.ValueEval;
import java.util.ArrayList;
import java.util.List;
import static pwc.taxtech.atms.common.util.FormulaUtil.resolverString;
import static pwc.taxtech.atms.exception.Exceptions.BAD_BBVO_PARAMS;
public class RSUMIFParasBo {
private String reportCode;
private Integer columnIndex;
private Integer rowIndex;
private Integer period;
private Integer year;
private String formulaExpression;
private List<PeriodCellDataTemplate> expressionData = new ArrayList<>();
public static class PeriodCellDataTemplate {
Integer period;
Long cellTemplateId;
@Override
public String toString() {
return period + ":" + cellTemplateId;
}
public PeriodCellDataTemplate(Integer period, Long cellTemplateId) {
this.period = period;
this.cellTemplateId = cellTemplateId;
}
}
public void putPeriodCellTempate(Integer period, Long cellTemplateId) {
if (period < 1 || period > 12 || cellTemplateId < 0) throw BAD_BBVO_PARAMS;
expressionData.add(new PeriodCellDataTemplate(period, cellTemplateId));
}
public String getExpression(ValueEval[] args, OperationEvaluationContext ec) throws EvaluationException {
StringBuilder expression = new StringBuilder("");
String _para = "";
begin(expression);
for(int i = 0 ; i< args.length; i++){
_para = resolverString(args, ec, i);
concatPara(expression, _para);
split(expression);
}
end(expression);
return expression.toString();
}
private StringBuilder begin(StringBuilder expression) {
return expression.append("RSUMIF(");
}
private StringBuilder end(StringBuilder expression) {
return expression.append(")");
}
private StringBuilder split(StringBuilder expression) {
return expression.append(",");
}
private StringBuilder concatPara(StringBuilder expression, String para) {
return expression.append("\"").append(para).append("\"");
}
private StringBuilder concatPara(StringBuilder expression, Integer para) {
return expression.append(para);
}
public RSUMIFParasBo(){}
public RSUMIFParasBo(RSUMIFParasBo otherBo, int period, int curYear) {
this.reportCode = otherBo.reportCode;
this.columnIndex = otherBo.getColumnIndex();
this.rowIndex = otherBo.rowIndex;
this.period = period;
this.year = curYear;
this.formulaExpression = otherBo.formulaExpression;
}
public String expression() {
return formulaExpression;
}
public String getReportCode() {
return this.reportCode;
}
public void setReportCode(String reportCode) {
this.reportCode = reportCode;
}
public Integer getColumnIndex() {
return this.columnIndex;
}
public void setColumnIndex(Integer columnIndex) {
this.columnIndex = columnIndex;
}
public Integer getRowIndex() {
return this.rowIndex;
}
public void setRowIndex(Integer rowIndex) {
this.rowIndex = rowIndex;
}
public Integer getPeriod() {
return this.period;
}
public void setPeriod(Integer period) {
this.period = period;
}
public Integer getYear() {
return this.year;
}
public void setYear(Integer year) {
this.year = year;
}
public String getFormulaExpression() {
return this.formulaExpression;
}
public void setFormulaExpression(String formulaExpression) {
this.formulaExpression = formulaExpression;
}
public List<PeriodCellDataTemplate> getExpressionData() {
return this.expressionData;
}
public void setExpressionData(List<PeriodCellDataTemplate> expressionData) {
this.expressionData = expressionData;
}
}
package pwc.taxtech.atms.dto.vatdto;
import org.apache.poi.ss.formula.OperationEvaluationContext;
import pwc.taxtech.atms.constant.DataSourceName;
import pwc.taxtech.atms.constant.enums.FormulaDataSourceType;
import pwc.taxtech.atms.dpo.CellTemplatePerGroupDto;
import pwc.taxtech.atms.vat.entity.PeriodCellData;
import pwc.taxtech.atms.vat.service.impl.report.functions.FormulaContext;
import java.math.BigDecimal;
public class ReportCellTableSUMIFDataSourceDto extends DataSourceDto {
private String tag = "RSUMIF";
private String name;
private Integer year;
private Integer period;
private Integer columnIndex;
private String columnName;
private Integer rowIndex;
private String rowName;
private String reportTemplateId;
private String reportName;
private String cellDataId;
private String cellTemplateId;
private Boolean isOnlyManualInput;
private Integer type;
private Integer resultType;
private BigDecimal amount;
private String tableName;
private String filter;
private String filterValue;
public String getTableName() {
return tableName;
}
public void setTableName(String tableName) {
this.tableName = tableName;
}
public String getFilter() {
return filter;
}
public void setFilter(String filter) {
this.filter = filter;
}
public String getFilterValue() {
return filterValue;
}
public void setFilterValue(String filterValue) {
this.filterValue = filterValue;
}
public ReportCellTableSUMIFDataSourceDto() {
this.type = FormulaDataSourceType.Report.getCode();
}
public void insertData(OperationEvaluationContext o, FormulaContext formulaContext) {
this.rowIndex = o.getRowIndex();
this.columnIndex = o.getColumnIndex();
this.cellTemplateId = null;
this.period = formulaContext.getPeriod();
this.reportTemplateId = formulaContext.getReportTemplateGroupId().toString();
this.year = formulaContext.getYear();
this.isOnlyManualInput = false;
this.reportName = formulaContext.getReportTemplateGroupId().toString();
this.name = DataSourceName.ReportDataSource;
}
public String getTag() {
return this.tag;
}
public void setTag(String tag) {
this.tag = tag;
}
@Override
public String getName() {
return this.name;
}
@Override
public void setName(String name) {
this.name = name;
}
@Override
public Integer getYear() {
return this.year;
}
@Override
public void setYear(Integer year) {
this.year = year;
}
@Override
public Integer getPeriod() {
return this.period;
}
@Override
public void setPeriod(Integer period) {
this.period = period;
}
@Override
public Integer getColumnIndex() {
return this.columnIndex;
}
@Override
public void setColumnIndex(Integer columnIndex) {
this.columnIndex = columnIndex;
}
@Override
public String getColumnName() {
return this.columnName;
}
@Override
public void setColumnName(String columnName) {
this.columnName = columnName;
}
@Override
public Integer getRowIndex() {
return this.rowIndex;
}
@Override
public void setRowIndex(Integer rowIndex) {
this.rowIndex = rowIndex;
}
@Override
public String getRowName() {
return this.rowName;
}
@Override
public void setRowName(String rowName) {
this.rowName = rowName;
}
@Override
public String getReportTemplateId() {
return this.reportTemplateId;
}
@Override
public void setReportTemplateId(String reportTemplateId) {
this.reportTemplateId = reportTemplateId;
}
public String getReportName() {
return this.reportName;
}
public void setReportName(String reportName) {
this.reportName = reportName;
}
@Override
public String getCellDataId() {
return this.cellDataId;
}
@Override
public void setCellDataId(String cellDataId) {
this.cellDataId = cellDataId;
}
@Override
public String getCellTemplateId() {
return this.cellTemplateId;
}
@Override
public void setCellTemplateId(String cellTemplateId) {
this.cellTemplateId = cellTemplateId;
}
public Boolean getIsOnlyManualInput() {
return this.isOnlyManualInput;
}
public void setIsOnlyManualInput(Boolean onlyManualInput) {
this.isOnlyManualInput = onlyManualInput;
}
@Override
public Integer getType() {
return this.type;
}
@Override
public void setType(Integer type) {
this.type = type;
}
@Override
public Integer getResultType() {
return this.resultType;
}
@Override
public void setResultType(Integer resultType) {
this.resultType = resultType;
}
@Override
public BigDecimal getAmount() {
return this.amount;
}
@Override
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
@Override
public String toString() {
return "ReportCellTableSUMIFDataSourceDto{" +
"tag='" + tag + '\'' +
", name='" + name + '\'' +
", year=" + year +
", period=" + period +
", columnIndex=" + columnIndex +
", columnName='" + columnName + '\'' +
", rowIndex=" + rowIndex +
", rowName='" + rowName + '\'' +
", reportTemplateId='" + reportTemplateId + '\'' +
", reportName='" + reportName + '\'' +
", cellDataId='" + cellDataId + '\'' +
", cellTemplateId='" + cellTemplateId + '\'' +
", isOnlyManualInput=" + isOnlyManualInput +
", type=" + type +
", resultType=" + resultType +
", amount=" + amount +
", tableName='" + tableName + '\'' +
", filter='" + filter + '\'' +
", filterValue='" + filterValue + '\'' +
'}';
}
}
......@@ -179,6 +179,7 @@ public class AssetListServiceImpl extends BaseService {
logger.debug("导入excel文件开始");
//定义返回变量
OperationResultDto<Object> importResult = new OperationResultDto<>();
importResult.setResult(true);
//通过输入流获取当前workbook
Workbook workbook = fileService.getWorkbook(inputStream, fileName, "citAsset");
......@@ -367,7 +368,7 @@ public class AssetListServiceImpl extends BaseService {
* @return
*/
public ApiResultDto saveAssetGroupInfo(List<CitAssetGroupResult> assetGroupResults, Integer saveGroupType, String projectId) {
ApiResultDto resultDto = new ApiResultDto();
for (CitAssetGroupResult assetGroupResult : assetGroupResults) {
//根据主键修改资产类别有关数据,主要修改的字段为资产一级分类主键、资产二级分类主键
assetGroupResultMapper.updateByPrimaryKeySelective(assetGroupResult);
......@@ -385,7 +386,9 @@ public class AssetListServiceImpl extends BaseService {
//
// }
// });
return null;
resultDto.setData(true);
resultDto.setCode(1);
return resultDto;
}
......
......@@ -57,7 +57,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", "TABLESUMIF", "SUM"};
"JXFP", "PSUM", "DFFS", "JFFS", "WPSR", "WPNAME", "WPTYPE", "SUM2", "RSUMIF", "SUM"};
@Autowired
private OrganizationServiceTemplateGroupMapper orgServiceTemplateGroupMapper;
......@@ -171,11 +171,9 @@ public class CitReportServiceImpl extends BaseService {
try {
//根据projectId获取相关报表
List<Template> templates = getTemplatesByProjectId(projectId);
//因WrapPeriodJobDto.createReportGenJob方法需要传入数组,但CIT并不需要所以传入一个空数组
List<String> dataValidateArray = new ArrayList<String>();
/*dataValidateArray.add("DA001");
dataValidateArray.add("DA002");
dataValidateArray.add("DA003");*/
dataValidateArray.add("DA004");
PeriodJob genJob = WrapPeriodJobDto.createReportGenJob(projectId, periodParam, templates, dataValidateArray);
periodJobMapper.insert(genJob);
......@@ -186,7 +184,7 @@ public class CitReportServiceImpl extends BaseService {
updateConfig(projectId, periodParam, isMergeManualData, templates, genJob);
// TODO 进行数据校验
DataValidation(periodParam, projectId, genJob);
// DataValidation(periodParam, projectId, genJob);
PeriodResources resources = reportGenerator.getPeriodResources(projectId, periodParam,
templates.stream().map(Template::getId).collect(Collectors.toList()));
......@@ -199,6 +197,9 @@ public class CitReportServiceImpl extends BaseService {
FormulaEvaluator evaluator = workbook.getCreationHelper().createFormulaEvaluator();
evaluator.evaluateAll();
setStatus(genJob, STATUS_END);
periodJobMapper.updateByPrimaryKey(genJob);
reportGenerator.updateWorkbookCaclsValueToDb(projectId, periodParam, workbook, resources, isMergeManualData, genJob);
setStatus(genJob, STATUS_END);
periodJobMapper.updateByPrimaryKey(genJob);
......@@ -362,8 +363,7 @@ public class CitReportServiceImpl extends BaseService {
clearPeriodData(projectId, period, exceptTemplateIds, isMergeManualData);
//复制配置
copyTemplateAndConfigFromAdmin(projectId, templates, period);
setStatus(job, STATUS_END);
periodJobMapper.updateByPrimaryKey(job);
}
/**
......
......@@ -247,7 +247,7 @@ public class EbsApiServiceImpl implements EbsApiService {
//唯一则更新否则插入
JournalEntry journalEntry = new JournalEntry();
if (journalEntryList.size() == 1) {
logger.debug("exit and update journalEntry headerId:{},lineNum:{},taskId:{}", item.getHeaderId(), item.getLineNum(),item.getTaskId());
logger.debug("exist and update journalEntry headerId:{},lineNum:{},taskId:{}", item.getHeaderId(), item.getLineNum(),item.getTaskId());
journalEntry = journalEntryList.get(0);
populateFieldsJE(item, journalEntry);
journalEntry.setId(journalEntryList.get(0).getId());
......@@ -272,7 +272,7 @@ public class EbsApiServiceImpl implements EbsApiService {
//唯一则更新否则插入
TrialBalance result = new TrialBalance();
if (itemList.size() >0) {
logger.debug("exit and delete TrialBalance EntityCode:{},Period:{},taskId:{}", item.getSegment1(), convertPeriodStr2Int(item.getPeriod()),item.getTaskId());
logger.debug("exist and delete TrialBalance EntityCode:{},Period:{},taskId:{}", item.getSegment1(), convertPeriodStr2Int(item.getPeriod()),item.getTaskId());
trialBalanceMapper.deleteByExample(example);
}
logger.debug("insert TrialBalance EntityCode:{},Period:{},taskId:{}", item.getSegment1(), convertPeriodStr2Int(item.getPeriod()),item.getTaskId());
......@@ -292,7 +292,7 @@ public class EbsApiServiceImpl implements EbsApiService {
//唯一则更新否则插入
CashFlow result = new CashFlow();
if (itemList.size() >0) {
logger.debug("exit and delete CashFlow EntityCode:{},Period:{},taskId:{}", item.getEntityCode(), item.getPeriod(),item.getTaskId());
logger.debug("exist and delete CashFlow EntityCode:{},Period:{},taskId:{}", item.getEntityCode(), item.getPeriod(),item.getTaskId());
cashFlowMapper.deleteByExample(example);
}
logger.debug("insert CashFlow EntityCode:{},Period:{},taskId:{}", item.getEntityCode(), item.getPeriod(),item.getTaskId());
......@@ -313,7 +313,7 @@ public class EbsApiServiceImpl implements EbsApiService {
//唯一则更新否则插入
BalanceSheet result = new BalanceSheet();
if (itemList.size() >0) {
logger.debug("exit and delete BalanceSheet EntityCode:{},Period:{},taskId:{}", item.getEntityCode(), item.getPeriod(),item.getTaskId());
logger.debug("exist and delete BalanceSheet EntityCode:{},Period:{},taskId:{}", item.getEntityCode(), item.getPeriod(),item.getTaskId());
balanceSheetMapper.deleteByExample(example);
}
logger.debug("insert BalanceSheet EntityCode:{},Period:{},taskId:{}", item.getEntityCode(), item.getPeriod(),item.getTaskId());
......@@ -342,7 +342,7 @@ public class EbsApiServiceImpl implements EbsApiService {
//唯一则更新否则插入
BalanceSheetPrc result = new BalanceSheetPrc();
if (itemList.size() >0) {
logger.debug("exit and delete BalanceSheetPrc EntityCode:{},Period:{},taskId:{}", item.getEntityCode(), item.getPeriod(),item.getTaskId());
logger.debug("exist and delete BalanceSheetPrc EntityCode:{},Period:{},taskId:{}", item.getEntityCode(), item.getPeriod(),item.getTaskId());
balanceSheetPrcMapper.deleteByExample(example);
}
logger.debug("insert BalanceSheetPrc EntityCode:{},Period:{},taskId:{}", item.getEntityCode(), item.getPeriod(),item.getTaskId());
......@@ -370,7 +370,7 @@ public class EbsApiServiceImpl implements EbsApiService {
//唯一则更新否则插入
ProfitLossStatement result = new ProfitLossStatement();
if (itemList.size() >0) {
logger.debug("exit and delete ProfitLossStatement EntityCode:{},Period:{},taskId:{}", item.getEntityCode(), item.getPeriod(),item.getTaskId());
logger.debug("exist and delete ProfitLossStatement EntityCode:{},Period:{},taskId:{}", item.getEntityCode(), item.getPeriod(),item.getTaskId());
profitLossStatementMapper.deleteByExample(example);
}
logger.debug("insert ProfitLossStatement EntityCode:{},Period:{},taskId:{}", item.getEntityCode(), item.getPeriod(),item.getTaskId());
......@@ -398,7 +398,7 @@ public class EbsApiServiceImpl implements EbsApiService {
//唯一则更新否则插入
ProfitLossStatementPrc result = new ProfitLossStatementPrc();
if (itemList.size() >0) {
logger.debug("exit and delete ProfitLossStatementPrc EntityCode:{},Period:{},taskId:{}", item.getEntityCode(), item.getPeriod(),item.getTaskId());
logger.debug("exist and delete ProfitLossStatementPrc EntityCode:{},Period:{},taskId:{}", item.getEntityCode(), item.getPeriod(),item.getTaskId());
profitLossStatementPrcMapper.deleteByExample(example);
}
logger.debug("insert ProfitLossStatementPrc EntityCode:{},Period:{},taskId:{}", item.getEntityCode(), item.getPeriod(),item.getTaskId());
......@@ -426,7 +426,7 @@ public class EbsApiServiceImpl implements EbsApiService {
//唯一则更新否则插入
OrganizationAccountingRate result = new OrganizationAccountingRate();
if (itemList.size() >0) {
logger.debug("exit and update OrganizationAccountingRate Period:{},taskId:{}", item.getPeriod(),item.getTaskId());
logger.debug("exist and update OrganizationAccountingRate Period:{},taskId:{}", item.getPeriod(),item.getTaskId());
result = itemList.get(0);
populateFieldsOAR(item, result);
result.setId(itemList.get(0).getId());
......
......@@ -10,6 +10,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert;
import org.springframework.web.multipart.MultipartFile;
import pwc.taxtech.atms.common.CommonUtils;
import pwc.taxtech.atms.common.POIUtil;
......@@ -399,6 +400,7 @@ public class TemplateGroupServiceImpl extends AbstractService {
List<PeriodDataSource> periodDataSourceList = Lists.newArrayList();
for (int r = sheet.getFirstRowNum(); r <= sheet.getLastRowNum(); r++) {
Row row = sheet.getRow(r);
Assert.notNull(row,"Excel 文档为空");
for (int c = row.getFirstCellNum(); c <= row.getLastCellNum(); c++) {
Cell cell = row.getCell(c);
if (cell == null) {
......
......@@ -145,6 +145,7 @@ public class FormulaAgent {
}
public static String buildSql(String tableName, String getField, String filter, String filterValue, Integer period, String year, FormulaContext formulaContext) {
/*
......@@ -159,13 +160,13 @@ public class FormulaAgent {
if (tableName.substring(0, 3).equals("cit")) {
try {
return _buildSql(getField, tableName, filter, filterValue, period, formulaContext, year, true);
return _buildSql(getField, tableName, filter, filterValue, period, formulaContext, year, true, false);
} catch (Exception e) {
e.printStackTrace();
}
}
try {
return _buildSql(getField, tableName, filter, filterValue, period, formulaContext, year, false);
return _buildSql(getField, tableName, filter, filterValue, period, formulaContext, year, false, false);
} catch (Exception e) {
e.printStackTrace();
}
......@@ -173,8 +174,15 @@ public class FormulaAgent {
}
public static String _buildSql(String getField, String tableName, String filter, String filterValue, Integer period, FormulaContext formulaContext, String year, boolean bool) throws Exception {
String sql = "select sum(" + getField + ") as " + getField + " from " + tableName + " where 1=1 and " + filter + filterValue;
public static String _buildSql(String getField, String tableName, String filter, String filterValue, Integer period, FormulaContext formulaContext, String year, boolean bool, boolean getSql) throws Exception {
String sql = "";
if(getSql){
sql = "select * from " + tableName + " where 1=1 and " + filter + filterValue;
return sql;
}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));
......@@ -210,15 +218,17 @@ 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);
}
}*/
public BigDecimal getTableDataByName(String tableName, String getField, String filter, String filterValue, Integer period, String year, FormulaContext formulaContext) {
Map<String, Object> stringObjectMap = jdbcTemplate.queryForMap(buildSql(TableRule.map.get(tableName), getField, filter, filterValue, period, year, formulaContext));
/* for (int i = 0, j = stringObjectMap.size(); i < j; i++) {
if (i == 1) {
......
......@@ -100,7 +100,6 @@ public class ReportGeneratorImpl {
Optional<PeriodTemplate> periodTemplate = resources.getPeriodTemplates().stream()
.filter(a -> a.getCode().equals(code))
.findFirst();
Long templateId;
if (periodTemplate.isPresent()) {
templateId = periodTemplate.get().getTemplateId();
......@@ -214,8 +213,6 @@ public class ReportGeneratorImpl {
} else {
cellData.setData(data);
}
if (StringUtils.isBlank(resultFormula)) {
resultFormula = " ";
}
......@@ -245,19 +242,17 @@ public class ReportGeneratorImpl {
cellDataSource.setUpdateTime(new Date());
cellDataSource.setPeriod(period);
cellDataSource.setProjectId(projectId);
SpringContextUtil.periodCellDataSourceMapper.insertSelective(cellDataSource);
}
periodCellDataMapper.insertSelective(cellData);
}
}
if (isMergeMunual) {
List<PeriodCellTemplateConfig> keyInCellTemplateConfigs = resources.getPeriodCellTemplateConfigs().stream()
.filter(a -> a.getReportTemplateId().equals(templateId) && a.getDataSourceType().equals(CellDataSourceType.KeyIn.getCode()))
.collect(Collectors.toList());
for (PeriodCellTemplateConfig keyInCellTemplateConfig : keyInCellTemplateConfigs) {
PeriodDataSourceExample dataSourceExample = new PeriodDataSourceExample();
dataSourceExample.createCriteria().andPeriodEqualTo(period).andProjectIdEqualTo(projectId)
......@@ -318,7 +313,6 @@ public class ReportGeneratorImpl {
} else {
logger.warn("should not be !!!");
}
}
}
......@@ -575,8 +569,7 @@ public class ReportGeneratorImpl {
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 TABLESUMIF(formulaContext), new SUM(formulaContext)};
new JFFS(formulaContext), new WPSR(formulaContext), new WPNAME(formulaContext), new WPTYPE(formulaContext), new SUM2(formulaContext), new RSUMIF(formulaContext), new SUM(formulaContext)};
UDFFinder udfs = new DefaultUDFFinder(functions, functionImpls);
UDFFinder udfToolpack = new AggregatingUDFFinder(udfs);
workbook.addToolPack(udfToolpack);
......
......@@ -763,6 +763,7 @@ public class ReportServiceImpl extends BaseService {
dataSourceDto.setColumnIndex(a.getColumnIndex());
dataSourceDto.setColumnName(a.getColumnName());
dataSourceDto.setReportTemplateId(a.getReportTemplateId().toString());
dataSourceDto.setRel_sql(a.getRelSql());
if (a.getType().equals(FormulaDataSourceType.Report.getCode())) {
if (a.getItems().size() == 0) {
......
......@@ -99,12 +99,20 @@ public class FunctionBase {
int period, Long templateGroupId, Integer colNumP, Integer rowNumP, String projectId) {
return saveDataSource(ec, dataSourceList, FormulaDataSourceType.Report, formulaDataSourceDetailType, val, period,
templateGroupId, colNumP, rowNumP, projectId);
templateGroupId, colNumP, rowNumP, projectId, null);
}
public Long saveDataRSUMIFSource(OperationEvaluationContext ec, List<Object> dataSourceList,
FormulaDataSourceDetailType formulaDataSourceDetailType, BigDecimal val,
int period, Long templateGroupId, Integer colNumP, Integer rowNumP, String projectId, FormulaDataSourceType type, String sql) {
return saveDataSource(ec, dataSourceList, type, formulaDataSourceDetailType, val, period,
templateGroupId, colNumP, rowNumP, projectId, sql);
}
public Long saveDataSource(OperationEvaluationContext ec, List<Object> dataSourceList, FormulaDataSourceType dataSourceType,
FormulaDataSourceDetailType formulaDataSourceDetailType, BigDecimal val,
int period, Long templateGroupId, Integer colNumP, Integer rowNumP, String projectId) {
int period, Long templateGroupId, Integer colNumP, Integer rowNumP, String projectId, String sql ) {
String reportCode = ec.getWorkbook().getSheetName(ec.getSheetIndex());
int colNum = ec.getColumnIndex();
int rowNum = ec.getRowIndex();
......@@ -137,6 +145,9 @@ public class FunctionBase {
dataSource.setCellTemplateId(periodCellTemplateId);
dataSource.setPeriod(period);
dataSource.setProjectId(projectId);
if(sql != null){
dataSource.setRelSql(sql);
}
SpringContextUtil.periodDataSourceMapper.insertSelective(dataSource);
if (CollectionUtils.isNotEmpty(dataSourceList)) {
for (Object obj : dataSourceList) {
......
......@@ -3,15 +3,17 @@ package pwc.taxtech.atms.vat.service.impl.report.functions;
import org.apache.poi.ss.formula.OperationEvaluationContext;
import org.apache.poi.ss.formula.eval.EvaluationException;
import org.apache.poi.ss.formula.eval.NumberEval;
import org.apache.poi.ss.formula.eval.StringEval;
import org.apache.poi.ss.formula.eval.ValueEval;
import org.apache.poi.ss.formula.functions.FreeRefFunction;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import pwc.taxtech.atms.dpo.CellTemplatePerGroupDto;
import pwc.taxtech.atms.constant.enums.FormulaDataSourceDetailType;
import pwc.taxtech.atms.constant.enums.FormulaDataSourceType;
import pwc.taxtech.atms.dto.TableRule;
import pwc.taxtech.atms.dto.vatdto.RSUMIFParasBo;
import pwc.taxtech.atms.dto.vatdto.ReportCellTableSUMIFDataSourceDto;
import pwc.taxtech.atms.exception.Exceptions;
import pwc.taxtech.atms.exception.FormulaException;
import pwc.taxtech.atms.vat.service.impl.FormulaAgent;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
......@@ -22,102 +24,99 @@ import static pwc.taxtech.atms.common.util.FormulaUtil.resolverString;
/**
* @ClassName RSUMIF
* Description TODO 公式还需要校验
* Description TODO
* @Author pwc kevin
* @Date 3/8/2019 5:21 PM
* @Date 3/11/2019 2:52 PM
* Version 1.0
**/
public class RSUMIF extends FunctionBase implements FreeRefFunction {
final static ValueEval defaultEval = new StringEval("0");
static final Logger LOGGER = LoggerFactory.getLogger(RSUMIF.class);
String tableName;
String getField;//取值列字段
Map<String, String> fileterMap = new HashMap<String, String>();
String year;
int period;
String selectPeriod = "";
String selectFilter = "";
Long result;
int argsLength;
int selectCount;
private String tableName;
Map<String, String> _map = TableRule.map;
public RSUMIF(FormulaContext formulaContext) {
super(formulaContext);
}
@Override
public ValueEval evaluate(ValueEval[] valueEvals, OperationEvaluationContext operationEvaluationContext) {
//进行参数验证
public void parameterCheck(ValueEval[] args, OperationEvaluationContext ec) {
argsLength = args.length;
if (argsLength != 6) //参数小于6当做异常处理, 最后俩参数可以取默认值
throw Exceptions.parameterError;
try {
return wrapExceptionEval(valueEvals, operationEvaluationContext);
} catch (Exception e) {
if (e instanceof FormulaException)
LOGGER.warn("Formula Exception || {}", e.getMessage());
e.printStackTrace();
return defaultEval;
}
}
tableName = resolverString(args, ec, 0);
public ValueEval wrapExceptionEval(ValueEval[] args, OperationEvaluationContext ec) throws Exception {
List<Object> ds = new ArrayList<>();
parameterCheck(args);
setWhere(args, ec);
List<CellTemplatePerGroupDto> tableData = null;
try {
tableData = agent.getTableData(tableName, getField, selectFilter, year, selectPeriod);
} catch (Exception e) {
if (!_map.containsKey(tableName))
throw Exceptions.parameterError;
} catch (EvaluationException e) {
e.printStackTrace();
throw new Exception("公式参数配置错误");
}
for (CellTemplatePerGroupDto cellTemplatePerGroupDto : tableData) {
result = result + Long.parseLong(cellTemplatePerGroupDto.getData());
}
return new NumberEval(result);
}
//进行参数验证
public void parameterCheck(ValueEval[] args) {
argsLength = args.length;
if (argsLength < 4) {//参数小于3当做异常处理, 最后俩参数可以取默认值
throw Exceptions.parameterError;
}
}
private void setWhere(ValueEval[] args, OperationEvaluationContext ec) {
Integer argsLength;
String getField;
Integer period;
String year;
@Override
public ValueEval evaluate(ValueEval[] args, OperationEvaluationContext ec) {
parameterCheck(args, ec);
BigDecimal cellValue = BigDecimal.ZERO;
List<Object> dataSource = new ArrayList<>();
Map map = new HashMap<String, String>();
ReportCellTableSUMIFDataSourceDto reportCellTableSUMIFDataSourceDto = new ReportCellTableSUMIFDataSourceDto();
reportCellTableSUMIFDataSourceDto.insertData(ec, formulaContext);
String filter = null;
String filterValue = null;
dataSource.add(reportCellTableSUMIFDataSourceDto);
try {
selectCount = (argsLength - 4) / 2;
tableName = resolverString(args, ec, 0);
getField = resolverString(args, ec, 1);
period = resolverInteger(args, ec, argsLength - 1);//会计期间
year = resolverString(args, ec, argsLength - 2);//会计年度
if (selectCount % 2 != 0)
throw Exceptions.parameterError;
for (int i = 3; i < selectCount * 2 + 3; i++) {
if (i % 2 != 0) {
fileterMap.put(resolverString(args, ec, i), resolverString(args, ec, i + 1));
}
filter= resolverString(args, ec, 2);
filterValue= resolverString(args, ec, 3);
period = resolverInteger(args, ec, 4);//会计期间
year = resolverString(args, ec, 5);//会计年度
cellValue = agent.getTableDataByName(tableName, getField, filter, filterValue, period, year, formulaContext);
return new NumberEval(cellValue.doubleValue());
} catch (EvaluationException e) {
e.printStackTrace();
return new NumberEval(0.00);
} finally {
boolean boo;
if(TableRule.map.get(tableName).substring(0, 3).equals("cit")){
boo = true;
}else{
boo = false;
}
if (period == 0) {
selectPeriod = "t.period = " + formulaContext.getPeriod();
} else if (period == -99) {
selectPeriod = "t.period between '0' and " + (formulaContext.getPeriod() - 1);
} else if (period == 99) {
selectPeriod = "t.period between '0' and " + (formulaContext.getPeriod() - 1);
} else {
selectPeriod = "t.period between " + (formulaContext.getPeriod() - period) + " and " + (formulaContext.getPeriod() - 1);
Long dataSourceId = null;
try {
dataSourceId = saveDataRSUMIFSource(ec, dataSource, FormulaDataSourceDetailType.ReportCellTableSUMIFDataSourceDto,
cellValue, formulaContext.getPeriod(),
formulaContext.getReportTemplateGroupId(), ec.getColumnIndex(), ec.getRowIndex(),
formulaContext.getProjectId(), selectShow(tableName), FormulaAgent._buildSql(getField,tableName,filter,filterValue,period,formulaContext,year, boo, true));
} catch (Exception e) {
e.printStackTrace();
}
for (Map.Entry<String, String> entry : fileterMap.entrySet()) {
if (selectFilter.equals("")) {
selectFilter = "t." + entry.getKey() + entry.getValue();
} else {
selectFilter = selectFilter + " and " + "t." + entry.getKey() + entry.getValue();
}
try {
saveFormulaBlock(formulaContext.getPeriod(), ec,
new RSUMIFParasBo().getExpression(args, ec), cellValue, dataSourceId, formulaContext.getProjectId());
} catch (EvaluationException e) {
e.printStackTrace();
}
} catch (EvaluationException e) {
e.printStackTrace();
}
}
//解决不同表结构关联不同的展示方式
public FormulaDataSourceType selectShow(String tableName) {
if ("CIT_TBAM".equals(tableName)) {
return FormulaDataSourceType.CIT_TBAM;
}
return null;
}
public static String getSql (){
return "";
}
}
package pwc.taxtech.atms.vat.service.impl.report.functions;
import org.apache.poi.ss.formula.OperationEvaluationContext;
import org.apache.poi.ss.formula.eval.EvaluationException;
import org.apache.poi.ss.formula.eval.NumberEval;
import org.apache.poi.ss.formula.eval.ValueEval;
import org.apache.poi.ss.formula.functions.FreeRefFunction;
import pwc.taxtech.atms.dto.TableRule;
import pwc.taxtech.atms.exception.Exceptions;
import java.util.Map;
import static pwc.taxtech.atms.common.util.FormulaUtil.resolverInteger;
import static pwc.taxtech.atms.common.util.FormulaUtil.resolverString;
/**
* @ClassName TABLESUMIF
* Description TODO
* @Author pwc kevin
* @Date 3/11/2019 2:52 PM
* Version 1.0
**/
public class TABLESUMIF extends FunctionBase implements FreeRefFunction {
private String tableName;
public TABLESUMIF(FormulaContext formulaContext) {
super(formulaContext);
}
//进行参数验证
public void parameterCheck(ValueEval[] args, OperationEvaluationContext ec) {
argsLength = args.length;
if (argsLength != 6) //参数小于6当做异常处理, 最后俩参数可以取默认值
throw Exceptions.parameterError;
try {
tableName = resolverString(args, ec, 0);
Map<String, String> map = TableRule.map;
if (!map.containsKey(tableName))
throw Exceptions.parameterError;
} catch (EvaluationException e) {
e.printStackTrace();
}
}
Integer argsLength;
String getField;
Integer period;
String year;
@Override
public ValueEval evaluate(ValueEval[] args, OperationEvaluationContext ec) {
parameterCheck(args, ec);
try {
tableName = resolverString(args, ec, 0);
getField = resolverString(args, ec, 1);
String filter = resolverString(args, ec, 2);
String filterValue =resolverString(args, ec, 3);
period = resolverInteger(args, ec, 4);//会计期间
year = resolverString(args, ec, 5);//会计年度
return new NumberEval(agent.getTableDataByName(tableName, getField,filter,filterValue, period, year, formulaContext).doubleValue());
} catch (EvaluationException e) {
e.printStackTrace();
return new NumberEval(0.00);
}
}
}
package pwc.taxtech.atms.vat.service.impl.report.functions;
import org.apache.poi.ss.formula.OperationEvaluationContext;
import org.apache.poi.ss.formula.eval.EvaluationException;
import org.apache.poi.ss.formula.eval.NumberEval;
import org.apache.poi.ss.formula.eval.StringEval;
import org.apache.poi.ss.formula.eval.ValueEval;
import org.apache.poi.ss.formula.functions.FreeRefFunction;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import pwc.taxtech.atms.dpo.CellTemplatePerGroupDto;
import pwc.taxtech.atms.exception.Exceptions;
import pwc.taxtech.atms.exception.FormulaException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static pwc.taxtech.atms.common.util.FormulaUtil.resolverInteger;
import static pwc.taxtech.atms.common.util.FormulaUtil.resolverString;
/**
* @ClassName _RSUMIF
* Description TODO 公式还需要校验
* @Author pwc kevin
* @Date 3/8/2019 5:21 PM
* Version 1.0
**/
public class _RSUMIF extends FunctionBase implements FreeRefFunction {
final static ValueEval defaultEval = new StringEval("0");
static final Logger LOGGER = LoggerFactory.getLogger(_RSUMIF.class);
String tableName;
String getField;//取值列字段
Map<String, String> fileterMap = new HashMap<String, String>();
String year;
int period;
String selectPeriod = "";
String selectFilter = "";
Long result;
int argsLength;
int selectCount;
public _RSUMIF(FormulaContext formulaContext) {
super(formulaContext);
}
@Override
public ValueEval evaluate(ValueEval[] valueEvals, OperationEvaluationContext operationEvaluationContext) {
try {
return wrapExceptionEval(valueEvals, operationEvaluationContext);
} catch (Exception e) {
if (e instanceof FormulaException)
LOGGER.warn("Formula Exception || {}", e.getMessage());
e.printStackTrace();
return defaultEval;
}
}
public ValueEval wrapExceptionEval(ValueEval[] args, OperationEvaluationContext ec) throws Exception {
List<Object> ds = new ArrayList<>();
parameterCheck(args);
setWhere(args, ec);
List<CellTemplatePerGroupDto> tableData = null;
try {
tableData = agent.getTableData(tableName, getField, selectFilter, year, selectPeriod);
} catch (Exception e) {
e.printStackTrace();
throw new Exception("公式参数配置错误");
}
for (CellTemplatePerGroupDto cellTemplatePerGroupDto : tableData) {
result = result + Long.parseLong(cellTemplatePerGroupDto.getData());
}
return new NumberEval(result);
}
//进行参数验证
public void parameterCheck(ValueEval[] args) {
argsLength = args.length;
if (argsLength < 4) {//参数小于3当做异常处理, 最后俩参数可以取默认值
throw Exceptions.parameterError;
}
}
private void setWhere(ValueEval[] args, OperationEvaluationContext ec) {
try {
selectCount = (argsLength - 4) / 2;
tableName = resolverString(args, ec, 0);
getField = resolverString(args, ec, 1);
period = resolverInteger(args, ec, argsLength - 1);//会计期间
year = resolverString(args, ec, argsLength - 2);//会计年度
if (selectCount % 2 != 0)
throw Exceptions.parameterError;
for (int i = 3; i < selectCount * 2 + 3; i++) {
if (i % 2 != 0) {
fileterMap.put(resolverString(args, ec, i), resolverString(args, ec, i + 1));
}
}
if (period == 0) {
selectPeriod = "t.period = " + formulaContext.getPeriod();
} else if (period == -99) {
selectPeriod = "t.period between '0' and " + (formulaContext.getPeriod() - 1);
} else if (period == 99) {
selectPeriod = "t.period between '0' and " + (formulaContext.getPeriod() - 1);
} else {
selectPeriod = "t.period between " + (formulaContext.getPeriod() - period) + " and " + (formulaContext.getPeriod() - 1);
}
for (Map.Entry<String, String> entry : fileterMap.entrySet()) {
if (selectFilter.equals("")) {
selectFilter = "t." + entry.getKey() + entry.getValue();
} else {
selectFilter = selectFilter + " and " + "t." + entry.getKey() + entry.getValue();
}
}
} catch (EvaluationException e) {
e.printStackTrace();
}
}
}
......@@ -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.CitTbamDto;
import pwc.taxtech.atms.entity.CitTbam;
import pwc.taxtech.atms.entity.CitTbamExample;
......@@ -113,4 +114,6 @@ public interface CitTbamMapper extends MyMapper {
* @return
*/
int insertBatch(List<CitTbam> citTbamList);
List<CitTbamDto> selectBySql(@Param("sql") String sql);
}
\ No newline at end of file
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 {
}
......@@ -20,6 +20,15 @@ public class PeriodDataSource implements Serializable {
* @mbg.generated
*/
private Long id;
private String relSql;
public String getRelSql() {
return relSql;
}
public void setRelSql(String relSql) {
this.relSql = relSql;
}
/**
*
......@@ -655,30 +664,27 @@ public class PeriodDataSource implements Serializable {
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", type=").append(type);
sb.append(", name=").append(name);
sb.append(", amount=").append(amount);
sb.append(", description=").append(description);
sb.append(", keyValueDataId=").append(keyValueDataId);
sb.append(", createBy=").append(createBy);
sb.append(", createTime=").append(createTime);
sb.append(", updateBy=").append(updateBy);
sb.append(", updateTime=").append(updateTime);
sb.append(", rowName=").append(rowName);
sb.append(", columnName=").append(columnName);
sb.append(", rowIndex=").append(rowIndex);
sb.append(", remapBatchId=").append(remapBatchId);
sb.append(", columnIndex=").append(columnIndex);
sb.append(", cellTemplateId=").append(cellTemplateId);
sb.append(", period=").append(period);
sb.append(", projectId=").append(projectId);
sb.append(", keyinData=").append(keyinData);
sb.append("]");
return sb.toString();
return "PeriodDataSource{" +
"id=" + id +
", relSql='" + relSql + '\'' +
", type=" + type +
", name='" + name + '\'' +
", amount=" + amount +
", description='" + description + '\'' +
", keyValueDataId='" + keyValueDataId + '\'' +
", createBy='" + createBy + '\'' +
", createTime=" + createTime +
", updateBy='" + updateBy + '\'' +
", updateTime=" + updateTime +
", rowName='" + rowName + '\'' +
", columnName='" + columnName + '\'' +
", rowIndex=" + rowIndex +
", remapBatchId='" + remapBatchId + '\'' +
", columnIndex=" + columnIndex +
", cellTemplateId=" + cellTemplateId +
", period=" + period +
", projectId='" + projectId + '\'' +
", keyinData='" + keyinData + '\'' +
'}';
}
}
\ No newline at end of file
......@@ -3,7 +3,7 @@
<mapper namespace="pwc.taxtech.atms.dao.CitAssetsListMapper">
<insert id="insertBatch" parameterType="java.util.List">
insert into balance_sheet_final
insert into assets_list
(<include refid="Base_Column_List"/>)
values
<foreach collection="list" item="item" index="index" separator=",">
......@@ -96,6 +96,10 @@
<when test="item.accountTotalDepreciationAmount != null">#{item.accountTotalDepreciationAmount,jdbcType=DECIMAL},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.taxDepreciationPeriod != null">#{item.taxDepreciationPeriod,jdbcType=INTEGER},</when>
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.taxToLastYearDepreciationPeriod != null">#{item.taxToLastYearDepreciationPeriod,jdbcType=INTEGER},</when>
<otherwise>0,</otherwise>
......
......@@ -109,6 +109,10 @@
<when test="item.gatheringCompanyAccount != null">#{item.gatheringCompanyAccount,jdbcType=VARCHAR},</when>
<otherwise>'',</otherwise>
</choose>
<choose>
<when test="item.remark != null">#{item.remark,jdbcType=VARCHAR},</when>
<otherwise>'',</otherwise>
</choose>
<choose>
<when test="item.createdBy != null">#{item.createdBy,jdbcType=VARCHAR},</when>
<otherwise>'',</otherwise>
......
......@@ -81,4 +81,10 @@
SELECT 1 FROM DUAL;
</insert>
<select id ="selectBySql" parameterType="java.lang.String" resultType="pwc.taxtech.atms.dpo.CitTbamDto">
<if test ="sql != null and sql != '' ">
${sql}
</if>
</select>
</mapper>
\ No newline at end of file
......@@ -231,7 +231,11 @@
<if test="keyinData != null">
keyin_data,
</if>
<if test="relSql != null">
rel_sql
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
......@@ -290,6 +294,9 @@
<if test="keyinData != null">
#{keyinData,jdbcType=VARCHAR},
</if>
<if test="relSql != null">
#{relSql,jdbcType=VARCHAR}
</if>
</trim>
</insert>
<select id="countByExample" parameterType="pwc.taxtech.atms.vat.entity.PeriodDataSourceExample" resultType="java.lang.Long">
......
......@@ -5,7 +5,7 @@
<sql id="QueryCondition">
1 = 1
<if test="@com.github.pagehelper.util.StringUtil@isNotEmpty(cfCondition.orgId)">
AND entity_code= #{cfCondition.orgId,jdbcType=VARCHAR}
AND organization_id= #{cfCondition.orgId,jdbcType=VARCHAR}
</if>
<if test="cfCondition.periodStart!=null">
AND tms_period &gt;= #{cfCondition.periodStart,jdbcType=INTEGER}
......
......@@ -245,6 +245,7 @@
<result column="CELL_TEMPLATE_ID" jdbcType="BIGINT" property="cellTemplateId"/>
<result column="CELL_DATA_ID" jdbcType="BIGINT" property="cellDataId"/>
<result column="REPORT_TEMPLATE_ID" jdbcType="BIGINT" property="reportTemplateId"/>
<result column="REL_SQL" jdbcType="VARCHAR" property="relSql"/>
</resultMap>
<select id="getFormulaDataSource" parameterType="java.lang.Long" resultMap="DataSourceExtendDtoMap">
......@@ -268,6 +269,7 @@
DS.period as PERIOD,
DS.project_id as PROJECT_ID,
DS.keyin_data as KEYIN_DATA,
DS.rel_sql as REL_SQL,
CDS.operation_type AS OPERATION_TYPE,
CD.cell_template_id AS CELL_TEMPLATE_ID,
CD.id AS CELL_DATA_ID,
......
......@@ -1047,7 +1047,7 @@ init-row="initRow" init-col="initCol" service-type="\'6\'" is-document-list="tru
$stateProvider.state({
name: 'cit.generateReport.reportView',
url: '/reportView?{id:string}&{templateid:string}&{name:string}&{templatecode:string}&{initrow:any}&{initcol:any}&{parentviewid:string}',
url: '/reportView?{id:string}&{templateid:string}&{name:string}&{templatecode:string}',
views: {
'@cit.generateReport': {
controller: ['$scope', '$stateParams', 'appTranslation',
......@@ -1056,13 +1056,9 @@ init-row="initRow" init-col="initCol" service-type="\'6\'" is-document-list="tru
$scope.templateId = $stateParams.templateid;
$scope.templateName = $stateParams.name;
$scope.templateCode = $stateParams.templatecode;
$scope.initRow = $stateParams.initrow;
$scope.initCol = $stateParams.initcol;
$scope.parentViewId = $stateParams.parentviewid;
appTranslation.load([appTranslation.cit]);
}],
template: '<vat-report-view report-id="reportId" template-id="templateId" template-name="templateName" template-code="templateCode" \
init-row="initRow" init-col="initCol" service-type="\'6\'" show-col="false" is-read-only="true" parent-view-id="parentViewId"></vat-report-view>',
template: '<cit-report-view report-id="reportId" template-id="templateId" template-name="templateName" template-code="templateCode" service-type="\'6\'"></cit-report-view>',
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.cit),
......
......@@ -59,21 +59,6 @@
projectId : projectId,
taxAccountCompare : 2
};
//分页的设置
debugger;
$scope.pagingOptions2 = {
pageIndex: 1, //当前页码
pageSize: constant.page.pageSizeArrary[3], //每页多少条数据
totalItems: $scope.citAssetsListDto.pageInfo.totalCount, //总数据
totalPages: 0,//总页数
pageSizeString: constant.page.pageSizeArrary[3].toString(),
firstPage: '<<', //$translate.instant('PagingFirstPage'),
previousPage: '<', //$translate.instant('PagingPreviousPage'),
nextPage:'>',// $translate.instant('PagingNextPage'),
lastPage: '>>', //$translate.instant('PagingLastPage'),
};
//赋值
$scope.pageOptions = $scope.pagingOptions2;
$scope.refreshAssetResultListGrid = function () {
debugger;
$log.debug("refreshAssetResultListGrid");
......@@ -123,6 +108,7 @@
//上传文件
var uploadfile = function (file) {
var url = uploadUrl;
if (file) {
......@@ -225,6 +211,7 @@
var token = $('input[name="__RequestVerificationToken"]').val();
// updateProgressToZero();
$('#busy-indicator-container').show();
Upload.upload({
url: uploadUrl,
data: {
......@@ -241,7 +228,7 @@
withCredentials: true
}, withCredentials: true
}).then(function(resp){
$('#busy-indicator-container').hide();
assetListService.getAssetGroupResultData(projectId).success(function (groupResultData) {
$scope.assetGroupResultDataSource = groupResultData.data;
});
......@@ -293,8 +280,7 @@
$scope.TotalTaxCurrentYearDepreciationAmount = PWC.round($scope.TotalTaxCurrentYearDepreciationAmount, 2);
$scope.TotalYearDifferenceAmount = PWC.round($scope.TotalYearDifferenceAmount, 2);
}
$scope.citAssetsListDto.pageInfo.totalCount = assetListData.data.total;
$scope.pagingOptions2.totalItems = assetListData.data.total;
$scope.pagingOptions.totalItems = assetListData.data.total;
});
}
......@@ -981,6 +967,19 @@
//开始
(function initialize() {
//分页的设置
debugger;
$scope.pagingOptions = {
pageIndex: 1, //当前页码
pageSize: constant.page.pageSizeArrary[3], //每页多少条数据
totalItems: 0, //总数据
totalPages: 0,//总页数
pageSizeString: constant.page.pageSizeArrary[3].toString(),
firstPage: '<<', //$translate.instant('PagingFirstPage'),
previousPage: '<', //$translate.instant('PagingPreviousPage'),
nextPage:'>',// $translate.instant('PagingNextPage'),
lastPage: '>>' //$translate.instant('PagingLastPage'),
};
/**************************************** function start*************************************************/
$scope.displayType = 2;
$scope.saveGroupType = 1;
......@@ -989,10 +988,12 @@
$scope.incomeInvoiceTotalColumns = [];
$scope.initIncomeInvoiceTotalColumnsIndex = [];
$scope.changeSheet = changeSheet;
debugger;
initColumns();
initDxGrid();
initAssetResultDxGrid();
getAssetResultList(1);
debugger;
getGroupList();
getGroupDetailList();
getUserPermission();
......
......@@ -144,10 +144,10 @@
</button>
</div>
</div>
<div class="page-footer">
<ack-pagination page-options="pagingOptions2"
refresh-table="refreshAssetResultListGrid()"></ack-pagination>
</div>
</div>
<div class="page-footer">
<ack-pagination page-options="pagingOptions"
refresh-table="refreshAssetResultListGrid()"></ack-pagination>
</div>
</div>
......
......@@ -13,12 +13,12 @@
<span ng-click="downloadJE()" style="position: relative; top: -61px; left: 95%;"><i class="fa fa-file-excel-o" aria-hidden="true"></i>{{'ExportBtn' | translate}}</span>
</div>
<div style="margin-bottom: 8px;margin-left: 30px">
{{'EnterpriseAccountSetName' | translate}}<span class="numAmount">{{ledgerName}}</span>&nbsp;&nbsp;&nbsp;
{{'EnterpriseAccountSetCurrency' | translate}}<span class="numAmount">{{currencyCode}}</span>&nbsp;&nbsp;&nbsp;
{{'IsCloseAccount' | translate}}<span class="numAmount">{{status}}</span>
{{'ImportTime' | translate}}<span class="numAmount">{{importDate| date:'yyyy-MM-dd hh:mm:ss'}}</span>
</div>
<!--<div style="margin-bottom: 8px;margin-left: 30px">-->
<!--{{'EnterpriseAccountSetName' | translate}}<span class="numAmount">{{ledgerName}}</span>&nbsp;&nbsp;&nbsp;-->
<!--{{'EnterpriseAccountSetCurrency' | translate}}<span class="numAmount">{{currencyCode}}</span>&nbsp;&nbsp;&nbsp;-->
<!--{{'IsCloseAccount' | translate}}<span class="numAmount">{{status}}</span>-->
<!--{{'ImportTime' | translate}}<span class="numAmount">{{importDate| date:'yyyy-MM-dd hh:mm:ss'}}</span>-->
<!--</div>-->
<div id="filterCriteriaDiv" style="max-width:98%;margin-bottom:2px;" ng-show="criteriaList.length>0">
<span class="text-bold margin-left20" translate="FilterCriteriaTags"></span>:
......
......@@ -13,12 +13,12 @@
<span ng-click="downloadJE()" style="position: relative; top: -61px; left: 95%;"><i class="fa fa-file-excel-o" aria-hidden="true"></i>{{'ExportBtn' | translate}}</span>
</div>
<div style="margin-bottom: 8px;margin-left: 30px">
{{'EnterpriseAccountSetName' | translate}}<span class="numAmount">{{ledgerName}}</span>&nbsp;&nbsp;&nbsp;
{{'EnterpriseAccountSetCurrency' | translate}}<span class="numAmount">{{currencyCode}}</span>&nbsp;&nbsp;&nbsp;
{{'IsCloseAccount' | translate}}<span class="numAmount">{{status}}</span>
{{'ImportTime' | translate}}<span class="numAmount">{{importDate| date:'yyyy-MM-dd hh:mm:ss'}}</span>
</div>
<!--<div style="margin-bottom: 8px;margin-left: 30px">-->
<!--{{'EnterpriseAccountSetName' | translate}}<span class="numAmount">{{ledgerName}}</span>&nbsp;&nbsp;&nbsp;-->
<!--{{'EnterpriseAccountSetCurrency' | translate}}<span class="numAmount">{{currencyCode}}</span>&nbsp;&nbsp;&nbsp;-->
<!--{{'IsCloseAccount' | translate}}<span class="numAmount">{{status}}</span>-->
<!--{{'ImportTime' | translate}}<span class="numAmount">{{importDate| date:'yyyy-MM-dd hh:mm:ss'}}</span>-->
<!--</div>-->
<div id="filterCriteriaDiv" style="max-width:98%;margin-bottom:2px;" ng-show="criteriaList.length>0">
<span class="text-bold margin-left20" translate="FilterCriteriaTags"></span>:
......
......@@ -13,12 +13,12 @@
<span ng-click="downloadJE()" style="position: relative; top: -61px; left: 95%;"><i class="fa fa-file-excel-o" aria-hidden="true"></i>{{'ExportBtn' | translate}}</span>
</div>
<div style="margin-bottom: 8px;margin-left: 30px">
{{'EnterpriseAccountSetName' | translate}}<span class="numAmount">{{ledgerName}}</span>&nbsp;&nbsp;&nbsp;
{{'EnterpriseAccountSetCurrency' | translate}}<span class="numAmount">{{currencyCode}}</span>&nbsp;&nbsp;&nbsp;
{{'IsCloseAccount' | translate}}<span class="numAmount">{{status}}</span>
{{'ImportTime' | translate}}<span class="numAmount">{{importDate| date:'yyyy-MM-dd hh:mm:ss'}}</span>
</div>
<!--<div style="margin-bottom: 8px;margin-left: 30px">-->
<!--{{'EnterpriseAccountSetName' | translate}}<span class="numAmount">{{ledgerName}}</span>&nbsp;&nbsp;&nbsp;-->
<!--{{'EnterpriseAccountSetCurrency' | translate}}<span class="numAmount">{{currencyCode}}</span>&nbsp;&nbsp;&nbsp;-->
<!--{{'IsCloseAccount' | translate}}<span class="numAmount">{{status}}</span>-->
<!--{{'ImportTime' | translate}}<span class="numAmount">{{importDate| date:'yyyy-MM-dd hh:mm:ss'}}</span>-->
<!--</div>-->
<div id="filterCriteriaDiv" style="max-width:98%;margin-bottom:2px;" ng-show="criteriaList.length>0">
<span class="text-bold margin-left20" translate="FilterCriteriaTags"></span>:
......
......@@ -212,9 +212,9 @@ debugger;
result[result.length - 1].items.forEach(function (t) { t.seqNo = result.length - 1 });
//数据校验
var reItem = [];
reItem.push( new task(Math.ceil(Math.random()*1000000).toString(), "unstarted","上期导入调整表是否等于本期调整日记账发生额(摘要中包含“调表不调账”关键字)", "DA004"));
result.push({ name: $translate.instant('dataValidate'),isReportTask: true, items : reItem});
// var reItem = [];
// reItem.push( new task(Math.ceil(Math.random()*1000000).toString(), "unstarted","上期导入调整表是否等于本期调整日记账发生额(摘要中包含“调表不调账”关键字)", "DA004"));
// result.push({ name: $translate.instant('dataValidate'),isReportTask: true, items : reItem});
fixedRef = [];
if (report && report.data && report.data.data) {
......@@ -578,6 +578,7 @@ debugger;
var tasks = JSON.parse(job.status);
debugger;
if(job.jobStatus == 'End'){
debugger;
items.forEach(function(item,index){
debugger;
item.status = 'completed';
......@@ -586,8 +587,8 @@ debugger;
$scope.tasks[0].items[0].status = 'completed';
$scope.tasks[0].items[0].text= $translate.instant('completed');
$scope.tasks[tasks.length-1].items[items.length-1].status = 'completed';
$scope.tasks[tasks.length-1].items[items.length-1].status.text = $translate.instant(_task.status);
// $scope.tasks[tasks.length-1].items[items.length-1].status = 'completed';
// $scope.tasks[tasks.length-1].items[items.length-1].status.text = $translate.instant(_task.status);
if($scope.timer){
$interval.cancel($scope.timer);
vatCommonService.setProjectStatus(vatSessionService.project.id, vatSessionService.month, constant.ProjectStatusEnum.Generated
......
......@@ -161,7 +161,7 @@
var firstSubNode = _.first(firstNode.children);
if(firstSubNode.id!==undefined) {
$scope.selectedTemplateId = firstSubNode.id;
$state.go('vat.generateReport.reportView', {
$state.go('cit.generateReport.reportView', {
id: firstSubNode.reportId,
templateid: firstSubNode.id,
name: firstSubNode.name,
......
citModule.directive('citReportView', ['$log', 'enums',
function ($log, enums) {
'use strict';
$log.debug('citReportView.ctor()...');
return {
restrict: 'E',
templateUrl: '/app/cit/report/cit-report-view/cit-report-view.html' + '?_=' + Math.random(),
scope: {
templateId: '=',
reportId: '=',
templateName:'=',
templateCode: '=',
isDocumentList: '=',
serviceType: '=',
initRow: '=?',
initCol: '=?',
instanceId: '='
},
controller: 'citReportViewController',
link: function ($scope, $ele, $attr) {
$ele.find("#tax-cell-detail").draggable({
scroll: true,
cancel: '#dataSourceGrid,.hand-input-container,.add-voucher-range-propover,.add-invoice,.tab-type,.dx-texteditor-input,input,.btn'
});
var saveFunc = $scope.$on('saveReportSheet', function (event, args) {
$scope.saveReportCache();
});
$scope.$on('$destroy', function () {
saveFunc();
});
}
};
}
]);
\ No newline at end of file
@import "~/app-resources/less/theme.less";
@color-red:#e20;
@color-gray:#939598-#222;
.cit-report-view {
height: calc(~"100% - 20px");
min-height: 500px;
margin: 10px 10px 10px 20px;
.report-container {
border: @thin-border solid @color-border;
height: calc(~"100% - 36px");
margin: 0;
width: 100%;
white-space: normal;
display: inline-block;
}
.row {
margin-left: 0px;
margin-bottom:10px;
&>span {
float: right;
margin-right: 15px;
cursor: pointer;
}
}
#addCertificatePop {
.modal-dialog {
width: 700px;
.add-certificate-pop-body {
height: 240px;
#add-certificate-grid {
height: 210px;
}
}
.modal-footer {
.template-1-button {
background-color: @color-red;
color: white;
margin-right:30px;
}
.template-2-button {
background-color: @color-gray;
color: white;
margin-right: 30px;
}
}
}
}
}
.model-report-approve-popup {
width: 400px;
height:500px;
position:fixed;
top:25%;
left:40%;
.modal-dialog {
width: 100%;
height: 90%;
margin: 20px auto;
.modal-content {
width: 100%;
.modal-body {
height: 90%;
}
}
}
}
.model-report-remarks-popup {
width: 400px;
height:500px;
position:fixed;
top:25%;
left:40%;
.modal-dialog {
width: 100%;
height: 90%;
margin: 20px auto;
.modal-content {
width: 100%;
.modal-body {
height: 90%;
}
}
}
}
......@@ -18,7 +18,6 @@
<label for="fileName" class="col-sm-3 control-label">{{'TemplateFile' | translate}}: </label>
<div class="col-sm-5">
<input class="form-control" type="text" name="fileName" ng-model="editModel.file.name" readonly placeholder="">
</input>
</div>
<div class="col-sm-2">
<button type="button" type="file" ngf-select ng-model="editModel.file" accept=".xls,.xlsx" ngf-change="getSheetList()" class="btn btn-secondary browse">{{'Browse' | translate }}</button>
......
......@@ -18,7 +18,7 @@
<form class="form-inline" id="navigationForm" name="navigationForm">
<div class="form-group" ng-style="setButtonWrapStyle()">
<div class="import-wrapper">chunkSize
<div class="import-wrapper">
<button type="button" atms-permission permission-code="{{$root.vatPermission.dataImport.balanceSheet.importCode}}"
ngf-select="" ng-model="fileNameWrapper" ngf-drag-over-class="'dragover'" accept=".xls,.xlsx" ngf-multiple="false"
ngf-allow-dir="false" class="btn btn-vat-third" style="margin-right:10px">
......
......@@ -1495,6 +1495,53 @@
{dataField: 'money', caption: 'Amount', alignment: 'center', width: '100%'},
];
break;
case enums.formulaDataSourceType.CIT_TBAM:
dataGridColumns = [
{
dataField: 'accountCode',
caption: $translate.instant('AccountCode'),
alignment: 'center',
},
{
dataField: 'accountDescription',
caption: $translate.instant('AccountName'),
alignment: 'left',
},
{
dataField: 'customerCode',
caption: $translate.instant('CustomerCode'),
alignment: 'left'
},
{
dataField: 'beginningBalance',
caption: $translate.instant('BegBal'),
alignment: 'left'
},
{
dataField: 'debitAmount',
caption: $translate.instant('DebitBal'),
alignment: 'left'
}
,
{
dataField: 'creditAmount',
caption: $translate.instant('CreditAmount'),
alignment: 'left'
}
,
{
dataField: 'endingBalance',
caption: $translate.instant('EndingBalance'),
alignment: 'left'
}
,
{
dataField: 'Attribute',
caption: $translate.instant('Attribute'),
alignment: 'left'
}
];
break;
}
return dataGridColumns;
};
......@@ -2161,6 +2208,11 @@
break;
case enums.formulaDataSourceType.InputInvoice:
$scope.detail.dataGridSourceBind = [$scope.detail.dataGridSource[0]];
break;case enums.formulaDataSourceType.InputInvoice:
$scope.detail.dataGridSourceBind = [$scope.detail.dataGridSource[0]];
break;
case enums.formulaDataSourceType.CIT_TBAM:
$scope.detail.dataGridSourceBind = getBlowGridData($scope.detail.dataGridSource[0]);
break;
default :
$scope.detail.dataGridSourceBind = $scope.detail.dataGridSource;
......@@ -2181,6 +2233,17 @@
}, 500);
});
var getBlowGridData = function( data){
cellCommentService.getCellInformation(data).success(function (res) {
if(res.resultMsg){
return res.data;
}
}).error(function (error) {
});
}
//当数据源数量变化是,重新排序数据源
$scope.$watch('detail.items.length', function (newVal, oldValue) {
......
......@@ -21,13 +21,11 @@
<!--<i ng-show="detail.hasModelError" class="fa fa-exclamation-circle red-color"></i>-->
<!--{{'ModelAnalysisResults' | translate}}</span>-->
<span ng-show="detail.validationErrorList && detail.validationErrorList.length > 0" ng-model="tabType"
uib-btn-radio="3">
<i class="fa fa-exclamation-circle red-color"></i>{{'ReportCheckResult' | translate}}</span>
uib-btn-radio="3"><i class="fa fa-exclamation-circle red-color"></i>{{'ReportCheckResult' | translate}}</span>
<span ng-model="tabType" uib-btn-radio="4">{{'cellComment'|translate}}</span>
<span ng-model="tabType" uib-btn-radio="5" ng-click = "loadAttach()">{{'RelatedAttach'|translate}}</span>
</div>
<div class="content-info" ng-show="tabType === 1">
<div class="cell-info-sammary">
<!-- <div class="tab tab-selected cell-info-title">{{'CellInfo' | translate}}</div> -->
......@@ -44,11 +42,11 @@
<label class="cell-info-subject-label">{{'ColumnName' | translate}}:</label>
{{detail.cellInfo.column}}
</div>
<!--<div class="cell-info-subject">
<div class="cell-info-subject">
<label class="cell-info-subject-label">{{'Formula' | translate}}</label>
<formula-translator formula-list="formulaList" key-value-list="keyValueList" include-optional="false"
account-data-source="accountDataSource" formula-exp="detail.config.formula"></formula-translator>
</div>-->
</div>
<div class="cell-info-subject">
<label class="cell-info-subject-label">{{'SourceOrFormula' | translate}}:</label>
{{detail.cellInfo.description}}
......@@ -121,6 +119,7 @@
<i class="material-icons add-icon">add_circle</i><a translate="AddDataSource"></a>
</div>
</div>
<div class="data-source-detail-container">
<!--数据源-->
<div class="income-data-source" ng-if="selectedDataSourceTabIndex === 1 && detail.cellType != 0">
......
......@@ -273,6 +273,9 @@
break;
case enums.formulaDataSourceType.InvoiceFilter:
break;
case enums.formulaDataSourceType.CIT_TBAM:
obj.relSql = sourceData.relSql;
}
if (sourceData.type === 0 && sourceData.dataSourceType === enums.cellDataSourceType.RelatedModel) {
......@@ -1023,7 +1026,6 @@
var html = $compile(report)($scope);
$('.export-container').append(html);
}
timeOutExportSpread(exportReportData);
});
return;
......
......@@ -439,8 +439,8 @@ commonModule.factory('enums', ['$translate', function ($translate) {
// 条件判断数据源
Judgment: 6,
//// Sap日报数据源
//SapDaily: 7,
//RUSUM公式数据源
SapDaily: 7,
//// 土地出让金数据源
//LandSell: 8,
......@@ -464,8 +464,9 @@ commonModule.factory('enums', ['$translate', function ($translate) {
// 用于存放特殊逻辑中获取的数据源数值与备注等信息,如未开票视同销售等
Special: 19,
BSPL: 20,
WPSR: 33
RSUMIF : 22,
WPSR: 33,
CIT_TBAM :50 //试算平衡表
},
......
......@@ -11,5 +11,8 @@ webservices.factory('cellCommentService', ['$http', 'apiConfig', function ($http
deleteCellComment: function (commentId) {
return $http.post('/CellComment/Delete/' + commentId, {}, apiConfig.createVat());
},
getCellInformation: function(data){
return $http.get('/CellComment/getCellInformation?sql=' + data.relSql, apiConfig.vat());
}
};
}]);
\ No newline at end of file
......@@ -5,7 +5,7 @@
console.log('dataImpLayoutctor');
return {
restrict: 'E',
templateUrl: '/app/dataImport/data-import-layout/data-import-layout..html' + '?_=' + Math.random(),
templateUrl: '/app/dataImport/data-import-layout/data-import-layout.html' + '?_=' + Math.random(),
replace: true,
scope: {
},
......
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