|
@@ -349,7 +349,7 @@ public class ViewController extends Controller {
|
|
|
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("ADDTIME"));
|
|
|
+ annex_params.put("print_time", parseStringToDate3(record.getStr("ADDTIME")));
|
|
|
dService.savePrint(annex_params);
|
|
|
} catch (Exception e) {
|
|
|
// TODO: handle exception
|
|
@@ -360,6 +360,30 @@ public class ViewController extends Controller {
|
|
|
renderText(records.toString());
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 日期字符串格式转换
|
|
|
+ * @param dateStr
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ private String parseStringToDate3(String dateStr) {
|
|
|
+ if (dateStr == null) {
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+ SimpleDateFormat sdf= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.fff");
|
|
|
+ Date date = null;
|
|
|
+ String timeString = null;
|
|
|
+ try {
|
|
|
+ date = sdf.parse(dateStr);
|
|
|
+ SimpleDateFormat sdf2= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
+
|
|
|
+ timeString = sdf2.format(date);
|
|
|
+ } catch (ParseException e) {
|
|
|
+ // TODO Auto-generated catch block
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return timeString;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 日期字符串格式转换
|
|
|
*
|