anderx 1 год назад
Родитель
Сommit
40f79f7a70

+ 5 - 1
src/main/java/com/goafanti/common/dao/TTaskLogMapper.java

@@ -2,9 +2,11 @@ package com.goafanti.common.dao;
 
 import com.goafanti.common.model.TTaskLog;
 import com.goafanti.common.model.TTaskLogExample;
-import java.util.List;
+import com.goafanti.order.bo.OutTTaskLog;
 import org.apache.ibatis.annotations.Param;
 
+import java.util.List;
+
 public interface TTaskLogMapper {
     /**
      * This method was generated by MyBatis Generator.
@@ -95,4 +97,6 @@ public interface TTaskLogMapper {
     int updateByPrimaryKey(TTaskLog record);
 
 	void updateDimissionTransfer(@Param("aid")String aid, @Param("transferId")String transferId);
+
+    List<OutTTaskLog> selectByTid(Integer id);
 }

+ 10 - 0
src/main/java/com/goafanti/common/mapper/TTaskLogMapper.xml

@@ -203,6 +203,7 @@
       <include refid="Example_Where_Clause" />
     </if>
   </select>
+
   <update id="updateByExampleSelective" parameterType="map">
     <!--
       WARNING - @mbg.generated
@@ -288,4 +289,13 @@
       task_receiver = #{transferId,jdbcType=VARCHAR}
     where task_receiver = #{aid,jdbcType=VARCHAR}
   </update>
+
+
+  <select id="selectByTid" resultType="com.goafanti.order.bo.OutTTaskLog">
+    select a.id,b.name taskAllocatorName,c.name taskReceiverName,a.create_time createTime
+    from t_task_log a
+           left join admin b on a.task_allocator =b.id
+           left join admin c on a.task_receiver =c.id
+    where task_id = #{id}
+  </select>
 </mapper>

+ 3 - 0
src/main/java/com/goafanti/common/model/TTaskLog.java

@@ -1,5 +1,7 @@
 package com.goafanti.common.model;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
+
 import java.util.Date;
 
 public class TTaskLog {
@@ -152,6 +154,7 @@ public class TTaskLog {
      *
      * @mbg.generated Tue Dec 04 15:28:04 CST 2018
      */
+    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
     public Date getCreateTime() {
         return createTime;
     }

+ 28 - 0
src/main/java/com/goafanti/order/bo/OutTTaskLog.java

@@ -0,0 +1,28 @@
+package com.goafanti.order.bo;
+
+import com.goafanti.common.model.TTaskLog;
+
+public class OutTTaskLog extends TTaskLog {
+
+
+    private String taskAllocatorName;
+
+    private String taskReceiverName;
+
+
+    public String getTaskAllocatorName() {
+        return taskAllocatorName;
+    }
+
+    public void setTaskAllocatorName(String taskAllocatorName) {
+        this.taskAllocatorName = taskAllocatorName;
+    }
+
+    public String getTaskReceiverName() {
+        return taskReceiverName;
+    }
+
+    public void setTaskReceiverName(String taskReceiverName) {
+        this.taskReceiverName = taskReceiverName;
+    }
+}

+ 10 - 0
src/main/java/com/goafanti/order/controller/OrderProjectApiController.java

@@ -228,6 +228,16 @@ public class OrderProjectApiController extends CertifyApiController {
 		res.setData(orderProjectService.TaskLogList(id));
 		return res;
 	}
+
+	/**
+	 * 任务派单日志
+	 */
+	@RequestMapping(value="/dispatchTaskLog" ,method = RequestMethod.GET)
+	public Result dispatchTaskLog(Integer id){
+		Result res=new Result();
+		res.setData(orderProjectService.dispatchTaskLog(id));
+		return res;
+	}
 	/** 任务文件上传 **/
 	@RequestMapping(value = "/uploadOrderTaskFile", method = RequestMethod.POST)
 	public Result uploadOrderTaskFile(HttpServletRequest req,String sign){

+ 1 - 0
src/main/java/com/goafanti/order/service/OrderProjectService.java

@@ -148,4 +148,5 @@ public interface OrderProjectService {
 
     Object updateSatisfactionDegree(Integer id, Integer formRetrieve, Integer satisfactionDegree, String satisfactionDegreeUrl);
 
+	Object dispatchTaskLog(Integer id);
 }

+ 5 - 0
src/main/java/com/goafanti/order/service/impl/OrderProjectServiceImpl.java

@@ -1981,4 +1981,9 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 		return tOrderTaskMapper.updateByPrimaryKeySelective(in);
 	}
 
+	@Override
+	public Object dispatchTaskLog(Integer id) {
+		return tTaskLogMapper.selectByTid(id);
+	}
+
 }