Commit 4cae2c1f by liuyang

调整同步设备日志接口过滤

parent 012ab4fd
......@@ -79,10 +79,10 @@ public class CommonConstant {
public static class AuthFilter {
// 企业权限
public static final String[] ACCOUNT = {"HGXSUser", "HGPZ009", "HGPZ020", "HGPZ020A", "HGPZ021"};
public static final String[] ACCOUNT = {"HGXSUser", "HGPZ009", "HGPZ020", "HGPZ020A", "HGPZ021",};
// 数据权限
public static final String[] DATA = {"HGXSUser", "HGXSOrg", "HGXSUserGroup", "HGPZ009", "HGPZ020", "HGPZ021",
"HGPZ010.query"};
"HGPZ010.query","HGSB010.queryMax"};
}
/**
......
......@@ -178,9 +178,10 @@ public class ServiceHGSB010 extends ServiceEPBase {
public EiInfo add(EiInfo inInfo){
try {
Map<String, String> paramMap = EiInfoUtils.getFirstRow(inInfo);
Map<String, Object> paramMap = EiInfoUtils.getFirstRow(inInfo);
String accountCode = MapUtils.getString(paramMap, HGPZ009.FIELD_ACCOUNT_CODE);
List<Map> mapList = dao.query("HGSB010.queryMax", paramMap);
paramMap.put("notAuth",true);
List<Map> mapList = DaoBase.getInstance().query("HGSB010.queryMax", paramMap);
if (CollectionUtils.isEmpty(mapList)){
String year = DateUtils.shortDate().substring(0, 4);
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGSB010.FIELD_CREATED_TIME, year+"0101000000");
......@@ -190,7 +191,7 @@ public class ServiceHGSB010 extends ServiceEPBase {
JSONArray jsonArray = SbOpenApi.list(inInfo);
User user = null;
if (paramMap.containsKey(User.FIELD_LOGIN_NAME)){
user = HGXSTools.XsUser.getByLogin(paramMap.get(User.FIELD_LOGIN_NAME));
user = HGXSTools.XsUser.getByLogin(paramMap.get(User.FIELD_LOGIN_NAME).toString());
}
List<Map> list = jsonArray.stream().map(o -> (Map) o).collect(Collectors.toList());
for (Map map:list) {
......@@ -202,7 +203,7 @@ public class ServiceHGSB010 extends ServiceEPBase {
accountCode = accountCode.length() == 0?"Q24072514":accountCode;
hgsb010.setCompanyCode(accountCode);
}
dao.insert(HGSB010.INSERT, hgsb010);
DaoUtils.insert(HGSB010.INSERT, hgsb010, false);
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + jsonArray.size() + "]条数据新增成功!");
......
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