上传租赁合同审批调整
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import com.cool.store.entity.LineAuditInfoDO;
|
||||
import com.cool.store.entity.ShopAuditInfoDO;
|
||||
import com.cool.store.enums.AuditResultTypeEnum;
|
||||
import com.cool.store.enums.AuditTypeEnum;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -27,18 +29,24 @@ public class AuditRentContractRequest {
|
||||
@ApiModelProperty("原因")
|
||||
private String reason;
|
||||
|
||||
public static LineAuditInfoDO convert(AuditRentContractRequest request, String partnerId, Long lineId){
|
||||
LineAuditInfoDO result = new LineAuditInfoDO();
|
||||
result.setPartnerId(partnerId);
|
||||
result.setLineId(lineId);
|
||||
@ApiModelProperty(value = "操作人id", hidden = true)
|
||||
private String operateUserId;
|
||||
|
||||
@ApiModelProperty(value = "操作人姓名", hidden = true)
|
||||
private String operateUserName;
|
||||
|
||||
public static ShopAuditInfoDO convert(AuditRentContractRequest request, AuditTypeEnum auditType){
|
||||
ShopAuditInfoDO result = new ShopAuditInfoDO();
|
||||
result.setShopId(request.getShopId());
|
||||
result.setAuditType(auditType.getCode());
|
||||
result.setSubmittedUserId(request.getOperateUserId());
|
||||
result.setSubmittedUserName(request.getOperateUserName());
|
||||
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.setRejectReason(request.getReason());
|
||||
}
|
||||
result.setRejectPublicReason(request.getReason());
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.cool.store.vo;
|
||||
|
||||
import com.cool.store.entity.LineAuditInfoDO;
|
||||
import com.cool.store.entity.ShopAuditInfoDO;
|
||||
import com.cool.store.enums.AuditResultTypeEnum;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@@ -26,7 +26,13 @@ public class AuditInfoVO {
|
||||
@ApiModelProperty("审批时间")
|
||||
private Date createTime;
|
||||
|
||||
public static AuditInfoVO convertVO(LineAuditInfoDO auditInfo) {
|
||||
@ApiModelProperty(value = "操作人id")
|
||||
private String operateUserId;
|
||||
|
||||
@ApiModelProperty(value = "操作人姓名")
|
||||
private String operateUserName;
|
||||
|
||||
public static AuditInfoVO convertVO(ShopAuditInfoDO auditInfo) {
|
||||
if(Objects.isNull(auditInfo)){
|
||||
return null;
|
||||
}
|
||||
@@ -36,8 +42,10 @@ public class AuditInfoVO {
|
||||
if(AuditResultTypeEnum.PASS.getCode().equals(result.getResultType())){
|
||||
result.setReason(auditInfo.getPassReason());
|
||||
}else if(AuditResultTypeEnum.REJECT.getCode().equals(result.getResultType())){
|
||||
result.setReason(auditInfo.getRejectRealReason());
|
||||
result.setReason(auditInfo.getRejectReason());
|
||||
}
|
||||
result.setOperateUserId(auditInfo.getSubmittedUserId());
|
||||
result.setOperateUserName(auditInfo.getSubmittedUserName());
|
||||
result.setCertifyFile(auditInfo.getCertifyFile());
|
||||
result.setCreateTime(auditInfo.getCreateTime());
|
||||
return result;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.cool.store.vo.shop;
|
||||
|
||||
import com.cool.store.entity.LineAuditInfoDO;
|
||||
import com.cool.store.entity.ShopAuditInfoDO;
|
||||
import com.cool.store.entity.ShopStageInfoDO;
|
||||
import com.cool.store.vo.AuditInfoVO;
|
||||
import com.cool.store.vo.LineAuditInfoVO;
|
||||
@@ -54,15 +55,15 @@ public class ShopStageInfoVO {
|
||||
|
||||
}
|
||||
|
||||
public static List<ShopStageInfoVO> convertList(List<ShopStageInfoDO> stageList, List<LineAuditInfoDO> auditList){
|
||||
public static List<ShopStageInfoVO> convertList(List<ShopStageInfoDO> stageList, List<ShopAuditInfoDO> auditList){
|
||||
if(CollectionUtils.isEmpty(stageList)){
|
||||
return Lists.newArrayList();
|
||||
}
|
||||
Map<Long, LineAuditInfoDO> auditMap = auditList.stream().collect(Collectors.toMap(LineAuditInfoDO::getId, Function.identity()));
|
||||
Map<Long, ShopAuditInfoDO> auditMap = auditList.stream().collect(Collectors.toMap(ShopAuditInfoDO::getId, Function.identity()));
|
||||
List<ShopStageInfoVO> resultList = new ArrayList<>();
|
||||
for (ShopStageInfoDO stageInfo : stageList) {
|
||||
ShopStageInfoVO shopStageInfo = new ShopStageInfoVO(stageInfo.getShopStage(), stageInfo.getShopSubStage(), stageInfo.getShopSubStageStatus(), stageInfo.getIsTerminated());
|
||||
LineAuditInfoDO auditInfo = auditMap.get(stageInfo.getAuditId());
|
||||
ShopAuditInfoDO auditInfo = auditMap.get(stageInfo.getAuditId());
|
||||
AuditInfoVO auditInfoVO = AuditInfoVO.convertVO(auditInfo);
|
||||
shopStageInfo.setAuditInfo(auditInfoVO);
|
||||
shopStageInfo.setPlanCompleteTime(stageInfo.getPlanCompleteTime());
|
||||
|
||||
Reference in New Issue
Block a user