Parcourir la source

新增task、order 目录

wangbo il y a 4 ans
Parent
commit
0a3ad5c4d9

+ 10 - 0
operation_manager/src/main/java/com/huaxu/order/entity/WorkOrderManage.java

@@ -66,6 +66,8 @@ public class WorkOrderManage implements Serializable {
 
     private String rejectReason;
 
+    private String geo;
+
     private static final long serialVersionUID = 1L;
 
     public Integer getId() {
@@ -315,4 +317,12 @@ public class WorkOrderManage implements Serializable {
     public void setRejectReason(String rejectReason) {
         this.rejectReason = rejectReason == null ? null : rejectReason.trim();
     }
+
+    public String getGeo() {
+        return geo;
+    }
+
+    public void setGeo(String geo) {
+        this.geo = geo == null ? null : geo.trim();
+    }
 }

+ 4 - 8
operation_manager/src/main/java/com/huaxu/task/controller/PlanManageController.java

@@ -2,18 +2,14 @@ package com.huaxu.task.controller;
 
 import com.huaxu.model.AjaxMessage;
 import com.huaxu.model.ResultStatus;
-import com.huaxu.process.entity.ProcessDefinition;
-import com.huaxu.process.entity.UserForm;
 import com.huaxu.task.entity.PlanManage;
 import com.huaxu.task.service.PlanManageService;
+import com.huaxu.util.DatesUtil;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
-import sun.plugin.dom.exception.PluginNotSupportedException;
-
-import java.time.LocalDateTime;
 import java.util.Date;
 
 @RestController
@@ -50,10 +46,11 @@ public class PlanManageController {
                                            String taskContent,
                                            String taskAreaShape,
                                            String taskAreaName,
-                                           String createBy
-                                         ) {
+                                           String createBy) {
+        String planId=DatesUtil.formatDate(new Date(),"yyyyMMddHHmmss")+String.valueOf((int) (Math.random()*(9999-1000)+1000));
         PlanManage record = new PlanManage();
         record.setUserId(userId);
+        record.setPlanId(planId);
         record.setPlanName(planName);
         record.setTaskType(taskType);
         record.setPlanStartDate(planStartDate);
@@ -71,5 +68,4 @@ public class PlanManageController {
         }
         return new AjaxMessage(ResultStatus.ERROR);
     }
-
 }

+ 15 - 4
operation_manager/src/main/resources/mapper/order/WorkOrderManageMapper.xml

@@ -33,13 +33,14 @@
     <result column="update_by" property="updateBy" jdbcType="VARCHAR" />
     <result column="date_update" property="dateUpdate" jdbcType="DATE" />
     <result column="reject_reason" property="rejectReason" jdbcType="VARCHAR" />
+    <result column="geo" property="geo" jdbcType="VARCHAR" />
   </resultMap>
   <sql id="Base_Column_List" >
     id, task_no, task_desc, order_user_id, send_time, send_by, plan_finish_date, finish_date, 
     date_limit, urgency, address, contact_user, contact_phone, order_time, company_org_id, 
     department_org_id, order_status, event_type, order_type_id, order_pid, tenant_id, 
     process_instance_id, process_def_id, current_task_id, current_users, current_task_name, 
-    create_by, date_create, update_by, date_update, reject_reason
+    create_by, date_create, update_by, date_update, reject_reason, geo
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
     select 
@@ -62,7 +63,7 @@
       process_instance_id, process_def_id, current_task_id, 
       current_users, current_task_name, create_by, 
       date_create, update_by, date_update, 
-      reject_reason)
+      reject_reason, geo)
     values (#{id,jdbcType=INTEGER}, #{taskNo,jdbcType=VARCHAR}, #{taskDesc,jdbcType=VARCHAR}, 
       #{orderUserId,jdbcType=VARCHAR}, #{sendTime,jdbcType=DATE}, #{sendBy,jdbcType=VARCHAR}, 
       #{planFinishDate,jdbcType=DATE}, #{finishDate,jdbcType=DATE}, #{dateLimit,jdbcType=VARCHAR}, 
@@ -73,7 +74,7 @@
       #{processInstanceId,jdbcType=VARCHAR}, #{processDefId,jdbcType=VARCHAR}, #{currentTaskId,jdbcType=VARCHAR}, 
       #{currentUsers,jdbcType=VARCHAR}, #{currentTaskName,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, 
       #{dateCreate,jdbcType=DATE}, #{updateBy,jdbcType=VARCHAR}, #{dateUpdate,jdbcType=DATE}, 
-      #{rejectReason,jdbcType=VARCHAR})
+      #{rejectReason,jdbcType=VARCHAR}, #{geo,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.huaxu.order.entity.WorkOrderManage" >
     insert into sc_work_order_manage
@@ -171,6 +172,9 @@
       <if test="rejectReason != null" >
         reject_reason,
       </if>
+      <if test="geo != null" >
+        geo,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
       <if test="id != null" >
@@ -266,6 +270,9 @@
       <if test="rejectReason != null" >
         #{rejectReason,jdbcType=VARCHAR},
       </if>
+      <if test="geo != null" >
+        #{geo,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.huaxu.order.entity.WorkOrderManage" >
@@ -361,6 +368,9 @@
       <if test="rejectReason != null" >
         reject_reason = #{rejectReason,jdbcType=VARCHAR},
       </if>
+      <if test="geo != null" >
+        geo = #{geo,jdbcType=VARCHAR},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
@@ -395,7 +405,8 @@
       date_create = #{dateCreate,jdbcType=DATE},
       update_by = #{updateBy,jdbcType=VARCHAR},
       date_update = #{dateUpdate,jdbcType=DATE},
-      reject_reason = #{rejectReason,jdbcType=VARCHAR}
+      reject_reason = #{rejectReason,jdbcType=VARCHAR},
+      geo = #{geo,jdbcType=VARCHAR}
     where id = #{id,jdbcType=INTEGER}
   </update>
 </mapper>