package com.goldenwater.hzz.service;
import com.goldenwater.hzz.domain.WpsDTO;
import com.goldenwater.hzz.mapper.HzzWpsMapper;
import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.*;

@Service
public class HzzWpsService {
    @Autowired private HzzWpsMapper mapper;
    public List<WpsDTO> querySupervision(String pn, String sd, String ed, int p, int s) { PageHelper.startPage(p,s); return mapper.querySupervision(pn,sd,ed); }
    public int insertShxmDc(WpsDTO dto) { if(dto.getGuid()==null) dto.setGuid(UUID.randomUUID().toString().replace("-","")); return mapper.insertShxmDc(dto); }
    public int updateShxmDc(WpsDTO dto) { return mapper.updateShxmDc(dto); }
    public int deleteShxmDc(String g) { mapper.deleteShxmDcFiles(g); return mapper.deleteShxmDc(g); }
    public int insertShxmFiles(List<WpsDTO> f) { return mapper.insertShxmFiles(f); }
}
