Commit 9e467ffa by huangtao

修复权限、签名问题

parent 6ec8d43e
package com.jmai.physic.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jmai.physic.dto.PhysicApplyCreateReq;
import com.jmai.physic.dto.PhysicApplyQueryReq;
import com.jmai.physic.dto.PhysicApplySignReq;
import com.jmai.physic.dto.PhysicWarehouseQueryReq;
import com.jmai.physic.entity.PhysicApply;
import com.jmai.physic.entity.PhysicWarehouse;
import com.jmai.physic.service.PhysicApplyService;
import com.jmai.physic.vo.PhysicApplyVO;
import com.jmai.physic.vo.PhysicWarehouseVO;
......@@ -65,4 +71,10 @@ public class PhysicApplyController extends AbstractService {
PhysicApplyVO physicApplyVO = physicApplyService.sign(physicApplySignReq);
return ResponseData.ok(physicApplyVO);
}
@PostMapping("/listPage")
@ApiOperation(value = "pc分页查询")
public IPage<PhysicApplyVO> listPage(@RequestBody PhysicApplyQueryReq req) {
return physicApplyService.listPage(req);
}
}
......@@ -2,10 +2,12 @@ package com.jmai.physic.controller;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jmai.physic.alihealth.AlihealthService;
import com.jmai.physic.dto.PhysicInfoDTO;
import com.jmai.physic.dto.PhysicWarehouseCreateReq;
import com.jmai.physic.dto.PhysicWarehouseSignReq;
import com.jmai.physic.dto.*;
import com.jmai.physic.entity.PhysicDestroy;
import com.jmai.physic.entity.PhysicWarehouse;
import com.jmai.physic.service.PhysicWarehouseService;
import com.jmai.physic.vo.PhysicAmpouleUseVO;
import com.jmai.physic.vo.PhysicLossVO;
......@@ -87,4 +89,10 @@ public class PhysicWarehouseController extends AbstractService {
return ResponseData.ok(physicLossVOS);
}
@PostMapping("/listPage")
@ApiOperation(value = "pc分页查询")
public IPage<PhysicWarehouseVO> listPage(@RequestBody PhysicWarehouseQueryReq req) {
return physicWarehouseService.listPage(req);
}
}
package com.jmai.physic.dto;
import com.jmai.sys.dto.PageReq;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class PhysicApplyQueryReq extends PageReq {
@ApiModelProperty("关键字")
private String keyword;
@ApiModelProperty(value = "状态")
private Integer status;
}
package com.jmai.physic.dto;
import com.jmai.sys.dto.PageReq;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class PhysicWarehouseQueryReq extends PageReq {
@ApiModelProperty("关键字")
private String keyword;
@ApiModelProperty(value = "状态")
private Integer status;
}
package com.jmai.physic.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jmai.physic.dto.PhysicApplyQueryReq;
import com.jmai.physic.entity.PhysicApply;
import com.jmai.physic.vo.PhysicApplyVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface PhysicApplyMapper extends BaseMapper<PhysicApply> {
IPage<PhysicApplyVO> selectApplyPage(IPage<PhysicApplyVO> page, @Param("req") PhysicApplyQueryReq req);
}
package com.jmai.physic.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jmai.physic.dto.PhysicCheckQueryReq;
import com.jmai.physic.dto.PhysicWarehouseQueryReq;
import com.jmai.physic.entity.PhysicDestroyCheck;
import com.jmai.physic.entity.PhysicWarehouse;
import com.jmai.physic.vo.PhysicLossVO;
import com.jmai.physic.vo.PhysicWarehouseVO;
import com.jmai.sys.entity.SysFile;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
......@@ -12,4 +19,6 @@ import java.util.List;
public interface PhysicWarehouseMapper extends BaseMapper<PhysicWarehouse> {
List<PhysicLossVO> selectLossPhysic();
IPage<PhysicWarehouseVO> selectWarehousePage(IPage<PhysicWarehouseVO> page, @Param("req") PhysicWarehouseQueryReq req);
}
package com.jmai.physic.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jmai.physic.dto.PhysicApplyCreateReq;
import com.jmai.physic.dto.PhysicApplyQueryReq;
import com.jmai.physic.dto.PhysicApplySignReq;
import com.jmai.physic.dto.PhysicWarehouseCreateReq;
import com.jmai.physic.entity.PhysicApply;
import com.jmai.physic.vo.PhysicApplyVO;
import com.jmai.physic.vo.PhysicWarehouseVO;
......@@ -21,4 +25,5 @@ public interface PhysicApplyService {
PhysicApplyVO sign(PhysicApplySignReq physicApplySignReq);
IPage<PhysicApplyVO> listPage(PhysicApplyQueryReq req);
}
package com.jmai.physic.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jmai.physic.dto.PhysicWarehouseCreateReq;
import com.jmai.physic.dto.PhysicWarehouseQueryReq;
import com.jmai.physic.dto.PhysicWarehouseSignReq;
import com.jmai.physic.entity.PhysicWarehouse;
import com.jmai.physic.vo.PhysicLossVO;
import com.jmai.physic.vo.PhysicWarehouseVO;
......@@ -20,4 +24,5 @@ public interface PhysicWarehouseService {
List<PhysicLossVO> analysis();
IPage<PhysicWarehouseVO> listPage(PhysicWarehouseQueryReq req);
}
......@@ -3,6 +3,8 @@ package com.jmai.physic.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jmai.api.exception.ServiceException;
import com.jmai.physic.cloudsign.CloudsignService;
import com.jmai.physic.dto.*;
......@@ -198,4 +200,12 @@ public class PhysicApplyServiceImpl extends AbstractService implements PhysicApp
return getInfo(physicApplySignReq.getPhysicApplyId());
}
@Override
public IPage<PhysicApplyVO> listPage(PhysicApplyQueryReq req) {
IPage<PhysicApplyVO> physicApplyVOIPage = physicApplyMapper.selectApplyPage(new Page<>(req.getPageNo(), req.getPageSize()), req);
return physicApplyVOIPage;
}
}
......@@ -3,13 +3,13 @@ package com.jmai.physic.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jmai.api.exception.ServiceException;
import com.jmai.physic.cloudsign.CloudsignService;
import com.jmai.physic.dto.BillDTO;
import com.jmai.physic.dto.PhysicWarehouseCreateReq;
import com.jmai.physic.dto.PhysicWarehouseSignReq;
import com.jmai.physic.dto.SignInfoDTO;
import com.jmai.physic.dto.*;
import com.jmai.physic.entity.PhysicAmpoule;
import com.jmai.physic.entity.PhysicDestroyCheck;
import com.jmai.physic.entity.PhysicWarehouse;
import com.jmai.physic.mapper.PhysicAmpouleMapper;
import com.jmai.physic.mapper.PhysicWarehouseMapper;
......@@ -192,4 +192,12 @@ public class PhysicWarehouseServiceImpl extends AbstractService implements Phys
}
return physicLossVOList;
}
@Override
public IPage<PhysicWarehouseVO> listPage(PhysicWarehouseQueryReq req) {
IPage<PhysicWarehouseVO> page = buildEmptyPage(req);
page= physicWarehouseMapper.selectWarehousePage(page, req);
return page;
}
}
......@@ -16,6 +16,12 @@ public class PhysicApplyVO {
@ApiModelProperty(value = "药品类型")
private String physicType;
@ApiModelProperty(value = "发药部门")
private String fyDeptName;
@ApiModelProperty(value = "领药部门")
private String lyDeptName;
private String physicSpec;
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jmai.physic.mapper.PhysicApplyMapper">
<select id="selectApplyPage" resultType="com.jmai.physic.vo.PhysicApplyVO">
select a.id as physicApplyId, a.*,
(select dept_name from sys_dept d where d.id = a.ly_dept_id) as lyDeptName
,(select dept_name from sys_dept d where d.id = a.fy_dept_id) as fyDeptName
from physic_apply a
where a.del_flag =0 and a.status=#{req.status}
<if test="req.keyword != null and req.keyword != ''">
AND (
a.physic_name LIKE CONCAT('%', #{req.keyword}, '%')
OR a.physic_spec LIKE CONCAT('%', #{req.keyword}, '%')
OR a.factory_name LIKE CONCAT('%', #{req.keyword}, '%')
)
</if>
</select>
</mapper>
......@@ -5,7 +5,7 @@
<select id="selectCheckPage" resultType="com.jmai.physic.entity.PhysicDestroyCheck">
select * from physic_destroy_check
where del_flag =0
where del_flag =0 and status=#{req.status}
<if test="req.keyword != null and req.keyword != ''">
AND (
apply_name LIKE CONCAT('%', #{req.keyword}, '%')
......@@ -13,8 +13,6 @@
OR apply_reason LIKE CONCAT('%', #{req.keyword}, '%')
)
</if>
<if test="req.status =!null">
and status =#{req.status}
</if>
</select>
</mapper>
......@@ -5,7 +5,7 @@
<select id="selectDestroyPage" resultType="com.jmai.physic.entity.PhysicDestroy">
select * from physic_destroy
where del_flag =0
where del_flag =0 and status=#{req.status}
<if test="req.keyword != null and req.keyword != ''">
AND (
sick_name LIKE CONCAT('%', #{req.keyword}, '%')
......@@ -13,8 +13,6 @@
OR surplus LIKE CONCAT('%', #{req.keyword}, '%')
)
</if>
<if test="req.status =!null">
and status =#{req.status}
</if>
</select>
</mapper>
......@@ -4,7 +4,7 @@
<select id="selectRecordPage" resultType="com.jmai.physic.entity.PhysicRecord">
select * from physic_record
where del_flag =0
where del_flag =0 and status=#{req.status}
<if test="req.keyword != null and req.keyword != ''">
AND (
physic_name LIKE CONCAT('%', #{req.keyword}, '%')
......@@ -18,10 +18,6 @@
)
</if>
<if test="req.status =!null">
and status =#{req.status}
</if>
</select>
</mapper>
......@@ -7,4 +7,17 @@
select (IFNULL(sum(physic_num),0)) as physicNum,physic_name as physicName,physic_spec as physicSpec from physic_warehouse
WHERE DATE(expire_date) &lt; CURDATE() and expire_date is not null group by physic_name,physic_spec,factory_name
</select>
<select id="selectWarehousePage" resultType="com.jmai.physic.vo.PhysicWarehouseVO">
select a.id as physicWarehouseId,a.*,b.dept_name as deptName from physic_warehouse a
left join sys_dept b on a.dept_id =b.id
where a.del_flag =0 and a.status=#{req.status}
<if test="req.keyword != null and req.keyword != ''">
AND (
a.physic_name LIKE CONCAT('%', #{req.keyword}, '%')
OR a.physic_spec LIKE CONCAT('%', #{req.keyword}, '%')
OR a.factory_name LIKE CONCAT('%', #{req.keyword}, '%')
)
</if>
</select>
</mapper>
This diff could not be displayed because it is too large.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment