bug优化
This commit is contained in:
parent
d6c57e633a
commit
3c33812401
|
|
@ -2,6 +2,7 @@ package com.bonus.material.lease.domain;
|
|||
|
||||
import com.bonus.common.core.web.domain.BaseEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
|
@ -71,4 +72,9 @@ public class MaLeaseDto extends BaseEntity {
|
|||
|
||||
private String orderUser;
|
||||
|
||||
@ApiModelProperty(value = "需求发布公司")
|
||||
private String publishCompany;
|
||||
|
||||
@ApiModelProperty(value = "接单公司")
|
||||
private String orderCompany;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,6 +81,9 @@ public class MaLeaseInfo extends BaseEntity implements Serializable {
|
|||
*/
|
||||
private String publishUser;
|
||||
|
||||
@ApiModelProperty(value = "需求发布公司")
|
||||
private String publishCompany;
|
||||
|
||||
/**
|
||||
* 需求截止日期(年月日)
|
||||
*/
|
||||
|
|
@ -107,6 +110,9 @@ public class MaLeaseInfo extends BaseEntity implements Serializable {
|
|||
*/
|
||||
private String orderUser;
|
||||
|
||||
@ApiModelProperty(value = "接单公司")
|
||||
private String orderCompany;
|
||||
|
||||
/**
|
||||
* 接单时间
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -179,8 +179,8 @@ public class MaLeaseInfoServiceImpl implements MaLeaseInfoService {
|
|||
@Override
|
||||
public List<MaLeaseVo> list(MaLeaseDto dto) {
|
||||
//获取当前登录人id
|
||||
Long userId = SecurityUtils.getUserId();
|
||||
dto.setCreateBy(String.valueOf(userId));
|
||||
String companyId = String.valueOf(SecurityUtils.getLoginUser().getSysUser().getCompanyId());
|
||||
dto.setPublishCompany(companyId);
|
||||
List<MaLeaseVo> list = leaseInfoMapper.list(dto);
|
||||
//查询列表中数据,如果需求截止日期超过当前,则修改状态为已过期
|
||||
for (MaLeaseVo maLeaseVo : list) {
|
||||
|
|
@ -260,7 +260,9 @@ public class MaLeaseInfoServiceImpl implements MaLeaseInfoService {
|
|||
return AjaxResult.error(HttpCodeEnum.TO_PARAM_NULL.getCode(), HttpCodeEnum.TO_PARAM_NULL.getMsg());
|
||||
}
|
||||
Long userId = SecurityUtils.getUserId();
|
||||
Long companyId = SecurityUtils.getLoginUser().getSysUser().getCompanyId();
|
||||
maLeaseInfo.setOrderUser(String.valueOf(userId));
|
||||
maLeaseInfo.setOrderCompany(String.valueOf(companyId));
|
||||
maLeaseInfo.setOrderTime(DateUtils.getNowDate());
|
||||
maLeaseInfo.setLeaseStatus(LeaseInfoEnum.LEASE_ORDER_RECEIVED.getStatus());
|
||||
int result = leaseInfoMapper.updateDevInfo(maLeaseInfo);
|
||||
|
|
@ -274,7 +276,7 @@ public class MaLeaseInfoServiceImpl implements MaLeaseInfoService {
|
|||
*/
|
||||
@Override
|
||||
public List<MaLeaseVo> rentList(MaLeaseDto dto) {
|
||||
dto.setOrderUser(String.valueOf(SecurityUtils.getUserId()));
|
||||
dto.setOrderCompany(String.valueOf(SecurityUtils.getLoginUser().getSysUser().getCompanyId()));
|
||||
return leaseInfoMapper.rentList(dto);
|
||||
}
|
||||
|
||||
|
|
@ -291,6 +293,7 @@ public class MaLeaseInfoServiceImpl implements MaLeaseInfoService {
|
|||
maLeaseInfo.setLeaseStatus(LeaseInfoEnum.LEASE_PENDING_ORDER.getStatus());
|
||||
maLeaseInfo.setStartTime(DateUtils.getNowDate());
|
||||
maLeaseInfo.setPublishUser(String.valueOf(userId));
|
||||
maLeaseInfo.setPublishCompany(String.valueOf(SecurityUtils.getLoginUser().getSysUser().getCompanyId()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="orderUser != null and orderUser != ''">order_user = #{orderUser},</if>
|
||||
<if test="orderCompany != null and orderCompany != ''">order_company = #{orderCompany},</if>
|
||||
<if test="orderTime != null">order_time = #{orderTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
|
|
@ -196,7 +197,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN bm_company_info c ON m.company_id = c.company_id
|
||||
LEFT JOIN sys_user su ON m.publish_user = su.user_id
|
||||
LEFT JOIN sys_user su1 ON m.order_user = su1.user_id
|
||||
WHERE 1 = 1 and m.create_by = #{createBy}
|
||||
WHERE 1 = 1 and m.publish_company = #{publishCompany}
|
||||
<if test="leaseCode != null and leaseCode != ''">
|
||||
and m.lease_code like concat('%',#{leaseCode},'%')
|
||||
</if>
|
||||
|
|
@ -378,7 +379,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN base_address b ON b.id = m.area_id
|
||||
LEFT JOIN sys_user su ON m.publish_user = su.user_id
|
||||
LEFT JOIN sys_user su1 ON m.order_user = su1.user_id
|
||||
WHERE 1 = 1 and m.order_user = #{orderUser} and m.lease_status = '1'
|
||||
WHERE 1 = 1 and m.order_company = #{orderCompany} and m.lease_status = '1'
|
||||
<if test="leaseCode != null and leaseCode != ''">
|
||||
and m.lease_code like concat('%',#{leaseCode},'%')
|
||||
</if>
|
||||
|
|
|
|||
Loading…
Reference in New Issue