Browse Source

流程创建时间字段添加

lijie 2 years ago
parent
commit
0993caa16e

+ 5 - 0
mhotel/src/com/happy/Model/Workflow.java

@@ -53,6 +53,11 @@ public class Workflow {
     private String workflowRemark;
     private String workflowRemark;
 
 
     /**
     /**
+     * 创建时间
+     */
+    private String createDate;
+
+    /**
      * 附件列表
      * 附件列表
      */
      */
     List<FileInfo> fileInfoList;
     List<FileInfo> fileInfoList;

+ 2 - 1
mhotel/src/com/happy/dao/impl/WorkflowImplDao.java

@@ -31,7 +31,7 @@ public class WorkflowImplDao implements WorkflowDao {
         this.namedParameterJdbcTemplate = namedParameterJdbcTemplate;
         this.namedParameterJdbcTemplate = namedParameterJdbcTemplate;
     }
     }
 
 
-    private String selectSql = " select a.id,a.link_id,a.type,a.title,a.status,a.remark,a.create_id,a.workflow_date,a.workflow_remark,a.workflow_name, " +
+    private String selectSql = " select a.id,a.link_id,a.type,a.title,a.status,a.remark,a.create_id,a.workflow_date,date_format(a.create_date, '%Y-%m-%d') as create_date,a.workflow_remark,a.workflow_name, " +
                                 " case when a.type = 1 then b.hname when a.type = 2 then c.user_name else null end as createName "+
                                 " case when a.type = 1 then b.hname when a.type = 2 then c.user_name else null end as createName "+
                                 " from workflow a " +
                                 " from workflow a " +
                                 " left join hotel b on a.type = 1 and a.create_id = b.id " +
                                 " left join hotel b on a.type = 1 and a.create_id = b.id " +
@@ -49,6 +49,7 @@ public class WorkflowImplDao implements WorkflowDao {
         sps.addValue("status",workflow.getStatus());
         sps.addValue("status",workflow.getStatus());
         sps.addValue("remark",workflow.getRemark());
         sps.addValue("remark",workflow.getRemark());
         sps.addValue("create_id",workflow.getCreateId());
         sps.addValue("create_id",workflow.getCreateId());
+        sps.addValue("create_date",UUIDUtil.getNewDate());
         if (workflow.getId() == null) {
         if (workflow.getId() == null) {
             sps.addValue("id", String.valueOf(UUID.randomUUID()));
             sps.addValue("id", String.valueOf(UUID.randomUUID()));
         } else {
         } else {