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