修复:1>在线打款、上传批量打款;2>创建项目
This commit is contained in:
@ -0,0 +1,46 @@
|
|||||||
|
package org.dromara.payment.invoice.domain.vo;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.dromara.payment.invoice.domain.MerInvoiceType;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发票类目视图对象 mer_invoice_type
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2024-05-06
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
@AutoMapper(target = MerInvoiceType.class)
|
||||||
|
public class MerchantProductMerInvoiceItemVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "主键")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务类型
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "任务类型")
|
||||||
|
private String items;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开票类目
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "开票类目")
|
||||||
|
private String ids;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -8,6 +8,8 @@ import lombok.RequiredArgsConstructor;
|
|||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import jakarta.validation.constraints.*;
|
import jakarta.validation.constraints.*;
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import org.dromara.payment.invoice.domain.vo.MerInvoiceTypeVo;
|
||||||
|
import org.dromara.payment.invoice.domain.vo.MerchantProductMerInvoiceItemVo;
|
||||||
import org.dromara.payment.sys.domain.bo.SysSydProductBo;
|
import org.dromara.payment.sys.domain.bo.SysSydProductBo;
|
||||||
import org.dromara.payment.sys.domain.vo.SysSydProductVo;
|
import org.dromara.payment.sys.domain.vo.SysSydProductVo;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@ -112,4 +114,13 @@ public class BusMerchantProductController extends BaseController {
|
|||||||
@PathVariable Long[] ids) {
|
@PathVariable Long[] ids) {
|
||||||
return toAjax(busMerchantProductService.deleteWithValidByIds(List.of(ids), true));
|
return toAjax(busMerchantProductService.deleteWithValidByIds(List.of(ids), true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询商户商品开票类目
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/invoiceItemlist")
|
||||||
|
public List<MerchantProductMerInvoiceItemVo> invoiceItemlist() {
|
||||||
|
return busMerchantProductService.invoiceItemlist();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -140,6 +140,7 @@ public class BusMerchantProduct extends BaseEntity {
|
|||||||
* 开票类目名称
|
* 开票类目名称
|
||||||
*/
|
*/
|
||||||
private String invoiceItems;
|
private String invoiceItems;
|
||||||
|
private String invoiceIds;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 状态(1:上架 2:下架)
|
* 状态(1:上架 2:下架)
|
||||||
|
|||||||
@ -151,6 +151,7 @@ public class BusMerchantProductBo extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
// @NotBlank(message = "开票类目名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
// @NotBlank(message = "开票类目名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
private String invoiceItems;
|
private String invoiceItems;
|
||||||
|
private String invoiceIds;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 状态(1:上架 2:下架)
|
* 状态(1:上架 2:下架)
|
||||||
|
|||||||
@ -172,6 +172,7 @@ public class BusMerchantProductVo implements Serializable {
|
|||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "开票类目名称")
|
@ExcelProperty(value = "开票类目名称")
|
||||||
private String invoiceItems;
|
private String invoiceItems;
|
||||||
|
private String invoiceIds;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 状态(1:上架 2:下架)
|
* 状态(1:上架 2:下架)
|
||||||
|
|||||||
@ -1,10 +1,13 @@
|
|||||||
package org.dromara.payment.merchant.mapper;
|
package org.dromara.payment.merchant.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.dromara.payment.invoice.domain.vo.MerInvoiceTypeVo;
|
||||||
|
import org.dromara.payment.invoice.domain.vo.MerchantProductMerInvoiceItemVo;
|
||||||
import org.dromara.payment.merchant.domain.BusMerchant;
|
import org.dromara.payment.merchant.domain.BusMerchant;
|
||||||
import org.dromara.payment.merchant.domain.BusMerchantProduct;
|
import org.dromara.payment.merchant.domain.BusMerchantProduct;
|
||||||
import org.dromara.payment.merchant.domain.bo.BusMerchantBo;
|
import org.dromara.payment.merchant.domain.bo.BusMerchantBo;
|
||||||
@ -65,4 +68,5 @@ public interface BusMerchantProductMapper extends BaseMapperPlus<BusMerchantProd
|
|||||||
*/
|
*/
|
||||||
int updateMerProInfosService();
|
int updateMerProInfosService();
|
||||||
|
|
||||||
|
List<MerchantProductMerInvoiceItemVo> invoiceItemlist(@Param(Constants.WRAPPER)Wrapper wrapper);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
package org.dromara.payment.merchant.service;
|
package org.dromara.payment.merchant.service;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import org.dromara.payment.invoice.domain.vo.MerInvoiceTypeVo;
|
||||||
|
import org.dromara.payment.invoice.domain.vo.MerchantProductMerInvoiceItemVo;
|
||||||
import org.dromara.payment.merchant.domain.BusMerchantProduct;
|
import org.dromara.payment.merchant.domain.BusMerchantProduct;
|
||||||
import org.dromara.payment.merchant.domain.vo.BusMerchantProductVo;
|
import org.dromara.payment.merchant.domain.vo.BusMerchantProductVo;
|
||||||
import org.dromara.payment.merchant.domain.bo.BusMerchantProductBo;
|
import org.dromara.payment.merchant.domain.bo.BusMerchantProductBo;
|
||||||
@ -48,4 +50,6 @@ public interface IBusMerchantProductService {
|
|||||||
* 校验并批量删除商户产品表信息
|
* 校验并批量删除商户产品表信息
|
||||||
*/
|
*/
|
||||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
|
||||||
|
List<MerchantProductMerInvoiceItemVo> invoiceItemlist();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,6 +21,10 @@ import org.dromara.common.satoken.utils.LoginHelper;
|
|||||||
import org.dromara.payment.bill.domain.MerBill;
|
import org.dromara.payment.bill.domain.MerBill;
|
||||||
import org.dromara.payment.channel.domain.vo.BusChannelProductVo;
|
import org.dromara.payment.channel.domain.vo.BusChannelProductVo;
|
||||||
import org.dromara.payment.channel.mapper.BusChannelProductMapper;
|
import org.dromara.payment.channel.mapper.BusChannelProductMapper;
|
||||||
|
import org.dromara.payment.invoice.domain.MerInvoiceType;
|
||||||
|
import org.dromara.payment.invoice.domain.vo.MerInvoiceTypeVo;
|
||||||
|
import org.dromara.payment.invoice.domain.vo.MerchantProductMerInvoiceItemVo;
|
||||||
|
import org.dromara.payment.invoice.mapper.MerInvoiceTypeMapper;
|
||||||
import org.dromara.payment.merchant.domain.BusMerchant;
|
import org.dromara.payment.merchant.domain.BusMerchant;
|
||||||
import org.dromara.payment.merchant.mapper.BusMerchantMapper;
|
import org.dromara.payment.merchant.mapper.BusMerchantMapper;
|
||||||
import org.dromara.payment.operator.domain.BusOperatorProduct;
|
import org.dromara.payment.operator.domain.BusOperatorProduct;
|
||||||
@ -66,6 +70,7 @@ public class BusMerchantProductServiceImpl extends BaseService implements IBusMe
|
|||||||
private final SysSydMapper sydMapper;
|
private final SysSydMapper sydMapper;
|
||||||
|
|
||||||
private final SysThirdPlatformMapper thirdPlatformMapper;
|
private final SysThirdPlatformMapper thirdPlatformMapper;
|
||||||
|
private final MerInvoiceTypeMapper merInvoiceTypeMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询商户产品表
|
* 查询商户产品表
|
||||||
@ -241,6 +246,24 @@ public class BusMerchantProductServiceImpl extends BaseService implements IBusMe
|
|||||||
}
|
}
|
||||||
vo.setBusType(bus_type);
|
vo.setBusType(bus_type);
|
||||||
vo.setMerId(mer_id);
|
vo.setMerId(mer_id);
|
||||||
|
//设置开票项目
|
||||||
|
String invoiceItemsStr = vo.getInvoiceItems();
|
||||||
|
int[] invoiceIds = Arrays.stream(invoiceItemsStr.replaceAll("[\\[\\]\\s]", "").split(","))
|
||||||
|
.mapToInt(Integer::parseInt)
|
||||||
|
.toArray();
|
||||||
|
StringBuffer invoiceItemsBuffer = new StringBuffer();
|
||||||
|
StringBuffer invoiceIdsBuffer = new StringBuffer();
|
||||||
|
for (int i = 0; i < invoiceIds.length; i++) {
|
||||||
|
MerInvoiceType merInvoiceType = merInvoiceTypeMapper.selectById(invoiceIds[i]);
|
||||||
|
if(invoiceItemsBuffer.length() != 0){
|
||||||
|
invoiceItemsBuffer.append(",");
|
||||||
|
invoiceIdsBuffer.append(",");
|
||||||
|
}
|
||||||
|
invoiceItemsBuffer.append(merInvoiceType.getType());
|
||||||
|
invoiceIdsBuffer.append(merInvoiceType.getId());
|
||||||
|
}
|
||||||
|
vo.setInvoiceItems(invoiceItemsBuffer.toString());
|
||||||
|
vo.setInvoiceIds(invoiceIdsBuffer.toString());
|
||||||
if(vo.getId() != null){
|
if(vo.getId() != null){
|
||||||
vo.setMdyServiceCharge(vo.getServiceCharge());
|
vo.setMdyServiceCharge(vo.getServiceCharge());
|
||||||
BusMerchantProduct busMerchantProduct = this.baseMapper.selectById(vo.getId());
|
BusMerchantProduct busMerchantProduct = this.baseMapper.selectById(vo.getId());
|
||||||
@ -284,4 +307,12 @@ public class BusMerchantProductServiceImpl extends BaseService implements IBusMe
|
|||||||
}
|
}
|
||||||
return baseMapper.deleteBatchIds(ids) > 0;
|
return baseMapper.deleteBatchIds(ids) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<MerchantProductMerInvoiceItemVo> invoiceItemlist() {
|
||||||
|
QueryWrapper<BusMerchantProduct> lqw = Wrappers.query();
|
||||||
|
lqw.eq("t.mer_id",LoginHelper.getBusId());
|
||||||
|
lqw.eq("t.pro_status",1);
|
||||||
|
return baseMapper.invoiceItemlist(lqw);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -83,9 +83,9 @@ public class BusMerchantServiceImpl extends BaseService implements IBusMerchantS
|
|||||||
QueryWrapper<BusMerchant> lqw = Wrappers.query();
|
QueryWrapper<BusMerchant> lqw = Wrappers.query();
|
||||||
if (!LoginHelper.isSuperAdmin()){
|
if (!LoginHelper.isSuperAdmin()){
|
||||||
lqw.like(StringUtils.isNotEmpty(bo.getScaleName()),"s.name",bo.getScaleName());
|
lqw.like(StringUtils.isNotEmpty(bo.getScaleName()),"s.name",bo.getScaleName());
|
||||||
if(bo.getIsProduct() != null && bo.getIsProduct() == 1){
|
// if(bo.getIsProduct() != null && bo.getIsProduct() == 1){
|
||||||
lqw.eq("t.create_unit_id",LoginHelper.getBusId());
|
// lqw.eq("t.create_unit_id",LoginHelper.getBusId());
|
||||||
}
|
// }
|
||||||
int busRole = LoginHelper.getBusRole();
|
int busRole = LoginHelper.getBusRole();
|
||||||
if(busRole == BusRole.SERVICE.getId()){
|
if(busRole == BusRole.SERVICE.getId()){
|
||||||
lqw.inSql("t.id","select distinct mer_id from bus_merchant_product tt where tt.syd_id ="+LoginHelper.getBusId());
|
lqw.inSql("t.id","select distinct mer_id from bus_merchant_product tt where tt.syd_id ="+LoginHelper.getBusId());
|
||||||
|
|||||||
@ -270,4 +270,7 @@ public class MerTask extends BaseEntity {
|
|||||||
private Long ossId;
|
private Long ossId;
|
||||||
|
|
||||||
private String url;
|
private String url;
|
||||||
|
private String invoiceItems;
|
||||||
|
private String invoiceIds;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -286,4 +286,6 @@ public class MerTaskBo extends BaseEntity {
|
|||||||
private Long ossId;
|
private Long ossId;
|
||||||
|
|
||||||
private String url;
|
private String url;
|
||||||
|
private String invoiceItems;
|
||||||
|
private String invoiceIds;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -337,5 +337,7 @@ public class MerTaskVo implements Serializable {
|
|||||||
private Long ossId;
|
private Long ossId;
|
||||||
|
|
||||||
private String url;
|
private String url;
|
||||||
|
private String invoiceItems;
|
||||||
|
private String invoiceIds;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,7 +23,8 @@
|
|||||||
t1.invoice_items,
|
t1.invoice_items,
|
||||||
t2.pro_status,
|
t2.pro_status,
|
||||||
t4.id syd_id,
|
t4.id syd_id,
|
||||||
t4.NO syd_no
|
t4.NO syd_no,
|
||||||
|
t2.invoice_ids
|
||||||
FROM
|
FROM
|
||||||
bus_channel_product t1
|
bus_channel_product t1
|
||||||
|
|
||||||
|
|||||||
@ -84,4 +84,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
update bus_merchant_product set service_charge = mdy_service_charge where service_charge != mdy_service_charge and mdy_service_charge is not null
|
update bus_merchant_product set service_charge = mdy_service_charge where service_charge != mdy_service_charge and mdy_service_charge is not null
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<select id="invoiceItemlist" resultType="org.dromara.payment.invoice.domain.vo.MerchantProductMerInvoiceItemVo" >
|
||||||
|
SELECT
|
||||||
|
t.id,
|
||||||
|
t.invoice_items as items,
|
||||||
|
t.invoice_ids as ids
|
||||||
|
FROM bus_merchant_product t
|
||||||
|
|
||||||
|
${ew.getCustomSqlSegment}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -23,7 +23,8 @@
|
|||||||
t1.invoice_items,
|
t1.invoice_items,
|
||||||
t2.pro_status,
|
t2.pro_status,
|
||||||
t4.id syd_id,
|
t4.id syd_id,
|
||||||
t4.NO syd_no
|
t4.NO syd_no,
|
||||||
|
t2.invoice_ids
|
||||||
FROM
|
FROM
|
||||||
bus_operator_product t1
|
bus_operator_product t1
|
||||||
|
|
||||||
|
|||||||
@ -29,7 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
mer_task.add_time, mer_task.add_by, mer_task.editer, mer_task.edit_time, mer_task.frozen_amount, mer_task.rel_amount, mer_task.rel_amount_time, mer_task.invoice_amount,
|
mer_task.add_time, mer_task.add_by, mer_task.editer, mer_task.edit_time, mer_task.frozen_amount, mer_task.rel_amount, mer_task.rel_amount_time, mer_task.invoice_amount,
|
||||||
mer_task.is_out, mer_task.syd_id, mer_task.syd_no, mer_task.bus_type, mer_task.op_no, mer_task.op_id, mer_task.channel_id, mer_task.channel_no, mer_task.channel_code, mer_task.mer_id, mer_task.mer_no,
|
mer_task.is_out, mer_task.syd_id, mer_task.syd_no, mer_task.bus_type, mer_task.op_no, mer_task.op_id, mer_task.channel_id, mer_task.channel_no, mer_task.channel_code, mer_task.mer_id, mer_task.mer_no,
|
||||||
mer_task.syd_verify_status, mer_task.syd_verify_time, mer_task.syd_verify_by, mer_task.syd_verify_reason, mer_task.create_dept, mer_task.create_by,
|
mer_task.syd_verify_status, mer_task.syd_verify_time, mer_task.syd_verify_by, mer_task.syd_verify_reason, mer_task.create_dept, mer_task.create_by,
|
||||||
mer_task.create_time, mer_task.update_by, mer_task.update_time,bus_operator.name op_name
|
mer_task.create_time, mer_task.update_by, mer_task.update_time,bus_operator.name op_name,mer_task.invoice_items as invoiceItems,mer_task.invoice_ids as invoiceIds
|
||||||
from mer_task
|
from mer_task
|
||||||
left join sys_syd on mer_task.syd_id = sys_syd.id
|
left join sys_syd on mer_task.syd_id = sys_syd.id
|
||||||
left join bus_merchant on bus_merchant.id = mer_task.mer_id
|
left join bus_merchant on bus_merchant.id = mer_task.mer_id
|
||||||
|
|||||||
Reference in New Issue
Block a user