|
@ -8,16 +8,20 @@ import cn.hutool.core.util.StrUtil; |
|
|
import com.alibaba.fastjson.JSON; |
|
|
import com.alibaba.fastjson.JSON; |
|
|
import com.alibaba.fastjson.JSONArray; |
|
|
import com.alibaba.fastjson.JSONArray; |
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
import lombok.RequiredArgsConstructor; |
|
|
import lombok.RequiredArgsConstructor; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import net.dreamlu.mica.core.utils.BeanUtil; |
|
|
import net.dreamlu.mica.core.utils.BeanUtil; |
|
|
|
|
|
import org.nl.common.domain.query.PageQuery; |
|
|
import org.nl.common.utils.SecurityUtils; |
|
|
import org.nl.common.utils.SecurityUtils; |
|
|
import org.nl.modules.common.exception.BadRequestException; |
|
|
import org.nl.modules.common.exception.BadRequestException; |
|
|
import org.nl.modules.wql.WQL; |
|
|
import org.nl.modules.wql.WQL; |
|
|
import org.nl.modules.wql.core.bean.WQLObject; |
|
|
import org.nl.modules.wql.core.bean.WQLObject; |
|
|
import org.nl.modules.wql.util.WqlUtil; |
|
|
import org.nl.modules.wql.util.WqlUtil; |
|
|
|
|
|
import org.nl.wms.basedata.master.materialbase.service.dao.Materialbase; |
|
|
import org.nl.wms.basedata.master.sectattr.service.SectattrService; |
|
|
import org.nl.wms.basedata.master.sectattr.service.SectattrService; |
|
|
import org.nl.wms.basedata.master.sectattr.service.dao.Sectattr; |
|
|
import org.nl.wms.basedata.master.sectattr.service.dao.Sectattr; |
|
|
import org.nl.wms.basedata.master.storattr.service.StorattrService; |
|
|
import org.nl.wms.basedata.master.storattr.service.StorattrService; |
|
@ -54,17 +58,13 @@ public class StorattrServiceImpl extends ServiceImpl<StorattrMapper, Storattr> i |
|
|
private SectattrService sectattrServiceImpl; |
|
|
private SectattrService sectattrServiceImpl; |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public Map<String, Object> queryAll(Map whereJson, Pageable page) { |
|
|
public Map<String, Object> queryAll(Map whereJson, PageQuery page) { |
|
|
String search = (String) whereJson.get("search"); |
|
|
String search = (String) whereJson.get("search"); |
|
|
HashMap<String, String> map = new HashMap<>(); |
|
|
IPage<Storattr> pages = new Page<>(page.getPage() + 1, page.getSize()); |
|
|
if (!StrUtil.isEmpty(search)) { |
|
|
IPage<Storattr> storattrList = storattrMapper.queryAll(search, pages); |
|
|
map.put("search", search); |
|
|
|
|
|
} |
|
|
|
|
|
List<Storattr> storattrList = storattrMapper.queryAll(map, page); |
|
|
|
|
|
int tatol = storattrMapper.queryAllTotal(map); |
|
|
|
|
|
JSONObject jsonObject = new JSONObject(); |
|
|
JSONObject jsonObject = new JSONObject(); |
|
|
jsonObject.put("totalElements", tatol); |
|
|
jsonObject.put("totalElements", storattrList.getTotal()); |
|
|
jsonObject.put("content", storattrList); |
|
|
jsonObject.put("content", storattrList.getRecords()); |
|
|
return jsonObject; |
|
|
return jsonObject; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -198,7 +198,7 @@ public class StorattrServiceImpl extends ServiceImpl<StorattrMapper, Storattr> i |
|
|
.eq(StrUtil.isNotEmpty(map.get("is_attachment")), Storattr::getIs_attachment, map.get("is_attachment")) |
|
|
.eq(StrUtil.isNotEmpty(map.get("is_attachment")), Storattr::getIs_attachment, map.get("is_attachment")) |
|
|
.orderByDesc(Storattr::getUpdate_time) |
|
|
.orderByDesc(Storattr::getUpdate_time) |
|
|
); |
|
|
); |
|
|
JSONArray ja = WQL.getWO("QST_STOR_ATTR").addParamMap(map).process().getResultJSONArray(0); |
|
|
//JSONArray ja = WQL.getWO("QST_STOR_ATTR").addParamMap(map).process().getResultJSONArray(0);
|
|
|
JSONObject jo = new JSONObject(); |
|
|
JSONObject jo = new JSONObject(); |
|
|
jo.put("content", storattrs); |
|
|
jo.put("content", storattrs); |
|
|
return jo; |
|
|
return jo; |
|
|