This commit is contained in:
parent
0964356f2f
commit
ce3abafec4
|
@ -153,6 +153,7 @@ public class SysLoginService {
|
||||||
loginUser.setUsername(user.getUserName());
|
loginUser.setUsername(user.getUserName());
|
||||||
loginUser.setNickname(user.getNickName());
|
loginUser.setNickname(user.getNickName());
|
||||||
loginUser.setUserType(user.getUserType());
|
loginUser.setUserType(user.getUserType());
|
||||||
|
loginUser.setOpenid(user.getOpenId());
|
||||||
loginUser.setMenuPermission(permissionService.getMenuPermission(user.getUserId()));
|
loginUser.setMenuPermission(permissionService.getMenuPermission(user.getUserId()));
|
||||||
loginUser.setRolePermission(permissionService.getRolePermission(user.getUserId()));
|
loginUser.setRolePermission(permissionService.getRolePermission(user.getUserId()));
|
||||||
TenantHelper.dynamic(user.getTenantId(), () -> {
|
TenantHelper.dynamic(user.getTenantId(), () -> {
|
||||||
|
|
|
@ -122,7 +122,6 @@ public class XcxAuthStrategy implements IAuthStrategy {
|
||||||
loginVo.setAccessToken(StpUtil.getTokenValue());
|
loginVo.setAccessToken(StpUtil.getTokenValue());
|
||||||
loginVo.setExpireIn(StpUtil.getTokenTimeout());
|
loginVo.setExpireIn(StpUtil.getTokenTimeout());
|
||||||
loginVo.setClientId(client.getClientId());
|
loginVo.setClientId(client.getClientId());
|
||||||
loginVo.setOpenid(openid);
|
|
||||||
return loginVo;
|
return loginVo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@ import org.dromara.common.log.annotation.Log;
|
||||||
import org.dromara.common.log.enums.BusinessType;
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.tenant.helper.TenantHelper;
|
||||||
import org.dromara.common.web.core.BaseController;
|
import org.dromara.common.web.core.BaseController;
|
||||||
import org.dromara.system.domain.bo.ActivityEnterBo;
|
import org.dromara.system.domain.bo.ActivityEnterBo;
|
||||||
import org.dromara.system.domain.vo.ActivityEnterVo;
|
import org.dromara.system.domain.vo.ActivityEnterVo;
|
||||||
|
@ -39,7 +40,7 @@ public class ActivityEnterController extends BaseController {
|
||||||
@SaCheckPermission("activity:enter:pageList")
|
@SaCheckPermission("activity:enter:pageList")
|
||||||
@GetMapping("/pageList")
|
@GetMapping("/pageList")
|
||||||
public TableDataInfo<ActivityEnterVo> list(ActivityEnterBo bo, PageQuery pageQuery) {
|
public TableDataInfo<ActivityEnterVo> list(ActivityEnterBo bo, PageQuery pageQuery) {
|
||||||
return activityEnterService.queryPageList(bo, pageQuery);
|
return TenantHelper.ignore(() -> activityEnterService.queryPageList(bo, pageQuery));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -49,7 +50,7 @@ public class ActivityEnterController extends BaseController {
|
||||||
@Log(title = "活动报名", businessType = BusinessType.EXPORT)
|
@Log(title = "活动报名", businessType = BusinessType.EXPORT)
|
||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(ActivityEnterBo bo, HttpServletResponse response) {
|
public void export(ActivityEnterBo bo, HttpServletResponse response) {
|
||||||
List<ActivityEnterVo> list = activityEnterService.queryList(bo);
|
List<ActivityEnterVo> list = TenantHelper.ignore(() -> activityEnterService.queryList(bo));
|
||||||
ExcelUtil.exportExcel(list, "活动报名", ActivityEnterVo.class, response);
|
ExcelUtil.exportExcel(list, "活动报名", ActivityEnterVo.class, response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,7 +62,7 @@ public class ActivityEnterController extends BaseController {
|
||||||
@SaCheckPermission("activity:enter:query")
|
@SaCheckPermission("activity:enter:query")
|
||||||
@GetMapping("/{id}")
|
@GetMapping("/{id}")
|
||||||
public R<ActivityEnterVo> getInfo(@NotNull(message = "主键不能为空")
|
public R<ActivityEnterVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
@PathVariable Long id) {
|
@PathVariable Long id) {
|
||||||
return R.ok(activityEnterService.queryById(id));
|
return R.ok(activityEnterService.queryById(id));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@ import org.dromara.common.log.annotation.Log;
|
||||||
import org.dromara.common.log.enums.BusinessType;
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.tenant.helper.TenantHelper;
|
||||||
import org.dromara.common.web.core.BaseController;
|
import org.dromara.common.web.core.BaseController;
|
||||||
import org.dromara.system.domain.bo.ReservationOrderBo;
|
import org.dromara.system.domain.bo.ReservationOrderBo;
|
||||||
import org.dromara.system.domain.vo.ReservationOrderVo;
|
import org.dromara.system.domain.vo.ReservationOrderVo;
|
||||||
|
@ -39,7 +40,7 @@ public class ReservationOrderController extends BaseController {
|
||||||
@SaCheckPermission("reservation:order:list")
|
@SaCheckPermission("reservation:order:list")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo<ReservationOrderVo> list(ReservationOrderBo bo, PageQuery pageQuery) {
|
public TableDataInfo<ReservationOrderVo> list(ReservationOrderBo bo, PageQuery pageQuery) {
|
||||||
return reservationOrderService.queryPageList(bo, pageQuery);
|
return TenantHelper.ignore(() -> reservationOrderService.queryPageList(bo, pageQuery));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -12,6 +12,7 @@ import org.dromara.common.log.annotation.Log;
|
||||||
import org.dromara.common.log.enums.BusinessType;
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.tenant.helper.TenantHelper;
|
||||||
import org.dromara.common.web.core.BaseController;
|
import org.dromara.common.web.core.BaseController;
|
||||||
import org.dromara.system.domain.bo.ReservationRefundBo;
|
import org.dromara.system.domain.bo.ReservationRefundBo;
|
||||||
import org.dromara.system.domain.vo.ReservationRefundVo;
|
import org.dromara.system.domain.vo.ReservationRefundVo;
|
||||||
|
@ -41,7 +42,7 @@ public class ReservationRefundController extends BaseController {
|
||||||
@SaCheckPermission("reservation:refund:list")
|
@SaCheckPermission("reservation:refund:list")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo<ReservationRefundVo> list(ReservationRefundBo bo, PageQuery pageQuery) {
|
public TableDataInfo<ReservationRefundVo> list(ReservationRefundBo bo, PageQuery pageQuery) {
|
||||||
return reservationRefundService.queryPageList(bo, pageQuery);
|
return TenantHelper.ignore(() -> reservationRefundService.queryPageList(bo, pageQuery));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -77,7 +78,13 @@ public class ReservationRefundController extends BaseController {
|
||||||
@Log(title = "同意退款", businessType = BusinessType.INSERT)
|
@Log(title = "同意退款", businessType = BusinessType.INSERT)
|
||||||
@RepeatSubmit()
|
@RepeatSubmit()
|
||||||
@PostMapping("/agree")
|
@PostMapping("/agree")
|
||||||
public R<Void> refundAgree(@Validated(EditGroup.class) @RequestBody ReservationRefundBo bo) throws Exception {
|
public R<Void> refundAgree(@Validated(EditGroup.class) @RequestBody ReservationRefundBo bo) {
|
||||||
return toAjax(reservationRefundService.agree(bo));
|
return toAjax(TenantHelper.ignore(() -> {
|
||||||
|
try {
|
||||||
|
return reservationRefundService.agree(bo);
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@ import org.dromara.common.log.annotation.Log;
|
||||||
import org.dromara.common.log.enums.BusinessType;
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.dromara.common.tenant.helper.TenantHelper;
|
||||||
import org.dromara.common.web.core.BaseController;
|
import org.dromara.common.web.core.BaseController;
|
||||||
import org.dromara.system.domain.bo.SysScaleOrderBo;
|
import org.dromara.system.domain.bo.SysScaleOrderBo;
|
||||||
import org.dromara.system.domain.vo.SysScaleOrderVo;
|
import org.dromara.system.domain.vo.SysScaleOrderVo;
|
||||||
|
@ -39,7 +40,7 @@ public class ScaleOrderController extends BaseController {
|
||||||
@SaCheckPermission("scale:order:list")
|
@SaCheckPermission("scale:order:list")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo<SysScaleOrderVo> list(SysScaleOrderBo bo, PageQuery pageQuery) {
|
public TableDataInfo<SysScaleOrderVo> list(SysScaleOrderBo bo, PageQuery pageQuery) {
|
||||||
return scaleOrderService.queryPageList(bo, pageQuery);
|
return TenantHelper.ignore(() -> scaleOrderService.queryPageList(bo, pageQuery));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -103,7 +103,7 @@ public class WxMyController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@GetMapping("/reservation/pageList")
|
@GetMapping("/reservation/pageList")
|
||||||
public TableDataInfo<ReservationOrderVo> reservationList(ReservationOrderBo bo, PageQuery pageQuery) {
|
public TableDataInfo<ReservationOrderVo> reservationList(ReservationOrderBo bo, PageQuery pageQuery) {
|
||||||
return myService.queryReservationPageList(bo, pageQuery);
|
return TenantHelper.ignore(() -> myService.queryReservationPageList(bo, pageQuery));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -12,6 +12,7 @@ import org.dromara.common.log.enums.BusinessType;
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
import org.dromara.common.satoken.utils.LoginHelper;
|
import org.dromara.common.satoken.utils.LoginHelper;
|
||||||
|
import org.dromara.common.tenant.helper.TenantHelper;
|
||||||
import org.dromara.common.web.core.BaseController;
|
import org.dromara.common.web.core.BaseController;
|
||||||
import org.dromara.system.domain.bo.ReservationOrderBo;
|
import org.dromara.system.domain.bo.ReservationOrderBo;
|
||||||
import org.dromara.system.domain.bo.ReservationRefundBo;
|
import org.dromara.system.domain.bo.ReservationRefundBo;
|
||||||
|
@ -93,7 +94,7 @@ public class WxOrderController extends BaseController {
|
||||||
Long userId = LoginHelper.getUserId();
|
Long userId = LoginHelper.getUserId();
|
||||||
bo.setCreateBy(userId);
|
bo.setCreateBy(userId);
|
||||||
bo.setCounselorId(null);
|
bo.setCounselorId(null);
|
||||||
return reservationOrderService.queryPageList(bo, pageQuery);
|
return TenantHelper.ignore(() -> reservationOrderService.queryPageList(bo, pageQuery));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -104,7 +105,7 @@ public class WxOrderController extends BaseController {
|
||||||
Long userId = LoginHelper.getUserId();
|
Long userId = LoginHelper.getUserId();
|
||||||
bo.setCounselorId(userId);
|
bo.setCounselorId(userId);
|
||||||
bo.setCreateBy(null);
|
bo.setCreateBy(null);
|
||||||
return reservationOrderService.queryPageList(bo, pageQuery);
|
return TenantHelper.ignore(() ->reservationOrderService.queryPageList(bo, pageQuery));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -25,26 +25,30 @@ public class ScoreRecordBo extends BaseEntity {
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@NotNull(message = "不能为空", groups = { EditGroup.class })
|
@NotNull(message = "不能为空", groups = {EditGroup.class})
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* status为0是量表id,1是咨询师id
|
* status为0是量表id,1是咨询师id
|
||||||
*/
|
*/
|
||||||
@NotNull(message = "status为0是量表id,1是咨询师id不能为空", groups = { AddGroup.class, EditGroup.class })
|
@NotNull(message = "业务id不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
private Long businessId;
|
private Long businessId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 0为scale 1为咨询师
|
* 0为scale 1为咨询师
|
||||||
*/
|
*/
|
||||||
@NotNull(message = "0为scale 1为咨询师不能为空", groups = { AddGroup.class, EditGroup.class })
|
@NotNull(message = "业务状态不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
private Integer recordStatus;
|
private Integer recordStatus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@NotNull(message = "不能为空", groups = { AddGroup.class, EditGroup.class })
|
@NotNull(message = "评分不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
private BigDecimal score;
|
private BigDecimal oneScore;
|
||||||
|
@NotNull(message = "评分不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
|
private BigDecimal twoScore;
|
||||||
|
@NotNull(message = "评分不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
|
private BigDecimal threeScore;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,17 +3,13 @@ package org.dromara.system.domain.vo;
|
||||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
import com.alibaba.excel.annotation.ExcelProperty;
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
import io.github.linpeilie.annotations.AutoMapper;
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
import io.github.linpeilie.annotations.AutoMapping;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.dromara.common.translation.annotation.Translation;
|
|
||||||
import org.dromara.common.translation.constant.TransConstant;
|
|
||||||
import org.dromara.system.domain.ActivityEnter;
|
import org.dromara.system.domain.ActivityEnter;
|
||||||
|
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 活动报名视图对象 m_activity_enter
|
* 活动报名视图对象 m_activity_enter
|
||||||
*
|
*
|
||||||
|
@ -45,9 +41,9 @@ public class ActivityEnterVo implements Serializable {
|
||||||
*/
|
*/
|
||||||
private Integer status;
|
private Integer status;
|
||||||
|
|
||||||
@Translation(type = TransConstant.USER_ID_TO_NICKNAME)
|
private Long createBy;
|
||||||
@AutoMapping(target = "createBy")
|
|
||||||
private Long createName;
|
private String createName;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,8 +35,7 @@ public class CounselorVo implements Serializable {
|
||||||
/**
|
/**
|
||||||
* 姓名
|
* 姓名
|
||||||
*/
|
*/
|
||||||
@Translation(type = TransConstant.USER_ID_TO_NICKNAME)
|
private String name;
|
||||||
private Long name;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 手机号
|
* 手机号
|
||||||
|
|
|
@ -41,9 +41,9 @@ public class ReservationOrderVo implements Serializable {
|
||||||
*/
|
*/
|
||||||
private Long counselorId;
|
private Long counselorId;
|
||||||
|
|
||||||
@Translation(type = TransConstant.USER_ID_TO_NICKNAME)
|
private String counselorName;
|
||||||
@AutoMapping(target = "counselorId")
|
|
||||||
private Long counselorName;
|
private String counselorUrl;
|
||||||
|
|
||||||
private String transactionId;
|
private String transactionId;
|
||||||
|
|
||||||
|
@ -85,8 +85,10 @@ public class ReservationOrderVo implements Serializable {
|
||||||
|
|
||||||
private Long createBy;
|
private Long createBy;
|
||||||
|
|
||||||
@Translation(type = TransConstant.USER_ID_TO_NICKNAME)
|
private String createName;
|
||||||
@AutoMapping(target = "createBy")
|
|
||||||
private Long createName;
|
private Boolean isRefund;
|
||||||
|
|
||||||
|
private String timeFrame;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,9 @@ public class SysScaleOrderVo implements Serializable {
|
||||||
@ExcelProperty(value = "量表id")
|
@ExcelProperty(value = "量表id")
|
||||||
private Long scaleId;
|
private Long scaleId;
|
||||||
private String scaleName;
|
private String scaleName;
|
||||||
|
private String scaleUrl;
|
||||||
|
|
||||||
|
private Long recordId;
|
||||||
/**
|
/**
|
||||||
* 发布批次号
|
* 发布批次号
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -88,7 +88,7 @@ public interface SysUserMapper extends BaseMapperPlus<SysUser, SysUserVo> {
|
||||||
})
|
})
|
||||||
int updateById(@Param(Constants.ENTITY) SysUser user);
|
int updateById(@Param(Constants.ENTITY) SysUser user);
|
||||||
|
|
||||||
List<SysUser> selectStudentListByDeptIds(String deptIds);
|
List<SysUser> selectUserListByDeptIds(String deptIds);
|
||||||
|
|
||||||
List<SysUser> findUserByIds(String userIds);
|
List<SysUser> findUserByIds(String userIds);
|
||||||
|
|
||||||
|
|
|
@ -11,9 +11,11 @@ import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
import org.dromara.common.satoken.utils.LoginHelper;
|
import org.dromara.common.satoken.utils.LoginHelper;
|
||||||
import org.dromara.system.domain.ActivityEnter;
|
import org.dromara.system.domain.ActivityEnter;
|
||||||
|
import org.dromara.system.domain.SysUser;
|
||||||
import org.dromara.system.domain.bo.ActivityEnterBo;
|
import org.dromara.system.domain.bo.ActivityEnterBo;
|
||||||
import org.dromara.system.domain.vo.ActivityEnterVo;
|
import org.dromara.system.domain.vo.ActivityEnterVo;
|
||||||
import org.dromara.system.mapper.ActivityEnterMapper;
|
import org.dromara.system.mapper.ActivityEnterMapper;
|
||||||
|
import org.dromara.system.mapper.SysUserMapper;
|
||||||
import org.dromara.system.service.IActivityEnterService;
|
import org.dromara.system.service.IActivityEnterService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@ -33,6 +35,7 @@ import java.util.Map;
|
||||||
public class ActivityEnterServiceImpl implements IActivityEnterService {
|
public class ActivityEnterServiceImpl implements IActivityEnterService {
|
||||||
|
|
||||||
private final ActivityEnterMapper baseMapper;
|
private final ActivityEnterMapper baseMapper;
|
||||||
|
private final SysUserMapper userMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询活动报名
|
* 查询活动报名
|
||||||
|
@ -56,6 +59,11 @@ public class ActivityEnterServiceImpl implements IActivityEnterService {
|
||||||
public TableDataInfo<ActivityEnterVo> queryPageList(ActivityEnterBo bo, PageQuery pageQuery) {
|
public TableDataInfo<ActivityEnterVo> queryPageList(ActivityEnterBo bo, PageQuery pageQuery) {
|
||||||
LambdaQueryWrapper<ActivityEnter> lqw = buildQueryWrapper(bo);
|
LambdaQueryWrapper<ActivityEnter> lqw = buildQueryWrapper(bo);
|
||||||
Page<ActivityEnterVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
Page<ActivityEnterVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
List<ActivityEnterVo> records = result.getRecords();
|
||||||
|
for (ActivityEnterVo record : records) {
|
||||||
|
SysUser sysUser = userMapper.selectById(record.getCreateBy());
|
||||||
|
record.setCreateName(sysUser.getNickName());
|
||||||
|
}
|
||||||
return TableDataInfo.build(result);
|
return TableDataInfo.build(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,8 +50,7 @@ public class ActivityServiceImpl implements IActivityService {
|
||||||
.eq(ActivityEnter::getActivityId, id)
|
.eq(ActivityEnter::getActivityId, id)
|
||||||
.eq(ActivityEnter::getCreateBy, userId));
|
.eq(ActivityEnter::getCreateBy, userId));
|
||||||
Long join = enterMapper.selectCount(new LambdaQueryWrapper<ActivityEnter>()
|
Long join = enterMapper.selectCount(new LambdaQueryWrapper<ActivityEnter>()
|
||||||
.eq(ActivityEnter::getActivityId, id)
|
.eq(ActivityEnter::getActivityId, id));
|
||||||
.eq(ActivityEnter::getStatus, 1));
|
|
||||||
ActivityVo activityVo = baseMapper.selectVoById(id);
|
ActivityVo activityVo = baseMapper.selectVoById(id);
|
||||||
activityVo.setJoinFlag(l.intValue());
|
activityVo.setJoinFlag(l.intValue());
|
||||||
activityVo.setJoinNums(join);
|
activityVo.setJoinNums(join);
|
||||||
|
|
|
@ -73,6 +73,8 @@ public class CounselorServiceImpl implements ICounselorService {
|
||||||
@Override
|
@Override
|
||||||
public CounselorVo queryById4Wx(Long id) {
|
public CounselorVo queryById4Wx(Long id) {
|
||||||
CounselorVo counselorVo = baseMapper.selectVoById(id);
|
CounselorVo counselorVo = baseMapper.selectVoById(id);
|
||||||
|
SysUserVo user = userService.selectUserById(id);
|
||||||
|
counselorVo.setName(user.getNickName());
|
||||||
Long l = experienceMapper.selectCount(new LambdaQueryWrapper<CounselorExperience>()
|
Long l = experienceMapper.selectCount(new LambdaQueryWrapper<CounselorExperience>()
|
||||||
.eq(CounselorExperience::getCounselorId, id));
|
.eq(CounselorExperience::getCounselorId, id));
|
||||||
counselorVo.setExperienceNum(l.intValue());
|
counselorVo.setExperienceNum(l.intValue());
|
||||||
|
|
|
@ -22,9 +22,7 @@ import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
import org.dromara.common.satoken.utils.LoginHelper;
|
import org.dromara.common.satoken.utils.LoginHelper;
|
||||||
import org.dromara.common.tenant.helper.TenantHelper;
|
import org.dromara.common.tenant.helper.TenantHelper;
|
||||||
import org.dromara.system.constant.StatusEnum;
|
import org.dromara.system.constant.StatusEnum;
|
||||||
import org.dromara.system.domain.ReservationOrder;
|
import org.dromara.system.domain.*;
|
||||||
import org.dromara.system.domain.SysEvaluationRecord;
|
|
||||||
import org.dromara.system.domain.SysScale;
|
|
||||||
import org.dromara.system.domain.bo.BaseQueryBo;
|
import org.dromara.system.domain.bo.BaseQueryBo;
|
||||||
import org.dromara.system.domain.bo.ReservationOrderBo;
|
import org.dromara.system.domain.bo.ReservationOrderBo;
|
||||||
import org.dromara.system.domain.bo.SysScaleBo;
|
import org.dromara.system.domain.bo.SysScaleBo;
|
||||||
|
@ -33,10 +31,7 @@ import org.dromara.system.domain.word.EvaluationRecordWordData;
|
||||||
import org.dromara.system.domain.word.WordEvaluationFactor;
|
import org.dromara.system.domain.word.WordEvaluationFactor;
|
||||||
import org.dromara.system.domain.word.WordFactor;
|
import org.dromara.system.domain.word.WordFactor;
|
||||||
import org.dromara.system.domain.word.WordRadar;
|
import org.dromara.system.domain.word.WordRadar;
|
||||||
import org.dromara.system.mapper.ReservationOrderMapper;
|
import org.dromara.system.mapper.*;
|
||||||
import org.dromara.system.mapper.SysEvaluationRecordMapper;
|
|
||||||
import org.dromara.system.mapper.SysScaleMapper;
|
|
||||||
import org.dromara.system.mapper.SysUserMapper;
|
|
||||||
import org.dromara.system.service.IMyService;
|
import org.dromara.system.service.IMyService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@ -65,6 +60,9 @@ public class MyServiceImpl implements IMyService {
|
||||||
private final SysScaleMapper scaleMapper;
|
private final SysScaleMapper scaleMapper;
|
||||||
private final ReservationOrderMapper reservationOrderMapper;
|
private final ReservationOrderMapper reservationOrderMapper;
|
||||||
private final SysUserMapper userMapper;
|
private final SysUserMapper userMapper;
|
||||||
|
private final ReservationRefundMapper refundMapper;
|
||||||
|
private final ReservationTimeMapper timeMapper;
|
||||||
|
private final ReservationDayMapper dayMapper;
|
||||||
|
|
||||||
//private final DeptService deptService;
|
//private final DeptService deptService;
|
||||||
private final OssService ossService;
|
private final OssService ossService;
|
||||||
|
@ -134,6 +132,7 @@ public class MyServiceImpl implements IMyService {
|
||||||
lqw.eq(SysEvaluationRecord::getUserId, userId);
|
lqw.eq(SysEvaluationRecord::getUserId, userId);
|
||||||
//根据flag查询个人或发布
|
//根据flag查询个人或发布
|
||||||
lqw.eq(SysEvaluationRecord::getPublishFlag, 1);
|
lqw.eq(SysEvaluationRecord::getPublishFlag, 1);
|
||||||
|
lqw.eq(SysEvaluationRecord::getStatus, 0);
|
||||||
lqw.orderByDesc(SysEvaluationRecord::getCreateTime);
|
lqw.orderByDesc(SysEvaluationRecord::getCreateTime);
|
||||||
return queryEvaluationRecordPageList(lqw, pageQuery);
|
return queryEvaluationRecordPageList(lqw, pageQuery);
|
||||||
}
|
}
|
||||||
|
@ -167,6 +166,25 @@ public class MyServiceImpl implements IMyService {
|
||||||
new LambdaQueryWrapper<ReservationOrder>()
|
new LambdaQueryWrapper<ReservationOrder>()
|
||||||
.eq(ReservationOrder::getCreateBy, userId)
|
.eq(ReservationOrder::getCreateBy, userId)
|
||||||
.eq(bo.getOrderStatus() != null, ReservationOrder::getOrderStatus, bo.getOrderStatus()));
|
.eq(bo.getOrderStatus() != null, ReservationOrder::getOrderStatus, bo.getOrderStatus()));
|
||||||
|
|
||||||
|
List<ReservationOrderVo> records = page.getRecords();
|
||||||
|
for (ReservationOrderVo record : records) {
|
||||||
|
SysUser sysCounselor = userMapper.selectById(record.getCounselorId());
|
||||||
|
if (sysCounselor.getAvatar() != null) {
|
||||||
|
String s = ossService.selectUrlByIds(sysCounselor.getAvatar().toString());
|
||||||
|
record.setCounselorUrl(s);
|
||||||
|
}
|
||||||
|
record.setCounselorName(sysCounselor.getNickName());
|
||||||
|
boolean exists = refundMapper.exists(new LambdaQueryWrapper<ReservationRefund>().eq(ReservationRefund::getOrderId, record.getId()));
|
||||||
|
record.setIsRefund(exists);
|
||||||
|
Long timeId = record.getTimeId();
|
||||||
|
ReservationTime reservationTime = timeMapper.selectById(timeId);
|
||||||
|
String startTime = DateUtils.parseDateToStr("HH:mm", reservationTime.getStartTime());
|
||||||
|
String endTime = DateUtils.parseDateToStr("HH:mm", reservationTime.getEndTime());
|
||||||
|
ReservationDay reservationDay = dayMapper.selectById(reservationTime.getDayId());
|
||||||
|
String dayTime = DateUtils.parseDateToStr("yyyy/MM/dd", reservationDay.getDayTime());
|
||||||
|
record.setTimeFrame(dayTime + " " + startTime + " - " + endTime);
|
||||||
|
}
|
||||||
return TableDataInfo.build(page);
|
return TableDataInfo.build(page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@ import com.github.binarywang.wxpay.bean.request.WxPayUnifiedOrderRequest;
|
||||||
import com.github.binarywang.wxpay.service.WxPayService;
|
import com.github.binarywang.wxpay.service.WxPayService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.dromara.common.core.service.OssService;
|
||||||
import org.dromara.common.core.utils.MapstructUtils;
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
@ -17,11 +18,13 @@ import org.dromara.system.constant.StatusEnum;
|
||||||
import org.dromara.system.domain.Counselor;
|
import org.dromara.system.domain.Counselor;
|
||||||
import org.dromara.system.domain.ReservationOrder;
|
import org.dromara.system.domain.ReservationOrder;
|
||||||
import org.dromara.system.domain.ReservationTime;
|
import org.dromara.system.domain.ReservationTime;
|
||||||
|
import org.dromara.system.domain.SysUser;
|
||||||
import org.dromara.system.domain.bo.ReservationOrderBo;
|
import org.dromara.system.domain.bo.ReservationOrderBo;
|
||||||
import org.dromara.system.domain.vo.ReservationOrderVo;
|
import org.dromara.system.domain.vo.ReservationOrderVo;
|
||||||
import org.dromara.system.mapper.CounselorMapper;
|
import org.dromara.system.mapper.CounselorMapper;
|
||||||
import org.dromara.system.mapper.ReservationOrderMapper;
|
import org.dromara.system.mapper.ReservationOrderMapper;
|
||||||
import org.dromara.system.mapper.ReservationTimeMapper;
|
import org.dromara.system.mapper.ReservationTimeMapper;
|
||||||
|
import org.dromara.system.mapper.SysUserMapper;
|
||||||
import org.dromara.system.service.IReservationOrderService;
|
import org.dromara.system.service.IReservationOrderService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@ -41,9 +44,12 @@ import java.util.Map;
|
||||||
public class ReservationOrderServiceImpl implements IReservationOrderService {
|
public class ReservationOrderServiceImpl implements IReservationOrderService {
|
||||||
|
|
||||||
private final ReservationOrderMapper baseMapper;
|
private final ReservationOrderMapper baseMapper;
|
||||||
private final WxPayService payService;
|
|
||||||
private final ReservationTimeMapper timeMapper;
|
private final ReservationTimeMapper timeMapper;
|
||||||
private final CounselorMapper counselorMapper;
|
private final CounselorMapper counselorMapper;
|
||||||
|
private final SysUserMapper userMapper;
|
||||||
|
|
||||||
|
private final WxPayService payService;
|
||||||
|
private final OssService ossService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询预约订单
|
* 查询预约订单
|
||||||
|
@ -67,6 +73,17 @@ public class ReservationOrderServiceImpl implements IReservationOrderService {
|
||||||
public TableDataInfo<ReservationOrderVo> queryPageList(ReservationOrderBo bo, PageQuery pageQuery) {
|
public TableDataInfo<ReservationOrderVo> queryPageList(ReservationOrderBo bo, PageQuery pageQuery) {
|
||||||
LambdaQueryWrapper<ReservationOrder> lqw = buildQueryWrapper(bo);
|
LambdaQueryWrapper<ReservationOrder> lqw = buildQueryWrapper(bo);
|
||||||
Page<ReservationOrderVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
Page<ReservationOrderVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
List<ReservationOrderVo> records = result.getRecords();
|
||||||
|
for (ReservationOrderVo record : records) {
|
||||||
|
SysUser sysCounselor = userMapper.selectById(record.getCounselorId());
|
||||||
|
if (sysCounselor.getAvatar() != null) {
|
||||||
|
String s = ossService.selectUrlByIds(sysCounselor.getAvatar().toString());
|
||||||
|
record.setCounselorUrl(s);
|
||||||
|
}
|
||||||
|
record.setCounselorName(sysCounselor.getNickName());
|
||||||
|
SysUser sysUser = userMapper.selectById(record.getCreateBy());
|
||||||
|
record.setCreateName(sysUser.getNickName());
|
||||||
|
}
|
||||||
return TableDataInfo.build(result);
|
return TableDataInfo.build(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -141,10 +158,10 @@ public class ReservationOrderServiceImpl implements IReservationOrderService {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
String resultCode = notifyResult.getResultCode();
|
String resultCode = notifyResult.getResultCode();
|
||||||
if("FAIL".equals(resultCode)){
|
if ("FAIL".equals(resultCode)) {
|
||||||
String errCode = notifyResult.getErrCode();
|
String errCode = notifyResult.getErrCode();
|
||||||
String errCodeDes = notifyResult.getErrCodeDes();
|
String errCodeDes = notifyResult.getErrCodeDes();
|
||||||
log.error("预约订单:{},支付异常。异常代码:{}。异常原因:{}", orderId, errCode,errCodeDes);
|
log.error("预约订单:{},支付异常。异常代码:{}。异常原因:{}", orderId, errCode, errCodeDes);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
String transactionId = notifyResult.getTransactionId();
|
String transactionId = notifyResult.getTransactionId();
|
||||||
|
|
|
@ -9,6 +9,7 @@ import com.github.binarywang.wxpay.bean.request.WxPayUnifiedOrderRequest;
|
||||||
import com.github.binarywang.wxpay.service.WxPayService;
|
import com.github.binarywang.wxpay.service.WxPayService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.dromara.common.core.service.OssService;
|
||||||
import org.dromara.common.core.utils.MapstructUtils;
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
@ -42,12 +43,11 @@ import java.util.Map;
|
||||||
public class SysScaleOrderServiceImpl implements ISysScaleOrderService {
|
public class SysScaleOrderServiceImpl implements ISysScaleOrderService {
|
||||||
|
|
||||||
private final SysScaleOrderMapper baseMapper;
|
private final SysScaleOrderMapper baseMapper;
|
||||||
|
private final SysScaleMapper sysScaleMapper;
|
||||||
|
private final SysEvaluationRecordMapper recordMapper;
|
||||||
|
|
||||||
private final WxPayService payService;
|
private final WxPayService payService;
|
||||||
|
private final OssService ossService;
|
||||||
private final SysScaleMapper sysScaleMapper;
|
|
||||||
|
|
||||||
private final SysEvaluationRecordMapper recordMapper;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -76,6 +76,8 @@ public class SysScaleOrderServiceImpl implements ISysScaleOrderService {
|
||||||
for (SysScaleOrderVo record : records) {
|
for (SysScaleOrderVo record : records) {
|
||||||
SysScale scale = sysScaleMapper.selectById(record.getScaleId());
|
SysScale scale = sysScaleMapper.selectById(record.getScaleId());
|
||||||
record.setScaleName(scale.getScaleName());
|
record.setScaleName(scale.getScaleName());
|
||||||
|
String s = ossService.selectUrlByIds(scale.getAppCover().toString());
|
||||||
|
record.setScaleUrl(s);
|
||||||
}
|
}
|
||||||
return TableDataInfo.build(result);
|
return TableDataInfo.build(result);
|
||||||
}
|
}
|
||||||
|
@ -110,30 +112,39 @@ public class SysScaleOrderServiceImpl implements ISysScaleOrderService {
|
||||||
@Override
|
@Override
|
||||||
public WxPayMpOrderResult insertByBo(SysScaleOrderBo bo) throws Exception {
|
public WxPayMpOrderResult insertByBo(SysScaleOrderBo bo) throws Exception {
|
||||||
String openId = LoginHelper.getOpenId();
|
String openId = LoginHelper.getOpenId();
|
||||||
Long userId = LoginHelper.getUserId();
|
BigDecimal price;
|
||||||
SysScaleOrder add = MapstructUtils.convert(bo, SysScaleOrder.class);
|
Long id = bo.getId();
|
||||||
Long scaleId = add.getScaleId();
|
if (id == null) {
|
||||||
//初始量测记录
|
Long userId = LoginHelper.getUserId();
|
||||||
SysEvaluationRecord record = new SysEvaluationRecord();
|
SysScaleOrder add = MapstructUtils.convert(bo, SysScaleOrder.class);
|
||||||
record.setUserId(userId);
|
Long scaleId = add.getScaleId();
|
||||||
record.setScaleId(scaleId);
|
//初始量测记录
|
||||||
record.setStatus(-1);
|
SysEvaluationRecord record = new SysEvaluationRecord();
|
||||||
record.setCreateBy(userId);
|
record.setUserId(userId);
|
||||||
record.setUpdateBy(userId);
|
record.setScaleId(scaleId);
|
||||||
recordMapper.insert(record);
|
record.setStatus(-1);
|
||||||
//初始订单
|
record.setCreateBy(userId);
|
||||||
SysScale sysScale = sysScaleMapper.selectById(scaleId);
|
record.setUpdateBy(userId);
|
||||||
BigDecimal price = sysScale.getPrice();
|
recordMapper.insert(record);
|
||||||
add.setActualPrice(price);
|
//初始订单
|
||||||
add.setOrderPrice(price);
|
SysScale sysScale = sysScaleMapper.selectById(scaleId);
|
||||||
add.setRecordId(record.getRecordId());
|
price = sysScale.getPrice();
|
||||||
add.setUseStatus(StatusEnum.DISABLED.getValue());
|
add.setActualPrice(price);
|
||||||
add.setOrderStatus(StatusEnum.DISABLED.getValue());
|
add.setOrderPrice(price);
|
||||||
validEntityBeforeSave(add);
|
add.setRecordId(record.getRecordId());
|
||||||
baseMapper.insert(add);
|
add.setUseStatus(StatusEnum.DISABLED.getValue());
|
||||||
|
add.setOrderStatus(StatusEnum.DISABLED.getValue());
|
||||||
|
validEntityBeforeSave(add);
|
||||||
|
baseMapper.insert(add);
|
||||||
|
id = add.getId();
|
||||||
|
} else {
|
||||||
|
SysScaleOrder sysScaleOrder = baseMapper.selectById(id);
|
||||||
|
SysScale sysScale = sysScaleMapper.selectById(sysScaleOrder.getId());
|
||||||
|
price = sysScale.getPrice();
|
||||||
|
}
|
||||||
WxPayUnifiedOrderRequest orderRequest = new WxPayUnifiedOrderRequest();
|
WxPayUnifiedOrderRequest orderRequest = new WxPayUnifiedOrderRequest();
|
||||||
orderRequest.setBody("墨者科技-量表支付");
|
orderRequest.setBody("墨者科技-量表支付");
|
||||||
orderRequest.setOutTradeNo(add.getId().toString());
|
orderRequest.setOutTradeNo(id.toString());
|
||||||
int totalFee = price.multiply(new BigDecimal(100)).intValue();
|
int totalFee = price.multiply(new BigDecimal(100)).intValue();
|
||||||
orderRequest.setTotalFee(totalFee);
|
orderRequest.setTotalFee(totalFee);
|
||||||
orderRequest.setNotifyUrl("https://api.ysmental.com/tenant/wx/pay/notify/order/scale");
|
orderRequest.setNotifyUrl("https://api.ysmental.com/tenant/wx/pay/notify/order/scale");
|
||||||
|
@ -185,7 +196,7 @@ public class SysScaleOrderServiceImpl implements ISysScaleOrderService {
|
||||||
SysScaleOrder order = new SysScaleOrder();
|
SysScaleOrder order = new SysScaleOrder();
|
||||||
order.setId(id);
|
order.setId(id);
|
||||||
order.setOrderStatus(1);
|
order.setOrderStatus(1);
|
||||||
//order.setUpdateBy(userId);
|
order.setUpdateBy(userId);
|
||||||
order.setUpdateTime(date);
|
order.setUpdateTime(date);
|
||||||
order.setTransactionId(transactionId);
|
order.setTransactionId(transactionId);
|
||||||
boolean orderFlag = baseMapper.updateById(order) > 0;
|
boolean orderFlag = baseMapper.updateById(order) > 0;
|
||||||
|
|
|
@ -170,7 +170,7 @@ public class SysScalePublishServiceImpl implements ISysScalePublishService {
|
||||||
List<SysDeptVo> deptList = deptMapper.findDeptByIds(deptIds);
|
List<SysDeptVo> deptList = deptMapper.findDeptByIds(deptIds);
|
||||||
add.setDeptNames(deptList.stream().map(SysDeptVo::getDeptName).collect(Collectors.joining(StrUtil.COMMA)));
|
add.setDeptNames(deptList.stream().map(SysDeptVo::getDeptName).collect(Collectors.joining(StrUtil.COMMA)));
|
||||||
//计算用户
|
//计算用户
|
||||||
userList = userMapper.selectStudentListByDeptIds(deptIds);
|
userList = userMapper.selectUserListByDeptIds(deptIds);
|
||||||
} else {
|
} else {
|
||||||
if (StringUtils.isEmpty(userIds)) {
|
if (StringUtils.isEmpty(userIds)) {
|
||||||
throw new ServiceException("用户id,以逗号隔开不能为空");
|
throw new ServiceException("用户id,以逗号隔开不能为空");
|
||||||
|
|
|
@ -87,7 +87,8 @@ public class SysScaleServiceImpl implements ISysScaleService {
|
||||||
.eq(SysEvaluationRecord::getUserId, userId)
|
.eq(SysEvaluationRecord::getUserId, userId)
|
||||||
.eq(SysEvaluationRecord::getScaleId, scaleId)
|
.eq(SysEvaluationRecord::getScaleId, scaleId)
|
||||||
.eq(SysEvaluationRecord::getPublishFlag, 0)
|
.eq(SysEvaluationRecord::getPublishFlag, 0)
|
||||||
.eq(SysEvaluationRecord::getStatus, 0));
|
.eq(SysEvaluationRecord::getStatus, 0)
|
||||||
|
.last("limit 1"));
|
||||||
sysScaleVo.setRecordId(sysEvaluationRecord != null ? sysEvaluationRecord.getRecordId() : null);
|
sysScaleVo.setRecordId(sysEvaluationRecord != null ? sysEvaluationRecord.getRecordId() : null);
|
||||||
return sysScaleVo;
|
return sysScaleVo;
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
left join sys_user u on u.user_id = ro.create_by
|
left join sys_user u on u.user_id = ro.create_by
|
||||||
where DATE_FORMAT(rd.day_time, '%Y-%m-%d') = #{time}
|
where DATE_FORMAT(rd.day_time, '%Y-%m-%d') = #{time}
|
||||||
and rt.counselor_id = #{userId}
|
and rt.counselor_id = #{userId}
|
||||||
and ro.order_status = 1
|
#and ro.order_status = 1
|
||||||
and rt.`status` > 0
|
#and rt.`status` > 0
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
@ -5,9 +5,9 @@
|
||||||
<mapper namespace="org.dromara.system.mapper.StatisticMapper">
|
<mapper namespace="org.dromara.system.mapper.StatisticMapper">
|
||||||
<select id="selectCompleteAvaluation" resultType="org.dromara.system.domain.vo.StatisticNumVo">
|
<select id="selectCompleteAvaluation" resultType="org.dromara.system.domain.vo.StatisticNumVo">
|
||||||
select d.dept_name,
|
select d.dept_name,
|
||||||
parent.dept_name as `parentName`,
|
IFNULL(parent.dept_name, d.dept_name) as `parentName`,
|
||||||
count(if(er.status = 1, 1, null)) as `value`,
|
count(if(er.status = 1, 1, null)) as `value`,
|
||||||
count(if(er.status = -1, 1, null)) as `spareValue`
|
count(if(er.status = -1, 1, null)) as `spareValue`
|
||||||
from sys_evaluation_record er
|
from sys_evaluation_record er
|
||||||
left join sys_dept d on d.dept_id = er.dept_id
|
left join sys_dept d on d.dept_id = er.dept_id
|
||||||
left join sys_dept parent on parent.dept_id = d.parent_id
|
left join sys_dept parent on parent.dept_id = d.parent_id
|
||||||
|
@ -18,17 +18,18 @@
|
||||||
|
|
||||||
<select id="selectStatisticWarn" resultType="org.dromara.system.domain.vo.StatisticWarnVo">
|
<select id="selectStatisticWarn" resultType="org.dromara.system.domain.vo.StatisticWarnVo">
|
||||||
select d.dept_name,
|
select d.dept_name,
|
||||||
parent.dept_name as `parentName`,
|
IFNULL(parent.dept_name, d.dept_name) as `parentName`,
|
||||||
count(if(t.situation = 1, 1, null)) as `noneNum`,
|
count(if(t.situation = 1, 1, null)) as `noneNum`,
|
||||||
count(if(t.situation = 2, 1, null)) as `lowNum`,
|
count(if(t.situation = 2, 1, null)) as `lowNum`,
|
||||||
count(if(t.situation = 3, 1, null)) as `middleNum`,
|
count(if(t.situation = 3, 1, null)) as `middleNum`,
|
||||||
count(if(t.situation = 4, 1, null)) as `highNum`,
|
count(if(t.situation = 4, 1, null)) as `highNum`,
|
||||||
count(if(t.situation = 5, 1, null)) as `majorNum`
|
count(if(t.situation = 5, 1, null)) as `majorNum`
|
||||||
from (select er.dept_id, MAX(ec.situation) as situation
|
from (select er.dept_id, MAX(ec.situation) as situation
|
||||||
from sys_evaluation_record er
|
from sys_evaluation_record er
|
||||||
left join sys_evaluation_conclusion ec
|
left join sys_evaluation_conclusion ec
|
||||||
on ec.record_id = er.record_id and ec.status = 1
|
on ec.record_id = er.record_id and ec.status = 1
|
||||||
where er.status = 1
|
where er.status = 1
|
||||||
|
and publish_flag = 1
|
||||||
and er.batch_no = #{batchNo}
|
and er.batch_no = #{batchNo}
|
||||||
and er.scale_id = #{scaleId}
|
and er.scale_id = #{scaleId}
|
||||||
group by er.record_id) t
|
group by er.record_id) t
|
||||||
|
@ -38,9 +39,9 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectStatisticFactor" resultType="org.dromara.system.domain.vo.StatisticFactorVo">
|
<select id="selectStatisticFactor" resultType="org.dromara.system.domain.vo.StatisticFactorVo">
|
||||||
select IFNULL(sf.factor_name, 'absent') as `factorName`,
|
select IFNULL(sf.factor_name, 'absent') as `factorName`,
|
||||||
d.dept_name as `deptName`,
|
d.dept_name as `deptName`,
|
||||||
parent.dept_name as `parentName`
|
IFNULL(parent.dept_name, d.dept_name) as `parentName`
|
||||||
from sys_dept parent
|
from sys_dept parent
|
||||||
left join sys_dept d on d.parent_id = parent.dept_id
|
left join sys_dept d on d.parent_id = parent.dept_id
|
||||||
left join sys_evaluation_record er on er.dept_id = d.dept_id
|
left join sys_evaluation_record er on er.dept_id = d.dept_id
|
||||||
|
|
|
@ -69,13 +69,12 @@
|
||||||
select count(*) from sys_user where del_flag = '0' and user_id = #{userId}
|
select count(*) from sys_user where del_flag = '0' and user_id = #{userId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectStudentListByDeptIds" resultType="org.dromara.system.domain.SysUser">
|
<select id="selectUserListByDeptIds" resultType="org.dromara.system.domain.SysUser">
|
||||||
select u.*
|
select u.*
|
||||||
from sys_dept d
|
from sys_dept d
|
||||||
left join sys_user u on u.dept_id = d.dept_id
|
left join sys_user u on u.dept_id = d.dept_id
|
||||||
where u.user_type = 'app_user'
|
where u.del_flag = 0
|
||||||
and u.del_flag = 0
|
and find_in_set(d.dept_id, #{deptIds})
|
||||||
and find_in_set(d.dept_id, #{deptIds})
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="findUserByIds" resultType="org.dromara.system.domain.SysUser">
|
<select id="findUserByIds" resultType="org.dromara.system.domain.SysUser">
|
||||||
|
|
Loading…
Reference in New Issue