| | |
| | | package com.dy.pmsPlatform.proTestItems; |
| | | |
| | | import com.dy.common.webUtil.QueryResultVo; |
| | | import com.dy.pmsGlobal.daoPlt.PltProductTestItemsMapper; |
| | | import com.dy.pmsGlobal.pojoPlt.PltProductTestItems; |
| | | import com.dy.pmsPlatform.proTestItems.QueryVo; |
| | | import com.dy.pmsGlobal.daoPlt.PltProductTestInspectionItemsMapper; |
| | | import com.dy.pmsGlobal.pojoPlt.PltProductTestInspectionItems; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.dubbo.common.utils.PojoUtils; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | @Slf4j |
| | | @Service |
| | | public class ProTestItemsSv { |
| | | private final PltProductTestItemsMapper dao; |
| | | private final PltProductTestInspectionItemsMapper dao; |
| | | |
| | | public ProTestItemsSv(PltProductTestItemsMapper dao) { |
| | | public ProTestItemsSv(PltProductTestInspectionItemsMapper dao) { |
| | | this.dao = dao; |
| | | } |
| | | |
| | | @Transactional |
| | | public int save(PltProductTestItems item) { |
| | | public int save(PltProductTestInspectionItems item) { |
| | | int count = dao.insertSelective(item); |
| | | return count; |
| | | } |
| | |
| | | |
| | | |
| | | @Transactional |
| | | public int update(PltProductTestItems item) { |
| | | public int update(PltProductTestInspectionItems item) { |
| | | int count = dao.updateByPrimaryKeySelective(item); |
| | | return count; |
| | | } |
| | | |
| | | |
| | | public PltProductTestItems selectById(String paramId) { |
| | | public PltProductTestInspectionItems selectById(String paramId) { |
| | | return dao.selectByPrimaryKey(Long.valueOf(paramId)); |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | public QueryResultVo<List<PltProductTestItems>> selectSome(QueryVo queryVo) { |
| | | public QueryResultVo<List<PltProductTestInspectionItems>> selectSome(QueryVo queryVo) { |
| | | Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(queryVo); |
| | | |
| | | //查询符合条件的记录总数 |
| | | Long itemTotal = this.dao.selectSomeCount(params); |
| | | |
| | | QueryResultVo<List<PltProductTestItems>> rsVo = new QueryResultVo<>(queryVo.pageSize, queryVo.pageCurr) ; |
| | | QueryResultVo<List<PltProductTestInspectionItems>> rsVo = new QueryResultVo<>(queryVo.pageSize, queryVo.pageCurr) ; |
| | | //计算分页等信息 |
| | | rsVo.calculateAndSet(itemTotal, params); |
| | | |
| | |
| | | |
| | | @Transactional |
| | | public int disabled(Long id, Boolean disabled) { |
| | | PltProductTestItems item = new PltProductTestItems(); |
| | | PltProductTestInspectionItems item = new PltProductTestInspectionItems(); |
| | | item.setId(id); |
| | | item.setDisabled(disabled); |
| | | return dao.updateByPrimaryKeySelective(item); |