1、原Action

// 添加跳转
@RequiresPermissions("pdaManager:v_add")
@RequestMapping("/pdaManager/v_add.do")
public String add(HttpServletRequest request, ModelMap model) {
List<BeanDataDictionary> sbztList = dataMng.findByPid(128);
List<BeanEquipmentModel> list = equipMng.getList();
List<BeanEquipmentModel> zdxhList = new ArrayList<BeanEquipmentModel>();
for(BeanEquipmentModel equip : list){
BeanFacturer facture = facMng.findById(equip.getFacturerId());
BeanEquipmentModel bean = new BeanEquipmentModel();
bean.setModel_code(equip.getModel_code()+"("+facture.getFacturer_short()+")");
bean.setId(equip.getId());
zdxhList.add(bean);
} model.addAttribute("zdxhList", zdxhList);
model.addAttribute("sbztList", sbztList);
return "pdaManager/add";
}

2、新action

// 添加跳转
@RequiresPermissions("pdaManager:v_add")
@RequestMapping("/pdaManager/v_add.do")
public String add(HttpServletRequest request, ModelMap model) {
List<BeanDataDictionary> sbztList = dataMng.findByPid(128);
List<BeanEquipmentModel> list = equipMng.getList();
List<BeanEquipmentModel> zdxhList = new ArrayList<BeanEquipmentModel>();
for(BeanEquipmentModel equip : list){
String ids = equip.getFacturerId();
String id[] = ids.split(",");
for (int i = 0; i < id.length; i++) {
BeanFacturer facture = facMng.findById(Integer.parseInt(id[i]));
BeanEquipmentModel bean = new BeanEquipmentModel();
bean.setModel_code(equip.getModel_code()+"("+facture.getFacturer_short()+")");
bean.setId(equip.getId());
zdxhList.add(bean);
}
}
model.addAttribute("zdxhList", zdxhList);
model.addAttribute("sbztList", sbztList);
return "pdaManager/add";
}

最新文章

  1. python3&#160; threading初体验
  2. React Native props &amp; state
  3. 【BZOJ】3434: [Wc2014]时空穿梭
  4. 使用Eclipse构建Maven项目 (step-by-step)
  5. LeetCode(43. Multiply Strings)
  6. [leetcode]_Remove Duplicates from Sorted Array II
  7. pdo 连接数据库 报错 could not find driver 解决方法
  8. asp.net web api 开发时应当注意的事项
  9. MyEclipse-java读取jxl的时候报错OutOfMemoryError
  10. sublime text snippet代码片断
  11. iOS 数据库第三方FMDB的简单使用
  12. 使用SSIS对Dynamics CRM 系统进行数据迁移
  13. char与unsigned char 差别
  14. HDU 2040 亲和数
  15. “百度杯”CTF比赛 十月场EXEC
  16. JS快速排序 希尔排序 归并排序 选择排序
  17. struts标签怎么判断request里的属性是否为空 &lt;s:if test=&quot;${list==null}&quot;&gt; &lt;/s:if&gt;
  18. mysql 查看字段是否添加了索引
  19. MTALAB——神经网络mae()、mse()、sse()
  20. python 历险记(三)— python 的常用文件操作

热门文章

  1. BZOJ 1257: [CQOI2007]余数之和sum
  2. 你所未知的3种 Node.js 代码优化方式
  3. 定时取数据库的schema,并推送到git服务器
  4. Centos5.8 iptables管理
  5. Windows 8.1 应用开发 – 触控操作
  6. [资料]自动化e2e测试 -- WebDriverJS,Jasmine和Protractor
  7. C#:DataTable映射成Model
  8. 前端见微知著工具篇:Grunt实现自动化
  9. Fragment生命周期
  10. (转)RSA算法原理(二)