Merge remote-tracking branch 'origin/cc_partner_init' into cc_partner_init
This commit is contained in:
@@ -6,7 +6,8 @@ public enum AuditTypeEnum {
|
|||||||
OPENING_OPERATION_PLAN(2, "开业运营方案"),
|
OPENING_OPERATION_PLAN(2, "开业运营方案"),
|
||||||
LICENSE_APPROVAL(3, "证照审批"),
|
LICENSE_APPROVAL(3, "证照审批"),
|
||||||
SYS_BUILD(4, "系统建店"),
|
SYS_BUILD(4, "系统建店"),
|
||||||
|
SITE_SELECTION(5, "选址"),
|
||||||
|
UPLOAD_RENT_CONTRACT(6, "上传租赁合同"),
|
||||||
;
|
;
|
||||||
|
|
||||||
private Integer code;
|
private Integer code;
|
||||||
|
|||||||
@@ -164,6 +164,8 @@ public enum ErrorCodeEnum {
|
|||||||
|
|
||||||
LINE_PAY_FALSE(109005, "付款信息查询失败",null),
|
LINE_PAY_FALSE(109005, "付款信息查询失败",null),
|
||||||
|
|
||||||
|
LICENSE_NOT_EXIST(109006, "证照不存在",null),
|
||||||
|
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,55 @@
|
|||||||
|
package com.cool.store.dao;
|
||||||
|
|
||||||
|
import com.cool.store.entity.ShopAuditInfoDO;
|
||||||
|
import com.cool.store.mapper.ShopAuditInfoMapper;
|
||||||
|
import com.google.common.collect.Lists;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhangchenbiao
|
||||||
|
* @FileName: ShopAuditInfoDAO
|
||||||
|
* @Description:
|
||||||
|
* @date 2024-04-24 17:30
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public class ShopAuditInfoDAO {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ShopAuditInfoMapper shopAuditInfoMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增审核信息
|
||||||
|
* @param auditInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Long addAuditInfo(ShopAuditInfoDO auditInfo) {
|
||||||
|
shopAuditInfoMapper.insertSelective(auditInfo);
|
||||||
|
return auditInfo.getId();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取单个审核信息
|
||||||
|
* @param auditId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public ShopAuditInfoDO getAuditInfo(Long auditId) {
|
||||||
|
return shopAuditInfoMapper.selectByPrimaryKey(auditId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量获取审核信息
|
||||||
|
* @param auditIds
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<ShopAuditInfoDO> getAuditInfoList(List<Long> auditIds) {
|
||||||
|
if(CollectionUtils.isEmpty(auditIds)){
|
||||||
|
return Lists.newArrayList();
|
||||||
|
}
|
||||||
|
return shopAuditInfoMapper.getAuditInfoList(auditIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package com.cool.store.mapper;
|
||||||
|
|
||||||
|
import com.cool.store.entity.LicenseTransactDO;
|
||||||
|
import com.cool.store.request.LicenseListRequest;
|
||||||
|
import com.cool.store.response.LicenseListResponse;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import tk.mybatis.mapper.common.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface ApplyLicenseMapper extends Mapper<LicenseTransactDO> {
|
||||||
|
|
||||||
|
List<LicenseListResponse> licenseList(@Param("request") LicenseListRequest request);
|
||||||
|
}
|
||||||
@@ -4,6 +4,10 @@ import com.cool.store.entity.ShopAuditInfoDO;
|
|||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import tk.mybatis.mapper.common.Mapper;
|
import tk.mybatis.mapper.common.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public interface ShopAuditInfoMapper extends Mapper<ShopAuditInfoDO> {
|
public interface ShopAuditInfoMapper extends Mapper<ShopAuditInfoDO> {
|
||||||
ShopAuditInfoDO selectBykeyAndType(@Param("shopId") Long shopId);
|
ShopAuditInfoDO selectBykeyAndType(@Param("shopId") Long shopId);
|
||||||
|
|
||||||
|
List<ShopAuditInfoDO> getAuditInfoList(@Param("auditIds") List<Long> auditIds);
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.cool.store.mapper.ApplyLicenseMapper">
|
||||||
|
|
||||||
|
|
||||||
|
<select id="licenseList" resultType="com.cool.store.response.LicenseListResponse">
|
||||||
|
select
|
||||||
|
s.shop_name as storeName,
|
||||||
|
s.store_num as storeNum,
|
||||||
|
s.shop_manager_user_id as shopManagerUserId,
|
||||||
|
l.username as franchiseeName,
|
||||||
|
l.mobile as franchiseeMobile,
|
||||||
|
l.region_id AS fightRegionId,
|
||||||
|
l.investment_manager AS investmentManager,
|
||||||
|
s.supervisor_user_id AS supervisorUserId,
|
||||||
|
o.create_time as submitTime,
|
||||||
|
o.submit_status as status
|
||||||
|
FROM
|
||||||
|
xfsg_license_transact o
|
||||||
|
LEFT JOIN xfsg_shop_info s ON o.shop_id = s.id
|
||||||
|
LEFT JOIN xfsg_line_info l ON l.id = s.line_id
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
@@ -17,6 +17,7 @@
|
|||||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
<result column="deleted" jdbcType="BIT" property="deleted" />
|
<result column="deleted" jdbcType="BIT" property="deleted" />
|
||||||
|
<result column="data_type" jdbcType="TINYINT" property="dataType" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<select id="selectBykeyAndType" resultType="com.cool.store.entity.ShopAuditInfoDO">
|
<select id="selectBykeyAndType" resultType="com.cool.store.entity.ShopAuditInfoDO">
|
||||||
select *
|
select *
|
||||||
@@ -25,4 +26,13 @@
|
|||||||
and audit_type = 4
|
and audit_type = 4
|
||||||
and deleted = 0
|
and deleted = 0
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getAuditInfoList" resultType="com.cool.store.entity.ShopAuditInfoDO">
|
||||||
|
select *
|
||||||
|
from xfsg_shop_audit_info
|
||||||
|
where id in
|
||||||
|
<foreach collection="auditIds" item="auditId" open="(" separator="," close=")">
|
||||||
|
#{auditId}
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
package com.cool.store.entity;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.persistence.*;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Table(name = "xfsg_license_transact")
|
||||||
|
@Data
|
||||||
|
public class LicenseTransactDO {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private Long id;
|
||||||
|
@Column(name = "shop_id")
|
||||||
|
private Long shopId;
|
||||||
|
@Column(name = "business_license")
|
||||||
|
private String businessLicense;
|
||||||
|
@Column(name = "license_type")
|
||||||
|
private Integer licenseType;
|
||||||
|
@Column(name = "license_legal_person")
|
||||||
|
private String licenseLegalPerson;
|
||||||
|
@Column(name = "credit_code")
|
||||||
|
private String creditCode;
|
||||||
|
@Column(name = "credit_url")
|
||||||
|
private String creditUrl;
|
||||||
|
@Column(name = "license_address")
|
||||||
|
private String licenseAddress;
|
||||||
|
@Column(name = "issueTime")
|
||||||
|
private Date issueTime;
|
||||||
|
@Column(name = "validity")
|
||||||
|
private Date validity;
|
||||||
|
@Column(name = "id_card_positive_credit_url")
|
||||||
|
private String idCardPositiveCreditUrl;
|
||||||
|
@Column(name = "id_card_negative_credit_url")
|
||||||
|
private String idCardNegativeCreditUrl;
|
||||||
|
@Column(name = "food_business_license_code")
|
||||||
|
private String foodBusinessLicenseCode;
|
||||||
|
@Column(name = "main_business")
|
||||||
|
private String mainBusiness;
|
||||||
|
@Column(name = "operator")
|
||||||
|
private String operator;
|
||||||
|
@Column(name = "food_license_legal_person")
|
||||||
|
private String foodLicenseLegalPerson;
|
||||||
|
@Column(name = "business_project")
|
||||||
|
private String businessProject;
|
||||||
|
@Column(name = "food_license_address")
|
||||||
|
private String foodLicenseAddress;
|
||||||
|
@Column(name = "food_business_start_time")
|
||||||
|
private Date foodBusinessStartTime;
|
||||||
|
@Column(name = "food_business_end_time")
|
||||||
|
private Date foodBusinessEndTime;
|
||||||
|
@Column(name = "food_business_license_url")
|
||||||
|
private String foodBusinessLicenseUrl;
|
||||||
|
@Column(name = "remark")
|
||||||
|
private String remark;
|
||||||
|
@Column(name = "remark_url")
|
||||||
|
private String remarkUrl;
|
||||||
|
@Column(name = "submit_status")
|
||||||
|
private Integer submitStatus;
|
||||||
|
@Column(name = "create_time")
|
||||||
|
private Date createTime;
|
||||||
|
@Column(name = "update_time")
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -74,6 +74,9 @@ public class ShopAuditInfoDO {
|
|||||||
*/
|
*/
|
||||||
private Boolean deleted;
|
private Boolean deleted;
|
||||||
|
|
||||||
|
@Column(name = "data_type")
|
||||||
|
private Integer dataType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return id
|
* @return id
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
package com.cool.store.request;
|
package com.cool.store.request;
|
||||||
|
|
||||||
import com.cool.store.entity.LineAuditInfoDO;
|
import com.cool.store.entity.LineAuditInfoDO;
|
||||||
|
import com.cool.store.entity.ShopAuditInfoDO;
|
||||||
import com.cool.store.enums.AuditResultTypeEnum;
|
import com.cool.store.enums.AuditResultTypeEnum;
|
||||||
|
import com.cool.store.enums.AuditTypeEnum;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -27,18 +29,24 @@ public class AuditRentContractRequest {
|
|||||||
@ApiModelProperty("原因")
|
@ApiModelProperty("原因")
|
||||||
private String reason;
|
private String reason;
|
||||||
|
|
||||||
public static LineAuditInfoDO convert(AuditRentContractRequest request, String partnerId, Long lineId){
|
@ApiModelProperty(value = "操作人id", hidden = true)
|
||||||
LineAuditInfoDO result = new LineAuditInfoDO();
|
private String operateUserId;
|
||||||
result.setPartnerId(partnerId);
|
|
||||||
result.setLineId(lineId);
|
@ApiModelProperty(value = "操作人姓名", hidden = true)
|
||||||
|
private String operateUserName;
|
||||||
|
|
||||||
|
public static ShopAuditInfoDO convert(AuditRentContractRequest request, AuditTypeEnum auditType){
|
||||||
|
ShopAuditInfoDO result = new ShopAuditInfoDO();
|
||||||
|
result.setShopId(request.getShopId());
|
||||||
|
result.setAuditType(auditType.getCode());
|
||||||
|
result.setSubmittedUserId(request.getOperateUserId());
|
||||||
|
result.setSubmittedUserName(request.getOperateUserName());
|
||||||
result.setResultType(request.getResultType());
|
result.setResultType(request.getResultType());
|
||||||
if(AuditResultTypeEnum.PASS.getCode().equals(request.getResultType())){
|
if(AuditResultTypeEnum.PASS.getCode().equals(request.getResultType())){
|
||||||
result.setResultType(AuditResultTypeEnum.PASS.getCode());
|
result.setResultType(AuditResultTypeEnum.PASS.getCode());
|
||||||
}else{
|
}else{
|
||||||
result.setPassReason(request.getReason());
|
result.setRejectReason(request.getReason());
|
||||||
result.setRejectRealReason(request.getReason());
|
|
||||||
}
|
}
|
||||||
result.setRejectPublicReason(request.getReason());
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package com.cool.store.request;
|
||||||
|
|
||||||
|
import com.cool.store.common.PageBasicInfo;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel("证照审批列表请求体")
|
||||||
|
public class LicenseListRequest extends PageBasicInfo {
|
||||||
|
|
||||||
|
@ApiModelProperty("门店名称")
|
||||||
|
private String storeName;
|
||||||
|
@ApiModelProperty("提交申请时间")
|
||||||
|
private Long submitStartTime;
|
||||||
|
@ApiModelProperty("提交申请时间")
|
||||||
|
private Long submitEndTime;
|
||||||
|
@ApiModelProperty("所属区域")
|
||||||
|
private String regionId;
|
||||||
|
@ApiModelProperty("审核状态 1:待通过 2:未通过 3:已通过")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.cool.store.request;
|
package com.cool.store.request;
|
||||||
|
|
||||||
|
import com.cool.store.entity.LicenseTransactDO;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -9,6 +10,12 @@ import java.util.Date;
|
|||||||
@Data
|
@Data
|
||||||
@ApiModel("提交证照办理请求体")
|
@ApiModel("提交证照办理请求体")
|
||||||
public class SubmitLicenseRequest {
|
public class SubmitLicenseRequest {
|
||||||
|
|
||||||
|
@ApiModelProperty("主键id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
private Long shopId;
|
||||||
|
|
||||||
@ApiModelProperty("营业执照拍照上传")
|
@ApiModelProperty("营业执照拍照上传")
|
||||||
private String licenseUrl;
|
private String licenseUrl;
|
||||||
|
|
||||||
@@ -31,7 +38,7 @@ public class SubmitLicenseRequest {
|
|||||||
private String licenseAddress;
|
private String licenseAddress;
|
||||||
|
|
||||||
@ApiModelProperty("有效期")
|
@ApiModelProperty("有效期")
|
||||||
private Object validity;
|
private Date validity;
|
||||||
|
|
||||||
|
|
||||||
@ApiModelProperty("法人双手持身份证正面+营业执照")
|
@ApiModelProperty("法人双手持身份证正面+营业执照")
|
||||||
@@ -72,4 +79,50 @@ public class SubmitLicenseRequest {
|
|||||||
|
|
||||||
@ApiModelProperty("备注图片")
|
@ApiModelProperty("备注图片")
|
||||||
private String remarkUrl;
|
private String remarkUrl;
|
||||||
|
|
||||||
|
@ApiModelProperty("0:保存 1:提交到待审核 2:未通过 3:已通过 ")
|
||||||
|
private Integer submitStatus;
|
||||||
|
|
||||||
|
|
||||||
|
public LicenseTransactDO toLicenseTransactDO() {
|
||||||
|
LicenseTransactDO licenseTransactDO = new LicenseTransactDO();
|
||||||
|
licenseTransactDO.setLicenseType(this.licenseType);
|
||||||
|
licenseTransactDO.setLicenseLegalPerson(this.licenseLegalPerson);
|
||||||
|
licenseTransactDO.setLicenseAddress(this.licenseAddress);
|
||||||
|
licenseTransactDO.setIssueTime(this.issueTime);
|
||||||
|
licenseTransactDO.setMainBusiness(this.mainBusiness);
|
||||||
|
licenseTransactDO.setOperator(this.operator);
|
||||||
|
licenseTransactDO.setFoodLicenseLegalPerson(this.foodLicenseLegalPerson);
|
||||||
|
licenseTransactDO.setBusinessProject(this.businessProject);
|
||||||
|
licenseTransactDO.setRemark(this.remark);
|
||||||
|
licenseTransactDO.setRemarkUrl(this.remarkUrl);
|
||||||
|
// Not mapped LicenseTransactDO fields:
|
||||||
|
// shopId
|
||||||
|
licenseTransactDO.setShopId(this.shopId);
|
||||||
|
// businessLicense
|
||||||
|
licenseTransactDO.setBusinessLicense(this.licenseName);
|
||||||
|
// creditCode
|
||||||
|
licenseTransactDO.setCreditCode(this.socialCreditCode);
|
||||||
|
// creditUrl
|
||||||
|
licenseTransactDO.setCreditUrl(this.licenseUrl);
|
||||||
|
// validity
|
||||||
|
licenseTransactDO.setValidity(this.validity);
|
||||||
|
// idCardPositiveCreditUrl
|
||||||
|
licenseTransactDO.setIdCardPositiveCreditUrl(this.idCardAndLicense1);
|
||||||
|
// idCardNegativeCreditUrl
|
||||||
|
licenseTransactDO.setIdCardNegativeCreditUrl(this.idCardAndLicense2);
|
||||||
|
// foodBusinessLicenseCode
|
||||||
|
licenseTransactDO.setFoodBusinessLicenseCode(this.foodLicenseCode);
|
||||||
|
// foodLicenseAddress
|
||||||
|
licenseTransactDO.setFoodLicenseAddress(this.businessPremises);
|
||||||
|
// foodBusinessStartTime
|
||||||
|
licenseTransactDO.setFoodBusinessStartTime(this.foodLicenseStartTime);
|
||||||
|
// foodBusinessEndTime
|
||||||
|
licenseTransactDO.setFoodBusinessEndTime(this.foodLicenseEndTime);
|
||||||
|
// foodBusinessLicenseUrl
|
||||||
|
licenseTransactDO.setFoodBusinessLicenseUrl(this.getFoodLicenseUrl());
|
||||||
|
// submitStatus
|
||||||
|
licenseTransactDO.setSubmitStatus(this.submitStatus);
|
||||||
|
return licenseTransactDO;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,46 @@
|
|||||||
|
package com.cool.store.response;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel("证照审批列表响应体")
|
||||||
|
public class LicenseListResponse {
|
||||||
|
@ApiModelProperty("门店名称")
|
||||||
|
private String storeName;
|
||||||
|
@ApiModelProperty("门店编码")
|
||||||
|
private String storeNum;
|
||||||
|
@ApiModelProperty("开店负责人id")
|
||||||
|
private String shopManagerUserId;
|
||||||
|
@ApiModelProperty("开店负责人姓名")
|
||||||
|
private String shopManagerUserName;
|
||||||
|
@ApiModelProperty("加盟商姓名")
|
||||||
|
private String franchiseeName;
|
||||||
|
@ApiModelProperty("加盟商手机号")
|
||||||
|
private String franchiseeMobile;
|
||||||
|
@ApiModelProperty("所属大区")
|
||||||
|
private String bigRegion;
|
||||||
|
@ApiModelProperty("所属大区id")
|
||||||
|
private Long bigRegionId;
|
||||||
|
@ApiModelProperty("所属战区")
|
||||||
|
private String fightRegion;
|
||||||
|
@ApiModelProperty("战区id")
|
||||||
|
private Long fightRegionId;
|
||||||
|
|
||||||
|
@ApiModelProperty("招商经理id")
|
||||||
|
private String investmentManager;
|
||||||
|
@ApiModelProperty("招商经理姓名")
|
||||||
|
private String investmentManagerName;
|
||||||
|
@ApiModelProperty("督导id")
|
||||||
|
private String supervisorUserId;
|
||||||
|
@ApiModelProperty("督导姓名")
|
||||||
|
private String supervisorUserName;
|
||||||
|
@ApiModelProperty("提交申请时间")
|
||||||
|
private Date submitTime;
|
||||||
|
@ApiModelProperty("审核状态 1:待通过 2:未通过 3:已通过")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,128 @@
|
|||||||
|
package com.cool.store.response;
|
||||||
|
|
||||||
|
import com.cool.store.entity.LicenseTransactDO;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel("提交证照办理响应体")
|
||||||
|
public class SubmitLicenseResponse {
|
||||||
|
|
||||||
|
@ApiModelProperty("主键id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
private Long shopId;
|
||||||
|
|
||||||
|
@ApiModelProperty("营业执照拍照上传")
|
||||||
|
private String licenseUrl;
|
||||||
|
|
||||||
|
@ApiModelProperty("营业执照名称")
|
||||||
|
private String licenseName;
|
||||||
|
|
||||||
|
@ApiModelProperty("营业执照类型 0:有限责任公司 1:工体工商")
|
||||||
|
private Integer licenseType;
|
||||||
|
|
||||||
|
@ApiModelProperty("营业执照上的法人")
|
||||||
|
private String licenseLegalPerson;
|
||||||
|
|
||||||
|
@ApiModelProperty("统一社会信用代码")
|
||||||
|
private String socialCreditCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("发证日期")
|
||||||
|
private Date issueTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("营业执照经营场所")
|
||||||
|
private String licenseAddress;
|
||||||
|
|
||||||
|
@ApiModelProperty("有效期")
|
||||||
|
private Date validity;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty("法人双手持身份证正面+营业执照")
|
||||||
|
private String idCardAndLicense1;
|
||||||
|
|
||||||
|
@ApiModelProperty("法人双手持身份证反面+营业执照")
|
||||||
|
private String idCardAndLicense2;
|
||||||
|
|
||||||
|
@ApiModelProperty("食品经营许可证图片上传")
|
||||||
|
private String foodLicenseUrl;
|
||||||
|
|
||||||
|
@ApiModelProperty("经营者")
|
||||||
|
private String operator;
|
||||||
|
|
||||||
|
@ApiModelProperty("食品经营许可证上的法人")
|
||||||
|
private String foodLicenseLegalPerson;
|
||||||
|
|
||||||
|
@ApiModelProperty("食营经营场所")
|
||||||
|
private String businessPremises;
|
||||||
|
|
||||||
|
@ApiModelProperty("主体业态")
|
||||||
|
private String mainBusiness;
|
||||||
|
|
||||||
|
@ApiModelProperty("经营项目")
|
||||||
|
private String businessProject;
|
||||||
|
|
||||||
|
@ApiModelProperty("许可证编号")
|
||||||
|
private String foodLicenseCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("许可证开始时间")
|
||||||
|
private Date foodLicenseStartTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("许可证截止时间")
|
||||||
|
private Date foodLicenseEndTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@ApiModelProperty("备注图片")
|
||||||
|
private String remarkUrl;
|
||||||
|
|
||||||
|
@ApiModelProperty("0:保存 1:提交到待审核 2:未通过 3:已通过 ")
|
||||||
|
private Integer submitStatus;
|
||||||
|
|
||||||
|
|
||||||
|
public static SubmitLicenseResponse from(LicenseTransactDO licenseTransactDO) {
|
||||||
|
if (licenseTransactDO == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
SubmitLicenseResponse submitLicenseResponse = new SubmitLicenseResponse();
|
||||||
|
submitLicenseResponse.setId(licenseTransactDO.getId());
|
||||||
|
submitLicenseResponse.setShopId(licenseTransactDO.getShopId());
|
||||||
|
submitLicenseResponse.setLicenseType(licenseTransactDO.getLicenseType());
|
||||||
|
submitLicenseResponse.setLicenseLegalPerson(licenseTransactDO.getLicenseLegalPerson());
|
||||||
|
submitLicenseResponse.setIssueTime(licenseTransactDO.getIssueTime());
|
||||||
|
submitLicenseResponse.setLicenseAddress(licenseTransactDO.getLicenseAddress());
|
||||||
|
submitLicenseResponse.setValidity(licenseTransactDO.getValidity());
|
||||||
|
submitLicenseResponse.setOperator(licenseTransactDO.getOperator());
|
||||||
|
submitLicenseResponse.setFoodLicenseLegalPerson(licenseTransactDO.getFoodLicenseLegalPerson());
|
||||||
|
submitLicenseResponse.setMainBusiness(licenseTransactDO.getMainBusiness());
|
||||||
|
submitLicenseResponse.setBusinessProject(licenseTransactDO.getBusinessProject());
|
||||||
|
submitLicenseResponse.setRemark(licenseTransactDO.getRemark());
|
||||||
|
submitLicenseResponse.setRemarkUrl(licenseTransactDO.getRemarkUrl());
|
||||||
|
submitLicenseResponse.setSubmitStatus(licenseTransactDO.getSubmitStatus());
|
||||||
|
// licenseUrl
|
||||||
|
submitLicenseResponse.setLicenseUrl(licenseTransactDO.getCreditUrl());
|
||||||
|
// licenseName
|
||||||
|
submitLicenseResponse.setLicenseName(licenseTransactDO.getBusinessLicense());
|
||||||
|
// socialCreditCode
|
||||||
|
submitLicenseResponse.setSocialCreditCode(licenseTransactDO.getCreditCode());
|
||||||
|
// idCardAndLicense1
|
||||||
|
submitLicenseResponse.setIdCardAndLicense1(licenseTransactDO.getIdCardNegativeCreditUrl());
|
||||||
|
// idCardAndLicense2
|
||||||
|
submitLicenseResponse.setIdCardAndLicense2(licenseTransactDO.getIdCardPositiveCreditUrl());
|
||||||
|
// foodLicenseUrl
|
||||||
|
submitLicenseResponse.setFoodLicenseUrl(licenseTransactDO.getFoodBusinessLicenseUrl());
|
||||||
|
// businessPremises
|
||||||
|
submitLicenseResponse.setBusinessPremises(licenseTransactDO.getFoodLicenseAddress());
|
||||||
|
// foodLicenseCode
|
||||||
|
submitLicenseResponse.setFoodLicenseCode(licenseTransactDO.getFoodBusinessLicenseCode());
|
||||||
|
// foodLicenseStartTime
|
||||||
|
submitLicenseResponse.setFoodLicenseStartTime(licenseTransactDO.getFoodBusinessStartTime());
|
||||||
|
// foodLicenseEndTime
|
||||||
|
submitLicenseResponse.setFoodLicenseEndTime(licenseTransactDO.getFoodBusinessEndTime());
|
||||||
|
return submitLicenseResponse;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.cool.store.vo;
|
package com.cool.store.vo;
|
||||||
|
|
||||||
import com.cool.store.entity.LineAuditInfoDO;
|
import com.cool.store.entity.ShopAuditInfoDO;
|
||||||
import com.cool.store.enums.AuditResultTypeEnum;
|
import com.cool.store.enums.AuditResultTypeEnum;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -26,7 +26,13 @@ public class AuditInfoVO {
|
|||||||
@ApiModelProperty("审批时间")
|
@ApiModelProperty("审批时间")
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
|
|
||||||
public static AuditInfoVO convertVO(LineAuditInfoDO auditInfo) {
|
@ApiModelProperty(value = "操作人id")
|
||||||
|
private String operateUserId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "操作人姓名")
|
||||||
|
private String operateUserName;
|
||||||
|
|
||||||
|
public static AuditInfoVO convertVO(ShopAuditInfoDO auditInfo) {
|
||||||
if(Objects.isNull(auditInfo)){
|
if(Objects.isNull(auditInfo)){
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -36,8 +42,10 @@ public class AuditInfoVO {
|
|||||||
if(AuditResultTypeEnum.PASS.getCode().equals(result.getResultType())){
|
if(AuditResultTypeEnum.PASS.getCode().equals(result.getResultType())){
|
||||||
result.setReason(auditInfo.getPassReason());
|
result.setReason(auditInfo.getPassReason());
|
||||||
}else if(AuditResultTypeEnum.REJECT.getCode().equals(result.getResultType())){
|
}else if(AuditResultTypeEnum.REJECT.getCode().equals(result.getResultType())){
|
||||||
result.setReason(auditInfo.getRejectRealReason());
|
result.setReason(auditInfo.getRejectReason());
|
||||||
}
|
}
|
||||||
|
result.setOperateUserId(auditInfo.getSubmittedUserId());
|
||||||
|
result.setOperateUserName(auditInfo.getSubmittedUserName());
|
||||||
result.setCertifyFile(auditInfo.getCertifyFile());
|
result.setCertifyFile(auditInfo.getCertifyFile());
|
||||||
result.setCreateTime(auditInfo.getCreateTime());
|
result.setCreateTime(auditInfo.getCreateTime());
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.cool.store.vo.shop;
|
package com.cool.store.vo.shop;
|
||||||
|
|
||||||
import com.cool.store.entity.LineAuditInfoDO;
|
import com.cool.store.entity.LineAuditInfoDO;
|
||||||
|
import com.cool.store.entity.ShopAuditInfoDO;
|
||||||
import com.cool.store.entity.ShopStageInfoDO;
|
import com.cool.store.entity.ShopStageInfoDO;
|
||||||
import com.cool.store.vo.AuditInfoVO;
|
import com.cool.store.vo.AuditInfoVO;
|
||||||
import com.cool.store.vo.LineAuditInfoVO;
|
import com.cool.store.vo.LineAuditInfoVO;
|
||||||
@@ -54,15 +55,15 @@ public class ShopStageInfoVO {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<ShopStageInfoVO> convertList(List<ShopStageInfoDO> stageList, List<LineAuditInfoDO> auditList){
|
public static List<ShopStageInfoVO> convertList(List<ShopStageInfoDO> stageList, List<ShopAuditInfoDO> auditList){
|
||||||
if(CollectionUtils.isEmpty(stageList)){
|
if(CollectionUtils.isEmpty(stageList)){
|
||||||
return Lists.newArrayList();
|
return Lists.newArrayList();
|
||||||
}
|
}
|
||||||
Map<Long, LineAuditInfoDO> auditMap = auditList.stream().collect(Collectors.toMap(LineAuditInfoDO::getId, Function.identity()));
|
Map<Long, ShopAuditInfoDO> auditMap = auditList.stream().collect(Collectors.toMap(ShopAuditInfoDO::getId, Function.identity()));
|
||||||
List<ShopStageInfoVO> resultList = new ArrayList<>();
|
List<ShopStageInfoVO> resultList = new ArrayList<>();
|
||||||
for (ShopStageInfoDO stageInfo : stageList) {
|
for (ShopStageInfoDO stageInfo : stageList) {
|
||||||
ShopStageInfoVO shopStageInfo = new ShopStageInfoVO(stageInfo.getShopStage(), stageInfo.getShopSubStage(), stageInfo.getShopSubStageStatus(), stageInfo.getIsTerminated());
|
ShopStageInfoVO shopStageInfo = new ShopStageInfoVO(stageInfo.getShopStage(), stageInfo.getShopSubStage(), stageInfo.getShopSubStageStatus(), stageInfo.getIsTerminated());
|
||||||
LineAuditInfoDO auditInfo = auditMap.get(stageInfo.getAuditId());
|
ShopAuditInfoDO auditInfo = auditMap.get(stageInfo.getAuditId());
|
||||||
AuditInfoVO auditInfoVO = AuditInfoVO.convertVO(auditInfo);
|
AuditInfoVO auditInfoVO = AuditInfoVO.convertVO(auditInfo);
|
||||||
shopStageInfo.setAuditInfo(auditInfoVO);
|
shopStageInfo.setAuditInfo(auditInfoVO);
|
||||||
shopStageInfo.setPlanCompleteTime(stageInfo.getPlanCompleteTime());
|
shopStageInfo.setPlanCompleteTime(stageInfo.getPlanCompleteTime());
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package com.cool.store.service;
|
||||||
|
|
||||||
|
import com.cool.store.request.LicenseListRequest;
|
||||||
|
import com.cool.store.request.SubmitLicenseRequest;
|
||||||
|
import com.cool.store.response.LicenseListResponse;
|
||||||
|
import com.cool.store.response.SubmitLicenseResponse;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
|
||||||
|
public interface ApplyLicenseService {
|
||||||
|
Boolean submitLicense(SubmitLicenseRequest request);
|
||||||
|
|
||||||
|
SubmitLicenseResponse getDefault(Long shopId);
|
||||||
|
|
||||||
|
PageInfo<LicenseListResponse> licenseList(LicenseListRequest request);
|
||||||
|
}
|
||||||
@@ -122,6 +122,9 @@ public class AliyunServiceImpl implements AliyunService {
|
|||||||
if (Objects.nonNull(result)){
|
if (Objects.nonNull(result)){
|
||||||
String address = result.address;
|
String address = result.address;
|
||||||
String registerNumber = result.registerNumber;
|
String registerNumber = result.registerNumber;
|
||||||
|
String legalPerson = result.legalPerson;//法人
|
||||||
|
String validPeriod = result.validPeriod;//有效期
|
||||||
|
String establishDate = result.establishDate;
|
||||||
BusinessLicenseInfoVO response = new BusinessLicenseInfoVO(registerNumber,address);
|
BusinessLicenseInfoVO response = new BusinessLicenseInfoVO(registerNumber,address);
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,117 @@
|
|||||||
|
package com.cool.store.service.impl;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.cool.store.context.CurrentUserHolder;
|
||||||
|
import com.cool.store.context.LoginUserInfo;
|
||||||
|
import com.cool.store.dao.EnterpriseUserDAO;
|
||||||
|
import com.cool.store.dao.RegionDao;
|
||||||
|
import com.cool.store.entity.LicenseTransactDO;
|
||||||
|
import com.cool.store.entity.ShopAuditInfoDO;
|
||||||
|
import com.cool.store.enums.AuditTypeEnum;
|
||||||
|
import com.cool.store.enums.ErrorCodeEnum;
|
||||||
|
import com.cool.store.exception.ServiceException;
|
||||||
|
import com.cool.store.mapper.ApplyLicenseMapper;
|
||||||
|
import com.cool.store.mapper.ShopAuditInfoMapper;
|
||||||
|
import com.cool.store.request.LicenseListRequest;
|
||||||
|
import com.cool.store.request.SubmitLicenseRequest;
|
||||||
|
import com.cool.store.response.LicenseListResponse;
|
||||||
|
import com.cool.store.response.SubmitLicenseResponse;
|
||||||
|
import com.cool.store.service.ApplyLicenseService;
|
||||||
|
import com.cool.store.service.RegionService;
|
||||||
|
import com.cool.store.utils.poi.constant.Constants;
|
||||||
|
import com.cool.store.vo.OpenAcceptanceInfoListVO;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
@Slf4j
|
||||||
|
public class ApplyLicenseServiceImpl implements ApplyLicenseService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
ApplyLicenseMapper applyLicenseMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
ShopAuditInfoMapper shopAuditInfoMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private EnterpriseUserDAO userDAO;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private RegionService regionService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private RegionDao regionDao;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean submitLicense(SubmitLicenseRequest request) {
|
||||||
|
log.info("submitLicense request:{}", JSONObject.toJSONString(request));
|
||||||
|
if (Objects.isNull(request)){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
LicenseTransactDO licenseTransactDO = request.toLicenseTransactDO();
|
||||||
|
if (request.getId() == null){
|
||||||
|
applyLicenseMapper.insertSelective(licenseTransactDO);
|
||||||
|
}else {
|
||||||
|
licenseTransactDO.setId(request.getId());
|
||||||
|
applyLicenseMapper.updateByPrimaryKeySelective(licenseTransactDO);
|
||||||
|
}
|
||||||
|
if (request.getSubmitStatus() == Constants.ONE_INTEGER){
|
||||||
|
ShopAuditInfoDO shopAuditInfoDO = new ShopAuditInfoDO();
|
||||||
|
shopAuditInfoDO.setShopId(request.getShopId());
|
||||||
|
shopAuditInfoDO.setAuditType(AuditTypeEnum.LICENSE_APPROVAL.getCode());
|
||||||
|
LoginUserInfo user = CurrentUserHolder.getUser();
|
||||||
|
shopAuditInfoDO.setSubmittedUserId(user.getUserId());
|
||||||
|
shopAuditInfoDO.setSubmittedUserName(user.getName());
|
||||||
|
shopAuditInfoMapper.insertSelective(shopAuditInfoDO);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SubmitLicenseResponse getDefault(Long shopId) {
|
||||||
|
LicenseTransactDO licenseTransactDO = new LicenseTransactDO();
|
||||||
|
licenseTransactDO.setShopId(shopId);
|
||||||
|
LicenseTransactDO result = applyLicenseMapper.selectOne(licenseTransactDO);
|
||||||
|
if (Objects.isNull(result)){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.LICENSE_NOT_EXIST);
|
||||||
|
}
|
||||||
|
SubmitLicenseResponse submitLicenseResponse = SubmitLicenseResponse.from(result);
|
||||||
|
return submitLicenseResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageInfo<LicenseListResponse> licenseList(LicenseListRequest request) {
|
||||||
|
PageHelper.startPage(request.getPageNum(), request.getPageSize());
|
||||||
|
List<LicenseListResponse> licenseListResponses = applyLicenseMapper.licenseList(request);
|
||||||
|
List<String> userIdList = new ArrayList<>();
|
||||||
|
for (LicenseListResponse vo : licenseListResponses) {
|
||||||
|
userIdList.add(vo.getSupervisorUserId());
|
||||||
|
userIdList.add(vo.getShopManagerUserId());
|
||||||
|
userIdList.add(vo.getInvestmentManager());
|
||||||
|
}
|
||||||
|
if (CollectionUtils.isNotEmpty(userIdList)) {
|
||||||
|
Map<String, String> userNameMap = userDAO.getUserNameMap(userIdList);
|
||||||
|
for (LicenseListResponse vo : licenseListResponses) {
|
||||||
|
vo.setSupervisorUserName(userNameMap.get(vo.getSupervisorUserId()));
|
||||||
|
vo.setShopManagerUserName(userNameMap.get(vo.getShopManagerUserId()));
|
||||||
|
vo.setInvestmentManagerName(userNameMap.get(vo.getInvestmentManager()));
|
||||||
|
if (vo.getFightRegionId() != null) {
|
||||||
|
Long bigRegionIdByAreaId = regionService.getBigRegionIdByAreaId(vo.getFightRegionId());
|
||||||
|
Map<Long, String> regionNameMap = regionDao.getRegionNameMap(Arrays.asList(bigRegionIdByAreaId, vo.getFightRegionId()));
|
||||||
|
vo.setFightRegionId(vo.getFightRegionId());
|
||||||
|
vo.setFightRegion(regionNameMap.get(vo.getFightRegionId()));
|
||||||
|
vo.setBigRegionId(bigRegionIdByAreaId);
|
||||||
|
vo.setBigRegion(regionNameMap.get(bigRegionIdByAreaId));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return new PageInfo<>(licenseListResponses);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -78,7 +78,7 @@ public class PointServiceImpl implements PointService {
|
|||||||
@Resource
|
@Resource
|
||||||
private ShopRentInfoDAO shopRentInfoDAO;
|
private ShopRentInfoDAO shopRentInfoDAO;
|
||||||
@Resource
|
@Resource
|
||||||
private LineAuditInfoDAO lineAuditInfoDAO;
|
private ShopAuditInfoDAO shopAuditInfoDAO;
|
||||||
@Resource
|
@Resource
|
||||||
private SysRoleService sysRoleService;
|
private SysRoleService sysRoleService;
|
||||||
@Value("${mybatis.configuration.variables.enterpriseId}")
|
@Value("${mybatis.configuration.variables.enterpriseId}")
|
||||||
@@ -824,7 +824,7 @@ public class PointServiceImpl implements PointService {
|
|||||||
ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_23.getShopSubStageStatus().equals(shopSubStageInfo.getShopSubStageStatus());
|
ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_23.getShopSubStageStatus().equals(shopSubStageInfo.getShopSubStageStatus());
|
||||||
if(Objects.nonNull(shopSubStageInfo.getAuditId()) && isAudit){
|
if(Objects.nonNull(shopSubStageInfo.getAuditId()) && isAudit){
|
||||||
//当前是审核过的状态才获取原因
|
//当前是审核过的状态才获取原因
|
||||||
LineAuditInfoDO auditInfo = lineAuditInfoDAO.getAuditInfo(shopSubStageInfo.getAuditId());
|
ShopAuditInfoDO auditInfo = shopAuditInfoDAO.getAuditInfo(shopSubStageInfo.getAuditId());
|
||||||
result.setAuditInfo(AuditInfoVO.convertVO(auditInfo));
|
result.setAuditInfo(AuditInfoVO.convertVO(auditInfo));
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
@@ -840,7 +840,7 @@ public class PointServiceImpl implements PointService {
|
|||||||
if(!ShopStageEnum.SHOP_STAGE_1.getShopStage().equals(shopInfo.getShopStage())){
|
if(!ShopStageEnum.SHOP_STAGE_1.getShopStage().equals(shopInfo.getShopStage())){
|
||||||
throw new ServiceException(ErrorCodeEnum.SHOP_STAGE_NOT_OPERATE);
|
throw new ServiceException(ErrorCodeEnum.SHOP_STAGE_NOT_OPERATE);
|
||||||
}
|
}
|
||||||
Long auditId = lineAuditInfoDAO.addAuditInfo(AuditRentContractRequest.convert(request, shopInfo.getPartnerId(), shopInfo.getLineId()));
|
Long auditId = shopAuditInfoDAO.addAuditInfo(AuditRentContractRequest.convert(request, AuditTypeEnum.UPLOAD_RENT_CONTRACT));
|
||||||
ShopSubStageStatusEnum subStageStatus = AuditResultTypeEnum.PASS.getCode().equals(request.getResultType()) ? ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_23 : ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_22;
|
ShopSubStageStatusEnum subStageStatus = AuditResultTypeEnum.PASS.getCode().equals(request.getResultType()) ? ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_23 : ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_22;
|
||||||
if(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_23.equals(subStageStatus)){
|
if(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_23.equals(subStageStatus)){
|
||||||
//审核通过铺位变为已签约
|
//审核通过铺位变为已签约
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import com.cool.store.entity.*;
|
|||||||
import com.cool.store.enums.ErrorCodeEnum;
|
import com.cool.store.enums.ErrorCodeEnum;
|
||||||
import com.cool.store.enums.point.*;
|
import com.cool.store.enums.point.*;
|
||||||
import com.cool.store.exception.ServiceException;
|
import com.cool.store.exception.ServiceException;
|
||||||
|
import com.cool.store.mapper.ShopAuditInfoMapper;
|
||||||
import com.cool.store.request.AddShopRequest;
|
import com.cool.store.request.AddShopRequest;
|
||||||
import com.cool.store.request.DeleteShopRequest;
|
import com.cool.store.request.DeleteShopRequest;
|
||||||
import com.cool.store.service.ShopService;
|
import com.cool.store.service.ShopService;
|
||||||
@@ -39,7 +40,7 @@ public class ShopServiceImpl implements ShopService {
|
|||||||
@Resource
|
@Resource
|
||||||
private ShopStageInfoDAO shopStageInfoDAO;
|
private ShopStageInfoDAO shopStageInfoDAO;
|
||||||
@Resource
|
@Resource
|
||||||
private LineAuditInfoDAO lineAuditInfoDAO;
|
private ShopAuditInfoDAO shopAuditInfoDAO;
|
||||||
@Resource
|
@Resource
|
||||||
private LineInfoDAO lineInfoDAO;
|
private LineInfoDAO lineInfoDAO;
|
||||||
@Resource
|
@Resource
|
||||||
@@ -83,8 +84,8 @@ public class ShopServiceImpl implements ShopService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
List<ShopStageInfoDO> shopStageInfo = shopStageInfoDAO.getShopStageInfo(shopId, shopStage);
|
List<ShopStageInfoDO> shopStageInfo = shopStageInfoDAO.getShopStageInfo(shopId, shopStage);
|
||||||
List<Long> auditIds = shopStageInfo.stream().map(ShopStageInfoDO::getAuditId).collect(Collectors.toList());
|
List<Long> auditIds = shopStageInfo.stream().filter(o->Objects.nonNull(o.getAuditId())).map(ShopStageInfoDO::getAuditId).distinct().collect(Collectors.toList());
|
||||||
List<LineAuditInfoDO> auditList = lineAuditInfoDAO.getLineAuditInfoList(auditIds);
|
List<ShopAuditInfoDO> auditList = shopAuditInfoDAO.getAuditInfoList(auditIds);
|
||||||
return ShopStageInfoVO.convertList(shopStageInfo, auditList);
|
return ShopStageInfoVO.convertList(shopStageInfo, auditList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,40 @@
|
|||||||
|
package com.cool.store.controller.webb;
|
||||||
|
|
||||||
|
import com.cool.store.request.LicenseListRequest;
|
||||||
|
import com.cool.store.request.OpenAcceptanceRequest;
|
||||||
|
import com.cool.store.response.LicenseListResponse;
|
||||||
|
import com.cool.store.response.ResponseResult;
|
||||||
|
import com.cool.store.service.ApplyLicenseService;
|
||||||
|
import com.cool.store.vo.OpenAcceptanceInfoListVO;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/pc/license")
|
||||||
|
@Api(tags = "PC证照审核")
|
||||||
|
@Slf4j
|
||||||
|
public class PCApplyLicenseController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
ApplyLicenseService applyLicenseService;
|
||||||
|
|
||||||
|
@GetMapping(path = "/licenseList")
|
||||||
|
@ApiOperation("证照审批列表")
|
||||||
|
public ResponseResult<PageInfo<LicenseListResponse>> licenseList(LicenseListRequest request) {
|
||||||
|
return ResponseResult.success(applyLicenseService.licenseList(request));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("证照办理数据回显")
|
||||||
|
@GetMapping("/default/get")
|
||||||
|
public ResponseResult getDefault(@RequestParam("shopId") Long shopId) {
|
||||||
|
return ResponseResult.success(applyLicenseService.getDefault(shopId));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -210,6 +210,8 @@ public class PointController {
|
|||||||
@ApiOperation("租赁合同审核")
|
@ApiOperation("租赁合同审核")
|
||||||
@PostMapping("/auditRentContract")
|
@PostMapping("/auditRentContract")
|
||||||
public ResponseResult<Integer> auditRentContract(@RequestBody @Validated AuditRentContractRequest request) {
|
public ResponseResult<Integer> auditRentContract(@RequestBody @Validated AuditRentContractRequest request) {
|
||||||
|
request.setOperateUserId(CurrentUserHolder.getUserId());
|
||||||
|
request.setOperateUserName(CurrentUserHolder.getUser().getName());
|
||||||
return ResponseResult.success(pointService.auditRentContract(request));
|
return ResponseResult.success(pointService.auditRentContract(request));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,31 +1,39 @@
|
|||||||
package com.cool.store.controller.webc;
|
package com.cool.store.controller.webc;
|
||||||
|
|
||||||
import com.cool.store.entity.BankdocDO;
|
import com.cool.store.request.SubmitLicenseRequest;
|
||||||
import com.cool.store.request.BranchBankPageRequest;
|
|
||||||
import com.cool.store.response.ResponseResult;
|
import com.cool.store.response.ResponseResult;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.cool.store.service.ApplyLicenseService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import javax.annotation.Resource;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 证照办理
|
* 证照办理
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/mini/license")
|
@RequestMapping("/mini/license")
|
||||||
@Api(tags = "证照办理")
|
@Api(tags = "移动端证照办理")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class ApplyLicenseController {
|
public class ApplyLicenseController {
|
||||||
|
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
ApplyLicenseService applyLicenseService;
|
||||||
|
|
||||||
@ApiOperation("证照办理提交")
|
@ApiOperation("证照办理提交")
|
||||||
@PostMapping("/submit")
|
@PostMapping("/submit")
|
||||||
public ResponseResult submitLicense() {
|
public ResponseResult submitLicense(@RequestBody SubmitLicenseRequest request) {
|
||||||
return ResponseResult.success();
|
return ResponseResult.success(applyLicenseService.submitLicense(request));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation("证照办理数据回显")
|
||||||
|
@GetMapping("/default/get")
|
||||||
|
public ResponseResult getDefault(@RequestParam("shopId") Long shopId) {
|
||||||
|
return ResponseResult.success(applyLicenseService.getDefault(shopId));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user