Эх сурвалжийг харах

Merge branch 'feat-20230329-mazhou' into temp-pre

李学松 2 жил өмнө
parent
commit
8ae6a7c831

+ 5 - 0
db/v2.0/230330.sql

@@ -4,3 +4,8 @@ INSERT INTO wm_task_content_config ( base_type_id, task_type_id, task_filed_key,
 INSERT INTO wm_task_content_config ( base_type_id, task_type_id, task_filed_key, task_filed_value, seq, task_filed_type, task_filed_minsize, task_filed_maxsize, task_filed_alert, dict_url, dict_group_name, is_mustfill, dept_id, del_flag, enable_flag, tenant_id, create_time, create_user, update_time, update_user) VALUES ('47', '47', 'temp4', '时间', 5, 'datetime', 1, 200, null, '', '', '1', null, '0', '0', 1, '2023-03-16 15:59:15', null, null, null);
 INSERT INTO wm_task_content_config ( base_type_id, task_type_id, task_filed_key, task_filed_value, seq, task_filed_type, task_filed_minsize, task_filed_maxsize, task_filed_alert, dict_url, dict_group_name, is_mustfill, dept_id, del_flag, enable_flag, tenant_id, create_time, create_user, update_time, update_user) VALUES ('47', '47', 'temp7', '现场照片', 6, 'img', 1, 5, null, '', '', '1', null, '0', '0', 1, '2023-03-16 15:59:15', null, null, null);
 INSERT INTO wm_task_content_config ( base_type_id, task_type_id, task_filed_key, task_filed_value, seq, task_filed_type, task_filed_minsize, task_filed_maxsize, task_filed_alert, dict_url, dict_group_name, is_mustfill, dept_id, del_flag, enable_flag, tenant_id, create_time, create_user, update_time, update_user) VALUES ('47', '47', 'temp23', '推广类型', 3, 'select', 1, 2, '', '', 'drugstore_promotion_type', '1', null, '0', '0', 1, '2021-06-11 16:29:17', null, '2021-06-11 16:29:16', null);
+
+
+
+alter table wm_team
+    modify member varchar(2048) null comment '团队成员';

+ 2 - 0
hnqz-upms/hnqz-upms-biz/src/main/java/com/qunzhixinxi/hnqz/admin/controller/WmScorePackageSettleNoteController.java

@@ -159,6 +159,7 @@ public class WmScorePackageSettleNoteController {
 	 * @param note
 	 * @return R
 	 */
+	@SysLog("settleNote保存结算")
 	@ApiOperation(value = "保存", notes = "保存")
 	@PostMapping("/saveSettleInfo")
 	public R saveSettleInfo(@RequestBody WmScorePackageSettleNote note) {
@@ -186,6 +187,7 @@ public class WmScorePackageSettleNoteController {
 	 * @param note
 	 * @return R
 	 */
+	@SysLog("提交结算申请")
 	@ApiOperation(value = "提交结算申请", notes = "提交结算申请")
 	@PostMapping("/subSettleInfo")
 	public R subSettleInfo(@RequestBody WmScorePackageSettleNote note) {

+ 25 - 7
hnqz-upms/hnqz-upms-biz/src/main/java/com/qunzhixinxi/hnqz/admin/controller/WmTaskController.java

@@ -45,6 +45,7 @@ import com.qunzhixinxi.hnqz.admin.entity.WmDaDrugEnt;
 import com.qunzhixinxi.hnqz.admin.entity.WmDaHospital;
 import com.qunzhixinxi.hnqz.admin.entity.WmReport;
 import com.qunzhixinxi.hnqz.admin.entity.WmScorePackage;
+import com.qunzhixinxi.hnqz.admin.entity.WmScorePackageSettleNote;
 import com.qunzhixinxi.hnqz.admin.entity.WmTask;
 import com.qunzhixinxi.hnqz.admin.entity.WmTaskContent;
 import com.qunzhixinxi.hnqz.admin.entity.WmTaskRule;
@@ -54,9 +55,9 @@ import com.qunzhixinxi.hnqz.admin.entity.XlsTask;
 import com.qunzhixinxi.hnqz.admin.entity.dto.CommonEvidenceDTO;
 import com.qunzhixinxi.hnqz.admin.entity.model.excel.CommonTaskExcelModel;
 import com.qunzhixinxi.hnqz.admin.enums.DelEnum;
+import com.qunzhixinxi.hnqz.admin.enums.SettleStatusEnum;
 import com.qunzhixinxi.hnqz.admin.enums.TaskStatusEnum;
 import com.qunzhixinxi.hnqz.admin.mapper.WmTaskMapper;
-import com.qunzhixinxi.hnqz.admin.service.ReportExportService;
 import com.qunzhixinxi.hnqz.admin.service.SysDeptService;
 import com.qunzhixinxi.hnqz.admin.service.SysFileService;
 import com.qunzhixinxi.hnqz.admin.service.SysUserService;
@@ -64,8 +65,8 @@ import com.qunzhixinxi.hnqz.admin.service.WmDaAgentService;
 import com.qunzhixinxi.hnqz.admin.service.WmDaDistributionService;
 import com.qunzhixinxi.hnqz.admin.service.WmDaDrugEntService;
 import com.qunzhixinxi.hnqz.admin.service.WmDaHospitalService;
-import com.qunzhixinxi.hnqz.admin.service.WmDaPharmacyService;
 import com.qunzhixinxi.hnqz.admin.service.WmScorePackageService;
+import com.qunzhixinxi.hnqz.admin.service.WmScorePackageSettleNoteService;
 import com.qunzhixinxi.hnqz.admin.service.WmTaskContentService;
 import com.qunzhixinxi.hnqz.admin.service.WmTaskRuleService;
 import com.qunzhixinxi.hnqz.admin.service.WmTaskService;
@@ -125,8 +126,8 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.TimeUnit;
+import java.util.function.Function;
 import java.util.stream.Collectors;
 
 
@@ -149,6 +150,8 @@ public class WmTaskController {
 
 	private final WmScorePackageService wmScorePackageService;
 
+	private final WmScorePackageSettleNoteService wmScorePackageSettleNoteService;
+
 	private final SysDeptService sysDeptService;
 
 	private final SysUserService sysUserService;
@@ -167,10 +170,6 @@ public class WmTaskController {
 
 	private final WmTaskContentService wmTaskContentService;
 
-	private final ReportExportService reportExportService;
-
-	private final WmDaPharmacyService wmDaPharmacyService;
-
 	private final SysFileService sysFileService;
 
 	private final RabbitMqClient rabbitMqClient;
@@ -1177,6 +1176,25 @@ public class WmTaskController {
 		queryWrapper.orderByDesc("t.lookinto_date");
 		IPage<WmTask> taskIPage = wmTaskMapper.listWmTaskByWrapper(new Page<>(page.getCurrent(), page.getSize()), queryWrapper);
 
+		// 结算列表加个结算状态
+		if (TaskStatusEnum.APPROVED.equals(taskStatus)) {
+			if (CollUtil.isNotEmpty(taskIPage.getRecords())) {
+				List<WmScorePackageSettleNote> settleNoteList = wmScorePackageSettleNoteService.list(Wrappers.<WmScorePackageSettleNote>lambdaQuery()
+						.eq(WmScorePackageSettleNote::getPackageId, packageId));
+				Map<String, WmScorePackageSettleNote> settleNoteMap = settleNoteList.stream()
+						.filter(note -> StrUtil.isNotBlank(note.getTaskId()))
+						.collect(Collectors.toMap(WmScorePackageSettleNote::getTaskId, Function.identity()));
+				taskIPage.getRecords().forEach(wmTask -> {
+					WmScorePackageSettleNote settleNote = settleNoteMap.get(wmTask.getId());
+					if (settleNote != null) {
+						wmTask.setSettleStatus(settleNote.getSettleNoteStatus());
+					} else {
+						wmTask.setSettleStatus(Integer.valueOf(SettleStatusEnum.SETTLE_STATUS_NOTSETTLE.getVal()));
+					}
+				});
+			}
+		}
+
 		return R.ok(taskIPage);
 	}
 

+ 6 - 0
hnqz-upms/hnqz-upms-biz/src/main/java/com/qunzhixinxi/hnqz/admin/entity/WmTask.java

@@ -261,4 +261,10 @@ public class WmTask extends Model<WmTask> {
 	 */
 	@TableField(exist = false)
 	private String username;
+
+	/**
+	 * 结算状态
+	 */
+	@TableField(exist = false)
+	private Integer settleStatus;
 }

+ 72 - 40
hnqz-upms/hnqz-upms-biz/src/main/java/com/qunzhixinxi/hnqz/admin/service/impl/WmPayOffServiceImpl.java

@@ -258,11 +258,16 @@ public class WmPayOffServiceImpl extends ServiceImpl<WmPayOffMapper, WmPayOff> i
 
 		// user-taskList map
 		Map<String, List<WmTask>> userTaskMap = taskList.stream().collect(Collectors.groupingBy(WmTask::getTaskUserId));
+		// taskId-task Map
+		Map<String, WmTask> taskMap = taskList.stream().collect(Collectors.toMap(WmTask::getId, Function.identity()));
 
 		// 查询settleNote
 		List<WmScorePackageSettleNote> notes = noteService.list(Wrappers.<WmScorePackageSettleNote>lambdaQuery()
 				.in(WmScorePackageSettleNote::getTaskId, Arrays.asList(taskIds))
 				.eq(WmScorePackageSettleNote::getPackageId, scorePackageId));
+		Map<String, WmScorePackageSettleNote> taskSettleNoteMap = notes.stream()
+				.filter(note -> StrUtil.isNotBlank(note.getTaskId()))
+				.collect(Collectors.toMap(WmScorePackageSettleNote::getTaskId, Function.identity()));
 
 		// 查询user
 		Set<String> allUserIdSet = new HashSet<>();
@@ -271,56 +276,77 @@ public class WmPayOffServiceImpl extends ServiceImpl<WmPayOffMapper, WmPayOff> i
 		List<SysUser> sysUsers = sysUserMapper.selectBatchIds(allUserIdSet);
 		Map<Integer, SysUser> userMap = sysUsers.stream().collect(Collectors.toMap(SysUser::getUserId, Function.identity()));
 
-		if (CollectionUtils.isEmpty(notes) || notes.size() < taskIds.length) {
-			// 查询领包记录
-			List<WmScorePackageStatus> statusList = wmScorePackageStatusService.list(Wrappers.<WmScorePackageStatus>lambdaQuery()
-					.eq(WmScorePackageStatus::getPackageId, scorePackageId)
-					.in(WmScorePackageStatus::getUserId, userTaskMap.keySet())
-					.eq(WmScorePackageStatus::getStatus, PackageStatusEnum.APPROVED.val()));
-			Map<String, WmScorePackageStatus> userPackageStatusMap = statusList.stream()
-					.collect(Collectors.toMap(WmScorePackageStatus::getUserId, Function.identity()));
-
-			for (String userId : userPackageStatusMap.keySet()) {
-				WmScorePackageSettleNote note = new WmScorePackageSettleNote();
-				note.setSettleNo(IdUtil.fastSimpleUUID());
-				note.setPackageId(scorePackageId);
+		// 页面回显的结算对象列表
+		List<WmScorePackageSettleNote> userNotes = new ArrayList<>();
+		// 用于结算的note参数
+		List<WmScorePackageSettleNote> toSettleNotes = new ArrayList<>();
 
-				// 计算每个人的总任务积分
-				List<WmTask> userTasks = userTaskMap.get(userId);
-				Integer userTotalScore = userTasks.stream().map(WmTask::getScore).reduce(0, Integer::sum);
-				note.setSettleAmount(BigDecimal.valueOf(userTotalScore));
-				note.setDiscount(BigDecimal.ONE);
-				note.setUserId(userId);
-				note.setSettleNoteStatus(Integer.valueOf(SettleStatusEnum.SETTLE_STATUS_NOTSETTLE.getVal()));
+		if (wmScorePackage.getLocation() != null) {
+			wmScorePackage.setSubjectLocation(wmScorePackage.getLocation().name());
+		}
+		if (StrUtil.isBlank(wmScorePackage.getSubjectLocation())){
+			return R.failed("结算积分包未勾选税源地");
+		}
 
-				SysUser noteUser = userMap.get(Integer.parseInt(userId));
-				note.setRealName(noteUser.getRealname());
-				note.setIdCardNumber(noteUser.getIdCardNumber());
-				notes.add(note);
-			}
-			if (wmScorePackage.getLocation() != null) {
-				wmScorePackage.setSubjectLocation(wmScorePackage.getLocation().name());
+		// 按结算对象分组,统计分别对应的结算信息
+		for (String userId : userTaskMap.keySet()) {
+			WmScorePackageSettleNote oneUserNote = new WmScorePackageSettleNote();
+			List<WmTask> userTasks = userTaskMap.get(userId);
+
+			// 计算每个人的总任务积分
+			BigDecimal userTotalSettleAmount = BigDecimal.ZERO;
+			for (WmTask task : userTasks) {
+				WmScorePackageSettleNote settleNote = taskSettleNoteMap.get(task.getId());
+				// 存在note,则取note金额,否则取task的积分
+				if (settleNote != null) {
+					userTotalSettleAmount = userTotalSettleAmount.add(settleNote.getSettleAmount());
+				} else {
+					userTotalSettleAmount = userTotalSettleAmount.add(BigDecimal.valueOf(task.getScore()));
+				}
 			}
-		} else {
 
-			notes.forEach(item -> {
-				SysUser user = userMap.get(Integer.parseInt(item.getUserId()));
-				item.setRealName(user.getRealname());
-				item.setIdCardNumber(user.getIdCardNumber());
-				if (item.getSubjectLocation() != null){
-					wmScorePackage.setSubjectLocation(item.getSubjectLocation().name());
-				}
-			});
+			oneUserNote.setPackageId(scorePackageId);
+			oneUserNote.setSettleAmount(userTotalSettleAmount);
+			oneUserNote.setDiscount(BigDecimal.ONE);
+			oneUserNote.setUserId(userId);
+			oneUserNote.setSettleNoteStatus(Integer.valueOf(SettleStatusEnum.SETTLE_STATUS_NOTSETTLE.getVal()));
 
-			if (StrUtil.isBlank(wmScorePackage.getSubjectLocation())){
-				return R.failed("结算积分包未勾选税源地");
+			SysUser noteUser = userMap.get(Integer.parseInt(userId));
+			oneUserNote.setRealName(noteUser.getRealname());
+			oneUserNote.setIdCardNumber(noteUser.getIdCardNumber());
+			userNotes.add(oneUserNote);
+		}
+
+		// 添加用于结算的note参数
+		for (String taskId : taskIds) {
+			WmScorePackageSettleNote note = new WmScorePackageSettleNote();
+			// note存在则直接获取
+			WmScorePackageSettleNote settleNote = taskSettleNoteMap.get(taskId);
+			if (settleNote != null) {
+				toSettleNotes.add(settleNote);
+				continue;
 			}
 
+			// note不存在,取task中的信息作为结算信息
+			WmTask task = taskMap.get(taskId);
+			note.setSettleAmount(BigDecimal.valueOf(task.getScore()));
+			note.setSettleNo(IdUtil.fastSimpleUUID());
+			note.setPackageId(scorePackageId);
+			note.setTaskId(taskId);
+			note.setDiscount(BigDecimal.ONE);
+			note.setUserId(task.getTaskUserId());
+			note.setSettleNoteStatus(Integer.valueOf(SettleStatusEnum.SETTLE_STATUS_NOTSETTLE.getVal()));
+			// user信息
+			SysUser noteUser = userMap.get(Integer.parseInt(task.getTaskUserId()));
+			note.setRealName(noteUser.getRealname());
+			note.setIdCardNumber(noteUser.getIdCardNumber());
+			toSettleNotes.add(note);
 		}
 
 		Map<String, Object> resultMap = new HashMap<>(3);
 		resultMap.put("wsp", wmScorePackage);
-		resultMap.put("notes", notes);
+		resultMap.put("notes", toSettleNotes);
+		resultMap.put("userNotes", userNotes);
 		// 显示实际完成积分值
 //		resultMap.put("finishScore", "0");
 
@@ -402,7 +428,6 @@ public class WmPayOffServiceImpl extends ServiceImpl<WmPayOffMapper, WmPayOff> i
 		updateEntity.setId(input.getId());
 		updateEntity.setSettleStatus(DingEnum.SETTLE_STATUS_WAIT.getType());
 		updateEntity.setScorePackageStatus("5");
-		updateEntity.setSettleFlag("1");
 		updateEntity.setDescription(input.getDescription());
 		updateEntity.setSubType(String.valueOf(location.getGigType().getCode()));
 		updateEntity.setLocation(input.getSubjectLocation());
@@ -414,6 +439,13 @@ public class WmPayOffServiceImpl extends ServiceImpl<WmPayOffMapper, WmPayOff> i
 			updateEntity.setTaskAddFlag("0");
 		}
 
+		if (StrUtil.equals(PackageTypeEnum.TYPE1_SCORE_AND_TASK_PACKAGE.val(), wmScorePackage.getPackageType1())) {
+			// 多人承接积分包可以一直结算
+			updateEntity.setSettleFlag("0");
+		} else {
+			updateEntity.setSettleFlag("1");
+		}
+
 		wmScorePackageService.updateById(updateEntity);
 		noteService.saveOrUpdateBatch(notes);
 

+ 2 - 1
hnqz-upms/hnqz-upms-biz/src/main/java/com/qunzhixinxi/hnqz/admin/service/impl/WmScorePackageServiceImpl.java

@@ -1990,7 +1990,8 @@ public class WmScorePackageServiceImpl extends ServiceImpl<WmScorePackageMapper,
 		long shtgtt = 0;
 		// 审核不通过百分比
 		long shbtgtt = 0;
-		if (StrUtil.equals(scorePackage.getPackageType1(), "1")) {
+		if (StrUtil.equals(scorePackage.getPackageType1(), PackageTypeEnum.TYPE1_SCOTE_PACKAGE.val())
+				|| StrUtil.equals(scorePackage.getPackageType1(), PackageTypeEnum.TYPE1_SCORE_AND_TASK_PACKAGE.val())) {
 			int score = scorePackage.getScore();
 			if (score != 0) {
 				yshtt = ysh * 100L / score;

+ 27 - 12
hnqz-upms/hnqz-upms-biz/src/main/java/com/qunzhixinxi/hnqz/admin/service/impl/WmScorePackageSettleNoteServiceImpl.java

@@ -291,9 +291,11 @@ public class WmScorePackageSettleNoteServiceImpl extends ServiceImpl<WmScorePack
 			this.baseMapper.insert(entity);
 		} else {
 			WmScorePackageSettleNote oldData = this.baseMapper.selectById(note.getId());
+			if (oldData == null) {
+				return R.failed("结算数据不存在,不能修改");
+			}
 
 			if (0 != oldData.getSettleNoteStatus()) {
-
 				return R.failed("状态异常,不能修改");
 			}
 			WmScorePackageSettleNote updateEntity = new WmScorePackageSettleNote();
@@ -320,7 +322,12 @@ public class WmScorePackageSettleNoteServiceImpl extends ServiceImpl<WmScorePack
 	@Override
 	@Transactional(rollbackFor = Exception.class)
 	public R<?> batchSaveSettleInfo(List<WmScorePackageSettleNote> noteList) {
-		noteList.forEach(this::saveSettleInfo);
+		for (WmScorePackageSettleNote note : noteList) {
+			R settleResult = this.saveSettleInfo(note);
+			if (settleResult.getCode() != 0) {
+				throw new RuntimeException(settleResult.getMsg());
+			}
+		}
 		return R.ok();
 	}
 
@@ -426,7 +433,6 @@ public class WmScorePackageSettleNoteServiceImpl extends ServiceImpl<WmScorePack
 		if (null != note.getId()) {
 			WmScorePackageSettleNote oldData = this.baseMapper.selectById(note.getId());
 			if (0 != oldData.getSettleNoteStatus()) {
-
 				return R.failed("状态异常,不能提交");
 			}
 			updateEntity = new WmScorePackageSettleNote();
@@ -436,6 +442,7 @@ public class WmScorePackageSettleNoteServiceImpl extends ServiceImpl<WmScorePack
 			updateEntity.setInvoiceType(note.getInvoiceType());
 			updateEntity.setCategoryName(note.toCategoryName());
 			updateEntity.setSettleAmount(note.getSettleAmount());
+			updateEntity.setActualAmount(note.getActualAmount());
 			updateEntity.setSettleNoteStatus(9);
 			updateEntity.setSubTime(localDateTime);
 			updateEntity.setUpdateTime(localDateTime);
@@ -454,6 +461,7 @@ public class WmScorePackageSettleNoteServiceImpl extends ServiceImpl<WmScorePack
 			entity.setInvoiceType(note.getInvoiceType());
 			entity.setCategoryName(note.toCategoryName());
 			entity.setSettleAmount(note.getSettleAmount());
+			entity.setActualAmount(note.getActualAmount());
 			entity.setDiscount(new BigDecimal(1));
 			entity.setPackageId(note.getPackageId());
 			entity.setTaskId(note.getTaskId());
@@ -482,7 +490,12 @@ public class WmScorePackageSettleNoteServiceImpl extends ServiceImpl<WmScorePack
 	@Override
 	@Transactional(rollbackFor = Exception.class)
 	public R<?> batchSubSettleInfo(List<WmScorePackageSettleNote> noteList) {
-		noteList.forEach(this::subSettleInfo);
+		for (WmScorePackageSettleNote note : noteList) {
+			R settleResult = this.subSettleInfo(note);
+			if (settleResult.getCode() != 0) {
+				throw new RuntimeException(settleResult.getMsg());
+			}
+		}
 		return R.ok();
 	}
 
@@ -537,13 +550,13 @@ public class WmScorePackageSettleNoteServiceImpl extends ServiceImpl<WmScorePack
 
 		SysUser sysUser = sysUserService.getById(note.getUserId());
 
-		if (input.getSubjectLocation() == null) {
+		if (note.getSubjectLocation() == null) {
 			return R.failed(sysUser.getRealname() + "人员结算渠道不存在,不能结算");
 		}
 
 		// 获取结算零工
-		GigTypeEnum gigTypeEnum = input.getSubjectLocation().getGigType();
-		String subType = String.valueOf(input.getSubjectLocation().getGigType().getCode());
+		GigTypeEnum gigTypeEnum = note.getSubjectLocation().getGigType();
+		String subType = String.valueOf(note.getSubjectLocation().getGigType().getCode());
 
 		/**
 		 * 结算配置信息
@@ -551,6 +564,7 @@ public class WmScorePackageSettleNoteServiceImpl extends ServiceImpl<WmScorePack
 		SysDeptSub condition = new SysDeptSub();
 		condition.setDeptId(sysDept.getDeptId());
 		condition.setSubjectType(subType);
+		condition.setSubjectLocation(note.getSubjectLocation());
 		condition.setEnableFlag(SubjectTypeEnum.ENABLE_FLAG_TRUE.getCode());
 		SysDeptSub sysDeptSub = sysDeptSubService.getOne(Wrappers.query(condition));
 
@@ -559,7 +573,7 @@ public class WmScorePackageSettleNoteServiceImpl extends ServiceImpl<WmScorePack
 		}
 
 		SysUserSub userSub = sysUserSubMapper.selectOne(Wrappers.<SysUserSub>lambdaQuery()
-				.eq(SysUserSub::getSubjectLocation, input.getSubjectLocation())
+				.eq(SysUserSub::getSubjectLocation, note.getSubjectLocation())
 				.eq(SysUserSub::getDeptId, sysUser.getDeptId())
 				.eq(SysUserSub::getUserId, sysUser.getUserId())
 		);
@@ -689,16 +703,16 @@ public class WmScorePackageSettleNoteServiceImpl extends ServiceImpl<WmScorePack
 
 			SysUser sysUser = sysUserService.getById(note.getUserId());
 
-			if (input.getSubjectLocation() == null) {
+			if (note.getSubjectLocation() == null) {
 				return R.failed(sysUser.getRealname() + "人员结算渠道不存在,不能结算");
 			}
 
 			// 获取结算零工
-			GigTypeEnum gigTypeEnum = input.getSubjectLocation().getGigType();
-			String subType = String.valueOf(input.getSubjectLocation().getGigType().getCode());
+			GigTypeEnum gigTypeEnum = note.getSubjectLocation().getGigType();
+			String subType = String.valueOf(note.getSubjectLocation().getGigType().getCode());
 
 			SysUserSub userSub = sysUserSubMapper.selectOne(Wrappers.<SysUserSub>lambdaQuery()
-					.eq(SysUserSub::getSubjectLocation, input.getSubjectLocation())
+					.eq(SysUserSub::getSubjectLocation, note.getSubjectLocation())
 					.eq(SysUserSub::getDeptId, sysUser.getDeptId())
 					.eq(SysUserSub::getUserId, sysUser.getUserId())
 			);
@@ -2534,6 +2548,7 @@ public class WmScorePackageSettleNoteServiceImpl extends ServiceImpl<WmScorePack
 			}
 		} catch (Exception e) {
 			log.warn("自由职家结算提交失败: {}", note.getSettleNo());
+			log.error("自由职家结算异常", e);
 			note.setUpdateTime(LocalDateTime.now());
 			note.setSettleNoteStatus(DingEnum.NOTE_STATUS_FAIL.getType());
 

+ 3 - 0
hnqz-upms/hnqz-upms-biz/src/main/resources/mapper/WmScorePackageSettleNoteMapper.xml

@@ -125,6 +125,9 @@
 		<if test="query.settleNoteStatus != null">
 			AND e.settle_note_status = #{query.settleNoteStatus}
 		</if>
+		<if test="query.realName != null">
+			AND u.realname like concat('%',#{query.realName},'%')
+		</if>
 		ORDER BY e.sub_time DESC, t.id
 	</select>