Browse Source

[合同][修改][修改租赁记租开始日期]

release_toaliyun_real
luozukai 7 years ago
parent
commit
365b55f71a
2 changed files with 19 additions and 15 deletions
  1. +9
    -7
      mallinkAdmin/src/main/java/com/iformall/controller/contract/WxPropertyContractController.java
  2. +10
    -8
      mallinkAdmin/src/main/java/com/iformall/controller/contract/WxRentContractController.java

+ 9
- 7
mallinkAdmin/src/main/java/com/iformall/controller/contract/WxPropertyContractController.java View File

@@ -67,15 +67,17 @@ public class WxPropertyContractController extends BaseController {
@SystemControllerLog(description = "物业合同-更新租赁开始日期") @SystemControllerLog(description = "物业合同-更新租赁开始日期")
public ResultData updateRentStartTime(@RequestBody WxPropertyContract wxPropertyContract) { public ResultData updateRentStartTime(@RequestBody WxPropertyContract wxPropertyContract) {
logger.debug("[" + getIpAddr() + "] WxPropertyContractController::updateRentStartTime"); logger.debug("[" + getIpAddr() + "] WxPropertyContractController::updateRentStartTime");
Integer rentStartType = wxPropertyContract.getRentStartType();
wxPropertyContract = wxPropertyContractMapper.selectByPrimaryKey(wxPropertyContract.getId());
if(rentStartType!=null && rentStartType.equals(EnumRentStartType.STARTTIME.getCode())){
wxPropertyContract.setRentalStartDate(wxPropertyContract.getStartDate());
WxPropertyContract propertyContract = wxPropertyContractMapper.selectByPrimaryKey(wxPropertyContract.getId());
propertyContract.setRentalStartDate(wxPropertyContract.getRentalStartDate());

if(wxPropertyContract.getRentStartType()!=null && wxPropertyContract.getRentStartType().equals(EnumRentStartType.STARTTIME.getCode())){
propertyContract.setRentalStartDate(propertyContract.getStartDate());
} }

MallUserInfo user = getUser(); MallUserInfo user = getUser();
wxPropertyContract.setTenantId(user.getTenantId());
wxPropertyContract.setAdjustPeriodHandle();
return wxPropertyContractService.saveOrUpdate(wxPropertyContract, user.getId(), user.getName());
propertyContract.setTenantId(user.getTenantId());
propertyContract.setAdjustPeriodHandle();
return wxPropertyContractService.saveOrUpdate(propertyContract, user.getId(), user.getName());
} }






+ 10
- 8
mallinkAdmin/src/main/java/com/iformall/controller/contract/WxRentContractController.java View File

@@ -29,6 +29,7 @@ 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;
import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;


@@ -98,16 +99,17 @@ public class WxRentContractController extends BaseController {
@SystemControllerLog(description = "租赁合同-更新租赁开始日期") @SystemControllerLog(description = "租赁合同-更新租赁开始日期")
public ResultData updateRentStartTime(@RequestBody WxRentContract wxRentContract) { public ResultData updateRentStartTime(@RequestBody WxRentContract wxRentContract) {
logger.debug("[" + getIpAddr() + "] WxRentContractController::updateRentStartTime"); logger.debug("[" + getIpAddr() + "] WxRentContractController::updateRentStartTime");
Integer rentStartType = wxRentContract.getRentStartType();
wxRentContract = wxRentContractMapper.selectByPrimaryKey(wxRentContract.getId());
if(rentStartType!=null && rentStartType.equals(EnumRentStartType.STARTTIME.getCode())){
wxRentContract.setRentalStartDate(wxRentContract.getStartDate());
WxRentContract rentContract = wxRentContractMapper.selectByPrimaryKey(wxRentContract.getId());
rentContract.setRentalStartDate(wxRentContract.getRentalStartDate());

if(wxRentContract.getRentStartType()!=null && wxRentContract.getRentStartType().equals(EnumRentStartType.STARTTIME.getCode())){
rentContract.setRentalStartDate(rentContract.getStartDate());
} }
MallUserInfo user = getUser(); MallUserInfo user = getUser();
wxRentContract.setTenantId(user.getTenantId());
wxRentContract.setAdjustPeriodHandle();
wxRentContract.setRentPriceHandle();
return wxRentContractService.update(wxRentContract, user.getId(),user.getName());
rentContract.setTenantId(user.getTenantId());
rentContract.setAdjustPeriodHandle();
rentContract.setRentPriceHandle();
return wxRentContractService.update(rentContract, user.getId(),user.getName());
} }


@PostMapping("update") @PostMapping("update")


Loading…
Cancel
Save