|
|
@@ -1,5 +1,6 @@
|
|
|
package com.xunmei.core.resumption.service;
|
|
|
|
|
|
+import cn.hutool.core.collection.CollectionUtil;
|
|
|
import cn.hutool.core.date.DateField;
|
|
|
import cn.hutool.core.date.DateTime;
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
@@ -21,6 +22,7 @@ import com.xunmei.core.resumption.vo.resumptionRegister.ResumptionDataRemarkingV
|
|
|
import com.xunmei.system.api.RemoteConfigService;
|
|
|
import com.xunmei.system.api.model.LoginUser;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
+import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
@@ -495,11 +497,11 @@ public class ResumptionBusiness {
|
|
|
//Resumption resumption = resumptionService.find(taskid);
|
|
|
Resumption resumption = resumptionService.findOneByTaskIdAndDate(request);
|
|
|
List<Map<String, Object>> arealsit = new ArrayList<>();
|
|
|
- List<ResumptionPointVo> pointList = appRulePointService.findPointByRulePlan(resumption.getPlanId(),resumption.getId());
|
|
|
+ List<ResumptionPointVo> pointList = appRulePointService.findPointByRulePlan(resumption.getPlanId(), resumption.getId());
|
|
|
Set<Long> nfcBindIdList = new HashSet<>();
|
|
|
pointList.forEach(r -> {
|
|
|
nfcBindIdList.add(r.getAreaid());
|
|
|
- if(ObjectUtil.isNull(r.getPointdataid())){
|
|
|
+ if (ObjectUtil.isNull(r.getPointdataid())) {
|
|
|
r.setPointdataid(IDHelper.id());
|
|
|
}
|
|
|
});
|
|
|
@@ -629,6 +631,7 @@ public class ResumptionBusiness {
|
|
|
final List<AppResumptionData> list = new ArrayList<>();
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
sdf.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));
|
|
|
+ List<CoreResumptionDataProtection> resumptionProtections = new ArrayList<>();
|
|
|
// List<AppResumptionTaskDataRemark> remarkDtoList = new ArrayList<>();
|
|
|
for (AppResumptionDataDto appResumptionDataDto : resumptionDataList) {
|
|
|
AppResumptionData data = new AppResumptionData();
|
|
|
@@ -664,9 +667,9 @@ public class ResumptionBusiness {
|
|
|
// }
|
|
|
List<AppResumptionDataRemarkimg> imgLista = appResumptionDataDto.getImgData();
|
|
|
//根据remark 删除图片
|
|
|
- appResumptionTaskDataRemarkimgService.remove((new QueryWrapper<AppResumptionDataRemarkimg>())
|
|
|
- .lambda()
|
|
|
- .eq(AppResumptionDataRemarkimg::getResumptionDataId, data.getId()));
|
|
|
+// appResumptionTaskDataRemarkimgService.remove((new QueryWrapper<AppResumptionDataRemarkimg>())
|
|
|
+// .lambda()
|
|
|
+// .eq(AppResumptionDataRemarkimg::getResumptionDataId, data.getId()));
|
|
|
if (imgLista.size() > 0) {
|
|
|
imgLista.forEach(r -> r.setId(IDHelper.id())
|
|
|
.setResumptionDataId(data.getId())
|
|
|
@@ -674,6 +677,14 @@ public class ResumptionBusiness {
|
|
|
appResumptionTaskDataRemarkimgService.saveBatch(imgLista);
|
|
|
}
|
|
|
}
|
|
|
+ if (CollectionUtil.isNotEmpty(appResumptionDataDto.getProtectionVo())) {
|
|
|
+ List<CoreResumptionDataProtection> dataProtections = appResumptionDataDto.getProtectionVo().stream().map(p -> {
|
|
|
+ CoreResumptionDataProtection cp = new CoreResumptionDataProtection();
|
|
|
+ BeanUtils.copyProperties(p, cp);
|
|
|
+ return cp;
|
|
|
+ }).collect(Collectors.toList());
|
|
|
+ resumptionProtections.addAll(dataProtections);
|
|
|
+ }
|
|
|
}
|
|
|
appResumptionDataService.saveBatch(list);
|
|
|
//获取未提交的履职数据当未提交的履职数据为0时,修改履职任务为已完成
|
|
|
@@ -699,12 +710,16 @@ public class ResumptionBusiness {
|
|
|
}
|
|
|
//获取履职数据异常的数据个数
|
|
|
int exceptionCount = (int) appResumptionDataService.count((new QueryWrapper<AppResumptionData>()).lambda().eq(AppResumptionData::getResumptionId, request.getResumptionId()).eq(AppResumptionData::getResValue, 1));
|
|
|
+ if(CollectionUtil.isNotEmpty(resumptionProtections)){
|
|
|
+ coreResumptionDataProtectionService.saveBatch(resumptionProtections);
|
|
|
+ }
|
|
|
resumption.setExceptionCount(exceptionCount);
|
|
|
resumption.setUpdateTime(time);
|
|
|
resumption.setUpdateBy(user.getName());
|
|
|
// resumption.setModifiedName(user.getName());
|
|
|
//resumptionService.save(resumption);
|
|
|
resumptionService.updateResumption(resumption);
|
|
|
+
|
|
|
//清除代办
|
|
|
// this.todoService.remove(resumption.getId());
|
|
|
return result;
|