|
@@ -1552,6 +1552,39 @@ public class BpmInitiatedProvider extends GenericProvider implements IBpmInitiat
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
|
logger.error(e.getMessage(), e);
|
|
logger.error(e.getMessage(), e);
|
|
|
}
|
|
}
|
|
|
|
|
+ //========== 待弃置样品
|
|
|
|
|
+ StopWatchUtil.initAndStartLocal(localId, Level.DEBUG, step, "new discard count");
|
|
|
|
|
+ try{
|
|
|
|
|
+ Infobox infobox5 = new Infobox();
|
|
|
|
|
+ infobox5.setIcon("ibps-icon-file-o");
|
|
|
|
|
+ infobox5.setColor(Infobox.COLOR_BLUE);
|
|
|
|
|
+ infobox5.setDataContent("待弃置样品");
|
|
|
|
|
+ infobox5.setUrl("myDiscard");
|
|
|
|
|
+ infobox5.setAlias("myDiscard");
|
|
|
|
|
+ infobox5.setDataText("-1");
|
|
|
|
|
+ infobox5.setAccessToken(ContextUtil.getCurrentAccessToken());
|
|
|
|
|
+ //带弃置样品不依据是否检验科最判断查询,依据当前用户的主部门进行判断
|
|
|
|
|
+ //1、获取当前用户的主部门,默认取第一个主部门,不排除用户有多个主部门的情况,
|
|
|
|
|
+ // 虽然用户有多个主部门时无法登入,需要预防有沙雕瞎鸡儿操作,此处不仅指客户,还有不法分子,emmmm____
|
|
|
|
|
+ List<Map<String, Object>> query5 =
|
|
|
|
|
+ (List<Map<String, Object>>) commonDao.query("SELECT MAIN_PID_ FROM ibps_party_rel WHERE MAIN_TYPE_ = 'position' AND SUB_PID_ = #{p0} AND BIZ_ = 'mainPost'", new String[]{currentUserId});
|
|
|
|
|
+ //2、依据主部门进行数据的查询及统计,只统计截止日期是今天的
|
|
|
|
|
+ String sqlDiscarded = "";
|
|
|
|
|
+ List<Map<String, Object>> discarded = new ArrayList<>();
|
|
|
|
|
+ if(BeanUtils.isNotEmpty(query5) && BeanUtils.isNotEmpty(query5.get(0).get("MAIN_PID_").toString())) {
|
|
|
|
|
+ sqlDiscarded = "select count(id_) as num_ from t_jyhypjlb where bian_zhi_bu_men_ = #{p0} and nao_ji_ye_ > '' "+
|
|
|
|
|
+ " and DATE_FORMAT(nao_ji_ye_, '%Y-%m-%d') = DATE_FORMAT(NOW(), '%Y-%m-%d') ";
|
|
|
|
|
+ discarded = (List<Map<String, Object>>) commonDao.query(sqlDiscarded ,new String[]{query5.get(0).get("MAIN_PID_").toString()});
|
|
|
|
|
+ }else{
|
|
|
|
|
+ sqlDiscarded = "select count(id_) as num_ from t_jyhypjlb where nao_ji_ye_ > '' "+
|
|
|
|
|
+ " and DATE_FORMAT(nao_ji_ye_, '%Y-%m-%d') = DATE_FORMAT(NOW(), '%Y-%m-%d') ";
|
|
|
|
|
+ discarded = (List<Map<String, Object>>) commonDao.query(sqlDiscarded);
|
|
|
|
|
+ }
|
|
|
|
|
+ infobox5.setDataText(discarded.get(0).get("num_").toString());
|
|
|
|
|
+ list.add(infobox5);
|
|
|
|
|
+ }catch (Exception e){
|
|
|
|
|
+ logger.error(e.getMessage(), e);
|
|
|
|
|
+ }
|
|
|
//========== 新建流程
|
|
//========== 新建流程
|
|
|
StopWatchUtil.initAndStartLocal(localId, Level.DEBUG, step, "new process count");
|
|
StopWatchUtil.initAndStartLocal(localId, Level.DEBUG, step, "new process count");
|
|
|
try {
|
|
try {
|