新增租赁合同按钮状态
This commit is contained in:
@@ -193,5 +193,15 @@ public class ShopStageInfoDAO {
|
|||||||
return shopStageInfoMapper.getShopContractActualCompletionTime(shopIdList);
|
return shopStageInfoMapper.getShopContractActualCompletionTime(shopIdList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取可以上传租赁合同的店铺id
|
||||||
|
* @param shopIds
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<Long> getCanSubmitRentContractShopIds(List<Long> shopIds) {
|
||||||
|
if(CollectionUtils.isEmpty(shopIds)){
|
||||||
|
return Lists.newArrayList();
|
||||||
|
}
|
||||||
|
return shopStageInfoMapper.getCanSubmitRentContractShopIds(shopIds);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -105,4 +105,11 @@ public interface ShopStageInfoMapper extends Mapper<ShopStageInfoDO> {
|
|||||||
List<ScheduleDTO> getScheduleList(@Param("shopIds") List<Long> shopIds);
|
List<ScheduleDTO> getScheduleList(@Param("shopIds") List<Long> shopIds);
|
||||||
|
|
||||||
List<ShopStageInfoDO> getShopContractActualCompletionTime(@Param("shopIds") List<Long> shopIds);
|
List<ShopStageInfoDO> getShopContractActualCompletionTime(@Param("shopIds") List<Long> shopIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取可以上传租赁合同的店铺id
|
||||||
|
* @param shopIds
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<Long> getCanSubmitRentContractShopIds(@Param("shopIds") List<Long> shopIds);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -182,5 +182,16 @@
|
|||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getCanSubmitRentContractShopIds" resultType="long">
|
||||||
|
select
|
||||||
|
shop_id
|
||||||
|
from
|
||||||
|
xfsg_shop_stage_info
|
||||||
|
where shop_sub_stage_status in(200, 220) and shop_id in
|
||||||
|
<foreach collection="shopIds" item="shopId" index="index" open="(" separator="," close=")">
|
||||||
|
#{shopId}
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -254,6 +254,9 @@ public class PointDetailVO {
|
|||||||
@ApiModelProperty("街道")
|
@ApiModelProperty("街道")
|
||||||
private String township;
|
private String township;
|
||||||
|
|
||||||
|
@ApiModelProperty("是否可以上传租赁合同")
|
||||||
|
private boolean canSubmitRentContract;
|
||||||
|
|
||||||
|
|
||||||
public static PointDetailVO convertVO(PointInfoDO pointInfo, PointDetailInfoDO pointDetailInfo) {
|
public static PointDetailVO convertVO(PointInfoDO pointInfo, PointDetailInfoDO pointDetailInfo) {
|
||||||
PointDetailVO result = new PointDetailVO();
|
PointDetailVO result = new PointDetailVO();
|
||||||
|
|||||||
@@ -57,8 +57,11 @@ public class PointRecommendPageVO {
|
|||||||
@ApiModelProperty("铺位地址")
|
@ApiModelProperty("铺位地址")
|
||||||
private String address;
|
private String address;
|
||||||
|
|
||||||
|
@ApiModelProperty("是否可以上传租赁合同")
|
||||||
|
private boolean canSubmitRentContract;
|
||||||
|
|
||||||
public static List<PointRecommendPageVO> convertVO(List<PointRecommendDO> recommendList, List<PointInfoDO> pointList, Map<String, String> usernameMap, Map<Long, String> regionNameMap) {
|
|
||||||
|
public static List<PointRecommendPageVO> convertVO(List<PointRecommendDO> recommendList, List<PointInfoDO> pointList, Map<String, String> usernameMap, Map<Long, String> regionNameMap, List<Long> canSubmitRentContractShopIds) {
|
||||||
if(CollectionUtils.isEmpty(recommendList) || CollectionUtils.isEmpty(pointList)){
|
if(CollectionUtils.isEmpty(recommendList) || CollectionUtils.isEmpty(pointList)){
|
||||||
return Lists.newArrayList();
|
return Lists.newArrayList();
|
||||||
}
|
}
|
||||||
@@ -83,6 +86,9 @@ public class PointRecommendPageVO {
|
|||||||
recommend.setDevelopmentManagerUsername(usernameMap.get(pointInfo.getDevelopmentManager()));
|
recommend.setDevelopmentManagerUsername(usernameMap.get(pointInfo.getDevelopmentManager()));
|
||||||
recommend.setDevelopmentTime(pointInfo.getDevelopmentTime());
|
recommend.setDevelopmentTime(pointInfo.getDevelopmentTime());
|
||||||
recommend.setAddress(pointInfo.getAddress());
|
recommend.setAddress(pointInfo.getAddress());
|
||||||
|
if(canSubmitRentContractShopIds.contains(pointInfo.getShopId())){
|
||||||
|
recommend.setCanSubmitRentContract(Boolean.TRUE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
resultList.add(recommend);
|
resultList.add(recommend);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -120,6 +120,11 @@ public class PointServiceImpl implements PointService {
|
|||||||
if(Objects.nonNull(isGetNodeNo) && isGetNodeNo){
|
if(Objects.nonNull(isGetNodeNo) && isGetNodeNo){
|
||||||
result.setCurNodeNo(pointTodoInfoDAO.getCurNodeNoByPoint(pointId));
|
result.setCurNodeNo(pointTodoInfoDAO.getCurNodeNoByPoint(pointId));
|
||||||
}
|
}
|
||||||
|
if(SelectStatusEnum.SELECT_STATUS_1.getCode().equals(pointInfo.getSelectStatus())){
|
||||||
|
List<Long> canSubmitRentContractShopIds = shopStageInfoDAO.getCanSubmitRentContractShopIds(Arrays.asList(pointInfo.getShopId()));
|
||||||
|
boolean canSubmitRentContract = CollectionUtils.isEmpty(canSubmitRentContractShopIds) ? Boolean.FALSE : Boolean.TRUE;
|
||||||
|
result.setCanSubmitRentContract(canSubmitRentContract);
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -552,9 +557,11 @@ public class PointServiceImpl implements PointService {
|
|||||||
List<PointInfoDO> pointList = pointInfoDAO.getPointListByIds(pointIds);
|
List<PointInfoDO> pointList = pointInfoDAO.getPointListByIds(pointIds);
|
||||||
List<Long> regionIds = pointList.stream().map(PointInfoDO::getRegionId).distinct().collect(Collectors.toList());
|
List<Long> regionIds = pointList.stream().map(PointInfoDO::getRegionId).distinct().collect(Collectors.toList());
|
||||||
List<String> developmentManagers = pointList.stream().map(PointInfoDO::getDevelopmentManager).distinct().collect(Collectors.toList());
|
List<String> developmentManagers = pointList.stream().map(PointInfoDO::getDevelopmentManager).distinct().collect(Collectors.toList());
|
||||||
|
List<Long> shopIds = pointList.stream().map(PointInfoDO::getShopId).distinct().collect(Collectors.toList());
|
||||||
|
List<Long> canSubmitRentContractShopIds = shopStageInfoDAO.getCanSubmitRentContractShopIds(shopIds);
|
||||||
Map<String, String> userNameMap = enterpriseUserDAO.getUserNameMap(developmentManagers);
|
Map<String, String> userNameMap = enterpriseUserDAO.getUserNameMap(developmentManagers);
|
||||||
Map<Long, String> regionNameMap = regionService.getBelongWarRegionNameMap(regionIds);
|
Map<Long, String> regionNameMap = regionService.getBelongWarRegionNameMap(regionIds);
|
||||||
return PointRecommendPageVO.convertVO(recommendPointList, pointList, userNameMap, regionNameMap);
|
return PointRecommendPageVO.convertVO(recommendPointList, pointList, userNameMap, regionNameMap, canSubmitRentContractShopIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ public class PCTestController {
|
|||||||
public ResponseResult<Boolean> sendSms(){
|
public ResponseResult<Boolean> sendSms(){
|
||||||
JSONObject templateParam = new JSONObject();
|
JSONObject templateParam = new JSONObject();
|
||||||
templateParam.put("pointName", "杭州市西湖区");
|
templateParam.put("pointName", "杭州市西湖区");
|
||||||
commonService.sendSms("17681878615", SMSMsgEnum.RENT_CONTRACT_AUDIT_FAIL, null);
|
commonService.sendSms("17681878615", SMSMsgEnum.RENT_CONTRACT_AUDIT_FAIL, Arrays.asList(templateParam));
|
||||||
return ResponseResult.success(Boolean.FALSE);
|
return ResponseResult.success(Boolean.FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user