| @@ -74,5 +74,8 @@ public class WxRentContractAgileUnDepositItem extends TenantEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value="页面用的字段",name="isFree") | @io.swagger.annotations.ApiModelProperty(value="页面用的字段",name="isFree") | ||||
| private Integer isFather; | private Integer isFather; | ||||
| @TableField(exist = false) | |||||
| private String shopNumber; | |||||
| } | } | ||||
| @@ -15,6 +15,7 @@ public interface WxRentContractAgileUnDepositItemMapper extends CommonMapper<WxR | |||||
| WxRentContractAgileUnDepositItem selectById(@Param("id")Long id,@Param("tenantId")String tenantId); | WxRentContractAgileUnDepositItem selectById(@Param("id")Long id,@Param("tenantId")String tenantId); | ||||
| List<Long> findIdList(WxRentContractAgileUnDepositItem wxBillRent); | List<Long> findIdList(WxRentContractAgileUnDepositItem wxBillRent); | ||||
| List<Long> findShopIdList(WxRentContractAgileUnDepositItem wxBillRent); | |||||
| void deleteByUnDeposit(WxRentContractAgileUnDepositItem wxBillRent); | void deleteByUnDeposit(WxRentContractAgileUnDepositItem wxBillRent); | ||||
| @@ -489,7 +489,30 @@ public class WxAgileContractServiceImpl implements WxAgileContractService { | |||||
| WxRentContractAgileUnDepositItem itemq = new WxRentContractAgileUnDepositItem(); | WxRentContractAgileUnDepositItem itemq = new WxRentContractAgileUnDepositItem(); | ||||
| itemq.updateTenantInfo(ud); | itemq.updateTenantInfo(ud); | ||||
| itemq.setUnDepositId(ud.getId()); | itemq.setUnDepositId(ud.getId()); | ||||
| ud.setItems(wxRentContractAgileUnDepositItemMapper.findList(itemq)); | |||||
| List<WxRentContractAgileUnDepositItem> itemList = wxRentContractAgileUnDepositItemMapper.findList(itemq); | |||||
| ud.setItems(itemList); | |||||
| if (null != itemList && itemList.size() > 0 ) { | |||||
| if (ud.getSettingMethod().intValue() == EnumRentContractAgilSettingMethod.BY_SHOP.getCode().intValue()) { | |||||
| List<Long> shopIds = wxRentContractAgileUnDepositItemMapper.findShopIdList(itemq); | |||||
| if (null != shopIds && shopIds.size() > 0 ) { | |||||
| WxShop sq = new WxShop(); | |||||
| sq.updateTenantInfo(ud); | |||||
| sq.setIds(shopIds); | |||||
| Map<Long,WxShop> shopMap = wxShopService.findShopMap(sq); | |||||
| if (null != shopMap) { | |||||
| for (int i = 0 ; i < itemList.size() ; i ++ ){ | |||||
| WxRentContractAgileUnDepositItem item = itemList.get(i); | |||||
| if (null != item.getShopId()) { | |||||
| WxShop shop = shopMap.get(item.getShopId()); | |||||
| if (null != shop) { | |||||
| item.setShopNumber(shop.getShopNumber()); | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| return ud; | return ud; | ||||
| } | } | ||||
| @@ -61,6 +61,13 @@ | |||||
| <include refid="dynamicWhereConditions"/> | <include refid="dynamicWhereConditions"/> | ||||
| </select> | </select> | ||||
| <select id="findShopIdList" parameterType="com.iformall.domain.po.WxRentContractAgileUnDepositItem" resultType="Long"> | |||||
| select distinct shop_id | |||||
| from wx_rent_contract_agile_un_deposit_item | |||||
| <include refid="dynamicWhereConditions"/> | |||||
| and shop_id is not null | |||||
| </select> | |||||
| <select id="selectById" parameterType="HashMap" resultMap="BaseResultMap"> | <select id="selectById" parameterType="HashMap" resultMap="BaseResultMap"> | ||||
| select | select | ||||
| <include refid="allColumns"/> | <include refid="allColumns"/> | ||||