Commit 13792da2 authored by neo's avatar neo

[DEL] delete single methond service

parent ee2fc699
package pwc.taxtech.atms.controller;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import javax.servlet.http.HttpServletResponse;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.io.FileUtils;
import org.joda.time.DateTime;
import org.nutz.lang.Lang;
......@@ -23,31 +15,39 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.commons.CommonsMultipartFile;
import io.swagger.annotations.ApiOperation;
import pwc.taxtech.atms.exception.ApplicationException;
import pwc.taxtech.atms.common.CommonConstants;
import pwc.taxtech.atms.common.CommonUtils;
import pwc.taxtech.atms.common.message.ErrorMessage;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.datainit.DataInitDto;
import pwc.taxtech.atms.dto.datainit.DataInitMsgDto;
import pwc.taxtech.atms.service.DataInitService;
import pwc.taxtech.atms.exception.ApplicationException;
import pwc.taxtech.atms.service.impl.DataInitServiceImpl;
import pwc.taxtech.atms.service.impl.FileService;
import javax.servlet.http.HttpServletResponse;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
@RestController
@RequestMapping("api/v1/init")
public class DataInitController {
private static final Logger logger = LoggerFactory.getLogger(DataInitController.class);
@Autowired private FileService fileService;
@Autowired private DataInitService dataInitService;
@Autowired
private FileService fileService;
@Autowired
private DataInitServiceImpl dataInitService;
@ApiOperation(value = "Download basic data initialization template")
@RequestMapping(value = { "/downloadTemplate" }, method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@RequestMapping(value = {"/downloadTemplate"}, method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public void downloadTemplate(HttpServletResponse response) {
String filePath;
File templateFile = null;
InputStream inputStream = null;
......@@ -56,51 +56,47 @@ public class DataInitController {
templateFile = new File(filePath + CommonConstants.BasicDataTemplate);
inputStream = new BufferedInputStream(new FileInputStream(templateFile));
String customFileName = CommonConstants.BasicDataFileName + DateTime.now().toString("yyyyMMddHHmmss") + ".xlsx";//客户端保存的文件名
response.setHeader("Content-Disposition", String.format("inline; filename=\"" + customFileName +"\""));
response.setHeader("Content-Disposition", String.format("inline; filename=\"" + customFileName + "\""));
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
FileCopyUtils.copy(inputStream, response.getOutputStream());
}
catch (FileNotFoundException e) {
} catch (FileNotFoundException e) {
logger.error("Template file not found. Template file should be located at " + CommonConstants.BasicDataTemplate);
throw new ApplicationException("Tempate file not found.");
}
catch (Exception e) {
} catch (Exception e) {
logger.error("Error downloading template file " + CommonConstants.BasicDataFileName + ".xlsx", e);
throw new ApplicationException("Error downloading template file " + CommonConstants.BasicDataFileName + ".xlsx", e);
}
finally {
} finally {
try {
templateFile = null;
if (inputStream!=null) {
if (inputStream != null) {
inputStream.close();
}
}
catch (Exception e) {
logger.error("Error closing inputstream. ",e);
}
finally {
} catch (Exception e) {
logger.error("Error closing inputstream. ", e);
} finally {
inputStream = null;
}
}
}
@ApiOperation(value = "Upload initial data")
@RequestMapping(value = { "/Upload" }, method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public @ResponseBody Object uploadInitData(@RequestParam String action,
@RequestParam(value = "file", required = false) CommonsMultipartFile inputFile) {
@RequestMapping(value = {"/Upload"}, method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public @ResponseBody
Object uploadInitData(@RequestParam String action,
@RequestParam(value = "file", required = false) CommonsMultipartFile inputFile) {
if (inputFile == null || inputFile.getSize() <= 0) {
return new OperationResultDto<>(false, ErrorMessage.NoFile);
}
logger.debug("file name: " + inputFile.getOriginalFilename());
InputStream inputStream = null;
try {
inputStream = inputFile.getInputStream();
inputStream = inputFile.getInputStream();
} catch (IOException e) {
throw Lang.wrapThrow(e);
}
//save file
String filePath = FileUtils.getTempDirectory().getAbsolutePath() + File.separator + "DataInit" + File.separator
+ CommonUtils.getUUID() + "_" + inputFile.getOriginalFilename();
......@@ -109,13 +105,13 @@ public class DataInitController {
if (saveResult.getResult() != null && !saveResult.getResult()) {
return saveResult;
}
DataInitDto dataInitDto = dataInitService.validateAndImportInitData(filePath);
DataInitMsgDto dataMsgDto = new DataInitMsgDto();
dataMsgDto.setErrorMsg(dataInitDto.getErrorMsgs());
dataMsgDto.setValidMsg(dataInitDto.getValidMsgs());
return dataMsgDto;
}
}
package pwc.taxtech.atms.controller;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import pwc.taxtech.atms.entity.Industry;
import pwc.taxtech.atms.service.ProjectIndustryService;
import pwc.taxtech.atms.service.impl.ProjectIndustryServiceImpl;
import java.util.List;
@RestController
@RequestMapping(value = "api/v1/industry")
public class IndustryController {
@Autowired
ProjectIndustryService projectIndustryService;
@Autowired
ProjectIndustryServiceImpl projectIndustryService;
@RequestMapping(value = "getAllAvailableIndustry", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public @ResponseBody List<Industry> getAllAvailableIndustry() {
return projectIndustryService.getAllAvailableIndustry();
}
@RequestMapping(value = "getAllAvailableIndustry", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public @ResponseBody
List<Industry> getAllAvailableIndustry() {
return projectIndustryService.getAllAvailableIndustry();
}
}
package pwc.taxtech.atms.controller;
import java.util.List;
import io.swagger.annotations.ApiOperation;
import javassist.tools.web.BadHttpRequest;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import pwc.taxtech.atms.dpo.AnalyticsModelDetail;
import pwc.taxtech.atms.dpo.FinancialStatementDetail;
import pwc.taxtech.atms.dpo.TaxReturnDetail;
import pwc.taxtech.atms.dto.*;
import pwc.taxtech.atms.dto.AddKeyValueConfigDto;
import pwc.taxtech.atms.dto.Common.RemoteValidationRetDto;
import pwc.taxtech.atms.dto.KeyValueConfigDisplayDto;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.UpdateKeyValueConfigDto;
import pwc.taxtech.atms.dto.formula.FormulaConfigDto;
import pwc.taxtech.atms.service.KeyValueConfigService;
import pwc.taxtech.atms.service.TemplateFormulaService;
import pwc.taxtech.atms.service.impl.TemplateFormulaServiceImpl;
import java.util.List;
@RestController
@RequestMapping("/api/v1/keyValueConfig")
......@@ -29,7 +37,7 @@ public class KeyValueConfigController {
private KeyValueConfigService keyValueConfigService;
@Autowired
private TemplateFormulaService templateFormulaService;
private TemplateFormulaServiceImpl templateFormulaService;
@ApiOperation(value = "get keyValueConfig")
@RequestMapping(value = "", method = RequestMethod.GET)
......@@ -111,9 +119,9 @@ public class KeyValueConfigController {
}
@RequestMapping(value="isFormulaValid", method=RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@RequestMapping(value = "isFormulaValid", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public @ResponseBody
RemoteValidationRetDto isFormulaValid(@RequestParam String value){
RemoteValidationRetDto isFormulaValid(@RequestParam String value) {
OperationResultDto validateResult = templateFormulaService.validate(value);
RemoteValidationRetDto result = new RemoteValidationRetDto();
result.setIsValid(validateResult.getResult());
......
package pwc.taxtech.atms.controller;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import pwc.taxtech.atms.dpo.ModelProfileDto;
import pwc.taxtech.atms.service.ModelConfigurationService;
import pwc.taxtech.atms.service.impl.ModelConfigurationServiceImpl;
import java.util.List;
@RestController
@RequestMapping(value = "api/v1/modelConfiguration")
public class ModelConfigurationController {
@Autowired
ModelConfigurationService modelConfigurationService;
@Autowired
ModelConfigurationServiceImpl modelConfigurationService;
@RequestMapping(value = "/model/byIndustry/{serviceTypeId}/{industryId}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public @ResponseBody List<ModelProfileDto> getModelListByIndustry(@PathVariable String industryId,
@PathVariable String serviceTypeId) {
return modelConfigurationService.getModelListByIndustry(serviceTypeId, industryId);
}
@RequestMapping(value = "/model/byIndustry/{serviceTypeId}/{industryId}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public @ResponseBody
List<ModelProfileDto> getModelListByIndustry(@PathVariable String industryId,
@PathVariable String serviceTypeId) {
return modelConfigurationService.getModelListByIndustry(serviceTypeId, industryId);
}
}
......@@ -10,7 +10,7 @@ import org.springframework.web.bind.annotation.RestController;
import pwc.taxtech.atms.dto.ServiceTypeDto;
import pwc.taxtech.atms.entity.ServiceType;
import pwc.taxtech.atms.service.ProjectService;
import pwc.taxtech.atms.service.ServiceTypeService;
import pwc.taxtech.atms.service.impl.ServiceTypeServiceImpl;
import java.util.List;
......@@ -21,7 +21,7 @@ public class ServiceTypeController {
@Autowired
private ProjectService projectService;
@Autowired
private ServiceTypeService serviceTypeService;
private ServiceTypeServiceImpl serviceTypeService;
@ResponseBody
@ApiOperation(value = "获取ServiceType列表")
......
......@@ -4,20 +4,25 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.service.TemplateFormulaService;
import pwc.taxtech.atms.service.impl.TemplateFormulaServiceImpl;
@RestController
@RequestMapping(value = "api/v1/templateFormula")
public class TemplateFormulaController {
@Autowired
TemplateFormulaService templateFormulaService;
TemplateFormulaServiceImpl templateFormulaService;
private static final Logger logger = LoggerFactory.getLogger(TemplateFormulaController.class);
@RequestMapping(value = "validate", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public @ResponseBody OperationResultDto validate(@RequestBody(required = false) String fromula) {
public @ResponseBody
OperationResultDto validate(@RequestBody(required = false) String fromula) {
try {
return templateFormulaService.validate(fromula);
} catch (Exception e) {
......
package pwc.taxtech.atms.service;
public interface AccountService {
/**
* 匹配标准科目到企业科目(按科目编码)
* @param enterpriseAccountSetId - 账套Id
* @param stdAccountCode - 标准科目编码
* @param epAccountCode - 企业科目编码
* @param industryId - 行业Id
* @param organizationId - 机构Id
* @param bOverwrite - 是否覆盖已有对应
* @param acctLevel - 科目级别
*/
void mapStdAccountByCode (String enterpriseAccountSetId, String stdAccountCode, String epAccountCode, String industryId, String organizationId,
Boolean bOverwrite, Integer acctLevel);
}
package pwc.taxtech.atms.service;
import pwc.taxtech.atms.dto.datainit.DataInitDto;
public interface DataInitService {
DataInitDto validateAndImportInitData(String filePath);
}
package pwc.taxtech.atms.service;
import java.util.List;
import pwc.taxtech.atms.entity.Dictionary;
public interface DictionaryService {
List<Dictionary> getDictionaryByCode(String code);
}
package pwc.taxtech.atms.service;
import java.io.InputStream;
public interface FileSystemService {
/**
* 上传用户报表模板
*
* @param fileName 文件名
* @param inputStream InputStream
* @return 文件路径
* @throws Exception ex
*/
String uploadUserTemplate(String fileName, InputStream inputStream) throws Exception;
/**
* 下载用户报表模板
*
* @param filePath 文件路径
* @return InputStream
* @throws Exception ex
*/
InputStream downloadUserTemplate(String filePath) throws Exception;
}
package pwc.taxtech.atms.service;
import pwc.taxtech.atms.dpo.ModelProfileDto;
import java.util.List;
public interface ModelConfigurationService {
List<ModelProfileDto> getModelListByIndustry(String serviceTypeId, String industryId);
}
package pwc.taxtech.atms.service;
import java.util.List;
import pwc.taxtech.atms.entity.Industry;
public interface ProjectIndustryService {
List<Industry> getAllAvailableIndustry();
}
package pwc.taxtech.atms.service;
import java.util.List;
import pwc.taxtech.atms.entity.ServiceType;
public interface ServiceTypeService {
List<ServiceType> getServiceTypes();
}
package pwc.taxtech.atms.service;
import pwc.taxtech.atms.dto.OperationResultDto;
public interface TemplateFormulaService {
OperationResultDto validate(String formula);
}
......@@ -2,79 +2,85 @@ package pwc.taxtech.atms.service.impl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.common.CommonConstants;
import pwc.taxtech.atms.common.CommonUtils;
import pwc.taxtech.atms.entity.AccountMapping;
import pwc.taxtech.atms.entity.AccountMappingExample;
import pwc.taxtech.atms.entity.EnterpriseAccount;
import pwc.taxtech.atms.service.AccountService;
import pwc.taxtech.atms.service.EnterpriseAccountService;
@Service
public class AccountServiceImpl extends AbstractService implements AccountService {
public class AccountServiceImpl extends AbstractService {
@Autowired
EnterpriseAccountService enterpriseAccountService;
@Autowired EnterpriseAccountService enterpriseAccountService;
/* (non-Javadoc)
* @see pwc.taxtech.atms.service.AccountService#mapStdAccountByCode(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.Boolean, java.lang.Integer)
/**
* 匹配标准科目到企业科目(按科目编码)
* @param enterpriseAccountSetId - 账套Id
* @param stdAccountCode - 标准科目编码
* @param epAccountCode - 企业科目编码
* @param industryId - 行业Id
* @param organizationId - 机构Id
* @param bOverwrite - 是否覆盖已有对应
* @param acctLevel - 科目级别
*/
@Override
public void mapStdAccountByCode(String enterpriseAccountSetId, String stdAccountCode, String epAccountCode, String industryId, String organizationId,
Boolean bOverwrite, Integer acctLevel) {
Boolean bOverwrite, Integer acctLevel) {
//set default value
if(bOverwrite == null) {
if (bOverwrite == null) {
bOverwrite = true;
}
if(acctLevel == null) {
if (acctLevel == null) {
acctLevel = 0;
}
EnterpriseAccount epAccount = enterpriseAccountService.getEnterpriseAccount(epAccountCode, enterpriseAccountSetId);
if (epAccount == null) {
return;
}
//set stdAccountCode
if(stdAccountCode==null || stdAccountCode.isEmpty()) {
if (stdAccountCode == null || stdAccountCode.isEmpty()) {
stdAccountCode = CommonConstants.NullStdCode;
}
if (!bOverwrite) {
if(!isStdExists(enterpriseAccountSetId, epAccountCode, industryId, organizationId)) {
if (!isStdExists(enterpriseAccountSetId, epAccountCode, industryId, organizationId)) {
deleteAccountMapping(epAccountCode, epAccount.getEnterpriseAccountSetId(), organizationId, industryId);
updateStdAccountMapping(epAccountCode, epAccount.getEnterpriseAccountSetId(), stdAccountCode, industryId, organizationId);
}
}
else {
} else {
deleteAccountMapping(epAccountCode, epAccount.getEnterpriseAccountSetId(), organizationId, industryId);
updateStdAccountMapping(epAccountCode, epAccount.getEnterpriseAccountSetId(), stdAccountCode, industryId, organizationId);
}
}
/**
* 删除对应关系
*
* @param epAccountCode
* @param enterpriseAccountSetId
* @param organizaionId
* @param industryId
*/
private void deleteAccountMapping(String epAccountCode, String enterpriseAccountSetId, String organizaionId,
String industryId) {
String industryId) {
AccountMappingExample accountMappingExample = new AccountMappingExample();
accountMappingExample.createCriteria()
.andEnterpriseAccountCodeEqualTo(epAccountCode)
.andEnterpriseAccountSetIdEqualTo(enterpriseAccountSetId)
.andOrganizationIdEqualTo(organizaionId)
.andIndustryIdEqualTo(industryId);
.andEnterpriseAccountCodeEqualTo(epAccountCode)
.andEnterpriseAccountSetIdEqualTo(enterpriseAccountSetId)
.andOrganizationIdEqualTo(organizaionId)
.andIndustryIdEqualTo(industryId);
accountMappingMapper.deleteByExample(accountMappingExample);
}
/**
* 插入对应关系到对应关系表
*
* @param epAccountCode
* @param enterpriseAccountSetId
* @param stdAccountCode
......@@ -83,8 +89,8 @@ public class AccountServiceImpl extends AbstractService implements AccountServic
* @param organizationId
*/
private void updateStdAccountMapping(String epAccountCode, String enterpriseAccountSetId,
String stdAccountCode, String industryId, String organizationId) {
String stdAccountCode, String industryId, String organizationId) {
AccountMapping accountMapping = new AccountMapping();
accountMapping.setId(CommonUtils.getUUID());
accountMapping.setEnterpriseAccountSetId(enterpriseAccountSetId);
......@@ -96,10 +102,10 @@ public class AccountServiceImpl extends AbstractService implements AccountServic
}
private boolean isStdExists(String enterpriseAccountSetId, String enterpirseAccountCode, String industryId, String organizationId) {
Long stdAccountsCount = customAccountMapper.countStandardAccounts(enterpriseAccountSetId, enterpirseAccountCode, industryId, organizationId);
return stdAccountsCount>=1;
return stdAccountsCount >= 1;
}
}
package pwc.taxtech.atms.service.impl;
import java.util.List;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.entity.Dictionary;
import pwc.taxtech.atms.entity.DictionaryExample;
import pwc.taxtech.atms.service.DictionaryService;
import java.util.List;
@Service
public class DictionaryServiceImpl extends AbstractService implements DictionaryService {
public class DictionaryServiceImpl extends AbstractService {
@Override
public List<Dictionary> getDictionaryByCode(String code) {
DictionaryExample example = new DictionaryExample();
example.createCriteria().andCodeEqualTo(code).andIsActiveEqualTo(true);
......
......@@ -3,25 +3,22 @@ package pwc.taxtech.atms.service.impl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.common.ftp.FtpService;
import pwc.taxtech.atms.service.FileSystemService;
import java.io.InputStream;
@Service
public class FTPFileSystemServiceImpl implements FileSystemService {
public class FTPFileSystemServiceImpl {
private static final String USER_TEMPLATE_PATH = "pwc/userTemplate/";
@Autowired
private FtpService ftpService;
@Override
public String uploadUserTemplate(String fileName, InputStream inputStream) throws Exception {
ftpService.upload(USER_TEMPLATE_PATH, fileName, inputStream);
return USER_TEMPLATE_PATH + fileName;
}
@Override
public InputStream downloadUserTemplate(String filePath) throws Exception {
return ftpService.getFtpFileWithStaticUrl(filePath);
}
......
package pwc.taxtech.atms.service.impl;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.dpo.ModelProfileDto;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.dpo.ModelProfileDto;
import pwc.taxtech.atms.service.ModelConfigurationService;
@Service
public class ModelConfigurationServiceImpl extends AbstractService implements ModelConfigurationService {
public class ModelConfigurationServiceImpl extends AbstractService {
@Override
public List<ModelProfileDto> getModelListByIndustry(String serviceTypeId, String industryId) {
Map<String,Object> map = new HashMap<>(2);
map.put("serviceTypeId",serviceTypeId);
map.put("industryId",industryId);
return modelConfigMapper.getModelListByIndustry(map);
}
public List<ModelProfileDto> getModelListByIndustry(String serviceTypeId, String industryId) {
Map<String, Object> map = new HashMap<>(2);
map.put("serviceTypeId", serviceTypeId);
map.put("industryId", industryId);
return modelConfigMapper.getModelListByIndustry(map);
}
}
package pwc.taxtech.atms.service.impl;
import java.util.List;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.entity.Industry;
import pwc.taxtech.atms.service.ProjectIndustryService;
import java.util.List;
@Service
public class ProjectIndustryServiceImpl extends AbstractService implements ProjectIndustryService {
public class ProjectIndustryServiceImpl extends AbstractService {
@Override
public List<Industry> getAllAvailableIndustry() {
return industryMapper.getAllAvailableIndustry();
}
public List<Industry> getAllAvailableIndustry() {
return industryMapper.getAllAvailableIndustry();
}
}
package pwc.taxtech.atms.service.impl;
import java.util.List;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.entity.ServiceType;
import pwc.taxtech.atms.entity.ServiceTypeExample;
import pwc.taxtech.atms.service.ServiceTypeService;
import java.util.List;
@Service
public class ServiceTypeServiceImpl extends AbstractService implements ServiceTypeService {
public class ServiceTypeServiceImpl extends AbstractService {
@Override
public List<ServiceType> getServiceTypes() {
return serviceTypeMapper.selectByExample(new ServiceTypeExample());
}
public List<ServiceType> getServiceTypes() {
return serviceTypeMapper.selectByExample(new ServiceTypeExample());
}
}
package pwc.taxtech.atms.service.impl;
import static java.util.Comparator.comparing;
import static java.util.Comparator.naturalOrder;
import static java.util.Comparator.nullsFirst;
import static java.util.Comparator.nullsLast;
import static java.util.stream.Collectors.toList;
import static org.springframework.util.StringUtils.hasText;
import static pwc.taxtech.atms.common.CommonUtils.copyProperties;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.nutz.lang.Lang;
import org.nutz.lang.Strings;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.dpo.StatisticAttributeDisplayDto;
import pwc.taxtech.atms.exception.ApplicationException;
import pwc.taxtech.atms.common.CommonConstants;
import pwc.taxtech.atms.common.CommonUtils;
import pwc.taxtech.atms.common.OperateLogType;
import pwc.taxtech.atms.common.OperationAction;
import pwc.taxtech.atms.common.OperationModule;
import pwc.taxtech.atms.constant.DimensionConstant;
import pwc.taxtech.atms.dpo.StatisticAttributeDisplayDto;
import pwc.taxtech.atms.dto.OperationLogDto;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.StatisticAttributeDimensionDto;
......@@ -38,10 +21,22 @@ import pwc.taxtech.atms.entity.StatisticAttribute;
import pwc.taxtech.atms.entity.StatisticAttributeDimension;
import pwc.taxtech.atms.entity.StatisticAttributeDimensionExample;
import pwc.taxtech.atms.entity.StatisticAttributeExample;
import pwc.taxtech.atms.service.DictionaryService;
import pwc.taxtech.atms.exception.ApplicationException;
import pwc.taxtech.atms.service.DimensionService;
import pwc.taxtech.atms.service.StatisticAttributeService;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import static java.util.Comparator.*;
import static java.util.stream.Collectors.toList;
import static org.springframework.util.StringUtils.hasText;
import static pwc.taxtech.atms.common.CommonUtils.copyProperties;
/**
*/
@Service
......@@ -50,7 +45,7 @@ public class StatisticAttributeServiceImpl extends AbstractService implements St
@Autowired
private DimensionService dimensionService;
@Autowired
private DictionaryService dictionaryService;
private DictionaryServiceImpl dictionaryService;
@Override
public List<StatisticAttributeDisplayDto> getStatisticAttributeListByDimensionId(String parentDimensionId,
......
......@@ -8,16 +8,14 @@ import org.apache.poi.xssf.usermodel.XSSFEvaluationWorkbook;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.service.TemplateFormulaService;
@Service
public class TemplateFormulaServiceImpl extends AbstractService implements TemplateFormulaService {
public class TemplateFormulaServiceImpl extends AbstractService {
private FormulaHelper formulaHelper = new FormulaHelper();
//private static ScriptEngine m_engine = Python.CreateEngine();
@Override
public OperationResultDto validate(String formula) {
OperationResultDto result = new OperationResultDto();
......
......@@ -20,14 +20,14 @@ import pwc.taxtech.atms.common.POIUtil;
import pwc.taxtech.atms.common.message.ErrorMessage;
import pwc.taxtech.atms.common.message.TemplateMessage;
import pwc.taxtech.atms.constant.enums.TemplateGroupType;
import pwc.taxtech.atms.dao.CellTemplateConfigMapper;
import pwc.taxtech.atms.dao.CellTemplateMapper;
import pwc.taxtech.atms.dao.TemplateGroupMapper;
import pwc.taxtech.atms.dao.TemplateMapper;
import pwc.taxtech.atms.dao.CellTemplateConfigDao;
import pwc.taxtech.atms.dao.CellTemplateConfigMapper;
import pwc.taxtech.atms.dao.CellTemplateDao;
import pwc.taxtech.atms.dao.CellTemplateMapper;
import pwc.taxtech.atms.dao.TemplateDao;
import pwc.taxtech.atms.dao.TemplateGroupDao;
import pwc.taxtech.atms.dao.TemplateGroupMapper;
import pwc.taxtech.atms.dao.TemplateMapper;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.TemplateGroupDto;
import pwc.taxtech.atms.entity.CellTemplate;
......@@ -39,7 +39,6 @@ import pwc.taxtech.atms.entity.TemplateExample;
import pwc.taxtech.atms.entity.TemplateGroup;
import pwc.taxtech.atms.entity.TemplateGroupExample;
import pwc.taxtech.atms.exception.ServiceException;
import pwc.taxtech.atms.service.FileSystemService;
import pwc.taxtech.atms.service.TemplateGroupService;
import java.io.ByteArrayInputStream;
......@@ -56,7 +55,7 @@ import java.util.stream.Collectors;
@Service
public class TemplateGroupServiceImpl extends AbstractService implements TemplateGroupService {
@Autowired
private FileSystemService fileSystemService;
private FTPFileSystemServiceImpl fileSystemService;
@Autowired
private TemplateGroupDao templateGroupDao;
@Autowired
......
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