main
黄海 2 years ago
parent 7f0b385839
commit 518996d6dd

@ -841,10 +841,8 @@ public class CollectController extends Controller {
@Before({GET.class})
@IsLoginInterface({})
@IsNumericInterface({"job_id"})
public void getJob(int job_id) {
//操作人员
String person_id = SessionKit.get(getRequest(), getResponse(), "person_id");
Record record = cm.getJob(job_id, person_id);
public void getJob(int job_id,String target_id) {
Record record = cm.getJob(job_id, target_id);
renderJson(record);
}

@ -265,15 +265,9 @@ public class CollectModel {
return Db.findFirst(sql, job_id);
}
public Record getJob(int job_id, String person_id) {
//根据人员ID获取人员所在的单位ID
LoginPersonModel personModel = new LoginPersonModel();
Record rs = personModel.getLoginInfoByPersonId(person_id);
String bureau_id = rs.get("bureau_id");
public Record getJob(int job_id, String target_id) {
String sql = "select * from t_collect_job as t1 inner join t_collect_job_target as t2 on t1.job_id=t2.job_id where t1.job_id=? and t2.target_id=?";
Record r = Db.findFirst(sql, job_id, bureau_id);
if (r == null) r = Db.findFirst(sql, job_id, person_id);
Record r = Db.findFirst(sql, job_id, target_id);
return r;
}

Loading…
Cancel
Save