Explorar el Código

[物业合同][修改][选择店铺时,关联的合同如果已终止将提示信息]

release_toaliyun_real
gongbiao hace 7 años
padre
commit
b75fbf23d2
Se han modificado 3 ficheros con 29 adiciones y 1 borrados
  1. +7
    -1
      mallinkAdmin/src/main/java/com/iformall/controller/WxPropertyContractController.java
  2. +2
    -0
      mallinkService/src/main/java/com/iformall/service/WxPropertyContractService.java
  3. +20
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java

+ 7
- 1
mallinkAdmin/src/main/java/com/iformall/controller/WxPropertyContractController.java Ver fichero

@@ -91,5 +91,11 @@ public class WxPropertyContractController extends BaseController
public ResultData endPropertyContractByRentContractId(Long rentContractId) { public ResultData endPropertyContractByRentContractId(Long rentContractId) {
return wxPropertyContractService.endPropertyContractByRentContractId(rentContractId); return wxPropertyContractService.endPropertyContractByRentContractId(rentContractId);
} }

@GetMapping("/hasRentContract")
@ApiImplicitParam(name = "rentContractId", value = "rentContractId", dataType = "Long", paramType = "query", required = true)
public ResultData hasRentContract(Long rentContractId) {
return wxPropertyContractService.hasRentContract(rentContractId);
}

} }

+ 2
- 0
mallinkService/src/main/java/com/iformall/service/WxPropertyContractService.java Ver fichero

@@ -56,4 +56,6 @@ public interface WxPropertyContractService {


ResultData endPropertyContractByRentContractId(Long rentContractId); ResultData endPropertyContractByRentContractId(Long rentContractId);


ResultData hasRentContract(Long rentContractId);

} }

+ 20
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java Ver fichero

@@ -457,6 +457,26 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService
return new ResultData(Result.SUCCESS, "操作成功"); return new ResultData(Result.SUCCESS, "操作成功");
} }


@Override
public ResultData hasRentContract(Long rentContractId) {
if(null==rentContractId){
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL,"rentContractId不能为空");
}

WxRentContract wxRentContract = wxRentContractMapper.selectByPrimaryKey(rentContractId);
if(null==wxRentContract){
return new ResultData(ErrorCode.RENT_CONTRACT_IS_NOT_FOUND);
}

if(wxRentContract.getStatus().equals(EnumRentContractStatus.CONTRACT_TERMINATE.getCode()) ||
wxRentContract.getStatus().equals(EnumRentContractStatus.WAIT_SIGN.getCode()) ||
wxRentContract.getStatus().equals(EnumRentContractStatus.INVALID.getCode())){
return new ResultData(true);
}

return new ResultData(false);
}

public Map<String, Object> updateStatus(String tenantId) { public Map<String, Object> updateStatus(String tenantId) {
Map<String, Object> resultData = new HashMap(); Map<String, Object> resultData = new HashMap();
WxPropertyContract wxRentContract = new WxPropertyContract(); WxPropertyContract wxRentContract = new WxPropertyContract();


Cargando…
Cancelar
Guardar