Commit 2e1f8cf0 authored by 赵啸非's avatar 赵啸非

添加照片海康下载

parent 30000727
...@@ -14,14 +14,17 @@ import com.mortals.xhx.busiz.h5.rsp.InspectStatInfo; ...@@ -14,14 +14,17 @@ import com.mortals.xhx.busiz.h5.rsp.InspectStatInfo;
import com.mortals.xhx.busiz.h5.rsp.PerformDetailInfo; import com.mortals.xhx.busiz.h5.rsp.PerformDetailInfo;
import com.mortals.xhx.busiz.h5.rsp.PerformInfo; import com.mortals.xhx.busiz.h5.rsp.PerformInfo;
import com.mortals.xhx.common.code.PerformTypeEnum; import com.mortals.xhx.common.code.PerformTypeEnum;
import com.mortals.xhx.common.code.SubAddTypeEnum;
import com.mortals.xhx.common.code.SubMethodEnum; import com.mortals.xhx.common.code.SubMethodEnum;
import com.mortals.xhx.common.utils.BeanUtil; import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.module.check.dao.CheckAllRecordDao;
import com.mortals.xhx.module.check.model.*; import com.mortals.xhx.module.check.model.*;
import com.mortals.xhx.module.check.model.vo.CheckAllRecordVo; import com.mortals.xhx.module.check.model.vo.CheckAllRecordVo;
import com.mortals.xhx.module.check.service.*; import com.mortals.xhx.module.check.service.*;
import com.mortals.xhx.module.perform.model.*; import com.mortals.xhx.module.perform.model.*;
import com.mortals.xhx.module.perform.service.*; import com.mortals.xhx.module.perform.service.*;
import com.mortals.xhx.module.staff.model.StaffEntity; import com.mortals.xhx.module.staff.model.StaffEntity;
import com.mortals.xhx.module.staff.service.StaffPerformStatService;
import com.mortals.xhx.module.staff.service.StaffService; import com.mortals.xhx.module.staff.service.StaffService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
...@@ -84,6 +87,9 @@ public class InspectApiController extends AbstractBaseController<PerformReq> { ...@@ -84,6 +87,9 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
@Autowired @Autowired
private CheckOtherRecordService checkOtherRecordService; private CheckOtherRecordService checkOtherRecordService;
@Autowired
private CheckAllRecordDao checkAllRecordDao;
/** /**
* 个人巡查效统计 * 个人巡查效统计
...@@ -99,10 +105,20 @@ public class InspectApiController extends AbstractBaseController<PerformReq> { ...@@ -99,10 +105,20 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
} }
log.info("【{}】【请求体】--> 用户:{}", busiDesc, context.getUser().getRealName()); log.info("【{}】【请求体】--> 用户:{}", busiDesc, context.getUser().getRealName());
try { try {
//todo Integer totalTimes=0;
Integer todayTimes=0;
CheckAllRecordQuery checkAllRecordQuery = new CheckAllRecordQuery();
checkAllRecordQuery.setSubMethod(SubMethodEnum.大厅巡查.getValue());
checkAllRecordQuery.setCreateUserId(context.getUser().getId());
totalTimes = checkAllRecordDao.getCount(checkAllRecordQuery);
checkAllRecordQuery.setCheckTimeStart(DateUtil.today());
checkAllRecordQuery.setCheckTimeEnd(DateUtil.today());
todayTimes = checkAllRecordDao.getCount(checkAllRecordQuery);
InspectStatInfo performStatInfo = new InspectStatInfo(); InspectStatInfo performStatInfo = new InspectStatInfo();
performStatInfo.setTotalTimes(RandomUtil.randomInt(40,50)); performStatInfo.setTotalTimes(totalTimes);
performStatInfo.setTodayTimes(RandomUtil.randomInt(1,5)); performStatInfo.setTodayTimes(todayTimes);
rest.setData(performStatInfo); rest.setData(performStatInfo);
recordSysLog(request, busiDesc + " 【成功】"); recordSysLog(request, busiDesc + " 【成功】");
} catch (Exception e) { } catch (Exception e) {
...@@ -139,11 +155,10 @@ public class InspectApiController extends AbstractBaseController<PerformReq> { ...@@ -139,11 +155,10 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
CheckAllRecordQuery query = new CheckAllRecordQuery(); CheckAllRecordQuery query = new CheckAllRecordQuery();
query.setCheckTimeStart(performReq.getPerformStartDate()); query.setCheckTimeStart(performReq.getPerformStartDate());
query.setCheckTimeEnd(performReq.getPerformEndDate()); query.setCheckTimeEnd(performReq.getPerformEndDate());
query.setCreateUserId(context.getUser().getCustomerId()); query.setCreateUserId(context.getUser().getId());
PageInfo pageInfo = buildPageInfo(performReq); PageInfo pageInfo = buildPageInfo(performReq);
if (PerformTypeEnum.全部.getValue().equals(performReq.getPerformType())) { if (PerformTypeEnum.全部.getValue().equals(performReq.getPerformType())) {
Result<CheckAllRecordVo> result = checkAllRecordService.getAllCheckRecord(query, pageInfo); Result<CheckAllRecordVo> result = checkAllRecordService.getAllCheckRecord(query, pageInfo);
List<CheckAllRecordVo> allCheckRecord = result.getList(); List<CheckAllRecordVo> allCheckRecord = result.getList();
...@@ -266,7 +281,7 @@ public class InspectApiController extends AbstractBaseController<PerformReq> { ...@@ -266,7 +281,7 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
recordEntity.setCategoryName(rule.getCategoryName()); recordEntity.setCategoryName(rule.getCategoryName());
recordEntity.setSubMethod(SubMethodEnum.大厅巡查.getValue()); recordEntity.setSubMethod(SubMethodEnum.大厅巡查.getValue());
recordEntity.setCreateUserId(context.getUser().getCustomerId()); recordEntity.setCreateUserId(context.getUser().getId());
recordEntity.setCreateTime(new Date()); recordEntity.setCreateTime(new Date());
PerformAttendRecordEntity save = attendRecordService.save(recordEntity); PerformAttendRecordEntity save = attendRecordService.save(recordEntity);
...@@ -299,7 +314,7 @@ public class InspectApiController extends AbstractBaseController<PerformReq> { ...@@ -299,7 +314,7 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
recordEntity.setCategoryId(rule.getCategoryId()); recordEntity.setCategoryId(rule.getCategoryId());
recordEntity.setCategoryName(rule.getCategoryName()); recordEntity.setCategoryName(rule.getCategoryName());
recordEntity.setSubMethod(SubMethodEnum.大厅巡查.getValue()); recordEntity.setSubMethod(SubMethodEnum.大厅巡查.getValue());
recordEntity.setCreateUserId(context.getUser().getCustomerId()); recordEntity.setCreateUserId(context.getUser().getId());
recordEntity.setCreateTime(new Date()); recordEntity.setCreateTime(new Date());
PerformReviewRecordEntity save = reviewRecordService.save(recordEntity); PerformReviewRecordEntity save = reviewRecordService.save(recordEntity);
return save.newEntity(); return save.newEntity();
...@@ -331,9 +346,8 @@ public class InspectApiController extends AbstractBaseController<PerformReq> { ...@@ -331,9 +346,8 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
recordEntity.setCategoryId(rule.getCategoryId()); recordEntity.setCategoryId(rule.getCategoryId());
recordEntity.setCategoryName(rule.getCategoryName()); recordEntity.setCategoryName(rule.getCategoryName());
recordEntity.setSubMethod(SubMethodEnum.大厅巡查.getValue()); recordEntity.setSubMethod(SubMethodEnum.大厅巡查.getValue());
recordEntity.setDeductTime(new Date());
recordEntity.setCreateUserId(context.getUser().getCustomerId()); recordEntity.setCreateUserId(context.getUser().getId());
recordEntity.setCreateTime(new Date()); recordEntity.setCreateTime(new Date());
PerformComplainRecordEntity save = complainRecordService.save(recordEntity); PerformComplainRecordEntity save = complainRecordService.save(recordEntity);
return save.newEntity(); return save.newEntity();
...@@ -364,7 +378,7 @@ public class InspectApiController extends AbstractBaseController<PerformReq> { ...@@ -364,7 +378,7 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
recordEntity.setCategoryId(rule.getCategoryId()); recordEntity.setCategoryId(rule.getCategoryId());
recordEntity.setCategoryName(rule.getCategoryName()); recordEntity.setCategoryName(rule.getCategoryName());
recordEntity.setSubMethod(SubMethodEnum.大厅巡查.getValue()); recordEntity.setSubMethod(SubMethodEnum.大厅巡查.getValue());
recordEntity.setCreateUserId(1L); recordEntity.setCreateUserId(context.getUser().getId());
recordEntity.setCreateTime(new Date()); recordEntity.setCreateTime(new Date());
PerformGoworkRecordEntity save = performGoworkRecordService.save(recordEntity); PerformGoworkRecordEntity save = performGoworkRecordService.save(recordEntity);
return save.newEntity(); return save.newEntity();
...@@ -396,7 +410,7 @@ public class InspectApiController extends AbstractBaseController<PerformReq> { ...@@ -396,7 +410,7 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
recordEntity.setCategoryId(rule.getCategoryId()); recordEntity.setCategoryId(rule.getCategoryId());
recordEntity.setCategoryName(rule.getCategoryName()); recordEntity.setCategoryName(rule.getCategoryName());
recordEntity.setSubMethod(SubMethodEnum.大厅巡查.getValue()); recordEntity.setSubMethod(SubMethodEnum.大厅巡查.getValue());
recordEntity.setCreateUserId(context.getUser().getCustomerId()); recordEntity.setCreateUserId(context.getUser().getId());
recordEntity.setCreateTime(new Date()); recordEntity.setCreateTime(new Date());
PerformEffectRecordEntity save = effectRecordService.save(recordEntity); PerformEffectRecordEntity save = effectRecordService.save(recordEntity);
return save.newEntity(); return save.newEntity();
...@@ -427,7 +441,7 @@ public class InspectApiController extends AbstractBaseController<PerformReq> { ...@@ -427,7 +441,7 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
recordEntity.setCategoryId(rule.getCategoryId()); recordEntity.setCategoryId(rule.getCategoryId());
recordEntity.setCategoryName(rule.getCategoryName()); recordEntity.setCategoryName(rule.getCategoryName());
recordEntity.setSubMethod(SubMethodEnum.大厅巡查.getValue()); recordEntity.setSubMethod(SubMethodEnum.大厅巡查.getValue());
recordEntity.setCreateUserId(context.getUser().getCustomerId()); recordEntity.setCreateUserId(context.getUser().getId());
recordEntity.setCreateTime(new Date()); recordEntity.setCreateTime(new Date());
PerformOtherRecordEntity save = otherRecordService.save(recordEntity); PerformOtherRecordEntity save = otherRecordService.save(recordEntity);
return save.newEntity(); return save.newEntity();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment