|
@@ -74,63 +74,63 @@ public interface FsStoreOrderMapper
|
|
|
public int deleteFsStoreOrderByOrderIds(String[] orderIds);
|
|
|
@Select("select order_id from fs_store_order where status = 3 and delivery_status = 0 and DATE(create_time)<='2024-3-1' ")
|
|
|
List<Long> selectSyncExpressIds();
|
|
|
- @Select({"<script> " +
|
|
|
- "select so.*,st.store_name,us.nick_name,us.phone,d.doctor_name,p.patient_name,p.prescribe_code,c.company_name,cu.nick_name company_user_name " +
|
|
|
- " FROM fs_store_order so LEFT JOIN fs_store st ON so.store_id =st.store_id " +
|
|
|
- " LEFT JOIN fs_user us ON us.user_id=so.user_id " +
|
|
|
- " LEFT JOIN fs_prescribe p ON p.prescribe_id =so.prescribe_id " +
|
|
|
- " LEFT JOIN fs_doctor d ON so.doctor_id= d.doctor_id " +
|
|
|
- " LEFT JOIN company c on c.company_id =so.company_id " +
|
|
|
- " LEFT JOIN company_user cu on cu.user_id=so.company_user_id " +
|
|
|
- " WHERE 1=1 "+
|
|
|
- "<if test=\"maps.packageSecondName != null and maps.packageSecondName != '' \"> and so.package_second_name like concat('%', #{maps.packageSecondName}, '%')</if>"+
|
|
|
- "<if test=\"maps.storeId != null \"> and so.store_id = #{maps.storeId}</if>\n" +
|
|
|
- "<if test=\"maps.orderCode != null and maps.orderCode != ''\"> and so.order_code = #{maps.orderCode}</if>\n" +
|
|
|
- "<if test=\"maps.prescribeCode != null and maps.prescribeCode != ''\"> and p.prescribe_code = #{maps.prescribeCode}</if>\n" +
|
|
|
- "<if test=\"maps.userName != null and maps.userName != ''\"> and so.user_name like concat('%', #{maps.userName}, '%')</if>\n" +
|
|
|
- "<if test=\"maps.userPhone != null and maps.userPhone != ''\"> and so.user_phone = #{maps.userPhone}</if>\n" +
|
|
|
- "<if test=\"maps.userId != null \"> and so.user_id = #{maps.userId}</if>\n" +
|
|
|
- "<if test=\"maps.isFirst != null \"> and so.is_first = #{maps.isFirst}</if>\n" +
|
|
|
- "<if test=\"maps.status != null \"> and so.status = #{maps.status}</if>\n" +
|
|
|
- "<if test=\"maps.source != null \"> and so.source = #{maps.source}</if>\n" +
|
|
|
- "<if test=\"maps.deliverySn != null and maps.deliverySn != ''\"> and so.delivery_sn = #{maps.deliverySn}</if>\n" +
|
|
|
- "<if test=\"maps.prescribeId != null \"> and so.prescribe_id = #{maps.prescribeId}</if>\n" +
|
|
|
- "<if test=\"maps.companyUserId != null \"> and so.company_user_id = #{maps.companyUserId}</if>\n" +
|
|
|
- "<if test=\"maps.sTime != null \"> and DATE(so.create_time) >= DATE(#{maps.sTime})</if>\n" +
|
|
|
- "<if test=\"maps.eTime != null \"> and DATE(so.create_time) <= DATE(#{maps.eTime})</if>\n" +
|
|
|
- "<if test=\"maps.paysTime != null \"> and DATE(so.pay_time) >= DATE(#{maps.paysTime})</if>\n" +
|
|
|
- "<if test=\"maps.payeTime != null \"> and DATE(so.pay_time) <= DATE(#{maps.payeTime})</if>\n" +
|
|
|
- "<if test=\"maps.orderCreateType != null \"> and so.order_create_type = #{maps.orderCreateType}</if>"+
|
|
|
- "<if test=\"maps.patientName != null \"> and p.patient_name like concat('%', #{maps.patientName}, '%')</if>"+
|
|
|
- "<if test=\"maps.doctorName != null \"> and d.doctor_name like concat('%', #{maps.doctorName}, '%')</if>"+
|
|
|
- "<if test=\"maps.orderType != null \"> and so.order_type = #{maps.orderType}</if>" +
|
|
|
- "<if test=\"maps.deliverySendsTime != null \"> and DATE(so.delivery_send_time) >= DATE(#{maps.deliverySendsTime})</if>\n" +
|
|
|
- "<if test=\"maps.deliverySendeTime != null \"> and DATE(so.delivery_send_time) <= DATE(#{maps.deliverySendeTime})</if>\n" +
|
|
|
- "<if test=\"maps.deliveryImportsTime != null \"> and DATE(so.delivery_import_time) >= DATE(#{maps.deliveryImportsTime})</if>\n" +
|
|
|
- "<if test=\"maps.deliveryImporteTime != null \"> and DATE(so.delivery_import_time) <= DATE(#{maps.deliveryImporteTime})</if>\n" +
|
|
|
- "<if test=\"maps.tuisTime != null \"> and DATE(so.tui_money_time) >= DATE(#{maps.tuisTime})</if>\n" +
|
|
|
- "<if test=\"maps.tuieTime != null \"> and DATE(so.tui_money_time) <= DATE(#{maps.tuieTime})</if>\n" +
|
|
|
- "<if test=\"maps.companyUserNickName != null and maps.companyUserNickName !='' \"> and cu.nick_name like concat( #{maps.companyUserNickName}, '%')</if> \n" +
|
|
|
- "<if test = 'maps.companyId != null and maps.companyId != \"-1\" '> " + "and so.company_id =#{maps.companyId} " + "</if>" +
|
|
|
- "<if test = ' maps.companyId == \"-1\" '> and so.company_id is null </if>" +
|
|
|
- "<if test = 'maps.deliveryStatus != null '> and so.delivery_status =#{maps.deliveryStatus} </if>" +
|
|
|
- "<if test = 'maps.customerId != null '> and so.customer_id =#{maps.customerId} </if>" +
|
|
|
- "<if test = 'maps.deliveryPayStatus != null '> and so.delivery_pay_status =#{maps.deliveryPayStatus} </if>" +
|
|
|
- "<if test = 'maps.tuiMoneyStatus != null '> and so.tui_money_status =#{maps.tuiMoneyStatus} </if>" +
|
|
|
- "<if test = 'maps.deptId != null '> AND (so.dept_id = #{maps.deptId} OR so.dept_id IN ( SELECT t.dept_id FROM company_dept t WHERE find_in_set(#{maps.deptId}, ancestors) )) </if>" +
|
|
|
- "<if test = 'maps.packageName != null and maps.packageName != \"\" '> and so.package_name like concat('%', #{maps.packageName}, '%')</if> " +
|
|
|
- "<if test = 'maps.payType != null '> and so.pay_type IN <foreach collection=\"maps.payType.split(',')\" item='item' index='index' open='(' separator=',' close=')'> #{item} </foreach></if>" +
|
|
|
- "<if test = 'maps.scheduleId != null and maps.scheduleId != \"-1\" '> and so.schedule_id IN <foreach collection=\"maps.scheduleId.split(',')\" item='item' index='index' open='(' separator=',' close=')'> #{item} </foreach></if>" +
|
|
|
- "<if test = 'maps.scheduleId == \"-1\" '> and so.schedule_id is null </if>" +
|
|
|
- "<if test = 'maps.orderBuyType != null and maps.orderBuyType != \"-1\" '> and so.order_buy_type IN <foreach collection=\"maps.orderBuyType.split(',')\" item='item' index='index' open='(' separator=',' close=')'> #{item} </foreach></if>" +
|
|
|
- "<if test = 'maps.orderBuyType == \"-1\" '> and so.order_buy_type is null </if>" +
|
|
|
- "<if test = 'maps.orderChannel == \"-1\" '> and so.order_channel is null </if>" +
|
|
|
- "<if test = 'maps.orderChannel != null and maps.orderChannel != \"-1\" '> and so.order_channel IN <foreach collection=\"maps.orderChannel.split(',')\" item='item' index='index' open='(' separator=',' close=')'> #{item} </foreach></if>" +
|
|
|
- "<if test = 'maps.qwSubject == \"-1\"'>and so.qw_subject is null </if>" +
|
|
|
- "<if test = 'maps.qwSubject != null and maps.qwSubject != \"-1\" '> and so.qw_subject IN <foreach collection=\"maps.qwSubject.split(',')\" item='item' index='index' open='(' separator=',' close=')'> #{item} </foreach></if>" +
|
|
|
- " ${maps.params.dataScope} "+
|
|
|
- " ORDER BY so.order_id desc "+
|
|
|
- "</script>"})
|
|
|
+// @Select({"<script> " +
|
|
|
+// "select so.*,st.store_name,us.nick_name,us.phone,d.doctor_name,p.patient_name,p.prescribe_code,c.company_name,cu.nick_name company_user_name " +
|
|
|
+// " FROM fs_store_order so LEFT JOIN fs_store st ON so.store_id =st.store_id " +
|
|
|
+// " LEFT JOIN fs_user us ON us.user_id=so.user_id " +
|
|
|
+// " LEFT JOIN fs_prescribe p ON p.prescribe_id =so.prescribe_id " +
|
|
|
+// " LEFT JOIN fs_doctor d ON so.doctor_id= d.doctor_id " +
|
|
|
+// " LEFT JOIN company c on c.company_id =so.company_id " +
|
|
|
+// " LEFT JOIN company_user cu on cu.user_id=so.company_user_id " +
|
|
|
+// " WHERE 1=1 "+
|
|
|
+// "<if test=\"maps.packageSecondName != null and maps.packageSecondName != '' \"> and so.package_second_name like concat('%', #{maps.packageSecondName}, '%')</if>"+
|
|
|
+// "<if test=\"maps.storeId != null \"> and so.store_id = #{maps.storeId}</if>\n" +
|
|
|
+// "<if test=\"maps.orderCode != null and maps.orderCode != ''\"> and so.order_code = #{maps.orderCode}</if>\n" +
|
|
|
+// "<if test=\"maps.prescribeCode != null and maps.prescribeCode != ''\"> and p.prescribe_code = #{maps.prescribeCode}</if>\n" +
|
|
|
+// "<if test=\"maps.userName != null and maps.userName != ''\"> and so.user_name like concat('%', #{maps.userName}, '%')</if>\n" +
|
|
|
+// "<if test=\"maps.userPhone != null and maps.userPhone != ''\"> and so.user_phone = #{maps.userPhone}</if>\n" +
|
|
|
+// "<if test=\"maps.userId != null \"> and so.user_id = #{maps.userId}</if>\n" +
|
|
|
+// "<if test=\"maps.isFirst != null \"> and so.is_first = #{maps.isFirst}</if>\n" +
|
|
|
+// "<if test=\"maps.status != null \"> and so.status = #{maps.status}</if>\n" +
|
|
|
+// "<if test=\"maps.source != null \"> and so.source = #{maps.source}</if>\n" +
|
|
|
+// "<if test=\"maps.deliverySn != null and maps.deliverySn != ''\"> and so.delivery_sn = #{maps.deliverySn}</if>\n" +
|
|
|
+// "<if test=\"maps.prescribeId != null \"> and so.prescribe_id = #{maps.prescribeId}</if>\n" +
|
|
|
+// "<if test=\"maps.companyUserId != null \"> and so.company_user_id = #{maps.companyUserId}</if>\n" +
|
|
|
+// "<if test=\"maps.sTime != null \"> and DATE(so.create_time) >= DATE(#{maps.sTime})</if>\n" +
|
|
|
+// "<if test=\"maps.eTime != null \"> and DATE(so.create_time) <= DATE(#{maps.eTime})</if>\n" +
|
|
|
+// "<if test=\"maps.paysTime != null \"> and DATE(so.pay_time) >= DATE(#{maps.paysTime})</if>\n" +
|
|
|
+// "<if test=\"maps.payeTime != null \"> and DATE(so.pay_time) <= DATE(#{maps.payeTime})</if>\n" +
|
|
|
+// "<if test=\"maps.orderCreateType != null \"> and so.order_create_type = #{maps.orderCreateType}</if>"+
|
|
|
+// "<if test=\"maps.patientName != null \"> and p.patient_name like concat('%', #{maps.patientName}, '%')</if>"+
|
|
|
+// "<if test=\"maps.doctorName != null \"> and d.doctor_name like concat('%', #{maps.doctorName}, '%')</if>"+
|
|
|
+// "<if test=\"maps.orderType != null \"> and so.order_type = #{maps.orderType}</if>" +
|
|
|
+// "<if test=\"maps.deliverySendsTime != null \"> and DATE(so.delivery_send_time) >= DATE(#{maps.deliverySendsTime})</if>\n" +
|
|
|
+// "<if test=\"maps.deliverySendeTime != null \"> and DATE(so.delivery_send_time) <= DATE(#{maps.deliverySendeTime})</if>\n" +
|
|
|
+// "<if test=\"maps.deliveryImportsTime != null \"> and DATE(so.delivery_import_time) >= DATE(#{maps.deliveryImportsTime})</if>\n" +
|
|
|
+// "<if test=\"maps.deliveryImporteTime != null \"> and DATE(so.delivery_import_time) <= DATE(#{maps.deliveryImporteTime})</if>\n" +
|
|
|
+// "<if test=\"maps.tuisTime != null \"> and DATE(so.tui_money_time) >= DATE(#{maps.tuisTime})</if>\n" +
|
|
|
+// "<if test=\"maps.tuieTime != null \"> and DATE(so.tui_money_time) <= DATE(#{maps.tuieTime})</if>\n" +
|
|
|
+// "<if test=\"maps.companyUserNickName != null and maps.companyUserNickName !='' \"> and cu.nick_name like concat( #{maps.companyUserNickName}, '%')</if> \n" +
|
|
|
+// "<if test = 'maps.companyId != null and maps.companyId != \"-1\" '> " + "and so.company_id =#{maps.companyId} " + "</if>" +
|
|
|
+// "<if test = ' maps.companyId == \"-1\" '> and so.company_id is null </if>" +
|
|
|
+// "<if test = 'maps.deliveryStatus != null '> and so.delivery_status =#{maps.deliveryStatus} </if>" +
|
|
|
+// "<if test = 'maps.customerId != null '> and so.customer_id =#{maps.customerId} </if>" +
|
|
|
+// "<if test = 'maps.deliveryPayStatus != null '> and so.delivery_pay_status =#{maps.deliveryPayStatus} </if>" +
|
|
|
+// "<if test = 'maps.tuiMoneyStatus != null '> and so.tui_money_status =#{maps.tuiMoneyStatus} </if>" +
|
|
|
+// "<if test = 'maps.deptId != null '> AND (so.dept_id = #{maps.deptId} OR so.dept_id IN ( SELECT t.dept_id FROM company_dept t WHERE find_in_set(#{maps.deptId}, ancestors) )) </if>" +
|
|
|
+// "<if test = 'maps.packageName != null and maps.packageName != \"\" '> and so.package_name like concat('%', #{maps.packageName}, '%')</if> " +
|
|
|
+// "<if test = 'maps.payType != null '> and so.pay_type IN <foreach collection=\"maps.payType.split(',')\" item='item' index='index' open='(' separator=',' close=')'> #{item} </foreach></if>" +
|
|
|
+// "<if test = 'maps.scheduleId != null and maps.scheduleId != \"-1\" '> and so.schedule_id IN <foreach collection=\"maps.scheduleId.split(',')\" item='item' index='index' open='(' separator=',' close=')'> #{item} </foreach></if>" +
|
|
|
+// "<if test = 'maps.scheduleId == \"-1\" '> and so.schedule_id is null </if>" +
|
|
|
+// "<if test = 'maps.orderBuyType != null and maps.orderBuyType != \"-1\" '> and so.order_buy_type IN <foreach collection=\"maps.orderBuyType.split(',')\" item='item' index='index' open='(' separator=',' close=')'> #{item} </foreach></if>" +
|
|
|
+// "<if test = 'maps.orderBuyType == \"-1\" '> and so.order_buy_type is null </if>" +
|
|
|
+// "<if test = 'maps.orderChannel == \"-1\" '> and so.order_channel is null </if>" +
|
|
|
+// "<if test = 'maps.orderChannel != null and maps.orderChannel != \"-1\" '> and so.order_channel IN <foreach collection=\"maps.orderChannel.split(',')\" item='item' index='index' open='(' separator=',' close=')'> #{item} </foreach></if>" +
|
|
|
+// "<if test = 'maps.qwSubject == \"-1\"'>and so.qw_subject is null </if>" +
|
|
|
+// "<if test = 'maps.qwSubject != null and maps.qwSubject != \"-1\" '> and so.qw_subject IN <foreach collection=\"maps.qwSubject.split(',')\" item='item' index='index' open='(' separator=',' close=')'> #{item} </foreach></if>" +
|
|
|
+// " ${maps.params.dataScope} "+
|
|
|
+// " ORDER BY so.order_id desc "+
|
|
|
+// "</script>"})
|
|
|
List<FsStoreOrderListVO> selectFsStoreOrderListVO(@Param("maps")FsStoreOrderParam fsStoreOrder);
|
|
|
|
|
|
@Select({"<script> " +
|
|
@@ -1085,4 +1085,5 @@ public interface FsStoreOrderMapper
|
|
|
@Select("select * from fs_store_order where `status`=2 ")
|
|
|
List<FsStoreOrder> selectWdtOmsOrderdeliveryOp();
|
|
|
|
|
|
+ int batchUpdateErpByOrderIds(@Param("maps") FsStoreOrderSetErpPhoneParam param);
|
|
|
}
|