大屏展示实时接口,日报月报上传等

master
anthonywj 1 year ago
parent 3ebc40c306
commit 8a09319b45

@ -14,21 +14,24 @@ import com.glxp.api.entity.sup.UserCompanyEntity;
import com.glxp.api.req.auth.FilterUserComapanyRequest;
import com.glxp.api.req.auth.UserRegisterFilterRequest;
import com.glxp.api.req.replicate.FilterReplicateRequest;
import com.glxp.api.req.stat.StatAdverseRequest;
import com.glxp.api.req.stat.StatCityCorpRequest;
import com.glxp.api.req.stat.StatCorpInvRequest;
import com.glxp.api.req.stat.StatWarnMessageRequest;
import com.glxp.api.req.stat.*;
import com.glxp.api.req.trace.TraceTaskDetailRequest;
import com.glxp.api.res.PageSimpleResponse;
import com.glxp.api.res.auth.registComPerResponse;
import com.glxp.api.res.stat.NmapTotalResponse;
import com.glxp.api.res.sup.UserCompanyOnlineResponse;
import com.glxp.api.res.sup.UserCompanyResponse;
import com.glxp.api.res.trace.TraceTaskDlResponse;
import com.glxp.api.service.basic.BasicCorpService;
import com.glxp.api.service.basic.BasicUdiRelService;
import com.glxp.api.service.stat.*;
import com.glxp.api.service.sup.UserCompanyOnlineService;
import com.glxp.api.service.sup.UserCompanyService;
import com.glxp.api.service.sup.UserRegisterService;
import com.glxp.api.service.trace.TraceProductDetailService;
import com.glxp.api.service.trace.TraceTaskService;
import com.glxp.api.util.DateUtil;
import com.glxp.api.util.IntUtil;
import com.glxp.api.util.page.ListPageRequest;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.BindingResult;
@ -266,8 +269,6 @@ public class BigVisController extends BaseController {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
List<StatCorpInvEntity> selectlist = statCorpInvService.filterList(statCorpInvRequest);
PageInfo<StatCorpInvEntity> pageInfo;
pageInfo = new PageInfo<>(selectlist);
PageSimpleResponse<StatCorpInvEntity> pageSimpleResponse = new PageSimpleResponse<>();
@ -337,4 +338,85 @@ public class BigVisController extends BaseController {
return ResultVOUtils.success(pageSimpleResponse);
}
//*****************现场检查*********************************
@Resource
BasicUdiRelService basicUdiRelService;
@Resource
BasicCorpService basicCorpService;
@Resource
private UserRegisterService userRegisterService;
@Resource
TraceProductDetailService traceProductDetailService;
@ApiOperation(value = "获取单位检查情况", response = registComPerResponse.class)
@PostMapping("/admin/auth/online/check/list")
public BaseResponse selectReslist(@RequestBody UserRegisterFilterRequest userRegisterFilterRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
List<registComPerResponse> selectlist = userRegisterService.selectlist(userRegisterFilterRequest);
for (registComPerResponse response : selectlist) {
StatOnlineRequest statOnlineRequest = new StatOnlineRequest();
statOnlineRequest.setTraceSource(2);
statOnlineRequest.setCompanyId(response.getCompanyId());
NmapTotalResponse nmapTotalResponse = traceProductDetailService.statOnlineCount(statOnlineRequest);
response.setProductCount(IntUtil.value(nmapTotalResponse.getProductCount()) + "");
response.setTagCodeCount(IntUtil.value(nmapTotalResponse.getTagCount()));
response.setUnTagCodeCount(IntUtil.value(nmapTotalResponse.getUnTagCount()));
response.setQixieCount(IntUtil.value(nmapTotalResponse.getQxCount()));
response.setShijiCount(IntUtil.value(nmapTotalResponse.getSjCount()));
response.setImportCount(IntUtil.value(nmapTotalResponse.getImportCount()));
response.setUnImportCount(IntUtil.value(nmapTotalResponse.getUnImportCount()));
response.setMipCount(IntUtil.value(nmapTotalResponse.getChsCount()));
response.setUnMipCount(IntUtil.value(nmapTotalResponse.getUnChsCount()));
NmapTotalResponse corp = basicCorpService.statCompanyCorpCount(response.getCompanyId() + "");
response.setCusCount(corp.getCustomCount());
response.setSupCount(corp.getSupCount());
}
PageInfo<registComPerResponse> pageInfo;
pageInfo = new PageInfo<>(selectlist);
PageSimpleResponse<registComPerResponse> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(selectlist);
return ResultVOUtils.success(pageSimpleResponse);
}
/**
*
*/
@GetMapping("udi/basic/online/check/stat")
public BaseResponse statOnlineCheck() {
StatOnlineRequest statOnlineRequest = new StatOnlineRequest();
statOnlineRequest.setTraceSource(2);
NmapTotalResponse nmapTotalResponse = traceProductDetailService.statOnlineCount(statOnlineRequest);
return ResultVOUtils.success(nmapTotalResponse);
}
@Resource
IoStatMonthService statMonthService;
/**
*
*/
@ApiOperation(value = "获取异常信息列表", response = registComPerResponse.class)
@GetMapping("bigVis/month/stat/list")
public BaseResponse monthStatList(StatAdverseRequest statAdverseRequest) {
List<IoStatMonthEntity> selectlist = statMonthService.filterList(statAdverseRequest);
PageInfo<IoStatMonthEntity> pageInfo;
pageInfo = new PageInfo<>(selectlist);
PageSimpleResponse<IoStatMonthEntity> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(selectlist);
return ResultVOUtils.success(pageSimpleResponse);
}
}

@ -259,7 +259,9 @@ public class UserRegisterController extends BaseController {
response.setUnImportCount(IntUtil.value(nmapTotalResponse.getUnImportCount()));
response.setMipCount(IntUtil.value(nmapTotalResponse.getChsCount()));
response.setUnMipCount(IntUtil.value(nmapTotalResponse.getUnChsCount()));
response.setPurNormal(nmapTotalResponse.getPurNormal());
response.setPurPre(nmapTotalResponse.getPurPre());
response.setPurPreIn(nmapTotalResponse.getPurPreIn());
NmapTotalResponse corp = basicCorpService.statCompanyCorpCount(response.getCompanyId() + "");
response.setCusCount(corp.getCustomCount());
response.setSupCount(corp.getSupCount());

@ -131,7 +131,7 @@ public class UdiTraceController extends BaseController {
}
//3.查询产品信息
basicUdiRelResponse = basicUdiRelService.findByProductNameCode(udiEntity.getUdi());
basicUdiRelResponse = basicUdiRelService.findByProductNameCode(udiEntity.getUdi(), traceRecordRequest.getCompanyId() != null ? traceRecordRequest.getCompanyId() + "" : null);
if (basicUdiRelResponse == null) {
return ResultVOUtils.error(500, "未查询到产品信息");
}
@ -240,7 +240,7 @@ public class UdiTraceController extends BaseController {
}
//3.查询产品信息
basicUdiRelResponse = basicUdiRelService.findByProductNameCode(udiEntity.getUdi());
basicUdiRelResponse = basicUdiRelService.findByProductNameCode(udiEntity.getUdi(), traceRecordRequest.getCompanyId() != null ? traceRecordRequest.getCompanyId() + "" : null);
if (basicUdiRelResponse == null) {
return ResultVOUtils.error(500, "未查询到产品信息");
}

@ -2,6 +2,7 @@ package com.glxp.api.dao.stat;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.glxp.api.entity.stat.IoStatMonthEntity;
import com.glxp.api.req.stat.StatAdverseRequest;
import com.glxp.api.req.stat.StatCorpInvRequest;
import com.glxp.api.res.basic.BasicUdiRelResponse;
import org.apache.ibatis.annotations.Mapper;
@ -13,4 +14,7 @@ public interface IoStatMonthMapper extends BaseMapper<IoStatMonthEntity> {
List<BasicUdiRelResponse> statCompanyCount(StatCorpInvRequest statCorpInvRequest);
List<IoStatMonthEntity> filterList(StatAdverseRequest statAdverseRequest);
}

@ -2,8 +2,13 @@ package com.glxp.api.dao.trace;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.glxp.api.entity.trace.TraceProductDetailEntity;
import com.glxp.api.req.stat.StatOnlineRequest;
import com.glxp.api.res.basic.BasicUdiRelResponse;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface TraceRecordDetailMapper extends BaseMapper<TraceProductDetailEntity> {
List<BasicUdiRelResponse> statOnlineCount(StatOnlineRequest statOnlineRequest);
}

@ -179,5 +179,11 @@ public class IoStatMonthEntity implements Serializable {
@TableField(exist = false)
private String deptName;
@TableField(value = "zczbhhzbapzbh")
private String zczbhhzbapzbh;
@TableField(value = "ylqxzcrbarmc")
private String ylqxzcrbarmc;
private static final long serialVersionUID = 1L;
}

@ -4,8 +4,10 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@ -40,6 +42,9 @@ public class StatWarnMessageEntity implements Serializable {
@TableField(value = "warnMsg")
private String warnMsg;
@TableField(value = "zczbhhzbapzbh")
private String zczbhhzbapzbh;
private static final long serialVersionUID = 1L;
}

@ -0,0 +1,11 @@
package com.glxp.api.req.stat;
import lombok.Data;
@Data
public class StatOnlineRequest {
private Long companyId;
private Long bussinessStatus;
private Integer traceSource;
}

@ -338,5 +338,6 @@ public class BasicUdiRelResponse {
* 123
*/
private Integer purchaseType;
private Integer bussinessStatus;
}

@ -114,4 +114,9 @@ public class NmapTotalResponse {
*/
private int levelthreeTagCount;
private int manuProductCount;
private int supProudctCount;
private int hospProductCount;
}

@ -0,0 +1,121 @@
package com.glxp.api.res.stat;
import lombok.Data;
@Data
public class OnlineTotalResponse {
/**
*
*/
private int qxCount;
/**
*
*/
private int sjCount;
/**
*
*/
private int productCount;
/**
*
*/
private int levelOneCount;
/**
*
*/
private int levelTwoCount;
/**
*
*/
private int levelthreeCount;
/**
*
*/
private int groupBuyCount;
/**
*
*/
private int unGroupCount;
/**
*
*/
private int chsCount;
/**
*
*/
private int unChsCount;
/**
*
*/
private int importCount;
/**
*
*/
private int unImportCount;
/**
*
*/
private int tagCount;
/**
*
*/
private int unTagCount;
/**
*
*/
private int supCount;
/**
*
*/
private int customCount;
/**
*
*/
private int purNormal;
/**
*
*/
private int purPreIn;
/**
*
*/
private int purPre;
/**
*
*/
private int levelOneTagCount;
/**
*
*/
private int levelTwoTagCount;
/**
*
*/
private int levelthreeTagCount;
private int manuProductCount;
private int supProudctCount;
private int hospProductCount;
}

@ -83,11 +83,12 @@ public class BasicUdiRelService extends ServiceImpl<BasicUdiRelMapper, BasicUdiR
}
public BasicUdiRelResponse findByProductNameCode(String namCode) {
public BasicUdiRelResponse findByProductNameCode(String namCode, String companyIdFk) {
if (StrUtil.isEmpty(namCode))
return null;
FilterUdiRelRequest filterUdiRelRequest = new FilterUdiRelRequest();
filterUdiRelRequest.setNameCode(namCode);
filterUdiRelRequest.setCompanyIdFk(companyIdFk);
List<BasicUdiRelResponse> udiRelResponses = basicUdiRelMapper.filterList(filterUdiRelRequest);
if (CollUtil.isNotEmpty(udiRelResponses))
return udiRelResponses.get(0);
@ -104,7 +105,7 @@ public class BasicUdiRelService extends ServiceImpl<BasicUdiRelMapper, BasicUdiR
public List<String> findDiListByProduct(FilterUdiRelRequest filterUdiRelRequest) {
if (StrUtil.isNotEmpty(filterUdiRelRequest.getNameCode())) {
BasicUdiRelResponse basicUdiRelResponse = findByProductNameCode(filterUdiRelRequest.getNameCode());
BasicUdiRelResponse basicUdiRelResponse = findByProductNameCode(filterUdiRelRequest.getNameCode(), filterUdiRelRequest.getCompanyIdFk());
return basicUdiRelMapper.findDiList(basicUdiRelResponse.getUuid());
} else {
return basicUdiRelMapper.findDiListByProduct(filterUdiRelRequest);
@ -161,6 +162,15 @@ public class BasicUdiRelService extends ServiceImpl<BasicUdiRelMapper, BasicUdiR
nmapTotalResponse.setUnTagCount(IntUtil.value(nmapTotalResponse.getUnTagCount()) + 1);
}
//统计进口数量
if (IntUtil.value(item.getImportType()) == 1) {
nmapTotalResponse.setImportCount(IntUtil.value(nmapTotalResponse.getImportCount()) + 1);
}
//统计非进口数量
if (IntUtil.value(item.getImportType()) == 2) {
nmapTotalResponse.setUnImportCount(IntUtil.value(nmapTotalResponse.getUnImportCount()) + 1);
}
//器械类数量
if (StrUtil.isNotEmpty(item.getCplx()) && item.getCplx().equals("器械")) {
@ -300,6 +310,14 @@ public class BasicUdiRelService extends ServiceImpl<BasicUdiRelMapper, BasicUdiR
nmapTotalResponse.setUnTagCount(IntUtil.value(nmapTotalResponse.getUnTagCount()) + 1);
}
//统计进口数量
if (IntUtil.value(item.getImportType()) == 1) {
nmapTotalResponse.setImportCount(IntUtil.value(nmapTotalResponse.getImportCount()) + 1);
}
//统计非进口数量
if (IntUtil.value(item.getImportType()) == 2) {
nmapTotalResponse.setUnImportCount(IntUtil.value(nmapTotalResponse.getUnImportCount()) + 1);
}
//器械类数量
if (StrUtil.isNotEmpty(item.getCplx()) && item.getCplx().equals("器械")) {

@ -1,6 +1,10 @@
package com.glxp.api.service.stat;
import cn.hutool.core.util.StrUtil;
import com.github.pagehelper.PageHelper;
import com.glxp.api.dao.stat.StatAdverseEventsMapper;
import com.glxp.api.entity.stat.StatAdverseEventsEntity;
import com.glxp.api.req.stat.StatAdverseRequest;
import com.glxp.api.req.stat.StatCorpInvRequest;
import com.glxp.api.res.basic.BasicUdiRelResponse;
import com.glxp.api.res.stat.InvStatTotalResponse;
@ -11,6 +15,7 @@ import com.glxp.api.dao.stat.IoStatMonthMapper;
import com.glxp.api.entity.stat.IoStatMonthEntity;
import javax.annotation.Resource;
import java.util.Collections;
import java.util.List;
@Service
@ -19,7 +24,7 @@ public class IoStatMonthService extends ServiceImpl<IoStatMonthMapper, IoStatMon
@Resource
IoStatMonthMapper statMonthMapper;
InvStatTotalResponse statCompanyCount(StatCorpInvRequest statCorpInvRequest) {
public InvStatTotalResponse statCompanyCount(StatCorpInvRequest statCorpInvRequest) {
List<BasicUdiRelResponse> basicUdiRelResponses = statMonthMapper.statCompanyCount(statCorpInvRequest);
InvStatTotalResponse nmapTotalResponse = new InvStatTotalResponse();
for (BasicUdiRelResponse item : basicUdiRelResponses) {
@ -86,4 +91,15 @@ public class IoStatMonthService extends ServiceImpl<IoStatMonthMapper, IoStatMon
return nmapTotalResponse;
}
public List<IoStatMonthEntity> filterList(StatAdverseRequest statAdverseRequest) {
if (statAdverseRequest == null) {
return Collections.emptyList();
}
int offset = (statAdverseRequest.getPage() - 1) * statAdverseRequest.getLimit();
PageHelper.offsetPage(offset, statAdverseRequest.getLimit());
return statMonthMapper.filterList(statAdverseRequest);
}
}

@ -1,7 +1,12 @@
package com.glxp.api.service.trace;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.glxp.api.req.stat.StatOnlineRequest;
import com.glxp.api.res.basic.BasicUdiRelResponse;
import com.glxp.api.res.stat.NmapTotalResponse;
import com.glxp.api.util.IntUtil;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.glxp.api.dao.trace.TraceRecordDetailMapper;
@ -39,4 +44,91 @@ public class TraceProductDetailService extends ServiceImpl<TraceRecordDetailMapp
else return null;
}
public NmapTotalResponse statOnlineCount(StatOnlineRequest statOnlineRequest) {
List<BasicUdiRelResponse> basicUdiRelResponses = traceRecordDetailMapper.statOnlineCount(statOnlineRequest);
NmapTotalResponse nmapTotalResponse = new NmapTotalResponse();
if (CollUtil.isNotEmpty(basicUdiRelResponses)) {
nmapTotalResponse.setProductCount(basicUdiRelResponses.size());
for (BasicUdiRelResponse item : basicUdiRelResponses) {
if (item != null) {
//统计一类医疗器械数量
if (StrUtil.isNotEmpty(item.getCategoryLevel()) && item.getCategoryLevel().equals("一类")) {
nmapTotalResponse.setLevelOneCount(IntUtil.value(nmapTotalResponse.getLevelOneCount()) + 1);
}
//统计二类医疗器械数量
if (StrUtil.isNotEmpty(item.getCategoryLevel()) && item.getCategoryLevel().equals("二类")) {
nmapTotalResponse.setLevelTwoCount(IntUtil.value(nmapTotalResponse.getLevelTwoCount()) + 1);
}
//统计三类医疗器械数量
if (StrUtil.isNotEmpty(item.getCategoryLevel()) && item.getCategoryLevel().equals("三类")) {
nmapTotalResponse.setLevelthreeCount(IntUtil.value(nmapTotalResponse.getLevelthreeCount()) + 1);
}
//统计集采数量
if (IntUtil.value(item.getGroupBuy()) == 1) {
nmapTotalResponse.setGroupBuyCount(IntUtil.value(nmapTotalResponse.getGroupBuyCount()) + 1);
}
//统计非集采数量
if (IntUtil.value(item.getGroupBuy()) == 2) {
nmapTotalResponse.setUnGroupCount(IntUtil.value(nmapTotalResponse.getUnGroupCount()) + 1);
}
//统计医保数量
if (IntUtil.value(item.getChsType()) == 1) {
nmapTotalResponse.setChsCount(IntUtil.value(nmapTotalResponse.getChsCount()) + 1);
}
//统计非医保数量
if (IntUtil.value(item.getChsType()) == 2) {
nmapTotalResponse.setUnChsCount(IntUtil.value(nmapTotalResponse.getUnChsCount()) + 1);
}
//统计赋码数量
if (StrUtil.isNotEmpty(item.getNameCode())) {
nmapTotalResponse.setTagCount(IntUtil.value(nmapTotalResponse.getTagCount()) + 1);
} else {
nmapTotalResponse.setUnTagCount(IntUtil.value(nmapTotalResponse.getUnTagCount()) + 1);
}
//统计进口数量
if (IntUtil.value(item.getImportType()) == 1) {
nmapTotalResponse.setImportCount(IntUtil.value(nmapTotalResponse.getImportCount()) + 1);
}
//统计非进口数量
if (IntUtil.value(item.getImportType()) == 2) {
nmapTotalResponse.setUnImportCount(IntUtil.value(nmapTotalResponse.getUnImportCount()) + 1);
}
//器械类数量
if (StrUtil.isNotEmpty(item.getCplx()) && item.getCplx().equals("器械")) {
nmapTotalResponse.setQxCount(IntUtil.value(nmapTotalResponse.getQxCount()) + 1);
} else {
nmapTotalResponse.setSjCount(IntUtil.value(nmapTotalResponse.getSjCount()) + 1);
}
//采购方式
if (IntUtil.value(item.getPurchaseType()) == 1) {
nmapTotalResponse.setPurNormal(IntUtil.value(nmapTotalResponse.getPurNormal()) + 1);
}
if (IntUtil.value(item.getPurchaseType()) == 2) {
nmapTotalResponse.setPurPreIn(IntUtil.value(nmapTotalResponse.getPurPreIn()) + 1);
}
if (IntUtil.value(item.getPurchaseType()) == 3) {
nmapTotalResponse.setPurPre(IntUtil.value(nmapTotalResponse.getPurPre()) + 1);
}
if (IntUtil.value(item.getBussinessStatus()) == 1) {
nmapTotalResponse.setManuProductCount(nmapTotalResponse.getManuProductCount() + 1);
}
if (IntUtil.value(item.getBussinessStatus()) == 2) {
nmapTotalResponse.setSupProudctCount(nmapTotalResponse.getSupProudctCount() + 1);
}
if (IntUtil.value(item.getBussinessStatus()) == 3) {
nmapTotalResponse.setHospProductCount(nmapTotalResponse.getHospProductCount() + 1);
}
}
}
}
return nmapTotalResponse;
}
}

@ -312,12 +312,12 @@
</select>
<select id="statBusTypeCount" parameterType="java.lang.String"
<select id="statBusTypeCount" parameterType="java.lang.Integer"
resultType="com.glxp.api.res.basic.BasicUdiRelResponse">
select cplx, categoryLevel, groupBuy, chsType, importType, nameCode
FROM basic_udi_rel bur
left JOIN basic_udi_product p on bur.uuid = p.uuid
left join user_company uc on bur.companyIdFk = uc.id
where bur.companyIdFk = #{companyIdFk}
where uc.bussinessStatus = #{bussinessStatus}
</select>
</mapper>

@ -56,4 +56,10 @@
</where>
group by bur.uuid
</select>
<select id="filterList"
resultType="com.glxp.api.entity.stat.IoStatMonthEntity">
SELECT *
FROM io_stat_month
</select>
</mapper>

@ -1,4 +1,22 @@
<?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.glxp.api.dao.trace.TraceRecordDetailMapper">
<select id="statOnlineCount" parameterType="com.glxp.api.req.stat.StatOnlineRequest"
resultType="com.glxp.api.res.basic.BasicUdiRelResponse">
select p.cplx, p.categoryLevel, p.groupBuy, p.chsType, p.importType, p.nameCode,uc.bussinessStatus
from trace_product_record tpr
INNER JOIN basic_udi_product p on tpr.nameCode = p.nameCode
left join user_company uc on tpr.companyIdFk = uc.id
<where>
<if test="companyId != '' and companyId != null">
AND tpr.companyIdFk = #{companyId}
</if>
<if test="bussinessStatus != '' and bussinessStatus != null">
AND uc.bussinessStatus = #{bussinessStatus}
</if>
<if test="traceSource != null">
AND tpr.traceSource = #{traceSource}
</if>
</where>
</select>
</mapper>

Loading…
Cancel
Save