Merge remote-tracking branch 'origin/cc_20250325_select' into cc_20250325_select
This commit is contained in:
@@ -241,6 +241,7 @@ public enum ErrorCodeEnum {
|
||||
THE_DATA_IS_NOT_FILLED(131009,"您有数据还未填写",null),
|
||||
QUOTATION_URL_REQUIRED(131010,"请等待报价单提交",null),
|
||||
DESIGN_URL_REQUIRED(131011,"请等待设计图提交",null),
|
||||
LEGAL_PERSON_NAME_NOT_SAME(131012,"法人姓名与加盟商姓名不一致",null),
|
||||
|
||||
TALLY_BOOK_NOT_EXIST(180001, "记账本数据不存在", null),
|
||||
|
||||
|
||||
@@ -5,8 +5,10 @@ import com.cool.store.entity.QualificationsInfoDO;
|
||||
import com.cool.store.mapper.QualificationsInfoMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
@@ -42,4 +44,12 @@ public class QualificationsInfoDAO {
|
||||
}
|
||||
return qualificationsInfoMapper.getByLineId(lineId);
|
||||
}
|
||||
public List<QualificationsInfoDO> getByLineIds(@Param("lineIds") List<Long> lineIds){
|
||||
if (lineIds==null||lineIds.size()==0){
|
||||
return new java.util.ArrayList<>();
|
||||
}
|
||||
Example example = new Example(QualificationsInfoDO.class);
|
||||
example.createCriteria().andIn("lineId", lineIds);
|
||||
return qualificationsInfoMapper.selectByExample(example);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,4 +27,6 @@ public interface ApplyLicenseMapper extends Mapper<LicenseTransactDO> {
|
||||
List<LicenseTransactDO> queryNotSyncList();
|
||||
|
||||
Boolean updateSyncFlagByIds(@Param("ids") List<Long> ids);
|
||||
|
||||
List<LicenseTransactDO> getByShopIds(@Param("list") List<Long> shopIds) ;
|
||||
}
|
||||
|
||||
@@ -36,7 +36,8 @@
|
||||
create_time,
|
||||
update_time,
|
||||
deleted,
|
||||
two_certificates_one
|
||||
two_certificates_one,
|
||||
legal_is_same_partner
|
||||
</sql>
|
||||
<update id="updateByShopId">
|
||||
update xfsg_license_transact
|
||||
@@ -106,6 +107,16 @@
|
||||
where sync_flag = 0
|
||||
and deleted = 0
|
||||
</select>
|
||||
<select id="getByShopIds" resultType="com.cool.store.entity.LicenseTransactDO">
|
||||
select <include refid="baseColumn"/>
|
||||
from xfsg_license_transact
|
||||
where deleted = 0
|
||||
<if test="list != null and list.size > 0">
|
||||
<foreach item="item" collection="list" open="and shop_id in (" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
<update id="updateSyncFlagByIds">
|
||||
|
||||
@@ -38,6 +38,8 @@
|
||||
<result property="updateUser" column="update_user" jdbcType="VARCHAR"/>
|
||||
<result property="cShopName" column="c_shop_name" jdbcType="VARCHAR"/>
|
||||
<result property="settlerBankBackPhotoUrl" column="settler_bank_back_photo_url" jdbcType="VARCHAR"/>
|
||||
<result property="settlerIsSamePartner" column="settler_is_same_partner" jdbcType="TINYINT"/>
|
||||
<result property="juridicalIsSamePartner" column="juridical_is_same_partner" jdbcType="TINYINT"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
@@ -49,6 +51,6 @@
|
||||
settler_id_card_front,settler_id_card_reverse,settler_in_hand_front_picture,settler_in_hand_back_picture,settler_id_card_no,
|
||||
settler_bank_number,settler_bank_mobile,settler_bank_name,
|
||||
create_time,update_time,create_user,
|
||||
update_user,c_shop_name,settler_bank_back_photo_url
|
||||
update_user,c_shop_name,settler_bank_back_photo_url,settler_is_same_partner,juridical_is_same_partner
|
||||
</sql>
|
||||
</mapper>
|
||||
|
||||
@@ -196,4 +196,10 @@ public class BuildInformationDO {
|
||||
//火码,点餐小程序店铺名称',
|
||||
@Column(name = "c_shop_name")
|
||||
private String cShopName;
|
||||
|
||||
@Column(name = "settler_is_same_partner")
|
||||
private Boolean settlerIsSamePartner;
|
||||
|
||||
@Column(name = "juridical_is_same_partner")
|
||||
private Boolean juridicalIsSamePartner;
|
||||
}
|
||||
@@ -85,5 +85,6 @@ public class LicenseTransactDO {
|
||||
private Integer twoCertificatesOne;
|
||||
@Column(name = "sync_flag")
|
||||
private Integer syncFlag;
|
||||
|
||||
@Column(name = "legal_is_same_partner")
|
||||
private Boolean legalIsSamePartner;
|
||||
}
|
||||
|
||||
@@ -58,6 +58,9 @@ public class BuildInformationRequest {
|
||||
@ApiModelProperty("店内照(图片)")
|
||||
private String inStorePhoto;
|
||||
|
||||
@ApiModelProperty("法人身份证信息是否和加盟商一致,false否,true是")
|
||||
private Boolean juridicalIsSamePartner;
|
||||
|
||||
@NotBlank(message = "法人身份证正面 不能为空")
|
||||
@Length(max = 250 , message = "法人身份证正面长度不能超过250")
|
||||
@ApiModelProperty("法人身份证正面(图片)")
|
||||
@@ -83,6 +86,9 @@ public class BuildInformationRequest {
|
||||
@ApiModelProperty("法人手持身份证反面(图片)")
|
||||
private String juridicalHandheldIdCardReverse;
|
||||
|
||||
@ApiModelProperty("结算人身份证信息是否和加盟商一致,false否,true是")
|
||||
private Boolean settlerIsSamePartner;
|
||||
|
||||
@ApiModelProperty("结算人姓名")
|
||||
@NotBlank(message = "结算人姓名 不能为空")
|
||||
@JsonProperty("settlerName")
|
||||
@@ -204,6 +210,8 @@ public class BuildInformationRequest {
|
||||
buildInformationDO.setRelationshipProve(this.relationshipProve);
|
||||
buildInformationDO.setAccountOpeningPermit(this.accountOpeningPermit);
|
||||
buildInformationDO.setCShopName(this.miniProgramsShopName);
|
||||
buildInformationDO.setSetterIsSamePartner(this.settlerIsSamePartner);
|
||||
buildInformationDO.setJuridicalIsSamePartner(this.juridicalIsSamePartner);
|
||||
return buildInformationDO;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
import java.util.Objects;
|
||||
|
||||
@@ -54,6 +55,10 @@ public class BusinessLicenseRequest {
|
||||
@ApiModelProperty("0:保存 1:提交到待审核")
|
||||
private Integer submitStatus;
|
||||
|
||||
@ApiModelProperty("法人身份证信息是否和加盟商一致,false否,true是")
|
||||
@NotNull
|
||||
private Boolean legalIsSamePartner;
|
||||
|
||||
@ApiModelProperty("法人身份证号码")
|
||||
@NotBlank(message = "法人身份证号码不能为空")
|
||||
private String licenseLegalIdCardNo;
|
||||
@@ -88,6 +93,7 @@ public class BusinessLicenseRequest {
|
||||
licenseTransactDO.setBusinessLicense(this.licenseName);
|
||||
licenseTransactDO.setCreditCode(this.socialCreditCode);
|
||||
licenseTransactDO.setCreditUrl(this.licenseUrl);
|
||||
licenseTransactDO.setLegalIsSamePartner(this.legalIsSamePartner);
|
||||
if (this.validityType == 0){
|
||||
licenseTransactDO.setValidity(null);
|
||||
}else if (this.validityType == 1){
|
||||
|
||||
@@ -55,7 +55,8 @@ public class BuildInformationResponse {
|
||||
|
||||
@ApiModelProperty("店内照(图片)")
|
||||
private String inStorePhoto;
|
||||
|
||||
@ApiModelProperty("法人身份证信息是否和加盟商一致,false否,true是")
|
||||
private Boolean juridicalIsSamePartner;
|
||||
@ApiModelProperty("法人身份证正面(图片)")
|
||||
private String juridicalIdCardFront;
|
||||
|
||||
@@ -74,6 +75,9 @@ public class BuildInformationResponse {
|
||||
@ApiModelProperty("结算人姓名")
|
||||
private String settlerName;
|
||||
|
||||
@ApiModelProperty("结算人身份证信息是否和加盟商一致,false否,true是")
|
||||
private Boolean settlerIsSamePartner;
|
||||
|
||||
@ApiModelProperty("结算人身份证正面(图片)")
|
||||
private String settlerIdCardFront;
|
||||
|
||||
|
||||
@@ -17,20 +17,19 @@ import java.util.Objects;
|
||||
@Data
|
||||
public class SubmitLicenseResponse {
|
||||
|
||||
@ApiModelProperty("法人身份证信息是否和加盟商一致,false否,true是")
|
||||
private Boolean legalIsSamePartner;
|
||||
|
||||
@ApiModelProperty("法人身份证号码")
|
||||
@NotBlank(message = "法人身份证号码不能为空")
|
||||
private String licenseLegalIdCardNo;
|
||||
|
||||
@ApiModelProperty("法人身份证正面")
|
||||
@NotBlank(message = "法人身份证正面不能为空")
|
||||
private String licenseLegalIdCardFront;
|
||||
|
||||
@ApiModelProperty("法人身份证反面")
|
||||
@NotBlank(message = "法人身份证反面不能为空")
|
||||
private String licenseLegalIdCardBack;
|
||||
|
||||
@ApiModelProperty("法人手机号")
|
||||
@NotBlank(message = "法人手机号不能为空")
|
||||
private String licenseLegalMobile;
|
||||
|
||||
@ApiModelProperty("审批人")
|
||||
@@ -226,6 +225,7 @@ public class SubmitLicenseResponse {
|
||||
return null;
|
||||
}
|
||||
SubmitLicenseResponse submitLicenseResponse = new SubmitLicenseResponse();
|
||||
submitLicenseResponse.setLegalIsSamePartner(licenseTransactDO.getLegalIsSamePartner());
|
||||
submitLicenseResponse.setLicenseLegalIdCardNo(licenseTransactDO.getLicenseLegalIdCardNo());
|
||||
submitLicenseResponse.setLicenseLegalIdCardFront(licenseTransactDO.getLicenseLegalIdCardFront());
|
||||
submitLicenseResponse.setLicenseLegalIdCardBack(licenseTransactDO.getLicenseLegalIdCardBack());
|
||||
|
||||
@@ -59,4 +59,7 @@ public interface ApplyLicenseService {
|
||||
* @return
|
||||
*/
|
||||
Boolean licenseExamine(Long shopId, Integer status,String result,LoginUserInfo user);
|
||||
|
||||
//数据处理
|
||||
Integer dataHandle();
|
||||
}
|
||||
|
||||
@@ -4,10 +4,7 @@ import cn.hutool.core.date.DateUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.dao.EnterpriseUserDAO;
|
||||
import com.cool.store.dao.QualificationsInfoDAO;
|
||||
import com.cool.store.dao.RegionDao;
|
||||
import com.cool.store.dao.ShopStageInfoDAO;
|
||||
import com.cool.store.dao.*;
|
||||
import com.cool.store.entity.*;
|
||||
import com.cool.store.enums.*;
|
||||
import com.cool.store.enums.point.ShopSubStageEnum;
|
||||
@@ -43,6 +40,8 @@ import java.util.stream.Collectors;
|
||||
@Slf4j
|
||||
public class ApplyLicenseServiceImpl implements ApplyLicenseService {
|
||||
|
||||
@Resource
|
||||
private ShopInfoDAO shopInfoDAO;
|
||||
@Resource
|
||||
ApplyLicenseMapper applyLicenseMapper;
|
||||
|
||||
@@ -113,6 +112,19 @@ public class ApplyLicenseServiceImpl implements ApplyLicenseService {
|
||||
if (!acquired) {
|
||||
throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION);
|
||||
}
|
||||
if (request.getLegalIsSamePartner()){
|
||||
// 法人身份证信息和加盟商一致
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(shopInfo.getLineId());
|
||||
if ( ! lineInfoDO.getUsername().equals(request.getLicenseLegalPerson())){
|
||||
throw new ServiceException(ErrorCodeEnum.LEGAL_PERSON_NAME_NOT_SAME);
|
||||
}
|
||||
QualificationsInfoDO qualificationsInfoDO = qualificationsInfoDAO.getByLineId(shopInfo.getLineId());
|
||||
request.setLicenseLegalMobile(lineInfoDO.getMobile());
|
||||
request.setLicenseLegalIdCardNo(qualificationsInfoDO.getIdCardNo());
|
||||
request.setLicenseLegalIdCardFront(qualificationsInfoDO.getFrontOfIdCard());
|
||||
request.setLicenseLegalIdCardBack(qualificationsInfoDO.getBackOfIdCard());
|
||||
}
|
||||
//防止一直在页面提交
|
||||
LicenseTransactDO license = applyLicenseMapper.selectByShopId(request.getShopId());
|
||||
LicenseTransactDO licenseTransactDO = request.toLicenseTransactDO(license);
|
||||
@@ -358,4 +370,22 @@ public class ApplyLicenseServiceImpl implements ApplyLicenseService {
|
||||
shopStageInfoDAO.updateShopStageAndAuditInfo(shopId, shopSubStageStatusEnum, shopAuditInfoDO.getId());
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer dataHandle() {
|
||||
List<ShopStageInfoDO> shopIdListByStageStatus = shopStageInfoDAO.getShopIdListByStageStatus(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_33.getShopSubStageStatus());
|
||||
List<Long> shopIds = shopIdListByStageStatus.stream().map(ShopStageInfoDO::getShopId).collect(Collectors.toList());
|
||||
List<ShopInfoDO> shopListByIds = shopInfoDAO.getShopListByIds(shopIds);
|
||||
List<Long> lineIds = shopListByIds.stream().map(ShopInfoDO::getLineId).collect(Collectors.toList());
|
||||
List<QualificationsInfoDO> qualificationsInfoDOList = qualificationsInfoDAO.getByLineIds(lineIds);
|
||||
Map<Long, QualificationsInfoDO> qualificationsInfoDOMap = qualificationsInfoDOList.stream().collect(Collectors.toMap(QualificationsInfoDO::getLineId, qualificationsInfoDO -> qualificationsInfoDO));
|
||||
List<LicenseTransactDO> licenseTransactDOList = applyLicenseMapper.getByShopIds(shopIds);
|
||||
Map<Long, LicenseTransactDO> licenseTransactDOMap = licenseTransactDOList.stream().collect(Collectors.toMap(LicenseTransactDO::getShopId, licenseTransactDO -> licenseTransactDO));
|
||||
List<LicenseTransactDO> updateList = new ArrayList<>();
|
||||
// for (ShopInfoDO shopInfoDO : shopListByIds){
|
||||
// QualificationsInfoDO qualificationsInfoDO = qualificationsInfoDOMap.get(shopInfoDO.getLineId());
|
||||
// LicenseTransactDO licenseTransactDO = licenseTransactDOMap.get(shopInfoDO.getId());
|
||||
// }
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,6 +139,8 @@ public class BuildInformationServiceImpl implements BuildInformationService {
|
||||
response.setSettlerInHandBackPicture(informationDO.getSettlerInHandBackPicture());
|
||||
response.setMiniProgramsShopName(informationDO.getCShopName());
|
||||
response.setSettlerBankBackPhotoUrl(informationDO.getSettlerBankBackPhotoUrl());
|
||||
response.setSettlerIsSamePartner(informationDO.getSettlerIsSamePartner());
|
||||
response.setJuridicalIsSamePartner(informationDO.getJuridicalIsSamePartner());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -153,12 +155,24 @@ public class BuildInformationServiceImpl implements BuildInformationService {
|
||||
}else{
|
||||
orderSysInfoDAO.insertSelective(orderSysInfoDO);
|
||||
}
|
||||
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfoDO.getLineId());
|
||||
QualificationsInfoDO qualificationsInfoDO = qualificationsInfoDAO.getByLineId(lineInfoDO.getId());
|
||||
if (request.getJuridicalIsSamePartner()){
|
||||
request.setJuridicalIdCardNo(qualificationsInfoDO.getIdCardNo());
|
||||
request.setJuridicalIdCardFront(qualificationsInfoDO.getFrontOfIdCard());
|
||||
request.setJuridicalIdCardReverse(qualificationsInfoDO.getBackOfIdCard());
|
||||
}
|
||||
if (request.getSettlerIsSamePartner()){
|
||||
request.setSettlerIdCardNo(qualificationsInfoDO.getIdCardNo());
|
||||
request.setSettlerName(lineInfoDO.getUsername());
|
||||
request.setSettlerIdCardFront(qualificationsInfoDO.getFrontOfIdCard());
|
||||
request.setSettlerIdCardReverse(qualificationsInfoDO.getBackOfIdCard());
|
||||
}
|
||||
if (Objects.isNull(informationDO)) {
|
||||
buildInformationDO.setCreateTime(new Date());
|
||||
buildInformationDO.setUpdateTime(new Date());
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_151);
|
||||
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfoDO.getLineId());
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("partnerUsername", lineInfoDO.getUsername());
|
||||
map.put("partnerMobile", lineInfoDO.getMobile());
|
||||
|
||||
Reference in New Issue
Block a user