| | |
| | | import com.product.core.websocket.service.WebsocketMesssageServiceThread; |
| | | import com.product.module.sys.entity.SystemUser; |
| | | import com.product.util.BaseUtil; |
| | | import com.product.util.UnifySQLFunction; |
| | | |
| | | import org.apache.poi.ss.usermodel.IndexedColors; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | sql.append("\n left join product_oa_target_task tm on ts.task_uuid=tm.uuid"); |
| | | sql.append("\n left join product_sys_users u on ts.user_id=u.user_id"); |
| | | sql.append("\n left join product_oa_target_basic b on b.uuid=tm.target_uuid"); |
| | | sql.append("\n where ifnull(ts.user_id,s.user_id)=?"); |
| | | sql.append("\n where ").append(UnifySQLFunction.ifnull("ts.user_id", "s.user_id")).append(" = ? "); |
| | | sql.append("\n) t"); |
| | | String queryFilter = queryFilterService.getQueryFilter(fse); |
| | | if (!StringUtils.isEmpty(fse.getString("filter"))) { |
| | |
| | | sql.append(" a.target_uuid, "); |
| | | sql.append(" main_uuid, "); |
| | | sql.append(" a.uuid,a.target_type, "); |
| | | sql.append(" ifnull(b.target_task_name,c.target_name) target_name "); |
| | | sql.append(UnifySQLFunction.ifnull("b.target_task_name", "c.target_name")).append(" AS target_name "); |
| | | sql.append(" FROM "); |
| | | sql.append(" product_oa_target_report_config_sub a "); |
| | | sql.append(" LEFT JOIN product_oa_target_task b ON a.target_uuid = b.uuid "); |
| | |
| | | sql.append(" cs.backstepping_time, "); |
| | | sql.append(" tt.datetime_range, "); |
| | | sql.append(" tt.datetime_range_type, "); |
| | | sql.append(" ifnull(tt.target_task_name,tb.target_name) target_name, "); |
| | | sql.append(UnifySQLFunction.ifnull("tt.target_task_name", "tb.target_name")).append(" AS target_name, "); |
| | | sql.append(" tb.uuid target_uuid, "); |
| | | sql.append(" tb.org_value_field, "); |
| | | sql.append(" tb.datetime_value_field, "); |