This commit is contained in:
linfso 2024-12-17 06:58:20 +08:00
parent 9fd30859a9
commit 6ab9ba84d8
4 changed files with 72 additions and 0 deletions

View File

@ -1441,6 +1441,15 @@ public class EmisWaybillController extends EmisBaseController
}
// @PreAuthorize("@ss.hasPermi('emis:emisWaybill:query')")
@GetMapping("/getLatestMonthCreateOrderMapList")
public AjaxResult getInfoByBillCode(EmisWaybill emisWaybill)
{
setPrivParams(emisWaybill);
return AjaxResult.success(emisBaseService.selectLatestMonthCreateOrderMapList(emisWaybill));
}
// /**
// * 导出运单列表列表
// */

View File

@ -204,6 +204,9 @@ public interface EmisWaybillMapper extends BaseMapper<EmisWaybill>
*/
public List<Map> getSiteDestStatInfoMap(EmisWaybill emisWaybill);
public List<Map> selectLatestMonthCreateOrderMapList(EmisWaybill emisWaybill);

View File

@ -2762,6 +2762,18 @@ public class EmisBaseService {
return emisTmsScanRecordMapper.queryScanStatInfoDtlList(emisWaybill);
}
/**
* 获取最近创建订单统计列表信息
* @param emisWaybill
* @return
*/
public List<Map> selectLatestMonthCreateOrderMapList(EmisWaybill emisWaybill){
return emisWaybillMapper.selectLatestMonthCreateOrderMapList(emisWaybill);
}
/**
* 根据添加的地址增加客户
* @param emisCustomerAddressNew

View File

@ -1345,6 +1345,54 @@
</select>
<select id="selectLatestMonthCreateOrderMapList" parameterType="EmisWaybill" resultType="map">
SELECT
DATE_FORMAT( create_time, '%Y-%m-%d' ) AS createDay,
count( 1 ) AS totalNum
FROM
emis_waybill a
WHERE
a.del_flag='0' and a.order_status !='0' and a.order_status!='2'
and create_time <![CDATA[ >= ]]> DATE_SUB( CURDATE(), INTERVAL 1 MONTH )
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
and (
a.send_site_code in (
SELECT t1.site_code FROM (
SELECT * FROM emis_site WHERE parent_site_code IS NOT NULL ) t1,( SELECT @pid :=
#{params.privSiteCode} ) pd
WHERE FIND_IN_SET( parent_site_code, @pid ) > 0 AND @pid := concat(@pid,',',site_code)
UNION
SELECT #{params.privSiteCode} FROM dual
)
or
a.dispatch_site_code in (
SELECT t1.site_code FROM (
SELECT * FROM emis_site WHERE parent_site_code IS NOT NULL ) t1,( SELECT @pid :=
#{params.privSiteCode} ) pd
WHERE FIND_IN_SET( parent_site_code, @pid ) > 0 AND @pid := concat(@pid,',',site_code)
UNION
SELECT #{params.privSiteCode} FROM dual
)
<if test="params.isQueryPrintOrder != null and params.isQueryPrintOrder == 1">
or EXISTS (select 1 from emis_tms_scan_record etsr where a.bill_code=etsr.main_bill_code and etsr.scan_site_code=#{params.privSiteCode})
</if>
<if test="custNo != null and custNo != ''">
or EXISTS (
select 1 from emis_customer_user ecu where a.cust_no=ecu.monthly_pay_code and ecu.owner_site=#{params.privSiteCode}
)
</if>
or a.salesmen=#{params.privEmpName}
or a.payee=#{params.privEmpName}
or a.operate_employee_code=#{params.privEmpCode}
or a.take_piece_employee_code=#{params.privEmpCode}
)
</if>
GROUP BY
createDay
</select>
<!-- 寄件网点寄件统计-->