kgdxpr 2 years ago
commit f03d4046d1

@ -1065,7 +1065,7 @@ public class CollectController extends Controller {
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, json);
cm.saveFormJob(job_id, bureau_id, person_id, json);
//回写完成标记
cm.writeJobFinish(job_id, bureau_id, null);
@ -1206,6 +1206,7 @@ public class CollectController extends Controller {
* @param job_id http://10.10.21.20:9000/QingLong/collect/exportTableStructExcel?job_id=1
*/
@Before({GET.class})
@IsLoginInterface({})
@IsNumericInterface({"job_id"})
public void exportTableStructExcel(int job_id) {
String job_name = cm.getJob(job_id).getStr("job_name");
@ -1359,4 +1360,27 @@ public class CollectController extends Controller {
e.printStackTrace();
}
}
/**
* FORM
*
* @param file_id
*/
@Before({GET.class})
@IsLoginInterface({})
public void getFormJobFile(String file_id) {
Record record = cm.getFormJobFile(file_id);
String fileName = record.getStr("fileName");
String suffix = record.getStr("suffix");
String filePath = basePath + File.separator + file_id + "." + suffix;
if (!FileUtil.exist(filePath)) {
Kv kv = Kv.by("success", false);
kv.set("message", "文件没有找到,请联系管理员处理异常!");
renderJson(kv);
return;
}
renderFile(new File(filePath), fileName);
}
}

@ -1291,8 +1291,9 @@ public class CollectModel {
return Db.find(sqlPara);
}
public static void main(String[] args) {
Date v4 = DateUtil.parse("2001-01-01");
System.out.println(v4);
public Record getFormJobFile(String file_id) {
String sql = "select * from t_collect_uploadfile where file_id=?";
return Db.findFirst(sql, file_id);
}
}
Loading…
Cancel
Save