Commit 121566c6 authored by sherlock's avatar sherlock

Merge branch 'dev_oracle' into 'dev_oracle_sherlock'

# Conflicts:
#   atms-api/src/main/java/pwc/taxtech/atms/service/impl/TemplateGroupServiceImpl.java
parents ff8cdc20 5b4cc79a
......@@ -381,6 +381,38 @@
<scope>system</scope>
<systemPath>${basedir}/lib/soap-client-1.0.jar</systemPath>
</dependency>
<!--CXF-->
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-core</artifactId>
<version>3.2.6</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-wsdl</artifactId>
<version>3.2.6</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-bindings-soap</artifactId>
<version>3.2.6</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-databinding-jaxb</artifactId>
<version>3.2.6</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>3.2.6</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
<version>3.2.6</version>
</dependency>
<!--CXF END-->
</dependencies>
<profiles>
......
......@@ -105,4 +105,12 @@ public final class Constant {
public static class ReplaceKeyword {
public static final String KEY_IN = "${KeyIn}"; //手工数据源
}
/**
* SimpleDateFormat
*/
public static class DateFormat {
public static final String DEFAULT = "yyyy-MM-dd";
public static final String YEAR_MONTH = "yyyy-MM";
}
}
\ No newline at end of file
......@@ -48,4 +48,31 @@ public class StdAccountEnum {
}
}
}
public enum Direction {
Debit(1, "借方"),
Credit(-1, "贷方");
private Integer code;
private String name;
public static final Map<Integer, String> MAPPING = new HashMap<>();
Direction(Integer code, String name) {
this.code = code;
this.name = name;
}
public Integer getCode() {
return code;
}
public String getName() {
return name;
}
static {
for (Direction direction : Direction.values()) {
MAPPING.put(direction.getCode(), direction.getName());
}
}
}
}
......@@ -50,12 +50,21 @@ public class AtmsExceptionHandler extends ResponseEntityExceptionHandler {
}
@ExceptionHandler(value = Throwable.class)
public ApiResultDto handle(HttpServletResponse response) {
return ApiResultDto.fail("error.");
public void handle(Throwable throwable, HttpServletResponse response) {
throwable.printStackTrace();
//noinspection Duplicates
try {
response.setCharacterEncoding("UTF-8");
response.setContentType("application/json; charset=UTF-8");
response.getWriter().write(JSON.toJSONString(ApiResultDto.fail(throwable.getMessage())));
} catch (IOException e) {
logger.error("customHandle error.", e);
}
}
@ExceptionHandler(value = ServiceException.class)
public void customHandle(pwc.taxtech.atms.common.ServiceException exception, HttpServletResponse response) {
//noinspection Duplicates
try {
response.setCharacterEncoding("UTF-8");
response.setContentType("application/json; charset=UTF-8");
......
package pwc.taxtech.atms.controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import pwc.taxtech.atms.dpo.PagingDto;
import pwc.taxtech.atms.dto.ApiResultDto;
import pwc.taxtech.atms.dto.PagingResultDto;
import pwc.taxtech.atms.dto.vatdto.TrialBalanceDto;
import pwc.taxtech.atms.dto.vatdto.TrialBalanceParam;
import pwc.taxtech.atms.service.impl.DataImportService;
import pwc.taxtech.atms.service.impl.LgGlBalanceService;
import javax.annotation.Resource;
import java.util.List;
@RestController
@RequestMapping("/api/v1/DataImport/")
public class DataImportController extends BaseController {
@Resource
private DataImportService dataImportService;
@Resource
private LgGlBalanceService lgGlBalanceService;
@PostMapping("GetBalanceDataForDisplay")
public PagingResultDto<TrialBalanceDto> getBalanceDataForDisplay(@RequestBody TrialBalanceParam param) {
PagingResultDto<TrialBalanceDto> resultDto = new PagingResultDto<>();
List<TrialBalanceDto> list = dataImportService.getBalanceDataForDisplay(param);
PagingDto pagingDto = new PagingDto();
// pagingDto.setPageIndex(1);
// pagingDto.setPageSize(100);
// pagingDto.setTotalCount(list);
resultDto.setPageInfo(pagingDto);
resultDto.setList(list);
resultDto.setCalculateData(dataImportService.calculateData(list));
return resultDto;
}
@PostMapping("queryGlBalance")
public ApiResultDto queryGlBalance(@RequestBody TrialBalanceParam param) {
ApiResultDto resultDto = new ApiResultDto();
lgGlBalanceService.queryGlBalance(param.getOrgId(), param.getFromPeriod(), param.getToPeriod());
return resultDto;
}
}
......@@ -90,6 +90,14 @@ public class AccountMappingDao {
return mapper.selectByExample(example);
}
public List<AccountMapping> getAccountMapping(String epAccountSetId, String orgId) {
AccountMappingExample example = new AccountMappingExample();
AccountMappingExample.Criteria criteria = example.createCriteria();
criteria.andEnterpriseAccountSetIdEqualTo(epAccountSetId);
criteria.andOrganizationIdEqualTo(orgId);
return mapper.selectByExample(example);
}
public void delMapping(String epAccountCode, String epAccountSetId, String orgId, String industryId) {
AccountMappingExample example = new AccountMappingExample();
AccountMappingExample.Criteria criteria = example.createCriteria();
......
......@@ -5,7 +5,9 @@ import org.springframework.stereotype.Service;
import pwc.taxtech.atms.entity.EnterpriseAccountSetOrg;
import pwc.taxtech.atms.entity.EnterpriseAccountSetOrgExample;
import java.util.Date;
import java.util.List;
import java.util.Optional;
@Service
public class EnterpriseAccountSetOrgDao {
......@@ -19,4 +21,18 @@ public class EnterpriseAccountSetOrgDao {
criteria.andEnterpriseAccountSetIdEqualTo(accountSetId);
return mapper.selectByExample(example);
}
/**
* 查询当前有效配置
*
* @param orgId orgId
* @return Optional<EnterpriseAccountSetOrg>
*/
public Optional<EnterpriseAccountSetOrg> getByOrganization(String orgId) {
Date now = new Date();
EnterpriseAccountSetOrgExample example = new EnterpriseAccountSetOrgExample();
example.createCriteria().andOrganizationIdEqualTo(orgId).andEffectiveDateLessThanOrEqualTo(now)
.andExpiredDateGreaterThan(now);
return mapper.selectByExample(example).stream().findFirst();
}
}
......@@ -2,6 +2,7 @@ package pwc.taxtech.atms.dto.vatdto;
import javax.annotation.Nullable;
import java.math.BigDecimal;
import java.util.List;
public class TrialBalanceDto {
private String balanceId;
......@@ -34,9 +35,10 @@ public class TrialBalanceDto {
private boolean isDuplicate;
private Integer acctProp;
private int direction;
private List<TrialBalanceDto> children;
public String getBalanceId() {
return balanceId;
return this.balanceId;
}
public void setBalanceId(String balanceId) {
......@@ -44,7 +46,7 @@ public class TrialBalanceDto {
}
public Integer getPeriodId() {
return periodId;
return this.periodId;
}
public void setPeriodId(Integer periodId) {
......@@ -52,11 +54,7 @@ public class TrialBalanceDto {
}
public String getAcctCode() {
return acctCode;
}
public int getAccotCodeLength() {
return acctCode.length();
return this.acctCode;
}
public void setAcctCode(String acctCode) {
......@@ -64,7 +62,7 @@ public class TrialBalanceDto {
}
public String getCustomerCode() {
return customerCode;
return this.customerCode;
}
public void setCustomerCode(String customerCode) {
......@@ -73,7 +71,7 @@ public class TrialBalanceDto {
@Nullable
public BigDecimal getBegDebitBal() {
return begDebitBal;
return this.begDebitBal;
}
public void setBegDebitBal(@Nullable BigDecimal begDebitBal) {
......@@ -82,7 +80,7 @@ public class TrialBalanceDto {
@Nullable
public BigDecimal getBegCreditBal() {
return begCreditBal;
return this.begCreditBal;
}
public void setBegCreditBal(@Nullable BigDecimal begCreditBal) {
......@@ -91,7 +89,7 @@ public class TrialBalanceDto {
@Nullable
public BigDecimal getBegBal() {
return begBal;
return this.begBal;
}
public void setBegBal(@Nullable BigDecimal begBal) {
......@@ -100,7 +98,7 @@ public class TrialBalanceDto {
@Nullable
public BigDecimal getEndBal() {
return endBal;
return this.endBal;
}
public void setEndBal(@Nullable BigDecimal endBal) {
......@@ -109,7 +107,7 @@ public class TrialBalanceDto {
@Nullable
public BigDecimal getEndDebitBal() {
return endDebitBal;
return this.endDebitBal;
}
public void setEndDebitBal(@Nullable BigDecimal endDebitBal) {
......@@ -118,7 +116,7 @@ public class TrialBalanceDto {
@Nullable
public BigDecimal getEndCreditBal() {
return endCreditBal;
return this.endCreditBal;
}
public void setEndCreditBal(@Nullable BigDecimal endCreditBal) {
......@@ -127,7 +125,7 @@ public class TrialBalanceDto {
@Nullable
public BigDecimal getDebitBal() {
return debitBal;
return this.debitBal;
}
public void setDebitBal(@Nullable BigDecimal debitBal) {
......@@ -136,7 +134,7 @@ public class TrialBalanceDto {
@Nullable
public BigDecimal getCreditBal() {
return creditBal;
return this.creditBal;
}
public void setCreditBal(@Nullable BigDecimal creditBal) {
......@@ -144,16 +142,25 @@ public class TrialBalanceDto {
}
public Integer getMonthId() {
return monthId;
return this.monthId;
}
public void setMonthId(Integer monthId) {
this.monthId = monthId;
}
@Nullable
public BigDecimal getYearDebitBal() {
return this.yearDebitBal;
}
public void setYearDebitBal(@Nullable BigDecimal yearDebitBal) {
this.yearDebitBal = yearDebitBal;
}
@Nullable
public BigDecimal getYearCreditBal() {
return yearCreditBal;
return this.yearCreditBal;
}
public void setYearCreditBal(@Nullable BigDecimal yearCreditBal) {
......@@ -161,7 +168,7 @@ public class TrialBalanceDto {
}
public String getParentCode() {
return parentCode;
return this.parentCode;
}
public void setParentCode(String parentCode) {
......@@ -169,23 +176,23 @@ public class TrialBalanceDto {
}
public String getAccountName() {
return accountName;
return this.accountName;
}
public void setAccountName(String accountName) {
this.accountName = accountName;
}
public boolean isDuplicate() {
return isDuplicate;
public boolean getIsDuplicate() {
return this.isDuplicate;
}
public void setDuplicate(boolean duplicate) {
isDuplicate = duplicate;
public void setIsDuplicate(boolean duplicate) {
this.isDuplicate = duplicate;
}
public Integer getAcctProp() {
return acctProp;
return this.acctProp;
}
public void setAcctProp(Integer acctProp) {
......@@ -193,19 +200,18 @@ public class TrialBalanceDto {
}
public int getDirection() {
return direction;
return this.direction;
}
public void setDirection(int direction) {
this.direction = direction;
}
@Nullable
public BigDecimal getYearDebitBal() {
return yearDebitBal;
public List<TrialBalanceDto> getChildren() {
return this.children;
}
public void setYearDebitBal(@Nullable BigDecimal yearDebitBal) {
this.yearDebitBal = yearDebitBal;
public void setChildren(List<TrialBalanceDto> children) {
this.children = children;
}
}
package pwc.taxtech.atms.dto.vatdto;
public class TrialBalanceParam {
private String category;
private String criteria;
private String orgId;
private Integer fromPeriod;
private Integer toPeriod;
public String getCategory() {
return this.category;
}
public void setCategory(String category) {
this.category = category;
}
public String getCriteria() {
return this.criteria;
}
public void setCriteria(String criteria) {
this.criteria = criteria;
}
public Integer getFromPeriod() {
return this.fromPeriod;
}
public void setFromPeriod(Integer fromPeriod) {
this.fromPeriod = fromPeriod;
}
public Integer getToPeriod() {
return this.toPeriod;
}
public void setToPeriod(Integer toPeriod) {
this.toPeriod = toPeriod;
}
public String getOrgId() {
return this.orgId;
}
public void setOrgId(String orgId) {
this.orgId = orgId;
}
}
package pwc.taxtech.atms.service.impl;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.common.config.SystemConfig;
import pwc.taxtech.atms.constant.Constant;
import pwc.taxtech.atms.constant.enums.StdAccountEnum;
import pwc.taxtech.atms.dao.*;
import pwc.taxtech.atms.dto.vatdto.TrialBalanceDto;
import pwc.taxtech.atms.dto.vatdto.TrialBalanceParam;
import pwc.taxtech.atms.entity.*;
import pwc.taxtech.atms.vat.dao.GlBalanceMapper;
import pwc.taxtech.atms.vat.entity.GlBalance;
import pwc.taxtech.atms.vat.entity.GlBalanceExample;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
@Service
public class DataImportService extends BaseService {
@Resource
private GlBalanceMapper glBalanceMapper;
@Resource
private OrganizationMapper organizationMapper;
@Resource
private StandardAccountMapper standardAccountMapper;
@Resource
private SystemConfig systemConfig;
@Resource
private EnterpriseAccountSetOrgDao enterpriseAccountSetOrgDao;
@Resource
private AccountMappingDao accountMappingDao;
/**
* TB表查询
*
* @param param TrialBalanceParam
* @return List<TrialBalanceDto>
*/
public List<TrialBalanceDto> getBalanceDataForDisplay(TrialBalanceParam param) {
if (!ObjectUtils.allNotNull(param, param.getFromPeriod(), param.getToPeriod()) || StringUtils.isBlank(param.getOrgId())) {
return Collections.emptyList();
}
Organization organization = organizationMapper.selectByPrimaryKey(param.getOrgId());
if (null == organization) {
return Collections.emptyList();
}
Optional<EnterpriseAccountSetOrg> accountSetOrg = enterpriseAccountSetOrgDao.getByOrganization(organization.getId());
if (!accountSetOrg.isPresent()) {
return Collections.emptyList();
}
// mapping
List<AccountMapping> mappingList = accountMappingDao.getAccountMapping(accountSetOrg.get().getEnterpriseAccountSetId(),
organization.getId());
List<String> etCodeList = mappingList.stream().map(AccountMapping::getEnterpriseAccountCode).distinct().collect(Collectors.toList());
Map<String, List<AccountMapping>> mappingMap = mappingList.stream().collect(Collectors.groupingBy(AccountMapping::getStandardAccountCode));
//standard account
StandardAccountExample stdExample = new StandardAccountExample();
stdExample.createCriteria().andIsLeafEqualTo(Boolean.TRUE);
List<StandardAccount> stdAccountList = standardAccountMapper.selectByExample(stdExample);
Calendar calendar = Calendar.getInstance();
SimpleDateFormat dateFormat = new SimpleDateFormat(Constant.DateFormat.YEAR_MONTH);
Map<String, TrialBalanceDto> resultStdMap = new HashMap<>();
for (int i = param.getFromPeriod(); i <= param.getToPeriod(); i++) {
calendar.set(Calendar.MONTH, i - 1);
GlBalanceExample example = new GlBalanceExample();
//科目段
example.createCriteria().andSegment1EqualTo(organization.getClientCode())
.andPeriodNameEqualTo(dateFormat.format(calendar.getTime())).andSegment3In(etCodeList);
List<GlBalance> sg3List = glBalanceMapper.selectByExample(example);
GlBalanceExample example2 = new GlBalanceExample();
//明细段
example2.createCriteria().andSegment1EqualTo(organization.getClientCode())
.andPeriodNameEqualTo(dateFormat.format(calendar.getTime())).andSegment4In(etCodeList);
List<GlBalance> sg4List = glBalanceMapper.selectByExample(example2);
for (StandardAccount standardAccount : stdAccountList) {
if (!resultStdMap.containsKey(standardAccount.getCode())) {
resultStdMap.put(standardAccount.getCode(), new TrialBalanceDto());
}
// if (!mappingMap.containsKey(standardAccount.getCode())) {
// continue;
// }
TrialBalanceDto dto = resultStdMap.get(standardAccount.getCode());
dto.setChildren(Collections.emptyList());
dto.setAcctCode(standardAccount.getCode());
dto.setAccountName(standardAccount.getName());
List<AccountMapping> tmp = mappingMap.get(standardAccount.getCode());
if (CollectionUtils.isEmpty(tmp)) {
continue;
}
tmp.forEach(o -> {
if (StdAccountEnum.Direction.Credit.getCode().equals(standardAccount.getDirection())) {
dto.setCreditBal(add(dto.getCreditBal(), getGlBalance(o.getEnterpriseAccountCode(), sg3List, sg4List).getPtdCr()));
dto.setBegCreditBal(add(dto.getBegCreditBal(), getGlBalance(o.getEnterpriseAccountCode(), sg3List, sg4List).getBeginCrBalance()));
dto.setEndCreditBal(add(dto.getEndCreditBal(), getGlBalance(o.getEnterpriseAccountCode(), sg3List, sg4List).getEndCrBalance()));
dto.setYearCreditBal(add(dto.getYearCreditBal(), getGlBalance(o.getEnterpriseAccountCode(), sg3List, sg4List).getYtdCr()));
} else {
dto.setDebitBal(add(dto.getDebitBal(), getGlBalance(o.getEnterpriseAccountCode(), sg3List, sg4List).getPtdDr()));
dto.setBegDebitBal(add(dto.getBegDebitBal(), getGlBalance(o.getEnterpriseAccountCode(), sg3List, sg4List).getBeginDrBalance()));
dto.setEndDebitBal(add(dto.getEndDebitBal(), getGlBalance(o.getEnterpriseAccountCode(), sg3List, sg4List).getEndDrBalance()));
dto.setYearDebitBal(add(dto.getYearDebitBal(), getGlBalance(o.getEnterpriseAccountCode(), sg3List, sg4List).getYtdDr()));
}
});
}
}
return new ArrayList<>(resultStdMap.values()).stream().sorted(Comparator.comparing(TrialBalanceDto::getAcctCode))
.collect(Collectors.toList());
}
private BigDecimal add(BigDecimal v1, BigDecimal v2) {
v1 = null == v1 ? BigDecimal.ZERO : v1;
v2 = null == v2 ? BigDecimal.ZERO : v2;
return v1.add(v2);
}
private GlBalance getGlBalance(String code, List<GlBalance> seg3, List<GlBalance> seg4) {
for (GlBalance balance : seg3) {
if (StringUtils.equals(code, balance.getAttr3())) {
return balance;
}
}
for (GlBalance balance : seg4) {
if (StringUtils.equals(code, balance.getAttr3())) {
return balance;
}
}
return new GlBalance();
}
/**
* 计算总和
*
* @param list List<TrialBalanceDto>
* @return TrialBalanceDto
*/
public TrialBalanceDto calculateData(List<TrialBalanceDto> list) {
TrialBalanceDto dto = new TrialBalanceDto();
list.forEach(o -> {
dto.setCreditBal(add(dto.getCreditBal(), o.getCreditBal()));
dto.setBegCreditBal(add(dto.getBegCreditBal(), o.getBegCreditBal()));
dto.setEndCreditBal(add(dto.getEndCreditBal(), o.getEndCreditBal()));
dto.setYearCreditBal(add(dto.getYearCreditBal(), o.getYearCreditBal()));
dto.setDebitBal(add(dto.getDebitBal(), o.getDebitBal()));
dto.setBegDebitBal(add(dto.getBegDebitBal(), o.getBegDebitBal()));
dto.setEndDebitBal(add(dto.getEndDebitBal(), o.getEndDebitBal()));
dto.setYearDebitBal(add(dto.getYearDebitBal(), o.getYearDebitBal()));
});
return dto;
}
}
......@@ -10,14 +10,18 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.common.ServiceException;
import pwc.taxtech.atms.common.config.SystemConfig;
import pwc.taxtech.atms.constant.Constant;
import pwc.taxtech.atms.dao.EnterpriseAccountMapper;
import pwc.taxtech.atms.dao.EnterpriseAccountSetOrgMapper;
import pwc.taxtech.atms.dao.OrganizationMapper;
import pwc.taxtech.atms.entity.*;
import pwc.taxtech.atms.vat.dao.GlBalanceMapper;
import pwc.taxtech.atms.vat.entity.GlBalance;
import pwc.taxtech.atms.vat.entity.GlBalanceExample;
import javax.annotation.Resource;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.List;
import java.util.stream.Collectors;
......@@ -31,6 +35,8 @@ public class LgGlBalanceService extends BaseService {
private EnterpriseAccountSetOrgMapper setOrgMapper;
@Resource
private GlBalanceMapper glBalanceMapper;
@Resource
private OrganizationMapper organizationMapper;
/**
* 科目余额数据同步
......@@ -82,4 +88,34 @@ public class LgGlBalanceService extends BaseService {
}
}
/**
* 科目余额数据同步
*
* @param orgId String
* @param period YYYY-MM
* @throws ServiceException ex
*/
public void queryGlBalance(String orgId, String period) throws ServiceException {
Organization org = organizationMapper.selectByPrimaryKey(orgId);
if (null == org) {
return;
}
queryGlBalance(org, period);
}
/**
* @param orgId String
* @param fromPeriod Integer
* @param toPeriod Integer
* @throws ServiceException ex
*/
public void queryGlBalance(String orgId, Integer fromPeriod, Integer toPeriod) throws ServiceException {
Calendar calendar = Calendar.getInstance();
for (int i = fromPeriod; i <= toPeriod; i++) {
calendar.set(Calendar.MONTH, i - 1);
SimpleDateFormat dateFormat = new SimpleDateFormat(Constant.DateFormat.YEAR_MONTH);
queryGlBalance(orgId, dateFormat.format(calendar.getTime()));
}
}
}
......@@ -534,7 +534,10 @@ public class TemplateGroupServiceImpl extends AbstractService {
if (null == cell) {
return false;
}
cell.setCellType(CellType.STRING);
CellType cellType = cell.getCellTypeEnum();
if (!CellType.STRING.equals(cellType)) {
return false;
}
String v = cell.getStringCellValue();
if (StringUtils.isBlank(v)) {
return false;
......
jdbc_url=jdbc:oracle:thin:@10.158.230.144:11521:XE
jdbc_user=TAX_ADMIN
jdbc_password=taxadmin2018
jdbc_user=tax_admin_longi
jdbc_password=tax_admin_longi
#jdbc_password=111111
jdbc_admin_db=tax_admin
jdbc_admin_db=tax_admin_longi
#jdbc_url=jdbc:oracle:thin:@10.158.230.144:11521:XE
#jdbc_user=tax_admin_longi
......
jdbc_url=jdbc:sqlserver://192.168.1.102:1434;DatabaseName=QATaxAdmin8
jdbc_user=sa
jdbc_password=atmsunittestSQL
jdbc_admin_db=QATaxAdmin8
jdbc_url=jdbc:oracle:thin:@10.0.1.49:1521:TaxTEST
jdbc_user=tax_admin
jdbc_password=taxadmin2018
#jdbc_password=111111
jdbc_admin_db=tax_admin
jdbc_url_demo=jdbc:mysql://10.157.107.89:3306/demo_db_name?useUnicode=true&amp;characterEncoding=utf-8&amp;zeroDateTimeBehavior=convertToNull&amp;allowMultiQueries=true
jdbc2_url=jdbc:oracle:thin:@10.0.1.49:1521:TaxTEST
jdbc2_user=pwc_invoice
jdbc2_password=pwc_invoice
jdbc2_admin_db=pwc_invoice
jdbc_url_demo=jdbc:mysql://10.158.230.144:3306/demo_db_name?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false
mail_jdbc_url=jdbc:sqlserver://192.168.1.102:1434;DatabaseName=MAILMaster
mail_jdbc_user=sa
mail_jdbc_password=atmsunittestSQL
web.url=http://192.168.1.102:10000
web.url=http://etms.longi-silicon.com:8081
#web.url=*
jwt.base64Secret=TXppQjFlZFBSbnJzMHc0Tg==
jwt.powerToken=
jwt.expireSecond=1800
jwt.refreshSecond=900
jwt.powerToken=xxxx
jwt.expireSecond=180000
jwt.refreshSecond=600
#File Server Config
file.server.url=http://10.158.230.144:1886
file.server.url=http://etms.longi-silicon.com:9111
file.server.upload=/api/v1/upload
#upload
max_file_length=104857600
#Distributed ID Generate
distributed_id_datacenter=1
distributed_id_machine=1
\ No newline at end of file
distributed_id_datacenter=10
distributed_id_machine=10
api.url=http://etms.longi-silicon.com:8181
# Longi config
longi_api_basic_user=
longi_api_basic_pwd=
longi_api_gl_balance=http://soatest01.longi.com:8011/ETMSSB/Erp/GLBalance/ProxyServices/ErpQueryGLBalanceSoapProxy?wsdl
api.url=http://192.168.1.102:8180/atms-api
api.url=http://etms.longi-silicon.com:8181/
cookie.maxAgeSeconds=86400
......@@ -3,39 +3,40 @@
<div class="leftFilter">
<div class="form-inline" style="height:35px;">
<div class="pull-left" style="display:inline-block">
<button id="filterButton" class="filter-button margin-left20"
atms-popover ng-mouseenter="prepareSummary()" ng-click="showPopover()"
popover-container="body" popover-auto-hide="true" data-overwrite="true"
use-optimized-placement-algorithm="true"
data-placement="bottom"
data-templateurl="/app/common/controls/preview-trial-balance/preview-trial-balance-search.html">
<i class="fa fa-filter" aria-hidden="true"></i>
</button>
<!--<button id="filterButton" class="filter-button margin-left20"-->
<!--atms-popover ng-mouseenter="prepareSummary()" ng-click="showPopover()"-->
<!--popover-container="body" popover-auto-hide="true" data-overwrite="true"-->
<!--use-optimized-placement-algorithm="true"-->
<!--data-placement="bottom"-->
<!--data-templateurl="/app/common/controls/preview-trial-balance/preview-trial-balance-search.html">-->
<!--<i class="fa fa-filter" aria-hidden="true"></i>-->
<!--</button>-->
<div class="marginBottom" style="display:inline-block">
<span class="text-bold margin-left20" translate="TrialBalanceTitle"></span> |
<!--<span class="text-bold margin-left20" translate="TrialBalanceTitle"></span> |-->
<span class="text-bold margin-left20" translate="JournalQJ"></span>:
<input type="text" class="form-control input-width-middle" id="input-invoice-period-picker" ng-disabled="{{isReadOnly}}" />
</div>
<span class="text-bold margin-left20" translate="Display"></span>:
<div class="ui-select-no-border">
<ui-select ng-model="currentCategory.selected" on-select="doCategoryChange()" search-enabled="false" style="width:120px;">
<ui-select-match>{{$select.selected.name}}</ui-select-match>
<ui-select-choices repeat="cat in categoryList | propsFilter: {name: $select.search}">
<div title="{{cat.name}}" ng-bind-html="cat.name"></div>
</ui-select-choices>
</ui-select>
</div>
<div class="ui-select-no-border margin-left20">
<input type="checkbox" id="ckbHideAllZeroRecords" ng-click="hideAllZeroRecords()">
</div>
<span class="text-bold" translate="HideAllZeroRecords"></span>
<!--<span class="text-bold margin-left20" translate="Display"></span>:-->
<!--<div class="ui-select-no-border">-->
<!--<ui-select ng-model="currentCategory.selected" on-select="doCategoryChange()" search-enabled="false" style="width:120px;">-->
<!--<ui-select-match>{{$select.selected.name}}</ui-select-match>-->
<!--<ui-select-choices repeat="cat in categoryList | propsFilter: {name: $select.search}">-->
<!--<div title="{{cat.name}}" ng-bind-html="cat.name"></div>-->
<!--</ui-select-choices>-->
<!--</ui-select>-->
<!--</div>-->
<!--<div class="ui-select-no-border margin-left20">-->
<!--<input type="checkbox" id="ckbHideAllZeroRecords" ng-click="hideAllZeroRecords()">-->
<!--</div>-->
<!--<span class="text-bold" translate="HideAllZeroRecords"></span>-->
</div>
<!--导出-->
<div class="pull-right margin-right30">
<!--<button id="btnDataFilter" class="hidden" ng-click="doDataFilter('')">Open Filter</button>
<button id="btnResetDataFilter" class="hidden" ng-click="doDataFilterReset()">Reset Filter</button>-->
<span class="cursorPointer margin-right10" ng-click="doExport('GL','xlsx')"><i class="fa fa-file-excel-o" aria-hidden="true"></i> <span translate="ExportBtn"></span></span>
<span class="cursorPointer margin-right10" ng-click="queryGlBalance()"><i class="fa fa-file-excel-o" aria-hidden="true"></i> <span>数据同步</span></span>
</div>
</div>
......
......@@ -238,16 +238,25 @@
/****************************************************************************************************/
/* Tony's Beatup services */
getBalanceDataForDisplay: function (category, fromPeriod, toPeriod, criteria) {
getBalanceDataForDisplay: function (category, fromPeriod, toPeriod, criteria, orgId) {
return $http.post('/DataImport/GetBalanceDataForDisplay', {
category: category,
fromPeriod: fromPeriod,
toPeriod: toPeriod,
criteria: criteria
criteria: criteria,
orgId: orgId
}, apiConfig.createVat());
// return $http.get('/DataImport/GetBalanceDataForDisplay?category=' + category + '&fromPeriod=' + fromPeriod + '&toPeriod=' + toPeriod + '&criteria=' + criteria, apiConfig.createVat());
},
queryGlBalance: function (fromPeriod, toPeriod, orgId) {
return $http.post('/DataImport/queryGlBalance', {
fromPeriod: fromPeriod,
toPeriod: toPeriod,
orgId: orgId
}, apiConfig.createVat());
},
updateACustomPrice: function (customId, invoiceAmount) {
return $http.get('/CustomsInvoice/UpdateACustomPrice?customId=' + customId + '&invoiceAmount=' + invoiceAmount, apiConfig.createVat());
},
......
......@@ -623,7 +623,7 @@
$state.go('vat.generateReport.reportView', {
id: approvalInfo.reportIds.split(",")[0],
templateid: template.id,
templateid: approvalInfo.templateIds.split(",")[0],
name: template.name,
templatecode: template.code
});
......
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