<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<task id="__KwyB0evY2swsD4l8w2V">
  <name>背晒留用人员更新</name>
  <parentId>__LgZds5MVHW3o08T7UcX</parentId>
  <applicationid>__LgZds5MVHW3o08T7UcX</applicationid>
  <description></description>
  <type>1</type>
  <runningTime>2023-03-15T14:10:45.985+08:00</runningTime>
  <interval>1</interval>
  <period>2</period>
  <runtimes>0</runtimes>
  <terminateScript><![CDATA[]]></terminateScript>
  <taskScript><![CDATA[(function(){
  // var sql = "update tlk_qualify_person_apply set ITEM_BACKGROUNDSTATUS = '1' where id in (SELECT id FROM (SELECT a.item_documentid,a.item_policeSuggestedTreatment,a.item_policeStatus,a.item_companyStatus,a.domainid,b.id,b.item_name FROM baibaodunflow.tlk_ImportantMan a join tlk_qualify_person_apply b on a.ITEM_DOCUMENTID = b.ITEM_IDCARDNO and b.ITEM_APPLYSTATUS = '0' and (b.ITEM_backgroundStatus = '2' or b.ITEM_backgroundStatus = '5') and a.domainid = b.domainid  UNION ALL SELECT a.item_documentid,a.item_policeSuggestedTreatment,a.item_policeStatus,a.item_companyStatus,a.domainid,b.id,b.item_name FROM baibaodunflow.tlk_EscapeMan a join tlk_qualify_person_apply b on a.ITEM_DOCUMENTID = b.ITEM_IDCARDNO and b.ITEM_APPLYSTATUS = '0' and (b.ITEM_backgroundStatus = '2' or b.ITEM_backgroundStatus = '5') and a.domainid = b.domainid UNION ALL SELECT a.item_documentid,a.item_policeSuggestedTreatment,a.item_policeStatus,a.item_companyStatus,a.domainid,b.id,b.item_name FROM baibaodunflow.tlk_DrugMan a join tlk_qualify_person_apply b on a.ITEM_DOCUMENTID = b.ITEM_IDCARDNO and b.ITEM_APPLYSTATUS = '0' and (b.ITEM_backgroundStatus = '2' or b.ITEM_backgroundStatus = '5') and a.domainid = b.domainid UNION ALL SELECT a.item_documentid,a.item_policeSuggestedTreatment,a.item_policeStatus,a.item_companyStatus,a.domainid,b.id,b.item_name FROM baibaodunflow.tlk_ImportantInfoError a join tlk_qualify_person_apply b on a.ITEM_DOCUMENTID = b.ITEM_IDCARDNO and b.ITEM_APPLYSTATUS = '0' and (b.ITEM_backgroundStatus = '2' or b.ITEM_backgroundStatus = '5') and a.domainid = b.domainid) questionMan WHERE 1 = 1 AND ( item_policeStatus = '1' OR item_companyStatus = '1' ) AND item_policeSuggestedTreatment = '3' group by item_documentid)";
  var sql = "update tlk_qualify_person_apply set ITEM_BACKGROUNDSTATUS = '1' where id in (SELECT id FROM (SELECT a.item_documentid,a.item_policeSuggestedTreatment,a.item_policeStatus,a.item_companyStatus,a.domainid,b.id,b.item_name FROM baibaodunflow.tlk_ImportantMan a join tlk_qualify_person_apply b on a.ITEM_DOCUMENTID = b.ITEM_IDCARDNO and b.ITEM_APPLYSTATUS = '0' and (b.ITEM_backgroundStatus = '2' or b.ITEM_backgroundStatus = '5' OR a.ITEM_policeSuggestedTreatment = '3') and a.domainid = b.domainid  UNION ALL SELECT a.item_documentid,a.item_policeSuggestedTreatment,a.item_policeStatus,a.item_companyStatus,a.domainid,b.id,b.item_name FROM baibaodunflow.tlk_EscapeMan a join tlk_qualify_person_apply b on a.ITEM_DOCUMENTID = b.ITEM_IDCARDNO and b.ITEM_APPLYSTATUS = '0' and (b.ITEM_backgroundStatus = '2' or b.ITEM_backgroundStatus = '5' OR a.ITEM_policeSuggestedTreatment = '3') and a.domainid = b.domainid UNION ALL SELECT a.item_documentid,a.item_policeSuggestedTreatment,a.item_policeStatus,a.item_companyStatus,a.domainid,b.id,b.item_name FROM baibaodunflow.tlk_DrugMan a join tlk_qualify_person_apply b on a.ITEM_DOCUMENTID = b.ITEM_IDCARDNO and b.ITEM_APPLYSTATUS = '0' and (b.ITEM_backgroundStatus = '2' or b.ITEM_backgroundStatus = '5' OR a.ITEM_policeSuggestedTreatment = '3') and a.domainid = b.domainid UNION ALL SELECT a.item_documentid,a.item_policeSuggestedTreatment,a.item_policeStatus,a.item_companyStatus,a.domainid,b.id,b.item_name FROM baibaodunflow.tlk_ImportantInfoError a join tlk_qualify_person_apply b on a.ITEM_DOCUMENTID = b.ITEM_IDCARDNO and b.ITEM_APPLYSTATUS = '0' and (b.ITEM_backgroundStatus = '2' or b.ITEM_backgroundStatus = '5' OR a.ITEM_policeSuggestedTreatment = '3') and a.domainid = b.domainid) questionMan WHERE 1 = 1 AND ( item_policeStatus = '1' OR item_companyStatus = '1' ) AND item_policeSuggestedTreatment = '3' group by item_documentid)";
  updateByDSName("tms",sql);
})()]]></taskScript>
  <modifyTime>2023-03-15T09:29:14.000+08:00</modifyTime>
  <creator>Admin</creator>
  <creatorid>Ai6hllhNjS2ull9TKGb</creatorid>
  <totalRuntimes>0</totalRuntimes>
  <state>0</state>
  <startupType>1</startupType>
  <dayOfMonth>1</dayOfMonth>
  <repeatTimes>0</repeatTimes>
  <frequency>0</frequency>
  <executedCount>0</executedCount>
  <rDate></rDate>
  <rTime>14:10:45</rTime>
</task>