|
@@ -623,7 +623,10 @@ public class SysImplementPlanManager {
|
|
|
List<Map<String, String>> drugs = drugEntDrugtableService.listDrugs(Collections.singletonList(deptId));
|
|
|
|
|
|
// 获取代理商
|
|
|
- Map<String, SysDept> deptMap = deptService.list(Wrappers.<SysDept>lambdaQuery().eq(SysDept::getLevel, 3)).stream().collect(Collectors.toMap(SysDept::getName, Function.identity()));
|
|
|
+ Map<String, SysDept> deptMap = deptService.list(Wrappers.<SysDept>lambdaQuery()
|
|
|
+ .eq(SysDept::getDelFlag, CommonConstants.STATUS_NORMAL)
|
|
|
+ .eq(SysDept::getLevel, 3)).stream()
|
|
|
+ .collect(Collectors.toMap(SysDept::getName, Function.identity(), (v1, v2) -> v1));
|
|
|
|
|
|
// 校验表单信息
|
|
|
Map<String, String> errorMap = checkDataOnBatchCreate(resource, drugs, deptMap, deptId);
|
|
@@ -733,37 +736,37 @@ public class SysImplementPlanManager {
|
|
|
}
|
|
|
|
|
|
// 校验类型
|
|
|
- if (!StrUtil.equalsAny(planType, "年度", "季度")){
|
|
|
+ if (!StrUtil.equalsAny(planType, "年度", "季度")) {
|
|
|
errorMsg.append("计划类型不正确;");
|
|
|
}
|
|
|
|
|
|
- if ("季度".equals(planType) && StrUtil.isBlank(quarter)){
|
|
|
+ if ("季度".equals(planType) && StrUtil.isBlank(quarter)) {
|
|
|
errorMsg.append("季度服务计划所属季度缺失;");
|
|
|
}
|
|
|
|
|
|
// 校验积分
|
|
|
try {
|
|
|
- if (Long.parseLong(planScore) <= 0){
|
|
|
+ if (Long.parseLong(planScore) <= 0) {
|
|
|
errorMsg.append("计划值小于0;");
|
|
|
}
|
|
|
- } catch (NumberFormatException e){
|
|
|
+ } catch (NumberFormatException e) {
|
|
|
errorMsg.append("计划值不是整数;");
|
|
|
}
|
|
|
|
|
|
// 校验年度和季度
|
|
|
try {
|
|
|
- if (Integer.parseInt(year) <= 0){
|
|
|
+ if (Integer.parseInt(year) <= 0) {
|
|
|
errorMsg.append("年度小于0;");
|
|
|
}
|
|
|
- } catch (NumberFormatException e){
|
|
|
+ } catch (NumberFormatException e) {
|
|
|
errorMsg.append("年度非数字;");
|
|
|
}
|
|
|
|
|
|
try {
|
|
|
- if (Integer.parseInt(quarter) <= 0){
|
|
|
+ if (Integer.parseInt(quarter) <= 0) {
|
|
|
errorMsg.append("季度小于0;");
|
|
|
}
|
|
|
- } catch (NumberFormatException e){
|
|
|
+ } catch (NumberFormatException e) {
|
|
|
errorMsg.append("季度非数字;");
|
|
|
}
|
|
|
|