package com.kingdee.eas.custom.facade.departmentalreporting; import java.sql.SQLException; import org.apache.log4j.Logger; import com.kingdee.bos.BOSException; import com.kingdee.bos.Context; import com.kingdee.eas.base.param.IParamControl; import com.kingdee.eas.base.param.ParamControlFactory; import com.kingdee.eas.custom.utils.SendUtils; import com.kingdee.eas.mobile.BOSMsgTypeEnum; import com.kingdee.eas.mobile.MimeTypeEnum; import com.kingdee.eas.mobile.PriorityEnum; import com.kingdee.eas.mobile.msg.util.MsgUtil; import com.kingdee.eas.util.app.DbUtil; import com.kingdee.jdbc.rowset.IRowSet; /** * 部门提报预警 * @author ISSUSER * */ public class DepartreportingFacadeControllerBean extends AbstractDepartreportingFacadeControllerBean { private static Logger logger = Logger.getLogger("com.kingdee.eas.custom.facade.departmentalreporting.DepartreportingFacadeControllerBean"); @Override public void __departReporting(Context ctx) { String sql = "select c.fid,d.fid as id, d.fname_l1 from T_WFR_WFROLE a left join T_WFR_PERSONROLE b \r\n" + "on a.fid=b.froleid left join T_PM_USER c on b.FPSERSONID = c.FPERSONID left join T_BD_Person d on d.fid=c.FPersonId where a.FNUMBER in ('22') and c.fid is not null"; logger.error("部门审批流人的SQL:" + sql); try { // 获取链接 IParamControl ipc = ParamControlFactory.getLocalInstance(ctx); String shrEnvironmentIP = ipc.getParamValue(null, "shrEnvironmentIP"); String website = shrEnvironmentIP + "/home.do"; IRowSet rowSet = DbUtil.executeQuery(ctx, sql); while (rowSet.next()) { StringBuffer strBuffer = new StringBuffer(); String title="reminder of providing data related to salary"; strBuffer.append("
"); strBuffer.append("This is a kind reminder that if your department has data regarding salary needing to be paid or deducted this month, please provide it via the following link by the "+getFname(ctx)+".