|
@@ -1,15 +1,26 @@
|
|
|
package com.github.zuihou.business.controller.place;
|
|
|
|
|
|
+import cn.hutool.core.bean.BeanUtil;
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import com.github.zuihou.base.request.PageParams;
|
|
|
+import com.github.zuihou.business.company.entity.Company;
|
|
|
+import com.github.zuihou.business.order.dto.OrderPageDTO;
|
|
|
+import com.github.zuihou.business.order.entity.Order;
|
|
|
import com.github.zuihou.business.place.entity.Place;
|
|
|
import com.github.zuihou.business.place.dto.PlaceSaveDTO;
|
|
|
import com.github.zuihou.business.place.dto.PlaceUpdateDTO;
|
|
|
import com.github.zuihou.business.place.dto.PlacePageDTO;
|
|
|
import com.github.zuihou.business.place.service.PlaceService;
|
|
|
+
|
|
|
+import java.lang.reflect.Array;
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.stream.Collectors;
|
|
|
import com.github.zuihou.base.controller.SuperController;
|
|
|
import com.github.zuihou.base.R;
|
|
|
+import com.github.zuihou.database.mybatis.conditions.query.LbqWrapper;
|
|
|
+import com.github.zuihou.database.mybatis.conditions.query.QueryWrap;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -35,6 +46,23 @@ import com.github.zuihou.security.annotation.PreAuth;
|
|
|
@PreAuth(replace = "place:")
|
|
|
public class PlaceController extends SuperController<PlaceService, Long, Place, PlacePageDTO, PlaceSaveDTO, PlaceUpdateDTO> {
|
|
|
|
|
|
+ @Override
|
|
|
+ public void query(PageParams<PlacePageDTO> params, IPage<Place> page, Long defSize) {
|
|
|
+ PlacePageDTO data = params.getModel();
|
|
|
+ Place model = BeanUtil.toBean(data, Place.class);
|
|
|
+ QueryWrap<Place> wrapper = this.handlerWrapper(null, params);
|
|
|
+ LbqWrapper<Place> lbqWrapper = wrapper.lambda();
|
|
|
+ lbqWrapper.like(Place::getPlcName,model.getPlcName());
|
|
|
+ lbqWrapper.eq(Place::getPlcPid,model.getPlcPid());
|
|
|
+ lbqWrapper.eq(Place::getPlcAid,model.getPlcAid());
|
|
|
+ lbqWrapper.eq(Place::getPlcCid,model.getPlcCid());
|
|
|
+ baseService.page(page, wrapper);
|
|
|
+ List<Place>placeList = page.getRecords();
|
|
|
+ for(Place place:placeList){
|
|
|
+ String []arr = {place.getPlcPid(),place.getPlcCid(),place.getPlcAid()};
|
|
|
+ place.setSelectedOptions(arr) ;
|
|
|
+ }
|
|
|
+ }
|
|
|
/**
|
|
|
* Excel导入后的操作
|
|
|
*
|