fix
This commit is contained in:
@@ -241,6 +241,7 @@ public enum ErrorCodeEnum {
|
|||||||
THE_DATA_IS_NOT_FILLED(131009,"您有数据还未填写",null),
|
THE_DATA_IS_NOT_FILLED(131009,"您有数据还未填写",null),
|
||||||
QUOTATION_URL_REQUIRED(131010,"请等待报价单提交",null),
|
QUOTATION_URL_REQUIRED(131010,"请等待报价单提交",null),
|
||||||
DESIGN_URL_REQUIRED(131011,"请等待设计图提交",null),
|
DESIGN_URL_REQUIRED(131011,"请等待设计图提交",null),
|
||||||
|
LEGAL_PERSON_NAME_NOT_SAME(131012,"法人姓名与加盟商姓名不一致",null),
|
||||||
|
|
||||||
TALLY_BOOK_NOT_EXIST(180001, "记账本数据不存在", null),
|
TALLY_BOOK_NOT_EXIST(180001, "记账本数据不存在", null),
|
||||||
|
|
||||||
|
|||||||
@@ -5,8 +5,10 @@ import com.cool.store.entity.QualificationsInfoDO;
|
|||||||
import com.cool.store.mapper.QualificationsInfoMapper;
|
import com.cool.store.mapper.QualificationsInfoMapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
import tk.mybatis.mapper.entity.Example;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author suzhuhong
|
* @Author suzhuhong
|
||||||
@@ -42,4 +44,12 @@ public class QualificationsInfoDAO {
|
|||||||
}
|
}
|
||||||
return qualificationsInfoMapper.getByLineId(lineId);
|
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();
|
List<LicenseTransactDO> queryNotSyncList();
|
||||||
|
|
||||||
Boolean updateSyncFlagByIds(@Param("ids") List<Long> ids);
|
Boolean updateSyncFlagByIds(@Param("ids") List<Long> ids);
|
||||||
|
|
||||||
|
List<LicenseTransactDO> getByShopIds(@Param("list") List<Long> shopIds) ;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,7 +36,8 @@
|
|||||||
create_time,
|
create_time,
|
||||||
update_time,
|
update_time,
|
||||||
deleted,
|
deleted,
|
||||||
two_certificates_one
|
two_certificates_one,
|
||||||
|
legal_is_same_partner
|
||||||
</sql>
|
</sql>
|
||||||
<update id="updateByShopId">
|
<update id="updateByShopId">
|
||||||
update xfsg_license_transact
|
update xfsg_license_transact
|
||||||
@@ -106,6 +107,16 @@
|
|||||||
where sync_flag = 0
|
where sync_flag = 0
|
||||||
and deleted = 0
|
and deleted = 0
|
||||||
</select>
|
</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">
|
<update id="updateSyncFlagByIds">
|
||||||
|
|||||||
@@ -85,5 +85,6 @@ public class LicenseTransactDO {
|
|||||||
private Integer twoCertificatesOne;
|
private Integer twoCertificatesOne;
|
||||||
@Column(name = "sync_flag")
|
@Column(name = "sync_flag")
|
||||||
private Integer syncFlag;
|
private Integer syncFlag;
|
||||||
|
@Column(name = "legal_is_same_partner")
|
||||||
|
private Boolean legalIsSamePartner;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
@@ -54,6 +55,10 @@ public class BusinessLicenseRequest {
|
|||||||
@ApiModelProperty("0:保存 1:提交到待审核")
|
@ApiModelProperty("0:保存 1:提交到待审核")
|
||||||
private Integer submitStatus;
|
private Integer submitStatus;
|
||||||
|
|
||||||
|
@ApiModelProperty("法人身份证信息是否和加盟商一致,false否,true是")
|
||||||
|
@NotNull
|
||||||
|
private Boolean legalIsSamePartner;
|
||||||
|
|
||||||
@ApiModelProperty("法人身份证号码")
|
@ApiModelProperty("法人身份证号码")
|
||||||
@NotBlank(message = "法人身份证号码不能为空")
|
@NotBlank(message = "法人身份证号码不能为空")
|
||||||
private String licenseLegalIdCardNo;
|
private String licenseLegalIdCardNo;
|
||||||
|
|||||||
@@ -17,20 +17,19 @@ import java.util.Objects;
|
|||||||
@Data
|
@Data
|
||||||
public class SubmitLicenseResponse {
|
public class SubmitLicenseResponse {
|
||||||
|
|
||||||
|
@ApiModelProperty("法人身份证信息是否和加盟商一致,false否,true是")
|
||||||
|
private Boolean legalIsSamePartner;
|
||||||
|
|
||||||
@ApiModelProperty("法人身份证号码")
|
@ApiModelProperty("法人身份证号码")
|
||||||
@NotBlank(message = "法人身份证号码不能为空")
|
|
||||||
private String licenseLegalIdCardNo;
|
private String licenseLegalIdCardNo;
|
||||||
|
|
||||||
@ApiModelProperty("法人身份证正面")
|
@ApiModelProperty("法人身份证正面")
|
||||||
@NotBlank(message = "法人身份证正面不能为空")
|
|
||||||
private String licenseLegalIdCardFront;
|
private String licenseLegalIdCardFront;
|
||||||
|
|
||||||
@ApiModelProperty("法人身份证反面")
|
@ApiModelProperty("法人身份证反面")
|
||||||
@NotBlank(message = "法人身份证反面不能为空")
|
|
||||||
private String licenseLegalIdCardBack;
|
private String licenseLegalIdCardBack;
|
||||||
|
|
||||||
@ApiModelProperty("法人手机号")
|
@ApiModelProperty("法人手机号")
|
||||||
@NotBlank(message = "法人手机号不能为空")
|
|
||||||
private String licenseLegalMobile;
|
private String licenseLegalMobile;
|
||||||
|
|
||||||
@ApiModelProperty("审批人")
|
@ApiModelProperty("审批人")
|
||||||
|
|||||||
@@ -59,4 +59,7 @@ public interface ApplyLicenseService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Boolean licenseExamine(Long shopId, Integer status,String result,LoginUserInfo user);
|
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.alibaba.fastjson.JSONObject;
|
||||||
import com.cool.store.constants.CommonConstants;
|
import com.cool.store.constants.CommonConstants;
|
||||||
import com.cool.store.context.LoginUserInfo;
|
import com.cool.store.context.LoginUserInfo;
|
||||||
import com.cool.store.dao.EnterpriseUserDAO;
|
import com.cool.store.dao.*;
|
||||||
import com.cool.store.dao.QualificationsInfoDAO;
|
|
||||||
import com.cool.store.dao.RegionDao;
|
|
||||||
import com.cool.store.dao.ShopStageInfoDAO;
|
|
||||||
import com.cool.store.entity.*;
|
import com.cool.store.entity.*;
|
||||||
import com.cool.store.enums.*;
|
import com.cool.store.enums.*;
|
||||||
import com.cool.store.enums.point.ShopSubStageEnum;
|
import com.cool.store.enums.point.ShopSubStageEnum;
|
||||||
@@ -43,6 +40,8 @@ import java.util.stream.Collectors;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
public class ApplyLicenseServiceImpl implements ApplyLicenseService {
|
public class ApplyLicenseServiceImpl implements ApplyLicenseService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ShopInfoDAO shopInfoDAO;
|
||||||
@Resource
|
@Resource
|
||||||
ApplyLicenseMapper applyLicenseMapper;
|
ApplyLicenseMapper applyLicenseMapper;
|
||||||
|
|
||||||
@@ -113,6 +112,19 @@ public class ApplyLicenseServiceImpl implements ApplyLicenseService {
|
|||||||
if (!acquired) {
|
if (!acquired) {
|
||||||
throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION);
|
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 license = applyLicenseMapper.selectByShopId(request.getShopId());
|
||||||
LicenseTransactDO licenseTransactDO = request.toLicenseTransactDO(license);
|
LicenseTransactDO licenseTransactDO = request.toLicenseTransactDO(license);
|
||||||
@@ -358,4 +370,22 @@ public class ApplyLicenseServiceImpl implements ApplyLicenseService {
|
|||||||
shopStageInfoDAO.updateShopStageAndAuditInfo(shopId, shopSubStageStatusEnum, shopAuditInfoDO.getId());
|
shopStageInfoDAO.updateShopStageAndAuditInfo(shopId, shopSubStageStatusEnum, shopAuditInfoDO.getId());
|
||||||
return null;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user