refactor(database): 优化多处查询排序字段
- 调整生产任务查询排序字段为工单号降序
- 更新生产订单查询排序,优先按状态排序,再按计划完成时间降序
- 修改生产计划查询排序字段为需求日期降序
- 调整生产产品主表查询排序为产品编号降序
- 采购台账查询增加按录入日期降序排序
- 销售台账添加录入日期时区格式并按录入日期降序排序
- 配送信息发货日期添加时区格式并调整排序字段为发货编号降序
- 库存出库记录查询排序优化为出库批次降序
| | |
| | | if (purchaseLedger.getApprovalStatus() != null) { |
| | | queryWrapper.eq(PurchaseLedger::getApprovalStatus, purchaseLedger.getApprovalStatus()); |
| | | } |
| | | queryWrapper.orderByDesc(PurchaseLedger::getEntryDate); |
| | | return purchaseLedgerMapper.selectList(queryWrapper); |
| | | } |
| | | |
| | |
| | | /** |
| | | * 录入日期 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | @Excel(name = "录入日期", width = 30, dateFormat = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private Date entryDate; |
| | |
| | | private String status; |
| | | |
| | | @Schema(description = "发货日期") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "发货日期", width = 30, dateFormat = "yyyy-MM-dd") |
| | | private Date shippingDate; |
| | |
| | | and pot.work_order_no like concat('%', #{c.workOrderNo}, '%') |
| | | </if> |
| | | </where> |
| | | order by pot.production_order_id desc, poro.drag_sort |
| | | order by pot.work_order_no desc, poro.drag_sort |
| | | </select> |
| | | |
| | | <select id="selectTaskStatisticsByDate" resultType="com.ruoyi.home.dto.ProductionTaskStatisticsDto"> |
| | |
| | | <include refid="ProductionOrderVoColumns" /> |
| | | <include refid="ProductionOrderVoFrom" /> |
| | | <include refid="ProductionOrderWhere" /> |
| | | order by po.id desc |
| | | order by po.status , po.plan_complete_time desc |
| | | </select> |
| | | |
| | | <select id="listProductionOrder" resultMap="ProductionOrderVoResultMap"> |
| | |
| | | </if> |
| | | </if> |
| | | </where> |
| | | ORDER BY COALESCE(pp.mps_no) DESC |
| | | ORDER BY pp.required_date DESC |
| | | </select> |
| | | |
| | | <select id="selectWithMaterialByIds" resultType="com.ruoyi.production.bean.dto.ProductionPlanDto"> |
| | |
| | | and ppm.id = #{c.productMainId} |
| | | </if> |
| | | </where> |
| | | order by ppm.create_time desc |
| | | order by ppm.product_no desc |
| | | </select> |
| | | |
| | | <select id="getOrderByMainId" resultType="com.ruoyi.production.pojo.ProductionOrder"> |
| | |
| | | T1.customer_name LIKE CONCAT('%',#{salesLedgerDto.customerName},'%') |
| | | </if> |
| | | </where> |
| | | order by T1.entry_date desc |
| | | </select> |
| | | |
| | | <select id="selectSalesLedgerListPage" resultType="com.ruoyi.sales.vo.SalesLedgerVo"> |
| | |
| | | <if test="req.expressNumber != null and req.expressNumber != ''"> |
| | | AND s.express_number LIKE CONCAT('%',#{req.expressNumber},'%') |
| | | </if> |
| | | order by create_time DESC |
| | | order by shipping_no DESC |
| | | </select> |
| | | <select id="listAll" resultType="com.ruoyi.sales.pojo.ShippingInfo"> |
| | | SELECT |
| | |
| | | and sor.record_type = #{params.recordType} |
| | | </if> |
| | | </where> |
| | | order by sor.id desc |
| | | order by sor.outbound_batches desc |
| | | </select> |
| | | |
| | | <select id="listPageAccountSales" resultType="com.ruoyi.account.bean.vo.sales.SalesOutboundVo"> |