| @@ -1,10 +1,12 @@ | |||||
| package com.iformall.controller.contract; | package com.iformall.controller.contract; | ||||
| import com.iformall.annotation.SystemControllerLog; | |||||
| import com.iformall.common.Result; | import com.iformall.common.Result; | ||||
| import com.iformall.common.ResultData; | import com.iformall.common.ResultData; | ||||
| import com.iformall.controller.base.BaseController; | import com.iformall.controller.base.BaseController; | ||||
| import com.iformall.domain.po.MallUserInfo; | import com.iformall.domain.po.MallUserInfo; | ||||
| import com.iformall.domain.po.WxBillProperty; | import com.iformall.domain.po.WxBillProperty; | ||||
| import com.iformall.domain.po.WxBillRent; | |||||
| import com.iformall.domain.po.WxPropertyContract; | import com.iformall.domain.po.WxPropertyContract; | ||||
| import com.iformall.service.WxBillPropertyService; | import com.iformall.service.WxBillPropertyService; | ||||
| import com.iformall.service.WxPropertyContractService; | import com.iformall.service.WxPropertyContractService; | ||||
| @@ -128,4 +130,16 @@ public class WxPropertyContractController extends BaseController { | |||||
| return wxPropertyContractService.updatePropertyContractStatus(id); | return wxPropertyContractService.updatePropertyContractStatus(id); | ||||
| } | } | ||||
| /** | |||||
| * 批量修改到账日期 | |||||
| * @param wxBillProperty | |||||
| * @return | |||||
| */ | |||||
| @PostMapping("updateReceiveDatePatch") | |||||
| @SystemControllerLog(description = "批量修改到账日期") | |||||
| public ResultData updateReceiveDatePatch(@RequestBody WxBillProperty wxBillProperty) { | |||||
| logger.debug("[" + getIpAddr() + "] WxBillRentController::updateReceiveDatePatch"); | |||||
| wxPropertyContractService.updateReceiveDatePatch(wxBillProperty); | |||||
| return new ResultData(); | |||||
| } | |||||
| } | } | ||||
| @@ -58,13 +58,6 @@ public class WxBillRentController extends BaseController { | |||||
| return wxBillRentService.saveOrUpdate(wxBillRent, getUser()); | return wxBillRentService.saveOrUpdate(wxBillRent, getUser()); | ||||
| } | } | ||||
| @PostMapping("updateReceiveDatePatch") | |||||
| @SystemControllerLog(description = "租赁押金账单-更新") | |||||
| public ResultData updateReceiveDatePatch(@RequestBody WxBillRent wxBillRent) { | |||||
| logger.debug("[" + getIpAddr() + "] WxBillRentController::updateReceiveDatePatch"); | |||||
| return wxBillRentService.saveOrUpdate(wxBillRent, getUser()); | |||||
| } | |||||
| @GetMapping("/del") | @GetMapping("/del") | ||||
| @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 = "租赁押金账单-删除") | ||||
| @@ -126,4 +119,16 @@ public class WxBillRentController extends BaseController { | |||||
| return wxBillRentService.updateLatePayStatus(wxBillRent); | return wxBillRentService.updateLatePayStatus(wxBillRent); | ||||
| } | } | ||||
| /** | |||||
| * 批量修改到账日期 | |||||
| * @param wxBillRent | |||||
| * @return | |||||
| */ | |||||
| @PostMapping("updateReceiveDatePatch") | |||||
| @SystemControllerLog(description = "批量修改到账日期") | |||||
| public ResultData updateReceiveDatePatch(@RequestBody WxBillRent wxBillRent) { | |||||
| logger.debug("[" + getIpAddr() + "] WxBillRentController::updateReceiveDatePatch"); | |||||
| return wxBillRentService.updateReceiveDatePatch(wxBillRent); | |||||
| } | |||||
| } | } | ||||
| @@ -0,0 +1,19 @@ | |||||
| ALTER TABLE wx_rent_contract | |||||
| ADD COLUMN total_period_month int(11) DEFAULT 0 COMMENT '总租期(月)'; | |||||
| ALTER TABLE wx_rent_contract | |||||
| ADD COLUMN total_period_day int(11) DEFAULT 0 COMMENT '总租期(天)'; | |||||
| ALTER TABLE wx_property_contract | |||||
| ADD COLUMN total_period_month int(11) DEFAULT 0 COMMENT '总租期(月)'; | |||||
| ALTER TABLE wx_property_contract | |||||
| ADD COLUMN total_period_day int(11) DEFAULT 0 COMMENT '总租期(天)'; | |||||
| ALTER TABLE wx_rent_contract | |||||
| ADD COLUMN rent_price BIGINT(12) DEFAULT 0 COMMENT '租赁单价'; | |||||
| ALTER TABLE wx_property_contract | |||||
| ADD COLUMN rent_price BIGINT(12) DEFAULT 0 COMMENT '租赁单价'; | |||||
| @@ -2,10 +2,8 @@ package com.iformall.mapper; | |||||
| import com.iformall.common.CommonMapper; | import com.iformall.common.CommonMapper; | ||||
| import com.iformall.domain.po.WxBillProperty; | import com.iformall.domain.po.WxBillProperty; | ||||
| import com.iformall.domain.po.WxBillRent; | |||||
| import com.iformall.domain.po.WxPropertyContract; | import com.iformall.domain.po.WxPropertyContract; | ||||
| import com.iformall.domain.po.WxRentContract; | import com.iformall.domain.po.WxRentContract; | ||||
| import java.util.List; | import java.util.List; | ||||
| import java.util.Map; | import java.util.Map; | ||||
| @@ -39,4 +37,6 @@ public interface WxBillPropertyMapper extends CommonMapper<WxBillProperty, Long> | |||||
| void updatePreviewStatus(WxBillProperty record); | void updatePreviewStatus(WxBillProperty record); | ||||
| Long oweBillCount(Long contractId); | Long oweBillCount(Long contractId); | ||||
| void updateReceiveDatePatch(WxBillProperty record); | |||||
| } | } | ||||
| @@ -35,4 +35,6 @@ public interface WxBillRentMapper extends CommonMapper<WxBillRent, Long> { | |||||
| void updatePreviewStatus(WxBillRent record); | void updatePreviewStatus(WxBillRent record); | ||||
| Long oweBillCount(Long contractId); | Long oweBillCount(Long contractId); | ||||
| void updateReceiveDatePatch(WxBillRent record); | |||||
| } | } | ||||
| @@ -39,13 +39,6 @@ public interface WxBillRentService { | |||||
| */ | */ | ||||
| ResultData saveOrUpdate(WxBillRent record, MallUserInfo user); | ResultData saveOrUpdate(WxBillRent record, MallUserInfo user); | ||||
| /** | |||||
| * 批量修改到账日期 | |||||
| * @param record | |||||
| * @return | |||||
| */ | |||||
| ResultData updateReceiveDatePatch(WxBillRent record); | |||||
| /** | /** | ||||
| * 根据Id删除实体 | * 根据Id删除实体 | ||||
| * | * | ||||
| @@ -65,4 +58,10 @@ public interface WxBillRentService { | |||||
| ResultData updateLatePayStatus(WxBillRent wxBillRent); | ResultData updateLatePayStatus(WxBillRent wxBillRent); | ||||
| /** | |||||
| * 批量修改到账日期 | |||||
| * @param record | |||||
| * @return | |||||
| */ | |||||
| ResultData updateReceiveDatePatch(WxBillRent record); | |||||
| } | } | ||||
| @@ -2,6 +2,7 @@ package com.iformall.service; | |||||
| import com.iformall.common.ResultData; | import com.iformall.common.ResultData; | ||||
| import com.iformall.domain.po.WxBillProperty; | import com.iformall.domain.po.WxBillProperty; | ||||
| import com.iformall.domain.po.WxBillRent; | |||||
| import com.iformall.domain.po.WxPropertyContract; | import com.iformall.domain.po.WxPropertyContract; | ||||
| import com.iformall.domain.po.WxRentContract; | import com.iformall.domain.po.WxRentContract; | ||||
| @@ -63,4 +64,11 @@ public interface WxPropertyContractService { | |||||
| ResultData hasRentContract(Long rentContractId); | ResultData hasRentContract(Long rentContractId); | ||||
| ResultData updatePropertyContractStatus(Long id); | ResultData updatePropertyContractStatus(Long id); | ||||
| /** | |||||
| * 批量修改到账日期 | |||||
| * @param record | |||||
| * @return | |||||
| */ | |||||
| void updateReceiveDatePatch(WxBillProperty record); | |||||
| } | } | ||||
| @@ -274,6 +274,7 @@ public class WxBillRentServiceImpl implements WxBillRentService { | |||||
| @Override | @Override | ||||
| public ResultData updateReceiveDatePatch(WxBillRent record) { | public ResultData updateReceiveDatePatch(WxBillRent record) { | ||||
| return null; | |||||
| wxBillRentMapper.updateReceiveDatePatch(record); | |||||
| return new ResultData(Result.SUCCESS, "修改成功", record); | |||||
| } | } | ||||
| } | } | ||||
| @@ -1020,6 +1020,10 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService | |||||
| } | } | ||||
| } | } | ||||
| @Override | |||||
| public void updateReceiveDatePatch(WxBillProperty record) { | |||||
| wxBillPropertyMapper.updateReceiveDatePatch(record); | |||||
| } | |||||
| } | } | ||||
| @@ -176,5 +176,9 @@ | |||||
| select count(br.id) from wx_bill_property br,wx_property_contract c | select count(br.id) from wx_bill_property br,wx_property_contract c | ||||
| where c.id = br.property_contract_id and br.status = 1 and c.id = #{contractId} | where c.id = br.property_contract_id and br.status = 1 and c.id = #{contractId} | ||||
| </select> | </select> | ||||
| <update id="updateReceiveDatePatch" parameterType="com.iformall.domain.po.WxBillProperty"> | |||||
| update wx_bill_property set receive_date =#{receiveDate} where property_contract_id = #{propertyContractId} | |||||
| </update> | |||||
| </mapper> | </mapper> | ||||
| @@ -176,6 +176,9 @@ | |||||
| and br.status = 1 and c.id = #{contractId} | and br.status = 1 and c.id = #{contractId} | ||||
| </select> | </select> | ||||
| <update id="updateReceiveDatePatch" parameterType="com.iformall.domain.po.WxBillRent"> | |||||
| update wx_bill_rent set receive_date =#{receiveDate} where rent_contract_id = #{rentContractId} | |||||
| </update> | |||||
| </mapper> | </mapper> | ||||