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

Merge commit '8f7259c42c99177fb4bb80de9bb055950dc2c972' into release

release_toaliyun_real
luozukai 6 лет назад
Родитель
Сommit
a8ad153430
14 измененных файлов: 241 добавлений и 114 удалений
  1. +1
    -1
      mallinkAdmin/src/main/java/com/iformall/controller/basic/WxBrandController.java
  2. +8
    -2
      mallinkAdmin/src/main/java/com/iformall/controller/contract/WxPropertyContractController.java
  3. +13
    -2
      mallinkAdmin/src/main/java/com/iformall/controller/market/WxActivityController.java
  4. +8
    -0
      mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponController.java
  5. +4
    -0
      mallinkAdmin/src/main/java/com/iformall/tenant/TenantInfoImpl.java
  6. +90
    -0
      mallinkAdmin/src/main/resources/db/migration/V201907051056__L_ADD_FLOW_DATA.sql
  7. +6
    -1
      mallinkCApi/src/main/java/com/iformall/controller/WxActivityJoinController.java
  8. +1
    -5
      mallinkService/src/main/java/com/iformall/service/impl/WxActivityJoinServiceImpl.java
  9. +4
    -3
      mallinkService/src/main/java/com/iformall/service/impl/WxActivityServiceImpl.java
  10. +10
    -2
      mallinkService/src/main/java/com/iformall/service/impl/WxChartServiceImpl.java
  11. +2
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java
  12. +3
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java
  13. +7
    -2
      mallinkService/src/main/java/com/iformall/service/impl/WxRentPropertyContractServiceImpl.java
  14. +84
    -94
      mallinkService/src/main/resources/mapper/WxBillAllMapper.xml

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

@@ -75,7 +75,7 @@ public class WxBrandController extends BaseController {
wxMerchant.setBrand(wxBrand.getId()); wxMerchant.setBrand(wxBrand.getId());
List<WxMerchant> merchantList = wxMerchantService.findList(wxMerchant); List<WxMerchant> merchantList = wxMerchantService.findList(wxMerchant);
if(CollectionUtils.isNotEmpty(merchantList)){ if(CollectionUtils.isNotEmpty(merchantList)){
return new ResultData(Result.ERROR, "您有未解绑的商户,请先解绑。");
return new ResultData(Result.ERROR, "请先删除已绑定该品牌的商户。");
} }
} }
wxBrandService.update(wxBrand); wxBrandService.update(wxBrand);


+ 8
- 2
mallinkAdmin/src/main/java/com/iformall/controller/contract/WxPropertyContractController.java Просмотреть файл

@@ -8,6 +8,7 @@ import com.iformall.domain.po.MallUserInfo;
import com.iformall.domain.po.WxBillProperty; import com.iformall.domain.po.WxBillProperty;
import com.iformall.domain.po.WxPropertyContract; import com.iformall.domain.po.WxPropertyContract;
import com.iformall.enums.EnumRentStartType; import com.iformall.enums.EnumRentStartType;
import com.iformall.exception.MallinkException;
import com.iformall.mapper.WxPropertyContractMapper; import com.iformall.mapper.WxPropertyContractMapper;
import com.iformall.service.WxBillPropertyService; import com.iformall.service.WxBillPropertyService;
import com.iformall.service.WxPropertyContractService; import com.iformall.service.WxPropertyContractService;
@@ -107,8 +108,13 @@ public class WxPropertyContractController extends BaseController {
WxBillProperty wxBillProperty = new WxBillProperty(); WxBillProperty wxBillProperty = new WxBillProperty();
wxBillProperty.setTenantId(super.getTenantId()); wxBillProperty.setTenantId(super.getTenantId());
wxBillPropertyService.updateBillStatus(wxBillProperty); wxBillPropertyService.updateBillStatus(wxBillProperty);
Map<String, Object> data = wxPropertyContractService.getById(id);
return new ResultData(data);
try {
Map<String, Object> data = wxPropertyContractService.getById(id);
return new ResultData(data);
} catch (MallinkException e) {
logger.error(e.getMessage());
return new ResultData(e.getErrorCode(), e.getMessage());
}
} }


@RequestMapping("/download") @RequestMapping("/download")


+ 13
- 2
mallinkAdmin/src/main/java/com/iformall/controller/market/WxActivityController.java Просмотреть файл

@@ -7,6 +7,7 @@ import com.iformall.common.ResultData;
import com.iformall.controller.base.BaseController; import com.iformall.controller.base.BaseController;
import com.iformall.domain.po.WxActivity; import com.iformall.domain.po.WxActivity;
import com.iformall.enums.EnumActivityStatus; import com.iformall.enums.EnumActivityStatus;
import com.iformall.exception.MallinkException;
import com.iformall.service.WxActivityService; import com.iformall.service.WxActivityService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
@@ -54,7 +55,12 @@ public class WxActivityController extends BaseController {
logger.debug("[" + getIpAddr() + "] WxActivityController::add"); logger.debug("[" + getIpAddr() + "] WxActivityController::add");
wxActivity.setStatus(EnumActivityStatus.STATUS_THROW_IN.getCode()); wxActivity.setStatus(EnumActivityStatus.STATUS_THROW_IN.getCode());
wxActivity.setTenantId(getTenantId()); wxActivity.setTenantId(getTenantId());
wxActivityService.saveOrUpdate(wxActivity);
try {
wxActivityService.saveOrUpdate(wxActivity);
} catch (MallinkException e) {
logger.error(e.getMessage());
return new ResultData(e.getErrorCode(), e.getMessage());
}
return new ResultData(); return new ResultData();
} }


@@ -63,7 +69,12 @@ public class WxActivityController extends BaseController {
@SystemControllerLog(description = "活动-id更新") @SystemControllerLog(description = "活动-id更新")
public ResultData update(@RequestBody WxActivity wxActivity) { public ResultData update(@RequestBody WxActivity wxActivity) {
logger.debug("[" + getIpAddr() + "] WxActivityController::update"); logger.debug("[" + getIpAddr() + "] WxActivityController::update");
return wxActivityService.saveOrUpdate(wxActivity);
try {
return wxActivityService.saveOrUpdate(wxActivity);
} catch (MallinkException e) {
logger.error(e.getMessage());
return new ResultData(e.getErrorCode(), e.getMessage());
}
} }


@ApiOperation("根据id更新接口") @ApiOperation("根据id更新接口")


+ 8
- 0
mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponController.java Просмотреть файл

@@ -179,6 +179,14 @@ public class WxCouponController extends BaseController {
if(wxCoupon.getValidEndDate()!=null && wxCoupon.getValidEndDate().before(coupon.getValidEndDate())){ if(wxCoupon.getValidEndDate()!=null && wxCoupon.getValidEndDate().before(coupon.getValidEndDate())){
return new ResultData(ErrorCode.COUPON_STOCK_ENDTIME_ERR); return new ResultData(ErrorCode.COUPON_STOCK_ENDTIME_ERR);
} }
if((wxCoupon.getValidEndDate()!=null&&coupon.getValidEndDate()!=null && DateUtils.format(wxCoupon.getValidEndDate()).equals(DateUtils.format(coupon.getValidEndDate()))
&& wxCoupon.getInventory().equals(coupon.getInventory()))
||
(wxCoupon.getValidDays()!=null && coupon.getValidDays()!=null && wxCoupon.getInventory().equals(coupon.getInventory()) &&
wxCoupon.getValidDays().equals(coupon.getValidDays()))
){
return new ResultData(ErrorCode.COUPON_STOCK_VALID_DATE_SETTING_ERR);
}
} }


//启动审批流 //启动审批流


+ 4
- 0
mallinkAdmin/src/main/java/com/iformall/tenant/TenantInfoImpl.java Просмотреть файл

@@ -100,6 +100,10 @@ public class TenantInfoImpl implements TenantInfo {
return true; return true;
if ("com.iformall.mapper.WxActivityJoinMapper.updateStatus".equals(ms.getId())) if ("com.iformall.mapper.WxActivityJoinMapper.updateStatus".equals(ms.getId()))
return true; return true;
if ("com.iformall.mapper.WxCouponMapper.findCouponList".equals(ms.getId()))
return true;
if ("com.iformall.mapper.WxCouponMapper.findCouponListCount".equals(ms.getId()))
return true;
return false; return false;
} }
} }

+ 90
- 0
mallinkAdmin/src/main/resources/db/migration/V201907051056__L_ADD_FLOW_DATA.sql Просмотреть файл

@@ -0,0 +1,90 @@
delete from wx_flow_config where name in('营销审批','拼团审批','有价卷审批','卡审批','砍价审批');

INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`)
VALUES
(1560252222, 0, '789', '营销审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 3),
((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560252222, '789', '有价卷审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 1),
((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560252222, '789', '卡审批', 10, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 2),
((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560252222, '789', '拼团审批', 11, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 3),
((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560252222, '789', '砍价审批', 12, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 4);

INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`)
VALUES
(1560253333, 0, '790', '营销审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 3),
((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560253333, '790', '有价卷审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 1),
((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560253333, '790', '卡审批', 10, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 2),
((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560253333, '790', '拼团审批', 11, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 3),
((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560253333, '790', '砍价审批', 12, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 4);

INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`)
VALUES
(1560254444, 0, '1001', '营销审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 3),
((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560254444, '1001', '有价卷审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 1),
((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560254444, '1001', '卡审批', 10, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 2),
((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560254444, '1001', '拼团审批', 11, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 3),
((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560254444, '1001', '砍价审批', 12, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 4);

INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`)
VALUES
(1560255555, 0, '1002', '营销审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 3),
((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560255555, '1002', '有价卷审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 1),
((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560255555, '1002', '卡审批', 10, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 2),
((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560255555, '1002', '拼团审批', 11, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 3),
((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560255555, '1002', '砍价审批', 12, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 4);

INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`)
VALUES
(1560255556, 0, '1003', '营销审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 3),
((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560255556, '1003', '有价卷审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 1),
((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560255556, '1003', '卡审批', 10, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 2),
((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560255556, '1003', '拼团审批', 11, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 3),
((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560255556, '1003', '砍价审批', 12, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 4);

INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`)
VALUES
(1560256666, 0, '1004', '营销审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 3),
((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256666, '1004', '有价卷审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 1),
((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256666, '1004', '卡审批', 10, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 2),
((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256666, '1004', '拼团审批', 11, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 3),
((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256666, '1004', '砍价审批', 12, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 4);

INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`)
VALUES
(1560257777, 0, '1005', '营销审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 3),
((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560257777, '1005', '有价卷审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 1),
((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560257777, '1005', '卡审批', 10, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 2),
((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560257777, '1005', '拼团审批', 11, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 3),
((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560257777, '1005', '砍价审批', 12, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 4);

INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`)
VALUES
(1560258888, 0, '1006', '营销审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 3),
((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560258888, '1006', '有价卷审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 1),
((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560258888, '1006', '卡审批', 10, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 2),
((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560258888, '1006', '拼团审批', 11, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 3),
((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560258888, '1006', '砍价审批', 12, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 4);

INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`)
VALUES
(1560259999, 0, '1007', '营销审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 3),
((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560259999, '1007', '有价卷审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 1),
((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560259999, '1007', '卡审批', 10, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 2),
((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560259999, '1007', '拼团审批', 11, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 3),
((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560259999, '1007', '砍价审批', 12, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 4);

INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`)
VALUES
(1560260000, 0, '1008', '营销审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 3),
((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560260000, '1008', '有价卷审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 1),
((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560260000, '1008', '卡审批', 10, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 2),
((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560260000, '1008', '拼团审批', 11, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 3),
((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560260000, '1008', '砍价审批', 12, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 4);

INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`)
VALUES
(1560260001, 0, '1009', '营销审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 3),
((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560260001, '1009', '有价卷审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 1),
((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560260001, '1009', '卡审批', 10, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 2),
((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560260001, '1009', '拼团审批', 11, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 3),
((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560260001, '1009', '砍价审批', 12, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 4);


+ 6
- 1
mallinkCApi/src/main/java/com/iformall/controller/WxActivityJoinController.java Просмотреть файл

@@ -5,6 +5,7 @@ import com.iformall.common.ErrorCode;
import com.iformall.common.ResultData; import com.iformall.common.ResultData;
import com.iformall.domain.po.WxActivity; import com.iformall.domain.po.WxActivity;
import com.iformall.domain.po.WxActivityJoin; import com.iformall.domain.po.WxActivityJoin;
import com.iformall.exception.MallinkException;
import com.iformall.service.WxActivityJoinService; import com.iformall.service.WxActivityJoinService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
@@ -50,7 +51,11 @@ public class WxActivityJoinController extends BaseController {
wxActivityJoin.setTenantId(getTenantId()); wxActivityJoin.setTenantId(getTenantId());
wxActivityJoin.setUserId(getUserId()); wxActivityJoin.setUserId(getUserId());
wxActivityJoin.setNickName(getUser().getNickName()); wxActivityJoin.setNickName(getUser().getNickName());
return wxActivityJoinService.join(wxActivityJoin);
try {
return wxActivityJoinService.join(wxActivityJoin);
} catch (MallinkException e) {
return new ResultData(e.getErrorCode(), e.getMessage());
}
} }


@ApiOperation("签到") @ApiOperation("签到")


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

@@ -146,7 +146,6 @@ public class WxActivityJoinServiceImpl implements WxActivityJoinService {
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = {Exception.class}) @Transactional(propagation = Propagation.REQUIRED, rollbackFor = {Exception.class})
@Override @Override
public ResultData join(WxActivityJoin wxActivityJoin) { public ResultData join(WxActivityJoin wxActivityJoin) {

WxActivityJoin joinQuery = new WxActivityJoin(); WxActivityJoin joinQuery = new WxActivityJoin();
joinQuery.setUserId(wxActivityJoin.getUserId()); joinQuery.setUserId(wxActivityJoin.getUserId());
joinQuery.setActivityId(wxActivityJoin.getActivityId()); joinQuery.setActivityId(wxActivityJoin.getActivityId());
@@ -168,10 +167,7 @@ public class WxActivityJoinServiceImpl implements WxActivityJoinService {
wxCreditHistory.setCreditType(EnumScoreType.ACTIVITY_JOIN.getCode()); wxCreditHistory.setCreditType(EnumScoreType.ACTIVITY_JOIN.getCode());
wxCreditHistory.setOperatorType(EnumUserType.CUSER.getCode()); wxCreditHistory.setOperatorType(EnumUserType.CUSER.getCode());
wxCreditHistory.setOperatorId(wxActivityJoin.getUserId()); wxCreditHistory.setOperatorId(wxActivityJoin.getUserId());
WxCreditHistory creditHistory = wxCreditHistoryService.saveOrUpdate(wxCreditHistory);
Map<String, Object> data = new HashMap<>(2);
data.put("useCredit", credit);
data.put("totalCredit", creditHistory.getCreditAmount());
wxCreditHistoryService.saveOrUpdate(wxCreditHistory);
} }
//保存到报名表中 //保存到报名表中
final IdWorker idWorker = IdWorker.get(); final IdWorker idWorker = IdWorker.get();


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

@@ -159,13 +159,14 @@ public class WxActivityServiceImpl implements WxActivityService {
WxCampaign campaignQuery = new WxCampaign(); WxCampaign campaignQuery = new WxCampaign();
campaignQuery.setStatus(EnumCampaignStatus.STATUS_THROW_IN.getCode()); campaignQuery.setStatus(EnumCampaignStatus.STATUS_THROW_IN.getCode());
int count = wxCampaignMapper.selectCount(campaignQuery); int count = wxCampaignMapper.selectCount(campaignQuery);
if (count == 7) {
throw new MallinkException(ErrorCode.ACTIVITY_SEND_ERROR);
int campaignTotal = 7;
if (count == campaignTotal) {
return new ResultData(ErrorCode.ACTIVITY_SEND_ERROR);
} }
//修改投放状态 //修改投放状态
WxActivity wxActivity = wxActivityMapper.selectByPrimaryKey(id); WxActivity wxActivity = wxActivityMapper.selectByPrimaryKey(id);
if (wxActivity.getEndTime().before(new Date())) { if (wxActivity.getEndTime().before(new Date())) {
throw new MallinkException(ErrorCode.ACTIVITY_JOIN_TIME_END);
return new ResultData(ErrorCode.ACTIVITY_JOIN_TIME_END);
} }
wxActivity.setStatus(EnumActivityStatus.INJECT_CAMPAIGN.getCode()); wxActivity.setStatus(EnumActivityStatus.INJECT_CAMPAIGN.getCode());
wxActivity.setUpdateTime(new Date()); wxActivity.setUpdateTime(new Date());


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

@@ -84,14 +84,22 @@ public class WxChartServiceImpl implements WxChartDataService {
public ResultData queryData(Map<String, String> paramsMap) { public ResultData queryData(Map<String, String> paramsMap) {
String tenantId = paramsMap.get("tenantId"); String tenantId = paramsMap.get("tenantId");
Integer chart = Integer.valueOf(paramsMap.get("chart")); Integer chart = Integer.valueOf(paramsMap.get("chart"));
String startdate = paramsMap.get("startdate") + " 00:00:00";
String enddate = paramsMap.get("enddate") + " 23:59:59";
String startdate = paramsMap.get("startdate");
String enddate = paramsMap.get("enddate");

if(chart == null){
return new ResultData(ErrorCode.REPORT_TYPE_UNKNOWN);
}


if (StringUtils.isEmpty(startdate)) { if (StringUtils.isEmpty(startdate)) {
startdate = DateUtils.getSystemTime("yyyy-MM-dd") + " 00:00:00" ; startdate = DateUtils.getSystemTime("yyyy-MM-dd") + " 00:00:00" ;
} else {
startdate = startdate + " 00:00:00";
} }
if (StringUtils.isEmpty(enddate)) { if (StringUtils.isEmpty(enddate)) {
enddate = DateUtils.getSystemTime("yyyy-MM-dd") + " 23:59:59"; enddate = DateUtils.getSystemTime("yyyy-MM-dd") + " 23:59:59";
} else {
enddate = enddate + " 23:59:59";
} }


//出租率 //出租率


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

@@ -1199,8 +1199,9 @@ public class WxOrderServiceImpl implements WxOrderService {
order = saveFreeOrderForCoupon(user, coupon, orderSaveDto.getCouponChannelId(), orderSaveDto.getFormId()); order = saveFreeOrderForCoupon(user, coupon, orderSaveDto.getCouponChannelId(), orderSaveDto.getFormId());
if(order != null) { if(order != null) {
// 6. 下订单完成,发送内部消息 // 6. 下订单完成,发送内部消息
// 下订单完成,发送内部消息
try { try {
sendInsideOrderSuccessMsg(order, coupon, user);
sendOrderSuccessActionMsg(order);
} catch (Exception e) { } catch (Exception e) {
logger.error("内部消息发送失败: " + e.getMessage()); logger.error("内部消息发送失败: " + e.getMessage());
throw new MallinkException(ErrorCode.MSG_INSIDE_ERROR); throw new MallinkException(ErrorCode.MSG_INSIDE_ERROR);


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

@@ -262,6 +262,8 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService
wxRentContract.getStatus().equals(EnumRentContractStatus.INVALID.getCode())) { wxRentContract.getStatus().equals(EnumRentContractStatus.INVALID.getCode())) {
return new ResultData(ErrorCode.RENT_CONTRACT_IS_TERMINATED); return new ResultData(ErrorCode.RENT_CONTRACT_IS_TERMINATED);
} }
} else {
return new ResultData(ErrorCode.RENT_CONTRACT_IS_NOT_FOUND);
} }
if (null == record.getMerchantId() && record.getOperationType().equals(EnumContractOperationType.PART.getCode())) { if (null == record.getMerchantId() && record.getOperationType().equals(EnumContractOperationType.PART.getCode())) {
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "merchantId不能为空"); return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "merchantId不能为空");
@@ -365,7 +367,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService
return new ResultData(ErrorCode.PROPERTY_CONTRACT_IS_NOT_FOUND); return new ResultData(ErrorCode.PROPERTY_CONTRACT_IS_NOT_FOUND);
} }


record.setRentalStartDate(wxPropertyContract.getRentalStartDate());
record.setRentalStartDate(wxRentContract.getRentalStartDate());
record.setRentalEndDate(wxRentContract.getRentalEndDate()); record.setRentalEndDate(wxRentContract.getRentalEndDate());
record.setStartDate(wxRentContract.getStartDate()); record.setStartDate(wxRentContract.getStartDate());
record.setEndDate(wxRentContract.getEndDate()); record.setEndDate(wxRentContract.getEndDate());


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

@@ -7,6 +7,7 @@ import com.iformall.domain.po.WxBillProperty;
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.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.WxPropertyContractService; import com.iformall.service.WxPropertyContractService;
@@ -71,8 +72,12 @@ public class WxRentPropertyContractServiceImpl implements WxRentPropertyContract
wxPropertyContractQuery.setRentContractId(id); wxPropertyContractQuery.setRentContractId(id);
WxPropertyContract propertyContract = wxPropertyContractMapper.selectOne(wxPropertyContractQuery); WxPropertyContract propertyContract = wxPropertyContractMapper.selectOne(wxPropertyContractQuery);
if (propertyContract != null) { if (propertyContract != null) {
Map<String, Object> property = wxPropertyContractService.getById(propertyContract.getId());
data.put("property", property);
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(data);
} }


+ 84
- 94
mallinkService/src/main/resources/mapper/WxBillAllMapper.xml Просмотреть файл

@@ -53,45 +53,37 @@
select id,merchant_id,shop_id,tenant_id,'租金' name,1 bill_type_value,'租金' select id,merchant_id,shop_id,tenant_id,'租金' name,1 bill_type_value,'租金'
bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,''
endtime,rent_shop_type,case when shop_info is null then '[]' else shop_info end shop_info,comments endtime,rent_shop_type,case when shop_info is null then '[]' else shop_info end shop_info,comments
from wx_bill_rent where is_preview = 0
union
from wx_bill_rent where tenant_id=#{tenantId} and is_preview = 0
union all
select id,merchant_id,shop_id,tenant_id,'租赁押金' name,2 bill_type_value,'租赁押金' select id,merchant_id,shop_id,tenant_id,'租赁押金' name,2 bill_type_value,'租赁押金'
bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,''
endtime,rent_shop_type,shop_info,NULL comments from wx_bill_rent_deposit
union
endtime,rent_shop_type,shop_info,NULL comments from wx_bill_rent_deposit where tenant_id=#{tenantId}
union all
select id,merchant_id,shop_id,tenant_id,'物业费' name,3 bill_type_value,'物业费' select id,merchant_id,shop_id,tenant_id,'物业费' name,3 bill_type_value,'物业费'
bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,''
endtime,rent_shop_type,case when shop_info is null then '[]' else shop_info end shop_info,comments endtime,rent_shop_type,case when shop_info is null then '[]' else shop_info end shop_info,comments
from wx_bill_property where is_preview = 0
union
from wx_bill_property where tenant_id=#{tenantId} and is_preview = 0
union all
select id,merchant_id,shop_id,tenant_id,'物业押金' name,4 bill_type_value,'物业押金' select id,merchant_id,shop_id,tenant_id,'物业押金' name,4 bill_type_value,'物业押金'
bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,''
endtime,rent_shop_type,shop_info,NULL comments from wx_bill_property_deposit
union
select id,merchant_id,shop_id,tenant_id,'水费' name,5 bill_type_value,'水费' bill_type,0 as
endtime,rent_shop_type,shop_info,NULL comments from wx_bill_property_deposit where tenant_id=#{tenantId}
union all
select id,merchant_id,shop_id,tenant_id,case when type=1 then '水费' when type=2 then '电费' else '空调费' end name,
case when type=1 then 5 when type=2 then 6 else 9 end bill_type_value,
case when type=1 then '水费' when type=2 then '电费' else '空调费' end bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime, need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime,
rent_shop_type,'[]' shop_info,NULL comments rent_shop_type,'[]' shop_info,NULL comments
from wx_bill_daily where type=1
union
select id,merchant_id,shop_id,tenant_id,'电费' name,6 bill_type_value,'电费' bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime,
rent_shop_type,'[]' shop_info,NULL comments
from wx_bill_daily where type=2
union
select id,merchant_id,shop_id,tenant_id,'空调费' name,9 bill_type_value,'空调费' bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime,
rent_shop_type,'[]' shop_info,NULL comments
from wx_bill_daily where type=3
union
from wx_bill_daily where tenant_id=#{tenantId}
union all
select id,merchant_id,shop_id,tenant_id,name,7 bill_type_value,'其他' bill_type,0 as select id,merchant_id,shop_id,tenant_id,name,7 bill_type_value,'其他' bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime, need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime,
rent_shop_type,'[]' shop_info,comments rent_shop_type,'[]' shop_info,comments
from wx_bill_other
union
from wx_bill_other where tenant_id=#{tenantId}
union all
select id,merchant_id,shop_id,tenant_id,comments as name,8 bill_type_value,'其他押金' bill_type,0 as select id,merchant_id,shop_id,tenant_id,comments as name,8 bill_type_value,'其他押金' bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime, need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime,
rent_shop_type,'[]' shop_info,comments rent_shop_type,'[]' shop_info,comments
from wx_bill_other_deposit
from wx_bill_other_deposit where tenant_id=#{tenantId}
) bill ) bill
left join wx_merchant m on bill.merchant_id=m.id left join wx_merchant m on bill.merchant_id=m.id
left join wx_shop s on bill.shop_id=s.id left join wx_shop s on bill.shop_id=s.id
@@ -130,34 +122,34 @@
select count(bill.id) owncount,IFNULL(sum(bill.owe),0) owe from ( select count(bill.id) owncount,IFNULL(sum(bill.owe),0) owe from (
select id,merchant_id,shop_id,tenant_id,1 bill_type_value,'租金' select id,merchant_id,shop_id,tenant_id,1 bill_type_value,'租金'
bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_rent where is_preview = 0 bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_rent where is_preview = 0
union
union all
select id,merchant_id,shop_id,tenant_id,2 bill_type_value,'租赁押金' select id,merchant_id,shop_id,tenant_id,2 bill_type_value,'租赁押金'
bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from
wx_bill_rent_deposit wx_bill_rent_deposit
union
union all
select id,merchant_id,shop_id,tenant_id,3 bill_type_value,'物业费' select id,merchant_id,shop_id,tenant_id,3 bill_type_value,'物业费'
bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from
wx_bill_property where is_preview = 0 wx_bill_property where is_preview = 0
union
union all
select id,merchant_id,shop_id,tenant_id,4 bill_type_value,'物业押金' select id,merchant_id,shop_id,tenant_id,4 bill_type_value,'物业押金'
bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from
wx_bill_property_deposit wx_bill_property_deposit
union
union all
select id,merchant_id,shop_id,tenant_id,5 bill_type_value,'水费' bill_type,0 as select id,merchant_id,shop_id,tenant_id,5 bill_type_value,'水费' bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_daily where need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_daily where
type=1 type=1
union
union all
select id,merchant_id,shop_id,tenant_id,6 bill_type_value,'电费' bill_type,0 as select id,merchant_id,shop_id,tenant_id,6 bill_type_value,'电费' bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_daily where need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_daily where
type=2 type=2
union
union all
select id,merchant_id,shop_id,tenant_id,9 bill_type_value,'空调费' bill_type,0 as select id,merchant_id,shop_id,tenant_id,9 bill_type_value,'空调费' bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_daily where need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_daily where
type=3 type=3
union
union all
select id,merchant_id,shop_id,tenant_id,7 bill_type_value,'其他' bill_type,0 as select id,merchant_id,shop_id,tenant_id,7 bill_type_value,'其他' bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_other need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_other
union
union all
select id,merchant_id,shop_id,tenant_id,8 bill_type_value,'其他押金' bill_type,0 as select id,merchant_id,shop_id,tenant_id,8 bill_type_value,'其他押金' bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_other_deposit need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_other_deposit
) bill ) bill
@@ -185,34 +177,34 @@
select count(bill.id) paycount,IFNULL(sum(bill.pay),0) pay from ( select count(bill.id) paycount,IFNULL(sum(bill.pay),0) pay from (
select id,merchant_id,shop_id,tenant_id,1 bill_type_value,'租金' select id,merchant_id,shop_id,tenant_id,1 bill_type_value,'租金'
bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_rent where is_preview = 0 bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_rent where is_preview = 0
union
union all
select id,merchant_id,shop_id,tenant_id,2 bill_type_value,'租赁押金' select id,merchant_id,shop_id,tenant_id,2 bill_type_value,'租赁押金'
bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from
wx_bill_rent_deposit wx_bill_rent_deposit
union
union all
select id,merchant_id,shop_id,tenant_id,3 bill_type_value,'物业费' select id,merchant_id,shop_id,tenant_id,3 bill_type_value,'物业费'
bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from
wx_bill_property where is_preview = 0 wx_bill_property where is_preview = 0
union
union all
select id,merchant_id,shop_id,tenant_id,4 bill_type_value,'物业押金' select id,merchant_id,shop_id,tenant_id,4 bill_type_value,'物业押金'
bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from
wx_bill_property_deposit wx_bill_property_deposit
union
union all
select id,merchant_id,shop_id,tenant_id,5 bill_type_value,'水费' bill_type,0 as select id,merchant_id,shop_id,tenant_id,5 bill_type_value,'水费' bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_daily where need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_daily where
type=1 type=1
union
union all
select id,merchant_id,shop_id,tenant_id,6 bill_type_value,'电费' bill_type,0 as select id,merchant_id,shop_id,tenant_id,6 bill_type_value,'电费' bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_daily where need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_daily where
type=2 type=2
union
union all
select id,merchant_id,shop_id,tenant_id,9 bill_type_value,'空调费' bill_type,0 as select id,merchant_id,shop_id,tenant_id,9 bill_type_value,'空调费' bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_daily where need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_daily where
type=3 type=3
union
union all
select id,merchant_id,shop_id,tenant_id,7 bill_type_value,'其他' bill_type,0 as select id,merchant_id,shop_id,tenant_id,7 bill_type_value,'其他' bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_other need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_other
union
union all
select id,merchant_id,shop_id,tenant_id,8 bill_type_value,'其他押金' bill_type,0 as select id,merchant_id,shop_id,tenant_id,8 bill_type_value,'其他押金' bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_other_deposit need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,rent_shop_type from wx_bill_other_deposit
) bill ) bill
@@ -237,42 +229,40 @@
rentShopType from ( rentShopType from (
select id,merchant_id,shop_id,tenant_id,'租金' name,1 bill_type_value,'租金' select id,merchant_id,shop_id,tenant_id,'租金' name,1 bill_type_value,'租金'
bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,endtime,rent_shop_type bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,endtime,rent_shop_type
from wx_bill_rent where is_preview = 0 and rent_contract_id in (select id from wx_rent_contract where status in
from wx_bill_rent where is_preview = 0 and tenant_id=#{tenantId}and rent_contract_id in (select id from
wx_rent_contract where status in
(2,3,4)) (2,3,4))
union
union all
select id,merchant_id,shop_id,tenant_id,'租赁押金' name,2 bill_type_value,'租赁押金' select id,merchant_id,shop_id,tenant_id,'租赁押金' name,2 bill_type_value,'租赁押金'
bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,endtime,rent_shop_type bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,endtime,rent_shop_type
from wx_bill_rent_deposit where rent_contract_id in (select id from wx_rent_contract where status in (2,3,4))
union
from wx_bill_rent_deposit where tenant_id=#{tenantId} and rent_contract_id in (select id from wx_rent_contract
where status in (2,3,4))
union all
select id,merchant_id,shop_id,tenant_id,'物业费' name,3 bill_type_value,'物业费' select id,merchant_id,shop_id,tenant_id,'物业费' name,3 bill_type_value,'物业费'
bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,endtime,rent_shop_type bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,endtime,rent_shop_type
from wx_bill_property where is_preview = 0 and property_contract_id in (select id from wx_property_contract
from wx_bill_property where is_preview = 0 and tenant_id=#{tenantId} and property_contract_id in (select id from
wx_property_contract
where status in(2,3,4)) where status in(2,3,4))
union
union all
select id,merchant_id,shop_id,tenant_id,'物业押金' name,4 bill_type_value,'物业押金' select id,merchant_id,shop_id,tenant_id,'物业押金' name,4 bill_type_value,'物业押金'
bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,endtime,rent_shop_type bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,endtime,rent_shop_type
from wx_bill_property_deposit where property_contract_id in (select id from wx_property_contract where status in
from wx_bill_property_deposit where tenant_id=#{tenantId} and property_contract_id in (select id from
wx_property_contract where status in
(2,3,4)) (2,3,4))
union
select id,merchant_id,shop_id,tenant_id,'水费' name,5 bill_type_value,'水费' bill_type, 0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type
from wx_bill_daily where type=1
union
select id,merchant_id,shop_id,tenant_id,'电费' name,6 bill_type_value,'电费' bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type
from wx_bill_daily where type=2
union
select id,merchant_id,shop_id,tenant_id,'空调费' name,9 bill_type_value,'空调费' bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type
from wx_bill_daily where type=3
union
union all
select id,merchant_id,shop_id,tenant_id,case when type=1 then '水费' when type=2 then '电费' else '空调费' end name,
case when type=1 then 5 when type=2 then 6 else 9 end bill_type_value,
case when type=1 then '水费' when type=2 then '电费' else '空调费' end bill_type, 0 as need_pay,receive_pay,
pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type
from wx_bill_daily where tenant_id=#{tenantId}
union all
select id,merchant_id,shop_id,tenant_id,name,7 bill_type_vaue,'其他' bill_type,0 as select id,merchant_id,shop_id,tenant_id,name,7 bill_type_vaue,'其他' bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type
from wx_bill_other
union
from wx_bill_other where tenant_id=#{tenantId}
union all
select id,merchant_id,shop_id,tenant_id,comments as name,8 bill_type_value,'其他押金' bill_type,0 as select id,merchant_id,shop_id,tenant_id,comments as name,8 bill_type_value,'其他押金' bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type
from wx_bill_other_deposit
from wx_bill_other_deposit where tenant_id=#{tenantId}
) bill ) bill
left join wx_merchant m on bill.merchant_id=m.id left join wx_merchant m on bill.merchant_id=m.id
left join wx_shop s on bill.shop_id=s.id left join wx_shop s on bill.shop_id=s.id
@@ -323,35 +313,35 @@
select id,merchant_id,shop_id,tenant_id,'租金' name,1 bill_type_value,'租金' select id,merchant_id,shop_id,tenant_id,'租金' name,1 bill_type_value,'租金'
bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,''
endtime,rent_shop_type from wx_bill_rent where is_preview = 0 endtime,rent_shop_type from wx_bill_rent where is_preview = 0
union
union all
select id,merchant_id,shop_id,tenant_id,'租赁押金' name,2 bill_type_value,'租赁押金' select id,merchant_id,shop_id,tenant_id,'租赁押金' name,2 bill_type_value,'租赁押金'
bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,''
endtime,rent_shop_type from wx_bill_rent_deposit endtime,rent_shop_type from wx_bill_rent_deposit
union
union all
select id,merchant_id,shop_id,tenant_id,'物业费' name,3 bill_type_value,'物业费' select id,merchant_id,shop_id,tenant_id,'物业费' name,3 bill_type_value,'物业费'
bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,''
endtime,rent_shop_type from wx_bill_property where is_preview = 0 endtime,rent_shop_type from wx_bill_property where is_preview = 0
union
union all
select id,merchant_id,shop_id,tenant_id,'物业押金' name,4 bill_type_value,'物业押金' select id,merchant_id,shop_id,tenant_id,'物业押金' name,4 bill_type_value,'物业押金'
bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,''
endtime,rent_shop_type from wx_bill_property_deposit endtime,rent_shop_type from wx_bill_property_deposit
union
union all
select id,merchant_id,shop_id,tenant_id,'水费' name,5 bill_type_value,'水费' bill_type,0 as select id,merchant_id,shop_id,tenant_id,'水费' name,5 bill_type_value,'水费' bill_type,0 as
need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type
from wx_bill_daily where type=1 from wx_bill_daily where type=1
union
union all
select id,merchant_id,shop_id,tenant_id,'电费' name,6 bill_type_value,'电费' bill_type,0 as select id,merchant_id,shop_id,tenant_id,'电费' name,6 bill_type_value,'电费' bill_type,0 as
need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type
from wx_bill_daily where type=2 from wx_bill_daily where type=2
union
union all
select id,merchant_id,shop_id,tenant_id,'空调费' name,9 bill_type_value,'空调费' bill_type,0 as select id,merchant_id,shop_id,tenant_id,'空调费' name,9 bill_type_value,'空调费' bill_type,0 as
need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type
from wx_bill_daily where type=3 from wx_bill_daily where type=3
union
union all
select id,merchant_id,shop_id,tenant_id,name,7 bill_type_value,'其他' bill_type,0 as select id,merchant_id,shop_id,tenant_id,name,7 bill_type_value,'其他' bill_type,0 as
need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type
from wx_bill_other from wx_bill_other
union
union all
select id,merchant_id,shop_id,tenant_id,name,8 bill_type_value,'其他押金' bill_type,0 as select id,merchant_id,shop_id,tenant_id,name,8 bill_type_value,'其他押金' bill_type,0 as
need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type
from wx_bill_other_deposit from wx_bill_other_deposit
@@ -370,35 +360,35 @@
select id,merchant_id,shop_id,tenant_id,'租金' name,1 bill_type_value,'租金' select id,merchant_id,shop_id,tenant_id,'租金' name,1 bill_type_value,'租金'
bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,''
endtime,rent_shop_type from wx_bill_rent where is_preview = 0 endtime,rent_shop_type from wx_bill_rent where is_preview = 0
union
union all
select id,merchant_id,shop_id,tenant_id,'租赁押金' name,2 bill_type_value,'租赁押金' select id,merchant_id,shop_id,tenant_id,'租赁押金' name,2 bill_type_value,'租赁押金'
bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,''
endtime,rent_shop_type from wx_bill_rent_deposit endtime,rent_shop_type from wx_bill_rent_deposit
union
union all
select id,merchant_id,shop_id,tenant_id,'物业费' name,3 bill_type_value,'物业费' select id,merchant_id,shop_id,tenant_id,'物业费' name,3 bill_type_value,'物业费'
bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,''
endtime,rent_shop_type from wx_bill_property where is_preview = 0 endtime,rent_shop_type from wx_bill_property where is_preview = 0
union
union all
select id,merchant_id,shop_id,tenant_id,'物业押金' name,4 bill_type_value,'物业押金' select id,merchant_id,shop_id,tenant_id,'物业押金' name,4 bill_type_value,'物业押金'
bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,''
endtime,rent_shop_type from wx_bill_property_deposit endtime,rent_shop_type from wx_bill_property_deposit
union
union all
select id,merchant_id,shop_id,tenant_id,'水费' name,5 bill_type_value,'水费' bill_type,0 as select id,merchant_id,shop_id,tenant_id,'水费' name,5 bill_type_value,'水费' bill_type,0 as
need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type
from wx_bill_daily where type=1 from wx_bill_daily where type=1
union
union all
select id,merchant_id,shop_id,tenant_id,'电费' name,6 bill_type_value,'电费' bill_type,0 as select id,merchant_id,shop_id,tenant_id,'电费' name,6 bill_type_value,'电费' bill_type,0 as
need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type
from wx_bill_daily where type=2 from wx_bill_daily where type=2
union
union all
select id,merchant_id,shop_id,tenant_id,'空调费' name,9 bill_type_value,'空调费' bill_type,0 as select id,merchant_id,shop_id,tenant_id,'空调费' name,9 bill_type_value,'空调费' bill_type,0 as
need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type
from wx_bill_daily where type=3 from wx_bill_daily where type=3
union
union all
select id,merchant_id,shop_id,tenant_id,name,7 bill_type_value,'其他' bill_type,0 as select id,merchant_id,shop_id,tenant_id,name,7 bill_type_value,'其他' bill_type,0 as
need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type
from wx_bill_other from wx_bill_other
union
union all
select id,merchant_id,shop_id,tenant_id,name,8 bill_type_value,'其他押金' bill_type,0 as select id,merchant_id,shop_id,tenant_id,name,8 bill_type_value,'其他押金' bill_type,0 as
need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type
from wx_bill_other_deposit from wx_bill_other_deposit
@@ -417,11 +407,11 @@
select id,merchant_id,shop_id,tenant_id,'租金' name,1 bill_type_value,'租金' select id,merchant_id,shop_id,tenant_id,'租金' name,1 bill_type_value,'租金'
bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,''
endtime,rent_shop_type from wx_bill_rent where is_preview = 0 endtime,rent_shop_type from wx_bill_rent where is_preview = 0
union
union all
select id,merchant_id,shop_id,tenant_id,'租赁押金' name,2 bill_type_value,'租赁押金' select id,merchant_id,shop_id,tenant_id,'租赁押金' name,2 bill_type_value,'租赁押金'
bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,''
endtime,rent_shop_type from wx_bill_rent_deposit endtime,rent_shop_type from wx_bill_rent_deposit
union
union all
select id,merchant_id,shop_id,tenant_id,'物业费' name,3 bill_type_value,'物业费' select id,merchant_id,shop_id,tenant_id,'物业费' name,3 bill_type_value,'物业费'
bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,''
endtime,rent_shop_type from wx_bill_property where is_preview = 0 endtime,rent_shop_type from wx_bill_property where is_preview = 0
@@ -429,23 +419,23 @@
select id,merchant_id,shop_id,tenant_id,'物业押金' name,4 bill_type_value,'物业押金' select id,merchant_id,shop_id,tenant_id,'物业押金' name,4 bill_type_value,'物业押金'
bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,''
endtime,rent_shop_type from wx_bill_property_deposit endtime,rent_shop_type from wx_bill_property_deposit
union
union all
select id,merchant_id,shop_id,tenant_id,'水费' name,5 bill_type_value,'水费' bill_type,0 as select id,merchant_id,shop_id,tenant_id,'水费' name,5 bill_type_value,'水费' bill_type,0 as
need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type
from wx_bill_daily where type=1 from wx_bill_daily where type=1
union
union all
select id,merchant_id,shop_id,tenant_id,'电费' name,6 bill_type_value,'电费' bill_type,0 as select id,merchant_id,shop_id,tenant_id,'电费' name,6 bill_type_value,'电费' bill_type,0 as
need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type
from wx_bill_daily where type=2 from wx_bill_daily where type=2
union
union all
select id,merchant_id,shop_id,tenant_id,'空调费' name,9 bill_type_value,'空调费' bill_type,0 as select id,merchant_id,shop_id,tenant_id,'空调费' name,9 bill_type_value,'空调费' bill_type,0 as
need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type
from wx_bill_daily where type=3 from wx_bill_daily where type=3
union
union all
select id,merchant_id,shop_id,tenant_id,name,7 bill_type_value,'其他' bill_type,0 as select id,merchant_id,shop_id,tenant_id,name,7 bill_type_value,'其他' bill_type,0 as
need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type
from wx_bill_other from wx_bill_other
union
union all
select id,merchant_id,shop_id,tenant_id,name,8 bill_type_value,'其他押金' bill_type,0 as select id,merchant_id,shop_id,tenant_id,name,8 bill_type_value,'其他押金' bill_type,0 as
need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type
from wx_bill_other_deposit from wx_bill_other_deposit
@@ -468,35 +458,35 @@
select id,merchant_id,shop_id,tenant_id,'租金' name,1 bill_type_value,'租金' select id,merchant_id,shop_id,tenant_id,'租金' name,1 bill_type_value,'租金'
bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,''
endtime,rent_shop_type from wx_bill_rent where is_preview = 0 endtime,rent_shop_type from wx_bill_rent where is_preview = 0
union
union all
select id,merchant_id,shop_id,tenant_id,'租赁押金' name,2 bill_type_value,'租赁押金' select id,merchant_id,shop_id,tenant_id,'租赁押金' name,2 bill_type_value,'租赁押金'
bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,''
endtime,rent_shop_type from wx_bill_rent_deposit endtime,rent_shop_type from wx_bill_rent_deposit
union
union all
select id,merchant_id,shop_id,tenant_id,'物业费' name,3 bill_type_value,'物业费' select id,merchant_id,shop_id,tenant_id,'物业费' name,3 bill_type_value,'物业费'
bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,''
endtime,rent_shop_type from wx_bill_property where is_preview = 0 endtime,rent_shop_type from wx_bill_property where is_preview = 0
union
union all
select id,merchant_id,shop_id,tenant_id,'物业押金' name,4 bill_type_value,'物业押金' select id,merchant_id,shop_id,tenant_id,'物业押金' name,4 bill_type_value,'物业押金'
bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,''
endtime,rent_shop_type from wx_bill_property_deposit endtime,rent_shop_type from wx_bill_property_deposit
union
union all
select id,merchant_id,shop_id,tenant_id,'水费' name,5 bill_type_value,'水费' bill_type,0 as select id,merchant_id,shop_id,tenant_id,'水费' name,5 bill_type_value,'水费' bill_type,0 as
need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type
from wx_bill_daily where type=1 from wx_bill_daily where type=1
union
union all
select id,merchant_id,shop_id,tenant_id,'电费' name,6 bill_type_value,'电费' bill_type,0 as select id,merchant_id,shop_id,tenant_id,'电费' name,6 bill_type_value,'电费' bill_type,0 as
need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type
from wx_bill_daily where type=2 from wx_bill_daily where type=2
union
union all
select id,merchant_id,shop_id,tenant_id,'空调费' name,9 bill_type_value,'空调费' bill_type,0 as select id,merchant_id,shop_id,tenant_id,'空调费' name,9 bill_type_value,'空调费' bill_type,0 as
need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type
from wx_bill_daily where type=3 from wx_bill_daily where type=3
union
union all
select id,merchant_id,shop_id,tenant_id,name,7 bill_type_value,'其他' bill_type,0 as select id,merchant_id,shop_id,tenant_id,name,7 bill_type_value,'其他' bill_type,0 as
need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type
from wx_bill_other from wx_bill_other
union
union all
select id,merchant_id,shop_id,tenant_id,name,8 bill_type_value,'其他押金' bill_type,0 as select id,merchant_id,shop_id,tenant_id,name,8 bill_type_value,'其他押金' bill_type,0 as
need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type
from wx_bill_other_deposit from wx_bill_other_deposit


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