bms2发票相关;
This commit is contained in:
+1
-1
@@ -104,7 +104,7 @@
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.4</version>
|
||||
<version>1.18.30</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<!--import mybatis plus 它会自动引入mybatis及mybatis spring切勿重复引用以免冲突-->
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
package com.mhd.bms.domain.bmsInvoiceInfo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 发票信息表
|
||||
* @Author: lfs
|
||||
* @Date: 2020-02-19 08:50:59
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class BmsInvoiceInfo extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ID_WORKER_STR)
|
||||
private String id;
|
||||
/**用户ID*/
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
@Excel(name = "用户ID", width = 15)
|
||||
private String shipperId;
|
||||
/**开具类型(0-个人,1-企业)*/
|
||||
@ApiModelProperty(value = "开具类型(0-个人,1-企业)")
|
||||
@Excel(name = "开具类型(0-个人,1-企业)", width = 15)
|
||||
private Integer invoiceType;
|
||||
/**发票抬头*/
|
||||
@ApiModelProperty(value = "发票抬头")
|
||||
@Excel(name = "发票抬头", width = 15)
|
||||
private String invoiceTitle;
|
||||
/**税务登记证号*/
|
||||
@ApiModelProperty(value = "税务登记证号")
|
||||
@Excel(name = "税务登记证号", width = 15)
|
||||
private String taxRegAccount;
|
||||
/**开户银行名称*/
|
||||
@ApiModelProperty(value = "开户银行名称")
|
||||
@Excel(name = "开户银行名称", width = 15)
|
||||
private String bankName;
|
||||
/**基本开户账号*/
|
||||
@ApiModelProperty(value = "基本开户账号")
|
||||
@Excel(name = "基本开户账号", width = 15)
|
||||
private String basicAccountNumber;
|
||||
/**注册场所地址*/
|
||||
@ApiModelProperty(value = "注册场所地址")
|
||||
@Excel(name = "注册场所地址", width = 15)
|
||||
private String regPlaceAddress;
|
||||
/**注册固定电话*/
|
||||
@ApiModelProperty(value = "注册固定电话")
|
||||
@Excel(name = "注册固定电话", width = 15)
|
||||
private String regLandlinePhone;
|
||||
/**工商变更证明书图片地址*/
|
||||
@ApiModelProperty(value = "工商变更证明书图片地址")
|
||||
@Excel(name = "工商变更证明书图片地址", width = 15)
|
||||
private String businessCertificateImgUrl;
|
||||
|
||||
@ApiModelProperty(value = "创建人")
|
||||
@Excel(name = "创建人", width = 15)
|
||||
private String createByName;
|
||||
/**是否删除(0-否,1-是)*/
|
||||
@ApiModelProperty(value = "是否删除(0-否,1-是)")
|
||||
@Excel(name = "是否删除(0-否,1-是)", width = 15)
|
||||
private Integer isDelete;
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
@Excel(name = "所属部门", width = 15)
|
||||
private String sysOrgCode;
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
package com.mhd.bms.domain.bmsInvoiceInfo.repository.facade;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.mhd.bms.domain.bmsInvoiceInfo.entity.BmsInvoiceInfo;
|
||||
import com.mhd.bms.domain.bmsInvoiceInfo.repository.todo.BmsInvoiceInfoAddDTO;
|
||||
import com.mhd.bms.domain.bmsInvoiceInfo.repository.todo.BmsInvoiceInfoDTO;
|
||||
import com.mhd.bms.domain.bmsInvoiceInfo.repository.vo.BmsInvoiceInfoVO;
|
||||
import com.mhd.bms.domain.bmsInvoiceInfo.repository.vo.QueryInvoiceInfoVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 发票信息表
|
||||
* @Author: lfs
|
||||
* @Date: 2020-02-19 08:50:59
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IBmsInvoiceInfoService extends IService<BmsInvoiceInfo> {
|
||||
|
||||
Page<BmsInvoiceInfoVO> queryList(Page<BmsInvoiceInfoVO> page, BmsInvoiceInfoDTO bmsInvoiceInfoDTO);
|
||||
|
||||
void save(BmsInvoiceInfoAddDTO bmsInvoiceInfoAddDTO);
|
||||
|
||||
void update(BmsInvoiceInfoDTO bmsInvoiceInfoDTO);
|
||||
|
||||
int delete(List<String> ids);
|
||||
|
||||
/**
|
||||
* @Author lfs
|
||||
* @Description 发票信息管理查询
|
||||
* @Date 11:30 2020/3/7
|
||||
* @return QueryInvoiceInfoVO
|
||||
**/
|
||||
QueryInvoiceInfoVO queryInvoiceInfo(String shipperId);
|
||||
}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
package com.mhd.bms.domain.bmsInvoiceInfo.repository.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.mhd.bms.domain.bmsInvoiceInfo.entity.BmsInvoiceInfo;
|
||||
import com.mhd.bms.domain.bmsInvoiceInfo.repository.todo.BmsInvoiceInfoDTO;
|
||||
import com.mhd.bms.domain.bmsInvoiceInfo.repository.vo.BmsInvoiceInfoVO;
|
||||
import com.mhd.bms.domain.bmsInvoiceInfo.repository.vo.QueryInvoiceInfoVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 发票信息表
|
||||
* @Author: lfs
|
||||
* @Date: 2020-02-19 08:50:59
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface BmsInvoiceInfoMapper extends BaseMapper<BmsInvoiceInfo> {
|
||||
|
||||
/**
|
||||
* @功能:发票信息表 分页查询
|
||||
* @param tmsInvoiceInfoDTO
|
||||
* @Date: 2020-02-19 08:50:59
|
||||
* @return
|
||||
*/
|
||||
public List<BmsInvoiceInfoVO> queryList(Page<BmsInvoiceInfoVO> page, @Param("tmsInvoiceInfoDTO") BmsInvoiceInfoDTO tmsInvoiceInfoDTO);
|
||||
|
||||
/**
|
||||
* @Author lfs
|
||||
* @Description 发票信息管理查询
|
||||
* @Date 11:32 2020/3/7
|
||||
* @Return QueryInvoiceInfoVO
|
||||
**/
|
||||
@Select("SELECT * FROM tms_invoice_info WHERE shipper_id = #{shipperId} and is_delete = 0")
|
||||
QueryInvoiceInfoVO selectByShipperId(@Param("shipperId") String shipperId);
|
||||
|
||||
@Select("SELECT * FROM tms_invoice_info WHERE invoice_title = #{title} and is_delete = 0")
|
||||
BmsInvoiceInfo queryByTitle(@Param("title") String title);
|
||||
}
|
||||
+123
@@ -0,0 +1,123 @@
|
||||
package com.mhd.bms.domain.bmsInvoiceInfo.repository.persistence;
|
||||
|
||||
import com.aliyun.oss.ServiceException;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.mhd.bms.domain.bmsInvoiceInfo.entity.BmsInvoiceInfo;
|
||||
import com.mhd.bms.domain.bmsInvoiceInfo.repository.facade.IBmsInvoiceInfoService;
|
||||
import com.mhd.bms.domain.bmsInvoiceInfo.repository.mapper.BmsInvoiceInfoMapper;
|
||||
import com.mhd.bms.domain.bmsInvoiceInfo.repository.todo.BmsInvoiceInfoAddDTO;
|
||||
import com.mhd.bms.domain.bmsInvoiceInfo.repository.todo.BmsInvoiceInfoDTO;
|
||||
import com.mhd.bms.domain.bmsInvoiceInfo.repository.vo.BmsInvoiceInfoVO;
|
||||
import com.mhd.bms.domain.bmsInvoiceInfo.repository.vo.QueryInvoiceInfoVO;
|
||||
import com.mhd.common.core.domain.entity.SysConfigSwitch;
|
||||
import com.mhd.common.core.utils.StringUtils;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.domain.SysUser;
|
||||
import com.mhd.system.api.domain.WlhyLoginUser;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 发票信息表
|
||||
* @Author: lfs
|
||||
* @Date: 2020-02-19 08:50:59
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class BmsInvoiceInfoServiceImpl extends ServiceImpl<BmsInvoiceInfoMapper, BmsInvoiceInfo> implements IBmsInvoiceInfoService {
|
||||
@Resource
|
||||
private BmsInvoiceInfoMapper bmsInvoiceInfoMapper;
|
||||
@Override
|
||||
public Page<BmsInvoiceInfoVO> queryList(Page<BmsInvoiceInfoVO> page,
|
||||
BmsInvoiceInfoDTO bmsInvoiceInfoDTO) {
|
||||
//获取登录人
|
||||
WlhyLoginUser sysUser = SecurityUtils.getLoginUser().getWlhyLoginUser();
|
||||
return page.setRecords(bmsInvoiceInfoMapper.queryList(page, bmsInvoiceInfoDTO));
|
||||
}
|
||||
|
||||
@Override
|
||||
public QueryInvoiceInfoVO queryInvoiceInfo(String shipperId) {
|
||||
QueryInvoiceInfoVO queryInvoiceInfoVO = new QueryInvoiceInfoVO();
|
||||
return queryInvoiceInfoVO;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public void save(BmsInvoiceInfoAddDTO bmsInvoiceInfoAddDTO) {
|
||||
//获取登录人
|
||||
WlhyLoginUser sysUser = SecurityUtils.getLoginUser().getWlhyLoginUser();
|
||||
if( null == sysUser){
|
||||
throw new ServiceException("当前用户不存在或已删除");
|
||||
}
|
||||
BmsInvoiceInfo bmsInvoiceInfo = new BmsInvoiceInfo();
|
||||
BeanUtils.copyProperties(bmsInvoiceInfoAddDTO, bmsInvoiceInfo);
|
||||
//bmsInvoiceInfo.setCreateBy(bmsInvoiceInfoAddDTO.getShipperId());
|
||||
bmsInvoiceInfo.setCreateByName(sysUser.getRealname());
|
||||
bmsInvoiceInfo.setCreateTime(new Date());
|
||||
|
||||
//企业员工存入companyId
|
||||
bmsInvoiceInfo.setShipperId(bmsInvoiceInfoAddDTO.getShipperId());
|
||||
|
||||
if ( bmsInvoiceInfoMapper.selectByShipperId(bmsInvoiceInfo.getShipperId()) == null){
|
||||
this.save(bmsInvoiceInfo);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public void update(BmsInvoiceInfoDTO bmsInvoiceInfoDTO) {
|
||||
//获取登录人
|
||||
WlhyLoginUser sysUser = SecurityUtils.getLoginUser().getWlhyLoginUser();
|
||||
if( null == sysUser){
|
||||
throw new ServiceException("当前用户不存在或已删除");
|
||||
}
|
||||
BmsInvoiceInfo bmsInvoiceInfo = bmsInvoiceInfoMapper.selectById(bmsInvoiceInfoDTO.getId());
|
||||
if( null == bmsInvoiceInfo){
|
||||
throw new ServiceException("发票信息不存在,请先添加");
|
||||
}
|
||||
BeanUtils.copyProperties(bmsInvoiceInfoDTO, bmsInvoiceInfo);
|
||||
//bmsInvoiceInfo.setUpdateBy(sysUser.getId());
|
||||
bmsInvoiceInfo.setUpdateTime(new Date());
|
||||
this.updateById(bmsInvoiceInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@Override
|
||||
public int delete(List<String> ids) {
|
||||
for (String id: ids) {
|
||||
//获取登录人
|
||||
WlhyLoginUser sysUser = SecurityUtils.getLoginUser().getWlhyLoginUser();
|
||||
if( null == sysUser){
|
||||
throw new ServiceException("sysUser是空值");
|
||||
}
|
||||
BmsInvoiceInfo bmsInvoiceInfo = bmsInvoiceInfoMapper.selectOne(new QueryWrapper<BmsInvoiceInfo>().lambda().eq(BmsInvoiceInfo::getId,id));
|
||||
if( null == bmsInvoiceInfo){
|
||||
throw new ServiceException("bmsInvoiceInfo是空值");
|
||||
}
|
||||
bmsInvoiceInfo.setIsDelete(1);
|
||||
//bmsInvoiceInfo.setUpdateBy(sysUser.getId());
|
||||
bmsInvoiceInfo.setUpdateTime(new Date());
|
||||
this.updateById(bmsInvoiceInfo);
|
||||
}
|
||||
return ids.size();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
package com.mhd.bms.domain.bmsInvoiceInfo.repository.todo;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description: 发票信息表
|
||||
* @Author: lfs
|
||||
* @Date: 2020-02-19 08:50:59
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class BmsInvoiceInfoAddDTO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
/**用户ID*/
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
@Excel(name = "用户ID", width = 15)
|
||||
private String shipperId;
|
||||
/**开具类型(0-个人,1-企业)*/
|
||||
@ApiModelProperty(value = "开具类型(0-个人,1-企业)")
|
||||
@Excel(name = "开具类型(0-个人,1-企业)", width = 15)
|
||||
private Integer invoiceType;
|
||||
/**发票抬头*/
|
||||
@ApiModelProperty(value = "发票抬头")
|
||||
@Excel(name = "发票抬头", width = 15)
|
||||
private String invoiceTitle;
|
||||
/**税务登记证号*/
|
||||
@ApiModelProperty(value = "税务登记证号")
|
||||
@Excel(name = "税务登记证号", width = 15)
|
||||
private String taxRegAccount;
|
||||
/**开户银行名称*/
|
||||
@ApiModelProperty(value = "开户银行名称")
|
||||
@Excel(name = "开户银行名称", width = 15)
|
||||
private String bankName;
|
||||
/**基本开户账号*/
|
||||
@ApiModelProperty(value = "基本开户账号")
|
||||
@Excel(name = "基本开户账号", width = 15)
|
||||
private String basicAccountNumber;
|
||||
/**注册场所地址*/
|
||||
@ApiModelProperty(value = "注册场所地址")
|
||||
@Excel(name = "注册场所地址", width = 15)
|
||||
private String regPlaceAddress;
|
||||
/**注册固定电话*/
|
||||
@ApiModelProperty(value = "注册固定电话")
|
||||
@Excel(name = "注册固定电话", width = 15)
|
||||
private String regLandlinePhone;
|
||||
/**工商变更证明书图片地址*/
|
||||
@ApiModelProperty(value = "工商变更证明书图片地址")
|
||||
@Excel(name = "工商变更证明书图片地址", width = 15)
|
||||
private String businessCertificateImgUrl;
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
@Excel(name = "所属部门", width = 15)
|
||||
private String sysOrgCode;
|
||||
}
|
||||
+96
@@ -0,0 +1,96 @@
|
||||
package com.mhd.bms.domain.bmsInvoiceInfo.repository.todo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 发票信息表
|
||||
* @Author: lfs
|
||||
* @Date: 2020-02-19 08:50:59
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class BmsInvoiceInfoDTO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ID_WORKER_STR)
|
||||
private String id;
|
||||
/**用户ID*/
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
@Excel(name = "用户ID", width = 15)
|
||||
private String shipperId;
|
||||
/**开具类型(0-个人,1-企业)*/
|
||||
@ApiModelProperty(value = "开具类型(0-个人,1-企业)")
|
||||
@Excel(name = "开具类型(0-个人,1-企业)", width = 15)
|
||||
private Integer invoiceType;
|
||||
/**发票抬头*/
|
||||
@ApiModelProperty(value = "发票抬头")
|
||||
@Excel(name = "发票抬头", width = 15)
|
||||
private String invoiceTitle;
|
||||
/**税务登记证号*/
|
||||
@ApiModelProperty(value = "税务登记证号")
|
||||
@Excel(name = "税务登记证号", width = 15)
|
||||
private String taxRegAccount;
|
||||
/**开户银行名称*/
|
||||
@ApiModelProperty(value = "开户银行名称")
|
||||
@Excel(name = "开户银行名称", width = 15)
|
||||
private String bankName;
|
||||
/**基本开户账号*/
|
||||
@ApiModelProperty(value = "基本开户账号")
|
||||
@Excel(name = "基本开户账号", width = 15)
|
||||
private String basicAccountNumber;
|
||||
/**注册场所地址*/
|
||||
@ApiModelProperty(value = "注册场所地址")
|
||||
@Excel(name = "注册场所地址", width = 15)
|
||||
private String regPlaceAddress;
|
||||
/**注册固定电话*/
|
||||
@ApiModelProperty(value = "注册固定电话")
|
||||
@Excel(name = "注册固定电话", width = 15)
|
||||
private String regLandlinePhone;
|
||||
/**工商变更证明书图片地址*/
|
||||
@ApiModelProperty(value = "工商变更证明书图片地址")
|
||||
@Excel(name = "工商变更证明书图片地址", width = 15)
|
||||
private String businessCertificateImgUrl;
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
@Excel(name = "创建人", width = 15)
|
||||
private String createBy;
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createByName;
|
||||
/**创建日期*/
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
@Excel(name = "创建日期", width = 20, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
@Excel(name = "更新人", width = 15)
|
||||
private String updateBy;
|
||||
/**更新日期*/
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
@Excel(name = "更新日期", width = 20, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
/**是否删除(0-否,1-是)*/
|
||||
@ApiModelProperty(value = "是否删除(0-否,1-是)")
|
||||
@Excel(name = "是否删除(0-否,1-是)", width = 15)
|
||||
private Integer isDelete;
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
@Excel(name = "所属部门", width = 15)
|
||||
private String sysOrgCode;
|
||||
|
||||
@ApiModelProperty(value = "创建人信息")
|
||||
private String loginUserId;
|
||||
}
|
||||
+93
@@ -0,0 +1,93 @@
|
||||
package com.mhd.bms.domain.bmsInvoiceInfo.repository.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 发票信息表
|
||||
* @Author: lfs
|
||||
* @Date: 2020-02-19 08:50:59
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class BmsInvoiceInfoVO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ID_WORKER_STR)
|
||||
private String id;
|
||||
/**用户ID*/
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
@Excel(name = "用户ID", width = 15)
|
||||
private String shipperId;
|
||||
/**开具类型(0-个人,1-企业)*/
|
||||
@ApiModelProperty(value = "开具类型(0-个人,1-企业)")
|
||||
@Excel(name = "开具类型(0-个人,1-企业)", width = 15)
|
||||
private Integer invoiceType;
|
||||
/**发票抬头*/
|
||||
@ApiModelProperty(value = "发票抬头")
|
||||
@Excel(name = "发票抬头", width = 15)
|
||||
private String invoiceTitle;
|
||||
/**税务登记证号*/
|
||||
@ApiModelProperty(value = "税务登记证号")
|
||||
@Excel(name = "税务登记证号", width = 15)
|
||||
private String taxRegAccount;
|
||||
/**开户银行名称*/
|
||||
@ApiModelProperty(value = "开户银行名称")
|
||||
@Excel(name = "开户银行名称", width = 15)
|
||||
private String bankName;
|
||||
/**基本开户账号*/
|
||||
@ApiModelProperty(value = "基本开户账号")
|
||||
@Excel(name = "基本开户账号", width = 15)
|
||||
private String basicAccountNumber;
|
||||
/**注册场所地址*/
|
||||
@ApiModelProperty(value = "注册场所地址")
|
||||
@Excel(name = "注册场所地址", width = 15)
|
||||
private String regPlaceAddress;
|
||||
/**注册固定电话*/
|
||||
@ApiModelProperty(value = "注册固定电话")
|
||||
@Excel(name = "注册固定电话", width = 15)
|
||||
private String regLandlinePhone;
|
||||
/**工商变更证明书图片地址*/
|
||||
@ApiModelProperty(value = "工商变更证明书图片地址")
|
||||
@Excel(name = "工商变更证明书图片地址", width = 15)
|
||||
private String businessCertificateImgUrl;
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
@Excel(name = "创建人", width = 15)
|
||||
private String createBy;
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createByName;
|
||||
/**创建日期*/
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
@Excel(name = "创建日期", width = 20, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
@Excel(name = "更新人", width = 15)
|
||||
private String updateBy;
|
||||
/**更新日期*/
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
@Excel(name = "更新日期", width = 20, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
/**是否删除(0-否,1-是)*/
|
||||
@ApiModelProperty(value = "是否删除(0-否,1-是)")
|
||||
@Excel(name = "是否删除(0-否,1-是)", width = 15)
|
||||
private Integer isDelete;
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
@Excel(name = "所属部门", width = 15)
|
||||
private String sysOrgCode;
|
||||
}
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
package com.mhd.bms.domain.bmsInvoiceInfo.repository.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 发票信息管理查询
|
||||
* @Author: lfs
|
||||
* @Date: 2020-02-19 08:50:59
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class QueryInvoiceInfoVO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ID_WORKER_STR)
|
||||
private String id="";
|
||||
/**用户ID*/
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
@Excel(name = "用户ID", width = 15)
|
||||
private String shipperId="";
|
||||
/**开具类型(0-个人,1-企业)*/
|
||||
@ApiModelProperty(value = "开具类型(0-个人,1-企业)")
|
||||
@Excel(name = "开具类型(0-个人,1-企业)", width = 15)
|
||||
private Integer invoiceType;
|
||||
/**发票抬头*/
|
||||
@ApiModelProperty(value = "发票抬头")
|
||||
@Excel(name = "发票抬头", width = 15)
|
||||
private String invoiceTitle="";
|
||||
/**税务登记证号*/
|
||||
@ApiModelProperty(value = "税务登记证号")
|
||||
@Excel(name = "税务登记证号", width = 15)
|
||||
private String taxRegAccount="";
|
||||
/**开户银行名称*/
|
||||
@ApiModelProperty(value = "开户银行名称")
|
||||
@Excel(name = "开户银行名称", width = 15)
|
||||
private String bankName="";
|
||||
/**基本开户账号*/
|
||||
@ApiModelProperty(value = "基本开户账号")
|
||||
@Excel(name = "基本开户账号", width = 15)
|
||||
private String basicAccountNumber="";
|
||||
/**注册场所地址*/
|
||||
@ApiModelProperty(value = "注册场所地址")
|
||||
@Excel(name = "注册场所地址", width = 15)
|
||||
private String regPlaceAddress="";
|
||||
/**注册固定电话*/
|
||||
@ApiModelProperty(value = "注册固定电话")
|
||||
@Excel(name = "注册固定电话", width = 15)
|
||||
private String regLandlinePhone="";
|
||||
/**工商变更证明书图片地址*/
|
||||
@ApiModelProperty(value = "工商变更证明书图片地址")
|
||||
@Excel(name = "工商变更证明书图片地址", width = 15)
|
||||
private String businessCertificateImgUrl="";
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
@Excel(name = "创建人", width = 15)
|
||||
private String createBy;
|
||||
/**创建日期*/
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
@Excel(name = "创建日期", width = 20, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
@Excel(name = "更新人", width = 15)
|
||||
private String updateBy;
|
||||
/**更新日期*/
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
@Excel(name = "更新日期", width = 20, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
/**是否删除(0-否,1-是)*/
|
||||
@ApiModelProperty(value = "是否删除(0-否,1-是)")
|
||||
@Excel(name = "是否删除(0-否,1-是)", width = 15)
|
||||
private Integer isDelete;
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
@Excel(name = "所属部门", width = 15)
|
||||
private String sysOrgCode;
|
||||
/**发票类型(0-增值税专用发票,1-普通发票)*/
|
||||
@ApiModelProperty(value = "发票类型(0-增值税专用发票,1-普通发票)")
|
||||
@Excel(name = "发票类型(0-增值税专用发票,1-普通发票)", width = 15)
|
||||
private Integer type;
|
||||
/**发票性质(0-纸质发票,1-电子发票)*/
|
||||
@ApiModelProperty(value = "发票性质(0-纸质发票,1-电子发票)")
|
||||
@Excel(name = "发票性质(0-纸质发票,1-电子发票)", width = 15)
|
||||
private Integer invoiceNature;
|
||||
}
|
||||
@@ -0,0 +1,206 @@
|
||||
package com.mhd.bms.domain.bmsInvoiceList.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 销项发票表
|
||||
* @Author: lfs
|
||||
* @Date: 2020-02-19 08:50:47
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class BmsInvoiceList extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.AUTO)
|
||||
private String id;
|
||||
/**发票抬头*/
|
||||
@ApiModelProperty(value = "发票抬头")
|
||||
@Excel(name = "发票抬头", width = 15)
|
||||
private String invoiceTitle;
|
||||
/**发票金额*/
|
||||
@ApiModelProperty(value = "发票金额")
|
||||
@Excel(name = "发票金额", width = 15)
|
||||
private BigDecimal invoiceValue;
|
||||
/**发票备注*/
|
||||
@ApiModelProperty(value = "发票备注")
|
||||
@Excel(name = "发票备注", width = 15)
|
||||
private String remark;
|
||||
/**发票状态(0-未开票,1-已取消申请,2-已开票,3-已驳回,4-已寄出,5-已作废)*/
|
||||
@ApiModelProperty(value = "发票状态(0-未开票,1-已取消申请,2-已开票,3-已驳回,4-已寄出,5-已作废)")
|
||||
@Excel(name = "发票状态(0-未开票,1-已取消申请,2-已开票,3-已驳回,4-已寄出,5-已作废)", width = 15)
|
||||
private Integer invoiceState;
|
||||
/**发票申请时间*/
|
||||
@ApiModelProperty(value = "发票申请时间")
|
||||
@Excel(name = "发票申请时间", width = 15, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date invoiceApplyTime;
|
||||
/**申请人ID*/
|
||||
@ApiModelProperty(value = "申请人ID")
|
||||
@Excel(name = "申请人ID", width = 15)
|
||||
private String applicantId;
|
||||
/**发票申请单号*/
|
||||
@ApiModelProperty(value = "发票申请单号")
|
||||
@Excel(name = "发票申请单号", width = 15)
|
||||
private String applyNumber;
|
||||
/**驳回原因*/
|
||||
@ApiModelProperty(value = "驳回原因")
|
||||
@Excel(name = "驳回原因", width = 15)
|
||||
private String rejectReason;
|
||||
/**运输单ids*/
|
||||
@ApiModelProperty(value = "运输单ids")
|
||||
@Excel(name = "运输单ids", width = 15)
|
||||
private String transportationIds;
|
||||
/**退票备注*/
|
||||
@ApiModelProperty(value = "退票备注")
|
||||
@Excel(name = "退票备注", width = 15)
|
||||
private String refundRemark;
|
||||
/**处理人ID(取消申请/开票/驳回)*/
|
||||
@ApiModelProperty(value = "处理人ID(取消申请/开票/驳回)")
|
||||
@Excel(name = "处理人ID(取消申请/开票/驳回)", width = 15)
|
||||
private String managerId;
|
||||
/**处理时间*/
|
||||
@ApiModelProperty(value = "处理时间")
|
||||
@Excel(name = "处理时间", width = 15, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date managerTime;
|
||||
/**寄出人ID*/
|
||||
@ApiModelProperty(value = "寄出人ID")
|
||||
@Excel(name = "寄出人ID", width = 15)
|
||||
private String sendById;
|
||||
/**寄出时间*/
|
||||
@ApiModelProperty(value = "寄出时间")
|
||||
@Excel(name = "寄出时间", width = 15, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date sendTime;
|
||||
/**寄出邮费*/
|
||||
@ApiModelProperty(value = "寄出邮费")
|
||||
@Excel(name = "寄出邮费", width = 15)
|
||||
private BigDecimal sendPostage;
|
||||
/**快递公司*/
|
||||
@ApiModelProperty(value = "快递公司")
|
||||
@Excel(name = "快递公司", width = 15)
|
||||
private String courierServicesCompany;
|
||||
/**收件地址id*/
|
||||
@ApiModelProperty(value = "收件地址id")
|
||||
@Excel(name = "收件地址id", width = 15)
|
||||
private String receivingAddressId;
|
||||
/**手机号*/
|
||||
@ApiModelProperty(value = "手机号")
|
||||
@Excel(name = "手机号", width = 15)
|
||||
private String phone;
|
||||
/**收件人姓名*/
|
||||
@ApiModelProperty(value = "收件人姓名")
|
||||
@Excel(name = "收件人姓名", width = 15)
|
||||
private String receivingName;
|
||||
/**邮政编码*/
|
||||
@ApiModelProperty(value = "邮政编码")
|
||||
@Excel(name = "邮政编码", width = 15)
|
||||
private String postalCode;
|
||||
/**所在地区*/
|
||||
@ApiModelProperty(value = "所在地区")
|
||||
@Excel(name = "所在地区", width = 15)
|
||||
private String location;
|
||||
|
||||
/**是否删除(0-否,1-是)*/
|
||||
@ApiModelProperty(value = "是否删除(0-否,1-是)")
|
||||
@Excel(name = "是否删除(0-否,1-是)", width = 15)
|
||||
private Integer isDelete;
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
@Excel(name = "所属部门", width = 15)
|
||||
private String sysOrgCode;
|
||||
/**发票类型(0-增值税专用发票,1-普通发票)*/
|
||||
@ApiModelProperty(value = "发票类型(0-增值税专用发票,1-普通发票)")
|
||||
@Excel(name = "发票类型(0-增值税专用发票,1-普通发票)", width = 15)
|
||||
private Integer invoiceType;
|
||||
/**发票性质(0-纸质发票,1-电子发票)*/
|
||||
@ApiModelProperty(value = "发票性质(0-纸质发票,1-电子发票)")
|
||||
@Excel(name = "发票性质(0-纸质发票,1-电子发票)", width = 15)
|
||||
private Integer invoiceNature;
|
||||
/**发票号*/
|
||||
@ApiModelProperty(value = "发票号")
|
||||
@Excel(name = "发票号", width = 15)
|
||||
private String invoiceNumber;
|
||||
/**快递单号*/
|
||||
@ApiModelProperty(value = "快递单号")
|
||||
@Excel(name = "快递单号", width = 15)
|
||||
private String trackingNumber;
|
||||
/**开票代码*/
|
||||
@ApiModelProperty(value = "开票代码")
|
||||
@Excel(name = "开票代码", width = 15)
|
||||
private String invoiceCode;
|
||||
/**发票详情信息上报状态:0-未上报,1-已上报,2-上报失败*/
|
||||
@ApiModelProperty(value = "发票详情信息上报状态:0-未上报,1-已上报,2-上报失败")
|
||||
@Excel(name = "发票详情信息上报状态:0-未上报,1-已上报,2-上报失败", width = 15)
|
||||
private Integer isReport;
|
||||
/**发票详情信息上报失败原因*/
|
||||
@ApiModelProperty(value = "发票详情信息上报失败原因")
|
||||
@Excel(name = "发票详情信息上报失败原因", width = 15)
|
||||
private String errMsg;
|
||||
|
||||
/**发票详情信息上报时间*/
|
||||
@ApiModelProperty(value = "发票详情信息上报时间")
|
||||
@Excel(name = "发票详情信息上报时间", width = 20, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date reportTime;
|
||||
|
||||
@ApiModelProperty(value = "运单事实创建人ID(创建运单时的当前登录人USER-ID)")
|
||||
private String realCreateBy;
|
||||
|
||||
@ApiModelProperty(value = "运单事实创建人名称(创建运单时的当前登录人REAL-NAME)")
|
||||
private String realCreateName;
|
||||
|
||||
@ApiModelProperty(value = "开票时间")
|
||||
private Date invoiceMakeTime;
|
||||
|
||||
/**货主信息id*/
|
||||
@ApiModelProperty(value = "货主信息id")
|
||||
@Excel(name = "货主信息id", width = 15)
|
||||
private String shipperId;
|
||||
|
||||
/**货主信息id*/
|
||||
@ApiModelProperty(value = "货主姓名")
|
||||
@Excel(name = "货主姓名", width = 15)
|
||||
private String shipperName;
|
||||
|
||||
/**货主信息id*/
|
||||
@ApiModelProperty(value = "货主公司名称")
|
||||
@Excel(name = "货主公司名称", width = 15)
|
||||
private String companyName;
|
||||
|
||||
/**税务登记证号*/
|
||||
@ApiModelProperty(value = "税务登记证号")
|
||||
@Excel(name = "税务登记证号", width = 15)
|
||||
private String taxRegAccount;
|
||||
|
||||
/**组织ID*/
|
||||
@ApiModelProperty(value = "组织ID")
|
||||
@Excel(name = "组织ID", width = 15)
|
||||
private Long organizationId;
|
||||
|
||||
/**组织名称*/
|
||||
@ApiModelProperty(value = "组织名称")
|
||||
@Excel(name = "组织名称", width = 15)
|
||||
private String organizationName;
|
||||
|
||||
/**一级组织ID*/
|
||||
@ApiModelProperty(value = "一级组织ID")
|
||||
@Excel(name = "一级组织ID", width = 15)
|
||||
private Long topOrganizationId;
|
||||
}
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
package com.mhd.bms.domain.bmsInvoiceList.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 结算方发票信息表
|
||||
*
|
||||
*/
|
||||
@Data
|
||||
public class BmsSettlementPartyInvoice extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@TableId(type = IdType.ID_WORKER_STR)
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "结算方姓名")
|
||||
@Excel(name = "结算方姓名", width = 15)
|
||||
private String settlementPartyName;
|
||||
@ApiModelProperty(value = "发票抬头")
|
||||
@Excel(name = "发票抬头", width = 15)
|
||||
private String invoiceTitle;
|
||||
@ApiModelProperty(value = "统一社会信用代码")
|
||||
@Excel(name = "统一社会信用代码", width = 15)
|
||||
private String taxRegAccount;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "是否删除(0-否,-是)")
|
||||
@Excel(name = "是否删除(0-否,-是)", width = 15)
|
||||
private Integer isDelete;
|
||||
|
||||
}
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
package com.mhd.bms.domain.bmsInvoiceList.repository.facade;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.mhd.bms.domain.bmsInvoiceList.entity.BmsInvoiceList;
|
||||
import com.mhd.bms.domain.bmsInvoiceList.entity.BmsSettlementPartyInvoice;
|
||||
import com.mhd.bms.domain.bmsInvoiceList.repository.todo.*;
|
||||
import com.mhd.bms.domain.bmsInvoiceList.repository.vo.BmsInvoiceListDetailsVO;
|
||||
import com.mhd.bms.domain.bmsInvoiceList.repository.vo.BmsInvoiceListVO;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 销项发票表
|
||||
* @Author: lfs
|
||||
* @Date: 2020-02-19 08:50:47
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IBmsInvoiceListService extends IService<BmsInvoiceList> {
|
||||
|
||||
Page<BmsInvoiceListVO> queryList(Page<BmsInvoiceListVO> page, BmsInvoiceListQueryDTO tmsInvoiceListQueryDTO);
|
||||
|
||||
void save(BmsInvoiceListAddDTO tmsInvoiceListAddDTO);
|
||||
|
||||
void addReceivableBill(BmsInvoiceListAddDTO tmsInvoiceListAddDTO);
|
||||
|
||||
void update(BmsInvoiceListDTO tmsInvoiceListDTO);
|
||||
|
||||
int delete(List<String> ids);
|
||||
|
||||
BmsInvoiceListDetailsVO details(String id);
|
||||
|
||||
void invoice(BmsInvoiceListInvoiceStateDTO tmsInvoiceListInvoiceStateDTO);
|
||||
|
||||
Integer reject(BmsInvoiceListInvoiceStateDTO tmsInvoiceListInvoiceStateDTO);
|
||||
|
||||
void mail(BmsInvoiceListInvoiceStateDTO tmsInvoiceListInvoiceStateDTO);
|
||||
|
||||
BmsInvoiceList getById(String id);
|
||||
|
||||
void importExcel(Map<String, MultipartFile> fileMap) throws Exception;
|
||||
|
||||
void changeOutInvoice(BmsOutInvoiceChangeDTO tmsOutInvoiceChangeDTO);
|
||||
void queryBulkMailStatus(BmsOutInvoiceChangeDTO tmsOutInvoiceChangeDTO);
|
||||
|
||||
void bulkMail(BmsInvoiceListInvoiceStateDTO tmsInvoiceListInvoiceStateDTO);
|
||||
|
||||
BmsSettlementPartyInvoice selectSettlementPartyInfoByName(String settlementPartyName);
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
package com.mhd.bms.domain.bmsInvoiceList.repository.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.mhd.bms.domain.bmsInvoiceList.entity.BmsInvoiceList;
|
||||
import com.mhd.bms.domain.bmsInvoiceList.repository.todo.BmsInvoiceListQueryDTO;
|
||||
import com.mhd.bms.domain.bmsInvoiceList.repository.vo.BmsInvoiceListDetailsVO;
|
||||
import com.mhd.bms.domain.bmsInvoiceList.repository.vo.BmsInvoiceListVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 销项发票表
|
||||
* @Author: lfs
|
||||
* @Date: 2020-02-19 08:50:47
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface BmsInvoiceListMapper extends BaseMapper<BmsInvoiceList> {
|
||||
|
||||
public List<BmsInvoiceList> selectByMainId(@Param("mainId") String mainId);
|
||||
|
||||
/**
|
||||
* @功能:销项发票表 分页查询
|
||||
* @param bmsInvoiceListQueryDTO
|
||||
* @Date: 2020-02-19 08:50:47
|
||||
* @return
|
||||
*/
|
||||
public List<BmsInvoiceListVO> queryList(Page<BmsInvoiceListVO> page, @Param("bmsInvoiceListQueryDTO") BmsInvoiceListQueryDTO bmsInvoiceListQueryDTO);
|
||||
|
||||
/* 根据id 查询 */
|
||||
public BmsInvoiceListDetailsVO getById(String id);
|
||||
|
||||
/* 根据id 查询 */
|
||||
@Select("SELECT * FROM bms_invoice_list WHERE id=#{id} and is_delete = 0")
|
||||
BmsInvoiceList selectById(String id);
|
||||
@Select("select IFNULL(sum(invoice_value),0) from bms_invoice_list where invoice_state = 2")
|
||||
BigDecimal sumInvoiceAmount();
|
||||
@Select("select IFNULL(sum(invoice_value),0) from bms_invoice_list where invoice_state = 2 and DATE_FORMAT(invoice_apply_time,'%Y-%m-%d') = DATE_FORMAT(#{date},'%Y-%m-%d')")
|
||||
BigDecimal sumTodayInvoiceAmount(Date date);
|
||||
}
|
||||
+796
@@ -0,0 +1,796 @@
|
||||
package com.mhd.bms.domain.bmsInvoiceList.repository.persistence;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.aliyun.oss.ServiceException;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.mhd.bms.domain.bmsInvoiceList.entity.BmsInvoiceList;
|
||||
import com.mhd.bms.domain.bmsInvoiceList.entity.BmsSettlementPartyInvoice;
|
||||
import com.mhd.bms.domain.bmsInvoiceList.repository.facade.IBmsInvoiceListService;
|
||||
import com.mhd.bms.domain.bmsInvoiceList.repository.mapper.BmsInvoiceListMapper;
|
||||
import com.mhd.bms.domain.bmsInvoiceList.repository.todo.*;
|
||||
import com.mhd.bms.domain.bmsInvoiceList.repository.vo.BmsInvoiceListDetailsVO;
|
||||
import com.mhd.bms.domain.bmsInvoiceList.repository.vo.BmsInvoiceListVO;
|
||||
import com.mhd.bms.domain.bmsMakeOutInvoice.entity.BmsMakeOutInvoice;
|
||||
import com.mhd.bms.domain.bmsMakeOutInvoice.repository.mapper.BmsMakeOutInvoiceMapper;
|
||||
import com.mhd.common.core.utils.OrderSequence;
|
||||
import com.mhd.common.core.utils.StringUtils;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.system.api.domain.SysDictData;
|
||||
import com.mhd.system.api.domain.WlhyLoginUser;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.InputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @Description: 销项发票表
|
||||
* @Author: lfs
|
||||
* @Date: 2020-02-19 08:50:47
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class BmsInvoiceListServiceImpl extends ServiceImpl<BmsInvoiceListMapper, BmsInvoiceList> implements IBmsInvoiceListService {
|
||||
@Resource
|
||||
private BmsInvoiceListMapper bmsInvoiceListMapper;
|
||||
@Resource
|
||||
private BmsMakeOutInvoiceMapper bmsMakeOutInvoiceMapper;
|
||||
/*@Resource
|
||||
private BmsSettlementPartyInvoiceMapper bmsSettlementPartyInvoiceMapper;*/
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public Page<BmsInvoiceListVO> queryList(Page<BmsInvoiceListVO> page,
|
||||
BmsInvoiceListQueryDTO bmsInvoiceListQueryDTO) {
|
||||
|
||||
Long frontendOrganizationId = bmsInvoiceListQueryDTO.getOrganizationId();
|
||||
|
||||
LoginUser mhdLoginUser = SecurityUtils.getLoginUser();
|
||||
Long loginUserOrganizationId = null;
|
||||
Long topOrganizationId = null;
|
||||
if (mhdLoginUser != null && mhdLoginUser.getUserPo() != null) {
|
||||
loginUserOrganizationId = mhdLoginUser.getUserPo().getOrganizationId();
|
||||
topOrganizationId = mhdLoginUser.getUserPo().getTopOrganizationId();
|
||||
}
|
||||
|
||||
if (loginUserOrganizationId != null && loginUserOrganizationId.equals(2827L)) {
|
||||
if (frontendOrganizationId != null) {
|
||||
bmsInvoiceListQueryDTO.setOrganizationId(frontendOrganizationId);
|
||||
bmsInvoiceListQueryDTO.setTopOrganizationId(null);
|
||||
} else {
|
||||
bmsInvoiceListQueryDTO.setOrganizationId(null);
|
||||
bmsInvoiceListQueryDTO.setTopOrganizationId(null);
|
||||
}
|
||||
} else {
|
||||
if (frontendOrganizationId != null) {
|
||||
if (frontendOrganizationId.equals(2827L)) {
|
||||
bmsInvoiceListQueryDTO.setOrganizationId(-1L);
|
||||
bmsInvoiceListQueryDTO.setTopOrganizationId(null);
|
||||
} else if (!frontendOrganizationId.equals(loginUserOrganizationId)) {
|
||||
bmsInvoiceListQueryDTO.setOrganizationId(loginUserOrganizationId);
|
||||
if (topOrganizationId != null) {
|
||||
bmsInvoiceListQueryDTO.setTopOrganizationId(topOrganizationId);
|
||||
}
|
||||
} else {
|
||||
bmsInvoiceListQueryDTO.setOrganizationId(frontendOrganizationId);
|
||||
if (topOrganizationId != null) {
|
||||
bmsInvoiceListQueryDTO.setTopOrganizationId(topOrganizationId);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (loginUserOrganizationId != null) {
|
||||
bmsInvoiceListQueryDTO.setOrganizationId(loginUserOrganizationId);
|
||||
}
|
||||
if (topOrganizationId != null) {
|
||||
bmsInvoiceListQueryDTO.setTopOrganizationId(topOrganizationId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
List<BmsInvoiceListVO> bmsInvoiceListVOList = bmsInvoiceListMapper.queryList(page, bmsInvoiceListQueryDTO);
|
||||
return page.setRecords(bmsInvoiceListVOList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public void save(BmsInvoiceListAddDTO bmsInvoiceListAddDTO) {
|
||||
//获取登录人
|
||||
WlhyLoginUser sysUser = SecurityUtils.getLoginUser().getWlhyLoginUser();
|
||||
if (null == sysUser) {
|
||||
throw new ServiceException("sysUser是空值!");
|
||||
}
|
||||
if (StringUtils.isEmpty(bmsInvoiceListAddDTO.getInvoiceTitle())){
|
||||
throw new ServiceException("发票抬头不能为空!");
|
||||
}
|
||||
|
||||
BmsInvoiceList bmsInvoiceList = new BmsInvoiceList(); // 销项发票表
|
||||
BeanUtils.copyProperties(bmsInvoiceListAddDTO, bmsInvoiceList);
|
||||
String shipperId = bmsInvoiceListAddDTO.getShipperId(); // 货主信息ID
|
||||
String createBy = sysUser.getId(); // 创建人ID
|
||||
if("shipper".equals(sysUser.getUserRole()) || "company".equals(sysUser.getUserRole())){
|
||||
shipperId = sysUser.getId();
|
||||
}
|
||||
|
||||
// 保存【销项发票表】数据
|
||||
saveBmsInvoiceList(bmsInvoiceList, bmsInvoiceListAddDTO, sysUser, createBy);
|
||||
|
||||
}
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public void addReceivableBill(BmsInvoiceListAddDTO bmsInvoiceListAddDTO) {
|
||||
//获取登录人
|
||||
WlhyLoginUser sysUser = SecurityUtils.getLoginUser().getWlhyLoginUser();
|
||||
if (null == sysUser) {
|
||||
throw new ServiceException("sysUser是空值!");
|
||||
}
|
||||
if (StringUtils.isEmpty(bmsInvoiceListAddDTO.getInvoiceTitle())){
|
||||
throw new ServiceException("发票抬头不能为空!");
|
||||
}
|
||||
|
||||
BmsInvoiceList bmsInvoiceList = new BmsInvoiceList(); // 销项发票表
|
||||
BeanUtils.copyProperties(bmsInvoiceListAddDTO, bmsInvoiceList);
|
||||
String createBy = sysUser.getId(); // 创建人ID
|
||||
|
||||
if(StringUtils.isNotBlank(bmsInvoiceListAddDTO.getCompanyName())){
|
||||
bmsInvoiceList.setShipperName(bmsInvoiceListAddDTO.getCompanyName());
|
||||
bmsInvoiceList.setCompanyName(bmsInvoiceListAddDTO.getCompanyName());
|
||||
}
|
||||
// 保存【销项发票表】数据
|
||||
saveBmsInvoiceList(bmsInvoiceList, bmsInvoiceListAddDTO, sysUser, createBy);
|
||||
|
||||
/*AjaxResult ajaxResult = financeServiceFeign.editIsInvoice(transportationId,1,bmsInvoiceList.getId(),"",bmsInvoiceList.getApplyNumber());
|
||||
if(!"200".equals(String.valueOf(ajaxResult.get("code")))){
|
||||
throw new com.mhd.common.core.exception.ServiceException(ajaxResult.get("msg").toString());
|
||||
}*/
|
||||
}
|
||||
|
||||
@Override
|
||||
public BmsSettlementPartyInvoice selectSettlementPartyInfoByName(String settlementPartyName) {
|
||||
return null;
|
||||
//return bmsSettlementPartyInvoiceMapper.selectByPartyName(settlementPartyName);
|
||||
}
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public void update(BmsInvoiceListDTO bmsInvoiceListDTO) {
|
||||
//获取登录人
|
||||
WlhyLoginUser sysUser = SecurityUtils.getLoginUser().getWlhyLoginUser();
|
||||
if (null == sysUser) {
|
||||
throw new ServiceException("sysUser是空值!");
|
||||
}
|
||||
BmsInvoiceList bmsInvoiceList = bmsInvoiceListMapper.selectById(bmsInvoiceListDTO.getId());
|
||||
if (null == bmsInvoiceList) {
|
||||
throw new ServiceException("bmsInvoiceList是空值!");
|
||||
}
|
||||
BeanUtils.copyProperties(bmsInvoiceListDTO, bmsInvoiceList);
|
||||
//bmsInvoiceList.setUpdateBy(sysUser.getId());
|
||||
bmsInvoiceList.setUpdateTime(new Date());
|
||||
this.updateById(bmsInvoiceList);
|
||||
List<BmsMakeOutInvoice> bmsMakeOutInvoiceList=bmsMakeOutInvoiceMapper.selectList(new QueryWrapper<BmsMakeOutInvoice>().lambda()
|
||||
.eq(BmsMakeOutInvoice::getInvoiceId,bmsInvoiceList.getId())
|
||||
.eq(BmsMakeOutInvoice::getIsDelete,0));
|
||||
if(ObjectUtil.isNotNull(bmsMakeOutInvoiceList)&&bmsMakeOutInvoiceList.size()>0){
|
||||
for(BmsMakeOutInvoice bmsMakeOutInvoice:bmsMakeOutInvoiceList){
|
||||
bmsMakeOutInvoice.setIsDelete(1);
|
||||
bmsMakeOutInvoiceMapper.updateById(bmsMakeOutInvoice);
|
||||
}
|
||||
}
|
||||
|
||||
List<BmsMakeOutInvoice> bmsMakeOutInvoices = bmsInvoiceListDTO.getBmsMakeOutInvoices();
|
||||
if(ObjectUtil.isNotNull(bmsMakeOutInvoices)&&bmsMakeOutInvoices.size()>0){
|
||||
for (BmsMakeOutInvoice bmsMakeOutInvoice : bmsMakeOutInvoices) {
|
||||
if(StringUtils.isNotBlank(bmsMakeOutInvoice.getId())){
|
||||
//bmsMakeOutInvoice.setUpdateBy(sysUser.getId());
|
||||
bmsMakeOutInvoice.setUpdateTime(new Date());
|
||||
bmsMakeOutInvoice.setIsDelete(0);
|
||||
bmsMakeOutInvoiceMapper.updateById(bmsMakeOutInvoice);
|
||||
}else {
|
||||
String invoiceNumber=bmsMakeOutInvoice.getInvoiceNumber();
|
||||
String invoiceCode=bmsMakeOutInvoice.getInvoiceCode();
|
||||
BigDecimal invoiceValue=bmsMakeOutInvoice.getInvoiceValue();
|
||||
BeanUtils.copyProperties(bmsInvoiceList, bmsMakeOutInvoice);
|
||||
bmsMakeOutInvoice.setId("");
|
||||
//bmsMakeOutInvoice.setCreateBy(sysUser.getId());
|
||||
bmsMakeOutInvoice.setCreateTime(new Date());
|
||||
bmsMakeOutInvoice.setInvoiceId(bmsInvoiceList.getId());
|
||||
bmsMakeOutInvoice.setMakeOutInvoiceId(sysUser.getId());
|
||||
bmsMakeOutInvoice.setMakeOutInvoiceTime(new Date());
|
||||
bmsMakeOutInvoice.setInvoiceNumber(invoiceNumber);
|
||||
bmsMakeOutInvoice.setInvoiceCode(invoiceCode);
|
||||
bmsMakeOutInvoice.setInvoiceValue(invoiceValue);
|
||||
bmsMakeOutInvoiceMapper.insert(bmsMakeOutInvoice);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@Override
|
||||
public int delete(List<String> ids) {
|
||||
for (String id : ids) {
|
||||
//获取登录人
|
||||
WlhyLoginUser sysUser = SecurityUtils.getLoginUser().getWlhyLoginUser();
|
||||
if (null == sysUser) {
|
||||
throw new ServiceException("sysUser是空值!");
|
||||
}
|
||||
BmsInvoiceList bmsInvoiceList = bmsInvoiceListMapper.selectOne(new QueryWrapper<BmsInvoiceList>().lambda().eq(BmsInvoiceList::getId, id));
|
||||
if (null == bmsInvoiceList) {
|
||||
throw new ServiceException("bmsInvoiceList是空值!");
|
||||
}
|
||||
bmsInvoiceList.setIsDelete(1);
|
||||
//bmsInvoiceList.setUpdateBy(sysUser.getId());
|
||||
bmsInvoiceList.setUpdateTime(new Date());
|
||||
this.updateById(bmsInvoiceList);
|
||||
}
|
||||
return ids.size();
|
||||
}
|
||||
|
||||
/**
|
||||
* 发票详情
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public BmsInvoiceListDetailsVO details(String id) {
|
||||
BmsInvoiceListDetailsVO bmsInvoiceListDetailsVO = bmsInvoiceListMapper.getById(id);
|
||||
if (null == bmsInvoiceListDetailsVO) {
|
||||
throw new ServiceException("未查询到该发票信息!");
|
||||
}
|
||||
List<BmsMakeOutInvoice> bmsMakeOutInvoiceList=bmsMakeOutInvoiceMapper.selectList(new QueryWrapper<BmsMakeOutInvoice>().lambda()
|
||||
.eq(BmsMakeOutInvoice::getInvoiceId,id)
|
||||
.eq(BmsMakeOutInvoice::getIsDelete,0));
|
||||
bmsInvoiceListDetailsVO.setBmsMakeOutInvoices(bmsMakeOutInvoiceList);
|
||||
return bmsInvoiceListDetailsVO;
|
||||
}
|
||||
|
||||
/**
|
||||
* 开票
|
||||
*
|
||||
* @param bmsInvoiceListInvoiceStateDTO
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public void invoice(BmsInvoiceListInvoiceStateDTO bmsInvoiceListInvoiceStateDTO) {
|
||||
WlhyLoginUser sysUser = SecurityUtils.getLoginUser().getWlhyLoginUser();
|
||||
if (null == sysUser) {
|
||||
throw new ServiceException("未查询到登录人信息!");
|
||||
}
|
||||
BmsInvoiceList bmsInvoiceList = bmsInvoiceListMapper.selectById(bmsInvoiceListInvoiceStateDTO.getId());
|
||||
if (null == bmsInvoiceList) {
|
||||
throw new ServiceException("根据id未查询到发票信息!");
|
||||
}
|
||||
//发票状态
|
||||
Integer invoiceState = bmsInvoiceList.getInvoiceState();
|
||||
if (invoiceState == 1) {
|
||||
throw new ServiceException("发票申请已取消,请确认!");
|
||||
}
|
||||
if (invoiceState == 3) {
|
||||
throw new ServiceException("发票申请已驳回,请确认!");
|
||||
}
|
||||
if (invoiceState == 2 || invoiceState == 4) {
|
||||
throw new ServiceException("已开票,请确认!");
|
||||
}
|
||||
Date date = new Date();
|
||||
BeanUtils.copyProperties(bmsInvoiceListInvoiceStateDTO, bmsInvoiceList);
|
||||
bmsInvoiceList.setManagerId(sysUser.getId());
|
||||
bmsInvoiceList.setManagerTime(date);
|
||||
//bmsInvoiceList.setUpdateBy(sysUser.getId());
|
||||
bmsInvoiceList.setUpdateTime(date);
|
||||
bmsInvoiceList.setInvoiceMakeTime(date);
|
||||
List<BmsMakeOutInvoice> bmsMakeOutInvoices = bmsInvoiceListInvoiceStateDTO.getBmsMakeOutInvoices();
|
||||
if (bmsMakeOutInvoices == null) {
|
||||
throw new ServiceException("开票不得少于一张!");
|
||||
}
|
||||
bmsInvoiceList.setInvoiceState(2);
|
||||
|
||||
for (BmsMakeOutInvoice bmsMakeOutInvoice : bmsMakeOutInvoices) {
|
||||
/* if(StringUtils.isBlank(bmsMakeOutInvoice.getInvoiceCode())){
|
||||
throw new ServiceException("所有发票的发票号码不得为空!");
|
||||
}
|
||||
if(StringUtils.isBlank(bmsMakeOutInvoice.getInvoiceNumber())){
|
||||
throw new ServiceException("所有发票的发票号码不得为空!");
|
||||
}*/
|
||||
String invoiceNumber=bmsMakeOutInvoice.getInvoiceNumber();
|
||||
String invoiceCode=bmsMakeOutInvoice.getInvoiceCode();
|
||||
BigDecimal invoiceValue=bmsMakeOutInvoice.getInvoiceValue();
|
||||
BeanUtils.copyProperties(bmsInvoiceList, bmsMakeOutInvoice);
|
||||
bmsMakeOutInvoice.setId("");
|
||||
//bmsMakeOutInvoice.setCreateBy(sysUser.getId());
|
||||
bmsMakeOutInvoice.setCreateTime(date);
|
||||
bmsMakeOutInvoice.setInvoiceId(bmsInvoiceList.getId());
|
||||
bmsMakeOutInvoice.setMakeOutInvoiceId(sysUser.getId());
|
||||
bmsMakeOutInvoice.setMakeOutInvoiceTime(date);
|
||||
bmsMakeOutInvoice.setInvoiceNumber(invoiceNumber);
|
||||
bmsMakeOutInvoice.setInvoiceCode(invoiceCode);
|
||||
bmsMakeOutInvoice.setInvoiceValue(invoiceValue);
|
||||
bmsMakeOutInvoiceMapper.insert(bmsMakeOutInvoice);
|
||||
}
|
||||
this.updateById(bmsInvoiceList);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 驳回 - 取消申请
|
||||
*
|
||||
* @param bmsInvoiceListInvoiceStateDTO
|
||||
*/
|
||||
@Override
|
||||
public Integer reject(BmsInvoiceListInvoiceStateDTO bmsInvoiceListInvoiceStateDTO) {
|
||||
WlhyLoginUser sysUser = SecurityUtils.getLoginUser().getWlhyLoginUser();
|
||||
if (null == sysUser) {
|
||||
throw new ServiceException("未查询到登录人信息!");
|
||||
}
|
||||
BmsInvoiceList bmsInvoiceList = bmsInvoiceListMapper.selectById(bmsInvoiceListInvoiceStateDTO.getId());
|
||||
if (null == bmsInvoiceList) {
|
||||
throw new ServiceException("未查询到发票信息!");
|
||||
}
|
||||
if (bmsInvoiceListInvoiceStateDTO.getOperateType() != null) {
|
||||
switch (bmsInvoiceListInvoiceStateDTO.getOperateType()) {
|
||||
case 0:
|
||||
bmsInvoiceListInvoiceStateDTO.setInvoiceState(1);
|
||||
break;
|
||||
case 1:
|
||||
bmsInvoiceListInvoiceStateDTO.setInvoiceState(3);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (bmsInvoiceListInvoiceStateDTO.getInvoiceState() == 1 && bmsInvoiceList.getInvoiceState() == 1) {
|
||||
throw new ServiceException("发票申请已取消,请确认!");
|
||||
}
|
||||
if (bmsInvoiceListInvoiceStateDTO.getInvoiceState() == 1 && bmsInvoiceList.getInvoiceState() == 3) {
|
||||
throw new ServiceException("发票申请已驳回,请确认!");
|
||||
}
|
||||
if (bmsInvoiceListInvoiceStateDTO.getInvoiceState() == 3 && bmsInvoiceList.getInvoiceState() == 1) {
|
||||
throw new ServiceException("发票申请已取消,请确认!");
|
||||
}
|
||||
if (bmsInvoiceListInvoiceStateDTO.getInvoiceState() == 3 && bmsInvoiceList.getInvoiceState() == 3) {
|
||||
throw new ServiceException("发票申请已驳回,请确认!");
|
||||
}
|
||||
if ((bmsInvoiceListInvoiceStateDTO.getInvoiceState() == 1 || bmsInvoiceListInvoiceStateDTO.getInvoiceState() == 3) && (bmsInvoiceList.getInvoiceState() == 4 || bmsInvoiceList.getInvoiceState() == 2)) {
|
||||
throw new ServiceException("已开票,请确认!");
|
||||
}
|
||||
BeanUtils.copyProperties(bmsInvoiceListInvoiceStateDTO, bmsInvoiceList);
|
||||
bmsInvoiceList.setManagerId(sysUser.getId());
|
||||
bmsInvoiceList.setManagerTime(new Date());
|
||||
//bmsInvoiceList.setUpdateBy(sysUser.getId());
|
||||
bmsInvoiceList.setUpdateTime(new Date());
|
||||
this.updateById(bmsInvoiceList);
|
||||
return bmsInvoiceList.getInvoiceState();
|
||||
}
|
||||
|
||||
/**
|
||||
* 寄出
|
||||
*
|
||||
* @param bmsInvoiceListInvoiceStateDTO
|
||||
*/
|
||||
@Override
|
||||
public void mail(BmsInvoiceListInvoiceStateDTO bmsInvoiceListInvoiceStateDTO) {
|
||||
//销项发票表保存状态
|
||||
WlhyLoginUser sysUser = SecurityUtils.getLoginUser().getWlhyLoginUser();
|
||||
if (null == sysUser) {
|
||||
throw new ServiceException("未查询到登录人信息");
|
||||
}
|
||||
|
||||
BmsInvoiceList bmsInvoiceList = bmsInvoiceListMapper.selectById(bmsInvoiceListInvoiceStateDTO.getId());
|
||||
|
||||
if (StringUtils.isNotBlank(bmsInvoiceList.getSendById())) {
|
||||
throw new ServiceException("发票已寄出,请确认");
|
||||
}
|
||||
BeanUtils.copyProperties(bmsInvoiceListInvoiceStateDTO, bmsInvoiceList);
|
||||
|
||||
bmsInvoiceList.setInvoiceState(4);
|
||||
bmsInvoiceList.setSendById(sysUser.getId());
|
||||
bmsInvoiceList.setSendTime(new Date());
|
||||
//bmsInvoiceList.setUpdateBy(sysUser.getId());
|
||||
bmsInvoiceList.setUpdateTime(new Date());
|
||||
this.updateById(bmsInvoiceList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id
|
||||
*/
|
||||
@Override
|
||||
public BmsInvoiceList getById(String id) {
|
||||
BmsInvoiceList bmsInvoiceList = bmsInvoiceListMapper.selectById(id);
|
||||
if (null == bmsInvoiceList) {
|
||||
throw new ServiceException("当前发票不存在");
|
||||
}
|
||||
return bmsInvoiceList;
|
||||
}
|
||||
|
||||
@Transactional
|
||||
@Override
|
||||
public void importExcel(Map<String, MultipartFile> fileMap) throws Exception {
|
||||
//获取登录人
|
||||
WlhyLoginUser sysUser = SecurityUtils.getLoginUser().getWlhyLoginUser();
|
||||
if (null == sysUser) {
|
||||
throw new ServiceException("未查询到登录用户的信息");
|
||||
}
|
||||
for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
|
||||
MultipartFile file = entity.getValue();// 获取上传文件对象
|
||||
InputStream inputStream = file.getInputStream();
|
||||
Workbook wb = null;
|
||||
if (file.getOriginalFilename().toUpperCase().endsWith(".XLS")) {
|
||||
wb = new HSSFWorkbook(inputStream);
|
||||
} else if (file.getOriginalFilename().toUpperCase().endsWith(".XLSX")) {
|
||||
wb = new XSSFWorkbook(inputStream);
|
||||
} else {
|
||||
throw new ServiceException("不支持的文件类型!");
|
||||
}
|
||||
if (wb != null) {
|
||||
// 获取工作表的数量
|
||||
int numberOfSheets = wb.getNumberOfSheets();
|
||||
for (int i = 0; i < numberOfSheets; i++) {
|
||||
// 获取第一个工作表
|
||||
if (i == 0) {
|
||||
Sheet sheet = wb.getSheetAt(i);
|
||||
// 行对象
|
||||
Row row = sheet.getRow(0);
|
||||
//获取列数(初始化第一行的列数)
|
||||
int cells = row.getPhysicalNumberOfCells();
|
||||
//获取当前工作表行数
|
||||
int rows = sheet.getPhysicalNumberOfRows();
|
||||
// 循环每一行的数据 第一行是表头
|
||||
// 第二行是标内容
|
||||
Integer j2 = 0;
|
||||
//填充当前页行对象
|
||||
row = sheet.getRow(0);
|
||||
String title = null;
|
||||
BmsInvoiceList bmsInvoiceList = new BmsInvoiceList();
|
||||
|
||||
if (null != row.getCell(0) && StringUtils.isNotEmpty(row.getCell(0).toString())) {
|
||||
row.getCell(0).setCellType(CellType.STRING);
|
||||
title = row.getCell(0).getStringCellValue().trim();
|
||||
String substring = title.substring(title.lastIndexOf("创建时间:") + 5, title.lastIndexOf("创建时间:") + 24);
|
||||
String applyNumber = title.substring(title.lastIndexOf("开票申请单号:") + 7, title.lastIndexOf("开票申请单号:") + 21);
|
||||
String replace = substring.replace("/", "-");
|
||||
Date date = new Date();
|
||||
bmsInvoiceList.setInvoiceValue(BigDecimal.ZERO);
|
||||
bmsInvoiceList.setCreateTime(date);
|
||||
bmsInvoiceList.setApplyNumber(applyNumber);
|
||||
bmsInvoiceList.setInvoiceApplyTime(date);
|
||||
bmsInvoiceList.setApplicantId(sysUser.getId());
|
||||
this.save(bmsInvoiceList);
|
||||
}
|
||||
for (int j = 2; j < rows; j++) {
|
||||
//填充当前页行对象
|
||||
row = sheet.getRow(j);
|
||||
saveInvoiceList(sysUser, row, j,bmsInvoiceList);
|
||||
j2++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void saveInvoiceList(WlhyLoginUser sysUser, Row row, int j, BmsInvoiceList bmsInvoiceList) {
|
||||
//获取当前行的一个框中的数据从零开始
|
||||
j = j + 1;
|
||||
String transportationNumber = null;//运单号
|
||||
String transportationId = null;//运单id
|
||||
String transportationIds = bmsInvoiceList.getTransportationIds();//运单id拼接 逗号隔开
|
||||
if (null != row.getCell(0) && StringUtils.isNotEmpty(row.getCell(0).toString())) {
|
||||
row.getCell(0).setCellType(CellType.STRING);
|
||||
transportationNumber = row.getCell(0).getStringCellValue().trim();//车牌号
|
||||
if (StringUtils.isEmpty(transportationNumber)) {
|
||||
throw new ServiceException("第" + j + "行未获取运单编号");
|
||||
}
|
||||
}
|
||||
|
||||
String goodsName = null;//货物名称
|
||||
if (null != row.getCell(1) && StringUtils.isNotEmpty(row.getCell(1).toString())) {
|
||||
row.getCell(1).setCellType(CellType.STRING);
|
||||
goodsName = row.getCell(1).getStringCellValue().trim();
|
||||
}
|
||||
String vehicleNumber = null;//车牌号
|
||||
if (null != row.getCell(2) && StringUtils.isNotEmpty(row.getCell(2).toString())) {
|
||||
row.getCell(2).setCellType(CellType.STRING);
|
||||
vehicleNumber = row.getCell(2).getStringCellValue().trim();
|
||||
}
|
||||
String driverInfo = null;//承运人(承运人手机号)
|
||||
if (null != row.getCell(3) && StringUtils.isNotEmpty(row.getCell(2).toString())) {
|
||||
row.getCell(3).setCellType(CellType.STRING);
|
||||
driverInfo = row.getCell(3).getStringCellValue().trim();
|
||||
}
|
||||
String loadingTime = null;//计划提货时间
|
||||
if (null != row.getCell(4) && StringUtils.isNotEmpty(row.getCell(4).toString())) {
|
||||
row.getCell(4).setCellType(CellType.STRING);
|
||||
loadingTime = row.getCell(4).getStringCellValue().trim();
|
||||
}
|
||||
String unloadTime = null;//计划卸货时间
|
||||
if (null != row.getCell(5) && StringUtils.isNotEmpty(row.getCell(5).toString())) {
|
||||
row.getCell(5).setCellType(CellType.STRING);
|
||||
unloadTime = row.getCell(5).getStringCellValue().trim();
|
||||
}
|
||||
String agreementWeight = null;//计划装货量(吨)
|
||||
if (null != row.getCell(6) && StringUtils.isNotEmpty(row.getCell(6).toString())) {
|
||||
row.getCell(6).setCellType(CellType.STRING);
|
||||
agreementWeight = row.getCell(6).getStringCellValue().trim();
|
||||
}
|
||||
String loadingNumber = null;//实发重量(吨)
|
||||
if (null != row.getCell(7) && StringUtils.isNotEmpty(row.getCell(7).toString())) {
|
||||
row.getCell(7).setCellType(CellType.STRING);
|
||||
loadingNumber = row.getCell(7).getStringCellValue().trim();
|
||||
}
|
||||
String unloadNumber = null;//实收重量(吨)=结算重量(吨)
|
||||
if (null != row.getCell(8) && StringUtils.isNotEmpty(row.getCell(8).toString())) {
|
||||
row.getCell(8).setCellType(CellType.STRING);
|
||||
unloadNumber = row.getCell(8).getStringCellValue().trim();
|
||||
}
|
||||
String loadingName = null;//装货地
|
||||
if (null != row.getCell(10) && StringUtils.isNotEmpty(row.getCell(10).toString())) {
|
||||
row.getCell(10).setCellType(CellType.STRING);
|
||||
loadingName = row.getCell(10).getStringCellValue().trim();
|
||||
}
|
||||
String unloadName = null;//卸货地
|
||||
if (null != row.getCell(11) && StringUtils.isNotEmpty(row.getCell(11).toString())) {
|
||||
row.getCell(11).setCellType(CellType.STRING);
|
||||
unloadName = row.getCell(11).getStringCellValue().trim();
|
||||
}
|
||||
String totalFee = null;//含税总运费(元)
|
||||
if (null != row.getCell(12) && StringUtils.isNotEmpty(row.getCell(12).toString())) {
|
||||
row.getCell(12).setCellType(CellType.STRING);
|
||||
totalFee = row.getCell(12).getStringCellValue().trim();
|
||||
if (StringUtils.isBlank(totalFee)){
|
||||
throw new ServiceException("第" + j + "行运单编号为"+transportationNumber+"的运单含税总运费不存在,请手动维护");
|
||||
}
|
||||
}
|
||||
String freightAmount = null;//运费(元)
|
||||
if (null != row.getCell(13) && StringUtils.isNotEmpty(row.getCell(13).toString())) {
|
||||
row.getCell(13).setCellType(CellType.STRING);
|
||||
freightAmount = row.getCell(13).getStringCellValue().trim();
|
||||
}
|
||||
String specialFee = null;//管理费(元)
|
||||
if (null != row.getCell(14) && StringUtils.isNotEmpty(row.getCell(14).toString())) {
|
||||
row.getCell(14).setCellType(CellType.STRING);
|
||||
specialFee = row.getCell(14).getStringCellValue().trim();
|
||||
}
|
||||
String paymentTime = null;//付款时间
|
||||
if (null != row.getCell(15) && StringUtils.isNotEmpty(row.getCell(15).toString())) {
|
||||
row.getCell(15).setCellType(CellType.STRING);
|
||||
specialFee = row.getCell(15).getStringCellValue().trim();
|
||||
}
|
||||
|
||||
bmsInvoiceList.setInvoiceValue(bmsInvoiceList.getInvoiceValue().add(new BigDecimal(totalFee)));
|
||||
bmsInvoiceListMapper.updateById(bmsInvoiceList);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 修改开票信息
|
||||
* @Author Alex
|
||||
* @Date 2021/12/28 19:11
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public void changeOutInvoice(BmsOutInvoiceChangeDTO bmsOutInvoiceChangeDTO) {
|
||||
WlhyLoginUser sysUser = SecurityUtils.getLoginUser().getWlhyLoginUser();
|
||||
if (null == sysUser) {
|
||||
throw new ServiceException("未查询到登录人信息!");
|
||||
}
|
||||
Date now = new Date();
|
||||
if(StringUtils.isNotBlank(bmsOutInvoiceChangeDTO.getIds())){
|
||||
String [] idList = bmsOutInvoiceChangeDTO.getIds().split(",");
|
||||
for(String id : idList){
|
||||
BmsInvoiceList bmsInvoiceList = bmsInvoiceListMapper.selectById(id);
|
||||
BmsMakeOutInvoice bmsMakeOutInvoice = bmsMakeOutInvoiceMapper.queryByInvoiceId(id);
|
||||
if (null == bmsInvoiceList) {
|
||||
throw new ServiceException("未查询到发票信息!");
|
||||
}
|
||||
if (null == bmsMakeOutInvoice) {
|
||||
throw new ServiceException("未查询到发票信息!");
|
||||
}
|
||||
//发票状态(0-未开票,1-已取消申请,2-已开票,3-已驳回,4-已寄出,5-已作废)
|
||||
Integer invoiceState = bmsInvoiceList.getInvoiceState();
|
||||
if (invoiceState == 0) {
|
||||
throw new ServiceException("未开票,请先开票!");
|
||||
}
|
||||
if (invoiceState == 1) {
|
||||
throw new ServiceException("发票申请已取消,请确认!");
|
||||
}
|
||||
if (invoiceState == 3) {
|
||||
throw new ServiceException("发票申请已驳回,请确认!");
|
||||
}
|
||||
if (invoiceState == 5) {
|
||||
throw new ServiceException("发票申请已作废,请确认!");
|
||||
}
|
||||
bmsInvoiceList.setInvoiceNumber(bmsOutInvoiceChangeDTO.getInvoiceNumber());
|
||||
bmsInvoiceList.setInvoiceCode(bmsOutInvoiceChangeDTO.getInvoiceCode());
|
||||
bmsInvoiceList.setInvoiceValue(bmsOutInvoiceChangeDTO.getInvoiceValue());
|
||||
bmsInvoiceListMapper.updateById(bmsInvoiceList);
|
||||
|
||||
bmsMakeOutInvoice.setInvoiceNumber(bmsOutInvoiceChangeDTO.getInvoiceNumber());
|
||||
bmsMakeOutInvoice.setInvoiceCode(bmsOutInvoiceChangeDTO.getInvoiceCode());
|
||||
bmsMakeOutInvoice.setInvoiceValue(bmsOutInvoiceChangeDTO.getInvoiceValue());
|
||||
//bmsMakeOutInvoice.setUpdateBy(sysUser.getId());
|
||||
bmsMakeOutInvoice.setUpdateTime(now);
|
||||
bmsMakeOutInvoiceMapper.updateById(bmsMakeOutInvoice);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 校验选中发票信息是否可以批量开票
|
||||
* @Author Alex
|
||||
* @Date 2021/12/29 21:51
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public void queryBulkMailStatus(BmsOutInvoiceChangeDTO bmsOutInvoiceChangeDTO) {
|
||||
WlhyLoginUser sysUser = SecurityUtils.getLoginUser().getWlhyLoginUser();
|
||||
if (null == sysUser) {
|
||||
throw new ServiceException("未查询到登录人信息!");
|
||||
}
|
||||
Date now = new Date();
|
||||
if(StringUtils.isNotBlank(bmsOutInvoiceChangeDTO.getIds())){
|
||||
String [] idList = bmsOutInvoiceChangeDTO.getIds().split(",");
|
||||
for(int i=0;i< idList.length; i++){
|
||||
int j = i +1;
|
||||
String id = idList[i];
|
||||
BmsInvoiceList bmsInvoiceList = bmsInvoiceListMapper.selectById(id);
|
||||
BmsMakeOutInvoice bmsMakeOutInvoice = bmsMakeOutInvoiceMapper.queryByInvoiceId(id);
|
||||
if (null == bmsInvoiceList) {
|
||||
throw new ServiceException("未查询到第"+j+"条到发票信息!");
|
||||
}
|
||||
//发票状态(0-未开票,1-已取消申请,2-已开票,3-已驳回,4-已寄出,5-已作废)
|
||||
Integer invoiceState = bmsInvoiceList.getInvoiceState();
|
||||
if (invoiceState == 0) {
|
||||
throw new ServiceException("第"+j+"条未开票,请先开票!");
|
||||
}
|
||||
if (invoiceState == 1) {
|
||||
throw new ServiceException("第"+j+"条发票申请已取消,请确认!");
|
||||
}
|
||||
if (invoiceState == 3) {
|
||||
throw new ServiceException("第"+j+"条发票申请已驳回,请确认!");
|
||||
}
|
||||
if (invoiceState == 4) {
|
||||
throw new ServiceException("第"+j+"条发票申请已寄出,请确认!");
|
||||
}
|
||||
if (invoiceState == 5) {
|
||||
throw new ServiceException("第"+j+"条发票申请已作废,请确认!");
|
||||
}
|
||||
if (null == bmsMakeOutInvoice) {
|
||||
throw new ServiceException("未查询到第"+j+"条到开票信息!");
|
||||
}
|
||||
|
||||
BmsInvoiceList bmsInvoiceList0 = bmsInvoiceListMapper.selectById(idList[0]);
|
||||
if(i>0){
|
||||
if(!bmsInvoiceList0.getApplicantId().equals(bmsInvoiceList.getApplicantId())){
|
||||
throw new ServiceException("第1条到发票信息与第"+j+"条到发票信息不是同一申请人,请选择同一申请人后再批量开票!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 批量寄出
|
||||
* @Author Alex
|
||||
* @Date 2021/12/30 14:56
|
||||
*/
|
||||
@Override
|
||||
public void bulkMail(BmsInvoiceListInvoiceStateDTO bmsInvoiceListInvoiceStateDTO) {
|
||||
//销项发票表保存状态
|
||||
WlhyLoginUser sysUser = SecurityUtils.getLoginUser().getWlhyLoginUser();
|
||||
if (null == sysUser) {
|
||||
throw new ServiceException("未查询到登录人信息");
|
||||
}
|
||||
if(StringUtils.isBlank(bmsInvoiceListInvoiceStateDTO.getId())){
|
||||
throw new ServiceException("未获取到发票信息");
|
||||
}
|
||||
String [] idList = bmsInvoiceListInvoiceStateDTO.getId().split(",");
|
||||
for(int i = 0;i<idList.length;i++){
|
||||
String id = idList[i];
|
||||
int j = i+1;
|
||||
BmsInvoiceList bmsInvoiceList = bmsInvoiceListMapper.selectById(id);
|
||||
BmsMakeOutInvoice bmsMakeOutInvoice = bmsMakeOutInvoiceMapper.queryByInvoiceId(id);
|
||||
if(bmsInvoiceList==null){
|
||||
throw new ServiceException("未获取到第"+j+"条发票信息");
|
||||
}
|
||||
if (null == bmsMakeOutInvoice) {
|
||||
throw new ServiceException("未查询到第"+j+"条到开票信息!");
|
||||
}
|
||||
if (null == bmsInvoiceList) {
|
||||
throw new ServiceException("第"+j+"条未查询到开票信息");
|
||||
}
|
||||
//发票状态(0-未开票,1-已取消申请,2-已开票,3-已驳回,4-已寄出,5-已作废)
|
||||
Integer invoiceState = bmsInvoiceList.getInvoiceState();
|
||||
if (invoiceState == 0) {
|
||||
throw new ServiceException("第"+j+"条未开票,请先开票!");
|
||||
}
|
||||
if (invoiceState == 1) {
|
||||
throw new ServiceException("第"+j+"条发票申请已取消,请确认!");
|
||||
}
|
||||
if (invoiceState == 3) {
|
||||
throw new ServiceException("第"+j+"条发票申请已驳回,请确认!");
|
||||
}
|
||||
if (invoiceState == 4) {
|
||||
throw new ServiceException("第"+j+"条发票申请已寄出,请确认!");
|
||||
}
|
||||
if (invoiceState == 5) {
|
||||
throw new ServiceException("第"+j+"条发票申请已作废,请确认!");
|
||||
}
|
||||
|
||||
bmsInvoiceList.setCourierServicesCompany(bmsInvoiceListInvoiceStateDTO.getCourierServicesCompany());
|
||||
bmsInvoiceList.setSendPostage(bmsInvoiceListInvoiceStateDTO.getSendPostage());
|
||||
bmsInvoiceList.setTrackingNumber(bmsInvoiceListInvoiceStateDTO.getTrackingNumber());
|
||||
|
||||
bmsInvoiceList.setInvoiceState(4);
|
||||
bmsInvoiceList.setSendById(sysUser.getId());
|
||||
bmsInvoiceList.setSendTime(new Date());
|
||||
//bmsInvoiceList.setUpdateBy(sysUser.getId());
|
||||
bmsInvoiceList.setUpdateTime(new Date());
|
||||
this.updateById(bmsInvoiceList);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 从save方法中分出来的 单独保存销项发票表数据的方法
|
||||
* @param bmsInvoiceList
|
||||
* @param bmsInvoiceListAddDTO
|
||||
* @param sysUser
|
||||
* @param createBy
|
||||
*/
|
||||
public void saveBmsInvoiceList(BmsInvoiceList bmsInvoiceList, BmsInvoiceListAddDTO bmsInvoiceListAddDTO, WlhyLoginUser sysUser, String createBy){
|
||||
|
||||
bmsInvoiceList.setReceivingAddressId(bmsInvoiceListAddDTO.getReceivingAddressId());
|
||||
|
||||
//bmsInvoiceList.setCreateBy(createBy);
|
||||
bmsInvoiceList.setApplyNumber(OrderSequence.getOrderCode("XF"));
|
||||
bmsInvoiceList.setCreateTime(new Date());
|
||||
bmsInvoiceList.setInvoiceApplyTime(new Date());
|
||||
bmsInvoiceList.setApplicantId(sysUser.getId());
|
||||
bmsInvoiceList.setRealCreateBy(sysUser.getId());
|
||||
bmsInvoiceList.setRealCreateName(sysUser.getRealname());
|
||||
|
||||
|
||||
// 设置组织相关字段:从当前登录用户获取组织信息
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (loginUser != null && loginUser.getUserPo() != null) {
|
||||
// 设置组织ID
|
||||
if (loginUser.getUserPo().getOrganizationId() != null) {
|
||||
bmsInvoiceList.setOrganizationId(loginUser.getUserPo().getOrganizationId());
|
||||
}
|
||||
// 设置组织名称
|
||||
if (StringUtils.isNotBlank(loginUser.getUserPo().getOrganizationName())) {
|
||||
bmsInvoiceList.setOrganizationName(loginUser.getUserPo().getOrganizationName());
|
||||
}
|
||||
// 设置一级组织ID
|
||||
if (loginUser.getUserPo().getTopOrganizationId() != null) {
|
||||
bmsInvoiceList.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
|
||||
}
|
||||
}
|
||||
|
||||
this.save(bmsInvoiceList);
|
||||
}
|
||||
}
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
package com.mhd.bms.domain.bmsInvoiceList.repository.todo;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @Description: 销项发票表
|
||||
* @Author: lfs
|
||||
* @Date: 2020-02-19 08:50:47
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class BmsInvoiceListAddDTO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
/**发票抬头*/
|
||||
@ApiModelProperty(value = "发票抬头")
|
||||
@Excel(name = "发票抬头", width = 15)
|
||||
private String invoiceTitle;
|
||||
/**发票金额*/
|
||||
@ApiModelProperty(value = "发票金额")
|
||||
@Excel(name = "发票金额", width = 15)
|
||||
private BigDecimal invoiceValue;
|
||||
/**发票备注*/
|
||||
@ApiModelProperty(value = "发票备注")
|
||||
@Excel(name = "发票备注", width = 15)
|
||||
private String remark;
|
||||
/**申请人ID*/
|
||||
@ApiModelProperty(value = "申请人ID")
|
||||
@Excel(name = "申请人ID", width = 15)
|
||||
private String applicantId;
|
||||
/**收件地址id*/
|
||||
@ApiModelProperty(value = "收件地址id")
|
||||
@Excel(name = "收件地址id", width = 15)
|
||||
private String receivingAddressId;
|
||||
/**运输单ids*/
|
||||
@ApiModelProperty(value = "运输单ids")
|
||||
@Excel(name = "运输单ids", width = 15)
|
||||
private String transportationIds;
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
@Excel(name = "所属部门", width = 15)
|
||||
private String sysOrgCode;
|
||||
/**货主信息id*/
|
||||
@ApiModelProperty(value = "货主信息id")
|
||||
@Excel(name = "货主信息id", width = 15)
|
||||
private String shipperId;
|
||||
|
||||
@ApiModelProperty(value = "结算方")
|
||||
@Excel(name = "结算方", width = 15)
|
||||
private String companyName;
|
||||
|
||||
/**税务登记证号*/
|
||||
@ApiModelProperty(value = "税务登记证号")
|
||||
@Excel(name = "税务登记证号", width = 15)
|
||||
private String taxRegAccount;
|
||||
}
|
||||
+137
@@ -0,0 +1,137 @@
|
||||
package com.mhd.bms.domain.bmsInvoiceList.repository.todo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.bms.domain.bmsMakeOutInvoice.entity.BmsMakeOutInvoice;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 销项发票表
|
||||
* @Author: lfs
|
||||
* @Date: 2020-02-19 08:50:47
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class BmsInvoiceListDTO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ID_WORKER_STR)
|
||||
private String id;
|
||||
/**发票抬头*/
|
||||
@ApiModelProperty(value = "发票抬头")
|
||||
@Excel(name = "发票抬头", width = 15)
|
||||
private String invoiceTitle;
|
||||
/**发票金额*/
|
||||
@ApiModelProperty(value = "发票金额")
|
||||
@Excel(name = "发票金额", width = 15)
|
||||
private BigDecimal invoiceValue;
|
||||
/**发票申请单号*/
|
||||
@ApiModelProperty(value = "发票申请单号")
|
||||
@Excel(name = "发票申请单号", width = 15)
|
||||
private String applyNumber;
|
||||
/**发票备注*/
|
||||
@ApiModelProperty(value = "发票备注")
|
||||
@Excel(name = "发票备注", width = 15)
|
||||
private String remark;
|
||||
/**发票状态(0-未开票,1-已取消申请,2-已开票,3-已驳回,4-已寄出,5-已作废)*/
|
||||
@ApiModelProperty(value = "发票状态(0-未开票,1-已取消申请,2-已开票,3-已驳回,4-已寄出,5-已作废)")
|
||||
@Excel(name = "发票状态(0-未开票,1-已取消申请,2-已开票,3-已驳回,4-已寄出,5-已作废)", width = 15)
|
||||
private Integer invoiceState;
|
||||
/**发票申请时间*/
|
||||
@ApiModelProperty(value = "发票申请时间")
|
||||
@Excel(name = "发票申请时间", width = 15, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date invoiceApplyTime;
|
||||
/**申请人ID*/
|
||||
@ApiModelProperty(value = "申请人ID")
|
||||
@Excel(name = "申请人ID", width = 15)
|
||||
private String applicantId;
|
||||
/**驳回原因*/
|
||||
@ApiModelProperty(value = "驳回原因")
|
||||
@Excel(name = "驳回原因", width = 15)
|
||||
private String rejectReason;
|
||||
/**运输单ids*/
|
||||
@ApiModelProperty(value = "运输单ids")
|
||||
@Excel(name = "运输单ids", width = 15)
|
||||
private String transportationIds;
|
||||
/**退票备注*/
|
||||
@ApiModelProperty(value = "退票备注")
|
||||
@Excel(name = "退票备注", width = 15)
|
||||
private String refundRemark;
|
||||
/**处理人ID(取消申请/开票/驳回)*/
|
||||
@ApiModelProperty(value = "处理人ID(取消申请/开票/驳回)")
|
||||
@Excel(name = "处理人ID(取消申请/开票/驳回)", width = 15)
|
||||
private String managerId;
|
||||
/**处理时间*/
|
||||
@ApiModelProperty(value = "处理时间")
|
||||
@Excel(name = "处理时间", width = 15, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date managerTime;
|
||||
/**寄出人ID*/
|
||||
@ApiModelProperty(value = "寄出人ID")
|
||||
@Excel(name = "寄出人ID", width = 15)
|
||||
private String sendById;
|
||||
/**寄出时间*/
|
||||
@ApiModelProperty(value = "寄出时间")
|
||||
@Excel(name = "寄出时间", width = 15, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date sendTime;
|
||||
/**寄出邮费*/
|
||||
@ApiModelProperty(value = "寄出邮费")
|
||||
@Excel(name = "寄出邮费", width = 15)
|
||||
private BigDecimal sendPostage;
|
||||
/**快递公司*/
|
||||
@ApiModelProperty(value = "快递公司")
|
||||
@Excel(name = "快递公司", width = 15)
|
||||
private String courierServicesCompany;
|
||||
/**收件地址id*/
|
||||
@ApiModelProperty(value = "收件地址id")
|
||||
@Excel(name = "收件地址id", width = 15)
|
||||
private String receivingAddressId;
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
@Excel(name = "创建人", width = 15)
|
||||
private String createBy;
|
||||
/**创建日期*/
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
@Excel(name = "创建日期", width = 20, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
@Excel(name = "更新人", width = 15)
|
||||
private String updateBy;
|
||||
/**更新日期*/
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
@Excel(name = "更新日期", width = 20, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
/**是否删除(0-否,1-是)*/
|
||||
@ApiModelProperty(value = "是否删除(0-否,1-是)")
|
||||
@Excel(name = "是否删除(0-否,1-是)", width = 15)
|
||||
private Integer isDelete;
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
@Excel(name = "所属部门", width = 15)
|
||||
private String sysOrgCode;
|
||||
|
||||
/**开票表集合*/
|
||||
@ApiModelProperty(value = "开票表集合")
|
||||
@Excel(name = "开票表集合", width = 15)
|
||||
private List<BmsMakeOutInvoice> bmsMakeOutInvoices;
|
||||
}
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
package com.mhd.bms.domain.bmsInvoiceList.repository.todo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.bms.domain.bmsMakeOutInvoice.entity.BmsMakeOutInvoice;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.system.api.domain.TmsMakeOutInvoice;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 销项发票表 - 开票 驳回 寄出
|
||||
* @Author: lfs
|
||||
* @Date: 2020-02-19 08:50:47
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class BmsInvoiceListInvoiceStateDTO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ID_WORKER_STR)
|
||||
private String id;
|
||||
/**发票状态(0-未开票,1-已取消申请,2-已开票,3-已驳回,4-已寄出,5-已作废)*/
|
||||
@ApiModelProperty(value = "发票状态(0-未开票,1-已取消申请,2-已开票,3-已驳回,4-已寄出,5-已作废)",required = true)
|
||||
@Excel(name = "发票状态(0-未开票,1-已取消申请,2-已开票,3-已驳回,4-已寄出,5-已作废)", width = 15)
|
||||
private Integer invoiceState;
|
||||
/**驳回原因*/
|
||||
@ApiModelProperty(value = "驳回原因")
|
||||
@Excel(name = "驳回原因", width = 15)
|
||||
private String rejectReason;
|
||||
/**运输单ids*/
|
||||
@ApiModelProperty(value = "运输单ids")
|
||||
@Excel(name = "运输单ids", width = 15)
|
||||
private String transportationIds;
|
||||
/**退票备注*/
|
||||
@ApiModelProperty(value = "退票备注")
|
||||
@Excel(name = "退票备注", width = 15)
|
||||
private String refundRemark;
|
||||
/**处理人ID(取消申请/开票/驳回)*/
|
||||
@ApiModelProperty(value = "处理人ID(取消申请/开票/驳回)")
|
||||
@Excel(name = "处理人ID(取消申请/开票/驳回)", width = 15)
|
||||
private String managerId;
|
||||
/**寄出人ID*/
|
||||
@ApiModelProperty(value = "寄出人ID")
|
||||
@Excel(name = "寄出人ID", width = 15)
|
||||
private String sendById;
|
||||
/**寄出时间*/
|
||||
@ApiModelProperty(value = "寄出时间")
|
||||
@Excel(name = "寄出时间", width = 15, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date sendTime;
|
||||
/**寄出邮费*/
|
||||
@ApiModelProperty(value = "寄出邮费")
|
||||
@Excel(name = "寄出邮费", width = 15)
|
||||
private BigDecimal sendPostage;
|
||||
/**快递公司*/
|
||||
@ApiModelProperty(value = "快递公司")
|
||||
@Excel(name = "快递公司", width = 15)
|
||||
private String courierServicesCompany;
|
||||
/**快递单号*/
|
||||
@ApiModelProperty(value = "快递单号")
|
||||
@Excel(name = "快递单号", width = 15)
|
||||
private String trackingNumber;
|
||||
/**收件地址id*/
|
||||
@ApiModelProperty(value = "收件地址id")
|
||||
@Excel(name = "收件地址id", width = 15)
|
||||
private String receivingAddressId;
|
||||
/**开票表集合*/
|
||||
@ApiModelProperty(value = "开票表集合")
|
||||
@Excel(name = "开票表集合", width = 15)
|
||||
private List<BmsMakeOutInvoice> bmsMakeOutInvoices;
|
||||
/**操作类型*/
|
||||
@ApiModelProperty(value = "操作类型(取消申请-0,驳回-1)")
|
||||
@Excel(name = "操作类型(取消申请-0,驳回-1)", width = 15)
|
||||
private Integer operateType;
|
||||
}
|
||||
+140
@@ -0,0 +1,140 @@
|
||||
package com.mhd.bms.domain.bmsInvoiceList.repository.todo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 销项发票表 - 分页列表查询
|
||||
* @Author: lfs
|
||||
* @Date: 2020-02-19 08:50:47
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class BmsInvoiceListQueryDTO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ID_WORKER_STR)
|
||||
private String id;
|
||||
|
||||
/**发票状态(0-未开票,1-已取消申请,2-已开票,3-已驳回,4-已寄出,5-已作废)*/
|
||||
@ApiModelProperty(value = "发票状态(0-未开票,1-已取消申请,2-已开票,3-已驳回,4-已寄出,5-已作废)")
|
||||
@Excel(name = "发票状态(0-未开票,1-已取消申请,2-已开票,3-已驳回,4-已寄出,5-已作废)", width = 15)
|
||||
private Integer invoiceState;
|
||||
/**发票申请时间*/
|
||||
@ApiModelProperty(value = "发票申请时间")
|
||||
@Excel(name = "发票申请时间", width = 15, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date invoiceApplyTime;
|
||||
@ApiModelProperty(value = "创建结束日期")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date createEndTime;
|
||||
@ApiModelProperty(value = "创建开始日期")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date createStartTime;
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
@Excel(name = "创建人", width = 15)
|
||||
private String createBy;
|
||||
/**创建日期*/
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
@Excel(name = "创建日期", width = 20, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty(value = "部门")
|
||||
private String sysOrgCode;
|
||||
@ApiModelProperty(value = "运输单号")
|
||||
private String transportationNumber;
|
||||
@ApiModelProperty(value = "运输单Id")
|
||||
private String transportationId;
|
||||
@ApiModelProperty(value = "销项发票申请单号")
|
||||
private String applyNumber;
|
||||
|
||||
/**装货时间*/
|
||||
@ApiModelProperty(value = "装货时间")
|
||||
@Excel(name = "装货时间", width = 20, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date loadingTime;
|
||||
/**卸货时间*/
|
||||
@ApiModelProperty(value = "卸货时间")
|
||||
@Excel(name = "卸货时间", width = 20, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date unloadTime;
|
||||
|
||||
@ApiModelProperty(value = "创建人信息")
|
||||
private String loginUserId;
|
||||
@ApiModelProperty(value = "关联公司信息")
|
||||
private List<String> relatedCompany;
|
||||
private String relatedCompanys;
|
||||
|
||||
/**货主信息id*/
|
||||
@ApiModelProperty(value = "货主")
|
||||
@Excel(name = "货主", width = 15)
|
||||
private String shipperId;
|
||||
|
||||
@ApiModelProperty(value = "货主姓名")
|
||||
@Excel(name = "货主姓名", width = 15)
|
||||
private String shipperName;
|
||||
|
||||
/**货主信息id*/
|
||||
@ApiModelProperty(value = "货主公司名称")
|
||||
@Excel(name = "货主公司名称", width = 15)
|
||||
private String companyName;
|
||||
|
||||
/**发票抬头*/
|
||||
@ApiModelProperty(value = "发票抬头")
|
||||
@Excel(name = "发票抬头", width = 20)
|
||||
private String invoiceTitle;
|
||||
|
||||
@ApiModelProperty(value = "开票时间开始")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date invoiceMakeTimeStart;
|
||||
|
||||
@ApiModelProperty(value = "开票时间结束")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date invoiceMakeTimeEnd;
|
||||
|
||||
@ApiModelProperty(value = "处理时间开始")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date managerTimeStart;
|
||||
|
||||
@ApiModelProperty(value = "处理时间结束")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date managerTimeEnd;
|
||||
/**发票备注*/
|
||||
@ApiModelProperty(value = "发票备注")
|
||||
@Excel(name = "发票备注", width = 15)
|
||||
private String remark;
|
||||
|
||||
/**组织ID*/
|
||||
@ApiModelProperty(value = "组织ID")
|
||||
private Long organizationId;
|
||||
|
||||
/**组织名称*/
|
||||
@ApiModelProperty(value = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
/**一级组织ID*/
|
||||
@ApiModelProperty(value = "一级组织ID")
|
||||
private Long topOrganizationId;
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package com.mhd.bms.domain.bmsInvoiceList.repository.todo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @Description 销项发票信息修改
|
||||
* @Author Alex
|
||||
* @Date 2021/12/28 19:09
|
||||
*/
|
||||
@Data
|
||||
public class BmsOutInvoiceChangeDTO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@TableId(type = IdType.ID_WORKER_STR)
|
||||
private String ids;
|
||||
@ApiModelProperty(value = "开票号码")
|
||||
private String invoiceNumber;
|
||||
@ApiModelProperty(value = "开票代码")
|
||||
private String invoiceCode;
|
||||
@ApiModelProperty(value = "发票金额")
|
||||
private BigDecimal invoiceValue;
|
||||
}
|
||||
+181
@@ -0,0 +1,181 @@
|
||||
package com.mhd.bms.domain.bmsInvoiceList.repository.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.bms.domain.bmsMakeOutInvoice.entity.BmsMakeOutInvoice;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 销项发票表
|
||||
* @Author: lfs
|
||||
* @Date: 2020-02-19 08:50:47
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class BmsInvoiceListDetailsVO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ID_WORKER_STR)
|
||||
private String id;
|
||||
/**发票抬头*/
|
||||
@ApiModelProperty(value = "发票抬头")
|
||||
@Excel(name = "发票抬头", width = 15)
|
||||
private String invoiceTitle;
|
||||
/**发票金额*/
|
||||
@ApiModelProperty(value = "发票金额")
|
||||
@Excel(name = "发票金额", width = 15)
|
||||
private BigDecimal invoiceValue;
|
||||
/**发票备注*/
|
||||
@ApiModelProperty(value = "发票备注")
|
||||
@Excel(name = "发票备注", width = 15)
|
||||
private String remark;
|
||||
/**发票状态(0-未开票,1-已取消申请,2-已开票,3-已驳回,4-已寄出,5-已作废)*/
|
||||
@ApiModelProperty(value = "发票状态(0-未开票,1-已取消申请,2-已开票,3-已驳回,4-已寄出,5-已作废)")
|
||||
@Excel(name = "发票状态(0-未开票,1-已取消申请,2-已开票,3-已驳回,4-已寄出,5-已作废)", width = 15)
|
||||
private Integer invoiceState;
|
||||
/**发票申请时间*/
|
||||
@ApiModelProperty(value = "发票申请时间")
|
||||
@Excel(name = "发票申请时间", width = 15, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date invoiceApplyTime;
|
||||
/**申请人ID*/
|
||||
@ApiModelProperty(value = "申请人ID")
|
||||
@Excel(name = "申请人ID", width = 15)
|
||||
private String applicantId;
|
||||
/**驳回原因*/
|
||||
@ApiModelProperty(value = "驳回原因")
|
||||
@Excel(name = "驳回原因", width = 15)
|
||||
private String rejectReason;
|
||||
/**退票备注*/
|
||||
@ApiModelProperty(value = "退票备注")
|
||||
@Excel(name = "退票备注", width = 15)
|
||||
private String refundRemark;
|
||||
/**处理人ID(取消申请/开票/驳回)*/
|
||||
@ApiModelProperty(value = "处理人ID(取消申请/开票/驳回)")
|
||||
@Excel(name = "处理人ID(取消申请/开票/驳回)", width = 15)
|
||||
private String managerId;
|
||||
/**处理时间*/
|
||||
@ApiModelProperty(value = "处理时间")
|
||||
@Excel(name = "处理时间", width = 15, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date managerTime;
|
||||
/**寄出人ID*/
|
||||
@ApiModelProperty(value = "寄出人ID")
|
||||
@Excel(name = "寄出人ID", width = 15)
|
||||
private String sendById;
|
||||
/**寄出时间*/
|
||||
@ApiModelProperty(value = "寄出时间")
|
||||
@Excel(name = "寄出时间", width = 15, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date sendTime;
|
||||
/**寄出邮费*/
|
||||
@ApiModelProperty(value = "寄出邮费")
|
||||
@Excel(name = "寄出邮费", width = 15)
|
||||
private BigDecimal sendPostage;
|
||||
/**快递公司*/
|
||||
@ApiModelProperty(value = "快递公司")
|
||||
@Excel(name = "快递公司", width = 15)
|
||||
private String courierServicesCompany;
|
||||
/**收件地址id*/
|
||||
@ApiModelProperty(value = "收件地址id")
|
||||
@Excel(name = "收件地址id", width = 15)
|
||||
private String receivingAddressId;
|
||||
/**收件姓名*/
|
||||
@ApiModelProperty(value = "收件姓名")
|
||||
@Excel(name = "收件姓名", width = 15)
|
||||
private String receivingName;
|
||||
/**收件地址*/
|
||||
@ApiModelProperty(value = "收件地址")
|
||||
@Excel(name = "收件地址", width = 15)
|
||||
private String location;
|
||||
/**手机号*/
|
||||
@ApiModelProperty(value = "手机号")
|
||||
@Excel(name = "手机号", width = 15)
|
||||
private String phone;
|
||||
/**运输单ids*/
|
||||
@ApiModelProperty(value = "运输单ids")
|
||||
@Excel(name = "运输单ids", width = 15)
|
||||
private String transportationIds;
|
||||
/**创建日期*/
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
@Excel(name = "创建日期", width = 20, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
/**税务登记证号*/
|
||||
@ApiModelProperty(value = "税务登记证号")
|
||||
@Excel(name = "税务登记证号", width = 15)
|
||||
private String taxRegAccount;
|
||||
/**运输单列表*/
|
||||
/*@ApiModelProperty(value = "运输单列表")
|
||||
@Excel(name = "运输单列表", width = 15)
|
||||
private List<TmsOrderVO> bmsOrderVOList;*/
|
||||
/**发票类型(0-增值税专用发票,1-普通发票)*/
|
||||
@ApiModelProperty(value = "发票类型(0-增值税专用发票,1-普通发票)")
|
||||
@Excel(name = "发票类型(0-增值税专用发票,1-普通发票)", width = 15)
|
||||
private String invoiceType;
|
||||
/**发票性质(0-纸质发票,1-电子发票)*/
|
||||
@ApiModelProperty(value = "发票性质(0-纸质发票,1-电子发票)")
|
||||
@Excel(name = "发票性质(0-纸质发票,1-电子发票)", width = 15)
|
||||
private String invoiceNature;
|
||||
/**发票号*/
|
||||
@ApiModelProperty(value = "发票号")
|
||||
@Excel(name = "发票号", width = 15)
|
||||
private String invoiceNumber;
|
||||
/**快递单号*/
|
||||
@ApiModelProperty(value = "快递单号")
|
||||
@Excel(name = "快递单号", width = 15)
|
||||
private String trackingNumber;
|
||||
|
||||
/**开票表集合*/
|
||||
@ApiModelProperty(value = "开票表集合")
|
||||
@Excel(name = "开票表集合", width = 15)
|
||||
private List<BmsMakeOutInvoice> bmsMakeOutInvoices;
|
||||
|
||||
/**账单项目费用*/
|
||||
@ApiModelProperty(value = "账单项目费用")
|
||||
@Excel(name = "账单项目费用", width = 15)
|
||||
private List<Map<String, Object>> feeList;
|
||||
|
||||
/**货主信息id*/
|
||||
@ApiModelProperty(value = "货主信息id")
|
||||
@Excel(name = "货主信息id", width = 15)
|
||||
private String shipperId;
|
||||
|
||||
/**货主信息id*/
|
||||
@ApiModelProperty(value = "货主姓名")
|
||||
@Excel(name = "货主姓名", width = 15)
|
||||
private String shipperName;
|
||||
|
||||
/**货主电话*/
|
||||
@ApiModelProperty(value = "货主电话")
|
||||
@Excel(name = "货主电话", width = 15)
|
||||
private String shipperPhone;
|
||||
|
||||
/**货主信息id*/
|
||||
@ApiModelProperty(value = "货主公司名称")
|
||||
@Excel(name = "货主公司名称", width = 15)
|
||||
private String companyName;
|
||||
|
||||
@ApiModelProperty(value = "统一社会信用代码")
|
||||
private String regAccount;
|
||||
|
||||
@ApiModelProperty(value = "开票时间")
|
||||
private Date invoiceMakeTime;
|
||||
|
||||
|
||||
}
|
||||
+192
@@ -0,0 +1,192 @@
|
||||
package com.mhd.bms.domain.bmsInvoiceList.repository.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 销项发票表
|
||||
* @Author: lfs
|
||||
* @Date: 2020-02-19 08:50:47
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class BmsInvoiceListVO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ID_WORKER_STR)
|
||||
private String id;
|
||||
/**发票申请时间*/
|
||||
@ApiModelProperty(value = "发票申请时间")
|
||||
@Excel(name = "发票申请时间", width = 25, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date invoiceApplyTime;
|
||||
/**发票抬头*/
|
||||
@ApiModelProperty(value = "发票抬头")
|
||||
@Excel(name = "发票抬头", width = 20)
|
||||
private String invoiceTitle;
|
||||
/**发票申请单号*/
|
||||
@ApiModelProperty(value = "发票申请单号")
|
||||
@Excel(name = "发票申请单号", width = 20)
|
||||
private String applyNumber;
|
||||
/**发票金额*/
|
||||
@ApiModelProperty(value = "发票金额")
|
||||
@Excel(name = "发票总额", width = 15)
|
||||
private BigDecimal invoiceValue;
|
||||
/**发票金额*/
|
||||
@ApiModelProperty(value = "开票金额(不含服务费)")
|
||||
@Excel(name = "开票金额(不含服务费)", width = 15)
|
||||
private BigDecimal freightGrossSum;
|
||||
/**运输单ids*/
|
||||
@ApiModelProperty(value = "运输单ids")
|
||||
@Excel(name = "运单数量", width = 15)
|
||||
private Integer transportationIdsNum ;
|
||||
/**发票状态名称*/
|
||||
@ApiModelProperty(value = "发票状态名称")
|
||||
@Excel(name = "发票状态", width = 15)
|
||||
private String invoiceStateName;
|
||||
/**发票备注*/
|
||||
@ApiModelProperty(value = "发票备注")
|
||||
@Excel(name = "发票备注", width = 15)
|
||||
private String remark;
|
||||
/**发票状态(0-未开票,1-已取消申请,2-已开票,3-已驳回,4-已寄出,5-已作废)*/
|
||||
@ApiModelProperty(value = "发票状态(0-未开票,1-已取消申请,2-已开票,3-已驳回,4-已寄出,5-已作废)")
|
||||
private Integer invoiceState;
|
||||
/**申请人ID*/
|
||||
@ApiModelProperty(value = "申请人ID")
|
||||
private String applicantId;
|
||||
/**运输单ids*/
|
||||
@ApiModelProperty(value = "运输单ids")
|
||||
private String transportationIds;
|
||||
/**退票备注*/
|
||||
@ApiModelProperty(value = "退票备注")
|
||||
@Excel(name = "取消原因", width = 15)
|
||||
private String refundRemark;
|
||||
/**驳回原因*/
|
||||
@ApiModelProperty(value = "驳回原因")
|
||||
@Excel(name = "驳回原因", width = 15)
|
||||
private String rejectReason;
|
||||
|
||||
/**装货时间*/
|
||||
@ApiModelProperty(value = "装货时间")
|
||||
@Excel(name = "装货时间", width = 20, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date loadingTime;
|
||||
/**卸货时间*/
|
||||
@ApiModelProperty(value = "卸货时间")
|
||||
@Excel(name = "卸货时间", width = 20, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date unloadTime;
|
||||
|
||||
|
||||
/**处理人ID(取消申请/开票/驳回)*/
|
||||
@ApiModelProperty(value = "处理人ID(取消申请/开票/驳回)")
|
||||
private String managerId;
|
||||
/**处理时间*/
|
||||
@ApiModelProperty(value = "处理时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date managerTime;
|
||||
/**寄出人ID*/
|
||||
@ApiModelProperty(value = "寄出人ID")
|
||||
private String sendById;
|
||||
/**寄出时间*/
|
||||
@ApiModelProperty(value = "寄出时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date sendTime;
|
||||
/**寄出邮费*/
|
||||
@ApiModelProperty(value = "寄出邮费")
|
||||
private BigDecimal sendPostage;
|
||||
/**快递公司*/
|
||||
@ApiModelProperty(value = "快递公司")
|
||||
private String courierServicesCompany;
|
||||
/**收件地址id*/
|
||||
@ApiModelProperty(value = "收件地址id")
|
||||
private String receivingAddressId;
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createBy;
|
||||
/**创建日期*/
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updateBy;
|
||||
/**更新日期*/
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
/**是否删除(0-否,1-是)*/
|
||||
@ApiModelProperty(value = "是否删除(0-否,1-是)")
|
||||
private Integer isDelete;
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private String sysOrgCode;
|
||||
/**发票类型(0-增值税专用发票,1-普通发票)*/
|
||||
@ApiModelProperty(value = "发票类型(0-增值税专用发票,1-普通发票)")
|
||||
private String invoiceType;
|
||||
/**发票性质(0-纸质发票,1-电子发票)*/
|
||||
@ApiModelProperty(value = "发票性质(0-纸质发票,1-电子发票)")
|
||||
private String invoiceNature;
|
||||
/**发票号*/
|
||||
@ApiModelProperty(value = "发票号")
|
||||
private String invoiceNumber;
|
||||
@ApiModelProperty(value = "订单发票代码")
|
||||
private String invoiceCode;
|
||||
|
||||
/**货主信息id*/
|
||||
@ApiModelProperty(value = "货主信息id")
|
||||
@Excel(name = "货主信息id", width = 15)
|
||||
private String shipperId;
|
||||
|
||||
/**货主信息id*/
|
||||
@ApiModelProperty(value = "货主姓名")
|
||||
@Excel(name = "货主姓名", width = 15)
|
||||
private String shipperName;
|
||||
|
||||
/**货主信息id*/
|
||||
@ApiModelProperty(value = "货主公司名称")
|
||||
@Excel(name = "货主公司名称", width = 15)
|
||||
private String companyName;
|
||||
|
||||
/**税务登记证号*/
|
||||
@ApiModelProperty(value = "税务登记证号")
|
||||
@Excel(name = "税务登记证号", width = 15)
|
||||
private String taxRegAccount;
|
||||
|
||||
@ApiModelProperty("结算币种")
|
||||
private String settlementCurrency;
|
||||
|
||||
/**组织ID*/
|
||||
@ApiModelProperty(value = "组织ID")
|
||||
private Long organizationId;
|
||||
|
||||
/**组织名称*/
|
||||
@ApiModelProperty(value = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
/**一级组织ID*/
|
||||
@ApiModelProperty(value = "一级组织ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
public void setTransportationIds(String transportationIds) {
|
||||
this.transportationIds = transportationIds;
|
||||
this.transportationIdsNum = transportationIds.split(",").length;
|
||||
}
|
||||
}
|
||||
+108
@@ -0,0 +1,108 @@
|
||||
package com.mhd.bms.domain.bmsMakeOutInvoice.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 销项发票表
|
||||
* @Author: lfs
|
||||
* @Date: 2020-02-19 08:50:47
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class BmsMakeOutInvoice extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ID_WORKER_STR)
|
||||
private String id;
|
||||
/**发票ID*/
|
||||
@ApiModelProperty(value = "发票ID")
|
||||
@Excel(name = "发票ID", width = 15)
|
||||
private String invoiceId;
|
||||
/**发票抬头*/
|
||||
@ApiModelProperty(value = "发票抬头")
|
||||
@Excel(name = "发票抬头", width = 15)
|
||||
private String invoiceTitle;
|
||||
/**发票金额*/
|
||||
@ApiModelProperty(value = "发票金额")
|
||||
@Excel(name = "发票金额", width = 15)
|
||||
private BigDecimal invoiceValue;
|
||||
/**发票备注*/
|
||||
@ApiModelProperty(value = "发票备注")
|
||||
@Excel(name = "发票备注", width = 15)
|
||||
private String remark;
|
||||
/**发票状态(0-未开票,1-已取消申请,2-已开票,3-已驳回,4-已寄出,5-已作废)*/
|
||||
@ApiModelProperty(value = "发票状态(0-未开票,1-已取消申请,2-已开票,3-已驳回,4-已寄出,5-已作废)")
|
||||
@Excel(name = "发票状态(0-未开票,1-已取消申请,2-已开票,3-已驳回,4-已寄出,5-已作废)", width = 15)
|
||||
private Integer invoiceState;
|
||||
/**发票申请时间*/
|
||||
@ApiModelProperty(value = "发票申请时间")
|
||||
@Excel(name = "发票申请时间", width = 15, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date invoiceApplyTime;
|
||||
/**是否删除(0-否,1-是)*/
|
||||
@ApiModelProperty(value = "是否删除(0-否,1-是)")
|
||||
@Excel(name = "是否删除(0-否,1-是)", width = 15)
|
||||
private Integer isDelete;
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
@Excel(name = "所属部门", width = 15)
|
||||
private String sysOrgCode;
|
||||
/**开票号码*/
|
||||
@ApiModelProperty(value = "开票号码")
|
||||
@Excel(name = "开票号码", width = 15)
|
||||
private String invoiceNumber;
|
||||
/**开票人ID*/
|
||||
@ApiModelProperty(value = "开票人ID")
|
||||
@Excel(name = "开票人ID", width = 15)
|
||||
private String makeOutInvoiceId;
|
||||
/**开票时间*/
|
||||
@ApiModelProperty(value = "开票时间")
|
||||
@Excel(name = "开票时间", width = 20, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date makeOutInvoiceTime;
|
||||
/**开票代码*/
|
||||
@ApiModelProperty(value = "开票代码")
|
||||
@Excel(name = "开票代码", width = 15)
|
||||
private String invoiceCode;
|
||||
|
||||
/**上报状态:0-未上报,1-已上报,2-上报失败*/
|
||||
@ApiModelProperty(value = "上报状态:0-未上报,1-已上报,2-上报失败")
|
||||
@Excel(name = "上报状态", width = 15)
|
||||
private Integer isReport;
|
||||
/**上报时间*/
|
||||
@ApiModelProperty(value = "上报时间")
|
||||
@Excel(name = "上报时间", width = 20, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date reportTime;
|
||||
/**失败原因*/
|
||||
@ApiModelProperty(value = "失败原因")
|
||||
@Excel(name = "失败原因", width = 15)
|
||||
private String errMsg;
|
||||
|
||||
@ApiModelProperty(value = "电子发票地址")
|
||||
private String invoiceFileUrl;
|
||||
|
||||
@ApiModelProperty(value = "发票摘要")
|
||||
private String invoiceAbstract;
|
||||
|
||||
@ApiModelProperty(value = "开票项目")
|
||||
private String invoiceItem;
|
||||
@ApiModelProperty(value = "实际开票客户id")
|
||||
private String actualInvoiceCustomerId;
|
||||
@ApiModelProperty(value = "实际开票客户名称")
|
||||
private String actualInvoiceCustomerName;
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.mhd.bms.domain.bmsMakeOutInvoice.repository.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mhd.bms.domain.bmsMakeOutInvoice.entity.BmsMakeOutInvoice;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
/**
|
||||
* @Description: 开票表
|
||||
* @Author: lfs
|
||||
* @Date: 2020-03-30
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface BmsMakeOutInvoiceMapper extends BaseMapper<BmsMakeOutInvoice> {
|
||||
@Select("SELECT * FROM tms_make_out_invoice WHERE invoice_id=#{invoiceId} and is_delete = 0")
|
||||
BmsMakeOutInvoice queryByInvoiceId(String invoiceId);
|
||||
}
|
||||
@@ -0,0 +1,200 @@
|
||||
package com.mhd.bms.interfaces.facadeApi;
|
||||
|
||||
import com.aliyun.oss.ServiceException;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.mhd.bms.domain.bmsInvoiceInfo.entity.BmsInvoiceInfo;
|
||||
import com.mhd.bms.domain.bmsInvoiceInfo.repository.facade.IBmsInvoiceInfoService;
|
||||
import com.mhd.bms.domain.bmsInvoiceInfo.repository.todo.BmsInvoiceInfoAddDTO;
|
||||
import com.mhd.bms.domain.bmsInvoiceInfo.repository.todo.BmsInvoiceInfoDTO;
|
||||
import com.mhd.bms.domain.bmsInvoiceInfo.repository.vo.BmsInvoiceInfoVO;
|
||||
import com.mhd.bms.domain.bmsInvoiceInfo.repository.vo.QueryInvoiceInfoVO;
|
||||
import com.mhd.common.core.utils.sms.CommonConstant;
|
||||
import com.mhd.common.core.utils.sms.Result;
|
||||
import com.mhd.common.core.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 发票信息表
|
||||
* @Author: Alex
|
||||
* @Date: 2020-02-19 08:50:59
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags = "发票信息表")
|
||||
@RestController
|
||||
@RequestMapping("/bmsInvoiceInfoApi")
|
||||
@Slf4j
|
||||
public class BmsInvoiceInfoApi extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IBmsInvoiceInfoService bmsInvoiceInfoService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param bmsInvoiceInfoDTO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "发票信息表-分页列表查询", notes = "发票信息表-分页列表查询")
|
||||
@GetMapping(value = "/queryList")
|
||||
public Result<IPage<BmsInvoiceInfoVO>> queryList(BmsInvoiceInfoDTO bmsInvoiceInfoDTO,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
Result<IPage<BmsInvoiceInfoVO>> result = new Result<IPage<BmsInvoiceInfoVO>>();
|
||||
Page<BmsInvoiceInfoVO> pageList = new Page<BmsInvoiceInfoVO>(pageNo, pageSize);
|
||||
pageList = bmsInvoiceInfoService.queryList(pageList, bmsInvoiceInfoDTO);
|
||||
result.setResult(pageList);
|
||||
result.setSuccess(true);
|
||||
result.setCode(CommonConstant.SC_OK_200);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 发票信息管理查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "发票信息表-发票信息管理查询", notes = "发票信息表-发票信息管理查询")
|
||||
@GetMapping(value = "/queryInvoiceInfo")
|
||||
public Result<QueryInvoiceInfoVO> queryInvoiceInfo(
|
||||
@RequestParam(name = "shipperId", required = false) String shipperId) {
|
||||
Result<QueryInvoiceInfoVO> result = new Result<QueryInvoiceInfoVO>();
|
||||
QueryInvoiceInfoVO queryInvoiceInfoVO = bmsInvoiceInfoService.queryInvoiceInfo(shipperId);
|
||||
if (queryInvoiceInfoVO == null) {
|
||||
queryInvoiceInfoVO = new QueryInvoiceInfoVO();
|
||||
}
|
||||
result.setResult(queryInvoiceInfoVO);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param bmsInvoiceInfoAddDTO
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "发票信息表-新增", notes = "发票信息表-新增")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@RequestBody BmsInvoiceInfoAddDTO bmsInvoiceInfoAddDTO) {
|
||||
Result<?> result = new Result<BmsInvoiceInfo>();
|
||||
try {
|
||||
bmsInvoiceInfoService.save(bmsInvoiceInfoAddDTO);
|
||||
result.success("发票信息保存成功!");
|
||||
} catch (ServiceException e) {
|
||||
log.error(e.getErrorMessage(), e);
|
||||
result.error500(e.getErrorMessage());
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
result.error500("操作失败");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param bmsInvoiceInfoDTO
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "发票信息表-编辑", notes = "发票信息表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@RequestBody BmsInvoiceInfoDTO bmsInvoiceInfoDTO) {
|
||||
Result<?> result = new Result<BmsInvoiceInfo>();
|
||||
try {
|
||||
bmsInvoiceInfoService.update(bmsInvoiceInfoDTO);
|
||||
result.success("发票信息保存成功!");
|
||||
} catch (ServiceException e) {
|
||||
log.error(e.getErrorMessage(), e);
|
||||
result.error500(e.getErrorMessage());
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
result.error500("操作失败" + e.getMessage());
|
||||
}
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "发票信息表-删除", notes = "发票信息表-删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
|
||||
Result<?> result = new Result<BmsInvoiceInfo>();
|
||||
try {
|
||||
bmsInvoiceInfoService.delete(Arrays.asList(id.split(",")));
|
||||
result.success("删除成功!");
|
||||
} catch (ServiceException e) {
|
||||
log.error(e.getMessage(), e);
|
||||
result.error500("操作失败" + e.getMessage());
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
result.error500("操作失败" + e.getMessage());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "发票信息表-批量删除", notes = "发票信息表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
||||
Result<?> result = new Result<BmsInvoiceInfo>();
|
||||
try {
|
||||
this.bmsInvoiceInfoService.delete(Arrays.asList(ids.split(",")));
|
||||
result.success("删除成功!");
|
||||
} catch (ServiceException e) {
|
||||
log.error(e.getMessage(), e);
|
||||
result.error500("操作失败" + e.getMessage());
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
result.error500("操作失败" + e.getMessage());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "发票信息表-通过id查询", notes = "发票信息表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||
BmsInvoiceInfo bmsInvoiceInfo = bmsInvoiceInfoService.getById(id);
|
||||
if (bmsInvoiceInfo == null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.ok(bmsInvoiceInfo);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "发票信息表-货主Id查询", notes = "发票信息表-货主Id查询")
|
||||
@GetMapping(value = "/queryByShipperId")
|
||||
public Result<?> queryByShipperId(@RequestParam(name = "shipperId") String shipperId) {
|
||||
List<BmsInvoiceInfo> info = bmsInvoiceInfoService.list(
|
||||
Wrappers.<BmsInvoiceInfo>lambdaQuery().eq(BmsInvoiceInfo :: getShipperId, shipperId));
|
||||
return Result.ok(info);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,427 @@
|
||||
package com.mhd.bms.interfaces.facadeApi;
|
||||
|
||||
import com.aliyun.oss.ServiceException;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.mhd.bms.domain.bmsInvoiceList.entity.BmsInvoiceList;
|
||||
import com.mhd.bms.domain.bmsInvoiceList.entity.BmsSettlementPartyInvoice;
|
||||
import com.mhd.bms.domain.bmsInvoiceList.repository.facade.IBmsInvoiceListService;
|
||||
import com.mhd.bms.domain.bmsInvoiceList.repository.todo.*;
|
||||
import com.mhd.bms.domain.bmsInvoiceList.repository.vo.BmsInvoiceListDetailsVO;
|
||||
import com.mhd.bms.domain.bmsInvoiceList.repository.vo.BmsInvoiceListVO;
|
||||
import com.mhd.common.core.utils.sms.CommonConstant;
|
||||
import com.mhd.common.core.utils.sms.Result;
|
||||
import com.mhd.common.core.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 销项发票表
|
||||
* @Author: Alex
|
||||
* @Date: 2020-02-19 08:50:47
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags = "销项发票表")
|
||||
@RestController
|
||||
@RequestMapping("/bmsInvoiceListApi")
|
||||
@Slf4j
|
||||
public class BmsInvoiceListApi extends BaseController {
|
||||
@Autowired
|
||||
private IBmsInvoiceListService bmsInvoiceListService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param bmsInvoiceListQueryDTO
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "销项发票表-分页列表查询", notes = "销项发票表-分页列表查询")
|
||||
@RequestMapping(value = "/queryList")
|
||||
public Result<IPage<BmsInvoiceListVO>> queryList(BmsInvoiceListQueryDTO bmsInvoiceListQueryDTO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
Result<IPage<BmsInvoiceListVO>> result = new Result<IPage<BmsInvoiceListVO>>();
|
||||
Page<BmsInvoiceListVO> pageList = new Page<BmsInvoiceListVO>(pageNo,pageSize);
|
||||
pageList = bmsInvoiceListService.queryList(pageList, bmsInvoiceListQueryDTO);
|
||||
result.setResult(pageList);
|
||||
result.setSuccess(true);
|
||||
result.setCode(CommonConstant.SC_OK_200);
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param bmsInvoiceListAddDTO
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "销项发票表-新增", notes = "销项发票表-新增")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@RequestBody BmsInvoiceListAddDTO bmsInvoiceListAddDTO) {
|
||||
Result<?> result = new Result<BmsInvoiceList>();
|
||||
try {
|
||||
bmsInvoiceListService.save(bmsInvoiceListAddDTO);
|
||||
result.success("添加成功!");
|
||||
} catch (ServiceException e) {
|
||||
log.error(e.getErrorMessage(),e);
|
||||
result.error500(e.getErrorMessage());
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(),e);
|
||||
result.error500("操作失败:"+e.getMessage());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 应收账单申请发票
|
||||
*
|
||||
* @param bmsInvoiceListAddDTO
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "销项发票表-应收账单申请发票", notes = "销项发票表-应收账单申请发票")
|
||||
@PostMapping(value = "/addReceivableBill")
|
||||
public Result<?> addReceivableBill(@RequestBody BmsInvoiceListAddDTO bmsInvoiceListAddDTO) {
|
||||
Result<?> result = new Result<BmsInvoiceList>();
|
||||
try {
|
||||
bmsInvoiceListService.addReceivableBill(bmsInvoiceListAddDTO);
|
||||
result.success("添加成功!");
|
||||
} catch (ServiceException e) {
|
||||
log.error(e.getErrorMessage(),e);
|
||||
result.error500(e.getErrorMessage());
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(),e);
|
||||
result.error500("操作失败:"+e.getMessage());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 发票详情
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "销项发票表-发票详情", notes = "销项发票表-发票详情")
|
||||
@GetMapping(value = "/details")
|
||||
public Result<BmsInvoiceListDetailsVO> details(@RequestParam(name="id",required=true) String id) {
|
||||
Result<BmsInvoiceListDetailsVO> result = new Result<BmsInvoiceListDetailsVO>();
|
||||
try {
|
||||
BmsInvoiceListDetailsVO bmsInvoiceListDetailsVO = bmsInvoiceListService.details(id);
|
||||
result.setResult(bmsInvoiceListDetailsVO);
|
||||
result.setSuccess(true);
|
||||
result.setCode(CommonConstant.SC_OK_200);
|
||||
} catch (ServiceException e) {
|
||||
log.error(e.getErrorMessage());
|
||||
result.error500(e.getErrorMessage());
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(),e);
|
||||
result.error500("操作失败");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param bmsInvoiceListDTO
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "销项发票表-编辑", notes = "销项发票表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@RequestBody BmsInvoiceListDTO bmsInvoiceListDTO) {
|
||||
Result<?> result = new Result<>();
|
||||
try {
|
||||
bmsInvoiceListService.update(bmsInvoiceListDTO);
|
||||
result.success("编辑成功!");
|
||||
} catch (ServiceException e) {
|
||||
log.error(e.getMessage());
|
||||
result.error500(e.getErrorMessage());
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(),e);
|
||||
result.error500("操作失败"+e.getMessage());
|
||||
}
|
||||
return result;
|
||||
|
||||
}
|
||||
/**
|
||||
* 开票
|
||||
*zyp 2020 02-22 14:17:17
|
||||
* @param bmsInvoiceListInvoiceStateDTO
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "销项发票表-开票 ", notes = "销项发票表-开票")
|
||||
@PutMapping(value = "/invoice")
|
||||
public Result<?> invoice(@RequestBody BmsInvoiceListInvoiceStateDTO bmsInvoiceListInvoiceStateDTO) {
|
||||
Result<?> result = new Result<BmsInvoiceList>();
|
||||
try {
|
||||
bmsInvoiceListService.invoice(bmsInvoiceListInvoiceStateDTO);
|
||||
result.success("开具发票成功!");
|
||||
} catch (ServiceException e) {
|
||||
log.error(e.getErrorMessage());
|
||||
result.error500(e.getErrorMessage());
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(),e);
|
||||
result.error500("操作失败"+e.getMessage());
|
||||
}
|
||||
return result;
|
||||
|
||||
}
|
||||
/**
|
||||
* 驳回 - 取消申请
|
||||
*zyp 2020 02-22 14:17:17
|
||||
* @param bmsInvoiceListInvoiceStateDTO
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "销项发票表-驳回 取消申请 ", notes = "销项发票表-驳回 - 取消申请")
|
||||
@PutMapping(value = "/reject")
|
||||
public Result<?> reject(@RequestBody BmsInvoiceListInvoiceStateDTO bmsInvoiceListInvoiceStateDTO) {
|
||||
Result<?> result = new Result<BmsInvoiceList>();
|
||||
try {
|
||||
Integer integer = bmsInvoiceListService.reject(bmsInvoiceListInvoiceStateDTO);
|
||||
if (integer == 1){
|
||||
result.success("已取消申请!");
|
||||
} else if (integer == 3){
|
||||
result.success("已成功驳回!");
|
||||
}
|
||||
|
||||
} catch (ServiceException e) {
|
||||
log.error(e.getErrorMessage());
|
||||
result.error500(e.getErrorMessage());
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(),e);
|
||||
result.error500("操作失败"+e.getMessage());
|
||||
}
|
||||
return result;
|
||||
|
||||
}
|
||||
/**
|
||||
* 寄出
|
||||
*zyp 2020 02-22 14:22:17
|
||||
* @param bmsInvoiceListInvoiceStateDTO
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "销项发票表-寄出", notes = "销项发票表-寄出")
|
||||
@PutMapping(value = "/mail")
|
||||
public Result<?> mail(@RequestBody BmsInvoiceListInvoiceStateDTO bmsInvoiceListInvoiceStateDTO) {
|
||||
Result<?> result = new Result<BmsInvoiceList>();
|
||||
try {
|
||||
bmsInvoiceListService.mail(bmsInvoiceListInvoiceStateDTO);
|
||||
result.success("已成功寄出!");
|
||||
} catch (ServiceException e) {
|
||||
log.error(e.getErrorMessage());
|
||||
result.error500(e.getErrorMessage());
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(),e);
|
||||
result.error500("操作失败"+e.getMessage());
|
||||
}
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "销项发票表-删除", notes = "销项发票表-删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
Result<?> result = new Result<BmsInvoiceList>();
|
||||
try {
|
||||
bmsInvoiceListService.delete(Arrays.asList(id.split(",")));
|
||||
result.success("删除成功!");
|
||||
} catch (ServiceException e) {
|
||||
log.error(e.getMessage());
|
||||
result.error500(e.getErrorMessage());
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(),e);
|
||||
result.error500("操作失败"+e.getMessage());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "销项发票表-批量删除", notes = "销项发票表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
Result<?> result = new Result<BmsInvoiceList>();
|
||||
try {
|
||||
this.bmsInvoiceListService.delete(Arrays.asList(ids.split(",")));
|
||||
result.success("删除成功!");
|
||||
} catch (ServiceException e) {
|
||||
log.error(e.getMessage(),e);
|
||||
result.error500("操作失败"+e.getMessage());
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(),e);
|
||||
result.error500("操作失败"+e.getMessage());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "销项发票表-通过id查询", notes = "销项发票表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id") String id) {
|
||||
BmsInvoiceList bmsInvoiceList = bmsInvoiceListService.getById(id);
|
||||
if(bmsInvoiceList==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.ok(bmsInvoiceList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
*/
|
||||
/*@AutoLog(value = "销项发票表-导出excel")
|
||||
@ApiOperation(value = "销项发票表-导出excel", notes = "销项发票表-导出excel")
|
||||
@GetMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request,BmsInvoiceListQueryDTO bmsInvoiceListQueryDTO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize) {
|
||||
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
||||
try {
|
||||
//当前登录人
|
||||
WlhyLoginUser sysUser = SecurityUtils.getLoginUser().getWlhyLoginUser();
|
||||
String title = "货主发票导出";
|
||||
Page<BmsInvoiceListVO> pageList = new Page<BmsInvoiceListVO>(pageNo, pageSize);
|
||||
pageList = bmsInvoiceListService.queryList(pageList, bmsInvoiceListQueryDTO);
|
||||
mv.addObject(NormalExcelConstants.FILE_NAME, title); //此处设置的filename无效 ,前端会重更新设置一下
|
||||
mv.addObject(NormalExcelConstants.CLASS, BmsInvoiceListVO.class);
|
||||
mv.addObject(NormalExcelConstants.PARAMS, new ExportParams(title + "报表","导出人:" + sysUser.getRealname(), title));
|
||||
mv.addObject(NormalExcelConstants.DATA_LIST, pageList.getRecords());
|
||||
return mv;
|
||||
}catch (Exception e){
|
||||
log.error(e.getMessage(),e);
|
||||
return mv;
|
||||
}
|
||||
}*/
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "司机表-通过excel导入数据", notes = "司机表-通过excel导入数据")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
Result result = new Result<>();
|
||||
response.setContentType("text/plain");
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
response.setCharacterEncoding("UTF-8");
|
||||
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
|
||||
Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
|
||||
try{
|
||||
bmsInvoiceListService.importExcel(fileMap);
|
||||
result.success("导入成功");
|
||||
}catch (ServiceException e1){
|
||||
result.error500(e1.getErrorMessage());
|
||||
e1.printStackTrace();
|
||||
}catch (Exception e){
|
||||
result.error500("系统出现异常,请联系平台客服处理。");
|
||||
e.printStackTrace();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@ApiOperation(value = "销项发票表-修改开票信息 ", notes = "销项发票表-修改开票信息")
|
||||
@PutMapping(value = "/changeOutInvoice")
|
||||
public Result<?> changeOutInvoice(@RequestBody BmsOutInvoiceChangeDTO bmsOutInvoiceChangeDTO) {
|
||||
Result<?> result = new Result<BmsInvoiceList>();
|
||||
try {
|
||||
bmsInvoiceListService.changeOutInvoice(bmsOutInvoiceChangeDTO);
|
||||
result.success("修改发票成功!");
|
||||
} catch (ServiceException e) {
|
||||
log.error(e.getErrorMessage());
|
||||
result.error500(e.getErrorMessage());
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(),e);
|
||||
result.error500("操作失败"+e.getMessage());
|
||||
}
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
@ApiOperation(value = "销项发票表-校验选中发票信息是否可以批量开票 ", notes = "销项发票表-校验选中发票信息是否可以批量开票")
|
||||
@PutMapping(value = "/queryBulkMailStatus")
|
||||
public Result<?> queryBulkMailStatus(@RequestBody BmsOutInvoiceChangeDTO bmsOutInvoiceChangeDTO) {
|
||||
Result<?> result = new Result<BmsInvoiceList>();
|
||||
try {
|
||||
bmsInvoiceListService.queryBulkMailStatus(bmsOutInvoiceChangeDTO);
|
||||
result.success("查询成功!");
|
||||
} catch (ServiceException e) {
|
||||
log.error(e.getErrorMessage());
|
||||
result.error500(e.getErrorMessage());
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(),e);
|
||||
result.error500("操作失败"+e.getMessage());
|
||||
}
|
||||
return result;
|
||||
|
||||
}
|
||||
@ApiOperation(value = "销项发票表-批量寄出", notes = "销项发票表-批量寄出")
|
||||
@PutMapping(value = "/bulkMail")
|
||||
public Result<?> bulkMail(@RequestBody BmsInvoiceListInvoiceStateDTO bmsInvoiceListInvoiceStateDTO) {
|
||||
Result<?> result = new Result<BmsInvoiceList>();
|
||||
try {
|
||||
bmsInvoiceListService.bulkMail(bmsInvoiceListInvoiceStateDTO);
|
||||
result.success("已成功寄出!");
|
||||
} catch (ServiceException e) {
|
||||
log.error(e.getErrorMessage());
|
||||
result.error500(e.getErrorMessage());
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(),e);
|
||||
result.error500("操作失败"+e.getMessage());
|
||||
}
|
||||
return result;
|
||||
|
||||
}
|
||||
@ApiOperation(value = "根据结算方姓名查询发票信息", notes = "根据结算方姓名查询发票信息")
|
||||
@GetMapping(value = "/selectSettlementPartyInfoByName")
|
||||
public Result<BmsSettlementPartyInvoice> selectSettlementPartyInfoByName(@RequestParam(name="settlementPartyName",required=true) String settlementPartyName) {
|
||||
Result<BmsSettlementPartyInvoice> result = new Result<BmsSettlementPartyInvoice>();
|
||||
try {
|
||||
BmsSettlementPartyInvoice bmsSettlementPartyInvoice = bmsInvoiceListService.selectSettlementPartyInfoByName(settlementPartyName);
|
||||
result.setResult(bmsSettlementPartyInvoice);
|
||||
result.setSuccess(true);
|
||||
result.setCode(CommonConstant.SC_OK_200);
|
||||
} catch (ServiceException e) {
|
||||
log.error(e.getErrorMessage());
|
||||
result.error500(e.getErrorMessage());
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(),e);
|
||||
result.error500("操作失败");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
<?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="com.mhd.bms.domain.bmsInvoiceInfo.repository.mapper.BmsInvoiceInfoMapper">
|
||||
<select id="queryList" parameterType="java.lang.String" resultType="com.mhd.bms.domain.bmsInvoiceInfo.repository.vo.BmsInvoiceInfoVO">
|
||||
select
|
||||
<include refid="field_where"></include>
|
||||
from
|
||||
tms_invoice_info a
|
||||
where a.is_delete = 0
|
||||
<include refid="common_where"></include>
|
||||
order by a.create_time desc
|
||||
</select>
|
||||
<sql id="common_where">
|
||||
<if test="tmsInvoiceInfoDTO.id !=null and tmsInvoiceInfoDTO.id != ''"> and a.id = #{tmsInvoiceInfoDTO.id} </if>
|
||||
<if test="tmsInvoiceInfoDTO.id!=null and tmsInvoiceInfoDTO.id!=''"> and instr(a.id ,#{tmsInvoiceInfoDTO.id}) > 0 </if>
|
||||
<if test="tmsInvoiceInfoDTO.createBy !=null and tmsInvoiceInfoDTO.createBy != ''"> and a.create_by = #{tmsInvoiceInfoDTO.createBy} </if>
|
||||
<if test="@org.jeecg.common.util.oConvertUtils@isNotEmpty(tmsInvoiceInfoDTO.invoiceTitle)">
|
||||
and a.invoice_title LIKE CONCAT('%',#{tmsInvoiceInfoDTO.invoiceTitle},'%')
|
||||
</if>
|
||||
<if test="@org.jeecg.common.util.oConvertUtils@isNotEmpty(tmsInvoiceInfoDTO.taxRegAccount)">
|
||||
and a.tax_reg_account LIKE CONCAT('%',#{tmsInvoiceInfoDTO.taxRegAccount},'%')
|
||||
</if>
|
||||
<if test="@org.jeecg.common.util.oConvertUtils@isNotEmpty(tmsInvoiceInfoDTO.createByName)">
|
||||
and a.create_by_name LIKE CONCAT('%',#{tmsInvoiceInfoDTO.createByName},'%')
|
||||
</if>
|
||||
<if test="tmsInvoiceInfoDTO.createTime!=null and tmsInvoiceInfoDTO.createTime!=''">
|
||||
and STR_TO_DATE(a.create_time, '%Y-%m-%d') <= #{tmsInvoiceInfoDTO.createTime}
|
||||
</if>
|
||||
<!-- 部门 -->
|
||||
<if test="tmsInvoiceInfoDTO.sysOrgCode!=null and tmsInvoiceInfoDTO.sysOrgCode!=''">
|
||||
and a.sys_org_code = #{tmsInvoiceInfoDTO.sysOrgCode}
|
||||
</if>
|
||||
|
||||
</sql>
|
||||
|
||||
<sql id="field_where">
|
||||
a.id,a.shipper_id,a.invoice_type,a.invoice_title,a.tax_reg_account,a.bank_name,a.basic_account_number,a.reg_place_address,a.reg_landline_phone
|
||||
,a.business_certificate_img_url,a.create_by ,a.create_by_name,a.create_time ,a.update_by ,a.update_time ,a.is_delete ,a.sys_org_code
|
||||
</sql>
|
||||
</mapper>
|
||||
@@ -0,0 +1,136 @@
|
||||
<?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="com.mhd.bms.domain.bmsInvoiceList.repository.mapper.BmsInvoiceListMapper">
|
||||
<select id="queryList" parameterType="java.lang.String" resultType="com.mhd.bms.domain.bmsInvoiceList.repository.vo.BmsInvoiceListVO">
|
||||
select
|
||||
<include refid="field_where"></include>
|
||||
FROM
|
||||
bms_invoice_list a
|
||||
LEFT JOIN bms_waybill_invoiced b ON a.id = b.invoice_list_id
|
||||
where a.is_delete = 0
|
||||
<include refid="common_where"></include>
|
||||
group by a.id
|
||||
order by a.create_time desc
|
||||
</select>
|
||||
<select id="getById" parameterType="java.lang.String" resultType="com.mhd.bms.domain.bmsInvoiceList.repository.vo.BmsInvoiceListDetailsVO">
|
||||
select
|
||||
<include refid="field_where2"></include>
|
||||
from
|
||||
bms_invoice_list a
|
||||
LEFT JOIN bms_invoice_info b
|
||||
ON a.invoice_title = b.invoice_title
|
||||
where a.id = #{id} and a.is_delete = 0
|
||||
group by a.id
|
||||
</select>
|
||||
<sql id="common_where">
|
||||
<if test="bmsInvoiceListQueryDTO.id !=null and bmsInvoiceListQueryDTO.id != ''"> and a.id = #{bmsInvoiceListQueryDTO.id} </if>
|
||||
<if test="bmsInvoiceListQueryDTO.id!=null and bmsInvoiceListQueryDTO.id!=''"> and instr(a.id ,#{bmsInvoiceListQueryDTO.id}) > 0 </if>
|
||||
<if test="bmsInvoiceListQueryDTO.invoiceState!=null"> and instr(a.invoice_state ,#{bmsInvoiceListQueryDTO.invoiceState}) > 0 </if>
|
||||
<if test="bmsInvoiceListQueryDTO.createStartTime!=null and bmsInvoiceListQueryDTO.createEndTime!=null ">
|
||||
and DATE_FORMAT(a.invoice_apply_time,'%Y-%m-%d') <![CDATA[>=]]> DATE_FORMAT(#{bmsInvoiceListQueryDTO.createStartTime},'%Y-%m-%d')
|
||||
and DATE_FORMAT(a.invoice_apply_time,'%Y-%m-%d') <![CDATA[<=]]> DATE_FORMAT(#{bmsInvoiceListQueryDTO.createEndTime},'%Y-%m-%d')
|
||||
</if>
|
||||
<if test="bmsInvoiceListQueryDTO.invoiceMakeTimeStart!=null and bmsInvoiceListQueryDTO.invoiceMakeTimeEnd!=null ">
|
||||
and DATE_FORMAT(a.invoice_make_time,'%Y-%m-%d') <![CDATA[>=]]> DATE_FORMAT(#{bmsInvoiceListQueryDTO.invoiceMakeTimeStart},'%Y-%m-%d')
|
||||
and DATE_FORMAT(a.invoice_make_time,'%Y-%m-%d') <![CDATA[<=]]> DATE_FORMAT(#{bmsInvoiceListQueryDTO.invoiceMakeTimeEnd},'%Y-%m-%d')
|
||||
</if>
|
||||
|
||||
<if test="bmsInvoiceListQueryDTO.managerTimeStart!=null and bmsInvoiceListQueryDTO.managerTimeEnd!=null ">
|
||||
and DATE_FORMAT(a.manager_time,'%Y-%m-%d') <![CDATA[>=]]> DATE_FORMAT(#{bmsInvoiceListQueryDTO.managerTimeeStart},'%Y-%m-%d')
|
||||
and DATE_FORMAT(a.manager_time,'%Y-%m-%d') <![CDATA[<=]]> DATE_FORMAT(#{bmsInvoiceListQueryDTO.managerTimeTimeEnd},'%Y-%m-%d')
|
||||
</if>
|
||||
|
||||
<if test="bmsInvoiceListQueryDTO.remark !=null and bmsInvoiceListQueryDTO.remark != ''">
|
||||
and a.remark LIKE CONCAT('%',#{bmsInvoiceListQueryDTO.remark},'%')
|
||||
</if>
|
||||
<if test="bmsInvoiceListQueryDTO.createBy !=null and bmsInvoiceListQueryDTO.createBy != ''"> and a.create_by = #{bmsInvoiceListQueryDTO.createBy} </if>
|
||||
<!-- 部门 -->
|
||||
<if test="bmsInvoiceListQueryDTO.sysOrgCode!=null and bmsInvoiceListQueryDTO.sysOrgCode!=''">
|
||||
and a.sys_org_code = #{bmsInvoiceListQueryDTO.sysOrgCode}
|
||||
</if>
|
||||
<if test="@org.jeecg.common.util.oConvertUtils@isNotEmpty(bmsInvoiceListQueryDTO.applyNumber)">
|
||||
and a.apply_number LIKE CONCAT('%',#{bmsInvoiceListQueryDTO.applyNumber},'%')
|
||||
</if>
|
||||
<if test="@org.jeecg.common.util.oConvertUtils@isNotEmpty(bmsInvoiceListQueryDTO.shipperName)">
|
||||
and a.shipper_name LIKE CONCAT('%',#{bmsInvoiceListQueryDTO.shipperName},'%')
|
||||
</if>
|
||||
<if test="@org.jeecg.common.util.oConvertUtils@isNotEmpty(bmsInvoiceListQueryDTO.shipperId)">
|
||||
and a.shipper_id = #{bmsInvoiceListQueryDTO.shipperId}
|
||||
</if>
|
||||
<if test="@org.jeecg.common.util.oConvertUtils@isNotEmpty(bmsInvoiceListQueryDTO.companyName)">
|
||||
and a.company_name LIKE CONCAT('%',#{bmsInvoiceListQueryDTO.companyName},'%')
|
||||
</if>
|
||||
<if test="@org.jeecg.common.util.oConvertUtils@isNotEmpty(bmsInvoiceListQueryDTO.invoiceTitle)">
|
||||
and a.invoice_title LIKE CONCAT('%',#{bmsInvoiceListQueryDTO.invoiceTitle},'%')
|
||||
</if>
|
||||
<if test="bmsInvoiceListQueryDTO.organizationId != null ">
|
||||
and a.organization_id = #{bmsInvoiceListQueryDTO.organizationId}
|
||||
and a.organization_name IS NOT NULL
|
||||
</if>
|
||||
<if test="bmsInvoiceListQueryDTO.topOrganizationId != null ">
|
||||
and a.top_organization_id = #{bmsInvoiceListQueryDTO.topOrganizationId}
|
||||
<if test="bmsInvoiceListQueryDTO.organizationId == null">
|
||||
and a.organization_name IS NOT NULL
|
||||
</if>
|
||||
</if>
|
||||
<if test="bmsInvoiceListQueryDTO.organizationName != null and bmsInvoiceListQueryDTO.organizationName != ''">
|
||||
and a.organization_name LIKE CONCAT('%',#{bmsInvoiceListQueryDTO.organizationName},'%')
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<sql id="field_where">
|
||||
a.id,
|
||||
a.invoice_title,
|
||||
a.invoice_value,
|
||||
a.remark,
|
||||
a.invoice_state,
|
||||
(CASE
|
||||
a.invoice_state
|
||||
WHEN 0 THEN
|
||||
'未开票'
|
||||
WHEN 1 THEN
|
||||
'已取消申请'
|
||||
WHEN 2 THEN
|
||||
'已开票'
|
||||
WHEN 3 THEN
|
||||
'已驳回'
|
||||
WHEN 4 THEN
|
||||
'已寄出'
|
||||
WHEN 5 THEN
|
||||
'已作废' ELSE NULL
|
||||
END
|
||||
) AS invoice_state_name,
|
||||
a.invoice_apply_time,
|
||||
a.applicant_id,
|
||||
a.reject_reason,
|
||||
a.transportation_ids,
|
||||
a.refund_remark,
|
||||
a.manager_id,
|
||||
a.manager_time,
|
||||
a.send_by_id,
|
||||
a.send_time,
|
||||
a.send_postage,
|
||||
a.courier_services_company,
|
||||
a.receiving_address_id,
|
||||
a.create_by,
|
||||
a.create_time,
|
||||
a.update_by,
|
||||
a.update_time,
|
||||
a.is_delete,
|
||||
a.sys_org_code,
|
||||
a.invoice_type,
|
||||
a.invoice_nature,
|
||||
a.invoice_number,
|
||||
a.invoice_code,
|
||||
a.tracking_number,
|
||||
a.apply_number,
|
||||
a.organization_id AS organizationId,
|
||||
a.organization_name AS organizationName,
|
||||
a.top_organization_id AS topOrganizationId
|
||||
</sql>
|
||||
<sql id="field_where2">
|
||||
a.id,a.invoice_title,a.invoice_value,a.remark,a.invoice_state,a.invoice_apply_time,a.applicant_id,a.reject_reason,a.manager_id,a.manager_time,
|
||||
a.send_by_id,a.send_time,a.send_postage, a.courier_services_company,a.receiving_address_id,a.create_time,b.tax_reg_account,a.transportation_ids,
|
||||
b.tax_reg_account,b.invoice_title,a.shipper_id,a.shipper_name,a.company_name,a.invoice_make_time,a.tax_reg_account reg_account
|
||||
</sql>
|
||||
</mapper>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?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="com.mhd.bms.domain.bmsMakeOutInvoice.repository.mapper.BmsMakeOutInvoiceMapper">
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user