|
|
@@ -9,6 +9,7 @@ import java.util.function.Function;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
+import com.lc.ibps.base.core.util.Collections;
|
|
|
import com.lc.ibps.base.framework.table.ICommonDao;
|
|
|
import org.slf4j.event.Level;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
@@ -1465,6 +1466,10 @@ public class BpmInitiatedProvider extends GenericProvider implements IBpmInitiat
|
|
|
StopWatchUtil.stopAndStartNewLocal(localId, step, "my completed count");
|
|
|
ICommonDao<?> commonDao = AppUtil.getBean(ICommonDao.class);
|
|
|
String currentUserId = ContextUtil.getCurrentUserId();
|
|
|
+ List<Map<String,Object>> object3 =
|
|
|
+ (List<Map<String, Object>>) commonDao.query(" SELECT entity.parent_id_ as id_ FROM ibps_party_entity entity, ibps_party_employee em " +
|
|
|
+ " WHERE entity.party_type_='position' AND entity.depth_=3 AND em.id_=#{p0} AND FIND_IN_SET(entity.id_,em.positions_)" , new String[]{currentUserId});
|
|
|
+
|
|
|
try {
|
|
|
// final Infobox infobox = new Infobox();
|
|
|
// myCompleted(multiTaskType, name, executor, workerWrappers, list, infobox);
|
|
|
@@ -1502,11 +1507,18 @@ public class BpmInitiatedProvider extends GenericProvider implements IBpmInitiat
|
|
|
infobox2.setAlias("myDevices");
|
|
|
infobox2.setDataText("-1");
|
|
|
infobox2.setAccessToken(ContextUtil.getCurrentAccessToken());
|
|
|
- List<Map<String,Object>> object3 =
|
|
|
- (List<Map<String, Object>>) commonDao.query("SELECT COUNT(1) AS total FROM t_mjsbwhbyjlby v,ibps_party_employee u " +
|
|
|
- " WHERE FIND_IN_SET(v.bian_zhi_bu_men_, u.positions_) AND u.id_=#{p0} " +
|
|
|
- " AND DATE(v.create_time_)=CURDATE() AND shi_fou_guo_shen_='待处理'", new String[]{currentUserId});
|
|
|
- infobox2.setDataText(object3.get(0).get("total").toString());
|
|
|
+ if(Collections.isEmpty(object3)) {
|
|
|
+ List<Map<String, Object>> object4 =
|
|
|
+ (List<Map<String, Object>>) commonDao.query("SELECT COUNT(1) AS total FROM t_mjsbwhbyjlby v,ibps_party_employee u " +
|
|
|
+ " WHERE FIND_IN_SET(v.bian_zhi_bu_men_, u.positions_) AND u.id_=#{p0} " +
|
|
|
+ " AND DATE(v.create_time_)=CURDATE() AND shi_fou_guo_shen_='待处理'", new String[]{currentUserId});
|
|
|
+ infobox2.setDataText(object4.get(0).get("total").toString());
|
|
|
+ }else{
|
|
|
+ List<Map<String, Object>> object4 =
|
|
|
+ (List<Map<String, Object>>) commonDao.query("SELECT COUNT(1) AS total FROM t_mjsbwhbyjlby " +
|
|
|
+ " WHERE di_dian_=#{p0} AND DATE(create_time_)=CURDATE() AND shi_fou_guo_shen_='待处理'", new String[]{(String)object3.get(0).get("id_")});
|
|
|
+ infobox2.setDataText(object4.get(0).get("total").toString());
|
|
|
+ }
|
|
|
list.add(infobox2);
|
|
|
} catch (Exception e) {
|
|
|
logger.error(e.getMessage(), e);
|
|
|
@@ -1524,11 +1536,19 @@ public class BpmInitiatedProvider extends GenericProvider implements IBpmInitiat
|
|
|
infobox2.setAlias("myFacility");
|
|
|
infobox2.setDataText("-1");
|
|
|
infobox2.setAccessToken(ContextUtil.getCurrentAccessToken());
|
|
|
- List<Map<String,Object>> object3 =
|
|
|
- (List<Map<String, Object>>) commonDao.query("SELECT COUNT(1) AS total" +
|
|
|
- " FROM v_facs_summary_daily facs, ibps_party_employee emp" +
|
|
|
- " WHERE shi_fou_guo_shen_='待处理' and FIND_IN_SET(bian_zhi_bu_men_,emp.positions_) AND emp.id_=#{p0}" , new String[]{currentUserId});
|
|
|
- infobox2.setDataText(object3.get(0).get("total").toString());
|
|
|
+ if(Collections.isEmpty(object3)) {
|
|
|
+ List<Map<String, Object>> object4 =
|
|
|
+ (List<Map<String, Object>>) commonDao.query("SELECT COUNT(1) AS total" +
|
|
|
+ " FROM v_facs_summary_daily facs, ibps_party_employee emp" +
|
|
|
+ " WHERE shi_fou_guo_shen_='待处理' and FIND_IN_SET(bian_zhi_bu_men_,emp.positions_) AND emp.id_=#{p0}", new String[]{currentUserId});
|
|
|
+ infobox2.setDataText(object4.get(0).get("total").toString());
|
|
|
+ }else{
|
|
|
+ List<Map<String, Object>> object4 =
|
|
|
+ (List<Map<String, Object>>) commonDao.query("SELECT COUNT(1) AS total" +
|
|
|
+ " FROM v_facs_summary_daily " +
|
|
|
+ " WHERE shi_fou_guo_shen_='待处理' and di_dian_=#{p0}", new String[]{(String)object3.get(0).get("id_")});
|
|
|
+ infobox2.setDataText(object4.get(0).get("total").toString());
|
|
|
+ }
|
|
|
list.add(infobox2);
|
|
|
} catch (Exception e) {
|
|
|
logger.error(e.getMessage(), e);
|