15 changed files with 1764 additions and 0 deletions
@ -0,0 +1,55 @@ |
|||
package com.zdxt.enforcementcode.controller.app.enterprise; |
|||
|
|||
import com.zdxt.enforcementcode.domain.dto.enterprise.AppEnterpriseComplatintInsertDTO; |
|||
import com.zdxt.enforcementcode.domain.dto.enterprise.AppEnterpriseComplatintQueryDTO; |
|||
import com.zdxt.enforcementcode.domain.vo.enterprise.AppEnterpriseComplaintVo; |
|||
import com.zdxt.enforcementcode.service.enterprise.IAppEnterpriseComplaintService; |
|||
import io.swagger.v3.oas.annotations.responses.ApiResponse; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import lombok.RequiredArgsConstructor; |
|||
import org.dromara.common.core.domain.R; |
|||
import org.dromara.common.mybatis.core.page.PageQuery; |
|||
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|||
import org.dromara.common.web.core.BaseController; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
/** |
|||
* 企业端-投诉建议 |
|||
*/ |
|||
@Tag(name = "企业端-投诉建议") |
|||
@Validated |
|||
@RequiredArgsConstructor |
|||
@RestController |
|||
@RequestMapping("/app-ent/complaint") |
|||
public class AppEnterpriseComplaintController extends BaseController { |
|||
|
|||
@Autowired |
|||
private IAppEnterpriseComplaintService enterpriseComplaintService; |
|||
|
|||
/** |
|||
* 企业端-投诉建议-新增 |
|||
* @param |
|||
* @return |
|||
*/ |
|||
@ApiResponse(description = "新增投诉建议") |
|||
@PostMapping("/add") |
|||
@ResponseBody |
|||
public R<Void> addSave(@RequestBody AppEnterpriseComplatintInsertDTO dto) { |
|||
return toAjax(enterpriseComplaintService.insertEnterpriseComplaint(dto)); |
|||
|
|||
} |
|||
|
|||
/** |
|||
* 企业端-投诉建议-列表 |
|||
* @param |
|||
* @return |
|||
*/ |
|||
@ApiResponse(description = "投诉建议列表") |
|||
@GetMapping("/list") |
|||
public TableDataInfo<AppEnterpriseComplaintVo> list(AppEnterpriseComplatintQueryDTO dto, PageQuery pageQuery) { |
|||
TableDataInfo<AppEnterpriseComplaintVo> list = enterpriseComplaintService.queryPageList(dto, pageQuery); |
|||
return list; |
|||
} |
|||
} |
|||
@ -0,0 +1,151 @@ |
|||
package com.zdxt.enforcementcode.domain.bo.enterprise; |
|||
|
|||
import com.zdxt.enforcementcode.domain.EnterpriseComplaint; |
|||
import io.github.linpeilie.annotations.AutoMapper; |
|||
import jakarta.validation.constraints.NotBlank; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import org.dromara.common.core.validate.EditGroup; |
|||
import org.dromara.common.mybatis.core.domain.BaseEntity; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 企业执法-在线投诉业务对象 enterprise_complaint |
|||
* |
|||
* @author Lion Li |
|||
* @date 2026-04-13 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@AutoMapper(target = EnterpriseComplaint.class, reverseConvertGenerate = false) |
|||
public class AppEnterpriseComplaintBo extends BaseEntity { |
|||
|
|||
/** |
|||
* 主键ID |
|||
*/ |
|||
@NotBlank(message = "主键ID不能为空", groups = { EditGroup.class }) |
|||
private String id; |
|||
|
|||
/** |
|||
* 关联执法记录ID |
|||
*/ |
|||
private String relId; |
|||
|
|||
/** |
|||
* 执法类型 |
|||
*/ |
|||
private Long enforceType; |
|||
|
|||
/** |
|||
* 问题描述 |
|||
*/ |
|||
private String problemDescription; |
|||
|
|||
/** |
|||
* 联系人 |
|||
*/ |
|||
private String linkman; |
|||
|
|||
/** |
|||
* 联系方式 |
|||
*/ |
|||
private String linkmanTel; |
|||
|
|||
/** |
|||
* 是否删除 0 否 1 是 |
|||
*/ |
|||
private Long isDelete; |
|||
|
|||
/** |
|||
* 投诉对接12345案件类型 |
|||
*/ |
|||
private String caseType; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private Long authorization; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private Long comOrOpi; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String enterpriseAddress; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String proWoCode; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private Long status; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private Date evaluateTime; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String enterpriseNumber; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String enterpriseName; |
|||
|
|||
/** |
|||
* 执法部门多个-逗号隔开 |
|||
*/ |
|||
private String complaintDepartments; |
|||
|
|||
/** |
|||
* 执法部门id多个-逗号隔开 |
|||
*/ |
|||
private String complaintDepartmentIds; |
|||
|
|||
/** |
|||
* 执法时间 |
|||
*/ |
|||
private Date enforcementTime; |
|||
|
|||
/** |
|||
* 投诉类型 0 系默认 1 联合检查 |
|||
*/ |
|||
private Long complaintType; |
|||
|
|||
/** |
|||
* 投诉事项编码,多个逗号隔开 |
|||
*/ |
|||
private String complaintItemCodes; |
|||
|
|||
/** |
|||
* 投诉事项名称,多个逗号隔开 |
|||
*/ |
|||
private String complaintItemNames; |
|||
|
|||
/** |
|||
* 同步过来的处理时间 |
|||
*/ |
|||
private String handleTime; |
|||
|
|||
/** |
|||
* 投诉事项(对应记录表执法/入企事项) |
|||
*/ |
|||
private String complaintRecordItem; |
|||
|
|||
/** |
|||
* 数据类型 0行政 1 非行政 |
|||
*/ |
|||
private Long recordType; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,48 @@ |
|||
package com.zdxt.enforcementcode.domain.commonenum; |
|||
|
|||
public enum AppEnterpriseComplaintEnums { |
|||
|
|||
|
|||
// 行政:0
|
|||
ADMINISTRATION(0,"行政"), |
|||
//非行政:1
|
|||
NON_ADMINISTRATIVE(1,"非行政"), |
|||
|
|||
IS_COMPLAINT(1,"已投诉"), |
|||
|
|||
JPG(0,"JPG"); |
|||
|
|||
private Integer key; |
|||
private String value; |
|||
|
|||
AppEnterpriseComplaintEnums(Integer key, String value) { |
|||
this.value = value; |
|||
this.key = key; |
|||
} |
|||
|
|||
public String getValue() { |
|||
return value; |
|||
} |
|||
|
|||
public Integer getKey() { |
|||
return key; |
|||
} |
|||
|
|||
/** |
|||
* 根据value获取description |
|||
* @description |
|||
* |
|||
* @createDate 2017年11月28日 |
|||
* @param key |
|||
* @return |
|||
*/ |
|||
public static String getValueByKey(String key) { |
|||
DeleteStatusEnum[] enums = DeleteStatusEnum.values(); |
|||
for (int i = 0; i < enums.length; i++) { |
|||
if (enums[i].getKey().equals(key)) { |
|||
return enums[i].getValue(); |
|||
} |
|||
} |
|||
return ""; |
|||
} |
|||
} |
|||
@ -0,0 +1,154 @@ |
|||
package com.zdxt.enforcementcode.domain.dto.enterprise; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableField; |
|||
import com.zdxt.enforcementcode.domain.entity.enterprise.AppEnterpriseComplaint; |
|||
import io.github.linpeilie.annotations.AutoMapper; |
|||
import jakarta.validation.constraints.NotBlank; |
|||
import lombok.Data; |
|||
import org.dromara.common.core.validate.EditGroup; |
|||
|
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
@Data |
|||
@AutoMapper(target = AppEnterpriseComplaint.class) |
|||
public class AppEnterpriseComplatintInsertDTO { |
|||
|
|||
/** |
|||
* 主键ID |
|||
*/ |
|||
@NotBlank(message = "主键ID不能为空", groups = { EditGroup.class }) |
|||
private String id; |
|||
|
|||
/** |
|||
* 关联执法记录ID |
|||
*/ |
|||
private String relId; |
|||
|
|||
/** |
|||
* 执法类型 |
|||
*/ |
|||
private Long enforceType; |
|||
|
|||
/** |
|||
* 问题描述 |
|||
*/ |
|||
private String problemDescription; |
|||
|
|||
/** |
|||
* 联系人 |
|||
*/ |
|||
private String linkman; |
|||
|
|||
/** |
|||
* 联系方式 |
|||
*/ |
|||
private String linkmanTel; |
|||
|
|||
/** |
|||
* 是否删除 0 否 1 是 |
|||
*/ |
|||
private Long isDelete; |
|||
|
|||
/** |
|||
* 投诉对接12345案件类型 |
|||
*/ |
|||
private String caseType; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private Long authorization; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private Long comOrOpi; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String enterpriseAddress; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String proWoCode; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private Long status; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private Date evaluateTime; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String enterpriseNumber; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String enterpriseName; |
|||
|
|||
/** |
|||
* 执法部门多个-逗号隔开 |
|||
*/ |
|||
private String complaintDepartments; |
|||
|
|||
/** |
|||
* 执法部门id多个-逗号隔开 |
|||
*/ |
|||
private String complaintDepartmentIds; |
|||
|
|||
/** |
|||
* 执法时间 |
|||
*/ |
|||
private Date enforcementTime; |
|||
|
|||
/** |
|||
* 投诉类型 0 系默认 1 联合检查 |
|||
*/ |
|||
private Long complaintType; |
|||
|
|||
/** |
|||
* 投诉事项编码,多个逗号隔开 |
|||
*/ |
|||
private String complaintItemCodes; |
|||
|
|||
/** |
|||
* 投诉事项名称,多个逗号隔开 |
|||
*/ |
|||
private String complaintItemNames; |
|||
|
|||
/** |
|||
* 同步过来的处理时间 |
|||
*/ |
|||
private String handleTime; |
|||
|
|||
/** |
|||
* 投诉事项(对应记录表执法/入企事项) |
|||
*/ |
|||
private String complaintRecordItem; |
|||
|
|||
/** |
|||
* 数据类型 0行政 1 非行政 |
|||
*/ |
|||
private Integer recordType; |
|||
|
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createTime; |
|||
|
|||
/** |
|||
* 文件列表- |
|||
*/ |
|||
@TableField(exist = false) |
|||
private List<String> fileList; |
|||
} |
|||
@ -0,0 +1,156 @@ |
|||
package com.zdxt.enforcementcode.domain.dto.enterprise; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableField; |
|||
import com.zdxt.enforcementcode.domain.entity.enterprise.AppEnterpriseComplaint; |
|||
import io.github.linpeilie.annotations.AutoMapper; |
|||
import jakarta.validation.constraints.NotBlank; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import org.dromara.common.core.validate.EditGroup; |
|||
import org.dromara.common.mybatis.core.domain.BaseEntity; |
|||
|
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@AutoMapper(target = AppEnterpriseComplaint.class) |
|||
public class AppEnterpriseComplatintQueryDTO extends BaseEntity { |
|||
/** |
|||
* 主键ID |
|||
*/ |
|||
@NotBlank(message = "主键ID不能为空", groups = { EditGroup.class }) |
|||
private String id; |
|||
|
|||
/** |
|||
* 关联执法记录ID |
|||
*/ |
|||
private String relId; |
|||
|
|||
/** |
|||
* 执法类型 |
|||
*/ |
|||
private Long enforceType; |
|||
|
|||
/** |
|||
* 问题描述 |
|||
*/ |
|||
private String problemDescription; |
|||
|
|||
/** |
|||
* 联系人 |
|||
*/ |
|||
private String linkman; |
|||
|
|||
/** |
|||
* 联系方式 |
|||
*/ |
|||
private String linkmanTel; |
|||
|
|||
/** |
|||
* 是否删除 0 否 1 是 |
|||
*/ |
|||
private Long isDelete; |
|||
|
|||
/** |
|||
* 投诉对接12345案件类型 |
|||
*/ |
|||
private String caseType; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private Long authorization; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private Long comOrOpi; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String enterpriseAddress; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String proWoCode; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private Long status; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private Date evaluateTime; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String enterpriseNumber; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String enterpriseName; |
|||
|
|||
/** |
|||
* 执法部门多个-逗号隔开 |
|||
*/ |
|||
private String complaintDepartments; |
|||
|
|||
/** |
|||
* 执法部门id多个-逗号隔开 |
|||
*/ |
|||
private String complaintDepartmentIds; |
|||
|
|||
/** |
|||
* 执法时间 |
|||
*/ |
|||
private Date enforcementTime; |
|||
|
|||
/** |
|||
* 投诉类型 0 系默认 1 联合检查 |
|||
*/ |
|||
private Long complaintType; |
|||
|
|||
/** |
|||
* 投诉事项编码,多个逗号隔开 |
|||
*/ |
|||
private String complaintItemCodes; |
|||
|
|||
/** |
|||
* 投诉事项名称,多个逗号隔开 |
|||
*/ |
|||
private String complaintItemNames; |
|||
|
|||
/** |
|||
* 同步过来的处理时间 |
|||
*/ |
|||
private String handleTime; |
|||
|
|||
/** |
|||
* 投诉事项(对应记录表执法/入企事项) |
|||
*/ |
|||
private String complaintRecordItem; |
|||
|
|||
/** |
|||
* 数据类型 0行政 1 非行政 |
|||
*/ |
|||
private Integer recordType; |
|||
|
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createTime; |
|||
|
|||
/** |
|||
* 文件列表- |
|||
*/ |
|||
@TableField(exist = false) |
|||
private List<String> fileList; |
|||
} |
|||
@ -0,0 +1,354 @@ |
|||
package com.zdxt.enforcementcode.domain.vo.enterprise; |
|||
|
|||
import cn.idev.excel.annotation.ExcelProperty; |
|||
import lombok.Data; |
|||
import org.dromara.common.excel.annotation.ExcelDictFormat; |
|||
import org.dromara.common.excel.convert.ExcelDictConvert; |
|||
|
|||
import java.io.Serial; |
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 企业端-执法登记记录 |
|||
*/ |
|||
@Data |
|||
public class AppEnforcementRegistrationVo implements Serializable { |
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键ID |
|||
*/ |
|||
@ExcelProperty(value = "主键ID") |
|||
private String id; |
|||
|
|||
/** |
|||
* 执法部门 |
|||
*/ |
|||
@ExcelProperty(value = "执法部门") |
|||
private String lawEnforcement; |
|||
|
|||
/** |
|||
* 执法部门ID |
|||
*/ |
|||
@ExcelProperty(value = "执法部门ID") |
|||
private String lawEnforcementId; |
|||
|
|||
/** |
|||
* 被执法企业ID |
|||
*/ |
|||
@ExcelProperty(value = "被执法企业ID") |
|||
private String enterpriseId; |
|||
|
|||
/** |
|||
* 被执法企业 |
|||
*/ |
|||
@ExcelProperty(value = "被执法企业") |
|||
private String enterpriseName; |
|||
|
|||
/** |
|||
* 被执法企业税号 |
|||
*/ |
|||
@ExcelProperty(value = "被执法企业税号") |
|||
private String enterpriseNumber; |
|||
|
|||
/** |
|||
* 执法时间 |
|||
*/ |
|||
@ExcelProperty(value = "执法时间") |
|||
private Date enforcementTime; |
|||
|
|||
/** |
|||
* 执法人员姓名 |
|||
*/ |
|||
@ExcelProperty(value = "执法人员姓名") |
|||
private String lawEnforcer; |
|||
|
|||
/** |
|||
* 执法人员ID |
|||
*/ |
|||
@ExcelProperty(value = "执法人员ID") |
|||
private String lawEnforcerId; |
|||
|
|||
/** |
|||
* 执法人员联系方式 |
|||
*/ |
|||
@ExcelProperty(value = "执法人员联系方式") |
|||
private String lawEnforcerTel; |
|||
|
|||
/** |
|||
* 其他执法人员 |
|||
*/ |
|||
@ExcelProperty(value = "其他执法人员") |
|||
private String lawEnforcerTwo; |
|||
|
|||
/** |
|||
* 其他执法人员ID |
|||
*/ |
|||
@ExcelProperty(value = "其他执法人员ID") |
|||
private String lawEnforcerIdTwo; |
|||
|
|||
/** |
|||
* 执法人员联系方式 |
|||
*/ |
|||
@ExcelProperty(value = "执法人员联系方式") |
|||
private String lawEnforcerTelTwo; |
|||
|
|||
/** |
|||
* 辅助人员姓名 |
|||
*/ |
|||
@ExcelProperty(value = "辅助人员姓名") |
|||
private String subsidiaryer; |
|||
|
|||
/** |
|||
* 辅助人员id |
|||
*/ |
|||
@ExcelProperty(value = "辅助人员id") |
|||
private String subsidiaryerId; |
|||
|
|||
/** |
|||
* 辅助人员联系方式 |
|||
*/ |
|||
@ExcelProperty(value = "辅助人员联系方式") |
|||
private String subsidiaryerTel; |
|||
|
|||
/** |
|||
* 执法事项 |
|||
*/ |
|||
@ExcelProperty(value = "执法事项") |
|||
private String lawEnforcementItem; |
|||
|
|||
/** |
|||
* 执法依据 |
|||
*/ |
|||
@ExcelProperty(value = "执法依据") |
|||
private String lawEnforcementBasis; |
|||
|
|||
/** |
|||
* 备注 |
|||
*/ |
|||
@ExcelProperty(value = "备注") |
|||
private String remark; |
|||
|
|||
/** |
|||
* 执法结果 0 合格 1 不合格 |
|||
*/ |
|||
@ExcelProperty(value = "执法结果 0 合格 1 不合格") |
|||
private Long reslut; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
@ExcelProperty(value = "") |
|||
private String userId; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
@ExcelProperty(value = "") |
|||
private String deptId; |
|||
|
|||
/** |
|||
* 是否删除 0 否 1 是 |
|||
*/ |
|||
@ExcelProperty(value = "是否删除 0 否 1 是") |
|||
private Long isDelete; |
|||
|
|||
/** |
|||
* 数据状态 0 正常 1 取消 |
|||
*/ |
|||
@ExcelProperty(value = "数据状态 0 正常 1 取消") |
|||
private Long status; |
|||
|
|||
/** |
|||
* 登记编号 |
|||
*/ |
|||
@ExcelProperty(value = "登记编号") |
|||
private String lawEnforcementCode; |
|||
|
|||
/** |
|||
* 是否投诉 0 否 1 是 |
|||
*/ |
|||
@ExcelProperty(value = "是否投诉 0 否 1 是") |
|||
private Integer isComplaint; |
|||
|
|||
/** |
|||
* 数据保存或提交 0 保存 1提交 |
|||
*/ |
|||
@ExcelProperty(value = "数据保存或提交 0 保存 1提交") |
|||
private Long isSubmit; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
@ExcelProperty(value = "") |
|||
private String enforce; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
@ExcelProperty(value = "") |
|||
private String uniteCheck; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
@ExcelProperty(value = "") |
|||
private String lawEnforcementItemText; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
@ExcelProperty(value = "") |
|||
private String lawField; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
@ExcelProperty(value = "") |
|||
private String checkCategory; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
@ExcelProperty(value = "") |
|||
private String checkCss; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
@ExcelProperty(value = "") |
|||
private String enforceReason; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
@ExcelProperty(value = "") |
|||
private String bureauDeptId; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
@ExcelProperty(value = "") |
|||
private String bureauDeptName; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
@ExcelProperty(value = "") |
|||
private String lawEnforcementBasisText; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
@ExcelProperty(value = "") |
|||
private Long isEvaluate; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
@ExcelProperty(value = "") |
|||
private String lawId; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
@ExcelProperty(value = "") |
|||
private String lawText; |
|||
|
|||
/** |
|||
* 是否是联合检查 需要=1 and union_no不为空才是联合检查 |
|||
*/ |
|||
@ExcelProperty(value = "是否是联合检查 需要=1 and union_no不为空才是联合检查") |
|||
private Long hasUnion; |
|||
|
|||
/** |
|||
* 是否委托执法 |
|||
*/ |
|||
@ExcelProperty(value = "是否委托执法") |
|||
private Long hasAuto; |
|||
|
|||
/** |
|||
* 联合执法的分组编号 |
|||
*/ |
|||
@ExcelProperty(value = "联合执法的分组编号") |
|||
private String unionNo; |
|||
|
|||
/** |
|||
* 执法类别(新) |
|||
*/ |
|||
@ExcelProperty(value = "执法类别", converter = ExcelDictConvert.class) |
|||
@ExcelDictFormat(readConverterExp = "新=") |
|||
private String lawEnforceCategory; |
|||
|
|||
/** |
|||
* 委托执法部门id |
|||
*/ |
|||
@ExcelProperty(value = "委托执法部门id") |
|||
private String entrustDeptId; |
|||
|
|||
/** |
|||
* 委托执法部门名称 |
|||
*/ |
|||
@ExcelProperty(value = "委托执法部门名称") |
|||
private String entrustDeptName; |
|||
|
|||
/** |
|||
* 企业注册地址 |
|||
*/ |
|||
@ExcelProperty(value = "企业注册地址") |
|||
private String enterpriseAddress; |
|||
|
|||
/** |
|||
* 企业注册区 |
|||
*/ |
|||
@ExcelProperty(value = "企业注册区") |
|||
private String district; |
|||
|
|||
/** |
|||
* 企业注册街道 |
|||
*/ |
|||
@ExcelProperty(value = "企业注册街道") |
|||
private String street; |
|||
|
|||
/** |
|||
* 1:市直登记, 3:区直登记 |
|||
*/ |
|||
@ExcelProperty(value = "1:市直登记, 3:区直登记") |
|||
private Long zone; |
|||
|
|||
/** |
|||
* 是否真联合执法(0:未联合; 1:已经联合) |
|||
*/ |
|||
@ExcelProperty(value = "是否真联合执法(0:未联合; 1:已经联合)") |
|||
private Long isRealUnion; |
|||
|
|||
// ======== 以下为显示用扩展字段(非数据库字段)========
|
|||
|
|||
/** |
|||
* 执法类别文本(字典翻译) |
|||
*/ |
|||
private String lawEnforceCategoryText; |
|||
|
|||
/** |
|||
* 是否投诉标记: 0=否, 1=是 |
|||
*/ |
|||
private Integer comOrOpi; |
|||
|
|||
/** |
|||
* 距今天数(执法时间到今天的天数差) |
|||
*/ |
|||
private Long outTimeDayNum; |
|||
|
|||
/** |
|||
* 执法人员1展示文本(姓名+执法证号) |
|||
*/ |
|||
private String lawEnforcerDisplay; |
|||
|
|||
/** |
|||
* 其他执法人员展示列表(姓名+执法证号) |
|||
*/ |
|||
private List<String> lawEnforcer2List; |
|||
} |
|||
@ -0,0 +1,170 @@ |
|||
package com.zdxt.enforcementcode.domain.vo.enterprise; |
|||
|
|||
import cn.idev.excel.annotation.ExcelProperty; |
|||
import lombok.Data; |
|||
import org.dromara.common.excel.annotation.ExcelDictFormat; |
|||
import org.dromara.common.excel.convert.ExcelDictConvert; |
|||
|
|||
import java.io.Serial; |
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
/** |
|||
* 企业端-在线投诉 |
|||
*/ |
|||
@Data |
|||
public class AppEnterpriseComplaintVo implements Serializable { |
|||
|
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键ID |
|||
*/ |
|||
@ExcelProperty(value = "主键ID") |
|||
private String id; |
|||
|
|||
/** |
|||
* 关联执法记录ID |
|||
*/ |
|||
@ExcelProperty(value = "关联执法记录ID") |
|||
private String relId; |
|||
|
|||
/** |
|||
* 执法类型 |
|||
*/ |
|||
@ExcelProperty(value = "执法类型") |
|||
private Long enforceType; |
|||
|
|||
/** |
|||
* 问题描述 |
|||
*/ |
|||
@ExcelProperty(value = "问题描述") |
|||
private String problemDescription; |
|||
|
|||
/** |
|||
* 联系人 |
|||
*/ |
|||
@ExcelProperty(value = "联系人") |
|||
private String linkman; |
|||
|
|||
/** |
|||
* 联系方式 |
|||
*/ |
|||
@ExcelProperty(value = "联系方式") |
|||
private String linkmanTel; |
|||
|
|||
/** |
|||
* 是否删除 0 否 1 是 |
|||
*/ |
|||
@ExcelProperty(value = "是否删除 0 否 1 是") |
|||
private Long isDelete; |
|||
|
|||
/** |
|||
* 投诉对接12345案件类型 |
|||
*/ |
|||
@ExcelProperty(value = "投诉对接12345案件类型") |
|||
private String caseType; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
@ExcelProperty(value = "") |
|||
private Long authorization; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
@ExcelProperty(value = "") |
|||
private Long comOrOpi; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
@ExcelProperty(value = "") |
|||
private String enterpriseAddress; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
@ExcelProperty(value = "") |
|||
private String proWoCode; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
@ExcelProperty(value = "") |
|||
private Long status; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
@ExcelProperty(value = "") |
|||
private Date evaluateTime; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
@ExcelProperty(value = "") |
|||
private String enterpriseNumber; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
@ExcelProperty(value = "") |
|||
private String enterpriseName; |
|||
|
|||
/** |
|||
* 执法部门多个-逗号隔开 |
|||
*/ |
|||
@ExcelProperty(value = "执法部门多个-逗号隔开") |
|||
private String complaintDepartments; |
|||
|
|||
/** |
|||
* 执法部门id多个-逗号隔开 |
|||
*/ |
|||
@ExcelProperty(value = "执法部门id多个-逗号隔开") |
|||
private String complaintDepartmentIds; |
|||
|
|||
/** |
|||
* 执法时间 |
|||
*/ |
|||
@ExcelProperty(value = "执法时间") |
|||
private Date enforcementTime; |
|||
|
|||
/** |
|||
* 投诉类型 0 系默认 1 联合检查 |
|||
*/ |
|||
@ExcelProperty(value = "投诉类型 0 系默认 1 联合检查") |
|||
private Long complaintType; |
|||
|
|||
/** |
|||
* 投诉事项编码,多个逗号隔开 |
|||
*/ |
|||
@ExcelProperty(value = "投诉事项编码,多个逗号隔开") |
|||
private String complaintItemCodes; |
|||
|
|||
/** |
|||
* 投诉事项名称,多个逗号隔开 |
|||
*/ |
|||
@ExcelProperty(value = "投诉事项名称,多个逗号隔开") |
|||
private String complaintItemNames; |
|||
|
|||
/** |
|||
* 同步过来的处理时间 |
|||
*/ |
|||
@ExcelProperty(value = "同步过来的处理时间") |
|||
private String handleTime; |
|||
|
|||
/** |
|||
* 投诉事项(对应记录表执法/入企事项) |
|||
*/ |
|||
@ExcelProperty(value = "投诉事项", converter = ExcelDictConvert.class) |
|||
@ExcelDictFormat(readConverterExp = "对=应记录表执法/入企事项") |
|||
private String complaintRecordItem; |
|||
|
|||
/** |
|||
* 数据类型 0行政 1 非行政 |
|||
*/ |
|||
@ExcelProperty(value = "数据类型 0行政 1 非行政") |
|||
private Long recordType; |
|||
} |
|||
@ -0,0 +1,355 @@ |
|||
package com.zdxt.enforcementcode.domain.vo.enterprise; |
|||
|
|||
import cn.idev.excel.annotation.ExcelProperty; |
|||
import lombok.Data; |
|||
import org.dromara.common.excel.annotation.ExcelDictFormat; |
|||
import org.dromara.common.excel.convert.ExcelDictConvert; |
|||
|
|||
import java.io.Serial; |
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 企业端-非执法登记记录 |
|||
*/ |
|||
@Data |
|||
public class AppNonEnforcementRegistrationVo implements Serializable { |
|||
|
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键ID |
|||
*/ |
|||
@ExcelProperty(value = "主键ID") |
|||
private String id; |
|||
|
|||
/** |
|||
* 执法部门 |
|||
*/ |
|||
@ExcelProperty(value = "执法部门") |
|||
private String lawEnforcement; |
|||
|
|||
/** |
|||
* 执法部门ID |
|||
*/ |
|||
@ExcelProperty(value = "执法部门ID") |
|||
private String lawEnforcementId; |
|||
|
|||
/** |
|||
* 被执法企业ID |
|||
*/ |
|||
@ExcelProperty(value = "被执法企业ID") |
|||
private String enterpriseId; |
|||
|
|||
/** |
|||
* 被执法企业 |
|||
*/ |
|||
@ExcelProperty(value = "被执法企业") |
|||
private String enterpriseName; |
|||
|
|||
/** |
|||
* 被执法企业税号 |
|||
*/ |
|||
@ExcelProperty(value = "被执法企业税号") |
|||
private String enterpriseNumber; |
|||
|
|||
/** |
|||
* 执法时间 |
|||
*/ |
|||
@ExcelProperty(value = "执法时间") |
|||
private Date enforcementTime; |
|||
|
|||
/** |
|||
* 执法人员姓名 |
|||
*/ |
|||
@ExcelProperty(value = "执法人员姓名") |
|||
private String lawEnforcer; |
|||
|
|||
/** |
|||
* 执法人员ID |
|||
*/ |
|||
@ExcelProperty(value = "执法人员ID") |
|||
private String lawEnforcerId; |
|||
|
|||
/** |
|||
* 执法人员联系方式 |
|||
*/ |
|||
@ExcelProperty(value = "执法人员联系方式") |
|||
private String lawEnforcerTel; |
|||
|
|||
/** |
|||
* 其他执法人员 |
|||
*/ |
|||
@ExcelProperty(value = "其他执法人员") |
|||
private String lawEnforcerTwo; |
|||
|
|||
/** |
|||
* 其他执法人员ID |
|||
*/ |
|||
@ExcelProperty(value = "其他执法人员ID") |
|||
private String lawEnforcerIdTwo; |
|||
|
|||
/** |
|||
* 执法人员联系方式 |
|||
*/ |
|||
@ExcelProperty(value = "执法人员联系方式") |
|||
private String lawEnforcerTelTwo; |
|||
|
|||
/** |
|||
* 辅助人员姓名 |
|||
*/ |
|||
@ExcelProperty(value = "辅助人员姓名") |
|||
private String subsidiaryer; |
|||
|
|||
/** |
|||
* 辅助人员id |
|||
*/ |
|||
@ExcelProperty(value = "辅助人员id") |
|||
private String subsidiaryerId; |
|||
|
|||
/** |
|||
* 辅助人员联系方式 |
|||
*/ |
|||
@ExcelProperty(value = "辅助人员联系方式") |
|||
private String subsidiaryerTel; |
|||
|
|||
/** |
|||
* 执法事项 |
|||
*/ |
|||
@ExcelProperty(value = "执法事项") |
|||
private String lawEnforcementItem; |
|||
|
|||
/** |
|||
* 执法依据 |
|||
*/ |
|||
@ExcelProperty(value = "执法依据") |
|||
private String lawEnforcementBasis; |
|||
|
|||
/** |
|||
* 备注 |
|||
*/ |
|||
@ExcelProperty(value = "备注") |
|||
private String remark; |
|||
|
|||
/** |
|||
* 执法结果 0 合格 1 不合格 |
|||
*/ |
|||
@ExcelProperty(value = "执法结果 0 合格 1 不合格") |
|||
private Long reslut; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
@ExcelProperty(value = "") |
|||
private String userId; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
@ExcelProperty(value = "") |
|||
private String deptId; |
|||
|
|||
/** |
|||
* 是否删除 0 否 1 是 |
|||
*/ |
|||
@ExcelProperty(value = "是否删除 0 否 1 是") |
|||
private Long isDelete; |
|||
|
|||
/** |
|||
* 数据状态 0 正常 1 取消 |
|||
*/ |
|||
@ExcelProperty(value = "数据状态 0 正常 1 取消") |
|||
private Long status; |
|||
|
|||
/** |
|||
* 登记编号 |
|||
*/ |
|||
@ExcelProperty(value = "登记编号") |
|||
private String lawEnforcementCode; |
|||
|
|||
/** |
|||
* 是否投诉 0 否 1 是 |
|||
*/ |
|||
@ExcelProperty(value = "是否投诉 0 否 1 是") |
|||
private Integer isComplaint; |
|||
|
|||
/** |
|||
* 数据保存或提交 0 保存 1提交 |
|||
*/ |
|||
@ExcelProperty(value = "数据保存或提交 0 保存 1提交") |
|||
private Long isSubmit; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
@ExcelProperty(value = "") |
|||
private String enforce; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
@ExcelProperty(value = "") |
|||
private String uniteCheck; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
@ExcelProperty(value = "") |
|||
private String lawEnforcementItemText; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
@ExcelProperty(value = "") |
|||
private String lawField; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
@ExcelProperty(value = "") |
|||
private String checkCategory; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
@ExcelProperty(value = "") |
|||
private String checkCss; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
@ExcelProperty(value = "") |
|||
private String enforceReason; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
@ExcelProperty(value = "") |
|||
private String bureauDeptId; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
@ExcelProperty(value = "") |
|||
private String bureauDeptName; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
@ExcelProperty(value = "") |
|||
private String lawEnforcementBasisText; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
@ExcelProperty(value = "") |
|||
private Long isEvaluate; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
@ExcelProperty(value = "") |
|||
private String lawId; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
@ExcelProperty(value = "") |
|||
private String lawText; |
|||
|
|||
/** |
|||
* 是否是联合检查 需要=1 and union_no不为空才是联合检查 |
|||
*/ |
|||
@ExcelProperty(value = "是否是联合检查 需要=1 and union_no不为空才是联合检查") |
|||
private Long hasUnion; |
|||
|
|||
/** |
|||
* 是否委托执法 |
|||
*/ |
|||
@ExcelProperty(value = "是否委托执法") |
|||
private Long hasAuto; |
|||
|
|||
/** |
|||
* 联合执法的分组编号 |
|||
*/ |
|||
@ExcelProperty(value = "联合执法的分组编号") |
|||
private String unionNo; |
|||
|
|||
/** |
|||
* 执法类别(新) |
|||
*/ |
|||
@ExcelProperty(value = "执法类别", converter = ExcelDictConvert.class) |
|||
@ExcelDictFormat(readConverterExp = "新=") |
|||
private String lawEnforceCategory; |
|||
|
|||
/** |
|||
* 委托执法部门id |
|||
*/ |
|||
@ExcelProperty(value = "委托执法部门id") |
|||
private String entrustDeptId; |
|||
|
|||
/** |
|||
* 委托执法部门名称 |
|||
*/ |
|||
@ExcelProperty(value = "委托执法部门名称") |
|||
private String entrustDeptName; |
|||
|
|||
/** |
|||
* 企业注册地址 |
|||
*/ |
|||
@ExcelProperty(value = "企业注册地址") |
|||
private String enterpriseAddress; |
|||
|
|||
/** |
|||
* 企业注册区 |
|||
*/ |
|||
@ExcelProperty(value = "企业注册区") |
|||
private String district; |
|||
|
|||
/** |
|||
* 企业注册街道 |
|||
*/ |
|||
@ExcelProperty(value = "企业注册街道") |
|||
private String street; |
|||
|
|||
/** |
|||
* 1:市直登记, 3:区直登记 |
|||
*/ |
|||
@ExcelProperty(value = "1:市直登记, 3:区直登记") |
|||
private Long zone; |
|||
|
|||
/** |
|||
* 是否真联合执法(0:未联合; 1:已经联合) |
|||
*/ |
|||
@ExcelProperty(value = "是否真联合执法(0:未联合; 1:已经联合)") |
|||
private Long isRealUnion; |
|||
|
|||
// ======== 以下为显示用扩展字段(非数据库字段)========
|
|||
|
|||
/** |
|||
* 执法类别文本(字典翻译) |
|||
*/ |
|||
private String lawEnforceCategoryText; |
|||
|
|||
/** |
|||
* 是否投诉标记: 0=否, 1=是 |
|||
*/ |
|||
private Integer comOrOpi; |
|||
|
|||
/** |
|||
* 距今天数(执法时间到今天的天数差) |
|||
*/ |
|||
private Long outTimeDayNum; |
|||
|
|||
/** |
|||
* 执法人员1展示文本(姓名+执法证号) |
|||
*/ |
|||
private String lawEnforcerDisplay; |
|||
|
|||
/** |
|||
* 其他执法人员展示列表(姓名+执法证号) |
|||
*/ |
|||
private List<String> lawEnforcer2List; |
|||
} |
|||
@ -0,0 +1,22 @@ |
|||
package com.zdxt.enforcementcode.mapper.enterprise; |
|||
|
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|||
import com.zdxt.enforcementcode.domain.dto.enterprise.EnforcementRegistrationQueryDTO; |
|||
import com.zdxt.enforcementcode.domain.entity.enterprise.AppEnforcementRegistration; |
|||
import com.zdxt.enforcementcode.domain.vo.enterprise.AppEnforcementRegistrationVo; |
|||
import com.zdxt.enforcementcode.domain.vo.enterprise.EnforcementRegistrationListVo; |
|||
import org.apache.ibatis.annotations.Param; |
|||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; |
|||
|
|||
public interface AppEnforcementRegistrationMapper extends BaseMapperPlus<AppEnforcementRegistration, AppEnforcementRegistrationVo> { |
|||
/** |
|||
* 分页查询执法登记列表 |
|||
* |
|||
* @param page 分页参数 |
|||
* @param dto 查询条件 |
|||
* @return 执法登记列表 |
|||
*/ |
|||
IPage<EnforcementRegistrationListVo> selectEnforcementRegistrationPage(@Param("page") Page<EnforcementRegistrationListVo> page, @Param("dto") EnforcementRegistrationQueryDTO dto); |
|||
|
|||
} |
|||
@ -0,0 +1,8 @@ |
|||
package com.zdxt.enforcementcode.mapper.enterprise; |
|||
|
|||
import com.zdxt.enforcementcode.domain.entity.enterprise.AppEnterpriseComplaint; |
|||
import com.zdxt.enforcementcode.domain.vo.enterprise.AppEnterpriseComplaintVo; |
|||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; |
|||
|
|||
public interface AppEnterpriseComplaintMapper extends BaseMapperPlus<AppEnterpriseComplaint, AppEnterpriseComplaintVo> { |
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
package com.zdxt.enforcementcode.mapper.enterprise; |
|||
|
|||
import com.zdxt.enforcementcode.domain.entity.enterprise.AppNonEnforcementRegistration; |
|||
import com.zdxt.enforcementcode.domain.vo.enterprise.AppNonEnforcementRegistrationVo; |
|||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; |
|||
|
|||
/** |
|||
* 企业端-非执法记录Mapper接口 |
|||
*/ |
|||
public interface AppNonEnforcementRegistrationMapper extends BaseMapperPlus<AppNonEnforcementRegistration, AppNonEnforcementRegistrationVo> { |
|||
} |
|||
@ -0,0 +1,58 @@ |
|||
package com.zdxt.enforcementcode.service.enterprise; |
|||
|
|||
import com.zdxt.enforcementcode.domain.bo.EnterpriseComplaintBo; |
|||
import com.zdxt.enforcementcode.domain.dto.enterprise.AppEnterpriseComplatintInsertDTO; |
|||
import com.zdxt.enforcementcode.domain.dto.enterprise.AppEnterpriseComplatintQueryDTO; |
|||
import com.zdxt.enforcementcode.domain.vo.enterprise.AppEnterpriseComplaintVo; |
|||
import org.dromara.common.mybatis.core.page.PageQuery; |
|||
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|||
import java.util.Collection; |
|||
|
|||
/** |
|||
* 企业执法-在线投诉Service接口 |
|||
*/ |
|||
public interface IAppEnterpriseComplaintService { |
|||
|
|||
/** |
|||
* 查询企业执法-在线投诉 |
|||
* |
|||
* @param id 主键 |
|||
* @return 企业执法-在线投诉 |
|||
*/ |
|||
AppEnterpriseComplaintVo queryById(String id); |
|||
|
|||
/** |
|||
* 分页查询企业执法-在线投诉列表 |
|||
* |
|||
* @param dto 查询条件 |
|||
* @param pageQuery 分页参数 |
|||
* @return 企业执法-在线投诉分页列表 |
|||
*/ |
|||
TableDataInfo<AppEnterpriseComplaintVo> queryPageList(AppEnterpriseComplatintQueryDTO dto, PageQuery pageQuery); |
|||
|
|||
|
|||
/** |
|||
* 新增企业执法-在线投诉 |
|||
* |
|||
* @param dto 企业执法-在线投诉 |
|||
* @return 是否新增成功 |
|||
*/ |
|||
Boolean insertEnterpriseComplaint(AppEnterpriseComplatintInsertDTO dto); |
|||
|
|||
/** |
|||
* 修改企业执法-在线投诉 |
|||
* |
|||
* @param bo 企业执法-在线投诉 |
|||
* @return 是否修改成功 |
|||
*/ |
|||
Boolean updateByBo(EnterpriseComplaintBo bo); |
|||
|
|||
/** |
|||
* 校验并批量删除企业执法-在线投诉信息 |
|||
* |
|||
* @param ids 待删除的主键集合 |
|||
* @param isValid 是否进行有效性校验 |
|||
* @return 是否删除成功 |
|||
*/ |
|||
Boolean deleteWithValidByIds(Collection<String> ids, Boolean isValid); |
|||
} |
|||
@ -0,0 +1,167 @@ |
|||
package com.zdxt.enforcementcode.service.enterprise.impl; |
|||
|
|||
import cn.hutool.core.util.IdUtil; |
|||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|||
import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
|||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|||
import com.zdxt.enforcementcode.domain.ZdxtFile; |
|||
import com.zdxt.enforcementcode.domain.bo.EnterpriseComplaintBo; |
|||
import com.zdxt.enforcementcode.domain.commonenum.AppEnterpriseComplaintEnums; |
|||
import com.zdxt.enforcementcode.domain.dto.enterprise.AppEnterpriseComplatintInsertDTO; |
|||
import com.zdxt.enforcementcode.domain.dto.enterprise.AppEnterpriseComplatintQueryDTO; |
|||
import com.zdxt.enforcementcode.domain.entity.enterprise.AppEnforcementRegistration; |
|||
import com.zdxt.enforcementcode.domain.entity.enterprise.AppEnterpriseComplaint; |
|||
import com.zdxt.enforcementcode.domain.entity.enterprise.AppNonEnforcementRegistration; |
|||
import com.zdxt.enforcementcode.domain.vo.enterprise.AppEnterpriseComplaintVo; |
|||
import com.zdxt.enforcementcode.mapper.ZdxtFileMapper; |
|||
import com.zdxt.enforcementcode.mapper.enterprise.AppEnforcementRegistrationMapper; |
|||
import com.zdxt.enforcementcode.mapper.enterprise.AppEnterpriseComplaintMapper; |
|||
import com.zdxt.enforcementcode.mapper.enterprise.AppNonEnforcementRegistrationMapper; |
|||
import com.zdxt.enforcementcode.service.enterprise.IAppEnterpriseComplaintService; |
|||
import lombok.RequiredArgsConstructor; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.dromara.common.core.utils.DateUtils; |
|||
import org.dromara.common.core.utils.MapstructUtils; |
|||
import org.dromara.common.mybatis.core.page.PageQuery; |
|||
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|||
import org.dromara.common.satoken.utils.LoginHelper; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.Collection; |
|||
|
|||
/** |
|||
* 企业执法-在线投诉Service业务层处理 |
|||
|
|||
*/ |
|||
@Slf4j |
|||
@RequiredArgsConstructor |
|||
@Service |
|||
public class AppEnterpriseComplaintServiceImpl implements IAppEnterpriseComplaintService { |
|||
private final AppEnterpriseComplaintMapper baseMapper; |
|||
|
|||
@Autowired |
|||
private AppEnforcementRegistrationMapper enforcementRegistrationMapper; |
|||
|
|||
@Autowired |
|||
private AppNonEnforcementRegistrationMapper nonEnforcementRegistrationMapper; |
|||
|
|||
@Autowired |
|||
private ZdxtFileMapper zdxtFileMapper; |
|||
|
|||
/** |
|||
* 查询企业执法-在线投诉 |
|||
* |
|||
* @param id 主键 |
|||
* @return 企业执法-在线投诉 |
|||
*/ |
|||
@Override |
|||
public AppEnterpriseComplaintVo queryById(String id){ |
|||
return baseMapper.selectVoById(id); |
|||
} |
|||
|
|||
/** |
|||
* 分页查询企业执法-在线投诉列表 |
|||
* |
|||
* @param dto 查询条件 |
|||
* @param pageQuery 分页参数 |
|||
* @return 企业执法-在线投诉分页列表 |
|||
*/ |
|||
@Override |
|||
public TableDataInfo<AppEnterpriseComplaintVo> queryPageList(AppEnterpriseComplatintQueryDTO dto, PageQuery pageQuery) { |
|||
LambdaQueryWrapper<AppEnterpriseComplaint> lqw = Wrappers.lambdaQuery(); |
|||
lqw.orderByAsc(AppEnterpriseComplaint::getId); |
|||
lqw.eq(StringUtils.isNotBlank(dto.getRelId()), AppEnterpriseComplaint::getRelId, dto.getRelId()); |
|||
Page<AppEnterpriseComplaintVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw); |
|||
return TableDataInfo.build(result); |
|||
} |
|||
|
|||
/** |
|||
* 新增企业执法-在线投诉 |
|||
* |
|||
* @param dto 企业执法-在线投诉 |
|||
* @return 是否新增成功 |
|||
*/ |
|||
@Override |
|||
@Transactional |
|||
public Boolean insertEnterpriseComplaint(AppEnterpriseComplatintInsertDTO dto) { |
|||
|
|||
dto.setCreateTime(DateUtils.getNowDate()); |
|||
dto.setId(IdUtil.simpleUUID()); |
|||
AppEnterpriseComplaint add = MapstructUtils.convert(dto, AppEnterpriseComplaint.class); |
|||
|
|||
// 保存投诉信息
|
|||
boolean flag = baseMapper.insert(add) > 0; |
|||
if (flag) { |
|||
//更新记录表状态 0:行政 1非行政
|
|||
if(AppEnterpriseComplaintEnums.ADMINISTRATION.getKey().equals(dto.getRecordType())){ |
|||
AppEnforcementRegistration param =new AppEnforcementRegistration(); |
|||
param.setId(dto.getRelId()); |
|||
param.setIsComplaint(AppEnterpriseComplaintEnums.IS_COMPLAINT.getKey()); |
|||
// 更新执法登记记录
|
|||
enforcementRegistrationMapper.updateById(param); |
|||
}else{ |
|||
AppNonEnforcementRegistration param =new AppNonEnforcementRegistration(); |
|||
param.setId(dto.getRelId()); |
|||
param.setHasComplaint(AppEnterpriseComplaintEnums.IS_COMPLAINT.getKey()); |
|||
// 更新非执法登记记录
|
|||
nonEnforcementRegistrationMapper.updateById(param); |
|||
} |
|||
|
|||
//原逻辑这边会调用创建民生诉求工单,接口会做后续安排
|
|||
|
|||
//上传附件文件
|
|||
if(dto.getFileList() != null && !dto.getFileList().isEmpty()){ |
|||
dto.getFileList().forEach(file -> { |
|||
ZdxtFile zdxtFile = new ZdxtFile(); |
|||
zdxtFile.setBusinessId(dto.getId()); |
|||
zdxtFile.setGuid(IdUtil.simpleUUID()); |
|||
zdxtFile.setFileSuffix(AppEnterpriseComplaintEnums.JPG.getValue()); |
|||
zdxtFile.setUploadPath(file); |
|||
zdxtFile.setUploadPersonId(LoginHelper.getUserId() == null ? "" : LoginHelper.getUserId().toString()); |
|||
zdxtFile.setUploadPersonName(LoginHelper.getUsername() == null ? "" : LoginHelper.getUsername()); |
|||
zdxtFileMapper.insertZdxtFile(zdxtFile); |
|||
|
|||
}); |
|||
} |
|||
} |
|||
return flag; |
|||
} |
|||
|
|||
/** |
|||
* 修改企业执法-在线投诉 |
|||
* |
|||
* @param bo 企业执法-在线投诉 |
|||
* @return 是否修改成功 |
|||
*/ |
|||
@Override |
|||
public Boolean updateByBo(EnterpriseComplaintBo bo) { |
|||
AppEnterpriseComplaint update = MapstructUtils.convert(bo, AppEnterpriseComplaint.class); |
|||
validEntityBeforeSave(update); |
|||
return baseMapper.updateById(update) > 0; |
|||
} |
|||
|
|||
/** |
|||
* 保存前的数据校验 |
|||
*/ |
|||
private void validEntityBeforeSave(AppEnterpriseComplaint entity){ |
|||
//TODO 做一些数据校验,如唯一约束
|
|||
} |
|||
|
|||
/** |
|||
* 校验并批量删除企业执法-在线投诉信息 |
|||
* |
|||
* @param ids 待删除的主键集合 |
|||
* @param isValid 是否进行有效性校验 |
|||
* @return 是否删除成功 |
|||
*/ |
|||
@Override |
|||
public Boolean deleteWithValidByIds(Collection<String> ids, Boolean isValid) { |
|||
if(isValid){ |
|||
//TODO 做一些业务上的校验,判断是否需要校验
|
|||
} |
|||
return baseMapper.deleteByIds(ids) > 0; |
|||
} |
|||
} |
|||
Loading…
Reference in new issue