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

//商户

release_toaliyun_real
xhxu 3 лет назад
Родитель
Сommit
de36804276
3 измененных файлов: 70 добавлений и 63 удалений
  1. +1
    -1
      mallinkAdmin/src/main/java/com/iformall/controller/basic/WxMerchantController.java
  2. +6
    -6
      mallinkService/src/main/java/com/iformall/domain/po/WxMerchant.java
  3. +63
    -56
      mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java

+ 1
- 1
mallinkAdmin/src/main/java/com/iformall/controller/basic/WxMerchantController.java Просмотреть файл

@@ -69,7 +69,7 @@ public class WxMerchantController extends BaseController {
wxMerchant.updateTenantInfo(getTenantInfo());
wxMerchant.setSortColumns(BaseEntity.SortField.TopTime_DESC);
wxMerchant.setIsPrivate(EnumYesOrNo.NO.getCode());
final PageInfo<WxMerchant> page = wxMerchantService.listVoAsPage(wxMerchant, pageNum, pageSize,true);
final PageInfo<WxMerchant> page = wxMerchantService.listVoAsPage(wxMerchant, pageNum, pageSize,false);
return new ResultData(page);
}



+ 6
- 6
mallinkService/src/main/java/com/iformall/domain/po/WxMerchant.java Просмотреть файл

@@ -72,12 +72,12 @@ public class WxMerchant extends TenantEntity {
private String linkPhone;

@TableField(exist = false)
@Excel(name="租期开始时间",width = 20,format="yyyy-MM-dd",orderNum = "5")
// @Excel(name="租期开始时间",width = 20,format="yyyy-MM-dd",orderNum = "5")
@io.swagger.annotations.ApiModelProperty(value="租期开始时间",name="rentalStartDate")
private Date rentalStartDate;

@TableField(exist = false)
@Excel(name="租期结束时间",width = 20,format="yyyy-MM-dd",orderNum = "6")
// @Excel(name="租期结束时间",width = 20,format="yyyy-MM-dd",orderNum = "6")
@io.swagger.annotations.ApiModelProperty(value="租期结束时间",name="rentalEndDate")
private Date rentalEndDate;

@@ -115,7 +115,7 @@ public class WxMerchant extends TenantEntity {
@io.swagger.annotations.ApiModelProperty(value = "是否保密", name = "isPrivate")
private Integer isPrivate;

@Excel(name = "待缴提醒", width = 20, orderNum = "10")
// @Excel(name = "待缴提醒", width = 20, orderNum = "10")
@io.swagger.annotations.ApiModelProperty(value = "待缴提醒", name = "billSetting")
private Integer billSetting;

@@ -125,7 +125,7 @@ public class WxMerchant extends TenantEntity {
private String businessName;

@TableField(exist = false)
@Excel(name = "子业态", width = 20, orderNum = "12")
// @Excel(name = "子业态", width = 20, orderNum = "12")
@io.swagger.annotations.ApiModelProperty(value="子业态",name="subBusinessId")
private String subBusinessName;

@@ -141,11 +141,11 @@ public class WxMerchant extends TenantEntity {
@Excel(name = "账户", width = 30, orderNum = "15")
private String receivers;

@Excel(name = "主谈人", width = 20, orderNum = "16")
// @Excel(name = "主谈人", width = 20, orderNum = "16")
@io.swagger.annotations.ApiModelProperty(value = "主谈人", name = "talkUserMain")
private String talkUserMain;

@Excel(name = "辅谈人", width = 20, orderNum = "17")
// @Excel(name = "辅谈人", width = 20, orderNum = "17")
@io.swagger.annotations.ApiModelProperty(value = "辅谈人", name = "talkUserAux")
private String talkUserAux;



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

@@ -1013,25 +1013,29 @@ public class WxMerchantServiceImpl implements WxMerchantService {

List<WxMerchant> list = wxMerchantMapper.findList(wxMerchant);

WxBusiness bq = new WxBusiness();
bq.setFinalTenantId(wxMerchant.getFinalTenantId());
List<WxBusiness> bussinessList = wxBusinessMapper.findListAll(bq);
Map<Integer,String> bussinessMap = new HashMap<Integer,String>();
if (null != bussinessList) {
for (int i = 0 ; i < bussinessList.size() ; i ++) {
WxBusiness bu = bussinessList.get(i);
bussinessMap.put(bu.getId() ,bu.getTitle());
}
}

list.stream().forEach(m->{

List<WxProfitSharingReceiver> receivers = wxProfitSharingReceiverService.findReceivers(m, m.getId());
m.setWxProfitSharingReceiver(receivers);

//分账信息 可能有多个, 先干掉
// WxProfitSharingReceiver receiver = wxProfitSharingReceiverService.findReceiver(m,EnumProfitSharingType.PROFIT_SHARING_TYPE_WECHAT);
// if (receiver != null) {
// m.setAccountId(receiver.getReceiverAccount());
// m.setAccountName(receiver.getTrueName());
// m.setAccountTypeValue(receiver.getReceiverType());
// WxRentContract wxRentContract = new WxRentContract();
// wxRentContract.setMerchantId(m.getId());
// List<WxRentContract> lrc = wxRentContractMapper.selectRentContractByMerchantId(wxRentContract);
// if (!lrc.isEmpty()) {
// m.setRentalStartDate(lrc.get(0).getRentalStartDate());
// m.setRentalEndDate(lrc.get(0).getRentalEndDate());
// }
WxRentContract wxRentContract = new WxRentContract();
wxRentContract.setMerchantId(m.getId());
List<WxRentContract> lrc = wxRentContractMapper.selectRentContractByMerchantId(wxRentContract);
if (!lrc.isEmpty()) {
m.setRentalStartDate(lrc.get(0).getRentalStartDate());
m.setRentalEndDate(lrc.get(0).getRentalEndDate());
}

//商铺信息
m.setShopVos(wxShopService.findMerchantShopVoList(m,m.getId()));
@@ -1041,6 +1045,9 @@ public class WxMerchantServiceImpl implements WxMerchantService {
wxMerchantBUser.setMerchantId(m.getId());
wxMerchantBUser.setStatus(EnumMerchantBUserStatus.VALID.getCode());
m.setUsers(wxMerchantBUserMapper.findList(wxMerchantBUser));

//业态
m.setBusinessName(bussinessMap.get(m.getBusinessId()));
});
excelService.exportExcel(list, null, "商户信息", WxMerchant.class, "商户信息数据.xlsx", response, false);
}
@@ -1204,18 +1211,18 @@ public class WxMerchantServiceImpl implements WxMerchantService {
record.setIds(merchantIds);
}

List<Long> noMerchantIds = new ArrayList<Long>();
Integer rentShopType = record.getRentShopType();
if (null != rentShopType) {
WxRentContract rentContractQ = new WxRentContract();
rentContractQ.updateTenantInfo(record);
rentContractQ.setStatuss(EnumRentContractStatus.getValidStatus());
List<Long> usedMerchantIds = wxRentContractMapper.getMerchantIdsByStatuss(rentContractQ);
if (null != usedMerchantIds && usedMerchantIds.size() >0 ) {
noMerchantIds.addAll(usedMerchantIds);
// record.setNotInids(usedMerchantIds);
}
}
// List<Long> noMerchantIds = new ArrayList<Long>();
// Integer rentShopType = record.getRentShopType();
// if (null != rentShopType) {
// WxRentContract rentContractQ = new WxRentContract();
// rentContractQ.updateTenantInfo(record);
// rentContractQ.setStatuss(EnumRentContractStatus.getValidStatus());
// List<Long> usedMerchantIds = wxRentContractMapper.getMerchantIdsByStatuss(rentContractQ);
// if (null != usedMerchantIds && usedMerchantIds.size() >0 ) {
// noMerchantIds.addAll(usedMerchantIds);
//// record.setNotInids(usedMerchantIds);
// }
// }
// if(EnumProfitSharingUse.NO.getCode().equals(record.getIsUse())){
// if(noMerchantIds.size() > 0){
// noMerchantIds.retainAll(isUseMerchantIds);
@@ -1224,9 +1231,9 @@ public class WxMerchantServiceImpl implements WxMerchantService {
// }
// }

if(noMerchantIds.size() > 0){
record.setNotInids(noMerchantIds);
}
// if(noMerchantIds.size() > 0){
// record.setNotInids(noMerchantIds);
// }
}
@Override
@@ -1284,34 +1291,34 @@ public class WxMerchantServiceImpl implements WxMerchantService {
merchant.setRentalEndDate(contract.getRentalEndDate());
}
}
if (record.getRentShopType() != null) {
List<Map<String, Object>> shops = new ArrayList<>();
WxMerchantShop wxMerchantShop = new WxMerchantShop();
wxMerchantShop.setMerchantId(merchant.getId());
wxMerchantShop.setIsDel(EnumDelStatus.NOT_DEL.getCode());
List<WxMerchantShop> wxMerchantShopList = wxMerchantShopMapper.findList(wxMerchantShop);
for (WxMerchantShop merchantShop : wxMerchantShopList) {
WxShop shop = new WxShop();
shop.setId(merchantShop.getShopId());
shop.updateTenantInfo(merchant);
PageInfo<Map<String, Object>> shopPageInfo = wxShopService.findListMap(shop,1,10000);
List<Map<String, Object>> shoplist = shopPageInfo.getList();
if (shoplist.size() > 0) {
shops.add(shoplist.get(0));
}
}
merchant.setShoplist(shops);
}
WxRentContract rc = new WxRentContract();
rc.setMerchantId(merchant.getId());
rc.setTenantId(merchant.getTenantId());
List<WxRentContract> rentContractList = wxRentContractMapper.findList(rc);
if(CollectionUtils.isEmpty(rentContractList)){
merchant.setHasContract(EnumHasContract.NO.getCode());
}else{
merchant.setHasContract(EnumHasContract.HAS.getCode());
}
// if (record.getRentShopType() != null) {
// List<Map<String, Object>> shops = new ArrayList<>();
// WxMerchantShop wxMerchantShop = new WxMerchantShop();
// wxMerchantShop.setMerchantId(merchant.getId());
// wxMerchantShop.setIsDel(EnumDelStatus.NOT_DEL.getCode());
// List<WxMerchantShop> wxMerchantShopList = wxMerchantShopMapper.findList(wxMerchantShop);
// for (WxMerchantShop merchantShop : wxMerchantShopList) {
// WxShop shop = new WxShop();
// shop.setId(merchantShop.getShopId());
// shop.updateTenantInfo(merchant);
// PageInfo<Map<String, Object>> shopPageInfo = wxShopService.findListMap(shop,1,10000);
// List<Map<String, Object>> shoplist = shopPageInfo.getList();
// if (shoplist.size() > 0) {
// shops.add(shoplist.get(0));
// }
// }
// merchant.setShoplist(shops);
// }
//
// WxRentContract rc = new WxRentContract();
// rc.setMerchantId(merchant.getId());
// rc.setTenantId(merchant.getTenantId());
// List<WxRentContract> rentContractList = wxRentContractMapper.findList(rc);
// if(CollectionUtils.isEmpty(rentContractList)){
// merchant.setHasContract(EnumHasContract.NO.getCode());
// }else{
// merchant.setHasContract(EnumHasContract.HAS.getCode());
// }
}
}
return pageInfo;


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