Commit d4cf5f97 authored by gary's avatar gary

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

parents 72475254 b75d1cec
......@@ -31,7 +31,7 @@ public class CitImportExcelController {
@RequestMapping(value = "/citImportExcel", method = RequestMethod.POST)
public @ResponseBody
OperationResultDto citImportExcel(@RequestParam MultipartFile file, @RequestParam String orgIds,
OperationResultDto citImportExcel(@RequestParam MultipartFile file, @RequestParam(required = false) String orgIds,
@RequestParam String periodDate,
@RequestParam Integer importType,
@RequestParam Integer importFileType){
......
......@@ -156,4 +156,17 @@ public class TemplateGroupController {
return OperationResultDto.error(ErrorMessage.SystemError);
}
@RequestMapping(value = "withoutTemplate", method = RequestMethod.POST)
public @ResponseBody OperationResultDto withoutTemplate(@RequestBody TemplateGroupDto templateGroupDto) {
try {
templateGroupService.addTemplateGroupWithoutTemplate(templateGroupDto);
return OperationResultDto.success();
} catch (ServiceException e) {
return OperationResultDto.error(e.getMessage());
} catch (Exception e) {
logger.error("withoutTemplate error.", e);
}
return OperationResultDto.error(ErrorMessage.SystemError);
}
}
......@@ -25,6 +25,7 @@ import java.math.BigDecimal;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
@Service
public class CitImportExcelServiceImpl extends BaseService {
......@@ -537,7 +538,7 @@ public class CitImportExcelServiceImpl extends BaseService {
List<CitDataImportLog> citDataImportLogList = new ArrayList<>();
// Integer period = CitCommonUtil.getPeriod();
String companyName = CitCommonUtil.getValue(sheet.getRow(5).getCell(1)).toString();
List<Organization> organizations = getOrganizationByName(companyName);
List<Organization> organizations = getOrganizationByName(companyName).stream().filter(r->r.getCode()!=null&&!("".equals(r.getCode()))).collect(Collectors.toList());
String companyCode = "";
String orgId = "";
String taxPayerId = "";
......@@ -547,6 +548,7 @@ public class CitImportExcelServiceImpl extends BaseService {
if(!orgList.contains(orgId)){
saveResult.setResult(false);
saveResult.setData(false);
saveResult.setResultMsg(ErrorMessageCN.DoNotSelectCompany);
return saveResult;
}
......@@ -556,6 +558,7 @@ public class CitImportExcelServiceImpl extends BaseService {
}else{
saveResult.setResult(false);
saveResult.setData(false);
saveResult.setResultMsg(ErrorMessageCN.NoCompanyError);
return saveResult;
}
......@@ -592,7 +595,6 @@ public class CitImportExcelServiceImpl extends BaseService {
citDataImportLogList.add(citDataImportLogError);
continue;
}
System.out.println(cellValue);
citBSPrcAdjust.setBegBal(new BigDecimal(cellValue.toString().replace(",","")));
......@@ -888,7 +890,7 @@ public class CitImportExcelServiceImpl extends BaseService {
citDataImportLogList.add(citDataImportLogError);
continue;
}
String companyCode = cellValueCode.toString();
String companyCode = cellValueCode.toString().replace(".0","");
//根据code(主体)获取机构相关信息
List<Organization> organizations = getOrganizationByCode(companyCode);
String companyName = "";
......@@ -969,7 +971,9 @@ public class CitImportExcelServiceImpl extends BaseService {
citSalaryAdvanceMapper.deleteByExample(example);
updateImportLog(EnumCitImportType.SalaryAdvance.getCode());
}
if(citSalaryAdvanceList.size()>0){
int insertBatchNum = citSalaryAdvanceMapper.insertBatch(citSalaryAdvanceList);
}
//循环遍历成功导入的数据,组装日志记录实体并放入集合
for (Map.Entry<String, Integer> entry : companySuccessMap.entrySet()) {
......
......@@ -9,9 +9,10 @@ import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.common.util.BeanUtil;
import pwc.taxtech.atms.dao.OrganizationAccountingRateMapper;
import pwc.taxtech.atms.dao.OrganizationMapper;
import pwc.taxtech.atms.dao.ProjectMapper;
import pwc.taxtech.atms.dto.ebsdto.*;
import pwc.taxtech.atms.entity.OrganizationAccountingRate;
import pwc.taxtech.atms.entity.OrganizationAccountingRateExample;
import pwc.taxtech.atms.entity.*;
import pwc.taxtech.atms.service.EbsApiService;
import pwc.taxtech.atms.vat.dao.*;
import pwc.taxtech.atms.vat.entity.*;
......@@ -39,6 +40,10 @@ public class EbsApiServiceImpl implements EbsApiService {
@Resource
private OrganizationAccountingRateMapper organizationAccountingRateMapper;
@Resource
private OrganizationMapper organizationMapper;
@Resource
private ProjectMapper projectMapper;
@Resource
private DistributedIdService distributedIdService;
@Resource
private BeanUtil beanUtil;
......@@ -230,7 +235,10 @@ public class EbsApiServiceImpl implements EbsApiService {
private void processTB(TrialBalanceQueryDto item) {
TrialBalanceExample example = new TrialBalanceExample();
example.createCriteria().andOrganizationIdEqualTo(item.getOrganizationId()).andPeriodEqualTo(item.getPeriod());
//修改期间
item.setPeriod(convertPeriod(item.getPeriod()));
//机构编码和期间
example.createCriteria().andSegment1EqualTo(item.getSegment1()).andPeriodEqualTo(item.getPeriod());
List<TrialBalance> itemList = trialBalanceMapper.selectByExample(example);
//唯一则更新否则插入
TrialBalance result = new TrialBalance();
......@@ -253,7 +261,10 @@ public class EbsApiServiceImpl implements EbsApiService {
private void processCF(CashFlowQueryDto item) {
CashFlowExample example = new CashFlowExample();
example.createCriteria().andOrganizationIdEqualTo(item.getOrganizationId()).andPeriodEqualTo(item.getPeriod());
//修改期间
item.setPeriod(convertPeriod(item.getPeriod()));
//机构编码和期间
example.createCriteria().andEntityCodeEqualTo(item.getEntityCode()).andPeriodEqualTo(item.getPeriod());
List<CashFlow> itemList = cashFlowMapper.selectByExample(example);
//唯一则更新否则插入
CashFlow result = new CashFlow();
......@@ -275,7 +286,10 @@ public class EbsApiServiceImpl implements EbsApiService {
private void processBS(BalanceSheetQueryDto item) {
BalanceSheetExample example = new BalanceSheetExample();
example.createCriteria().andOrganizationIdEqualTo(item.getOrganizationId()).andPeriodEqualTo(item.getPeriod());
//修改期间
item.setPeriod(convertPeriod(item.getPeriod()));
//机构编码和期间
example.createCriteria().andEntityCodeEqualTo(item.getEntityCode()).andPeriodEqualTo(item.getPeriod());
List<BalanceSheet> itemList = balanceSheetMapper.selectByExample(example);
//唯一则更新否则插入
BalanceSheet result = new BalanceSheet();
......@@ -295,9 +309,13 @@ public class EbsApiServiceImpl implements EbsApiService {
}
}
private void processBSprc(BalanceSheetPrcQueryDto item) {
BalanceSheetExample example = new BalanceSheetExample();
example.createCriteria().andOrganizationIdEqualTo(item.getOrganizationId()).andPeriodEqualTo(item.getPeriod());
//修改期间
item.setPeriod(convertPeriod(item.getPeriod()));
//机构编码和期间
example.createCriteria().andEntityCodeEqualTo(item.getEntityCode()).andPeriodEqualTo(item.getPeriod());
List<BalanceSheet> itemList = balanceSheetMapper.selectByExample(example);
//唯一则更新否则插入
BalanceSheet result = new BalanceSheet();
......@@ -319,7 +337,10 @@ public class EbsApiServiceImpl implements EbsApiService {
private void processPL(ProfitLossStatementQueryDto item) {
ProfitLossStatementExample example = new ProfitLossStatementExample();
example.createCriteria().andOrganizationIdEqualTo(item.getOrganizationId()).andPeriodEqualTo(item.getPeriod());
//修改期间
item.setPeriod(convertPeriod(item.getPeriod()));
//机构编码和期间
example.createCriteria().andEntityCodeEqualTo(item.getEntityCode()).andPeriodEqualTo(item.getPeriod());
List<ProfitLossStatement> itemList = profitLossStatementMapper.selectByExample(example);
//唯一则更新否则插入
ProfitLossStatement result = new ProfitLossStatement();
......@@ -341,7 +362,10 @@ public class EbsApiServiceImpl implements EbsApiService {
private void processPLprc(ProfitLossStatementPrcQueryDto item) {
ProfitLossStatementExample example = new ProfitLossStatementExample();
example.createCriteria().andOrganizationIdEqualTo(item.getOrganizationId()).andPeriodEqualTo(item.getPeriod());
//修改期间
item.setPeriod(convertPeriod(item.getPeriod()));
//机构编码和期间
example.createCriteria().andEntityCodeEqualTo(item.getEntityCode()).andPeriodEqualTo(item.getPeriod());
List<ProfitLossStatement> itemList = profitLossStatementMapper.selectByExample(example);
//唯一则更新否则插入
ProfitLossStatement result = new ProfitLossStatement();
......@@ -363,7 +387,11 @@ public class EbsApiServiceImpl implements EbsApiService {
private void processOAR(OrganizationAccountingRateQueryDto item) {
OrganizationAccountingRateExample example = new OrganizationAccountingRateExample();
example.createCriteria().andOrganizationIdEqualTo(item.getOrganizationId()).andPeriodEqualTo(item.getPeriod());
//修改期间
item.setPeriod(convertPeriod(item.getPeriod()));
//TODO 汇率表更新依据未知
//期间
example.createCriteria().andPeriodEqualTo(item.getPeriod());
List<OrganizationAccountingRate> itemList = organizationAccountingRateMapper.selectByExample(example);
//唯一则更新否则插入
OrganizationAccountingRate result = new OrganizationAccountingRate();
......@@ -386,8 +414,8 @@ public class EbsApiServiceImpl implements EbsApiService {
private void populateFieldsJE(JournalEntryQueryDto item, JournalEntry result) {
beanUtil.copyProperties(item, result);
result.setOrganizationId(trimLimit(item.getOrganizationId(), 128));
result.setProjectId(trimLimit(item.getProjectId(), 128));
result.setOrganizationId(getOrganizationByEbsCode(item.getSegment1()).getId());
result.setProjectId(getProjectByEbsCodeAndPeriod(item.getSegment1(),item.getPeriod()).getId());
result.setDate(item.getDate());
result.setSource(trimLimit(item.getSource(), 20));
result.setLedgerId(trimLimit(item.getLedgerId(), 128));
......@@ -463,8 +491,8 @@ public class EbsApiServiceImpl implements EbsApiService {
private void populateFieldsTB(TrialBalanceQueryDto item, TrialBalance result) {
beanUtil.copyProperties(item, result);
result.setOrganizationId(trimLimit(item.getOrganizationId(), 128));
result.setProjectId(trimLimit(item.getProjectId(), 128));
result.setOrganizationId(getOrganizationByEbsCode(item.getSegment1()).getId());
result.setProjectId(getProjectByEbsCodeAndPeriod(item.getSegment1(),item.getPeriod()).getId());
result.setDate(item.getDate());
result.setSource(trimLimit(item.getSource(), 20));
result.setLedgerId(trimLimit(item.getLedgerId(), 128));
......@@ -551,7 +579,8 @@ public class EbsApiServiceImpl implements EbsApiService {
private void populateFieldsCF(CashFlowQueryDto item, CashFlow result) {
beanUtil.copyProperties(item, result);
result.setOrganizationId(trimLimit(item.getOrganizationId(), 128));
result.setOrganizationId(getOrganizationByEbsCode(item.getEntityCode()).getId());
result.setProjectId(getProjectByEbsCodeAndPeriod(item.getEntityCode(),item.getPeriod()).getId());
result.setDate(item.getDate());
result.setSource(trimLimit(item.getSource(), 128));
result.setTmsPeriod(item.getTmsPeriod());
......@@ -578,8 +607,8 @@ public class EbsApiServiceImpl implements EbsApiService {
private void populateFieldsBS(BalanceSheetQueryDto item, BalanceSheet result) {
beanUtil.copyProperties(item, result);
result.setOrganizationId(trimLimit(item.getOrganizationId(), 128));
result.setProjectId(trimLimit(item.getProjectId(), 128));
result.setOrganizationId(getOrganizationByEbsCode(item.getEntityCode()).getId());
result.setProjectId(getProjectByEbsCodeAndPeriod(item.getEntityCode(),item.getPeriod()).getId());
result.setDate(item.getDate());
result.setSource(trimLimit(item.getSource(), 20));
result.setTmsPeriod(item.getTmsPeriod());
......@@ -606,8 +635,8 @@ public class EbsApiServiceImpl implements EbsApiService {
private void populateFieldsBSprc(BalanceSheetPrcQueryDto item, BalanceSheet result) {
beanUtil.copyProperties(item, result);
result.setOrganizationId(trimLimit(item.getOrganizationId(), 128));
result.setProjectId(trimLimit(item.getProjectId(), 128));
result.setOrganizationId(getOrganizationByEbsCode(item.getEntityCode()).getId());
result.setProjectId(getProjectByEbsCodeAndPeriod(item.getEntityCode(),item.getPeriod()).getId());
result.setDate(item.getDate());
result.setSource(trimLimit(item.getSource(), 20));
result.setTmsPeriod(item.getTmsPeriod());
......@@ -634,8 +663,8 @@ public class EbsApiServiceImpl implements EbsApiService {
private void populateFieldsPLS(ProfitLossStatementQueryDto item, ProfitLossStatement result) {
beanUtil.copyProperties(item, result);
result.setOrganizationId(trimLimit(item.getOrganizationId(), 128));
result.setProjectId(trimLimit(item.getProjectId(), 128));
result.setOrganizationId(getOrganizationByEbsCode(item.getEntityCode()).getId());
result.setProjectId(getProjectByEbsCodeAndPeriod(item.getEntityCode(),item.getPeriod()).getId());
result.setDate(item.getDate());
result.setSource(trimLimit(item.getSource(), 20));
result.setTmsPeriod(item.getTmsPeriod());
......@@ -662,8 +691,8 @@ public class EbsApiServiceImpl implements EbsApiService {
private void populateFieldsPLSprc(ProfitLossStatementPrcQueryDto item, ProfitLossStatement result) {
beanUtil.copyProperties(item, result);
result.setOrganizationId(trimLimit(item.getOrganizationId(), 128));
result.setProjectId(trimLimit(item.getProjectId(), 128));
result.setOrganizationId(getOrganizationByEbsCode(item.getEntityCode()).getId());
result.setProjectId(getProjectByEbsCodeAndPeriod(item.getEntityCode(),item.getPeriod()).getId());
result.setDate(item.getDate());
result.setSource(trimLimit(item.getSource(), 20));
result.setTmsPeriod(item.getTmsPeriod());
......@@ -690,7 +719,7 @@ public class EbsApiServiceImpl implements EbsApiService {
private void populateFieldsOAR(OrganizationAccountingRateQueryDto item, OrganizationAccountingRate result) {
beanUtil.copyProperties(item, result);
result.setOrganizationId(trimLimit(item.getOrganizationId(), 128));
result.setOrganizationId("");
result.setPeriod(item.getPeriod());
result.setConvertionType(trimLimit(item.getConvertionType(), 100));
result.setCurrencyFrom(trimLimit(item.getCurrencyFrom(), 10));
......@@ -700,6 +729,50 @@ public class EbsApiServiceImpl implements EbsApiService {
result.setUpdateTime(new Date());
}
/**对拓展字段进行查询赋值
* 根据Ebs返回的数据机构编码查询到具体机构
* @param code
* @return
*/
private Organization getOrganizationByEbsCode(String code){
OrganizationExample example=new OrganizationExample();
example.createCriteria().andCodeEqualTo(code);
List<Organization> list=organizationMapper.selectByExample(example);
if(list.size()>0){
return list.get(0);
}
return new Organization();
}
/**
* *对拓展字段进行查询赋值
* 根据Ebs返回的数据机构编码和期间查询到具体机构,期间到年yyyy=period/100
* @param code
* @param period
* @return
*/
private Project getProjectByEbsCodeAndPeriod(String code,Integer period){
ProjectExample example=new ProjectExample();
example.createCriteria().andCodeEqualTo(code).andYearEqualTo(period);
List<Project> list=projectMapper.selectByExample(example);
if(list.size()>0){
return list.get(0);
}
return new Project();
}
/**
* 期间格式转换yyyy13均改为yyyy12
* @param period
* @return
*/
private Integer convertPeriod(Integer period){
if(period%100==13){
period--;
}
return period;
}
/**
* Trim字符串,并限定字符串的长度. 如果是输入值是空指针,会返回空字符串
*/
......
......@@ -38,10 +38,8 @@ import pwc.taxtech.atms.entity.TemplateGroup;
import pwc.taxtech.atms.entity.TemplateGroupExample;
import pwc.taxtech.atms.exception.ServiceException;
import pwc.taxtech.atms.vat.dao.PeriodDataSourceMapper;
import pwc.taxtech.atms.vat.entity.PeriodCellData;
import pwc.taxtech.atms.vat.entity.PeriodDataSource;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.math.BigDecimal;
......@@ -527,6 +525,28 @@ public class TemplateGroupServiceImpl extends AbstractService {
}
@Transactional
public void addTemplateGroupWithoutTemplate(TemplateGroupDto templateGroupDto) throws ServiceException {
List<TemplateGroup> groupList = templateGroupDao.getByGroupName(templateGroupDto.getName());
if (CollectionUtils.isNotEmpty(groupList)) {
throw new ServiceException(TemplateMessage.TemplateGroupNameExist);
}
try {
TemplateGroup templateGroup=new TemplateGroup();
CommonUtils.copyProperties(templateGroupDto,templateGroup);
Long newGroupId = distributedIdService.nextId();
Date now = new Date();
templateGroup.setId(newGroupId);
templateGroup.setCreateTime(now);
templateGroup.setUpdateTime(now);
templateGroup.setName(templateGroupDto.getName());
templateGroupMapper.insertSelective(templateGroup);
} catch (Exception e) {
logger.error("addTemplateGroupWithoutTemplate error.", e);
throw new ServiceException(ErrorMessage.SystemError);
}
}
private List<CellTemplateConfig> getByTemplateId(Long id) {
CellTemplateConfigExample example = new CellTemplateConfigExample();
CellTemplateConfigExample.Criteria criteria = example.createCriteria();
......
package pwc.taxtech.atms.service.impl;
import com.alibaba.fastjson.JSON;
import org.junit.Test;
import pwc.taxtech.atms.CommonIT;
import pwc.taxtech.atms.dto.ebsdto.JournalEntryQueryDto;
import pwc.taxtech.atms.dto.ebsdto.*;
import pwc.taxtech.atms.service.EbsApiService;
import javax.annotation.Resource;
......@@ -25,67 +27,271 @@ public class EbsApiServiceImplTest extends CommonIT {
journalEntryQueryDto.setOrganizationId("44250A49-F3EF-4A1E-89E0-165BB89A94D0");
journalEntryQueryDto.setProjectId("44250A49-F3EF-4A1E-89E0-165BB89A94D0");
journalEntryQueryDto.setDate(new Date());
journalEntryQueryDto.setSource("这是哪里"+i);
journalEntryQueryDto.setLedgerId("我关联谁"+i);
journalEntryQueryDto.setLedgerName("我是谁"+i);
journalEntryQueryDto.setCurrencyCode("123"+i);
journalEntryQueryDto.setStatus("1");
journalEntryQueryDto.setHeaderId("123456789");
journalEntryQueryDto.setLineNum("1");
journalEntryQueryDto.setApprovalStatus("1");
journalEntryQueryDto.setPostedStatus("1");
journalEntryQueryDto.setPeriod(0);
journalEntryQueryDto.setSource("来源");
journalEntryQueryDto.setLedgerId("账套ID");
journalEntryQueryDto.setLedgerName("账套名称");
journalEntryQueryDto.setCurrencyCode("账套币种");
journalEntryQueryDto.setStatus("关账标识");
journalEntryQueryDto.setHeaderId("日记账头ID");
journalEntryQueryDto.setLineNum("日记账行号");
journalEntryQueryDto.setApprovalStatus("审批状态");
journalEntryQueryDto.setPostedStatus("过账");
journalEntryQueryDto.setPeriod(20180102+i);
journalEntryQueryDto.setAccountingDate(new Date());
journalEntryQueryDto.setJournalSource("setJournalSource");
journalEntryQueryDto.setCategory("setCategory");
journalEntryQueryDto.setName("setName");
journalEntryQueryDto.setVoucherNum("setVoucherNum");
journalEntryQueryDto.setDescription("setDescription");
journalEntryQueryDto.setSegment1("setSegment1");
journalEntryQueryDto.setSegment2("setSegment2");
journalEntryQueryDto.setSegment3("");
journalEntryQueryDto.setSegment4("");
journalEntryQueryDto.setSegment5("");
journalEntryQueryDto.setSegment6("");
journalEntryQueryDto.setSegment7("");
journalEntryQueryDto.setSegment8("");
journalEntryQueryDto.setSegment9("");
journalEntryQueryDto.setSegment10("");
journalEntryQueryDto.setSegment1Name("");
journalEntryQueryDto.setSegment2Name("");
journalEntryQueryDto.setSegment3Name("");
journalEntryQueryDto.setSegment4Name("");
journalEntryQueryDto.setSegment5Name("");
journalEntryQueryDto.setSegment6Name("");
journalEntryQueryDto.setSegment7Name("");
journalEntryQueryDto.setSegment8Name("");
journalEntryQueryDto.setSegment9Name("");
journalEntryQueryDto.setSegment10Name("");
journalEntryQueryDto.setJournalCurrencyCode("");
journalEntryQueryDto.setSobCurrencyCode("");
journalEntryQueryDto.setAccountedDr(new BigDecimal("0"));
journalEntryQueryDto.setAccountedCr(new BigDecimal("0"));
journalEntryQueryDto.setEnteredDr(new BigDecimal("0"));
journalEntryQueryDto.setEnteredCr(new BigDecimal("0"));
journalEntryQueryDto.setCfItem("");
journalEntryQueryDto.setAttribute1("");
journalEntryQueryDto.setJournalSource("日记账来源");
journalEntryQueryDto.setCategory("日记账类别");
journalEntryQueryDto.setName("日记账名称");
journalEntryQueryDto.setVoucherNum("凭证编号");
journalEntryQueryDto.setDescription("摘要");
journalEntryQueryDto.setSegment1("主体代码");
journalEntryQueryDto.setSegment2("成本中心");
journalEntryQueryDto.setSegment3("科目代码");
journalEntryQueryDto.setSegment4("辅助科目");
journalEntryQueryDto.setSegment5("利润中心");
journalEntryQueryDto.setSegment6("产品");
journalEntryQueryDto.setSegment7("项目");
journalEntryQueryDto.setSegment8("公司间");
journalEntryQueryDto.setSegment9("备用1");
journalEntryQueryDto.setSegment10("备用2");
journalEntryQueryDto.setSegment1Name("主体说明");
journalEntryQueryDto.setSegment2Name("成本中心说明");
journalEntryQueryDto.setSegment3Name("科目说明");
journalEntryQueryDto.setSegment4Name("辅助科目说明");
journalEntryQueryDto.setSegment5Name("利润中心说明");
journalEntryQueryDto.setSegment6Name("产品说明");
journalEntryQueryDto.setSegment7Name("项目说明");
journalEntryQueryDto.setSegment8Name("公司间说明");
journalEntryQueryDto.setSegment9Name("备用1说明");
journalEntryQueryDto.setSegment10Name("备用2说明");
journalEntryQueryDto.setJournalCurrencyCode("币种");
journalEntryQueryDto.setSobCurrencyCode("本位币币种");
journalEntryQueryDto.setAccountedDr(new BigDecimal("123"));
journalEntryQueryDto.setAccountedCr(new BigDecimal("120.2"));
journalEntryQueryDto.setEnteredDr(new BigDecimal("1231.0231"));
journalEntryQueryDto.setEnteredCr(new BigDecimal("120.122"));
journalEntryQueryDto.setCfItem("现金流量表项");
journalEntryQueryDto.setAttribute1("城市");
journalEntryQueryDto.setAttribute2(new Date());
journalEntryQueryDto.setAttribute3("");
journalEntryQueryDto.setAttribute4("");
journalEntryQueryDto.setAttribute5("");
journalEntryQueryDto.setAttribute6("");
journalEntryQueryDto.setAttribute7("");
journalEntryQueryDto.setAttribute8("");
journalEntryQueryDto.setAttribute9("");
journalEntryQueryDto.setAttribute10("");
journalEntryQueryDto.setAttribute11("");
journalEntryQueryDto.setAttribute12("");
journalEntryQueryDto.setAttribute13("");
journalEntryQueryDto.setAttribute14("");
journalEntryQueryDto.setAttribute15("");
journalEntryQueryDto.setAttribute16("");
journalEntryQueryDto.setAttribute3("对方银行账号");
journalEntryQueryDto.setAttribute4("银行流水号");
journalEntryQueryDto.setAttribute5("供应商编号");
journalEntryQueryDto.setAttribute6("交易单号");
journalEntryQueryDto.setAttribute7("供应商名称");
journalEntryQueryDto.setAttribute8("接收编码");
journalEntryQueryDto.setAttribute9("制单人");
journalEntryQueryDto.setAttribute10("审核人");
journalEntryQueryDto.setAttribute11("成本中心部门描述1");
journalEntryQueryDto.setAttribute12("成本中心部门描述2");
journalEntryQueryDto.setAttribute13("成本中心部门描述3");
journalEntryQueryDto.setAttribute14("成本中心部门描述4");
journalEntryQueryDto.setAttribute15("成本中心部门描述5");
journalEntryQueryDto.setAttribute16("成本中心部门描述6");
items.add(journalEntryQueryDto);
}
ebsApiService.queryRemoteServerThenUpdateJE(items);
String a=JSON.toJSONString(items);
System.out.println(a);
//ebsApiService.queryRemoteServerThenUpdateJE(items);
}
@Test
public void queryRemoteServerThenUpdateTB() {
List<TrialBalanceQueryDto> items=new ArrayList<>();
for(int i=0;i<2;i++) {
TrialBalanceQueryDto result = new TrialBalanceQueryDto();
result.setDate(new Date());
result.setSource("来源");
result.setPeriod(201803);
result.setLedgerId("账套ID");
result.setLedgerName("账套名称");
result.setCurrencyCode("账套币种");
result.setStatus("关账标识");
result.setCategory("主体性质");
result.setAccountCategory("科目性质");
result.setAcctCode1("一级科目代码");
result.setAcctName1("一级科目说明");
result.setAcctName2("二级科目说明");
result.setAcctName3("三级科目说明");
result.setSegment1("主体代码");
result.setSegment2("成本中心代码");
result.setSegment3("科目代码");
result.setSegment4("辅助科目代码");
result.setSegment5("利润中心代码");
result.setSegment6("产品代码");
result.setSegment7("项目代码");
result.setSegment8("公司间代码");
result.setSegment9("备用1代码");
result.setSegment10("备用2代码");
result.setSegment1Name("主体说明");
result.setSegment2Name("成本中心说明");
result.setSegment3Name("科目说明");
result.setSegment4Name("辅助科目说明");
result.setSegment5Name("利润中心说明");
result.setSegment6Name("产品说明");
result.setSegment7Name("项目说明");
result.setSegment8Name("公司间说明");
result.setSegment9Name("备用1说明");
result.setSegment10Name("备用2说明");
result.setBegBal(new BigDecimal("110"));
result.setPeriodDr(new BigDecimal("110"));
result.setPeriodCr(new BigDecimal("110"));
result.setEndBal(new BigDecimal("110"));
result.setQtdDr(new BigDecimal("110"));
result.setQtdCr(new BigDecimal("110"));
result.setYtdDr(new BigDecimal("110"));
result.setYtdCr(new BigDecimal("110"));
result.setBegBalBeq(new BigDecimal("110"));
result.setPeriodDrBeq(new BigDecimal("110"));
result.setPeriodCrBeq(new BigDecimal("110"));
result.setEndBalBeq(new BigDecimal("110"));
result.setQtdDrBeq(new BigDecimal("110"));
result.setQtdCrBeq(new BigDecimal("110"));
result.setYtdDrBeq(new BigDecimal("110"));
result.setYtdCrBeq(new BigDecimal("110"));
items.add(result);
}
String a=JSON.toJSONString(items);
System.out.println(a);
}
@Test
public void queryRemoteServerThenUpdateCF() {
List<CashFlowQueryDto> items=new ArrayList<>();
for(int i=0;i<2;i++) {
CashFlowQueryDto result = new CashFlowQueryDto();
result.setDate(new Date());
result.setSource("来源");
result.setPeriod(201803);
result.setStatus("关账标识");
result.setLedgerId("账套ID");
result.setLedgerName("账套名称");
result.setLedgerCurrencyCode("账套币种");
result.setEntityCode("机构编码");
result.setEntityName("机构名称");
result.setCategory("主体性质");
result.setFrequency("频度");
result.setItemName("项目中文名称");
result.setItemName2("项目英文名称");
result.setPeriodAmt(new BigDecimal("1000.0454"));
result.setYtdAmt(new BigDecimal("1000.0454"));
items.add(result);
}
String a=JSON.toJSONString(items);
System.out.println(a);
}
@Test
public void queryRemoteServerThenUpdateBS() {
List<BalanceSheetQueryDto> items=new ArrayList<>();
for(int i=0;i<2;i++) {
BalanceSheetQueryDto result = new BalanceSheetQueryDto();
result.setDate(new Date());
result.setPeriod(201812);
result.setStatus("关账标识");
result.setLedgerCurrencyCode("账套币种");
result.setEntityCode("机构编码");
result.setEntityName("机构名称");
result.setItemName("项目名称");
result.setEndBal(new BigDecimal("1220.2980"));
result.setBegBal(new BigDecimal("1220.2980"));
items.add(result);
}
String a=JSON.toJSONString(items);
System.out.println(a);
}
@Test
public void queryRemoteServerThenUpdateBSprc() {
List<BalanceSheetPrcQueryDto> items=new ArrayList<>();
for(int i=0;i<2;i++) {
BalanceSheetPrcQueryDto result = new BalanceSheetPrcQueryDto();
result.setDate(new Date());
result.setSource("来源");
result.setPeriod(201804);
result.setStatus("关账标识");
result.setLedgerId("账套ID");
result.setLedgerName("账套名称");
result.setLedgerCurrencyCode("账套币种");
result.setEntityCode("机构编码");
result.setEntityName("机构名称");
result.setCategory("主体性质");
result.setFrequency("频度");
result.setItemName("项目名称");
result.setEndBal(new BigDecimal("1220.2980"));
result.setBegBal(new BigDecimal("1220.2980"));
items.add(result);
}
String a=JSON.toJSONString(items);
System.out.println(a);
}
@Test
public void queryRemoteServerThenUpdatePL() {
List<ProfitLossStatementQueryDto> items=new ArrayList<>();
for(int i=0;i<2;i++) {
ProfitLossStatementQueryDto result = new ProfitLossStatementQueryDto();
result.setDate(new Date());
result.setSource("来源");
result.setPeriod(201904);
result.setStatus("关账标识");
result.setLedgerId("账套ID");
result.setLedgerName("账套名称");
result.setLedgerCurrencyCode("账套币种");
result.setEntityCode("机构编码");
result.setEntityName("机构名称");
result.setCategory("主体性质");
result.setFrequency("频度");
result.setItemName("项目名称");
result.setPeriodAmt(new BigDecimal("1220.2980"));
result.setYtdAmt(new BigDecimal("1220.2980"));
items.add(result);
}
String a=JSON.toJSONString(items);
System.out.println(a);
}
@Test
public void queryRemoteServerThenUpdatePLprc() {
List<ProfitLossStatementPrcQueryDto> items=new ArrayList<>();
for(int i=0;i<2;i++) {
ProfitLossStatementPrcQueryDto result = new ProfitLossStatementPrcQueryDto();
result.setDate(new Date());
result.setSource("来源");
result.setPeriod(201905);
result.setStatus("关账标识");
result.setLedgerId("账套ID");
result.setLedgerName("账套名称");
result.setLedgerCurrencyCode("账套币种");
result.setEntityCode("机构编码");
result.setEntityName("机构名称");
result.setCategory("主体性质");
result.setFrequency("频度");
result.setItemName("项目名称");
result.setPeriodAmt(new BigDecimal("1220.2980"));
result.setYtdAmt(new BigDecimal("1220.2980"));
items.add(result);
}
String a=JSON.toJSONString(items);
System.out.println(a);
}
@Test
public void queryRemoteServerThenUpdateOAR() {
List<OrganizationAccountingRateQueryDto> items=new ArrayList<>();
for(int i=0;i<2;i++) {
OrganizationAccountingRateQueryDto result = new OrganizationAccountingRateQueryDto();
result.setPeriod(2018);
result.setConvertionType("汇率类型名称");
result.setCurrencyFrom("原币种");
result.setCurrencyTo("目标币种");
result.setStartDate(new Date());
result.setEndDate(new Date());
result.setRate(3.4f);
items.add(result);
}
String a=JSON.toJSONString(items);
System.out.println(a);
}
}
\ No newline at end of file
......@@ -106,5 +106,5 @@ public interface CitSalaryAdvanceMapper extends MyMapper {
*/
int updateByPrimaryKey(CitSalaryAdvance record);
int insertBatch(List<CitSalaryAdvance> citSalaryAdvanceList);
int insertBatch(List<CitSalaryAdvance> list);
}
\ No newline at end of file
......@@ -49,7 +49,7 @@
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.createBy != null">#{item.createdBy,jdbcType=VARCHAR},</when>
<when test="item.createBy != null">#{item.createBy,jdbcType=VARCHAR},</when>
<otherwise>'',</otherwise>
</choose>
<choose>
......
......@@ -49,7 +49,7 @@
<otherwise>0,</otherwise>
</choose>
<choose>
<when test="item.createBy != null">#{item.createdBy,jdbcType=VARCHAR},</when>
<when test="item.createBy != null">#{item.createBy,jdbcType=VARCHAR},</when>
<otherwise>'',</otherwise>
</choose>
<choose>
......
......@@ -29,8 +29,8 @@
<otherwise>'',</otherwise>
</choose>
<choose>
<when test="item.poNo != null">#{item.poNo,jdbcType=INTEGER},</when>
<otherwise>0,</otherwise>
<when test="item.poNo != null">#{item.poNo,jdbcType=VARCHAR},</when>
<otherwise>'',</otherwise>
</choose>
<choose>
<when test="item.poSubjectCode != null">#{item.poSubjectCode,jdbcType=VARCHAR},</when>
......
......@@ -21,8 +21,8 @@
<select id="getTemplateUniqDtosByTemplateAndTemplateGroup" parameterType="map" resultMap="TemplateUniqDto">
SELECT
P.id as ID,
p.code as Code,
p.name as Name,
P.code as Code,
P.name as Name,
P.report_type as ReportType,
Q.id AS TEMPLATE_GROUP_ID,
Q.name AS TEMPLATE_GROUP_NAME,
......
......@@ -120,18 +120,14 @@
defaultValue = find;
$scope.templateGroupId = find.id;
}
else {
$scope.curTemplateGroup = null;
}
}
dxControl.renderTemplateGroupDropDown(templateGroupData, defaultValue);
if (templateGroupData && templateGroupData.length > 0) {
loadReportType();
} else {
$('#dx-select-template-groups').dxDropDownBox('instance').option('dataSource', []);
$('#dx-select-template').dxDropDownBox('instance').option('dataSource', []);
}
});
}
};
......@@ -147,8 +143,18 @@
}
};
if ($scope.curTemplateGroup && $scope.curTemplateGroup.id) {
if ($scope.curServiceTypeId === enums.serviceType.CIT) {
if ($scope.curServiceTypeId === enums.serviceType.VAT) {
$scope.detailReportTypeList = angular.copy(defaultReportTypeOpt);
var ds = _.filter(citReportTypeList, function (item) { return item.value == 1 || item.value == 3 || item.value == 4 });
$scope.detailReportTypeList.dataSource = new DevExpress.data.ArrayStore({
data: ds
});
$scope.detailReportTypeList.value = citReportTypeList[0].name;
$('#dx-select-report-type').dxSelectBox('instance').option($scope.detailReportTypeList);
$scope.reportType = citReportTypeList[0];
listTemplates();
} else if ($scope.curServiceTypeId === enums.serviceType.CIT) {
$scope.detailReportTypeList = angular.copy(defaultReportTypeOpt);
$scope.detailReportTypeList.dataSource = new DevExpress.data.ArrayStore({
data: citReportTypeList
......@@ -180,7 +186,6 @@
$scope.reportType = null;
listTemplates();
}
}
};
var loadIndustry = function () {
......@@ -315,6 +320,7 @@
//加载'报表'源数据
var listTemplates = function () {
if ($scope.curTemplateGroup && $scope.curTemplateGroup.id) {
templateGroupService.getTemplateList($scope.curTemplateGroup.id, $scope.reportType && $scope.reportType.value).success(function (templateData) {
templateData = _.filter(templateData, function (row) {
......@@ -330,6 +336,9 @@
if (find) {
defaultValue = find;
}
else {
$scope.currentTemplate = null;
}
}
$scope.templates = templateData; //当前组下的所有模板数据
......@@ -340,6 +349,12 @@
$scope.ToggleSaveAs = showSavebutton();
}
});
}
else {
$('#dx-select-template-groups').dxDropDownBox('instance').option('dataSource', []);
$scope.templates.length = 0;
$scope.currentTemplate = null;
}
};
//模板不是默认模板才可以编辑和保存
var showSavebutton = function () {
......
......@@ -28,15 +28,15 @@
<div class="templates-top">
<div class="form-group">
<span class="tab-content-select-lable" ng-show="curServiceTypeId !=='12'">{{'IndustryColon' | translate}}</span>
<div id="dx-select-industry" class="tab-content-select industry col-md-2" ng-show="curServiceTypeId !=='12'" dx-select-box="dataSourceIndustryList"
dx-item-alias="itemObj">
<div id="dx-select-industry" class="tab-content-select industry col-md-2" ng-show="curServiceTypeId !=='12'"
dx-select-box="dataSourceIndustryList" dx-item-alias="itemObj">
<div data-options="dxTemplate: { name: 'industryItem' }" class="dx-item-content dx-list-item-content" title="{{itemObj.name}}">
{{itemObj.name}}
</div>
</div>
<span class="tab-content-select-lable" translate="ReportType" ng-show="curServiceTypeId === '2'"></span>
<div class="tab-content-select reportType col-md-2" id="dx-select-pay-tax-type" ng-show="curServiceTypeId === '2'" dx-select-box="dataSourcePayTaxTypeList"
dx-item-alias="itemObj">
<span class="tab-content-select-lable" ng-show="curServiceTypeId === '2'">{{'Ratepayer' | translate}}:</span>
<div class="tab-content-select reportType col-md-2" id="dx-select-pay-tax-type" ng-show="curServiceTypeId === '2'"
dx-select-box="dataSourcePayTaxTypeList" dx-item-alias="itemObj">
<div data-options="dxTemplate: { name: 'filingTypeItem' }" class="dx-item-content dx-list-item-content" title="{{itemObj.name}}">
{{itemObj.name}}
</div>
......@@ -44,8 +44,8 @@
<span class="tab-content-select-lable">{{'SelectTemplateGroup' | translate}}</span>
<div class="tab-content-select selectTemplateGroup col-md-2" id="dx-select-template-groups">
</div>
<span class="tab-content-select-lable" translate="ReportType" ng-show="curServiceTypeId === '6' || curServiceTypeId === '11' || curServiceTypeId === '99'"></span>
<div class="tab-content-select reportType col-md-2" id="dx-select-report-type" ng-show="curServiceTypeId === '6' || curServiceTypeId === '11' || curServiceTypeId === '99'"
<span class="tab-content-select-lable" translate="ReportType" ng-show="curServiceTypeId === '2' ||curServiceTypeId === '6' || curServiceTypeId === '11' || curServiceTypeId === '99'"></span>
<div class="tab-content-select reportType col-md-2" id="dx-select-report-type" ng-show="curServiceTypeId === '2' ||curServiceTypeId === '6' || curServiceTypeId === '11' || curServiceTypeId === '99'"
dx-select-box="detailReportTypeList" dx-item-alias="itemObj">
<div data-options="dxTemplate: { name: 'reportTypeItem' }" class="dx-item-content dx-list-item-content" title="{{itemObj.name}}">
{{itemObj.name}}
......
......@@ -240,15 +240,15 @@
}
&.reportType {
width: 130px;
width: 120px;
}
&.selectTemplateGroup {
width: 200px;
width: 150px;
}
&.selectReport {
width: 200px;
width: 150px;
}
}
}
......
......@@ -189,6 +189,7 @@ controller('editTemplateModalController', ['$scope', '$log', '$translate', '$loc
// text: thisConstant.allSheets,
showClearButton: false,
noDataText: '',
dropDownOptions: { maxHeight: '310px' },
dataSource: thisData.sheetNameObjList,
contentTemplate: function(e) {
var value = e.component.option("value"),
......@@ -231,7 +232,6 @@ controller('editTemplateModalController', ['$scope', '$log', '$translate', '$loc
save: function(modalInstance) {
if (!$scope.editModel || !$scope.editModel.file) {
SweetAlert.warning(thisData.pleaseSelectFile);
return;
}
......@@ -267,6 +267,7 @@ controller('editTemplateModalController', ['$scope', '$log', '$translate', '$loc
allowManual: $("#allowManual").is(":checked"),
filename: $scope.editModel.file.name,
tempFileName: tempFileName,
defaultInput: $scope.editModel.defaultInput,
reportType: $scope.editModel.reportType
},
file: $scope.editModel.file,
......@@ -333,6 +334,7 @@ controller('editTemplateModalController', ['$scope', '$log', '$translate', '$loc
// body...
if (!thisData.selectTemplateCodeList || thisData.selectTemplateCodeList.length === 0) {
SweetAlert.warning(thisConstant.pleaseSelectTemplate);
return;
}
var model = {
......@@ -480,6 +482,7 @@ controller('editTemplateModalController', ['$scope', '$log', '$translate', '$loc
// text: thisConstant.allSheets,
showClearButton: false,
noDataText: '',
dropDownOptions: { maxHeight: '310px' },
dataSource: thisData.allTemplateList,
contentTemplate: function(e) {
var value = e.component.option("value"),
......
......@@ -2,20 +2,20 @@
<!-- 采用导入报表模板的方式 -->
<script type="text/ng-template" id="editTemplateModal.html">
<div class="modal-header">
<div class="modal-title">添加报表<span class="close" ng-click="cancel()" aria-hidden="true">×</span></div>
<div class="modal-title">{{'AddReport' | translate}}<span class="close" ng-click="cancel()" aria-hidden="true">×</span></div>
</div>
<div class="modal-body">
<form class="form-horizontal" id="editTemplateControlForm">
<div class="form-group radio-wrapper">
<label class="col-sm-4 normal-label">
<input type="radio" ng-model="editModel.addExists" ng-value="true"><span>添加现有报表</span>
<input type="radio" ng-model="editModel.addExists" ng-value="true"><span>{{'AddExistingReport' | translate}}</span>
</label>
<label class="col-sm-4 normal-label">
<input type="radio" ng-model="editModel.addExists" ng-value="false"><span>上传新报表</span>
<input type="radio" ng-model="editModel.addExists" ng-value="false"><span>{{'UploadNewReport' | translate}}</span>
</label>
</div>
<div class="form-group" ng-show="!editModel.addExists">
<label for="fileName" class="col-sm-3 control-label">报表底稿:</label>
<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>
......@@ -25,25 +25,25 @@
</div>
</div>
<div class="form-group" ng-show="!editModel.addExists">
<label for="telCode" class="col-sm-3 control-label">选择报表:</label>
<label for="telCode" class="col-sm-3 control-label">{{'SelectReportTemplate' | translate}}: </label>
<div class="col-sm-8 upload-sheet-wrapper">
<div id={{::editModel.sheetSelectDxID}}></div>
</div>
</div>
<div class="form-group radio-wrapper" ng-show="!editModel.addExists">
<label for="telCode" class="col-sm-4 normal-label">
<input type="radio" id="allowManual"><span>允许手工录入</span>
</label>
</div>
<div class="form-group" ng-show="editModel.addExists">
<label for="telCode" class="col-sm-3 control-label">选择报表:</label>
<label for="telCode" class="col-sm-3 control-label">{{'SelectReportTemplate' | translate}}: </label>
<div class="col-sm-9">
<div id={{::editModel.findSheetDxDropID}}></div>
</div>
</div>
<div class="form-group" ng-show="!editModel.addExists">
<div class="col-sm-9 normal-label checkbox">
<label>
<input type="checkbox" ng-model="editModel.defaultInput" ng-true-value="1" ng-false-value="0"> {{'AllowKeyInByDefault' | translate}}
</label>
</div>
</div>
</form>
</div>
<div class="modal-footer" style="padding-left: 22px;text-align: left;">
......@@ -54,12 +54,12 @@
<!-- 添加现有报表 -->
<script type="text/ng-template" id="addExistTemplateModal.html">
<div class="modal-header">
<div class="modal-title">添加现有报表</div>
<div class="modal-title">{{'AddExistingReport' | translate}}</div>
</div>
<div class="modal-body">
<form class="form-horizontal" id="editTemplateControlForm">
<div class="form-group">
<label for="telCode" class="col-sm-3 control-label">选择报表:</label>
<label for="telCode" class="col-sm-3 control-label">{{'SelectReportTemplate' | translate}}: </label>
<div class="col-sm-7">
<div id={{::editModel.findSheetDxDropID}}></div>
</div>
......@@ -74,7 +74,7 @@
<!-- 编辑报表名称 -->
<script type="text/ng-template" id="deleteTemplateModal.html">
<div class="modal-header">
<div class="modal-title">删除报表</div>
<div class="modal-title">{{'DeleteReport' | translate}}</div>
</div>
<div class="modal-body">
<form class="form-horizontal" id="deleteTemplateControlForm">
......@@ -90,12 +90,12 @@
<!-- 编辑报表名称 -->
<script type="text/ng-template" id="editTemplateNameModal.html">
<div class="modal-header">
<div class="modal-title">编辑报表</div>
<div class="modal-title">{{'EditReport' | translate}}</div>
</div>
<div class="modal-body">
<form class="form-horizontal" id="editTemplateNameModal">
<div class="form-group">
<label for="name" class="col-sm-3 control-label"><span class="must-input">*</span>报表底稿:</label>
<label for="name" class="col-sm-3 control-label"><span class="must-input">*</span>{{'TemplateFile' | translate}}: </label>
<div class="col-sm-8">
<input class="form-control" type="text" name="name" ng-model="editModel.name" />
</div>
......
......@@ -35,6 +35,10 @@
padding-left: 0;
padding-right: 32px;
}
.checkbox {
margin-left: 100px;
}
}
.edit-template-name-wrapper {
......
......@@ -170,16 +170,22 @@
}).then(function (resp) {
$('#busy-indicator-container').hide();
deferred.resolve();
if (resp.data) {
if (resp.data || resp.result) {
logDto.UpdateState = $translate.instant('ImportSuccess');
vatOperationLogService.addOperationLog(logDto);
SweetAlert.success($translate.instant('ImportSuccess'));
} else {
if (resp.message && resp.message.length > 0) {
SweetAlert.warning($translate.instant(resp.message));
} else {
SweetAlert.error($translate.instant('ImportFailed'));
}
if (resp.resultMsg && resp.resultMsg.length > 0) {
SweetAlert.warning($translate.instant(resp.resultMsg));
} else {
SweetAlert.error($translate.instant('ImportFailed'));
}
logDto.UpdateState = $translate.instant('ImportFail');
vatOperationLogService.addOperationLog(logDto);
}
......@@ -395,7 +401,7 @@
ele1.datepicker("setDate", $scope.selectedDate);
};
$scope.initCompanyList = function () {
var initCompanyList = function () {
orgService.getOrgListByUserId().success(function (data) {
if (data) {
$scope.companyList = data;
......@@ -494,6 +500,7 @@
$scope.setGridStyle = setGridStyle;
getUserPermission();
initCompanyList();
loadImportInfoDataGrid();
initDatePicker();
......
......@@ -162,7 +162,7 @@
}).then(function(resp) {
$('#busy-indicator-container').hide();
deferred.resolve();
if (resp.data) {
if (resp.data || resp.result) {
logDto.UpdateState = $translate.instant('ImportSuccess');
vatOperationLogService.addOperationLog(logDto);
SweetAlert.success($translate.instant('ImportSuccess'));
......
......@@ -161,7 +161,7 @@
}).then(function(resp) {
$('#busy-indicator-container').hide();
deferred.resolve();
if (resp.data) {
if (resp.data || resp.result) {
logDto.UpdateState = $translate.instant('ImportSuccess');
vatOperationLogService.addOperationLog(logDto);
SweetAlert.success($translate.instant('ImportSuccess'));
......
......@@ -170,7 +170,7 @@
}).then(function(resp) {
$('#busy-indicator-container').hide();
deferred.resolve();
if (resp.data) {
if (resp.data || resp.result) {
logDto.UpdateState = $translate.instant('ImportSuccess');
vatOperationLogService.addOperationLog(logDto);
SweetAlert.success($translate.instant('ImportSuccess'));
......
......@@ -171,7 +171,7 @@
}).then(function(resp) {
$('#busy-indicator-container').hide();
deferred.resolve();
if (resp.data) {
if (resp.data || resp.result) {
logDto.UpdateState = $translate.instant('ImportSuccess');
vatOperationLogService.addOperationLog(logDto);
SweetAlert.success($translate.instant('ImportSuccess'));
......
......@@ -173,7 +173,7 @@
}).then(function(resp) {
$('#busy-indicator-container').hide();
deferred.resolve();
if (resp.data) {
if (resp.data || resp.result) {
logDto.UpdateState = $translate.instant('ImportSuccess');
vatOperationLogService.addOperationLog(logDto);
SweetAlert.success($translate.instant('ImportSuccess'));
......
......@@ -12,7 +12,7 @@ webservices.factory('templateGroupService', ['$http', 'apiConfig', 'httpCacheSer
return $http.post('/templateGroup/addTemplateGroup', templateGroup, apiConfig.create());
},
addTemplateGroupWithoutTemplate: function (templateGroup) {
return $http.post('/templateGroup/templateGroup/withoutTemplate', templateGroup, apiConfig.create());
return $http.post('/templateGroup/withoutTemplate', templateGroup, apiConfig.create());
},
getTemplateList: function (templateGroupID, reportType) {
return $http.get('/template/get?templateGroupID=' + templateGroupID + '&reportType=' + reportType, apiConfig.create());
......
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