cmd=queryReferenceAll&conditionSql=AM_ACTUAL_ACCNTINFO.PK_ACTUAL_ACCNT in (select distinct (t.pk_actual_accnt) from RA_CORP_ACCNTINFO t where t.company_id = '1012201100000004491' and t.site_code = 'C00100M')

时间: 2024-04-05 16:34:18 浏览: 81
这是一个查询语句,用于从数据库中获取符合特定条件的数据。具体来说,这个查询语句的作用是查询具有特定公司ID和站点代码的实际账户信息,然后使用这些信息从另一个表中检索参考数据。 在查询语句中,cmd参数指定要执行的命令为queryReferenceAll,conditionSql参数指定查询条件为AM_ACTUAL_ACCNTINFO.PK_ACTUAL_ACCNT在一个子查询中的结果中,该子查询检索具有特定公司ID和站点代码的RA_CORP_ACCNTINFO表中的实际账户信息。
相关问题

import pandas as pd import numpy as np import os from pprint import pprint from pandas import DataFrame from scipy import interpolate data_1_hour_predict_raw = pd.read_excel('./data/附件1 监测点A空气质量预报基础数据.xlsx' ) data_1_hour_actual_raw = pd.read_excel('./data/附件1 监测点A空气质量预报基础数据.xlsx' ) data_1_day_actual_raw = pd.rea df_1_predict = data_1_hour_actual_raw df_1_actual = data_1_day_actual_raw df_1_predict.set_axis( ['time', 'place', 'so2', 'no2', 'pm10', 'pm2.5', 'o3', 'co', 'temperature', 'humidity', 'pressure', 'wind', 'direction'], axis='columns', inplace=True) df_1_actual.set_axis(['time', 'place', 'so2', 'no2', 'pm10', 'pm2.5', 'o3', 'co'], axis='columns', inplace=True) modeltime_df_actual = df_1_actual['time'] modeltime_df_pre = df_1_predict['time'] df_1_actual = df_1_actual.drop(columns=['place', 'time']) df_1_predict = df_1_predict.drop(columns=['place', 'time']) df_1_predict = df_1_predict.replace('—', np.nan) df_1_predict = df_1_predict.astype('float') df_1_predict[df_1_predict < 0] = np.nan # 重新插入time列 df_1_actual.insert(0, 'time', modeltime_df_actual) df_1_predict.insert(0, 'time', modeltime_df_pre) # 线性插值的方法需要单独处理最后一行的数据 data_1_actual = df_1_actual[0:-3] data_1_predict = df_1_predict data_1_predict.iloc[-1:]['pm10'] = 22.0 data_1_actual_knn = df_1_actual[0:-3] data_1_predict_knn: DataFrame = df_1_predict for indexs in data_1_actual.columns: if indexs == 'time': continue data_1_actual['rownum'] = np.arange(data_1_actual.shape[0]) df_nona = data_1_actual.dropna(subset=[indexs]) f = interpolate.interp1d(df_nona['rownum'], df_nona[indexs]) data_1_actual[indexs] = f(data_1_actual['rownum']) data_1_actual = data_1_actual.drop(columns=['rownum']) for indexs in data_1_predict.columns: if indexs == 'time': continue data_1_predict['rownum'] = np.arange(data_1_predict.shape[0]) df_nona = data_1_predict.dropna(subset=[indexs]) f = interpolate.interp1d(df_nona['rownum'], df_nona[indexs]) data_1_predict[indexs] = f(data_1_predict['rownum']) data_1_predict = data_1_predict.drop(columns=['rownum']) writer = pd.E

这段代码主要是对一份空气质量预报基础数据进行处理和插值,具体的解释如下: 1. 导入需要的库和模块: ``` import pandas as pd import numpy as np import os from pprint import pprint from pandas import DataFrame from scipy import interpolate ``` 2. 读取 excel 文件中的数据: ``` data_1_hour_predict_raw = pd.read_excel('./data/附件1 监测点A空气质量预报基础数据.xlsx' ) data_1_hour_actual_raw = pd.read_excel('./data/附件1 监测点A空气质量预报基础数据.xlsx' ) data_1_day_actual_raw = pd.read_excel('./data/附件1 监测点A空气质量预报基础数据.xlsx' ) ``` 3. 对读取的数据进行处理: ``` df_1_predict = data_1_hour_actual_raw df_1_actual = data_1_day_actual_raw df_1_predict.set_axis( ['time', 'place', 'so2', 'no2', 'pm10', 'pm2.5', 'o3', 'co', 'temperature', 'humidity', 'pressure', 'wind', 'direction'], axis='columns', inplace=True) df_1_actual.set_axis(['time', 'place', 'so2', 'no2', 'pm10', 'pm2.5', 'o3', 'co'], axis='columns', inplace=True) ``` 4. 提取时间列并进行插值: ``` modeltime_df_actual = df_1_actual['time'] modeltime_df_pre = df_1_predict['time'] df_1_actual = df_1_actual.drop(columns=['place', 'time']) df_1_predict = df_1_predict.drop(columns=['place', 'time']) df_1_predict = df_1_predict.replace('—', np.nan) df_1_predict = df_1_predict.astype('float') df_1_predict[df_1_predict < 0] = np.nan df_1_actual.insert(0, 'time', modeltime_df_actual) df_1_predict.insert(0, 'time', modeltime_df_pre) data_1_actual = df_1_actual[0:-3] data_1_predict = df_1_predict data_1_predict.iloc[-1:]['pm10'] = 22.0 data_1_actual_knn = df_1_actual[0:-3] data_1_predict_knn: DataFrame = df_1_predict for indexs in data_1_actual.columns: if indexs == 'time': continue data_1_actual['rownum'] = np.arange(data_1_actual.shape[0]) df_nona = data_1_actual.dropna(subset=[indexs]) f = interpolate.interp1d(df_nona['rownum'], df_nona[indexs]) data_1_actual[indexs] = f(data_1_actual['rownum']) data_1_actual = data_1_actual.drop(columns=['rownum']) for indexs in data_1_predict.columns: if indexs == 'time': continue data_1_predict['rownum'] = np.arange(data_1_predict.shape[0]) df_nona = data_1_predict.dropna(subset=[indexs]) f = interpolate.interp1d(df_nona['rownum'], df_nona[indexs]) data_1_predict[indexs] = f(data_1_predict['rownum']) data_1_predict = data_1_predict.drop(columns=['rownum']) ``` 5. 最后将处理好的数据写入 excel 文件: ``` writer = pd.ExcelWriter('./data/附件1 监测点A空气质量预报基础数据_preprocessed.xlsx') data_1_predict.to_excel(writer, sheet_name='1小时预测数据', index=False) data_1_predict_knn.to_excel(writer, sheet_name='1小时预测数据_knn', index=False) data_1_actual.to_excel(writer, sheet_name='1天实际数据', index=False) data_1_actual_knn.to_excel(writer, sheet_name='1天实际数据_knn', index=False) writer.save() ``` 总体来说,这段代码主要是对空气质量预报基础数据进行了一些预处理和插值,最终将处理好的数据写入了 excel 文件中。

java.sql.SQLException: sql injection violation, syntax error: TODO : pos 872, line 15, column 43, token UNION : SELECT asewo.code_s as code,asewo.order_type_s as orderType,asewo.equipment_name_s as equipmentName,asewo.executor_s as executor, asewo.plan_start_time_T as planStartTime,asewo.plan_finish_time_T as planFinishTime,asewo.tpm_key_s as tpmKey,asewo.shop_s as shop, asewo.line_S as line,asewo.actual_start_time_t as startTime,asewo.actual_finish_time_t as finishTime,asewo.executor_account_s as executorAccounts, asewo.source_type_s as sourceType,asewo.SOURCE_ORDER_S as sourceOrder,asewo.CREATION_TIME as creationTime FROM AT_AS_EM_Work_Order asewo WHERE to_char(asewo.plan_start_time_T,'yyyy_mm-dd hh24:mi') <= to_char(plan_finish_time_T,'yyyy_mm_dd hh24:mi') AND asewo.ORDER_STATUS_S='创建' AND asewo.executor_s=? ORDER BY asewo.creation_time DESC Union All SELECT asewo.code_s as code,asewo.order_type_s as orderType,asewo.equipment_name_s as equipmentName,asewo.executor_s as executor, asewo.plan_start_time_T as planStartTime,asewo.plan_finish_time_T as planFinishTime,asewo.tpm_key_s as tpmKey,asewo.shop_s as shop, asewo.line_S as line,asewo.actual_start_time_t as startTime,asewo.actual_finish_time_t as finishTime,asewo.executor_account_s as executorAccounts, asewo.source_type_s as sourceType,asewo.SOURCE_ORDER_S as sourceOrder,asewo.CREATION_TIME as creationTime FROM AT_AS_EM_Work_Order asewo WHERE asewo.ORDER_STATUS_S='创建' AND asewo.executor_s=? ORDER BY asewo.creation_time DESC如何改

这段代码是一个SQL查询语句,其中包含了一个UNION操作符,因此可能存在SQL注入漏洞。如果要避免注入漏洞,可以使用参数化查询来构建SQL语句。具体来说,可以将查询中的变量使用占位符(如?)代替,然后在执行查询时将变量的值传递给占位符。这样可以确保输入的变量不会被当做SQL语句的一部分来解释,从而避免注入攻击。 以下是一个使用参数化查询的示例代码: ```java String sql = "SELECT asewo.code_s as code,asewo.order_type_s as orderType,asewo.equipment_name_s as equipmentName,asewo.executor_s as executor, " + "asewo.plan_start_time_T as planStartTime,asewo.plan_finish_time_T as planFinishTime,asewo.tpm_key_s as tpmKey,asewo.shop_s as shop, " + "asewo.line_S as line,asewo.actual_start_time_t as startTime,asewo.actual_finish_time_t as finishTime,asewo.executor_account_s as executorAccounts, " + "asewo.source_type_s as sourceType,asewo.SOURCE_ORDER_S as sourceOrder,asewo.CREATION_TIME as creationTime " + "FROM AT_AS_EM_Work_Order asewo " + "WHERE to_char(asewo.plan_start_time_T,'yyyy_mm-dd hh24:mi') <= to_char(plan_finish_time_T,'yyyy_mm_dd hh24:mi') " + "AND asewo.ORDER_STATUS_S='创建' " + "AND asewo.executor_s=? " + "ORDER BY asewo.creation_time DESC " + "UNION All " + "SELECT asewo.code_s as code,asewo.order_type_s as orderType,asewo.equipment_name_s as equipmentName,asewo.executor_s as executor, " + "asewo.plan_start_time_T as planStartTime,asewo.plan_finish_time_T as planFinishTime,asewo.tpm_key_s as tpmKey,asewo.shop_s as shop, " + "asewo.line_S as line,asewo.actual_start_time_t as startTime,asewo.actual_finish_time_t as finishTime,asewo.executor_account_s as executorAccounts, " + "asewo.source_type_s as sourceType,asewo.SOURCE_ORDER_S as sourceOrder,asewo.CREATION_TIME as creationTime " + "FROM AT_AS_EM_Work_Order asewo " + "WHERE asewo.ORDER_STATUS_S='创建' " + "AND asewo.executor_s=? " + "ORDER BY asewo.creation_time DESC"; PreparedStatement stmt = connection.prepareStatement(sql); stmt.setString(1, executor); stmt.setString(2, executor); ResultSet rs = stmt.executeQuery(); ``` 在上面的代码中,使用`PreparedStatement`来创建查询语句,并将占位符替换为变量。然后可以使用`setString`等方法来设置变量的值,最后执行查询并获取结果。通过使用参数化查询,可以有效地避免SQL注入漏洞。
阅读全文

相关推荐

改如何修正: <select id="getCurrentTask" resultType="com.sottop.sokonmobile.sokonmobile.qingdao.entity.AsEmWorkOrderEntity"> SELECT asewo.code_s as code,asewo.order_type_s as orderType,asewo.equipment_name_s as equipmentName,asewo.executor_s as executor, asewo.plan_start_time_T as planStartTime,asewo.plan_finish_time_T as planFinishTime,asewo.tpm_key_s as tpmKey,asewo.shop_s as shop, asewo.line_S as line,asewo.actual_start_time_t as startTime,asewo.actual_finish_time_t as finishTime,asewo.executor_account_s as executorAccounts, asewo.source_type_s as sourceType,asewo.SOURCE_ORDER_S as sourceOrder,asewo.CREATION_TIME as creationTime FROM AT_AS_EM_Work_Order asewo WHERE to_char(asewo.plan_start_time_T,'yyyy_mm-dd hh24:mi') <= to_char(plan_finish_time_T,'yyyy_mm_dd hh24:mi') AND asewo.ORDER_STATUS_S='创建' AND asewo.executor_s=#{executor} <if test="orderType!=null and orderType!=''"> AND asewo.order_type_s=#{orderType} </if> ORDER BY asewo.creation_time DESC Union All SELECT asewo.code_s as code,asewo.order_type_s as orderType,asewo.equipment_name_s as equipmentName,asewo.executor_s as executor, asewo.plan_start_time_T as planStartTime,asewo.plan_finish_time_T as planFinishTime,asewo.tpm_key_s as tpmKey,asewo.shop_s as shop, asewo.line_S as line,asewo.actual_start_time_t as startTime,asewo.actual_finish_time_t as finishTime,asewo.executor_account_s as executorAccounts, asewo.source_type_s as sourceType,asewo.SOURCE_ORDER_S as sourceOrder,asewo.CREATION_TIME as creationTime FROM AT_AS_EM_Work_Order asewo WHERE asewo.ORDER_STATUS_S='创建' AND asewo.executor_s=#{executor} <if test="orderType!=null and orderType!=''"> AND asewo.order_type_s=#{orderType} </if> ORDER BY asewo.creation_time DESC </select>

优化SQL select round( ohbmc.after_actual_amount/zz,0) cost_moneyi ,count(distinct case when ddp.orig_plan_rid = -1 then null else ddp.orig_plan_rid end) AS orig_num ,array_agg (dlt.state) AS loading_state ,count(DISTINCT CASE WHEN ddp.sale_planid = -1 THEN NULL ELSE ddp.sale_planid END) AS saleid_num--销地已计划数量 ,array_agg(dto.state) AS saletransport_state from ( SELECT id AS origin_planid , unnest(cabinet_rule_id) cabinet_rule_id -- 判断 next_plan_id 本身是空和 next_plan_id 为 {} ,unnest(case when (next_plan_id is null or next_plan_id[1] is null) then ARRAY[-1]::integer[] else next_plan_id end) as sale_planid --销地计划 , case when dp.plan_receiver_id is null then -1 else dp.plan_receiver_id end orig_plan_rid --产地计划 FROM ods.ods_durian_delivery_plan as dp left join ods.ods_hl_commodity_category as hcc on hcc.category_id = dp.category_id WHERE dp.type = 'ORIGIN' AND dp.deleted = 99 AND dp.tenant_id = 1 and cabinet_rule_id='{8}'or cabinet_rule_id='{9}'or cabinet_rule_id='{10000005}'---取白心火龙果 AND hcc.category_name = '火龙果') as ddp LEFT JOIN ods.ods_durian_loading_task AS dlt ON dlt.plan_id = ddp.origin_planid and dlt.plan_type='ORIGIN' AND dlt.deleted = 99 LEFT JOIN ods.ods_durian_transport_order AS dto ON dto.plan_id = ddp.sale_planid AND dto.deleted = 99 LEFT JOIN ods.ods_durian_receipt_task AS drt ON drt.plan_id = ddp.sale_planid AND drt.deleted = 99 LEFT JOIN ods.ods_durian_transport_order AS dto1 ON dto1.plan_id = ddp.sale_planid AND dto1.sort_no = 1 AND dto1.deleted = 99 left join (select odlsi.plan_id,sum(odlsi.quantity) zz from ods.ods_durian_loading_sku_item odlsi group by 1) odlsi on odlsi.plan_id=dlt.plan_id left join (select *, unnest(case when ( odbr.bill_main_id is null or odbr.bill_main_id is null) then ARRAY[-1]::integer[] else odbr.bill_main_id end) bill_main_id_r from ods.ods_durian_bill_rel odbr) odbr on odbr.data_id= dlt.plan_id and odbr.data_type='ORIGIN_FEE' left join ods.ods_hl_bill_main_currency ohbmc on ohbmc.bill_main_id=odbr.bill_main_id_r and ohbmc.deleted=99 group by 1;

找出sql错误SELECT * FROM ( SELECT a.id, a.CODE AS 'sourceBillCode', a.type AS 'originalOrderType', a.unit_of_origin, a.unit_of_origin_type, a.time AS 'orderOriginCreationTime', a.warehouse, a.receiving_storage_space, b.type_of_material, b.quality_control_number, b.good_products_number, b.defective_products_number, b.yield, b.quantity_of_returns, b.as_received_condition, b.quantity_of_order, b.quantity_not_received, b.quantity_of_goods_received, b.number_of_spare_parts, b.quantity_of_returns_actual, b.special_production_quantity, b.quantity_in_storage, b.receipt_quantity AS 'inqty', b.quantity_not_in_storage FROM wareh_source_order a LEFT JOIN statistics_receiving_order b ON a.id = b.order_id UNION ALL SELECT a.id, a.CODE AS 'sourceBillCode', a.type AS 'originalOrderType', a.unit_of_origin, a.source_of_delivery_note, a.time AS 'orderOriginCreationTime', a.warehouse, a.receiving_storage_space, b.type_of_material, b.quality_control_number, b.good_products_number, b.defective_products_number, b.yield, b.quantity_of_returns, b.as_received_condition, b.quantity_of_order, b.quantity_not_received, b.quantity_of_goods_received, b.number_of_spare_parts, b.quantity_of_returns_actual, b.special_production_quantity, b.quantity_in_storage, b.receipt_quantity AS 'inqty', b.quantity_not_in_storage FROM wareh_source_order a LEFT JOIN statistics_purchase_order b ON a.id = b.order_id ) tab WHERE originalOrderType IN ( 'PurchaseOrder', 'ReceiptRecord' ) AND warehouse = 'string' AND receiving_storage_space = 'string' AND date_format( orderOriginCreationTime, '%y%m%d' ) >= date_format( '2023-07-07 00:00:00.0', '%y%m%d' ) AND date_format( orderOriginCreationTime, '%y%m%d' ) <= date_format( '2023-07-07 00:00:00.0', '%y%m%d' ) AND ( EXISTS ( SELECT material_no FROM wareh_source_order_list c WHERE c.order_id = id AND ( c.material_name REGEXP 'string' OR c.material_full REGEXP 'string' OR c.material_lot REGEXP 'string' ) ) OR source_of_delivery_note REGEXP 'string' OR CONVERT ( source_bill_code USING utf8mb4 ) REGEXP 'string' )

select t.id ,t.parent, t.name ,t.begin ,t.end , t.ACTUAL_START , t.ACTUAL_FINISH, t.TASK_UNIQUE_NO, t.NO, t.SUMMARY, t.DEPENDENCE, t.PRIORITY, t.EXEC_STAT, t.DURATION, t.COMP_PCT,ASSIGNER,POSITION,PRINCIPAL,PRINCIPAL_NAME,ORG_NAME,MGR_LINE,ERJIGUANXIAN,SFSJYS,SFNDJH, t.CRITICAL,t.PROJ_NO,t.SRC_TID,t.ASSIGNER_AUTH,t.POSITION_NAME,t.ASSIGNER_NAME,t.PRIN_ORG,t.ORG,t.SRC_SYS,t.CREATE_USER, t.TASK_NO,tp.id as typ,tp.name as typname,t.SETTLETYPECODE as SETTLETYPECODE,'' as remark,'' as type,t.OATASKID as OATASKID,t.QIQU,t.DESCRIBE, S.DESCRIPTION,ontheway_type,T.SHIFOUXXJDHB,up.update_date optime,submit,t.AUDITOR,t.AUDITOR_NO,t.proj_name,tp.filter_type,t.plan,t.MATTER_SRC,t.Prepose_task,t.shixiangbiaoqian, t.SETTLE_LEVEL,tp.specail_name,t.audit_unit,t.rectify_question_type,t.project_data_processor,t.project_data_processor_name, CASE WHEN t.EXEC_STAT not IN ('30','31','32','33','34','41','55') and ( up.STAT = 'OP' or up.STAT = 'I') then 'relay' when t.EXEC_STAT not IN ('30','31','32','33','34','41','55') and up.STAT = 'U' and up.FINISH ='Y' and up.rel = '1' AND up.RID is not null then 'finish' when t.EXEC_STAT not IN ('30','31','32','33','34','41','55') and up.STAT = 'U' and up.DELAY ='Y' and up.rel = '1' AND up.RID is not null then 'delay' when t.EXEC_STAT not IN ('30','31','32','33','34','41','55') and up.STAT = 'U' and up.TERMINATE ='P' and up.rel = '1' AND up.RID is not null then 'terminate' else null end as approve_type, up.user_id as approver from t_master_task t left join t_task_2_task_typ p on t.id = p.task left join t_task_typ tp on tp.id = p.typ left join t_slave_task s on s.id=t.id left join (select * from (select a.*,row_number() over(partition by task order by update_date desc) rm from t_user_task_upd_stat a) where rm = 1) up on t.id = up.task; 这sql怎么优化

import pandas as pd import numpy as np from sklearn.preprocessing import MinMaxScaler from keras.models import Sequential from keras.layers import Dense, LSTM import matplotlib.pyplot as plt # 读取CSV文件 data = pd.read_csv('77.csv', header=None) # 将数据集划分为训练集和测试集 train_size = int(len(data) * 0.7) train_data = data.iloc[:train_size, 1:2].values.reshape(-1,1) test_data = data.iloc[train_size:, 1:2].values.reshape(-1,1) # 对数据进行归一化处理 scaler = MinMaxScaler(feature_range=(0, 1)) train_data = scaler.fit_transform(train_data) test_data = scaler.transform(test_data) # 构建训练集和测试集 def create_dataset(dataset, look_back=1): X, Y = [], [] for i in range(len(dataset) - look_back): X.append(dataset[i:(i+look_back), 0]) Y.append(dataset[i+look_back, 0]) return np.array(X), np.array(Y) look_back = 3 X_train, Y_train = create_dataset(train_data, look_back) X_test, Y_test = create_dataset(test_data, look_back) # 转换为LSTM所需的输入格式 X_train = np.reshape(X_train, (X_train.shape[0], X_train.shape[1], 1)) X_test = np.reshape(X_test, (X_test.shape[0], X_test.shape[1], 1)) # 构建LSTM模型 model = Sequential() model.add(LSTM(units=50, return_sequences=True, input_shape=(look_back, 1))) model.add(LSTM(units=50)) model.add(Dense(units=1)) model.compile(optimizer='adam', loss='mean_squared_error') model.fit(X_train, Y_train, epochs=100, batch_size=32) # 预测测试集并进行反归一化处理 Y_pred = model.predict(X_test) Y_pred = scaler.inverse_transform(Y_pred) Y_test = scaler.inverse_transform(Y_test) # 输出RMSE指标 rmse = np.sqrt(np.mean((Y_pred - Y_test)**2)) print('RMSE:', rmse) # 绘制训练集真实值和预测值图表 train_predict = model.predict(X_train) train_predict = scaler.inverse_transform(train_predict) train_actual = scaler.inverse_transform(Y_train.reshape(-1, 1)) plt.plot(train_actual, label='Actual') plt.plot(train_predict, label='Predicted') plt.title('Training Set') plt.xlabel('Time (h)') plt.ylabel('kWh') plt.legend() plt.show() # 绘制测试集真实值和预测值图表 plt.plot(Y_test, label='Actual') plt.plot(Y_pred, label='Predicted') plt.title('Testing Set') plt.xlabel('Time (h)') plt.ylabel('kWh') plt.legend() plt.show()以上代码运行时报错,错误为ValueError: Expected 2D array, got 1D array instead: array=[-0.04967795 0.09031832 0.07590125]. Reshape your data either using array.reshape(-1, 1) if your data has a single feature or array.reshape(1, -1) if it contains a single sample.如何进行修改

SELECT bs.sample_id, bs.item_id, bs.report_id, bs.order_no, bs.order_id, bs.order_business_type, bs.commission_date, bs.customer_name, bs.applicant, bs.phone, bs.receive_user_name, bs.contract_no, bs.special_requirements, bs.report_org_name, bs.report_org_address, bs.sample_name, bs.standard_instrument_name, bs.complete_day, bs.sample_remark AS remark, bs.standard_instrument_id, bs.sample_no, bs.factory_number, bs.item_name, /*bs.item_quantity,*/ bs.inspection_type, bs.mandatory_flag, bs.test_quantity, bs.sample_state, bs.current_site, bs.plan_complete_date, bs.affix, bs.ranges, bs.grade, bs.factory, bs.calibrat_point, bs.apply_dept, bs.specification, bs.final_fee, bs.service_type, CASE WHEN bs.actual_complete_date IS NOT NULL THEN DATEDIFF( bs.plan_complete_date, bs.actual_complete_date ) ELSE datediff( bs.plan_complete_date, now()) END AS surplus_days, bs.report_no, bs.is_report_back, bs.back_reason AS report_back_reason, bs.is_just_certificate, bs.report_state, bs.temper, bs.humidity, bs.test_result, bs.test_date, bs.next_test_date, bs.test_cycle, bs.test_address, bs.generate_time, bs.point_report_id, bs.is_merge, bs.circulation_flag, bs.item_proposal_fee AS proposal_fee, bs.change_price_reason, bs.test_user_name, bs.group_id, bs.group_name, bs.charging_num, bs.other_fee, bs.receivable_fee, bs.affix_quantity, bs.test_org, bs.out_org_order_no, bs.out_org_sample_no, bs.business_user_name, bs.pdf_path, bs.settlement_state, bs.result_describe, bsa.attach_id FROM view_sample_info bs JOIN bus_sample_report bsr ON bs.report_id = bsr.id JOIN bus_sample sa ON bsr.sample_id = sa.id JOIN bus_sample_attr bsa ON sa.id = bsa.id 根据bs.commission_date 进行排序最近的排上面 bs.commission_date

最新推荐

recommend-type

JSONException:com.alibaba.fastjson.JSONException: expect ‘:’ at 0, actual = 已解决

在编程过程中,我们可能会遇到各种异常,其中"JSONException: expect ‘:’ at 0, actual =" 是一个典型的Fastjson库在解析JSON时抛出的异常。Fastjson是阿里巴巴提供的一款高性能的JSON解析和生成库,它广泛应用于...
recommend-type

玄武岩纤维行业研究报告 新材料技术 玄武岩纤维 性能应用 市场分析

玄武岩纤维以其优异的耐温性和化学稳定性,在建筑、消防、环保、航空航天等领域广泛应用。文件提供了玄武岩纤维的性能参数比较、特性分析、发展历程、制备工艺、应用领域,以及全球和中国市场的产量、需求量和市场规模数据。适用于新材料行业研究人员、企业决策者和市场分析师,旨在提供玄武岩纤维的技术特点、市场动态和发展趋势的参考。
recommend-type

基于 Vue 3、Vite、Ant Design Vue 4.0、TypeScript、Vben Vue Admin,最先进的技术栈,让初学者能够更快的入门并投入到团队开发中去

基于 Vue 3、Vite、Ant Design Vue 4.0、TypeScript、Vben Vue Admin,最先进的技术栈,让初学者能够更快的入门并投入到团队开发中去。包括模块如:组织机构、角色用户、菜单授权、数据权限、系统参数等。完整组件封装,数据驱动视图。为微小中大项目的开发,提供现成的开箱解决方案及丰富的示例。Vue端完全开源。无用户限制
recommend-type

Angular实现MarcHayek简历展示应用教程

资源摘要信息:"MarcHayek-CV:我的简历的Angular应用" Angular 应用是一个基于Angular框架开发的前端应用程序。Angular是一个由谷歌(Google)维护和开发的开源前端框架,它使用TypeScript作为主要编程语言,并且是单页面应用程序(SPA)的优秀解决方案。该应用不仅展示了Marc Hayek的个人简历,而且还介绍了如何在本地环境中设置和配置该Angular项目。 知识点详细说明: 1. Angular 应用程序设置: - Angular 应用程序通常依赖于Node.js运行环境,因此首先需要全局安装Node.js包管理器npm。 - 在本案例中,通过npm安装了两个开发工具:bower和gulp。bower是一个前端包管理器,用于管理项目依赖,而gulp则是一个自动化构建工具,用于处理如压缩、编译、单元测试等任务。 2. 本地环境安装步骤: - 安装命令`npm install -g bower`和`npm install --global gulp`用来全局安装这两个工具。 - 使用git命令克隆远程仓库到本地服务器。支持使用SSH方式(`***:marc-hayek/MarcHayek-CV.git`)和HTTPS方式(需要替换为具体用户名,如`git clone ***`)。 3. 配置流程: - 在server文件夹中的config.json文件里,需要添加用户的电子邮件和密码,以便该应用能够通过内置的联系功能发送信息给Marc Hayek。 - 如果想要在本地服务器上运行该应用程序,则需要根据不同的环境配置(开发环境或生产环境)修改config.json文件中的“baseURL”选项。具体而言,开发环境下通常设置为“../build”,生产环境下设置为“../bin”。 4. 使用的技术栈: - JavaScript:虽然没有直接提到,但是由于Angular框架主要是用JavaScript来编写的,因此这是必须理解的核心技术之一。 - TypeScript:Angular使用TypeScript作为开发语言,它是JavaScript的一个超集,添加了静态类型检查等功能。 - Node.js和npm:用于运行JavaScript代码以及管理JavaScript项目的依赖。 - Git:版本控制系统,用于代码的版本管理及协作开发。 5. 关于项目结构: - 该应用的项目文件夹结构可能遵循Angular CLI的典型结构,包含了如下目录:app(存放应用组件)、assets(存放静态资源如图片、样式表等)、environments(存放环境配置文件)、server(存放服务器配置文件如上文的config.json)等。 6. 开发和构建流程: - 开发时,可能会使用Angular CLI来快速生成组件、服务等,并利用热重载等特性进行实时开发。 - 构建应用时,通过gulp等构建工具可以进行代码压缩、ES6转译、单元测试等自动化任务,以确保代码的质量和性能优化。 7. 部署: - 项目最终需要部署到服务器上,配置文件中的“baseURL”选项指明了服务器上的资源基础路径。 8. 关于Git仓库: - 压缩包子文件的名称为MarcHayek-CV-master,表明这是一个使用Git版本控制的仓库,且存在一个名为master的分支,这通常是项目的主分支。 以上知识点围绕Angular应用“MarcHayek-CV:我的简历”的创建、配置、开发、构建及部署流程进行了详细说明,涉及了前端开发中常见的工具、技术及工作流。
recommend-type

管理建模和仿真的文件

管理Boualem Benatallah引用此版本:布阿利姆·贝纳塔拉。管理建模和仿真。约瑟夫-傅立叶大学-格勒诺布尔第一大学,1996年。法语。NNT:电话:00345357HAL ID:电话:00345357https://theses.hal.science/tel-003453572008年12月9日提交HAL是一个多学科的开放存取档案馆,用于存放和传播科学研究论文,无论它们是否被公开。论文可以来自法国或国外的教学和研究机构,也可以来自公共或私人研究中心。L’archive ouverte pluridisciplinaire
recommend-type

深入剖析:内存溢出背后的原因、预防及应急策略(专家版)

![深入剖析:内存溢出背后的原因、预防及应急策略(专家版)](https://d8it4huxumps7.cloudfront.net/uploads/images/65e82a01a4196_dangling_pointer_in_c_2.jpg?d=2000x2000) 参考资源链接:[Net 内存溢出(System.OutOfMemoryException)的常见情况和处理方式总结](https://wenku.csdn.net/doc/6412b784be7fbd1778d4a95f?spm=1055.2635.3001.10343) # 1. 内存溢出的概念及影响 内存溢出,又称
recommend-type

Java中如何对年月日时分秒的日期字符串作如下处理:如何日期分钟介于两个相连的半点之间,就将分钟数调整为前半点

在Java中,你可以使用`java.time`包中的类来处理日期和时间,包括格式化和调整。下面是一个示例,展示了如何根据给定的日期字符串(假设格式为"yyyy-MM-dd HH:mm:ss")进行这样的处理: ```java import java.text.SimpleDateFormat; import java.time.LocalDateTime; import java.time.ZoneId; import java.time.ZonedDateTime; public class Main { public static void main(String[] args
recommend-type

Crossbow Spot最新更新 - 获取Chrome扩展新闻

资源摘要信息:"Crossbow Spot - Latest News Update-crx插件" 该信息是关于一款特定的Google Chrome浏览器扩展程序,名为"Crossbow Spot - Latest News Update"。此插件的目的是帮助用户第一时间获取最新的Crossbow Spot相关信息,它作为一个RSS阅读器,自动聚合并展示Crossbow Spot的最新新闻内容。 从描述中可以提取以下关键知识点: 1. 功能概述: - 扩展程序能让用户领先一步了解Crossbow Spot的最新消息,提供实时更新。 - 它支持自动更新功能,用户不必手动点击即可刷新获取最新资讯。 - 用户界面设计灵活,具有美观的新闻小部件,使得信息的展现既实用又吸引人。 2. 用户体验: - 桌面通知功能,通过Chrome的新通知中心托盘进行实时推送,确保用户不会错过任何重要新闻。 - 提供一个便捷的方式来保持与Crossbow Spot最新动态的同步。 3. 语言支持: - 该插件目前仅支持英语,但开发者已经计划在未来的版本中添加对其他语言的支持。 4. 技术实现: - 此扩展程序是基于RSS Feed实现的,即从Crossbow Spot的RSS源中提取最新新闻。 - 扩展程序利用了Chrome的通知API,以及RSS Feed处理机制来实现新闻的即时推送和展示。 5. 版权与免责声明: - 所有的新闻内容都是通过RSS Feed聚合而来,扩展程序本身不提供原创内容。 - 用户在使用插件时应遵守相关的版权和隐私政策。 6. 安装与使用: - 用户需要从Chrome网上应用店下载.crx格式的插件文件,即Crossbow_Spot_-_Latest_News_Update.crx。 - 安装后,插件会自动运行,并且用户可以对其进行配置以满足个人偏好。 从以上信息可以看出,该扩展程序为那些对Crossbow Spot感兴趣或需要密切跟进其更新的用户提供了一个便捷的解决方案,通过集成RSS源和Chrome通知机制,使得信息获取变得更加高效和及时。这对于需要实时更新信息的用户而言,具有一定的实用价值。同时,插件的未来发展计划中包括了多语言支持,这将使得更多的用户能够使用并从中受益。
recommend-type

"互动学习:行动中的多样性与论文攻读经历"

多样性她- 事实上SCI NCES你的时间表ECOLEDO C Tora SC和NCESPOUR l’Ingén学习互动,互动学习以行动为中心的强化学习学会互动,互动学习,以行动为中心的强化学习计算机科学博士论文于2021年9月28日在Villeneuve d'Asq公开支持马修·瑟林评审团主席法布里斯·勒菲弗尔阿维尼翁大学教授论文指导奥利维尔·皮耶昆谷歌研究教授:智囊团论文联合主任菲利普·普雷教授,大学。里尔/CRISTAL/因里亚报告员奥利维耶·西格德索邦大学报告员卢多维奇·德诺耶教授,Facebook /索邦大学审查员越南圣迈IMT Atlantic高级讲师邀请弗洛里安·斯特鲁布博士,Deepmind对于那些及时看到自己错误的人...3谢谢你首先,我要感谢我的两位博士生导师Olivier和Philippe。奥利维尔,"站在巨人的肩膀上"这句话对你来说完全有意义了。从科学上讲,你知道在这篇论文的(许多)错误中,你是我可以依
recommend-type

【Java内存管理终极指南】:一次性解决内存溢出、泄漏和性能瓶颈

![【Java内存管理终极指南】:一次性解决内存溢出、泄漏和性能瓶颈](https://community.cloudera.com/t5/image/serverpage/image-id/31614iEBC942A7C6D4A6A1/image-size/large?v=v2&px=999) 参考资源链接:[Net 内存溢出(System.OutOfMemoryException)的常见情况和处理方式总结](https://wenku.csdn.net/doc/6412b784be7fbd1778d4a95f?spm=1055.2635.3001.10343) # 1. Java内存模型