后台添加Log日志,修改Controller请求路径为Restful风格使其规范,修改方法名称,非mapper层不用select关键字,
完成该模块
This commit is contained in:
parent
525848b786
commit
0bf00a46d4
@ -181,10 +181,10 @@ public class XhpcChargingPileServiceImpl implements IXhpcChargingPileService {
|
||||
if (xhpc.getSerialNumber() != xhpc.getSerialNumber()) {
|
||||
return AjaxResult.error("桩编号不能编辑");
|
||||
}
|
||||
if(xhpcChargingPile.getGunNumber() ==null || xhpcChargingPile.getGunNumber()>26){
|
||||
if (xhpcChargingPile.getGunNumber() == null || xhpcChargingPile.getGunNumber() > 26) {
|
||||
return AjaxResult.error("终端数量不能大于26");
|
||||
}
|
||||
if (!xhpcChargingPile.getGunNumber().equals(xhpc.getGunNumber())) {
|
||||
if (!xhpcChargingPile.getGunNumber().equals(xhpc.getGunNumber()) || !xhpcChargingPile.getSerialNumber().equals(xhpc.getSerialNumber())) {
|
||||
//删除之前的终端
|
||||
xhpcChargingPileMapper.updateXhpcTerminal(chargingPileId);
|
||||
int number = xhpcChargingPileMapper.countXhpcTerminal(xhpcChargingPile.getChargingStationId());
|
||||
|
||||
@ -25,7 +25,7 @@ public class XhpcInvoiceApiController extends BaseController {
|
||||
XhpcInvoiceService xhpcInvoiceService;
|
||||
|
||||
/**
|
||||
* 查询用户显示小红点,查询用户有几个未读的已开发票
|
||||
* 查询用户显示小红点,即查询用户有几个未读的已开发票
|
||||
*
|
||||
* @author WH
|
||||
* @date 2021/12/28 18:51
|
||||
|
||||
@ -4,6 +4,8 @@ import com.aliyun.oss.OSSClient;
|
||||
import com.xhpc.common.core.utils.DateUtils;
|
||||
import com.xhpc.common.core.web.controller.BaseController;
|
||||
import com.xhpc.common.core.web.domain.AjaxResult;
|
||||
import com.xhpc.common.log.annotation.Log;
|
||||
import com.xhpc.common.log.enums.BusinessType;
|
||||
import com.xhpc.invoice.constant.InvoiceStatusConst;
|
||||
import com.xhpc.invoice.domain.AllInvoiceOrdersRequest;
|
||||
import com.xhpc.invoice.domain.AllInvoiceOrdersResponse;
|
||||
@ -64,6 +66,7 @@ public class XhpcInvoiceController extends BaseController {
|
||||
* @date 2021/12/29 16:40
|
||||
* @since version-1.0
|
||||
*/
|
||||
@Log(title = "电子发票上传", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/pdf")
|
||||
public AjaxResult uploadPdf(MultipartFile invoicePdf) throws IOException {
|
||||
|
||||
@ -87,7 +90,8 @@ public class XhpcInvoiceController extends BaseController {
|
||||
* @date 2021/12/22 12:03
|
||||
* @since version-1.0
|
||||
*/
|
||||
@PostMapping("/invoiceToUser")
|
||||
@Log(title = "用户提交发票状态", businessType = BusinessType.UPDATE)
|
||||
@PatchMapping()
|
||||
public AjaxResult invoiceToUser(@RequestBody InvoiceToUserRequest requestData) {
|
||||
//前置条件
|
||||
if (requestData.getInvoiceId() == null) {
|
||||
@ -128,13 +132,13 @@ public class XhpcInvoiceController extends BaseController {
|
||||
* @date 2021/12/21 11:33
|
||||
* @since version-1.0
|
||||
*/
|
||||
@PostMapping("/selectAllInvoiceOrders")
|
||||
public AjaxResult selectAllInvoiceOrders(@RequestBody AllInvoiceOrdersRequest requestData) {
|
||||
@GetMapping("/all-info")
|
||||
public AjaxResult findAllInvoiceOrders(@RequestBody AllInvoiceOrdersRequest requestData) {
|
||||
|
||||
if (requestData.getCurrentPage() == null || requestData.getItems() == null) {
|
||||
return AjaxResult.error("当前页数、每页要显示的条数为必传递项");
|
||||
}
|
||||
AllInvoiceOrdersResponse allInvoiceOrdersResponse = xhpcInvoiceService.selectAllInvoiceOrders(requestData);
|
||||
AllInvoiceOrdersResponse allInvoiceOrdersResponse = xhpcInvoiceService.findAllInvoiceOrders(requestData);
|
||||
return AjaxResult.success(allInvoiceOrdersResponse);
|
||||
}
|
||||
|
||||
@ -147,11 +151,11 @@ public class XhpcInvoiceController extends BaseController {
|
||||
* @date 2021/12/20 10:48
|
||||
* @since version-1.0
|
||||
*/
|
||||
@PostMapping("/selectSpecificInvoice")
|
||||
public AjaxResult selectSpecificInvoice(@RequestBody Map<String, Object> invoiceIdMap) {
|
||||
@GetMapping("/detail")
|
||||
public AjaxResult findSpecificInvoice(@RequestBody Map<String, Object> invoiceIdMap) {
|
||||
|
||||
Long invoiceId = Long.valueOf(String.valueOf(invoiceIdMap.get("invoiceId")));
|
||||
SpecificInvoiceWrap specificInvoiceWrap = xhpcInvoiceService.selectSpecificInvoice(invoiceId);
|
||||
SpecificInvoiceWrap specificInvoiceWrap = xhpcInvoiceService.findSpecificInvoice(invoiceId);
|
||||
if (specificInvoiceWrap == null) {
|
||||
return AjaxResult.error("要回显的订单发票id有误");
|
||||
}
|
||||
|
||||
@ -24,7 +24,7 @@ public interface XhpcInvoiceService {
|
||||
* @date 2021/12/20 14:10
|
||||
* @since version-1.0
|
||||
*/
|
||||
SpecificInvoiceWrap selectSpecificInvoice(Long invoiceId);
|
||||
SpecificInvoiceWrap findSpecificInvoice(Long invoiceId);
|
||||
|
||||
/**
|
||||
* 通过requestData中的申请人、申请人类型、发票状态、发票起始时间、发票申请终止时间、开票起始时间、开票终点时间、当前所在页数、当前页所要显示几行,来查询发票列表信息
|
||||
@ -35,7 +35,7 @@ public interface XhpcInvoiceService {
|
||||
* @date 2021/12/21 16:02
|
||||
* @since version-1.0
|
||||
*/
|
||||
AllInvoiceOrdersResponse selectAllInvoiceOrders(AllInvoiceOrdersRequest requestData);
|
||||
AllInvoiceOrdersResponse findAllInvoiceOrders(AllInvoiceOrdersRequest requestData);
|
||||
|
||||
/**
|
||||
* 存储开发票的状态,将开票信息入库,并向指定用户的邮箱发送短信
|
||||
|
||||
@ -67,7 +67,7 @@ public class XhpcInvoiceServiceImpl implements XhpcInvoiceService {
|
||||
* @since version-1.0
|
||||
*/
|
||||
@Override
|
||||
public AllInvoiceOrdersResponse selectAllInvoiceOrders(AllInvoiceOrdersRequest requestData) {
|
||||
public AllInvoiceOrdersResponse findAllInvoiceOrders(AllInvoiceOrdersRequest requestData) {
|
||||
//计算分页索引
|
||||
requestData.setCurrentPage((requestData.getCurrentPage() - 1) * requestData.getItems());
|
||||
//获取每张发票信息
|
||||
@ -594,7 +594,7 @@ public class XhpcInvoiceServiceImpl implements XhpcInvoiceService {
|
||||
* @since version-1.0
|
||||
*/
|
||||
@Override
|
||||
public SpecificInvoiceWrap selectSpecificInvoice(Long invoiceId) {
|
||||
public SpecificInvoiceWrap findSpecificInvoice(Long invoiceId) {
|
||||
|
||||
//处理包装类外层数据
|
||||
XhpcInvoice xhpcInvoice = xhpcInvoiceMapper.selectByPrimaryKey(invoiceId);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user