Commit ae3551f4 authored by 廖旭伟's avatar 廖旭伟

窗口考核、窗口工作人员考核

parent 434a796d
...@@ -155,11 +155,11 @@ public class CheckWindowPerformEntity extends CheckWindowPerformVo { ...@@ -155,11 +155,11 @@ public class CheckWindowPerformEntity extends CheckWindowPerformVo {
this.sumScore = BigDecimal.ZERO; this.sumScore = BigDecimal.ZERO;
this.submitDate = new Date(); this.submitDate = new Date();
this.manageCheckPerson = ""; this.manageCheckPerson = "";
this.manageCheckTime = new Date(); this.manageCheckTime = null;
this.manageCheckDesc = ""; this.manageCheckDesc = "";
this.manageCheckResult = ""; this.manageCheckResult = "";
this.leaderCheckPerson = ""; this.leaderCheckPerson = "";
this.leaderCheckTime = new Date(); this.leaderCheckTime = null;
this.leaderCheckDesc = ""; this.leaderCheckDesc = "";
this.leaderCheckResult = ""; this.leaderCheckResult = "";
this.checkStatus = 1; this.checkStatus = 1;
......
package com.mortals.xhx.module.window.service.impl; package com.mortals.xhx.module.window.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.common.Rest; import com.mortals.framework.common.Rest;
import com.mortals.xhx.common.code.YesNoEnum; import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.common.pdu.RespData; import com.mortals.xhx.common.pdu.RespData;
...@@ -15,10 +16,7 @@ import com.mortals.xhx.module.window.model.WindowOwnerDetailEntity; ...@@ -15,10 +16,7 @@ import com.mortals.xhx.module.window.model.WindowOwnerDetailEntity;
import com.mortals.xhx.module.window.service.WindowOwnerDetailService; import com.mortals.xhx.module.window.service.WindowOwnerDetailService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import java.util.ArrayList; import java.util.*;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
...@@ -38,21 +36,18 @@ public class WindowOwnerDetailServiceImpl extends AbstractCRUDServiceImpl<Window ...@@ -38,21 +36,18 @@ public class WindowOwnerDetailServiceImpl extends AbstractCRUDServiceImpl<Window
@Override @Override
public List<WindowPdu> subWindowPduList(WindowPdu pdu) { public List<WindowPdu> subWindowPduList(WindowPdu pdu) {
List<WindowPdu> subList = new ArrayList<>(); List<WindowPdu> subList = new ArrayList<>();
if(pdu.getSiteId()==null){ List<WindowOwnerDetailEntity> ownerDetail = this.getAllList();
pdu.setSiteId(1l); //默认只查宜宾市民中心 if(!CollectionUtils.isEmpty(ownerDetail)){
} Long[] windows = ownerDetail.stream().map(WindowOwnerDetailEntity::getWindowId).toArray(Long[]::new);
pdu.setSize(-1); pdu.setIdNotList(Arrays.asList(windows));
Rest<RespData<List<WindowPdu>>> respDataRest = windowFeign.list(pdu); if(pdu.getSiteId()==null){
if (respDataRest.getCode() == YesNoEnum.YES.getValue()) { pdu.setSiteId(1l); //默认只查宜宾市民中心
List<WindowOwnerDetailEntity> ownerDetail = this.getAllList(); }
if(!CollectionUtils.isEmpty(ownerDetail)){ pdu.setSize(-1);
Map<Long,List<WindowOwnerDetailEntity>> windowMap = ownerDetail.stream().collect(Collectors.groupingBy(WindowOwnerDetailEntity::getWindowId)); Rest<RespData<List<WindowPdu>>> respDataRest = windowFeign.list(pdu);
List<WindowPdu> allWindow = respDataRest.getData().getData(); log.info(JSONObject.toJSONString(respDataRest));
for(WindowPdu item:allWindow){ if (respDataRest.getCode() == YesNoEnum.YES.getValue()) {
if(!windowMap.containsKey(item.getId())){ subList = respDataRest.getData().getData();
subList.add(item);
}
}
} }
} }
return subList; return subList;
......
package com.mortals.xhx.module.window.service.impl; package com.mortals.xhx.module.window.service.impl;
import com.mortals.xhx.common.code.FillStatusEnum;
import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.module.check.model.CheckWindowPerformEntity;
import com.mortals.xhx.module.check.model.CheckWindowPerformQuery;
import com.mortals.xhx.module.check.model.CheckWindowWorkmanPerformEntity;
import com.mortals.xhx.module.check.model.CheckWindowWorkmanPerformQuery;
import com.mortals.xhx.module.check.service.CheckWindowPerformService;
import com.mortals.xhx.module.window.model.WindowWorkmanPerformDetailEntity;
import com.mortals.xhx.module.window.model.WindowWorkmanPerformDetailQuery;
import com.mortals.xhx.module.window.model.WindowWorkmanPerformEntity;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl; import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
...@@ -7,6 +20,11 @@ import com.mortals.xhx.module.window.dao.WindowPerformDao; ...@@ -7,6 +20,11 @@ import com.mortals.xhx.module.window.dao.WindowPerformDao;
import com.mortals.xhx.module.window.model.WindowPerformEntity; import com.mortals.xhx.module.window.model.WindowPerformEntity;
import com.mortals.xhx.module.window.service.WindowPerformService; import com.mortals.xhx.module.window.service.WindowPerformService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
/** /**
* WindowPerformService * WindowPerformService
* 大厅窗口信息 service实现 * 大厅窗口信息 service实现
...@@ -17,5 +35,43 @@ import lombok.extern.slf4j.Slf4j; ...@@ -17,5 +35,43 @@ import lombok.extern.slf4j.Slf4j;
@Service("windowPerformService") @Service("windowPerformService")
@Slf4j @Slf4j
public class WindowPerformServiceImpl extends AbstractCRUDServiceImpl<WindowPerformDao, WindowPerformEntity, Long> implements WindowPerformService { public class WindowPerformServiceImpl extends AbstractCRUDServiceImpl<WindowPerformDao, WindowPerformEntity, Long> implements WindowPerformService {
@Autowired
private CheckWindowPerformService checkWindowPerformService;
@Override
protected void saveAfter(WindowPerformEntity entity, Context context) throws AppException {
if(entity.getFillStatus()== FillStatusEnum.提交.getValue()){
saveToCheck(entity);
}
super.saveAfter(entity, context);
}
@Override
protected void updateAfter(WindowPerformEntity entity, Context context) throws AppException {
if(entity.getFillStatus()== FillStatusEnum.提交.getValue()){
saveToCheck(entity);
}
super.updateAfter(entity, context);
}
@Override
protected void removeAfter(Long[] ids, Context context, int result) throws AppException {
List<CheckWindowPerformEntity> performEntitys = checkWindowPerformService.find(new CheckWindowPerformQuery().recordIdList(Arrays.asList(ids)));
checkWindowPerformService.removeList(performEntitys,context);
super.removeAfter(ids, context, result);
}
private void saveToCheck(WindowPerformEntity entity){
CheckWindowPerformEntity perform = new CheckWindowPerformEntity();
perform.initAttrValue();
BeanUtils.copyProperties(entity, perform, BeanUtil.getNullPropertyNames(entity));
perform.setId(null);
perform.setRecordId(entity.getId());
perform.setFromName("市政务服务大厅窗口考核登记表");
perform.setSubmitDate(entity.getFillDate());
perform.setUpdateTime(null);
perform.setUpdateUserId(null);
checkWindowPerformService.save(perform);
}
} }
\ No newline at end of file
package com.mortals.xhx.module.window.service.impl; package com.mortals.xhx.module.window.service.impl;
import com.mortals.xhx.common.code.FillStatusEnum;
import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.module.check.model.CheckWindowPerformEntity;
import com.mortals.xhx.module.check.model.CheckWindowPerformQuery;
import com.mortals.xhx.module.check.model.CheckWindowWorkmanPerformEntity;
import com.mortals.xhx.module.check.model.CheckWindowWorkmanPerformQuery;
import com.mortals.xhx.module.check.service.CheckWindowPerformService;
import com.mortals.xhx.module.check.service.CheckWindowWorkmanPerformService;
import com.mortals.xhx.module.window.model.WindowWorkmanPerformDetailEntity; import com.mortals.xhx.module.window.model.WindowWorkmanPerformDetailEntity;
import com.mortals.xhx.module.window.model.WindowWorkmanPerformDetailQuery; import com.mortals.xhx.module.window.model.WindowWorkmanPerformDetailQuery;
import com.mortals.xhx.module.window.service.WindowWorkmanPerformDetailService; import com.mortals.xhx.module.window.service.WindowWorkmanPerformDetailService;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl; import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
...@@ -30,6 +39,8 @@ public class WindowWorkmanPerformServiceImpl extends AbstractCRUDServiceImpl<Win ...@@ -30,6 +39,8 @@ public class WindowWorkmanPerformServiceImpl extends AbstractCRUDServiceImpl<Win
@Autowired @Autowired
private WindowWorkmanPerformDetailService windowWorkmanPerformDetailService; private WindowWorkmanPerformDetailService windowWorkmanPerformDetailService;
@Autowired
private CheckWindowWorkmanPerformService checkWindowWorkmanPerformService;
@Override @Override
...@@ -42,6 +53,9 @@ public class WindowWorkmanPerformServiceImpl extends AbstractCRUDServiceImpl<Win ...@@ -42,6 +53,9 @@ public class WindowWorkmanPerformServiceImpl extends AbstractCRUDServiceImpl<Win
}); });
windowWorkmanPerformDetailService.save(entity.getWorkmanPerformDetailList()); windowWorkmanPerformDetailService.save(entity.getWorkmanPerformDetailList());
} }
if(entity.getFillStatus()== FillStatusEnum.提交.getValue()){
saveToCheck(entity);
}
super.saveAfter(entity, context); super.saveAfter(entity, context);
} }
...@@ -59,6 +73,9 @@ public class WindowWorkmanPerformServiceImpl extends AbstractCRUDServiceImpl<Win ...@@ -59,6 +73,9 @@ public class WindowWorkmanPerformServiceImpl extends AbstractCRUDServiceImpl<Win
}); });
windowWorkmanPerformDetailService.save(entity.getWorkmanPerformDetailList()); windowWorkmanPerformDetailService.save(entity.getWorkmanPerformDetailList());
} }
if(entity.getFillStatus()== FillStatusEnum.提交.getValue()){
saveToCheck(entity);
}
super.updateAfter(entity, context); super.updateAfter(entity, context);
} }
...@@ -66,6 +83,21 @@ public class WindowWorkmanPerformServiceImpl extends AbstractCRUDServiceImpl<Win ...@@ -66,6 +83,21 @@ public class WindowWorkmanPerformServiceImpl extends AbstractCRUDServiceImpl<Win
protected void removeAfter(Long[] ids, Context context, int result) throws AppException { protected void removeAfter(Long[] ids, Context context, int result) throws AppException {
List<WindowWorkmanPerformDetailEntity> detailEntities = windowWorkmanPerformDetailService.find(new WindowWorkmanPerformDetailQuery().performIdList(Arrays.asList(ids))); List<WindowWorkmanPerformDetailEntity> detailEntities = windowWorkmanPerformDetailService.find(new WindowWorkmanPerformDetailQuery().performIdList(Arrays.asList(ids)));
windowWorkmanPerformDetailService.removeList(detailEntities, context); windowWorkmanPerformDetailService.removeList(detailEntities, context);
List<CheckWindowWorkmanPerformEntity> performEntitys = checkWindowWorkmanPerformService.find(new CheckWindowWorkmanPerformQuery().recordIdList(Arrays.asList(ids)));
checkWindowWorkmanPerformService.removeList(performEntitys,context);
super.removeAfter(ids, context, result); super.removeAfter(ids, context, result);
} }
private void saveToCheck(WindowWorkmanPerformEntity entity){
CheckWindowWorkmanPerformEntity perform = new CheckWindowWorkmanPerformEntity();
perform.initAttrValue();
BeanUtils.copyProperties(entity, perform, BeanUtil.getNullPropertyNames(entity));
perform.setId(null);
perform.setRecordId(entity.getId());
perform.setFromName("市政务服务大厅窗口工作人员考核汇总表");
perform.setSubmitDate(entity.getFillDate());
perform.setUpdateTime(null);
perform.setUpdateUserId(null);
checkWindowWorkmanPerformService.save(perform);
}
} }
\ No newline at end of file
...@@ -3,6 +3,8 @@ package com.mortals.xhx.common.pdu.window; ...@@ -3,6 +3,8 @@ package com.mortals.xhx.common.pdu.window;
import com.mortals.framework.model.BaseEntityLong; import com.mortals.framework.model.BaseEntityLong;
import lombok.Data; import lombok.Data;
import java.util.List;
@Data @Data
public class WindowPdu extends BaseEntityLong { public class WindowPdu extends BaseEntityLong {
/** /**
...@@ -87,4 +89,7 @@ public class WindowPdu extends BaseEntityLong { ...@@ -87,4 +89,7 @@ public class WindowPdu extends BaseEntityLong {
*/ */
private String hallName; private String hallName;
/** 序号,主键,自增长排除列表 */
private List<Long> idNotList;
} }
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