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

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

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); 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()); shopparams.put("status",EnumShopStatus.NOT_RENT.getCode());
Map<String,Object> shopLeftInfo=wxShopMapper.queryShopLeftInfo(shopparams); Map<String,Object> shopLeftInfo=wxShopMapper.queryShopLeftInfo(shopparams);
resultData.put("shopLeftInfo",shopLeftInfo); 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)); resultData.putAll(updateStatus(tenantId));
return resultData; return resultData;
@@ -305,6 +299,12 @@ public class WxRentContractServiceImpl implements WxRentContractService {
WxRentContract wxRentContract = new WxRentContract(); WxRentContract wxRentContract = new WxRentContract();
wxRentContract.setTenantId(tenantId); 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()); wxRentContract.setStatus(EnumRentContractStatus.RENT_PAID.getCode());
int rendPaidCount =wxRentContractMapper.queryRentContractPaidStatus(wxRentContract); 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 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 wx_rent_contract set status=#{status} where tenant_id=#{tenantId} and status!=1 and status!=6 and rental_end_date &lt;now()
</update> </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> </mapper>

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

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


</if> </if>


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


</if> </if>
<if test="null!=status and status==1"> <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>


<if test=" null != x "> <if test=" null != x ">


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