|
|
|
@ -3,6 +3,7 @@ package com.engine.organization.service.impl;
|
|
|
|
|
import com.cloudstore.eccom.result.WeaResultMsg;
|
|
|
|
|
import com.engine.core.impl.Service;
|
|
|
|
|
import com.engine.organization.component.OrganizationWeaTable;
|
|
|
|
|
import com.engine.organization.entity.detach.vo.ManagerDetachVO;
|
|
|
|
|
import com.engine.organization.entity.personnelcard.po.CardAccessPO;
|
|
|
|
|
import com.engine.organization.entity.personnelcard.vo.CardAccessVO;
|
|
|
|
|
import com.engine.organization.mapper.personnelcard.CardAccessMapper;
|
|
|
|
@ -10,7 +11,7 @@ import com.engine.organization.service.CardAccessService;
|
|
|
|
|
import com.engine.organization.util.HasRightUtil;
|
|
|
|
|
import com.engine.organization.util.db.MapperProxyFactory;
|
|
|
|
|
import weaver.general.Util;
|
|
|
|
|
import weaver.hrm.User;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.*;
|
|
|
|
|
|
|
|
|
@ -24,15 +25,10 @@ public class CardAccessServiceImpl extends Service implements CardAccessService
|
|
|
|
|
|
|
|
|
|
private static final String RIGHT_NAME = "CardAccess:All";
|
|
|
|
|
|
|
|
|
|
private static CardAccessMapper getCardAccessMapper() {
|
|
|
|
|
private CardAccessMapper getCardAccessMapper() {
|
|
|
|
|
return MapperProxyFactory.getProxy(CardAccessMapper.class);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public CardAccessServiceImpl(User user) {
|
|
|
|
|
super();
|
|
|
|
|
this.user = user;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public Map<String, Object> tablePage() {
|
|
|
|
|
Map<String, Object> resultMap = new HashMap<>();
|
|
|
|
@ -58,16 +54,17 @@ public class CardAccessServiceImpl extends Service implements CardAccessService
|
|
|
|
|
@Override
|
|
|
|
|
public int save(Map<String, Object> params) {
|
|
|
|
|
int rowNum = Util.getIntValue((String) params.get("rownum"));
|
|
|
|
|
List<HashMap<String, Object>> dataList = new ArrayList<>();
|
|
|
|
|
List<CardAccessPO> dataList = new ArrayList<>();
|
|
|
|
|
for (int i = 0; i < rowNum; i++) {
|
|
|
|
|
HashMap<String, Object> data = new HashMap<>();
|
|
|
|
|
data.put("id", params.get("id_" + i));
|
|
|
|
|
data.put("status", params.get("status_" + i));
|
|
|
|
|
data.put("allPeople", params.get("all_people_" + i));
|
|
|
|
|
data.put("superior", params.get("superior_" + i));
|
|
|
|
|
data.put("allSuperior", params.get("all_superior_" + i));
|
|
|
|
|
data.put("custom", params.get("custom" + i));
|
|
|
|
|
data.put("updateTime", new Date());
|
|
|
|
|
CardAccessPO data = CardAccessPO.builder()
|
|
|
|
|
.id(Util.getIntValue((String)params.get("id_"+i)))
|
|
|
|
|
.status(Util.getIntValue((String)params.get("status_"+i)))
|
|
|
|
|
.allPeople(Util.getIntValue((String)params.get("all_people_"+i)))
|
|
|
|
|
.superior(Util.getIntValue((String)params.get("superior_"+i)))
|
|
|
|
|
.allSuperior(Util.getIntValue((String)params.get("all_superior_"+i)))
|
|
|
|
|
.custom(Util.null2String(params.get("custom_"+i)))
|
|
|
|
|
.updateTime(new Date())
|
|
|
|
|
.build();
|
|
|
|
|
dataList.add(data);
|
|
|
|
|
}
|
|
|
|
|
return getCardAccessMapper().saveCardAccess(dataList);
|
|
|
|
@ -84,8 +81,9 @@ public class CardAccessServiceImpl extends Service implements CardAccessService
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public int updateTabName(String name, Integer id) {
|
|
|
|
|
return getCardAccessMapper().updateTabName(name, id);
|
|
|
|
|
public int updateTabName(String name,Integer id) {
|
|
|
|
|
return getCardAccessMapper().updateTabName(name,id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|