| | |
| | | String order = schStatInput.getSchStatOutput().getSchWorkorder().getCode(); |
| | | order = order.substring(0,order.indexOf('#')); |
| | | String matCode = schStatInput.getMdMat().getCode(); |
| | | bean.setMatCode(matCode); |
| | | |
| | | List<?> inputs = schStatInputDao.queryBySql("select t1.num-t2.num num, t1.uom from (select nvl(sum(quantity),0) num,uom from SCH_WORKORDER_IO a " + |
| | | " where a.replace_material like ? and a.MATERIAL_CODE = ? and a.inout_type in ('1','4') group by uom) t1,("+ |
| | |
| | | bean = BeanConvertor.copyProperties(schStatInput, InputBean.class); |
| | | |
| | | bean.setMat(schStatInput.getMdMat().getName()); |
| | | bean.setMatCode(schStatInput.getMdMat().getCode()); |
| | | bean.setUnit(schStatInput.getMdUnit().getName()); |
| | | |
| | | //查询每个物料消耗对应标准单耗表的上限值,下限值。 |
| | |
| | | "where o.eqptype = e.equipmentPosition and o.bom_lot_id=? and o.mdMat.id not in " + |
| | | "(select i.mdMat.id from SchStatInput i where i.schStatOutput.schWorkorder.id=?) " + |
| | | "and e.id = ? "; |
| | | return BeanConvertor.copyList(schStatInputDao.query(List.class, hql, bean.getBomVersion(), bean.getId(),bean.getEquipmentId()), Combobox.class); |
| | | //return BeanConvertor.copyList(schStatInputDao.query(List.class, hql, bean.getBomVersion(), bean.getId(),bean.getEquipmentId()), Combobox.class); |
| | | //返回数据text由name更新为name(code) |
| | | List<?> mats = schStatInputDao.query(List.class, hql, bean.getBomVersion(), bean.getId(), bean.getEquipmentId()); |
| | | List<Combobox> list = new java.util.ArrayList<Combobox>(); |
| | | if (mats != null && mats.size() > 0) { |
| | | for (Object o : mats) { |
| | | com.shlanbao.tzsc.base.mapping.MdMat m = (com.shlanbao.tzsc.base.mapping.MdMat) o; |
| | | list.add(new Combobox(m.getId(), m.getName() + "(" + m.getCode() + ")")); |
| | | } |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | @Override |