完善了重点工程AI报警的后续流程
parent
7068c2f15e
commit
2367ea3846
|
@ -78,7 +78,12 @@ public class AppKeyprojectPunishController extends BaseController {
|
|||
keyprote.put("KEYPROJECTCHECK_ID",pd.getString("KEYPROJECTCHECK_ID"));
|
||||
keyprote = keyprojectcheckService.findById(keyprote);
|
||||
PageData outSource = new PageData();
|
||||
outSource.put("OUTSOURCED_ID",keyprote.getString("OUTSOURCED_ID"));
|
||||
// 如果是AI报警生成的隐患,不走安全环保检查主表,直接使用FOREIGN_ID
|
||||
if ("1".equals(hidden.getString("SOURCE"))){
|
||||
outSource.put("OUTSOURCED_ID",hidden.getString("FOREIGN_ID"));
|
||||
}else{
|
||||
outSource.put("OUTSOURCED_ID",keyprote.getString("OUTSOURCED_ID"));
|
||||
}
|
||||
outSource = outsourcedService.findById(outSource);
|
||||
if(StringUtils.isNotBlank(outSource.getString("IS_SMS"))&&StringUtils.equals("0",outSource.getString("IS_SMS"))){
|
||||
//发送短信 pd中 PERSONNELMANAGEMENT_ID 对应 `qa-gwj-regulatory`.`BUS_PERSONNELMANAGEMENT` 表中 PERSONNELMANAGEMENT_ID 获取到 PHONENUM 手机号字段 发送短信
|
||||
|
|
|
@ -314,7 +314,7 @@
|
|||
LEFT JOIN `qa-gwj-regulatory`.vi_all_corp vac on vua.CORPINFO_ID = vac.CORPINFO_ID
|
||||
left join `qa-gwj-regulatory`.bus_personnelmanagement p on p.PERSONNELMANAGEMENT_ID = f.UNITS_PIC
|
||||
LEFT JOIN ( select count(c.KEYPROJECTCHECK_ID) co, c.OUTSOURCED_ID from `qa-gwj-prevention`.BUS_KEYPROJECTCHECK c where c.ISDELETE = '0' group by c.OUTSOURCED_ID ) cc on cc.OUTSOURCED_ID = f.OUTSOURCED_ID
|
||||
left join ( SELECT t.OUTSOURCED_ID, COUNT( t.HIDDEN_ID ) HIDDEN_COUNT
|
||||
left join ( SELECT t.OUTSOURCED_ID, COUNT( t.HIDDEN_ID ) HIDDEN_COUNT, t.SOURCE SOURCE, t.CREATOR CREATOR
|
||||
FROM
|
||||
( SELECT IFNULL( k.OUTSOURCED_ID, h.FOREIGN_ID ) OUTSOURCED_ID, h.* FROM `qa-gwj-prevention`.bus_keyproject_hidden h LEFT JOIN `qa-gwj-prevention`.bus_keyprojectcheck k ON h.FOREIGN_ID = k.KEYPROJECTCHECK_ID and h.ISDELETE = '0') t GROUP BY t.OUTSOURCED_ID ) h on h.OUTSOURCED_ID = f.OUTSOURCED_ID
|
||||
where f.ISDELETE = '0'
|
||||
|
@ -376,6 +376,7 @@
|
|||
or f.JURISDICTION_UNIT LIKE CONCAT(CONCAT('%', #{pd.DeptId}),'%')
|
||||
or f.PUNISH_THE_PERSON LIKE CONCAT(CONCAT('%', #{pd.UserId}),'%')
|
||||
or f.CREATOR = #{pd.UserId}
|
||||
or (h.CREATOR = #{pd.UserId} and h.SOURCE = '1')
|
||||
)
|
||||
</if>
|
||||
ORDER BY
|
||||
|
@ -500,9 +501,9 @@
|
|||
LEFT JOIN `qa-gwj-prevention`.vi_user_all vua on f.CREATOR = vua.USER_ID
|
||||
LEFT JOIN `qa-gwj-regulatory`.vi_all_corp vac on vua.CORPINFO_ID = vac.CORPINFO_ID
|
||||
left join `qa-gwj-regulatory`.bus_personnelmanagement p on p.PERSONNELMANAGEMENT_ID = f.UNITS_PIC
|
||||
left join (SELECT PUN.OUTSOURCED_ID,COUNT( distinct PUN.HIDDEN_ID) co FROM (
|
||||
left join (SELECT PUN.OUTSOURCED_ID,COUNT( distinct PUN.HIDDEN_ID) co,PUN.SOURCE SOURCE,PUN.CREATOR CREATOR FROM (
|
||||
SELECT
|
||||
f.HIDDEN_ID,ifnull(bo.OUTSOURCED_ID,boai.OUTSOURCED_ID) OUTSOURCED_ID
|
||||
f.HIDDEN_ID,ifnull(bo.OUTSOURCED_ID,boai.OUTSOURCED_ID) OUTSOURCED_ID,f.SOURCE,f.CREATOR
|
||||
FROM
|
||||
`qa-gwj-prevention`.BUS_KEYPROJECT_HIDDEN f
|
||||
LEFT JOIN `qa-gwj-prevention`.bus_keyprojectcheck keycheck ON keycheck.KEYPROJECTCHECK_ID = f.FOREIGN_ID
|
||||
|
@ -528,7 +529,7 @@
|
|||
pcij.NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
)
|
||||
</if>
|
||||
and f.PUNISH_THE_PERSON LIKE CONCAT( CONCAT( '%', #{pd.PUNISHUser} ), '%' )
|
||||
and (f.PUNISH_THE_PERSON LIKE CONCAT( CONCAT( '%', #{pd.PUNISHUser} ), '%' ) or (cfsl.SOURCE='1' and cfsl.CREATOR = #{pd.PUNISHUser}))
|
||||
AND f.STATE = '1'
|
||||
ORDER BY
|
||||
cfsl.co DESC,
|
||||
|
|
Loading…
Reference in New Issue