${if(len(textEditor0)=0,""," AND bb.penalty > ='"+textEditor0+"' ")}select bb.caseNo as "案号", bb.caseCause as "案由", bb.party as "当事人", bb.carNo as "车牌号", bb.carModel as "车型", bb.deliveryGoods as "运载货物", bb.enforceSite as "违法地点", bb.enforcer1 as "执法人员1", bb.enforcer2 as "执法人员2", bb.industryType as "执法门类", sp.createTime as "登记时间", bb.lcrq as "受案时间", sp.status AS "当前状态", sp.endTime as "结案时间", bb.enforceUnitId, bb.enforceUnit as "执法单位", bb.illegalAct as "违法行为", bb.caseType as "案件类型", bb.overrun as "是否治超(治超值为超限,非治超值为空或者非超限)", bb.totalWeightGoods as "运载货物总重吨位", bb.overload as "货物超限吨位", bb.overrunRate as "超限率", bb.penalty as "实际处罚金额", bb.planPenalty as "拟处罚金额", sn.nodeName as "案件类型", if(bad.signatureUnitTime is null ,bonad.signatureUnitTime,bad.signatureUnitTime) as signatureUnitTime -- 处罚决定日期 from s_project sp left join bwsn_basicinfo bb on sp.id=bb.pidleft join bwsn_administrativepenalty bad on bad.pid =sp.idleft join bwsn_onadministrativepenaltydecision bonad on bonad.pid =sp.id left join b_work_flow wf on sp.flowId=wf.id left join s_node sn on wf.groupId=sn.id where bb.enforceUnitId="${depid_c}"and sp.status!="撤销"${if(len(dateStart_c_c)=0,""," AND DATE_FORMAT(sp.endTime,'%Y-%m-%d-%h-%m-%s') >='"+dateStart_c_c+"'")}${if(len(dateEnd_c_c)=0,""," AND DATE_FORMAT(sp.endTime,'%Y-%m-%d-%h-%m-%s') <='"+dateEnd_c_c+"'")}${if(len(dateStart_c_c_c)=0,""," AND DATE_FORMAT(if(bad.signatureUnitTime is null ,bonad.signatureUnitTime,bad.signatureUnitTime),'%Y-%m-%d-%h-%m-%s') >='"+dateStart_c_c_c+"'")}${if(len(dateEnd_c_c_c)=0,""," AND DATE_FORMAT(if(bad.signatureUnitTime is null ,bonad.signatureUnitTime,bad.signatureUnitTime),'%Y-%m-%d-%h-%m-%s') <='"+dateEnd_c_c_c+"'")}${if(len(textEditor0)=0,""," AND bb.penalty > ='"+textEditor0+"' ")}and bb.ishistory is nullorder by sp.createTime desc