|
@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.github.pagehelper.PageHelper;
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
+import com.idea.buildManage.dto.ParkFloorDiscDto;
|
|
|
import com.idea.buildManage.response.ParkFloorDiscRespson;
|
|
|
import com.idea.buildManage.mapper.ParkFloorDiscExtendMapper;
|
|
|
import com.idea.buildManage.mapper.ParkFloorDiscMapper;
|
|
@@ -21,10 +22,7 @@ import org.apache.poi.util.StringUtil;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
-import java.util.Date;
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
+import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
@Service
|
|
@@ -45,7 +43,7 @@ public class ParkFloorDiscService implements BaseService<ParkFloorDisc, ParkFloo
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
- public PageInfo<ParkFloorDisc> list(Tablepar tablepar, ParkFloorDisc model, DateTrans dt) {
|
|
|
+ public PageInfo<ParkFloorDisc> list(Tablepar tablepar, ParkFloorDiscDto model, DateTrans dt) {
|
|
|
PageHelper.startPage(tablepar.getPageNum(), tablepar.getPageSize());
|
|
|
List<ParkFloorDisc> list = modelMapper.selectByExample(getCondition(model, dt));
|
|
|
PageInfo<ParkFloorDisc> pageInfo = new PageInfo<>(list);
|
|
@@ -57,15 +55,18 @@ public class ParkFloorDiscService implements BaseService<ParkFloorDisc, ParkFloo
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
- public List<ParkFloorDisc> listAll(ParkFloorDisc model, DateTrans dt) {
|
|
|
+ public List<ParkFloorDisc> listAll(ParkFloorDiscDto model, DateTrans dt) {
|
|
|
return modelMapper.selectByExample(getCondition(model, dt));
|
|
|
}
|
|
|
|
|
|
- private ParkFloorDiscExample getCondition(ParkFloorDisc model, DateTrans dt) {
|
|
|
+ private ParkFloorDiscExample getCondition(ParkFloorDiscDto model, DateTrans dt) {
|
|
|
ParkFloorDiscExample ex = new ParkFloorDiscExample();
|
|
|
ex.setOrderByClause("created_at asc");
|
|
|
ParkFloorDiscExample.Criteria criteria = ex.createCriteria();
|
|
|
-
|
|
|
+ if(StringUtils.isNotEmpty(model.getGroupIds())){
|
|
|
+ List<String> groupIds = Arrays.asList(model.getGroupIds().split(","));
|
|
|
+ criteria.andGroupIdIn(groupIds);
|
|
|
+ }
|
|
|
return ex;
|
|
|
}
|
|
|
|
|
@@ -123,7 +124,7 @@ public class ParkFloorDiscService implements BaseService<ParkFloorDisc, ParkFloo
|
|
|
return modelMapper.countByExample(example);
|
|
|
}
|
|
|
|
|
|
- public long countByExample(ParkFloorDisc model, DateTrans dt) {
|
|
|
+ public long countByExample(ParkFloorDiscDto model, DateTrans dt) {
|
|
|
return modelMapper.countByExample(getCondition(model, dt));
|
|
|
}
|
|
|
|