Merge remote-tracking branch 'origin/cc_partner_init' into cc_partner_init
This commit is contained in:
@@ -180,6 +180,10 @@ public enum ErrorCodeEnum {
|
||||
|
||||
UNISSUED_STATEMENT(109010, "该门店未发布账单,无法付款", null),
|
||||
|
||||
FRANCHISE_AGREEMENT_FALSE(109011, "特许经营合同API调用失败", null),
|
||||
|
||||
NEW_STORE_FALSE(109011, "新店开业流程API调用失败", null),
|
||||
|
||||
|
||||
INSERT_OPENING_OPERATION_PLAN_AUDIT_FALSE(103001,"插入运营方案审核信息失败",null),
|
||||
INSERT_OPENING_OPERATION_PLAN_FALSE(103002,"插入运营方案失败",null),
|
||||
@@ -195,12 +199,13 @@ public enum ErrorCodeEnum {
|
||||
USER_NOT_LOGIN(103021,"用户未登录",null),
|
||||
XFSG_SERVICE_ERROR(103099,"鲜丰服务调用失败",null),
|
||||
GET_FIRST_ORDER(103021,"获取鲜丰首批订货金失败",null),
|
||||
|
||||
YLF_ERROR(110001, "云立方接口异常!异常信息:{0}", null),
|
||||
//装修
|
||||
THREE_ACCEPTANCE(121001,"提交三方验收失败",null),
|
||||
CHECK_ITEM(12002,"插入检查项失败",null),
|
||||
FITMENT_FAIL(12003,"装修款阶段未完成",null),
|
||||
SEE_ACCEPTANCE_ERROR(12004,"获取鲜丰撤场数据失败",null),
|
||||
SEE_ACCEPTANCE_AUDIT_NULL(12005,"视觉验收结果为空",null),
|
||||
;
|
||||
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@ public enum MessageEnum {
|
||||
MESSAGE_25("您有一个门店待进行三方验收,请查收","##### 门店名称:${storeName}\n##### 加盟商姓名:${partnerUsername}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
||||
MESSAGE_26("您有一个门店需要上传开业运营方案,请查收","##### 门店名称:${storeName}\n##### 加盟商姓名:${partnerUsername}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
||||
MESSAGE_27("您有一个门店需要上传首批订货清单,请查收","##### 门店名称:${storeName}\n##### 加盟商姓名:${partnerUsername}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
||||
MESSAGE_28("您有一个门店需要进行视频验收,请查收","##### 门店名称:${storeName}\n##### 加盟商姓名:${partnerUsername}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
||||
;
|
||||
|
||||
private String title;
|
||||
@@ -136,6 +137,9 @@ public enum MessageEnum {
|
||||
case MESSAGE_27:
|
||||
return domainUrl + "/dd-noticemsg?appId=" + appId + "&corpId=" + corpId + "&appUrl=" +
|
||||
URLEncoder.encode("pages/common-web-view/index?noticeType=xfsg&routerUrl=notice&target=orderList×tamp=" + System.currentTimeMillis() +"&lineId="+ paramMap.get("lineId"), StandardCharsets.UTF_8.name());
|
||||
case MESSAGE_28:
|
||||
return "dingtalk://dingtalkclient/action/open_micro_app?appId="+appId+"&corpId="+corpId+"&page=" +
|
||||
URLEncoder.encode("pages/common-web-view/index?noticeType=xfsg&routerUrl=notice&target=eyeAcceptance×tamp="+System.currentTimeMillis()+"&shopId="+ paramMap.get("shopId"), StandardCharsets.UTF_8.name());
|
||||
|
||||
default:
|
||||
return "";
|
||||
|
||||
@@ -6,9 +6,9 @@ import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public enum PassengerFlowEnum {
|
||||
BELOW_1000(0,"1000以下"),
|
||||
TO_1000_10000(1,"1000-1万"),
|
||||
MORE_THAN_10000(2,"1万以上"),
|
||||
BELOW_1000(0,"1000以下",10),
|
||||
TO_1000_10000(1,"1000-1万",20),
|
||||
MORE_THAN_10000(2,"1万以上",30),
|
||||
|
||||
|
||||
|
||||
@@ -16,10 +16,12 @@ public enum PassengerFlowEnum {
|
||||
|
||||
private Integer code;
|
||||
private String desc;
|
||||
private Integer type;
|
||||
|
||||
PassengerFlowEnum(Integer code, String desc) {
|
||||
PassengerFlowEnum(Integer code, String desc,Integer type) {
|
||||
this.code = code;
|
||||
this.desc = desc;
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public Integer getCode() {
|
||||
@@ -38,6 +40,14 @@ public enum PassengerFlowEnum {
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public Integer getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(Integer type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public static final Map<Integer, PassengerFlowEnum> map
|
||||
= Arrays.stream(values()).collect(Collectors.toMap(PassengerFlowEnum::getCode, Function.identity()));
|
||||
|
||||
|
||||
@@ -58,7 +58,8 @@ public class AssessmentDataDAO {
|
||||
|
||||
public Integer selectCount(String userId, Long shopId) {
|
||||
Example example = new Example(AssessmentDataDO.class);
|
||||
example.createCriteria().andEqualTo("assessmentUserId", userId).andEqualTo("shopId", shopId).andIsNotNull("qualified");
|
||||
example.createCriteria().andEqualTo("assessmentUserId", userId).andEqualTo("shopId", shopId)
|
||||
.andEqualTo("qualified", Boolean.TRUE);
|
||||
return assessmentDataMapper.selectCountByExample(example);
|
||||
}
|
||||
|
||||
|
||||
@@ -61,10 +61,9 @@ public class EmployeeTrainingDAO {
|
||||
public List<EmployeeTrainingVO> assessmentUserList(String name, String practicalAssessmentUserId,
|
||||
Integer assessmentStatus,
|
||||
String estimatedAssessmentBeginTime, String estimatedAssessmentEndTime,
|
||||
String actualAssessmentBeginTime, String actualAssessmentEndTime, List<String> storeIdList,
|
||||
List<String> authRegionIdList) {
|
||||
String actualAssessmentBeginTime, String actualAssessmentEndTime, List<String> storeIdList) {
|
||||
return employeeTrainingMapper.assessmentUserList(name, practicalAssessmentUserId, assessmentStatus, estimatedAssessmentBeginTime,
|
||||
estimatedAssessmentEndTime, actualAssessmentBeginTime, actualAssessmentEndTime, storeIdList, authRegionIdList);
|
||||
estimatedAssessmentEndTime, actualAssessmentBeginTime, actualAssessmentEndTime, storeIdList);
|
||||
}
|
||||
|
||||
public List<EmployeeTrainingDO> theoreticalList() {
|
||||
@@ -78,11 +77,8 @@ public class EmployeeTrainingDAO {
|
||||
}
|
||||
|
||||
public Integer unCompleteNum(Long shopId) {
|
||||
List<Integer> statusList = new ArrayList<>();
|
||||
statusList.add(0);
|
||||
statusList.add(1);
|
||||
Example example = new Example(EmployeeTrainingDO.class);
|
||||
example.createCriteria().andIn("assessmentStatus", statusList).andEqualTo("shopId", shopId);
|
||||
example.createCriteria().andEqualTo("shopId", shopId).andCondition("theoreticalExamStatus != 1").andCondition("practical_exam_status != 1", 1);
|
||||
return employeeTrainingMapper.selectCountByExample(example);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,9 +56,8 @@ public class ShopAuditInfoDAO {
|
||||
return shopAuditInfoMapper.updateByPrimaryKeySelective(shopAuditInfoDO);
|
||||
}
|
||||
|
||||
public Long selectIdByShopId(Long shopId) {
|
||||
return shopAuditInfoMapper.selectAuditIdByShopId(shopId);
|
||||
public List<ShopAuditInfoDO> getAuditList(Long shopId,Integer auditType) {
|
||||
|
||||
return shopAuditInfoMapper.getAuditList(shopId,auditType);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ import com.cool.store.request.PreparationRequest;
|
||||
import com.cool.store.vo.shop.StageShopCountVO;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
@@ -156,4 +157,5 @@ public class ShopInfoDAO {
|
||||
}
|
||||
return shopInfoMapper.selectByStoreNum(storeNum);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -26,5 +26,5 @@ public interface EmployeeTrainingMapper extends Mapper<EmployeeTrainingDO> {
|
||||
@Param("assessmentStatus") Integer assessmentStatus,
|
||||
@Param("estimatedAssessmentBeginTime") String estimatedAssessmentBeginTime, @Param("estimatedAssessmentEndTime") String estimatedAssessmentEndTime,
|
||||
@Param("actualAssessmentBeginTime") String actualAssessmentBeginTime, @Param("actualAssessmentEndTime") String actualAssessmentEndTime,
|
||||
@Param("storeIdList") List<String> storeIdList, @Param("authRegionIdList") List<String> authRegionIdList);
|
||||
@Param("storeIdList") List<String> storeIdList);
|
||||
}
|
||||
@@ -86,6 +86,8 @@ public interface RegionMapper {
|
||||
|
||||
List<String> getSubRegionIdsByRegionIds( @Param("regionIds")List<String> regionIds);
|
||||
|
||||
List<String> getStoreIdsByRegionIds( @Param("regionIds")List<String> regionIds);
|
||||
|
||||
List<String> getSubIdsByRegionpaths( @Param("regionPaths")List<String> regionPaths);
|
||||
|
||||
List<String> getRegionPathByRegionIds( @Param("regionIds")List<String> regionIds);
|
||||
|
||||
@@ -15,10 +15,5 @@ public interface ShopAuditInfoMapper extends Mapper<ShopAuditInfoDO> {
|
||||
|
||||
List<ShopAuditInfoVO> getListByShopIdAndType(@Param("shopId") Long shopId,
|
||||
@Param("type") Integer type);
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/4/23
|
||||
* @description:根据店铺id查询审批结果
|
||||
*/
|
||||
Long selectAuditIdByShopId(@Param("shopId") Long shopId);
|
||||
List<ShopAuditInfoDO> getAuditList(@Param("shopId") Long shopId,@Param("auditType") Integer auditType);
|
||||
}
|
||||
@@ -86,5 +86,7 @@ public interface ShopInfoMapper extends Mapper<ShopInfoDO> {
|
||||
* @Date: 2024/5/3
|
||||
* @description:根据区域id查询所有处于XXX的店铺
|
||||
*/
|
||||
List<ShopInfoDO> selectShopListByRegionId(@Param("regionIds") List<Long> regionIds,@Param("subStageStatus")List<Integer> subStageStatus);
|
||||
List<ShopInfoDO> selectShopListByRegionId(@Param("regionIds") List<Long> regionIds,@Param("subStageStatus")List<Integer> subStageStatus,@Param("request")String request);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -7,4 +7,7 @@ import tk.mybatis.mapper.common.Mapper;
|
||||
public interface SignFranchiseMapper extends Mapper<SignFranchiseDO> {
|
||||
|
||||
SignFranchiseDO selectByShopId(@Param("shopId") Long shopId);
|
||||
|
||||
void updateAuditByShopId(@Param("auditId") Long auditId,
|
||||
@Param("shopId") Long shopId);
|
||||
}
|
||||
|
||||
@@ -181,9 +181,7 @@
|
||||
left join xfsg_employee_training e on e.xfsg_user_detail_id = u.id
|
||||
left join xfsg_shop_info s on s.id = u.shop_id
|
||||
where u.deleted = 0
|
||||
<if test="practicalAssessmentUserId != null and practicalAssessmentUserId != ''">
|
||||
and e.practical_assessment_user_id = #{practicalAssessmentUserId}
|
||||
</if>
|
||||
|
||||
<if test="assessmentStatus != null">
|
||||
and e.assessment_status = #{assessmentStatus}
|
||||
</if>
|
||||
@@ -202,17 +200,19 @@
|
||||
<if test="name != null and name != ''">
|
||||
and u.username like concat('%',#{name},'%')
|
||||
</if>
|
||||
<if test="storeIdList != null and storeIdList.size() > 0">
|
||||
<if test="practicalAssessmentUserId != null and practicalAssessmentUserId != '' and storeIdList != null and storeIdList.size() > 0">
|
||||
and (e.practical_assessment_user_id = #{practicalAssessmentUserId}
|
||||
or e.training_store_id in
|
||||
<foreach collection="storeIdList" item="item" index="index" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
<if test="practicalAssessmentUserId == null and storeIdList != null and storeIdList.size() > 0">
|
||||
and e.training_store_id in
|
||||
<foreach collection="storeIdList" item="item" index="index" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="authRegionIdList != null and authRegionIdList.size() > 0">
|
||||
and u.region_id in
|
||||
<foreach collection="authRegionIdList" item="item" index="index" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -285,6 +285,17 @@
|
||||
<foreach collection="regionIds" separator=" or " open="(" close=")" item="region" > region_path like concat("%", #{region}, "%")</foreach>
|
||||
</select>
|
||||
|
||||
<select id="getStoreIdsByRegionIds" resultType="string">
|
||||
select
|
||||
store_id
|
||||
from
|
||||
region_${enterpriseId}
|
||||
where
|
||||
deleted = 0
|
||||
and
|
||||
<foreach collection="regionIds" separator=" or " open="(" close=")" item="region" > region_path like concat("%", #{region}, "%")</foreach>
|
||||
</select>
|
||||
|
||||
<select id="getSubIdsByRegionpaths" resultType="string">
|
||||
select
|
||||
id
|
||||
|
||||
@@ -41,14 +41,7 @@
|
||||
id,shop_id,audit_type,submitted_user_id,submitted_user_name,result_type,pass_reason,reject_reason,
|
||||
certify_file,create_time,update_time,deleted,data_type
|
||||
</sql>
|
||||
<select id="selectAuditIdByShopId" resultType="java.lang.Long">
|
||||
select
|
||||
id
|
||||
from
|
||||
xfsg_shop_audit_info
|
||||
where
|
||||
shop_id = #{shopId} and deleted = 0
|
||||
</select>
|
||||
|
||||
<select id="getListByShopIdAndType" resultType="com.cool.store.vo.ShopAuditInfoVO">
|
||||
select <include refid="Base_Column_List"/>
|
||||
from xfsg_shop_audit_info
|
||||
@@ -56,4 +49,8 @@
|
||||
and audit_type = #{type}
|
||||
order by create_time
|
||||
</select>
|
||||
<select id="getAuditList" resultType="com.cool.store.entity.ShopAuditInfoDO">
|
||||
select * from xfsg_shop_audit_info
|
||||
where shop_id = #{shopId} and audit_type =#{auditType}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -168,7 +168,11 @@
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="request != null and request != '' ">
|
||||
and xsi.shop_name Like concat("%",#{request},"%") or xsi.shop_num Like concat("%",#{request},"%")
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -1,9 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.cool.store.mapper.SignFranchiseMapper">
|
||||
<update id="updateAuditByShopId">
|
||||
update xfsg_sign_franchise
|
||||
set audit_id = #{auditId}
|
||||
where shop_id = #{shopId}
|
||||
</update>
|
||||
<select id="selectByShopId" resultType="com.cool.store.entity.SignFranchiseDO">
|
||||
select *
|
||||
from xfsg_sign_franchise
|
||||
where shop_id = #{shopId}
|
||||
order by create_time desc
|
||||
limit 1
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.Data;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
@@ -13,7 +15,9 @@ import java.util.List;
|
||||
*/
|
||||
@Data
|
||||
public class AcceptanceListRequest {
|
||||
|
||||
@ApiModelProperty("门店名称或编码")
|
||||
private String request;
|
||||
@ApiModelProperty("阶段状态")
|
||||
private List<Integer> subStageStatus;
|
||||
private Integer pageNum;
|
||||
private Integer pageSize;
|
||||
|
||||
@@ -26,7 +26,7 @@ public class AddSignFranchiseRequest {
|
||||
@ApiModelProperty("是否有营业执照 0-是 1-否")
|
||||
private Integer isBusinessLicense;
|
||||
|
||||
@ApiModelProperty("是否有食营 0-是 1-否")
|
||||
@ApiModelProperty("是否有食营 0-是 2-否[二证合一] 3-否[[三小一摊] 4-否[暂未办理]")
|
||||
private Integer isFoodLicense;
|
||||
|
||||
@ApiModelProperty("合同开始日期")
|
||||
|
||||
@@ -430,4 +430,9 @@ public class FranchiseAgreementRequest {
|
||||
* 5 A105
|
||||
*/
|
||||
private String zqyty;
|
||||
|
||||
/**
|
||||
* 装修合同业务分类,默认:3121375929356587766
|
||||
*/
|
||||
private String zxhtywfl;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/05/17/下午6:15
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class SeeAcceptanceRequest {
|
||||
private Long shopId;
|
||||
@ApiModelProperty("'结果类型 0通过,1拒绝',")
|
||||
@NotNull(message = "审核结果不能为空")
|
||||
private Integer resultType;
|
||||
@ApiModelProperty("原因")
|
||||
private String reason;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/05/17/下午8:32
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class SeeAccetanceListRequest {
|
||||
@ApiModelProperty("门店名称或编码")
|
||||
private String request;
|
||||
private Integer pageNum;
|
||||
private Integer pageSize;
|
||||
}
|
||||
@@ -224,8 +224,8 @@ public class SubmitLicenseResponse {
|
||||
submitLicenseResponse.setLicenseUrl(licenseTransactDO.getCreditUrl());
|
||||
submitLicenseResponse.setLicenseName(licenseTransactDO.getBusinessLicense());
|
||||
submitLicenseResponse.setSocialCreditCode(licenseTransactDO.getCreditCode());
|
||||
submitLicenseResponse.setIdCardAndLicense1(licenseTransactDO.getIdCardNegativeCreditUrl());
|
||||
submitLicenseResponse.setIdCardAndLicense2(licenseTransactDO.getIdCardPositiveCreditUrl());
|
||||
submitLicenseResponse.setIdCardAndLicense2(licenseTransactDO.getIdCardNegativeCreditUrl());
|
||||
submitLicenseResponse.setIdCardAndLicense1(licenseTransactDO.getIdCardPositiveCreditUrl());
|
||||
submitLicenseResponse.setFoodLicenseUrl(licenseTransactDO.getFoodBusinessLicenseUrl());
|
||||
submitLicenseResponse.setBusinessPremises(licenseTransactDO.getFoodLicenseAddress());
|
||||
submitLicenseResponse.setFoodLicenseCode(licenseTransactDO.getFoodBusinessLicenseCode());
|
||||
|
||||
@@ -27,7 +27,7 @@ public interface CoolStoreStartFlowService {
|
||||
/**
|
||||
*特许经营合同
|
||||
* @param request
|
||||
* @param type 0:个人 1:企业
|
||||
* @param type 1:个人 2:企业
|
||||
* @return
|
||||
*/
|
||||
ResponseResult franchiseAgreement(FranchiseAgreementRequest request,Integer type);
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.dto.decoration.ConstructionScheduleDTO;
|
||||
import com.cool.store.entity.ShopAuditInfoDO;
|
||||
import com.cool.store.request.AcceptanceListRequest;
|
||||
import com.cool.store.request.SeeAcceptanceRequest;
|
||||
import com.cool.store.request.SeeAccetanceListRequest;
|
||||
import com.cool.store.vo.fitmentCheckVO;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/05/17/下午5:57
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
public interface SeeAcceptanceService {
|
||||
Boolean auditSeeAcceptance(SeeAcceptanceRequest seeAcceptanceRequest, LoginUserInfo user);
|
||||
ConstructionScheduleDTO getWithdrawal(Long shopId);
|
||||
List<ShopAuditInfoDO> getAuditInfo(Long shopId);
|
||||
PageInfo<fitmentCheckVO> getAcceptanceList(AcceptanceListRequest request, LoginUserInfo user);
|
||||
}
|
||||
@@ -29,6 +29,13 @@ public interface UserAuthMappingService {
|
||||
*/
|
||||
List<String> getAuthRegionIdAndSubRegionIdByUserId(String userId);
|
||||
|
||||
/**
|
||||
* 获取用户授权的所有门店id
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
List<String> getAuthStoreIdAndSubRegionIdByUserId(String userId);
|
||||
|
||||
/**
|
||||
* 提供 根据职位 意向区域 查 对应人的接口 同时返回人名字
|
||||
* @param userRoleEnum
|
||||
|
||||
@@ -52,7 +52,8 @@ public class CoolStoreStartFlowServiceImpl implements CoolStoreStartFlowService
|
||||
InitiatingResponse initiatingResponse = httpRestTemplateService.postForObject(url, request, InitiatingResponse.class);
|
||||
log.info("newStore API response:{}", JSONObject.toJSONString(initiatingResponse));
|
||||
if (initiatingResponse.getCode() != 0L) {
|
||||
return new ResponseResult(500, initiatingResponse.getMsg(), initiatingResponse.getData());
|
||||
throw new ServiceException(ErrorCodeEnum.FRANCHISE_AGREEMENT_FALSE, initiatingResponse.getMsg(),initiatingResponse.getData());
|
||||
// return new ResponseResult(500, initiatingResponse.getMsg(), initiatingResponse.getData());
|
||||
} else {
|
||||
//更新阶段信息
|
||||
shopStageInfoDAO.updateShopStageAndAuditInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_31, null);
|
||||
@@ -69,15 +70,17 @@ public class CoolStoreStartFlowServiceImpl implements CoolStoreStartFlowService
|
||||
Map<String, Object> requestMap = new HashMap<>();
|
||||
fillSignatureInfo(requestMap);
|
||||
String url = null;
|
||||
if (Constants.ONE_INTEGER == type) {
|
||||
if (Constants.TWO_INTEGER == type) {
|
||||
url = xfsgUrl + Constants.FRANCHISE_AGREEMENT_COMPANY + "?timestamp=" + requestMap.get("timestamp") + "&signature=" + requestMap.get("signature");
|
||||
} else if (Constants.TWO_INTEGER == type) {
|
||||
request.setZxhtywfl("3121375929356587766");
|
||||
} else if (Constants.ONE_INTEGER == type) {
|
||||
url = xfsgUrl + Constants.FRANCHISE_AGREEMENT_PERSON + "?timestamp=" + requestMap.get("timestamp") + "&signature=" + requestMap.get("signature");
|
||||
}
|
||||
InitiatingResponse initiatingResponse = httpRestTemplateService.postForObject(url, request, InitiatingResponse.class);
|
||||
log.info("franchiseAgreement API response:{}", JSONObject.toJSONString(initiatingResponse));
|
||||
if (initiatingResponse.getCode() != 0L) {
|
||||
return new ResponseResult(500, initiatingResponse.getMsg(), initiatingResponse.getData());
|
||||
// throw new ServiceException(500, initiatingResponse.getMsg(), initiatingResponse.getData());
|
||||
throw new ServiceException(ErrorCodeEnum.FRANCHISE_AGREEMENT_FALSE, initiatingResponse.getMsg(),initiatingResponse.getData());
|
||||
} else {
|
||||
return new ResponseResult(200000, initiatingResponse.getMsg(), initiatingResponse.getData());
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
}
|
||||
//预算
|
||||
BudgetDTO proposedBookBudget = getBudgetDTOS(decoration);
|
||||
if (proposedBookBudget == null) return null;
|
||||
if (proposedBookBudget == null) {return null;}
|
||||
BigDecimal vzHj = proposedBookBudget.getVzHj();
|
||||
//支付二维码url
|
||||
Long regionId = shopInfoDAO.getRegionIdByid(shopId);
|
||||
@@ -286,15 +286,32 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
name.add(CommonConstants.WITHDRAWAL);
|
||||
ConstructionScheduleDTO approach = new ConstructionScheduleDTO();
|
||||
AcceptanceInfoDO acceptanceInfoDO = acceptanceInfoDAO.selectByShopId(shopId);
|
||||
|
||||
ConstructionScheduleDTO constructionSage = new ConstructionScheduleDTO();
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
||||
LineInfoDO lineInfo = lineInfoMapper.getByLineId(shopInfo.getLineId());
|
||||
for (ConstructionScheduleDTO constructionScheduleDTO : constructionSchedule) {
|
||||
if (name.contains(constructionScheduleDTO.getName())) {
|
||||
collect.add(constructionScheduleDTO);
|
||||
if (constructionScheduleDTO.getName().equals(CommonConstants.APPROACH)) {
|
||||
approach = constructionScheduleDTO;
|
||||
}
|
||||
//计划撤场时间
|
||||
//计划撤场时间 //如果撤场并且视觉验收状态为-100则更新待验收
|
||||
if (constructionScheduleDTO.getName().equals(CommonConstants.WITHDRAWAL)) {
|
||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_13);
|
||||
if(shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_00.getShopSubStageStatus())
|
||||
&& constructionScheduleDTO.getState().equals(ConstructionPhaseEnum.construction_FINSH.getCode())){
|
||||
shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_130);
|
||||
//发送给品牌设计经理
|
||||
EnterpriseUserDO enterpriseUser = userAuthMappingService.getUserByRoleEnumAndWantShopAreaId(UserRoleEnum.DESIGN_MANAGER, lineInfo.getWantShopAreaId());
|
||||
Map<String, String> messageMap = new HashMap<>();
|
||||
messageMap.put("storeName",shopInfo.getShopName());
|
||||
messageMap.put("shopId",String.valueOf(shopId));
|
||||
messageMap.put("shopName",shopInfo.getShopName());
|
||||
messageMap.put("partnerUsername",lineInfo.getUsername());
|
||||
messageMap.put("partnerMobile",lineInfo.getMobile());
|
||||
commonService.sendMessage(Arrays.asList(enterpriseUser.getUserId()), MessageEnum.MESSAGE_28, messageMap);
|
||||
}
|
||||
ConstructionScheduleDTO withdrawal = constructionScheduleDTO;
|
||||
if (Objects.nonNull(acceptanceInfoDO)) {
|
||||
Date date = CoolDateUtils.parseDate(withdrawal.getPlanBeginDate(), CoolDateUtils.DATE_FORMAT_DAY);
|
||||
@@ -306,12 +323,12 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
constructionSage = constructionScheduleDTO;
|
||||
}
|
||||
}
|
||||
|
||||
//设置进场时间xfsg_acceptance_info
|
||||
if (Objects.nonNull(acceptanceInfoDO) && StringUtils.isNotEmpty(approach.getActualBeginDate())) {
|
||||
Date date = CoolDateUtils.parseDate(approach.getActualBeginDate(), CoolDateUtils.DATE_FORMAT_DAY);
|
||||
acceptanceInfoDO.setActualEntryTime(date);
|
||||
}
|
||||
|
||||
//施工完成时间,计划开始和完成时间 //
|
||||
if (Objects.nonNull(acceptanceInfoDO) && StringUtils.isNotEmpty(constructionSage.getActualEndDate())) {
|
||||
Date date = CoolDateUtils.parseDate(constructionSage.getActualEndDate(), CoolDateUtils.DATE_FORMAT_DAY);
|
||||
@@ -327,6 +344,8 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
}
|
||||
acceptanceInfoDO.setUpdateTime(new Date());
|
||||
acceptanceInfoDAO.updateAcceptanceInfo(acceptanceInfoDO);
|
||||
|
||||
|
||||
//如果完成更新施工阶段状态
|
||||
if (ConstructionPhaseEnum.construction_FINSH.getCode().equals(constructionSage.getState())) {
|
||||
shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_112);
|
||||
@@ -465,7 +484,7 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
List<fitmentCheckVO> fitmentCheckVOList = new ArrayList<>();
|
||||
//shopId,lineid,regionid,shopname,storenum,
|
||||
|
||||
List<ShopInfoDO> shopInfoDOS = shopInfoMapper.selectShopListByRegionId(regions, request.getSubStageStatus());
|
||||
List<ShopInfoDO> shopInfoDOS = shopInfoMapper.selectShopListByRegionId(regions, request.getSubStageStatus(),null);
|
||||
PageInfo pageInfo = new PageInfo<>(shopInfoDOS);
|
||||
if (shopInfoDOS.isEmpty()) {
|
||||
log.info("该工程部监理下门店为空");
|
||||
|
||||
@@ -431,18 +431,27 @@ public class EmployeeTrainingServiceImpl implements EmployeeTrainingService {
|
||||
@Override
|
||||
public PageInfo<EmployeeTrainingVO> assessmentUserList(String userId, EmployeeAssessmentRequest request) {
|
||||
|
||||
List<String> authRegionIdList = new ArrayList<>();
|
||||
if (StringUtils.isNotBlank(userId) && !sysRoleService.checkIsAdmin(userId)) {
|
||||
authRegionIdList = userAuthMappingService.getAuthRegionIdAndSubRegionIdByUserId(userId);
|
||||
List<String> requestStoreIdList = request.getStoreIdList();
|
||||
Boolean isAdmin = sysRoleService.checkIsAdmin(userId);
|
||||
if (CollectionUtils.isEmpty(requestStoreIdList) && StringUtils.isNotBlank(userId) && !isAdmin) {
|
||||
requestStoreIdList = userAuthMappingService.getAuthStoreIdAndSubRegionIdByUserId(userId);
|
||||
if(CollectionUtils.isEmpty(requestStoreIdList)){
|
||||
return new PageInfo<>();
|
||||
}
|
||||
}
|
||||
String practicalAssessmentUserId = userId;
|
||||
//空意味着管理员
|
||||
if(isAdmin){
|
||||
practicalAssessmentUserId = null;
|
||||
}
|
||||
|
||||
PageHelper.startPage(request.getPageNum(), request.getPageSize());
|
||||
List<EmployeeTrainingVO> employeeTrainingVOList = employeeTrainingDAO
|
||||
.assessmentUserList(request.getName(), userId, request.getAssessmentStatus(),
|
||||
.assessmentUserList(request.getName(), practicalAssessmentUserId, request.getAssessmentStatus(),
|
||||
DateUtils.parseLongDateToStr(request.getEstimatedAssessmentBeginTime()),
|
||||
DateUtils.parseLongDateToStr(request.getEstimatedAssessmentEndTime()),
|
||||
DateUtils.parseLongDateToStr(request.getActualAssessmentBeginTime()),
|
||||
DateUtils.parseLongDateToStr(request.getActualAssessmentEndTime()), request.getStoreIdList(), authRegionIdList);
|
||||
DateUtils.parseLongDateToStr(request.getActualAssessmentEndTime()), requestStoreIdList);
|
||||
if (CollectionUtils.isEmpty(employeeTrainingVOList)) {
|
||||
return new PageInfo<>(employeeTrainingVOList);
|
||||
}
|
||||
@@ -640,10 +649,10 @@ public class EmployeeTrainingServiceImpl implements EmployeeTrainingService {
|
||||
}
|
||||
|
||||
|
||||
if (employeeTrainingDO.getPracticalExamStatus() == CommonConstants.TWO || employeeTrainingDO.getTheoreticalExamStatus() == CommonConstants.TWO) {
|
||||
if (employeeTrainingDO.getPracticalExamStatus() == CommonConstants.TWO) {
|
||||
employeeTrainingDO.setAssessmentStatus(CommonConstants.THREE);
|
||||
}
|
||||
if (employeeTrainingDO.getPracticalExamStatus() == 1 && employeeTrainingDO.getTheoreticalExamStatus() == 1) {
|
||||
if (employeeTrainingDO.getPracticalExamStatus() == 1) {
|
||||
employeeTrainingDO.setAssessmentStatus(CommonConstants.TWO);
|
||||
}
|
||||
employeeTrainingDAO.updateByPrimaryKeySelective(employeeTrainingDO);
|
||||
|
||||
@@ -113,7 +113,8 @@ public class PreparationServiceImpl implements PreparationService {
|
||||
preparationScheduleVO.setRegionNodeName(regionNameMap.getOrDefault(x.getRegionId(), ""));
|
||||
ScheduleDTO dto = scheduleDTOMap.getOrDefault(x.getId(), new ScheduleDTO());
|
||||
preparationScheduleVO.setCompletionColumn(dto.getCompletionColumn());
|
||||
preparationScheduleVO.setTotalColumn(dto.getTotalColumn());
|
||||
//-1 去掉视觉验收
|
||||
preparationScheduleVO.setTotalColumn(dto.getTotalColumn()-1);
|
||||
ShopStageInfoDO stageInfoDO = shopStageInfoDOMap.getOrDefault(x.getId(), new ShopStageInfoDO());
|
||||
if (StringUtils.isNotEmpty(stageInfoDO.getActualCompleteTime())) {
|
||||
preparationScheduleVO.setContractCompletionTime(DateUtils.strToDate(stageInfoDO.getActualCompleteTime(), DateUtils.YYYY_MM_DD_HH_MM_SS));
|
||||
|
||||
@@ -0,0 +1,255 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.dao.*;
|
||||
import com.cool.store.dto.decoration.ConstructionScheduleDTO;
|
||||
import com.cool.store.dto.decoration.DecorationDTO;
|
||||
import com.cool.store.dto.decoration.ProjectDTO;
|
||||
import com.cool.store.entity.*;
|
||||
import com.cool.store.enums.AuditResultTypeEnum;
|
||||
import com.cool.store.enums.AuditTypeEnum;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.UserRoleEnum;
|
||||
import com.cool.store.enums.point.ShopSubStageEnum;
|
||||
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.mapper.LineInfoMapper;
|
||||
import com.cool.store.mapper.ShopInfoMapper;
|
||||
import com.cool.store.request.AcceptanceListRequest;
|
||||
import com.cool.store.request.SeeAcceptanceRequest;
|
||||
import com.cool.store.request.SeeAccetanceListRequest;
|
||||
import com.cool.store.service.*;
|
||||
import com.cool.store.utils.poi.StringUtils;
|
||||
import com.cool.store.vo.fitmentCheckVO;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/05/17/下午5:58
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Service
|
||||
public class SeeAcceptanceServiceImpl implements SeeAcceptanceService {
|
||||
private static final Logger log = LoggerFactory.getLogger(SeeAcceptanceServiceImpl.class);
|
||||
@Resource
|
||||
private DecorationService decorationService;
|
||||
@Resource
|
||||
private ShopInfoDAO shopInfoDAO;
|
||||
@Resource
|
||||
private YlfService ylfService;
|
||||
@Resource
|
||||
private ShopAuditInfoDAO shopAuditInfoDAO;
|
||||
@Resource
|
||||
private TempUserDetailDAO tempUserDetailDAO;
|
||||
@Resource
|
||||
private ShopStageInfoDAO shopStageInfoDAO;
|
||||
@Resource
|
||||
private PreparationService preparationService;
|
||||
@Resource
|
||||
private UserAuthMappingService userAuthMappingService;
|
||||
@Resource
|
||||
private ShopInfoMapper shopInfoMapper;
|
||||
@Resource
|
||||
private LineInfoMapper lineInfoMapper;
|
||||
@Resource
|
||||
private EnterpriseUserDAO enterpriseUserDAO;
|
||||
@Resource
|
||||
private RegionService regionService;
|
||||
@Resource
|
||||
private SysRoleService sysRoleService;
|
||||
@Resource
|
||||
private AcceptanceInfoDAO acceptanceInfoDAO;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean auditSeeAcceptance(SeeAcceptanceRequest request, LoginUserInfo user) {
|
||||
if (request.getShopId() == null || request.getShopId() == 0) {
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_ID_IS_NULL);
|
||||
}
|
||||
if (request.getResultType() == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.SEE_ACCEPTANCE_AUDIT_NULL);
|
||||
}
|
||||
if (Objects.isNull(user)) {
|
||||
throw new ServiceException(ErrorCodeEnum.USER_NOT_LOGIN);
|
||||
}
|
||||
|
||||
ShopAuditInfoDO shopAuditInfoDO = new ShopAuditInfoDO();
|
||||
shopAuditInfoDO.setShopId(request.getShopId());
|
||||
shopAuditInfoDO.setAuditType(AuditTypeEnum.VISUAL_ACCEPTANCE.getCode());
|
||||
shopAuditInfoDO.setSubmittedUserId(user.getUserId());
|
||||
shopAuditInfoDO.setSubmittedUserName(user.getName());
|
||||
shopAuditInfoDO.setResultType(request.getResultType());
|
||||
if (AuditResultTypeEnum.PASS.getCode().equals(request.getResultType())) {
|
||||
shopAuditInfoDO.setPassReason(request.getReason());
|
||||
} else {
|
||||
shopAuditInfoDO.setRejectReason(request.getReason());
|
||||
}
|
||||
// TODO xfsg_user_detail_id
|
||||
shopAuditInfoDO.setCreateTime(new Date());
|
||||
shopAuditInfoDO.setDataType(CommonConstants.ONE);
|
||||
Long id = shopAuditInfoDAO.addAuditInfo(shopAuditInfoDO);
|
||||
if (AuditResultTypeEnum.PASS.getCode().equals(request.getResultType())) {
|
||||
shopStageInfoDAO.updateShopStageAndAuditInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_132, id);
|
||||
preparationService.whetherToOpenForAcceptance(request.getShopId());
|
||||
} else {
|
||||
shopStageInfoDAO.updateShopStageAndAuditInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_131, id);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConstructionScheduleDTO getWithdrawal(Long shopId) {
|
||||
DecorationDTO decoration = getDecorationDTO(shopId);
|
||||
if (decoration == null) {
|
||||
log.error("DecorationModel is null");
|
||||
return null;
|
||||
}
|
||||
ConstructionScheduleDTO constructionScheduleDTO = new ConstructionScheduleDTO();
|
||||
List<ConstructionScheduleDTO> constructionSchedule = decoration.getConstructionSchedule();
|
||||
for (ConstructionScheduleDTO a : constructionSchedule) {
|
||||
if (CommonConstants.WITHDRAWAL.equals(a.getName())) {
|
||||
constructionScheduleDTO = a;
|
||||
}
|
||||
}
|
||||
if (Objects.isNull(constructionScheduleDTO)) {
|
||||
throw new ServiceException(ErrorCodeEnum.SEE_ACCEPTANCE_ERROR);
|
||||
}
|
||||
return constructionScheduleDTO;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ShopAuditInfoDO> getAuditInfo(Long shopId) {
|
||||
return shopAuditInfoDAO.getAuditList(shopId, AuditTypeEnum.VISUAL_ACCEPTANCE.getCode());
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageInfo<fitmentCheckVO> getAcceptanceList(AcceptanceListRequest request, LoginUserInfo user) {
|
||||
List<String> authRegionIds = userAuthMappingService.getAuthRegionIdAndSubRegionIdByUserId(user.getUserId());
|
||||
List<Long> regions = new ArrayList<>();
|
||||
for (String authRegionId : authRegionIds) {
|
||||
regions.add(Long.parseLong(authRegionId));
|
||||
}
|
||||
PageHelper.startPage(request.getPageNum(), request.getPageSize());
|
||||
if (regions.isEmpty()) {
|
||||
log.info("该用户下权限没有管理区域");
|
||||
return new PageInfo<>();
|
||||
}
|
||||
List<fitmentCheckVO> fitmentCheckVOList = new ArrayList<>();
|
||||
//shopId,lineid,regionid,shopname,storenum,
|
||||
|
||||
List<ShopInfoDO> shopInfoDOS = shopInfoMapper.selectShopListByRegionId(regions, request.getSubStageStatus(),request.getRequest());
|
||||
PageInfo pageInfo = new PageInfo<>(shopInfoDOS);
|
||||
if (shopInfoDOS.isEmpty()) {
|
||||
log.info("该工程部监理下门店为空");
|
||||
return pageInfo;
|
||||
}
|
||||
Map<Long, ShopInfoDO> ShopIdmap = shopInfoDOS.stream().collect(Collectors.toMap(ShopInfoDO::getId, dto1 -> dto1));
|
||||
//招商经理,选址人员(拓展经理)id
|
||||
List<Long> lineIds = shopInfoDOS.stream().filter(o -> o.getLineId() != null)
|
||||
.map(ShopInfoDO::getLineId).distinct().collect(Collectors.toList());
|
||||
List<LineInfoDO> lineInfos = lineInfoMapper.getByLineIds(lineIds);
|
||||
Map<Long, LineInfoDO> lineInfoDOMap = lineInfos.stream().collect(Collectors.toMap(LineInfoDO::getId, dto -> dto));
|
||||
//招商name
|
||||
List<String> userIds = new ArrayList<>();
|
||||
userIds.addAll(lineInfos.stream().filter(o -> o.getInvestmentManager() != null)
|
||||
.map(LineInfoDO::getInvestmentManager).distinct().collect(Collectors.toList()));
|
||||
//选址人员(拓展经理)name
|
||||
userIds.addAll(lineInfos.stream().filter(o -> o.getDevelopmentManager() != null)
|
||||
.map(LineInfoDO::getDevelopmentManager).distinct().collect(Collectors.toList()));
|
||||
Map<String, String> userNameMap = enterpriseUserDAO.getUserNameMap(userIds);
|
||||
//所属战区
|
||||
List<Long> regionIds = shopInfoDOS.stream().filter(o -> o.getRegionId() != null).
|
||||
map(ShopInfoDO::getRegionId).distinct().collect(Collectors.toList());
|
||||
Map<Long, String> regionNameMap = regionService.getBelongWarRegionNameMap(regionIds);
|
||||
//战区经理name
|
||||
Map<Long, String> fightManger = new HashMap<>();
|
||||
for (Long regionId : regionIds) {
|
||||
String fightMangerUserId = sysRoleService.getUserIdByRegionIdWithRolePriority(regionId, Arrays.asList(UserRoleEnum.THEATER_MANAGER));
|
||||
String userName = enterpriseUserDAO.getUserName(fightMangerUserId);
|
||||
fightManger.put(regionId, userName);
|
||||
}
|
||||
//施工实际完成实际
|
||||
List<Long> shopIds = new ArrayList<>(ShopIdmap.keySet());
|
||||
List<AcceptanceInfoDO> acceptanceInfoDOS = acceptanceInfoDAO.selectByShopIds(shopIds);
|
||||
Map<Long, AcceptanceInfoDO> acceptanceInfoDOSMap = acceptanceInfoDOS.stream()
|
||||
.collect(Collectors.toMap(AcceptanceInfoDO::getShopId, dto1 -> dto1));
|
||||
//验收状态
|
||||
List<ShopStageInfoDO> subStageList = shopStageInfoDAO.getSubStageList(shopIds, ShopSubStageEnum.SHOP_STAGE_13.getShopSubStage());
|
||||
List<Long> audits = subStageList.stream().filter(o -> o.getAuditId() != null).map(ShopStageInfoDO::getAuditId).collect(Collectors.toList());
|
||||
//验收时间
|
||||
List<ShopAuditInfoDO> auditInfoList = shopAuditInfoDAO.getAuditInfoList(audits);
|
||||
Map<Long, ShopAuditInfoDO> auditMap = auditInfoList.stream().filter(o -> o.getShopId() != null).collect(Collectors.toMap(ShopAuditInfoDO::getShopId, Function.identity()));
|
||||
|
||||
Map<Long, ShopStageInfoDO> ShopStageInfoDOMap = subStageList.stream()
|
||||
.collect(Collectors.toMap(ShopStageInfoDO::getShopId, dto1 -> dto1));
|
||||
for (ShopInfoDO shopInfoDO : shopInfoDOS) {
|
||||
Long shopId = shopInfoDO.getId();
|
||||
Long lineId = shopInfoDO.getLineId();
|
||||
Long regionId = shopInfoDO.getRegionId();
|
||||
fitmentCheckVO fitmentCheckVO = new fitmentCheckVO();
|
||||
fitmentCheckVO.setShopId(shopId);
|
||||
fitmentCheckVO.setLineId(lineId);
|
||||
fitmentCheckVO.setShopName(shopInfoDO.getShopName());
|
||||
fitmentCheckVO.setStoreNum(shopInfoDO.getStoreNum());
|
||||
fitmentCheckVO.setRegionId(regionId);
|
||||
fitmentCheckVO.setRegion(regionNameMap.get(regionId));
|
||||
fitmentCheckVO.setFightManager(fightManger.get(regionId));
|
||||
if (lineId != null) {
|
||||
fitmentCheckVO.setInvestmentManagerId(lineInfoDOMap.get(lineId)
|
||||
.getInvestmentManager());
|
||||
fitmentCheckVO.setInvestmentManager(userNameMap.get(lineInfoDOMap.get(lineId)
|
||||
.getInvestmentManager()));
|
||||
fitmentCheckVO.setSitterId(lineInfoDOMap.get(lineId)
|
||||
.getDevelopmentManager());
|
||||
fitmentCheckVO.setSitterName(userNameMap.get(lineInfoDOMap.get(lineId)
|
||||
.getDevelopmentManager()));
|
||||
fitmentCheckVO.setPartnerName(lineInfoDOMap.get(lineId).getUsername());
|
||||
}
|
||||
AcceptanceInfoDO acceptanceInfoDO = acceptanceInfoDOSMap.get(shopId);
|
||||
if (shopId != null) {
|
||||
if (Objects.nonNull(acceptanceInfoDO)) {
|
||||
fitmentCheckVO.setActualEndTime(acceptanceInfoDO.getConstructionCompletionTime());
|
||||
}
|
||||
}
|
||||
if (Objects.nonNull(auditMap.get(shopId))) {
|
||||
fitmentCheckVO.setAcceptanceTime(auditMap.get(shopId).getCreateTime());
|
||||
}
|
||||
if (Objects.nonNull(ShopStageInfoDOMap.get(shopId))) {
|
||||
fitmentCheckVO.setShopSubStageStatus(ShopStageInfoDOMap.get(shopId).getShopSubStageStatus());
|
||||
}
|
||||
fitmentCheckVOList.add(fitmentCheckVO);
|
||||
}
|
||||
pageInfo.setList(fitmentCheckVOList);
|
||||
return pageInfo;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private DecorationDTO getDecorationDTO(Long shopId) {
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
||||
if (Objects.isNull(shopInfo)) {
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_ID_NOT_EXIST);
|
||||
}
|
||||
String storeNum = shopInfo.getStoreNum();
|
||||
if (StringUtils.isNotEmpty(storeNum)) {
|
||||
ProjectDTO projectList = ylfService.getProjectList(storeNum);
|
||||
Long projectId = projectList.getProjectId();
|
||||
DecorationDTO decoration = ylfService.getDecoration(projectId);
|
||||
return decoration;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -114,7 +114,7 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
shopAuditInfoMapper.insertSelective(shopAuditInfoDO);
|
||||
Long auditId = shopAuditInfoDO.getId();
|
||||
shopStageInfoDAO.updateShopStageAndAuditInfo(shopId, shopSubStageStatusEnum, auditId);
|
||||
systemBuildingShopMapper.updateAuditByShopId(auditId, shopId);
|
||||
signFranchiseMapper.updateAuditByShopId(auditId, shopId);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -143,6 +143,7 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(request.getShopId());
|
||||
FranchiseAgreementRequest franchiseAgreementRequest = convertFranchiseAgreement(request, shopInfoDO, user);
|
||||
MemberQuestionDO memberQuestionDO = joinIntentionMapper.getByLineId(shopInfoDO.getLineId());
|
||||
log.info("submitSignFranchise franchiseAgreementRequest :{}",JSONObject.toJSONString(franchiseAgreementRequest));
|
||||
ResponseResult responseResult = coolStoreStartFlowService.franchiseAgreement(franchiseAgreementRequest, memberQuestionDO.getJoinType());
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_83);
|
||||
return responseResult;
|
||||
@@ -249,7 +250,7 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
.jmsxm1(lineInfoDO.getUsername())
|
||||
.jsrq(getDateTimeFormat(Constants.TIME_STAMP_FLAG, request.getContractStartEndTime()))
|
||||
.jszhhz(linePayDO.getPayAccount())
|
||||
.kdzBusinessId(AuditEnum.SIGN_FRANCHISE + "_" + shopId + "_" + lineId)
|
||||
.kdzBusinessId(AuditEnum.SIGN_FRANCHISE.getCode() + "_" + shopId + "_" + lineId)
|
||||
.khhjzh(linePayDO.getBankName())
|
||||
.lvbzj(Integer.valueOf(franchiseFeeDO.getPerformanceBond()))
|
||||
.lybzjdx(Integer.valueOf(franchiseFeeDO.getPerformanceBond()))
|
||||
@@ -263,7 +264,7 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
.partyb_type(licenseTransactDO.getLicenseType())
|
||||
.ppsyfbl(Double.parseDouble(request.getBrandFee()))
|
||||
.psfl("以实际结算为准")
|
||||
.qsdz("PUBLIC_COMPANY")
|
||||
.qsdz("PUBLIC_COMPANY,PUBLIC_OPERATOR")
|
||||
.qsrq(getDateTimeFormat(Constants.TIME_STAMP_FLAG, request.getContractStartTime()))
|
||||
.qylx(SignTypeEnum.getWorkflowStageByCode(request.getSignType()).getCode())
|
||||
.qys_dzyz("2731707107593166911")
|
||||
@@ -378,7 +379,7 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
if (Objects.nonNull(lineInfoDO)) {
|
||||
addSignFranchiseResponse.setPartnerName(lineInfoDO.getUsername());
|
||||
}
|
||||
if (Objects.nonNull(signingBaseInfoDO)) {
|
||||
if (Objects.nonNull(signingBaseInfoDO) && Objects.nonNull(memberQuestionDO)) {
|
||||
if (JoinTypeEnum.JOIN_TYPE_ONE.getCode().equals(memberQuestionDO.getJoinType())) {
|
||||
addSignFranchiseResponse.setIdCardNo(signingBaseInfoDO.getIdCardNo());
|
||||
} else if (JoinTypeEnum.JOIN_TYPE_TWO.getCode().equals(memberQuestionDO.getJoinType())) {
|
||||
|
||||
@@ -383,7 +383,7 @@ public class SysStoreAppServiceImpl implements SysStoreAppService, AuditResultSe
|
||||
// zmdzt
|
||||
newStoreRequest.setZmdzt(10);
|
||||
// zmrjkllzs1
|
||||
newStoreRequest.setZmrjkllzs1(sysStoreAppRequest.getStoreDetail().getAverageDailyRs());
|
||||
newStoreRequest.setZmrjkllzs1(PassengerFlowEnum.getByCode(sysStoreAppRequest.getStoreDetail().getAverageDailyRs()).getType());
|
||||
// zppsyfy
|
||||
newStoreRequest.setZppsyfy(0.05);
|
||||
// zq
|
||||
|
||||
@@ -79,6 +79,20 @@ public class UserAuthMappingServiceImpl implements UserAuthMappingService {
|
||||
return regionIds;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getAuthStoreIdAndSubRegionIdByUserId(String userId){
|
||||
List<UserAuthMappingDO> userAuthMapping = listUserAuthMappingByUserId(userId);
|
||||
if(CollectionUtils.isEmpty(userAuthMapping)){
|
||||
return Lists.newArrayList();
|
||||
}
|
||||
List<String> regionIds = userAuthMapping.stream().map(UserAuthMappingDO::getMappingId).collect(Collectors.toList());
|
||||
List<String> subRegionIds = regionMapper.getStoreIdsByRegionIds(regionIds);
|
||||
if(CollectionUtils.isNotEmpty(subRegionIds)){
|
||||
regionIds.addAll(subRegionIds);
|
||||
}
|
||||
return regionIds;
|
||||
}
|
||||
|
||||
/**
|
||||
* 提供 根据职位 意向区域 查 对应人的接口 同时返回人名字
|
||||
* @param userRoleEnum
|
||||
|
||||
@@ -65,6 +65,7 @@ public class EmployeeTrainingController {
|
||||
@ApiOperation("培训进度-列表")
|
||||
@PostMapping("/trainingScheduleList")
|
||||
public ResponseResult<PageInfo<EmployeeTrainingVO>> trainingScheduleList(@RequestBody EmployeeTrainingRequest employeeTrainingRequest) {
|
||||
employeeTrainingRequest.setAssignFlag(Boolean.TRUE);
|
||||
return ResponseResult.success(employeeTrainingService.employeeTrainingList(CurrentUserHolder.getUserId(), employeeTrainingRequest));
|
||||
}
|
||||
|
||||
@@ -102,7 +103,7 @@ public class EmployeeTrainingController {
|
||||
@ApiOperation("培训-战区经理-考核员工列表")
|
||||
@PostMapping("/assessmentUserList")
|
||||
public ResponseResult<PageInfo<EmployeeTrainingVO>> assessmentUserList(@RequestBody EmployeeAssessmentRequest request) {
|
||||
return ResponseResult.success(employeeTrainingService.assessmentUserList(null, request));
|
||||
return ResponseResult.success(employeeTrainingService.assessmentUserList(CurrentUserHolder.getUserId(), request));
|
||||
}
|
||||
|
||||
@ApiOperation("培训-督导-考核员工列表")
|
||||
|
||||
@@ -4,15 +4,14 @@ import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.context.PartnerUserHolder;
|
||||
import com.cool.store.dto.decoration.ConstructionScheduleDTO;
|
||||
import com.cool.store.request.AcceptanceListRequest;
|
||||
import com.cool.store.request.BookingAcceptanceRequest;
|
||||
import com.cool.store.request.ThreeAcceptanceCheckRequest;
|
||||
import com.cool.store.request.ThreeAcceptanceRequest;
|
||||
import com.cool.store.entity.ShopAuditInfoDO;
|
||||
import com.cool.store.request.*;
|
||||
import com.cool.store.response.FitmentResponse;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.response.ThreeSignResponse;
|
||||
import com.cool.store.service.DecorationService;
|
||||
import com.cool.store.service.PreparationService;
|
||||
import com.cool.store.service.SeeAcceptanceService;
|
||||
import com.cool.store.vo.Fitment.DecorationModelVO;
|
||||
import com.cool.store.vo.Fitment.DesignInfoVo;
|
||||
import com.cool.store.vo.LinePayVO;
|
||||
@@ -43,6 +42,8 @@ public class PCDecorationController {
|
||||
private DecorationService decorationService;
|
||||
@Resource
|
||||
private PreparationService preparationService;
|
||||
@Resource
|
||||
private SeeAcceptanceService seeAcceptanceService;
|
||||
@ApiOperation("获取新店装修flush")
|
||||
@GetMapping("/flush")
|
||||
public ResponseResult<Boolean> getFitmentSub(@RequestParam Long shopId) {
|
||||
@@ -97,4 +98,32 @@ public class PCDecorationController {
|
||||
public ResponseResult<ThreeSignResponse> getThreeAcceptance(@RequestParam Long shopId){
|
||||
return ResponseResult.success(decorationService.getThreeAcceptanceSign(shopId));
|
||||
}
|
||||
@ApiOperation("获取视觉验收撤场数据")
|
||||
@GetMapping("/getSeeAcceptanceWithdrawal")
|
||||
public ResponseResult<ConstructionScheduleDTO> getSeeAcceptanceWithdrawal(@RequestParam Long shopId){
|
||||
return ResponseResult.success(seeAcceptanceService.getWithdrawal(shopId));
|
||||
}
|
||||
@ApiOperation("视觉验收列表")
|
||||
@PostMapping("/getSeeAcceptanceList")
|
||||
public ResponseResult< PageInfo<fitmentCheckVO>> getSeeAcceptanceList(@RequestBody AcceptanceListRequest request){
|
||||
LoginUserInfo user = CurrentUserHolder.getUser();
|
||||
return ResponseResult.success(seeAcceptanceService.getAcceptanceList(request,user));
|
||||
}
|
||||
@ApiOperation("获取撤场数据")
|
||||
@GetMapping("/getWithdrawal")
|
||||
public ResponseResult<ConstructionScheduleDTO> getWithdrawal(@RequestParam Long shopId){
|
||||
return ResponseResult.success(seeAcceptanceService.getWithdrawal(shopId));
|
||||
}
|
||||
@ApiOperation("获取视觉验收审核数据")
|
||||
@GetMapping("/getSeeAuditInfo")
|
||||
public ResponseResult< List<ShopAuditInfoDO> > getAuditInfo(@RequestParam Long shopId){
|
||||
return ResponseResult.success(seeAcceptanceService.getAuditInfo(shopId));
|
||||
}
|
||||
@ApiOperation("验收视觉验收")
|
||||
@PostMapping("/auditSee")
|
||||
public ResponseResult<Boolean> auditSee(@RequestBody SeeAcceptanceRequest request){
|
||||
LoginUserInfo user = CurrentUserHolder.getUser();
|
||||
return ResponseResult.success(seeAcceptanceService.auditSeeAcceptance(request,user));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ 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.entity.ShopAuditInfoDO;
|
||||
import com.cool.store.request.LinePaySubmitRequest;
|
||||
import com.cool.store.request.ThreeAcceptanceCheckRequest;
|
||||
import com.cool.store.request.ThreeAcceptanceRequest;
|
||||
@@ -13,6 +14,7 @@ import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.response.ThreeSignResponse;
|
||||
import com.cool.store.service.AssessmentTemplateService;
|
||||
import com.cool.store.service.DecorationService;
|
||||
import com.cool.store.service.SeeAcceptanceService;
|
||||
import com.cool.store.vo.AssessmentTemplateVO;
|
||||
import com.cool.store.vo.Fitment.DecorationStageVO;
|
||||
import com.cool.store.vo.Fitment.DecorationModelVO;
|
||||
@@ -42,6 +44,8 @@ public class MiniDecorationController {
|
||||
private DecorationService decorationService;
|
||||
@Resource
|
||||
private AssessmentTemplateService assessmentTemplateService;
|
||||
@Resource
|
||||
private SeeAcceptanceService seeAcceptanceService;
|
||||
@ApiOperation("获取设计阶段子阶段信息")
|
||||
@GetMapping("/designSub")
|
||||
public ResponseResult<DesignInfoVo> getDesign(@RequestParam Long shopId){
|
||||
@@ -99,4 +103,14 @@ public class MiniDecorationController {
|
||||
public ResponseResult<ThreeSignResponse> getThreeAcceptance(@RequestParam Long shopId){
|
||||
return ResponseResult.success(decorationService.getThreeAcceptanceSign(shopId));
|
||||
}
|
||||
@ApiOperation("获取撤场数据")
|
||||
@GetMapping("/getWithdrawal")
|
||||
public ResponseResult<ConstructionScheduleDTO> getWithdrawal(@RequestParam Long shopId){
|
||||
return ResponseResult.success(seeAcceptanceService.getWithdrawal(shopId));
|
||||
}
|
||||
@ApiOperation("获取视觉验收审核数据")
|
||||
@GetMapping("/getSeeAuditInfo")
|
||||
public ResponseResult< List<ShopAuditInfoDO> > getAuditInfo(@RequestParam Long shopId){
|
||||
return ResponseResult.success(seeAcceptanceService.getAuditInfo(shopId));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user