小程序端订单+小程序端财务单
This commit is contained in:
parent
ee2d5ea391
commit
399a1af0a8
|
|
@ -20,6 +20,7 @@ import com.ghy.order.service.OrderGoodsService;
|
|||
import com.ghy.order.service.OrderMasterService;
|
||||
import com.ghy.payment.domain.FinancialDetail;
|
||||
import com.ghy.payment.service.FinancialDetailService;
|
||||
import com.ghy.payment.service.FinancialMasterService;
|
||||
import com.ghy.web.pojo.vo.OrderDetailsResponseVo;
|
||||
import com.ghy.worker.domain.Worker;
|
||||
import com.ghy.worker.service.WorkerService;
|
||||
|
|
@ -49,13 +50,22 @@ public class OrderMasterController extends BaseController {
|
|||
|
||||
private final String prefix = "order/master";
|
||||
|
||||
private final OrderMasterService orderMasterService;
|
||||
private final CustomerService customerService;
|
||||
private final WorkerService workerService;
|
||||
private final OrderDetailService orderDetailService;
|
||||
private final OrderGoodsService orderGoodsService;
|
||||
private final CustomerAddressService customerAddressService;
|
||||
private final FinancialDetailService financialDetailService;
|
||||
@Autowired
|
||||
private OrderMasterService orderMasterService;
|
||||
@Autowired
|
||||
private CustomerService customerService;
|
||||
@Autowired
|
||||
private WorkerService workerService;
|
||||
@Autowired
|
||||
private OrderDetailService orderDetailService;
|
||||
@Autowired
|
||||
private OrderGoodsService orderGoodsService;
|
||||
@Autowired
|
||||
private CustomerAddressService customerAddressService;
|
||||
@Autowired
|
||||
private FinancialDetailService financialDetailService;
|
||||
@Autowired
|
||||
private FinancialMasterService financialMasterService;
|
||||
|
||||
@RequiresPermissions("order:master:view")
|
||||
@GetMapping()
|
||||
|
|
@ -63,6 +73,24 @@ public class OrderMasterController extends BaseController {
|
|||
return prefix;
|
||||
}
|
||||
|
||||
@PostMapping("/app/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo appList(OrderMaster orderMaster){
|
||||
startPage();
|
||||
List<OrderMaster> list = orderMasterService.selectOrderMasterList(orderMaster);
|
||||
list.forEach(master->{
|
||||
// 添加师傅信息
|
||||
master.setWorker(workerService.selectById(master.getWorkerId()));
|
||||
|
||||
// 添加订单商品信息
|
||||
master.setOrderGoods(orderGoodsService.selectByOrderMasterId(master.getId()));
|
||||
|
||||
// 添加财务主单信息
|
||||
master.setFinancialMaster(financialMasterService.selectByOrderMasterId(master.getId()));
|
||||
});
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@RequiresPermissions("order:master:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
|
|
|
|||
|
|
@ -51,10 +51,10 @@ public class FinancialDetailController extends BaseController {
|
|||
}
|
||||
}
|
||||
|
||||
@RequiresPermissions("financial:detail:list")
|
||||
// @RequiresPermissions("financial:detail:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(FinancialDetail financialDetail) {
|
||||
public TableDataInfo list(@RequestBody FinancialDetail financialDetail) {
|
||||
startPage();
|
||||
List<FinancialDetail> list = financialDetailService.selectFinancialDetailList(financialDetail);
|
||||
return getDataTable(list);
|
||||
|
|
|
|||
|
|
@ -28,6 +28,16 @@
|
|||
<artifactId>ghy-goods</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.ghy</groupId>
|
||||
<artifactId>ghy-worker</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.ghy</groupId>
|
||||
<artifactId>ghy-payment</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@ package com.ghy.order.domain;
|
|||
|
||||
import com.ghy.common.annotation.Excel;
|
||||
import com.ghy.common.core.domain.BaseEntity;
|
||||
import com.ghy.payment.domain.FinancialMaster;
|
||||
import com.ghy.worker.domain.Worker;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
|
@ -47,5 +49,11 @@ public class OrderMaster extends BaseEntity {
|
|||
|
||||
@Excel(name = "接单时间", cellType = Excel.ColumnType.STRING)
|
||||
private Date revTime;
|
||||
|
||||
private Worker worker;
|
||||
|
||||
private FinancialMaster financialMaster;
|
||||
|
||||
private OrderGoods orderGoods;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,6 +33,8 @@ public interface OrderGoodsMapper {
|
|||
*/
|
||||
OrderGoods selectById(Long orderGoodsId);
|
||||
|
||||
OrderGoods selectByOrderId(Long orderId);
|
||||
|
||||
/**
|
||||
* 批量删除订单商品信息
|
||||
*
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ public interface OrderGoodsService {
|
|||
*/
|
||||
int insertOrderGoods(OrderGoods orderGoods);
|
||||
|
||||
OrderGoods selectByOrderMasterId(Long orderMasterId);
|
||||
|
||||
/**
|
||||
* @param orderGoods 订单商品属性
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -26,6 +26,11 @@ public class OrderGoodsServiceImpl implements OrderGoodsService {
|
|||
return orderGoodsMapper.insertOrderGoods(orderGoods);
|
||||
}
|
||||
|
||||
@Override
|
||||
public OrderGoods selectByOrderMasterId(Long orderMasterId) {
|
||||
return orderGoodsMapper.selectByOrderId(orderMasterId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateOrderGoods(OrderGoods orderGoods) {
|
||||
Assert.notNull(orderGoods.getOrderGoodsId(), "OrderGoodsId cannot be null!");
|
||||
|
|
|
|||
|
|
@ -87,6 +87,15 @@
|
|||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectByOrderId" parameterType="long" resultMap="OrderGoodsResult">
|
||||
<include refid="selectOrderGoods"/>
|
||||
<where>
|
||||
<if test="orderId != null and orderId != 0">
|
||||
AND order_id = #{orderId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<delete id="deleteOrderGoodsByIds" parameterType="Long">
|
||||
DELETE FROM order_goods WHERE order_goods_id IN
|
||||
<foreach collection="array" item="orderGoodsId" open="(" separator="," close=")">
|
||||
|
|
|
|||
|
|
@ -73,6 +73,12 @@ public class FinancialDetail extends BaseEntity {
|
|||
@Excel(name = "付款时间", cellType = Excel.ColumnType.STRING)
|
||||
private Date payTime;
|
||||
|
||||
private String beginTime;
|
||||
|
||||
private String endTime;
|
||||
|
||||
|
||||
|
||||
public FinancialDetail() {
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -66,11 +66,11 @@
|
|||
<if test="financialDetailType != null">
|
||||
AND financial_detail_type = #{financialDetailType}
|
||||
</if>
|
||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(r.create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
||||
<if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(create_time,'%y%m%d') >= date_format(#{beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(r.create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
||||
<if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(create_time,'%y%m%d') < date_format(#{endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
|
|
|||
Loading…
Reference in New Issue