需求详情
This commit is contained in:
parent
27b5de0b91
commit
8ce8e73ed3
|
|
@ -9,6 +9,8 @@ import com.bonus.material.lease.domain.MaLeaseDto;
|
||||||
import com.bonus.material.lease.domain.MaLeaseInfo;
|
import com.bonus.material.lease.domain.MaLeaseInfo;
|
||||||
import com.bonus.material.lease.domain.vo.MaLeaseVo;
|
import com.bonus.material.lease.domain.vo.MaLeaseVo;
|
||||||
import com.bonus.material.lease.service.MaLeaseInfoService;
|
import com.bonus.material.lease.service.MaLeaseInfoService;
|
||||||
|
import com.bonus.material.order.domain.OrderDetailDto;
|
||||||
|
import com.bonus.material.order.domain.OrderInfoDto;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
@ -55,6 +57,13 @@ public class MaLeaseInfoController extends BaseController {
|
||||||
return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, list));
|
return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, list));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "获取单个订单详情")
|
||||||
|
@GetMapping("/getLeaseStatusCount")
|
||||||
|
public AjaxResult getOrderStatusCount(MaLeaseInfo dto) {
|
||||||
|
List<MaLeaseInfo> list = leaseInfoService.getLeaseStatusCount(dto);
|
||||||
|
return success(list);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询出租方需求列表
|
* 查询出租方需求列表
|
||||||
* @param dto
|
* @param dto
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,9 @@ public class MaLeaseInfo extends BaseEntity implements Serializable {
|
||||||
*/
|
*/
|
||||||
private Boolean isSubmit;
|
private Boolean isSubmit;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "true:出租方 false:承租方")
|
||||||
|
private boolean flag;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 主键ID
|
* 主键ID
|
||||||
*/
|
*/
|
||||||
|
|
@ -153,5 +156,7 @@ public class MaLeaseInfo extends BaseEntity implements Serializable {
|
||||||
|
|
||||||
@ApiModelProperty(value = "需求详情")
|
@ApiModelProperty(value = "需求详情")
|
||||||
private List<MaLeaseDetails> detailsList;
|
private List<MaLeaseDetails> detailsList;
|
||||||
|
|
||||||
|
private Integer leaseCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -125,4 +125,6 @@ public interface MaLeaseInfoMapper {
|
||||||
Integer getTodayLeaseOrderCount();
|
Integer getTodayLeaseOrderCount();
|
||||||
|
|
||||||
MaLeaseInfo getDevInfoById(Integer id);
|
MaLeaseInfo getDevInfoById(Integer id);
|
||||||
|
|
||||||
|
List<MaLeaseInfo> getLeaseStatusCount(MaLeaseInfo info);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,8 @@ public interface MaLeaseInfoService {
|
||||||
*/
|
*/
|
||||||
List<MaLeaseVo> leaseList(MaLease maLease);
|
List<MaLeaseVo> leaseList(MaLease maLease);
|
||||||
|
|
||||||
|
List<MaLeaseInfo> getLeaseStatusCount(MaLeaseInfo info);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 出租方立即接单
|
* 出租方立即接单
|
||||||
* @param maLeaseInfo
|
* @param maLeaseInfo
|
||||||
|
|
|
||||||
|
|
@ -366,6 +366,16 @@ public class MaLeaseInfoServiceImpl implements MaLeaseInfoService {
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<MaLeaseInfo> getLeaseStatusCount(MaLeaseInfo info) {
|
||||||
|
//true:出租方 false:承租方
|
||||||
|
if (info.isFlag()) {
|
||||||
|
info.setOrderCompany(String.valueOf(SecurityUtils.getLoginUser().getSysUser().getCompanyId()));
|
||||||
|
} else {
|
||||||
|
info.setPublishCompany(String.valueOf(SecurityUtils.getLoginUser().getSysUser().getCompanyId()));
|
||||||
|
}
|
||||||
|
return leaseInfoMapper.getLeaseStatusCount(info);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 出租方立即接单
|
* 出租方立即接单
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -466,4 +466,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
WHERE
|
WHERE
|
||||||
mli.id = #{id}
|
mli.id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getLeaseStatusCount" resultType="com.bonus.material.lease.domain.MaLeaseInfo">
|
||||||
|
select a.lease_status as leaseStatus, count(a.lease_status) as leaseCount from
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
mli.id,
|
||||||
|
min(mli.lease_status) as lease_status
|
||||||
|
FROM
|
||||||
|
ma_lease_info mli
|
||||||
|
WHERE
|
||||||
|
1=1
|
||||||
|
<if test="orderCompany != null">
|
||||||
|
AND mli.order_company = #{orderCompany}
|
||||||
|
</if>
|
||||||
|
<if test="publishCompany != null">
|
||||||
|
AND mli.publish_company = #{publishCompany}
|
||||||
|
</if>
|
||||||
|
GROUP BY id
|
||||||
|
) a
|
||||||
|
group by a.lease_status
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue