diff --git a/mhd_bms/pom.xml b/mhd_bms/pom.xml
index 8d994c2e0..7ecf1ce39 100644
--- a/mhd_bms/pom.xml
+++ b/mhd_bms/pom.xml
@@ -104,7 +104,7 @@
org.projectlombok
lombok
- 1.18.4
+ 1.18.30
provided
diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceInfo/entity/BmsInvoiceInfo.java b/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceInfo/entity/BmsInvoiceInfo.java
new file mode 100644
index 000000000..c9e7d5714
--- /dev/null
+++ b/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceInfo/entity/BmsInvoiceInfo.java
@@ -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;
+}
\ No newline at end of file
diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceInfo/repository/facade/IBmsInvoiceInfoService.java b/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceInfo/repository/facade/IBmsInvoiceInfoService.java
new file mode 100644
index 000000000..36c501c35
--- /dev/null
+++ b/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceInfo/repository/facade/IBmsInvoiceInfoService.java
@@ -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 {
+
+ Page queryList(Page page, BmsInvoiceInfoDTO bmsInvoiceInfoDTO);
+
+ void save(BmsInvoiceInfoAddDTO bmsInvoiceInfoAddDTO);
+
+ void update(BmsInvoiceInfoDTO bmsInvoiceInfoDTO);
+
+ int delete(List ids);
+
+ /**
+ * @Author lfs
+ * @Description 发票信息管理查询
+ * @Date 11:30 2020/3/7
+ * @return QueryInvoiceInfoVO
+ **/
+ QueryInvoiceInfoVO queryInvoiceInfo(String shipperId);
+}
\ No newline at end of file
diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceInfo/repository/mapper/BmsInvoiceInfoMapper.java b/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceInfo/repository/mapper/BmsInvoiceInfoMapper.java
new file mode 100644
index 000000000..749a24d39
--- /dev/null
+++ b/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceInfo/repository/mapper/BmsInvoiceInfoMapper.java
@@ -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 {
+
+ /**
+ * @功能:发票信息表 分页查询
+ * @param tmsInvoiceInfoDTO
+ * @Date: 2020-02-19 08:50:59
+ * @return
+ */
+ public List queryList(Page 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);
+}
\ No newline at end of file
diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceInfo/repository/persistence/BmsInvoiceInfoServiceImpl.java b/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceInfo/repository/persistence/BmsInvoiceInfoServiceImpl.java
new file mode 100644
index 000000000..e1e60b201
--- /dev/null
+++ b/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceInfo/repository/persistence/BmsInvoiceInfoServiceImpl.java
@@ -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 implements IBmsInvoiceInfoService {
+ @Resource
+ private BmsInvoiceInfoMapper bmsInvoiceInfoMapper;
+ @Override
+ public Page queryList(Page 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 ids) {
+ for (String id: ids) {
+ //获取登录人
+ WlhyLoginUser sysUser = SecurityUtils.getLoginUser().getWlhyLoginUser();
+ if( null == sysUser){
+ throw new ServiceException("sysUser是空值");
+ }
+ BmsInvoiceInfo bmsInvoiceInfo = bmsInvoiceInfoMapper.selectOne(new QueryWrapper().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();
+ }
+
+
+
+}
\ No newline at end of file
diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceInfo/repository/todo/BmsInvoiceInfoAddDTO.java b/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceInfo/repository/todo/BmsInvoiceInfoAddDTO.java
new file mode 100644
index 000000000..f6de426c3
--- /dev/null
+++ b/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceInfo/repository/todo/BmsInvoiceInfoAddDTO.java
@@ -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;
+}
\ No newline at end of file
diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceInfo/repository/todo/BmsInvoiceInfoDTO.java b/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceInfo/repository/todo/BmsInvoiceInfoDTO.java
new file mode 100644
index 000000000..1879bc79d
--- /dev/null
+++ b/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceInfo/repository/todo/BmsInvoiceInfoDTO.java
@@ -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;
+}
\ No newline at end of file
diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceInfo/repository/vo/BmsInvoiceInfoVO.java b/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceInfo/repository/vo/BmsInvoiceInfoVO.java
new file mode 100644
index 000000000..4062b0836
--- /dev/null
+++ b/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceInfo/repository/vo/BmsInvoiceInfoVO.java
@@ -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;
+}
\ No newline at end of file
diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceInfo/repository/vo/QueryInvoiceInfoVO.java b/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceInfo/repository/vo/QueryInvoiceInfoVO.java
new file mode 100644
index 000000000..dc68a6b62
--- /dev/null
+++ b/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceInfo/repository/vo/QueryInvoiceInfoVO.java
@@ -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;
+}
\ No newline at end of file
diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceList/entity/BmsInvoiceList.java b/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceList/entity/BmsInvoiceList.java
new file mode 100644
index 000000000..892c68c44
--- /dev/null
+++ b/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceList/entity/BmsInvoiceList.java
@@ -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;
+}
\ No newline at end of file
diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceList/entity/BmsSettlementPartyInvoice.java b/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceList/entity/BmsSettlementPartyInvoice.java
new file mode 100644
index 000000000..111be1362
--- /dev/null
+++ b/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceList/entity/BmsSettlementPartyInvoice.java
@@ -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;
+
+}
\ No newline at end of file
diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceList/repository/facade/IBmsInvoiceListService.java b/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceList/repository/facade/IBmsInvoiceListService.java
new file mode 100644
index 000000000..8adfc3f4e
--- /dev/null
+++ b/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceList/repository/facade/IBmsInvoiceListService.java
@@ -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 {
+
+ Page queryList(Page page, BmsInvoiceListQueryDTO tmsInvoiceListQueryDTO);
+
+ void save(BmsInvoiceListAddDTO tmsInvoiceListAddDTO);
+
+ void addReceivableBill(BmsInvoiceListAddDTO tmsInvoiceListAddDTO);
+
+ void update(BmsInvoiceListDTO tmsInvoiceListDTO);
+
+ int delete(List ids);
+
+ BmsInvoiceListDetailsVO details(String id);
+
+ void invoice(BmsInvoiceListInvoiceStateDTO tmsInvoiceListInvoiceStateDTO);
+
+ Integer reject(BmsInvoiceListInvoiceStateDTO tmsInvoiceListInvoiceStateDTO);
+
+ void mail(BmsInvoiceListInvoiceStateDTO tmsInvoiceListInvoiceStateDTO);
+
+ BmsInvoiceList getById(String id);
+
+ void importExcel(Map fileMap) throws Exception;
+
+ void changeOutInvoice(BmsOutInvoiceChangeDTO tmsOutInvoiceChangeDTO);
+ void queryBulkMailStatus(BmsOutInvoiceChangeDTO tmsOutInvoiceChangeDTO);
+
+ void bulkMail(BmsInvoiceListInvoiceStateDTO tmsInvoiceListInvoiceStateDTO);
+
+ BmsSettlementPartyInvoice selectSettlementPartyInfoByName(String settlementPartyName);
+}
\ No newline at end of file
diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceList/repository/mapper/BmsInvoiceListMapper.java b/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceList/repository/mapper/BmsInvoiceListMapper.java
new file mode 100644
index 000000000..1f0066f7f
--- /dev/null
+++ b/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceList/repository/mapper/BmsInvoiceListMapper.java
@@ -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 {
+
+ public List selectByMainId(@Param("mainId") String mainId);
+
+ /**
+ * @功能:销项发票表 分页查询
+ * @param bmsInvoiceListQueryDTO
+ * @Date: 2020-02-19 08:50:47
+ * @return
+ */
+ public List queryList(Page 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);
+}
\ No newline at end of file
diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceList/repository/persistence/BmsInvoiceListServiceImpl.java b/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceList/repository/persistence/BmsInvoiceListServiceImpl.java
new file mode 100644
index 000000000..d29c6528b
--- /dev/null
+++ b/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceList/repository/persistence/BmsInvoiceListServiceImpl.java
@@ -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 implements IBmsInvoiceListService {
+ @Resource
+ private BmsInvoiceListMapper bmsInvoiceListMapper;
+ @Resource
+ private BmsMakeOutInvoiceMapper bmsMakeOutInvoiceMapper;
+ /*@Resource
+ private BmsSettlementPartyInvoiceMapper bmsSettlementPartyInvoiceMapper;*/
+
+
+
+ @Override
+ public Page queryList(Page 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 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 bmsMakeOutInvoiceList=bmsMakeOutInvoiceMapper.selectList(new QueryWrapper().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 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 ids) {
+ for (String id : ids) {
+ //获取登录人
+ WlhyLoginUser sysUser = SecurityUtils.getLoginUser().getWlhyLoginUser();
+ if (null == sysUser) {
+ throw new ServiceException("sysUser是空值!");
+ }
+ BmsInvoiceList bmsInvoiceList = bmsInvoiceListMapper.selectOne(new QueryWrapper().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 bmsMakeOutInvoiceList=bmsMakeOutInvoiceMapper.selectList(new QueryWrapper().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 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 fileMap) throws Exception {
+ //获取登录人
+ WlhyLoginUser sysUser = SecurityUtils.getLoginUser().getWlhyLoginUser();
+ if (null == sysUser) {
+ throw new ServiceException("未查询到登录用户的信息");
+ }
+ for (Map.Entry 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 bmsMakeOutInvoices;
+}
\ No newline at end of file
diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceList/repository/todo/BmsInvoiceListInvoiceStateDTO.java b/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceList/repository/todo/BmsInvoiceListInvoiceStateDTO.java
new file mode 100644
index 000000000..a203f76a4
--- /dev/null
+++ b/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceList/repository/todo/BmsInvoiceListInvoiceStateDTO.java
@@ -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 bmsMakeOutInvoices;
+ /**操作类型*/
+ @ApiModelProperty(value = "操作类型(取消申请-0,驳回-1)")
+ @Excel(name = "操作类型(取消申请-0,驳回-1)", width = 15)
+ private Integer operateType;
+}
\ No newline at end of file
diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceList/repository/todo/BmsInvoiceListQueryDTO.java b/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceList/repository/todo/BmsInvoiceListQueryDTO.java
new file mode 100644
index 000000000..5d20be77f
--- /dev/null
+++ b/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceList/repository/todo/BmsInvoiceListQueryDTO.java
@@ -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 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;
+}
\ No newline at end of file
diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceList/repository/todo/BmsOutInvoiceChangeDTO.java b/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceList/repository/todo/BmsOutInvoiceChangeDTO.java
new file mode 100644
index 000000000..09f5e0c56
--- /dev/null
+++ b/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceList/repository/todo/BmsOutInvoiceChangeDTO.java
@@ -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;
+}
\ No newline at end of file
diff --git a/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceList/repository/vo/BmsInvoiceListDetailsVO.java b/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceList/repository/vo/BmsInvoiceListDetailsVO.java
new file mode 100644
index 000000000..2f1223012
--- /dev/null
+++ b/mhd_bms/src/main/java/com/mhd/bms/domain/bmsInvoiceList/repository/vo/BmsInvoiceListDetailsVO.java
@@ -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 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 bmsMakeOutInvoices;
+
+ /**账单项目费用*/
+ @ApiModelProperty(value = "账单项目费用")
+ @Excel(name = "账单项目费用", width = 15)
+ private List