| | |
| | | return assemblyDao.insertSelective(plan); |
| | | } |
| | | |
| | | @Transactional |
| | | public int update(PrAssemblyPlan plan){ |
| | | PrAssemblyPlan origPlan = assemblyDao.selectByPrimaryKey(plan.id); |
| | | PrBatchNumber batch = batchDao.selectByPrimaryKey(origPlan.batchId); |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | @Transactional |
| | | public int addEquip(Long planId,int num){ |
| | | PrAssemblyPlan plan = assemblyDao.selectByPrimaryKey(planId); |
| | | PrBatchNumber batch = batchDao.selectByPrimaryKey(plan.batchId); |
| | |
| | | return insertBatchEquip(list); |
| | | } |
| | | |
| | | public int insertBatchEquip(List<PrEquip> list) { |
| | | private int insertBatchEquip(List<PrEquip> list) { |
| | | int count = 0; |
| | | for (int i = 0; i < list.size(); i += BATCH_SIZE) { |
| | | List<PrEquip> subList = list.subList(i, Math.min(i + BATCH_SIZE, list.size())); |
| | |
| | | public List<PrEquip> selectEquipByBatchId(Long batchId) { |
| | | return equipDao.selectByBatchId(batchId); |
| | | } |
| | | |
| | | /** |
| | | * 只更新状态,不更新其他字段 |
| | | * @param plan |
| | | * @return |
| | | */ |
| | | @Transactional |
| | | public int updateStatus(PrAssemblyPlan plan) { |
| | | PrAssemblyPlan param = new PrAssemblyPlan(); |
| | | param.id =plan.id; |
| | | param.status = plan.status; |
| | | return assemblyDao.updateByPrimaryKeySelective(plan); |
| | | } |
| | | } |