/**
* 添加预案关联
* @author ecy
*/
@Override
public void addPlanGroupMap(Connection conn,PlanInfo planInfo) throws Exception {
PreparedStatement pst = null;
String addPlanGroupMapByPersonSQL = "insert into SNOW_PLAN_PERSON_MAP (GROUP_ID,PERSON_ID) VALUES(?,?)";
pst = DBCommon.getPsm(conn, addPlanGroupMapByPersonSQL);
if(planInfo.getPlanGroupList()!=null && planInfo.getPlanGroupList().size()>0){
for(int i=0;i<planInfo.getPlanGroupList().size();i++){
pst.setString(1, planInfo.getPlanGroupList().get(i).getGroupID());
if(planInfo.getPlanGroupList().get(i).getPersonList()!=null && planInfo.getPlanGroupList().get(i).getPersonList().size()>0){
for(int j=0;j<planInfo.getPlanGroupList().get(i).getPersonList().size();j++){
pst.setString(2, planInfo.getPlanGroupList().get(i).getPersonList().get(j).getPersonID());
pst.addBatch();
}
}
}
pst.executeBatch();
}
String addPlanGroupMapByCarSQL = "insert into SNOW_PLAN_CAR_MAP (GROUP_ID,CAR_ID) VALUES (?,?)";
pst = DBCommon.getPsm(conn, addPlanGroupMapByCarSQL);
if(planInfo.getPlanGroupList()!=null && planInfo.getPlanGroupList().size()>0){
for(int i=0;i<planInfo.getPlanGroupList().size();i++){
pst.setString(1, planInfo.getPlanGroupList().get(i).getGroupID());
if(planInfo.getPlanGroupList().get(i).getCarList()!=null && planInfo.getPlanGroupList().get(i).getCarList().size()>0){
for(int j=0;j<planInfo.getPlanGroupList().get(i).getCarList().size();j++){
pst.setString(2, planInfo.getPlanGroupList().get(i).getCarList().get(j).getCarID());
pst.addBatch();
}
}
}
pst.executeBatch();
}
String addPlanGroupMapByCommandCarSQL = "insert into SNOW_PLAN_COMMAND_CAR_MAP (GROUP_ID,COMMAND_CAR_ID) VALUES (?,?)";
pst = DBCommon.getPsm(conn, addPlanGroupMapByCommandCarSQL);
if(planInfo.getPlanGroupList()!=null && planInfo.getPlanGroupList().size()>0){
for(int i=0;i<planInfo.getPlanGroupList().size();i++){
pst.setString(1, planInfo.getPlanGroupList().get(i).getGroupID());
if(planInfo.getPlanGroupList().get(i).getCommandCarList()!=null && planInfo.getPlanGroupList().get(i).getCommandCarList().size()>0){
for(int j=0;j<planInfo.getPlanGroupList().get(i).getCommandCarList().size();j++){
pst.setString(2, planInfo.getPlanGroupList().get(i).getCommandCarList().get(j).getCommandCarID());
pst.addBatch();
}
}
}
pst.executeBatch();
}
String addPlanGroupMapByStockSQL = "insert into SNOW_PLAN_STOCK_MAP (GROUP_ID,STOCKID) VALUES (?,?)";
pst = DBCommon.getPsm(conn, addPlanGroupMapByStockSQL);
if(planInfo.getPlanGroupList()!=null && planInfo.getPlanGroupList().size()>0){
for(int i=0;i<planInfo.getPlanGroupList().size();i++){
pst.setString(1, planInfo.getPlanGroupList().get(i).getGroupID());
if(planInfo.getPlanGroupList().get(i).getStockList()!=null && planInfo.getPlanGroupList().get(i).getStockList().size()>0){
for(int j=0;j<planInfo.getPlanGroupList().get(i).getStockList().size();j++){
pst.setString(2, planInfo.getPlanGroupList().get(i).getStockList().get(j).getStockID());
pst.addBatch();
}
}
}
pst.executeBatch();
}
String addPlanGroupMapByAreaSQL = "insert into SNOW_PLAN_GROUP_AREA (ROAD_CODE,ROAD_NAME,direction,STAKE_START,STAKE_END,REMARKS,group_id,group_area_id) VALUES (?,?,?,?,?,?,?,?)";
pst = DBCommon.getPsm(conn, addPlanGroupMapByAreaSQL);
if(planInfo.getPlanGroupList()!=null && planInfo.getPlanGroupList().size()>0){
for(int i=0;i<planInfo.getPlanGroupList().size();i++){
if(planInfo.getPlanGroupList().get(i).getGroupAreaList()!=null && planInfo.getPlanGroupList().get(i).getGroupAreaList().size()>0){
for(int j=0;j<planInfo.getPlanGroupList().get(i).getGroupAreaList().size();j++){
String id = IDGenerator.generateUID();
pst.setString(1, planInfo.getPlanGroupList().get(i).getGroupAreaList().get(j).getRoadCode());
pst.setString(2, planInfo.getPlanGroupList().get(i).getGroupAreaList().get(j).getRoadName());
pst.setString(3, planInfo.getPlanGroupList().get(i).getGroupAreaList().get(j).getDirection());
pst.setString(4, planInfo.getPlanGroupList().get(i).getGroupAreaList().get(j).getStartStake());
pst.setString(5, planInfo.getPlanGroupList().get(i).getGroupAreaList().get(j).getEndStake());
pst.setString(6, planInfo.getPlanGroupList().get(i).getGroupAreaList().get(j).getRemarks());
pst.setString(7, planInfo.getPlanGroupList().get(i).getGroupID());
pst.setString(8, id);
pst.addBatch();
}
}
}
pst.executeBatch();
}
if(pst!=null){
pst.close();
}
}
分享到:
相关推荐
FE1.1s 参考设计原理图。FE1_1S_SSOP28_V2_6.DSN
三旺 MODEL7302(单FE1光纤MODEM)说明书pdf,三旺 MODEL7302(单FE1光纤MODEM)说明书
Ba0.5Sr0.5Fe1-xNixO3-混合导体氧分离膜材料的制备与研究,钱建峰,董学良,本文采用EDTA-柠檬酸络合法制备了具有钙钛矿结构的Ba0.5Sr0.5Fe1-xNixO3-(x=0,0.03,0.05,0.07,0.1)混合导体氧化物。借助于X射线衍射,...
Romax_FE1-箱体影响
__UNI__8FE1A4B.wgt
82816d71948445f6b6139c9fe1e71747 3.do
IOS应用源码——plamoni-SiriProxy-1fe1dc3.rar
三旺 MODEL7212(10/100M以太网FE1网桥)产品说明书pdf,三旺 MODEL7212(10/100M以太网FE1网桥)产品说明书
三旺 MODEL7221/232(FE1/RS232协议转换器)产品说明书pdf,三旺 MODEL7221/232(FE1/RS232协议转换器)产品说明书
三旺 MODEL7221(FE1/V.35协议转换器)产品说明书pdf,三旺 MODEL7221(FE1/V.35协议转换器)产品说明书
三旺 MODEL7221/422(FE1/RS422协议转换器)产品说明书pdf,三旺 MODEL7221/422(FE1/RS422协议转换器)产品说明书
SIMODRIVE 611, 用于主轴驱动的 三相交流电机, 同步内装式电机 1FE1[手册]pdf,
node-fe1-fpe(beta) 一种无依赖格式保留加密的Node.js实现。 理论 格式保留加密(FPE)是指用于加密数据的一组技术,以使密文具有与明文相同的格式。 例如,您可以使用FPE对具有有效校验和的信用卡号进行加密,以...
technika-h38fe1-键盘 technika-h38fe1-键盘逆向工程 颜色 最佳 白色的 红色的 绿色 蓝色 黄色的 棕色的 橙子 粉色的 博特 1个 2个 3 4 5 6 7 8 青色 9 空间 媒体之家 媒体停止 视窗 媒体摄影机 空间 粉色的 ...
采用微波辅助溶胶-凝胶法制备了Mg掺杂的La0.9Y0.1Fe1-xMgxO3气敏材料,利用X射线衍射(XRD)对其晶体结构进行表征和分析。结果表明,所制备的样品为正交钙钛矿结构。气敏测试结果表明. M9的掺入能明显改善La0.9Y0.1...
hj6fe1qtcloe
运用第一性原理全势线性缀加平面波方法研究了反钙钛矿结构(Fe1-xNix)4N化合物的结构和磁性质。计算了化合物晶格常数随Ni含量的变化关系;总能的计算表明镍原子优先占据角点位;结合能的计算结果显示随镍含量的增加...
chatgpt 功能 1. 接入智谱GLM-pro、讯飞星火模型 2. 公告弹窗标题支持自定义 3. 底部备案号图标 优化 1. 百度内容审核优化 2. 添加敏感词优化 3. 对话海报优化 4. 会员套餐额外赠送的条数在前端显示 ...
0.4时,Tb0.3Dy0.7(Fe1-xAlx)1.95完全保持Mgcu2立方Laves相结构。磁化强度和磁致伸缩测量发现,x<0.15时。添加少量Al有助于减小磁晶各向异性,并且随着Al替代量x增加,磁致伸缩λs、内禀磁致伸缩λ111和Curie...