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

Merge branch 'release_real_200809' of https://git.malls.iformall.com/server/formallProject into release_real_200809

release_toaliyun_real
xhxu 5 лет назад
Родитель
Сommit
71c61441b4
1 измененных файлов: 28 добавлений и 19 удалений
  1. +28
    -19
      mallinkService/src/main/java/com/iformall/service/impl/WxRentPropertyContractServiceImpl.java

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

@@ -5,16 +5,19 @@ import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
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.WxFlowRecord;
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 com.iformall.domain.vo.WxRentPropertyContractVo; import com.iformall.domain.vo.WxRentPropertyContractVo;
import com.iformall.enums.EnumContract; 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.EnumFlowRecordStatus;
import com.iformall.enums.EnumRentShopType; import com.iformall.enums.EnumRentShopType;
import com.iformall.exception.MallinkException; import com.iformall.exception.MallinkException;
import com.iformall.mapper.WxPropertyContractMapper; import com.iformall.mapper.WxPropertyContractMapper;
import com.iformall.mapper.WxRentContractMapper; import com.iformall.mapper.WxRentContractMapper;
import com.iformall.service.WxFlowRecordService;
import com.iformall.service.WxPropertyContractService; import com.iformall.service.WxPropertyContractService;
import com.iformall.service.WxRentContractService; import com.iformall.service.WxRentContractService;
import com.iformall.service.WxRentPropertyContractService; import com.iformall.service.WxRentPropertyContractService;
@@ -22,7 +25,9 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;


import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@@ -45,6 +50,9 @@ public class WxRentPropertyContractServiceImpl implements WxRentPropertyContract


@Autowired @Autowired
WxRentContractService wxRentContractService; WxRentContractService wxRentContractService;
@Autowired
WxFlowRecordService wxFlowRecordService;


@Override @Override
public PageInfo<WxRentPropertyContractVo> listContractVo(WxRentPropertyContractVo record, Integer pageIndex, Integer pageSize) { public PageInfo<WxRentPropertyContractVo> listContractVo(WxRentPropertyContractVo record, Integer pageIndex, Integer pageSize) {
@@ -75,26 +83,27 @@ public class WxRentPropertyContractServiceImpl implements WxRentPropertyContract


@Override @Override
public ResultData getContractApplyInfo(Long rentId,Long propertyId) { public ResultData getContractApplyInfo(Long rentId,Long propertyId) {
Map<String, Object> data = new HashMap<>(2);
if (null != rentId) {
Map<String, Object> rent = wxRentContractService.getById(rentId);
data.put("rent", rent);
List<Map<String, Object>> result = new ArrayList<Map<String, Object>>();
String bussinessId = null;
if (null != rentId && null == propertyId) {
bussinessId = String.valueOf(rentId);
}else if (null == rentId && null != propertyId) {
bussinessId = String.valueOf(propertyId);
}else {
bussinessId = String.valueOf(rentId)+"_RP_"+String.valueOf(propertyId);
}
WxFlowRecord wxFlowRecord = new WxFlowRecord();
wxFlowRecord.setBusinessId(bussinessId);
List<WxFlowRecord> flowRecordList = wxFlowRecordService.findList(wxFlowRecord);
for (WxFlowRecord wfr : flowRecordList) {
Map<String, Object> data = new HashMap<String, Object>();
data.put("status", wfr.getStatus());
data.put("userName", wfr.getUserName());
data.put("remark", wfr.getRemark());
result.add(data);
} }
// WxPropertyContract wxPropertyContractQuery = new WxPropertyContract();
// wxPropertyContractQuery.setRentContractId(id);
// WxPropertyContract propertyContract = wxPropertyContractMapper.selectOne(new QueryWrapper(wxPropertyContractQuery));
if (null != propertyId) {
WxPropertyContract propertyContract = wxPropertyContractMapper.selectById(propertyId);
if (propertyContract != null) {
try {
Map<String, Object> property = wxPropertyContractService.getById(propertyContract.getId());
data.put("property", property);
} catch (MallinkException e) {
logger.error(e.getMessage());
}
}
}
return new ResultData(data);
return new ResultData(result);
} }






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