Sfoglia il codice sorgente

[租赁物业合同][修改][修改请求方式及判断是否存在合同]

release_toaliyun_real
gongbiao 7 anni fa
parent
commit
39e1319488
2 ha cambiato i file con 6 aggiunte e 5 eliminazioni
  1. +2
    -4
      mallinkAdmin/src/main/java/com/iformall/controller/contract/WxRentContractController.java
  2. +4
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java

+ 2
- 4
mallinkAdmin/src/main/java/com/iformall/controller/contract/WxRentContractController.java Vedi File

@@ -9,10 +9,7 @@ import com.iformall.domain.po.MallUserInfo;
import com.iformall.domain.po.WxBillRent; import com.iformall.domain.po.WxBillRent;
import com.iformall.domain.po.WxPayAccountBill; import com.iformall.domain.po.WxPayAccountBill;
import com.iformall.domain.po.WxRentContract; import com.iformall.domain.po.WxRentContract;
import com.iformall.domain.po.WxShop;
import com.iformall.enums.EnumFromType; import com.iformall.enums.EnumFromType;
import com.iformall.enums.EnumRentContractAdjustPeriod;
import com.iformall.enums.EnumRentShopType;
import com.iformall.enums.EnumRentStartType; import com.iformall.enums.EnumRentStartType;
import com.iformall.mapper.WxRentContractMapper; import com.iformall.mapper.WxRentContractMapper;
import com.iformall.service.WxBillRentService; import com.iformall.service.WxBillRentService;
@@ -27,6 +24,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
@@ -236,7 +234,7 @@ public class WxRentContractController extends BaseController {
wxRentContractService.exportContract(request,response,getTenantId(),id); wxRentContractService.exportContract(request,response,getTenantId(),id);
} }


@GetMapping("updateRentContractStatus")
@PostMapping("updateRentContractStatus")
@ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true)
@SystemControllerLog(description = "租赁合同-更新合同状态") @SystemControllerLog(description = "租赁合同-更新合同状态")
public ResultData updateRentContractStatus(Long id) { public ResultData updateRentContractStatus(Long id) {


+ 4
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java Vedi File

@@ -1332,13 +1332,16 @@ public class WxRentContractServiceImpl implements WxRentContractService {
if (id == null) { if (id == null) {
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); return new ResultData(ErrorCode.SYS_PARAMETER_ERROR);
} }
WxRentContract record = wxRentContractMapper.selectByPrimaryKey(id);
if (record == null) {
return new ResultData(ErrorCode.RENT_CONTRACT_IS_NOT_FOUND);
}
//更新合同状态为签约 //更新合同状态为签约
WxRentContract wxRentContract = new WxRentContract(); WxRentContract wxRentContract = new WxRentContract();
wxRentContract.setId(id); wxRentContract.setId(id);
wxRentContract.setStatus(EnumRentContractStatus.SIGNED_RENT_UNPAID.getCode()); wxRentContract.setStatus(EnumRentContractStatus.SIGNED_RENT_UNPAID.getCode());
wxRentContractMapper.updateByPrimaryKeySelective(wxRentContract); wxRentContractMapper.updateByPrimaryKeySelective(wxRentContract);
//建立账单 //建立账单
WxRentContract record = wxRentContractMapper.selectByPrimaryKey(id);
if (record != null && if (record != null &&
record.getMerchantId() != null && record.getMerchantId() != null &&
record.getStatus().equals(EnumRentContractStatus.SIGNED_RENT_UNPAID.getCode()) && record.getStatus().equals(EnumRentContractStatus.SIGNED_RENT_UNPAID.getCode()) &&


Caricamento…
Annulla
Salva