parent
0c384d83e9
commit
a49f02b161
@ -0,0 +1,31 @@ |
||||
package com.jianshui.platform.service; |
||||
|
||||
import com.jianshui.common.core.controller.BaseController; |
||||
import com.jianshui.platform.domain.dto.BillInfoPDTO; |
||||
import com.jianshui.platform.domain.vo.BillInfoPVO; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import org.springframework.web.bind.annotation.PostMapping; |
||||
import org.springframework.web.bind.annotation.RequestBody; |
||||
import org.springframework.web.bind.annotation.RequestMapping; |
||||
import org.springframework.web.bind.annotation.RestController; |
||||
|
||||
|
||||
/** |
||||
* 发票录入 |
||||
* |
||||
*/ |
||||
|
||||
public interface InvoiceAddService { |
||||
|
||||
|
||||
/** |
||||
* @Author: kk |
||||
* @Description: 单据录入 |
||||
* @DateTime: 2023/6/5 17:14 |
||||
* @Params: |
||||
* @Return |
||||
*/ |
||||
|
||||
int invoiceSave(BillInfoPDTO billInfoPDTO); |
||||
} |
@ -0,0 +1,81 @@ |
||||
package com.jianshui.platform.service.impl; |
||||
|
||||
import cn.hutool.core.bean.BeanUtil; |
||||
import com.jianshui.common.core.controller.BaseController; |
||||
import com.jianshui.common.utils.ValidateUtils; |
||||
import com.jianshui.invoice.domain.BillInfo; |
||||
import com.jianshui.invoice.mapper.BillInfoMapper; |
||||
import com.jianshui.platform.domain.dto.BillInfoPDTO; |
||||
import com.jianshui.platform.domain.vo.BillInfoPVO; |
||||
import com.jianshui.platform.service.InvoiceAddService; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.stereotype.Service; |
||||
import org.springframework.web.bind.annotation.PostMapping; |
||||
import org.springframework.web.bind.annotation.RequestBody; |
||||
import org.springframework.web.bind.annotation.RequestMapping; |
||||
import org.springframework.web.bind.annotation.RestController; |
||||
|
||||
|
||||
/** |
||||
* 发票录入 |
||||
* |
||||
*/ |
||||
@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); |
||||
|
||||
} |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} |
Loading…
Reference in new issue