2/18 anxi
parent
890518746e
commit
20b4ff0434
@ -0,0 +1,103 @@
|
|||||||
|
package com.glxp.mipsdl.controller;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.glxp.mipsdl.client.ClientProcessor;
|
||||||
|
import com.glxp.mipsdl.dao.auth.AuthWarehouseDao;
|
||||||
|
import com.glxp.mipsdl.dao.basic.BasicUdirelDao;
|
||||||
|
import com.glxp.mipsdl.entity.auth.AuthWarehouseEntity;
|
||||||
|
import com.glxp.mipsdl.entity.basic.BasicUdirelEntity;
|
||||||
|
import com.glxp.mipsdl.req.base.forthird.ForInvProductsFilter;
|
||||||
|
import com.glxp.mipsdl.res.BaseResponse;
|
||||||
|
import com.glxp.mipsdl.util.ResultVOUtils;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author : zhuzhu
|
||||||
|
* @date : 2025/2/17 16:27
|
||||||
|
* @modyified By :
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
public class ExAxxyyController {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
BasicUdirelDao basicUdirelDao;
|
||||||
|
@Resource
|
||||||
|
AuthWarehouseDao authWarehouseDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* B001 查询指定科室高值/普耗库存
|
||||||
|
*
|
||||||
|
* @param forInvProductsFilter
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/ex/udiwms/inv/products/filter")
|
||||||
|
public BaseResponse invProductsFilter(@RequestBody ForInvProductsFilter forInvProductsFilter) {
|
||||||
|
if (ObjectUtil.isNull(forInvProductsFilter)) {
|
||||||
|
return ResultVOUtils.error(500, "查询条件不能为空");
|
||||||
|
}
|
||||||
|
if (StrUtil.isEmpty(forInvProductsFilter.getUdiCode()) &&
|
||||||
|
StrUtil.isEmpty(forInvProductsFilter.getNameCode()) &&
|
||||||
|
StrUtil.isEmpty(forInvProductsFilter.getCpmctymc()) &&
|
||||||
|
StrUtil.isEmpty(forInvProductsFilter.getBatchNo()) &&
|
||||||
|
StrUtil.isEmpty(forInvProductsFilter.getInvCode()) &&
|
||||||
|
StrUtil.isEmpty(forInvProductsFilter.getSupName())) {
|
||||||
|
return ResultVOUtils.error(500, "查询条件不能为空!");
|
||||||
|
}
|
||||||
|
if (forInvProductsFilter.getPage() == null) {
|
||||||
|
forInvProductsFilter.setPage(1);
|
||||||
|
forInvProductsFilter.setLimit(20);
|
||||||
|
}
|
||||||
|
ForInvProductsFilter newRequest = new ForInvProductsFilter();
|
||||||
|
|
||||||
|
if (StrUtil.isEmpty(forInvProductsFilter.getInvCode()))
|
||||||
|
return ResultVOUtils.error(500, "科室编码不能为空!");
|
||||||
|
AuthWarehouseEntity authWarehouseEntity = authWarehouseDao.selectOne(new QueryWrapper<AuthWarehouseEntity>().eq("thirdId", forInvProductsFilter.getInvCode()).last("limit 1"));
|
||||||
|
if (authWarehouseEntity == null)
|
||||||
|
return ResultVOUtils.error(500, "科室编码未对照!");
|
||||||
|
else
|
||||||
|
forInvProductsFilter.setInvCode(authWarehouseEntity.getCode());
|
||||||
|
|
||||||
|
if (StrUtil.isNotEmpty(forInvProductsFilter.getUdiCode())) {
|
||||||
|
newRequest.setPage(forInvProductsFilter.getPage());
|
||||||
|
newRequest.setLimit(forInvProductsFilter.getLimit());
|
||||||
|
newRequest.setInvCode(forInvProductsFilter.getInvCode());
|
||||||
|
newRequest.setUdiCode(forInvProductsFilter.getUdiCode());
|
||||||
|
return ClientProcessor.getHttpClient().queryUdiHighInvProductsFilter(newRequest);
|
||||||
|
} else {
|
||||||
|
if (StrUtil.isEmpty(forInvProductsFilter.getXmbm())) {
|
||||||
|
return ResultVOUtils.error(500, "项目编码不能为空!");
|
||||||
|
}
|
||||||
|
List<BasicUdirelEntity> basicUdirelEntityList = basicUdirelDao.selectList(new QueryWrapper<BasicUdirelEntity>().eq("mainId", forInvProductsFilter.getXmbm()));
|
||||||
|
if (CollUtil.isNotEmpty(basicUdirelEntityList)) {
|
||||||
|
newRequest.setRelIdFk(basicUdirelEntityList.get(0).getId() + "");
|
||||||
|
} else {
|
||||||
|
return ResultVOUtils.error(500, "项目编码未对照!");
|
||||||
|
}
|
||||||
|
newRequest.setPage(forInvProductsFilter.getPage());
|
||||||
|
newRequest.setLimit(forInvProductsFilter.getLimit());
|
||||||
|
newRequest.setBatchNo(forInvProductsFilter.getBatchNo());
|
||||||
|
newRequest.setCpmctymc(forInvProductsFilter.getCpmctymc());
|
||||||
|
newRequest.setInvCode(forInvProductsFilter.getInvCode());
|
||||||
|
newRequest.setNameCode(forInvProductsFilter.getNameCode());
|
||||||
|
newRequest.setSupName(forInvProductsFilter.getSupName());
|
||||||
|
// newRequest.setUdiCode(forInvProductsFilter.getUdiCode());
|
||||||
|
return ClientProcessor.getHttpClient().queryUdiInvProductsFilter(newRequest);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -1,142 +1,142 @@
|
|||||||
package com.glxp.mipsdl.controller;
|
//package com.glxp.mipsdl.controller;
|
||||||
|
//
|
||||||
import cn.hutool.core.collection.CollUtil;
|
//import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
//import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
//import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
//import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.glxp.mipsdl.client.ClientProcessor;
|
//import com.glxp.mipsdl.client.ClientProcessor;
|
||||||
import com.glxp.mipsdl.dao.auth.AuthWarehouseDao;
|
//import com.glxp.mipsdl.dao.auth.AuthWarehouseDao;
|
||||||
import com.glxp.mipsdl.dao.basic.BasicUdirelDao;
|
//import com.glxp.mipsdl.dao.basic.BasicUdirelDao;
|
||||||
import com.glxp.mipsdl.entity.auth.AuthWarehouseEntity;
|
//import com.glxp.mipsdl.entity.auth.AuthWarehouseEntity;
|
||||||
import com.glxp.mipsdl.entity.basic.BasicUdirelEntity;
|
//import com.glxp.mipsdl.entity.basic.BasicUdirelEntity;
|
||||||
import com.glxp.mipsdl.req.base.UdiwmsQueryUdiInvProductsRequest;
|
//import com.glxp.mipsdl.req.base.UdiwmsQueryUdiInvProductsRequest;
|
||||||
import com.glxp.mipsdl.req.base.forthird.ForBasicProductsSearchFilter;
|
//import com.glxp.mipsdl.req.base.forthird.ForBasicProductsSearchFilter;
|
||||||
import com.glxp.mipsdl.req.base.forthird.ForInvOutScanCodeFilter;
|
//import com.glxp.mipsdl.req.base.forthird.ForInvOutScanCodeFilter;
|
||||||
import com.glxp.mipsdl.req.base.forthird.ForInvProductsFilter;
|
//import com.glxp.mipsdl.req.base.forthird.ForInvProductsFilter;
|
||||||
import com.glxp.mipsdl.res.BaseResponse;
|
//import com.glxp.mipsdl.res.BaseResponse;
|
||||||
import com.glxp.mipsdl.service.auth.AuthWarehouseService;
|
//import com.glxp.mipsdl.service.auth.AuthWarehouseService;
|
||||||
import com.glxp.mipsdl.util.ResultVOUtils;
|
//import com.glxp.mipsdl.util.ResultVOUtils;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
//import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
//import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
//import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
//import org.springframework.web.bind.annotation.RestController;
|
||||||
|
//
|
||||||
import javax.annotation.Resource;
|
//import javax.annotation.Resource;
|
||||||
import javax.validation.Valid;
|
//import javax.validation.Valid;
|
||||||
import java.util.List;
|
//import java.util.List;
|
||||||
|
//
|
||||||
/**
|
///**
|
||||||
* 南靖县医院--提供给第三方系统调用的接口
|
// * 南靖县医院--提供给第三方系统调用的接口
|
||||||
*/
|
// */
|
||||||
@Slf4j
|
//@Slf4j
|
||||||
@RestController
|
//@RestController
|
||||||
public class ExNjxyyController {
|
//public class ExNjxyyController {
|
||||||
|
//
|
||||||
|
//
|
||||||
@Resource
|
// @Resource
|
||||||
BasicUdirelDao basicUdirelDao;
|
// BasicUdirelDao basicUdirelDao;
|
||||||
@Resource
|
// @Resource
|
||||||
AuthWarehouseDao authWarehouseDao;
|
// AuthWarehouseDao authWarehouseDao;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* B001 查询指定科室高值/普耗库存
|
// * B001 查询指定科室高值/普耗库存
|
||||||
*
|
// *
|
||||||
* @param forInvProductsFilter
|
// * @param forInvProductsFilter
|
||||||
* @return
|
// * @return
|
||||||
*/
|
// */
|
||||||
@PostMapping("/ex/udiwms/inv/products/filter")
|
// @PostMapping("/ex/udiwms/inv/products/filter")
|
||||||
public BaseResponse invProductsFilter(@RequestBody ForInvProductsFilter forInvProductsFilter) {
|
// public BaseResponse invProductsFilter(@RequestBody ForInvProductsFilter forInvProductsFilter) {
|
||||||
if (ObjectUtil.isNull(forInvProductsFilter)) {
|
// if (ObjectUtil.isNull(forInvProductsFilter)) {
|
||||||
return ResultVOUtils.error(500, "查询条件不能为空");
|
// return ResultVOUtils.error(500, "查询条件不能为空");
|
||||||
}
|
// }
|
||||||
if (StrUtil.isEmpty(forInvProductsFilter.getUdiCode()) &&
|
// if (StrUtil.isEmpty(forInvProductsFilter.getUdiCode()) &&
|
||||||
StrUtil.isEmpty(forInvProductsFilter.getNameCode()) &&
|
// StrUtil.isEmpty(forInvProductsFilter.getNameCode()) &&
|
||||||
StrUtil.isEmpty(forInvProductsFilter.getCpmctymc()) &&
|
// StrUtil.isEmpty(forInvProductsFilter.getCpmctymc()) &&
|
||||||
StrUtil.isEmpty(forInvProductsFilter.getBatchNo()) &&
|
// StrUtil.isEmpty(forInvProductsFilter.getBatchNo()) &&
|
||||||
StrUtil.isEmpty(forInvProductsFilter.getInvCode()) &&
|
// StrUtil.isEmpty(forInvProductsFilter.getInvCode()) &&
|
||||||
StrUtil.isEmpty(forInvProductsFilter.getSupName())) {
|
// StrUtil.isEmpty(forInvProductsFilter.getSupName())) {
|
||||||
return ResultVOUtils.error(500, "查询条件不能为空!");
|
// return ResultVOUtils.error(500, "查询条件不能为空!");
|
||||||
}
|
// }
|
||||||
if (forInvProductsFilter.getPage() == null) {
|
// if (forInvProductsFilter.getPage() == null) {
|
||||||
forInvProductsFilter.setPage(1);
|
// forInvProductsFilter.setPage(1);
|
||||||
forInvProductsFilter.setLimit(20);
|
// forInvProductsFilter.setLimit(20);
|
||||||
}
|
// }
|
||||||
ForInvProductsFilter newRequest = new ForInvProductsFilter();
|
// ForInvProductsFilter newRequest = new ForInvProductsFilter();
|
||||||
|
//
|
||||||
if (StrUtil.isEmpty(forInvProductsFilter.getInvCode()))
|
// if (StrUtil.isEmpty(forInvProductsFilter.getInvCode()))
|
||||||
return ResultVOUtils.error(500, "科室编码不能为空!");
|
// return ResultVOUtils.error(500, "科室编码不能为空!");
|
||||||
AuthWarehouseEntity authWarehouseEntity = authWarehouseDao.selectOne(new QueryWrapper<AuthWarehouseEntity>().eq("thirdId", forInvProductsFilter.getInvCode()).last("limit 1"));
|
// AuthWarehouseEntity authWarehouseEntity = authWarehouseDao.selectOne(new QueryWrapper<AuthWarehouseEntity>().eq("thirdId", forInvProductsFilter.getInvCode()).last("limit 1"));
|
||||||
if (authWarehouseEntity == null)
|
// if (authWarehouseEntity == null)
|
||||||
return ResultVOUtils.error(500, "科室编码未对照!");
|
// return ResultVOUtils.error(500, "科室编码未对照!");
|
||||||
else
|
// else
|
||||||
forInvProductsFilter.setInvCode(authWarehouseEntity.getCode());
|
// forInvProductsFilter.setInvCode(authWarehouseEntity.getCode());
|
||||||
|
//
|
||||||
if (StrUtil.isNotEmpty(forInvProductsFilter.getUdiCode())) {
|
// if (StrUtil.isNotEmpty(forInvProductsFilter.getUdiCode())) {
|
||||||
newRequest.setPage(forInvProductsFilter.getPage());
|
// newRequest.setPage(forInvProductsFilter.getPage());
|
||||||
newRequest.setLimit(forInvProductsFilter.getLimit());
|
// newRequest.setLimit(forInvProductsFilter.getLimit());
|
||||||
newRequest.setInvCode(forInvProductsFilter.getInvCode());
|
// newRequest.setInvCode(forInvProductsFilter.getInvCode());
|
||||||
newRequest.setUdiCode(forInvProductsFilter.getUdiCode());
|
|
||||||
return ClientProcessor.getHttpClient().queryUdiHighInvProductsFilter(newRequest);
|
|
||||||
} else {
|
|
||||||
if (StrUtil.isEmpty(forInvProductsFilter.getXmbm())) {
|
|
||||||
return ResultVOUtils.error(500, "项目编码不能为空!");
|
|
||||||
}
|
|
||||||
List<BasicUdirelEntity> basicUdirelEntityList = basicUdirelDao.selectList(new QueryWrapper<BasicUdirelEntity>().eq("mainId", forInvProductsFilter.getXmbm()));
|
|
||||||
if (CollUtil.isNotEmpty(basicUdirelEntityList)) {
|
|
||||||
newRequest.setRelIdFk(basicUdirelEntityList.get(0).getId() + "");
|
|
||||||
} else {
|
|
||||||
return ResultVOUtils.error(500, "项目编码未对照!");
|
|
||||||
}
|
|
||||||
newRequest.setPage(forInvProductsFilter.getPage());
|
|
||||||
newRequest.setLimit(forInvProductsFilter.getLimit());
|
|
||||||
newRequest.setBatchNo(forInvProductsFilter.getBatchNo());
|
|
||||||
newRequest.setCpmctymc(forInvProductsFilter.getCpmctymc());
|
|
||||||
newRequest.setInvCode(forInvProductsFilter.getInvCode());
|
|
||||||
newRequest.setNameCode(forInvProductsFilter.getNameCode());
|
|
||||||
newRequest.setSupName(forInvProductsFilter.getSupName());
|
|
||||||
// newRequest.setUdiCode(forInvProductsFilter.getUdiCode());
|
// newRequest.setUdiCode(forInvProductsFilter.getUdiCode());
|
||||||
return ClientProcessor.getHttpClient().queryUdiInvProductsFilter(newRequest);
|
// return ClientProcessor.getHttpClient().queryUdiHighInvProductsFilter(newRequest);
|
||||||
}
|
// } else {
|
||||||
|
// if (StrUtil.isEmpty(forInvProductsFilter.getXmbm())) {
|
||||||
|
// return ResultVOUtils.error(500, "项目编码不能为空!");
|
||||||
}
|
// }
|
||||||
|
// List<BasicUdirelEntity> basicUdirelEntityList = basicUdirelDao.selectList(new QueryWrapper<BasicUdirelEntity>().eq("mainId", forInvProductsFilter.getXmbm()));
|
||||||
|
// if (CollUtil.isNotEmpty(basicUdirelEntityList)) {
|
||||||
/**
|
// newRequest.setRelIdFk(basicUdirelEntityList.get(0).getId() + "");
|
||||||
* B002 查询耗材字典
|
// } else {
|
||||||
*
|
// return ResultVOUtils.error(500, "项目编码未对照!");
|
||||||
* @param forBasicProductsSearchFilter
|
// }
|
||||||
* @return
|
// newRequest.setPage(forInvProductsFilter.getPage());
|
||||||
*/
|
// newRequest.setLimit(forInvProductsFilter.getLimit());
|
||||||
@PostMapping("/ex/udiwms/basic/products/search")
|
// newRequest.setBatchNo(forInvProductsFilter.getBatchNo());
|
||||||
public BaseResponse basicProductsSearch(@RequestBody ForBasicProductsSearchFilter forBasicProductsSearchFilter) {
|
// newRequest.setCpmctymc(forInvProductsFilter.getCpmctymc());
|
||||||
if (ObjectUtil.isNull(forBasicProductsSearchFilter)) {
|
// newRequest.setInvCode(forInvProductsFilter.getInvCode());
|
||||||
return ResultVOUtils.error(500, "查询条件不能为空");
|
// newRequest.setNameCode(forInvProductsFilter.getNameCode());
|
||||||
}
|
// newRequest.setSupName(forInvProductsFilter.getSupName());
|
||||||
if (StrUtil.isEmpty(forBasicProductsSearchFilter.getUdiCode()) &&
|
//// newRequest.setUdiCode(forInvProductsFilter.getUdiCode());
|
||||||
StrUtil.isEmpty(forBasicProductsSearchFilter.getNameCode()) &&
|
// return ClientProcessor.getHttpClient().queryUdiInvProductsFilter(newRequest);
|
||||||
StrUtil.isEmpty(forBasicProductsSearchFilter.getCpmctymc()) &&
|
// }
|
||||||
StrUtil.isEmpty(forBasicProductsSearchFilter.getMainId()) &&
|
//
|
||||||
StrUtil.isEmpty(forBasicProductsSearchFilter.getGgxh())) {
|
//
|
||||||
return ResultVOUtils.error(500, "查询条件不能为空!");
|
// }
|
||||||
}
|
//
|
||||||
if (forBasicProductsSearchFilter.getPage() == null) {
|
//
|
||||||
forBasicProductsSearchFilter.setPage(1);
|
// /**
|
||||||
forBasicProductsSearchFilter.setLimit(20);
|
// * B002 查询耗材字典
|
||||||
}
|
// *
|
||||||
return ClientProcessor.getHttpClient().queryUdiBasicProductsSearch(forBasicProductsSearchFilter);
|
// * @param forBasicProductsSearchFilter
|
||||||
}
|
// * @return
|
||||||
|
// */
|
||||||
/**
|
// @PostMapping("/ex/udiwms/basic/products/search")
|
||||||
* B003 高值耗材实时出库/退库
|
// public BaseResponse basicProductsSearch(@RequestBody ForBasicProductsSearchFilter forBasicProductsSearchFilter) {
|
||||||
*
|
// if (ObjectUtil.isNull(forBasicProductsSearchFilter)) {
|
||||||
* @param forInvOutScanCodeFilter
|
// return ResultVOUtils.error(500, "查询条件不能为空");
|
||||||
* @return
|
// }
|
||||||
*/
|
// if (StrUtil.isEmpty(forBasicProductsSearchFilter.getUdiCode()) &&
|
||||||
@PostMapping("/ex/udiwms/inv/out/scanCode")
|
// StrUtil.isEmpty(forBasicProductsSearchFilter.getNameCode()) &&
|
||||||
public BaseResponse invOutScanCode(@RequestBody ForInvOutScanCodeFilter forInvOutScanCodeFilter) {
|
// StrUtil.isEmpty(forBasicProductsSearchFilter.getCpmctymc()) &&
|
||||||
return ClientProcessor.getHttpClient().queryUdiInvOutScanCode(forInvOutScanCodeFilter);
|
// StrUtil.isEmpty(forBasicProductsSearchFilter.getMainId()) &&
|
||||||
}
|
// StrUtil.isEmpty(forBasicProductsSearchFilter.getGgxh())) {
|
||||||
|
// return ResultVOUtils.error(500, "查询条件不能为空!");
|
||||||
|
// }
|
||||||
}
|
// if (forBasicProductsSearchFilter.getPage() == null) {
|
||||||
|
// forBasicProductsSearchFilter.setPage(1);
|
||||||
|
// forBasicProductsSearchFilter.setLimit(20);
|
||||||
|
// }
|
||||||
|
// return ClientProcessor.getHttpClient().queryUdiBasicProductsSearch(forBasicProductsSearchFilter);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * B003 高值耗材实时出库/退库
|
||||||
|
// *
|
||||||
|
// * @param forInvOutScanCodeFilter
|
||||||
|
// * @return
|
||||||
|
// */
|
||||||
|
// @PostMapping("/ex/udiwms/inv/out/scanCode")
|
||||||
|
// public BaseResponse invOutScanCode(@RequestBody ForInvOutScanCodeFilter forInvOutScanCodeFilter) {
|
||||||
|
// return ClientProcessor.getHttpClient().queryUdiInvOutScanCode(forInvOutScanCodeFilter);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//}
|
||||||
|
Loading…
Reference in New Issue