开业验收

This commit is contained in:
bianyadong
2024-04-22 19:10:25 +08:00
parent 6893413a96
commit 3dd6e5b6cb
9 changed files with 260 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
package com.cool.store.dao;
import com.cool.store.mapper.OpenAcceptanceInfoMapper;
import com.cool.store.request.OpenAcceptanceRequest;
import com.cool.store.vo.OpenAcceptanceInfoListVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import javax.annotation.Resource;
import java.util.List;
/**
* @author byd
* @date 2024-04-22 14:48
*/
@Repository
public class OpenAcceptanceInfoDAO {
@Resource
private OpenAcceptanceInfoMapper openAcceptanceInfoMapper;
public List<OpenAcceptanceInfoListVO> openAcceptanceList(OpenAcceptanceRequest openAcceptanceRequest){
return openAcceptanceInfoMapper.openAcceptanceList(openAcceptanceRequest);
}
}

View File

@@ -1,7 +1,15 @@
package com.cool.store.mapper;
import com.cool.store.entity.OpenAcceptanceInfoDO;
import com.cool.store.request.OpenAcceptanceRequest;
import com.cool.store.vo.OpenAcceptanceInfoListVO;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;
import java.util.List;
public interface OpenAcceptanceInfoMapper extends Mapper<OpenAcceptanceInfoDO> {
List<OpenAcceptanceInfoListVO> openAcceptanceList(@Param("openAcceptance") OpenAcceptanceRequest openAcceptanceRequest);
}

View File

@@ -10,6 +10,7 @@
<result column="plan_open_time" jdbcType="TIMESTAMP" property="planOpenTime" />
<result column="acceptance_status" jdbcType="TINYINT" property="acceptanceStatus" />
<result column="acceptance_time" jdbcType="TIMESTAMP" property="acceptanceTime" />
<result column="acceptance_user_id" jdbcType="TIMESTAMP" property="acceptanceUserId" />
<result column="system_setup" jdbcType="TINYINT" property="systemSetup" />
<result column="license_processing" jdbcType="TINYINT" property="licenseProcessing" />
<result column="franchise_fee_deposit" jdbcType="TINYINT" property="franchiseFeeDeposit" />
@@ -26,4 +27,46 @@
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<select id="openAcceptanceList" resultType="com.cool.store.vo.OpenAcceptanceInfoListVO">
SELECT
o.id AS openAcceptanceInfoId,
s.id AS shopId,
s.shop_name AS shopName,
s.shop_code AS shopCode,
s.shop_manager_user_id AS shopManagerUserId,
s.supervisor_user_id AS supervisorUserId,
l.username AS partnerName,
l.mobile AS partnerMobile,
l.region_id AS regionId,
o.plan_open_time AS planOpenTime,
o.acceptance_status AS acceptanceStatus,
l.investment_manager AS investmentManager,
l.acceptance_time AS acceptanceTime,
o.acceptance_user_id AS acceptanceUserId
FROM
xfsg_open_acceptance_info o
LEFT JOIN xfsg_shop_info s ON o.shop_id = s.id
LEFT JOIN xfsg_line_info l ON l.id = s.line_id
<where>
<if test="openAcceptance.shopName != null and openAcceptance.shopName != ''">
s.shop_name LIKE CONCAT('%',#{shopName},'%')
</if>
<if test="openAcceptance.supervisorUserId != null and openAcceptance.supervisorUserId != ''">
s.supervisor_user_id = #{supervisorUserId}
</if>
<if test="openAcceptance.investmentManager != null and openAcceptance.investmentManager != ''">
l.investment_manager =#{investmentManager}
</if>
<if test="openAcceptance.acceptanceStatus != null">
o.acceptance_status = #{acceptanceStatus}
</if>
<if test="openAcceptance.planOpenTimeBegin != null">
AND o.plan_open_time &gt;= #{planOpenTimeBegin}
</if>
<if test="openAcceptance.planOpenTimeEnd != null">
AND o.plan_open_time &lt;= #{planOpenTimeEnd}
</if>
</where>
</select>
</mapper>

View File

@@ -27,6 +27,12 @@ public class OpenAcceptanceInfoDO {
@Column(name = "acceptance_status")
private Byte acceptanceStatus;
/**
* 验收人
*/
@Column(name = "acceptance_user_id")
private String acceptanceUserId;
/**
* 验收时间
*/

View File

@@ -0,0 +1,36 @@
package com.cool.store.request;
import com.cool.store.common.PageBasicInfo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author byd
*/
@Data
@ApiModel
public class OpenAcceptanceRequest extends PageBasicInfo {
@ApiModelProperty("门店名称")
private String storeName;
@ApiModelProperty("区域")
private Long regionId;
@ApiModelProperty("验收状态 0:未验收 1:已验收")
private Integer acceptanceStatus;
@ApiModelProperty("计划开业时间-开始")
private Long planOpenTimeBegin;
@ApiModelProperty("计划开业时间-结束")
private Long planOpenTimeEnd;
@ApiModelProperty("招商经理")
private String investmentManager;
@ApiModelProperty("督导")
private String supervisorUserId;
}

View File

@@ -0,0 +1,61 @@
package com.cool.store.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* @author byd
* @date 2024-04-22 17:34
*/
@Data
public class OpenAcceptanceInfoListVO {
@ApiModelProperty("开业验收id")
private Long openAcceptanceInfoId;
@ApiModelProperty("店铺id")
private Long shopId;
@ApiModelProperty("门店名称")
private String shopName;
@ApiModelProperty("门店代码")
private String shopCode;
@ApiModelProperty("开店负责人id")
private String shopManagerUserId;
@ApiModelProperty("开店负责人名称")
private String shopManagerUserName;
@ApiModelProperty("督导id")
private String supervisorUserId;
@ApiModelProperty("督导名称")
private String supervisorUserName;
@ApiModelProperty("加盟商姓名")
private String partnerName;
@ApiModelProperty("手机号码")
private String partnerMobile;
@ApiModelProperty("战区Id")
private Long regionId;
@ApiModelProperty("战区名称")
private String regionName;
@ApiModelProperty("大区ID")
private Long largeRegionId;
@ApiModelProperty("大区名称")
private Long largeRegionName;
@ApiModelProperty("计划开业时间")
private Date planOpenTime;
@ApiModelProperty("验收状态 0:未验收 1:已验收")
private String acceptanceStatus;
@ApiModelProperty("招商经理id")
private String investmentManager;
@ApiModelProperty("招商经理名称")
private String investmentManagerName;
@ApiModelProperty("验收时间")
private Date acceptanceTime;
@ApiModelProperty("验收人id")
private String acceptanceUserId;
@ApiModelProperty("验收人名称")
private String acceptanceUserName;
}

View File

@@ -0,0 +1,14 @@
package com.cool.store.service;
import com.cool.store.request.OpenAcceptanceRequest;
import com.cool.store.vo.OpenAcceptanceInfoListVO;
import com.github.pagehelper.PageInfo;
/**
* @author byd
* @date 2024-04-22 14:41
*/
public interface OpenAcceptanceInfoService {
PageInfo<OpenAcceptanceInfoListVO> openAcceptanceList(OpenAcceptanceRequest openAcceptanceRequest);
}

View File

@@ -0,0 +1,30 @@
package com.cool.store.service.impl;
import com.cool.store.dao.OpenAcceptanceInfoDAO;
import com.cool.store.request.OpenAcceptanceRequest;
import com.cool.store.service.OpenAcceptanceInfoService;
import com.cool.store.vo.OpenAcceptanceInfoListVO;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
/**
* @author byd
* @date 2024-04-22 14:41
*/
@Service
public class OpenAcceptanceInfoServiceImpl implements OpenAcceptanceInfoService {
@Resource
private OpenAcceptanceInfoDAO openAcceptanceInfoDAO;
@Override
public PageInfo<OpenAcceptanceInfoListVO> openAcceptanceList(OpenAcceptanceRequest openAcceptanceRequest) {
PageHelper.startPage(openAcceptanceRequest.getPageNum(), openAcceptanceRequest.getPageSize());
List<OpenAcceptanceInfoListVO> resultList = openAcceptanceInfoDAO.openAcceptanceList(openAcceptanceRequest);
return new PageInfo<>(resultList);
}
}

View File

@@ -0,0 +1,35 @@
package com.cool.store.controller.webb;
import com.cool.store.request.OpenAcceptanceRequest;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.OpenAcceptanceInfoService;
import com.cool.store.vo.OpenAcceptanceInfoListVO;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* @Author byd
* @Date 2023/6/15 9:49
* @Version 1.0
*/
@RestController
@RequestMapping("pc/openAcceptanceInfo")
@Api(tags = "PC开业验收")
public class OpenAcceptanceInfoController {
@Resource
OpenAcceptanceInfoService openAcceptanceInfoService;
@GetMapping(path = "/openAcceptanceList")
@ApiOperation("开业验收列表")
public ResponseResult<PageInfo<OpenAcceptanceInfoListVO>> openAcceptanceList(OpenAcceptanceRequest openAcceptanceRequest) {
return ResponseResult.success(openAcceptanceInfoService.openAcceptanceList(openAcceptanceRequest));
}
}