|
@@ -268,6 +268,44 @@ public class StoreTeam extends Controller {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ return getSucReturnObject().toString();
|
|
|
+ }
|
|
|
+
|
|
|
+ @API(title = "人员信息修改(邀请)",apiversion = R.ID20240428111902.v1.class)
|
|
|
+ public String updateInfo() throws YosException {
|
|
|
+ long sys_enterpriseid = content.getLongValue("sys_enterpriseid");
|
|
|
+
|
|
|
+ Rows rows = dbConnect.runSqlQuery("SELECT * from sys_enterprise_hr WHERE sys_enterpriseid=" + sys_enterpriseid + " and userid=" + userid + " and siteid='" + siteid + "'");
|
|
|
+ if (rows.isNotEmpty()) {
|
|
|
+ long sys_enterprise_hrid = rows.get(0).getLong("sys_enterprise_hrid");
|
|
|
+ UpdateSQL updateSQL = SQLFactory.createUpdateSQL(this, "sys_enterprise_hr");
|
|
|
+ updateSQL.setUniqueid(sys_enterprise_hrid);
|
|
|
+ updateSQL.setSiteid(siteid);
|
|
|
+ updateSQL.setValue("name", content.getStringValue("name"));
|
|
|
+ updateSQL.setValue("phonenumber", content.getStringValue("phonenumber"));
|
|
|
+ updateSQL.setValue("sex", content.getStringValue("sex"));
|
|
|
+ updateSQL.setValue("birthday", content.getStringValue("birthday", true, "null"));
|
|
|
+ updateSQL.setValue("position", content.getStringValue("position"));
|
|
|
+ updateSQL.setValue("email", content.getStringValue("email"));
|
|
|
+ updateSQL.update();
|
|
|
+
|
|
|
+ } else {
|
|
|
+ InsertSQL insertSQL = SQLFactory.createInsertSQL(this, "sys_enterprise_hr");
|
|
|
+ insertSQL.setUniqueid(createTableID("sys_enterprise_hr"));
|
|
|
+ insertSQL.setSiteid(siteid);
|
|
|
+ insertSQL.setValue("name", content.getStringValue("name"));
|
|
|
+ insertSQL.setValue("phonenumber", content.getStringValue("phonenumber"));
|
|
|
+ insertSQL.setValue("sex", content.getStringValue("sex"));
|
|
|
+ insertSQL.setValue("birthday", content.getStringValue("birthday", true, "null"));
|
|
|
+ insertSQL.setValue("position", content.getStringValue("position"));
|
|
|
+ insertSQL.setValue("email", content.getStringValue("email"));
|
|
|
+ insertSQL.setValue("userid", userid);
|
|
|
+ insertSQL.setValue("sys_enterpriseid", sys_enterpriseid);
|
|
|
+ insertSQL.setValue("isleader", 0);
|
|
|
+ insertSQL.insert();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
return getSucReturnObject().toString();
|
|
|
}
|
|
|
|