commit
2fe1ae9308
@ -0,0 +1,23 @@ |
||||
package com.jianshui.platform.service; |
||||
|
||||
|
||||
import com.jianshui.platform.dto.BillInfoPDTO; |
||||
|
||||
/** |
||||
* 发票录入 |
||||
* |
||||
*/ |
||||
|
||||
public interface InvoiceAddService { |
||||
|
||||
|
||||
/** |
||||
* @Author: kk |
||||
* @Description: 单据录入 |
||||
* @DateTime: 2023/6/5 17:14 |
||||
* @Params: |
||||
* @Return |
||||
*/ |
||||
|
||||
int invoiceSave(BillInfoPDTO billInfoPDTO); |
||||
} |
@ -0,0 +1,73 @@ |
||||
package com.jianshui.platform.service.impl; |
||||
|
||||
import cn.hutool.core.bean.BeanUtil; |
||||
import com.jianshui.common.utils.ValidateUtils; |
||||
import com.jianshui.invoice.domain.BillInfo; |
||||
import com.jianshui.invoice.mapper.BillInfoMapper; |
||||
import com.jianshui.platform.dto.BillInfoPDTO; |
||||
import com.jianshui.platform.service.InvoiceAddService; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
|
||||
/** |
||||
* 发票录入 |
||||
* |
||||
*/ |
||||
@Service |
||||
public class InvoiceAddServiceImpl implements InvoiceAddService { |
||||
|
||||
@Autowired |
||||
private static BillInfoMapper billInfoMapper; |
||||
|
||||
@Override |
||||
public int invoiceSave(BillInfoPDTO billInfoPDTO) { |
||||
ValidateUtils.validate(billInfoPDTO); |
||||
|
||||
BillInfo billInfo = BeanUtil.copyProperties(billInfoPDTO, BillInfo.class); |
||||
// 手工录入
|
||||
billInfo.setSource("3"); |
||||
return billInfoMapper.insertBillInfo(billInfo); |
||||
|
||||
} |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} |
Reference in new issue