main
黄海 2 years ago
parent 770e4d2b69
commit 163a617ccf

@ -1058,14 +1058,14 @@ public class CollectController extends Controller {
@IsNumericInterface({"job_id"})
@EmptyInterface({"json"})
public void saveFormJob(int job_id, String json) {
String table_name = cm.getJob(job_id).getStr("form_table_name");
//操作人员
String person_id = SessionKit.get(getRequest(), getResponse(), "person_id");
//根据人员ID获取人员所在的单位ID
LoginPersonModel personModel = new LoginPersonModel();
Record rs = personModel.getLoginInfoByPersonId(person_id);
String bureau_id = rs.get("bureau_id");
cm.saveFormJob(job_id, bureau_id, person_id, table_name, json);
cm.saveFormJob(job_id, bureau_id, person_id, json);
//回写完成标记
cm.writeJobFinish(job_id, bureau_id, null);

@ -1097,7 +1097,12 @@ public class CollectModel {
/**
*
*/
public void saveFormJob(int job_id, String bureau_id, String person_id, String table_name, String json) {
public void saveFormJob(int job_id, String bureau_id, String person_id, String json) {
String table_name = getJob(job_id).getStr("form_table_name");
//先删除后插入,保持健康
String sql = "delete from " + table_name + " where job_id=? and bureau_id=?";
Db.update(sql, job_id, bureau_id);
JSONObject j1 = JSONObject.parseObject(json);
Record record = new Record();
record.set("job_id", job_id);

Loading…
Cancel
Save