Compare commits
2 Commits
a848710e08
...
e4c5bf88d3
| Author | SHA1 | Date |
|---|---|---|
|
|
e4c5bf88d3 | |
|
|
c75d8ec04a |
|
|
@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.ParameterizedType;
|
||||
import java.util.*;
|
||||
|
||||
public class ScanUtil {
|
||||
|
|
@ -199,13 +200,22 @@ public class ScanUtil {
|
|||
}
|
||||
|
||||
|
||||
// 递归扫描类的属性
|
||||
private static List<ApiInfo.BaseProperty> scanClassProperties(Class<?> clazz) {
|
||||
return scanClassProperties(clazz, new HashSet<>());
|
||||
}
|
||||
|
||||
private static List<ApiInfo.BaseProperty> scanClassProperties(Class<?> clazz, Set<Class<?>> scannedClasses) {
|
||||
List<ApiInfo.BaseProperty> properties = new ArrayList<>();
|
||||
|
||||
// 防止循环引用导致的无限递归
|
||||
if (scannedClasses.contains(clazz)) {
|
||||
return properties;
|
||||
}
|
||||
scannedClasses.add(clazz);
|
||||
|
||||
// 处理父类属性
|
||||
if (clazz.getSuperclass() != null && isComplexType(clazz.getSuperclass())) {
|
||||
properties.addAll(scanClassProperties(clazz.getSuperclass()));
|
||||
properties.addAll(scanClassProperties(clazz.getSuperclass(), scannedClasses));
|
||||
}
|
||||
|
||||
// 处理当前类属性
|
||||
|
|
@ -222,18 +232,36 @@ public class ScanUtil {
|
|||
Class<?> fieldType = field.getType();
|
||||
fieldParam.setType(fieldType.getSimpleName());
|
||||
|
||||
// 递归处理复杂类型
|
||||
if (isComplexType(fieldType)) {
|
||||
fieldParam.setChildren(scanClassProperties(fieldType));
|
||||
// 处理List类型
|
||||
if (fieldType.equals(List.class)) {
|
||||
java.lang.reflect.Type genericType = field.getGenericType();
|
||||
if (genericType instanceof ParameterizedType) {
|
||||
ParameterizedType pt = (ParameterizedType) genericType;
|
||||
java.lang.reflect.Type[] typeArgs = pt.getActualTypeArguments();
|
||||
if (typeArgs.length > 0 && typeArgs[0] instanceof Class) {
|
||||
Class<?> genericClass = (Class<?>) typeArgs[0];
|
||||
// 如果是复杂类型则递归处理
|
||||
if (isComplexType(genericClass)) {
|
||||
fieldParam.setChildren(scanClassProperties(genericClass, scannedClasses));
|
||||
}
|
||||
// 设置泛型类型名称
|
||||
fieldParam.setType("List<" + genericClass.getSimpleName() + ">");
|
||||
}
|
||||
}
|
||||
}
|
||||
// 处理其他复杂类型
|
||||
else if (isComplexType(fieldType)) {
|
||||
fieldParam.setChildren(scanClassProperties(fieldType, scannedClasses));
|
||||
}
|
||||
|
||||
properties.add(fieldParam);
|
||||
}
|
||||
|
||||
scannedClasses.remove(clazz); // 扫描完成后移除标记
|
||||
return properties;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private static String cleanPath(String originalPath) {
|
||||
// 1. 移除路径参数
|
||||
String pathWithoutParams = originalPath.replaceAll("/\\{[^/]+}", "");
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
package com.syjiaer.clinic.server.controller.common;
|
||||
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiParam;
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiParams;
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiReturn;
|
||||
import com.syjiaer.clinic.server.common.annotations.RecordCommonLog;
|
||||
import com.syjiaer.clinic.server.common.config.Config;
|
||||
import com.syjiaer.clinic.server.common.vo.Result;
|
||||
|
|
@ -34,12 +37,14 @@ public class CommonConfigController extends BaseController {
|
|||
|
||||
@RequestMapping("list")
|
||||
@ApiOperation("查询配置信息")
|
||||
public Result<Object> list() {
|
||||
@ApiReturn(type = CommonConfig.class, isArray = true)
|
||||
public Result<List<CommonConfig>> list() {
|
||||
return success(commonConfigService.list());
|
||||
}
|
||||
|
||||
@RequestMapping("getAll")
|
||||
@ApiOperation("查询所有配置信息")
|
||||
@ApiOperation("key-value形式配置信息")
|
||||
@ApiReturn(type = CommonConfig.class)
|
||||
public Result<Object> getAll() {
|
||||
List<CommonConfig> list = commonConfigService.list();
|
||||
Map<String, String> map = new HashMap<>();
|
||||
|
|
@ -51,6 +56,7 @@ public class CommonConfigController extends BaseController {
|
|||
@RecordCommonLog(operation = "修改配置信息")
|
||||
@RequestMapping("edit")
|
||||
@ApiOperation("修改配置信息")
|
||||
|
||||
public Result<Object> edit() {
|
||||
Map<String, Object> parms = getParms();
|
||||
for (String key : parms.keySet()) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
package com.syjiaer.clinic.server.controller.common;
|
||||
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiParam;
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiParams;
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiReturn;
|
||||
import com.syjiaer.clinic.server.common.vo.Page;
|
||||
import com.syjiaer.clinic.server.common.vo.Result;
|
||||
import com.syjiaer.clinic.server.controller.BaseController;
|
||||
|
|
@ -20,6 +23,10 @@ public class CommonLogController extends BaseController {
|
|||
|
||||
@RequestMapping("list")
|
||||
@ApiOperation("查询操作日志")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "query", value = "查询条件", type = CommonLogQuery.class, required = true)
|
||||
})
|
||||
@ApiReturn(type = CommonLog.class, isArray = true)
|
||||
public Result<Page<CommonLog>> list() {
|
||||
CommonLogQuery query = parmsUtil.getObject("query", CommonLogQuery.class);
|
||||
return success(commonLogService.pageList(query));
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
package com.syjiaer.clinic.server.controller.common;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiParam;
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiParams;
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiReturn;
|
||||
import com.syjiaer.clinic.server.common.annotations.NoAuthCheck;
|
||||
import com.syjiaer.clinic.server.common.exception.MessageException;
|
||||
import com.syjiaer.clinic.server.common.util.CacheUtil;
|
||||
|
|
@ -47,6 +50,10 @@ public class FileController extends BaseController {
|
|||
@RequestMapping("/getImage/{fileName}")
|
||||
@ApiOperation("获取图片")
|
||||
@NoAuthCheck
|
||||
@ApiParams({
|
||||
@ApiParam(name = "fileName", value = "文件名", required = true)
|
||||
})
|
||||
@ApiReturn("资源文件")
|
||||
public ResponseEntity<Resource> getImage(@PathVariable String fileName) {
|
||||
try {
|
||||
return fileService.getImage(fileName);
|
||||
|
|
@ -60,6 +67,10 @@ public class FileController extends BaseController {
|
|||
@RequestMapping("/download/{token}")
|
||||
@ApiOperation("下载文件")
|
||||
@NoAuthCheck
|
||||
@ApiParams({
|
||||
@ApiParam(name = "token", value = "临时令牌", required = true)
|
||||
})
|
||||
@ApiReturn("资源文件")
|
||||
public ResponseEntity<Resource> download(@PathVariable String token){
|
||||
|
||||
try {
|
||||
|
|
@ -82,6 +93,10 @@ public class FileController extends BaseController {
|
|||
@RequestMapping("/uploadToTemp")
|
||||
@ApiOperation("上传临时文件")
|
||||
@NoAuthCheck
|
||||
@ApiParams({
|
||||
@ApiParam(name = "file", value = "文件", required = true)
|
||||
})
|
||||
@ApiReturn(name ="",value = "临时令牌")
|
||||
public String uploadToTemp(MultipartFile file) {
|
||||
try {
|
||||
// 获取文件的后缀名
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.syjiaer.clinic.server.controller.common;
|
||||
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiReturn;
|
||||
import com.syjiaer.clinic.server.common.annotations.NoAuthCheck;
|
||||
import com.syjiaer.clinic.server.common.vo.Result;
|
||||
import com.syjiaer.clinic.server.controller.BaseController;
|
||||
|
|
@ -32,6 +33,7 @@ public class ManagerUserController extends BaseController {
|
|||
@RequestMapping("login")
|
||||
@ApiOperation("登录")
|
||||
@NoAuthCheck
|
||||
@ApiReturn(value = "登录令牌",typeName="String")
|
||||
public Result<String> login() {
|
||||
Map<String, Object> parms = getParms();
|
||||
String username = (String) parms.get("username");
|
||||
|
|
@ -43,6 +45,8 @@ public class ManagerUserController extends BaseController {
|
|||
//验证token
|
||||
@ApiOperation("验证token")
|
||||
@RequestMapping("verify")
|
||||
@ApiReturn(type = ManagerUser.class)
|
||||
|
||||
public Result<ManagerUser> verify() {
|
||||
return success(managerUserService.verify());
|
||||
}
|
||||
|
|
@ -53,6 +57,7 @@ public class ManagerUserController extends BaseController {
|
|||
*/
|
||||
@ApiOperation("所有人员信息")
|
||||
@RequestMapping("list")
|
||||
@ApiReturn(type = ManagerUser.class,isArray = true)
|
||||
public Result<List<ManagerUser>> list(){
|
||||
return success(managerUserService.list());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
package com.syjiaer.clinic.server.controller.common;
|
||||
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiParam;
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiParams;
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiReturn;
|
||||
import com.syjiaer.clinic.server.common.annotations.RecordCommonLog;
|
||||
import com.syjiaer.clinic.server.common.vo.Result;
|
||||
import com.syjiaer.clinic.server.controller.BaseController;
|
||||
|
|
@ -20,6 +23,11 @@ public class SignController extends BaseController {
|
|||
@RecordCommonLog(operation = "医保签到")
|
||||
@ApiOperation("医保签到")
|
||||
@RequestMapping("/in")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "mac", value = "mac地址", required = true),
|
||||
@ApiParam(name = "ip", value = "ip地址", required = true)
|
||||
})
|
||||
@ApiReturn(type = ManagerUserSign.class)
|
||||
public Result<ManagerUserSign> in() {
|
||||
String mac = parmsUtil.getString("mac", "请输入mac地址");
|
||||
String ip = parmsUtil.getString("ip", "请输入ip地址");
|
||||
|
|
@ -29,6 +37,7 @@ public class SignController extends BaseController {
|
|||
@RecordCommonLog(operation = "医保签退")
|
||||
@ApiOperation("医保签退")
|
||||
@RequestMapping("/out")
|
||||
@ApiReturn(isNull = true)
|
||||
public Result<String> out() {
|
||||
signService.out();
|
||||
return success("签退成功");
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.syjiaer.clinic.server.controller.goods;
|
|||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiParam;
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiParams;
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiReturn;
|
||||
import com.syjiaer.clinic.server.common.annotations.RecordCommonLog;
|
||||
import com.syjiaer.clinic.server.common.enums.GoodsPricingModelEnum;
|
||||
import com.syjiaer.clinic.server.common.util.ParmsUtil;
|
||||
|
|
@ -48,7 +49,8 @@ public class GoodsController extends BaseController {
|
|||
@ApiParams({
|
||||
@ApiParam(name = "data", value = "商品信息", required = true, type = Goods.class)
|
||||
})
|
||||
public Result<Object> save() {
|
||||
@ApiReturn(type = Goods.class)
|
||||
public Result<Goods> save() {
|
||||
Goods goods=parmsUtil.getObject("data", Goods.class);
|
||||
if (goods.getPurchaseUnitPrice()==null) {
|
||||
return error("请输入参考进价");
|
||||
|
|
@ -88,6 +90,10 @@ public class GoodsController extends BaseController {
|
|||
@RecordCommonLog(operation = "商品重新初始化医保库存")
|
||||
@ApiOperation("商品重新初始化医保库存")
|
||||
@RequestMapping("returnInit")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "id", value = "商品id", required = true)
|
||||
})
|
||||
@ApiReturn(isNull = true)
|
||||
public Result<Object> returnInit() {
|
||||
Integer goodId = parmsUtil.getInteger("id");
|
||||
goodsService.returnInit(goodId);
|
||||
|
|
@ -99,6 +105,10 @@ public class GoodsController extends BaseController {
|
|||
*/
|
||||
@ApiOperation("商品搜索")
|
||||
@RequestMapping("DetailWithSearch")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "query", value = "查询参数", required = true, type = GoodsQuery.class)
|
||||
})
|
||||
@ApiReturn(type = GoodsDetailVo.class)
|
||||
public Result<Page<GoodsDetailVo>> DetailWithSearch() {
|
||||
GoodsQuery goodsQuery = parmsUtil.getObject("query", GoodsQuery.class);
|
||||
Page<GoodsDetailVo> result = goodsService.searchGoodeDetail(goodsQuery);
|
||||
|
|
@ -110,6 +120,10 @@ public class GoodsController extends BaseController {
|
|||
*/
|
||||
@ApiOperation("商品搜索 下单时的搜索")
|
||||
@RequestMapping("search")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "keyword", value = "关键字", required = true)
|
||||
})
|
||||
@ApiReturn(type = GoodsSearchVo.class)
|
||||
public Result<List<GoodsSearchVo>> search() {
|
||||
Map<String, Object> parms = getParms();
|
||||
String keyword = (String) parms.get("keyword");
|
||||
|
|
@ -123,6 +137,10 @@ public class GoodsController extends BaseController {
|
|||
*/
|
||||
@ApiOperation("根据商品id获取商品")
|
||||
@RequestMapping("get")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "id", value = "商品id", required = true)
|
||||
})
|
||||
@ApiReturn(type = Goods.class)
|
||||
public Result<Object> get() {
|
||||
int id = parmsUtil.getInteger("id", "请输入ID");
|
||||
return success(goodsService.getById(id));
|
||||
|
|
@ -135,6 +153,11 @@ public class GoodsController extends BaseController {
|
|||
@ApiOperation("商品添加标识码")
|
||||
@RecordCommonLog(operation = "商品添加标识码")
|
||||
@RequestMapping("addIdCode")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "goodsId", value = "商品id", required = true),
|
||||
@ApiParam(name = "idCode", value = "标识码", required = true)
|
||||
})
|
||||
@ApiReturn(isNull = true)
|
||||
public Result<Object> addIdCode(){
|
||||
Integer goodsId = parmsUtil.getInteger("goodsId","商品id为空");
|
||||
String idCode = parmsUtil.getString("idCode","标识码为空");
|
||||
|
|
@ -148,6 +171,10 @@ public class GoodsController extends BaseController {
|
|||
*/
|
||||
@ApiOperation("获取二级分类绑定的商品数量")
|
||||
@RequestMapping("getByCateId")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "cateId", value = "二级分类ID", required = true)
|
||||
})
|
||||
@ApiReturn(name = "数量", typeName = "Long")
|
||||
public Result<Long> getCountByCateId() {
|
||||
Integer cateId = parmsUtil.getInteger("cateId", "请输入分类ID");
|
||||
return success(goodsService.getByCateId(cateId));
|
||||
|
|
@ -159,6 +186,10 @@ public class GoodsController extends BaseController {
|
|||
@ApiOperation("停售商品")
|
||||
@RecordCommonLog(operation = "停售商品")
|
||||
@RequestMapping("disableSale")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "id", value = "商品id", required = true)
|
||||
})
|
||||
@ApiReturn(type = Goods.class)
|
||||
public Result<Goods> disableSale() {
|
||||
Integer id = parmsUtil.getInteger("id", "id不存在");
|
||||
return success(goodsService.disableSale(id));
|
||||
|
|
@ -169,6 +200,10 @@ public class GoodsController extends BaseController {
|
|||
@ApiOperation("起售商品")
|
||||
@RecordCommonLog(operation = "启售商品")
|
||||
@RequestMapping("enableSale")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "id", value = "商品id", required = true)
|
||||
})
|
||||
@ApiReturn(type = Goods.class)
|
||||
public Result<Goods> enableSale() {
|
||||
Integer id = parmsUtil.getInteger("id", "id不存在");
|
||||
return success(goodsService.enableSale(id));
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
package com.syjiaer.clinic.server.controller.inventory;
|
||||
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiParam;
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiParams;
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiReturn;
|
||||
import com.syjiaer.clinic.server.common.annotations.RecordCommonLog;
|
||||
import com.syjiaer.clinic.server.common.vo.Page;
|
||||
import com.syjiaer.clinic.server.common.vo.Result;
|
||||
|
|
@ -30,6 +33,11 @@ public class InventoryApplyController extends BaseController {
|
|||
@RecordCommonLog(operation = "创建领用单并领用")
|
||||
@ApiOperation("创建领用单并领用")
|
||||
@RequestMapping("/create")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "data", value = "领用单商品信息", required = true, type = Map.class,isArray = true),
|
||||
@ApiParam(name = "useInfo", value = "领用单信息", required = true, type = InventoryApply.class)
|
||||
})
|
||||
@ApiReturn(isNull = true)
|
||||
public Result create() {
|
||||
List<Map> mapList = parmsUtil.getList("data",Map.class);
|
||||
InventoryApply useInfo = parmsUtil.getObject("useInfo", InventoryApply.class);
|
||||
|
|
@ -43,6 +51,10 @@ public class InventoryApplyController extends BaseController {
|
|||
*/
|
||||
@ApiOperation("分页查询领用单")
|
||||
@RequestMapping("/list")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "query", value = "查询参数", required = true, type = ApplyOrderQuery.class)
|
||||
})
|
||||
@ApiReturn(type = InventoryApply.class)
|
||||
public Result<Page> list() {
|
||||
ApplyOrderQuery query = parmsUtil.getObject("query", ApplyOrderQuery.class);
|
||||
|
||||
|
|
@ -55,6 +67,10 @@ public class InventoryApplyController extends BaseController {
|
|||
*/
|
||||
@ApiOperation("获取领用单详情")
|
||||
@RequestMapping("/getDetail")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "id", value = "领用单id", required = true)
|
||||
})
|
||||
@ApiReturn(name = "详情JSON字符串", typeName = "String")
|
||||
public Result<String> getDetail(){
|
||||
Integer applyId = parmsUtil.getInteger("id", "id不能为空");
|
||||
return success(inventoryApplyService.getCheckDetail(applyId));
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
package com.syjiaer.clinic.server.controller.inventory;
|
||||
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiParam;
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiParams;
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiReturn;
|
||||
import com.syjiaer.clinic.server.common.annotations.RecordCommonLog;
|
||||
import com.syjiaer.clinic.server.common.vo.Page;
|
||||
import com.syjiaer.clinic.server.common.vo.Result;
|
||||
|
|
@ -26,6 +29,10 @@ public class InventoryCheckController extends BaseController {
|
|||
*/
|
||||
@ApiOperation("盘点列表分页查询")
|
||||
@RequestMapping("/list")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "query", value = "查询参数", required = true, type = CheckQuery.class)
|
||||
})
|
||||
@ApiReturn(type = InventoryCheck.class)
|
||||
public Result<Page<InventoryCheck>> list() {
|
||||
CheckQuery query= parmsUtil.getObject("query", CheckQuery.class);
|
||||
|
||||
|
|
@ -39,6 +46,12 @@ public class InventoryCheckController extends BaseController {
|
|||
@ApiOperation("保存盘点记录")
|
||||
@RecordCommonLog(operation = "完成盘点")
|
||||
@RequestMapping("/save")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "list", value = "盘点列表", required = true, type = Map.class,isArray = true),
|
||||
@ApiParam(name = "remark", value = "盘点备注", required = true),
|
||||
@ApiParam(name = "checkUserId", value = "盘点人id", required = true)
|
||||
})
|
||||
@ApiReturn(isNull = true)
|
||||
public Result save() {
|
||||
List<Map> list = parmsUtil.getList("list", Map.class);
|
||||
String remark = parmsUtil.getString("remark");
|
||||
|
|
@ -52,6 +65,10 @@ public class InventoryCheckController extends BaseController {
|
|||
*/
|
||||
@ApiOperation("获取盘点单详情")
|
||||
@RequestMapping("/getDetail")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "id", value = "盘点单id", required = true)
|
||||
})
|
||||
@ApiReturn(name = "详情JSON字符串", typeName = "String")
|
||||
public Result<String> getDetail(){
|
||||
Integer checkId = parmsUtil.getInteger("id", "id不能为空");
|
||||
return success(inventoryCheckService.getCheckDetail(checkId));
|
||||
|
|
|
|||
|
|
@ -1,12 +1,17 @@
|
|||
package com.syjiaer.clinic.server.controller.inventory;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiParam;
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiParams;
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiReturn;
|
||||
import com.syjiaer.clinic.server.common.annotations.RecordCommonLog;
|
||||
import com.syjiaer.clinic.server.common.util.DateUtil;
|
||||
import com.syjiaer.clinic.server.common.vo.Result;
|
||||
import com.syjiaer.clinic.server.controller.BaseController;
|
||||
import com.syjiaer.clinic.server.entity.goods.Goods;
|
||||
import com.syjiaer.clinic.server.entity.inventory.Inventory;
|
||||
import com.syjiaer.clinic.server.entity.inventory.InventoryLog;
|
||||
import com.syjiaer.clinic.server.entity.inventory.vo.InventoryGoodsTotalVo;
|
||||
import com.syjiaer.clinic.server.service.goods.GoodsService;
|
||||
import com.syjiaer.clinic.server.service.inventory.InventoryPurchaseService;
|
||||
import com.syjiaer.clinic.server.service.inventory.InventoryService;
|
||||
|
|
@ -38,6 +43,10 @@ public class InventoryController extends BaseController {
|
|||
*/
|
||||
@ApiOperation("获取采购单信息 根据code")
|
||||
@RequestMapping("/listByOrderCode")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "orderCode", value = "采购单code", required = true)
|
||||
})
|
||||
@ApiReturn(type = Inventory.class)
|
||||
public Result<List<Inventory>> listByOrderCode() {
|
||||
String purchaseCode = parmsUtil.getString("orderCode", "请输入订单号");
|
||||
return success(inventoryService.listByPurchaseCode(purchaseCode));
|
||||
|
|
@ -47,9 +56,13 @@ public class InventoryController extends BaseController {
|
|||
/**
|
||||
* 根据goodsId 获取该goods的所有库存信息 带库存总量
|
||||
*/
|
||||
@ApiOperation("获取商品库存信息 根据goodsId")
|
||||
@ApiOperation("根据goodsId获取商品库存信息")
|
||||
@RequestMapping("/getByGoodsId")
|
||||
public Result<Map<String, Object>> getByGoodsId() {
|
||||
@ApiParams({
|
||||
@ApiParam(name = "goodsId", value = "商品ID", required = true)
|
||||
})
|
||||
@ApiReturn(type = InventoryGoodsTotalVo.class)
|
||||
public Result<InventoryGoodsTotalVo> getByGoodsId() {
|
||||
int goodsId = parmsUtil.getInteger("goodsId", "请输入商品ID");
|
||||
Boolean isZero = parmsUtil.getObject("isZero", Boolean.class);
|
||||
|
||||
|
|
@ -57,32 +70,31 @@ public class InventoryController extends BaseController {
|
|||
if (goods == null) {
|
||||
return error("商品不存在");
|
||||
}
|
||||
Map<String, Object> goodsMap = JSON.parseObject(JSON.toJSONString(goods), Map.class);
|
||||
List<Inventory> list = inventoryService.getListByGoodsId(goodsId, isZero);
|
||||
List<Map<String, Object>> listMap = new ArrayList<>();
|
||||
List<Inventory> listMap = new ArrayList<>();
|
||||
for (Inventory inventory : list) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("id", inventory.getId());
|
||||
map.put("wholeNumber", inventory.getWholeNumber());
|
||||
map.put("fragmentNumber", inventory.getFragmentNumber());
|
||||
map.put("productionBatchCode", inventory.getProductionBatchCode());
|
||||
map.put("productionDate", inventory.getProductionDate());
|
||||
map.put("expiryDate", inventory.getExpiryDate());
|
||||
map.put("purchaseUnitPrice", inventory.getPurchaseUnitPrice());
|
||||
listMap.add(map);
|
||||
listMap.add(inventory);
|
||||
}
|
||||
goodsMap.put("inventoryGoodsList", listMap);
|
||||
InventoryGoodsTotalVo inventoryGoodsTotalVo = new InventoryGoodsTotalVo();
|
||||
inventoryGoodsTotalVo.setInventoryGoodsList(listMap);
|
||||
Map<String, Integer> map = inventoryService.totalNumber(goodsId);
|
||||
goodsMap.putAll(map);
|
||||
return success(goodsMap);
|
||||
inventoryGoodsTotalVo.setWholeNumber(map.get("wholeNumber"));
|
||||
inventoryGoodsTotalVo.setFragmentNumber(map.get("fragmentNumber"));
|
||||
inventoryGoodsTotalVo.setTotalFragment(map.get("totalFragment"));
|
||||
inventoryGoodsTotalVo.setListSize(map.get("listSize"));
|
||||
return success(inventoryGoodsTotalVo);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据goodsId 获取该goods的所有库存信息
|
||||
*/
|
||||
@ApiOperation("获取商品库存信息 根据goodsId")
|
||||
@ApiOperation("根据goodsId获取商品库存信息(已作废)")
|
||||
@RequestMapping("/listByGoodsId")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "goodsId", value = "商品ID", required = true)
|
||||
})
|
||||
@ApiReturn(type = Inventory.class, isArray = true)
|
||||
public Result<List<Inventory>> listByGoodsId() {
|
||||
int goodsId = parmsUtil.getInteger("goodsId", "请输入商品ID");
|
||||
Goods goods = goodsService.getById(goodsId);
|
||||
|
|
@ -98,6 +110,10 @@ public class InventoryController extends BaseController {
|
|||
*/
|
||||
@ApiOperation("根据库存id集合获取库存信息")
|
||||
@RequestMapping("/listByIds")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "idList", value = "库存id集合", required = true, type = Integer.class,isArray = true)
|
||||
})
|
||||
@ApiReturn(type = Inventory.class, isArray = true)
|
||||
public Result<List<Inventory>> listByIds() {
|
||||
List<Integer> ids = parmsUtil.getIntList("idList");
|
||||
if (ids == null || ids.isEmpty()) {
|
||||
|
|
@ -112,6 +128,12 @@ public class InventoryController extends BaseController {
|
|||
*/
|
||||
@ApiOperation("库存统计")
|
||||
@RequestMapping("/statistics")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "goodsId", value = "商品ID", required = true),
|
||||
@ApiParam(name = "startDate", value = "开始时间", required = true),
|
||||
@ApiParam(name = "endDate", value = "结束时间", required = true)
|
||||
})
|
||||
@ApiReturn(type = InventoryService.LineModel.class, isArray = true)
|
||||
public Result<List<InventoryService.LineModel>> statistics() {
|
||||
int goodsId = parmsUtil.getInteger("goodsId", "请选择商品id");
|
||||
String startDateStr = parmsUtil.getString("startDate", "请选择开始时间");
|
||||
|
|
@ -127,13 +149,19 @@ public class InventoryController extends BaseController {
|
|||
//todo getInventoryLog
|
||||
@ApiOperation("获取库存日志")
|
||||
@RequestMapping("/log")
|
||||
public Result<List<Map<String, Object>>> log() {
|
||||
@ApiParams({
|
||||
@ApiParam(name = "goodsId", value = "商品ID", required = true),
|
||||
@ApiParam(name = "startDate", value = "开始时间", required = true),
|
||||
@ApiParam(name = "endDate", value = "结束时间", required = true)
|
||||
})
|
||||
@ApiReturn(type = InventoryLog.class, isArray = true)
|
||||
public Result<List<InventoryLog>> log() {
|
||||
int goodsId = parmsUtil.getInteger("goodsId", "请选择商品id");
|
||||
String startDateStr = parmsUtil.getString("startDate", "请选择开始时间");
|
||||
String endDateStr = parmsUtil.getString("endDate", "请选择结束时间");
|
||||
LocalDateTime startDateTime = DateUtil.getDateTime(startDateStr);
|
||||
LocalDateTime endDateTime = DateUtil.getDateTime(endDateStr).plusDays(1);
|
||||
List<Map<String, Object>> inventoryStatistics = inventoryService.getInventoryLogByGoodsId(goodsId, startDateTime, endDateTime);
|
||||
List<InventoryLog> inventoryStatistics = inventoryService.getInventoryLogByGoodsId(goodsId, startDateTime, endDateTime);
|
||||
return success(inventoryStatistics);
|
||||
}
|
||||
|
||||
|
|
@ -145,6 +173,10 @@ public class InventoryController extends BaseController {
|
|||
@ApiOperation("修改库存采购信息")
|
||||
@RecordCommonLog(operation = "更改采购单商品信息")
|
||||
@RequestMapping("/update")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "list", value = "库存商品列表", required = true, type = Inventory.class,isArray = true)
|
||||
})
|
||||
@ApiReturn(isNull = true)
|
||||
public Result update() {
|
||||
List<Inventory> list = parmsUtil.getList("list", Inventory.class);
|
||||
inventoryService.updatePurchaseItem(list);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
package com.syjiaer.clinic.server.controller.inventory;
|
||||
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiParam;
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiParams;
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiReturn;
|
||||
import com.syjiaer.clinic.server.common.annotations.RecordCommonLog;
|
||||
import com.syjiaer.clinic.server.common.util.CacheUtil;
|
||||
import com.syjiaer.clinic.server.common.util.StringUtil;
|
||||
|
|
@ -9,6 +12,7 @@ import com.syjiaer.clinic.server.controller.BaseController;
|
|||
import com.syjiaer.clinic.server.entity.inventory.Inventory;
|
||||
import com.syjiaer.clinic.server.entity.inventory.InventoryPurchase;
|
||||
import com.syjiaer.clinic.server.entity.inventory.dto.PurchaseOrderQuery;
|
||||
import com.syjiaer.clinic.server.entity.inventory.vo.InventoryOrderVo;
|
||||
import com.syjiaer.clinic.server.entity.inventory.vo.InventoryPurchaseVo;
|
||||
import com.syjiaer.clinic.server.service.inventory.InventoryPurchaseService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
|
@ -42,6 +46,11 @@ public class InventoryPurchaseController extends BaseController {
|
|||
@ApiOperation("创建采购单")
|
||||
@RecordCommonLog(operation = "创建采购单")
|
||||
@RequestMapping("/create")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "inventoryOrder", value = "采购单信息", required = true),
|
||||
@ApiParam(name = "inventoryOrderGoodsList", value = "采购单商品列表", required = true, type = Inventory.class,isArray = true)
|
||||
})
|
||||
@ApiReturn(isNull = true)
|
||||
public Result<Object> create() {
|
||||
InventoryPurchase purchase_order = parmsUtil.getObject("inventoryOrder", InventoryPurchase.class);
|
||||
List<Inventory> list = parmsUtil.getList("inventoryOrderGoodsList", Inventory.class, "请至少采购一件商品");
|
||||
|
|
@ -57,6 +66,10 @@ public class InventoryPurchaseController extends BaseController {
|
|||
*/
|
||||
@ApiOperation("分页查询采购单")
|
||||
@RequestMapping("/list")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "query", value = "查询条件",type = PurchaseOrderQuery.class, required = true)
|
||||
})
|
||||
@ApiReturn(type = InventoryPurchaseVo.class,isPage = true)
|
||||
public Result<Page<InventoryPurchaseVo>> list() {
|
||||
PurchaseOrderQuery query = parmsUtil.getObject("query", PurchaseOrderQuery.class);
|
||||
|
||||
|
|
@ -68,10 +81,14 @@ public class InventoryPurchaseController extends BaseController {
|
|||
*/
|
||||
@ApiOperation("获取采购单详情")
|
||||
@RequestMapping("/detail")
|
||||
public Result<Map<String, Object>> detail() {
|
||||
@ApiParams({
|
||||
@ApiParam(name = "code", value = "采购单号", required = true)
|
||||
})
|
||||
@ApiReturn(type = InventoryPurchaseVo.class)
|
||||
public Result<InventoryOrderVo> detail() {
|
||||
String code = parmsUtil.getString("code","采购单号不能为空");
|
||||
Map<String, Object> byCode = inventoryPurchaseService.getByCode(code);
|
||||
return success(byCode);
|
||||
InventoryOrderVo inventoryOrderVo = inventoryPurchaseService.getByCode(code);
|
||||
return success(inventoryOrderVo);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -81,6 +98,10 @@ public class InventoryPurchaseController extends BaseController {
|
|||
@ApiOperation("更新采购单基本信息")
|
||||
@RecordCommonLog(operation = "更新采购单基本信息")
|
||||
@RequestMapping("/update")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "inventoryOrder", value = "采购单信息", type = InventoryPurchase.class, required = true)
|
||||
})
|
||||
@ApiReturn(isNull = true)
|
||||
public Result update() {
|
||||
InventoryPurchase inventoryOrder = parmsUtil.getObject("inventoryOrder", InventoryPurchase.class);
|
||||
if (inventoryOrder.getInvoiceCode() == null || inventoryOrder.getInvoiceCode().isEmpty()) {
|
||||
|
|
@ -97,6 +118,10 @@ public class InventoryPurchaseController extends BaseController {
|
|||
@ApiOperation("采购单修改时 添加采购的商品")
|
||||
@RecordCommonLog(operation = "已有的采购单中添加商品")
|
||||
@RequestMapping("/addGoods")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "data", value = "采购商品", type = Inventory.class, required = true)
|
||||
})
|
||||
@ApiReturn(isNull = true)
|
||||
public Result addGoods() {
|
||||
Inventory inventory = parmsUtil.getObject("data", Inventory.class);
|
||||
if (inventory == null) {
|
||||
|
|
@ -117,6 +142,10 @@ public class InventoryPurchaseController extends BaseController {
|
|||
@ApiOperation("采购单退货")
|
||||
@RecordCommonLog(operation = "采购单退货")
|
||||
@RequestMapping("/refund")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "idList", value = "退货商品id列表", required = true)
|
||||
})
|
||||
@ApiReturn(isNull = true)
|
||||
public Result refund() {
|
||||
List<Integer> list = parmsUtil.getIntList("idList");
|
||||
if (list == null || list.isEmpty()) {
|
||||
|
|
@ -133,6 +162,7 @@ public class InventoryPurchaseController extends BaseController {
|
|||
@ApiOperation("采购一键导入,生成excel")
|
||||
|
||||
@RequestMapping("/toExcel")
|
||||
@ApiReturn(name ="",value = "文件临时下载令牌")
|
||||
public Result toExcel() {
|
||||
List<Integer> cateIdList = parmsUtil.getIntList("cateIdList");
|
||||
String excelFilePath = inventoryPurchaseService.toExcel(cateIdList);
|
||||
|
|
@ -148,6 +178,10 @@ public class InventoryPurchaseController extends BaseController {
|
|||
*/
|
||||
@ApiOperation("采购一键导入,解析excel")
|
||||
@RequestMapping("/fromExcel")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "token", value = "文件临时下载令牌", required = true)
|
||||
})
|
||||
@ApiReturn(name ="",value = "文件解析结果")
|
||||
public Result fromExcel() {
|
||||
String file_token = parmsUtil.getString("token");
|
||||
Map<String,Object> map=cacheUtil.get(file_token);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
package com.syjiaer.clinic.server.controller.inventory;
|
||||
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiParam;
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiParams;
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiReturn;
|
||||
import com.syjiaer.clinic.server.common.annotations.RecordCommonLog;
|
||||
import com.syjiaer.clinic.server.common.vo.Page;
|
||||
import com.syjiaer.clinic.server.common.vo.Result;
|
||||
|
|
@ -24,6 +27,10 @@ public class InventorySupplierController extends BaseController {
|
|||
*/
|
||||
@ApiOperation("分页查询供货商")
|
||||
@RequestMapping("/list")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "query", value = "查询条件", type = SupplierQuery.class, required = true)
|
||||
})
|
||||
@ApiReturn(type = InventorySupplier.class, isPage = true)
|
||||
public Result<Page> list() {
|
||||
SupplierQuery query= parmsUtil.getObject("query", SupplierQuery.class);
|
||||
|
||||
|
|
@ -37,6 +44,10 @@ public class InventorySupplierController extends BaseController {
|
|||
@ApiOperation("保存供货商")
|
||||
@RecordCommonLog(operation = "保存供货商")
|
||||
@RequestMapping("/save")
|
||||
@ApiParams({
|
||||
@ApiParam(type = InventorySupplier.class,name="inventorySupplier", value = "供货商信息", required = true)
|
||||
})
|
||||
@ApiReturn(isNull = true)
|
||||
public Result save() {
|
||||
InventorySupplier inventorySupplier = parmsUtil.getObject("inventorySupplier", InventorySupplier.class);
|
||||
inventorySupplierService.saveOrUpdate(inventorySupplier);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
package com.syjiaer.clinic.server.controller.item;
|
||||
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiParam;
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiParams;
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiReturn;
|
||||
import com.syjiaer.clinic.server.common.annotations.RecordCommonLog;
|
||||
import com.syjiaer.clinic.server.common.exception.MessageException;
|
||||
import com.syjiaer.clinic.server.common.vo.Page;
|
||||
|
|
@ -28,6 +31,13 @@ public class ItemController extends BaseController {
|
|||
*/
|
||||
@ApiOperation("获取非组套列表")
|
||||
@RequestMapping("/list")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "pageNum", value = "页码", required = true),
|
||||
@ApiParam(name = "pageSize", value = "页容量", required = true),
|
||||
@ApiParam(name = "name", value = "名称"),
|
||||
@ApiParam(name = "tel", value = "电话")
|
||||
})
|
||||
@ApiReturn(type = Item.class,isPage = true)
|
||||
public Result<Page<Item>> getAllItems() {
|
||||
int page = parmsUtil.getInteger("pageNum", "页码不能为空");
|
||||
int size = parmsUtil.getInteger("pageSize", "页容量不能为空");
|
||||
|
|
@ -41,6 +51,11 @@ public class ItemController extends BaseController {
|
|||
*/
|
||||
@ApiOperation("获取组套列表")
|
||||
@RequestMapping("/groupList")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "page", value = "页码", required = true),
|
||||
@ApiParam(name = "size", value = "页容量", required = true)
|
||||
})
|
||||
@ApiReturn(type = Item.class,isPage = true)
|
||||
public Result<Page<Item>> groupList() {
|
||||
int page = parmsUtil.getInteger("page", "页码不能为空");
|
||||
int size = parmsUtil.getInteger("size", "页容量不能为空");
|
||||
|
|
@ -53,6 +68,10 @@ public class ItemController extends BaseController {
|
|||
*/
|
||||
@ApiOperation("获取项目详情")
|
||||
@RequestMapping("/get")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "id", value = "项目id", required = true)
|
||||
})
|
||||
@ApiReturn(type = Item.class)
|
||||
public Result<Item> get() {
|
||||
Integer id = parmsUtil.getInteger("id");
|
||||
if (id == null) {
|
||||
|
|
@ -66,6 +85,10 @@ public class ItemController extends BaseController {
|
|||
@ApiOperation("添加项目")
|
||||
@RecordCommonLog(operation = "保存服务项目")
|
||||
@RequestMapping("/add")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "data", value = "模型", required = true, type = Item.class)
|
||||
})
|
||||
@ApiReturn(isNull = true)
|
||||
public Result<?> createItem() {
|
||||
Item item = parmsUtil.getObject("data", Item.class);
|
||||
itemService.save(item);
|
||||
|
|
@ -77,6 +100,10 @@ public class ItemController extends BaseController {
|
|||
@ApiOperation("修改项目")
|
||||
@RecordCommonLog(operation = "编辑服务项目")
|
||||
@RequestMapping("/edit")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "data", value = "模型", required = true, type = Item.class)
|
||||
})
|
||||
@ApiReturn(isNull = true)
|
||||
public Result<?> updateItem() {
|
||||
Item item = parmsUtil.getObject("data", Item.class);
|
||||
itemService.updateItem(item);
|
||||
|
|
@ -88,6 +115,10 @@ public class ItemController extends BaseController {
|
|||
*/
|
||||
@ApiOperation("删除项目")
|
||||
@RequestMapping("/del")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "id", value = "项目id", required = true)
|
||||
})
|
||||
@ApiReturn(isNull = true)
|
||||
public Result<?> del() {
|
||||
Integer id = parmsUtil.getInteger("id");
|
||||
itemService.delete(id);
|
||||
|
|
@ -98,6 +129,10 @@ public class ItemController extends BaseController {
|
|||
*/
|
||||
@ApiOperation("搜索项目")
|
||||
@RequestMapping("/search")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "keyword", value = "关键字", required = true)
|
||||
})
|
||||
@ApiReturn(type = ItemSearchVo.class,isArray = true)
|
||||
public Result<List<ItemSearchVo>> search() {
|
||||
String keyword = parmsUtil.getString("keyword");
|
||||
|
||||
|
|
@ -108,6 +143,11 @@ public class ItemController extends BaseController {
|
|||
*/
|
||||
@ApiOperation("保存组套")
|
||||
@RequestMapping("/saveGroup")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "list", value = "组套", required = true),
|
||||
@ApiParam(name = "info", value = "组套信息", required = true)
|
||||
})
|
||||
@ApiReturn(isNull = true)
|
||||
public Result<?> saveGroup() {
|
||||
List<ItemGroupList> itemGroupList = parmsUtil.getList("list", ItemGroupList.class,"请求参数list不能为空");
|
||||
|
||||
|
|
@ -122,6 +162,9 @@ public class ItemController extends BaseController {
|
|||
*/
|
||||
@ApiOperation("获取组套")
|
||||
@RequestMapping("/getGroup")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "id", value = "项目id", required = true)
|
||||
})
|
||||
public Result<?> getGroup() {
|
||||
Integer itemId = parmsUtil.getInteger("id","item_id为空");
|
||||
return success(itemService.getGroup(itemId));
|
||||
|
|
@ -131,6 +174,10 @@ public class ItemController extends BaseController {
|
|||
*/
|
||||
@ApiOperation("删除组套")
|
||||
@RequestMapping("/deleteGroup")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "id", value = "项目id", required = true)
|
||||
})
|
||||
@ApiReturn(isNull = true)
|
||||
public Result<?> deleteGroup() {
|
||||
Integer itemId = parmsUtil.getInteger("id","item_id为空");
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
package com.syjiaer.clinic.server.controller.organization;
|
||||
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiParam;
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiParams;
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiReturn;
|
||||
import com.syjiaer.clinic.server.common.annotations.RecordCommonLog;
|
||||
import com.syjiaer.clinic.server.common.exception.MessageException;
|
||||
import com.syjiaer.clinic.server.common.vo.Page;
|
||||
|
|
@ -24,6 +27,13 @@ public class OrganizationMemberController extends BaseController {
|
|||
|
||||
@ApiOperation("分页查询成员列表")
|
||||
@RequestMapping("/list")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "page", value = "页码", required = true),
|
||||
@ApiParam(name = "size", value = "页容量", required = true),
|
||||
@ApiParam(name = "name", value = "名称"),
|
||||
@ApiParam(name = "tel", value = "电话")
|
||||
})
|
||||
@ApiReturn(type = OrganizationMemberSaveDto.class,isPage = true)
|
||||
public Result<Page<OrganizationMemberSaveDto>> list() {
|
||||
int page = parmsUtil.getInteger("page","页码不能为空");
|
||||
int size = parmsUtil.getInteger("size", "页容量不能为空");
|
||||
|
|
@ -34,6 +44,10 @@ public class OrganizationMemberController extends BaseController {
|
|||
|
||||
@ApiOperation("保存成员信息")
|
||||
@RequestMapping("/save")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "data", value = "模型", required = true, type = OrganizationMemberSaveDto.class)
|
||||
})
|
||||
@ApiReturn(isNull = true)
|
||||
@RecordCommonLog(operation = "保存成员信息")
|
||||
public Result<?> save() {
|
||||
OrganizationMemberSaveDto dto = parmsUtil.getObject("data", OrganizationMemberSaveDto.class);
|
||||
|
|
@ -47,6 +61,10 @@ public class OrganizationMemberController extends BaseController {
|
|||
@ApiOperation("删除成员")
|
||||
@RequestMapping("/del")
|
||||
@RecordCommonLog(operation = "删除成员")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "id", value = "成员id", required = true)
|
||||
})
|
||||
@ApiReturn(isNull = true)
|
||||
public Result<?> del() {
|
||||
Integer id = parmsUtil.getInteger("id");
|
||||
if(id == null){
|
||||
|
|
@ -58,6 +76,10 @@ public class OrganizationMemberController extends BaseController {
|
|||
|
||||
@ApiOperation("获取成员信息")
|
||||
@RequestMapping("/get")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "id", value = "成员id", required = true)
|
||||
})
|
||||
@ApiReturn(type = OrganizationMemberSaveDto.class)
|
||||
public Result<OrganizationMemberSaveDto> get() {
|
||||
Integer id = parmsUtil.getInteger("id","id不能为空");
|
||||
return success(organizationMemberService.get(id));
|
||||
|
|
@ -66,6 +88,10 @@ public class OrganizationMemberController extends BaseController {
|
|||
|
||||
@ApiOperation("搜索成员")
|
||||
@RequestMapping("/search")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "query", value = "查询参数", required = true, type = DockerSearchQuery.class)
|
||||
})
|
||||
@ApiReturn(type = OrganizationMember.class,isArray = true)
|
||||
public Result<List<OrganizationMember>> search() {
|
||||
DockerSearchQuery dockerSearchQuery = parmsUtil.getObject("query", DockerSearchQuery.class);
|
||||
return success(organizationMemberService.doctorList(dockerSearchQuery));
|
||||
|
|
@ -77,6 +103,10 @@ public class OrganizationMemberController extends BaseController {
|
|||
*/
|
||||
@ApiOperation("获取当前科室的所有医生")
|
||||
@RequestMapping("/listBySectionId")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "sectionId", value = "科室id", required = true)
|
||||
})
|
||||
@ApiReturn(type = OrganizationMember.class,isArray = true)
|
||||
public Result<List<OrganizationMember>> listBySectionId() {
|
||||
Integer sectionId = parmsUtil.getInteger("sectionId");
|
||||
if(sectionId == null){
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
package com.syjiaer.clinic.server.controller.organization;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiParam;
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiParams;
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiReturn;
|
||||
import com.syjiaer.clinic.server.common.annotations.RecordCommonLog;
|
||||
import com.syjiaer.clinic.server.common.exception.MessageException;
|
||||
import com.syjiaer.clinic.server.common.util.StringUtil;
|
||||
|
|
@ -22,8 +25,17 @@ public class OrganizationSectionController extends BaseController {
|
|||
@Autowired
|
||||
private OrganizationSectionService organizationSectionService;
|
||||
|
||||
@RecordCommonLog(operation = "分页查询科室列表")
|
||||
@ApiOperation("分页查询科室列表")
|
||||
@RequestMapping("/list")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "page", value = "页码", required = true),
|
||||
@ApiParam(name = "size", value = "页容量", required = true),
|
||||
@ApiParam(name = "name", value = "名称"),
|
||||
@ApiParam(name = "caty", value = "科别"),
|
||||
@ApiParam(name = "resperName", value = "负责人姓名"),
|
||||
@ApiParam(name = "resperTel", value = "负责人电话")
|
||||
})
|
||||
@ApiReturn(type = OrganizationSection.class,isPage = true)
|
||||
public Result<Page<OrganizationSection>> list() {
|
||||
int page = parmsUtil.getInteger("page","页码不能为空");
|
||||
int size = parmsUtil.getInteger("size", "页容量不能为空");
|
||||
|
|
@ -37,6 +49,10 @@ public class OrganizationSectionController extends BaseController {
|
|||
@ApiOperation("添加科室")
|
||||
@RecordCommonLog(operation = "添加科室")
|
||||
@RequestMapping("/add")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "data", value = "模型", required = true, type = OrganizationSection.class)
|
||||
})
|
||||
@ApiReturn(isNull = true)
|
||||
public Result<?> add() {
|
||||
OrganizationSection organizationSection = parmsUtil.getObjectWithCheck("data", OrganizationSection.class);
|
||||
|
||||
|
|
@ -49,6 +65,10 @@ public class OrganizationSectionController extends BaseController {
|
|||
@ApiOperation("修改科室信息")
|
||||
@RecordCommonLog(operation = "修改科室信息")
|
||||
@RequestMapping("/edit")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "data", value = "模型", required = true, type = OrganizationSection.class)
|
||||
})
|
||||
@ApiReturn(isNull = true)
|
||||
public Result<?> edit() {
|
||||
OrganizationSection organizationSection = parmsUtil.getObjectWithCheck("data", OrganizationSection.class);
|
||||
if(organizationSection ==null){
|
||||
|
|
@ -61,6 +81,10 @@ public class OrganizationSectionController extends BaseController {
|
|||
@ApiOperation("删除科室")
|
||||
@RecordCommonLog(operation = "删除科室")
|
||||
@RequestMapping("/del")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "id", value = "科室id", required = true)
|
||||
})
|
||||
@ApiReturn(isNull = true)
|
||||
public Result<?> del() {
|
||||
Integer id = parmsUtil.getInteger("id");
|
||||
if(id == null){
|
||||
|
|
@ -73,6 +97,10 @@ public class OrganizationSectionController extends BaseController {
|
|||
|
||||
@ApiOperation("获取科室信息")
|
||||
@RequestMapping("/get")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "id", value = "科室id", required = true)
|
||||
})
|
||||
@ApiReturn(type = OrganizationSection.class)
|
||||
public Result<OrganizationSection> get() {
|
||||
Integer id = parmsUtil.getInteger("id");
|
||||
if(id == null){
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
package com.syjiaer.clinic.server.controller.patient;
|
||||
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiParam;
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiParams;
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiReturn;
|
||||
import com.syjiaer.clinic.server.common.annotations.RecordCommonLog;
|
||||
import com.syjiaer.clinic.server.common.vo.Page;
|
||||
import com.syjiaer.clinic.server.common.vo.Result;
|
||||
|
|
@ -32,6 +35,10 @@ public class PatientController extends BaseController {
|
|||
@ApiOperation("创建患者")
|
||||
@RequestMapping("/create")
|
||||
@RecordCommonLog(operation = "创建患者")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "data", value = "模型", required = true, type = PatientInfo.class)
|
||||
})
|
||||
@ApiReturn(isNull = true)
|
||||
public Result<Object> create() {
|
||||
PatientInfo patientInfo = parmsUtil.getObject("vipInfo", PatientInfo.class);
|
||||
patientInfoService.create(patientInfo);
|
||||
|
|
@ -42,6 +49,10 @@ public class PatientController extends BaseController {
|
|||
@ApiOperation("修改患者信息")
|
||||
@RecordCommonLog(operation = "修改患者信息")
|
||||
@RequestMapping("/update")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "vipInfo", value = "患者信息", required = true, type = PatientInfo.class)
|
||||
})
|
||||
@ApiReturn(isNull = true)
|
||||
public Result<Object> update() {
|
||||
PatientInfo patientInfo = parmsUtil.getObject("vipInfo", PatientInfo.class);
|
||||
patientInfoService.update(patientInfo);
|
||||
|
|
@ -52,6 +63,10 @@ public class PatientController extends BaseController {
|
|||
@ApiOperation("删除患者")
|
||||
@RequestMapping("/del")
|
||||
@RecordCommonLog(operation = "删除患者")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "id", value = "患者ID", required = true)
|
||||
})
|
||||
@ApiReturn(isNull = true)
|
||||
public Result<Integer> del() {
|
||||
int patientId = parmsUtil.getInteger("id", "ID不能为空");
|
||||
return success(patientInfoService.removeById(patientId));
|
||||
|
|
@ -60,6 +75,12 @@ public class PatientController extends BaseController {
|
|||
|
||||
@ApiOperation("分页查询患者列表")
|
||||
@RequestMapping("/list")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "keyword", value = "关键字"),
|
||||
@ApiParam(name = "pageNum", value = "页码", required = true),
|
||||
@ApiParam(name = "pageSize", value = "页容量", required = true)
|
||||
})
|
||||
@ApiReturn(type = PatientInfo.class,isArray = true)
|
||||
public Result<Page<PatientInfo>> selectList() {
|
||||
String keyword = parmsUtil.getString("keyword");
|
||||
int page = parmsUtil.getInteger("page", "请输入页码");
|
||||
|
|
@ -70,6 +91,10 @@ public class PatientController extends BaseController {
|
|||
|
||||
@ApiOperation("获取患者信息")
|
||||
@RequestMapping("/get")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "id", value = "患者id", required = true, type = Integer.class)
|
||||
})
|
||||
@ApiReturn(type = PatientInfo.class)
|
||||
public Result<PatientInfo> get() {
|
||||
int id = parmsUtil.getInteger("id", "ID不能为空");
|
||||
PatientInfo patientInfo = patientInfoService.getById(id);
|
||||
|
|
@ -78,6 +103,12 @@ public class PatientController extends BaseController {
|
|||
|
||||
@ApiOperation("搜索患者")
|
||||
@RequestMapping("/search")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "keyword", value = "关键字", required = true),
|
||||
@ApiParam(name = "pageNum", value = "页码", required = true),
|
||||
@ApiParam(name = "pageSize", value = "页容量", required = true),
|
||||
})
|
||||
@ApiReturn(type = PatientInfo.class,isArray = true)
|
||||
public Result<List<PatientInfo>> search() {
|
||||
String keyword = parmsUtil.getString("keyword", "关键字不能为空");
|
||||
List<PatientInfo> list = patientInfoService.search(keyword);
|
||||
|
|
@ -88,6 +119,11 @@ public class PatientController extends BaseController {
|
|||
@ApiOperation("改变会员等级")
|
||||
@RecordCommonLog(operation = "改变会员等级")
|
||||
@RequestMapping("/changeLevel")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "vipId", value = "会员ID", required = true),
|
||||
@ApiParam(name = "levelId", value = "会员等级ID", required = true)
|
||||
})
|
||||
@ApiReturn(isNull = true)
|
||||
public Result<Object> changeLevel() {
|
||||
int vipId = parmsUtil.getInteger("vipId", "会员ID不能为空");
|
||||
int levelId = parmsUtil.getInteger("levelId", "等级id不能为空");
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
package com.syjiaer.clinic.server.controller.patient;
|
||||
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiParam;
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiParams;
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiReturn;
|
||||
import com.syjiaer.clinic.server.common.annotations.RecordCommonLog;
|
||||
import com.syjiaer.clinic.server.common.vo.Page;
|
||||
import com.syjiaer.clinic.server.common.vo.Result;
|
||||
|
|
@ -25,6 +28,12 @@ public class PatientIntegralController extends BaseController {
|
|||
@ApiOperation("添加会员积分")
|
||||
@RecordCommonLog(operation = "添加会员积分")
|
||||
@RequestMapping("/add")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "patientId", value = "会员ID", required = true),
|
||||
@ApiParam(name = "integral", value = "积分", required = true),
|
||||
@ApiParam(name = "remark", value = "备注")
|
||||
})
|
||||
@ApiReturn(isNull = true)
|
||||
public Result add(){
|
||||
Integer vipId = parmsUtil.getInteger("vipId","请输入会员id");
|
||||
Integer Integral = parmsUtil.getInteger("integral","请输入积分");
|
||||
|
|
@ -35,6 +44,12 @@ public class PatientIntegralController extends BaseController {
|
|||
|
||||
@ApiOperation("分页查询会员积分记录")
|
||||
@RequestMapping("/list")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "vipId", value = "会员id", required = true),
|
||||
@ApiParam(name = "pageNum", value = "页码", required = true),
|
||||
@ApiParam(name = "pageSize", value = "每页数量", required = true)
|
||||
})
|
||||
@ApiReturn(type = VipIntegralLog.class,isArray = true)
|
||||
public Result<Page<VipIntegralLog>> listByVipId(){
|
||||
VipIntegralLogQuery query = parmsUtil.getObject("query", VipIntegralLogQuery.class);
|
||||
Page<VipIntegralLog> page = vipIntegralLogService.pageList(query);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
package com.syjiaer.clinic.server.controller.patient;
|
||||
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiParam;
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiParams;
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiReturn;
|
||||
import com.syjiaer.clinic.server.common.annotations.RecordCommonLog;
|
||||
import com.syjiaer.clinic.server.common.vo.Result;
|
||||
import com.syjiaer.clinic.server.controller.BaseController;
|
||||
|
|
@ -30,6 +33,10 @@ public class PatientLevelConfigController extends BaseController {
|
|||
@ApiOperation("新增会员等级配置")
|
||||
@RecordCommonLog(operation = "创建会员等级配置")
|
||||
@RequestMapping("/create")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "vipLevelConfig", value = "会员等级配置", required = true, type = VipLevelConfig.class)
|
||||
})
|
||||
@ApiReturn(isNull = true)
|
||||
public Result<Object> create() {
|
||||
VipLevelConfig levelConfig = parmsUtil.getObject("vipLevelConfig", VipLevelConfig.class);
|
||||
vipLevelConfigService.create(levelConfig);
|
||||
|
|
@ -39,6 +46,10 @@ public class PatientLevelConfigController extends BaseController {
|
|||
@ApiOperation("修改会员等级配置")
|
||||
@RecordCommonLog(operation = "修改会员等级配置")
|
||||
@RequestMapping("/edit")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "vipLevelConfig", value = "会员等级配置", required = true, type = VipLevelConfig.class)
|
||||
})
|
||||
@ApiReturn(isNull = true)
|
||||
public Result<Object> edit() {
|
||||
VipLevelConfig levelConfig = parmsUtil.getObject("vipLevelConfig", VipLevelConfig.class);
|
||||
|
||||
|
|
@ -51,6 +62,10 @@ public class PatientLevelConfigController extends BaseController {
|
|||
@ApiOperation("保存会员等级配置")
|
||||
@RecordCommonLog(operation = "保存会员等级配置")
|
||||
@RequestMapping("/save")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "vipLevelConfig", value = "会员等级配置", required = true, type = VipLevelConfig.class)
|
||||
})
|
||||
@ApiReturn(isNull = true)
|
||||
public Result<Object> save() {
|
||||
List<VipLevelConfig> levelConfigList = parmsUtil.getList("vipLevelConfig", VipLevelConfig.class);
|
||||
vipLevelConfigService.save(levelConfigList);
|
||||
|
|
@ -61,6 +76,10 @@ public class PatientLevelConfigController extends BaseController {
|
|||
@ApiOperation("删除一个会员等级配置")
|
||||
@RecordCommonLog(operation = "删除一个会员等级配置")
|
||||
@RequestMapping("/del")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "id", value = "会员等级配置ID", required = true)
|
||||
})
|
||||
@ApiReturn(isNull = true)
|
||||
public Result<Object> del() {
|
||||
int id = parmsUtil.getInteger("id", "ID不能为空");
|
||||
vipLevelConfigService.delete(id);
|
||||
|
|
@ -70,6 +89,7 @@ public class PatientLevelConfigController extends BaseController {
|
|||
|
||||
@ApiOperation("分页查询会员等级配置")
|
||||
@RequestMapping("/list")
|
||||
@ApiReturn(type = VipLevelConfig.class,isArray = true)
|
||||
public Result<List<VipLevelConfig>> selectList() {
|
||||
|
||||
List<VipLevelConfig> list = vipLevelConfigService.list();
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
package com.syjiaer.clinic.server.controller.patient;
|
||||
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiParam;
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiParams;
|
||||
import com.syjiaer.clinic.server.common.annotations.ApiReturn;
|
||||
import com.syjiaer.clinic.server.common.annotations.RecordCommonLog;
|
||||
import com.syjiaer.clinic.server.common.exception.MessageException;
|
||||
import com.syjiaer.clinic.server.common.vo.Page;
|
||||
|
|
@ -34,6 +37,12 @@ public class RegistrationController extends BaseController {
|
|||
@RecordCommonLog(operation = "挂号")
|
||||
@RequestMapping("/add")
|
||||
@ApiOperation("挂号")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "registrationParam", value = "挂号参数", required = true, type = RegistrationSaveDto.class),
|
||||
@ApiParam(name = "mdtrtCertType", value = "证件类型", required = true),
|
||||
@ApiParam(name = "mdtrtCertNo", value = "证件号码", required = true)
|
||||
})
|
||||
@ApiReturn(isNull = true)
|
||||
public Result<?> add() {
|
||||
|
||||
RegistrationSaveDto registrationParam = parmsUtil.getObjectWithCheck("data", RegistrationSaveDto.class);
|
||||
|
|
@ -49,6 +58,13 @@ public class RegistrationController extends BaseController {
|
|||
*/
|
||||
@ApiOperation("分页查询挂号列表")
|
||||
@RequestMapping("/list")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "pageNum", value = "页码", required = true),
|
||||
@ApiParam(name = "pageSize", value = "每页数量", required = true),
|
||||
@ApiParam(name = "doctorId", value = "医生id"),
|
||||
@ApiParam(name = "startDate", value = "开始时间"),
|
||||
@ApiParam(name = "endDate", value = "结束时间"),
|
||||
})
|
||||
public Result<Page<PatientRegistration>> list() {
|
||||
int page = parmsUtil.getInteger("page", "页码不能为空");
|
||||
int size = parmsUtil.getInteger("size", "页容量不能为空");
|
||||
|
|
@ -64,6 +80,10 @@ public class RegistrationController extends BaseController {
|
|||
@ApiOperation("取消挂号")
|
||||
@RecordCommonLog(operation = "取消挂号")
|
||||
@RequestMapping("/cancel")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "id", value = "挂号id", required = true)
|
||||
})
|
||||
@ApiReturn(isNull = true)
|
||||
public Result<?> cancel() {
|
||||
Integer id = parmsUtil.getInteger("id");
|
||||
patientRegistrationService.cancel(id);
|
||||
|
|
@ -77,6 +97,10 @@ public class RegistrationController extends BaseController {
|
|||
@ApiOperation("修改挂号信息")
|
||||
@RecordCommonLog(operation = "修改挂号信息")
|
||||
@RequestMapping("/edit")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "data", value = "挂号信息", required = true, type = PatientRegistration.class)
|
||||
})
|
||||
@ApiReturn(isNull = true)
|
||||
public Result<?> edit() {
|
||||
PatientRegistration registration = parmsUtil.getObjectWithCheck("data", PatientRegistration.class);
|
||||
if (registration == null) {
|
||||
|
|
@ -94,6 +118,10 @@ public class RegistrationController extends BaseController {
|
|||
@ApiOperation("删除挂号信息")
|
||||
@RecordCommonLog(operation = "删除挂号信息")
|
||||
@RequestMapping("/del")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "id", value = "挂号id", required = true)
|
||||
})
|
||||
@ApiReturn(isNull = true)
|
||||
public Result<?> del() {
|
||||
Integer id = parmsUtil.getInteger("id");
|
||||
if (id == null) {
|
||||
|
|
@ -109,6 +137,10 @@ public class RegistrationController extends BaseController {
|
|||
*/
|
||||
@ApiOperation("获取挂号信息 根据挂号id")
|
||||
@RequestMapping("/get")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "id", value = "挂号id", required = true)
|
||||
})
|
||||
@ApiReturn(type = PatientRegistrationVo.class)
|
||||
public Result<PatientRegistrationVo> get() {
|
||||
Integer id = parmsUtil.getInteger("id");
|
||||
if (id == null) {
|
||||
|
|
@ -120,6 +152,7 @@ public class RegistrationController extends BaseController {
|
|||
|
||||
@ApiOperation("获取挂号信息列表")
|
||||
@RequestMapping("/allList")
|
||||
@ApiReturn(type = PatientRegistration.class, isArray = true)
|
||||
public Result<List<PatientRegistration>> allList() {
|
||||
List<PatientRegistration> list = patientRegistrationService.listAll();
|
||||
return success(list);
|
||||
|
|
@ -131,6 +164,9 @@ public class RegistrationController extends BaseController {
|
|||
*/
|
||||
@ApiOperation("挂号信息分页搜索")
|
||||
@RequestMapping("/listByType")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "query", value = "挂号信息", type = RegistrationQuery.class, required = true)
|
||||
})
|
||||
public Result<Page<PatientRegistration>> listByType() {
|
||||
RegistrationQuery query = parmsUtil.getObject("query", RegistrationQuery.class);
|
||||
return success(patientRegistrationService.getListByType(query));
|
||||
|
|
@ -155,6 +191,11 @@ public class RegistrationController extends BaseController {
|
|||
@ApiOperation("更改挂号单状态")
|
||||
@RecordCommonLog(operation = "更改挂号单状态")
|
||||
@RequestMapping("/changeStatus")
|
||||
@ApiParams({
|
||||
@ApiParam(name = "id", value = "挂号单id", required = true),
|
||||
@ApiParam(name = "status", value = "挂号单状态", required = true)
|
||||
})
|
||||
@ApiReturn(isNull = true)
|
||||
public Result<PatientRegistration> changeStatus(){
|
||||
Integer regisId= parmsUtil.getInteger("id","挂号单不能为空");
|
||||
Integer status= parmsUtil.getInteger("status","目标状态");
|
||||
|
|
|
|||
|
|
@ -0,0 +1,45 @@
|
|||
package com.syjiaer.clinic.server.entity.inventory.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.syjiaer.clinic.server.entity.inventory.Inventory;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author NiuZiYuan
|
||||
* @since 2025-03-10
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
@Accessors(chain = true)
|
||||
@TableName("inventory_goods_view")
|
||||
@ApiModel(value = "库存信息", description = "")
|
||||
public class InventoryGoodsTotalVo implements Serializable {
|
||||
@ApiModelProperty("库存商品列表")
|
||||
List<Inventory> inventoryGoodsList;
|
||||
@ApiModelProperty("库存商品总数量")
|
||||
private int wholeNumber;
|
||||
@ApiModelProperty("库存商品总分数")
|
||||
private int fragmentNumber;
|
||||
@ApiModelProperty("库存商品总分数")
|
||||
private int totalFragment;
|
||||
@ApiModelProperty("库存商品列表大小")
|
||||
private int listSize;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package com.syjiaer.clinic.server.entity.inventory.vo;
|
||||
|
||||
import com.syjiaer.clinic.server.entity.inventory.Inventory;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
@Data
|
||||
public class InventoryOrderVo {
|
||||
@ApiModelProperty("采购单信息")
|
||||
private InventoryPurchaseVo inventoryOrder;
|
||||
@ApiModelProperty("采购单商品列表")
|
||||
private List<InventoryGoodsVo> inventoryOrderGoodsList;
|
||||
}
|
||||
|
|
@ -13,6 +13,7 @@ import com.syjiaer.clinic.server.entity.goods.GoodsCate;
|
|||
import com.syjiaer.clinic.server.entity.inventory.*;
|
||||
import com.syjiaer.clinic.server.entity.inventory.dto.PurchaseOrderQuery;
|
||||
import com.syjiaer.clinic.server.entity.inventory.vo.InventoryGoodsVo;
|
||||
import com.syjiaer.clinic.server.entity.inventory.vo.InventoryOrderVo;
|
||||
import com.syjiaer.clinic.server.entity.inventory.vo.InventoryPurchaseVo;
|
||||
import com.syjiaer.clinic.server.entity.manager.ManagerUser;
|
||||
import com.syjiaer.clinic.server.mapper.goods.GoodsCateMapper;
|
||||
|
|
@ -327,7 +328,7 @@ public class InventoryPurchaseService extends BaseService {
|
|||
* @param code 采购单号
|
||||
* @return inventoryOrderGoodsList 商品信息 inventoryOrder 采购单信息
|
||||
*/
|
||||
public Map<String, Object> getByCode(String code) {
|
||||
public InventoryOrderVo getByCode(String code) {
|
||||
QueryWrapper<Inventory> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("inventory_purchase_code", code);
|
||||
queryWrapper.orderByAsc("id");
|
||||
|
|
@ -349,10 +350,10 @@ public class InventoryPurchaseService extends BaseService {
|
|||
BeanUtils.copyProperties(inventoryPurchase, purchaseVo);
|
||||
purchaseVo.setManagerUserName(managerUserMapper.selectById(inventoryPurchase.getManagerUserId()).getName());
|
||||
purchaseVo.setSupplierName(inventorySupplierMapper.selectById(inventoryPurchase.getSupplierId()).getName());
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("inventoryOrderGoodsList", goodsVos);
|
||||
map.put("inventoryOrder", purchaseVo);
|
||||
return map;
|
||||
InventoryOrderVo inventoryOrderVo = new InventoryOrderVo();
|
||||
inventoryOrderVo.setInventoryOrderGoodsList(goodsVos);
|
||||
inventoryOrderVo.setInventoryOrder(purchaseVo);
|
||||
return inventoryOrderVo;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -243,11 +243,11 @@ public class InventoryService extends BaseService {
|
|||
return inventoryMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
public List<Map<String, Object>> getInventoryLogByGoodsId(int goodsId, LocalDateTime startDateTime, LocalDateTime endDateTime) {
|
||||
public List<InventoryLog> getInventoryLogByGoodsId(int goodsId, LocalDateTime startDateTime, LocalDateTime endDateTime) {
|
||||
QueryWrapper<InventoryLog> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("goods_id", goodsId);
|
||||
queryWrapper.between("create_time", startDateTime, endDateTime);
|
||||
return inventoryLogMapper.selectMaps(queryWrapper);
|
||||
return inventoryLogMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -315,7 +315,7 @@ public class ItemService extends BaseService {
|
|||
itemMapper.updateById(itemInfo);
|
||||
}
|
||||
|
||||
public HashMap<String,Object> getGroup(int itemId) {
|
||||
public Map<String,Object> getGroup(int itemId) {
|
||||
QueryWrapper<Item> itemQueryWrapper = new QueryWrapper<>();
|
||||
itemQueryWrapper.ne("del_flag", 1);
|
||||
itemQueryWrapper.eq("is_group",true);
|
||||
|
|
|
|||
Loading…
Reference in New Issue