This commit is contained in:
guohb
2024-05-16 14:33:44 +08:00
parent 482d73ebd0
commit 0ae893dcfb
6 changed files with 106 additions and 110 deletions

View File

@@ -25,6 +25,8 @@
where shop_id = #{shopId} where shop_id = #{shopId}
and audit_type = 4 and audit_type = 4
and deleted = 0 and deleted = 0
order by create_time desc
limit 1
</select> </select>
<select id="getAuditInfoList" resultType="com.cool.store.entity.ShopAuditInfoDO"> <select id="getAuditInfoList" resultType="com.cool.store.entity.ShopAuditInfoDO">

View File

@@ -63,7 +63,7 @@ public class SysStoreAppRequest {
@ApiModelProperty("战区描述") @ApiModelProperty("战区描述")
private String fightDesc; private String fightDesc;
@ApiModelProperty("战区描述") @ApiModelProperty("战区编码")
private String fightCode; private String fightCode;
@ApiModelProperty("战区名称") @ApiModelProperty("战区名称")
private String fightName; private String fightName;

View File

@@ -1,7 +1,11 @@
package com.cool.store.response; package com.cool.store.response;
import cn.hutool.core.date.DateUtil;
import com.cool.store.enums.LicenseTypeEnum;
import lombok.Data; import lombok.Data;
import java.util.Objects;
@Data @Data
public class GetStoreInfoByCodeResponse { public class GetStoreInfoByCodeResponse {
/** /**
@@ -161,31 +165,6 @@ public class GetStoreInfoByCodeResponse {
* 备注 * 备注
*/ */
private String storeRemark; private String storeRemark;
public SubmitLicenseResponse.StoreDocument toStoreDocument() {
SubmitLicenseResponse.StoreDocument storeDocument = new SubmitLicenseResponse.StoreDocument();
storeDocument.setStoreBusinessAdd(this.storeBusinessAdd);
storeDocument.setStoreBusinessDate(this.storeBusinessDate);
storeDocument.setStoreBusinessImg(this.storeBusinessImg);
storeDocument.setStoreBusinessName(this.storeBusinessName);
storeDocument.setStoreBusinessNumber(this.storeBusinessNumber);
storeDocument.setStoreBusinessType(this.storeBusinessType);
storeDocument.setStoreBusinessValidPeriod(this.storeBusinessValidPeriod);
storeDocument.setStoreCode(this.storeCode);
storeDocument.setStoreDirector(this.storeDirector);
storeDocument.setStoreFoodLicense(this.storeFoodLicense);
storeDocument.setStoreFoodLicenseBeginDate(this.storeFoodLicenseBeginDate);
storeDocument.setStoreFoodLicenseBusinessAddress(this.storeFoodLicenseBusinessAddress);
storeDocument.setStoreFoodLicenseBusinessScope(this.storeFoodLicenseBusinessScope);
storeDocument.setStoreFoodLicenseEndDate(this.storeFoodLicenseEndDate);
storeDocument.setStoreFoodLicenseImg(this.storeFoodLicenseImg);
storeDocument.setStoreFoodLicenseLegalRepresentative(this.storeFoodLicenseLegalRepresentative);
storeDocument.setStoreFoodLicenseMainBusiness(this.storeFoodLicenseMainBusiness);
storeDocument.setStoreFoodLicenseOperatorName(this.storeFoodLicenseOperatorName);
storeDocument.setStoreRemark(this.storeRemark);
return storeDocument;
}
} }

View File

@@ -99,82 +99,73 @@ public class SubmitLicenseResponse {
@Data @Data
public static class StoreDocument { public static class StoreDocument {
/** @ApiModelProperty("营业执照拍照上传")
* 营业执照经营场所/住所 private String licenseUrl;
*/
private String storeBusinessAdd; @ApiModelProperty("营业执照名称")
/** private String licenseName;
* 营业执照发证日期
*/ @ApiModelProperty("营业执照类型 0:有限责任公司 1:工体工商")
private String storeBusinessDate; private Integer licenseType;
/**
* 营业执照图片 @ApiModelProperty("营业执照上的法人")
*/ private String licenseLegalPerson;
private String storeBusinessImg;
/** @ApiModelProperty("统一社会信用代码")
* 营业执照名称 private String socialCreditCode;
*/
private String storeBusinessName; @ApiModelProperty("发证日期")
/** private Date issueTime;
* 营业执照统一社会信用代码
*/ @ApiModelProperty("营业执照经营场所")
private String storeBusinessNumber; private String licenseAddress;
/**
* 营业执照类型 @ApiModelProperty("有效期(如果为空则是长期有效)")
*/ private Date validity;
private String storeBusinessType;
/** @ApiModelProperty("有效期类型 0长期有效不用传validity 1效期内")
* 营业执照有效期, 非OCR识别手填。9=长期有效非长期有效则为具体日期2026-06-01 private Integer validityType;
*/
private String storeBusinessValidPeriod;
/** @ApiModelProperty("法人双手持身份证正面+营业执照")
* 门店代码 private String idCardAndLicense1;
*/
private String storeCode; @ApiModelProperty("法人双手持身份证反面+营业执照")
/** private String idCardAndLicense2;
* 营业执照经营者/法人
*/ @ApiModelProperty("食品经营许可证图片上传")
private String storeDirector; private String foodLicenseUrl;
/**
* 食品流通经营许可证编号 @ApiModelProperty("经营者")
*/ private String operator;
private String storeFoodLicense;
/** @ApiModelProperty("食品经营许可证上的法人")
* 食品流通/经营许可证有效期开始日期 private String foodLicenseLegalPerson;
*/
private String storeFoodLicenseBeginDate; @ApiModelProperty("食营经营场所")
/** private String businessPremises;
* 食品经营许可证经营场所
*/ @ApiModelProperty("主体业态")
private String storeFoodLicenseBusinessAddress; private String mainBusiness;
/**
* 食品经营许可证经营项目 @ApiModelProperty("经营项目")
*/ private String businessProject;
private String storeFoodLicenseBusinessScope;
/** @ApiModelProperty("许可证编号")
* 食品流通/经营许可证有效期结束日期 private String foodLicenseCode;
*/
private String storeFoodLicenseEndDate; @ApiModelProperty("许可证开始时间")
/** private Date foodLicenseStartTime;
* 食品经营许可证照片
*/ @ApiModelProperty("许可证截止时间")
private String storeFoodLicenseImg; private Date foodLicenseEndTime;
/**
* 食品经营许可证法定代表人(负责人) @ApiModelProperty("备注")
*/ private String remark;
private String storeFoodLicenseLegalRepresentative;
/** @ApiModelProperty("备注图片")
* 食品经营许可证主体业态 private String remarkUrl;
*/
private String storeFoodLicenseMainBusiness;
/**
* 食品经营许可证经营者名称
*/
private String storeFoodLicenseOperatorName;
/**
* 备注
*/
private String storeRemark;
} }
public static SubmitLicenseResponse from(GetStoreInfoByCodeResponse storeInfoCode, public static SubmitLicenseResponse from(GetStoreInfoByCodeResponse storeInfoCode,

View File

@@ -1,15 +1,13 @@
package com.cool.store.service.impl; package com.cool.store.service.impl;
import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.cool.store.context.LoginUserInfo; import com.cool.store.context.LoginUserInfo;
import com.cool.store.dao.EnterpriseUserDAO; import com.cool.store.dao.EnterpriseUserDAO;
import com.cool.store.dao.RegionDao; import com.cool.store.dao.RegionDao;
import com.cool.store.dao.ShopStageInfoDAO; import com.cool.store.dao.ShopStageInfoDAO;
import com.cool.store.entity.*; import com.cool.store.entity.*;
import com.cool.store.enums.AuditTypeEnum; import com.cool.store.enums.*;
import com.cool.store.enums.MessageEnum;
import com.cool.store.enums.SMSMsgEnum;
import com.cool.store.enums.UserRoleEnum;
import com.cool.store.enums.point.ShopSubStageEnum; import com.cool.store.enums.point.ShopSubStageEnum;
import com.cool.store.enums.point.ShopSubStageStatusEnum; import com.cool.store.enums.point.ShopSubStageStatusEnum;
import com.cool.store.mapper.*; import com.cool.store.mapper.*;
@@ -156,7 +154,7 @@ public class ApplyLicenseServiceImpl implements ApplyLicenseService {
submitLicenseResponse = SubmitLicenseResponse.from(storeInfoCode, submitLicenseResponse); submitLicenseResponse = SubmitLicenseResponse.from(storeInfoCode, submitLicenseResponse);
//给前端判断哪些是鲜丰数据不可修改 //给前端判断哪些是鲜丰数据不可修改
GetStoreInfoByCodeResponse.StoreDocument storeDocument = storeInfoCode.getData().getStoreDocument(); GetStoreInfoByCodeResponse.StoreDocument storeDocument = storeInfoCode.getData().getStoreDocument();
SubmitLicenseResponse.StoreDocument storeDocumentResponse = storeDocument.toStoreDocument(); SubmitLicenseResponse.StoreDocument storeDocumentResponse = toStoreDocument(storeDocument);
submitLicenseResponse.setStoreDocument(storeDocumentResponse); submitLicenseResponse.setStoreDocument(storeDocumentResponse);
return submitLicenseResponse; return submitLicenseResponse;
} }
@@ -165,6 +163,31 @@ public class ApplyLicenseServiceImpl implements ApplyLicenseService {
return submitLicenseResponse; return submitLicenseResponse;
} }
public SubmitLicenseResponse.StoreDocument toStoreDocument(GetStoreInfoByCodeResponse.StoreDocument storeDocument) {
SubmitLicenseResponse.StoreDocument submitLicenseResponse = new SubmitLicenseResponse.StoreDocument();
boolean storeBusinessValidPeriod = storeDocument.getStoreBusinessValidPeriod().equals("9");
submitLicenseResponse.setLicenseType(LicenseTypeEnum.matchName(storeDocument.getStoreBusinessType()).getCode());
submitLicenseResponse.setLicenseLegalPerson(storeDocument.getStoreDirector());
submitLicenseResponse.setIssueTime(DateUtil.parseDate(storeDocument.getStoreBusinessDate()));
submitLicenseResponse.setLicenseAddress(storeDocument.getStoreBusinessAdd());
submitLicenseResponse.setValidity(storeBusinessValidPeriod ? null : DateUtil.parseTime(storeDocument.getStoreBusinessValidPeriod()));
submitLicenseResponse.setValidityType(storeBusinessValidPeriod ? 0 : 1);
submitLicenseResponse.setOperator(storeDocument.getStoreDirector());
submitLicenseResponse.setFoodLicenseLegalPerson(storeDocument.getStoreFoodLicenseOperatorName());
submitLicenseResponse.setMainBusiness(storeDocument.getStoreFoodLicenseMainBusiness());
submitLicenseResponse.setBusinessProject(storeDocument.getStoreFoodLicenseBusinessScope());
submitLicenseResponse.setRemark(storeDocument.getStoreRemark());
submitLicenseResponse.setLicenseUrl(storeDocument.getStoreBusinessImg());
submitLicenseResponse.setLicenseName(storeDocument.getStoreBusinessName());
submitLicenseResponse.setSocialCreditCode(storeDocument.getStoreBusinessNumber());
submitLicenseResponse.setFoodLicenseUrl(storeDocument.getStoreFoodLicenseImg());
submitLicenseResponse.setBusinessPremises(storeDocument.getStoreFoodLicenseBusinessAddress());
submitLicenseResponse.setFoodLicenseCode(storeDocument.getStoreFoodLicense());
submitLicenseResponse.setFoodLicenseStartTime(DateUtil.parseDate(storeDocument.getStoreFoodLicenseBeginDate()));
submitLicenseResponse.setFoodLicenseEndTime(DateUtil.parseDate(storeDocument.getStoreFoodLicenseEndDate()));
return submitLicenseResponse;
}
@Override @Override
public PageInfo<LicenseListResponse> licenseList(LicenseListRequest request, LoginUserInfo user) { public PageInfo<LicenseListResponse> licenseList(LicenseListRequest request, LoginUserInfo user) {
//当前用户角色 //当前用户角色

View File

@@ -341,7 +341,8 @@ public class SysStoreAppServiceImpl implements SysStoreAppService, AuditResultSe
// ssdq // ssdq
newStoreRequest.setSsdq(sysStoreAppRequest.getStoreDetail().getBigCode()); newStoreRequest.setSsdq(sysStoreAppRequest.getStoreDetail().getBigCode());
// ssxq // ssxq
newStoreRequest.setSsxq(sysStoreAppRequest.getStoreDetail().getSmallCode()); RegionDO smallRegion = regionMapper.getByRegionId(Long.valueOf(sysStoreAppRequest.getStoreDetail().getSmallCode()));
newStoreRequest.setSsxq(smallRegion.getSynDingDeptId());
// sszq // sszq
newStoreRequest.setSszq(sysStoreAppRequest.getStoreDetail().getFightCode()); newStoreRequest.setSszq(sysStoreAppRequest.getStoreDetail().getFightCode());
// start_time // start_time
@@ -398,8 +399,8 @@ public class SysStoreAppServiceImpl implements SysStoreAppService, AuditResultSe
newStoreRequest.setZxxdz(pointInfoDO.getAddress()); newStoreRequest.setZxxdz(pointInfoDO.getAddress());
// zxxzyjzds // zxxzyjzds
newStoreRequest.setZxxzyjzds(sysStoreAppRequest.getStoreDetail().getOfflineCompetitor()); newStoreRequest.setZxxzyjzds(sysStoreAppRequest.getStoreDetail().getOfflineCompetitor());
// zymdbm // // zymdbm
newStoreRequest.setZymdbm(pointInfoDO.getPointCode()); // newStoreRequest.setZymdbm(pointInfoDO.getPointCode());
// zzqms // zzqms
newStoreRequest.setZzqms(sysStoreAppRequest.getStoreDetail().getFightName()); newStoreRequest.setZzqms(sysStoreAppRequest.getStoreDetail().getFightName());
newStoreRequest.setZzsqlx(sysStoreAppRequest.getStoreDetail().getMainBusinessType()); newStoreRequest.setZzsqlx(sysStoreAppRequest.getStoreDetail().getMainBusinessType());