add
This commit is contained in:
@@ -0,0 +1,116 @@
|
||||
package com.cool.store.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import javax.persistence.*;
|
||||
|
||||
@Data
|
||||
@Table(name = "xfsg_shop_rent_info")
|
||||
public class ShopRentInfoDO {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 店铺id
|
||||
*/
|
||||
@Column(name = "shop_id")
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* 店铺id
|
||||
*/
|
||||
@Column(name = "point_id")
|
||||
private Long pointId;
|
||||
|
||||
/**
|
||||
* 租赁类型 1铺位直租 2自有铺位
|
||||
*/
|
||||
@Column(name = "rent_type")
|
||||
private Integer rentType;
|
||||
|
||||
/**
|
||||
* 签约日期
|
||||
*/
|
||||
@Column(name = "sign_time")
|
||||
private Date signTime;
|
||||
|
||||
/**
|
||||
* 合同开始日期
|
||||
*/
|
||||
@Column(name = "contract_start_time")
|
||||
private Date contractStartTime;
|
||||
|
||||
/**
|
||||
* 签约年限
|
||||
*/
|
||||
@Column(name = "contract_months")
|
||||
private Integer contractMonths;
|
||||
|
||||
/**
|
||||
* 店铺租金 1固定租金 2非固定租金
|
||||
*/
|
||||
@Column(name = "shop_rent_type")
|
||||
private Integer shopRentType;
|
||||
|
||||
/**
|
||||
* 月租金
|
||||
*/
|
||||
@Column(name = "month_rent")
|
||||
private String monthRent;
|
||||
|
||||
/**
|
||||
* 第一年月租金
|
||||
*/
|
||||
@Column(name = "first_year_month_rent")
|
||||
private String firstYearMonthRent;
|
||||
|
||||
/**
|
||||
* 第二年月租金
|
||||
*/
|
||||
@Column(name = "second_year_month_rent")
|
||||
private String secondYearMonthRent;
|
||||
|
||||
/**
|
||||
* 第三年月租金
|
||||
*/
|
||||
@Column(name = "third_year_month_rent")
|
||||
private String thirdYearMonthRent;
|
||||
|
||||
/**
|
||||
* 合同图片
|
||||
*/
|
||||
@Column(name = "contract_pic")
|
||||
private String contractPic;
|
||||
|
||||
/**
|
||||
* 房产证明
|
||||
*/
|
||||
@Column(name = "house_certificate_pic")
|
||||
private String houseCertificatePic;
|
||||
|
||||
/**
|
||||
* 审核id
|
||||
*/
|
||||
@Column(name = "audit_id")
|
||||
private Long auditId;
|
||||
|
||||
/**
|
||||
* 删除标识
|
||||
*/
|
||||
private Boolean deleted;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Column(name = "create_time")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@Column(name = "update_time")
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import com.cool.store.entity.LineAuditInfoDO;
|
||||
import com.cool.store.enums.AuditResultTypeEnum;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: AuditRentContractRequest
|
||||
* @Description:租赁合同审核
|
||||
* @date 2024-04-16 14:30
|
||||
*/
|
||||
@Data
|
||||
public class AuditRentContractRequest {
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty("店铺id")
|
||||
private Long shopId;
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty("0通过,1拒绝")
|
||||
private Integer resultType;
|
||||
|
||||
@ApiModelProperty("原因")
|
||||
private String reason;
|
||||
|
||||
public static LineAuditInfoDO convert(AuditRentContractRequest request, String partnerId, Long lineId){
|
||||
LineAuditInfoDO result = new LineAuditInfoDO();
|
||||
result.setPartnerId(partnerId);
|
||||
result.setLineId(lineId);
|
||||
result.setResultType(request.getResultType());
|
||||
if(AuditResultTypeEnum.PASS.getCode().equals(request.getResultType())){
|
||||
result.setResultType(AuditResultTypeEnum.PASS.getCode());
|
||||
}else{
|
||||
result.setPassReason(request.getReason());
|
||||
result.setRejectRealReason(request.getReason());
|
||||
}
|
||||
result.setRejectPublicReason(request.getReason());
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -7,6 +7,7 @@ import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.Max;
|
||||
import javax.validation.constraints.Min;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class MiniAddPointRequest {
|
||||
@@ -29,11 +30,6 @@ public class MiniAddPointRequest {
|
||||
@ApiModelProperty("经营状况")
|
||||
private Integer businessStatus;
|
||||
|
||||
@Min(1)
|
||||
@Max(4)
|
||||
@ApiModelProperty("立地条件1.单门面 2.双门面 3.多门面 4.转角")
|
||||
private Integer siteConditions;
|
||||
|
||||
@ApiModelProperty("使用面积(一楼)")
|
||||
private String pointArea;
|
||||
|
||||
@@ -48,14 +44,21 @@ public class MiniAddPointRequest {
|
||||
@ApiModelProperty("图片对象")
|
||||
private String pictureObj;
|
||||
|
||||
@ApiModelProperty(value = "当前线索id", hidden = true)
|
||||
private Long curLineId;
|
||||
|
||||
@ApiModelProperty("加盟商签名")
|
||||
private String lineSign;
|
||||
|
||||
|
||||
public static PointDetailInfoDO convertDO(MiniAddPointRequest request) {
|
||||
PointDetailInfoDO result = new PointDetailInfoDO();
|
||||
result.setBusinessStatus(request.getBusinessStatus());
|
||||
result.setSiteConditions(request.getSiteConditions());
|
||||
result.setPaymentMethod(request.getPaymentMethod());
|
||||
result.setTransferFee(request.getTransferFee());
|
||||
result.setPictureObj(request.getPictureObj());
|
||||
result.setLineSign(request.getLineSign());
|
||||
result.setLineSignTime(new Date());
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ public class MiniPointPageRequest extends PageBasicInfo {
|
||||
@ApiModelProperty("1.待选择 2.已选择 3.拒绝/失效")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "线索id",hidden = true)
|
||||
@ApiModelProperty(value = "线索id")
|
||||
private Long lineId;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: SelectPointRequest
|
||||
* @Description:
|
||||
* @date 2024-04-12 15:08
|
||||
*/
|
||||
@Data
|
||||
public class RejectPointRequest {
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty("铺位id")
|
||||
private Long pointId;
|
||||
|
||||
@NotBlank
|
||||
@ApiModelProperty("拒绝原因")
|
||||
private String reason;
|
||||
|
||||
@ApiModelProperty(value = "当前线索id", hidden = true)
|
||||
private Long lineId;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package com.cool.store.request;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
|
||||
@@ -26,4 +27,8 @@ public class SelectPointRequest {
|
||||
@ApiModelProperty(value = "当前线索id", hidden = true)
|
||||
private Long lineId;
|
||||
|
||||
@NotBlank
|
||||
@ApiModelProperty("加盟商签字")
|
||||
private String lineSign;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,125 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.aliyun.openservices.shade.org.apache.commons.lang3.StringUtils;
|
||||
import com.cool.store.entity.ShopRentInfoDO;
|
||||
import com.cool.store.enums.RentTypeEnum;
|
||||
import com.cool.store.enums.ShopRentTypeEnum;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: UploadRentContractRequest
|
||||
* @Description:上传租赁合同
|
||||
* @date 2024-04-16 11:38
|
||||
*/
|
||||
@Data
|
||||
public class UploadRentContractRequest {
|
||||
|
||||
@ApiModelProperty("店铺id")
|
||||
private Long shopId;
|
||||
|
||||
@ApiModelProperty("铺位id")
|
||||
private Long pointId;
|
||||
|
||||
@NotNull
|
||||
@ApiModelProperty("租赁类型 1铺位直租 2自有铺位")
|
||||
private Integer rentType;
|
||||
|
||||
@ApiModelProperty("签约日期")
|
||||
private Date signTime;
|
||||
|
||||
@ApiModelProperty("合同开始日期")
|
||||
private Date contractStartTime;
|
||||
|
||||
@ApiModelProperty("签约年限")
|
||||
private Integer contractMonths;
|
||||
|
||||
@ApiModelProperty("店铺租金 1固定租金 2非固定租金")
|
||||
private Integer shopRentType;
|
||||
|
||||
@ApiModelProperty("月租金")
|
||||
private String monthRent;
|
||||
|
||||
@ApiModelProperty("第一年月租金")
|
||||
private String firstYearMonthRent;
|
||||
|
||||
@ApiModelProperty("第二年月租金")
|
||||
private String secondYearMonthRent;
|
||||
|
||||
@ApiModelProperty("第三年月租金")
|
||||
private String thirdYearMonthRent;
|
||||
|
||||
@Size(max = 3, message = "最多上传三张租赁合同")
|
||||
@ApiModelProperty("合同图片")
|
||||
private List<String> contractPic;
|
||||
|
||||
@Size(max = 3, message = "最多上传三张房产证明")
|
||||
@ApiModelProperty("房产证明")
|
||||
private List<String> houseCertificatePic;
|
||||
|
||||
@ApiModelProperty(value = "当前线索id", hidden = true)
|
||||
private Long curLineId;
|
||||
|
||||
public boolean check(){
|
||||
if(Objects.isNull(shopId) && Objects.isNull(pointId)){
|
||||
return false;
|
||||
}
|
||||
if(RentTypeEnum.OWN.getCode().equals(rentType)){
|
||||
if(CollectionUtils.isEmpty(houseCertificatePic) || houseCertificatePic.size() > 3){
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if(Objects.isNull(signTime) || Objects.isNull(contractStartTime)){
|
||||
return false;
|
||||
}
|
||||
if(Objects.isNull(contractMonths) || Objects.isNull(shopRentType)){
|
||||
return false;
|
||||
}
|
||||
if(ShopRentTypeEnum.FIXED.getCode().equals(shopRentType)){
|
||||
if(StringUtils.isBlank(monthRent)){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if(ShopRentTypeEnum.NOT_FIXED.getCode().equals(shopRentType)){
|
||||
if(StringUtils.isAnyBlank(firstYearMonthRent, secondYearMonthRent, thirdYearMonthRent)){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if(CollectionUtils.isEmpty(contractPic) || contractPic.size() > 3){
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static ShopRentInfoDO convertDO(UploadRentContractRequest param){
|
||||
if(Objects.isNull(param)){
|
||||
return null;
|
||||
}
|
||||
ShopRentInfoDO shopRentInfoDO = new ShopRentInfoDO();
|
||||
shopRentInfoDO.setShopId(param.getShopId());
|
||||
shopRentInfoDO.setPointId(param.getPointId());
|
||||
shopRentInfoDO.setRentType(param.getRentType());
|
||||
shopRentInfoDO.setSignTime(param.getSignTime());
|
||||
shopRentInfoDO.setContractStartTime(param.getContractStartTime());
|
||||
shopRentInfoDO.setContractMonths(param.getContractMonths());
|
||||
shopRentInfoDO.setShopRentType(param.getShopRentType());
|
||||
shopRentInfoDO.setMonthRent(param.getMonthRent());
|
||||
shopRentInfoDO.setFirstYearMonthRent(param.getFirstYearMonthRent());
|
||||
shopRentInfoDO.setSecondYearMonthRent(param.getSecondYearMonthRent());
|
||||
shopRentInfoDO.setThirdYearMonthRent(param.getThirdYearMonthRent());
|
||||
shopRentInfoDO.setContractPic(JSONObject.toJSONString(param.getContractPic()));
|
||||
shopRentInfoDO.setHouseCertificatePic(JSONObject.toJSONString(param.getHouseCertificatePic()));
|
||||
return shopRentInfoDO;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.cool.store.vo.point;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.entity.ShopRentInfoDO;
|
||||
import com.cool.store.enums.RentTypeEnum;
|
||||
import com.cool.store.vo.LineAuditInfoVO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDate;
|
||||
import java.time.ZoneId;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: ShopRentInfoVO
|
||||
* @Description:
|
||||
* @date 2024-04-16 14:03
|
||||
*/
|
||||
@Data
|
||||
public class ShopRentInfoVO {
|
||||
|
||||
@ApiModelProperty("店铺id")
|
||||
private Long shopId;
|
||||
|
||||
@ApiModelProperty("铺位id")
|
||||
private Long pointId;
|
||||
|
||||
@ApiModelProperty("租赁类型 1铺位直租 2自有铺位")
|
||||
private Integer rentType;
|
||||
|
||||
@ApiModelProperty("签约日期")
|
||||
private Date signTime;
|
||||
|
||||
@ApiModelProperty("合同开始日期")
|
||||
private Date contractStartTime;
|
||||
|
||||
@ApiModelProperty("合同结束日期")
|
||||
private Date contractEndTime;
|
||||
|
||||
@ApiModelProperty("签约年限")
|
||||
private Integer contractMonths;
|
||||
|
||||
@ApiModelProperty("店铺租金 1固定租金 2非固定租金")
|
||||
private Integer shopRentType;
|
||||
|
||||
@ApiModelProperty("月租金")
|
||||
private String monthRent;
|
||||
|
||||
@ApiModelProperty("第一年月租金")
|
||||
private String firstYearMonthRent;
|
||||
|
||||
@ApiModelProperty("第二年月租金")
|
||||
private String secondYearMonthRent;
|
||||
|
||||
@ApiModelProperty("第三年月租金")
|
||||
private String thirdYearMonthRent;
|
||||
|
||||
@ApiModelProperty("合同图片")
|
||||
private List<String> contractPic;
|
||||
|
||||
@ApiModelProperty("房产证明")
|
||||
private List<String> houseCertificatePic;
|
||||
|
||||
@ApiModelProperty("状态")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("审核信息")
|
||||
private LineAuditInfoVO auditInfo;
|
||||
|
||||
public static ShopRentInfoVO build(ShopRentInfoDO shopRentInfo) {
|
||||
ShopRentInfoVO result = new ShopRentInfoVO();
|
||||
result.setShopId(shopRentInfo.getShopId());
|
||||
result.setPointId(shopRentInfo.getPointId());
|
||||
result.setRentType(shopRentInfo.getRentType());
|
||||
result.setSignTime(shopRentInfo.getSignTime());
|
||||
if(RentTypeEnum.RENT.getCode().equals(shopRentInfo.getRentType())){
|
||||
result.setContractStartTime(shopRentInfo.getContractStartTime());
|
||||
LocalDate start = shopRentInfo.getContractStartTime().toInstant().atZone(java.time.ZoneId.systemDefault()).toLocalDate();
|
||||
Instant instant = start.plusMonths(shopRentInfo.getContractMonths()).minusDays(1L).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant();
|
||||
result.setContractEndTime(Date.from(instant));
|
||||
result.setContractMonths(shopRentInfo.getContractMonths());
|
||||
}
|
||||
result.setShopRentType(shopRentInfo.getShopRentType());
|
||||
result.setMonthRent(shopRentInfo.getMonthRent());
|
||||
result.setFirstYearMonthRent(shopRentInfo.getFirstYearMonthRent());
|
||||
result.setSecondYearMonthRent(shopRentInfo.getSecondYearMonthRent());
|
||||
result.setThirdYearMonthRent(shopRentInfo.getThirdYearMonthRent());
|
||||
result.setContractPic(JSONObject.parseArray(shopRentInfo.getContractPic(), String.class));
|
||||
result.setHouseCertificatePic(JSONObject.parseArray(shopRentInfo.getHouseCertificatePic(), String.class));
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.cool.store.vo.shop;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: StageShopCountVO
|
||||
* @Description:
|
||||
* @date 2024-04-16 14:59
|
||||
*/
|
||||
@Data
|
||||
public class StageShopCountVO {
|
||||
|
||||
@ApiModelProperty("选址数量")
|
||||
private Integer selectPointCount;
|
||||
|
||||
@ApiModelProperty("筹建数量")
|
||||
private Integer buildShopCount;
|
||||
|
||||
@ApiModelProperty("开业数量")
|
||||
private Integer openShopCount;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user