标准预警导出
This commit is contained in:
@@ -17,4 +17,6 @@ public interface EarlyWarningEODao extends BaseMapper<EarlyWarningEO> {
|
|||||||
|
|
||||||
List<WarningExportVO> exportWarning(@Param("idList") List<String> ids);
|
List<WarningExportVO> exportWarning(@Param("idList") List<String> ids);
|
||||||
|
|
||||||
|
String exportShow(@Param("str") List<String> str);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+9
@@ -17,6 +17,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Service("EarlyWarningEOService")
|
@Service("EarlyWarningEOService")
|
||||||
@@ -123,6 +124,14 @@ public class EarlyWarningEOServiceImpl extends ServiceImpl<EarlyWarningEODao, Ea
|
|||||||
@Override
|
@Override
|
||||||
public List<WarningExportVO> getExportExcel(WarningExcelVO excelVO){
|
public List<WarningExportVO> getExportExcel(WarningExcelVO excelVO){
|
||||||
List<WarningExportVO> standWarningEOList = earlyWarningEODao.exportWarning( excelVO.getIds());
|
List<WarningExportVO> standWarningEOList = earlyWarningEODao.exportWarning( excelVO.getIds());
|
||||||
|
for(WarningExportVO vo:standWarningEOList){
|
||||||
|
if (vo.getApplyType() == null || vo.getApplyType().equals("")){
|
||||||
|
vo.setApplyTypeShow(null);
|
||||||
|
}else {
|
||||||
|
List<String> str = Arrays.asList(vo.getApplyType().split(","));
|
||||||
|
vo.setApplyTypeShow(earlyWarningEODao.exportShow(str));
|
||||||
|
}
|
||||||
|
}
|
||||||
// IPage<StandWarningEO> standWarningEOIPage = earlyWarningEODao.selectWarningPage(null, null, null);
|
// IPage<StandWarningEO> standWarningEOIPage = earlyWarningEODao.selectWarningPage(null, null, null);
|
||||||
|
|
||||||
return standWarningEOList;
|
return standWarningEOList;
|
||||||
|
|||||||
+13
-6
@@ -99,7 +99,6 @@
|
|||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
<include refid="export_column"/> ,
|
<include refid="export_column"/> ,
|
||||||
dicType.DIC_TYPE_NAME AS applyTypeShow,
|
|
||||||
attr.CLLX AS APPLY_TYPE ,
|
attr.CLLX AS APPLY_TYPE ,
|
||||||
attr.ZRGCS AS DUTY_ENGINEER ,
|
attr.ZRGCS AS DUTY_ENGINEER ,
|
||||||
NULL AS ITEM_ID ,
|
NULL AS ITEM_ID ,
|
||||||
@@ -115,7 +114,6 @@
|
|||||||
FROM sar_stand_warning AS warning
|
FROM sar_stand_warning AS warning
|
||||||
LEFT JOIN sar_standards_info AS sarInfo on sarInfo.id=warning.STAND_ID
|
LEFT JOIN sar_standards_info AS sarInfo on sarInfo.id=warning.STAND_ID
|
||||||
LEFT JOIN sar_stand_attr_info AS attr on attr.STAND_ID=warning.STAND_ID
|
LEFT JOIN sar_stand_attr_info AS attr on attr.STAND_ID=warning.STAND_ID
|
||||||
LEFT JOIN ts_dictype as dicType on (attr.CLLX = dicType.DIC_TYPE_CODE AND attr.CLLX !=null AND attr.CLLX != '')
|
|
||||||
<where>
|
<where>
|
||||||
POWER = '1'
|
POWER = '1'
|
||||||
AND (MARK = 'stand')
|
AND (MARK = 'stand')
|
||||||
@@ -137,7 +135,6 @@
|
|||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
<include refid="export_column"/> ,
|
<include refid="export_column"/> ,
|
||||||
dicType.DIC_TYPE_NAME AS applyTypeShow,
|
|
||||||
items.APPLY_ARCTIC AS APPLY_TYPE ,
|
items.APPLY_ARCTIC AS APPLY_TYPE ,
|
||||||
items.DUTY_ENGINEER AS DUTY_ENGINEER ,
|
items.DUTY_ENGINEER AS DUTY_ENGINEER ,
|
||||||
items.ID AS ITEM_ID ,
|
items.ID AS ITEM_ID ,
|
||||||
@@ -155,7 +152,6 @@
|
|||||||
LEFT JOIN sar_standards_info AS sarInfo ON sarInfo.id = warning.STAND_ID
|
LEFT JOIN sar_standards_info AS sarInfo ON sarInfo.id = warning.STAND_ID
|
||||||
LEFT JOIN sar_stand_items AS items ON items.ID = warning.ITEM_ID
|
LEFT JOIN sar_stand_items AS items ON items.ID = warning.ITEM_ID
|
||||||
LEFT JOIN sar_stand_attr_info AS attr ON attr.STAND_ID = warning.STAND_ID
|
LEFT JOIN sar_stand_attr_info AS attr ON attr.STAND_ID = warning.STAND_ID
|
||||||
LEFT JOIN ts_dictype as dicType on (dicType.DIC_TYPE_CODE = items.APPLY_ARCTIC AND items.APPLY_ARCTIC !=null AND items.APPLY_ARCTIC != '')
|
|
||||||
<where>
|
<where>
|
||||||
POWER = '1'
|
POWER = '1'
|
||||||
AND (MARK = 'item')
|
AND (MARK = 'item')
|
||||||
@@ -293,6 +289,17 @@
|
|||||||
ORDER BY warning_date.SSRQ_MIN
|
ORDER BY warning_date.SSRQ_MIN
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
<select id="exportShow" resultType="java.lang.String">
|
||||||
|
SELECT
|
||||||
|
group_concat( td.DIC_TYPE_NAME SEPARATOR ',' ) as applyTypeShow
|
||||||
|
FROM
|
||||||
|
ts_dictype td
|
||||||
|
WHERE
|
||||||
|
td.DIC_TYPE_CODE
|
||||||
|
IN
|
||||||
|
<foreach collection="str" item="dicTypeCode" open="(" close=")" separator=",">
|
||||||
|
<!-- 每个遍历需要生成的串 -->
|
||||||
|
#{dicTypeCode}
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
Reference in New Issue
Block a user