Commit 274fb537 authored by eddie.woo's avatar eddie.woo

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

parents 91f58893 11c870af
package pwc.taxtech.atms.common.schedule;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.quartz.QuartzJobBean;
import pwc.taxtech.atms.service.impl.TaxEamilServiceImpl;
/**
* @version 1.0
* @program: atms
* @description: 分享模块定时任务
* @author: Kevin
* @create: 2019-04-26 12:16
**/
public class ShareJob extends QuartzJobBean {
@Autowired
private TaxEamilServiceImpl taxEamilService;
@Override
protected void executeInternal(JobExecutionContext context) throws JobExecutionException {
taxEamilService.jobEmail();
}
}
package pwc.taxtech.atms.common.util;
import com.sun.org.apache.xerces.internal.impl.dv.util.Base64;
import javax.crypto.Cipher;
import javax.crypto.KeyGenerator;
import javax.crypto.Mac;
import javax.crypto.SecretKey;
import javax.crypto.spec.SecretKeySpec;
import java.security.MessageDigest;
import java.security.SecureRandom;
public class EncryptUtil {
public static final String MD5 = "MD5";
public static final String SHA1 = "SHA1";
public static final String HmacMD5 = "HmacMD5";
public static final String HmacSHA1 = "HmacSHA1";
public static final String DES = "DES";
public static final String AES = "AES";
/**编码格式;默认使用uft-8*/
public static String charset = "utf-8";
/**DES*/
public static int keysizeDES = 0;
/**AES*/
public static int keysizeAES = 128;
public static EncryptUtil me;
private EncryptUtil(){
//单例
}
//双重锁
public static EncryptUtil getInstance(){
if (me==null) {
synchronized (EncryptUtil.class) {
if(me == null){
me = new EncryptUtil();
}
}
}
return me;
}
/**
* 使用MessageDigest进行单向加密(无密码)
* @param res 被加密的文本
* @param algorithm 加密算法名称
* @return
*/
private static String messageDigest(String res,String algorithm){
try {
MessageDigest md = MessageDigest.getInstance(algorithm);
byte[] resBytes = charset==null?res.getBytes():res.getBytes(charset);
return base64(md.digest(resBytes));
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
/**
* 使用KeyGenerator进行单向/双向加密(可设密码)
* @param res 被加密的原文
* @param algorithm 加密使用的算法名称
* @param key 加密使用的秘钥
* @return
*/
private static String keyGeneratorMac(String res,String algorithm,String key){
try {
SecretKey sk = null;
if (key==null) {
KeyGenerator kg = KeyGenerator.getInstance(algorithm);
sk = kg.generateKey();
}else {
byte[] keyBytes = charset==null?key.getBytes():key.getBytes(charset);
sk = new SecretKeySpec(keyBytes, algorithm);
}
Mac mac = Mac.getInstance(algorithm);
mac.init(sk);
byte[] result = mac.doFinal(res.getBytes());
return base64(result);
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
/**
* 使用KeyGenerator双向加密,DES/AES,注意这里转化为字符串的时候是将2进制转为16进制格式的字符串,不是直接转,因为会出错
* @param res 加密的原文
* @param algorithm 加密使用的算法名称
* @param key 加密的秘钥
* @param keysize
* @param isEncode
* @return
*/
private static String keyGeneratorES(String res,String algorithm,String key,int keysize,boolean isEncode){
try {
KeyGenerator kg = KeyGenerator.getInstance(algorithm);
if (keysize == 0) {
byte[] keyBytes = charset==null?key.getBytes():key.getBytes(charset);
kg.init(new SecureRandom(keyBytes));
}else if (key==null) {
kg.init(keysize);
}else {
byte[] keyBytes = charset==null?key.getBytes():key.getBytes(charset);
kg.init(keysize, new SecureRandom(keyBytes));
}
SecretKey sk = kg.generateKey();
SecretKeySpec sks = new SecretKeySpec(sk.getEncoded(), algorithm);
Cipher cipher = Cipher.getInstance(algorithm);
if (isEncode) {
cipher.init(Cipher.ENCRYPT_MODE, sks);
byte[] resBytes = charset==null?res.getBytes():res.getBytes(charset);
return parseByte2HexStr(cipher.doFinal(resBytes));
}else {
cipher.init(Cipher.DECRYPT_MODE, sks);
return new String(cipher.doFinal(parseHexStr2Byte(res)));
}
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
private static String base64(byte[] res){
return Base64.encode(res);
}
/**将二进制转换成16进制 */
public static String parseByte2HexStr(byte buf[]) {
StringBuffer sb = new StringBuffer();
for (int i = 0; i < buf.length; i++) {
String hex = Integer.toHexString(buf[i] & 0xFF);
if (hex.length() == 1) {
hex = '0' + hex;
}
sb.append(hex.toUpperCase());
}
return sb.toString();
}
/**将16进制转换为二进制*/
public static byte[] parseHexStr2Byte(String hexStr) {
if (hexStr.length() < 1)
return null;
byte[] result = new byte[hexStr.length()/2];
for (int i = 0;i< hexStr.length()/2; i++) {
int high = Integer.parseInt(hexStr.substring(i*2, i*2+1), 16);
int low = Integer.parseInt(hexStr.substring(i*2+1, i*2+2), 16);
result[i] = (byte) (high * 16 + low);
}
return result;
}
/**
* md5加密算法进行加密(不可逆)
* @param res 需要加密的原文
* @return
*/
public static String MD5(String res) {
return messageDigest(res, MD5);
}
/**
* md5加密算法进行加密(不可逆)
* @param res 需要加密的原文
* @param key 秘钥
* @return
*/
public static String MD5(String res, String key) {
return keyGeneratorMac(res, HmacMD5, key);
}
/**
* 使用SHA1加密算法进行加密(不可逆)
* @param res 需要加密的原文
* @return
*/
public static String SHA1(String res) {
return messageDigest(res, SHA1);
}
/**
* 使用SHA1加密算法进行加密(不可逆)
* @param res 需要加密的原文
* @param key 秘钥
* @return
*/
public static String SHA1(String res, String key) {
return keyGeneratorMac(res, HmacSHA1, key);
}
/**
* 使用DES加密算法进行加密(可逆)
* @param res 需要加密的原文
* @param key 秘钥
* @return
*/
public String DESencode(String res, String key) {
return keyGeneratorES(res, DES, key, keysizeDES, true);
}
/**
* 对使用DES加密算法的密文进行解密(可逆)
* @param res 需要解密的密文
* @param key 秘钥
* @return
*/
public static String DESdecode(String res, String key) {
return keyGeneratorES(res, DES, key, keysizeDES, false);
}
/**
* 生成密钥
* 自动生成base64 编码后的AES128位密钥
*
* @throws //NoSuchAlgorithmException
* @throws //UnsupportedEncodingException
*/
public static String getAESKey() throws Exception {
KeyGenerator kg = KeyGenerator.getInstance("AES");
kg.init(128);//要生成多少位,只需要修改这里即可128, 192或256
SecretKey sk = kg.generateKey();
byte[] b = sk.getEncoded();
return parseByte2HexStr(b);
}
/**
* 使用AES加密算法经行加密(可逆)
* @param res 需要加密的密文
* @param key 秘钥
* @return
*/
public static String AESencode(String res, String key) {
return keyGeneratorES(res, AES, key, keysizeAES, true);
}
/**
* 对使用AES加密算法的密文进行解密
* @param res 需要解密的密文
* @param key 秘钥
* @return
*/
public static String AESdecode(String res, String key) {
return keyGeneratorES(res, AES, key, keysizeAES, false);
}
/**
* 使用异或进行加密
* @param res 需要加密的密文
* @param key 秘钥
* @return
*/
public static String XORencode(String res, String key) {
byte[] bs = res.getBytes();
for (int i = 0; i < bs.length; i++) {
bs[i] = (byte) ((bs[i]) ^ key.hashCode());
}
return parseByte2HexStr(bs);
}
/**
* 使用异或进行解密
* @param res 需要解密的密文
* @param key 秘钥
* @return
*/
public static String XORdecode(String res, String key) {
byte[] bs = parseHexStr2Byte(res);
for (int i = 0; i < bs.length; i++) {
bs[i] = (byte) ((bs[i]) ^ key.hashCode());
}
return new String(bs);
}
/**
* 直接使用异或(第一调用加密,第二次调用解密)
* @param res 密文
* @param key 秘钥
* @return
*/
public static int XOR(int res, String key) {
return res ^ key.hashCode();
}
/**
* 使用Base64进行加密
* @param res 密文
* @return
*/
public static String Base64Encode(String res) {
return Base64.encode(res.getBytes());
}
/**
* 使用Base64进行解密
* @param res
* @return
*/
public static String Base64Decode(String res) {
return new String(Base64.decode(res));
}
}
\ No newline at end of file
......@@ -8,6 +8,7 @@ import pwc.taxtech.atms.dao.*;
import pwc.taxtech.atms.invoice.InputInvoiceMapper;
import pwc.taxtech.atms.invoice.OutputInvoiceDetailMapper;
import pwc.taxtech.atms.invoice.OutputInvoiceMapper;
import pwc.taxtech.atms.service.impl.DidiFileUploadService;
import pwc.taxtech.atms.service.impl.DistributedIdService;
import pwc.taxtech.atms.vat.dao.*;
......@@ -75,7 +76,7 @@ public class SpringContextUtil implements ApplicationContextAware {
public static CitBalanceSheetPrcAdjustMapper citBalanceSheetPrcAdjustMapper;
public static CitProfitPrcAdjustMapper citProfitPrcAdjustMapper;
public static BalanceSheetMapper balanceSheetMapper;
public static DidiFileUploadService didiFileUploadService;
public static Map map = new HashMap<String, Object>();
/**
......@@ -150,6 +151,7 @@ public class SpringContextUtil implements ApplicationContextAware {
certifiedInvoicesListMapper = webApplicationContext.getBean(CertifiedInvoicesListMapper.class);
trialBalanceMappingMapper = webApplicationContext.getBean(TrialBalanceMappingMapper.class);
revenueConfigMapper = webApplicationContext.getBean(RevenueConfigMapper.class);
didiFileUploadService = webApplicationContext.getBean(DidiFileUploadService.class);
/* map.put("balance_sheet", balanceMapper);
map.put("profit_loss_statement",profitLossStatementMapper);
map.put("cash_flow", cashFlowMapper);
......
......@@ -26,7 +26,8 @@ public class ProjectStatusManageController {
public OperationResultDto<ProjectStatusManageDto> setProjectStatus(@PathVariable("projectId") String projectId,
@PathVariable("periodId") Integer periodId,
@PathVariable("status") Integer status) {
return projectStatusManageService.setProjectStatus(projectId, periodId, status, identityService.getIdentityUser().getId());
return projectStatusManageService.setProjectStatus(projectId, periodId, status,
identityService.getIdentityUser().getId());
}
......
package pwc.taxtech.atms.security;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import io.jsonwebtoken.impl.DefaultClaims;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
......@@ -11,8 +9,6 @@ import org.springframework.security.core.Authentication;
import org.springframework.security.core.AuthenticationException;
import org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter;
import org.springframework.util.StringUtils;
import pwc.taxtech.atms.common.util.HttpUtil;
import pwc.taxtech.atms.dto.AtmsTokenDto;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
......
......@@ -104,6 +104,8 @@ public class DataImportService extends BaseService {
private OrganizationServiceImpl organizationService;
@Autowired
private OrganizationAccountingRateMapper organizationAccountingRateMapper;
@Resource
private UserMapper userMapper;
private static String ebsCallUrl;
......@@ -2155,6 +2157,12 @@ public class DataImportService extends BaseService {
criteria.andTypeEqualTo(param.getType()).andDisplayEqualTo(true);
criteria.andOrganizationIdIn(orgIds);
}
//财务数据抽取展示抽取记录除了admin能查看所有操作人员的操作,其余人员只能看到本身的
String uid = authUserHelper.getCurrentUserId();
User user = userMapper.selectByPrimaryKey(uid);
if (!user.getIsSuperAdmin()) {
criteria.andOperatorEqualTo(authUserHelper.getCurrentAuditor().get());
}
example.setOrderByClause("update_time desc");
Page page = PageHelper.startPage(param.getPageInfo().getPageIndex(), param.getPageInfo().getPageSize());
PageInfo<DataImportLogDto> pageInfo = new PageInfo<>(dataImportLogMapper.selectByExample(example).stream()
......@@ -2193,7 +2201,14 @@ public class DataImportService extends BaseService {
DataImportLogExample.Criteria criteria = example.createCriteria();
Page page = PageHelper.startPage(param.getPageInfo().getPageIndex(), param.getPageInfo().getPageSize());
List<String> orgIds = organizationService.getMyOrgList().stream().map(OrgSelectDto::getId).collect(Collectors.toList());
criteria.andOrganizationIdIn(orgIds).andCreateTimeBetween(strDate, endDate);
//财务数据抽取展示抽取记录除了admin能查看所有操作人员的操作,其余人员只能看到本身的
String uid = authUserHelper.getCurrentUserId();
User user = userMapper.selectByPrimaryKey(uid);
if (user.getIsSuperAdmin()) {
criteria.andOrganizationIdIn(orgIds).andCreateTimeBetween(strDate, endDate);
} else {
criteria.andOrganizationIdIn(orgIds).andCreateTimeBetween(strDate, endDate).andOperatorEqualTo(authUserHelper.getCurrentAuditor().get());
}
example.setOrderByClause("update_time desc");
PageInfo<DataImportLogDto> pageInfo = new PageInfo<>(dataImportLogMapper.selectByExample(example).stream()
.map(o -> beanUtil.copyProperties(o, new DataImportLogDto())).collect(Collectors.toList()));
......
......@@ -15,11 +15,13 @@ import org.springframework.web.multipart.MultipartFile;
import pwc.taxtech.atms.common.CommonUtils;
import pwc.taxtech.atms.common.POIUtil;
import pwc.taxtech.atms.constant.enums.RevenueConfEnum;
import pwc.taxtech.atms.dao.OrganizationMapper;
import pwc.taxtech.atms.dpo.OrgSelectDto;
import pwc.taxtech.atms.dto.ApiResultDto;
import pwc.taxtech.atms.dto.revenuconf.RevConfAddDto;
import pwc.taxtech.atms.dto.revenuconf.RevenueConfParam;
import pwc.taxtech.atms.dto.revenuconf.RevenueConfResult;
import pwc.taxtech.atms.entity.Organization;
import pwc.taxtech.atms.exception.Exceptions;
import pwc.taxtech.atms.vat.dao.RevenueConfigMapper;
import pwc.taxtech.atms.vat.entity.RevenueConfig;
......@@ -38,6 +40,8 @@ public class RevenueConfService extends BaseService {
private RevenueConfigMapper revenueConfigMapper;
@Resource
private OrganizationServiceImpl organizationService;
@Resource
private OrganizationMapper organizationMapper;
/**
* 分页查询可查看的配置信息
......@@ -85,17 +89,25 @@ public class RevenueConfService extends BaseService {
*/
public ApiResultDto addConfig(RevConfAddDto addDto) {
RevenueConfigExample revenueConfigExample = new RevenueConfigExample();
revenueConfigExample.createCriteria().andNameEqualTo(addDto.getName());
List<RevenueConfig> list = revenueConfigMapper.selectByExample(revenueConfigExample);
if (list.size() > 0) {
ApiResultDto apiResultDto = ApiResultDto.success();
apiResultDto.setMessage("DuplicateName");
return apiResultDto;
}
if (!CollectionUtils.isEmpty(addDto.getOrgList())) {
//在新增之前先验证机构和名称组合是否唯一 by zhikai.wei start
StringBuilder sb = new StringBuilder();
ApiResultDto apiResultDto = new ApiResultDto();
for (String orgId : addDto.getOrgList()) {
RevenueConfigExample revenueConfigExample = new RevenueConfigExample();
revenueConfigExample.createCriteria().andNameEqualTo(addDto.getName()).andOrgIdEqualTo(orgId);
List<RevenueConfig> list = revenueConfigMapper.selectByExample(revenueConfigExample);
if (list.size() > 0) {
sb.append(organizationMapper.selectByPrimaryKey(orgId).getName()).append("\n");
apiResultDto.setMessage("DuplicateName");
}
}
if(StringUtils.isNotBlank(apiResultDto.getMessage())){
apiResultDto.setData(sb.toString());
return apiResultDto;
}
//在新增之前先验证机构和名称组合是否唯一 by zhikai.wei end
addDto.getOrgList().forEach(id -> {
addDto.setId(idService.nextId());
addDto.setOrgId(id);
......
package pwc.taxtech.atms.service.impl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.common.util.JavaEmailUtil;
import pwc.taxtech.atms.dao.TaxEmailMapper;
import pwc.taxtech.atms.entity.TaxEmail;
import pwc.taxtech.atms.entity.TaxEmailExample;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* @version 1.0
* @program: atms
* @description:
* @author: Kevin
* @create: 2019-04-26 12:28
**/
@Service
public class TaxEamilServiceImpl {
private Logger logger = LoggerFactory.getLogger(TaxEamilServiceImpl.class);
@Autowired
private TaxEmailMapper taxEmailMapper;
@Autowired
private JavaEmailUtil javaEmailUtil;
@Autowired
protected DistributedIdService idService;
public void jobEmail() {
try {
List<Map<String, Object>> emails = javaEmailUtil.getEmails(true);
emails.forEach(e -> {
TaxEmail taxEmail = new TaxEmail();
taxEmail.setCreateBy((String) e.get("from_person"));
taxEmail.setCreatetime((Date) e.get("sendDate"));
taxEmail.setId(String.valueOf(idService.nextId()));
if(e.get("type") != null && e.get("type").equals("1")){
taxEmail.setContent((String)e.get("content"));
taxEmail.setType(1);
}else{
taxEmail.setType(0);
taxEmail.setUrl((String)e.get("url"));
}
taxEmail.setAttachUrl((String) e.get("attachUrl"));
taxEmail.setTitle((String) e.get("subject"));
taxEmail.setHashkey(String.valueOf((((String) e.get("attachUrl") + (String) e.get("subject")).hashCode())));
if(judgeHashKey(taxEmail.getHashkey()))
taxEmailMapper.insertSelective(taxEmail);
});
} catch (Exception e) {
e.printStackTrace();
logger.warn("获取邮件失败");
}
}
public boolean judgeHashKey(String hashKey){
TaxEmailExample example = new TaxEmailExample();
example.createCriteria().andHashkeyEqualTo(hashKey);
List<TaxEmail> taxEmails = taxEmailMapper.selectByExample(example);
if(taxEmails.size() != 0)
return false;
return true;
}
}
......@@ -39,6 +39,7 @@
<ref bean="lgApiJobTrigger"/>
<ref bean="orgSyncJobTrigger"/>
<ref bean="analysisJobTrigger"/>
<ref bean="shareJobTrigger"/>
</list>
</property>
<property name="jobDetails">
......@@ -46,6 +47,7 @@
<ref bean="lgGlBalanceJob"/>
<ref bean="orgSyncJob"/>
<ref bean="analysisJob"/>
<ref bean="shareJob"/>
</list>
</property>
<property name="taskExecutor" ref="executor"/>
......@@ -91,6 +93,15 @@
<property name="requestsRecovery" value="false"/>
<property name="description" value="分析模块"/>
</bean>
<!--shareJob-->
<bean name="shareJob" class="org.springframework.scheduling.quartz.JobDetailFactoryBean">
<property name="jobClass" value="pwc.taxtech.atms.common.schedule.ShareJob"/>
<property name="durability" value="true"/>
<property name="requestsRecovery" value="false"/>
<property name="description" value="分享模块"/>
</bean>
<!-- 每天凌晨一点执行一次-->
<bean id="analysisJobTrigger" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
<property name="jobDetail" ref="analysisJob"/>
......@@ -98,5 +109,12 @@
</bean>
<!-- shareJob 任务执行设定-->
<bean id="shareJobTrigger" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
<property name="jobDetail" ref="shareJob"/>
<property name="cronExpression" value="59 * * * * ? *"/>
</bean>
<!-- 分布式事务配置 end -->
</beans>
\ No newline at end of file
......@@ -21,6 +21,13 @@ jwt.powerToken=${jwt.powerToken}
jwt.expireSecond=${jwt.expireSecond}
jwt.refreshSecond=${jwt.refreshSecond}
#email config
email.host=${email.host}
email.store.protocol=${email.store.protocol}
email.address=${email.address}
email.password=${email.password}
email.aesKey=${email.aesKey}
#File Server Config
file.server.url=${file.server.url}
file.server.upload=${file.server.upload}
......
......@@ -21,6 +21,14 @@ jwt.refreshSecond=600
file.server.url=http://10.158.230.144:1886
file.server.upload=/api/v1/upload
#email config
email.host=pop3.163.com
email.store.protocol=pop3
email.address=17615195790@163.com
email.password=7C4858868DDFAAFBFCE08C57997427A3
email.aesKey=47CA9CA045075A721E16B111536BD3C5
#upload
max_file_length=104857600
......
......@@ -26,6 +26,13 @@ jwt.refreshSecond=600
file.server.url=http://dts.erp.didichuxing.com:9001
file.server.upload=/api/v1/upload
#email config
email.host=pop3.163.com
email.store.protocol=pop3
email.address=17615195790@163.com
email.password=7C4858868DDFAAFBFCE08C57997427A3
email.aesKey=47CA9CA045075A721E16B111536BD3C5
#upload
max_file_length=104857600
......
......@@ -21,6 +21,12 @@ jwt.refreshSecond=600
file.server.url=http://10.158.230.144:1886
file.server.upload=/api/v1/upload
#email config
email.host=pop3.163.com
email.store.protocol=pop3
email.address=17615195790@163.com
email.password=7C4858868DDFAAFBFCE08C57997427A3
email.aesKey=47CA9CA045075A721E16B111536BD3C5
#upload
max_file_length=104857600
......
......@@ -22,6 +22,14 @@ jwt.powerToken=xxxx
jwt.expireSecond=180000
jwt.refreshSecond=600
#email config
email.host=pop3.163.com
email.store.protocol=pop3
email.address=17615195790@163.com
email.password=7C4858868DDFAAFBFCE08C57997427A3
email.aesKey=47CA9CA045075A721E16B111536BD3C5
#File Server Config
file.server.url=http://dts.erp.didichuxing.com:9001
file.server.upload=/api/v1/upload
......
package pwc.taxtech.atms.service.impl;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.PropertySource;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.transaction.annotation.Transactional;
/**
* @version 1.0
* @program: atms
* @description:
* @author: Kevin
* @create: 2019-04-26 15:15
**/
@WebAppConfiguration
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:applicationContext.xml"})
@PropertySource("classpath:/conf/conf_profile_dev.properties")
public class ShareTest {
private static final Logger logger = LoggerFactory.getLogger(DataInitTest.class);
@Autowired
private TaxEamilServiceImpl taxEamilService;
@Test
public void jobEmail(){
taxEamilService.jobEmail();
}
}
......@@ -41,26 +41,13 @@
<property name="rootInterface" value="pwc.taxtech.atms.MyMapper"/>
</javaClientGenerator>
<table tableName="wf_record" domainObjectName="WfRecord">
<table tableName="data_import_log" domainObjectName="DataImportLog">
<property name="useActualColumnNames" value="false"/>
<property name="ignoreQualifiersAtRuntime" value="true"/>
<columnOverride column="period" javaType="java.lang.Integer" jdbcType="TINYINT"/>
<columnOverride column="type" javaType="java.lang.Integer" jdbcType="TINYINT"/>
<columnOverride column="status" javaType="java.lang.Integer" jdbcType="TINYINT"/>
<columnOverride column="tms_period_month" javaType="java.lang.Integer" jdbcType="TINYINT"/>
<columnOverride column="period_month" javaType="java.lang.Integer" jdbcType="TINYINT"/>
</table>
<table tableName="wf_record_detail" domainObjectName="WfRecordDetail">
<property name="useActualColumnNames" value="false"/>
<property name="ignoreQualifiersAtRuntime" value="true"/>
<columnOverride column="status" javaType="java.lang.Integer" jdbcType="TINYINT"/>
</table>
<!-- <table tableName="data_import_log" domainObjectName="DataImportLog">-->
<!-- <property name="useActualColumnNames" value="false"/>-->
<!-- <property name="ignoreQualifiersAtRuntime" value="true"/>-->
<!-- <columnOverride column="type" javaType="java.lang.Integer" jdbcType="TINYINT"/>-->
<!-- <columnOverride column="tms_period_month" javaType="java.lang.Integer" jdbcType="TINYINT"/>-->
<!-- <columnOverride column="period_month" javaType="java.lang.Integer" jdbcType="TINYINT"/>-->
<!-- </table>-->
<!--<table tableName="analysis_expected_tax_return" domainObjectName="AnalysisExpectedTaxReturn">-->
<!--<property name="useActualColumnNames" value="false"/>-->
......
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.PwcTaxLog;
import pwc.taxtech.atms.entity.PwcTaxLogExample;
@Mapper
public interface PwcTaxLogMapper extends MyMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table pwc_tax_log
*
* @mbg.generated
*/
long countByExample(PwcTaxLogExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table pwc_tax_log
*
* @mbg.generated
*/
int deleteByExample(PwcTaxLogExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table pwc_tax_log
*
* @mbg.generated
*/
int deleteByPrimaryKey(String id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table pwc_tax_log
*
* @mbg.generated
*/
int insert(PwcTaxLog record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table pwc_tax_log
*
* @mbg.generated
*/
int insertSelective(PwcTaxLog record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table pwc_tax_log
*
* @mbg.generated
*/
List<PwcTaxLog> selectByExampleWithBLOBsWithRowbounds(PwcTaxLogExample example, RowBounds rowBounds);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table pwc_tax_log
*
* @mbg.generated
*/
List<PwcTaxLog> selectByExampleWithBLOBs(PwcTaxLogExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table pwc_tax_log
*
* @mbg.generated
*/
List<PwcTaxLog> selectByExampleWithRowbounds(PwcTaxLogExample example, RowBounds rowBounds);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table pwc_tax_log
*
* @mbg.generated
*/
List<PwcTaxLog> selectByExample(PwcTaxLogExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table pwc_tax_log
*
* @mbg.generated
*/
PwcTaxLog selectByPrimaryKey(String id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table pwc_tax_log
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") PwcTaxLog record, @Param("example") PwcTaxLogExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table pwc_tax_log
*
* @mbg.generated
*/
int updateByExampleWithBLOBs(@Param("record") PwcTaxLog record, @Param("example") PwcTaxLogExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table pwc_tax_log
*
* @mbg.generated
*/
int updateByExample(@Param("record") PwcTaxLog record, @Param("example") PwcTaxLogExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table pwc_tax_log
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(PwcTaxLog record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table pwc_tax_log
*
* @mbg.generated
*/
int updateByPrimaryKeyWithBLOBs(PwcTaxLog record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table pwc_tax_log
*
* @mbg.generated
*/
int updateByPrimaryKey(PwcTaxLog record);
}
\ No newline at end of file
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.TaxEmail;
import pwc.taxtech.atms.entity.TaxEmailExample;
@Mapper
public interface TaxEmailMapper extends MyMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tax_email
*
* @mbg.generated
*/
long countByExample(TaxEmailExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tax_email
*
* @mbg.generated
*/
int deleteByExample(TaxEmailExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tax_email
*
* @mbg.generated
*/
int deleteByPrimaryKey(String id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tax_email
*
* @mbg.generated
*/
int insert(TaxEmail record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tax_email
*
* @mbg.generated
*/
int insertSelective(TaxEmail record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tax_email
*
* @mbg.generated
*/
List<TaxEmail> selectByExampleWithBLOBsWithRowbounds(TaxEmailExample example, RowBounds rowBounds);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tax_email
*
* @mbg.generated
*/
List<TaxEmail> selectByExampleWithBLOBs(TaxEmailExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tax_email
*
* @mbg.generated
*/
List<TaxEmail> selectByExampleWithRowbounds(TaxEmailExample example, RowBounds rowBounds);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tax_email
*
* @mbg.generated
*/
List<TaxEmail> selectByExample(TaxEmailExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tax_email
*
* @mbg.generated
*/
TaxEmail selectByPrimaryKey(String id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tax_email
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") TaxEmail record, @Param("example") TaxEmailExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tax_email
*
* @mbg.generated
*/
int updateByExampleWithBLOBs(@Param("record") TaxEmail record, @Param("example") TaxEmailExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tax_email
*
* @mbg.generated
*/
int updateByExample(@Param("record") TaxEmail record, @Param("example") TaxEmailExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tax_email
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(TaxEmail record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tax_email
*
* @mbg.generated
*/
int updateByPrimaryKeyWithBLOBs(TaxEmail record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tax_email
*
* @mbg.generated
*/
int updateByPrimaryKey(TaxEmail record);
}
\ No newline at end of file
package pwc.taxtech.atms.entity;
import java.io.Serializable;
import java.util.Date;
/**
*
* This class was generated by MyBatis Generator.
* This class corresponds to the database table pwc_tax_log
*
* @mbg.generated do_not_delete_during_merge
*/
public class PwcTaxLog extends BaseEntity implements Serializable {
/**
* Database Column Remarks:
* token
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column pwc_tax_log.id
*
* @mbg.generated
*/
private String id;
/**
* Database Column Remarks:
* 标题名称和url合并生成的hash值
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column pwc_tax_log.email_id
*
* @mbg.generated
*/
private String emailId;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column pwc_tax_log.createTime
*
* @mbg.generated
*/
private Date createtime;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column pwc_tax_log.del_flag
*
* @mbg.generated
*/
private Integer delFlag;
/**
* Database Column Remarks:
* 日志类型
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column pwc_tax_log.type
*
* @mbg.generated
*/
private Integer type;
/**
* Database Column Remarks:
* 内容
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column pwc_tax_log.user_id
*
* @mbg.generated
*/
private String userId;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table pwc_tax_log
*
* @mbg.generated
*/
private static final long serialVersionUID = 1L;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column pwc_tax_log.id
*
* @return the value of pwc_tax_log.id
*
* @mbg.generated
*/
public String getId() {
return id;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column pwc_tax_log.id
*
* @param id the value for pwc_tax_log.id
*
* @mbg.generated
*/
public void setId(String id) {
this.id = id == null ? null : id.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column pwc_tax_log.email_id
*
* @return the value of pwc_tax_log.email_id
*
* @mbg.generated
*/
public String getEmailId() {
return emailId;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column pwc_tax_log.email_id
*
* @param emailId the value for pwc_tax_log.email_id
*
* @mbg.generated
*/
public void setEmailId(String emailId) {
this.emailId = emailId == null ? null : emailId.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column pwc_tax_log.createTime
*
* @return the value of pwc_tax_log.createTime
*
* @mbg.generated
*/
public Date getCreatetime() {
return createtime;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column pwc_tax_log.createTime
*
* @param createtime the value for pwc_tax_log.createTime
*
* @mbg.generated
*/
public void setCreatetime(Date createtime) {
this.createtime = createtime;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column pwc_tax_log.del_flag
*
* @return the value of pwc_tax_log.del_flag
*
* @mbg.generated
*/
public Integer getDelFlag() {
return delFlag;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column pwc_tax_log.del_flag
*
* @param delFlag the value for pwc_tax_log.del_flag
*
* @mbg.generated
*/
public void setDelFlag(Integer delFlag) {
this.delFlag = delFlag;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column pwc_tax_log.type
*
* @return the value of pwc_tax_log.type
*
* @mbg.generated
*/
public Integer getType() {
return type;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column pwc_tax_log.type
*
* @param type the value for pwc_tax_log.type
*
* @mbg.generated
*/
public void setType(Integer type) {
this.type = type;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column pwc_tax_log.user_id
*
* @return the value of pwc_tax_log.user_id
*
* @mbg.generated
*/
public String getUserId() {
return userId;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column pwc_tax_log.user_id
*
* @param userId the value for pwc_tax_log.user_id
*
* @mbg.generated
*/
public void setUserId(String userId) {
this.userId = userId == null ? null : userId.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table pwc_tax_log
*
* @mbg.generated
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", emailId=").append(emailId);
sb.append(", createtime=").append(createtime);
sb.append(", delFlag=").append(delFlag);
sb.append(", type=").append(type);
sb.append(", userId=").append(userId);
sb.append("]");
return sb.toString();
}
}
\ No newline at end of file
This diff is collapsed.
......@@ -1266,6 +1266,18 @@
};
var showSearch = function () {
$("[data-toggle='popover']").popover();
};
var showSearch1 = function () {
var aaaa = $("#assetListSearch").hasClass("popover");
var bbbb = $("#assetListSearch").hasClass("show");
if($("#assetListSearch").hasClass("popover")){
}
};
//开始
(function initialize() {
......@@ -1276,6 +1288,8 @@
$scope.selectedColumnMap = [];
$scope.incomeInvoiceTotalColumns = [];
$scope.initIncomeInvoiceTotalColumnsIndex = [];
$scope.showSearch = showSearch;
$scope.showSearch1 = showSearch1;
$scope.changeSheet = changeSheet;
$scope.doDataFilter = doDataFilter;
$scope.doDataFilterReset = doDataFilterReset;
......@@ -1287,7 +1301,7 @@
initAssetResultDxGrid();
// getAssetResultList(1);
$scope.refreshAssetResultListGrid();
showSearch();
getGroupList();
getGroupDetailList();
getUserPermission();
......
......@@ -138,8 +138,8 @@
<!--<asset-list-edit-modal asset-type="displayType-1" type="0"></asset-list-edit-modal>-->
<div id="assetsResultGrid" dx-data-grid="assetsResultGridOptions">
<div style="display: inline-block" data-options="dxTemplate:{ name:'totalGroupCount' }">
<button class="filter-button"
atms-popover ng-mouseenter="prepareSummary()"
<button class="filter-button" data-toggle="popover"
atms-popover ng-mouseenter="prepareSummary()" ng-click="showSearch1()" id = "assetListSearch"
popover-container="body" popover-auto-hide="true" data-overwrite="true"
use-optimized-placement-algorithm="true"
data-placement="bottom"
......
......@@ -446,7 +446,7 @@
-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
min-width: 370px;
left: 60%;
left: 58%;
.arrow {
left: 60% !important;
......
......@@ -282,7 +282,7 @@
format: {type: 'fixedPoint', precision: 2},
width: 100
},
{caption: $translate.instant('TaxGroupName '), dataField: "taxGroupName"},
{caption: $translate.instant('TaxGroupName '), dataField: "taxGroupName",width: 160},
{
caption: $translate.instant('DepreciationPeriod'),
dataField: "depreciationPeriod",
......
......@@ -192,6 +192,8 @@
__RequestVerificationToken: token,
withCredentials: true
}).then(function(data) {
$scope.importExcelFile = null;
$scope.fileName = null;
var resp = data.data;
$('#busy-indicator-container').hide();
deferred.resolve();
......
......@@ -147,7 +147,7 @@
dataField: "companyCode",
allowHeaderFiltering: false,
caption: $translate.instant('CompanyCode'),
width: '15%'
width: '13%'
}, {
dataField: "companyName",
allowHeaderFiltering: false,
......@@ -161,7 +161,7 @@
}, {
dataField: "periodYear",
allowHeaderFiltering: false,
width: '14%',
width: '8%',
caption: $translate.instant('YearPeriod')
},
/*{
......@@ -193,7 +193,7 @@
}, {
dataField: "operateTime",
allowHeaderFiltering: false,
width: '10%',
width: '18%',
caption: $translate.instant('LogOperationTime'),
calculateCellValue: function(data) {
return new Date(data.operateTime).formatDateTime('yyyy-MM-dd HH:mm:ss');
......@@ -213,6 +213,12 @@
selection: {
mode: "single"
},
paging: {
pageSize: 100,
},
scrolling: {
mode: "virtual"
},
grouping: {
autoExpandAll: false
},
......
......@@ -43,10 +43,8 @@
</form>
<div class="dt-init-wrapper">
<div class="dx-viewport grid-container">
<div id="extractFinancialGridContainer" dx-data-grid="extractFinancialGridOptions"
style="margin-top: 30px;">
</div>
<div id="extractFinancialGridContainer" dx-data-grid="extractFinancialGridOptions"
style="margin-top: 30px;">
</div>
<div class="page-footer">
<ack-pagination page-options="pagingOptions"
......
......@@ -239,6 +239,10 @@
height: calc(100% - 200px);
position: relative;
#extractFinancialGridContainer{
height: 460px;
}
.dropdown {
.dropdown-common();
......@@ -247,16 +251,6 @@
}
}
.extractFinancialGridContainer {
height: calc(~'100% - 30px');
overflow: hidden;
position: absolute;
top: 0;
bottom: 136px; /* 130 + 6 */
left: 0;
right: 0;
background-color: #FFF;
}
}
.error-info-wrapper {
......
......@@ -133,6 +133,12 @@
selection: {
mode: "single"
},
paging: {
pageSize: 100,
},
scrolling: {
mode: "virtual"
},
grouping: {
autoExpandAll: false
},
......@@ -148,6 +154,7 @@
width: 518,
visible: true
},
height: '99%',
headerFilter: {
visible: false,
texts: {
......
......@@ -17,10 +17,8 @@
</div>
</div>
<div class="dt-init-wrapper">
<div class="dx-viewport grid-container">
<div id="importLogGridContainer" dx-data-grid="importLogGridOptions"
style="margin-top: 30px;">
</div>
<div id="importLogGridContainer" dx-data-grid="importLogGridOptions"
style="margin-top: 30px;">
</div>
<!--<div class="page-footer">
<ack-pagination page-options="pagingOptions"
......
......@@ -187,16 +187,10 @@
}
}
.importLogGridContainer {
height: calc(~'100% - 30px');
overflow: hidden;
position: absolute;
top: 0;
bottom: 136px; /* 130 + 6 */
left: 0;
right: 0;
background-color: #FFF;
#importLogGridContainer{
height: 460px;
}
}
.error-info-wrapper {
......
......@@ -222,11 +222,15 @@
bindingOptions: {
dataSource: 'pageConfDataSource',
},
scrolling: {
mode: "virtual"
},
selection: {
mode: 'multiple',
showCheckBoxesMode: 'always',
allowSelectAll: true
},
onSelectionChanged: function (data) {
$scope.selectedItems = data.selectedRowsData;
$scope.selectedRecourdCount = data.selectedRowsData.length;
......@@ -314,7 +318,7 @@
.success(function (res) {
if (res && 0 === res.code) {
if(res.message === "DuplicateName"){
SweetAlert.warning($translate.instant('NameShouldUniqueWarn'));
SweetAlert.warning(res.data+" "+$translate.instant('NameShouldUniqueWarn'));
return;
}
SweetAlert.success($translate.instant('RevenueAddSuccess'));
......
......@@ -188,16 +188,10 @@
}
}
.importPLStatusGridContainer {
height: calc(~'100% - 30px');
overflow: hidden;
position: absolute;
top: 0;
bottom: 136px; /* 130 + 6 */
left: 0;
right: 0;
background-color: #FFF;
#revenueGridContainer{
height: 460px;
}
}
.error-info-wrapper {
......
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