|
|
|
@ -1584,4 +1584,162 @@ public class HrmSelfHelpController {
|
|
|
|
|
return WeaResult.success(dataMap);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/testSapi88")
|
|
|
|
|
@WeaPermission(publicPermission = true)
|
|
|
|
|
public WeaResult<Object> testSapi88(HttpServletRequest request){
|
|
|
|
|
|
|
|
|
|
String field_ry = "985460777098248194" ;
|
|
|
|
|
String field_amount = "985460777098248195";
|
|
|
|
|
String objId = "985460643895541762";
|
|
|
|
|
|
|
|
|
|
String groupId = "weaver-ebuilder-form-service";
|
|
|
|
|
String sourceType = "LOGIC";
|
|
|
|
|
SimpleEmployee employee = UserContext.getCurrentUser();
|
|
|
|
|
long employeeId = employee.getEmployeeId();
|
|
|
|
|
|
|
|
|
|
Map<String,Object> dataMap = new HashMap<String,Object>();
|
|
|
|
|
dataMap.put("test","testSapi88");
|
|
|
|
|
String tablename = "uf_nj_cyqltjb" ;
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<EBDataReqDto> insertEbDataReqDtoList = Lists.newArrayList();
|
|
|
|
|
List<EBDataReqDto> updateEbDataReqDtoList = Lists.newArrayList();
|
|
|
|
|
|
|
|
|
|
String userid = request.getParameter("userid");
|
|
|
|
|
String amount = request.getParameter("amount");
|
|
|
|
|
|
|
|
|
|
if(StringUtils.isNotBlank(userid) && StringUtils.isNotBlank(amount)){
|
|
|
|
|
String sql = " select id from "+tablename+" where ry=? and tenant_key=? and delete_type=0 ";
|
|
|
|
|
List<SqlParamEntity> sqlparam = new ArrayList<SqlParamEntity>();
|
|
|
|
|
SqlParamEntity sqlParamEntity = new SqlParamEntity();
|
|
|
|
|
sqlParamEntity.setParamType(SqlParamType.VARCHAR);
|
|
|
|
|
sqlParamEntity.setValue(userid+"");
|
|
|
|
|
sqlparam.add(sqlParamEntity);
|
|
|
|
|
|
|
|
|
|
sqlParamEntity = new SqlParamEntity();
|
|
|
|
|
sqlParamEntity.setParamType(SqlParamType.VARCHAR);
|
|
|
|
|
sqlParamEntity.setValue(tenant_key+"");
|
|
|
|
|
sqlparam.add(sqlParamEntity);
|
|
|
|
|
|
|
|
|
|
Map<String, Object> result = databaseUtils.executeForQuery(sourceType, groupId, sql,sqlparam);
|
|
|
|
|
List<Map<String,Object>> recordList = databaseUtils.getDataSourceList(result);
|
|
|
|
|
if(!recordList.isEmpty()){
|
|
|
|
|
|
|
|
|
|
log.error("getChatGroup--!isEmpty");
|
|
|
|
|
String id = String.valueOf(recordList.get(0).get("id"));
|
|
|
|
|
log.error("id:"+id);
|
|
|
|
|
EBDataReqDto ebDataReqDto = new EBDataReqDto();
|
|
|
|
|
List<EBDataReqDetailDto> mainData = Lists.newArrayList();
|
|
|
|
|
// 设置更新id
|
|
|
|
|
mainData.add(new EBDataReqDetailDto("id", id));
|
|
|
|
|
mainData.add(new EBDataReqDetailDto(field_amount, amount));
|
|
|
|
|
ebDataReqDto.setMainDatas(mainData);
|
|
|
|
|
updateEbDataReqDtoList.add(ebDataReqDto);
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
log.error("getChatGroup--isEmpty");
|
|
|
|
|
|
|
|
|
|
EBDataReqDto ebDataReqDto = new EBDataReqDto();
|
|
|
|
|
List<EBDataReqDetailDto> mainData = Lists.newArrayList();
|
|
|
|
|
mainData.add(new EBDataReqDetailDto(field_ry, userid));
|
|
|
|
|
mainData.add(new EBDataReqDetailDto(field_amount, amount));
|
|
|
|
|
ebDataReqDto.setMainDatas(mainData);
|
|
|
|
|
insertEbDataReqDtoList.add(ebDataReqDto);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
log.error("getChatDay-insertEbDataReqDtoList:"+insertEbDataReqDtoList.size());
|
|
|
|
|
if(insertEbDataReqDtoList !=null && insertEbDataReqDtoList.size()>0){
|
|
|
|
|
jucailinPortalUtils.saveModeData(objId,employeeId+"",tenant_key,insertEbDataReqDtoList);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
log.error("getChatDay-updateEbDataReqDtoList:"+updateEbDataReqDtoList.size());
|
|
|
|
|
if(updateEbDataReqDtoList !=null && updateEbDataReqDtoList.size()>0){
|
|
|
|
|
jucailinPortalUtils.updateModeDataById(objId,employeeId+"",tenant_key,updateEbDataReqDtoList,false);
|
|
|
|
|
}
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
log.error("testSapi8:"+e);
|
|
|
|
|
}
|
|
|
|
|
return WeaResult.success(dataMap);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@GetMapping("/testSapi99")
|
|
|
|
|
@WeaPermission(publicPermission = true)
|
|
|
|
|
public WeaResult<Object> testSapi99(HttpServletRequest request){
|
|
|
|
|
|
|
|
|
|
//com.weaver.workrelate.performance.api.rest.RemotePerformanceService#queryFlowData
|
|
|
|
|
|
|
|
|
|
String groupId = "weaver-ebuilder-form-service";
|
|
|
|
|
String sourceType = "LOGIC";
|
|
|
|
|
SimpleEmployee employee = UserContext.getCurrentUser();
|
|
|
|
|
long employeeId = employee.getEmployeeId();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String field_ry = "985461236726857729" ;
|
|
|
|
|
String field_amount = "985461236726857730";
|
|
|
|
|
String objId = "985461167965437954";
|
|
|
|
|
|
|
|
|
|
Map<String,Object> dataMap = new HashMap<String,Object>();
|
|
|
|
|
dataMap.put("test","testSapi9");
|
|
|
|
|
String tablename = "uf_nj_pjmrdlhhsl" ;
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
|
|
List<EBDataReqDto> insertEbDataReqDtoList = Lists.newArrayList();
|
|
|
|
|
List<EBDataReqDto> updateEbDataReqDtoList = Lists.newArrayList();
|
|
|
|
|
|
|
|
|
|
String userid = request.getParameter("userid");
|
|
|
|
|
String amount = request.getParameter("amount");
|
|
|
|
|
log.error("userid:"+userid);
|
|
|
|
|
log.error("amount:"+amount);
|
|
|
|
|
|
|
|
|
|
if(StringUtils.isNotBlank(userid) && StringUtils.isNotBlank(amount)){
|
|
|
|
|
String sql = " select id from "+tablename+" where ry='"+userid+"' and tenant_key='"+tenant_key+"' and delete_type=0 ";
|
|
|
|
|
log.error("sql:"+sql);
|
|
|
|
|
|
|
|
|
|
Map<String, Object> result = databaseUtils.execute(sourceType, groupId, sql);
|
|
|
|
|
List<Map<String,Object>> recordList = databaseUtils.getDataSourceList(result);
|
|
|
|
|
if(!recordList.isEmpty()){
|
|
|
|
|
log.error("getChatDay--!isEmpty");
|
|
|
|
|
String id = String.valueOf(recordList.get(0).get("id"));
|
|
|
|
|
log.error("id:"+id);
|
|
|
|
|
EBDataReqDto ebDataReqDto = new EBDataReqDto();
|
|
|
|
|
List<EBDataReqDetailDto> mainData = Lists.newArrayList();
|
|
|
|
|
// 设置更新id
|
|
|
|
|
mainData.add(new EBDataReqDetailDto("id", id));
|
|
|
|
|
mainData.add(new EBDataReqDetailDto(field_amount, amount));
|
|
|
|
|
ebDataReqDto.setMainDatas(mainData);
|
|
|
|
|
updateEbDataReqDtoList.add(ebDataReqDto);
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
log.error("getChatDay--isEmpty");
|
|
|
|
|
|
|
|
|
|
EBDataReqDto ebDataReqDto = new EBDataReqDto();
|
|
|
|
|
List<EBDataReqDetailDto> mainData = Lists.newArrayList();
|
|
|
|
|
mainData.add(new EBDataReqDetailDto(field_ry, userid));
|
|
|
|
|
mainData.add(new EBDataReqDetailDto(field_amount, amount));
|
|
|
|
|
ebDataReqDto.setMainDatas(mainData);
|
|
|
|
|
insertEbDataReqDtoList.add(ebDataReqDto);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
log.error("getChatDay-insertEbDataReqDtoList:"+insertEbDataReqDtoList.size());
|
|
|
|
|
if(insertEbDataReqDtoList !=null && insertEbDataReqDtoList.size()>0){
|
|
|
|
|
jucailinPortalUtils.saveModeData(objId,employeeId+"",tenant_key,insertEbDataReqDtoList);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
log.error("getChatDay-updateEbDataReqDtoList:"+updateEbDataReqDtoList.size());
|
|
|
|
|
if(updateEbDataReqDtoList !=null && updateEbDataReqDtoList.size()>0){
|
|
|
|
|
jucailinPortalUtils.updateModeDataById(objId,employeeId+"",tenant_key,updateEbDataReqDtoList,false);
|
|
|
|
|
}
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
log.error("testSapi9:"+e);
|
|
|
|
|
}
|
|
|
|
|
return WeaResult.success(dataMap);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|