|
@@ -3,22 +3,18 @@ package com.kingdee.eas.custom.calcdailypay.task;
|
|
|
import com.kingdee.bos.BOSException;
|
|
|
import com.kingdee.bos.Context;
|
|
|
import com.kingdee.bos.dao.ormapping.ObjectUuidPK;
|
|
|
-import com.kingdee.bos.metadata.entity.*;
|
|
|
import com.kingdee.bos.rabbitmq.guava.Lists;
|
|
|
import com.kingdee.bos.util.BOSUuid;
|
|
|
import com.kingdee.eas.base.permission.UserInfo;
|
|
|
-import com.kingdee.eas.basedata.org.AdminOrgUnit;
|
|
|
import com.kingdee.eas.basedata.org.AdminOrgUnitInfo;
|
|
|
import com.kingdee.eas.basedata.org.CtrlUnitInfo;
|
|
|
import com.kingdee.eas.basedata.org.PositionInfo;
|
|
|
import com.kingdee.eas.basedata.person.PersonInfo;
|
|
|
import com.kingdee.eas.common.EASBizException;
|
|
|
import com.kingdee.eas.custom.calcdailypay.IInspectionRate;
|
|
|
-import com.kingdee.eas.custom.calcdailypay.InspectionRateCollection;
|
|
|
import com.kingdee.eas.custom.calcdailypay.InspectionRateFactory;
|
|
|
import com.kingdee.eas.custom.calcdailypay.InspectionRateInfo;
|
|
|
import com.kingdee.eas.framework.CoreBaseCollection;
|
|
|
-import com.kingdee.eas.framework.ObjectBaseInfo;
|
|
|
import com.kingdee.eas.util.app.DbUtil;
|
|
|
import com.kingdee.jdbc.rowset.IRowSet;
|
|
|
import com.kingdee.jdbc.rowset.impl.JdbcRowSet;
|
|
@@ -28,7 +24,6 @@ import org.apache.log4j.Logger;
|
|
|
|
|
|
import java.io.FileInputStream;
|
|
|
import java.sql.*;
|
|
|
-import java.text.ParseException;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.Calendar;
|
|
|
import java.util.List;
|
|
@@ -37,15 +32,24 @@ import java.util.Properties;
|
|
|
public class SyncMesTpmInsRateFacadeControllerBean extends AbstractSyncMesTpmInsRateFacadeControllerBean {
|
|
|
private static Logger logger =
|
|
|
Logger.getLogger("com.kingdee.eas.custom.calcdailypay.task.SyncMesTpmInsRateFacadeControllerBean");
|
|
|
- private Properties propt = new Properties();
|
|
|
+ private static Properties propt = new Properties();
|
|
|
+
|
|
|
+ public static void main(String[] args) throws BOSException {
|
|
|
+ System.setProperty("EAS_HOME","D:/project/kingdeeV90/Project_hty/mingQuanJiTuan");
|
|
|
+ SyncMesTpmInsRateFacadeControllerBean mes = new SyncMesTpmInsRateFacadeControllerBean();
|
|
|
+ String str = mes._syncMesToShr(new Context(),null,null,null);
|
|
|
+ System.out.println(str);
|
|
|
+ }
|
|
|
|
|
|
public SyncMesTpmInsRateFacadeControllerBean() {
|
|
|
try {
|
|
|
propt.load(new FileInputStream(String.valueOf(System.getProperty("EAS_HOME")) + "/server/properties/mingquan/syncMes.properties"));
|
|
|
} catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
logger.error(e);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
/**
|
|
|
* 开始日期、结束日期为空,则结束日期默认取当天,开始日期默认取当天减一天
|
|
|
* @description:
|
|
@@ -56,7 +60,7 @@ public class SyncMesTpmInsRateFacadeControllerBean extends AbstractSyncMesTpmIns
|
|
|
**/
|
|
|
@Override
|
|
|
protected String _syncMesToShr(Context ctx, String startDdjdate, String endDdjDate, String personNum) throws BOSException{
|
|
|
- super.syncMesToShr(ctx,startDdjdate,endDdjDate,personNum);
|
|
|
+ super._syncMesToShr(ctx,startDdjdate,endDdjDate,personNum);
|
|
|
try {
|
|
|
SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
List<String> param = Lists.newArrayList();
|
|
@@ -216,11 +220,15 @@ public class SyncMesTpmInsRateFacadeControllerBean extends AbstractSyncMesTpmIns
|
|
|
newdata.clear();
|
|
|
}
|
|
|
}catch (SQLException e){
|
|
|
+ e.printStackTrace();
|
|
|
logger.error(e);
|
|
|
+ return "err";
|
|
|
} catch (EASBizException e) {
|
|
|
+ e.printStackTrace();
|
|
|
logger.error(e);
|
|
|
+ return "err";
|
|
|
}
|
|
|
- return "";
|
|
|
+ return "ok";
|
|
|
}
|
|
|
|
|
|
|
|
@@ -244,11 +252,13 @@ public class SyncMesTpmInsRateFacadeControllerBean extends AbstractSyncMesTpmIns
|
|
|
// 建立连接
|
|
|
connection = DriverManager.getConnection(MesUrl, MesUserName, MesPassWord);
|
|
|
} catch (ClassNotFoundException | SQLException e) {
|
|
|
+ e.printStackTrace();
|
|
|
logger.error(e);
|
|
|
} finally {
|
|
|
}
|
|
|
return connection;
|
|
|
}
|
|
|
+
|
|
|
/**
|
|
|
* Mes数据库查询
|
|
|
* @description:
|
|
@@ -378,23 +388,23 @@ public class SyncMesTpmInsRateFacadeControllerBean extends AbstractSyncMesTpmIns
|
|
|
cleanup((ResultSet) null, (Statement) null, cn);
|
|
|
}
|
|
|
|
|
|
- public static void cleanup(Statement stmt) {
|
|
|
+ public static final void cleanup(Statement stmt) {
|
|
|
cleanup((ResultSet) null, stmt, (Connection) null);
|
|
|
}
|
|
|
|
|
|
- public static void cleanup(Statement stmt, Connection cn) {
|
|
|
+ public static final void cleanup(Statement stmt, Connection cn) {
|
|
|
cleanup((ResultSet) null, stmt, cn);
|
|
|
}
|
|
|
|
|
|
- public static void cleanup(ResultSet rs) {
|
|
|
+ public static final void cleanup(ResultSet rs) {
|
|
|
cleanup(rs, (Statement) null, (Connection) null);
|
|
|
}
|
|
|
|
|
|
- public static void cleanup(ResultSet rs, Statement stmt) {
|
|
|
+ public static final void cleanup(ResultSet rs, Statement stmt) {
|
|
|
cleanup(rs, stmt, (Connection) null);
|
|
|
}
|
|
|
|
|
|
- public static void cleanup(ResultSet rs, Statement stmt, Connection cn) {
|
|
|
+ public static final void cleanup(ResultSet rs, Statement stmt, Connection cn) {
|
|
|
SQLUtils.cleanup(rs, stmt, cn);
|
|
|
}
|
|
|
}
|