Merge branch 'master' of http://192.168.0.75:3000/liux/gs_sub_evaluate
This commit is contained in:
commit
60a9586cd6
|
|
@ -146,6 +146,15 @@ public class OutsourcerEvaluateServiceImpl implements OutsourcerEvaluateService
|
|||
childList.add(childMap);
|
||||
}
|
||||
}
|
||||
oneList = oneList.stream().distinct().collect(Collectors.toList());
|
||||
Map<String, Object> upload = new LinkedHashMap<>();
|
||||
upload.put("title", "操作");
|
||||
upload.put("mergeType", "rowspan");
|
||||
upload.put("num", 3);
|
||||
upload.put("minWidth", 100);
|
||||
upload.put("field", "examineAndApprove");
|
||||
oneList.add(upload);
|
||||
|
||||
finalList.add(oneList);
|
||||
finalList.add(twoList);
|
||||
finalList.add(threeList);
|
||||
|
|
@ -360,7 +369,7 @@ public class OutsourcerEvaluateServiceImpl implements OutsourcerEvaluateService
|
|||
o.setIsProject("1");
|
||||
} else {
|
||||
o.setIsProject("0");
|
||||
if(!"0".equals(deptId)){
|
||||
if (!"0".equals(deptId)) {
|
||||
//判断当前用户的部门下是否已经评价
|
||||
int count = outsourcerEvaluateDao.getEvaluateCount(o);
|
||||
if (count > 0) {
|
||||
|
|
@ -419,23 +428,23 @@ public class OutsourcerEvaluateServiceImpl implements OutsourcerEvaluateService
|
|||
String orgType = UserUtil.getLoginUser().getOrgType();
|
||||
String roleName = UserUtil.getLoginUser().getRoleName();
|
||||
examineBean.setUserId(userId);
|
||||
if("0".equals(deptId) || ("1".equals(orgType) && "评价人".equals(roleName))){
|
||||
if ("0".equals(deptId) || ("1".equals(orgType) && "评价人".equals(roleName))) {
|
||||
System.err.println("项目部或者事业部评价人");
|
||||
int num = isWait(o.getEvaluateId());
|
||||
System.err.println("isWait=="+num);
|
||||
if(num <= 0){
|
||||
int num = isWait(o.getEvaluateId());
|
||||
System.err.println("isWait==" + num);
|
||||
if (num <= 0) {
|
||||
addExaminePerson(examineBean);
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
System.err.println("其他部门,直接去审核");
|
||||
//直接去审核
|
||||
addExaminePerson(examineBean);
|
||||
}
|
||||
//
|
||||
//
|
||||
|
||||
} catch (Exception e) {
|
||||
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
||||
System.err.println("e======"+e.toString());
|
||||
System.err.println("e======" + e.toString());
|
||||
ar.setFailMsg("保存失败");
|
||||
}
|
||||
return ar;
|
||||
|
|
@ -556,14 +565,14 @@ public class OutsourcerEvaluateServiceImpl implements OutsourcerEvaluateService
|
|||
dataBean.setId(s);
|
||||
}
|
||||
//判断当前部门是否已经审核
|
||||
int isApproval = outsourcerEvaluateDao.getIsApprovalByDeptId(o,dataBean);
|
||||
int isRejection = outsourcerEvaluateDao.getIsRejectionByDeptId(o,dataBean);
|
||||
if (isApproval > 0){
|
||||
dataBean.setIsApprove("0");
|
||||
}else{
|
||||
int isApproval = outsourcerEvaluateDao.getIsApprovalByDeptId(o, dataBean);
|
||||
int isRejection = outsourcerEvaluateDao.getIsRejectionByDeptId(o, dataBean);
|
||||
if (isApproval > 0) {
|
||||
dataBean.setIsApprove("0");
|
||||
} else {
|
||||
dataBean.setIsApprove("1");
|
||||
}
|
||||
if(isRejection > 0) {
|
||||
if (isRejection > 0) {
|
||||
dataBean.setIsApprove("2");
|
||||
}
|
||||
finalList.add(dataBean);
|
||||
|
|
@ -604,7 +613,7 @@ public class OutsourcerEvaluateServiceImpl implements OutsourcerEvaluateService
|
|||
}
|
||||
addTitleMap(oneList, "合计", "totalScore", 1, 180);
|
||||
List<Map<String, Object>> childDataList = new ArrayList<>();
|
||||
for (Map<String, Object> map : list){
|
||||
for (Map<String, Object> map : list) {
|
||||
Map<String, Object> childMap = new LinkedHashMap<>();
|
||||
childMap.put("subName", map.get("subName"));
|
||||
childMap.put("subId", map.get("subId"));
|
||||
|
|
@ -617,7 +626,7 @@ public class OutsourcerEvaluateServiceImpl implements OutsourcerEvaluateService
|
|||
}
|
||||
//合计为加和
|
||||
|
||||
childMap.put("totalScore",String.format("%.2f", score));
|
||||
childMap.put("totalScore", String.format("%.2f", score));
|
||||
childDataList.add(childMap);
|
||||
}
|
||||
|
||||
|
|
@ -654,11 +663,11 @@ public class OutsourcerEvaluateServiceImpl implements OutsourcerEvaluateService
|
|||
String name = outsourcerEvaluateDao.getIndexNameById(title.split("-")[0]);
|
||||
String countType = outsourcerEvaluateDao.getCountTypeById(title.split("-")[0]);
|
||||
String standardScore = outsourcerEvaluateDao.getStandardScoreById(title.split("-")[0]);
|
||||
addCollectTitleMap(oneList, name, title, 1, 180,countType,standardScore);
|
||||
addCollectTitleMap(oneList, name, title, 1, 180, countType, standardScore);
|
||||
}
|
||||
addTitleMap(oneList, "合计", "totalScore", 1, 180);
|
||||
List<Map<String, Object>> childDataList = new ArrayList<>();
|
||||
for (Map<String, Object> map : list){
|
||||
for (Map<String, Object> map : list) {
|
||||
Map<String, Object> childMap = new LinkedHashMap<>();
|
||||
childMap.put("subName", map.get("subName"));
|
||||
childMap.put("subId", map.get("subId"));
|
||||
|
|
@ -669,7 +678,7 @@ public class OutsourcerEvaluateServiceImpl implements OutsourcerEvaluateService
|
|||
score += Float.parseFloat(map.get(title).toString());
|
||||
}
|
||||
//合计为加和
|
||||
childMap.put("totalScore",score);
|
||||
childMap.put("totalScore", score);
|
||||
childDataList.add(childMap);
|
||||
}
|
||||
|
||||
|
|
@ -692,7 +701,7 @@ public class OutsourcerEvaluateServiceImpl implements OutsourcerEvaluateService
|
|||
}
|
||||
}
|
||||
|
||||
childMap.put("subId",subId);
|
||||
childMap.put("subId", subId);
|
||||
childMap.put("proId", proId);
|
||||
Float score = 0.0F;
|
||||
for (String title : sortList) {
|
||||
|
|
@ -712,7 +721,7 @@ public class OutsourcerEvaluateServiceImpl implements OutsourcerEvaluateService
|
|||
}
|
||||
}
|
||||
Float totalScore = 0.0F;
|
||||
if ("累加".equals(countType)){
|
||||
if ("累加".equals(countType)) {
|
||||
for (Float aFloat : total) {
|
||||
totalScore += aFloat;
|
||||
}
|
||||
|
|
@ -727,13 +736,13 @@ public class OutsourcerEvaluateServiceImpl implements OutsourcerEvaluateService
|
|||
totalScore += aFloat;
|
||||
}
|
||||
totalScore = totalScore / total.size();
|
||||
}else if ("最大值".equals(countType)) {
|
||||
} else if ("最大值".equals(countType)) {
|
||||
for (Float aFloat : total) {
|
||||
if (aFloat > totalScore) {
|
||||
totalScore = aFloat;
|
||||
}
|
||||
}
|
||||
}else if ("最小值".equals(countType)) {
|
||||
} else if ("最小值".equals(countType)) {
|
||||
totalScore = total.get(0);
|
||||
for (Float aFloat : total) {
|
||||
if (aFloat < totalScore) {
|
||||
|
|
@ -742,7 +751,7 @@ public class OutsourcerEvaluateServiceImpl implements OutsourcerEvaluateService
|
|||
}
|
||||
}
|
||||
score += totalScore;
|
||||
childMap.put(title, String.format("%.2f", totalScore) ) ;
|
||||
childMap.put(title, String.format("%.2f", totalScore));
|
||||
}
|
||||
childMap.put("totalScore", String.format("%.2f", score));
|
||||
finalChildList.add(childMap);
|
||||
|
|
@ -953,7 +962,7 @@ public class OutsourcerEvaluateServiceImpl implements OutsourcerEvaluateService
|
|||
|
||||
//添加数据
|
||||
o.setDeptId("-1".equals(deptId) ? UserUtil.getLoginUser().getDeptId() : "0".equals(deptId) ? "0" : deptId);
|
||||
if("0".equals(o.getDeptId())){
|
||||
if ("0".equals(o.getDeptId())) {
|
||||
if (!"audit".equals(o.getType()) && !"auditAll".equals(o.getType())) {
|
||||
o.setUserId(UserUtil.getLoginUser().getId().toString());
|
||||
}
|
||||
|
|
@ -1021,6 +1030,7 @@ public class OutsourcerEvaluateServiceImpl implements OutsourcerEvaluateService
|
|||
}
|
||||
list.add(map);
|
||||
}
|
||||
|
||||
private void addCollectTitleMap(List<Map<String, Object>> list, String title, String field, int num, int minWidth
|
||||
, String countType, String standardScore) {
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
|
|
@ -1216,26 +1226,26 @@ public class OutsourcerEvaluateServiceImpl implements OutsourcerEvaluateService
|
|||
public int isWait(String evaluateId) {
|
||||
//项目部已评价人
|
||||
int evaluatedNum = dao.getEvaluatedNum(evaluateId);
|
||||
System.err.println("已评价人evaluatedNum="+evaluatedNum);
|
||||
System.err.println("已评价人evaluatedNum=" + evaluatedNum);
|
||||
//判断事业部是否需要评价
|
||||
int proNum = dao.getProEvaluateNum(evaluateId);
|
||||
System.err.println("判断事业部是否需要评价proNum="+proNum);
|
||||
System.err.println("判断事业部是否需要评价proNum=" + proNum);
|
||||
//项目部未评价人
|
||||
int unEvaluateNum = dao.getUnEvaluateNum(evaluateId)+proNum;
|
||||
System.err.println("项目部未评价人unEvaluateNum="+unEvaluateNum);
|
||||
return unEvaluateNum-evaluatedNum;
|
||||
int unEvaluateNum = dao.getUnEvaluateNum(evaluateId) + proNum;
|
||||
System.err.println("项目部未评价人unEvaluateNum=" + unEvaluateNum);
|
||||
return unEvaluateNum - evaluatedNum;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int addExaminePerson(ExamineBean o) {
|
||||
String postId = o.getPostId();
|
||||
//如果是项目部,则获取事业部orgId 插入
|
||||
if(postId !=null && "0".equals(postId)){
|
||||
if (postId != null && "0".equals(postId)) {
|
||||
String orgId = dao.getOrgIddByEvaluateId(o.getEvaluateId());
|
||||
o.setPostId(orgId);
|
||||
}
|
||||
List<String> stringList = dao.getExaminePersonByDeptAndRoleName(o.getPostId(),"审批人");
|
||||
o.setUserList(String.join(",",stringList));
|
||||
List<String> stringList = dao.getExaminePersonByDeptAndRoleName(o.getPostId(), "审批人");
|
||||
o.setUserList(String.join(",", stringList));
|
||||
return dao.addExaminePerson(o);
|
||||
}
|
||||
|
||||
|
|
@ -1244,16 +1254,16 @@ public class OutsourcerEvaluateServiceImpl implements OutsourcerEvaluateService
|
|||
Set<String> setList = new HashSet<>();
|
||||
List<SetTemplateBean> getTemplateDeatailsList = outsourcerEvaluateDao.getThisTemplateByEvaluateId(evaluateId);
|
||||
for (SetTemplateBean setTemplateBean : getTemplateDeatailsList) {
|
||||
for (String deptId : setTemplateBean.getDutyDept().split(",")) {
|
||||
setList.add(deptId);
|
||||
for (String deptId : setTemplateBean.getDutyDept().split(",")) {
|
||||
setList.add(deptId);
|
||||
}
|
||||
}
|
||||
return setList.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getExamineNumByEvaluateId(String evaluateId,String evaluateNode) {
|
||||
return dao.getExamineNumByEvaluateId(evaluateId,evaluateNode);
|
||||
public int getExamineNumByEvaluateId(String evaluateId, String evaluateNode) {
|
||||
return dao.getExamineNumByEvaluateId(evaluateId, evaluateNode);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1299,7 +1309,7 @@ public class OutsourcerEvaluateServiceImpl implements OutsourcerEvaluateService
|
|||
public AjaxRes getSummaryCompareList(EvaluateSubBean o) {
|
||||
AjaxRes ar = new AjaxRes();
|
||||
String[] evaluateDate = o.getEvaluateDate().split(",");
|
||||
List<SummaryCompareBean> list = outsourcerEvaluateDao.getSummaryCompareList(o,evaluateDate);
|
||||
List<SummaryCompareBean> list = outsourcerEvaluateDao.getSummaryCompareList(o, evaluateDate);
|
||||
//获取所有的承包商
|
||||
Set<String> subNameSet = new HashSet<>();
|
||||
for (SummaryCompareBean bean : list) {
|
||||
|
|
@ -1322,11 +1332,11 @@ public class OutsourcerEvaluateServiceImpl implements OutsourcerEvaluateService
|
|||
childMap.put("subName", bean.getSubName());
|
||||
titleList.add(createMap("分包商名称", "rowspan", 1, 100, "subName"));
|
||||
for (String date : evaluateDateSet) {
|
||||
titleList.add(createMap(date, "rowspan", 1, 100, date.replace("年","-").replace("月","")));
|
||||
titleList.add(createMap(date, "rowspan", 1, 100, date.replace("年", "-").replace("月", "")));
|
||||
}
|
||||
for (SummaryCompareBean compareBean : list) {
|
||||
if (bean.getSubName().equals(compareBean.getSubName())) {
|
||||
childMap.put(compareBean.getEvaluateDate().replace("年","-").replace("月",""), compareBean.getScore());
|
||||
childMap.put(compareBean.getEvaluateDate().replace("年", "-").replace("月", ""), compareBean.getScore());
|
||||
}
|
||||
}
|
||||
childDataList.add(childMap);
|
||||
|
|
|
|||
|
|
@ -88,26 +88,30 @@ public class PermissionController {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (c.getHref().equals("pages/evaluate/team/evaluateCheckList.html")) {
|
||||
for (TeamEvaluateBean teamEvaluateBean : teamEvaluateBeans) {
|
||||
if ("5".equals(loginUser.getRoleId()) ||
|
||||
Arrays.asList(loginUser.getRoleId().split(",")).contains("5")) {
|
||||
if ("1".equals(teamEvaluateBean.getStatus())) {
|
||||
if ("待审核".equals(teamEvaluateBean.getCheckStatus())) {
|
||||
c.setIsCheck(1);
|
||||
});
|
||||
permission.getChild().forEach(cc -> {
|
||||
cc.getChild().forEach(c -> {
|
||||
if (c.getHref().equals("pages/evaluate/team/evaluateCheckList.html")) {
|
||||
for (TeamEvaluateBean teamEvaluateBean : teamEvaluateBeans) {
|
||||
if ("5".equals(loginUser.getRoleId()) ||
|
||||
Arrays.asList(loginUser.getRoleId().split(",")).contains("5")) {
|
||||
if ("1".equals(teamEvaluateBean.getStatus())) {
|
||||
if ("待审核".equals(teamEvaluateBean.getCheckStatus())) {
|
||||
c.setIsCheck(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if ("6".equals(loginUser.getRoleId()) ||
|
||||
Arrays.asList(loginUser.getRoleId().split(",")).contains("6")) {
|
||||
if (!"1".equals(teamEvaluateBean.getStatus())) {
|
||||
if ("待审核".equals(teamEvaluateBean.getCheckStatus())) {
|
||||
c.setIsCheck(1);
|
||||
if ("6".equals(loginUser.getRoleId()) ||
|
||||
Arrays.asList(loginUser.getRoleId().split(",")).contains("6")) {
|
||||
if (!"1".equals(teamEvaluateBean.getStatus())) {
|
||||
if ("待审核".equals(teamEvaluateBean.getCheckStatus())) {
|
||||
c.setIsCheck(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
return firstLevel;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ initMenu();
|
|||
function getIsCheckFun(list) {
|
||||
if (list && list.length > 0) {
|
||||
list.forEach((e) => {
|
||||
if (e.isCheck == 1) {
|
||||
if (e.isCheck == 1 || e.status == 0) {
|
||||
console.log("有待审数据", e);
|
||||
var elements = document.querySelectorAll(
|
||||
"a[lay-id='" + e.id + "']"
|
||||
|
|
|
|||
Loading…
Reference in New Issue