Commit 746eb729 authored by mlchun's avatar mlchun

PensionOrder更新

parent 114e12df
......@@ -18,7 +18,6 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.models.auth.In;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
......@@ -76,7 +75,7 @@ public class PensionOrderController {
@Login
@GetMapping("getOrderPageByStatus")
@ApiOperation(value = "根据状态返回订单(志愿者)", notes = "不能查看未接单订单")
@ApiOperation(value = "根据状态返回订单(志愿者)")
@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") ,
......
......@@ -71,7 +71,7 @@ public class PensionServiceController {
public Result<PensionServiceDTO> getByServiceTypeId(@PathVariable("serviceTypeId") Long serviceTypeId){
List<PensionServiceDTO> data = baseMapper.selectList(
new QueryWrapper<PensionServiceDTO>().lambda()
.eq(PensionServiceDTO::getServiceTypeId,serviceTypeId));
.eq(PensionServiceDTO::getServiceParentId,serviceTypeId));
return new Result<PensionServiceDTO>().ok(data.get(0));
}
......
......@@ -103,6 +103,7 @@ public class PensionOrderServiceImpl extends CrudServiceImpl<PensionOrderDao, Pe
public PageData<PensionOrderDTO> getElderAllOrderOrByStatusPage(Map<String, Object> params, Long creator, Integer status) {
IPage<PensionOrderEntity> page = getPage(params, Constant.CREATE_DATE, false);
List<PensionOrderDTO> list = pensionOrderDao.getElderAllOrderOrByStatusList(params, creator, status);
page.setTotal(list.size());
return getPageData(list, page.getTotal(), PensionOrderDTO.class);
}
......
......@@ -90,7 +90,7 @@ public class PensionServiceTypeServiceImpl extends CrudServiceImpl<PensionServic
List<PensionServiceTypeDTO> resultList = new ArrayList<>();
for (PensionServiceEntity pensionService:pensionServices) {
PensionServiceTypeDTO pensionServiceTypeDTO = get(pensionService.getServiceTypeId());
PensionServiceTypeDTO pensionServiceTypeDTO = get(pensionService.getServiceParentId());
resultList.add(pensionServiceTypeDTO);
}
return resultList;
......
......@@ -19,6 +19,9 @@
<result property="orderRecipientName" column="order_recipient_name"/>
<result property="orderRecipientTime" column="order_recipient_time"/>
<result property="orderRecipientPhone" column="order_recipient_phone"/>
<result property="actPrice" column="act_price"/>
<result property="communityName" column="community_name"/>
<result property="communityId" column="community_id"/>
<result property="deptId" column="dept_id"/>
<result property="creator" column="creator"/>
<result property="creatorName" column="creator_name"/>
......@@ -29,75 +32,91 @@
</resultMap>
<select id="getOrderInfoByIdAndStatus" resultType="io.hmit.modules.serviceOrder.entity.PensionOrderEntity">
SELECT * FROM pension_order WHERE pension_order.id = #{orderId} and pension_order.status = #{status}
SELECT po.id, po.order_num, po.status, po.status_name, po.address, po.service_id, po.service_name,
po.appointment_person, po.appointment_phone, po.appointment_time, po.remark,
po.order_recipient_id, po.order_recipient_name, po.order_recipient_time, po.order_recipient_phone,
po.act_price, po.community_name, po.community_id, po.dept_id,
po.creator, po.creator_name, po.creator_tel, po.create_date
FROM pension_order po
WHERE po.id = #{orderId} AND po.status = #{status}
</select>
<select id="getOrderPageByStatusOrUserId" resultType="io.hmit.modules.serviceOrder.dto.PensionOrderDTO">
select po.id, po.order_num, po.status, po.status_name, po.address, po.service_id, po.service_name,
po.appointment_person, po.appointment_phone, po.appointment_time, po.remark, po.order_recipient_id,
po.order_recipient_name, po.order_recipient_phone, po.dept_id, po.creator, po.creator_name,
po.creator_tel, po.create_date, po.update_date, po.act_price, ps.icon
from pension_order po, pension_service ps
where po.service_id = ps.id
SELECT po.id, po.order_num, po.status, po.status_name, po.address, po.service_id, po.service_name,
po.appointment_person, po.appointment_phone, po.appointment_time, po.remark,
po.order_recipient_id, po.order_recipient_name, po.order_recipient_time, po.order_recipient_phone,
po.act_price, po.community_name, po.community_id, po.dept_id,
po.creator, po.creator_name, po.creator_tel, po.create_date,
ps.icon
FROM pension_order po, pension_service ps
WHERE po.service_id = ps.id
<if test="status != null and status == 0">
<if test="userId != null">
and order_recipient_id is null
AND po.order_recipient_id IS NULL
</if>
and po.status = 0
AND po.status = 0
</if>
<if test="status != null and status != 0">
<if test="userId != null">
and order_recipient_id = #{userId}
AND po.order_recipient_id = #{userId}
</if>
and po.status = #{status}
AND po.status = #{status}
</if>
<if test="status == null and userId != null">
and order_recipient_id = #{userId}
AND po.order_recipient_id = #{userId}
</if>
</select>
<select id="getOrderInfoByIdAndUserIdOrStatus" resultType="io.hmit.modules.serviceOrder.dto.PensionOrderDTO">
select po.id, po.order_num, po.status, po.status_name, po.address, po.service_id, po.service_name,
po.appointment_person, po.appointment_phone, po.appointment_time, po.remark, po.order_recipient_id,
po.order_recipient_name, po.order_recipient_phone, po.dept_id, po.creator, po.creator_name,
po.creator_tel, po.create_date, po.update_date, po.act_price, ps.icon
from pension_order po, pension_service ps
where po.service_id = ps.id and po.id = #{orderId}
SELECT po.id, po.order_num, po.status, po.status_name, po.address, po.service_id, po.service_name,
po.appointment_person, po.appointment_phone, po.appointment_time, po.remark,
po.order_recipient_id, po.order_recipient_name, po.order_recipient_time, po.order_recipient_phone,
po.act_price, po.community_name, po.community_id, po.dept_id,
po.creator, po.creator_name, po.creator_tel, po.create_date,
ps.icon
FROM pension_order po, pension_service ps
WHERE po.service_id = ps.id AND po.id = #{orderId}
<if test="userId != null">
and po.order_recipient_id = #{userId}
AND po.order_recipient_id = #{userId}
</if>
<if test="status != null">
and po.status = #{status}
AND po.status = #{status}
</if>
</select>
<select id="getTodayNoProceedOrderPage" resultType="io.hmit.modules.serviceOrder.dto.PensionOrderDTO">
select po.id, po.order_num, po.status, po.status_name, po.address, po.service_id, po.service_name,
po.appointment_person, po.appointment_phone, po.appointment_time, po.remark, po.order_recipient_id,
po.order_recipient_name, po.order_recipient_phone, po.dept_id, po.creator, po.creator_name,
po.creator_tel, po.create_date, po.update_date, po.act_price, ps.icon
from pension_order po, pension_service ps
where po.service_id = ps.id and TO_DAYS(appointment_time) = TO_DAYS(NOW()) and po.status = 0 and order_recipient_id IS NULL
SELECT po.id, po.order_num, po.status, po.status_name, po.address, po.service_id, po.service_name,
po.appointment_person, po.appointment_phone, po.appointment_time, po.remark,
po.order_recipient_id, po.order_recipient_name, po.order_recipient_time, po.order_recipient_phone,
po.act_price, po.community_name, po.community_id, po.dept_id,
po.creator, po.creator_name, po.creator_tel, po.create_date,
ps.icon
FROM pension_order po, pension_service ps
WHERE po.service_id = ps.id AND TO_DAYS(appointment_time) = TO_DAYS(NOW()) AND po.status = 0 AND po.order_recipient_id IS NULL
</select>
<select id="getElderTodayOrderPage" resultType="io.hmit.modules.serviceOrder.dto.PensionOrderDTO">
select po.id, po.order_num, po.status, po.status_name, po.address, po.service_id, po.service_name,
po.appointment_person, po.appointment_phone, po.appointment_time, po.remark, po.order_recipient_id,
po.order_recipient_name, po.order_recipient_phone, po.dept_id, po.creator, po.creator_name,
po.creator_tel, po.create_date, po.update_date, po.act_price, ps.icon
from pension_order po, pension_service ps
where po.service_id = ps.id and TO_DAYS(appointment_time) = TO_DAYS(NOW()) and po.creator = #{creator}
SELECT po.id, po.order_num, po.status, po.status_name, po.address, po.service_id, po.service_name,
po.appointment_person, po.appointment_phone, po.appointment_time, po.remark,
po.order_recipient_id, po.order_recipient_name, po.order_recipient_time, po.order_recipient_phone,
po.act_price, po.community_name, po.community_id, po.dept_id,
po.creator, po.creator_name, po.creator_tel, po.create_date,
ps.icon
FROM pension_order po, pension_service ps
WHERE po.service_id = ps.id AND TO_DAYS(appointment_time) = TO_DAYS(NOW()) AND po.creator = #{creator}
</select>
<select id="getElderAllOrderOrByStatusList" resultType="io.hmit.modules.serviceOrder.dto.PensionOrderDTO">
select po.id, po.order_num, po.status, po.status_name, po.address, po.service_id, po.service_name,
po.appointment_person, po.appointment_phone, po.appointment_time, po.remark, po.order_recipient_id,
po.order_recipient_name, po.order_recipient_phone, po.dept_id, po.creator, po.creator_name,
po.creator_tel, po.create_date, po.update_date, po.act_price, ps.icon
from pension_order po, pension_service ps
where po.service_id = ps.id and po.creator = #{creator}
SELECT po.id, po.order_num, po.status, po.status_name, po.address, po.service_id, po.service_name,
po.appointment_person, po.appointment_phone, po.appointment_time, po.remark,
po.order_recipient_id, po.order_recipient_name, po.order_recipient_time, po.order_recipient_phone,
po.act_price, po.community_name, po.community_id, po.dept_id,
po.creator, po.creator_name, po.creator_tel, po.create_date,
ps.icon
FROM pension_order po, pension_service ps
WHERE po.service_id = ps.id AND po.creator = #{creator}
<if test="status != null">
and po.status = #{status}
AND po.status = #{status}
</if>
</select>
......
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