|
|
@@ -7,9 +7,13 @@ import com.iformall.common.ResultData; |
|
|
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.EnumRentShopType; |
|
|
|
|
|
import com.iformall.enums.EnumShopType; |
|
|
import com.iformall.service.WxBillRentService; |
|
|
import com.iformall.service.WxBillRentService; |
|
|
import com.iformall.service.WxPayAccountBillService; |
|
|
import com.iformall.service.WxPayAccountBillService; |
|
|
import com.iformall.service.WxRentContractService; |
|
|
import com.iformall.service.WxRentContractService; |
|
|
|
|
|
import com.iformall.service.WxShopService; |
|
|
import io.swagger.annotations.ApiImplicitParam; |
|
|
import io.swagger.annotations.ApiImplicitParam; |
|
|
import io.swagger.annotations.ApiImplicitParams; |
|
|
import io.swagger.annotations.ApiImplicitParams; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
@@ -35,9 +39,10 @@ public class WxRentContractController extends BaseController { |
|
|
private WxRentContractService wxRentContractService; |
|
|
private WxRentContractService wxRentContractService; |
|
|
@Autowired |
|
|
@Autowired |
|
|
private WxBillRentService wxBillRentService; |
|
|
private WxBillRentService wxBillRentService; |
|
|
|
|
|
|
|
|
@Autowired |
|
|
@Autowired |
|
|
private WxPayAccountBillService payAccountBillService; |
|
|
private WxPayAccountBillService payAccountBillService; |
|
|
|
|
|
@Autowired |
|
|
|
|
|
private WxShopService wxShopService; |
|
|
|
|
|
|
|
|
@GetMapping("list") |
|
|
@GetMapping("list") |
|
|
@ApiImplicitParams({ |
|
|
@ApiImplicitParams({ |
|
|
@@ -59,7 +64,11 @@ public class WxRentContractController extends BaseController { |
|
|
public ResultData add(@RequestBody WxRentContract wxRentContract) { |
|
|
public ResultData add(@RequestBody WxRentContract wxRentContract) { |
|
|
logger.debug("[" + getIpAddr() + "] WxRentContractController::add"); |
|
|
logger.debug("[" + getIpAddr() + "] WxRentContractController::add"); |
|
|
wxRentContract.setTenantId(getTenantId()); |
|
|
wxRentContract.setTenantId(getTenantId()); |
|
|
if(wxRentContract.getMonthHandleType() != null){ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//目前只有多经点位租赁合同 |
|
|
|
|
|
WxShop wxShop = wxShopService.getById(wxRentContract.getShopId()); |
|
|
|
|
|
if(wxRentContract.getMonthHandleType() != null && wxRentContract.getMonthHandleType().intValue()==3 |
|
|
|
|
|
&& EnumRentShopType.POINT.getCode().equals(wxShop.getType())){ |
|
|
wxRentContract.setAdjustPeriod(wxRentContract.getMonthHandleType()); |
|
|
wxRentContract.setAdjustPeriod(wxRentContract.getMonthHandleType()); |
|
|
} |
|
|
} |
|
|
return wxRentContractService.save(wxRentContract, getUser().getId(),getUser().getName()); |
|
|
return wxRentContractService.save(wxRentContract, getUser().getId(),getUser().getName()); |
|
|
@@ -70,7 +79,10 @@ public class WxRentContractController extends BaseController { |
|
|
public ResultData update(@RequestBody WxRentContract wxRentContract) { |
|
|
public ResultData update(@RequestBody WxRentContract wxRentContract) { |
|
|
logger.debug("[" + getIpAddr() + "] WxRentContractController::update"); |
|
|
logger.debug("[" + getIpAddr() + "] WxRentContractController::update"); |
|
|
wxRentContract.setTenantId(getTenantId()); |
|
|
wxRentContract.setTenantId(getTenantId()); |
|
|
if(wxRentContract.getMonthHandleType() != null){ |
|
|
|
|
|
|
|
|
//目前只有多经点位租赁合同 |
|
|
|
|
|
WxShop wxShop = wxShopService.getById(wxRentContract.getShopId()); |
|
|
|
|
|
if(wxRentContract.getMonthHandleType() != null && wxRentContract.getMonthHandleType().intValue()==3 |
|
|
|
|
|
&& EnumRentShopType.POINT.getCode().equals(wxShop.getType())){ |
|
|
wxRentContract.setAdjustPeriod(wxRentContract.getMonthHandleType()); |
|
|
wxRentContract.setAdjustPeriod(wxRentContract.getMonthHandleType()); |
|
|
} |
|
|
} |
|
|
return wxRentContractService.update(wxRentContract, getUser().getId(),getUser().getName()); |
|
|
return wxRentContractService.update(wxRentContract, getUser().getId(),getUser().getName()); |
|
|
@@ -81,7 +93,10 @@ public class WxRentContractController extends BaseController { |
|
|
public ResultData updateMoney(@RequestBody WxRentContract wxRentContract) { |
|
|
public ResultData updateMoney(@RequestBody WxRentContract wxRentContract) { |
|
|
logger.debug("[" + getIpAddr() + "] WxRentContractController::updateMoney"); |
|
|
logger.debug("[" + getIpAddr() + "] WxRentContractController::updateMoney"); |
|
|
wxRentContract.setTenantId(getTenantId()); |
|
|
wxRentContract.setTenantId(getTenantId()); |
|
|
if(wxRentContract.getMonthHandleType() != null){ |
|
|
|
|
|
|
|
|
//目前只有多经点位租赁合同 |
|
|
|
|
|
WxShop wxShop = wxShopService.getById(wxRentContract.getShopId()); |
|
|
|
|
|
if(wxRentContract.getMonthHandleType() != null && wxRentContract.getMonthHandleType().intValue()==3 |
|
|
|
|
|
&& EnumRentShopType.POINT.getCode().equals(wxShop.getType())){ |
|
|
wxRentContract.setAdjustPeriod(wxRentContract.getMonthHandleType()); |
|
|
wxRentContract.setAdjustPeriod(wxRentContract.getMonthHandleType()); |
|
|
} |
|
|
} |
|
|
return wxRentContractService.update(wxRentContract, getUser().getId(),getUser().getName()); |
|
|
return wxRentContractService.update(wxRentContract, getUser().getId(),getUser().getName()); |
|
|
@@ -92,7 +107,10 @@ public class WxRentContractController extends BaseController { |
|
|
public ResultData updateFile(@RequestBody WxRentContract wxRentContract) { |
|
|
public ResultData updateFile(@RequestBody WxRentContract wxRentContract) { |
|
|
logger.debug("[" + getIpAddr() + "] WxRentContractController::updateFile"); |
|
|
logger.debug("[" + getIpAddr() + "] WxRentContractController::updateFile"); |
|
|
wxRentContract.setTenantId(getTenantId()); |
|
|
wxRentContract.setTenantId(getTenantId()); |
|
|
if(wxRentContract.getMonthHandleType() != null){ |
|
|
|
|
|
|
|
|
//目前只有多经点位租赁合同 |
|
|
|
|
|
WxShop wxShop = wxShopService.getById(wxRentContract.getShopId()); |
|
|
|
|
|
if(wxRentContract.getMonthHandleType() != null && wxRentContract.getMonthHandleType().intValue()==3 |
|
|
|
|
|
&& EnumRentShopType.POINT.getCode().equals(wxShop.getType())){ |
|
|
wxRentContract.setAdjustPeriod(wxRentContract.getMonthHandleType()); |
|
|
wxRentContract.setAdjustPeriod(wxRentContract.getMonthHandleType()); |
|
|
} |
|
|
} |
|
|
return wxRentContractService.updateFile(wxRentContract, getUser().getId(),getUser().getName()); |
|
|
return wxRentContractService.updateFile(wxRentContract, getUser().getId(),getUser().getName()); |
|
|
|