|
@@ -18,6 +18,9 @@ import com.jfinal.plugin.activerecord.Db;
|
|
import com.jfinal.plugin.activerecord.Record;
|
|
import com.jfinal.plugin.activerecord.Record;
|
|
import com.jfinal.plugin.activerecord.dialect.SqlServerDialect;
|
|
import com.jfinal.plugin.activerecord.dialect.SqlServerDialect;
|
|
import com.jfinal.plugin.druid.DruidPlugin;
|
|
import com.jfinal.plugin.druid.DruidPlugin;
|
|
|
|
+import com.zskk.service.DataService;
|
|
|
|
+import com.zskk.service.ServiceFactory;
|
|
|
|
+
|
|
import okhttp3.FormBody;
|
|
import okhttp3.FormBody;
|
|
import okhttp3.MediaType;
|
|
import okhttp3.MediaType;
|
|
import okhttp3.OkHttpClient;
|
|
import okhttp3.OkHttpClient;
|
|
@@ -126,6 +129,82 @@ public class ViewController extends Controller {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ //胶片匹配
|
|
|
|
+ public void jppp() {
|
|
|
|
+ DataService dService = ServiceFactory.getService(DataService.class);
|
|
|
|
+ List<Record> records = Db.use("print").find("select * from IMAGEVIEW where ADDTIME >? order by ADDTIME asc",this.getPara("time"));
|
|
|
|
+ for (Record record : records) {
|
|
|
|
+ try {
|
|
|
|
+ if (record == null) {
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+ Map<String, String> annex_params = new HashMap<>();
|
|
|
|
+ annex_params.put("institution_id", PropKit.get("institution_id"));
|
|
|
|
+ annex_params.put("type", "2");
|
|
|
|
+ annex_params.put("code", record.getStr("CHECKID"));
|
|
|
|
+ //附件类型1.mp4 2.pdf 3.jpeg 4.png
|
|
|
|
+ annex_params.put("annex_class_code", "4");
|
|
|
|
+ annex_params.put("exam_datetime", parseStringToDate2(record.getStr("ADDTIME")));
|
|
|
|
+ dService.saveAnnex(annex_params, record.getStr("IMGURL"));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ // TODO: handle exception
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ renderText(records.toString());
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //打印数量匹配
|
|
|
|
+ public void dypp() {
|
|
|
|
+ DataService dService = ServiceFactory.getService(DataService.class);
|
|
|
|
+ List<Record> records = Db.use("print").find("select * from IMAGEVIEW where PRINTED=? and PRINTTIME >?","true",this.getPara("time"));
|
|
|
|
+ for (Record record : records) {
|
|
|
|
+ try {
|
|
|
|
+ if (record == null) {
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+ Map<String, String> annex_params = new HashMap<>();
|
|
|
|
+ annex_params.put("institution_id", PropKit.get("institution_id"));
|
|
|
|
+ annex_params.put("type", "2");
|
|
|
|
+ annex_params.put("code", record.getStr("CHECKID"));
|
|
|
|
+ annex_params.put("print_time", record.getStr("PRINTTIME"));
|
|
|
|
+ dService.savePrint(annex_params);
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ // TODO: handle exception
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ renderText(records.toString());
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 日期字符串格式转换
|
|
|
|
+ * @param dateStr
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ private String parseStringToDate2(String dateStr) {
|
|
|
|
+ if (dateStr == null) {
|
|
|
|
+ return "";
|
|
|
|
+ }
|
|
|
|
+ SimpleDateFormat sdf= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
+ Date date = null;
|
|
|
|
+ String timeString = null;
|
|
|
|
+ try {
|
|
|
|
+ date = sdf.parse(dateStr);
|
|
|
|
+ SimpleDateFormat sdf2= new SimpleDateFormat("yyyyMMdd");
|
|
|
|
+
|
|
|
|
+ timeString = sdf2.format(date);
|
|
|
|
+ } catch (ParseException e) {
|
|
|
|
+ // TODO Auto-generated catch block
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ return timeString;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* post请求
|
|
* post请求
|
|
* @param url-请求地址
|
|
* @param url-请求地址
|