Commit d4a8e87d authored by 廖旭伟's avatar 廖旭伟

后台功能模块调整

parent b530e8a4
package com.mortals.xhx.daemon.task;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.service.ITask;
import com.mortals.framework.service.ITaskExcuteService;
import com.mortals.xhx.module.business.model.BusinessLicenseEntity;
import com.mortals.xhx.module.business.model.BusinessLicenseQuery;
import com.mortals.xhx.module.business.service.BusinessLicenseService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 营业执照转换
*/
@Slf4j
@Service("BusinessLicenseTask")
public class BusinessLicenseTaskImpl implements ITaskExcuteService {
@Autowired
private BusinessLicenseService businessLicenseService;
@Override
public void excuteTask(ITask task) throws AppException {
BusinessLicenseQuery query = new BusinessLicenseQuery();
query.setStatus(0);
List<BusinessLicenseEntity> list = businessLicenseService.find(query);
if(CollectionUtils.isNotEmpty(list)){
log.info("营业执照转化任务开始.....");
int count = 0;
for (BusinessLicenseEntity businessLicenseEntity:list){
try {
businessLicenseService.doConversion(businessLicenseEntity);
count++;
}catch (Exception e){
log.error("营业执照转化出错",e);
continue;
}
}
log.info("营业执照转化任务结束,共计转化"+count+"条数据.....");
}
}
@Override
public void stopTask(ITask task) throws AppException {
}
}
package com.mortals.xhx.module.api;
import lombok.Data;
@Data
public class CatalogVO {
/**
* 主键
*/
private Long id;
/**
* 目录名称
*/
private String catalogName;
/**
* 目录编号
*/
private String catalogCode;
/**
* 证照目录模板ID
*/
private Long templateId;
/**
* 证照模板名称
*/
private String templateName;
/**
* 证照模板表单内容
*/
private String formContent;
public CatalogVO(Long id, String catalogName, String catalogCode) {
this.id = id;
this.catalogName = catalogName;
this.catalogCode = catalogCode;
}
public CatalogVO() {
}
}
package com.mortals.xhx.module.api;
import lombok.Data;
@Data
public class PrintCatalogVO {
/**
* 打印机名称
*/
private String printerName;
/**
* 打印机网络地址
*/
private String printerIp;
/**
* 打印机纸盒
*/
private String paperSource;
public PrintCatalogVO(String printerName, String printerIp, String paperSource) {
this.printerName = printerName;
this.printerIp = printerIp;
this.paperSource = paperSource;
}
}
package com.mortals.xhx.module.api;
import lombok.Data;
@Data
public class PrintServicePdu {
/**
* 证照目录ID
*/
private Long catalogId;
/**
* 打印服务配置ID
*/
private Long serviceId;
}
package com.mortals.xhx.module.api;
import lombok.Data;
@Data
public class PrintServiceVO {
/**
* 主键
*/
private Long id;
/**
* 配置名称
*/
private String serviceName;
/**
* 服务访问地址
*/
private String serviceUrl;
public PrintServiceVO(Long id, String serviceName, String serviceUrl) {
this.id = id;
this.serviceName = serviceName;
this.serviceUrl = serviceUrl;
}
}
package com.mortals.xhx.module.api;
import lombok.Data;
@Data
public class PrintWaitQueueVO {
/** 打印队列id */
private Long waitQueueId;
/**
* 证照目录ID
*/
private Long catalogId;
/**
* 证照目录编号
*/
private String catalogCode;
/**
* 目录名称
*/
private String catalogName;
/**
* 证照目录模板ID
*/
private Long templateId;
/**
* 证照模板名称
*/
private String templateName;
/**
* 证照名称
*/
private String certificateName;
/**
* 证照编号
*/
private String certificateCode;
/**
* 企业名称
*/
private String enterpriseName;
/**
* 持有者姓名
*/
private String holderName;
/**
* 持有者证件号码
*/
private String holderIDCardNo;
/**
* 取件人姓名
*/
private String pickerName;
/**
* 取件人证件号码
*/
private String pickerIDCardNo;
/**
* 证件预览地址
*/
private String previewUrl;
/**
* 证件附件地址
*/
private String certificateUrl;
/**
* 打印服务访问地址
*/
private String serviceUrl;
/**
* 打印机名称
*/
private String printerName;
/**
* 打印机网络地址
*/
private String printerIp;
/**
* 打印机纸盒
*/
private String paperSource;
/**
* 手机号码
*/
private String mobile;
}
package com.mortals.xhx.module.business.dao;
import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.business.model.BusinessLicenseEntity;
/**
* 营业执照信息Dao
* 营业执照信息 DAO接口
*
* @author zxfei
* @date 2022-12-12
*/
public interface BusinessLicenseDao extends ICRUDDao<BusinessLicenseEntity,Long>{
}
package com.mortals.xhx.module.business.dao.ibatis;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import com.mortals.xhx.module.business.dao.BusinessLicenseDao;
import com.mortals.xhx.module.business.model.BusinessLicenseEntity;
import org.springframework.stereotype.Repository;
/**
* 营业执照信息DaoImpl DAO接口
*
* @author zxfei
* @date 2022-12-12
*/
@Repository("businessLicenseDao")
public class BusinessLicenseDaoImpl extends BaseCRUDDaoMybatis<BusinessLicenseEntity,Long> implements BusinessLicenseDao {
}
package com.mortals.xhx.module.business.model.vo;
import com.mortals.framework.model.BaseEntityLong;
/**
* 营业执照信息视图对象
*
* @author zxfei
* @date 2022-12-12
*/
public class BusinessLicenseVo extends BaseEntityLong {
}
\ No newline at end of file
package com.mortals.xhx.module.business.service;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.business.model.BusinessLicenseEntity;
/**
* BusinessLicenseService
*
* 营业执照信息 service接口
*
* @author zxfei
* @date 2022-12-12
*/
public interface BusinessLicenseService extends ICRUDService<BusinessLicenseEntity,Long>{
/**
* API添加营业执照信息
* @param businessLicenseEntity
*/
void apiSave(BusinessLicenseEntity businessLicenseEntity);
/**
* 营业执照转化为可打印数据
* @param businessLicenseEntity
*/
void doConversion(BusinessLicenseEntity businessLicenseEntity);
}
\ No newline at end of file
package com.mortals.xhx.module.business.service.impl;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.util.DateUtils;
import com.mortals.framework.util.StringUtils;
import com.mortals.xhx.common.code.HolderIdType;
import com.mortals.xhx.common.code.HolderType;
import com.mortals.xhx.module.business.dao.BusinessLicenseDao;
import com.mortals.xhx.module.business.model.BusinessLicenseEntity;
import com.mortals.xhx.module.business.service.BusinessLicenseService;
import com.mortals.xhx.module.certificate.model.CertificateCatalogEntity;
import com.mortals.xhx.module.certificate.model.CertificateCatalogQuery;
import com.mortals.xhx.module.certificate.model.CertificateCatalogTemplateEntity;
import com.mortals.xhx.module.certificate.model.CertificateCatalogTemplateQuery;
import com.mortals.xhx.module.certificate.pdu.ApplyLogPdu;
import com.mortals.xhx.module.certificate.service.CertificateCatalogService;
import com.mortals.xhx.module.certificate.service.CertificateCatalogTemplateService;
import com.mortals.xhx.module.record.model.ApplyLogEntity;
import com.mortals.xhx.module.record.model.ApplyLogQuery;
import com.mortals.xhx.module.record.service.ApplyLogService;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.*;
/**
* BusinessLicenseService
* 营业执照信息 service实现
*
* @author zxfei
* @date 2022-12-12
*/
@Service("businessLicenseService")
public class BusinessLicenseServiceImpl extends AbstractCRUDServiceImpl<BusinessLicenseDao, BusinessLicenseEntity, Long> implements BusinessLicenseService {
@Autowired
private ApplyLogService applyLogService;
@Autowired
private CertificateCatalogService certificateCatalogService;
@Autowired
private CertificateCatalogTemplateService certificateCatalogTemplateService;
@Override
public void apiSave(BusinessLicenseEntity businessLicenseEntity) {
businessLicenseEntity.setCreateTime(new Date());
businessLicenseEntity.setStatus(0);
this.save(businessLicenseEntity);
}
@Override
public void doConversion(BusinessLicenseEntity businessLicenseEntity) {
if(StringUtils.isEmpty(businessLicenseEntity.getBusinessLicense())){
throw new AppException("执照编码businessLicense不能为空");
}
List<ApplyLogEntity> applyLogEntities = applyLogService.find(new ApplyLogQuery().certificateCode(businessLicenseEntity.getBusinessLicense()).recordStatus(0));
if(CollectionUtils.isNotEmpty(applyLogEntities)){
throw new AppException("执照编码"+businessLicenseEntity.getBusinessLicense()+"已生成过文件,请勿重复生成");
}
CertificateCatalogEntity catalogEntity = certificateCatalogService.selectOne(new CertificateCatalogQuery().catalogName("营业执照"));
if(catalogEntity==null){
throw new AppException("当前系统没有设置营业执照目录");
}
CertificateCatalogTemplateQuery templateQuery = new CertificateCatalogTemplateQuery();
templateQuery.setCatalogId(catalogEntity.getId());
templateQuery.setTemplateName("%"+businessLicenseEntity.getComposingForm()+"%");
List<CertificateCatalogTemplateEntity> templateEntityList = certificateCatalogTemplateService.find(templateQuery);
if(CollectionUtils.isEmpty(templateEntityList)){
throw new AppException("当前系统没有["+businessLicenseEntity.getComposingForm()+"]营业执照模板");
}
for(CertificateCatalogTemplateEntity templateEntity:templateEntityList){
ApplyLogPdu applyLogPdu = new ApplyLogPdu();
Date date = DateUtils.StrToDateTime(businessLicenseEntity.getStartDate(),"yyyy-MM-dd");
if(date==null){
date = DateUtils.StrToDateTime(businessLicenseEntity.getStartDate(),"yyyy年MM月dd日");
}else {
date = new Date();
}
applyLogPdu.setIssueTime(date);
applyLogPdu.setPickerName(businessLicenseEntity.getProprietorName());
applyLogPdu.setPickerIDCardNo(businessLicenseEntity.getCredentialsCode());
applyLogPdu.setHolderType(HolderType.PERSON.getValue());
applyLogPdu.setHolderIdType(HolderIdType.ID_CARD.getValue());
applyLogPdu.setHolderName(businessLicenseEntity.getProprietorName());
applyLogPdu.setHolderIDCardNo(businessLicenseEntity.getCredentialsCode());
applyLogPdu.setEnterpriseName(businessLicenseEntity.getTypeSizeName());
applyLogPdu.setPrivateID("https://www.gsxt.gov.cn");
if(businessLicenseEntity.getSiteId()!=null) {
applyLogPdu.setSiteId(businessLicenseEntity.getSiteId());
}else {
applyLogPdu.setSiteId(catalogEntity.getSiteId());
}
applyLogPdu.setCatalogId(catalogEntity.getId());
applyLogPdu.setTemplateId(templateEntity.getId());
applyLogPdu.setCertificateCode(businessLicenseEntity.getBusinessLicense());
//applyLogPdu.setCertificateName(businessLicenseEntity.getTypeSizeName());
JSONObject formContent = new JSONObject();
JSONObject formTemplate = JSONObject.parseObject(templateEntity.getFormContent());
JSONArray formList = formTemplate.getJSONArray("list");
for (int j = 0; j < formList.size(); j++) {
JSONObject jsonObject = formList.getJSONObject(j);
String key = jsonObject.getString("id");
if(key.indexOf("统一社会信用代码")>0){
formContent.put(key,businessLicenseEntity.getBusinessLicense());
}
if(key.indexOf("名称")>0){
formContent.put(key,businessLicenseEntity.getTypeSizeName());
}
if(key.indexOf("类型")>0){
formContent.put(key,businessLicenseEntity.getComposingForm());
}
if(key.indexOf("经营者")>0){
formContent.put(key,businessLicenseEntity.getProprietorName());
}
if(key.indexOf("法定代表人")>0){
formContent.put(key,businessLicenseEntity.getProprietorName());
}
if(key.indexOf("负责人")>0){
formContent.put(key,businessLicenseEntity.getProprietorName());
}
if(key.indexOf("经营范围")>0){
formContent.put(key,businessLicenseEntity.getManageRange());
}
if(key.indexOf("注册资本")>0){
formContent.put(key,businessLicenseEntity.getRegisteredCapital());
}
if(key.indexOf("组成形式")>0){
formContent.put(key,businessLicenseEntity.getComposingForm());
}
if(key.indexOf("注册日期")>0){
formContent.put(key,businessLicenseEntity.getStartDate());
}
if(key.indexOf("成立日期")>0){
formContent.put(key,businessLicenseEntity.getStartDate());
}
if(key.indexOf("经营场所")>0){
formContent.put(key,businessLicenseEntity.getManageLocation());
}
if(key.indexOf("住所")>0){
formContent.put(key,businessLicenseEntity.getManageLocation());
}
String zcrq = businessLicenseEntity.getStartDate();
if(key.indexOf("_年")>0){
formContent.put(key,dateFromt(zcrq).get("year"));
}
if(key.indexOf("_月")>0){
formContent.put(key,dateFromt(zcrq).get("month"));
}
if(key.indexOf("_日")>0){
formContent.put(key,dateFromt(zcrq).get("day"));
}
}
if(templateEntity.getTemplateType()==2) {
//正本
formContent.put("@image_1_二维码", baseurlPhotos(businessLicenseEntity.getQrCodeOriginalBase64()));
}else {
formContent.put("@image_1_二维码", baseurlPhotos(businessLicenseEntity.getQrCodeDuplicateBase64()));
}
if(log.isDebugEnabled()){
log.debug("证照转化表单json:"+formContent.toJSONString());
}
applyLogPdu.setFormContent(formContent.toJSONString());
applyLogPdu.setCertificateName(templateEntity.getTemplateName());
applyLogService.apiSaveApplyLog(applyLogPdu);
}
}
private Map<String,String> dateFromt(String dateStr){
Map<String,String> dateMap = new HashMap<>();
Date date = DateUtils.StrToDateTime(dateStr,"yyyy-MM-dd");
if(date==null){
date = DateUtils.StrToDateTime(dateStr,"yyyy年MM月dd日");
}else {
date = new Date();
}
if(date!=null){
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
int year = calendar.get(Calendar.YEAR);
int month = calendar.get(Calendar.MONTH)+1;
int day = calendar.get(Calendar.DAY_OF_MONTH);
dateMap.put("year",String.valueOf(year));
dateMap.put("month",String.valueOf(month));
dateMap.put("day",String.valueOf(day));
}
return dateMap;
}
public static String baseurlPhotos(String base64) {
return base64.substring(base64.indexOf( "," ) + 1 );
}
}
\ No newline at end of file
package com.mortals.xhx.module.business.web;
import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.annotation.UnAuth;
import com.mortals.framework.model.Context;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.module.business.model.BusinessLicenseEntity;
import com.mortals.xhx.module.business.service.BusinessLicenseService;
import org.springframework.beans.factory.annotation.Autowired;
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;
import java.util.HashMap;
import java.util.Map;
/**
*
* 营业执照信息
*
* @author zxfei
* @date 2022-12-12
*/
@RestController
@RequestMapping("business/license")
public class BusinessLicenseController extends BaseCRUDJsonBodyMappingController<BusinessLicenseService,BusinessLicenseEntity,Long> {
@Autowired
private ParamService paramService;
public BusinessLicenseController(){
super.setModuleDesc( "营业执照信息");
}
@Override
protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "dyZb", paramService.getParamBySecondOrganize("BusinessLicense","dyZb"));
this.addDict(model, "dyFb", paramService.getParamBySecondOrganize("BusinessLicense","dyFb"));
super.init(model, context);
}
@PostMapping({"inter"})
@UnAuth
public String apiSave(@RequestBody BusinessLicenseEntity businessLicense){
JSONObject ret = new JSONObject();
Map<String, Object> model = new HashMap();
String busiDesc = "API接口存入营业执照信息";
int code = 200;
try {
service.doConversion(businessLicense);
model.put("message_info", "成功");
this.recordSysLog(this.request, busiDesc + " 【成功】");
}catch (Exception e){
code = 400;
model.put("message_info", "失败");
this.doException(this.request, busiDesc, model, e);
}
ret.put("code", code);
ret.put("message", model.remove("message_info"));
return ret.toJSONString();
}
}
\ No newline at end of file
package com.mortals.xhx.module.certificate.dao;
import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.certificate.model.CertificateCatalogTemplateEntity;
import java.util.List;
/**
* 证照目录模板Dao
* 证照目录模板 DAO接口
*
* @author zxfei
* @date 2023-05-23
*/
public interface CertificateCatalogTemplateDao extends ICRUDDao<CertificateCatalogTemplateEntity,Long>{
}
package com.mortals.xhx.module.certificate.dao;
import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.certificate.model.DeviceClassifyEntity;
import com.mortals.xhx.module.certificate.model.CertificateDocumentEntity;
import java.util.List;
/**
* 证照分类设备配置Dao
* 证照分类设备配置 DAO接口
* 子证配置Dao
* 子证配置 DAO接口
*
* @author zxfei
* @date 2023-05-09
* @date 2024-07-27
*/
public interface DeviceClassifyDao extends ICRUDDao<DeviceClassifyEntity,Long>{
public interface CertificateDocumentDao extends ICRUDDao<CertificateDocumentEntity,Long>{
}
package com.mortals.xhx.module.certificate.dao.ibatis;
import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.certificate.dao.CertificateCatalogTemplateDao;
import com.mortals.xhx.module.certificate.model.CertificateCatalogTemplateEntity;
import java.util.Date;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List;
/**
* 证照目录模板DaoImpl DAO接口
*
* @author zxfei
* @date 2023-05-23
*/
@Repository("certificateCatalogTemplateDao")
public class CertificateCatalogTemplateDaoImpl extends BaseCRUDDaoMybatis<CertificateCatalogTemplateEntity,Long> implements CertificateCatalogTemplateDao {
}
......@@ -2,19 +2,19 @@ package com.mortals.xhx.module.certificate.dao.ibatis;
import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.certificate.dao.DeviceClassifyDao;
import com.mortals.xhx.module.certificate.model.DeviceClassifyEntity;
import com.mortals.xhx.module.certificate.dao.CertificateDocumentDao;
import com.mortals.xhx.module.certificate.model.CertificateDocumentEntity;
import java.util.Date;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List;
/**
* 证照分类设备配置DaoImpl DAO接口
* 子证配置DaoImpl DAO接口
*
* @author zxfei
* @date 2023-05-09
* @date 2024-07-27
*/
@Repository("deviceClassifyDao")
public class DeviceClassifyDaoImpl extends BaseCRUDDaoMybatis<DeviceClassifyEntity,Long> implements DeviceClassifyDao {
@Repository("certificateDocumentDao")
public class CertificateDocumentDaoImpl extends BaseCRUDDaoMybatis<CertificateDocumentEntity,Long> implements CertificateDocumentDao {
......
package com.mortals.xhx.module.certificate.model;
import java.util.List;
import java.util.ArrayList;
import java.math.BigDecimal;
import cn.hutool.core.date.DateUtil;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
......@@ -10,7 +13,7 @@ import lombok.Data;
* 证照目录实体对象
*
* @author zxfei
* @date 2023-05-24
* @date 2024-07-28
*/
@Data
public class CertificateCatalogEntity extends CertificateCatalogVo {
......@@ -56,6 +59,46 @@ public class CertificateCatalogEntity extends CertificateCatalogVo {
* 证照状态,0:禁用1:启用
*/
private Integer status;
/**
* 正本模板文件名称
*/
private String templateFileName;
/**
* 正本模板文件地址
*/
private String templateFileUrl;
/**
* 正本模板表单内容
*/
private String formContent;
/**
* 证照示例图地址
*/
private String exampleFileUrl;
/**
* 批量导入模板文件地址
*/
private String excelFile;
/**
* 是否生成PDF,0:否1:是
*/
private Integer isPdf;
/**
* 打印设备Id
*/
private Long deviceId;
/**
* 打印机名称
*/
private String printerName;
/**
* 打印机网络地址
*/
private String printerIp;
/**
* 打印机纸盒
*/
private String paperSource;
@Override
public int hashCode() {
return this.getId().hashCode();
......@@ -73,25 +116,25 @@ public class CertificateCatalogEntity extends CertificateCatalogVo {
}
public void initAttrValue(){
this.siteId = -1L;
this.siteId = null;
this.catalogName = "";
this.catalogCode = "";
this.holderType = 1;
this.industryId = -1L;
this.classifyId = -1L;
this.industryId = null;
this.classifyId = null;
this.transverse = 0;
this.portrait = 0;
this.inspect = 0;
this.status = 1;
this.templateFileName = "";
this.templateFileUrl = "";
this.formContent = "";
this.exampleFileUrl = "";
this.excelFile = "";
this.isPdf = 0;
this.deviceId = null;
this.printerName = "";
this.printerIp = "";
this.paperSource = "";
}
}
\ No newline at end of file
package com.mortals.xhx.module.certificate.model;
import java.util.List;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.certificate.model.vo.CertificateCatalogTemplateVo;
import lombok.Data;
/**
* 证照目录模板实体对象
*
* @author zxfei
* @date 2023-05-24
*/
@Data
public class CertificateCatalogTemplateEntity extends CertificateCatalogTemplateVo {
private static final long serialVersionUID = 1L;
/**
* 站点id
*/
private Long siteId;
/**
* 目录id
*/
private Long catalogId;
/**
* 证照模板名称
*/
private String templateName;
/**
* 模板类型1普通2正本3副本
*/
private Integer templateType;
/**
* 证照模板文件名称
*/
private String templateFileName;
/**
* 证照模板文件地址
*/
private String templateFileUrl;
/**
* 证照模板表单内容
*/
private String formContent;
/**
* 证照示例图地址
*/
private String exampleFileUrl;
/**
* 证照状态,0:禁用1:启用
*/
private Integer status;
/**
* 批量导入模板文件地址
*/
private String excelFile;
/**
* 是否生成PDF,0:否1:是
*/
private Integer isPdf;
/**
* 打印设备Id
*/
private Long deviceId;
/**
* 打印机名称
*/
private String printerName;
/**
* 打印机网络地址
*/
private String printerIp;
/**
* 打印机纸盒
*/
private String paperSource;
@Override
public int hashCode() {
return this.getId().hashCode();
}
@Override
public boolean equals(Object obj) {
if (obj == null) return false;
if (obj instanceof CertificateCatalogTemplateEntity) {
CertificateCatalogTemplateEntity tmp = (CertificateCatalogTemplateEntity) obj;
if (this.getId() == tmp.getId()) {
return true;
}
}
return false;
}
public void initAttrValue(){
this.siteId = -1L;
this.catalogId = -1L;
this.templateName = "";
this.templateType = 0;
this.templateFileName = "";
this.templateFileUrl = "";
this.formContent = "";
this.exampleFileUrl = "";
this.status = 1;
this.excelFile = "";
this.isPdf = 0;
this.deviceId = -1L;
this.printerName = "";
this.printerIp = "";
this.paperSource = "";
}
}
\ No newline at end of file
package com.mortals.xhx.module.certificate.model;
import java.util.List;
import java.util.ArrayList;
import java.math.BigDecimal;
import cn.hutool.core.date.DateUtil;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.certificate.model.vo.CertificateClassifyVo;
import lombok.Data;
/**
* 证照分类实体对象
*
* @author zxfei
* @date 2023-05-14
*/
* 证照分类实体对象
*
* @author zxfei
* @date 2024-07-27
*/
@Data
public class CertificateClassifyEntity extends CertificateClassifyVo {
private static final long serialVersionUID = 1L;
/**
* 站点id
*/
private Long siteId;
/**
* 分类名称
*/
......@@ -36,102 +43,6 @@ public class CertificateClassifyEntity extends CertificateClassifyVo {
* 证照类型,1:普通,2:正副本
*/
private Integer classifyType;
/**
* 站点id
*/
private Long siteId;
public CertificateClassifyEntity(){}
/**
* 获取 分类名称
* @return String
*/
public String getClassifyName(){
return classifyName;
}
/**
* 设置 分类名称
* @param classifyName
*/
public void setClassifyName(String classifyName){
this.classifyName = classifyName;
}
/**
* 获取 排序号
* @return Integer
*/
public Integer getSort(){
return sort;
}
/**
* 设置 排序号
* @param sort
*/
public void setSort(Integer sort){
this.sort = sort;
}
/**
* 获取 打印次数
* @return Integer
*/
public Integer getTotal(){
return total;
}
/**
* 设置 打印次数
* @param total
*/
public void setTotal(Integer total){
this.total = total;
}
/**
* 获取 是否首页展示0:否1是
* @return Integer
*/
public Integer getShowFront(){
return showFront;
}
/**
* 设置 是否首页展示0:否1是
* @param showFront
*/
public void setShowFront(Integer showFront){
this.showFront = showFront;
}
/**
* 获取 证照类型,1:普通,2:正副本
* @return Integer
*/
public Integer getClassifyType(){
return classifyType;
}
/**
* 设置 证照类型,1:普通,2:正副本
* @param classifyType
*/
public void setClassifyType(Integer classifyType){
this.classifyType = classifyType;
}
/**
* 获取 站点id
* @return Long
*/
public Long getSiteId(){
return siteId;
}
/**
* 设置 站点id
* @param siteId
*/
public void setSiteId(Long siteId){
this.siteId = siteId;
}
@Override
public int hashCode() {
return this.getId().hashCode();
......@@ -148,29 +59,12 @@ public class CertificateClassifyEntity extends CertificateClassifyVo {
return false;
}
public String toString(){
StringBuilder sb = new StringBuilder("");
sb.append(",classifyName:").append(getClassifyName());
sb.append(",sort:").append(getSort());
sb.append(",total:").append(getTotal());
sb.append(",showFront:").append(getShowFront());
sb.append(",classifyType:").append(getClassifyType());
sb.append(",siteId:").append(getSiteId());
return sb.toString();
}
public void initAttrValue(){
this.siteId = null;
this.classifyName = "";
this.sort = 0;
this.total = 0;
this.showFront = 0;
this.classifyType = 1;
this.siteId = null;
}
}
\ No newline at end of file
package com.mortals.xhx.module.print.model;
package com.mortals.xhx.module.certificate.model;
import java.util.List;
import java.util.ArrayList;
import java.math.BigDecimal;
import cn.hutool.core.date.DateUtil;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.print.model.vo.PrintCatalogVo;
import com.mortals.xhx.module.certificate.model.vo.CertificateDocumentVo;
import lombok.Data;
/**
* 证照目录打印配置实体对象
* 子证配置实体对象
*
* @author zxfei
* @date 2023-05-24
* @date 2024-07-27
*/
@Data
public class PrintCatalogEntity extends PrintCatalogVo {
public class CertificateDocumentEntity extends CertificateDocumentVo {
private static final long serialVersionUID = 1L;
/**
......@@ -21,41 +24,21 @@ public class PrintCatalogEntity extends PrintCatalogVo {
*/
private Long siteId;
/**
* 打印服务配置ID
* 部门id
*/
private Long serviceId;
private Long deptId;
/**
* 证照目录ID
* 部门名称
*/
private Long catalogId;
private String deptName;
/**
* 证照目录编号
* 子证名称
*/
private String catalogCode;
private String documentName;
/**
* 目录名称
* 状态,0:禁用1:启用
*/
private String catalogName;
/**
* 证照目录模板ID
*/
private Long templateId;
/**
* 证照模板名称
*/
private String templateName;
/**
* 打印机名称
*/
private String printerName;
/**
* 打印机网络地址
*/
private String printerIp;
/**
* 打印机纸盒
*/
private String paperSource;
private Integer status;
@Override
public int hashCode() {
return this.getId().hashCode();
......@@ -63,8 +46,8 @@ public class PrintCatalogEntity extends PrintCatalogVo {
@Override
public boolean equals(Object obj) {
if (obj == null) return false;
if (obj instanceof PrintCatalogEntity) {
PrintCatalogEntity tmp = (PrintCatalogEntity) obj;
if (obj instanceof CertificateDocumentEntity) {
CertificateDocumentEntity tmp = (CertificateDocumentEntity) obj;
if (this.getId() == tmp.getId()) {
return true;
}
......@@ -73,25 +56,10 @@ public class PrintCatalogEntity extends PrintCatalogVo {
}
public void initAttrValue(){
this.siteId = -1L;
this.serviceId = -1L;
this.catalogId = -1L;
this.catalogCode = "";
this.catalogName = "";
this.templateId = -1L;
this.templateName = "";
this.printerName = "";
this.printerIp = "";
this.paperSource = "";
this.siteId = null;
this.deptId = null;
this.deptName = "";
this.documentName = "";
this.status = 1;
}
}
\ No newline at end of file
package com.mortals.xhx.module.certificate.model;
import java.util.List;
import java.util.ArrayList;
import java.math.BigDecimal;
import cn.hutool.core.date.DateUtil;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.certificate.model.vo.CertificateIndustryVo;
import lombok.Data;
/**
* 行业目录实体对象
*
* @author zxfei
* @date 2023-05-14
*/
* 行业目录实体对象
*
* @author zxfei
* @date 2024-07-27
*/
@Data
public class CertificateIndustryEntity extends CertificateIndustryVo {
private static final long serialVersionUID = 1L;
/**
* 父级id
*/
private Long parentId;
/**
* 行业名称
*/
private String industryName;
/**
* 站点id
*/
private Long siteId;
public CertificateIndustryEntity(){}
/**
* 获取 父级id
* @return Long
*/
public Long getParentId(){
return parentId;
}
/**
* 设置 父级id
* @param parentId
*/
public void setParentId(Long parentId){
this.parentId = parentId;
}
/**
* 获取 行业名称
* @return String
*/
public String getIndustryName(){
return industryName;
}
/**
* 设置 行业名称
* @param industryName
*/
public void setIndustryName(String industryName){
this.industryName = industryName;
}
/**
* 获取 站点id
* @return Long
* 父级id
*/
public Long getSiteId(){
return siteId;
}
private Long parentId;
/**
* 设置 站点id
* @param siteId
* 行业名称
*/
public void setSiteId(Long siteId){
this.siteId = siteId;
}
private String industryName;
@Override
public int hashCode() {
return this.getId().hashCode();
......@@ -94,20 +47,9 @@ public class CertificateIndustryEntity extends CertificateIndustryVo {
return false;
}
public String toString(){
StringBuilder sb = new StringBuilder("");
sb.append(",parentId:").append(getParentId());
sb.append(",industryName:").append(getIndustryName());
sb.append(",siteId:").append(getSiteId());
return sb.toString();
}
public void initAttrValue(){
this.siteId = null;
this.parentId = null;
this.industryName = "";
this.siteId = null;
}
}
\ No newline at end of file
package com.mortals.xhx.module.certificate.model.vo;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.certificate.model.CertificateCatalogTemplateEntity;
import java.util.ArrayList;
import java.util.List;
import lombok.Data;
import com.mortals.framework.annotation.Excel;
import java.math.BigDecimal;
import java.util.Date;
/**
* 证照目录模板视图对象
*
......
package com.mortals.xhx.module.certificate.model.vo;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.certificate.model.CertificateDocumentEntity;
import java.util.ArrayList;
import java.util.List;
import lombok.Data;
import com.mortals.framework.annotation.Excel;
import java.math.BigDecimal;
import java.util.Date;
/**
* 子证配置视图对象
*
* @author zxfei
* @date 2024-07-27
*/
@Data
public class CertificateDocumentVo extends BaseEntityLong {
/** 序号,主键,自增长列表 */
private List <Long> idList;
}
\ No newline at end of file
package com.mortals.xhx.module.certificate.model.vo;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.certificate.model.DeviceClassifyEntity;
import java.util.ArrayList;
import java.util.List;
import lombok.Data;
/**
* 证照分类设备配置视图对象
......
package com.mortals.xhx.module.certificate.service;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.certificate.model.CertificateCatalogTemplateEntity;
import com.mortals.xhx.module.certificate.dao.CertificateCatalogTemplateDao;
/**
* CertificateCatalogTemplateService
*
* 证照目录模板 service接口
*
* @author zxfei
* @date 2023-05-23
*/
public interface CertificateCatalogTemplateService extends ICRUDService<CertificateCatalogTemplateEntity,Long>{
CertificateCatalogTemplateDao getDao();
}
\ No newline at end of file
package com.mortals.xhx.module.certificate.service;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.certificate.model.CertificateDocumentEntity;
import com.mortals.xhx.module.certificate.dao.CertificateDocumentDao;
/**
* CertificateDocumentService
*
* 子证配置 service接口
*
* @author zxfei
* @date 2024-07-27
*/
public interface CertificateDocumentService extends ICRUDService<CertificateDocumentEntity,Long>{
CertificateDocumentDao getDao();
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment