Commit 9c2d49df authored by 赵啸非's avatar 赵啸非

添加基础配置

parent b93bc9e9
......@@ -2,7 +2,7 @@ package com.mortals.xhx.module.business.dao;
import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.business.model.BusinessLicenseEntity;
import java.util.List;
/**
* 营业执照信息Dao
* 营业执照信息 DAO接口
......
package com.mortals.xhx.module.business.dao.ibatis;
import org.springframework.stereotype.Repository;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import com.mortals.xhx.module.business.dao.BusinessLicenseDao;
import com.mortals.xhx.module.business.model.BusinessLicenseEntity;
import java.util.Date;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List;
import org.springframework.stereotype.Repository;
/**
* 营业执照信息DaoImpl DAO接口
*
......
package com.mortals.xhx.module.business.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.business.model.vo.BusinessLicenseVo;
/**
* 营业执照信息实体对象
......
package com.mortals.xhx.module.business.model;
import java.util.List;
import com.mortals.xhx.module.business.model.BusinessLicenseEntity;
/**
* 营业执照信息查询对象
*
......
package com.mortals.xhx.module.business.model.vo;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.business.model.BusinessLicenseEntity;
import java.util.ArrayList;
import java.util.List;
/**
* 营业执照信息视图对象
*
......
package com.mortals.xhx.module.business.service.impl;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.ap.GlobalSysInfo;
import com.mortals.framework.common.code.ExcuteStatus;
import com.mortals.framework.common.code.TaskExcuteStrategy;
import com.mortals.framework.common.code.TaskInterimExcuteStatus;
import com.mortals.framework.service.ITaskExcuteService;
import com.mortals.framework.springcloud.service.IApplicationStartedService;
import com.mortals.framework.util.DataUtil;
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.framework.util.SystemUtil;
import com.mortals.xhx.base.system.task.model.TaskEntity;
import com.mortals.xhx.base.system.task.model.TaskQuery;
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;
......@@ -26,21 +22,10 @@ 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.checkerframework.checker.units.qual.C;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
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 java.time.LocalDateTime;
import java.util.*;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
/**
* BusinessLicenseService
......
package com.mortals.xhx.module.business.web;
import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.annotation.UnAuth;
import com.mortals.framework.exception.AppException;
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.api.PrintCatalogVO;
import com.mortals.xhx.module.print.model.PrintCatalogEntity;
import com.mortals.xhx.module.print.model.PrintCatalogQuery;
import org.apache.commons.collections4.CollectionUtils;
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 org.springframework.web.bind.annotation.*;
import com.mortals.framework.model.Context;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.module.business.model.BusinessLicenseEntity;
import com.mortals.xhx.module.business.service.BusinessLicenseService;
import org.apache.commons.lang3.ArrayUtils;
import com.mortals.framework.util.StringUtils;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import com.alibaba.fastjson.JSONObject;
import java.util.Arrays;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import static com.mortals.framework.ap.SysConstains.*;
/**
*
* 营业执照信息
......
package com.mortals.xhx.module.business.dao;
import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.business.model.BusinessLicenseEntity;
import java.util.List;
/**
* 行业许可子证Dao
* 行业许可子证 DAO接口
*
* @author zxfei
* @date 2024-07-27
*/
public interface BusinessLicenseDao extends ICRUDDao<BusinessLicenseEntity,Long>{
}
package com.mortals.xhx.module.business.dao;
import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.business.model.BusinessLicenseDatasetEntity;
import java.util.List;
/**
* 行业许可子证数据集Dao
* 行业许可子证数据集 DAO接口
*
* @author zxfei
* @date 2024-07-27
*/
public interface BusinessLicenseDatasetDao extends ICRUDDao<BusinessLicenseDatasetEntity,Long>{
}
package com.mortals.xhx.module.business.dao;
import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.business.model.BusinessLicenseInfoFieldEntity;
import java.util.List;
/**
* 行业许可子证信息字段Dao
* 行业许可子证信息字段 DAO接口
*
* @author zxfei
* @date 2024-07-27
*/
public interface BusinessLicenseInfoFieldDao extends ICRUDDao<BusinessLicenseInfoFieldEntity,Long>{
}
package com.mortals.xhx.module.business.dao;
import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.business.model.BusinessLicenseTempleteFieldEntity;
import java.util.List;
/**
* 行业许可子证模板信息字段Dao
* 行业许可子证模板信息字段 DAO接口
*
* @author zxfei
* @date 2024-07-27
*/
public interface BusinessLicenseTempleteFieldDao extends ICRUDDao<BusinessLicenseTempleteFieldEntity,Long>{
}
package com.mortals.xhx.module.business.dao.ibatis;
import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.business.dao.BusinessLicenseDao;
import com.mortals.xhx.module.business.model.BusinessLicenseEntity;
import java.util.Date;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List;
/**
* 行业许可子证DaoImpl DAO接口
*
* @author zxfei
* @date 2024-07-27
*/
@Repository("businessLicenseDao")
public class BusinessLicenseDaoImpl extends BaseCRUDDaoMybatis<BusinessLicenseEntity,Long> implements BusinessLicenseDao {
}
package com.mortals.xhx.module.business.dao.ibatis;
import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.business.dao.BusinessLicenseDatasetDao;
import com.mortals.xhx.module.business.model.BusinessLicenseDatasetEntity;
import java.util.Date;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List;
/**
* 行业许可子证数据集DaoImpl DAO接口
*
* @author zxfei
* @date 2024-07-27
*/
@Repository("businessLicenseDatasetDao")
public class BusinessLicenseDatasetDaoImpl extends BaseCRUDDaoMybatis<BusinessLicenseDatasetEntity,Long> implements BusinessLicenseDatasetDao {
}
package com.mortals.xhx.module.business.dao.ibatis;
import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.business.dao.BusinessLicenseInfoFieldDao;
import com.mortals.xhx.module.business.model.BusinessLicenseInfoFieldEntity;
import java.util.Date;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List;
/**
* 行业许可子证信息字段DaoImpl DAO接口
*
* @author zxfei
* @date 2024-07-27
*/
@Repository("businessLicenseInfoFieldDao")
public class BusinessLicenseInfoFieldDaoImpl extends BaseCRUDDaoMybatis<BusinessLicenseInfoFieldEntity,Long> implements BusinessLicenseInfoFieldDao {
}
package com.mortals.xhx.module.business.dao.ibatis;
import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.business.dao.BusinessLicenseTempleteFieldDao;
import com.mortals.xhx.module.business.model.BusinessLicenseTempleteFieldEntity;
import java.util.Date;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List;
/**
* 行业许可子证模板信息字段DaoImpl DAO接口
*
* @author zxfei
* @date 2024-07-27
*/
@Repository("businessLicenseTempleteFieldDao")
public class BusinessLicenseTempleteFieldDaoImpl extends BaseCRUDDaoMybatis<BusinessLicenseTempleteFieldEntity,Long> implements BusinessLicenseTempleteFieldDao {
}
package com.mortals.xhx.module.business.model;
import java.util.List;
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.business.model.vo.BusinessLicenseDatasetVo;
import com.mortals.xhx.module.business.model.BusinessLicenseInfoFieldEntity;
import lombok.Data;
/**
* 行业许可子证数据集实体对象
*
* @author zxfei
* @date 2024-07-27
*/
@Data
public class BusinessLicenseDatasetEntity extends BusinessLicenseDatasetVo {
private static final long serialVersionUID = 1L;
/**
* 许可子证Id
*/
private Long subLicenseId;
/**
* 行业许可子证信息字段信息
*/
private List<BusinessLicenseInfoFieldEntity> businessLicenseInfoFieldList=new ArrayList<>();;
public List<BusinessLicenseInfoFieldEntity> getBusinessLicenseInfoFieldList(){
return businessLicenseInfoFieldList;
}
public void setBusinessLicenseInfoFieldList(List<BusinessLicenseInfoFieldEntity> businessLicenseInfoFieldList){
this.businessLicenseInfoFieldList = businessLicenseInfoFieldList;
}
@Override
public int hashCode() {
return this.getId().hashCode();
}
@Override
public boolean equals(Object obj) {
if (obj == null) return false;
if (obj instanceof BusinessLicenseDatasetEntity) {
BusinessLicenseDatasetEntity tmp = (BusinessLicenseDatasetEntity) obj;
if (this.getId() == tmp.getId()) {
return true;
}
}
return false;
}
public void initAttrValue(){
this.subLicenseId = null;
}
}
\ No newline at end of file
package com.mortals.xhx.module.business.model;
import java.util.List;
import java.util.Date;
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.business.model.vo.BusinessLicenseVo;
import com.mortals.xhx.module.business.model.BusinessLicenseDatasetEntity;
import lombok.Data;
/**
* 行业许可子证实体对象
*
* @author zxfei
* @date 2024-07-27
*/
@Data
public class BusinessLicenseEntity extends BusinessLicenseVo {
private static final long serialVersionUID = 1L;
/**
* 市场主体名称
*/
private String marketEntityName;
/**
* 许可证编号
*/
private String licenseCode;
/**
* 法定代表人(负责人)
*/
private String legalPersonName;
/**
* 统一社会信用代码
*/
private String creditCode;
/**
* 制证日期
*/
private Date productLicenseTime;
/**
* 证件二维码
*/
private String certQRCode;
/**
* 链接地址
*/
private String url;
/**
* 制证机关
*/
private String certAuthority;
/**
* 经营场所
*/
private String businessPlace;
/**
* 许可项目
*/
private String licensedItems;
/**
* 文件名称
*/
private String fileName;
/**
* 文件相对路径地址
*/
private String filePath;
/**
* 简介
*/
private String summary;
/**
* 备注
*/
private String remark;
/**
* 行业许可子证数据集信息
*/
private List<BusinessLicenseDatasetEntity> businessLicenseDatasetList=new ArrayList<>();;
public List<BusinessLicenseDatasetEntity> getBusinessLicenseDatasetList(){
return businessLicenseDatasetList;
}
public void setBusinessLicenseDatasetList(List<BusinessLicenseDatasetEntity> businessLicenseDatasetList){
this.businessLicenseDatasetList = businessLicenseDatasetList;
}
@Override
public int hashCode() {
return this.getId().hashCode();
}
@Override
public boolean equals(Object obj) {
if (obj == null) return false;
if (obj instanceof BusinessLicenseEntity) {
BusinessLicenseEntity tmp = (BusinessLicenseEntity) obj;
if (this.getId() == tmp.getId()) {
return true;
}
}
return false;
}
public void initAttrValue(){
this.marketEntityName = "";
this.licenseCode = "";
this.legalPersonName = "";
this.creditCode = "";
this.productLicenseTime = null;
this.certQRCode = "";
this.url = "";
this.certAuthority = "";
this.businessPlace = "";
this.licensedItems = "";
this.fileName = "";
this.filePath = "";
this.summary = "";
this.remark = "";
}
}
\ No newline at end of file
package com.mortals.xhx.module.business.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.business.model.vo.BusinessLicenseInfoFieldVo;
import lombok.Data;
/**
* 行业许可子证信息字段实体对象
*
* @author zxfei
* @date 2024-07-27
*/
@Data
public class BusinessLicenseInfoFieldEntity extends BusinessLicenseInfoFieldVo {
private static final long serialVersionUID = 1L;
/**
* 子证数据集Id
*/
private Long datasetId;
/**
* 字段编码
*/
private String fieldCode;
/**
* 字段名称
*/
private String fieldName;
/**
* 字段类型(input.单行输入框,textarea.多行输入框,SELECT.下拉选项框,date.日期选择框)
*/
private String fieldType;
/**
* 字段类型值,当字段类型为多选,单选时候,预设复选值
*/
private String fieldTypeValue;
/**
* 数据类型(number.数字,string.字符串)
*/
private String dataType;
/**
* 字段值
*/
private String fieldValue;
/**
* 字段默认值
*/
private String defaultValue;
/**
* 数据长度,默认128
*/
private Integer fieldLen;
/**
* 是否允许为空,(0.否,1.是)
*/
private Integer fieldNull;
/**
* 字段是否列表显示(0.否,1.是)
*/
private Integer isList;
/**
* 排序号
*/
private Integer fieldOrderNo;
/**
* 事件服务接口请求地址
*/
private String serviceApi;
/**
* 事件服务接口请求参数
*/
private String serviceApiParams;
/**
* 备注
*/
private String remark;
@Override
public int hashCode() {
return this.getId().hashCode();
}
@Override
public boolean equals(Object obj) {
if (obj == null) return false;
if (obj instanceof BusinessLicenseInfoFieldEntity) {
BusinessLicenseInfoFieldEntity tmp = (BusinessLicenseInfoFieldEntity) obj;
if (this.getId() == tmp.getId()) {
return true;
}
}
return false;
}
public void initAttrValue(){
this.datasetId = null;
this.fieldCode = "";
this.fieldName = "";
this.fieldType = "";
this.fieldTypeValue = "";
this.dataType = "string";
this.fieldValue = "";
this.defaultValue = "";
this.fieldLen = 128;
this.fieldNull = 1;
this.isList = 0;
this.fieldOrderNo = 0;
this.serviceApi = "";
this.serviceApiParams = "";
this.remark = "";
}
}
\ No newline at end of file
package com.mortals.xhx.module.business.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.business.model.vo.BusinessLicenseTempleteFieldVo;
import lombok.Data;
/**
* 行业许可子证模板信息字段实体对象
*
* @author zxfei
* @date 2024-07-27
*/
@Data
public class BusinessLicenseTempleteFieldEntity extends BusinessLicenseTempleteFieldVo {
private static final long serialVersionUID = 1L;
/**
* 许可子证Id
*/
private Long subLicenseId;
/**
* 字段编码
*/
private String fieldCode;
/**
* 字段名称
*/
private String fieldName;
/**
* 字段类型(input.单行输入框,textarea.多行输入框,SELECT.下拉选项框,date.日期选择框,editer.富文本)
*/
private String fieldType;
/**
* 字段类型值,当字段类型为多选,单选时候,预设复选值
*/
private String fieldTypeValue;
/**
* 数据类型(number.数字,string.字符串)
*/
private String dataType;
/**
* 字段值
*/
private String fieldValue;
/**
* 字段默认值
*/
private String defaultValue;
/**
* 数据长度,默认128
*/
private Integer fieldLen;
/**
* 是否允许为空,(0.否,1.是)
*/
private Integer fieldNull;
/**
* 字段是否列表显示(0.否,1.是)
*/
private Integer isList;
/**
* 排序号
*/
private Integer fieldOrderNo;
/**
* 事件服务接口请求地址
*/
private String serviceApi;
/**
* 事件服务接口请求参数
*/
private String serviceApiParams;
/**
* 备注
*/
private String remark;
@Override
public int hashCode() {
return this.getId().hashCode();
}
@Override
public boolean equals(Object obj) {
if (obj == null) return false;
if (obj instanceof BusinessLicenseTempleteFieldEntity) {
BusinessLicenseTempleteFieldEntity tmp = (BusinessLicenseTempleteFieldEntity) obj;
if (this.getId() == tmp.getId()) {
return true;
}
}
return false;
}
public void initAttrValue(){
this.subLicenseId = null;
this.fieldCode = "";
this.fieldName = "";
this.fieldType = "";
this.fieldTypeValue = "";
this.dataType = "string";
this.fieldValue = "";
this.defaultValue = "";
this.fieldLen = 128;
this.fieldNull = 1;
this.isList = 0;
this.fieldOrderNo = 0;
this.serviceApi = "";
this.serviceApiParams = "";
this.remark = "";
}
}
\ No newline at end of file
package com.mortals.xhx.module.business.model.vo;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.business.model.BusinessLicenseDatasetEntity;
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 BusinessLicenseDatasetVo extends BaseEntityLong {
/** 主键ID,主键,自增长列表 */
private List <Long> idList;
}
\ No newline at end of file
package com.mortals.xhx.module.business.model.vo;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.business.model.BusinessLicenseInfoFieldEntity;
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 BusinessLicenseInfoFieldVo extends BaseEntityLong {
/** 序号,主键,自增长列表 */
private List <Long> idList;
}
\ No newline at end of file
package com.mortals.xhx.module.business.model.vo;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.business.model.BusinessLicenseTempleteFieldEntity;
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 BusinessLicenseTempleteFieldVo extends BaseEntityLong {
/** 序号,主键,自增长列表 */
private List <Long> idList;
}
\ No newline at end of file
package com.mortals.xhx.module.business.model.vo;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.business.model.BusinessLicenseEntity;
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 BusinessLicenseVo extends BaseEntityLong {
/** 主键ID,主键,自增长列表 */
private List <Long> idList;
}
\ 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.BusinessLicenseDatasetEntity;
import com.mortals.xhx.module.business.dao.BusinessLicenseDatasetDao;
/**
* BusinessLicenseDatasetService
*
* 行业许可子证数据集 service接口
*
* @author zxfei
* @date 2024-07-27
*/
public interface BusinessLicenseDatasetService extends ICRUDService<BusinessLicenseDatasetEntity,Long>{
BusinessLicenseDatasetDao getDao();
}
\ 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.BusinessLicenseInfoFieldEntity;
import com.mortals.xhx.module.business.dao.BusinessLicenseInfoFieldDao;
/**
* BusinessLicenseInfoFieldService
*
* 行业许可子证信息字段 service接口
*
* @author zxfei
* @date 2024-07-27
*/
public interface BusinessLicenseInfoFieldService extends ICRUDService<BusinessLicenseInfoFieldEntity,Long>{
BusinessLicenseInfoFieldDao getDao();
}
\ 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;
import com.mortals.xhx.module.business.dao.BusinessLicenseDao;
/**
* BusinessLicenseService
*
* 行业许可子证 service接口
*
* @author zxfei
* @date 2024-07-27
*/
public interface BusinessLicenseService extends ICRUDService<BusinessLicenseEntity,Long>{
BusinessLicenseDao getDao();
}
\ 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.BusinessLicenseTempleteFieldEntity;
import com.mortals.xhx.module.business.dao.BusinessLicenseTempleteFieldDao;
/**
* BusinessLicenseTempleteFieldService
*
* 行业许可子证模板信息字段 service接口
*
* @author zxfei
* @date 2024-07-27
*/
public interface BusinessLicenseTempleteFieldService extends ICRUDService<BusinessLicenseTempleteFieldEntity,Long>{
BusinessLicenseTempleteFieldDao getDao();
}
\ No newline at end of file
package com.mortals.xhx.module.business.service.impl;
import org.springframework.beans.BeanUtils;
import java.util.function.Function;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.xhx.module.business.dao.BusinessLicenseDatasetDao;
import com.mortals.xhx.module.business.model.BusinessLicenseDatasetEntity;
import com.mortals.xhx.module.business.service.BusinessLicenseDatasetService;
import org.springframework.beans.factory.annotation.Autowired;
import com.mortals.xhx.module.business.model.BusinessLicenseInfoFieldEntity;
import com.mortals.xhx.module.business.model.BusinessLicenseInfoFieldQuery;
import com.mortals.xhx.module.business.service.BusinessLicenseInfoFieldService;
import org.springframework.util.ObjectUtils;
import java.util.Date;
import java.util.Arrays;
import java.util.List;
import lombok.extern.slf4j.Slf4j;
/**
* BusinessLicenseDatasetService
* 行业许可子证数据集 service实现
*
* @author zxfei
* @date 2024-07-27
*/
@Service("businessLicenseDatasetService")
@Slf4j
public class BusinessLicenseDatasetServiceImpl extends AbstractCRUDServiceImpl<BusinessLicenseDatasetDao, BusinessLicenseDatasetEntity, Long> implements BusinessLicenseDatasetService {
@Autowired
private BusinessLicenseInfoFieldService businessLicenseInfoFieldService;
@Override
protected void findAfter(BusinessLicenseDatasetEntity params,PageInfo pageInfo, Context context, List<BusinessLicenseDatasetEntity> list) throws AppException {
fillSubData(list);
super.findAfter(params,pageInfo, context, list);
}
@Override
protected void findAfter(BusinessLicenseDatasetEntity params, Context context, List<BusinessLicenseDatasetEntity> list) throws AppException {
fillSubData(list);
super.findAfter(params, context, list);
}
private void fillSubData(List<BusinessLicenseDatasetEntity> list) {
List<Long> idList = list.stream().map(i -> i.getId()).collect(Collectors.toList());
BusinessLicenseInfoFieldQuery businessLicenseInfoFieldQuery = new BusinessLicenseInfoFieldQuery();
businessLicenseInfoFieldQuery.setDatasetIdList(idList);
Map<Long, List<BusinessLicenseInfoFieldEntity>> businessLicenseInfoFieldListMap = businessLicenseInfoFieldService.find(businessLicenseInfoFieldQuery).stream().collect(Collectors.groupingBy(BusinessLicenseInfoFieldEntity::getDatasetId));
list.forEach(item -> item.setBusinessLicenseInfoFieldList(businessLicenseInfoFieldListMap.get(item.getId())));
}
@Override
protected void saveAfter(BusinessLicenseDatasetEntity entity, Context context) throws AppException {
if(!ObjectUtils.isEmpty(entity.getBusinessLicenseInfoFieldList())){
entity.getBusinessLicenseInfoFieldList().stream().peek(item->{
item.setDatasetId(entity.getId());
item.setCreateUserId(this.getContextUserId(context));
item.setCreateTime(new Date());
}).count();
businessLicenseInfoFieldService.save(entity.getBusinessLicenseInfoFieldList());
}
super.saveAfter(entity, context);
}
@Override
protected void updateAfter(BusinessLicenseDatasetEntity entity, Context context) throws AppException {
if(!ObjectUtils.isEmpty(entity.getBusinessLicenseInfoFieldList())){
Long[] businessLicenseInfoFieldIds = businessLicenseInfoFieldService.find(new BusinessLicenseInfoFieldQuery().datasetId(entity.getId())).stream().map(BusinessLicenseInfoFieldEntity::getId).toArray(Long[]::new);
businessLicenseInfoFieldService.remove(businessLicenseInfoFieldIds,context);
entity.getBusinessLicenseInfoFieldList().stream().peek(item ->{
item.setDatasetId(entity.getId());
item.setCreateUserId(this.getContextUserId(context));
item.setCreateTime(new Date());
item.setUpdateUserId(this.getContextUserId(context));
item.setUpdateTime(new Date());
}).count();
businessLicenseInfoFieldService.save(entity.getBusinessLicenseInfoFieldList());
}
super.updateAfter(entity, context);
}
@Override
protected void removeAfter(Long[] ids, Context context, int result) throws AppException {
List<BusinessLicenseInfoFieldEntity> businessLicenseInfoFieldlist = businessLicenseInfoFieldService.find(new BusinessLicenseInfoFieldQuery().datasetIdList(Arrays.asList(ids)));
businessLicenseInfoFieldService.removeList(businessLicenseInfoFieldlist,context);
super.removeAfter(ids, context, result);
}
}
\ No newline at end of file
package com.mortals.xhx.module.business.service.impl;
import org.springframework.beans.BeanUtils;
import java.util.function.Function;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.xhx.module.business.dao.BusinessLicenseInfoFieldDao;
import com.mortals.xhx.module.business.model.BusinessLicenseInfoFieldEntity;
import com.mortals.xhx.module.business.service.BusinessLicenseInfoFieldService;
import lombok.extern.slf4j.Slf4j;
/**
* BusinessLicenseInfoFieldService
* 行业许可子证信息字段 service实现
*
* @author zxfei
* @date 2024-07-27
*/
@Service("businessLicenseInfoFieldService")
@Slf4j
public class BusinessLicenseInfoFieldServiceImpl extends AbstractCRUDServiceImpl<BusinessLicenseInfoFieldDao, BusinessLicenseInfoFieldEntity, Long> implements BusinessLicenseInfoFieldService {
}
\ No newline at end of file
package com.mortals.xhx.module.business.service.impl;
import org.springframework.beans.BeanUtils;
import java.util.function.Function;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.xhx.module.business.dao.BusinessLicenseTempleteFieldDao;
import com.mortals.xhx.module.business.model.BusinessLicenseTempleteFieldEntity;
import com.mortals.xhx.module.business.service.BusinessLicenseTempleteFieldService;
import lombok.extern.slf4j.Slf4j;
/**
* BusinessLicenseTempleteFieldService
* 行业许可子证模板信息字段 service实现
*
* @author zxfei
* @date 2024-07-27
*/
@Service("businessLicenseTempleteFieldService")
@Slf4j
public class BusinessLicenseTempleteFieldServiceImpl extends AbstractCRUDServiceImpl<BusinessLicenseTempleteFieldDao, BusinessLicenseTempleteFieldEntity, Long> implements BusinessLicenseTempleteFieldService {
}
\ 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