装修验收代码
This commit is contained in:
@@ -27,6 +27,10 @@
|
||||
<result column="shop_location_screenshots" jdbcType="VARCHAR" property="shopLocationScreenshots"/>
|
||||
<result column="shop_doorway_photo" jdbcType="VARCHAR" property="shopDoorwayPhoto"/>
|
||||
<result column="shop_interior_photo" jdbcType="VARCHAR" property="shopInteriorPhoto"/>
|
||||
<result column="satisfaction" jdbcType="INTEGER" property="satisfaction"/>
|
||||
<result column="acceptance_attachment" jdbcType="VARCHAR" property="acceptanceAttachment"/>
|
||||
<result column="is_network_cable" jdbcType="BIT" property="isNetworkCable"/>
|
||||
<result column="back_kitchen_photo" jdbcType="VARCHAR" property="backKitchenPhoto"/>
|
||||
</resultMap>
|
||||
<sql id="baseColumn">
|
||||
id
|
||||
@@ -34,7 +38,8 @@
|
||||
decoration_planned_start_time,construction_completion_time,engineering_acceptance_signatures,
|
||||
operations_acceptance_signatures,partner_acceptance_signatures,
|
||||
create_time,update_time,deleted,plan_acceptance_time,actual_acceptance_time,booking_user,plan_exit_time,
|
||||
ks_account,verification_mobile,shop_location_screenshots,shop_doorway_photo,shop_interior_photo
|
||||
ks_account,verification_mobile,shop_location_screenshots,shop_doorway_photo,shop_interior_photo,
|
||||
satisfaction,acceptance_attachment,is_network_cable,back_kitchen_photo
|
||||
</sql>
|
||||
<insert id="initAcceptanceInfo">
|
||||
<foreach collection="list" index="index" item="item" separator=";">
|
||||
@@ -105,6 +110,18 @@
|
||||
<if test="shopInteriorPhoto !=null">
|
||||
shop_interior_photo =#{shopInteriorPhoto}
|
||||
</if>
|
||||
<if test="satisfaction !=null">
|
||||
satisfaction = #{satisfaction}
|
||||
</if>
|
||||
<if test="isNetworkCable !=null">
|
||||
is_network_cable = #{isNetworkCable}
|
||||
</if>
|
||||
<if test="acceptanceAttachment!=null and acceptanceAttachment!= ''">
|
||||
acceptance_attachment = #{acceptanceAttachment}
|
||||
</if>
|
||||
<if test="backKitchenPhoto !=null and backKitchenPhoto!=''">
|
||||
back_kitchen_photo = #{backKitchenPhoto}
|
||||
</if>
|
||||
</set>
|
||||
where shop_id = #{shopId}
|
||||
</update>
|
||||
|
||||
@@ -212,6 +212,7 @@
|
||||
<if test="keyWord != null and keyWord != '' ">
|
||||
and xsi.shop_name Like concat("%",#{keyWord},"%") or xsi.store_num Like concat("%",#{keyWord},"%")
|
||||
</if>
|
||||
order by xsi.update_time desc
|
||||
</select>
|
||||
<select id="platformBuildList" resultType="com.cool.store.response.PlatformBuildListResponse">
|
||||
select
|
||||
|
||||
@@ -25,4 +25,8 @@ public class ThreeAcceptanceDTO {
|
||||
@ApiModelProperty
|
||||
private Integer status;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return pic + remark + result + acceptanceTime + status;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,6 +127,54 @@ public class AcceptanceInfoDO {
|
||||
@Column(name = "shop_interior_photo")
|
||||
private String shopInteriorPhoto;
|
||||
|
||||
/**满意度0-低,1-中,2-高', */
|
||||
@Column(name = "satisfaction")
|
||||
private Integer satisfaction;
|
||||
/**
|
||||
* 网线安装 0-否 1-是
|
||||
*/
|
||||
@Column(name = "is_network_cable")
|
||||
private Boolean isNetworkCable;
|
||||
|
||||
//'验收单附件',
|
||||
@Column(name = "acceptance_attachment")
|
||||
private String acceptanceAttachment;
|
||||
|
||||
//'后厨照片',
|
||||
@Column(name = "back_kitchen_photo")
|
||||
private String backKitchenPhoto;
|
||||
|
||||
public Boolean getIsNetworkCable() {
|
||||
return isNetworkCable;
|
||||
}
|
||||
|
||||
public void setIsNetworkCable(Boolean networkCable) {
|
||||
isNetworkCable = networkCable;
|
||||
}
|
||||
|
||||
public Integer getSatisfaction() {
|
||||
return satisfaction;
|
||||
}
|
||||
|
||||
public void setSatisfaction(Integer satisfaction) {
|
||||
this.satisfaction = satisfaction;
|
||||
}
|
||||
|
||||
public String getAcceptanceAttachment() {
|
||||
return acceptanceAttachment;
|
||||
}
|
||||
|
||||
public void setAcceptanceAttachment(String acceptanceAttachment) {
|
||||
this.acceptanceAttachment = acceptanceAttachment;
|
||||
}
|
||||
|
||||
public String getBackKitchenPhoto() {
|
||||
return backKitchenPhoto;
|
||||
}
|
||||
|
||||
public void setBackKitchenPhoto(String backKitchenPhoto) {
|
||||
this.backKitchenPhoto = backKitchenPhoto;
|
||||
}
|
||||
|
||||
public String getKsAccount() {
|
||||
return ksAccount;
|
||||
|
||||
@@ -5,8 +5,10 @@ import com.cool.store.entity.AssessmentDataDO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
@@ -37,8 +39,20 @@ public class ThreeAcceptanceRequest {
|
||||
@ApiModelProperty("门店内景照片")
|
||||
private String shopInteriorPhoto;
|
||||
|
||||
@ApiModelProperty("满意度0-低,1-中,2-高',")
|
||||
private Integer satisfaction;
|
||||
|
||||
@ApiModelProperty("网线安装 false-否 true-是")
|
||||
private Boolean isNetworkCable;
|
||||
|
||||
@ApiModelProperty("验收单附件")
|
||||
private String acceptanceAttachment;
|
||||
|
||||
@ApiModelProperty("后厨照片")
|
||||
private String backKitchenPhoto;
|
||||
|
||||
public Boolean miniCheck(){
|
||||
if (StringUtils.isAnyBlank(this.shopLocationScreenshots)){
|
||||
if (StringUtils.isAnyBlank(this.partnerAcceptance.toString())|| ObjectUtils.anyNull(this.satisfaction,this.isNetworkCable)){
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -28,4 +28,16 @@ public class ThreeSignResponse {
|
||||
private String shopDoorwayPhoto;
|
||||
@ApiModelProperty("门店内景照片")
|
||||
private String shopInteriorPhoto;
|
||||
|
||||
@ApiModelProperty("满意度0-低,1-中,2-高',")
|
||||
private Integer satisfaction;
|
||||
|
||||
@ApiModelProperty("网线安装 false-否 true-是")
|
||||
private Boolean isNetworkCable;
|
||||
|
||||
@ApiModelProperty("验收单附件")
|
||||
private String acceptanceAttachment;
|
||||
|
||||
@ApiModelProperty("后厨照片")
|
||||
private String backKitchenPhoto;
|
||||
}
|
||||
|
||||
@@ -359,19 +359,26 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
acceptanceInfoDO.setKsAccount(request.getKsAccount());
|
||||
acceptanceInfoDO.setVerificationMobile(request.getVerificationPhone());
|
||||
acceptanceInfoDO.setShopLocationScreenshots(request.getShopLocationScreenshots());
|
||||
acceptanceInfoDO.setSatisfaction(request.getSatisfaction());
|
||||
acceptanceInfoDO.setIsNetworkCable(request.getIsNetworkCable());
|
||||
acceptanceInfoDAO.updateAcceptanceInfo(acceptanceInfoDO);
|
||||
}
|
||||
//更新阶段状态验收中
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_122);
|
||||
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
|
||||
List<EnterpriseUserDO> sendUsers = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.CONSTRUCTION_CUSTOMER, shopInfoDO.getRegionId());
|
||||
if (CollectionUtils.isNotEmpty(sendUsers)) {
|
||||
List<String> sendUserIds = sendUsers.stream().map(enterpriseUserDO -> enterpriseUserDO.getUserId()).collect(Collectors.toList());
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("partnerUsername", lineInfoDO.getUsername());
|
||||
map.put("partnerMobile", lineInfoDO.getMobile());
|
||||
map.put("storeName", shopInfoDO.getShopName());
|
||||
commonService.sendQWMessage(Collections.singletonList(shopInfoDO.getInvestmentManager()),
|
||||
commonService.sendQWMessage(sendUserIds,
|
||||
MessageEnum.MESSAGE_37,
|
||||
map);
|
||||
}
|
||||
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@@ -396,7 +403,7 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
List<ShopInfoDO> shopInfoDOS = shopInfoMapper.selectShopListByRegionId(regions, ShopSubStageEnum.SHOP_STAGE_12.getShopSubStage(), request.getSubStageStatus(), null);
|
||||
PageInfo pageInfo = new PageInfo<>(shopInfoDOS);
|
||||
if (shopInfoDOS.isEmpty()) {
|
||||
log.info("该工程部监理下门店为空");
|
||||
log.info("该用户下门店为空");
|
||||
return pageInfo;
|
||||
}
|
||||
Map<Long, ShopInfoDO> ShopIdmap = shopInfoDOS.stream().collect(Collectors.toMap(ShopInfoDO::getId, dto1 -> dto1));
|
||||
@@ -739,13 +746,14 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
@Override
|
||||
public Boolean pcSubmitAcceptanceSign(ThreeAcceptanceRequest request) {
|
||||
log.info("submitAcceptance, request:{} ", JSONObject.toJSONString(request));
|
||||
if (StringUtils.isAnyBlank(request.getShopDoorwayPhoto(), request.getShopInteriorPhoto())) {
|
||||
if (StringUtils.isAnyBlank(request.getOperationsAcceptance().toString(), request.getShopDoorwayPhoto(), request.getShopInteriorPhoto(), request.getAcceptanceAttachment(), request.getBackKitchenPhoto())) {
|
||||
throw new ServiceException(ErrorCodeEnum.THE_DATA_IS_NOT_FILLED);
|
||||
}
|
||||
//营运部 验收签名
|
||||
AcceptanceInfoDO acceptanceInfoDO1 = acceptanceInfoDAO.selectByShopId(request.getShopId());
|
||||
if (StringUtils.isNotEmpty(acceptanceInfoDO1.getPartnerAcceptanceSignatures())
|
||||
&& Objects.nonNull(request.getOperationsAcceptance())) {
|
||||
if (Objects.isNull(acceptanceInfoDO1)) {
|
||||
throw new ServiceException(ErrorCodeEnum.GET_INFO_ERROR);
|
||||
}
|
||||
ThreeAcceptanceDTO partner = JSONObject.parseObject(acceptanceInfoDO1.getPartnerAcceptanceSignatures(), ThreeAcceptanceDTO.class);
|
||||
request.getOperationsAcceptance().setStatus(CommonConstants.ONE);
|
||||
request.getOperationsAcceptance().setAcceptanceTime(new Date());
|
||||
@@ -757,6 +765,8 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
acceptanceInfoDO.setActualAcceptanceTime(new Date());
|
||||
acceptanceInfoDO.setShopDoorwayPhoto(request.getShopDoorwayPhoto());
|
||||
acceptanceInfoDO.setShopInteriorPhoto(request.getShopInteriorPhoto());
|
||||
acceptanceInfoDO.setAcceptanceAttachment(request.getAcceptanceAttachment());
|
||||
acceptanceInfoDO.setBackKitchenPhoto(request.getBackKitchenPhoto());
|
||||
acceptanceInfoDAO.updateAcceptanceInfo(acceptanceInfoDO);
|
||||
if (CommonConstants.ONE == request.getOperationsAcceptance().getResult()
|
||||
&& CommonConstants.ONE == partner.getResult()) {
|
||||
@@ -768,7 +778,7 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
//未通过至为待验收
|
||||
shopStageInfoDAO.updateShopStageAndAuditInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_121, null);
|
||||
}
|
||||
}
|
||||
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@@ -799,6 +809,10 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
threeSignResponse.setShopLocationScreenshots(acceptanceInfoDO.getShopLocationScreenshots());
|
||||
threeSignResponse.setShopDoorwayPhoto(acceptanceInfoDO.getShopDoorwayPhoto());
|
||||
threeSignResponse.setShopInteriorPhoto(acceptanceInfoDO.getShopInteriorPhoto());
|
||||
threeSignResponse.setSatisfaction(acceptanceInfoDO.getSatisfaction());
|
||||
threeSignResponse.setIsNetworkCable(acceptanceInfoDO.getIsNetworkCable());
|
||||
threeSignResponse.setAcceptanceAttachment(acceptanceInfoDO.getAcceptanceAttachment());
|
||||
threeSignResponse.setBackKitchenPhoto(acceptanceInfoDO.getBackKitchenPhoto());
|
||||
return threeSignResponse;
|
||||
}
|
||||
|
||||
@@ -842,9 +856,9 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
}
|
||||
DecorationMeasureDO measure = decorationMeasureDAO.getByShopId(shopId);
|
||||
measure.setDesignUserId(userId);
|
||||
decorationMeasureDAO.updateByPrimaryKeySelective(measure,userId);
|
||||
decorationMeasureDAO.updateByPrimaryKeySelective(measure, userId);
|
||||
DecorationDesignInfoDO design = decorationDesignInfoDAO.getByShopId(shopId);
|
||||
if (Objects.nonNull(design)){
|
||||
if (Objects.nonNull(design)) {
|
||||
decorationDesignInfoDAO.updateDesignLeaderIdAndDesignUserIdInteger(shopId, userId);
|
||||
}
|
||||
shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_90);
|
||||
|
||||
@@ -458,7 +458,7 @@ public class DeskServiceImpl implements DeskService {
|
||||
public PageInfo<PreparationCommonPendingVO> fitmentPendingList(DeskRequest deskRequest, LoginUserInfo user) {
|
||||
|
||||
return commonPendingVOPageInfo(deskRequest, user, ShopSubStageEnum.SHOP_STAGE_12,
|
||||
Collections.singletonList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_122.getShopSubStageStatus()), Boolean.FALSE);
|
||||
Collections.singletonList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_122.getShopSubStageStatus()), Boolean.TRUE);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -779,11 +779,12 @@ public class ShopServiceImpl implements ShopService {
|
||||
case SHOP_SUB_STAGE_STATUS_50:
|
||||
case SHOP_SUB_STAGE_STATUS_110:
|
||||
case SHOP_SUB_STAGE_STATUS_111:
|
||||
case SHOP_SUB_STAGE_STATUS_122:
|
||||
case SHOP_SUB_STAGE_STATUS_140:
|
||||
case SHOP_SUB_STAGE_STATUS_141:
|
||||
case SHOP_SUB_STAGE_STATUS_142:
|
||||
return getUserFromInvestmentManager(shopInfo.getInvestmentManager());
|
||||
case SHOP_SUB_STAGE_STATUS_122:
|
||||
return getUsersByRolesAndRegion(Collections.singletonList(CONSTRUCTION_CUSTOMER), shopInfo.getRegionId());
|
||||
|
||||
case SHOP_SUB_STAGE_STATUS_70:
|
||||
case SHOP_SUB_STAGE_STATUS_80:
|
||||
|
||||
Reference in New Issue
Block a user