From 932846c5d1be1d49c07b91507f881cd111ff5788 Mon Sep 17 00:00:00 2001 From: guohb Date: Thu, 16 May 2024 10:15:24 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E8=AF=81=E7=85=A7=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=96=B9=E6=B3=95=E4=BD=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/cool/store/dao/ShopStageInfoDAO.java | 4 + .../store/mapper/ShopStageInfoMapper.java | 9 ++ .../resources/mapper/ShopStageInfoMapper.xml | 7 ++ .../response/GetStoreInfoByCodeResponse.java | 27 ++++++ .../store/response/SubmitLicenseResponse.java | 83 +++++++++++++++++++ .../service/impl/ApplyLicenseServiceImpl.java | 7 +- 6 files changed, 136 insertions(+), 1 deletion(-) diff --git a/coolstore-partner-dao/src/main/java/com/cool/store/dao/ShopStageInfoDAO.java b/coolstore-partner-dao/src/main/java/com/cool/store/dao/ShopStageInfoDAO.java index 48ace878d..743f3b1de 100644 --- a/coolstore-partner-dao/src/main/java/com/cool/store/dao/ShopStageInfoDAO.java +++ b/coolstore-partner-dao/src/main/java/com/cool/store/dao/ShopStageInfoDAO.java @@ -275,4 +275,8 @@ public class ShopStageInfoDAO { return shopStageInfoMapper.getSubStageListBySubStageStatus(a.getShopSubStageStatus(),b.getShopSubStageStatus(),c.getShopSubStageStatus()); } + + public ShopStageInfoDO getByShopIdAndSubStage(Long shopId, Integer shopSubStage) { + return shopStageInfoMapper.getByShopIdAndSubStage(shopId,shopSubStage); + } } diff --git a/coolstore-partner-dao/src/main/java/com/cool/store/mapper/ShopStageInfoMapper.java b/coolstore-partner-dao/src/main/java/com/cool/store/mapper/ShopStageInfoMapper.java index ddf116dae..0fb1dcfa5 100644 --- a/coolstore-partner-dao/src/main/java/com/cool/store/mapper/ShopStageInfoMapper.java +++ b/coolstore-partner-dao/src/main/java/com/cool/store/mapper/ShopStageInfoMapper.java @@ -143,4 +143,13 @@ public interface ShopStageInfoMapper extends Mapper { * @description:获取处于a阶段或b阶段,和c阶段的 */ List getSubStageListBySubStageStatus(@Param("subStageStatusA")Integer subStageStatusA,@Param("subStageStatusB")Integer subStageStatusB,@Param("subStageStatusC")Integer subStageStatusC ); + + /** + * 根据shopId和阶段查数据 + * @param shopId + * @param shopSubStage + * @return + */ + ShopStageInfoDO getByShopIdAndSubStage(@Param("shopId") Long shopId, + @Param("shopSubStage") Integer shopSubStage); } diff --git a/coolstore-partner-dao/src/main/resources/mapper/ShopStageInfoMapper.xml b/coolstore-partner-dao/src/main/resources/mapper/ShopStageInfoMapper.xml index af6e00e4b..503e4c708 100644 --- a/coolstore-partner-dao/src/main/resources/mapper/ShopStageInfoMapper.xml +++ b/coolstore-partner-dao/src/main/resources/mapper/ShopStageInfoMapper.xml @@ -295,4 +295,11 @@ and shop_sub_stage_status = #{subStageStatusC} + + \ No newline at end of file diff --git a/coolstore-partner-model/src/main/java/com/cool/store/response/GetStoreInfoByCodeResponse.java b/coolstore-partner-model/src/main/java/com/cool/store/response/GetStoreInfoByCodeResponse.java index 76f41c8d3..4d904db56 100644 --- a/coolstore-partner-model/src/main/java/com/cool/store/response/GetStoreInfoByCodeResponse.java +++ b/coolstore-partner-model/src/main/java/com/cool/store/response/GetStoreInfoByCodeResponse.java @@ -161,5 +161,32 @@ public class GetStoreInfoByCodeResponse { * 备注 */ 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; + } } + + } diff --git a/coolstore-partner-model/src/main/java/com/cool/store/response/SubmitLicenseResponse.java b/coolstore-partner-model/src/main/java/com/cool/store/response/SubmitLicenseResponse.java index dc5a5c897..7279dcf05 100644 --- a/coolstore-partner-model/src/main/java/com/cool/store/response/SubmitLicenseResponse.java +++ b/coolstore-partner-model/src/main/java/com/cool/store/response/SubmitLicenseResponse.java @@ -94,6 +94,89 @@ public class SubmitLicenseResponse { @ApiModelProperty("流程记录") private List processRecords; + @ApiModelProperty("鲜丰拉取方法体") + private StoreDocument storeDocument; + + @Data + public static class StoreDocument { + /** + * 营业执照经营场所/住所 + */ + private String storeBusinessAdd; + /** + * 营业执照发证日期 + */ + private String storeBusinessDate; + /** + * 营业执照图片 + */ + private String storeBusinessImg; + /** + * 营业执照名称 + */ + private String storeBusinessName; + /** + * 营业执照统一社会信用代码 + */ + private String storeBusinessNumber; + /** + * 营业执照类型 + */ + private String storeBusinessType; + /** + * 营业执照有效期, 非OCR识别,手填。9=长期有效,非长期有效则为具体日期,例:2026-06-01 + */ + private String storeBusinessValidPeriod; + /** + * 门店代码 + */ + private String storeCode; + /** + * 营业执照经营者/法人 + */ + private String storeDirector; + /** + * 食品流通经营许可证编号 + */ + private String storeFoodLicense; + /** + * 食品流通/经营许可证有效期开始日期 + */ + private String storeFoodLicenseBeginDate; + /** + * 食品经营许可证经营场所 + */ + private String storeFoodLicenseBusinessAddress; + /** + * 食品经营许可证经营项目 + */ + private String storeFoodLicenseBusinessScope; + /** + * 食品流通/经营许可证有效期结束日期 + */ + private String storeFoodLicenseEndDate; + /** + * 食品经营许可证照片 + */ + private String storeFoodLicenseImg; + /** + * 食品经营许可证法定代表人(负责人) + */ + private String storeFoodLicenseLegalRepresentative; + /** + * 食品经营许可证主体业态 + */ + private String storeFoodLicenseMainBusiness; + /** + * 食品经营许可证经营者名称 + */ + private String storeFoodLicenseOperatorName; + /** + * 备注 + */ + private String storeRemark; + } + public static SubmitLicenseResponse from(GetStoreInfoByCodeResponse storeInfoCode, SubmitLicenseResponse submitLicenseResponse){ if (Objects.isNull(submitLicenseResponse)){ diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/ApplyLicenseServiceImpl.java b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/ApplyLicenseServiceImpl.java index c8773d1ef..a498fb76b 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/ApplyLicenseServiceImpl.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/ApplyLicenseServiceImpl.java @@ -10,6 +10,7 @@ import com.cool.store.enums.AuditTypeEnum; 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.ShopSubStageStatusEnum; import com.cool.store.mapper.*; import com.cool.store.request.LicenseListRequest; @@ -153,6 +154,10 @@ public class ApplyLicenseServiceImpl implements ApplyLicenseService { if (Objects.nonNull(storeInfoCode.getData().getStoreDocument()) && storeInfoCode.getCode() == 0) { //替换落库的值 submitLicenseResponse = SubmitLicenseResponse.from(storeInfoCode, submitLicenseResponse); + //给前端判断哪些是鲜丰数据不可修改 + GetStoreInfoByCodeResponse.StoreDocument storeDocument = storeInfoCode.getData().getStoreDocument(); + SubmitLicenseResponse.StoreDocument storeDocumentResponse = storeDocument.toStoreDocument(); + submitLicenseResponse.setStoreDocument(storeDocumentResponse); return submitLicenseResponse; } } @@ -241,7 +246,7 @@ public class ApplyLicenseServiceImpl implements ApplyLicenseService { //插入操作/意见 shopAuditInfoMapper.insertSelective(shopAuditInfoDO); //更新阶段状态 - shopStageInfoDAO.updateShopStageAndAuditInfo(shopId, shopSubStageStatusEnum, null); + shopStageInfoDAO.updateShopStageAndAuditInfo(shopId, shopSubStageStatusEnum, shopAuditInfoDO.getId()); return null; } }