纳税人信息
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
package com.cwhelp.modules.business.domain;
|
||||
|
||||
import com.cwhelp.common.enums.StatusEnum;
|
||||
import com.cwhelp.common.utils.StatusUtil;
|
||||
import lombok.Data;
|
||||
import org.hibernate.annotations.Where;
|
||||
import org.springframework.data.annotation.CreatedDate;
|
||||
import org.springframework.data.annotation.LastModifiedDate;
|
||||
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.EntityListeners;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
|
||||
/**
|
||||
* @author yan.y
|
||||
* @date 2019/08/16
|
||||
*/
|
||||
@Data
|
||||
@Entity
|
||||
@Table(name="bss_goods")
|
||||
@EntityListeners(AuditingEntityListener.class)
|
||||
@Where(clause = StatusUtil.notDelete)
|
||||
public class BssGoods implements Serializable {
|
||||
// 主键ID
|
||||
@Id
|
||||
@GeneratedValue(strategy=GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
private String name;
|
||||
// 货物代码
|
||||
private String code;
|
||||
// 数量
|
||||
private Integer num;
|
||||
// 细节金额
|
||||
private BigDecimal detail_amount;
|
||||
// 税额
|
||||
private BigDecimal tax_amount;
|
||||
// 税率
|
||||
private String tax_rate;
|
||||
// 单位
|
||||
private String unit;
|
||||
// 单价
|
||||
private String unit_price;
|
||||
// 规格型号
|
||||
private String specification;
|
||||
// 增值税
|
||||
private Integer vat_invoice_id;
|
||||
// 创建时间
|
||||
@CreatedDate
|
||||
private Date createDate;
|
||||
// 更新时间
|
||||
@LastModifiedDate
|
||||
private Date updateDate;
|
||||
// 数据状态
|
||||
private Byte status = StatusEnum.OK.getCode();
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.cwhelp.modules.business.domain;
|
||||
|
||||
import com.cwhelp.common.enums.StatusEnum;
|
||||
import com.cwhelp.common.utils.StatusUtil;
|
||||
import lombok.Data;
|
||||
import org.hibernate.annotations.Where;
|
||||
import org.springframework.data.annotation.CreatedDate;
|
||||
import org.springframework.data.annotation.LastModifiedDate;
|
||||
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import javax.persistence.*;
|
||||
|
||||
/**
|
||||
* @author yan.y
|
||||
* @date 2019/08/16
|
||||
*/
|
||||
@Data
|
||||
@Entity
|
||||
@Table(name="bss_taxinfo")
|
||||
@EntityListeners(AuditingEntityListener.class)
|
||||
@Where(clause = StatusUtil.notDelete)
|
||||
public class BssTaxinfo implements Serializable {
|
||||
// 主键ID
|
||||
@Id
|
||||
@GeneratedValue(strategy=GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
// 纳税人识别号
|
||||
@Column(name = "tax_no")
|
||||
private String taxNo;
|
||||
// 开户行及账号
|
||||
private String account;
|
||||
// 地址、电话
|
||||
@Column(name = "address_phone")
|
||||
private String addressPhone;
|
||||
private String name;
|
||||
// 备注
|
||||
private String remark;
|
||||
// 创建时间
|
||||
@CreatedDate
|
||||
private Date createDate;
|
||||
// 更新时间
|
||||
@LastModifiedDate
|
||||
private Date updateDate;
|
||||
|
||||
@Column(name = "bss_platform_id")
|
||||
private Long platformId;
|
||||
|
||||
// 数据状态
|
||||
private Byte status = StatusEnum.OK.getCode();
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package com.cwhelp.modules.business.repository;
|
||||
|
||||
import com.cwhelp.modules.business.domain.BssGoods;
|
||||
import com.cwhelp.modules.system.repository.BaseRepository;
|
||||
|
||||
/**
|
||||
* @author yan.y
|
||||
* @date 2019/08/16
|
||||
*/
|
||||
public interface BssGoodsRepository extends BaseRepository<BssGoods, Long> {
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package com.cwhelp.modules.business.repository;
|
||||
|
||||
import com.cwhelp.modules.business.domain.BssTaxinfo;
|
||||
import com.cwhelp.modules.system.repository.BaseRepository;
|
||||
|
||||
/**
|
||||
* @author yan.y
|
||||
* @date 2019/08/16
|
||||
*/
|
||||
public interface BssTaxinfoRepository extends BaseRepository<BssTaxinfo, Long> {
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.cwhelp.modules.business.service;
|
||||
|
||||
import com.cwhelp.common.enums.StatusEnum;
|
||||
import com.cwhelp.modules.business.domain.BssGoods;
|
||||
import org.springframework.data.domain.Example;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author yan.y
|
||||
* @date 2019/08/16
|
||||
*/
|
||||
public interface BssGoodsService {
|
||||
|
||||
/**
|
||||
* 获取分页列表数据
|
||||
* @param example 查询实例
|
||||
* @return 返回分页数据
|
||||
*/
|
||||
Page<BssGoods> getPageList(Example<BssGoods> example);
|
||||
|
||||
/**
|
||||
* 根据ID查询数据
|
||||
* @param id 主键ID
|
||||
*/
|
||||
BssGoods getById(Long id);
|
||||
|
||||
/**
|
||||
* 保存数据
|
||||
* @param bssGoods 实体对象
|
||||
*/
|
||||
BssGoods save(BssGoods bssGoods);
|
||||
|
||||
/**
|
||||
* 状态(启用,冻结,删除)/批量状态处理
|
||||
*/
|
||||
@Transactional
|
||||
Boolean updateStatus(StatusEnum statusEnum, List<Long> idList);
|
||||
}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
package com.cwhelp.modules.business.service;
|
||||
|
||||
import com.cwhelp.common.enums.StatusEnum;
|
||||
import com.cwhelp.modules.business.domain.BssTaxinfo;
|
||||
import org.springframework.data.domain.Example;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author yan.y
|
||||
* @date 2019/08/16
|
||||
*/
|
||||
public interface BssTaxinfoService {
|
||||
|
||||
/**
|
||||
* 获取分页列表数据
|
||||
* @param example 查询实例
|
||||
* @return 返回分页数据
|
||||
*/
|
||||
Page<BssTaxinfo> getPageList(Example<BssTaxinfo> example);
|
||||
|
||||
/**
|
||||
* 根据ID查询数据
|
||||
* @param id 主键ID
|
||||
*/
|
||||
BssTaxinfo getById(Long id);
|
||||
|
||||
/**
|
||||
* 保存数据
|
||||
* @param bssTaxinfo 实体对象
|
||||
*/
|
||||
BssTaxinfo save(BssTaxinfo bssTaxinfo);
|
||||
|
||||
/**
|
||||
* 状态(启用,冻结,删除)/批量状态处理
|
||||
*/
|
||||
@Transactional
|
||||
Boolean updateStatus(StatusEnum statusEnum, List<Long> idList);
|
||||
}
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
package com.cwhelp.modules.business.service.impl;
|
||||
|
||||
import com.cwhelp.common.data.PageSort;
|
||||
import com.cwhelp.common.enums.StatusEnum;
|
||||
import com.cwhelp.modules.business.domain.BssGoods;
|
||||
import com.cwhelp.modules.business.repository.BssGoodsRepository;
|
||||
import com.cwhelp.modules.business.service.BssGoodsService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Example;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author yan.y
|
||||
* @date 2019/08/16
|
||||
*/
|
||||
@Service
|
||||
public class BssGoodsServiceImpl implements BssGoodsService {
|
||||
|
||||
@Autowired
|
||||
private BssGoodsRepository bssGoodsRepository;
|
||||
|
||||
/**
|
||||
* 根据ID查询数据
|
||||
* @param id 主键ID
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public BssGoods getById(Long id) {
|
||||
return bssGoodsRepository.findById(id).orElse(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取分页列表数据
|
||||
* @param example 查询实例
|
||||
* @return 返回分页数据
|
||||
*/
|
||||
@Override
|
||||
public Page<BssGoods> getPageList(Example<BssGoods> example) {
|
||||
// 创建分页对象
|
||||
PageRequest page = PageSort.pageRequest();
|
||||
return bssGoodsRepository.findAll(example, page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存数据
|
||||
* @param bssGoods 实体对象
|
||||
*/
|
||||
@Override
|
||||
public BssGoods save(BssGoods bssGoods) {
|
||||
return bssGoodsRepository.save(bssGoods);
|
||||
}
|
||||
|
||||
/**
|
||||
* 状态(启用,冻结,删除)/批量状态处理
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public Boolean updateStatus(StatusEnum statusEnum, List<Long> idList) {
|
||||
return bssGoodsRepository.updateStatus(statusEnum.getCode(), idList) > 0;
|
||||
}
|
||||
}
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
package com.cwhelp.modules.business.service.impl;
|
||||
|
||||
import com.cwhelp.common.data.PageSort;
|
||||
import com.cwhelp.common.enums.StatusEnum;
|
||||
import com.cwhelp.modules.business.domain.BssTaxinfo;
|
||||
import com.cwhelp.modules.business.repository.BssTaxinfoRepository;
|
||||
import com.cwhelp.modules.business.service.BssTaxinfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Example;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author yan.y
|
||||
* @date 2019/08/16
|
||||
*/
|
||||
@Service
|
||||
public class BssTaxinfoServiceImpl implements BssTaxinfoService {
|
||||
|
||||
@Autowired
|
||||
private BssTaxinfoRepository bssTaxinfoRepository;
|
||||
|
||||
/**
|
||||
* 根据ID查询数据
|
||||
* @param id 主键ID
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public BssTaxinfo getById(Long id) {
|
||||
return bssTaxinfoRepository.findById(id).orElse(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取分页列表数据
|
||||
* @param example 查询实例
|
||||
* @return 返回分页数据
|
||||
*/
|
||||
@Override
|
||||
public Page<BssTaxinfo> getPageList(Example<BssTaxinfo> example) {
|
||||
// 创建分页对象
|
||||
PageRequest page = PageSort.pageRequest();
|
||||
return bssTaxinfoRepository.findAll(example, page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存数据
|
||||
* @param bssTaxinfo 实体对象
|
||||
*/
|
||||
@Override
|
||||
public BssTaxinfo save(BssTaxinfo bssTaxinfo) {
|
||||
return bssTaxinfoRepository.save(bssTaxinfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 状态(启用,冻结,删除)/批量状态处理
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public Boolean updateStatus(StatusEnum statusEnum, List<Long> idList) {
|
||||
return bssTaxinfoRepository.updateStatus(statusEnum.getCode(), idList) > 0;
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -110,8 +110,8 @@ public class UserServiceImpl implements UserService {
|
||||
deptIn.forEach(in::value);
|
||||
preList.add(in);
|
||||
}
|
||||
// 1 为财务帮平台超级账号
|
||||
if (AdminConst.ADMIN_PLATFORM_ID.equals(user.getBssPlatform().getId())) {
|
||||
// 如果不是平台账号则限制平台ID查询账号信息
|
||||
if (!AdminConst.ADMIN_PLATFORM_ID.equals(user.getBssPlatform().getId())) {
|
||||
BssPlatform bssPlatform = user.getBssPlatform();
|
||||
Join<User, BssPlatform> join = root.join("bssPlatform", JoinType.INNER);
|
||||
Predicate eq = cb.equal(join.get("id").as(Long.class),bssPlatform.getId());
|
||||
|
||||
Reference in New Issue
Block a user