| @@ -249,14 +249,14 @@ public class WxRentContractController extends WxContractBaseController { | |||||
| @GetMapping("/findById") | @GetMapping("/findById") | ||||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | ||||
| public ResultData findById(Long id) { | |||||
| public ResultData findById(Long id,Integer noBillList) { | |||||
| logger.debug("[" + getIpAddr() + "] WxRentContractController::findById"); | logger.debug("[" + getIpAddr() + "] WxRentContractController::findById"); | ||||
| // 同步欠缴状态 | // 同步欠缴状态 | ||||
| // WxAllBill wxBillRent = new WxAllBill(); | // WxAllBill wxBillRent = new WxAllBill(); | ||||
| // wxBillRent.updateTenantInfo(getTenantInfo()); | // wxBillRent.updateTenantInfo(getTenantInfo()); | ||||
| // wxBillRentService.updateBillStatus(wxBillRent); | // wxBillRentService.updateBillStatus(wxBillRent); | ||||
| try { | try { | ||||
| Map<String, Object> data = wxRentContractService.getById(id); | |||||
| Map<String, Object> data = wxRentContractService.getById(id,noBillList); | |||||
| return new ResultData(data); | return new ResultData(data); | ||||
| } catch (MallinkException e) { | } catch (MallinkException e) { | ||||
| logger.error(e.getMessage()); | logger.error(e.getMessage()); | ||||
| @@ -44,7 +44,7 @@ public interface WxRentContractService { | |||||
| * @param id | * @param id | ||||
| * @return | * @return | ||||
| */ | */ | ||||
| Map<String, Object> getById(Long id); | |||||
| Map<String, Object> getById(Long id,Integer noBillList); | |||||
| WxRentContract selectById(Long id); | WxRentContract selectById(Long id); | ||||
| /** | /** | ||||
| @@ -244,7 +244,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| } | } | ||||
| @Override | @Override | ||||
| public Map<String, Object> getById(Long id) { | |||||
| public Map<String, Object> getById(Long id,Integer noBillList) { | |||||
| Map<String, Object> result = new HashMap<>(); | Map<String, Object> result = new HashMap<>(); | ||||
| WxRentContract wxRentContract = wxRentContractMapper.selectById(id); | WxRentContract wxRentContract = wxRentContractMapper.selectById(id); | ||||
| if (wxRentContract == null) { | if (wxRentContract == null) { | ||||
| @@ -359,12 +359,15 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| } | } | ||||
| //查询预账单用于展示 | //查询预账单用于展示 | ||||
| WxAllBill wxBillRent = new WxAllBill(); | |||||
| wxBillRent.setRentContractId(id); | |||||
| wxBillRent.updateTenantInfo(wxRentContract); | |||||
| wxBillRent.setBillType(EnumBillAllType.RENT.getCode()); | |||||
| List<WxAllBill> resultList = wxAllBillMapper.findContractSamePeriodSum(wxBillRent); | |||||
| result.put("previewBillRentList",resultList); | |||||
| if (null != noBillList && EnumYesOrNo.YES.getCode().intValue() == noBillList.intValue()) { | |||||
| }else { | |||||
| WxAllBill wxBillRent = new WxAllBill(); | |||||
| wxBillRent.setRentContractId(id); | |||||
| wxBillRent.updateTenantInfo(wxRentContract); | |||||
| wxBillRent.setBillType(EnumBillAllType.RENT.getCode()); | |||||
| List<WxAllBill> resultList = wxAllBillMapper.findContractSamePeriodSum(wxBillRent); | |||||
| result.put("previewBillRentList",resultList); | |||||
| } | |||||
| return result; | return result; | ||||
| } | } | ||||
| @@ -14,6 +14,7 @@ import com.iformall.enums.EnumContract; | |||||
| import com.iformall.enums.EnumContractOperationType; | import com.iformall.enums.EnumContractOperationType; | ||||
| import com.iformall.enums.EnumContractType; | import com.iformall.enums.EnumContractType; | ||||
| import com.iformall.enums.EnumRentShopType; | import com.iformall.enums.EnumRentShopType; | ||||
| import com.iformall.enums.EnumYesOrNo; | |||||
| import com.iformall.mapper.WxContractCustomersMapper; | import com.iformall.mapper.WxContractCustomersMapper; | ||||
| import com.iformall.mapper.WxPropertyContractMapper; | import com.iformall.mapper.WxPropertyContractMapper; | ||||
| import com.iformall.mapper.WxRentContractMapper; | import com.iformall.mapper.WxRentContractMapper; | ||||
| @@ -162,7 +163,7 @@ public class WxRentPropertyContractServiceImpl implements WxRentPropertyContract | |||||
| public ResultData getContractInfo(Long rentId,Long propertyId) { | public ResultData getContractInfo(Long rentId,Long propertyId) { | ||||
| Map<String, Object> data = new HashMap<>(2); | Map<String, Object> data = new HashMap<>(2); | ||||
| if (null != rentId) { | if (null != rentId) { | ||||
| Map<String, Object> rent = wxRentContractService.getById(rentId); | |||||
| Map<String, Object> rent = wxRentContractService.getById(rentId,EnumYesOrNo.YES.getCode()); | |||||
| data.put("rent", rent); | data.put("rent", rent); | ||||
| } | } | ||||
| //WxPropertyContract wxPropertyContractQuery = new WxPropertyContract(); | //WxPropertyContract wxPropertyContractQuery = new WxPropertyContract(); | ||||