Merge remote-tracking branch 'origin/cc_partner_init' into cc_partner_init
This commit is contained in:
@@ -19,9 +19,9 @@ public enum SMSMsgEnum {
|
||||
SECOND_INTERVIEW_REMIND("二审前1小时提醒", "", "SMS_465925428"),
|
||||
SECOND_INTERVIEW_REAPPOINTMENT("二审重新预约", "", "SMS_465940421"),
|
||||
SECOND_INTERVIEW_SUCCESS("二审面审成功", "", "SMS_465980397"),
|
||||
SELECT_SUCCESS("选铺成功", "", "SMS_465890428"),
|
||||
SELECT_SUCCESS("选铺成功", "", "SMS_465950846"),
|
||||
RENT_CONTRACT_AUDIT_FAIL("租赁合同上传未通过", "", "SMS_465955429"),
|
||||
SHOP_EXPERIENCE("门店体验安排", "", "SMS_465900449"),
|
||||
SHOP_EXPERIENCE("门店体验安排", "", "SMS_465905828"),
|
||||
;
|
||||
|
||||
private String title;
|
||||
|
||||
@@ -68,4 +68,7 @@ public class AssessmentDataDAO {
|
||||
return assessmentDataMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
public List<AssessmentDataDO> selectListByShopId(Long shopId) {
|
||||
return assessmentDataMapper.selectListByShopId(shopId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,4 +94,13 @@ public class LineInterviewDAO {
|
||||
}
|
||||
return lineInterviewMapper.batchUpdateInterviewStatus(interviewIds, interviewStatus.getCode());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取面试提醒列表
|
||||
* @param intervalMinutes
|
||||
* @return
|
||||
*/
|
||||
public List<LineInterviewDO> getInterviewRemindList(Integer intervalMinutes) {
|
||||
return lineInterviewMapper.getInterviewRemindList(intervalMinutes);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,6 +52,15 @@ public class PointInfoDAO {
|
||||
return pointInfoMapper.updateByPrimaryKeySelective(shopPointInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 完善铺位信息
|
||||
* @param shopPointInfo
|
||||
* @return
|
||||
*/
|
||||
public Integer perfectPointInfo(PointInfoDO shopPointInfo) {
|
||||
return pointInfoMapper.perfectPointInfo(shopPointInfo);
|
||||
}
|
||||
|
||||
public Integer updatePointInfoByPrimaryKey(PointInfoDO shopPointInfo) {
|
||||
return pointInfoMapper.updateByPrimaryKey(shopPointInfo);
|
||||
}
|
||||
|
||||
@@ -8,5 +8,7 @@ import tk.mybatis.mapper.common.Mapper;
|
||||
import java.util.List;
|
||||
|
||||
public interface AssessmentDataMapper extends Mapper<AssessmentDataDO> {
|
||||
Integer batchUpdate( List<AssessmentDataDO> AssessmentDataDOS);
|
||||
Integer batchUpdate(List<AssessmentDataDO> AssessmentDataDOS);
|
||||
|
||||
List<AssessmentDataDO> selectListByShopId(@Param("shopId") Long shopId);
|
||||
}
|
||||
@@ -68,4 +68,11 @@ public interface LineInterviewMapper extends Mapper<LineInterviewDO> {
|
||||
* @return
|
||||
*/
|
||||
Integer batchUpdateInterviewStatus(@Param("interviewIds") List<Long> interviewIds, @Param("interviewStatus") Integer interviewStatus);
|
||||
|
||||
/**
|
||||
* 获取面试提醒列表
|
||||
* @param intervalMinutes
|
||||
* @return
|
||||
*/
|
||||
List<LineInterviewDO> getInterviewRemindList(@Param("intervalMinutes") Integer intervalMinutes);
|
||||
}
|
||||
@@ -81,4 +81,11 @@ public interface PointInfoMapper extends Mapper<PointInfoDO> {
|
||||
*/
|
||||
PointInfoDO getDataByShopIdAndLineId(@Param("lineId") Long lineId,
|
||||
@Param("shopId") Long shopId);
|
||||
|
||||
/**
|
||||
* 完善铺位信息
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
Integer perfectPointInfo(@Param("request") PointInfoDO request);
|
||||
}
|
||||
@@ -41,4 +41,9 @@
|
||||
</foreach>
|
||||
)
|
||||
</update>
|
||||
<select id="selectListByShopId" resultType="com.cool.store.entity.AssessmentDataDO">
|
||||
select *
|
||||
from xfsg_assessment_data
|
||||
where shop_id = #{shopId}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -126,4 +126,8 @@
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<select id="getInterviewRemindList" resultMap="BaseResultMap">
|
||||
select * from xfsg_line_interview where deleted = '0' and interview_type in (1, 2) and start_time between date_sub(now(), interval #{intervalMinutes} minute) and date_add(now(), interval #{intervalMinutes} minute)
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -200,5 +200,23 @@
|
||||
<update id="recyclePoint">
|
||||
update xfsg_point_info set line_id = null, shop_id = null, select_status = 0, update_time = now(), point_status = if(point_status = 6, 5, point_status) where id = #{pointId}
|
||||
</update>
|
||||
|
||||
<update id="perfectPointInfo">
|
||||
update
|
||||
xfsg_point_info
|
||||
set
|
||||
point_name = #{request.pointName},
|
||||
region_id = #{request.regionId},
|
||||
point_area = #{request.pointArea},
|
||||
latitude = #{request.latitude},
|
||||
longitude = #{request.longitude},
|
||||
address = #{request.address},
|
||||
province = #{request.province},
|
||||
city = #{request.city},
|
||||
district = #{request.district},
|
||||
township = #{request.township},
|
||||
point_score = #{request.pointScore}
|
||||
where id = #{request.id}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -17,22 +17,19 @@ import javax.persistence.Id;
|
||||
@Data
|
||||
public class AssessmentDataDTO {
|
||||
|
||||
|
||||
@ApiModelProperty("模板id")
|
||||
private Long templateId;
|
||||
|
||||
private Long shopId;
|
||||
/**
|
||||
* 店铺是否合格
|
||||
*/
|
||||
@ApiModelProperty("店铺是否合格,0合格1不合格")
|
||||
private Boolean qualified;
|
||||
|
||||
/**
|
||||
* 原因
|
||||
*/
|
||||
@ApiModelProperty("不合格原因")
|
||||
private String reason;
|
||||
|
||||
/**
|
||||
* 评语
|
||||
*/
|
||||
|
||||
@@ -12,9 +12,11 @@ import lombok.Data;
|
||||
@Data
|
||||
public class ThreeAcceptanceDTO {
|
||||
@ApiModelProperty("验收签名 ")
|
||||
private String AcceptanceSignatures;
|
||||
private String acceptanceSignatures;
|
||||
@ApiModelProperty("验收评语")
|
||||
private String Comments;
|
||||
private String comments;
|
||||
@ApiModelProperty("0通过,1不通过")
|
||||
private Integer ResultType;
|
||||
private Integer resultType;
|
||||
@ApiModelProperty("验收时间")
|
||||
private String acceptanceTime;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.cool.store.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
|
||||
import java.util.Date;
|
||||
import javax.persistence.*;
|
||||
|
||||
@@ -54,15 +56,16 @@ public class AcceptanceInfoDO {
|
||||
/**
|
||||
* 工程部验收签名 {"pic":"","acceptanceTime":"","result":"","remark":"","status":1}
|
||||
*/
|
||||
|
||||
@Column(name = "engineering_acceptance_signatures")
|
||||
private String engineeringAcceptanceSignatures;
|
||||
|
||||
/**
|
||||
* 营运部验收签名 {"pic":"","acceptanceTime":"","result":"","remark":"","status":1}
|
||||
*/
|
||||
|
||||
@Column(name = "operations_acceptance_signatures")
|
||||
private String operationsAcceptanceSignatures;
|
||||
|
||||
/**
|
||||
* 加密商验收签名 {"pic":"","acceptanceTime":"","result":"","remark":"","status":0}
|
||||
*/
|
||||
|
||||
@@ -22,6 +22,4 @@ public class ThreeAcceptanceRequest {
|
||||
private ThreeAcceptanceDTO operationsAcceptance;
|
||||
@ApiModelProperty("加盟商验收")
|
||||
private ThreeAcceptanceDTO partnerAcceptance;
|
||||
@ApiModelProperty("检查项")
|
||||
private List<AssessmentDataDO> assessmentDataDOS;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.cool.store.response;
|
||||
|
||||
import com.cool.store.dto.decoration.ThreeAcceptanceDTO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/05/06/下午5:50
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class ThreeSignResponse {
|
||||
@ApiModelProperty("工程部验收")
|
||||
private ThreeAcceptanceDTO engineeringAcceptance;
|
||||
@ApiModelProperty("营运部验收")
|
||||
private ThreeAcceptanceDTO operationsAcceptance;
|
||||
@ApiModelProperty("加盟商验收")
|
||||
private ThreeAcceptanceDTO partnerAcceptance;
|
||||
}
|
||||
@@ -15,4 +15,6 @@ public interface AssessmentDataService {
|
||||
Boolean batchInsert(List<AssessmentDataDO> assessmentDataDOS);
|
||||
|
||||
Integer batchUpdate(List<AssessmentDataDO> assessmentDataDOS);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package com.cool.store.service;
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.dto.decoration.ConstructionScheduleDTO;
|
||||
import com.cool.store.dto.decoration.DecorationModelDTO;
|
||||
import com.cool.store.dto.decoration.ThreeAcceptanceDTO;
|
||||
import com.cool.store.request.LinePaySubmitRequest;
|
||||
import com.cool.store.request.ThreeAcceptanceCheckRequest;
|
||||
import com.cool.store.request.ThreeAcceptanceRequest;
|
||||
import com.cool.store.request.BookingAcceptanceRequest;
|
||||
import com.cool.store.response.FitmentResponse;
|
||||
import com.cool.store.response.ThreeAcceptanceResponse;
|
||||
import com.cool.store.response.ThreeSignResponse;
|
||||
import com.cool.store.vo.Fitment.DecorationStageVO;
|
||||
import com.cool.store.vo.Fitment.DecorationModelVO;
|
||||
import com.cool.store.vo.Fitment.DesignInfoVo;
|
||||
@@ -88,19 +90,37 @@ public interface DecorationService {
|
||||
* @description:提交三方验收检查项
|
||||
*/
|
||||
Boolean submitThreeCheck(ThreeAcceptanceCheckRequest request);
|
||||
Boolean submitAcceptance(ThreeAcceptanceRequest request,PartnerUserInfoVO minUser, LoginUserInfo pcUser );
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/5/6
|
||||
* @description:查看三方验收检查项
|
||||
*/
|
||||
ThreeAcceptanceCheckRequest getThreeChecks(Long shopId);
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/5/6
|
||||
* @description:mini提交三方验收检签字
|
||||
*/
|
||||
Boolean miniSubmitAcceptanceSign(ThreeAcceptanceRequest request);
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/5/6
|
||||
* @description:pc提交三方验收检签字
|
||||
*/
|
||||
Boolean pcSubmitAcceptanceSign(ThreeAcceptanceRequest request);
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/5/6
|
||||
* @description:查看三方验收签字
|
||||
*/
|
||||
List<ThreeAcceptanceDTO> getThreeAcceptanceSign(Long shopId);
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/5/3
|
||||
* @description:预约验收
|
||||
*/
|
||||
Boolean bookingAcceptance(BookingAcceptanceRequest response);
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/4/29
|
||||
* @description:查看三方验收
|
||||
*/
|
||||
ThreeAcceptanceResponse getThreeAcceptance(Long shopId);
|
||||
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/5/3
|
||||
|
||||
@@ -28,10 +28,7 @@ import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -109,11 +106,15 @@ public class CommonService {
|
||||
}
|
||||
}
|
||||
|
||||
public void sendSms(String poneNumber, SMSMsgEnum templateCode, List<JSONObject> templateParamList){
|
||||
sendSms(Arrays.asList(poneNumber), templateCode, templateParamList);
|
||||
public void sendSms(String poneNumber, SMSMsgEnum templateCode){
|
||||
sendSms(Arrays.asList(poneNumber), templateCode, null);
|
||||
}
|
||||
|
||||
public void sendSms(List<String> poneNumbers, SMSMsgEnum templateCode, List<JSONObject> templateParamList){
|
||||
public void sendSms(String poneNumber, SMSMsgEnum templateCode, Map<String, String> templateParamMap){
|
||||
sendSms(Arrays.asList(poneNumber), templateCode, templateParamMap);
|
||||
}
|
||||
|
||||
public void sendSms(List<String> poneNumbers, SMSMsgEnum templateCode, Map<String, String> templateParamMap){
|
||||
List<String> signNameList = new ArrayList<>();
|
||||
signNameList.add("酷店掌");
|
||||
AsyncClient client = null;
|
||||
@@ -134,11 +135,11 @@ public class CommonService {
|
||||
.phoneNumberJson(JSONObject.toJSONString(poneNumbers))
|
||||
.signNameJson(JSONObject.toJSONString(signNameList))
|
||||
.templateCode(templateCode.getTemplateCode())
|
||||
.templateParamJson(JSONObject.toJSONString(templateParamList))
|
||||
.templateParamJson("[" + JSONObject.toJSONString(templateParamMap) + "]")
|
||||
.build();
|
||||
CompletableFuture<SendBatchSmsResponse> response = client.sendBatchSms(sendBatchSmsRequest);
|
||||
SendBatchSmsResponse resp = response.get();
|
||||
log.info("短信发送response:{}", JSONObject.toJSONString(resp));
|
||||
log.info("短信发送templateCode:{}, response:{}", templateCode.getTemplateCode(), JSONObject.toJSONString(resp));
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
} catch (ExecutionException e) {
|
||||
|
||||
@@ -22,6 +22,7 @@ import com.cool.store.request.ThreeAcceptanceRequest;
|
||||
import com.cool.store.request.BookingAcceptanceRequest;
|
||||
import com.cool.store.response.FitmentResponse;
|
||||
import com.cool.store.response.ThreeAcceptanceResponse;
|
||||
import com.cool.store.response.ThreeSignResponse;
|
||||
import com.cool.store.service.*;
|
||||
import com.cool.store.utils.poi.StringUtils;
|
||||
import com.cool.store.vo.Fitment.DecorationStageVO;
|
||||
@@ -58,7 +59,7 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(DecorationServiceImpl.class);
|
||||
@Resource
|
||||
private ShopAuditInfoDAO shopAuditInfoDAO;
|
||||
private AssessmentDataDAO assessmentDataDAO;
|
||||
@Resource
|
||||
private SysRoleService sysRoleService;
|
||||
@Resource
|
||||
@@ -412,9 +413,11 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
public Boolean submitThreeCheck(ThreeAcceptanceCheckRequest request) {
|
||||
log.info("submitThreeCheck, request:{} ", JSONObject.toJSONString(request));
|
||||
List<AssessmentDataDO> assessmentDataDOS = new ArrayList<>();
|
||||
BeanUtil.copyProperties(request.getAssessmentDataDTOS(),assessmentDataDOS);
|
||||
for(AssessmentDataDO assessmentDataDO : assessmentDataDOS){
|
||||
for (AssessmentDataDTO assessmentDataDTO : request.getAssessmentDataDTOS()) {
|
||||
AssessmentDataDO assessmentDataDO = new AssessmentDataDO();
|
||||
BeanUtil.copyProperties(assessmentDataDTO, assessmentDataDO);
|
||||
assessmentDataDO.setShopId(request.getShopId());
|
||||
assessmentDataDOS.add(assessmentDataDO);
|
||||
}
|
||||
Boolean assessment = assessmentDataService.batchInsert(assessmentDataDOS);
|
||||
if (assessment == Boolean.FALSE) {
|
||||
@@ -424,6 +427,53 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
return assessment;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ThreeAcceptanceCheckRequest getThreeChecks(Long shopId) {
|
||||
List<AssessmentDataDO> assessmentDataDOS = assessmentDataDAO.selectListByShopId(shopId);
|
||||
List<AssessmentDataDTO> assessmentDataDTOS = new ArrayList<>();
|
||||
for (AssessmentDataDO assessmentDataDO : assessmentDataDOS) {
|
||||
AssessmentDataDTO assessmentDataDTO = new AssessmentDataDTO();
|
||||
BeanUtil.copyProperties(assessmentDataDO, assessmentDataDTO);
|
||||
assessmentDataDTOS.add(assessmentDataDTO);
|
||||
}
|
||||
ThreeAcceptanceCheckRequest threeAcceptanceCheckRequest = new ThreeAcceptanceCheckRequest();
|
||||
threeAcceptanceCheckRequest.setShopId(shopId);
|
||||
threeAcceptanceCheckRequest.setAssessmentDataDTOS(assessmentDataDTOS);
|
||||
return threeAcceptanceCheckRequest;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean miniSubmitAcceptanceSign(ThreeAcceptanceRequest request) {
|
||||
try {
|
||||
//工程部验收签名
|
||||
JSONObject engineering = new JSONObject();
|
||||
engineering.put("pic", request.getEngineeringAcceptance().getAcceptanceSignatures());
|
||||
engineering.put("acceptanceTime", new Date());
|
||||
engineering.put("result", request.getEngineeringAcceptance().getResultType());
|
||||
engineering.put("remark", request.getEngineeringAcceptance().getComments());
|
||||
engineering.put("status", 1);
|
||||
//加盟商
|
||||
JSONObject partner = new JSONObject();
|
||||
partner.put("pic", request.getPartnerAcceptance().getAcceptanceSignatures());
|
||||
partner.put("acceptanceTime", new Date());
|
||||
partner.put("result", request.getPartnerAcceptance().getResultType());
|
||||
partner.put("remark", request.getPartnerAcceptance().getComments());
|
||||
partner.put("status", 1);
|
||||
AcceptanceInfoDO acceptanceInfoDO = new AcceptanceInfoDO();
|
||||
acceptanceInfoDO.setShopId(request.getShopId());
|
||||
acceptanceInfoDO.setPartnerAcceptanceSignatures(partner.toString());
|
||||
acceptanceInfoDO.setEngineeringAcceptanceSignatures(engineering.toString());
|
||||
acceptanceInfoDO.setUpdateTime(new Date());
|
||||
acceptanceInfoDAO.updateAcceptanceInfo(acceptanceInfoDO);
|
||||
//更新阶段状态验收中
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_122);
|
||||
return Boolean.TRUE;
|
||||
} catch (Exception e) {
|
||||
log.error("mini提交三方验收失败");
|
||||
throw new ServiceException(ErrorCodeEnum.THREE_ACCEPTANCE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageInfo<fitmentCheckVO> getFitmentAcceptanceList(Integer subStageStatus, LoginUserInfo user, Integer pageNum, Integer pageSize) {
|
||||
List<String> authRegionIds = userAuthMappingService.getAuthRegionIdAndSubRegionIdByUserId(user.getUserId());
|
||||
@@ -532,51 +582,14 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public Boolean submitAcceptance(ThreeAcceptanceRequest request, PartnerUserInfoVO minUser, LoginUserInfo pcUser) {
|
||||
public Boolean pcSubmitAcceptanceSign(ThreeAcceptanceRequest request) {
|
||||
log.info("submitAcceptance, request:{} ", JSONObject.toJSONString(request));
|
||||
if (Objects.nonNull(minUser)) {
|
||||
try {
|
||||
//插入检查项
|
||||
for (AssessmentDataDO assessmentDataDO : request.getAssessmentDataDOS()) {
|
||||
//TODO 考核人是谁?
|
||||
assessmentDataDO.setAssessmentUserId(minUser.getPartnerId());
|
||||
}
|
||||
Boolean assessment = assessmentDataService.batchInsert(request.getAssessmentDataDOS());
|
||||
if (assessment == Boolean.FALSE) {
|
||||
log.error("三方验收插入检查项失败");
|
||||
throw new ServiceException(ErrorCodeEnum.CHECK_ITEM);
|
||||
}
|
||||
//工程部验收签名
|
||||
JSONObject engineering = new JSONObject();
|
||||
engineering.put("pic", request.getEngineeringAcceptance().getAcceptanceSignatures());
|
||||
engineering.put("acceptanceTime", new Date());
|
||||
engineering.put("result", request.getEngineeringAcceptance().getResultType());
|
||||
engineering.put("remark", request.getEngineeringAcceptance().getComments());
|
||||
engineering.put("status", 1);
|
||||
//加盟商
|
||||
JSONObject partner = new JSONObject();
|
||||
partner.put("pic", request.getPartnerAcceptance().getAcceptanceSignatures());
|
||||
partner.put("acceptanceTime", new Date());
|
||||
partner.put("result", request.getPartnerAcceptance().getResultType());
|
||||
partner.put("remark", request.getPartnerAcceptance().getComments());
|
||||
partner.put("status", 1);
|
||||
AcceptanceInfoDO acceptanceInfoDO = new AcceptanceInfoDO();
|
||||
acceptanceInfoDO.setShopId(request.getShopId());
|
||||
acceptanceInfoDO.setPartnerAcceptanceSignatures(partner.toString());
|
||||
acceptanceInfoDO.setEngineeringAcceptanceSignatures(engineering.toString());
|
||||
acceptanceInfoDO.setUpdateTime(new Date());
|
||||
acceptanceInfoDAO.updateAcceptanceInfo(acceptanceInfoDO);
|
||||
//更新阶段状态验收中
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_122);
|
||||
return Boolean.TRUE;
|
||||
} catch (Exception e) {
|
||||
log.error("mini提交三方验收失败");
|
||||
throw new ServiceException(ErrorCodeEnum.THREE_ACCEPTANCE);
|
||||
}
|
||||
} else {
|
||||
//营运部验收签名
|
||||
try {
|
||||
AcceptanceInfoDO acceptanceInfoDO1 = acceptanceInfoDAO.selectByShopId(request.getShopId());
|
||||
//营运部验收签名
|
||||
try {
|
||||
AcceptanceInfoDO acceptanceInfoDO1 = acceptanceInfoDAO.selectByShopId(request.getShopId());
|
||||
if (StringUtils.isNotEmpty(acceptanceInfoDO1.getEngineeringAcceptanceSignatures())
|
||||
&& StringUtils.isNotEmpty(acceptanceInfoDO1.getPartnerAcceptanceSignatures())
|
||||
&& Objects.nonNull(request.getOperationsAcceptance())) {
|
||||
JSONObject engineering = JSONObject.parseObject(acceptanceInfoDO1.getEngineeringAcceptanceSignatures());
|
||||
JSONObject partner = JSONObject.parseObject(acceptanceInfoDO1.getPartnerAcceptanceSignatures());
|
||||
JSONObject operations = new JSONObject();
|
||||
@@ -594,19 +607,57 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
&& AuditResultTypeEnum.PASS.getCode() == partner.getInteger("result")
|
||||
&& AuditResultTypeEnum.PASS.getCode() == engineering.getInteger("result")) {
|
||||
//更新阶段状态验收完毕
|
||||
shopStageInfoDAO.updateShopStageAndAuditInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_123,null);
|
||||
shopStageInfoDAO.updateShopStageAndAuditInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_123, null);
|
||||
preparationService.whetherToOpenForAcceptance(request.getShopId());
|
||||
} else {
|
||||
//未通过至为带预约
|
||||
shopStageInfoDAO.updateShopStageAndAuditInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_120, null);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("PC提交三方验收失败");
|
||||
throw new ServiceException(ErrorCodeEnum.THREE_ACCEPTANCE);
|
||||
}
|
||||
|
||||
return Boolean.TRUE;
|
||||
} catch (Exception e) {
|
||||
log.error("PC提交三方验收失败");
|
||||
throw new ServiceException(ErrorCodeEnum.THREE_ACCEPTANCE);
|
||||
}
|
||||
return Boolean.FALSE;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ThreeAcceptanceDTO> getThreeAcceptanceSign(Long shopId) {
|
||||
List<ThreeAcceptanceDTO> threeAcceptanceDTOS = new ArrayList<>();
|
||||
|
||||
AcceptanceInfoDO acceptanceInfoDO = acceptanceInfoDAO.selectByShopId(shopId);
|
||||
//工程部
|
||||
if (StringUtils.isNotEmpty(acceptanceInfoDO.getEngineeringAcceptanceSignatures())) {
|
||||
JSONObject engineering = JSONObject.parseObject(acceptanceInfoDO.getEngineeringAcceptanceSignatures());
|
||||
ThreeAcceptanceDTO engineeringDTO = new ThreeAcceptanceDTO();
|
||||
engineeringDTO.setAcceptanceSignatures(engineering.getString("pic"));
|
||||
engineeringDTO.setComments(engineering.getString("remark"));
|
||||
engineeringDTO.setResultType(engineering.getInteger("result"));
|
||||
engineeringDTO.setAcceptanceTime(engineering.getString("acceptanceTime"));
|
||||
threeAcceptanceDTOS.add(CommonConstants.ZERO, engineeringDTO);
|
||||
}
|
||||
//营运部
|
||||
if (StringUtils.isNotEmpty(acceptanceInfoDO.getOperationsAcceptanceSignatures())) {
|
||||
JSONObject operations = JSONObject.parseObject(acceptanceInfoDO.getOperationsAcceptanceSignatures());
|
||||
ThreeAcceptanceDTO operationsDTO = new ThreeAcceptanceDTO();
|
||||
operationsDTO.setAcceptanceSignatures(operations.getString("pic"));
|
||||
operationsDTO.setComments(operations.getString("remark"));
|
||||
operationsDTO.setResultType(operations.getInteger("result"));
|
||||
operationsDTO.setAcceptanceTime(operations.getString("acceptanceTime"));
|
||||
threeAcceptanceDTOS.add(CommonConstants.ONE, operationsDTO);
|
||||
}
|
||||
//加盟商
|
||||
if (StringUtils.isNotEmpty(acceptanceInfoDO.getPartnerAcceptanceSignatures())) {
|
||||
JSONObject partner = JSONObject.parseObject(acceptanceInfoDO.getPartnerAcceptanceSignatures());
|
||||
ThreeAcceptanceDTO partnerDTO = new ThreeAcceptanceDTO();
|
||||
partnerDTO.setAcceptanceSignatures(partner.getString("pic"));
|
||||
partnerDTO.setComments(partner.getString("remark"));
|
||||
partnerDTO.setResultType(partner.getInteger("result"));
|
||||
partnerDTO.setAcceptanceTime(partner.getString("acceptanceTime"));
|
||||
threeAcceptanceDTOS.add(CommonConstants.TWO, partnerDTO);
|
||||
}
|
||||
return threeAcceptanceDTOS;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -620,14 +671,7 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ThreeAcceptanceResponse getThreeAcceptance(Long shopId) {
|
||||
AcceptanceInfoDO acceptanceInfoDO = acceptanceInfoDAO.selectByShopId(shopId);
|
||||
ThreeAcceptanceResponse response = new ThreeAcceptanceResponse();
|
||||
BeanUtil.copyProperties(acceptanceInfoDO, response);
|
||||
response.setAcceptanceTime(acceptanceInfoDO.getUpdateTime());
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
private DecorationDTO getDecorationDTO(Long shopId) {
|
||||
List<Long> shopIds = new ArrayList<>();
|
||||
|
||||
@@ -142,7 +142,7 @@ public class PointServiceImpl implements PointService {
|
||||
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||
}
|
||||
shopPointInfo.setPointScore(shopPoint.getTotalPointScore());
|
||||
pointInfoDAO.updatePointInfo(shopPointInfo);
|
||||
pointInfoDAO.perfectPointInfo(shopPointInfo);
|
||||
pointDetailInfoDAO.updatePartFieldPointDetail(shopPoint);
|
||||
return shopPointDetailRequest.getPointId();
|
||||
}
|
||||
@@ -382,9 +382,9 @@ public class PointServiceImpl implements PointService {
|
||||
private void initUploadRentContract(PointInfoDO pointInfo) {
|
||||
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(pointInfo.getLineId());
|
||||
shopStageInfoDAO.batchUpdateShopStageStatus(pointInfo.getShopId(), Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_12, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_20));
|
||||
JSONObject templateParam = new JSONObject();
|
||||
Map<String, String> templateParam = new HashMap<>();
|
||||
templateParam.put("pointName", pointInfo.getAddress());
|
||||
commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.SELECT_SUCCESS, Arrays.asList(templateParam));
|
||||
commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.SELECT_SUCCESS, templateParam);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -760,10 +760,10 @@ public class PointServiceImpl implements PointService {
|
||||
if(PointStatusEnum.POINT_STATUS_5.getCode().equals(pointInfo.getPointStatus())){
|
||||
selectStatus = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_12;
|
||||
updateStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_20);
|
||||
JSONObject templateParam = new JSONObject();
|
||||
Map<String, String> templateParam = new HashMap<>();
|
||||
templateParam.put("pointName", pointInfo.getAddress());
|
||||
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(request.getLineId());
|
||||
commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.SELECT_SUCCESS, Arrays.asList(templateParam));
|
||||
commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.SELECT_SUCCESS, templateParam);
|
||||
}
|
||||
updateStatusList.add(selectStatus);
|
||||
shopStageInfoDAO.batchUpdateShopStageStatus(shopId, updateStatusList);
|
||||
|
||||
@@ -74,14 +74,10 @@ public class PCDecorationController {
|
||||
public ResponseResult<Boolean> submitBookingAcceptance(@RequestBody BookingAcceptanceRequest response){
|
||||
return ResponseResult.success(decorationService.bookingAcceptance(response));
|
||||
}
|
||||
@ApiOperation("查看三方验收")
|
||||
@GetMapping("/getThreeAcceptance")
|
||||
public ResponseResult<ThreeAcceptanceResponse> getThreeAcceptance(@RequestParam Long shopId){
|
||||
return ResponseResult.success(decorationService.getThreeAcceptance(shopId));
|
||||
}
|
||||
@ApiOperation("提交三方验收")
|
||||
@PostMapping("/submitThreeAcceptance")
|
||||
public ResponseResult<Boolean> submitThreeAcceptance(@RequestBody ThreeAcceptanceRequest request){
|
||||
return ResponseResult.success(decorationService.submitAcceptance(request,null, CurrentUserHolder.getUser()));
|
||||
|
||||
@ApiOperation("提交三方验收签字")
|
||||
@PostMapping("/submitThreeAcceptanceSign")
|
||||
public ResponseResult<Boolean> submitThreeAcceptanceSign(@RequestBody ThreeAcceptanceRequest request){
|
||||
return ResponseResult.success(decorationService.pcSubmitAcceptanceSign(request));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,25 +1,18 @@
|
||||
package com.cool.store.controller.webb;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.dao.*;
|
||||
import com.cool.store.dto.OpenCityDTO;
|
||||
import com.cool.store.entity.*;
|
||||
import com.cool.store.enums.MessageEnum;
|
||||
import com.cool.store.enums.SMSMsgEnum;
|
||||
import com.cool.store.mapper.HyOpenAreaInfoMapper;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.ShopService;
|
||||
import com.cool.store.service.impl.CommonService;
|
||||
import com.cool.store.utils.poi.ExcelUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
@@ -32,6 +25,8 @@ public class PCTestController {
|
||||
private LineInfoDAO lineInfoDAO;
|
||||
@Resource
|
||||
private ShopService shopService;
|
||||
@Resource
|
||||
private LineInterviewDAO lineInterviewDAO;
|
||||
|
||||
|
||||
@GetMapping("/sendMessage")
|
||||
@@ -42,9 +37,14 @@ public class PCTestController {
|
||||
|
||||
@GetMapping("/sendSms")
|
||||
public ResponseResult<Boolean> sendSms(){
|
||||
JSONObject templateParam = new JSONObject();
|
||||
templateParam.put("pointName", "杭州市西湖区");
|
||||
commonService.sendSms("17681878615", SMSMsgEnum.RENT_CONTRACT_AUDIT_FAIL, Arrays.asList(templateParam));
|
||||
List<LineInterviewDO> interviewList = lineInterviewDAO.getInterviewRemindList(CommonConstants.FIVE);
|
||||
Map<String, String> templateParam = new HashMap<>();
|
||||
templateParam.put("pointName", "杭州门店A");
|
||||
List<SMSMsgEnum> smsMsgList = new ArrayList<>();
|
||||
smsMsgList.add(SMSMsgEnum.SELECT_SUCCESS);
|
||||
for (SMSMsgEnum value : smsMsgList) {
|
||||
commonService.sendSms("17681878615", value, templateParam);
|
||||
}
|
||||
return ResponseResult.success(Boolean.FALSE);
|
||||
}
|
||||
|
||||
|
||||
@@ -3,12 +3,14 @@ package com.cool.store.controller.webc;
|
||||
import com.cool.store.context.PartnerUserHolder;
|
||||
import com.cool.store.dto.decoration.ConstructionScheduleDTO;
|
||||
import com.cool.store.dto.decoration.DecorationModelDTO;
|
||||
import com.cool.store.dto.decoration.ThreeAcceptanceDTO;
|
||||
import com.cool.store.request.LinePaySubmitRequest;
|
||||
import com.cool.store.request.ThreeAcceptanceCheckRequest;
|
||||
import com.cool.store.request.ThreeAcceptanceRequest;
|
||||
import com.cool.store.response.FitmentResponse;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.response.ThreeAcceptanceResponse;
|
||||
import com.cool.store.response.ThreeSignResponse;
|
||||
import com.cool.store.service.AssessmentTemplateService;
|
||||
import com.cool.store.service.DecorationService;
|
||||
import com.cool.store.vo.AssessmentTemplateVO;
|
||||
@@ -76,7 +78,7 @@ public class MiniDecorationController {
|
||||
PartnerUserInfoVO user = PartnerUserHolder.getUser();
|
||||
return ResponseResult.success(decorationService.getDecorationModel(shopId,user));
|
||||
}
|
||||
@ApiOperation("获取三方验收检查项")
|
||||
@ApiOperation("获取三方验收模板检查项")
|
||||
@GetMapping("/getChecks")
|
||||
public ResponseResult<List<AssessmentTemplateVO>> getChecks(@RequestParam Integer type){
|
||||
return ResponseResult.success(assessmentTemplateService.listByType(type));
|
||||
@@ -86,15 +88,20 @@ public class MiniDecorationController {
|
||||
public ResponseResult<Boolean> submitThreeChecks(@RequestBody ThreeAcceptanceCheckRequest request){
|
||||
return ResponseResult.success(decorationService.submitThreeCheck(request));
|
||||
}
|
||||
@ApiOperation("提交三方验收")
|
||||
@PostMapping("/submitThreeAcceptance")
|
||||
public ResponseResult<Boolean> submitThreeAcceptance(@RequestBody ThreeAcceptanceRequest request){
|
||||
PartnerUserInfoVO user = PartnerUserHolder.getUser();
|
||||
return ResponseResult.success(decorationService.submitAcceptance(request,user,null));
|
||||
@ApiOperation("获取三方验收检查项")
|
||||
@GetMapping("/getAcceptanceChecks")
|
||||
public ResponseResult<ThreeAcceptanceCheckRequest> getAcceptanceChecks(@RequestParam Long shopId){
|
||||
return ResponseResult.success(decorationService.getThreeChecks(shopId));
|
||||
}
|
||||
@ApiOperation("查看三方验收")
|
||||
@GetMapping("/getThreeAcceptance")
|
||||
public ResponseResult<ThreeAcceptanceResponse> getThreeAcceptance(@RequestParam Long shopId){
|
||||
return ResponseResult.success(decorationService.getThreeAcceptance(shopId));
|
||||
@ApiOperation("提交三方验收签字")
|
||||
@PostMapping("/submitThreeAcceptanceSign")
|
||||
public ResponseResult<Boolean> submitThreeAcceptance(@RequestBody ThreeAcceptanceRequest request){
|
||||
|
||||
return ResponseResult.success(decorationService.miniSubmitAcceptanceSign(request));
|
||||
}
|
||||
@ApiOperation("查看三方验收签字")
|
||||
@GetMapping("/getThreeSign")
|
||||
public ResponseResult<List<ThreeAcceptanceDTO> > getThreeAcceptance(@RequestParam Long shopId){
|
||||
return ResponseResult.success(decorationService.getThreeAcceptanceSign(shopId));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.cool.store.job;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.dao.*;
|
||||
@@ -19,6 +20,8 @@ import com.cool.store.mq.util.HttpRestTemplateService;
|
||||
import com.cool.store.service.CoolStoreStartFlowService;
|
||||
import com.cool.store.service.DecorationService;
|
||||
import com.cool.store.service.PreparationService;
|
||||
import com.cool.store.service.impl.CommonService;
|
||||
import com.cool.store.utils.poi.DateUtils;
|
||||
import com.cool.store.utils.poi.StringUtils;
|
||||
import com.cool.store.utils.poi.constant.Constants;
|
||||
import com.github.pagehelper.Page;
|
||||
@@ -68,6 +71,8 @@ public class XxlJobHandler {
|
||||
private AcceptanceInfoDAO acceptanceInfoDAO;
|
||||
@Resource
|
||||
private DecorationService decorationService;
|
||||
@Resource
|
||||
private CommonService commonService;
|
||||
|
||||
/**
|
||||
* 每天都将待体验门店信息变更到体验中
|
||||
@@ -223,4 +228,26 @@ public class XxlJobHandler {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@XxlJob("interviewRemind")
|
||||
public void interviewRemind() {
|
||||
log.info("------面试提醒------");
|
||||
List<LineInterviewDO> interviewList = lineInterviewDAO.getInterviewRemindList(CommonConstants.FIVE);
|
||||
if (CollectionUtils.isEmpty(interviewList)) {
|
||||
log.info("------今日没有待更新数据------");
|
||||
return;
|
||||
}
|
||||
for (LineInterviewDO interview : interviewList) {
|
||||
Map<String, String> templateParamMap = new HashMap<>();
|
||||
templateParamMap.put("interviewTime", DateUtil.format(interview.getStartTime(), "HH:mm"));
|
||||
if(InterviewTypeEnum.INTERVIEW.getCode().equals(interview.getInterviewType())){
|
||||
commonService.sendSms(interview.getInterviewerUserId(), SMSMsgEnum.FIRST_INTERVIEW_REMIND, templateParamMap);
|
||||
}
|
||||
if(InterviewTypeEnum.SECOND_INTERVIEW.getCode().equals(interview.getInterviewType())){
|
||||
commonService.sendSms(interview.getInterviewerUserId(), SMSMsgEnum.SECOND_INTERVIEW_REMIND, templateParamMap);
|
||||
}
|
||||
}
|
||||
XxlJobHelper.handleSuccess();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user