11 changed files with 923 additions and 0 deletions
@ -0,0 +1,105 @@ |
|||||
|
package com.zdxt.enforcementcode.controller; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
import lombok.RequiredArgsConstructor; |
||||
|
import jakarta.servlet.http.HttpServletResponse; |
||||
|
import jakarta.validation.constraints.*; |
||||
|
import cn.dev33.satoken.annotation.SaCheckPermission; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
import org.springframework.validation.annotation.Validated; |
||||
|
import org.dromara.common.idempotent.annotation.RepeatSubmit; |
||||
|
import org.dromara.common.log.annotation.Log; |
||||
|
import org.dromara.common.web.core.BaseController; |
||||
|
import org.dromara.common.mybatis.core.page.PageQuery; |
||||
|
import org.dromara.common.core.domain.R; |
||||
|
import org.dromara.common.core.validate.AddGroup; |
||||
|
import org.dromara.common.core.validate.EditGroup; |
||||
|
import org.dromara.common.log.enums.BusinessType; |
||||
|
import org.dromara.common.excel.utils.ExcelUtil; |
||||
|
import com.zdxt.enforcementcode.domain.vo.EnterprisePubQrcodeVo; |
||||
|
import com.zdxt.enforcementcode.domain.bo.EnterprisePubQrcodeBo; |
||||
|
import com.zdxt.enforcementcode.service.IEnterprisePubQrcodeService; |
||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo; |
||||
|
|
||||
|
/** |
||||
|
* 送码入企信息 |
||||
|
* |
||||
|
* @author Lion Li |
||||
|
* @date 2026-06-01 |
||||
|
*/ |
||||
|
@Validated |
||||
|
@RequiredArgsConstructor |
||||
|
@RestController |
||||
|
@RequestMapping("/enforcementcode/pubQrcode") |
||||
|
public class EnterprisePubQrcodeController extends BaseController { |
||||
|
|
||||
|
private final IEnterprisePubQrcodeService enterprisePubQrcodeService; |
||||
|
|
||||
|
/** |
||||
|
* 查询送码入企信息列表 |
||||
|
*/ |
||||
|
@SaCheckPermission("enforcementcode:pubQrcode:list") |
||||
|
@GetMapping("/list") |
||||
|
public TableDataInfo<EnterprisePubQrcodeVo> list(EnterprisePubQrcodeBo bo, PageQuery pageQuery) { |
||||
|
return enterprisePubQrcodeService.queryPageList(bo, pageQuery); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 导出送码入企信息列表 |
||||
|
*/ |
||||
|
@SaCheckPermission("enforcementcode:pubQrcode:export") |
||||
|
@Log(title = "送码入企信息", businessType = BusinessType.EXPORT) |
||||
|
@PostMapping("/export") |
||||
|
public void export(EnterprisePubQrcodeBo bo, HttpServletResponse response) { |
||||
|
List<EnterprisePubQrcodeVo> list = enterprisePubQrcodeService.queryList(bo); |
||||
|
ExcelUtil.exportExcel(list, "送码入企信息", EnterprisePubQrcodeVo.class, response); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取送码入企信息详细信息 |
||||
|
* |
||||
|
* @param id 主键 |
||||
|
*/ |
||||
|
@SaCheckPermission("enforcementcode:pubQrcode:query") |
||||
|
@GetMapping("/{id}") |
||||
|
public R<EnterprisePubQrcodeVo> getInfo(@NotNull(message = "主键不能为空") |
||||
|
@PathVariable String id) { |
||||
|
return R.ok(enterprisePubQrcodeService.queryById(id)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增送码入企信息 |
||||
|
*/ |
||||
|
@SaCheckPermission("enforcementcode:pubQrcode:add") |
||||
|
@Log(title = "送码入企信息", businessType = BusinessType.INSERT) |
||||
|
@RepeatSubmit() |
||||
|
@PostMapping() |
||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody EnterprisePubQrcodeBo bo) { |
||||
|
return toAjax(enterprisePubQrcodeService.insertByBo(bo)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改送码入企信息 |
||||
|
*/ |
||||
|
@SaCheckPermission("enforcementcode:pubQrcode:edit") |
||||
|
@Log(title = "送码入企信息", businessType = BusinessType.UPDATE) |
||||
|
@RepeatSubmit() |
||||
|
@PutMapping() |
||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody EnterprisePubQrcodeBo bo) { |
||||
|
return toAjax(enterprisePubQrcodeService.updateByBo(bo)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除送码入企信息 |
||||
|
* |
||||
|
* @param ids 主键串 |
||||
|
*/ |
||||
|
@SaCheckPermission("enforcementcode:pubQrcode:remove") |
||||
|
@Log(title = "送码入企信息", businessType = BusinessType.DELETE) |
||||
|
@DeleteMapping("/{ids}") |
||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空") |
||||
|
@PathVariable String[] ids) { |
||||
|
return toAjax(enterprisePubQrcodeService.deleteWithValidByIds(List.of(ids), true)); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,168 @@ |
|||||
|
package com.zdxt.enforcementcode.domain; |
||||
|
|
||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity; |
||||
|
import com.baomidou.mybatisplus.annotation.*; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
import java.util.Date; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
|
||||
|
import java.io.Serial; |
||||
|
|
||||
|
/** |
||||
|
* 送码入企信息对象 enterprise_pub_qrcode |
||||
|
* |
||||
|
* @author Lion Li |
||||
|
* @date 2026-06-01 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper = true) |
||||
|
@TableName("enterprise_pub_qrcode") |
||||
|
public class EnterprisePubQrcode extends BaseEntity { |
||||
|
|
||||
|
@Serial |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 主键ID |
||||
|
*/ |
||||
|
@TableId(value = "id") |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 企业名称 |
||||
|
*/ |
||||
|
private String enterpriseName; |
||||
|
|
||||
|
/** |
||||
|
* 企业纳税识别号 |
||||
|
*/ |
||||
|
private String enterpriseNumber; |
||||
|
|
||||
|
/** |
||||
|
* 归属区域名称 |
||||
|
*/ |
||||
|
private String areaName; |
||||
|
|
||||
|
/** |
||||
|
* 归属区域id |
||||
|
*/ |
||||
|
private String areaId; |
||||
|
|
||||
|
/** |
||||
|
* 归属街道名称 |
||||
|
*/ |
||||
|
private String streetName; |
||||
|
|
||||
|
/** |
||||
|
* 归属街道id |
||||
|
*/ |
||||
|
private String streetId; |
||||
|
|
||||
|
/** |
||||
|
* 匹配状态 |
||||
|
*/ |
||||
|
private String matchingStatus; |
||||
|
|
||||
|
/** |
||||
|
* 匹配消息 |
||||
|
*/ |
||||
|
private String matchingMessage; |
||||
|
|
||||
|
/** |
||||
|
* 下载情况 |
||||
|
*/ |
||||
|
private String downloadStatus; |
||||
|
|
||||
|
/** |
||||
|
* 上传单位名称 |
||||
|
*/ |
||||
|
private String deptName; |
||||
|
|
||||
|
/** |
||||
|
* 上传单位id |
||||
|
*/ |
||||
|
private String deptId; |
||||
|
|
||||
|
/** |
||||
|
* 上传用户名称 |
||||
|
*/ |
||||
|
private String userName; |
||||
|
|
||||
|
/** |
||||
|
* 上传用户id |
||||
|
*/ |
||||
|
private Long userId; |
||||
|
|
||||
|
/** |
||||
|
* 二维码存储路径 |
||||
|
*/ |
||||
|
private String qrCodePath; |
||||
|
|
||||
|
/** |
||||
|
* 上一次二维码生成时间 |
||||
|
*/ |
||||
|
private Date lastQrCodeTime; |
||||
|
|
||||
|
/** |
||||
|
* 导入序号 |
||||
|
*/ |
||||
|
private Long importRowNum; |
||||
|
|
||||
|
/** |
||||
|
* 导入文件名 |
||||
|
*/ |
||||
|
private String importFileName; |
||||
|
|
||||
|
/** |
||||
|
* 导入文件id |
||||
|
*/ |
||||
|
private String importFileId; |
||||
|
|
||||
|
/** |
||||
|
* 备注 |
||||
|
*/ |
||||
|
private String remark; |
||||
|
|
||||
|
/** |
||||
|
* 匹配到的目标类型 |
||||
|
*/ |
||||
|
private String matchingToType; |
||||
|
|
||||
|
/** |
||||
|
* 匹配到的目标id |
||||
|
*/ |
||||
|
private String matchingToId; |
||||
|
|
||||
|
/** |
||||
|
* 父级存在zoneid的部门id |
||||
|
*/ |
||||
|
private String zoneDeptId; |
||||
|
|
||||
|
/** |
||||
|
* 父级存在zoneid的部门名称 |
||||
|
*/ |
||||
|
private String zoneDeptName; |
||||
|
|
||||
|
/** |
||||
|
* 执法单位ID |
||||
|
*/ |
||||
|
private String bureauDeptId; |
||||
|
|
||||
|
/** |
||||
|
* 执法单位名称 |
||||
|
*/ |
||||
|
private String bureauDeptName; |
||||
|
|
||||
|
/** |
||||
|
* 市认证机构ID |
||||
|
*/ |
||||
|
private String organId; |
||||
|
|
||||
|
/** |
||||
|
* 市认证机构名称 |
||||
|
*/ |
||||
|
private String organName; |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,171 @@ |
|||||
|
package com.zdxt.enforcementcode.domain.bo; |
||||
|
|
||||
|
import com.zdxt.enforcementcode.domain.EnterprisePubQrcode; |
||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity; |
||||
|
import org.dromara.common.core.validate.AddGroup; |
||||
|
import org.dromara.common.core.validate.EditGroup; |
||||
|
import io.github.linpeilie.annotations.AutoMapper; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
import jakarta.validation.constraints.*; |
||||
|
import java.util.Date; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
|
||||
|
/** |
||||
|
* 送码入企信息业务对象 enterprise_pub_qrcode |
||||
|
* |
||||
|
* @author Lion Li |
||||
|
* @date 2026-06-01 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper = true) |
||||
|
@AutoMapper(target = EnterprisePubQrcode.class, reverseConvertGenerate = false) |
||||
|
public class EnterprisePubQrcodeBo extends BaseEntity { |
||||
|
|
||||
|
/** |
||||
|
* 主键ID |
||||
|
*/ |
||||
|
@NotBlank(message = "主键ID不能为空", groups = { EditGroup.class }) |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 企业名称 |
||||
|
*/ |
||||
|
private String enterpriseName; |
||||
|
|
||||
|
/** |
||||
|
* 企业纳税识别号 |
||||
|
*/ |
||||
|
private String enterpriseNumber; |
||||
|
|
||||
|
/** |
||||
|
* 归属区域名称 |
||||
|
*/ |
||||
|
private String areaName; |
||||
|
|
||||
|
/** |
||||
|
* 归属区域id |
||||
|
*/ |
||||
|
private String areaId; |
||||
|
|
||||
|
/** |
||||
|
* 归属街道名称 |
||||
|
*/ |
||||
|
private String streetName; |
||||
|
|
||||
|
/** |
||||
|
* 归属街道id |
||||
|
*/ |
||||
|
private String streetId; |
||||
|
|
||||
|
/** |
||||
|
* 匹配状态 |
||||
|
*/ |
||||
|
private String matchingStatus; |
||||
|
|
||||
|
/** |
||||
|
* 匹配消息 |
||||
|
*/ |
||||
|
private String matchingMessage; |
||||
|
|
||||
|
/** |
||||
|
* 下载情况 |
||||
|
*/ |
||||
|
private String downloadStatus; |
||||
|
|
||||
|
/** |
||||
|
* 上传单位名称 |
||||
|
*/ |
||||
|
private String deptName; |
||||
|
|
||||
|
/** |
||||
|
* 上传单位id |
||||
|
*/ |
||||
|
private String deptId; |
||||
|
|
||||
|
/** |
||||
|
* 上传用户名称 |
||||
|
*/ |
||||
|
private String userName; |
||||
|
|
||||
|
/** |
||||
|
* 上传用户id |
||||
|
*/ |
||||
|
private Long userId; |
||||
|
|
||||
|
/** |
||||
|
* 二维码存储路径 |
||||
|
*/ |
||||
|
private String qrCodePath; |
||||
|
|
||||
|
/** |
||||
|
* 上一次二维码生成时间 |
||||
|
*/ |
||||
|
private Date lastQrCodeTime; |
||||
|
|
||||
|
/** |
||||
|
* 导入序号 |
||||
|
*/ |
||||
|
private Long importRowNum; |
||||
|
|
||||
|
/** |
||||
|
* 导入文件名 |
||||
|
*/ |
||||
|
private String importFileName; |
||||
|
|
||||
|
/** |
||||
|
* 导入文件id |
||||
|
*/ |
||||
|
private String importFileId; |
||||
|
|
||||
|
/** |
||||
|
* 备注 |
||||
|
*/ |
||||
|
private String remark; |
||||
|
|
||||
|
/** |
||||
|
* 匹配到的目标类型 |
||||
|
*/ |
||||
|
private String matchingToType; |
||||
|
|
||||
|
/** |
||||
|
* 匹配到的目标id |
||||
|
*/ |
||||
|
private String matchingToId; |
||||
|
|
||||
|
/** |
||||
|
* 父级存在zoneid的部门id |
||||
|
*/ |
||||
|
private String zoneDeptId; |
||||
|
|
||||
|
/** |
||||
|
* 父级存在zoneid的部门名称 |
||||
|
*/ |
||||
|
private String zoneDeptName; |
||||
|
|
||||
|
/** |
||||
|
* 执法单位ID |
||||
|
*/ |
||||
|
@NotBlank(message = "执法单位ID不能为空", groups = { AddGroup.class, EditGroup.class }) |
||||
|
private String bureauDeptId; |
||||
|
|
||||
|
/** |
||||
|
* 执法单位名称 |
||||
|
*/ |
||||
|
@NotBlank(message = "执法单位名称不能为空", groups = { AddGroup.class, EditGroup.class }) |
||||
|
private String bureauDeptName; |
||||
|
|
||||
|
/** |
||||
|
* 市认证机构ID |
||||
|
*/ |
||||
|
@NotBlank(message = "市认证机构ID不能为空", groups = { AddGroup.class, EditGroup.class }) |
||||
|
private String organId; |
||||
|
|
||||
|
/** |
||||
|
* 市认证机构名称 |
||||
|
*/ |
||||
|
@NotBlank(message = "市认证机构名称不能为空", groups = { AddGroup.class, EditGroup.class }) |
||||
|
private String organName; |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,202 @@ |
|||||
|
package com.zdxt.enforcementcode.domain.vo; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import com.zdxt.enforcementcode.domain.EnterprisePubQrcode; |
||||
|
import cn.idev.excel.annotation.ExcelIgnoreUnannotated; |
||||
|
import cn.idev.excel.annotation.ExcelProperty; |
||||
|
import org.dromara.common.excel.annotation.ExcelDictFormat; |
||||
|
import org.dromara.common.excel.convert.ExcelDictConvert; |
||||
|
import io.github.linpeilie.annotations.AutoMapper; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serial; |
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 送码入企信息视图对象 enterprise_pub_qrcode |
||||
|
* |
||||
|
* @author Lion Li |
||||
|
* @date 2026-06-01 |
||||
|
*/ |
||||
|
@Data |
||||
|
@ExcelIgnoreUnannotated |
||||
|
@AutoMapper(target = EnterprisePubQrcode.class) |
||||
|
public class EnterprisePubQrcodeVo implements Serializable { |
||||
|
|
||||
|
@Serial |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 主键ID |
||||
|
*/ |
||||
|
@ExcelProperty(value = "主键ID") |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 企业名称 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "企业名称") |
||||
|
private String enterpriseName; |
||||
|
|
||||
|
/** |
||||
|
* 企业纳税识别号 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "企业纳税识别号") |
||||
|
private String enterpriseNumber; |
||||
|
|
||||
|
/** |
||||
|
* 归属区域名称 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "归属区域名称") |
||||
|
private String areaName; |
||||
|
|
||||
|
/** |
||||
|
* 归属区域id |
||||
|
*/ |
||||
|
@ExcelProperty(value = "归属区域id") |
||||
|
private String areaId; |
||||
|
|
||||
|
/** |
||||
|
* 归属街道名称 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "归属街道名称") |
||||
|
private String streetName; |
||||
|
|
||||
|
/** |
||||
|
* 归属街道id |
||||
|
*/ |
||||
|
@ExcelProperty(value = "归属街道id") |
||||
|
private String streetId; |
||||
|
|
||||
|
/** |
||||
|
* 匹配状态 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "匹配状态") |
||||
|
private String matchingStatus; |
||||
|
|
||||
|
/** |
||||
|
* 匹配消息 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "匹配消息") |
||||
|
private String matchingMessage; |
||||
|
|
||||
|
/** |
||||
|
* 下载情况 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "下载情况") |
||||
|
private String downloadStatus; |
||||
|
|
||||
|
/** |
||||
|
* 上传单位名称 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "上传单位名称") |
||||
|
private String deptName; |
||||
|
|
||||
|
/** |
||||
|
* 上传单位id |
||||
|
*/ |
||||
|
@ExcelProperty(value = "上传单位id") |
||||
|
private String deptId; |
||||
|
|
||||
|
/** |
||||
|
* 上传用户名称 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "上传用户名称") |
||||
|
private String userName; |
||||
|
|
||||
|
/** |
||||
|
* 上传用户id |
||||
|
*/ |
||||
|
@ExcelProperty(value = "上传用户id") |
||||
|
private Long userId; |
||||
|
|
||||
|
/** |
||||
|
* 二维码存储路径 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "二维码存储路径") |
||||
|
private String qrCodePath; |
||||
|
|
||||
|
/** |
||||
|
* 上一次二维码生成时间 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "上一次二维码生成时间") |
||||
|
private Date lastQrCodeTime; |
||||
|
|
||||
|
/** |
||||
|
* 导入序号 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "导入序号") |
||||
|
private Long importRowNum; |
||||
|
|
||||
|
/** |
||||
|
* 导入文件名 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "导入文件名") |
||||
|
private String importFileName; |
||||
|
|
||||
|
/** |
||||
|
* 导入文件id |
||||
|
*/ |
||||
|
@ExcelProperty(value = "导入文件id") |
||||
|
private String importFileId; |
||||
|
|
||||
|
/** |
||||
|
* 备注 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "备注") |
||||
|
private String remark; |
||||
|
|
||||
|
/** |
||||
|
* 匹配到的目标类型 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "匹配到的目标类型") |
||||
|
private String matchingToType; |
||||
|
|
||||
|
/** |
||||
|
* 匹配到的目标id |
||||
|
*/ |
||||
|
@ExcelProperty(value = "匹配到的目标id") |
||||
|
private String matchingToId; |
||||
|
|
||||
|
/** |
||||
|
* 父级存在zoneid的部门id |
||||
|
*/ |
||||
|
@ExcelProperty(value = "父级存在zoneid的部门id") |
||||
|
private String zoneDeptId; |
||||
|
|
||||
|
/** |
||||
|
* 父级存在zoneid的部门名称 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "父级存在zoneid的部门名称") |
||||
|
private String zoneDeptName; |
||||
|
|
||||
|
/** |
||||
|
* 执法单位ID |
||||
|
*/ |
||||
|
@ExcelProperty(value = "执法单位ID") |
||||
|
private String bureauDeptId; |
||||
|
|
||||
|
/** |
||||
|
* 执法单位名称 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "执法单位名称") |
||||
|
private String bureauDeptName; |
||||
|
|
||||
|
/** |
||||
|
* 市认证机构ID |
||||
|
*/ |
||||
|
@ExcelProperty(value = "市认证机构ID") |
||||
|
private String organId; |
||||
|
|
||||
|
/** |
||||
|
* 市认证机构名称 |
||||
|
*/ |
||||
|
@ExcelProperty(value = "市认证机构名称") |
||||
|
private String organName; |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,15 @@ |
|||||
|
package com.zdxt.enforcementcode.mapper; |
||||
|
|
||||
|
import com.zdxt.enforcementcode.domain.EnterprisePubQrcode; |
||||
|
import com.zdxt.enforcementcode.domain.vo.EnterprisePubQrcodeVo; |
||||
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; |
||||
|
|
||||
|
/** |
||||
|
* 送码入企信息Mapper接口 |
||||
|
* |
||||
|
* @author Lion Li |
||||
|
* @date 2026-06-01 |
||||
|
*/ |
||||
|
public interface EnterprisePubQrcodeMapper extends BaseMapperPlus<EnterprisePubQrcode, EnterprisePubQrcodeVo> { |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,68 @@ |
|||||
|
package com.zdxt.enforcementcode.service; |
||||
|
|
||||
|
import com.zdxt.enforcementcode.domain.vo.EnterprisePubQrcodeVo; |
||||
|
import com.zdxt.enforcementcode.domain.bo.EnterprisePubQrcodeBo; |
||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo; |
||||
|
import org.dromara.common.mybatis.core.page.PageQuery; |
||||
|
|
||||
|
import java.util.Collection; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 送码入企信息Service接口 |
||||
|
* |
||||
|
* @author Lion Li |
||||
|
* @date 2026-06-01 |
||||
|
*/ |
||||
|
public interface IEnterprisePubQrcodeService { |
||||
|
|
||||
|
/** |
||||
|
* 查询送码入企信息 |
||||
|
* |
||||
|
* @param id 主键 |
||||
|
* @return 送码入企信息 |
||||
|
*/ |
||||
|
EnterprisePubQrcodeVo queryById(String id); |
||||
|
|
||||
|
/** |
||||
|
* 分页查询送码入企信息列表 |
||||
|
* |
||||
|
* @param bo 查询条件 |
||||
|
* @param pageQuery 分页参数 |
||||
|
* @return 送码入企信息分页列表 |
||||
|
*/ |
||||
|
TableDataInfo<EnterprisePubQrcodeVo> queryPageList(EnterprisePubQrcodeBo bo, PageQuery pageQuery); |
||||
|
|
||||
|
/** |
||||
|
* 查询符合条件的送码入企信息列表 |
||||
|
* |
||||
|
* @param bo 查询条件 |
||||
|
* @return 送码入企信息列表 |
||||
|
*/ |
||||
|
List<EnterprisePubQrcodeVo> queryList(EnterprisePubQrcodeBo bo); |
||||
|
|
||||
|
/** |
||||
|
* 新增送码入企信息 |
||||
|
* |
||||
|
* @param bo 送码入企信息 |
||||
|
* @return 是否新增成功 |
||||
|
*/ |
||||
|
Boolean insertByBo(EnterprisePubQrcodeBo bo); |
||||
|
|
||||
|
/** |
||||
|
* 修改送码入企信息 |
||||
|
* |
||||
|
* @param bo 送码入企信息 |
||||
|
* @return 是否修改成功 |
||||
|
*/ |
||||
|
Boolean updateByBo(EnterprisePubQrcodeBo bo); |
||||
|
|
||||
|
/** |
||||
|
* 校验并批量删除送码入企信息信息 |
||||
|
* |
||||
|
* @param ids 待删除的主键集合 |
||||
|
* @param isValid 是否进行有效性校验 |
||||
|
* @return 是否删除成功 |
||||
|
*/ |
||||
|
Boolean deleteWithValidByIds(Collection<String> ids, Boolean isValid); |
||||
|
} |
||||
@ -0,0 +1,157 @@ |
|||||
|
package com.zdxt.enforcementcode.service.impl; |
||||
|
|
||||
|
import org.dromara.common.core.utils.MapstructUtils; |
||||
|
import org.dromara.common.core.utils.StringUtils; |
||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo; |
||||
|
import org.dromara.common.mybatis.core.page.PageQuery; |
||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
||||
|
import lombok.RequiredArgsConstructor; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import com.zdxt.enforcementcode.domain.bo.EnterprisePubQrcodeBo; |
||||
|
import com.zdxt.enforcementcode.domain.vo.EnterprisePubQrcodeVo; |
||||
|
import com.zdxt.enforcementcode.domain.EnterprisePubQrcode; |
||||
|
import com.zdxt.enforcementcode.mapper.EnterprisePubQrcodeMapper; |
||||
|
import com.zdxt.enforcementcode.service.IEnterprisePubQrcodeService; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
import java.util.Collection; |
||||
|
|
||||
|
/** |
||||
|
* 送码入企信息Service业务层处理 |
||||
|
* |
||||
|
* @author Lion Li |
||||
|
* @date 2026-06-01 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@RequiredArgsConstructor |
||||
|
@Service |
||||
|
public class EnterprisePubQrcodeServiceImpl implements IEnterprisePubQrcodeService { |
||||
|
|
||||
|
private final EnterprisePubQrcodeMapper baseMapper; |
||||
|
|
||||
|
/** |
||||
|
* 查询送码入企信息 |
||||
|
* |
||||
|
* @param id 主键 |
||||
|
* @return 送码入企信息 |
||||
|
*/ |
||||
|
@Override |
||||
|
public EnterprisePubQrcodeVo queryById(String id){ |
||||
|
return baseMapper.selectVoById(id); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 分页查询送码入企信息列表 |
||||
|
* |
||||
|
* @param bo 查询条件 |
||||
|
* @param pageQuery 分页参数 |
||||
|
* @return 送码入企信息分页列表 |
||||
|
*/ |
||||
|
@Override |
||||
|
public TableDataInfo<EnterprisePubQrcodeVo> queryPageList(EnterprisePubQrcodeBo bo, PageQuery pageQuery) { |
||||
|
LambdaQueryWrapper<EnterprisePubQrcode> lqw = buildQueryWrapper(bo); |
||||
|
Page<EnterprisePubQrcodeVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw); |
||||
|
return TableDataInfo.build(result); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 查询符合条件的送码入企信息列表 |
||||
|
* |
||||
|
* @param bo 查询条件 |
||||
|
* @return 送码入企信息列表 |
||||
|
*/ |
||||
|
@Override |
||||
|
public List<EnterprisePubQrcodeVo> queryList(EnterprisePubQrcodeBo bo) { |
||||
|
LambdaQueryWrapper<EnterprisePubQrcode> lqw = buildQueryWrapper(bo); |
||||
|
return baseMapper.selectVoList(lqw); |
||||
|
} |
||||
|
|
||||
|
private LambdaQueryWrapper<EnterprisePubQrcode> buildQueryWrapper(EnterprisePubQrcodeBo bo) { |
||||
|
Map<String, Object> params = bo.getParams(); |
||||
|
LambdaQueryWrapper<EnterprisePubQrcode> lqw = Wrappers.lambdaQuery(); |
||||
|
lqw.orderByAsc(EnterprisePubQrcode::getId); |
||||
|
lqw.like(StringUtils.isNotBlank(bo.getEnterpriseName()), EnterprisePubQrcode::getEnterpriseName, bo.getEnterpriseName()); |
||||
|
lqw.eq(StringUtils.isNotBlank(bo.getEnterpriseNumber()), EnterprisePubQrcode::getEnterpriseNumber, bo.getEnterpriseNumber()); |
||||
|
lqw.like(StringUtils.isNotBlank(bo.getAreaName()), EnterprisePubQrcode::getAreaName, bo.getAreaName()); |
||||
|
lqw.eq(StringUtils.isNotBlank(bo.getAreaId()), EnterprisePubQrcode::getAreaId, bo.getAreaId()); |
||||
|
lqw.like(StringUtils.isNotBlank(bo.getStreetName()), EnterprisePubQrcode::getStreetName, bo.getStreetName()); |
||||
|
lqw.eq(StringUtils.isNotBlank(bo.getStreetId()), EnterprisePubQrcode::getStreetId, bo.getStreetId()); |
||||
|
lqw.eq(StringUtils.isNotBlank(bo.getMatchingStatus()), EnterprisePubQrcode::getMatchingStatus, bo.getMatchingStatus()); |
||||
|
lqw.eq(StringUtils.isNotBlank(bo.getMatchingMessage()), EnterprisePubQrcode::getMatchingMessage, bo.getMatchingMessage()); |
||||
|
lqw.eq(StringUtils.isNotBlank(bo.getDownloadStatus()), EnterprisePubQrcode::getDownloadStatus, bo.getDownloadStatus()); |
||||
|
lqw.like(StringUtils.isNotBlank(bo.getDeptName()), EnterprisePubQrcode::getDeptName, bo.getDeptName()); |
||||
|
lqw.eq(StringUtils.isNotBlank(bo.getDeptId()), EnterprisePubQrcode::getDeptId, bo.getDeptId()); |
||||
|
lqw.like(StringUtils.isNotBlank(bo.getUserName()), EnterprisePubQrcode::getUserName, bo.getUserName()); |
||||
|
lqw.eq(bo.getUserId() != null, EnterprisePubQrcode::getUserId, bo.getUserId()); |
||||
|
lqw.eq(StringUtils.isNotBlank(bo.getQrCodePath()), EnterprisePubQrcode::getQrCodePath, bo.getQrCodePath()); |
||||
|
lqw.eq(bo.getLastQrCodeTime() != null, EnterprisePubQrcode::getLastQrCodeTime, bo.getLastQrCodeTime()); |
||||
|
lqw.eq(bo.getImportRowNum() != null, EnterprisePubQrcode::getImportRowNum, bo.getImportRowNum()); |
||||
|
lqw.like(StringUtils.isNotBlank(bo.getImportFileName()), EnterprisePubQrcode::getImportFileName, bo.getImportFileName()); |
||||
|
lqw.eq(StringUtils.isNotBlank(bo.getImportFileId()), EnterprisePubQrcode::getImportFileId, bo.getImportFileId()); |
||||
|
lqw.eq(StringUtils.isNotBlank(bo.getMatchingToType()), EnterprisePubQrcode::getMatchingToType, bo.getMatchingToType()); |
||||
|
lqw.eq(StringUtils.isNotBlank(bo.getMatchingToId()), EnterprisePubQrcode::getMatchingToId, bo.getMatchingToId()); |
||||
|
lqw.eq(StringUtils.isNotBlank(bo.getZoneDeptId()), EnterprisePubQrcode::getZoneDeptId, bo.getZoneDeptId()); |
||||
|
lqw.like(StringUtils.isNotBlank(bo.getZoneDeptName()), EnterprisePubQrcode::getZoneDeptName, bo.getZoneDeptName()); |
||||
|
lqw.eq(StringUtils.isNotBlank(bo.getBureauDeptId()), EnterprisePubQrcode::getBureauDeptId, bo.getBureauDeptId()); |
||||
|
lqw.like(StringUtils.isNotBlank(bo.getBureauDeptName()), EnterprisePubQrcode::getBureauDeptName, bo.getBureauDeptName()); |
||||
|
lqw.eq(StringUtils.isNotBlank(bo.getOrganId()), EnterprisePubQrcode::getOrganId, bo.getOrganId()); |
||||
|
lqw.like(StringUtils.isNotBlank(bo.getOrganName()), EnterprisePubQrcode::getOrganName, bo.getOrganName()); |
||||
|
return lqw; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增送码入企信息 |
||||
|
* |
||||
|
* @param bo 送码入企信息 |
||||
|
* @return 是否新增成功 |
||||
|
*/ |
||||
|
@Override |
||||
|
public Boolean insertByBo(EnterprisePubQrcodeBo bo) { |
||||
|
EnterprisePubQrcode add = MapstructUtils.convert(bo, EnterprisePubQrcode.class); |
||||
|
validEntityBeforeSave(add); |
||||
|
boolean flag = baseMapper.insert(add) > 0; |
||||
|
if (flag) { |
||||
|
bo.setId(add.getId()); |
||||
|
} |
||||
|
return flag; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改送码入企信息 |
||||
|
* |
||||
|
* @param bo 送码入企信息 |
||||
|
* @return 是否修改成功 |
||||
|
*/ |
||||
|
@Override |
||||
|
public Boolean updateByBo(EnterprisePubQrcodeBo bo) { |
||||
|
EnterprisePubQrcode update = MapstructUtils.convert(bo, EnterprisePubQrcode.class); |
||||
|
validEntityBeforeSave(update); |
||||
|
return baseMapper.updateById(update) > 0; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 保存前的数据校验 |
||||
|
*/ |
||||
|
private void validEntityBeforeSave(EnterprisePubQrcode entity){ |
||||
|
//TODO 做一些数据校验,如唯一约束
|
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 校验并批量删除送码入企信息信息 |
||||
|
* |
||||
|
* @param ids 待删除的主键集合 |
||||
|
* @param isValid 是否进行有效性校验 |
||||
|
* @return 是否删除成功 |
||||
|
*/ |
||||
|
@Override |
||||
|
public Boolean deleteWithValidByIds(Collection<String> ids, Boolean isValid) { |
||||
|
if(isValid){ |
||||
|
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
|
} |
||||
|
return baseMapper.deleteByIds(ids) > 0; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,6 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<!DOCTYPE mapper |
||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.zdxt.enforcementcode.mapper.EnterprisePubQrcodeMapper"> |
||||
|
</mapper> |
||||
@ -0,0 +1,11 @@ |
|||||
|
<script setup lang="ts"> |
||||
|
|
||||
|
</script> |
||||
|
|
||||
|
<template> |
||||
|
|
||||
|
</template> |
||||
|
|
||||
|
<style scoped lang="less"> |
||||
|
|
||||
|
</style> |
||||
@ -0,0 +1,11 @@ |
|||||
|
<script setup lang="ts"> |
||||
|
|
||||
|
</script> |
||||
|
|
||||
|
<template> |
||||
|
|
||||
|
</template> |
||||
|
|
||||
|
<style scoped lang="less"> |
||||
|
|
||||
|
</style> |
||||
Loading…
Reference in new issue