移动端督导代写
This commit is contained in:
@@ -64,6 +64,8 @@ public enum UserRoleEnum {
|
||||
OWN_SHOP_OFFICE(480000000L,"自有店财务"),
|
||||
|
||||
BRAND_HEAD(490000000L,"品牌负责人"),
|
||||
|
||||
QW_SUPERVISION(1725431698852L,"企微督导"),
|
||||
;
|
||||
|
||||
private Long code;
|
||||
|
||||
@@ -87,4 +87,10 @@ public class LicenseTransactDO {
|
||||
private Integer syncFlag;
|
||||
@Column(name = "legal_is_same_partner")
|
||||
private Boolean legalIsSamePartner;
|
||||
@Column(name = "single_shop")
|
||||
private Boolean singleShop;
|
||||
@Column(name = "commitment_url")
|
||||
private String commitmentUrl;
|
||||
@Column(name = "food_shop_list_url")
|
||||
private String foodShopListUrl;
|
||||
}
|
||||
|
||||
@@ -75,6 +75,16 @@ public class BusinessLicenseRequest {
|
||||
//@NotBlank(message = "法人手机号不能为空")
|
||||
private String licenseLegalMobile;
|
||||
|
||||
@ApiModelProperty("是否单店使用")
|
||||
@NotNull(message = "是否单店使用不能为空")
|
||||
private Boolean singleShop;
|
||||
|
||||
@ApiModelProperty("美食城承诺书")
|
||||
private String commitmentUrl;
|
||||
|
||||
@ApiModelProperty("美食城档口列表")
|
||||
private String foodShopListUrl;
|
||||
|
||||
public LicenseTransactDO toLicenseTransactDO(LicenseTransactDO licenseTransactDO) {
|
||||
if (Objects.isNull(licenseTransactDO)){
|
||||
licenseTransactDO = new LicenseTransactDO();
|
||||
@@ -99,6 +109,9 @@ public class BusinessLicenseRequest {
|
||||
}else if (this.validityType == 1){
|
||||
licenseTransactDO.setValidity(this.validity);
|
||||
}
|
||||
licenseTransactDO.setSingleShop(this.singleShop);
|
||||
licenseTransactDO.setCommitmentUrl(this.commitmentUrl);
|
||||
licenseTransactDO.setFoodShopListUrl(this.foodShopListUrl);
|
||||
return licenseTransactDO;
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,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.List;
|
||||
import java.util.Objects;
|
||||
@@ -122,7 +123,14 @@ public class SubmitLicenseResponse {
|
||||
private StoreDocument storeDocument;
|
||||
@ApiModelProperty("二证合一标识;0否 1 是")
|
||||
private Integer twoCertificatesOne;
|
||||
@ApiModelProperty("是否单店使用")
|
||||
private Boolean singleShop;
|
||||
|
||||
@ApiModelProperty("美食城承诺书")
|
||||
private String commitmentUrl;
|
||||
|
||||
@ApiModelProperty("美食城档口列表")
|
||||
private String foodShopListUrl;
|
||||
@Data
|
||||
public static class StoreDocument {
|
||||
@ApiModelProperty("营业执照拍照上传")
|
||||
@@ -227,6 +235,9 @@ public class SubmitLicenseResponse {
|
||||
return new SubmitLicenseResponse();
|
||||
}
|
||||
SubmitLicenseResponse submitLicenseResponse = new SubmitLicenseResponse();
|
||||
submitLicenseResponse.setSingleShop(licenseTransactDO.getSingleShop());
|
||||
submitLicenseResponse.setCommitmentUrl(licenseTransactDO.getCommitmentUrl());
|
||||
submitLicenseResponse.setFoodShopListUrl(licenseTransactDO.getFoodShopListUrl());
|
||||
submitLicenseResponse.setLegalIsSamePartner(licenseTransactDO.getLegalIsSamePartner());
|
||||
submitLicenseResponse.setLicenseLegalIdCardNo(licenseTransactDO.getLicenseLegalIdCardNo());
|
||||
submitLicenseResponse.setLicenseLegalIdCardFront(licenseTransactDO.getLicenseLegalIdCardFront());
|
||||
|
||||
@@ -186,4 +186,13 @@ public interface DeskService {
|
||||
*/
|
||||
PageInfo<PreparationCommonPendingVO> measurePendingList(Integer pageNum, Integer pageSize, LoginUserInfo user);
|
||||
|
||||
/**
|
||||
* 营业执照
|
||||
*/
|
||||
PageInfo<PreparationCommonPendingVO> businessLicensePendingList(Integer pageNum, Integer pageSize, LoginUserInfo user);
|
||||
|
||||
/**
|
||||
* 食品安全许可证
|
||||
*/
|
||||
PageInfo<PreparationCommonPendingVO> foodLicensePendingList(Integer pageNum, Integer pageSize, LoginUserInfo user);
|
||||
}
|
||||
|
||||
@@ -241,6 +241,11 @@ public class DeskServiceImpl implements DeskService {
|
||||
PageInfo<PreparationCommonPendingVO> pageInfo = new PageInfo<>();
|
||||
List<Integer> subStageStatusList = new ArrayList<>();
|
||||
if (CollectionUtils.isNotEmpty(userRoleIds)) {
|
||||
//督导代填
|
||||
if (userRoleIds.contains(UserRoleEnum.QW_SUPERVISION.getCode()) || userRoleIds.contains(UserRoleEnum.SUPERVISION.getCode())) {
|
||||
pageInfo = commonPendingVOPageInfo(pageNum, pageSize, user, ShopSubStageEnum.SHOP_STAGE_7,
|
||||
Collections.singletonList(SHOP_SUB_STAGE_STATUS_71.getShopSubStageStatus()), Boolean.FALSE);
|
||||
} else {
|
||||
if (userRoleIds.contains(UserRoleEnum.JOIN_OFFICE.getCode()) || userRoleIds.contains(UserRoleEnum.REGION_OFFICE.getCode())) {
|
||||
subStageStatusList.add(SHOP_SUB_STAGE_STATUS_70.getShopSubStageStatus());
|
||||
}
|
||||
@@ -252,6 +257,7 @@ public class DeskServiceImpl implements DeskService {
|
||||
subStageStatusList, Boolean.TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
List<PreparationCommonPendingVO> list = pageInfo.getList();
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return pageInfo;
|
||||
@@ -558,6 +564,10 @@ public class DeskServiceImpl implements DeskService {
|
||||
@Override
|
||||
public PageInfo<PreparationCommonPendingVO> buildInformationPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
|
||||
List<Long> userRoleIds = enterpriseUserRoleMapper.getUserRoleIds(user.getUserId());
|
||||
if (userRoleIds.contains(UserRoleEnum.QW_SUPERVISION.getCode()) || userRoleIds.contains(UserRoleEnum.SUPERVISION.getCode())) {
|
||||
return commonPendingVOPageInfo(pageNum, pageSize, user, ShopSubStageEnum.SHOP_STAGE_15,
|
||||
Collections.singletonList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_151.getShopSubStageStatus()), Boolean.FALSE );
|
||||
}
|
||||
List<Integer> subStageStatusList = new ArrayList<>();
|
||||
if (userRoleIds.contains(UserRoleEnum.LOGISTICS.getCode())) {
|
||||
subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_151.getShopSubStageStatus());
|
||||
@@ -635,6 +645,18 @@ public class DeskServiceImpl implements DeskService {
|
||||
return new PageInfo<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageInfo<PreparationCommonPendingVO> businessLicensePendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
|
||||
return commonPendingVOPageInfo(pageNum, pageSize, user, ShopSubStageEnum.SHOP_STAGE_3,
|
||||
Collections.singletonList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_30.getShopSubStageStatus()), Boolean.FALSE );
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageInfo<PreparationCommonPendingVO> foodLicensePendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
|
||||
return commonPendingVOPageInfo(pageNum, pageSize, user, ShopSubStageEnum.SHOP_STAGE_4,
|
||||
Collections.singletonList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_40.getShopSubStageStatus()), Boolean.FALSE );
|
||||
}
|
||||
|
||||
/**
|
||||
* 通用查询
|
||||
*
|
||||
@@ -709,6 +731,7 @@ public class DeskServiceImpl implements DeskService {
|
||||
preparationCommonPendingVO.setPartnerPhone(planLineDTO.getMobile());
|
||||
preparationCommonPendingVO.setShopManagerUserName(userNameMap.getOrDefault(shopInfoDO.getShopManagerUserId(), ""));
|
||||
preparationCommonPendingVO.setRegionNodeName(regionNameMap.getOrDefault(shopInfoDO.getRegionId(), ""));
|
||||
preparationCommonPendingVO.setSubmitTime(DateUtils.parseDateToStr(SPECIAL_DATE_START, x.getUpdateTime()));
|
||||
list.add(preparationCommonPendingVO);
|
||||
});
|
||||
result.setList(list);
|
||||
|
||||
@@ -212,4 +212,20 @@ public class DeskController {
|
||||
LoginUserInfo userInfo = CurrentUserHolder.getUser();
|
||||
return ResponseResult.success(deskService.measurePendingList(pageNumber,pageSize,userInfo));
|
||||
}
|
||||
|
||||
@ApiOperation("待处理-营业执照")
|
||||
@GetMapping("/businessLicensePendingList")
|
||||
public ResponseResult<PageInfo<PreparationCommonPendingVO>> businessLicensePendingList(@RequestParam(value = "pageNumber",required = true,defaultValue = "1")Integer pageNumber,
|
||||
@RequestParam(value = "pageSize",required = true,defaultValue = "10")Integer pageSize) {
|
||||
LoginUserInfo userInfo = CurrentUserHolder.getUser();
|
||||
return ResponseResult.success(deskService.businessLicensePendingList(pageNumber,pageSize,userInfo));
|
||||
}
|
||||
|
||||
@ApiOperation("待处理-食品许可证")
|
||||
@GetMapping("/foodLicensePendingList")
|
||||
public ResponseResult<PageInfo<PreparationCommonPendingVO>> foodLicensePendingList(@RequestParam(value = "pageNumber",required = true,defaultValue = "1")Integer pageNumber,
|
||||
@RequestParam(value = "pageSize",required = true,defaultValue = "10")Integer pageSize) {
|
||||
LoginUserInfo userInfo = CurrentUserHolder.getUser();
|
||||
return ResponseResult.success(deskService.foodLicensePendingList(pageNumber,pageSize,userInfo));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,19 +2,21 @@ package com.cool.store.controller.webb;
|
||||
|
||||
import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.context.PartnerUserHolder;
|
||||
import com.cool.store.request.LicenseListRequest;
|
||||
import com.cool.store.request.license.BusinessLicenseRequest;
|
||||
import com.cool.store.request.license.FoodLicenseRequest;
|
||||
import com.cool.store.response.LicenseListResponse;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.response.SubmitLicenseResponse;
|
||||
import com.cool.store.service.ApplyLicenseService;
|
||||
import com.cool.store.vo.PartnerUserInfoVO;
|
||||
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 org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@@ -60,4 +62,22 @@ public class PCApplyLicenseController {
|
||||
LoginUserInfo user = CurrentUserHolder.getUser();
|
||||
return ResponseResult.success(applyLicenseService.licenseExamine(shopId, status, result, user));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("证照办理提交-营业执照")
|
||||
@PostMapping("/submitBusinessLicense")
|
||||
public ResponseResult submitBusinessLicense(@RequestBody @Validated BusinessLicenseRequest request) {
|
||||
PartnerUserInfoVO user = PartnerUserHolder.getUser();
|
||||
return ResponseResult.success(applyLicenseService.submitBusinessLicense(request,user));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("证照办理提交-食品许可证")
|
||||
@PostMapping("/submitFoodLicense")
|
||||
public ResponseResult submitFoodLicense(@RequestBody FoodLicenseRequest request) {
|
||||
PartnerUserInfoVO user = PartnerUserHolder.getUser();
|
||||
return ResponseResult.success(applyLicenseService.submitFoodLicense(request,user));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user