发票相关改造;
This commit is contained in:
@@ -74,5 +74,12 @@ public class BillDetail extends BaseVOEntity{
|
||||
@Excel(name = "期望金额")
|
||||
private BigDecimal billingExpectedAmount;
|
||||
|
||||
|
||||
}
|
||||
@ApiModelProperty(value = "无税费用")
|
||||
private BigDecimal taxFreeFee;
|
||||
@ApiModelProperty(value = "税额")
|
||||
private BigDecimal taxAmount;
|
||||
@ApiModelProperty(value = "税率")
|
||||
private Double taxRate;
|
||||
@ApiModelProperty("结算币种")
|
||||
private String settlementCurrency;
|
||||
}
|
||||
@@ -225,4 +225,13 @@ public class BillManage extends BaseVOEntity{
|
||||
|
||||
@ApiModelProperty(value = "nc唯一标识")
|
||||
private String skNcId;
|
||||
|
||||
@ApiModelProperty(value = "无税费用")
|
||||
private BigDecimal taxFreeFee;
|
||||
@ApiModelProperty(value = "税额")
|
||||
private BigDecimal taxAmount;
|
||||
@ApiModelProperty(value = "税率")
|
||||
private Double taxRate;
|
||||
@ApiModelProperty("结算币种")
|
||||
private String settlementCurrency;
|
||||
}
|
||||
+10
-1
@@ -120,5 +120,14 @@ public class BillDetailPO extends BaseVOEntity{
|
||||
@Excel(name = "二级费用科目", readConverterExp = "结=算项")
|
||||
private String secondSubjectName;
|
||||
|
||||
@ApiModelProperty(value = "无税费用")
|
||||
private BigDecimal taxFreeFee;
|
||||
@ApiModelProperty(value = "税额")
|
||||
private BigDecimal taxAmount;
|
||||
@ApiModelProperty(value = "税率")
|
||||
private Double taxRate;
|
||||
@ApiModelProperty("结算币种")
|
||||
private String settlementCurrency;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -236,4 +236,13 @@ public class BillManagePO extends BaseVOEntity{
|
||||
|
||||
@ApiModelProperty(value = "nc唯一标识")
|
||||
private String skNcId;
|
||||
|
||||
@ApiModelProperty(value = "无税费用")
|
||||
private BigDecimal taxFreeFee;
|
||||
@ApiModelProperty(value = "税额")
|
||||
private BigDecimal taxAmount;
|
||||
@ApiModelProperty(value = "税率")
|
||||
private Double taxRate;
|
||||
@ApiModelProperty("结算币种")
|
||||
private String settlementCurrency;
|
||||
}
|
||||
+10
-1
@@ -78,4 +78,13 @@ public class BillDetailDO extends BaseVOEntity{
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
}
|
||||
|
||||
@ApiModelProperty(value = "无税费用")
|
||||
private BigDecimal taxFreeFee;
|
||||
@ApiModelProperty(value = "税额")
|
||||
private BigDecimal taxAmount;
|
||||
@ApiModelProperty(value = "税率")
|
||||
private Double taxRate;
|
||||
@ApiModelProperty("结算币种")
|
||||
private String settlementCurrency;
|
||||
}
|
||||
@@ -247,4 +247,13 @@ public class BillManageDO extends BaseVOEntity{
|
||||
|
||||
@ApiModelProperty(value = "nc唯一标识")
|
||||
private String skNcId;
|
||||
|
||||
@ApiModelProperty(value = "无税费用")
|
||||
private BigDecimal taxFreeFee;
|
||||
@ApiModelProperty(value = "税额")
|
||||
private BigDecimal taxAmount;
|
||||
@ApiModelProperty(value = "税率")
|
||||
private Double taxRate;
|
||||
@ApiModelProperty("结算币种")
|
||||
private String settlementCurrency;
|
||||
}
|
||||
+36
-3
@@ -16,10 +16,14 @@ 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.bms.domain.bmsMakeOutInvoiceItem.entity.BmsMakeOutInvoiceItem;
|
||||
import com.mhd.bms.domain.bmsMakeOutInvoiceItem.repository.mapper.BmsMakeOutInvoiceItemMapper;
|
||||
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.TmsMakeOutInvoice;
|
||||
import com.mhd.system.api.domain.TmsMakeOutInvoiceItem;
|
||||
import com.mhd.system.api.domain.WlhyLoginUser;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||
@@ -48,6 +52,8 @@ public class BmsInvoiceListServiceImpl extends ServiceImpl<BmsInvoiceListMapper,
|
||||
@Resource
|
||||
private BmsMakeOutInvoiceMapper bmsMakeOutInvoiceMapper;
|
||||
@Resource
|
||||
private BmsMakeOutInvoiceItemMapper bmsMakeOutInvoiceItemMapper;
|
||||
@Resource
|
||||
private BillManageMapper billManageMapper;
|
||||
/*@Resource
|
||||
private BmsSettlementPartyInvoiceMapper bmsSettlementPartyInvoiceMapper;*/
|
||||
@@ -157,7 +163,27 @@ public class BmsInvoiceListServiceImpl extends ServiceImpl<BmsInvoiceListMapper,
|
||||
bmsInvoiceList.setCompanyName(bmsInvoiceListAddDTO.getCompanyName());
|
||||
}
|
||||
// 保存【销项发票表】数据
|
||||
saveBmsInvoiceList(bmsInvoiceList, bmsInvoiceListAddDTO, sysUser, createBy);
|
||||
Long listId = saveBmsInvoiceList(bmsInvoiceList, bmsInvoiceListAddDTO, sysUser, createBy);
|
||||
|
||||
//预保存发票明细信息
|
||||
if(ObjectUtil.isNotNull(listId)){
|
||||
List<BmsMakeOutInvoice> bmsMakeOutInvoices = bmsInvoiceListAddDTO.getBmsMakeOutInvoices();
|
||||
if (ObjectUtil.isNotNull(bmsMakeOutInvoices) && bmsMakeOutInvoices.size() > 0) {
|
||||
for (BmsMakeOutInvoice bmsMakeOutInvoice : bmsMakeOutInvoices) {
|
||||
bmsMakeOutInvoice.setInvoiceId(listId);
|
||||
//bmsMakeOutInvoice.setCreateBy(sysUser.getId());
|
||||
bmsMakeOutInvoice.setCreateTime(new Date());
|
||||
bmsMakeOutInvoiceMapper.insert(bmsMakeOutInvoice);
|
||||
for (BmsMakeOutInvoiceItem bmsMakeOutInvoiceItem : bmsMakeOutInvoice.getBmsMakeOutInvoiceItems()) {
|
||||
bmsMakeOutInvoiceItem.setMakeId(bmsMakeOutInvoice.getId());
|
||||
//bmsMakeOutInvoiceItem.setCreateBy(sysUser.getId());
|
||||
bmsMakeOutInvoiceItem.setCreateTime(new Date());
|
||||
bmsMakeOutInvoiceItemMapper.insert(bmsMakeOutInvoiceItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BillManage billManage = billManageMapper.selectById(bmsInvoiceListAddDTO.getBillManageId());
|
||||
if (billManage != null) {
|
||||
billManage.setIsInvoice(1);
|
||||
@@ -781,7 +807,7 @@ public class BmsInvoiceListServiceImpl extends ServiceImpl<BmsInvoiceListMapper,
|
||||
* @param sysUser
|
||||
* @param createBy
|
||||
*/
|
||||
public void saveBmsInvoiceList(BmsInvoiceList bmsInvoiceList, BmsInvoiceListAddDTO bmsInvoiceListAddDTO, WlhyLoginUser sysUser, String createBy){
|
||||
public Long saveBmsInvoiceList(BmsInvoiceList bmsInvoiceList, BmsInvoiceListAddDTO bmsInvoiceListAddDTO, WlhyLoginUser sysUser, String createBy){
|
||||
|
||||
bmsInvoiceList.setReceivingAddressId(bmsInvoiceListAddDTO.getReceivingAddressId());
|
||||
|
||||
@@ -810,6 +836,13 @@ public class BmsInvoiceListServiceImpl extends ServiceImpl<BmsInvoiceListMapper,
|
||||
}
|
||||
}
|
||||
|
||||
this.save(bmsInvoiceList);
|
||||
boolean saveSuccess = this.save(bmsInvoiceList);
|
||||
// 3. 插入成功后,直接从实体对象获取ID(已被MyBatis-Plus自动赋值)
|
||||
if (saveSuccess) {
|
||||
Long id = bmsInvoiceList.getId();
|
||||
System.out.println("插入成功,生成的ID:" + id);
|
||||
return id;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+4
@@ -1,11 +1,13 @@
|
||||
package com.mhd.bms.domain.bmsInvoiceList.repository.todo;
|
||||
|
||||
import com.mhd.bms.domain.bmsMakeOutInvoice.entity.BmsMakeOutInvoice;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 销项发票表
|
||||
@@ -64,4 +66,6 @@ public class BmsInvoiceListAddDTO implements Serializable {
|
||||
@Excel(name = "对账单id", width = 15)
|
||||
private Long billManageId;
|
||||
|
||||
private List<BmsMakeOutInvoice> bmsMakeOutInvoices;
|
||||
|
||||
}
|
||||
+6
@@ -1,8 +1,10 @@
|
||||
package com.mhd.bms.domain.bmsMakeOutInvoice.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.bms.domain.bmsMakeOutInvoiceItem.entity.BmsMakeOutInvoiceItem;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
@@ -11,6 +13,7 @@ import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 销项发票表
|
||||
@@ -105,4 +108,7 @@ public class BmsMakeOutInvoice extends BaseVOEntity {
|
||||
private String actualInvoiceCustomerId;
|
||||
@ApiModelProperty(value = "实际开票客户名称")
|
||||
private String actualInvoiceCustomerName;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<BmsMakeOutInvoiceItem> bmsMakeOutInvoiceItems;
|
||||
}
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
package com.mhd.bms.domain.bmsMakeOutInvoiceItem.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.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 销项发票表-费用明细
|
||||
* @Author: lfs
|
||||
* @Date: 2020-02-19 08:50:47
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class BmsMakeOutInvoiceItem extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ID_WORKER_STR)
|
||||
private String id;
|
||||
/**makeId*/
|
||||
@ApiModelProperty(value = "makeId")
|
||||
@Excel(name = "makeId", width = 15)
|
||||
private Long makeId;
|
||||
/**发票金额*/
|
||||
@ApiModelProperty(value = "发票金额")
|
||||
@Excel(name = "发票金额", width = 15)
|
||||
private BigDecimal invoiceValue;
|
||||
/**发票备注*/
|
||||
@ApiModelProperty(value = "发票备注")
|
||||
@Excel(name = "发票备注", width = 15)
|
||||
private String remark;
|
||||
|
||||
/**是否删除(0-否,1-是)*/
|
||||
@ApiModelProperty(value = "是否删除(0-否,1-是)")
|
||||
@Excel(name = "是否删除(0-否,1-是)", width = 15)
|
||||
private Integer isDelete;
|
||||
|
||||
@ApiModelProperty(value = "开票项目")
|
||||
private String invoiceItem;
|
||||
@ApiModelProperty(value = "开票项目名称")
|
||||
private String invoiceItemName;
|
||||
@ApiModelProperty(value = "实际开票客户id")
|
||||
private String actualInvoiceCustomerId;
|
||||
@ApiModelProperty(value = "实际开票客户名称")
|
||||
private String actualInvoiceCustomerName;
|
||||
@ApiModelProperty(value = "无税费用")
|
||||
private BigDecimal taxFreeFee;
|
||||
@ApiModelProperty(value = "税额")
|
||||
private BigDecimal taxAmount;
|
||||
@ApiModelProperty(value = "税率")
|
||||
private Double taxRate;
|
||||
@ApiModelProperty(value = "费用类别")
|
||||
private String feeType;
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.mhd.bms.domain.bmsMakeOutInvoiceItem.repository.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mhd.bms.domain.bmsMakeOutInvoiceItem.entity.BmsMakeOutInvoiceItem;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
/**
|
||||
* @Description: 开票表
|
||||
* @Author: lfs
|
||||
* @Date: 2020-03-30
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface BmsMakeOutInvoiceItemMapper extends BaseMapper<BmsMakeOutInvoiceItem> {
|
||||
@Select("SELECT * FROM tms_make_out_invoice_item WHERE invoice_id=#{invoiceId} and is_delete = 0")
|
||||
BmsMakeOutInvoiceItem queryByInvoiceId(String invoiceId);
|
||||
}
|
||||
@@ -124,4 +124,13 @@ public class BillDetailDTO extends BaseVOEntity{
|
||||
@ApiModelProperty("二级费用科目(结算项)")
|
||||
@Excel(name = "二级费用科目", readConverterExp = "结=算项")
|
||||
private String secondSubjectName;
|
||||
}
|
||||
|
||||
@ApiModelProperty(value = "无税费用")
|
||||
private BigDecimal taxFreeFee;
|
||||
@ApiModelProperty(value = "税额")
|
||||
private BigDecimal taxAmount;
|
||||
@ApiModelProperty(value = "税率")
|
||||
private Double taxRate;
|
||||
@ApiModelProperty("结算币种")
|
||||
private String settlementCurrency;
|
||||
}
|
||||
@@ -253,4 +253,13 @@ public class BillManageDTO extends BaseVOEntity{
|
||||
|
||||
@ApiModelProperty(value = "nc唯一标识")
|
||||
private String skNcId;
|
||||
|
||||
@ApiModelProperty(value = "无税费用")
|
||||
private BigDecimal taxFreeFee;
|
||||
@ApiModelProperty(value = "税额")
|
||||
private BigDecimal taxAmount;
|
||||
@ApiModelProperty(value = "税率")
|
||||
private Double taxRate;
|
||||
@ApiModelProperty("结算币种")
|
||||
private String settlementCurrency;
|
||||
}
|
||||
Reference in New Issue
Block a user