Commit 42ee1364 by huangtao

bug修复、数据分析

parent dfd9ffd2
Showing with 752 additions and 74 deletions
...@@ -60,30 +60,8 @@ mysql-bak: ...@@ -60,30 +60,8 @@ mysql-bak:
username: infyos username: infyos
password: ENC(H8FPWox1IfsoidTOKPXSWwu5fBwO64UNWmD4vDUJQyo=) password: ENC(H8FPWox1IfsoidTOKPXSWwu5fBwO64UNWmD4vDUJQyo=)
# ################################################ cloudsign:
# 备份数据库 businessOrgCode: 455835303
# ################################################ businessSystemCode: 1176
#spring: businessSystemAppID: w6qpjDk1WBSrFCfgcj
# # 数据库
# datasource:
# # 多数据源
# dynamic:
# datasource:
# infy-bak:
# url: jdbc:mysql://${mysql-bak.address}/infybak?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&useCompression=true&compressionAlgorithms=zstd&allowMultiQueries=true
# username: ${mysql-bak.username}
# password: ${mysql-bak.password}
# driver-class-name: com.mysql.cj.jdbc.Driver
# type: com.zaxxer.hikari.HikariDataSource
# hikari:
# connection-timeout: 30000
# minimum-idle: 10
# maximum-pool-size: 40
# idle-timeout: 300000
# max-lifetime: 1800000
# auto-commit: true
# #################################################
# 数据备份
# #################################################
...@@ -2,6 +2,7 @@ package com.jmai.physic.alihealth; ...@@ -2,6 +2,7 @@ package com.jmai.physic.alihealth;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import com.jmai.api.exception.ServiceException;
import com.jmai.physic.dto.PhysicInfoDTO; import com.jmai.physic.dto.PhysicInfoDTO;
import com.taobao.api.ApiException; import com.taobao.api.ApiException;
import com.taobao.api.TaobaoClient; import com.taobao.api.TaobaoClient;
...@@ -22,7 +23,7 @@ public class AlihealthService { ...@@ -22,7 +23,7 @@ public class AlihealthService {
AlibabaAlihealthDrugtraceTopYljgQueryCodedetailRequest req = new AlibabaAlihealthDrugtraceTopYljgQueryCodedetailRequest(); AlibabaAlihealthDrugtraceTopYljgQueryCodedetailRequest req = new AlibabaAlihealthDrugtraceTopYljgQueryCodedetailRequest();
req.setRefEntId("0820965d6b7b40858d2018238ad491cc"); req.setRefEntId("0820965d6b7b40858d2018238ad491cc");
req.setCodes("84654490010782300850"); req.setCodes(code);
AlibabaAlihealthDrugtraceTopYljgQueryCodedetailResponse rsp = null; AlibabaAlihealthDrugtraceTopYljgQueryCodedetailResponse rsp = null;
try { try {
rsp = taobaoClient.execute(req); rsp = taobaoClient.execute(req);
...@@ -33,7 +34,9 @@ public class AlihealthService { ...@@ -33,7 +34,9 @@ public class AlihealthService {
AlibabaAlihealthDrugtraceTopYljgQueryCodedetailResponse.ResultModel result = rsp.getResult(); AlibabaAlihealthDrugtraceTopYljgQueryCodedetailResponse.ResultModel result = rsp.getResult();
// List<AlibabaAlihealthDrugtraceTopYljgQueryCodedetailResponse.CodeFullInfoDto> models = result.getModels(); // List<AlibabaAlihealthDrugtraceTopYljgQueryCodedetailResponse.CodeFullInfoDto> models = result.getModels();
List<AlibabaAlihealthDrugtraceTopYljgQueryCodedetailResponse.CodeFullInfoDto> models = result.getModels(); List<AlibabaAlihealthDrugtraceTopYljgQueryCodedetailResponse.CodeFullInfoDto> models = result.getModels();
if(ObjectUtil.isNotEmpty(models)){ if(ObjectUtil.isEmpty(models)) {
throw new ServiceException("药品信息不存在");
}
AlibabaAlihealthDrugtraceTopYljgQueryCodedetailResponse.CodeFullInfoDto codeFullInfoDto = models.get(0); AlibabaAlihealthDrugtraceTopYljgQueryCodedetailResponse.CodeFullInfoDto codeFullInfoDto = models.get(0);
AlibabaAlihealthDrugtraceTopYljgQueryCodedetailResponse.CodeProduceInfoDto codeProduceInfoDTO = codeFullInfoDto.getCodeProduceInfoDTO(); AlibabaAlihealthDrugtraceTopYljgQueryCodedetailResponse.CodeProduceInfoDto codeProduceInfoDTO = codeFullInfoDto.getCodeProduceInfoDTO();
List<AlibabaAlihealthDrugtraceTopYljgQueryCodedetailResponse.ProduceInfoDto> produceInfoList = codeProduceInfoDTO.getProduceInfoList(); List<AlibabaAlihealthDrugtraceTopYljgQueryCodedetailResponse.ProduceInfoDto> produceInfoList = codeProduceInfoDTO.getProduceInfoList();
...@@ -52,7 +55,7 @@ public class AlihealthService { ...@@ -52,7 +55,7 @@ public class AlihealthService {
//厂家信息 //厂家信息
AlibabaAlihealthDrugtraceTopYljgQueryCodedetailResponse.PUserEntDto pUserEntDto = codeFullInfoDto.getpUserEntDTO(); AlibabaAlihealthDrugtraceTopYljgQueryCodedetailResponse.PUserEntDto pUserEntDto = codeFullInfoDto.getpUserEntDTO();
physicInfoDTO.setFactoryName(pUserEntDto.getEntName()); physicInfoDTO.setFactoryName(pUserEntDto.getEntName());
}
return physicInfoDTO; return physicInfoDTO;
} }
......
...@@ -4,11 +4,14 @@ package com.jmai.physic.cloudsign; ...@@ -4,11 +4,14 @@ package com.jmai.physic.cloudsign;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.jmai.api.exception.ServiceException; import com.jmai.api.exception.ServiceException;
import com.jmai.physic.config.CloudSignProperties;
import com.jmai.sys.util.HttpUtils; import com.jmai.sys.util.HttpUtils;
import com.jmai.sys.util.OpenUtil; import com.jmai.sys.util.OpenUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import javax.annotation.Resource;
@Slf4j @Slf4j
@Component @Component
public class CloudsignService { public class CloudsignService {
...@@ -24,11 +27,21 @@ public class CloudsignService { ...@@ -24,11 +27,21 @@ public class CloudsignService {
private static final String getstamp =HOST+"/v1.0/cloudsign/getstamp"; private static final String getstamp =HOST+"/v1.0/cloudsign/getstamp";
@Resource
private CloudSignProperties cloudSignProperties;
/** /**
* PIN吗登录 * PIN吗登录
*/ */
public GenloginqrcodeRespon loginbypin(LoginBypinRequest request){ public GenloginqrcodeRespon loginbypin(LoginBypinRequest request){
request.setBusinessOrgCode(cloudSignProperties.getBusinessOrgCode());
request.setBusinessSystemCode(cloudSignProperties.getBusinessSystemCode());
request.setBusinessSystemAppID(cloudSignProperties.getBusinessSystemApplD());
request.setLoginType(1);
String logTip = "loginbypin"; String logTip = "loginbypin";
String json = OpenUtil.toJson(request); String json = OpenUtil.toJson(request);
try { try {
...@@ -48,6 +61,7 @@ public class CloudsignService { ...@@ -48,6 +61,7 @@ public class CloudsignService {
} }
/** /**
* 请求云签二维码 * 请求云签二维码
* @param request * @param request
...@@ -69,6 +83,23 @@ public class CloudsignService { ...@@ -69,6 +83,23 @@ public class CloudsignService {
} }
} }
public String sign(String encryptedToken,String relBizNo,String base64SourceData){
// SignDataRequest request = new SignDataRequest();
// request.setBusinessOrgCode(cloudSignProperties.getBusinessOrgCode());
// request.setBusinessSystemCode(cloudSignProperties.getBusinessSystemCode());
// request.setBusinessSystemAppID(cloudSignProperties.getBusinessSystemApplD());
// request.setBusinessTypeCode("007");
// request.setWithTsa(true);
// request.setEncryptedToken(encryptedToken);
// request.setBase64SourceData(base64SourceData);
// signdata(request);
// GetstampRequest getstampRequest = new GetstampRequest();
// getstampRequest.setRelBizNo(relBizNo);
// String getstamp = getstamp(getstampRequest);
return base64SourceData;
}
/** /**
* 云签证书数字签名 * 云签证书数字签名
* @param request * @param request
......
...@@ -4,7 +4,6 @@ import lombok.Data; ...@@ -4,7 +4,6 @@ import lombok.Data;
@Data @Data
public class GetstampRequest { public class GetstampRequest {
private String businessOrgCode;
private String relBizNo; private String relBizNo;
} }
...@@ -9,6 +9,6 @@ public class LoginBypinRequest { ...@@ -9,6 +9,6 @@ public class LoginBypinRequest {
private String businessSystemCode; private String businessSystemCode;
private String businessSystemAppID; private String businessSystemAppID;
private String relBizNo; private String relBizNo;
private Integer userEncodePin; private String userEncodePin;
private Integer loginType; private Integer loginType;
} }
...@@ -13,7 +13,7 @@ public class SignDataRequest { ...@@ -13,7 +13,7 @@ public class SignDataRequest {
private String patientId; private String patientId;
private String bizId; private String bizId;
private String base64SourceData; private String base64SourceData;
private String withTsa; private Boolean withTsa;
} }
package com.jmai.physic.config;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
@Data
@Component
@ConfigurationProperties(prefix = "cloudsign")
public class CloudSignProperties {
private String businessOrgCode;
private String businessSystemCode;
private String businessSystemApplD;
}
package com.jmai.physic.controller;
import com.jmai.physic.cloudsign.CloudsignService;
import com.jmai.physic.cloudsign.GenloginqrcodeRespon;
import com.jmai.physic.cloudsign.LoginBypinRequest;
import com.jmai.sys.dto.ResponseData;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
@Slf4j
@RestController
@RequestMapping("/cloudsign")
@Api(tags = "云签")
public class CloudSignController {
@Resource
private CloudsignService cloudsignService;
@PostMapping("/loginbypin")
@ApiOperation(value = "查询药品申请审核单")
public ResponseData<GenloginqrcodeRespon> loginbypin(@RequestBody LoginBypinRequest loginBypinRequest) {
GenloginqrcodeRespon loginbypin = cloudsignService.loginbypin(loginBypinRequest);
return ResponseData.ok(loginbypin);
}
}
...@@ -6,6 +6,7 @@ import com.jmai.physic.dto.PhysicAmpouleCreateReq; ...@@ -6,6 +6,7 @@ import com.jmai.physic.dto.PhysicAmpouleCreateReq;
import com.jmai.physic.dto.PhysicAmpouleQueryReq; import com.jmai.physic.dto.PhysicAmpouleQueryReq;
import com.jmai.physic.entity.PhysicAmpoule; import com.jmai.physic.entity.PhysicAmpoule;
import com.jmai.physic.service.PhysicAmpouleService; import com.jmai.physic.service.PhysicAmpouleService;
import com.jmai.physic.vo.PhysicAmpouleUseVO;
import com.jmai.sys.aop.Auth; import com.jmai.sys.aop.Auth;
import com.jmai.sys.dto.ResponseData; import com.jmai.sys.dto.ResponseData;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
...@@ -13,13 +14,12 @@ import io.swagger.annotations.ApiImplicitParam; ...@@ -13,13 +14,12 @@ import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.validation.Valid; import javax.validation.Valid;
import javax.xml.transform.Result;
import java.util.List;
@Slf4j @Slf4j
@Auth @Auth
...@@ -45,4 +45,12 @@ public class PhysicAmpouleController { ...@@ -45,4 +45,12 @@ public class PhysicAmpouleController {
return physicAmpouleService.listPage(req); return physicAmpouleService.listPage(req);
} }
@GetMapping("/analysis-data")
@ApiOperation(value = "使用占比分析")
public ResponseData<List<PhysicAmpouleUseVO>> analysis() {
List<PhysicAmpouleUseVO> physicAmpouleUseVOS =physicAmpouleService.analysis();
return ResponseData.ok(physicAmpouleUseVOS);
}
} }
...@@ -2,6 +2,7 @@ package com.jmai.physic.controller; ...@@ -2,6 +2,7 @@ package com.jmai.physic.controller;
import com.jmai.physic.dto.PhysicApplyCreateReq; import com.jmai.physic.dto.PhysicApplyCreateReq;
import com.jmai.physic.dto.PhysicApplySignReq;
import com.jmai.physic.service.PhysicApplyService; import com.jmai.physic.service.PhysicApplyService;
import com.jmai.physic.vo.PhysicApplyVO; import com.jmai.physic.vo.PhysicApplyVO;
import com.jmai.physic.vo.PhysicWarehouseVO; import com.jmai.physic.vo.PhysicWarehouseVO;
...@@ -34,10 +35,16 @@ public class PhysicApplyController extends AbstractService { ...@@ -34,10 +35,16 @@ public class PhysicApplyController extends AbstractService {
@PostMapping("/create") @PostMapping("/create")
@ApiOperation(value = "创建申请单据") @ApiOperation(value = "创建申请单据")
public ResponseData<PhysicApplyVO> createPhysicWarehouse(@RequestBody @Valid PhysicApplyCreateReq req) { public ResponseData<PhysicApplyVO> create(@RequestBody @Valid PhysicApplyCreateReq req) {
PhysicApplyVO physicApply = physicApplyService.createPhysicApply(req); PhysicApplyVO physicApply = physicApplyService.createPhysicApply(req);
return ResponseData.ok(physicApply); return ResponseData.ok(physicApply);
} }
@PostMapping("/update")
@ApiOperation(value = "更新申请单据")
public ResponseData<PhysicApplyVO> update(@RequestBody @Valid PhysicApplyCreateReq req) {
PhysicApplyVO physicApply = physicApplyService.update(req);
return ResponseData.ok(physicApply);
}
@PostMapping("/getInfo") @PostMapping("/getInfo")
@ApiOperation(value = "获取申请单据信息") @ApiOperation(value = "获取申请单据信息")
...@@ -54,8 +61,8 @@ public class PhysicApplyController extends AbstractService { ...@@ -54,8 +61,8 @@ public class PhysicApplyController extends AbstractService {
@PostMapping("/sign") @PostMapping("/sign")
@ApiOperation(value = "签名") @ApiOperation(value = "签名")
public ResponseData<PhysicWarehouseVO> sign(@RequestParam Long physicApplyId,@RequestParam String signName) { public ResponseData<PhysicApplyVO> sign(@RequestBody PhysicApplySignReq physicApplySignReq) {
physicApplyService.sign(physicApplyId,signName); PhysicApplyVO physicApplyVO = physicApplyService.sign(physicApplySignReq);
return ResponseData.ok(); return ResponseData.ok(physicApplyVO);
} }
} }
package com.jmai.physic.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jmai.physic.dto.*;
import com.jmai.physic.entity.PhysicBill;
import com.jmai.physic.entity.PhysicRecord;
import com.jmai.physic.mapper.PhysicBillMapper;
import com.jmai.physic.service.PhysicBillService;
import com.jmai.physic.vo.BillInfoVO;
import com.jmai.physic.vo.BillQueryVO;
import com.jmai.physic.vo.PhysicApplyVO;
import com.jmai.sys.aop.Auth;
import com.jmai.sys.dto.ResponseData;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.List;
@Slf4j
@Auth
@RestController
@RequestMapping("/physicBill")
@Api(tags = "专账")
@ApiImplicitParams({@ApiImplicitParam(paramType = "header", name = "Access-Token", value = "凭证", required = true, dataType = "string")})
public class PhysicBillController {
@Resource
private PhysicBillService physicBillService;
@GetMapping("/list")
@ApiOperation(value = "专账")
public ResponseData<List<BillInfoVO> > list(String physicName) {
List<BillInfoVO> billInfoVOS = physicBillService.listBill(physicName);
return ResponseData.ok(billInfoVOS);
}
@PostMapping("/listDetailPage")
@ApiOperation(value = "专账详情")
public Page<BillQueryVO> listPage(@RequestBody PhysicBillQueryReq req){
return physicBillService.listPage(req);
}
@PostMapping("/sign")
@ApiOperation(value = "签名")
public ResponseData<PhysicBill> sign(@RequestBody PhysicBillSignReq physicBillSignReq) {
PhysicBill bill = physicBillService.sign(physicBillSignReq);
return ResponseData.ok(bill);
}
}
...@@ -5,7 +5,10 @@ import cn.hutool.core.util.ObjectUtil; ...@@ -5,7 +5,10 @@ import cn.hutool.core.util.ObjectUtil;
import com.jmai.physic.alihealth.AlihealthService; import com.jmai.physic.alihealth.AlihealthService;
import com.jmai.physic.dto.PhysicInfoDTO; import com.jmai.physic.dto.PhysicInfoDTO;
import com.jmai.physic.dto.PhysicWarehouseCreateReq; import com.jmai.physic.dto.PhysicWarehouseCreateReq;
import com.jmai.physic.dto.PhysicWarehouseSignReq;
import com.jmai.physic.service.PhysicWarehouseService; import com.jmai.physic.service.PhysicWarehouseService;
import com.jmai.physic.vo.PhysicAmpouleUseVO;
import com.jmai.physic.vo.PhysicLossVO;
import com.jmai.physic.vo.PhysicWarehouseVO; import com.jmai.physic.vo.PhysicWarehouseVO;
import com.jmai.sys.AbstractService; import com.jmai.sys.AbstractService;
import com.jmai.sys.aop.Auth; import com.jmai.sys.aop.Auth;
...@@ -48,13 +51,15 @@ public class PhysicWarehouseController extends AbstractService { ...@@ -48,13 +51,15 @@ public class PhysicWarehouseController extends AbstractService {
PhysicWarehouseVO physicWarehouseVO = physicWarehouseService.createPhysicWarehouse(req); PhysicWarehouseVO physicWarehouseVO = physicWarehouseService.createPhysicWarehouse(req);
return ResponseData.ok(physicWarehouseVO); return ResponseData.ok(physicWarehouseVO);
} }
@PostMapping("/update") @PostMapping("/update")
@ApiOperation(value = "更新入库单据") @ApiOperation(value = "更新入库单据")
public ResponseData<PhysicWarehouseVO> updatePhysicWarehouse(@RequestBody @Valid PhysicWarehouseCreateReq req) { public ResponseData<PhysicWarehouseVO> updatePhysicWarehouse(@RequestBody @Valid PhysicWarehouseCreateReq req) {
PhysicWarehouseVO physicWarehouseVO = physicWarehouseService.createPhysicWarehouse(req); PhysicWarehouseVO physicWarehouseVO = physicWarehouseService.updatePhysicWarehouse(req);
return ResponseData.ok(physicWarehouseVO); return ResponseData.ok(physicWarehouseVO);
} }
@PostMapping("/getInfo") @PostMapping("/getInfo")
@ApiOperation(value = "获取入库单据信息") @ApiOperation(value = "获取入库单据信息")
public ResponseData<PhysicWarehouseVO> getInfo(@RequestParam Long physicWarehouseId) { public ResponseData<PhysicWarehouseVO> getInfo(@RequestParam Long physicWarehouseId) {
...@@ -64,9 +69,9 @@ public class PhysicWarehouseController extends AbstractService { ...@@ -64,9 +69,9 @@ public class PhysicWarehouseController extends AbstractService {
@PostMapping("/sign") @PostMapping("/sign")
@ApiOperation(value = "签名") @ApiOperation(value = "签名")
public ResponseData<PhysicWarehouseVO> sign(@RequestParam Long physicWarehouseId,@RequestParam String signName) { public ResponseData<PhysicWarehouseVO> sign(@RequestBody PhysicWarehouseSignReq physicWarehouseSignReq) {
physicWarehouseService.sign(physicWarehouseId,signName); PhysicWarehouseVO sign = physicWarehouseService.sign(physicWarehouseSignReq);
return ResponseData.ok(); return ResponseData.ok(sign);
} }
@PostMapping("/operationList") @PostMapping("/operationList")
@ApiOperation(value = "查询药品入库审核单") @ApiOperation(value = "查询药品入库审核单")
...@@ -74,4 +79,12 @@ public class PhysicWarehouseController extends AbstractService { ...@@ -74,4 +79,12 @@ public class PhysicWarehouseController extends AbstractService {
List<PhysicWarehouseVO> operationList= physicWarehouseService.operationList(); List<PhysicWarehouseVO> operationList= physicWarehouseService.operationList();
return ResponseData.ok(operationList); return ResponseData.ok(operationList);
} }
@GetMapping("/analysis-loss")
@ApiOperation(value = "损耗分析")
public ResponseData<List<PhysicLossVO>> analysis() {
List<PhysicLossVO> physicLossVOS =physicWarehouseService.analysis();
return ResponseData.ok(physicLossVOS);
}
} }
...@@ -11,6 +11,9 @@ public class BillDTO { ...@@ -11,6 +11,9 @@ public class BillDTO {
@ApiModelProperty(value = "药品类型") @ApiModelProperty(value = "药品类型")
private String physicSpec; private String physicSpec;
private Long deptId;
@ApiModelProperty(value = "失效时间") @ApiModelProperty(value = "失效时间")
private String expireDate; private String expireDate;
...@@ -20,6 +23,7 @@ public class BillDTO { ...@@ -20,6 +23,7 @@ public class BillDTO {
@ApiModelProperty(value = "数量") @ApiModelProperty(value = "数量")
private Integer physicNum; private Integer physicNum;
@ApiModelProperty(value = "1-入库 2-申请")
private Integer type; private Integer type;
@ApiModelProperty(value = "厂家名称") @ApiModelProperty(value = "厂家名称")
......
...@@ -9,19 +9,20 @@ import lombok.Data; ...@@ -9,19 +9,20 @@ import lombok.Data;
@Data @Data
@ApiModel(description = "药品申请信息") @ApiModel(description = "药品申请信息")
public class PhysicApplyCreateReq { public class PhysicApplyCreateReq {
private Long physicApplyId;
@ApiModelProperty(value = "药品名称") @ApiModelProperty(value = "药品名称")
private String physicName; private String physicName;
@ApiModelProperty(value = "药品类型") @ApiModelProperty(value = "药品类型")
private String physicType; private String physicType;
private String physicTypeDesc;
private String pkgSpecCrit; @ApiModelProperty(value = "药品规格")
private String physicSpec;
private String prepnSpec; private String unit;
private String prepnTypeDesc;
private Integer returnNum; private Integer returnNum;
......
package com.jmai.physic.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class PhysicApplySignReq {
@ApiModelProperty(value = "签名token")
private String encryptedToken;
@ApiModelProperty(value = "签名账号")
private String relBizNo;
@ApiModelProperty(value = "签名base64图片")
private String base64SourceData;
@ApiModelProperty(value = "药品申请id")
private Long physicApplyId;
}
package com.jmai.physic.dto;
import com.jmai.sys.dto.PageReq;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class PhysicBillQueryReq extends PageReq {
@ApiModelProperty(value = "药品名称")
private String physicName;
@ApiModelProperty(value = "规格")
private String physicSpec;
@ApiModelProperty(value = "厂家名称")
private String factoryName;
}
package com.jmai.physic.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class PhysicBillSignReq {
@ApiModelProperty(value = "签名token")
private String encryptedToken;
@ApiModelProperty(value = "签名账号")
private String relBizNo;
@ApiModelProperty(value = "签名base64图片")
private String base64SourceData;
@ApiModelProperty(value = "专账id")
private Long physicBillId;
}
...@@ -7,6 +7,8 @@ import javax.validation.constraints.NotBlank; ...@@ -7,6 +7,8 @@ import javax.validation.constraints.NotBlank;
@Data @Data
public class PhysicWarehouseCreateReq { public class PhysicWarehouseCreateReq {
private Long physicWarehouseId;
private String physicName; private String physicName;
@ApiModelProperty(value = "药品类型") @ApiModelProperty(value = "药品类型")
private String physicType; private String physicType;
......
package com.jmai.physic.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class PhysicWarehouseSignReq {
@ApiModelProperty(value = "签名token")
private String encryptedToken;
@ApiModelProperty(value = "签名账号")
private String relBizNo;
@ApiModelProperty(value = "签名base64图片")
private String base64SourceData;
@ApiModelProperty(value = "入库id")
private Long physicWarehouseId;
}
package com.jmai.physic.dto;
import cn.hutool.core.date.DatePattern;
import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import java.time.LocalDateTime;
@Data
public class SignInfoDTO {
private String signBase64Data;
@JSONField(format = DatePattern.NORM_DATETIME_PATTERN)
private LocalDateTime time;
private Long userId;
public SignInfoDTO(String signBase64Data, LocalDateTime time,Long userId) {
this.signBase64Data = signBase64Data;
this.time = time;
}
}
...@@ -25,6 +25,8 @@ public class PhysicAmpoule extends BaseVersionEntity { ...@@ -25,6 +25,8 @@ public class PhysicAmpoule extends BaseVersionEntity {
@ApiModelProperty(value = "批号") @ApiModelProperty(value = "批号")
private String batchNo; private String batchNo;
private String factoryName;
private String unit; private String unit;
private String physicType; private String physicType;
......
...@@ -16,13 +16,9 @@ public class PhysicApply extends BaseVersionEntity{ ...@@ -16,13 +16,9 @@ public class PhysicApply extends BaseVersionEntity{
@ApiModelProperty(value = "药品类型") @ApiModelProperty(value = "药品类型")
private String physicType; private String physicType;
private String physicTypeDesc; private String physicSpec;
private String pkgSpecCrit; private String unit;
private String prepnSpec;
private String prepnTypeDesc;
private Integer returnNum; private Integer returnNum;
...@@ -45,4 +41,10 @@ public class PhysicApply extends BaseVersionEntity{ ...@@ -45,4 +41,10 @@ public class PhysicApply extends BaseVersionEntity{
@ApiModelProperty(value = "状态 0 -待领药 1-待审核 2-待发药 3 -待复核 4 -完成") @ApiModelProperty(value = "状态 0 -待领药 1-待审核 2-待发药 3 -待复核 4 -完成")
private Integer status; private Integer status;
private String lyUser;
private String shUser;
private String fyUser;
private String fhUser;
} }
...@@ -11,6 +11,7 @@ import lombok.Data; ...@@ -11,6 +11,7 @@ import lombok.Data;
@TableName("physic_bill") @TableName("physic_bill")
public class PhysicBill extends BaseVersionEntity { public class PhysicBill extends BaseVersionEntity {
private Long deptId;
@ApiModelProperty(value = "药品名称") @ApiModelProperty(value = "药品名称")
private String physicName; private String physicName;
...@@ -20,6 +21,7 @@ public class PhysicBill extends BaseVersionEntity { ...@@ -20,6 +21,7 @@ public class PhysicBill extends BaseVersionEntity {
private String physicSpec; private String physicSpec;
private String unit; private String unit;
@ApiModelProperty(value = "批号") @ApiModelProperty(value = "批号")
...@@ -40,7 +42,7 @@ public class PhysicBill extends BaseVersionEntity { ...@@ -40,7 +42,7 @@ public class PhysicBill extends BaseVersionEntity {
private Integer expendNum; private Integer expendNum;
private Integer refId;
private Integer status; private Integer status;
......
...@@ -25,6 +25,8 @@ public class PhysicStorageAmpoule extends BaseVersionEntity { ...@@ -25,6 +25,8 @@ public class PhysicStorageAmpoule extends BaseVersionEntity {
@ApiModelProperty(value = "批号") @ApiModelProperty(value = "批号")
private String batchNo; private String batchNo;
private String factoryName;
private String unit; private String unit;
private String physicType; private String physicType;
......
...@@ -5,10 +5,22 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -5,10 +5,22 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jmai.physic.dto.PhysicAmpouleQueryReq; import com.jmai.physic.dto.PhysicAmpouleQueryReq;
import com.jmai.physic.entity.PhysicAmpoule; import com.jmai.physic.entity.PhysicAmpoule;
import com.jmai.physic.vo.PhysicAmpouleUseVO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper @Mapper
public interface PhysicAmpouleMapper extends BaseMapper<PhysicAmpoule> { public interface PhysicAmpouleMapper extends BaseMapper<PhysicAmpoule> {
Page<PhysicAmpoule> selectAmpoulePage(Page<PhysicAmpoule> page, @Param("req") PhysicAmpouleQueryReq req); Page<PhysicAmpoule> selectAmpoulePage(Page<PhysicAmpoule> page, @Param("req") PhysicAmpouleQueryReq req);
/**
* 获取空安瓿药品数量
* @return
*/
List<PhysicAmpouleUseVO> selectLastMonthPhysicSum();
List<PhysicAmpouleUseVO> selectUsePhysicSum();
} }
package com.jmai.physic.mapper; package com.jmai.physic.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jmai.physic.dto.PhysicBillQueryReq;
import com.jmai.physic.entity.PhysicBill; import com.jmai.physic.entity.PhysicBill;
import com.jmai.physic.vo.BillInfoVO;
import com.jmai.physic.vo.BillQueryVO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper @Mapper
public interface PhysicBillMapper extends BaseMapper<PhysicBill> { public interface PhysicBillMapper extends BaseMapper<PhysicBill> {
...@@ -12,4 +18,8 @@ public interface PhysicBillMapper extends BaseMapper<PhysicBill> { ...@@ -12,4 +18,8 @@ public interface PhysicBillMapper extends BaseMapper<PhysicBill> {
Integer selectSumByBatchNo(@Param("name") String name,@Param("spec") String spec,@Param("factoryName") String factoryName,@Param("batchNo") String batchNo ); Integer selectSumByBatchNo(@Param("name") String name,@Param("spec") String spec,@Param("factoryName") String factoryName,@Param("batchNo") String batchNo );
Integer selectSumByName(@Param("name") String name,@Param("spec") String spec,@Param("factoryName") String factoryName); Integer selectSumByName(@Param("name") String name,@Param("spec") String spec,@Param("factoryName") String factoryName);
List<BillInfoVO> selectByGroup(@Param("physicName") String physicName);
Page<BillQueryVO> selectBillPage(Page<BillQueryVO> page, @Param("req") PhysicBillQueryReq req);
} }
...@@ -10,6 +10,5 @@ import org.apache.ibatis.annotations.Param; ...@@ -10,6 +10,5 @@ import org.apache.ibatis.annotations.Param;
@Mapper @Mapper
public interface PhysicDestroyCheckMapper extends BaseMapper<PhysicDestroyCheck> { public interface PhysicDestroyCheckMapper extends BaseMapper<PhysicDestroyCheck> {
Page<PhysicDestroyCheck> selectCheckPage(Page<PhysicDestroyCheck> page, @Param("req") PhysicCheckQueryReq req) Page<PhysicDestroyCheck> selectCheckPage(Page<PhysicDestroyCheck> page, @Param("req") PhysicCheckQueryReq req);
;
} }
...@@ -2,9 +2,14 @@ package com.jmai.physic.mapper; ...@@ -2,9 +2,14 @@ package com.jmai.physic.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jmai.physic.entity.PhysicWarehouse; import com.jmai.physic.entity.PhysicWarehouse;
import com.jmai.physic.vo.PhysicLossVO;
import com.jmai.sys.entity.SysFile; import com.jmai.sys.entity.SysFile;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper @Mapper
public interface PhysicWarehouseMapper extends BaseMapper<PhysicWarehouse> { public interface PhysicWarehouseMapper extends BaseMapper<PhysicWarehouse> {
List<PhysicLossVO> selectLossPhysic();
} }
...@@ -4,9 +4,15 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -4,9 +4,15 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jmai.physic.dto.PhysicAmpouleCreateReq; import com.jmai.physic.dto.PhysicAmpouleCreateReq;
import com.jmai.physic.dto.PhysicAmpouleQueryReq; import com.jmai.physic.dto.PhysicAmpouleQueryReq;
import com.jmai.physic.entity.PhysicAmpoule; import com.jmai.physic.entity.PhysicAmpoule;
import com.jmai.physic.vo.PhysicAmpouleUseVO;
import java.util.List;
public interface PhysicAmpouleService { public interface PhysicAmpouleService {
void create(PhysicAmpouleCreateReq req); void create(PhysicAmpouleCreateReq req);
Page<PhysicAmpoule> listPage(PhysicAmpouleQueryReq req); Page<PhysicAmpoule> listPage(PhysicAmpouleQueryReq req);
List<PhysicAmpouleUseVO> analysis();
} }
package com.jmai.physic.service; package com.jmai.physic.service;
import com.jmai.physic.dto.PhysicApplyCreateReq; import com.jmai.physic.dto.PhysicApplyCreateReq;
import com.jmai.physic.dto.PhysicApplySignReq;
import com.jmai.physic.dto.PhysicWarehouseCreateReq; import com.jmai.physic.dto.PhysicWarehouseCreateReq;
import com.jmai.physic.vo.PhysicApplyVO; import com.jmai.physic.vo.PhysicApplyVO;
import com.jmai.physic.vo.PhysicWarehouseVO; import com.jmai.physic.vo.PhysicWarehouseVO;
...@@ -11,9 +12,13 @@ public interface PhysicApplyService { ...@@ -11,9 +12,13 @@ public interface PhysicApplyService {
PhysicApplyVO createPhysicApply(PhysicApplyCreateReq req); PhysicApplyVO createPhysicApply(PhysicApplyCreateReq req);
PhysicApplyVO update(PhysicApplyCreateReq req);
PhysicApplyVO getInfo(Long physicApplyId); PhysicApplyVO getInfo(Long physicApplyId);
List<PhysicApplyVO> operationList(); List<PhysicApplyVO> operationList();
void sign(Long physicApplyId, String signName); PhysicApplyVO sign(PhysicApplySignReq physicApplySignReq);
} }
package com.jmai.physic.service; package com.jmai.physic.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jmai.physic.dto.BillDTO; import com.jmai.physic.dto.BillDTO;
import com.jmai.physic.dto.PhysicBillQueryReq;
import com.jmai.physic.dto.PhysicBillSignReq;
import com.jmai.physic.entity.PhysicBill;
import com.jmai.physic.vo.BillInfoVO;
import com.jmai.physic.vo.BillQueryVO;
import java.util.List;
public interface PhysicBillService { public interface PhysicBillService {
void createBill(BillDTO billDTO); void createBill(BillDTO billDTO);
List<BillInfoVO> listBill(String physicName);
Page<BillQueryVO> listPage(PhysicBillQueryReq req);
PhysicBill sign(PhysicBillSignReq physicBillSignReq);
} }
package com.jmai.physic.service; package com.jmai.physic.service;
import com.jmai.physic.dto.PhysicWarehouseCreateReq; import com.jmai.physic.dto.PhysicWarehouseCreateReq;
import com.jmai.physic.dto.PhysicWarehouseSignReq;
import com.jmai.physic.vo.PhysicLossVO;
import com.jmai.physic.vo.PhysicWarehouseVO; import com.jmai.physic.vo.PhysicWarehouseVO;
import java.util.List; import java.util.List;
...@@ -10,8 +12,12 @@ public interface PhysicWarehouseService { ...@@ -10,8 +12,12 @@ public interface PhysicWarehouseService {
PhysicWarehouseVO getInfo(Long physicWarehouseId); PhysicWarehouseVO getInfo(Long physicWarehouseId);
void sign(Long physicWarehouseId, String signName); PhysicWarehouseVO sign(PhysicWarehouseSignReq physicWarehouseSignReq);
List<PhysicWarehouseVO> operationList(); List<PhysicWarehouseVO> operationList();
PhysicWarehouseVO updatePhysicWarehouse(PhysicWarehouseCreateReq req);
List<PhysicLossVO> analysis();
} }
...@@ -9,11 +9,15 @@ import com.jmai.physic.entity.PhysicAmpoule; ...@@ -9,11 +9,15 @@ import com.jmai.physic.entity.PhysicAmpoule;
import com.jmai.physic.entity.PhysicStorageAmpoule; import com.jmai.physic.entity.PhysicStorageAmpoule;
import com.jmai.physic.mapper.PhysicAmpouleMapper; import com.jmai.physic.mapper.PhysicAmpouleMapper;
import com.jmai.physic.service.PhysicAmpouleService; import com.jmai.physic.service.PhysicAmpouleService;
import com.jmai.physic.vo.PhysicAmpouleUseVO;
import com.jmai.sys.AbstractService; import com.jmai.sys.AbstractService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.List;
@Service @Service
public class PhysicAmpouleServiceImpl extends AbstractService implements PhysicAmpouleService { public class PhysicAmpouleServiceImpl extends AbstractService implements PhysicAmpouleService {
...@@ -36,9 +40,7 @@ public class PhysicAmpouleServiceImpl extends AbstractService implements PhysicA ...@@ -36,9 +40,7 @@ public class PhysicAmpouleServiceImpl extends AbstractService implements PhysicA
ampoule.setPhysicType(physic.getPhysicType()); ampoule.setPhysicType(physic.getPhysicType());
physicAmpouleMapper.insert(ampoule); physicAmpouleMapper.insert(ampoule);
} }
} }
@Override @Override
public Page<PhysicAmpoule> listPage(PhysicAmpouleQueryReq req) { public Page<PhysicAmpoule> listPage(PhysicAmpouleQueryReq req) {
...@@ -46,4 +48,20 @@ public class PhysicAmpouleServiceImpl extends AbstractService implements PhysicA ...@@ -46,4 +48,20 @@ public class PhysicAmpouleServiceImpl extends AbstractService implements PhysicA
Page<PhysicAmpoule> ampoulePage= physicAmpouleMapper.selectAmpoulePage(page, req); Page<PhysicAmpoule> ampoulePage= physicAmpouleMapper.selectAmpoulePage(page, req);
return ampoulePage; return ampoulePage;
} }
@Override
public List<PhysicAmpouleUseVO> analysis() {
List<PhysicAmpouleUseVO> physicAmpouleUseVOS= physicAmpouleMapper.selectLastMonthPhysicSum();
long count = physicAmpouleUseVOS.stream().mapToInt(PhysicAmpouleUseVO::getPhysicNum).count();
for (PhysicAmpouleUseVO physicAmpouleUseVO : physicAmpouleUseVOS) {
physicAmpouleUseVO.setRate(getRate(new BigDecimal(physicAmpouleUseVO.getPhysicNum()),new BigDecimal(count)));
}
return physicAmpouleUseVOS;
}
private String getRate(BigDecimal num1,BigDecimal num2){
return num1.divide(num2, 4, RoundingMode.HALF_UP)
.multiply(new BigDecimal(100))
.setScale(2, RoundingMode.HALF_UP)+"%";
}
} }
package com.jmai.physic.service.impl; package com.jmai.physic.service.impl;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.jmai.physic.dto.PhysicApplyCreateReq; import com.jmai.physic.cloudsign.CloudsignService;
import com.jmai.physic.dto.PhysicWarehouseCreateReq; import com.jmai.physic.dto.*;
import com.jmai.physic.entity.PhysicApply; import com.jmai.physic.entity.PhysicApply;
import com.jmai.physic.entity.PhysicWarehouse; import com.jmai.physic.entity.PhysicWarehouse;
import com.jmai.physic.mapper.PhysicApplyMapper; import com.jmai.physic.mapper.PhysicApplyMapper;
import com.jmai.physic.mapper.PhysicWarehouseMapper; import com.jmai.physic.mapper.PhysicWarehouseMapper;
import com.jmai.physic.service.PhysicApplyService; import com.jmai.physic.service.PhysicApplyService;
import com.jmai.physic.service.PhysicBillService;
import com.jmai.physic.service.PhysicWarehouseService; import com.jmai.physic.service.PhysicWarehouseService;
import com.jmai.physic.vo.PhysicApplyVO; import com.jmai.physic.vo.PhysicApplyVO;
import com.jmai.physic.vo.PhysicWarehouseVO; import com.jmai.physic.vo.PhysicWarehouseVO;
...@@ -23,7 +25,9 @@ import org.springframework.stereotype.Service; ...@@ -23,7 +25,9 @@ import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -38,7 +42,11 @@ public class PhysicApplyServiceImpl extends AbstractService implements PhysicApp ...@@ -38,7 +42,11 @@ public class PhysicApplyServiceImpl extends AbstractService implements PhysicApp
@Resource @Resource
private SysDeptMapper sysDeptMapper; private SysDeptMapper sysDeptMapper;
@Resource
private CloudsignService cloudsignService;
@Resource
private PhysicBillService physicBillService;
@Override @Override
...@@ -51,6 +59,7 @@ public class PhysicApplyServiceImpl extends AbstractService implements PhysicApp ...@@ -51,6 +59,7 @@ public class PhysicApplyServiceImpl extends AbstractService implements PhysicApp
Long deptId = sysUser.getDeptId(); Long deptId = sysUser.getDeptId();
SysDept sysDept = sysDeptMapper.selectById(deptId); SysDept sysDept = sysDeptMapper.selectById(deptId);
apply.setLyDeptId(deptId); apply.setLyDeptId(deptId);
apply.setFyDeptId(sysDept.getParentId()); apply.setFyDeptId(sysDept.getParentId());
apply.setStatus(0); apply.setStatus(0);
physicApplyMapper.insert(apply); physicApplyMapper.insert(apply);
...@@ -59,6 +68,17 @@ public class PhysicApplyServiceImpl extends AbstractService implements PhysicApp ...@@ -59,6 +68,17 @@ public class PhysicApplyServiceImpl extends AbstractService implements PhysicApp
} }
@Override @Override
public PhysicApplyVO update(PhysicApplyCreateReq req) {
PhysicApply apply =new PhysicApply();
BeanUtil.copyProperties(req,apply);
apply.setId(req.getPhysicApplyId());
physicApplyMapper.updateById(apply);
PhysicApplyVO info = getInfo(apply.getId());
return info;
}
@Override
public PhysicApplyVO getInfo(Long physicApplyId) { public PhysicApplyVO getInfo(Long physicApplyId) {
PhysicApply apply = physicApplyMapper.selectById(physicApplyId); PhysicApply apply = physicApplyMapper.selectById(physicApplyId);
...@@ -115,23 +135,46 @@ public class PhysicApplyServiceImpl extends AbstractService implements PhysicApp ...@@ -115,23 +135,46 @@ public class PhysicApplyServiceImpl extends AbstractService implements PhysicApp
return physicApplyList.stream().map(o->{ return physicApplyList.stream().map(o->{
PhysicApplyVO vo =new PhysicApplyVO(); PhysicApplyVO vo =new PhysicApplyVO();
BeanUtil.copyProperties(o,vo); BeanUtil.copyProperties(o,vo);
vo.setPhysicApplyId(o.getId());
return vo; return vo;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
} }
@Override @Override
public void sign(Long physicApplyId, String signName) { public PhysicApplyVO sign(PhysicApplySignReq physicApplySignReq) {
PhysicApply physicApply = physicApplyMapper.selectById(physicApplyId); Boolean f =false;
Long userId = SpringContextUtils.getUserId();
String getstamp = cloudsignService.sign(physicApplySignReq.getEncryptedToken(), physicApplySignReq.getRelBizNo(), physicApplySignReq.getBase64SourceData());
PhysicApply physicApply = physicApplyMapper.selectById(physicApplySignReq.getPhysicApplyId());
if(physicApply.getStatus().equals(0)){ if(physicApply.getStatus().equals(0)){
physicApply.setStatus(1); physicApply.setStatus(1);
SignInfoDTO signInfoDTO = new SignInfoDTO(getstamp, LocalDateTime.now(),userId);
physicApply.setLyUser(JSONUtil.toJsonStr(signInfoDTO));
}else if(physicApply.getStatus().equals(1)){ }else if(physicApply.getStatus().equals(1)){
physicApply.setStatus(2); physicApply.setStatus(2);
SignInfoDTO signInfoDTO = new SignInfoDTO(getstamp, LocalDateTime.now(),userId);;
physicApply.setShUser(JSONUtil.toJsonStr(signInfoDTO));
}else if(physicApply.getStatus().equals(2)){ }else if(physicApply.getStatus().equals(2)){
physicApply.setStatus(3); physicApply.setStatus(3);
SignInfoDTO signInfoDTO = new SignInfoDTO(getstamp, LocalDateTime.now(),userId);;
physicApply.setFyUser(JSONUtil.toJsonStr(signInfoDTO));
} }
else if(physicApply.getStatus().equals(3)){ else if(physicApply.getStatus().equals(3)){
physicApply.setStatus(4); physicApply.setStatus(4);
SignInfoDTO signInfoDTO = new SignInfoDTO(getstamp, LocalDateTime.now(),userId);;
physicApply.setFhUser(JSONUtil.toJsonStr(signInfoDTO));
f = true;
} }
physicApplyMapper.updateById(physicApply); physicApplyMapper.updateById(physicApply);
if(f){
BillDTO billDTO = new BillDTO();
BeanUtil.copyProperties(physicApply,billDTO);
billDTO.setType(2);
billDTO.setDeptId(physicApply.getLyDeptId());
physicBillService.createBill(billDTO);
}
return getInfo(physicApplySignReq.getPhysicApplyId());
} }
} }
package com.jmai.physic.service.impl; package com.jmai.physic.service.impl;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jmai.physic.cloudsign.CloudsignService;
import com.jmai.physic.dto.BillDTO; import com.jmai.physic.dto.BillDTO;
import com.jmai.physic.dto.PhysicBillQueryReq;
import com.jmai.physic.dto.PhysicBillSignReq;
import com.jmai.physic.dto.SignInfoDTO;
import com.jmai.physic.entity.PhysicBill; import com.jmai.physic.entity.PhysicBill;
import com.jmai.physic.entity.PhysicDestroyCheck;
import com.jmai.physic.entity.PhysicWarehouse;
import com.jmai.physic.mapper.PhysicBillMapper; import com.jmai.physic.mapper.PhysicBillMapper;
import com.jmai.physic.service.PhysicBillService; import com.jmai.physic.service.PhysicBillService;
import com.jmai.physic.vo.BillInfoVO;
import com.jmai.physic.vo.BillQueryVO;
import com.jmai.sys.AbstractService; import com.jmai.sys.AbstractService;
import com.jmai.sys.ctx.SpringContextUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.List;
@Service @Service
public class PhysicBillServiceImpl extends AbstractService implements PhysicBillService { public class PhysicBillServiceImpl extends AbstractService implements PhysicBillService {
...@@ -16,6 +29,9 @@ public class PhysicBillServiceImpl extends AbstractService implements PhysicBill ...@@ -16,6 +29,9 @@ public class PhysicBillServiceImpl extends AbstractService implements PhysicBill
@Resource @Resource
private PhysicBillMapper physicBillMapper; private PhysicBillMapper physicBillMapper;
@Resource
private CloudsignService cloudsignService;
@Override @Override
public void createBill(BillDTO billDTO) { public void createBill(BillDTO billDTO) {
...@@ -37,4 +53,38 @@ public class PhysicBillServiceImpl extends AbstractService implements PhysicBill ...@@ -37,4 +53,38 @@ public class PhysicBillServiceImpl extends AbstractService implements PhysicBill
physicBillMapper.insert(bill); physicBillMapper.insert(bill);
} }
@Override
public List<BillInfoVO> listBill(String physicName) {
List<BillInfoVO> billInfoVOS = physicBillMapper.selectByGroup(physicName);
return billInfoVOS;
}
@Override
public Page<BillQueryVO> listPage(PhysicBillQueryReq req) {
Page<BillQueryVO> page = buildEmptyPage(req);
Page<BillQueryVO> billInfoVOPage = physicBillMapper.selectBillPage(page, req);
return billInfoVOPage;
}
@Override
public PhysicBill sign(PhysicBillSignReq physicBillSignReq) {
Boolean f = false;
Long userId = SpringContextUtils.getUserId();
String getstamp = cloudsignService.sign(physicBillSignReq.getEncryptedToken(), physicBillSignReq.getRelBizNo(), physicBillSignReq.getBase64SourceData());
PhysicBill bill = physicBillMapper.selectById(physicBillSignReq.getPhysicBillId());
if(bill.getStatus().equals(0)){
bill.setStatus(1);
SignInfoDTO signInfoDTO = new SignInfoDTO(getstamp, LocalDateTime.now(),userId);
bill.setYsUser(JSONUtil.toJsonStr(signInfoDTO));
}else if(bill.getStatus().equals(1)) {
bill.setStatus(2);
SignInfoDTO signInfoDTO = new SignInfoDTO(getstamp, LocalDateTime.now(), userId);
;
bill.setShUser(JSONUtil.toJsonStr(signInfoDTO));
}
physicBillMapper.updateById(bill);
return bill;
}
} }
package com.jmai.physic.service.impl; package com.jmai.physic.service.impl;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.jmai.physic.cloudsign.CloudsignService;
import com.jmai.physic.dto.BillDTO;
import com.jmai.physic.dto.PhysicWarehouseCreateReq; import com.jmai.physic.dto.PhysicWarehouseCreateReq;
import com.jmai.physic.dto.PhysicWarehouseSignReq;
import com.jmai.physic.dto.SignInfoDTO;
import com.jmai.physic.entity.PhysicAmpoule;
import com.jmai.physic.entity.PhysicWarehouse; import com.jmai.physic.entity.PhysicWarehouse;
import com.jmai.physic.mapper.PhysicAmpouleMapper;
import com.jmai.physic.mapper.PhysicWarehouseMapper; import com.jmai.physic.mapper.PhysicWarehouseMapper;
import com.jmai.physic.service.PhysicBillService;
import com.jmai.physic.service.PhysicWarehouseService; import com.jmai.physic.service.PhysicWarehouseService;
import com.jmai.physic.vo.PhysicAmpouleUseVO;
import com.jmai.physic.vo.PhysicLossVO;
import com.jmai.physic.vo.PhysicWarehouseVO; import com.jmai.physic.vo.PhysicWarehouseVO;
import com.jmai.sys.AbstractService; import com.jmai.sys.AbstractService;
import com.jmai.sys.consts.enums.RoleTypeEum; import com.jmai.sys.consts.enums.RoleTypeEum;
...@@ -16,8 +26,12 @@ import org.springframework.stereotype.Service; ...@@ -16,8 +26,12 @@ import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Comparator;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@Service @Service
...@@ -29,6 +43,15 @@ public class PhysicWarehouseServiceImpl extends AbstractService implements Phys ...@@ -29,6 +43,15 @@ public class PhysicWarehouseServiceImpl extends AbstractService implements Phys
@Resource @Resource
private SysUserMapper sysUserMapper; private SysUserMapper sysUserMapper;
@Resource
private CloudsignService cloudsignService;
@Resource
private PhysicBillService physicBillService;
@Resource
private PhysicAmpouleMapper physicAmpouleMapper;
@Override @Override
public PhysicWarehouseVO createPhysicWarehouse(PhysicWarehouseCreateReq req) { public PhysicWarehouseVO createPhysicWarehouse(PhysicWarehouseCreateReq req) {
PhysicWarehouse physicWarehouse = new PhysicWarehouse(); PhysicWarehouse physicWarehouse = new PhysicWarehouse();
...@@ -52,16 +75,35 @@ public class PhysicWarehouseServiceImpl extends AbstractService implements Phys ...@@ -52,16 +75,35 @@ public class PhysicWarehouseServiceImpl extends AbstractService implements Phys
} }
@Override @Override
public void sign(Long physicWarehouseId, String signName) { public PhysicWarehouseVO sign(PhysicWarehouseSignReq physicWarehouseSignReq) {
PhysicWarehouse physicWarehouse = physicWarehouseMapper.selectById(physicWarehouseId); Boolean f = false;
Long userId = SpringContextUtils.getUserId();
String getstamp = cloudsignService.sign(physicWarehouseSignReq.getEncryptedToken(), physicWarehouseSignReq.getRelBizNo(), physicWarehouseSignReq.getBase64SourceData());
PhysicWarehouse physicWarehouse = physicWarehouseMapper.selectById(physicWarehouseSignReq.getPhysicWarehouseId());
if(physicWarehouse.getStatus().equals(0)){ if(physicWarehouse.getStatus().equals(0)){
physicWarehouse.setStatus(1); physicWarehouse.setStatus(1);
SignInfoDTO signInfoDTO = new SignInfoDTO(getstamp, LocalDateTime.now(),userId);
physicWarehouse.setYsUser(JSONUtil.toJsonStr(signInfoDTO));
}else if(physicWarehouse.getStatus().equals(1)){ }else if(physicWarehouse.getStatus().equals(1)){
physicWarehouse.setStatus(2); physicWarehouse.setStatus(2);
SignInfoDTO signInfoDTO = new SignInfoDTO(getstamp, LocalDateTime.now(),userId);;
physicWarehouse.setYsUser(JSONUtil.toJsonStr(signInfoDTO));
}else if(physicWarehouse.getStatus().equals(2)){ }else if(physicWarehouse.getStatus().equals(2)){
physicWarehouse.setStatus(3); physicWarehouse.setStatus(3);
SignInfoDTO signInfoDTO = new SignInfoDTO(getstamp, LocalDateTime.now(),userId);;
physicWarehouse.setBgUser(JSONUtil.toJsonStr(signInfoDTO));
}
if(f){
BillDTO billDTO = new BillDTO();
BeanUtil.copyProperties(physicWarehouse,billDTO);
billDTO.setType(1);
billDTO.setDeptId(physicWarehouse.getDeptId());
physicBillService.createBill(billDTO);
} }
physicWarehouseMapper.updateById(physicWarehouse); physicWarehouseMapper.updateById(physicWarehouse);
return getInfo(physicWarehouseSignReq.getPhysicWarehouseId());
} }
@Override @Override
...@@ -92,7 +134,49 @@ public class PhysicWarehouseServiceImpl extends AbstractService implements Phys ...@@ -92,7 +134,49 @@ public class PhysicWarehouseServiceImpl extends AbstractService implements Phys
return physicWarehouses.stream().map(o->{ return physicWarehouses.stream().map(o->{
PhysicWarehouseVO vo =new PhysicWarehouseVO(); PhysicWarehouseVO vo =new PhysicWarehouseVO();
BeanUtil.copyProperties(o,vo); BeanUtil.copyProperties(o,vo);
vo.setPhysicWarehouseId(o.getId());
return vo; return vo;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
} }
@Override
public PhysicWarehouseVO updatePhysicWarehouse(PhysicWarehouseCreateReq req) {
PhysicWarehouse physicWarehouse = new PhysicWarehouse();
BeanUtil.copyProperties(req,physicWarehouse);
physicWarehouse.setStatus(0);
physicWarehouse.setId(physicWarehouse.getId());
physicWarehouseMapper.updateById(physicWarehouse);
PhysicWarehouseVO info = getInfo(physicWarehouse.getId());
return info;
}
@Override
public List<PhysicLossVO> analysis() {
List<PhysicLossVO> physicLossVOS = physicWarehouseMapper.selectLossPhysic();
List<PhysicAmpouleUseVO> physicAmpouleUseVOS = physicAmpouleMapper.selectUsePhysicSum();
Map<String, PhysicAmpouleUseVO> physicAmpouleUseVOMap = physicAmpouleUseVOS.stream().collect(Collectors.toMap(PhysicAmpouleUseVO::getKey, Function.identity(), (a, b) -> a));
for (PhysicLossVO physicLossVO : physicLossVOS) {
PhysicAmpouleUseVO physicAmpouleUseVO = physicAmpouleUseVOMap.get(physicLossVO.getPhysicNum());
if(physicAmpouleUseVO!=null){
physicLossVO.setPhysicNum(physicLossVO.getPhysicNum()-physicAmpouleUseVO.getPhysicNum());
}
}
physicLossVOS.sort(Comparator.comparing(PhysicLossVO::getPhysicNum));
List<PhysicLossVO> physicLossVOList = new ArrayList<>();
for (int i = 0; i < physicLossVOS.size(); i++) {
physicLossVOList.add(physicLossVOS.get(i));
if(i>8){
break;
}
}
return physicLossVOList;
}
} }
package com.jmai.physic.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class BillInfoVO {
@ApiModelProperty(value = "药品名称")
private String physicName;
@ApiModelProperty(value = "规格")
private String physicSpec;
@ApiModelProperty(value = "厂家名称")
private String factoryName;
}
package com.jmai.physic.vo;
import com.jmai.physic.entity.PhysicBill;
import lombok.Data;
@Data
public class BillQueryVO extends PhysicBill {
private String deptName;
}
package com.jmai.physic.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Optional;
@Data
public class PhysicAmpouleUseVO {
private String physicName;
private String physicSpec;
private Integer physicNum;
private String rate;
private String factoryName;
public String getKey(){
return Optional.ofNullable(getPhysicName()).orElse("") + ":"
+ Optional.ofNullable(getPhysicSpec()).orElse("") + ":"
+ Optional.ofNullable(getFactoryName()).orElse("");
}
}
...@@ -3,6 +3,8 @@ package com.jmai.physic.vo; ...@@ -3,6 +3,8 @@ package com.jmai.physic.vo;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.time.LocalDateTime;
@Data @Data
public class PhysicApplyVO { public class PhysicApplyVO {
...@@ -14,13 +16,11 @@ public class PhysicApplyVO { ...@@ -14,13 +16,11 @@ public class PhysicApplyVO {
@ApiModelProperty(value = "药品类型") @ApiModelProperty(value = "药品类型")
private String physicType; private String physicType;
private String physicTypeDesc;
private String pkgSpecCrit; private String physicSpec;
private String prepnSpec; private String unit;
private String prepnTypeDesc;
private Integer returnNum; private Integer returnNum;
...@@ -35,4 +35,10 @@ public class PhysicApplyVO { ...@@ -35,4 +35,10 @@ public class PhysicApplyVO {
@ApiModelProperty(value = "状态 0 -待领药 1-待审核 2 -待发药 3 -待复核 4 -完成") @ApiModelProperty(value = "状态 0 -待领药 1-待审核 2 -待发药 3 -待复核 4 -完成")
private Integer status; private Integer status;
private String fyUser;
private String fhUser;
private String lyUser;
private String shUser;
private LocalDateTime createTime;
} }
package com.jmai.physic.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Optional;
@Data
public class PhysicLossVO {
@ApiModelProperty(value = "药品名称")
private String physicName;
private String physicSpec;
private Integer physicNum;
private String factoryName;
public String getKey(){
return Optional.ofNullable(getPhysicName()).orElse("") + ":"
+ Optional.ofNullable(getPhysicSpec()).orElse("") + ":"
+ Optional.ofNullable(getFactoryName()).orElse("");
}
}
...@@ -3,6 +3,9 @@ package com.jmai.physic.vo; ...@@ -3,6 +3,9 @@ package com.jmai.physic.vo;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.time.LocalDateTime;
import java.util.Date;
@Data @Data
public class PhysicWarehouseVO { public class PhysicWarehouseVO {
...@@ -17,6 +20,9 @@ public class PhysicWarehouseVO { ...@@ -17,6 +20,9 @@ public class PhysicWarehouseVO {
private String unit; private String unit;
@ApiModelProperty(value = "收货数量")
private Integer physicNum;
@ApiModelProperty(value = "失效时间") @ApiModelProperty(value = "失效时间")
private String expireDate; private String expireDate;
...@@ -34,4 +40,13 @@ public class PhysicWarehouseVO { ...@@ -34,4 +40,13 @@ public class PhysicWarehouseVO {
private String supplyName; private String supplyName;
@ApiModelProperty(value = "状态 1 -待核验 2 -待复核 3 -已完成") @ApiModelProperty(value = "状态 1 -待核验 2 -待复核 3 -已完成")
private Integer status; private Integer status;
private LocalDateTime createTime;
private String ysUser;
private String fhUser;
private String bgUser;
} }
...@@ -18,4 +18,17 @@ ...@@ -18,4 +18,17 @@
</if> </if>
order by create_time desc order by create_time desc
</select> </select>
<select id="selectLastMonthPhysicSum" resultType="com.jmai.physic.vo.PhysicAmpouleUseVO">
select (IFNULL(sum(physic_num),0)) as physicNum,physic_name as physicName,physic_spec as physicSpec,factory_name as factoryName
from physic_ampoule
where
DATE_FORMAT(create_time, '%Y-%m') = DATE_FORMAT(DATE_SUB(CURDATE(), INTERVAL 1 MONTH), '%Y-%m')
group by physic_name,physic_spec,factory_name limit 10
</select>
<select id="selectUsePhysicSum" resultType="com.jmai.physic.vo.PhysicAmpouleUseVO">
select (IFNULL(sum(physic_num),0)) as physicNum,physic_name as physicName,physic_spec as physicSpec,factory_name as factoryName
from physic_ampoule
group by physic_name,physic_spec,factory_name
</select>
</mapper> </mapper>
...@@ -10,4 +10,13 @@ ...@@ -10,4 +10,13 @@
<select id="selectSumByName" resultType="java.lang.Integer"> <select id="selectSumByName" resultType="java.lang.Integer">
select (IFNULL(sum(expend_num),0) - IFNULL(sum(acquire_num),0)) from physic_bill where physic_name=#{name} and physic_spec=#{spec} and factory_name =#{factoryName} select (IFNULL(sum(expend_num),0) - IFNULL(sum(acquire_num),0)) from physic_bill where physic_name=#{name} and physic_spec=#{spec} and factory_name =#{factoryName}
</select> </select>
<select id="selectByGroup" resultType="com.jmai.physic.vo.BillInfoVO">
select physic_name,physic_spec,factory_name from physic_bill where physic_name =#{physicName} group by physic_name,physic_spec,factory_name
</select>
<select id="selectBillPage" resultType="com.jmai.physic.vo.BillQueryVO">
select *,b.dept_name from physic_bill a left join sys_dept b on a.dept_id =b.id where a.physic_name =#{req.physicName} and
a.physic_spec =#{req.physicSpec} and a.factory_name =#{req.factoryName} order by a.create_time desc
</select>
</mapper> </mapper>
<?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.PhysicWarehouseMapper">
<select id="selectLossPhysic" resultType="com.jmai.physic.vo.PhysicLossVO">
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>
</mapper>
...@@ -23,8 +23,8 @@ public enum RoleTypeEum { ...@@ -23,8 +23,8 @@ public enum RoleTypeEum {
ZGYZ(16,"主管院长"); ZGYZ(16,"主管院长");
private long code; public long code;
private String msg; public String msg;
RoleTypeEum(long code, String msg) { RoleTypeEum(long code, String msg) {
this.code = code; this.code = code;
......
...@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.jmai.sys.aop.Auth; import com.jmai.sys.aop.Auth;
import com.jmai.sys.aop.AuthSkipped; import com.jmai.sys.aop.AuthSkipped;
import com.jmai.sys.consts.HeaderCode; import com.jmai.sys.consts.HeaderCode;
import com.jmai.sys.consts.enums.RoleTypeEum;
import com.jmai.sys.ctx.SpringContextUtils; import com.jmai.sys.ctx.SpringContextUtils;
import com.jmai.sys.dto.*; import com.jmai.sys.dto.*;
import com.jmai.sys.service.UserService; import com.jmai.sys.service.UserService;
...@@ -97,4 +98,12 @@ public class UserController { ...@@ -97,4 +98,12 @@ public class UserController {
UserTokenDto dto = userService.refreshUserToken(req.getRefreshToken()); UserTokenDto dto = userService.refreshUserToken(req.getRefreshToken());
return ResponseData.ok(dto); return ResponseData.ok(dto);
} }
@PostMapping("/getRoles")
@ApiOperation(value = "获取所有角色", notes = "获取所有角色")
public ResponseData< List<RoleTypeDTO>> getRoles() {
List<RoleTypeDTO> roles = userService.getRoles();
return ResponseData.ok(roles);
}
} }
package com.jmai.sys.dto;
import lombok.Data;
@Data
public class RoleTypeDTO {
private Long id;
private String name;
}
...@@ -59,4 +59,6 @@ public interface UserService { ...@@ -59,4 +59,6 @@ public interface UserService {
List<UserTypeDto> listUserTypes(); List<UserTypeDto> listUserTypes();
List<RoleTypeDTO> getRoles();
} }
...@@ -15,6 +15,7 @@ import com.jmai.api.consts.enums.StatusEnum; ...@@ -15,6 +15,7 @@ import com.jmai.api.consts.enums.StatusEnum;
import com.jmai.api.exception.ServiceException; import com.jmai.api.exception.ServiceException;
import com.jmai.sys.AbstractService; import com.jmai.sys.AbstractService;
import com.jmai.sys.aop.UserAllowed; import com.jmai.sys.aop.UserAllowed;
import com.jmai.sys.consts.enums.RoleTypeEum;
import com.jmai.sys.consts.enums.UserTypeEnum; import com.jmai.sys.consts.enums.UserTypeEnum;
import com.jmai.sys.ctx.SpringContextUtils; import com.jmai.sys.ctx.SpringContextUtils;
import com.jmai.sys.dto.*; import com.jmai.sys.dto.*;
...@@ -375,7 +376,7 @@ public class UserServiceImpl extends AbstractService implements UserService { ...@@ -375,7 +376,7 @@ public class UserServiceImpl extends AbstractService implements UserService {
} }
if (!CollectionUtil.disjunction(req.getRoleAsList(), user.getRoleAsList()).isEmpty()) { if (!CollectionUtil.disjunction(req.getRoleAsList(), user.getRoleAsList()).isEmpty()) {
user.setAuthDeptList(Optional.ofNullable(req.getAuthDeptList()).orElse("")); user.setRoleList(Optional.ofNullable(req.getRoleList()).orElse(""));
updated = true; updated = true;
} }
...@@ -715,4 +716,16 @@ public class UserServiceImpl extends AbstractService implements UserService { ...@@ -715,4 +716,16 @@ public class UserServiceImpl extends AbstractService implements UserService {
}) })
.collect(Collectors.toList()); .collect(Collectors.toList());
} }
@Override
public List<RoleTypeDTO> getRoles() {
List<RoleTypeDTO> roleTypeDTOS = new ArrayList<>();
for (RoleTypeEum roleTypeEum : RoleTypeEum.values()) {
RoleTypeDTO roleTypeDTO = new RoleTypeDTO();
roleTypeDTO.setId(roleTypeEum.getCode());
roleTypeDTO.setName(roleTypeEum.getMsg());
roleTypeDTOS.add(roleTypeDTO);
}
return roleTypeDTOS;
}
} }
This diff could not be displayed because it is too large.
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