dev
This commit is contained in:
parent
c959b4292f
commit
ce7717b14b
|
|
@ -0,0 +1,12 @@
|
|||
package com.syjiaer.clinic.server.common.annotations;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
@Target(ElementType.METHOD)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface RecordCommonLog {
|
||||
String operation() default "默认事件";
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
package com.syjiaer.clinic.server.common.config;
|
||||
|
||||
import com.syjiaer.clinic.server.common.annotations.RecordCommonLog;
|
||||
import com.syjiaer.clinic.server.common.util.InfoUtil;
|
||||
import com.syjiaer.clinic.server.common.util.ParmsUtil;
|
||||
import com.syjiaer.clinic.server.entity.common.CommonLog;
|
||||
import com.syjiaer.clinic.server.entity.manager.ManagerUser;
|
||||
import com.syjiaer.clinic.server.mapper.common.CommonLogMapper;
|
||||
import com.syjiaer.clinic.server.service.common.CommonLogService;
|
||||
import lombok.extern.apachecommons.CommonsLog;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.aspectj.lang.JoinPoint;
|
||||
import org.aspectj.lang.ProceedingJoinPoint;
|
||||
import org.aspectj.lang.annotation.After;
|
||||
import org.aspectj.lang.annotation.Aspect;
|
||||
import org.aspectj.lang.annotation.Pointcut;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import org.aspectj.lang.reflect.MethodSignature;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Map;
|
||||
|
||||
@Component
|
||||
@Aspect
|
||||
@Slf4j
|
||||
public class RecordCommonLogAspect {
|
||||
@Autowired
|
||||
private CommonLogService commonLogService;
|
||||
@Pointcut("@annotation(com.syjiaer.clinic.server.common.annotations.RecordCommonLog)")
|
||||
public void pointcut() {
|
||||
}
|
||||
|
||||
|
||||
@After("pointcut()")
|
||||
public void after(JoinPoint joinPoint) {
|
||||
// 获取被切入的方法
|
||||
MethodSignature signature = (MethodSignature) joinPoint.getSignature();
|
||||
Method method = signature.getMethod();
|
||||
|
||||
// 获取方法上的注解
|
||||
String operation = "未知";
|
||||
if (method.isAnnotationPresent(RecordCommonLog.class)) {
|
||||
RecordCommonLog annotation = method.getAnnotation(RecordCommonLog.class);
|
||||
operation =annotation.operation();
|
||||
}
|
||||
commonLogService.saveLog(operation);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
package com.syjiaer.clinic.server.controller.charge;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.syjiaer.clinic.server.common.annotations.RecordCommonLog;
|
||||
import com.syjiaer.clinic.server.common.api.output.OM2206A;
|
||||
import com.syjiaer.clinic.server.common.api.output.OM2207A;
|
||||
import com.syjiaer.clinic.server.common.util.DateUtil;
|
||||
|
|
@ -33,6 +34,7 @@ public class ChargeController extends BaseController {
|
|||
* 保存收费订单
|
||||
* @return
|
||||
*/
|
||||
@RecordCommonLog(operation = "生成订单")
|
||||
@RequestMapping("/save")
|
||||
public Result<Object> save() {
|
||||
ChargeSaveDto dto = parmsUtil.getObject("data", ChargeSaveDto.class);
|
||||
|
|
@ -62,6 +64,7 @@ public class ChargeController extends BaseController {
|
|||
* 完成订单
|
||||
* @return
|
||||
*/
|
||||
@RecordCommonLog(operation = "完成订单")
|
||||
@RequestMapping("/completeOrder")
|
||||
public Result<Object> completeOrder() {
|
||||
Integer id = parmsUtil.getInteger("id");
|
||||
|
|
@ -85,6 +88,7 @@ public class ChargeController extends BaseController {
|
|||
* 医保上传支付明细
|
||||
* @return
|
||||
*/
|
||||
@RecordCommonLog(operation = "上传医保费用明细")
|
||||
@RequestMapping("/uploadCostDetails")
|
||||
public Result<Object> uploadCostDetails() {
|
||||
String changeOrderCode = parmsUtil.getString("changeOrderCode");
|
||||
|
|
@ -109,6 +113,7 @@ public class ChargeController extends BaseController {
|
|||
* 医保真实支付
|
||||
* @return
|
||||
*/
|
||||
@RecordCommonLog(operation = "医保收费")
|
||||
@RequestMapping("/socialRealPay")
|
||||
public Result<OM2207A> socialRealPay(){
|
||||
String changeOrderCode = parmsUtil.getString("changeOrderCode");
|
||||
|
|
@ -124,6 +129,7 @@ public class ChargeController extends BaseController {
|
|||
/**
|
||||
* 订单退款
|
||||
*/
|
||||
@RecordCommonLog(operation = "订单退款")
|
||||
@RequestMapping("/refund")
|
||||
public Result<Object> refund() {
|
||||
String changeOrderCode = parmsUtil.getString("changeOrderCode","订单号为空");
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.syjiaer.clinic.server.controller.common;
|
||||
|
||||
import com.syjiaer.clinic.server.common.annotations.NoAuthCheck;
|
||||
import com.syjiaer.clinic.server.common.annotations.RecordCommonLog;
|
||||
import com.syjiaer.clinic.server.common.exception.MessageException;
|
||||
import com.syjiaer.clinic.server.common.vo.Result;
|
||||
import com.syjiaer.clinic.server.controller.BaseController;
|
||||
|
|
@ -27,7 +28,6 @@ import java.util.UUID;
|
|||
public class FileController extends BaseController {
|
||||
@Autowired
|
||||
private FileService fileService;
|
||||
|
||||
@RequestMapping("/upload")
|
||||
@NoAuthCheck
|
||||
public Result<?> handleFileUpload(@RequestParam("file") MultipartFile file) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.syjiaer.clinic.server.controller.common;
|
||||
|
||||
import com.syjiaer.clinic.server.common.annotations.RecordCommonLog;
|
||||
import com.syjiaer.clinic.server.common.vo.Result;
|
||||
import com.syjiaer.clinic.server.controller.BaseController;
|
||||
import com.syjiaer.clinic.server.entity.manager.ManagerUserSign;
|
||||
|
|
@ -15,6 +16,8 @@ import org.springframework.web.bind.annotation.RestController;
|
|||
public class SignController extends BaseController {
|
||||
@Autowired
|
||||
private SignService signService;
|
||||
|
||||
@RecordCommonLog(operation = "医保签到")
|
||||
@RequestMapping("/in")
|
||||
public Result<ManagerUserSign> in() {
|
||||
String mac = parmsUtil.getString("mac", "请输入mac地址");
|
||||
|
|
@ -22,6 +25,7 @@ public class SignController extends BaseController {
|
|||
ManagerUserSign signResult = signService.in(ip, mac);
|
||||
return success(signResult);
|
||||
}
|
||||
@RecordCommonLog(operation = "医保签退")
|
||||
@RequestMapping("/out")
|
||||
public Result<String> out() {
|
||||
signService.out();
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.syjiaer.clinic.server.controller.diagnosis;
|
||||
|
||||
import com.syjiaer.clinic.server.common.annotations.RecordCommonLog;
|
||||
import com.syjiaer.clinic.server.common.vo.Page;
|
||||
import com.syjiaer.clinic.server.common.vo.Result;
|
||||
import com.syjiaer.clinic.server.controller.BaseController;
|
||||
|
|
@ -31,6 +32,7 @@ public class MedicalRecordController extends BaseController {
|
|||
* 保存病历
|
||||
* @return
|
||||
*/
|
||||
@RecordCommonLog(operation = "完成诊断,保存病历信息")
|
||||
@RequestMapping("/save")
|
||||
public Result<PatientRegistration> save() {
|
||||
MedicalRecordSaveDto saveDto = parmsUtil.getObject("data", MedicalRecordSaveDto.class);
|
||||
|
|
@ -42,6 +44,7 @@ public class MedicalRecordController extends BaseController {
|
|||
* 查询患者病历
|
||||
* @return
|
||||
*/
|
||||
|
||||
@RequestMapping("/listByPatient")
|
||||
public Result<List<MedicalHistoryVo>> listByPatient() {
|
||||
Integer patientId = parmsUtil.getInteger("patientId", "患者不能为空");
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.syjiaer.clinic.server.controller.goods;
|
||||
|
||||
import com.syjiaer.clinic.server.common.annotations.RecordCommonLog;
|
||||
import com.syjiaer.clinic.server.common.vo.Result;
|
||||
import com.syjiaer.clinic.server.controller.BaseController;
|
||||
import com.syjiaer.clinic.server.entity.goods.GoodsCate;
|
||||
|
|
@ -52,6 +53,7 @@ public class GoodsCateController extends BaseController {
|
|||
* 删除二级分类
|
||||
* 参数 id
|
||||
*/
|
||||
@RecordCommonLog(operation = "删除商品二级分类")
|
||||
@RequestMapping("del")
|
||||
public Result del(){
|
||||
Map<String,Object> map=getParms();
|
||||
|
|
@ -64,6 +66,7 @@ public class GoodsCateController extends BaseController {
|
|||
* 保存二级分类
|
||||
* 参数 cateList
|
||||
*/
|
||||
@RecordCommonLog(operation = "保存商品二级分类")
|
||||
@RequestMapping("save")
|
||||
public Result save(){
|
||||
List<GoodsCate> cateList = parmsUtil.getList("cateList", GoodsCate.class);
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.syjiaer.clinic.server.controller.goods;
|
|||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.syjiaer.clinic.server.common.annotations.RecordCommonLog;
|
||||
import com.syjiaer.clinic.server.common.enums.GoodsPricingModelEnum;
|
||||
import com.syjiaer.clinic.server.common.util.ParmsUtil;
|
||||
import com.syjiaer.clinic.server.common.vo.Page;
|
||||
|
|
@ -41,6 +42,7 @@ public class GoodsController extends BaseController {
|
|||
* 商品建档 或 修改
|
||||
* @return
|
||||
*/
|
||||
@RecordCommonLog(operation = "商品建档或修改")
|
||||
@RequestMapping("save")
|
||||
public Result<Object> save() {
|
||||
|
||||
|
|
@ -80,6 +82,7 @@ public class GoodsController extends BaseController {
|
|||
/**
|
||||
* 商品重新初始化医保库存
|
||||
*/
|
||||
@RecordCommonLog(operation = "商品重新初始化医保库存")
|
||||
@RequestMapping("returnInit")
|
||||
public Result<Object> returnInit() {
|
||||
Integer goodId = parmsUtil.getInteger("id");
|
||||
|
|
@ -122,6 +125,7 @@ public class GoodsController extends BaseController {
|
|||
* 商品添加标识码
|
||||
* 参数:goodsId,idCode
|
||||
*/
|
||||
@RecordCommonLog(operation = "商品添加标识码")
|
||||
@RequestMapping("addIdCode")
|
||||
public Result<Object> addIdCode(){
|
||||
Integer goodsId = parmsUtil.getInteger("goodsId","商品id为空");
|
||||
|
|
@ -143,6 +147,7 @@ public class GoodsController extends BaseController {
|
|||
/**
|
||||
* 停售
|
||||
*/
|
||||
@RecordCommonLog(operation = "停售商品")
|
||||
@RequestMapping("disableSale")
|
||||
public Result<Goods> disableSale() {
|
||||
Integer id = parmsUtil.getInteger("id", "id不存在");
|
||||
|
|
@ -151,6 +156,7 @@ public class GoodsController extends BaseController {
|
|||
/**
|
||||
* 启售商品
|
||||
*/
|
||||
@RecordCommonLog(operation = "启售商品")
|
||||
@RequestMapping("enableSale")
|
||||
public Result<Goods> enableSale() {
|
||||
Integer id = parmsUtil.getInteger("id", "id不存在");
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.syjiaer.clinic.server.controller.inventory;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.syjiaer.clinic.server.common.annotations.RecordCommonLog;
|
||||
import com.syjiaer.clinic.server.common.constants.Constants;
|
||||
import com.syjiaer.clinic.server.common.vo.Page;
|
||||
import com.syjiaer.clinic.server.common.vo.Result;
|
||||
|
|
@ -28,6 +29,7 @@ public class InventoryApplyController extends BaseController {
|
|||
/**
|
||||
* 创建领用单并领用
|
||||
*/
|
||||
@RecordCommonLog(operation = "创建领用单并领用")
|
||||
@RequestMapping("/create")
|
||||
public Result create() {
|
||||
List<Map> mapList = parmsUtil.getList("data",Map.class);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.syjiaer.clinic.server.controller.inventory;
|
||||
|
||||
import com.syjiaer.clinic.server.common.annotations.RecordCommonLog;
|
||||
import com.syjiaer.clinic.server.common.vo.Page;
|
||||
import com.syjiaer.clinic.server.common.vo.Result;
|
||||
import com.syjiaer.clinic.server.controller.BaseController;
|
||||
|
|
@ -34,8 +35,8 @@ public class InventoryCheckController extends BaseController {
|
|||
/**
|
||||
* 保存盘点记录
|
||||
*/
|
||||
@RecordCommonLog(operation = "完成盘点")
|
||||
@RequestMapping("/save")
|
||||
@Transactional
|
||||
public Result save() {
|
||||
List<Map> list = parmsUtil.getList("list", Map.class);
|
||||
String remark = parmsUtil.getString("remark");
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.syjiaer.clinic.server.controller.inventory;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
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;
|
||||
|
|
@ -31,6 +32,7 @@ public class InventoryController extends BaseController {
|
|||
private InventoryPurchaseService iInventoryPurchaseService;
|
||||
@Autowired
|
||||
private InventoryService inventoryService;
|
||||
|
||||
/**
|
||||
* 根据采购单code 获取采购单信息
|
||||
*/
|
||||
|
|
@ -41,7 +43,6 @@ public class InventoryController extends BaseController {
|
|||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 根据goodsId 获取该goods的所有库存信息 带库存总量
|
||||
*/
|
||||
|
|
@ -130,8 +131,10 @@ public class InventoryController extends BaseController {
|
|||
|
||||
/**
|
||||
* 采购单 采购项修改
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RecordCommonLog(operation = "更改采购单商品信息")
|
||||
@RequestMapping("/update")
|
||||
public Result update() {
|
||||
List<Inventory> list = parmsUtil.getList("list", Inventory.class);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.syjiaer.clinic.server.controller.inventory;
|
||||
|
||||
import com.syjiaer.clinic.server.common.annotations.RecordCommonLog;
|
||||
import com.syjiaer.clinic.server.common.constants.Constants;
|
||||
import com.syjiaer.clinic.server.common.vo.Page;
|
||||
import com.syjiaer.clinic.server.common.vo.Result;
|
||||
|
|
@ -36,6 +37,7 @@ public class InventoryPurchaseController extends BaseController {
|
|||
* 创建采购单
|
||||
* @return
|
||||
*/
|
||||
@RecordCommonLog(operation = "创建采购单")
|
||||
@RequestMapping("/create")
|
||||
public Result<Object> create() {
|
||||
InventoryPurchase purchase_order = parmsUtil.getObject("inventoryOrder", InventoryPurchase.class);
|
||||
|
|
@ -70,6 +72,7 @@ public class InventoryPurchaseController extends BaseController {
|
|||
* 更新采购单基本信息
|
||||
* @return
|
||||
*/
|
||||
@RecordCommonLog(operation = "更新采购单基本信息")
|
||||
@RequestMapping("/update")
|
||||
public Result update() {
|
||||
InventoryPurchase inventoryOrder = parmsUtil.getObject("inventoryOrder", InventoryPurchase.class);
|
||||
|
|
@ -84,6 +87,7 @@ public class InventoryPurchaseController extends BaseController {
|
|||
* 采购单修改时 添加采购的商品
|
||||
* @return
|
||||
*/
|
||||
@RecordCommonLog(operation = "已有的采购单中添加商品")
|
||||
@RequestMapping("/addOneGoods")
|
||||
public Result addOneGoods() {
|
||||
Inventory inventory = parmsUtil.getObject("data", Inventory.class);
|
||||
|
|
@ -102,6 +106,7 @@ public class InventoryPurchaseController extends BaseController {
|
|||
*采购单退货
|
||||
* @return
|
||||
*/
|
||||
@RecordCommonLog(operation = "采购单退货")
|
||||
@RequestMapping("/returnable")
|
||||
public Result returnable() {
|
||||
List<Integer> list = parmsUtil.getIntList("idList");
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.syjiaer.clinic.server.controller.inventory;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.syjiaer.clinic.server.common.annotations.RecordCommonLog;
|
||||
import com.syjiaer.clinic.server.common.constants.Constants;
|
||||
import com.syjiaer.clinic.server.common.vo.Page;
|
||||
import com.syjiaer.clinic.server.common.vo.Result;
|
||||
|
|
@ -33,6 +34,7 @@ public class InventorySupplierController extends BaseController {
|
|||
* 保存供货商
|
||||
* @return
|
||||
*/
|
||||
@RecordCommonLog(operation = "保存供货商")
|
||||
@RequestMapping("/save")
|
||||
public Result save() {
|
||||
InventorySupplier inventorySupplier = parmsUtil.getObject("inventorySupplier", InventorySupplier.class);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.syjiaer.clinic.server.controller.item;
|
||||
|
||||
import com.syjiaer.clinic.server.common.annotations.RecordCommonLog;
|
||||
import com.syjiaer.clinic.server.common.exception.MessageException;
|
||||
import com.syjiaer.clinic.server.common.vo.Page;
|
||||
import com.syjiaer.clinic.server.common.vo.Result;
|
||||
|
|
@ -39,13 +40,14 @@ public class ItemController extends BaseController {
|
|||
}
|
||||
return success(itemService.get(id));
|
||||
}
|
||||
|
||||
@RecordCommonLog(operation = "保存服务项目")
|
||||
@RequestMapping("/add")
|
||||
public Result<?> createItem() {
|
||||
Item item = parmsUtil.getObject("data", Item.class);
|
||||
itemService.save(item);
|
||||
return success();
|
||||
}
|
||||
@RecordCommonLog(operation = "编辑服务项目")
|
||||
@RequestMapping("/edit")
|
||||
public Result<?> updateItem() {
|
||||
Item item = parmsUtil.getObject("data", Item.class);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.syjiaer.clinic.server.controller.item;
|
||||
|
||||
import com.syjiaer.clinic.server.common.annotations.RecordCommonLog;
|
||||
import com.syjiaer.clinic.server.common.exception.MessageException;
|
||||
import com.syjiaer.clinic.server.common.vo.Page;
|
||||
import com.syjiaer.clinic.server.common.vo.Result;
|
||||
|
|
@ -33,6 +34,7 @@ public class ItemGroupController extends BaseController {
|
|||
return success(itemGroup);
|
||||
}
|
||||
|
||||
@RecordCommonLog(operation = "保存服务项目组套")
|
||||
@RequestMapping("/save")
|
||||
public Result<?> save() {
|
||||
ItemGroupParam itemGroupParam = parmsUtil.getObject("data", ItemGroupParam.class);
|
||||
|
|
@ -42,7 +44,7 @@ public class ItemGroupController extends BaseController {
|
|||
itemGroupService.save(itemGroupParam);
|
||||
return success();
|
||||
}
|
||||
|
||||
@RecordCommonLog(operation = "删除服务项目组套")
|
||||
@RequestMapping("/delete")
|
||||
public Result<?> delete() {
|
||||
Integer id = parmsUtil.getInteger("id", "id不能为空");
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.syjiaer.clinic.server.controller.organization;
|
||||
|
||||
import com.syjiaer.clinic.server.common.annotations.RecordCommonLog;
|
||||
import com.syjiaer.clinic.server.common.exception.MessageException;
|
||||
import com.syjiaer.clinic.server.common.vo.Page;
|
||||
import com.syjiaer.clinic.server.common.vo.Result;
|
||||
|
|
@ -31,6 +32,7 @@ public class OrganizationMemberController extends BaseController {
|
|||
return success(organizationMemberService.pageList(page,size,name,tel));
|
||||
}
|
||||
@RequestMapping("/save")
|
||||
@RecordCommonLog(operation = "保存成员信息")
|
||||
public Result<?> save() {
|
||||
OrganizationMemberSaveDto dto = parmsUtil.getObject("data", OrganizationMemberSaveDto.class);
|
||||
if(dto ==null){
|
||||
|
|
@ -40,6 +42,7 @@ public class OrganizationMemberController extends BaseController {
|
|||
return success();
|
||||
}
|
||||
@RequestMapping("/delete")
|
||||
@RecordCommonLog(operation = "删除成员")
|
||||
public Result<?> delete() {
|
||||
Integer id = parmsUtil.getInteger("id");
|
||||
if(id == null){
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.syjiaer.clinic.server.controller.organization;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.syjiaer.clinic.server.common.annotations.RecordCommonLog;
|
||||
import com.syjiaer.clinic.server.common.exception.MessageException;
|
||||
import com.syjiaer.clinic.server.common.vo.Page;
|
||||
import com.syjiaer.clinic.server.common.vo.Result;
|
||||
|
|
@ -28,12 +29,14 @@ public class OrganizationSectionController extends BaseController {
|
|||
String resperTel = parmsUtil.getString("resperTel");
|
||||
return success(organizationSectionService.list(page,size,name,caty,resperName,resperTel));
|
||||
}
|
||||
@RecordCommonLog(operation = "添加科室")
|
||||
@RequestMapping("/add")
|
||||
public Result<?> add() {
|
||||
OrganizationSection organizationSection = parmsUtil.getObjectWithCheck("data", OrganizationSection.class);
|
||||
organizationSectionService.add(organizationSection);
|
||||
return success("添加成功");
|
||||
}
|
||||
@RecordCommonLog(operation = "修改科室信息")
|
||||
@RequestMapping("/edit")
|
||||
public Result<?> edit() {
|
||||
OrganizationSection organizationSection = parmsUtil.getObjectWithCheck("data", OrganizationSection.class);
|
||||
|
|
@ -43,6 +46,8 @@ public class OrganizationSectionController extends BaseController {
|
|||
organizationSectionService.edit(organizationSection);
|
||||
return success("编辑成功");
|
||||
}
|
||||
|
||||
@RecordCommonLog(operation = "删除科室")
|
||||
@RequestMapping("/delete")
|
||||
public Result<?> delete() {
|
||||
Integer id = parmsUtil.getInteger("id");
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.syjiaer.clinic.server.controller.patient;
|
||||
|
||||
import com.syjiaer.clinic.server.common.annotations.RecordCommonLog;
|
||||
import com.syjiaer.clinic.server.common.vo.Page;
|
||||
import com.syjiaer.clinic.server.common.vo.Result;
|
||||
import com.syjiaer.clinic.server.controller.BaseController;
|
||||
|
|
@ -30,13 +31,14 @@ public class PatientController extends BaseController {
|
|||
private PatientInfoService patientInfoService;
|
||||
|
||||
@RequestMapping("/create")
|
||||
@RecordCommonLog(operation = "创建患者")
|
||||
public Result<Object> create() {
|
||||
PatientInfo patientInfo = parmsUtil.getObject("vipInfo", PatientInfo.class);
|
||||
patientInfoService.create(patientInfo);
|
||||
|
||||
return success();
|
||||
}
|
||||
|
||||
@RecordCommonLog(operation = "修改患者信息")
|
||||
@RequestMapping("/update")
|
||||
public Result<Object> update() {
|
||||
PatientInfo patientInfo = parmsUtil.getObject("vipInfo", PatientInfo.class);
|
||||
|
|
@ -45,6 +47,7 @@ public class PatientController extends BaseController {
|
|||
}
|
||||
|
||||
@RequestMapping("/delete")
|
||||
@RecordCommonLog(operation = "删除患者")
|
||||
public Result<Integer> delete() {
|
||||
int patientId = parmsUtil.getInteger("id", "ID不能为空");
|
||||
return success(patientInfoService.removeById(patientId));
|
||||
|
|
@ -72,7 +75,7 @@ public class PatientController extends BaseController {
|
|||
List<PatientInfo> list = patientInfoService.search(keyword);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
@RecordCommonLog(operation = "改变会员等级")
|
||||
@RequestMapping("/changeLevel")
|
||||
public Result<Object> changeLevel() {
|
||||
int vipId = parmsUtil.getInteger("vipId", "会员ID不能为空");
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.syjiaer.clinic.server.controller.patient;
|
||||
|
||||
import com.syjiaer.clinic.server.common.annotations.RecordCommonLog;
|
||||
import com.syjiaer.clinic.server.common.exception.MessageException;
|
||||
import com.syjiaer.clinic.server.common.vo.Page;
|
||||
import com.syjiaer.clinic.server.common.vo.Result;
|
||||
|
|
@ -29,6 +30,7 @@ public class RegistrationController extends BaseController {
|
|||
* 挂号
|
||||
* @return
|
||||
*/
|
||||
@RecordCommonLog(operation = "挂号")
|
||||
@RequestMapping("/add")
|
||||
public Result<?> registration() {
|
||||
|
||||
|
|
@ -55,6 +57,7 @@ public class RegistrationController extends BaseController {
|
|||
/**
|
||||
*取消挂号
|
||||
*/
|
||||
@RecordCommonLog(operation = "取消挂号")
|
||||
@RequestMapping("/cancel")
|
||||
public Result<?> cancel() {
|
||||
Integer id = parmsUtil.getInteger("id");
|
||||
|
|
@ -66,6 +69,7 @@ public class RegistrationController extends BaseController {
|
|||
* 修改挂号信息
|
||||
* @return
|
||||
*/
|
||||
@RecordCommonLog(operation = "修改挂号信息")
|
||||
@RequestMapping("/edit")
|
||||
public Result<?> edit() {
|
||||
PatientRegistration registration = parmsUtil.getObjectWithCheck("data", PatientRegistration.class);
|
||||
|
|
@ -80,6 +84,7 @@ public class RegistrationController extends BaseController {
|
|||
* 删除挂号信息
|
||||
* @return
|
||||
*/
|
||||
@RecordCommonLog(operation = "删除挂号信息")
|
||||
@RequestMapping("/delete")
|
||||
public Result<?> delete() {
|
||||
Integer id = parmsUtil.getInteger("id");
|
||||
|
|
@ -135,6 +140,7 @@ public class RegistrationController extends BaseController {
|
|||
* 更改挂号单状态 在诊断 诊断
|
||||
* @return
|
||||
*/
|
||||
@RecordCommonLog(operation = "更改挂号单状态")
|
||||
@RequestMapping("/changeStatus")
|
||||
public Result<PatientRegistration> changeStatus(){
|
||||
Integer regisId= parmsUtil.getInteger("id","挂号单不能为空");
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.syjiaer.clinic.server.controller.social;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.syjiaer.clinic.server.common.annotations.RecordCommonLog;
|
||||
import com.syjiaer.clinic.server.common.api.input.IM2601;
|
||||
import com.syjiaer.clinic.server.common.api.input.IM3201;
|
||||
import com.syjiaer.clinic.server.common.api.output.OM3201;
|
||||
|
|
@ -54,6 +55,7 @@ public class SocialReconciliationController extends BaseController {
|
|||
/**
|
||||
* 对总账
|
||||
*/
|
||||
@RecordCommonLog(operation = "对总账")
|
||||
@RequestMapping("/totalDo")
|
||||
public Result<OM3201> totalDo(){
|
||||
ReconciliationItemDto dto = parmsUtil.getObject("data", ReconciliationItemDto.class);
|
||||
|
|
@ -62,6 +64,7 @@ public class SocialReconciliationController extends BaseController {
|
|||
/**
|
||||
* 明细对账
|
||||
*/
|
||||
@RecordCommonLog(operation = "明细对账")
|
||||
@RequestMapping("/detailDo")
|
||||
public Result<List<ReconciliationDetailVo>> detailDo(){
|
||||
ReconciliationItemDto dto = parmsUtil.getObject("data", ReconciliationItemDto.class);
|
||||
|
|
@ -82,6 +85,7 @@ public class SocialReconciliationController extends BaseController {
|
|||
/**
|
||||
* 冲正
|
||||
*/
|
||||
@RecordCommonLog(operation = "冲正")
|
||||
@RequestMapping("/reversal")
|
||||
public Result reversal(){
|
||||
|
||||
|
|
|
|||
|
|
@ -81,6 +81,7 @@ public class SocialUploadController extends BaseController {
|
|||
/**
|
||||
* 单独上报3501
|
||||
*/
|
||||
|
||||
@RequestMapping("upload3501Data")
|
||||
public Result<Boolean> upload3501Data() {
|
||||
return success(socialInventoryUploadService.upload3501());
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.syjiaer.clinic.server.controller.vip;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.syjiaer.clinic.server.common.annotations.RecordCommonLog;
|
||||
import com.syjiaer.clinic.server.common.vo.Page;
|
||||
import com.syjiaer.clinic.server.common.vo.Result;
|
||||
import com.syjiaer.clinic.server.controller.BaseController;
|
||||
|
|
@ -24,6 +25,7 @@ public class VipIntegralController extends BaseController {
|
|||
@Autowired
|
||||
private PatientInfoService patientInfoService;
|
||||
|
||||
@RecordCommonLog(operation = "添加会员积分")
|
||||
@RequestMapping("/add")
|
||||
public Result add(){
|
||||
Integer vipId = parmsUtil.getInteger("vipId","请输入会员id");
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.syjiaer.clinic.server.controller.vip;
|
|||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.syjiaer.clinic.server.common.annotations.RecordCommonLog;
|
||||
import com.syjiaer.clinic.server.common.vo.Result;
|
||||
import com.syjiaer.clinic.server.controller.BaseController;
|
||||
import com.syjiaer.clinic.server.entity.vip.VipLevelConfig;
|
||||
|
|
@ -27,14 +28,14 @@ import java.util.List;
|
|||
public class VipLevelConfigController extends BaseController {
|
||||
@Autowired
|
||||
private VipLevelConfigService vipLevelConfigService;
|
||||
|
||||
@RecordCommonLog(operation = "创建会员等级配置")
|
||||
@RequestMapping("/create")
|
||||
public Result<Object> create() {
|
||||
VipLevelConfig levelConfig = parmsUtil.getObject("vipLevelConfig", VipLevelConfig.class);
|
||||
vipLevelConfigService.create(levelConfig);
|
||||
return success();
|
||||
}
|
||||
|
||||
@RecordCommonLog(operation = "修改会员等级配置")
|
||||
@RequestMapping("/edit")
|
||||
public Result<Object> edit() {
|
||||
VipLevelConfig levelConfig = parmsUtil.getObject("vipLevelConfig", VipLevelConfig.class);
|
||||
|
|
@ -44,17 +45,16 @@ public class VipLevelConfigController extends BaseController {
|
|||
return success();
|
||||
}
|
||||
|
||||
@RecordCommonLog(operation = "保存会员等级配置")
|
||||
@RequestMapping("/save")
|
||||
@Transactional
|
||||
public Result<Object> save() {
|
||||
List<VipLevelConfig> levelConfigList = parmsUtil.getList("vipLevelConfig", VipLevelConfig.class);
|
||||
vipLevelConfigService.save(levelConfigList);
|
||||
|
||||
return success();
|
||||
}
|
||||
|
||||
@RecordCommonLog(operation = "删除一个会员等级配置")
|
||||
@RequestMapping("/delete")
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Result<Object> delete() {
|
||||
int id = parmsUtil.getInteger("id", "ID不能为空");
|
||||
vipLevelConfigService.delete(id);
|
||||
|
|
|
|||
|
|
@ -5,20 +5,19 @@ import com.baomidou.mybatisplus.annotation.TableId;
|
|||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
/**
|
||||
* <p>
|
||||
* 操作日志
|
||||
* </p>
|
||||
*
|
||||
* @author NiuZiYuan
|
||||
* @since 2025-04-17
|
||||
* @since 2025-05-16
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
|
|
@ -42,4 +41,13 @@ public class CommonLog implements Serializable {
|
|||
|
||||
@ApiModelProperty("创建时间")
|
||||
private LocalDateTime createDatetime;
|
||||
|
||||
@ApiModelProperty("管理员名称")
|
||||
private String managerName;
|
||||
|
||||
@ApiModelProperty("管理员账号")
|
||||
private String managerUsername;
|
||||
|
||||
@ApiModelProperty("请求参数")
|
||||
private String params;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,28 +32,13 @@ public abstract class BaseService {
|
|||
private ParmsUtil parmsUtil;
|
||||
@Autowired
|
||||
private HeadersUtil headersUtil;
|
||||
@Autowired
|
||||
private CommonLogMapper commonLogMapper;
|
||||
|
||||
@Value("${jwt.expiration}")
|
||||
protected long jwtExpiration;
|
||||
@Value("${jwt.secret}")
|
||||
protected String jwtSecret;
|
||||
|
||||
/*
|
||||
* 保存日志
|
||||
* @param message 日志信息
|
||||
*/
|
||||
public void saveLog(String message) {
|
||||
CommonLog commonLog = new CommonLog();
|
||||
int manager_id = 0;
|
||||
if (getInfos().get("manager_id") != null) {
|
||||
manager_id = Integer.parseInt(getInfos().get("manager_id").toString());
|
||||
}
|
||||
commonLog.setManagerId(manager_id);
|
||||
commonLog.setMessage(message);
|
||||
commonLog.setCreateDatetime(LocalDateTime.now());
|
||||
commonLogMapper.insert(commonLog);
|
||||
}
|
||||
|
||||
|
||||
protected ManagerUser getManagerUser() {
|
||||
return managerUtil.getManagerUser();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,39 @@
|
|||
package com.syjiaer.clinic.server.service.common;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.syjiaer.clinic.server.common.exception.MessageException;
|
||||
import com.syjiaer.clinic.server.entity.common.CommonLog;
|
||||
import com.syjiaer.clinic.server.entity.manager.ManagerUser;
|
||||
import com.syjiaer.clinic.server.mapper.common.CommonLogMapper;
|
||||
import com.syjiaer.clinic.server.service.BaseService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
public class CommonLogService extends BaseService {
|
||||
@Autowired
|
||||
private CommonLogMapper commonLogMapper;
|
||||
/*
|
||||
* 保存日志
|
||||
* @param message 日志信息
|
||||
*/
|
||||
public void saveLog(String message) {
|
||||
|
||||
ManagerUser managerUser = getManagerUser();
|
||||
if (managerUser == null){
|
||||
throw new MessageException("获取登录用户信息失败");
|
||||
}
|
||||
CommonLog commonLog = new CommonLog();
|
||||
commonLog.setManagerId(managerUser.getId());
|
||||
commonLog.setManagerName(managerUser.getName());
|
||||
commonLog.setManagerUsername(managerUser.getUsername());
|
||||
commonLog.setMessage(message);
|
||||
commonLog.setCreateDatetime(LocalDateTime.now());
|
||||
Map<String, Object> map = getParms();
|
||||
commonLog.setParams(JSONObject.toJSONString(map));
|
||||
commonLogMapper.insert(commonLog);
|
||||
}
|
||||
}
|
||||
|
|
@ -2,6 +2,7 @@ package com.syjiaer.clinic.server.service.social;
|
|||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.syjiaer.clinic.server.common.annotations.RecordCommonLog;
|
||||
import com.syjiaer.clinic.server.common.api.input.*;
|
||||
import com.syjiaer.clinic.server.common.api.request.SocialRequest;
|
||||
import com.syjiaer.clinic.server.common.constants.Constants;
|
||||
|
|
@ -234,7 +235,6 @@ public class SocialInventoryUploadService extends BaseService {
|
|||
notDoNumberVo.setTotalNumber(count3501 + count3502 + count3503 + count3505);
|
||||
return notDoNumberVo;
|
||||
}
|
||||
|
||||
public boolean upload3501() {
|
||||
QueryWrapper<InventoryInit> initQuery = new QueryWrapper<>();
|
||||
initQuery.in("upload_status", UploadStatusEnum.NoUpload.getStatus(), UploadStatusEnum.UploadFailed.getStatus());
|
||||
|
|
|
|||
Loading…
Reference in New Issue