|
|
|
@ -1273,7 +1273,7 @@ public class HrmSelfHelpController {
|
|
|
|
|
public WeaResult<Object> testSapi8(HttpServletRequest request){
|
|
|
|
|
|
|
|
|
|
//com.weaver.workrelate.performance.api.rest.RemotePerformanceService#queryFlowData
|
|
|
|
|
|
|
|
|
|
log.error("testSapi8");
|
|
|
|
|
String groupId = "weaver-ebuilder-form-service";
|
|
|
|
|
String sourceType = "LOGIC";
|
|
|
|
|
SimpleEmployee employee = UserContext.getCurrentUser();
|
|
|
|
@ -1289,6 +1289,7 @@ public class HrmSelfHelpController {
|
|
|
|
|
JSONObject actionMsg = dataJson.getJSONObject("actionMsg");
|
|
|
|
|
if(actionMsg.containsKey("code")){
|
|
|
|
|
String code = actionMsg.getString("code");
|
|
|
|
|
log.error("code:"+code);
|
|
|
|
|
if("0".equals(code)){
|
|
|
|
|
JSONObject dataObject = dataJson.getJSONObject("data");
|
|
|
|
|
if(dataObject.containsKey("data")){
|
|
|
|
@ -1297,7 +1298,7 @@ public class HrmSelfHelpController {
|
|
|
|
|
JSONObject dataInfo = dataArray.getJSONObject(i);
|
|
|
|
|
String userid = dataInfo.getString("userid");
|
|
|
|
|
String amount = dataInfo.getString("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();
|
|
|
|
@ -1310,14 +1311,16 @@ public class HrmSelfHelpController {
|
|
|
|
|
sqlParamEntity.setValue(tenant_key+"");
|
|
|
|
|
sqlparam.add(sqlParamEntity);
|
|
|
|
|
|
|
|
|
|
Map<String, Object> result = databaseUtils.execute(sourceType, groupId, sql);
|
|
|
|
|
Map<String, Object> result = databaseUtils.executeForQuery(sourceType, groupId, sql,sqlparam);
|
|
|
|
|
List<Map<String,Object>> recordList = databaseUtils.getDataSourceList(result);
|
|
|
|
|
if(!recordList.isEmpty()){
|
|
|
|
|
log.error("!recordList.isEmpty()");
|
|
|
|
|
jucailinPortalUtils.updateChatDayDate(userid,amount,sourceType,groupId,tenant_key,tablename);
|
|
|
|
|
}else{
|
|
|
|
|
log.error("recordList.isEmpty()");
|
|
|
|
|
jucailinPortalUtils.insertChatDayDate(userid,amount,employeeId,sourceType,groupId,tenant_key,tablename);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -1335,6 +1338,7 @@ public class HrmSelfHelpController {
|
|
|
|
|
|
|
|
|
|
//com.weaver.workrelate.performance.api.rest.RemotePerformanceService#queryFlowData
|
|
|
|
|
|
|
|
|
|
log.error("testSapi9");
|
|
|
|
|
String groupId = "weaver-ebuilder-form-service";
|
|
|
|
|
String sourceType = "LOGIC";
|
|
|
|
|
SimpleEmployee employee = UserContext.getCurrentUser();
|
|
|
|
@ -1350,6 +1354,7 @@ public class HrmSelfHelpController {
|
|
|
|
|
JSONObject actionMsg = dataJson.getJSONObject("actionMsg");
|
|
|
|
|
if(actionMsg.containsKey("code")){
|
|
|
|
|
String code = actionMsg.getString("code");
|
|
|
|
|
log.error("testSapi9-code:"+code);
|
|
|
|
|
if("0".equals(code)){
|
|
|
|
|
JSONObject dataObject = dataJson.getJSONObject("data");
|
|
|
|
|
if(dataObject.containsKey("data")){
|
|
|
|
@ -1358,18 +1363,12 @@ public class HrmSelfHelpController {
|
|
|
|
|
JSONObject dataInfo = dataArray.getJSONObject(i);
|
|
|
|
|
String userid = dataInfo.getString("userid");
|
|
|
|
|
String amount = dataInfo.getString("amount");
|
|
|
|
|
log.error("userid:"+userid);
|
|
|
|
|
log.error("amount:"+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);
|
|
|
|
|
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);
|
|
|
|
@ -1379,6 +1378,8 @@ public class HrmSelfHelpController {
|
|
|
|
|
jucailinPortalUtils.insertChatDayDate(userid,amount,employeeId,sourceType,groupId,tenant_key,tablename);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|