实物详情添加姓名和商品名称数量

This commit is contained in:
wuchunlei
2026-02-09 14:11:43 +08:00
parent 5ca6e210c4
commit 84183ee596
10 changed files with 269 additions and 2 deletions

View File

@@ -464,7 +464,7 @@ public class StatisticsController {
Row row = sheet.createRow(cell);
int q=0;
for (Map.Entry<String,Object> m:map.entrySet()){
row.createCell(q).setCellValue(m.getValue().toString());
row.createCell(q).setCellValue(m.getValue()==null?"":m.getValue().toString());
q++;
}
//序号自增

View File

@@ -0,0 +1,20 @@
package com.zmzm.finance.common.dao;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zmzm.finance.common.entity.TCustomerApplyCurriculum;
import org.apache.ibatis.annotations.Mapper;
/**
* <p>
* Mapper 接口
* </p>
*
* @author baomidou
* @since 2026-01-19
*/
@Mapper
@DS("yljk")
public interface TCustomerApplyCurriculumMapper extends BaseMapper<TCustomerApplyCurriculum> {
}

View File

@@ -0,0 +1,20 @@
package com.zmzm.finance.common.dao;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zmzm.finance.common.entity.TCustomerCommodityOrder;
import org.apache.ibatis.annotations.Mapper;
/**
* <p>
* Mapper 接口
* </p>
*
* @author baomidou
* @since 2026-02-09
*/
@Mapper
@DS("yljk")
public interface TCustomerCommodityOrderMapper extends BaseMapper<TCustomerCommodityOrder> {
}

View File

@@ -0,0 +1,62 @@
package com.zmzm.finance.common.entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
/**
* <p>
*
* </p>
*
* @author baomidou
* @since 2026-01-19
*/
@Getter
@Setter
@ToString
@TableName("t_customer_apply_curriculum")
public class TCustomerApplyCurriculum implements Serializable {
private static final long serialVersionUID = 1L;
@TableId("oid")
private String oid;
private String description;
private Date invaliddate;
private Boolean valid;
private Integer version;
private Date createdate;
private String curriculumid;
private String paymode;
private Integer point;
private BigDecimal money;
private String invitecode;
private String status;
private String curriculumoid;
private String customeroid;
private Integer coupon;
private Integer coursecoupon;
}

View File

@@ -0,0 +1,76 @@
package com.zmzm.finance.common.entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
/**
* <p>
*
* </p>
*
* @author baomidou
* @since 2026-02-09
*/
@Getter
@Setter
@ToString
@TableName("t_customer_commodity_order")
public class TCustomerCommodityOrder implements Serializable {
private static final long serialVersionUID = 1L;
@TableId("oid")
private String oid;
private String description;
private Date invaliddate;
private Boolean valid;
private Integer version;
private Date createdate;
private String orderid;
private String paymode;
private Integer point;
private BigDecimal money;
private BigDecimal totalprice;
private BigDecimal freight;
private String consignee;
private String phone;
private String addressinfo;
private String payway;
private String receiptflg;
private String receipt;
private String remark;
private String expressid;
private String expressdetail;
private String status;
private String customeroid;
}

View File

@@ -0,0 +1,16 @@
package com.zmzm.finance.common.service;
import com.zmzm.finance.common.entity.TCustomerApplyCurriculum;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 服务类
* </p>
*
* @author baomidou
* @since 2026-01-19
*/
public interface ITCustomerApplyCurriculumService extends IService<TCustomerApplyCurriculum> {
}

View File

@@ -0,0 +1,16 @@
package com.zmzm.finance.common.service;
import com.zmzm.finance.common.entity.TCustomerCommodityOrder;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 服务类
* </p>
*
* @author baomidou
* @since 2026-02-09
*/
public interface ITCustomerCommodityOrderService extends IService<TCustomerCommodityOrder> {
}

View File

@@ -42,6 +42,8 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersMapper, Orders> impleme
@Autowired
private TCustomerTaihuClassMapper customerTaihuClassMapper;
@Autowired
private TCustomerCommodityOrderMapper customerCommodityOrderMapper;
@Autowired
private WumenUserDao wumenUserDao;
@Override
@@ -502,12 +504,27 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersMapper, Orders> impleme
List<Map<String,Object>> physicalInfoList = this.baseMapper.selectMaps(new MPJLambdaWrapper<Orders>()
.leftJoin(PaymentToOrder.class,PaymentToOrder::getOrderId,Orders::getId)
.leftJoin(Payment.class,Payment::getId,PaymentToOrder::getPaymentId)
.leftJoin("e_book_test.user u on u.tel = t.tel")
.disableSubLogicDel()
.eq(Orders::getUseFlag,1).eq(Orders::getType,3)
.apply("DATE_FORMAT(t.order_time, '%Y-%m') = '"+params.get("year")+"-"+params.get("month")+"'")
.select("DATE_FORMAT(order_time, '%Y-%m-%d %H:%i:%s') 01时间,if(source=0,'一路健康',if(source=1,'吴门医述','管理员')) 02来源," +
"IF(t.pay_type=1,'天医币',IF(t2.type=0,'微信',IF(t2.type=1,'支付宝','银行'))) 03类型,tel 04电话,order_sn 05订单号,t.fee 06金额")
"IF(t.pay_type=1,'天医币',IF(t2.type=0,'微信',IF(t2.type=1,'支付宝','银行'))) 03类型,t.tel 04电话,order_sn 05订单号,t.fee 06金额," +
"u.name 07姓名 ,IF(source=1,(select GROUP_CONCAT(sp.product_name,'*',bop.quantity) productName from e_book.buy_order bo left join e_book.buy_order_product bop on bop.order_id = bo.order_id left join e_book.shop_product sp on sp.product_id = bop.product_id where bo.order_id = t.order_old_id and sp.goods_type != '05' group by bo.order_id),IF(source=2,(select CONCAT(product_name,'*1') from finance_order where id = t.order_old_id),'')) 08商品")
.orderByAsc(Orders::getOrderTime));
for (Map<String,Object> m:physicalInfoList){
if("一路健康".equals(m.get("02来源").toString())){
List<Map<String,Object>> c = customerCommodityOrderMapper.selectMaps(new MPJLambdaWrapper<TCustomerCommodityOrder>()
.leftJoin("t_customer_commodity_orderdetail t2 on t2.orderOid = t.oid")
.leftJoin("t_commodity t3 on t3.oid = t2.commodityoid")
.select("GROUP_CONCAT(t3.nameCN) productName,t2.amount count")
.apply("t.orderID = '"+m.get("05订单号")+"'")
.groupBy("t.oid"));
if (c.size()>0){
m.put("08商品",c.get(0).get("productName")+"*"+c.get(0).get("count"));
}
}
}
return physicalInfoList;
}

View File

@@ -0,0 +1,20 @@
package com.zmzm.finance.common.service.impl;
import com.zmzm.finance.common.entity.TCustomerApplyCurriculum;
import com.zmzm.finance.common.dao.TCustomerApplyCurriculumMapper;
import com.zmzm.finance.common.service.ITCustomerApplyCurriculumService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 服务实现类
* </p>
*
* @author baomidou
* @since 2026-01-19
*/
@Service
public class TCustomerApplyCurriculumServiceImpl extends ServiceImpl<TCustomerApplyCurriculumMapper, TCustomerApplyCurriculum> implements ITCustomerApplyCurriculumService {
}

View File

@@ -0,0 +1,20 @@
package com.zmzm.finance.common.service.impl;
import com.zmzm.finance.common.entity.TCustomerCommodityOrder;
import com.zmzm.finance.common.dao.TCustomerCommodityOrderMapper;
import com.zmzm.finance.common.service.ITCustomerCommodityOrderService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 服务实现类
* </p>
*
* @author baomidou
* @since 2026-02-09
*/
@Service
public class TCustomerCommodityOrderServiceImpl extends ServiceImpl<TCustomerCommodityOrderMapper, TCustomerCommodityOrder> implements ITCustomerCommodityOrderService {
}