Commit 4ad0a8ed authored by chase's avatar chase

Merge branch 'dev_mysql' of http://code.tech.tax.asia.pwcinternal.com/root/atms into dev_mysql

# Conflicts:
#	atms-dao/etc/generator-mysql/vatGeneratorConfig.xml
#	atms-web/src/main/webapp/app-resources/i18n/zh-CN/vat.json
parents 71669dc5 c1ab40d8
......@@ -52,7 +52,8 @@ public enum OperationModule {
OrganizationTaxRule(40),
Equity(41),
OrganizationEmployee(42),
OrganizationTaxpayerQualification(43);
OrganizationTaxpayerQualification(43),
InitEquity(44);
private int value;
......
......@@ -5,6 +5,8 @@ public class ErrorMessage {
public static final String SaveFileError = "SaveFileError";
public static final String SystemError = "SystemError";
public static final String NoFile = "NoFile";
public static final String DidntSelectedCompany = "Didn't Selected Company";
public static final String DidntSelectedPeriod = "Didn't Selected period";
public static final String NoSelectSheet = "NoSelectSheet";
public static final String DIDNOTSELECTPERIOD = "You should select period!";
......
......@@ -20,6 +20,7 @@ public class LogMessage {
public static final String UpdateOrganizationEquity = "UpdateOrganizationEquity";
public static final String DeleteOrganizationEquity = "DeleteOrganizationEquity";
public static final String InitOrganizationEquity = "InitOrganizationEquity";
public static final String ChangeOrganizationEquity = "ChangeOrganizationEquity";
public static final String CancelChangeUpdateOrganizationEquity = "CancelChangeUpdateOrganizationEquity";
......
package pwc.taxtech.atms.constant.enums;
/**
* @Auther: Gary J Li
* @Date: 27/02/2019 20:47
* @Description:
*/
public final class CountTypeConstant {
public static final int TOTAL = 1;
public static final int SIXTEEN_PERCENT = 2;
public static final int TEN_PERCENT = 3;
public static final int SIX_PERCENT = 4;
public static final int THREE_PERCENT = 5;
public static final int SEVENTEEN_PERCENT = 6;
public static final int ELEVEN_PERCENT = 7;
public static final int FIVE_PERCENT = 8;
public static final int OTHER = 9;
}
package pwc.taxtech.atms.constant.enums;
/**
* @Auther: Gary J Li
* @Date: 27/02/2019 20:36
* @Description:
*/
public enum CountTypeEnum {
total(1,"合计"),
sixteenPercent(2,"16%"),
tenPercent(3,"10%"),
sixPercent(4,"6%"),
threePercent(5,"3%"),
seventeenPercent(6,"17%"),
elevenPercent(7,"11%"),
fivePercent(8,"5%"),
other(9,"其他");
private int code;
private String type;
CountTypeEnum(int code,String type){
this.code = code;
this.type = type;
}
public int getCode() {
return code;
}
public String getType() {
return type;
}
}
......@@ -10,7 +10,9 @@ public enum EnumImportType {
CoupaPurchasingReport(6),
InvoiceData(7),
CertifiedInvoicesList(8),
InvoiceRecord(9)
InvoiceRecord(9),
ExtractFinancialData(10),
ExtractInvoiceData(11)
;
private Integer code;
......
package pwc.taxtech.atms.constant.enums;
import java.util.HashMap;
import java.util.Map;
/**
* @Auther: Gary J Li
* @Date: 26/02/2019 13:50
* @Description:
*/
public enum NationalEconomicIndustryEnum {
A("农、林、牧、渔业"),
B("采矿业"),
C("制造业"),
D("电力、热力、燃气及水生产和供应业"),
E("建筑业"),
F("批发和零售业"),
G("交通运输、仓储和邮政业"),
H("住宿和餐饮业"),
I("信息传输、软件和信息技术服务业"),
J("金融业"),
K("房地产业"),
L("租赁和商务服务业"),
M("科学研究和技术服务业"),
N("水利、环境和公共设施管理业"),
O("居民服务、修理和其他服务业"),
P("教育"),
Q("卫生和社会工作"),
R("文化、体育和娱乐业"),
S("公共管理、社会保障和社会组织"),
T("国际组织") ;
private String name;
public static final Map<String, String> Map = new HashMap<>();
static {
for (NationalEconomicIndustryEnum kv : NationalEconomicIndustryEnum.values()) {
Map.put(kv.getName(), kv.name());
}
}
NationalEconomicIndustryEnum(String name) {
this.name = name;
}
public String getName() {
return name;
}
}
......@@ -79,6 +79,12 @@ public class DataPreviewController extends BaseController {
return dataPreviewSerivceImpl.getCILDataForDisplay(param);
}
@PostMapping("getIDDataForDisplay")
public PageInfo<InvoiceDataDto> getIDDataForDisplay(@RequestBody InvoiceDataParam param) {
logger.debug(String.format("发票资料查询 Condition:%s", JSON.toJSONString(param)));
return dataPreviewSerivceImpl.getIDDataForDisplay(param);
}
@RequestMapping(value = "exportCFData/get", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public void downloadCFQueryData(@RequestBody CashFlowParam param, HttpServletResponse response) {
logger.debug("enter downloadCFQueryData");
......
......@@ -6,10 +6,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import pwc.taxtech.atms.dpo.OrgBasicDto;
import pwc.taxtech.atms.dpo.OrgInfoDto;
import pwc.taxtech.atms.dpo.OrgSimpleDto;
import pwc.taxtech.atms.dpo.OrganizationDto;
import pwc.taxtech.atms.dpo.*;
import pwc.taxtech.atms.dto.*;
import pwc.taxtech.atms.dto.organization.OrganizationExtraDto;
import pwc.taxtech.atms.dto.dimension.DimensionOrgDtoDashboard;
......@@ -93,9 +90,10 @@ public class OrganizationController {
return organizationService.getOrgInfo();
}
// 这是这个重复的方法
@RequestMapping(value = "getOrgListByUserId", method = RequestMethod.GET)
public @ResponseBody
List<OrgSimpleDto> getOrgSimpleList() {
List<OrgSelectDto> getOrgSimpleList() {
logger.info("GET /api/v1/org/getOrgListByUserId");
return organizationService.getOrgSimpleList();
}
......
package pwc.taxtech.atms.dto;
import java.util.List;
public class DataExtractParam {
private String period;
private List<String> orgIds;
private List<Integer> dataTypes;
public String getPeriod() {
return period;
}
public void setPeriod(String period) {
this.period = period;
}
public List<String> getOrgIds() {
return orgIds;
}
public void setOrgIds(List<String> orgIds) {
this.orgIds = orgIds;
}
public List<Integer> getDataTypes() {
return dataTypes;
}
public void setDataTypes(List<Integer> dataTypes) {
this.dataTypes = dataTypes;
}
}
package pwc.taxtech.atms.dto.dataimport;
import pwc.taxtech.atms.dto.input.CamelPagingDto;
import pwc.taxtech.atms.vat.entity.RevenueConfig;
public class DataImportParam {
private CamelPagingDto pageInfo;
private Integer type;
public CamelPagingDto getPageInfo() {
return this.pageInfo;
}
public void setPageInfo(CamelPagingDto pageInfo) {
this.pageInfo = pageInfo;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
}
package pwc.taxtech.atms.dto.vatdto;
import pwc.taxtech.atms.dpo.PagingDto;
public class InvoiceDataParam {
private PagingDto pageInfo;
private String orgId;
private Integer periodStart;
private Integer periodEnd;
public Integer getPeriodStart() {
return periodStart;
}
public void setPeriodStart(Integer periodStart) {
this.periodStart = periodStart;
}
public Integer getPeriodEnd() {
return periodEnd;
}
public void setPeriodEnd(Integer periodEnd) {
this.periodEnd = periodEnd;
}
public String getOrgId() {
return this.orgId;
}
public void setOrgId(String orgId) {
this.orgId = orgId;
}
public PagingDto getPageInfo() {
return pageInfo;
}
public void setPageInfo(PagingDto pageInfo) {
this.pageInfo = pageInfo;
}
}
package pwc.taxtech.atms.dto.vatdto.dd;
import java.io.Serializable;
import java.math.BigDecimal;
/**
*
* This class was generated by MyBatis Generator.
* This class corresponds to the database table invoice_data
*
* @mbg.generated do_not_delete_during_merge
*/
public class InvoiceDataDto implements Serializable {
private String projectName;
private BigDecimal totalAmount;
private BigDecimal amount1;
private BigDecimal amount2;
private BigDecimal amount3;
private BigDecimal amount4;
private BigDecimal amount5;
private BigDecimal amount6;
private BigDecimal amount7;
private BigDecimal otherAmount;
public BigDecimal getTotalAmount() {
return totalAmount;
}
public void setTotalAmount(BigDecimal totalAmount) {
this.totalAmount = totalAmount;
}
public BigDecimal getAmount1() {
return amount1;
}
public void setAmount1(BigDecimal amount1) {
this.amount1 = amount1;
}
public BigDecimal getAmount2() {
return amount2;
}
public void setAmount2(BigDecimal amount2) {
this.amount2 = amount2;
}
public BigDecimal getAmount3() {
return amount3;
}
public void setAmount3(BigDecimal amount3) {
this.amount3 = amount3;
}
public BigDecimal getAmount4() {
return amount4;
}
public void setAmount4(BigDecimal amount4) {
this.amount4 = amount4;
}
public BigDecimal getAmount5() {
return amount5;
}
public void setAmount5(BigDecimal amount5) {
this.amount5 = amount5;
}
public BigDecimal getAmount6() {
return amount6;
}
public void setAmount6(BigDecimal amount6) {
this.amount6 = amount6;
}
public BigDecimal getAmount7() {
return amount7;
}
public void setAmount7(BigDecimal amount7) {
this.amount7 = amount7;
}
public BigDecimal getOtherAmount() {
return otherAmount;
}
public void setOtherAmount(BigDecimal otherAmount) {
this.otherAmount = otherAmount;
}
public String getProjectName() {
return projectName;
}
public void setProjectName(String projectName) {
this.projectName = projectName;
}
public InvoiceDataDto(){
}
public InvoiceDataDto(String projectName){
this.projectName = projectName;
}
}
\ No newline at end of file
......@@ -5,6 +5,8 @@ import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.google.common.collect.Lists;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.constant.enums.CountTypeConstant;
import pwc.taxtech.atms.constant.enums.CountTypeEnum;
import pwc.taxtech.atms.dao.OrganizationMapper;
import pwc.taxtech.atms.dto.vatdto.*;
import pwc.taxtech.atms.dto.vatdto.dd.*;
......@@ -20,6 +22,7 @@ import pwc.taxtech.atms.vat.entity.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.io.OutputStream;
import java.math.BigDecimal;
import java.util.*;
/**
......@@ -57,6 +60,9 @@ public class DataPreviewSerivceImpl extends BaseService {
@Resource
private CertifiedInvoicesListMapper certifiedInvoicesListMapper;
@Resource
private InvoiceDataMapper invoiceDataMapper;
@Resource
private OrganizationMapper organizationMapper;
......@@ -287,6 +293,57 @@ public class DataPreviewSerivceImpl extends BaseService {
return pageInfo;
}
/**
* 28/02/2019 10:18
* 导入时纵向存的,因为需求是行数一般不会增加,列数可能增加。查询时90度旋转
* 后续增加列 1、添加CountTypeConstant(按列递增) 2、增加setIDValue case 3、js添加column
* [param]
* @author Gary J Li
* @return
*/
public PageInfo<InvoiceDataDto> getIDDataForDisplay(InvoiceDataParam param) {
InvoiceDataCondition condition = beanUtil.copyProperties(param, new InvoiceDataCondition());
Page page = PageHelper.startPage(condition.getPageInfo().getPageIndex(), condition.getPageInfo().getPageSize());
List<InvoiceData> invoiceDatas = invoiceDataMapper.selectByCondition(condition);
List<InvoiceDataDto> invoiceDataDtos = generalIDDtoList();
if(invoiceDatas.size()>0){
invoiceDatas.forEach(id -> {
setIDValue(invoiceDataDtos,"专票正数发票份数",id.getCountType(),id.getSpecialInvoiceAmount1());
setIDValue(invoiceDataDtos,"专票负数发票份数",id.getCountType(),id.getSpecialInvoiceAmount2());
setIDValue(invoiceDataDtos,"专票正数废票份数",id.getCountType(),id.getSpecialInvoiceAmount3());
setIDValue(invoiceDataDtos,"专票负数废票份数",id.getCountType(),id.getSpecialInvoiceAmount4());
setIDValue(invoiceDataDtos,"专票销项正废金额",id.getCountType(),id.getSpecialInvoiceSalesAmount1());
setIDValue(invoiceDataDtos,"专票销项正数金额",id.getCountType(),id.getSpecialInvoiceSalesAmount2());
setIDValue(invoiceDataDtos,"专票销项负废金额",id.getCountType(),id.getSpecialInvoiceSalesAmount3());
setIDValue(invoiceDataDtos,"专票销项负数金额",id.getCountType(),id.getSpecialInvoiceSalesAmount4());
setIDValue(invoiceDataDtos,"专票实际销项金额",id.getCountType(),id.getSpecialInvoiceSalesAmount5());
setIDValue(invoiceDataDtos,"专票销项正废税额",id.getCountType(),id.getSpecialInvoiceTaxAmount1());
setIDValue(invoiceDataDtos,"专票销项正数税额",id.getCountType(),id.getSpecialInvoiceTaxAmount2());
setIDValue(invoiceDataDtos,"专票销项负废税额",id.getCountType(),id.getSpecialInvoiceTaxAmount3());
setIDValue(invoiceDataDtos,"专票销项负数税额",id.getCountType(),id.getSpecialInvoiceTaxAmount4());
setIDValue(invoiceDataDtos,"专票实际销项税额",id.getCountType(),id.getSpecialInvoiceTaxAmount5());
setIDValue(invoiceDataDtos,"普票正数发票份数",id.getCountType(),id.getInvoiceAmount1());
setIDValue(invoiceDataDtos,"普票负数发票份数",id.getCountType(),id.getInvoiceAmount2());
setIDValue(invoiceDataDtos,"普票正数废票份数",id.getCountType(),id.getInvoiceAmount3());
setIDValue(invoiceDataDtos,"普票负数废票份数",id.getCountType(),id.getInvoiceAmount4());
setIDValue(invoiceDataDtos,"普票销项正废金额",id.getCountType(),id.getInvoiceSalesAmount1());
setIDValue(invoiceDataDtos,"普票销项正数金额",id.getCountType(),id.getInvoiceSalesAmount2());
setIDValue(invoiceDataDtos,"普票销项负废金额",id.getCountType(),id.getInvoiceSalesAmount3());
setIDValue(invoiceDataDtos,"普票销项负数金额",id.getCountType(),id.getInvoiceSalesAmount4());
setIDValue(invoiceDataDtos,"普票实际销项金额",id.getCountType(),id.getInvoiceSalesAmount5());
setIDValue(invoiceDataDtos,"普票销项正废税额",id.getCountType(),id.getInvoiceTaxAmount1());
setIDValue(invoiceDataDtos,"普票销项正数税额",id.getCountType(),id.getInvoiceTaxAmount2());
setIDValue(invoiceDataDtos,"普票销项负废税额",id.getCountType(),id.getInvoiceTaxAmount3());
setIDValue(invoiceDataDtos,"普票销项负数税额",id.getCountType(),id.getInvoiceTaxAmount4());
setIDValue(invoiceDataDtos,"普票实际销项税额",id.getCountType(),id.getInvoiceTaxAmount5());
});
}
PageInfo<InvoiceDataDto> pageInfo =new PageInfo<>(invoiceDataDtos);
pageInfo.setTotal(invoiceDataDtos.size());
pageInfo.setPageNum(param.getPageInfo().getPageIndex());
return pageInfo;
}
public int getTBDownloadFilePath(TrialBalanceParam param, OutputStream os) {
try {
TrialBalanceCondition condition = new TrialBalanceCondition();
......@@ -549,4 +606,83 @@ public class DataPreviewSerivceImpl extends BaseService {
header.put("LateUpdatedDate","最后更新日期");
return header;
}
private List<InvoiceDataDto> generalIDDtoList() {
List<InvoiceDataDto> invoiceDataDtos = Lists.newArrayList();
invoiceDataDtos.add(new InvoiceDataDto("专票正数发票份数"));
invoiceDataDtos.add(new InvoiceDataDto("专票负数发票份数"));
invoiceDataDtos.add(new InvoiceDataDto("专票正数废票份数"));
invoiceDataDtos.add(new InvoiceDataDto("专票负数废票份数"));
invoiceDataDtos.add(new InvoiceDataDto("专票销项正废金额"));
invoiceDataDtos.add(new InvoiceDataDto("专票销项正数金额"));
invoiceDataDtos.add(new InvoiceDataDto("专票销项负废金额"));
invoiceDataDtos.add(new InvoiceDataDto("专票销项负数金额"));
invoiceDataDtos.add(new InvoiceDataDto("专票实际销项金额"));
invoiceDataDtos.add(new InvoiceDataDto("专票销项正废税额"));
invoiceDataDtos.add(new InvoiceDataDto("专票销项正数税额"));
invoiceDataDtos.add(new InvoiceDataDto("专票销项负废税额"));
invoiceDataDtos.add(new InvoiceDataDto("专票销项负数税额"));
invoiceDataDtos.add(new InvoiceDataDto("专票实际销项税额"));
invoiceDataDtos.add(new InvoiceDataDto("普票正数发票份数"));
invoiceDataDtos.add(new InvoiceDataDto("普票负数发票份数"));
invoiceDataDtos.add(new InvoiceDataDto("普票正数废票份数"));
invoiceDataDtos.add(new InvoiceDataDto("普票负数废票份数"));
invoiceDataDtos.add(new InvoiceDataDto("普票销项正废金额"));
invoiceDataDtos.add(new InvoiceDataDto("普票销项正数金额"));
invoiceDataDtos.add(new InvoiceDataDto("普票销项负废金额"));
invoiceDataDtos.add(new InvoiceDataDto("普票销项负数金额"));
invoiceDataDtos.add(new InvoiceDataDto("普票实际销项金额"));
invoiceDataDtos.add(new InvoiceDataDto("普票销项正废税额"));
invoiceDataDtos.add(new InvoiceDataDto("普票销项正数税额"));
invoiceDataDtos.add(new InvoiceDataDto("普票销项负废税额"));
invoiceDataDtos.add(new InvoiceDataDto("普票销项负数税额"));
invoiceDataDtos.add(new InvoiceDataDto("普票实际销项税额"));
return invoiceDataDtos;
}
private void setIDValue(List<InvoiceDataDto> idDtos, String column, Integer row, Object value) {
for(InvoiceDataDto idto : idDtos){
if(idto.getProjectName().equals(column)){
switch (row) {
case CountTypeConstant.TOTAL:
idto.setTotalAmount(new BigDecimal (value.toString()));
break;
case CountTypeConstant.SIXTEEN_PERCENT:
idto.setAmount1(new BigDecimal (value.toString()));
break;
case CountTypeConstant.TEN_PERCENT:
idto.setAmount2(new BigDecimal (value.toString()));
break;
case CountTypeConstant.SIX_PERCENT:
idto.setAmount3(new BigDecimal (value.toString()));
break;
case CountTypeConstant.THREE_PERCENT:
idto.setAmount4(new BigDecimal (value.toString()));
break;
case CountTypeConstant.SEVENTEEN_PERCENT:
idto.setAmount5(new BigDecimal (value.toString()));
break;
case CountTypeConstant.ELEVEN_PERCENT:
idto.setAmount6(new BigDecimal (value.toString()));
break;
case CountTypeConstant.FIVE_PERCENT:
idto.setAmount7(new BigDecimal (value.toString()));
break;
case CountTypeConstant.OTHER:
idto.setOtherAmount(new BigDecimal (value.toString()));
break;
default:
break;
}
break;
}
}
}
}
package pwc.taxtech.atms.service.impl;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import pwc.taxtech.atms.common.OperateLogType;
import pwc.taxtech.atms.common.OperationAction;
import pwc.taxtech.atms.common.OperationModule;
......@@ -217,7 +215,7 @@ public class EquityServiceImpl extends BaseService{
} else {
opLog.setAction(OperationAction.ChangeEquity.value());
}
opLog.setOperationContent(LogMessage.IsActive);
opLog.setOperationContent(LogMessage.ChangeOrganizationEquity);
opLog.setOperationObject(orgName);
opLog.setOriginalState(oldId == null ? "" : String.valueOf(oldId));
opLog.setUpdateState(String.valueOf(newId));
......
......@@ -222,7 +222,7 @@ public class OrganizationServiceImpl extends BaseService{
// find rootOrg
List<Organization> rootOrgs = null;
if (useType == 1) {
rootOrgs = orgList.stream().filter(x -> x.getParentId() == null).collect(Collectors.toList());
rootOrgs = orgList.stream().filter(x -> StringUtils.isEmpty(x.getParentId())).collect(Collectors.toList());
} else {
rootOrgs = orgList.stream()
.filter(x -> x.getParentId() == null && CommonConstants.ACTIVE_STATUS.equals(x.getIsActive()))
......@@ -242,7 +242,7 @@ public class OrganizationServiceImpl extends BaseService{
private OrganizationDto genarateSubOrgs(OrganizationDto parentOrg, List<Organization> orgs,
List<ServiceType> serviceList, Integer useType) {
if (parentOrg.getParentId() != null) {
if (StringUtils.isNotEmpty(parentOrg.getParentId())) {
Organization organization = orgs.stream().filter(x -> x.getId().equals(parentOrg.getParentId()))
.collect(Collectors.toList()).get(0);
parentOrg.setParentName(organization == null ? null : organization.getName());
......@@ -1932,7 +1932,7 @@ public class OrganizationServiceImpl extends BaseService{
}
}
result.setOrganizationServiceTemplateGroupList(query2);
if (result.getParentId() == null) {
if (StringUtils.isEmpty(result.getParentId())) {
result.setParentName("");
} else {
Organization tParent = organizationMapper.selectByExample(null).stream()
......@@ -1948,7 +1948,9 @@ public class OrganizationServiceImpl extends BaseService{
OrganizationExtraDto organizationExtraDto = new OrganizationExtraDto();
OrganizationExtra organizationExtra = organizationExtraMapper.selectByOrgId(orgId).stream().findFirst()
.orElse(null);
if(null!=organizationExtra){
beanUtil.copyProperties(organizationExtra,organizationExtraDto);
}
return organizationExtraDto;
}
......@@ -2777,9 +2779,9 @@ public class OrganizationServiceImpl extends BaseService{
* @author Gary J Li
* @return
*/
public List<OrgSimpleDto> getOrgSimpleList() {
public List<OrgSelectDto> getOrgSimpleList() {
String userId = authUserHelper.getCurrentUserId();
List<OrgSimpleDto> orgSimpleDtos = Lists.newArrayList();
List<OrgSelectDto> orgSelectDtos = Lists.newArrayList();
UserOrganizationExample userOrganizationExample = new UserOrganizationExample();
userOrganizationExample.createCriteria().andUserIdEqualTo(userId);
List<UserOrganization> userOrganizations = userOrganizationMapper.selectByExample(userOrganizationExample);
......@@ -2788,10 +2790,10 @@ public class OrganizationServiceImpl extends BaseService{
organizationExample.createCriteria().andIdIn(orgIds);
List<Organization> organizations = organizationMapper.selectByExample(organizationExample);
organizations.forEach(o -> {
OrgSimpleDto orgSimpleDto = beanUtil.copyProperties(o,new OrgSimpleDto());
orgSimpleDtos.add(orgSimpleDto);
OrgSelectDto orgSelectDto = beanUtil.copyProperties(o,new OrgSelectDto());
orgSelectDtos.add(orgSelectDto);
});
return orgSimpleDtos;
return orgSelectDtos;
}
/**
......
......@@ -10,7 +10,7 @@ mail_jdbc_url=jdbc:sqlserver://192.168.1.102:1434;DatabaseName=MAILMaster
mail_jdbc_user=sa
mail_jdbc_password=atmsunittestSQL
web.url=http://etms.longi-silicon.com:8080
web.url=http://dts.erp.didichuxing.com:8080
#web.url=*
jwt.base64Secret=TXppQjFlZFBSbnJzMHc0Tg==
jwt.powerToken=xxxx
......@@ -28,7 +28,7 @@ max_file_length=104857600
distributed_id_datacenter=1
distributed_id_machine=1
api.url=http://etms.longi-silicon.com:8180
api.url=http://dts.erp.didichuxing.com:8180
# Longi config
longi_api_basic_user=
......
......@@ -15,7 +15,7 @@ mail_jdbc_url=jdbc:sqlserver://192.168.1.102:1434;DatabaseName=MAILMaster
mail_jdbc_user=sa
mail_jdbc_password=atmsunittestSQL
web.url=http://etms.longi-silicon.com:8081
web.url=http://dts.erp.didichuxing.com:8080
#web.url=*
jwt.base64Secret=TXppQjFlZFBSbnJzMHc0Tg==
jwt.powerToken=xxxx
......@@ -33,7 +33,7 @@ max_file_length=104857600
distributed_id_datacenter=10
distributed_id_machine=15
api.url=http://etms.longi-silicon.com:8181
api.url=http://dts.erp.didichuxing.com:8180
# Longi config
longi_api_basic_user=
......
......@@ -10,7 +10,7 @@ mail_jdbc_url=jdbc:sqlserver://192.168.1.102:1434;DatabaseName=MAILMaster
mail_jdbc_user=sa
mail_jdbc_password=atmsunittestSQL
web.url=http://etms.longi-silicon.com:10000
web.url=http://dts.erp.didichuxing.com:10000
#web.url=*
jwt.base64Secret=TXppQjFlZFBSbnJzMHc0Tg==
jwt.powerToken=xxxx
......@@ -28,7 +28,7 @@ max_file_length=104857600
distributed_id_datacenter=10
distributed_id_machine=10
api.url=http://etms.longi-silicon.com:20000
api.url=http://dts.erp.didichuxing.com:20000
# Longi config
longi_api_basic_user=
......
package pwc.taxtech.atms;
import java.util.HashMap;
import java.util.Map;
/**
* @Auther: Gary J Li
* @Date: 26/02/2019 13:50
* @Description:
*/
public enum OrgKV {
orgId("organizationId", "机构代码"),
registrationCapital("registrationCapital", "注册资本"),
paidInCapital("paidInCapital", "实缴资本"),
regStatus("regStatus", "经营状态"),
foundationDate("foundationDate", "成立日期"),
legalCode("legalCode", "统一社会信用代码"),
taxPayerNumber("taxPayerNumber", "纳税人识别号"),
// dontKnow("clientCode", "注册号"),
// dontKnow1("?", "组织机构代码"),
registrationType("registrationType", "公司类型"),
nationalEconomicIndustry("nationalEconomicIndustry", "所属行业"),//所属国民经济行业
// area("area", "所属地区"),
englishName("englishName", "英文名"),
employeesNumEnd("employeesNumEnd", "参保人数"),
registerAddress("registerAddress", "企业地址"),
businessScope("businessScope", "经营范围"),
eNum("eNum", "序号"),
investorName("investorName", "股东(发起人)"),
investmentRadio("investmentRadio", "持股比例"),//投资比例
investmentAmount("investmentAmount", "认缴出资额"),//投资金额
investmentAmount1("investmentAmount", "认缴出资额(万元)"),//投资金额
investmentAmount2("investmentAmount", "认缴出资额(万美元)"),//投资金额
// registrationCapital("registrationCapital", "认缴出资日期"),
payableCapitalContributionAmount("payableCapitalContributionAmount", "实缴出资额(万元)"),//实缴出资金额
// registrationCapital("registrationCapital", "实缴出资日期"),
createTime("createTime", "变更日期"),
comment("comment", "变更项目"),
originalState("originalState", "变更前"),
updateState("updateState", "变更后");
private String attribute;
private String name;
public static final Map<String, String> Map = new HashMap<>();
static {
for (OrgKV kv : OrgKV.values()) {
Map.put(kv.getName(), kv.getAttribute());
}
}
OrgKV(String attribute, String name) {
this.attribute = attribute;
this.name = name;
}
public String getAttribute() {
return attribute;
}
public String getName() {
return name;
}
}
package pwc.taxtech.atms.dto;
import java.util.List;
import java.util.Map;
/**
* @Auther: Gary J Li
* @Date: 26/02/2019 12:45
* @Description:
*/
public class OrgDto {
private List<Map> orgs;
public List<Map> getOrgs() {
return orgs;
}
public void setOrgs(List<Map> orgs) {
this.orgs = orgs;
}
}
This diff is collapsed.
package pwc.taxtech.atms.dao;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import pwc.taxtech.atms.MyMapper;
import pwc.taxtech.atms.entity.OperationLogEquity;
import pwc.taxtech.atms.entity.OperationLogEquityExample;
@Mapper
public interface OperationLogEquityMapper extends MyMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operation_log_equity
*
* @mbg.generated
*/
long countByExample(OperationLogEquityExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operation_log_equity
*
* @mbg.generated
*/
int deleteByExample(OperationLogEquityExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operation_log_equity
*
* @mbg.generated
*/
int deleteByPrimaryKey(String id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operation_log_equity
*
* @mbg.generated
*/
int insert(OperationLogEquity record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operation_log_equity
*
* @mbg.generated
*/
int insertSelective(OperationLogEquity record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operation_log_equity
*
* @mbg.generated
*/
List<OperationLogEquity> selectByExampleWithRowbounds(OperationLogEquityExample example, RowBounds rowBounds);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operation_log_equity
*
* @mbg.generated
*/
List<OperationLogEquity> selectByExample(OperationLogEquityExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operation_log_equity
*
* @mbg.generated
*/
OperationLogEquity selectByPrimaryKey(String id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operation_log_equity
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") OperationLogEquity record, @Param("example") OperationLogEquityExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operation_log_equity
*
* @mbg.generated
*/
int updateByExample(@Param("record") OperationLogEquity record, @Param("example") OperationLogEquityExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operation_log_equity
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(OperationLogEquity record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operation_log_equity
*
* @mbg.generated
*/
int updateByPrimaryKey(OperationLogEquity record);
}
\ No newline at end of file
......@@ -5,6 +5,7 @@ import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import pwc.taxtech.atms.MyVatMapper;
import pwc.taxtech.atms.vat.dpo.InvoiceDataCondition;
import pwc.taxtech.atms.vat.entity.InvoiceData;
import pwc.taxtech.atms.vat.entity.InvoiceDataExample;
......@@ -107,4 +108,6 @@ public interface InvoiceDataMapper extends MyVatMapper {
int updateByPrimaryKey(InvoiceData record);
int insertBatch(List<InvoiceData> iDatas);
List<InvoiceData> selectByCondition(@Param("idCondition") InvoiceDataCondition condition);
}
\ No newline at end of file
package pwc.taxtech.atms.vat.dao;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import pwc.taxtech.atms.MyVatMapper;
import pwc.taxtech.atms.vat.entity.RevenueTypeMapping;
import pwc.taxtech.atms.vat.entity.RevenueTypeMappingExample;
@Mapper
public interface RevenueTypeMappingMapper extends MyVatMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table revenue_type_mapping
*
* @mbg.generated
*/
long countByExample(RevenueTypeMappingExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table revenue_type_mapping
*
* @mbg.generated
*/
int deleteByExample(RevenueTypeMappingExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table revenue_type_mapping
*
* @mbg.generated
*/
int deleteByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table revenue_type_mapping
*
* @mbg.generated
*/
int insert(RevenueTypeMapping record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table revenue_type_mapping
*
* @mbg.generated
*/
int insertSelective(RevenueTypeMapping record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table revenue_type_mapping
*
* @mbg.generated
*/
List<RevenueTypeMapping> selectByExampleWithRowbounds(RevenueTypeMappingExample example, RowBounds rowBounds);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table revenue_type_mapping
*
* @mbg.generated
*/
List<RevenueTypeMapping> selectByExample(RevenueTypeMappingExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table revenue_type_mapping
*
* @mbg.generated
*/
RevenueTypeMapping selectByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table revenue_type_mapping
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") RevenueTypeMapping record, @Param("example") RevenueTypeMappingExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table revenue_type_mapping
*
* @mbg.generated
*/
int updateByExample(@Param("record") RevenueTypeMapping record, @Param("example") RevenueTypeMappingExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table revenue_type_mapping
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(RevenueTypeMapping record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table revenue_type_mapping
*
* @mbg.generated
*/
int updateByPrimaryKey(RevenueTypeMapping record);
}
\ No newline at end of file
package pwc.taxtech.atms.vat.dpo;
import pwc.taxtech.atms.dpo.PagingDto;
public class InvoiceDataCondition {
private PagingDto pageInfo;
private String orgId;
private Integer periodStart;
private Integer periodEnd;
public Integer getPeriodStart() {
return periodStart;
}
public void setPeriodStart(Integer periodStart) {
this.periodStart = periodStart;
}
public Integer getPeriodEnd() {
return periodEnd;
}
public void setPeriodEnd(Integer periodEnd) {
this.periodEnd = periodEnd;
}
public String getOrgId() {
return this.orgId;
}
public void setOrgId(String orgId) {
this.orgId = orgId;
}
public PagingDto getPageInfo() {
return pageInfo;
}
public void setPageInfo(PagingDto pageInfo) {
this.pageInfo = pageInfo;
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="pwc.taxtech.atms.vat.dao.InvoiceDataMapper">
<sql id="QueryCondition">
1 = 1
<if test="@com.github.pagehelper.util.StringUtil@isNotEmpty(idCondition.orgId)">
AND organization_id= #{idCondition.orgId,jdbcType=VARCHAR}
</if>
<if test="idCondition.periodStart!=null">
AND period &gt;= #{idCondition.periodStart,jdbcType=INTEGER}
</if>
<if test="idCondition.periodEnd!=null">
AND period &lt;= #{idCondition.periodEnd,jdbcType=INTEGER}
</if>
</sql>
<select id="selectByCondition" parameterType="pwc.taxtech.atms.vat.dpo.InvoiceDataCondition" resultMap="BaseResultMap">
SELECT
id.*
FROM
invoice_data id
WHERE
<include refid="QueryCondition"/>
</select>
<insert id="insertBatch" parameterType="java.util.List">
insert into invoice_data
(<include refid="Base_Column_List"/>)
......
......@@ -11,19 +11,19 @@
AND segment3= #{jeCondition.segment3,jdbcType=VARCHAR}
</if>
<if test="@com.github.pagehelper.util.StringUtil@isNotEmpty(jeCondition.segment3Name)">
AND segment3Name= #{jeCondition.segment3Name,jdbcType=VARCHAR}
AND segment3_name= #{jeCondition.segment3Name,jdbcType=VARCHAR}
</if>
<if test="@com.github.pagehelper.util.StringUtil@isNotEmpty(jeCondition.segment5)">
AND segment5= #{jeCondition.segment5,jdbcType=VARCHAR}
</if>
<if test="@com.github.pagehelper.util.StringUtil@isNotEmpty(jeCondition.segment5Name)">
AND segment5Name= #{jeCondition.segment5Name,jdbcType=VARCHAR}
AND segment5_name= #{jeCondition.segment5Name,jdbcType=VARCHAR}
</if>
<if test="@com.github.pagehelper.util.StringUtil@isNotEmpty(jeCondition.segment6)">
AND segment6= #{jeCondition.segment6,jdbcType=VARCHAR}
</if>
<if test="@com.github.pagehelper.util.StringUtil@isNotEmpty(jeCondition.segment6Name)">
AND segment6Name= #{jeCondition.segment6Name,jdbcType=VARCHAR}
AND segment6_name= #{jeCondition.segment6Name,jdbcType=VARCHAR}
</if>
<if test="@com.github.pagehelper.util.StringUtil@isNotEmpty(jeCondition.description)">
AND description= #{jeCondition.description,jdbcType=VARCHAR}
......
api.url=http://etms.longi-silicon.com:8180/
api.url=http://dts.erp.didichuxing.com:8180/
cookie.maxAgeSeconds=86400
......
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