Commit f27e70fb authored by 韩桐桐's avatar 韩桐桐

fix(weapp): 接口修改

parent e270fcc2
...@@ -34,14 +34,7 @@ import io.swagger.annotations.ApiOperation; ...@@ -34,14 +34,7 @@ import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.context.RequestContext; import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.enumeration.UserType; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil; import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
...@@ -102,14 +95,14 @@ public class TzsAppController { ...@@ -102,14 +95,14 @@ public class TzsAppController {
//判断是否有权限查看全部信息 //判断是否有权限查看全部信息
if (LEVEL.equals(companys.getLevel())) { if (LEVEL.equals(companys.getLevel())) {
//企业 //企业
if (detial.get("USE_UNIT_CREDIT_CODE").equals(companys.getCompanyCode())) { if (!ValidationUtil.isEmpty(detial.get("USE_UNIT_CREDIT_CODE")) && detial.get("USE_UNIT_CREDIT_CODE").equals(companys.getCompanyCode())) {
equipmentInfo = appService.getEquipmentInfo(record); equipmentInfo = appService.getEquipmentInfo(record);
} else { } else {
equipmentInfo = appService.getEquipmentInfoWX(record); equipmentInfo = appService.getEquipmentInfoWX(record);
} }
} else { } else {
//监管 //监管
if (detial.get("ORG_BRANCH_CODE").contains(companys.getOrgCode())) { if (!ValidationUtil.isEmpty(detial.get("ORG_BRANCH_CODE")) && detial.get("ORG_BRANCH_CODE").contains(companys.getOrgCode())) {
equipmentInfo = appService.getEquipmentInfo(record); equipmentInfo = appService.getEquipmentInfo(record);
} else { } else {
equipmentInfo = appService.getEquipmentInfoWX(record); equipmentInfo = appService.getEquipmentInfoWX(record);
......
...@@ -1211,6 +1211,12 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1211,6 +1211,12 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
meBuilder.must(QueryBuilders.matchPhraseQuery("STATUS", test)); meBuilder.must(QueryBuilders.matchPhraseQuery("STATUS", test));
boolMust.must(meBuilder); boolMust.must(meBuilder);
} }
if (!ObjectUtils.isEmpty(map.getString("IS_INTO_MANAGEMENT"))) {
BoolQueryBuilder pBuilder = QueryBuilders.boolQuery();
String param = QueryParser.escape(map.getString("IS_INTO_MANAGEMENT"));
pBuilder.must(QueryBuilders.matchQuery("IS_INTO_MANAGEMENT", param));
boolMust.must(pBuilder);
}
builder.query(boolMust); builder.query(boolMust);
builder.sort("REC_DATE", SortOrder.DESC); builder.sort("REC_DATE", SortOrder.DESC);
builder.from((map.getInteger("number") - 1) * map.getInteger("size")); builder.from((map.getInteger("number") - 1) * map.getInteger("size"));
......
...@@ -794,7 +794,7 @@ public class TzsAppService { ...@@ -794,7 +794,7 @@ public class TzsAppService {
// 处理字典值 // 处理字典值
public void getCon(String fileName, JSONObject jsonObject, Map<String, Object> map, public void getCon(String fileName, JSONObject jsonObject, Map<String, Object> map,
List<DataDictionary> dictionaryList, List<EquipmentCategory> equipmentCategories) { List<DataDictionary> dictionaryList, List<EquipmentCategory> equipmentCategories) {
if ("province".contains(fileName) || "city".contains(fileName) || "county".contains(fileName)) { if ("city".contains(fileName) || "county".contains(fileName)) {
JSONArray regionName = getRegionName(); JSONArray regionName = getRegionName();
List<RegionModel> list = JSONArray.parseArray(regionName.toJSONString(), RegionModel.class); List<RegionModel> list = JSONArray.parseArray(regionName.toJSONString(), RegionModel.class);
if (!ValidationUtil.isEmpty(list) && !ValidationUtil.isEmpty(jsonObject.getString(fileName))) { if (!ValidationUtil.isEmpty(list) && !ValidationUtil.isEmpty(jsonObject.getString(fileName))) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment