|
|
@@ -79,6 +79,7 @@ import javax.annotation.Resource;
|
|
|
import javax.annotation.Resources;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.math.RoundingMode;
|
|
|
+import java.sql.Struct;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
@@ -3805,7 +3806,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
return resultMap;
|
|
|
}
|
|
|
/**
|
|
|
- * @description: 效验 中药处方权限
|
|
|
+ * @description: 效验 中药处方权限 双通道 处方开具权
|
|
|
* @author: lihong
|
|
|
* @date: 2024/10/9 10:21
|
|
|
* @param: mzChargeDetailList
|
|
|
@@ -3815,8 +3816,18 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
if(StrUtil.isBlank(userIdCode)) return;
|
|
|
Employee employee = employeeService.queryByUserCode(userIdCode);
|
|
|
if(employee == null) return;
|
|
|
+ if(StrUtil.isBlank(employee.getOrderYn()) || NumberEnum.ZERO.getCode().equals(employee.getOrderYn())){
|
|
|
+ throw new MzException("您没有开处方的权限,如要开通该权限,请找医务部开通权限!");
|
|
|
+ }
|
|
|
if(CollUtil.isNotEmpty(mzChargeDetailList)){
|
|
|
+ List<MzZdYpYsh> mjList = mzZdYpYshMapper.selectMjyByCommonParams(null, null,null);
|
|
|
+ List<MzZdYpYsh> jeList = mzZdYpYshMapper.selectJeByCommonParams(null, null,null);
|
|
|
+ Set<String> mjSet = mjList.stream().map(m -> m.getCode()).collect(Collectors.toSet());
|
|
|
+ Set<String> jeSet = jeList.stream().map(m -> m.getCode()).collect(Collectors.toSet());
|
|
|
for(MzChargeDetail md : mzChargeDetailList){
|
|
|
+ if(NumberEnum.ONE.getCode().equals(employee.getOrderYn()) && (mjSet.contains(md.getChargeItemCode()) || jeSet.contains(md.getChargeItemCode()))){
|
|
|
+ throw new MzException("您没有开毒麻药处方的权限,如要开通该权限,请找医务部开通权限!");
|
|
|
+ }
|
|
|
if(Constants.KL_GROUP_NO.equals(md.getGroupNo()) && Convert.toInt(employee.getDoctorZy(),0) == 0){
|
|
|
throw new MzException("您没有开颗粒剂处方权限,如要开通该权限,请找医务部开通权限!");
|
|
|
}
|