@@ -1293,8 +1293,8 @@ class OrderInfoService extends ServiceBase {
pageSize=50;
}
letlistSql=`SELECT
DISTINCT(a.orderNo),
a.id,
a.orderNo,
a.channelOrderNo,
d.app_name,
b.itemName,
...
...
@@ -1310,7 +1310,7 @@ class OrderInfoService extends ServiceBase {
LEFT JOIN center_app.p_app d on a.uapp_id = d.uapp_id
WHERE
a.deleted_at IS NULL`;
lettotalSql=`select count(*) count from c_order_info a left join c_order_product b on a.orderNo = b.sourceOrderNo LEFT JOIN center_order.c_order_contacts c on a.orderNo = c.sourceOrderNo where a.deleted_at is null `
lettotalSql=`select count(DISTINCT(a.orderNo)) count from c_order_info a left join c_order_product b on a.orderNo = b.sourceOrderNo LEFT JOIN center_order.c_order_contacts c on a.orderNo = c.sourceOrderNo where a.deleted_at is null `
letwhereParams={};
if(ab.start&&ab.end){
listSql+=` and a.created_at >= :start and a.created_at <= :end`;
...
...
@@ -1333,7 +1333,7 @@ class OrderInfoService extends ServiceBase {
totalSql+=` and ( a.orderNo like :fuzzy_code or a.channelOrderNo like :fuzzy_code or c.mobile like :fuzzy_code)`;
@@ -259,7 +259,7 @@ class NeedinfoService extends ServiceBase {
*/
asyncgetNeedComparison(pobj){
letab=pobj.actionBody;
letsql1=`select count(*) count from n_need_info where deleted_at is null `;
letsql1=`select count(DISTINCT(a.needNo)) count from n_need_info where deleted_at is null `;
letsql2=`select count(DISTINCT(a.needNo)) count from n_need_solution a left join n_need_info b on a.needNo = b.needNo where a.deleted_at is null and b.status = 'ycd'`;
letwhereParams={};
if(ab.startNow&&ab.endNow){
...
...
@@ -314,9 +314,9 @@ class NeedinfoService extends ServiceBase {
}
lettag=actionBody.tag;
//需求列表
letneedSql=`select b.app_name,a.needNo,a.channelNeedNo,a.typeName,a.province,a.city,a.publishContent,a.publishName,a.publishMobile,a.statusName,a.created_at from center_order.n_need_info a left join center_app.p_app b on a.uapp_id = b.uapp_id where a.deleted_at is null`;
letneedSql=`select b.app_name,DISTINCT(a.needNo),a.channelNeedNo,a.typeName,a.province,a.city,a.publishContent,a.publishName,a.publishMobile,a.statusName,a.created_at from center_order.n_need_info a left join center_app.p_app b on a.uapp_id = b.uapp_id where a.deleted_at is null`;
//需求总数
letneedTotalSql=`select count(*) count from center_order.n_need_info a left join center_app.p_app b on a.uapp_id = b.uapp_id where a.deleted_at is null`;
letneedTotalSql=`select count(DISTINCT(a.needNo)) count from center_order.n_need_info a left join center_app.p_app b on a.uapp_id = b.uapp_id where a.deleted_at is null`;
//需求成单
letneedToOrderSql=`select DISTINCT(b.needNo),c.app_name,b.channelNeedNo,b.province,b.city,b.typeName,b.publishContent,b.publishName,b.publishMobile,b.statusName,b.created_at from center_order.n_need_solution a left join center_order.n_need_info b on a.needNo = b.needNo left join center_app.p_app c on b.uapp_id = c.uapp_id where a.deleted_at is null and b.status = 'ycd'`;
//需求成单总数
...
...
@@ -352,8 +352,8 @@ class NeedinfoService extends ServiceBase {
needToOrderTotalSql+=` and ( b.needNo like :fuzzy_code or b.channelNeedNo like :fuzzy_code or b.publishMobile like :fuzzy_code)`;