Просмотр исходного кода

[合同管理][创建合同][已有合同的店铺不能再次选择]

release_toaliyun_real
gongbiao 7 лет назад
Родитель
Сommit
fac06a7f30
4 измененных файлов: 17 добавлений и 8 удалений
  1. +2
    -0
      mallinkService/src/main/java/com/iformall/mapper/WxRentContractMapper.java
  2. +6
    -6
      mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java
  3. +5
    -0
      mallinkService/src/main/resources/mapper/WxRentContractMapper.xml
  4. +4
    -2
      mallinkService/src/main/resources/mapper/WxShopMapper.xml

+ 2
- 0
mallinkService/src/main/java/com/iformall/mapper/WxRentContractMapper.java Просмотреть файл

@@ -29,4 +29,6 @@ public interface WxRentContractMapper extends CommonMapper<WxRentContract, Strin

int updateRentContractEndStatus(WxRentContract wxRentContract);

void updateRentWaitSignStatus(WxRentContract wxRentContract);

}

+ 6
- 6
mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java Просмотреть файл

@@ -258,12 +258,6 @@ public class WxRentContractServiceImpl implements WxRentContractService {
shopparams.put("status",EnumShopStatus.NOT_RENT.getCode());
Map<String,Object> shopLeftInfo=wxShopMapper.queryShopLeftInfo(shopparams);
resultData.put("shopLeftInfo",shopLeftInfo);
//待签约
WxRentContract wxRentContract = new WxRentContract();
wxRentContract.setTenantId(tenantId);
wxRentContract.setStatus(EnumRentContractStatus.WAIT_SIGN.getCode());
int waitSignCount=wxRentContractMapper.queryRentContractWaitSignStatus(wxRentContract);
resultData.put("waitSignCount",waitSignCount);
//需要更新的状态
resultData.putAll(updateStatus(tenantId));
return resultData;
@@ -305,6 +299,12 @@ public class WxRentContractServiceImpl implements WxRentContractService {
WxRentContract wxRentContract = new WxRentContract();
wxRentContract.setTenantId(tenantId);

//待签约
wxRentContract.setStatus(EnumRentContractStatus.WAIT_SIGN.getCode());
wxRentContractMapper.updateRentWaitSignStatus(wxRentContract);
int waitSignCount=wxRentContractMapper.queryRentContractWaitSignStatus(wxRentContract);
resultData.put("waitSignCount",waitSignCount);

//计租中
wxRentContract.setStatus(EnumRentContractStatus.RENT_PAID.getCode());
int rendPaidCount =wxRentContractMapper.queryRentContractPaidStatus(wxRentContract);


+ 5
- 0
mallinkService/src/main/resources/mapper/WxRentContractMapper.xml Просмотреть файл

@@ -125,5 +125,10 @@
<update id="updateRentContractEndStatus" parameterType="com.iformall.domain.po.WxRentContract">
update wx_rent_contract set status=#{status} where tenant_id=#{tenantId} and status!=1 and status!=6 and rental_end_date &lt;now()
</update>
<update id="updateRentWaitSignStatus" parameterType="com.iformall.domain.po.WxRentContract">
update wx_rent_contract set status=#{status} where tenant_id=#{tenantId} and merchant_id is null
</update>

</mapper>

+ 4
- 2
mallinkService/src/main/resources/mapper/WxShopMapper.xml Просмотреть файл

@@ -170,12 +170,14 @@

</if>

<if test=" null != status ">
<if test=" null != status">
and s.`status` = #{status}

</if>
<if test="null!=status and status==1">
and s.id not in(select shop_id from wx_rent_contract where status!=1 and status!=6 and merchant_id is not null)
and s.id not in(
SELECT shop_id FROM wx_rent_contract WHERE tenant_id = #{tenantId} and status!=1 and status!=6 and merchant_id is not null
)
</if>

<if test=" null != x ">


Загрузка…
Отмена
Сохранить