package jnpf.limsService.impl; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import jnpf.audit.sdk.annotation.AuditLog; import jnpf.base.service.SuperServiceImpl; import jnpf.limsEntity.JianyanStatus; import jnpf.limsEntity.LimsJianyanXiangEntity; import jnpf.limsMapper.LimsJianyanXiangMapper; import jnpf.limsService.LimsJianyanXiangService; import org.springframework.stereotype.Service; @Service public class LimsJianyanXiangServiceImpl extends SuperServiceImpl implements LimsJianyanXiangService { @Override @AuditLog( action = "RESULT_CANCEL", label = "撤回检验项结果", bizType = "JIANCE_TASK", bizCodeExpr = "#result ? #id : ''", targetTable = "lims_jianyan_xiang", targetIdExpr = "#id", diff = true, entityClass = LimsJianyanXiangEntity.class ) public boolean cancelResult(String id) { if (id == null || id.isEmpty()) { return false; } UpdateWrapper uw = new UpdateWrapper<>(); uw.eq("f_id", id); uw.eq("jianyan_zhuangtai", JianyanStatus.PENDING_AUDIT.getCode()); uw.and(w -> w.isNull("f_delete_mark").or().ne("f_delete_mark", 1)); uw.set("jianyan_zhuangtai", JianyanStatus.CANCELLED.getCode()); return this.update(uw); } }