发票抬头,巡查上报
parent
349e9066ad
commit
22dd3330dc
|
|
@ -0,0 +1,18 @@
|
|||
package com.njzscloud.supervisory.biz.constant;
|
||||
|
||||
import com.njzscloud.common.core.ienum.DictStr;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
/**
|
||||
* 发票类型
|
||||
* @author ljw
|
||||
*/
|
||||
@Getter
|
||||
@RequiredArgsConstructor
|
||||
public enum InvoiceType implements DictStr {
|
||||
GENERAL("GENERAL", "普票"),
|
||||
EXCLUSIVE("EXCLUSIVE", "专票");
|
||||
private final String val;
|
||||
private final String txt;
|
||||
}
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
package com.njzscloud.supervisory.biz.controller;
|
||||
|
||||
import com.njzscloud.common.core.utils.R;
|
||||
import com.njzscloud.common.mp.support.PageParam;
|
||||
import com.njzscloud.common.mp.support.PageResult;
|
||||
import com.njzscloud.supervisory.biz.pojo.entity.BizInvoiceEntity;
|
||||
import com.njzscloud.supervisory.biz.pojo.param.SearchBizInvoiceParam;
|
||||
import com.njzscloud.supervisory.biz.service.BizInvoiceService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 发票抬头管理
|
||||
* @author ljw
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/biz_invoice")
|
||||
@RequiredArgsConstructor
|
||||
public class BizInvoiceController {
|
||||
|
||||
private final BizInvoiceService bizInvoiceService;
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
@PostMapping("/add")
|
||||
public R<?> add(@RequestBody BizInvoiceEntity entity) {
|
||||
bizInvoiceService.add(entity);
|
||||
return R.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@PostMapping("/modify")
|
||||
public R<?> modify(@RequestBody BizInvoiceEntity entity) {
|
||||
bizInvoiceService.modify(entity);
|
||||
return R.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@GetMapping("/remove")
|
||||
public R<?> remove(@RequestParam Long id) {
|
||||
bizInvoiceService.remove(id);
|
||||
return R.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
public R<BizInvoiceEntity> detail(@RequestParam Long id) {
|
||||
return R.success(bizInvoiceService.detail(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
@GetMapping("/paging")
|
||||
public R<PageResult<BizInvoiceEntity>> paging(PageParam pageParam, SearchBizInvoiceParam searchParam) {
|
||||
return R.success(bizInvoiceService.paging(pageParam, searchParam));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
package com.njzscloud.supervisory.biz.controller;
|
||||
|
||||
import com.njzscloud.common.core.utils.R;
|
||||
import com.njzscloud.common.mp.support.PageParam;
|
||||
import com.njzscloud.common.mp.support.PageResult;
|
||||
import com.njzscloud.supervisory.biz.pojo.entity.BizPatrolReportEntity;
|
||||
import com.njzscloud.supervisory.biz.pojo.param.SearchBizPatrolReportParam;
|
||||
import com.njzscloud.supervisory.biz.service.BizPatrolReportService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 巡查上报
|
||||
* @author ljw
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/biz_patrol_report")
|
||||
@RequiredArgsConstructor
|
||||
public class BizPatrolReportController {
|
||||
|
||||
private final BizPatrolReportService bizPatrolReportService;
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
@PostMapping("/add")
|
||||
public R<?> add(@RequestBody BizPatrolReportEntity entity) {
|
||||
bizPatrolReportService.add(entity);
|
||||
return R.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@PostMapping("/modify")
|
||||
public R<?> modify(@RequestBody BizPatrolReportEntity entity) {
|
||||
bizPatrolReportService.modify(entity);
|
||||
return R.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@GetMapping("/remove")
|
||||
public R<?> remove(@RequestParam Long id) {
|
||||
bizPatrolReportService.remove(id);
|
||||
return R.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
public R<BizPatrolReportEntity> detail(@RequestParam Long id) {
|
||||
return R.success(bizPatrolReportService.detail(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
@GetMapping("/paging")
|
||||
public R<PageResult<BizPatrolReportEntity>> paging(PageParam pageParam, SearchBizPatrolReportParam searchParam) {
|
||||
return R.success(bizPatrolReportService.paging(pageParam, searchParam));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.njzscloud.supervisory.biz.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njzscloud.supervisory.biz.pojo.entity.BizInvoiceEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 发票抬头管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface BizInvoiceMapper extends BaseMapper<BizInvoiceEntity> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.njzscloud.supervisory.biz.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njzscloud.supervisory.biz.pojo.entity.BizPatrolReportEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 巡查上报
|
||||
*/
|
||||
@Mapper
|
||||
public interface BizPatrolReportMapper extends BaseMapper<BizPatrolReportEntity> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,102 @@
|
|||
package com.njzscloud.supervisory.biz.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.njzscloud.supervisory.biz.constant.InvoiceType;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 发票抬头管理
|
||||
* @author ljw
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@TableName(value = "biz_invoice", autoResultMap = true)
|
||||
public class BizInvoiceEntity {
|
||||
|
||||
/**
|
||||
* Id
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 联系人
|
||||
*/
|
||||
private String contact;
|
||||
|
||||
/**
|
||||
* 公司名称
|
||||
*/
|
||||
private String companyName;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 发票类型:general 普票 exclusive 专票
|
||||
*/
|
||||
private InvoiceType type;
|
||||
|
||||
/**
|
||||
* 统一社会信用代码
|
||||
*/
|
||||
private String uscc;
|
||||
|
||||
/**
|
||||
* 开户银行
|
||||
*/
|
||||
private String bank;
|
||||
|
||||
/**
|
||||
* 开户账号
|
||||
*/
|
||||
private String accountNum;
|
||||
|
||||
/**
|
||||
* 注册地址
|
||||
*/
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建人 Id; sys_user.id
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Long creatorId;
|
||||
|
||||
/**
|
||||
* 修改人 Id; sys_user.id
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Long modifierId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private LocalDateTime modifyTime;
|
||||
|
||||
/**
|
||||
* 是否删除; 0-->未删除、1-->已删除
|
||||
*/
|
||||
@TableLogic
|
||||
private Boolean deleted;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,95 @@
|
|||
package com.njzscloud.supervisory.biz.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.njzscloud.common.mp.support.handler.j.JsonTypeHandler;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 巡查上报
|
||||
*
|
||||
* @author ljw
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@TableName(value = "biz_patrol_report", autoResultMap = true)
|
||||
public class BizPatrolReportEntity {
|
||||
|
||||
/**
|
||||
* Id
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 联系人
|
||||
*/
|
||||
private String contact;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 详细地址
|
||||
*/
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 车牌
|
||||
*/
|
||||
private String licensePlate;
|
||||
|
||||
/**
|
||||
* 上报时间
|
||||
*/
|
||||
private LocalDateTime reportTime;
|
||||
|
||||
/**
|
||||
* 巡查照片
|
||||
*/
|
||||
@TableField(typeHandler = JsonTypeHandler.class)
|
||||
private List<String> picture;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建人 Id; sys_user.id
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Long creatorId;
|
||||
|
||||
/**
|
||||
* 修改人 Id; sys_user.id
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Long modifierId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private LocalDateTime modifyTime;
|
||||
|
||||
/**
|
||||
* 是否删除; 0-->未删除、1-->已删除
|
||||
*/
|
||||
@TableLogic
|
||||
private Boolean deleted;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
package com.njzscloud.supervisory.biz.pojo.param;
|
||||
|
||||
import com.njzscloud.supervisory.biz.constant.InvoiceType;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 发票抬头管理查询参数
|
||||
* @author ljw
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
@Accessors(chain = true)
|
||||
public class SearchBizInvoiceParam {
|
||||
|
||||
/**
|
||||
* 联系人
|
||||
*/
|
||||
private String contact;
|
||||
|
||||
/**
|
||||
* 公司名称
|
||||
*/
|
||||
private String companyName;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 发票类型:general 普票 exclusive 专票
|
||||
*/
|
||||
private InvoiceType type;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package com.njzscloud.supervisory.biz.pojo.param;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 巡查上报查询参数
|
||||
* @author ljw
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
@Accessors(chain = true)
|
||||
public class SearchBizPatrolReportParam {
|
||||
|
||||
/**
|
||||
* 联系人
|
||||
*/
|
||||
private String contact;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 车牌
|
||||
*/
|
||||
private String licensePlate;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,99 @@
|
|||
package com.njzscloud.supervisory.biz.service;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njzscloud.common.core.ex.Exceptions;
|
||||
import com.njzscloud.common.mp.support.PageParam;
|
||||
import com.njzscloud.common.mp.support.PageResult;
|
||||
import com.njzscloud.supervisory.biz.constant.InvoiceType;
|
||||
import com.njzscloud.supervisory.biz.mapper.BizInvoiceMapper;
|
||||
import com.njzscloud.supervisory.biz.pojo.entity.BizInvoiceEntity;
|
||||
import com.njzscloud.supervisory.biz.pojo.param.SearchBizInvoiceParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 发票抬头管理
|
||||
* @author ljw
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class BizInvoiceService extends ServiceImpl<BizInvoiceMapper, BizInvoiceEntity> {
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*
|
||||
* @param bizInvoiceEntity 数据
|
||||
*/
|
||||
public void add(BizInvoiceEntity bizInvoiceEntity) {
|
||||
this.save(bizInvoiceEntity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*
|
||||
* @param bizInvoiceEntity 数据
|
||||
*/
|
||||
public void modify(BizInvoiceEntity bizInvoiceEntity) {
|
||||
Long id = bizInvoiceEntity.getId();
|
||||
BizInvoiceEntity oldData = getById(id);
|
||||
if (oldData == null) {
|
||||
throw Exceptions.exception("未找到要修改的数据");
|
||||
}
|
||||
this.updateById(bizInvoiceEntity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param id Id
|
||||
*/
|
||||
public void remove(Long id) {
|
||||
BizInvoiceEntity oldData = getById(id);
|
||||
if (oldData == null) {
|
||||
throw Exceptions.exception("未找到要删除的数据");
|
||||
}
|
||||
this.removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*
|
||||
* @param id Id
|
||||
* @return BizInvoiceEntity 结果
|
||||
*/
|
||||
public BizInvoiceEntity detail(Long id) {
|
||||
BizInvoiceEntity bizInvoiceEntity = this.getById(id);
|
||||
if (bizInvoiceEntity == null) {
|
||||
throw Exceptions.exception("数据不存在");
|
||||
}
|
||||
return bizInvoiceEntity;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param pageParam 分页参数
|
||||
* @param searchParam 查询参数
|
||||
* @return PageResult<BizInvoiceEntity> 分页结果
|
||||
*/
|
||||
public PageResult<BizInvoiceEntity> paging(PageParam pageParam, SearchBizInvoiceParam searchParam) {
|
||||
String contact = searchParam.getContact();
|
||||
String companyName = searchParam.getCompanyName();
|
||||
String phone = searchParam.getPhone();
|
||||
InvoiceType type = searchParam.getType();
|
||||
|
||||
Page<BizInvoiceEntity> page = this.page(pageParam.toPage(), Wrappers.<BizInvoiceEntity>lambdaQuery()
|
||||
.like(StrUtil.isNotBlank(contact), BizInvoiceEntity::getContact, contact)
|
||||
.like(StrUtil.isNotBlank(companyName), BizInvoiceEntity::getCompanyName, companyName)
|
||||
.like(StrUtil.isNotBlank(phone), BizInvoiceEntity::getPhone, phone)
|
||||
.eq(type != null, BizInvoiceEntity::getType, type)
|
||||
.orderByDesc(BizInvoiceEntity::getCreateTime));
|
||||
return PageResult.of(page);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,96 @@
|
|||
package com.njzscloud.supervisory.biz.service;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njzscloud.common.core.ex.Exceptions;
|
||||
import com.njzscloud.common.mp.support.PageParam;
|
||||
import com.njzscloud.common.mp.support.PageResult;
|
||||
import com.njzscloud.supervisory.biz.mapper.BizPatrolReportMapper;
|
||||
import com.njzscloud.supervisory.biz.pojo.entity.BizPatrolReportEntity;
|
||||
import com.njzscloud.supervisory.biz.pojo.param.SearchBizPatrolReportParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 巡查上报
|
||||
* @author ljw
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class BizPatrolReportService extends ServiceImpl<BizPatrolReportMapper, BizPatrolReportEntity> {
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*
|
||||
* @param bizPatrolReportEntity 数据
|
||||
*/
|
||||
public void add(BizPatrolReportEntity bizPatrolReportEntity) {
|
||||
this.save(bizPatrolReportEntity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*
|
||||
* @param bizPatrolReportEntity 数据
|
||||
*/
|
||||
public void modify(BizPatrolReportEntity bizPatrolReportEntity) {
|
||||
Long id = bizPatrolReportEntity.getId();
|
||||
BizPatrolReportEntity oldData = getById(id);
|
||||
if (oldData == null) {
|
||||
throw Exceptions.exception("未找到要修改的数据");
|
||||
}
|
||||
this.updateById(bizPatrolReportEntity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param id Id
|
||||
*/
|
||||
public void remove(Long id) {
|
||||
BizPatrolReportEntity oldData = getById(id);
|
||||
if (oldData == null) {
|
||||
throw Exceptions.exception("未找到要删除的数据");
|
||||
}
|
||||
this.removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*
|
||||
* @param id Id
|
||||
* @return BizPatrolReportEntity 结果
|
||||
*/
|
||||
public BizPatrolReportEntity detail(Long id) {
|
||||
BizPatrolReportEntity bizPatrolReportEntity = this.getById(id);
|
||||
if (bizPatrolReportEntity == null) {
|
||||
throw Exceptions.exception("数据不存在");
|
||||
}
|
||||
return bizPatrolReportEntity;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param pageParam 分页参数
|
||||
* @param searchParam 查询参数
|
||||
* @return PageResult<BizPatrolReportEntity> 分页结果
|
||||
*/
|
||||
public PageResult<BizPatrolReportEntity> paging(PageParam pageParam, SearchBizPatrolReportParam searchParam) {
|
||||
String contact = searchParam.getContact();
|
||||
String phone = searchParam.getPhone();
|
||||
String licensePlate = searchParam.getLicensePlate();
|
||||
|
||||
Page<BizPatrolReportEntity> page = this.page(pageParam.toPage(), Wrappers.<BizPatrolReportEntity>lambdaQuery()
|
||||
.like(StrUtil.isNotBlank(contact), BizPatrolReportEntity::getContact, contact)
|
||||
.like(StrUtil.isNotBlank(phone), BizPatrolReportEntity::getPhone, phone)
|
||||
.like(StrUtil.isNotBlank(licensePlate), BizPatrolReportEntity::getLicensePlate, licensePlate)
|
||||
.orderByDesc(BizPatrolReportEntity::getCreateTime));
|
||||
return PageResult.of(page);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue