|
@@ -71,18 +71,22 @@ public class WmUserSignServiceImpl extends ServiceImpl<WmUserSignMapper, WmUserS
|
|
|
* @param wmUserSign 参数
|
|
|
* @return 任务ID
|
|
|
*/
|
|
|
- private String checkBaseInfo(WmUserSign wmUserSign) {
|
|
|
+ private Map<String, String> checkBaseInfo(WmUserSign wmUserSign) {
|
|
|
|
|
|
if (StringUtils.isEmpty(wmUserSign.getSignEntId()) || StringUtils.isEmpty(wmUserSign.getSignEntName())) {
|
|
|
throw new BizException("打卡地址异常,请退出后重试");
|
|
|
}
|
|
|
|
|
|
String taskTypeId;
|
|
|
+ String baseTaskTypeId;
|
|
|
if ("1".equals(wmUserSign.getSignEntType())) {
|
|
|
taskTypeId = "5";
|
|
|
+ baseTaskTypeId = "5";
|
|
|
} else if ("2".equals(wmUserSign.getSignEntType())) {
|
|
|
taskTypeId = "6";
|
|
|
+ baseTaskTypeId = "6";
|
|
|
} else if ("3".equals(wmUserSign.getSignEntType())) {
|
|
|
+ baseTaskTypeId = "33";
|
|
|
// 根据药店类型 区分任务类型33-普通药店/73-连锁药房
|
|
|
WmDaPharmacy daPharmacy = wmDaPharmacyService.getOne(Wrappers.<WmDaPharmacy>lambdaQuery()
|
|
|
.eq(WmDaPharmacy::getPharmacyName, wmUserSign.getSignEntName())
|
|
@@ -106,7 +110,11 @@ public class WmUserSignServiceImpl extends ServiceImpl<WmUserSignMapper, WmUserS
|
|
|
throw new BizException("拜访类型不存在");
|
|
|
}
|
|
|
|
|
|
- return taskTypeId;
|
|
|
+ Map<String, String> result = new HashMap<>();
|
|
|
+ result.put("taskTypeId", taskTypeId);
|
|
|
+ result.put("baseTaskTypeId", baseTaskTypeId);
|
|
|
+
|
|
|
+ return result;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -192,7 +200,7 @@ public class WmUserSignServiceImpl extends ServiceImpl<WmUserSignMapper, WmUserS
|
|
|
*/
|
|
|
private void checkPercentRule(WmScorePackage pkg, Integer entId) {
|
|
|
R<?> checkPercentRuleResult =
|
|
|
- wmTaskSubmissionPercentRuleService.checkPercentRule(pkg, entId, null, Arrays.asList("5", "6", "33"));
|
|
|
+ wmTaskSubmissionPercentRuleService.checkPercentRule(pkg, entId, null, Arrays.asList("5", "6", "33", "73"));
|
|
|
if (checkPercentRuleResult.getCode() != 0) {
|
|
|
throw new BizException(checkPercentRuleResult.getMsg());
|
|
|
}
|
|
@@ -613,7 +621,11 @@ public class WmUserSignServiceImpl extends ServiceImpl<WmUserSignMapper, WmUserS
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public R<?> saveWmUserSign(WmUserSign wmUserSign) {
|
|
|
// 校验基础参数
|
|
|
- String taskTypeId = checkBaseInfo(wmUserSign);
|
|
|
+ Map<String, String> taskTypeMap = checkBaseInfo(wmUserSign);
|
|
|
+ // 细分任务类型
|
|
|
+ String taskTypeId = taskTypeMap.get("taskTypeId");
|
|
|
+ // 基础任务类型
|
|
|
+ String baseTaskTypeId = taskTypeMap.get("baseTaskTypeId");
|
|
|
|
|
|
// 校验积分包
|
|
|
WmScorePackage tWmScorePackage = checkPkgInfo(wmUserSign);
|
|
@@ -661,7 +673,7 @@ public class WmUserSignServiceImpl extends ServiceImpl<WmUserSignMapper, WmUserS
|
|
|
}
|
|
|
|
|
|
// 保存签到详情, 获取任务分值
|
|
|
- int detailScore = saveSignDetail(wmUserSign, sysU.getDeptId(), taskTypeId, score);
|
|
|
+ int detailScore = saveSignDetail(wmUserSign, sysU.getDeptId(), baseTaskTypeId, score);
|
|
|
log.info("精细化拜访实际任务分值:{}", detailScore);
|
|
|
|
|
|
// 保存任务
|