Commit f8574e3b authored by mlchun's avatar mlchun

1.订单服务人员评价

2.订单用户评价
parent 3482883f
package io.hmit.modules.serviceOrder.controller; package io.hmit.modules.serviceOrder.controller;
import com.alibaba.fastjson.JSON;
import io.hmit.annotation.Login; import io.hmit.annotation.Login;
import io.hmit.annotation.LoginUser; import io.hmit.annotation.LoginUser;
import io.hmit.common.constant.Constant; import io.hmit.common.constant.Constant;
...@@ -27,6 +28,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -27,6 +28,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore; import springfox.documentation.annotations.ApiIgnore;
import java.net.URLDecoder;
import java.util.Date; import java.util.Date;
import java.util.Map; import java.util.Map;
...@@ -219,16 +221,13 @@ public class PensionOrderController { ...@@ -219,16 +221,13 @@ public class PensionOrderController {
@Login @Login
@PostMapping("staffFinishedOrder") @PostMapping("staffFinishedOrder")
@ApiOperation(value = "服务人员完成订单接口(服务人员)") @ApiOperation(value = "服务人员完成订单接口(服务人员)")
// @ApiImplicitParams({ public Result staffFinishedOrder(@RequestBody String dto){
// @ApiImplicitParam(name = "id", value = "订单ID", paramType = "query", required = true, dataType="long") , String todto = null;
// @ApiImplicitParam(name = "content", value = "描述服务内容", paramType = "query", required = true, dataType="String") , try {
// @ApiImplicitParam(name = "images", value = "图片", allowMultiple = true, paramType = "query", dataType="String") , todto = URLDecoder.decode(dto,"UTF-8");
// @ApiImplicitParam(name = "voice", value = "语音", allowMultiple = true, paramType = "query", dataType="String") , }catch (Exception ignored){}
// @ApiImplicitParam(name = "roleId", value = "用户角色", paramType = "query", dataType="String") , StaffFinishDTO staffFinishDTO = JSON.parseObject(todto.substring(4), StaffFinishDTO.class);
// @ApiImplicitParam(name = "location", value = "经纬定位", paramType = "query", dataType="String") pensionOrderService.staffFinishedOrder(staffFinishDTO);
// })
public Result staffFinishedOrder(StaffFinishDTO dto){
pensionOrderService.staffFinishedOrder(dto);
return new Result(); return new Result();
} }
...@@ -311,9 +310,15 @@ public class PensionOrderController { ...@@ -311,9 +310,15 @@ public class PensionOrderController {
@Login @Login
@PostMapping("reservationOrder") @PostMapping("reservationOrder")
@ApiOperation("预约保存") @ApiOperation("预约保存")
public Result reservationOrder(@ApiIgnore @LoginUser UserEntity user, ReservationDTO dto){ public Result reservationOrder(@ApiIgnore @LoginUser UserEntity user, @RequestBody String dto){
PensionOrderDTO data = new PensionOrderDTO().assemblePensionOrder(dto,user); String todto = null;
try {
todto = URLDecoder.decode(dto,"UTF-8");
}catch (Exception ignored){}
ReservationDTO reservationDTO = JSON.parseObject(todto.substring(4), ReservationDTO.class);
PensionOrderDTO data = new PensionOrderDTO().assemblePensionOrder(reservationDTO,user);
data.setCommunityId(user.getCommunityId()); data.setCommunityId(user.getCommunityId());
data.setCommunityName(user.getCommunityName()); data.setCommunityName(user.getCommunityName());
pensionOrderService.reservation(data); pensionOrderService.reservation(data);
......
package io.hmit.modules.serviceOrder.controller; package io.hmit.modules.serviceOrder.controller;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import io.hmit.annotation.Login; import io.hmit.annotation.Login;
import io.hmit.common.constant.Constant; import io.hmit.common.constant.Constant;
import io.hmit.common.page.PageData; import io.hmit.common.page.PageData;
...@@ -18,7 +20,9 @@ import io.swagger.annotations.ApiOperation; ...@@ -18,7 +20,9 @@ import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore; import springfox.documentation.annotations.ApiIgnore;
import springfox.documentation.spring.web.json.Json;
import java.net.URLDecoder;
import java.util.Map; import java.util.Map;
...@@ -63,11 +67,16 @@ public class PensionOrderEvaluationController { ...@@ -63,11 +67,16 @@ public class PensionOrderEvaluationController {
@Login @Login
@PostMapping @PostMapping
@ApiOperation("保存") @ApiOperation("保存")
public Result save(PensionOrderEvaluationDTO dto){ public Result save(@RequestBody String dto){
String todto = null;
try {
todto = URLDecoder.decode(dto,"UTF-8");
}catch (Exception ignored){}
PensionOrderEvaluationDTO pensionOrderEvaluationDTO = JSON.parseObject(todto.substring(4), PensionOrderEvaluationDTO.class);
pensionOrderEvaluationService.save(dto); pensionOrderEvaluationService.save(pensionOrderEvaluationDTO);
pensionOrderService.evaluationDone(dto); pensionOrderService.evaluationDone(pensionOrderEvaluationDTO);
return new Result(); return new Result();
} }
......
...@@ -71,5 +71,5 @@ mybatis-plus: ...@@ -71,5 +71,5 @@ mybatis-plus:
call-setters-on-nulls: true call-setters-on-nulls: true
jdbc-type-for-null: 'null' jdbc-type-for-null: 'null'
QR: QR:
# download-path: /home/resourse/bsqzc/ D:/123/ /home/websoft/java_jar/bl_workorder/myfile/ # download-path: D:/123/ /home/websoft/java_jar/pension_service/myfile/
download-path: D:/123/ download-path: D:/123/
\ No newline at end of file
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<select id="findByOrderId" resultType="io.hmit.modules.serviceOrder.dto.PensionOrderEvaluationDTO"> <select id="findByOrderId" resultType="io.hmit.modules.serviceOrder.dto.PensionOrderEvaluationDTO">
SELECT * FROM pension_order_evaluation SELECT * FROM pension_order_evaluation
WHERE order_id = #{orderId} WHERE order_id = #{orderId} limit 1
</select> </select>
</mapper> </mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment