Merge branch 'cc_20250723_Decoration' into 'master'
Cc 20250723 decoration See merge request hangzhou/java/custom_zxjp!142
This commit is contained in:
@@ -62,7 +62,9 @@ public enum ErrorCodeEnum {
|
||||
DATA_CONVERT_ERROR(400002, "日期转换异常!", null),
|
||||
PARENT_NODE_NOT_EXIST(400002, "父节点不存在", null),
|
||||
LOGIN_ERROR_MOBILE_ERROR(418, "登录失败 获取手机号失败!!", null),
|
||||
|
||||
//红圈通
|
||||
HQT_SHOP_DECORATION_ATTRIBUTES(1022000, "获取红圈通装修属性错误", null),
|
||||
HQT_PARAMS_ERROR(1022001, "构建红圈通请求参数错误", null),
|
||||
|
||||
LINE_ID_IS_NOT_EXIST(500001, "线索信息不存在!", null),
|
||||
WORK_FLOW_STAGE_PASS_ERROR(500002, "审核失败,非对应阶段!", null),
|
||||
@@ -112,6 +114,7 @@ public enum ErrorCodeEnum {
|
||||
NOT_EXIST_UNSELECT_POINT(600017, "当前没有未选择的铺位", null),
|
||||
SELECT_POINT_ERROR(600018, "铺位选中失败", null),
|
||||
POINT_NOT_SELECT(600019, "该门店未选址", null),
|
||||
SHOP_DECORATION_ATTRIBUTES_IS_NULL(600020,"门店装修属性为空,请到加盟合同签约阶段填写",null),
|
||||
|
||||
OPEN_NEW_SHOP_RECORD_NOT_EXIST(700001, "开店申请记录不存在", null),
|
||||
OPEN_NEW_SHOP_RECORD_AUDITED(700002, "开店申请已审核", null),
|
||||
@@ -231,6 +234,8 @@ public enum ErrorCodeEnum {
|
||||
STATUS_NOT_SUPPORT_SUMMIT(121006,"该状态不支持提交",null),
|
||||
DESIGN_NO_COMPLETE(121007,"请先完成设计阶段!",null),
|
||||
SIGN_COMPLETED(121008,"你已完成验收,无需重复操作!",null),
|
||||
SHOP_CODE_EXIST(121009,"存在重复门店编码,请联系CRM工作人员处理",null),
|
||||
HQT_SHOP_ID_NOT_EXIST(121010,"红圈通门店id为空,该门店双方系统未互通",null),
|
||||
|
||||
UPDATE_FAIL(131000,"修改失败,表单不存在!",null),
|
||||
LICENSE_LEGAL_STAGE_FAIL(131001,"营业执照阶段未上传!",null),
|
||||
|
||||
@@ -14,17 +14,20 @@ import java.util.stream.Collectors;
|
||||
* @注释:
|
||||
*/
|
||||
public enum FranchiseBrandEnum {
|
||||
ZXJP(1,"正新鸡排"),
|
||||
ZXSMZ(2,"正新三明治"),
|
||||
ZJS(3,"正烧记"),
|
||||
DGMX(4,"大鼓米线"),
|
||||
CXM(5,"串小妹"),
|
||||
MZG(6,"茂掌柜");
|
||||
ZXJP(1,"正新鸡排","option486"),
|
||||
ZXSMZ(2,"正新三明治","option622"),
|
||||
ZJS(3,"正烧记","option488"),
|
||||
DGMX(4,"大鼓米线","option624"),
|
||||
CXM(5,"串小妹","option626"),
|
||||
MZG(6,"茂掌柜","option490");
|
||||
private int code;
|
||||
private String desc;
|
||||
FranchiseBrandEnum(int code, String desc) {
|
||||
//红圈通code
|
||||
private String hqtCode;
|
||||
FranchiseBrandEnum(int code, String desc,String hqtCode) {
|
||||
this.code = code;
|
||||
this.desc = desc;
|
||||
this.hqtCode = hqtCode;
|
||||
}
|
||||
public int getCode() {
|
||||
return code;
|
||||
@@ -32,6 +35,11 @@ public enum FranchiseBrandEnum {
|
||||
public String getDesc() {
|
||||
return desc;
|
||||
}
|
||||
|
||||
public String getHqtCode() {
|
||||
return hqtCode;
|
||||
}
|
||||
|
||||
public static String getDescByCode(String code) {
|
||||
if (StringUtils.isBlank(code)){
|
||||
return null;
|
||||
@@ -44,4 +52,16 @@ public enum FranchiseBrandEnum {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static FranchiseBrandEnum getEnumByCode(Integer code) {
|
||||
if (code == null){
|
||||
return null;
|
||||
}
|
||||
for (FranchiseBrandEnum e : FranchiseBrandEnum.values()) {
|
||||
if (code == e.getCode()) {
|
||||
return e;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.cool.store.enums.HqtEnum;
|
||||
|
||||
import com.cool.store.enums.ShopDecorationAttributesEnum;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2025/07/29/15:34
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
public enum HqtShopDecorationAttributesEnum {
|
||||
NEW_OPEN(ShopDecorationAttributesEnum.NEW_OPEN,"o1","新开店"),
|
||||
RENEWAL(ShopDecorationAttributesEnum.RENEWAL,"o2","老店翻新"),
|
||||
RELOCATION(ShopDecorationAttributesEnum.RELOCATION,"option46","迁址");
|
||||
private ShopDecorationAttributesEnum shopDecorationAttributesEnum;
|
||||
private String code;
|
||||
private String msg;
|
||||
|
||||
HqtShopDecorationAttributesEnum(ShopDecorationAttributesEnum shopDecorationAttributesEnum, String code, String msg) {
|
||||
this.shopDecorationAttributesEnum = shopDecorationAttributesEnum;
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
}
|
||||
public static HqtShopDecorationAttributesEnum getHqtShopDecorationAttributesEnumByShopDecorationAttributesEnum(ShopDecorationAttributesEnum shopDecorationAttributesEnum){
|
||||
if (shopDecorationAttributesEnum == null){
|
||||
return null;
|
||||
}
|
||||
for (HqtShopDecorationAttributesEnum value : HqtShopDecorationAttributesEnum.values()) {
|
||||
if (value.shopDecorationAttributesEnum.equals(shopDecorationAttributesEnum)){
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public ShopDecorationAttributesEnum getShopDecorationAttributesEnum() {
|
||||
return shopDecorationAttributesEnum;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.cool.store.enums.HqtEnum;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2025/07/31/10:15
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
public enum HqtSignFeeEnum {
|
||||
/**
|
||||
* field8__c 是否已收设计费
|
||||
* 是:option44
|
||||
* 否:option45
|
||||
*/
|
||||
YES("option44", "是", 1),
|
||||
NO("option45", "否", 0);
|
||||
private String code;
|
||||
private String msg;
|
||||
private Integer value;
|
||||
|
||||
HqtSignFeeEnum(String code, String msg, Integer value) {
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public static String getMsgByCode(String code) {
|
||||
for (HqtSignFeeEnum value : HqtSignFeeEnum.values()) {
|
||||
if (value.getCode().equals(code)) {
|
||||
return value.getMsg();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static HqtSignFeeEnum getCodeByValue(Integer value) {
|
||||
for (HqtSignFeeEnum hqtSignFeeEnum : HqtSignFeeEnum.values()) {
|
||||
if (hqtSignFeeEnum.getValue().equals(value)) {
|
||||
return hqtSignFeeEnum;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public Integer getValue() {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.cool.store.enums;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2025/07/31/14:46
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
public enum SatisfactionEnum {
|
||||
//满意度0-低,1-中,2-高', 3-差,4-一般,5-好,6-非常好
|
||||
LOW(0, "低",""),
|
||||
MIDDLE(1, "中",""),
|
||||
HIGH(2, "高",""),
|
||||
BAD(3, "差","option142"),
|
||||
NORMAL(4, "一般","option141"),
|
||||
GOOD(5, "好","option140"),
|
||||
EXCELLENT(6, "非常好","option139");
|
||||
private Integer code;
|
||||
private String name;
|
||||
//红圈通code
|
||||
private String hqtCode;
|
||||
SatisfactionEnum(Integer code, String name, String hqtCode) {
|
||||
this.code = code;
|
||||
this.name = name;
|
||||
this.hqtCode = hqtCode;
|
||||
}
|
||||
public static SatisfactionEnum getEnumByCode(Integer code) {
|
||||
for (SatisfactionEnum satisfactionEnum : SatisfactionEnum.values()) {
|
||||
if (satisfactionEnum.code.equals(code)) {
|
||||
return satisfactionEnum;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getHqtCode() {
|
||||
return hqtCode;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.cool.store.enums;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2025/07/24/15:54
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
public enum ShopDecorationAttributesEnum {
|
||||
//0-新开店 1-老店新开 2-老店翻新 3-迁址
|
||||
NEW_OPEN(0,"新开店"),
|
||||
OLD_NEW_OPEN(1,"老店新开"),
|
||||
RENEWAL(2,"老店翻新"),
|
||||
RELOCATION(3,"迁址");
|
||||
private Integer code;
|
||||
private String desc;
|
||||
ShopDecorationAttributesEnum(Integer code, String desc) {
|
||||
this.code = code;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return desc;
|
||||
}
|
||||
public static String getDescByCode(Integer code) {
|
||||
for (ShopDecorationAttributesEnum value : ShopDecorationAttributesEnum.values()) {
|
||||
if (value.getCode().equals(code)) {
|
||||
return value.getDesc();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public static ShopDecorationAttributesEnum getShopDecorationAttributesEnumByCode(Integer code) {
|
||||
for (ShopDecorationAttributesEnum value : ShopDecorationAttributesEnum.values()) {
|
||||
if (value.getCode().equals(code)) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -67,6 +67,7 @@ public enum ShopSubStageStatusEnum {
|
||||
|
||||
//施工阶段
|
||||
SHOP_SUB_STAGE_STATUS_110(ShopSubStageEnum.SHOP_STAGE_11, 1100, "待提交", Boolean.FALSE),
|
||||
SHOP_SUB_STAGE_STATUS_110_5(ShopSubStageEnum.SHOP_STAGE_11, 1105, "待进场", Boolean.FALSE),
|
||||
SHOP_SUB_STAGE_STATUS_111(ShopSubStageEnum.SHOP_STAGE_11, 1110, "施工中", Boolean.FALSE),
|
||||
SHOP_SUB_STAGE_STATUS_112(ShopSubStageEnum.SHOP_STAGE_11, 1120, "已完成", Boolean.TRUE),
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.cool.store.utils;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import javax.crypto.Mac;
|
||||
@@ -17,18 +18,18 @@ import java.util.stream.Collectors;
|
||||
public class OpenSignatureUtil {
|
||||
private static final String HMAC_SHA256 = "HmacSHA256";
|
||||
|
||||
public static String generateSign(Map<String, String> params, String appSecret) {
|
||||
public static String generateSign(Map<String, Object> params, String appSecret) {
|
||||
// 1. 分离固定参数和业务参数
|
||||
String appKey = params.get("appKey");
|
||||
String timestamp = params.get("timestamp");
|
||||
String appKey = params.get("appKey").toString();
|
||||
String timestamp = params.get("timestamp").toString();
|
||||
|
||||
// 2. 创建不包含固定参数的临时Map用于排序
|
||||
Map<String, String> sortedParams = new TreeMap<>(
|
||||
Map<String, Object> sortedParams = new TreeMap<>(
|
||||
params.entrySet().stream()
|
||||
.filter(e -> !"appKey".equals(e.getKey()))
|
||||
.filter(e -> !"timestamp".equals(e.getKey()))
|
||||
.filter(e -> !"sign".equals(e.getKey()))
|
||||
.filter(e -> e.getValue() != null && !e.getValue().isEmpty())
|
||||
.filter(e -> Objects.nonNull(e.getValue()))
|
||||
.collect(Collectors.toMap(
|
||||
Map.Entry::getKey,
|
||||
Map.Entry::getValue
|
||||
@@ -40,7 +41,7 @@ public class OpenSignatureUtil {
|
||||
|
||||
// 3.1 添加排序后的业务参数
|
||||
sortedParams.forEach((key, value) -> {
|
||||
sb.append(key).append("=").append(value).append("&");
|
||||
sb.append(key).append("=").append(JSONObject.toJSONString( value)).append("&");
|
||||
});
|
||||
|
||||
// 3.2 添加固定参数(不参与排序)
|
||||
|
||||
@@ -38,7 +38,7 @@ public class AcceptanceInfoDAO {
|
||||
if (Objects.isNull(acceptanceInfoDO)){
|
||||
return CommonConstants.ZERO;
|
||||
}
|
||||
return acceptanceInfoMapper.updateByShopIDSelective(acceptanceInfoDO);
|
||||
return acceptanceInfoMapper.updateByPrimaryKey(acceptanceInfoDO);
|
||||
}
|
||||
public List<AcceptanceInfoDO> selectListNotNullEntryTime(){
|
||||
return acceptanceInfoMapper.selectListNotNullEntryTime();
|
||||
|
||||
@@ -74,5 +74,8 @@ public class BigRegionDAO {
|
||||
example.setOrderByClause("id ASC limit 1");
|
||||
return bigRegionMapper.selectOneByExample(example);
|
||||
}
|
||||
public Integer updateHqtDate(BigRegionDO bigRegionDO){
|
||||
return bigRegionMapper.updateHqtDate(bigRegionDO);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -48,12 +48,19 @@ public class DecorationMeasureDAO {
|
||||
decorationMeasureDO.setCreateTime(new Date());
|
||||
return decorationMeasureMapper.insertSelective(decorationMeasureDO);
|
||||
}
|
||||
public Integer insertSelective(DecorationMeasureDO decorationMeasureDO) {
|
||||
return decorationMeasureMapper.insertSelective(decorationMeasureDO);
|
||||
}
|
||||
|
||||
public Integer updateByPrimaryKeySelective(DecorationMeasureDO decorationMeasureDO, String userId) {
|
||||
decorationMeasureDO.setUpdateUserId(userId);
|
||||
decorationMeasureDO.setUpdateTime(new Date());
|
||||
return decorationMeasureMapper.updateByPrimaryKeySelective(decorationMeasureDO);
|
||||
}
|
||||
public Integer updateByPrimaryKeySelective(DecorationMeasureDO decorationMeasureDO) {
|
||||
decorationMeasureDO.setUpdateTime(new Date());
|
||||
return decorationMeasureMapper.updateByPrimaryKeySelective(decorationMeasureDO);
|
||||
}
|
||||
|
||||
public DecorationMeasureDO getByShopId(Long shopId) {
|
||||
if (shopId == null) {
|
||||
|
||||
@@ -334,4 +334,29 @@ public class ShopInfoDAO {
|
||||
}
|
||||
return shopInfoMapper.updateManagerRegionId(shopList);
|
||||
}
|
||||
public ShopInfoDO getShopInfoByShopCode(String shopCode){
|
||||
Example example = new Example(ShopInfoDO.class);
|
||||
example.createCriteria().andEqualTo("shopCode", shopCode);
|
||||
return shopInfoMapper.selectOneByExample(example);
|
||||
}
|
||||
public Integer getNumByShopCode(String shopCode){
|
||||
return shopInfoMapper.getNumByShopCode(shopCode);
|
||||
}
|
||||
|
||||
public List<ShopInfoDO> getShopListByShopCode(String shopCode){
|
||||
Example example = new Example(ShopInfoDO.class);
|
||||
example.createCriteria().andEqualTo("shopCode", shopCode);
|
||||
return shopInfoMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
public Integer updateHqtShopId (Long shopId,String hqtShopId){
|
||||
if (shopId==null || StringUtils.isBlank(hqtShopId)){
|
||||
return 0;
|
||||
}
|
||||
return shopInfoMapper.updateHqtShopId(shopId, hqtShopId);
|
||||
}
|
||||
//查询 需要推送红圈通的门店
|
||||
public List<ShopInfoDO> getPushHqtShopList(){
|
||||
return shopInfoMapper.getPushHqtShopList();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,4 +27,6 @@ public interface BigRegionMapper extends Mapper<BigRegionDO> {
|
||||
BigRegionDO queryOrgInfoByBigRegionAndJoinMode(Long regionId,Integer joinMode);
|
||||
|
||||
List<BigRegionDTO> queryBigRegion(@Param("request") QueryBigRegionRequest queryBigRegionRequest);
|
||||
|
||||
Integer updateHqtDate(BigRegionDO bigRegionDO);
|
||||
}
|
||||
@@ -14,6 +14,7 @@ import com.cool.store.response.MiniShopsResponse;
|
||||
import com.cool.store.response.PlatformBuildListResponse;
|
||||
import com.cool.store.vo.shop.StageShopCountVO;
|
||||
import com.github.pagehelper.Page;
|
||||
import io.swagger.models.auth.In;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
@@ -146,4 +147,10 @@ public interface ShopInfoMapper extends Mapper<ShopInfoDO> {
|
||||
|
||||
List<IsCreateStoreDTO> selectIsCreateStore();
|
||||
Integer updateManagerRegionId(@Param("list") List<ShopInfoDO> shopList);
|
||||
Integer getNumByShopCode(@Param("shopCode") String shopCode);
|
||||
|
||||
Integer updateHqtShopId(@Param("shopId") Long shopId,@Param("hqtShopId") String hqtShopId);
|
||||
|
||||
List<ShopInfoDO> getPushHqtShopList();
|
||||
|
||||
}
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
<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"/>
|
||||
<result column="add_reduce_amount" jdbcType="DECIMAL" property="addReduceAmount"/>
|
||||
<result column="delivery_order_id" jdbcType="VARCHAR" property="deliveryOrderId"/>
|
||||
</resultMap>
|
||||
<sql id="baseColumn">
|
||||
id
|
||||
@@ -39,7 +41,7 @@
|
||||
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,
|
||||
satisfaction,acceptance_attachment,is_network_cable,back_kitchen_photo
|
||||
satisfaction,acceptance_attachment,is_network_cable,back_kitchen_photo,add_reduce_amount,delivery_order_id
|
||||
</sql>
|
||||
<insert id="initAcceptanceInfo">
|
||||
<foreach collection="list" index="index" item="item" separator=";">
|
||||
|
||||
@@ -16,10 +16,18 @@
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="group_name" jdbcType="VARCHAR" property="groupName" />
|
||||
<result column="store_manage_region_id" jdbcType="BIGINT" property="storeManageRegionId" />
|
||||
<result column="hqt_region_code" jdbcType="VARCHAR" property="hqtRegionCode" />
|
||||
<result column="hqt_region_name" jdbcType="VARCHAR" property="hqtRegionName" />
|
||||
</resultMap>
|
||||
<update id="updateHqtDate">
|
||||
update xfsg_big_region
|
||||
set hqt_region_code = #{hqtRegionCode},
|
||||
hqt_region_name = #{hqtRegionName}
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
|
||||
<select id="queryAllBigRegion" resultType="com.cool.store.dto.region.BigRegionDTO">
|
||||
<select id="queryAllBigRegion" resultType="com.cool.store.dto.region.BigRegionDTO">
|
||||
select DISTINCT
|
||||
region_id as regionId,
|
||||
region_name as regionName,
|
||||
|
||||
@@ -26,6 +26,16 @@
|
||||
<result column="quotation_remark" jdbcType="VARCHAR" property="quotationRemark" />
|
||||
<result column="design_submit_time" jdbcType="TIMESTAMP" property="designSubmitTime" />
|
||||
<result column="quotation_submit_time" jdbcType="TIMESTAMP" property="quotationSubmitTime" />
|
||||
<result column="design_sheet_id" jdbcType="VARCHAR" property="designSheetId" />
|
||||
<result column="design_name" jdbcType="VARCHAR" property="designName" />
|
||||
<result column="design_leader_name" jdbcType="VARCHAR" property="designLeaderName" />
|
||||
<result column="original_photo_url" jdbcType="VARCHAR" property="originalPhotoUrl" />
|
||||
<result column="rendering_url" jdbcType="VARCHAR" property="renderingUrl" />
|
||||
<result column="floor_plan_url" jdbcType="VARCHAR" property="floorPlanUrl" />
|
||||
<result column="quotation_sheet_id" jdbcType="VARCHAR" property="quotationSheetId" />
|
||||
<result column="quoter" jdbcType="VARCHAR" property="quoter" />
|
||||
<result column="construction_order_id" jdbcType="VARCHAR" property="constructionOrderId" />
|
||||
<result column="actual_entry_time" jdbcType="TIMESTAMP" property="actualEntryTime" />
|
||||
</resultMap>
|
||||
<update id="updateDesignLeaderIdAndDesignUserIdInteger">
|
||||
update xfsg_decoration_design_info
|
||||
|
||||
@@ -19,12 +19,13 @@
|
||||
<result column="deleted" jdbcType="BIT" property="deleted"/>
|
||||
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId"/>
|
||||
<result column="update_user_id" jdbcType="VARCHAR" property="updateUserId"/>
|
||||
<result column="measurement_sheet_id" jdbcType="VARCHAR" property="measurementSheetId"/>
|
||||
<result column="measure_user_name" jdbcType="VARCHAR" property="measureUserName"/>
|
||||
<result column="design_leader_name" jdbcType="VARCHAR" property="designLeaderName"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectByShopId" resultMap="BaseResultMap">
|
||||
select
|
||||
id,shop_id,measure_user_id,design_user_id,measure_date,diagram_date,measure_url,remark,
|
||||
submit_time,create_time,update_time,deleted,create_user_id,update_user_id
|
||||
select *
|
||||
from xfsg_decoration_measure where shop_id = #{shopId} and deleted = 0
|
||||
</select>
|
||||
<select id="selectByMeasureUserIdAndShopStage"
|
||||
|
||||
@@ -36,6 +36,8 @@
|
||||
<result column="district" jdbcType="VARCHAR" property="district"/>
|
||||
<result column="district_code" jdbcType="INTEGER" property="districtCode"/>
|
||||
<result column="manager_region_id" jdbcType="BIGINT" property="managerRegionId"/>
|
||||
<result column="shop_decoration_attributes" jdbcType="INTEGER" property="shopDecorationAttributes"/>
|
||||
<result column="hqt_shop_id" jdbcType="VARCHAR" property="hqtShopId"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="allColumn">
|
||||
@@ -44,7 +46,7 @@
|
||||
shop_code, store_num, shop_manager_user_id, supervisor_user_id,
|
||||
plan_open_time, cur_progress, shop_type, shop_stage, deleted, create_time, update_time,
|
||||
join_mode,detail_address,franchise_brand,development_manager,want_shop_area_id,investment_manager,shop_status,create_user_id,update_user_id,store_type
|
||||
, province,province_code,city,city_code,district,district_code,manager_region_id
|
||||
, province,province_code,city,city_code,district,district_code,manager_region_id,shop_decoration_attributes,hqt_shop_id
|
||||
</sql>
|
||||
|
||||
<insert id="batchAddShop" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
|
||||
@@ -471,7 +473,7 @@
|
||||
where a.id = #{shopId}
|
||||
</select>
|
||||
|
||||
<select id="getShopIdList" resultType="java.lang.String">
|
||||
<select id="getShopIdList" resultType="java.lang.Long">
|
||||
select id
|
||||
from xfsg_shop_info
|
||||
where deleted = 0 and line_id = #{lineId} and shop_code is not null
|
||||
@@ -558,6 +560,20 @@
|
||||
and b.is_delete = 'effective'
|
||||
and a.region_id != 459
|
||||
</select>
|
||||
<select id="getNumByShopCode" resultType="java.lang.Integer">
|
||||
select count(1) from xfsg_shop_info where shop_code = #{shopCode} and deleted = 0 and shop_status != 2
|
||||
</select>
|
||||
<select id="getPushHqtShopList" resultType="com.cool.store.entity.ShopInfoDO">
|
||||
SELECT * FROM xfsg_shop_info a
|
||||
LEFT JOIN xfsg_shop_stage_info AS t0 ON a.id = t0.shop_id
|
||||
WHERE t0.shop_sub_stage_status = 891 and a.deleted = 0 and a.shop_status != 2 and
|
||||
a.id in
|
||||
(SELECT a.`shop_id`
|
||||
FROM xfsg_shop_stage_info a
|
||||
LEFT JOIN `xfsg_decoration_measure` b on a.`shop_id` = b.`shop_id`
|
||||
WHERE a.shop_sub_stage_status = 840 and b.`id` is null)
|
||||
;
|
||||
</select>
|
||||
|
||||
<update id="batchUpdate" parameterType="list">
|
||||
<foreach collection="list" item="item" index="index" open="" close="" separator=";">
|
||||
@@ -586,4 +602,7 @@
|
||||
update xfsg_shop_info set manager_region_id = #{item.managerRegionId} where id = #{item.id}
|
||||
</foreach>
|
||||
</update>
|
||||
<update id="updateHqtShopId">
|
||||
update xfsg_shop_info set hqt_shop_id = #{hqtShopId} where id = #{shopId}
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -317,6 +317,9 @@
|
||||
</if>
|
||||
<if test="shopSubStage!=null">
|
||||
and a.shop_sub_stage = #{shopSubStage}
|
||||
<if test = "shopSubStage == 86 or shopSubStage == 90 or shopSubStage == 110 or shopSubStage == 120">
|
||||
and (si.hqt_shop_id is null or si.hqt_shop_id = '')
|
||||
</if>
|
||||
</if>
|
||||
<if test="shopSubStageStatusList != null and shopSubStageStatusList.size() > 0">
|
||||
and a.shop_sub_stage_status in
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.cool.store.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2025/07/24/17:19
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class HqtTokenDTO {
|
||||
//访问令牌
|
||||
private String access_token;
|
||||
//令牌类型
|
||||
private String token_type;
|
||||
//过期时间,单位为秒
|
||||
private Long expires_in;
|
||||
private String scope;
|
||||
//资源服务URL
|
||||
private String endPoint;
|
||||
private String client_id;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.cool.store.entity;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import javax.persistence.*;
|
||||
|
||||
@@ -127,7 +128,7 @@ public class AcceptanceInfoDO {
|
||||
@Column(name = "shop_interior_photo")
|
||||
private String shopInteriorPhoto;
|
||||
|
||||
/**满意度0-低,1-中,2-高', */
|
||||
/**满意度0-低,1-中,2-高', 3-差,4-一般,5-好,6-非常好*/
|
||||
@Column(name = "satisfaction")
|
||||
private Integer satisfaction;
|
||||
/**
|
||||
@@ -144,6 +145,28 @@ public class AcceptanceInfoDO {
|
||||
@Column(name = "back_kitchen_photo")
|
||||
private String backKitchenPhoto;
|
||||
|
||||
@Column(name = "add_reduce_amount")
|
||||
private BigDecimal addReduceAmount;
|
||||
|
||||
@Column(name = "delivery_order_id")
|
||||
private String deliveryOrderId;
|
||||
|
||||
public String getDeliveryOrderId() {
|
||||
return deliveryOrderId;
|
||||
}
|
||||
|
||||
public void setDeliveryOrderId(String deliveryOrderId) {
|
||||
this.deliveryOrderId = deliveryOrderId;
|
||||
}
|
||||
|
||||
public BigDecimal getAddReduceAmount() {
|
||||
return addReduceAmount;
|
||||
}
|
||||
|
||||
public void setAddReduceAmount(BigDecimal addReduceAmount) {
|
||||
this.addReduceAmount = addReduceAmount;
|
||||
}
|
||||
|
||||
public Boolean getIsNetworkCable() {
|
||||
return isNetworkCable;
|
||||
}
|
||||
|
||||
@@ -63,6 +63,28 @@ public class BigRegionDO {
|
||||
//区域对应的管理区域
|
||||
@Column(name = "store_manage_region_id")
|
||||
private Long storeManageRegionId;
|
||||
// 红圈通区域编码
|
||||
@Column(name ="hqt_region_code")
|
||||
private String hqtRegionCode;
|
||||
// 红圈通区域名称
|
||||
@Column(name = "hqt_region_name")
|
||||
private String hqtRegionName;
|
||||
|
||||
public String getHqtRegionName() {
|
||||
return hqtRegionName;
|
||||
}
|
||||
|
||||
public void setHqtRegionName(String hqtRegionName) {
|
||||
this.hqtRegionName = hqtRegionName;
|
||||
}
|
||||
|
||||
public String getHqtRegionCode() {
|
||||
return hqtRegionCode;
|
||||
}
|
||||
|
||||
public void setHqtRegionCode(String hqtRegionCode) {
|
||||
this.hqtRegionCode = hqtRegionCode;
|
||||
}
|
||||
|
||||
public Long getStoreManageRegionId() {
|
||||
return storeManageRegionId;
|
||||
|
||||
@@ -128,4 +128,25 @@ public class DecorationDesignInfoDO {
|
||||
|
||||
@Column(name = "quotation_submit_time")
|
||||
private Date quotationSubmitTime;
|
||||
|
||||
@Column(name = "design_sheet_id")
|
||||
private String designSheetId;
|
||||
@Column(name = "design_name")
|
||||
private String designName;
|
||||
@Column(name = "design_leader_name")
|
||||
private String designLeaderName;
|
||||
@Column(name = "original_photo_url")
|
||||
private String originalPhotoUrl;
|
||||
@Column(name = "rendering_url")
|
||||
private String renderingUrl;
|
||||
@Column(name = "floor_plan_url")
|
||||
private String floorPlanUrl;
|
||||
@Column(name = "quotation_sheet_id")
|
||||
private String quotationSheetId;
|
||||
@Column(name = "quoter")
|
||||
private String quoter;
|
||||
@Column(name = "construction_order_id")
|
||||
private String constructionOrderId;
|
||||
@Column(name = "actual_entry_time")
|
||||
private Date actualEntryTime;
|
||||
}
|
||||
@@ -89,5 +89,13 @@ public class DecorationMeasureDO {
|
||||
*/
|
||||
@Column(name = "deleted", nullable = false, columnDefinition = "tinyint default '0'")
|
||||
private Boolean deleted;
|
||||
|
||||
//测量派单ID
|
||||
@Column(name = "measurement_sheet_id")
|
||||
private String measurementSheetId;
|
||||
//测量员
|
||||
@Column(name = "measure_user_name")
|
||||
private String measureUserName;
|
||||
//设计组
|
||||
@Column(name = "design_leader_name")
|
||||
private String designLeaderName;
|
||||
}
|
||||
@@ -152,4 +152,10 @@ public class ShopInfoDO {
|
||||
//所属管理区域
|
||||
@Column(name = "manager_region_id")
|
||||
private Long managerRegionId;
|
||||
// 门店装修属性
|
||||
@Column(name = "shop_decoration_attributes")
|
||||
private Integer shopDecorationAttributes;
|
||||
//红圈通门店id
|
||||
@Column(name = "hqt_shop_id")
|
||||
private String hqtShopId;
|
||||
}
|
||||
@@ -145,6 +145,10 @@ public class AddSignFranchiseRequest {
|
||||
@ApiModelProperty("所属管理区域id")
|
||||
private Long managerRegionId;
|
||||
|
||||
@ApiModelProperty("门店装修属性 0-新开店 1-老店新开 2-老店翻新 3-迁址")
|
||||
@NotNull(message = "门店属性(装修)不能为空")
|
||||
private Integer shopDecorationAttributes;
|
||||
|
||||
|
||||
|
||||
public SignFranchiseDO toSignFranchiseDO() {
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2025/07/23/15:00
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class AssignDesignerRequest {
|
||||
|
||||
@NotNull(message = "crm门店id不能为空")
|
||||
private Long shopId;
|
||||
@NotBlank(message = "设计派单ID不能为空")
|
||||
private String designSheetId;
|
||||
@NotBlank(message = "设计师不能为空")
|
||||
private String designName;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2025/07/23/15:43
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class AssignQuotationRequest {
|
||||
|
||||
@NotNull(message = "crm门店id不能为空")
|
||||
private Long shopId;
|
||||
@NotBlank(message = "报价单编码不能为空")
|
||||
private String quotationSheetId;
|
||||
@NotBlank(message = "报价员不能为空")
|
||||
private String quoter;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2025/07/23/14:26
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class AssignSurveyorsRequest {
|
||||
@NotNull(message = "crm门店id不能为空")
|
||||
private Long shopId;
|
||||
@ApiModelProperty("测量单ID")
|
||||
@NotBlank(message = "测量单ID不能为空")
|
||||
private String measurementSheetId;
|
||||
|
||||
@ApiModelProperty("测量员")
|
||||
@NotBlank(message = "测量员不能为空")
|
||||
private String measureUserName;
|
||||
|
||||
@ApiModelProperty("设计组")
|
||||
@NotBlank(message = "设计组不能为空")
|
||||
private String designLeaderName;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import com.aliyun.openservices.shade.org.apache.commons.lang3.StringUtils;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2025/07/23/18:40
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class ConfirmQuotationRequest {
|
||||
private String hqtShopId;
|
||||
private String quotationSheetId;
|
||||
@ApiModelProperty("0:拒绝,1:通过")
|
||||
private Integer status;
|
||||
|
||||
public Boolean check(){
|
||||
if (StringUtils.isAnyBlank(hqtShopId,quotationSheetId)){
|
||||
return false;
|
||||
}
|
||||
if (Objects.isNull(status)){
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2025/07/24/10:17
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class ConstructionCompletedRequest {
|
||||
@NotNull(message = "crm门店id不能为空")
|
||||
private Long shopId;
|
||||
@NotBlank(message = "施工派单编号不能为空")
|
||||
private String constructionOrderId;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2025/07/23/18:50
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class ConstructionOrderRequest {
|
||||
|
||||
@NotNull(message = "crm门店id不能为空")
|
||||
private Long shopId;
|
||||
@NotBlank(message = "施工派单ID(施工派单编号)不能为空")
|
||||
private String constructionOrderId;
|
||||
|
||||
private Date constructionPlanStartTime;
|
||||
@NotNull(message = "预计完工时间不能为空")
|
||||
private Date constructionPlanEndTime;
|
||||
}
|
||||
@@ -3,6 +3,8 @@ package com.cool.store.request;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2024/10/10 10:37
|
||||
@@ -13,7 +15,8 @@ public class ConstructionRequest {
|
||||
|
||||
|
||||
private Long shopId;
|
||||
|
||||
@ApiModelProperty("施工派单id")
|
||||
private String constructionOrderId;
|
||||
@ApiModelProperty("装修计划开始时间")
|
||||
private Long constructionPlanStartTime;
|
||||
@ApiModelProperty("装修计划结束时间")
|
||||
@@ -22,4 +25,6 @@ public class ConstructionRequest {
|
||||
private String constructionAnnex;
|
||||
@ApiModelProperty("装修备注")
|
||||
private String constructionRemark;
|
||||
//进场时间
|
||||
private Date actualEntryTime;
|
||||
}
|
||||
|
||||
@@ -23,12 +23,18 @@ public class DecorationDesignRequest {
|
||||
@ApiModelProperty("店铺ID")
|
||||
private Long shopId;
|
||||
|
||||
@ApiModelProperty(value = "设计派单ID")
|
||||
private String designSheetId;
|
||||
|
||||
@ApiModelProperty("设计组长ID")
|
||||
private String designLeaderId;
|
||||
|
||||
@ApiModelProperty("设计师ID")
|
||||
private String designUserId;
|
||||
|
||||
@ApiModelProperty(value = "报价单ID(报价单编号)")
|
||||
private String quotationSheetId;
|
||||
|
||||
@ApiModelProperty("报价员ID")
|
||||
private String quotationUserId;
|
||||
|
||||
@@ -55,6 +61,8 @@ public class DecorationDesignRequest {
|
||||
DecorationDesignInfoDO decorationDesignInfoDO = new DecorationDesignInfoDO();
|
||||
decorationDesignInfoDO.setDesignUrl(this.designUrl);
|
||||
decorationDesignInfoDO.setShopId(this.shopId);
|
||||
decorationDesignInfoDO.setDesignSheetId(this.designSheetId);
|
||||
decorationDesignInfoDO.setQuotationSheetId(this.quotationSheetId);
|
||||
if (this.designLeaderId != null) {
|
||||
decorationDesignInfoDO.setDesignLeaderId(this.designLeaderId);
|
||||
}
|
||||
|
||||
@@ -38,6 +38,11 @@ public class DecorationMeasureRequest {
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("测量派单ID")
|
||||
private String measurementSheetId;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 构建DecorationMeasureDO
|
||||
*
|
||||
@@ -52,6 +57,7 @@ public class DecorationMeasureRequest {
|
||||
decorationMeasureDO.setDiagramDate(this.diagramDate);
|
||||
decorationMeasureDO.setMeasureUrl(this.measureUrl);
|
||||
decorationMeasureDO.setRemark(this.remark);
|
||||
decorationMeasureDO.setMeasurementSheetId(this.measurementSheetId);
|
||||
return decorationMeasureDO;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2025/07/24/10:09
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class EntryConfirmationRequest {
|
||||
@NotNull(message = "crm门店id不能为空")
|
||||
private Long shopId;
|
||||
//施工派单ID(施工派单编号)
|
||||
@NotBlank(message = "施工派单编号不能为空")
|
||||
private String constructionOrderId;
|
||||
//进场时间
|
||||
@NotNull(message = "进场时间不能为空")
|
||||
private Date actualEntryTime;
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2025/07/23/18:36
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class HqtBuildRequest {
|
||||
private Long shopId;
|
||||
//门店编码
|
||||
private String shopCode;
|
||||
//门店名称
|
||||
private String shopName;
|
||||
// 门店装修属性
|
||||
private Integer shopDecorationAttributes;
|
||||
//红圈通区域编码
|
||||
private String hqtRegionCode;
|
||||
//红 圈通区域名称
|
||||
private String hqtRegionName;
|
||||
//督导名称
|
||||
private String supervisorName;
|
||||
//督导手机号
|
||||
private String supervisorMobile;
|
||||
//签约人1
|
||||
private String partnershipSignatoryFirst;
|
||||
//签约人1手机号
|
||||
private String partnershipSignatoryFirstMobile;
|
||||
//门店地址
|
||||
private String shopAddress;
|
||||
//是否已收设计费 0-否 1- 是
|
||||
private Integer isPayDesignFee;
|
||||
//加盟品牌
|
||||
private Integer franchiseBrand;
|
||||
|
||||
public Boolean check(){
|
||||
if (StringUtils.isAnyBlank(shopName,hqtRegionCode,hqtRegionName,supervisorName,
|
||||
supervisorMobile,partnershipSignatoryFirst,partnershipSignatoryFirstMobile,shopAddress)){
|
||||
return false;
|
||||
}
|
||||
if (Objects.isNull(isPayDesignFee)|| Objects.isNull(franchiseBrand)|| Objects.isNull(shopDecorationAttributes) || Objects.isNull(shopId)){
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2025/07/24/10:46
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class HqtDecorationAcceptanceRequest {
|
||||
@NotNull(message = "crm门店id不能为空")
|
||||
private Long shopId;
|
||||
@NotBlank(message = "完工交付单ID (完工编号)不能为空")
|
||||
private String deliveryOrderId;
|
||||
@NotEmpty(message = "验收单不能为空")
|
||||
private List<String> acceptanceAttachmentUrl;
|
||||
@NotEmpty(message = "门店门头照不能为空")
|
||||
private List<String> shopDoorwayPhotoUrl;
|
||||
@NotEmpty(message = "门店内景照不能为空")
|
||||
private List<String> shopInteriorPhotoUrl;
|
||||
@NotEmpty(message = "门店后厨照不能为空")
|
||||
private List<String> backKitchenPhotoUrl;
|
||||
@NotNull(message = "验收日期不能为空")
|
||||
private Date actualAcceptanceTime;
|
||||
@NotNull(message = "增减项金额不能为空")
|
||||
private BigDecimal addReduceAmount;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2025/07/24/11:25
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class HqtPartnerAcceptanceRequest {
|
||||
|
||||
private String hqtShopId;
|
||||
//加盟商满意度 3-差,4-一般,5-好,6-非常好 对应红圈通 回访结果分类
|
||||
private Integer satisfaction;
|
||||
//加盟商评语
|
||||
private String comment;
|
||||
|
||||
public Boolean check() {
|
||||
if (StringUtils.isAnyBlank(hqtShopId)){
|
||||
return false;
|
||||
}
|
||||
if (Objects.isNull(satisfaction)){
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2025/07/23/15:31
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class SubmitDesignDrawingRequest {
|
||||
@NotNull(message = "crm门店id不能为空")
|
||||
private Long shopId;
|
||||
@NotBlank(message = "设计派单ID不能为空")
|
||||
private String designSheetId;
|
||||
|
||||
@NotBlank(message = "设计师不能为空")
|
||||
private String designName;
|
||||
@NotEmpty(message = "原始照片不能为空")
|
||||
private List<String> originalPhotoUrl;
|
||||
@NotEmpty(message = "效果图不能为空")
|
||||
private List<String> renderingUrl;
|
||||
@NotEmpty(message = "平面布置图不能为空")
|
||||
private List<String> floorPlanUrl;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2025/07/23/14:41
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class SubmitMeasurementRequest {
|
||||
|
||||
@NotNull(message = "crm门店id不能为空")
|
||||
private Long shopId;
|
||||
@NotNull(message = "测量日期不能为空")
|
||||
private Date measureDate;
|
||||
@NotNull(message = "出图日期不能为空")
|
||||
private Date diagramDate;
|
||||
@NotEmpty(message = "测量图附件不能为空")
|
||||
private List<String> measureUrl;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2025/07/23/15:50
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class SubmitQuotationSheetRequest {
|
||||
@NotNull(message = "crm门店id不能为空")
|
||||
private Long shopId;
|
||||
@NotBlank(message = "报价单ID(报价单编号)不能为空")
|
||||
private String quotationSheetId;
|
||||
@NotEmpty(message = "报价单附件不能为空")
|
||||
private List<String> quotationSheetUrl;
|
||||
}
|
||||
@@ -10,6 +10,7 @@ import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -39,7 +40,7 @@ public class ThreeAcceptanceRequest {
|
||||
@ApiModelProperty("门店内景照片")
|
||||
private String shopInteriorPhoto;
|
||||
|
||||
@ApiModelProperty("满意度0-低,1-中,2-高',")
|
||||
@ApiModelProperty("满意度0-低,1-中,2-高', 3-差,4-一般,5-好,6-非常好")
|
||||
private Integer satisfaction;
|
||||
|
||||
@ApiModelProperty("网线安装 false-否 true-是")
|
||||
@@ -50,6 +51,10 @@ public class ThreeAcceptanceRequest {
|
||||
|
||||
@ApiModelProperty("后厨照片")
|
||||
private String backKitchenPhoto;
|
||||
@ApiModelProperty("完工交付单ID ")
|
||||
private String deliveryOrderId;
|
||||
@ApiModelProperty("增减项金额")
|
||||
private BigDecimal addReduceAmount;
|
||||
|
||||
public Boolean miniCheck(){
|
||||
if (StringUtils.isAnyBlank(this.partnerAcceptance.toString())|| ObjectUtils.anyNull(this.satisfaction,this.isNetworkCable)){
|
||||
|
||||
@@ -0,0 +1,232 @@
|
||||
package com.cool.store.request.hqt;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class HqtBuildAPIRequest {
|
||||
|
||||
/**
|
||||
* projectNo 门店编码
|
||||
*/
|
||||
@JsonProperty("projectNo")
|
||||
private String projectNo;
|
||||
|
||||
/**
|
||||
* name 店名
|
||||
*/
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
|
||||
|
||||
/**
|
||||
* field13__c 门店属性
|
||||
* 新开店:o1
|
||||
* 老店翻新:o2
|
||||
* 老店新开:o5
|
||||
* 迁址:option46
|
||||
* 二次设计:o3
|
||||
* 维修改造: o4
|
||||
*/
|
||||
@JsonProperty("field13__c")
|
||||
private Field13__c field13__c;
|
||||
|
||||
/**
|
||||
* field124__c 所属片区
|
||||
*/
|
||||
@JsonProperty("field124__c")
|
||||
private Field124__c field124__c;
|
||||
|
||||
|
||||
/**
|
||||
* field94__c 所属督导
|
||||
*/
|
||||
@JsonProperty("field94__c")
|
||||
private String field94__c;
|
||||
|
||||
|
||||
/**
|
||||
* field5__c 联系人 (老板)
|
||||
*/
|
||||
@JsonProperty("field5__c")
|
||||
private String field5__c;
|
||||
|
||||
/**
|
||||
* field62__c 联系人(老板)手机号
|
||||
*/
|
||||
@JsonProperty("field62__c")
|
||||
private String field62__c;
|
||||
|
||||
|
||||
/**
|
||||
* street 详细地址
|
||||
*/
|
||||
@JsonProperty("street")
|
||||
private String street;
|
||||
|
||||
|
||||
/**
|
||||
* field8__c 是否已收设计费
|
||||
* 是:option44
|
||||
* 否:option45
|
||||
*/
|
||||
@JsonProperty("field8__c")
|
||||
private Field8__c field8__c;
|
||||
/**
|
||||
* field123__c 品牌
|
||||
* 正新鸡排:option486
|
||||
* 正烧记:option488
|
||||
* 茂掌柜:option490
|
||||
* 正新三明治:option622
|
||||
* 大鼓米线:option624
|
||||
* 串小妹:option626
|
||||
*/
|
||||
@JsonProperty("field123__c")
|
||||
private Field123__c field123__c;
|
||||
|
||||
|
||||
/**
|
||||
* field4__c 督导手机号
|
||||
*/
|
||||
@JsonProperty("field4__c")
|
||||
private String field4__c;
|
||||
|
||||
//是否对接CRM
|
||||
@JsonProperty("field180__c")
|
||||
private String field180__c = "crm";
|
||||
|
||||
@Data
|
||||
public static class Field124__c {
|
||||
/**
|
||||
* @description: 红圈通 区域编码
|
||||
*/
|
||||
@JsonProperty("code")
|
||||
private String code;
|
||||
|
||||
@JsonProperty("bizType")
|
||||
/**
|
||||
* @description:默认值
|
||||
*/
|
||||
private String bizType = "202684487985";
|
||||
/**
|
||||
* @description:默认值
|
||||
*/
|
||||
@JsonProperty("metaName")
|
||||
private String metaName = "CustomObject494__c";
|
||||
/**
|
||||
* @description: 红圈通 区域名称
|
||||
*/
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class Field123__c {
|
||||
@JsonProperty("defaultItem")
|
||||
/**
|
||||
* @description: 默认值
|
||||
*/
|
||||
private Boolean defaultItem = false;
|
||||
/**
|
||||
* field123__c 品牌
|
||||
* 正新鸡排:option486
|
||||
* 正烧记:option488
|
||||
* 茂掌柜:option490
|
||||
* 正新三明治:option622
|
||||
* 大鼓米线:option624
|
||||
* 串小妹:option626
|
||||
*/
|
||||
@JsonProperty("id")
|
||||
/**
|
||||
* @description: 如该值=ConstantGroup485/option486
|
||||
* 默认设置了前缀ConstantGroup485/
|
||||
*/
|
||||
private String id = "ConstantGroup485/";
|
||||
|
||||
@JsonProperty("label")
|
||||
/**
|
||||
* @description: 品牌名称:如正新鸡排
|
||||
*/
|
||||
private String label;
|
||||
|
||||
@JsonProperty("name")
|
||||
/**
|
||||
* @description: 对应红圈通品牌编码如:ption486
|
||||
*/
|
||||
private String name;
|
||||
|
||||
@JsonProperty("path")
|
||||
/**
|
||||
* @description: 如该值=ConstantGroup485/option486
|
||||
* 默认设置了前缀ConstantGroup485/
|
||||
* path = id
|
||||
*/
|
||||
private String path = "ConstantGroup485/";
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class Field13__c {
|
||||
@JsonProperty("defaultItem")
|
||||
/**
|
||||
* @description: 默认值
|
||||
*/
|
||||
private Boolean defaultItem = false;
|
||||
|
||||
/**
|
||||
* field13__c 门店装修属性
|
||||
* 新开店:o1
|
||||
* 老店翻新:o2
|
||||
* 老店新开:o5
|
||||
* 迁址:option46
|
||||
* 二次设计:o3
|
||||
* 维修改造: o4
|
||||
*/
|
||||
@JsonProperty("id")
|
||||
/**
|
||||
* @description: 如:o1
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* @description: 如:新开店
|
||||
*/
|
||||
@JsonProperty("label")
|
||||
private String label;
|
||||
|
||||
/**
|
||||
* @description: 如:如:o1 name = id
|
||||
*/
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class Field8__c {
|
||||
@JsonProperty("defaultItem")
|
||||
/**
|
||||
* @description: 默认值
|
||||
*/
|
||||
private Boolean defaultItem = false;
|
||||
/**
|
||||
* field8__c 是否已收设计费
|
||||
* 是:option44
|
||||
* 否:option45
|
||||
*/
|
||||
@JsonProperty("id")
|
||||
/**
|
||||
* @description: 如:option44
|
||||
*/
|
||||
private String id;
|
||||
/**
|
||||
* @description: 如:是
|
||||
*/
|
||||
@JsonProperty("label")
|
||||
private String label;
|
||||
/**
|
||||
* @description: 如:option44 name = id
|
||||
*/
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.cool.store.request.hqt;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2025/07/31/14:36
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class HqtPartnerAcceptanceAPIRequest {
|
||||
//是 CRM系统门店编码(红圈通门店id)
|
||||
private Field13__c field13__c;
|
||||
|
||||
/**
|
||||
* @description: 加盟商满意度
|
||||
* 非常好:option139
|
||||
* 好:option140
|
||||
* 一般:ption141
|
||||
* 差:option142
|
||||
*/
|
||||
private Field1__c field1__c;
|
||||
//加盟商评价
|
||||
private String field14__c;
|
||||
|
||||
|
||||
@Data
|
||||
public static class Field13__c{
|
||||
//crm门店编码
|
||||
private String code;
|
||||
//固定值
|
||||
private String bizType = "2148799018";
|
||||
//固定值
|
||||
private String metaName = "project3X";
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class Field1__c{
|
||||
//默认值
|
||||
private Boolean defaultItem = false;
|
||||
//加盟商满意度 编码 如option139
|
||||
private String id;
|
||||
//加盟商满意度 名称 如非常好
|
||||
private String label;
|
||||
//加盟商满意度 编码 如option139 name = id
|
||||
private String name;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.cool.store.request.hqt;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2025/07/31/14:24
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class HqtQuotationSheetAPIRequest {
|
||||
/**
|
||||
* @description:CRM系统门店编码(红圈通门店id)
|
||||
*/
|
||||
private Field1__c field1__c;
|
||||
/**
|
||||
* @description:报价编号
|
||||
*/
|
||||
private String name__c;
|
||||
|
||||
@Data
|
||||
public static class Field1__c {
|
||||
/**
|
||||
* @description: 动态入参 CRM系统门店编码(红圈通门店id)
|
||||
*/
|
||||
private String code;
|
||||
//固定值
|
||||
private String bizType = "2148799018";
|
||||
//固定值
|
||||
private String metaName = "project3X";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -235,4 +235,7 @@ public class AddSignFranchiseResponse {
|
||||
@ApiModelProperty("所属管理区域name")
|
||||
private String managerRegionName;
|
||||
|
||||
@ApiModelProperty("门店装修属性 0-新开店 1-老店新开 2-老店翻新 3-迁址")
|
||||
private Integer shopDecorationAttributes;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.cool.store.response;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2025/07/24/13:50
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class DecorationDesignResponse {
|
||||
|
||||
@ApiModelProperty(value = "设计派单ID")
|
||||
private String designSheetId;
|
||||
@ApiModelProperty(value = "设计组长名称")
|
||||
private String designLeaderName;
|
||||
private String designLeaderId;
|
||||
@ApiModelProperty(value = "设计师名称")
|
||||
private String designName;
|
||||
private String designUserId;
|
||||
@ApiModelProperty("设计图URL")
|
||||
private String designUrl;
|
||||
@ApiModelProperty(value = "原始照片")
|
||||
private String originalPhotoUrl;
|
||||
@ApiModelProperty(value = "效果图")
|
||||
private String renderingUrl;
|
||||
@ApiModelProperty(value = "平面布置图")
|
||||
private String floorPlanUrl;
|
||||
@ApiModelProperty(value = "设计最新提交时间")
|
||||
private Date designSubmitTime;
|
||||
@ApiModelProperty(value = "报价单ID(报价单编号)")
|
||||
private String quotationSheetId;
|
||||
@ApiModelProperty(value = "报价员")
|
||||
private String quoter;
|
||||
private String quotationUserId;
|
||||
@ApiModelProperty(value = "报价单")
|
||||
private String quotationUrl;
|
||||
@ApiModelProperty(value = "报价提交时间")
|
||||
private Date quotationSubmitTime;
|
||||
@ApiModelProperty(value = "加盟商签字")
|
||||
private String partnerAcceptanceSignatures;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.cool.store.response;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2025/07/31/15:35
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class HqtAPIResponse {
|
||||
|
||||
/**
|
||||
{
|
||||
"data": "1111992914",
|
||||
"desc": "success",
|
||||
"result": "0",
|
||||
"time": 1546272000000
|
||||
}
|
||||
* @description:
|
||||
*/
|
||||
private String data;
|
||||
private String desc;
|
||||
private String result;
|
||||
private Long time;
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.cool.store.response;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2025/07/24/13:20
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class MeasureResponse {
|
||||
|
||||
@ApiModelProperty("测量派单ID")
|
||||
private String measurementSheetId;
|
||||
|
||||
@ApiModelProperty("测量员")
|
||||
private String measureUserName;
|
||||
|
||||
private String measureUserId;
|
||||
|
||||
@ApiModelProperty("设计组")
|
||||
private String designLeaderName;
|
||||
|
||||
private String designUserId;
|
||||
|
||||
@ApiModelProperty("测量日期")
|
||||
private Date measureDate;
|
||||
|
||||
@ApiModelProperty("出图日期")
|
||||
private Date diagramDate;
|
||||
|
||||
@ApiModelProperty("测量图附件")
|
||||
private String measureUrl;
|
||||
|
||||
@ApiModelProperty("最新提交时间")
|
||||
private Date submitTime;
|
||||
}
|
||||
@@ -4,6 +4,9 @@ import com.cool.store.dto.decoration.ThreeAcceptanceDTO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/05/06/下午5:50
|
||||
@@ -12,24 +15,27 @@ import lombok.Data;
|
||||
*/
|
||||
@Data
|
||||
public class ThreeSignResponse {
|
||||
@ApiModelProperty("工程部验收")
|
||||
private ThreeAcceptanceDTO engineeringAcceptance;
|
||||
@ApiModelProperty("完工交付单ID ")
|
||||
private String deliveryOrderId;
|
||||
// @ApiModelProperty("工程部验收")
|
||||
// private ThreeAcceptanceDTO engineeringAcceptance;
|
||||
@ApiModelProperty("营运部验收")
|
||||
private ThreeAcceptanceDTO operationsAcceptance;
|
||||
@ApiModelProperty("加盟商验收")
|
||||
private ThreeAcceptanceDTO partnerAcceptance;
|
||||
@ApiModelProperty("快手号")
|
||||
private String ksAccount;
|
||||
@ApiModelProperty("核销手机号")
|
||||
private String verificationPhone;
|
||||
@ApiModelProperty("高德、百度定位截图")
|
||||
private String shopLocationScreenshots;
|
||||
// @ApiModelProperty("快手号")
|
||||
// private String ksAccount;
|
||||
// @ApiModelProperty("核销手机号")
|
||||
// private String verificationPhone;
|
||||
// @ApiModelProperty("高德、百度定位截图")
|
||||
// private String shopLocationScreenshots;
|
||||
@ApiModelProperty("门店门头照片")
|
||||
private String shopDoorwayPhoto;
|
||||
|
||||
@ApiModelProperty("门店内景照片")
|
||||
private String shopInteriorPhoto;
|
||||
|
||||
@ApiModelProperty("满意度0-低,1-中,2-高',")
|
||||
@ApiModelProperty("满意度0-低,1-中,2-高', 3-差,4-一般,5-好,6-非常好")
|
||||
private Integer satisfaction;
|
||||
|
||||
@ApiModelProperty("网线安装 false-否 true-是")
|
||||
@@ -40,4 +46,9 @@ public class ThreeSignResponse {
|
||||
|
||||
@ApiModelProperty("后厨照片")
|
||||
private String backKitchenPhoto;
|
||||
@ApiModelProperty("验收时间")
|
||||
private Date actualAcceptanceTime;
|
||||
@ApiModelProperty("增减项金额")
|
||||
private BigDecimal addReduceAmount;
|
||||
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@ package com.cool.store.vo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
@@ -12,14 +14,17 @@ import lombok.Data;
|
||||
@Data
|
||||
public class ConstructionDataVO {
|
||||
|
||||
@ApiModelProperty("施工派单id")
|
||||
private String constructionOrderId;
|
||||
|
||||
@ApiModelProperty("预计开工时间")
|
||||
private Long constructionPlanStartTime;
|
||||
private Date constructionPlanStartTime;
|
||||
|
||||
/**
|
||||
* 预计完工时间
|
||||
*/
|
||||
@ApiModelProperty("预计完工时间")
|
||||
private Long constructionPlanEndTime;
|
||||
private Date constructionPlanEndTime;
|
||||
|
||||
/**
|
||||
* 附件
|
||||
@@ -27,26 +32,7 @@ public class ConstructionDataVO {
|
||||
@ApiModelProperty("附件")
|
||||
private String constructionAnnex;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty("备注")
|
||||
private String constructionRemark;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty("创建时间")
|
||||
private Long constructionCreateTime;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@ApiModelProperty("创建人")
|
||||
private String constructionCreateUser;
|
||||
|
||||
@ApiModelProperty("创建人")
|
||||
private String constructionCreateUserName;
|
||||
|
||||
@ApiModelProperty("进场时间")
|
||||
private Date actualEntryTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -83,4 +83,11 @@ public interface DataHandlerServer {
|
||||
*/
|
||||
void dataHandlerCreateStore();
|
||||
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2025/8/6
|
||||
* @description: 处理数据推送红圈通建店
|
||||
*/
|
||||
void dataHandlerPushHqt();
|
||||
|
||||
}
|
||||
|
||||
@@ -1,9 +1,64 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.request.*;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2024/6/20 17:22
|
||||
* @Version 1.0
|
||||
*/
|
||||
public interface DecorationDesignInfoService {
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2025/7/23
|
||||
* @description: 红圈通 hqt分配设计师
|
||||
*/
|
||||
Boolean assignDesigner(AssignDesignerRequest request);
|
||||
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2025/7/23
|
||||
* @description: 红圈通hqt上传设计图
|
||||
*/
|
||||
Boolean submitDesignDrawing(SubmitDesignDrawingRequest request);
|
||||
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2025/7/23
|
||||
* @description: 红圈通hqt 分配报价员
|
||||
*/
|
||||
Boolean assignQuotation(AssignQuotationRequest request);
|
||||
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2025/7/23
|
||||
* @description:红圈通上传最终报价单
|
||||
*/
|
||||
Boolean submitQuotationSheet(SubmitQuotationSheetRequest request);
|
||||
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2025/7/23
|
||||
* @description:红圈通施工派单
|
||||
*/
|
||||
Boolean submitConstructionOrder(ConstructionOrderRequest request);
|
||||
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2025/7/24
|
||||
* @description:红圈通实际进场确认
|
||||
*/
|
||||
Boolean entryConfirmation (EntryConfirmationRequest request);
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2025/7/24
|
||||
* @description:红圈通施工完成
|
||||
*/
|
||||
Boolean constructionCompleted (ConstructionCompletedRequest request);
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2025/7/24
|
||||
* @description: 红圈通装修验收
|
||||
*/
|
||||
Boolean decorationAcceptance(HqtDecorationAcceptanceRequest request);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.request.AssignSurveyorsRequest;
|
||||
import com.cool.store.request.DecorationMeasureRequest;
|
||||
import com.cool.store.request.SubmitMeasurementRequest;
|
||||
import com.cool.store.response.MeasureResponse;
|
||||
import com.cool.store.vo.DecorationMeasureVO;
|
||||
|
||||
public interface DecorationMeasureService {
|
||||
@@ -28,4 +31,24 @@ public interface DecorationMeasureService {
|
||||
* @return
|
||||
*/
|
||||
Boolean saveDecorationMeasure(DecorationMeasureRequest request);
|
||||
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2025/7/23
|
||||
* @description: hqt 分配测量员 设计组
|
||||
*/
|
||||
Boolean assignSurveyors(AssignSurveyorsRequest request);
|
||||
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2025/7/23
|
||||
* @description: hqt门店测量、上传测量图
|
||||
*/
|
||||
Boolean submitMeasurementDiagram(SubmitMeasurementRequest request);
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2025/7/23
|
||||
* @description:获取测量阶段数据
|
||||
*/
|
||||
MeasureResponse getMeasureData(Long shopId);
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.cool.store.dto.decoration.ThreeAcceptanceDTO;
|
||||
import com.cool.store.request.*;
|
||||
|
||||
|
||||
import com.cool.store.response.DecorationDesignResponse;
|
||||
import com.cool.store.response.ThreeSignResponse;
|
||||
import com.cool.store.vo.*;
|
||||
import com.cool.store.vo.Fitment.DecorationStageVO;
|
||||
@@ -130,7 +131,7 @@ public interface DecorationService {
|
||||
* @param shopId
|
||||
* @return
|
||||
*/
|
||||
DecorationDesignVO getDecorationDesign(Long shopId);
|
||||
DecorationDesignResponse getDecorationDesign(Long shopId);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
|
||||
import com.cool.store.entity.BigRegionDO;
|
||||
import com.cool.store.request.ConfirmQuotationRequest;
|
||||
import com.cool.store.request.HqtBuildRequest;
|
||||
import com.cool.store.request.HqtPartnerAcceptanceRequest;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2025/07/23/14:05
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
public interface HqtAPIService {
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2025/7/23
|
||||
* @description:红圈通建店
|
||||
*/
|
||||
void pushHqtBuild(HqtBuildRequest request);
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2025/7/23
|
||||
* @description: 加盟商确认报价单
|
||||
*/
|
||||
void confirmQuotation(ConfirmQuotationRequest request);
|
||||
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2025/7/24
|
||||
* @description: 加盟商验收、评价
|
||||
*/
|
||||
void hqtPartnerAcceptance(HqtPartnerAcceptanceRequest request);
|
||||
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2025/7/31
|
||||
* @description: 推送加盟片区 并且返回红圈通加盟片区ID
|
||||
*/
|
||||
BigRegionDO pushHqtRegion( BigRegionDO bigRegionDO);
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.dto.GetAccessTokenDTO;
|
||||
import com.cool.store.dto.HqtTokenDTO;
|
||||
import com.cool.store.dto.ModifyPasswordDTO;
|
||||
import com.cool.store.dto.XgjOrganizationDTO;
|
||||
import com.cool.store.request.AuditRequest;
|
||||
@@ -86,6 +87,12 @@ public interface PushService {
|
||||
XgjAccessTokenDTO getXgjAccessToken();
|
||||
|
||||
Integer getUnReadMessageNum(String partnerId);
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2025/7/24
|
||||
* @description:获取红圈通token
|
||||
*/
|
||||
HqtTokenDTO getHqtToken();
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -134,4 +134,12 @@ public interface ShopService {
|
||||
List<UserDTO> getSubStageHandle(Long shopId,Integer subStage);
|
||||
|
||||
ShopStageInfoVO getShopStageStatus(Long shopId, Integer subStage);
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2025/8/4
|
||||
* @description: 校验门店编码重复
|
||||
*/
|
||||
Boolean checkShopCodeRepeat(String shopCode,Long shopId);
|
||||
|
||||
Boolean isShowButton(Long shopId);
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ 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.*;
|
||||
import com.cool.store.request.HqtBuildRequest;
|
||||
import com.cool.store.request.QueryBigRegionRequest;
|
||||
import com.cool.store.service.*;
|
||||
import com.cool.store.utils.StringUtil;
|
||||
@@ -36,6 +37,7 @@ import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import static com.cool.store.utils.poi.DateUtils.SPECIAL_DATE_START_1;
|
||||
import static com.cool.store.utils.poi.DateUtils.YYYY_MM_DD;
|
||||
@@ -49,6 +51,8 @@ import static com.cool.store.utils.poi.DateUtils.YYYY_MM_DD;
|
||||
@Service
|
||||
@Slf4j
|
||||
public class DataHandlerServerImpl implements DataHandlerServer {
|
||||
@Resource
|
||||
private HqtAPIService hqtAPIService;
|
||||
@Resource
|
||||
private RegionMapper regionMapper;
|
||||
@Resource
|
||||
@@ -1258,6 +1262,46 @@ public class DataHandlerServerImpl implements DataHandlerServer {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dataHandlerPushHqt() {
|
||||
List<ShopInfoDO> pushHqtShopList = shopInfoDAO.getPushHqtShopList();
|
||||
List<Long> shopIds = pushHqtShopList.stream().map(ShopInfoDO::getId).collect(Collectors.toList());
|
||||
log.info("推送HQT的店铺shopIds:{}", JSONObject.toJSONString(shopIds));
|
||||
for (ShopInfoDO shopInfoDO : pushHqtShopList) {
|
||||
try{
|
||||
hqtAPIService.pushHqtBuild(getHqtBuildRequest(shopInfoDO.getId()));
|
||||
}catch (Exception e){
|
||||
log.info("推送HQT失败:shopId:{},mes:{}",shopInfoDO.getId(),e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
public HqtBuildRequest getHqtBuildRequest(Long shopId) {
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
||||
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfo.getLineId());
|
||||
EnterpriseUserDO userInfoById = enterpriseUserDAO.getUserInfoById(shopInfo.getInvestmentManager());
|
||||
BigRegionDO bigRegionDO = bigRegionDAO.getByRegionId(shopInfo.getRegionId());
|
||||
if (com.cool.store.utils.poi.StringUtils.isBlank(bigRegionDO.getHqtRegionCode())){
|
||||
bigRegionDO = hqtAPIService.pushHqtRegion(bigRegionDO);
|
||||
}
|
||||
HqtBuildRequest request = new HqtBuildRequest();
|
||||
request.setShopId(shopId);
|
||||
request.setShopCode(shopInfo.getShopCode());
|
||||
request.setShopName(shopInfo.getShopName());
|
||||
request.setShopDecorationAttributes(shopInfo.getShopDecorationAttributes());
|
||||
request.setHqtRegionCode(bigRegionDO.getHqtRegionCode());
|
||||
request.setHqtRegionName(bigRegionDO.getHqtRegionName());
|
||||
request.setSupervisorName(userInfoById.getName());
|
||||
request.setSupervisorMobile(userInfoById.getMobile());
|
||||
request.setPartnershipSignatoryFirst(lineInfoDO.getUsername());
|
||||
request.setPartnershipSignatoryFirstMobile(lineInfoDO.getMobile());
|
||||
request.setShopAddress(shopInfo.getDetailAddress());
|
||||
request.setIsPayDesignFee(CommonConstants.ONE);
|
||||
if (com.cool.store.utils.poi.StringUtils.isNotBlank(shopInfo.getFranchiseBrand())) {
|
||||
request.setFranchiseBrand(Integer.valueOf(shopInfo.getFranchiseBrand()));
|
||||
}
|
||||
return request;
|
||||
}
|
||||
|
||||
private static @NotNull ShopStageInfoDO getShopStageInfoDO(ShopSubStageEnum shopSubStageEnum, ShopStageInfoDO shopStageInfoDO, ShopSubStageStatusEnum shopSubStageStatus) {
|
||||
ShopStageEnum shopStageEnum = shopSubStageEnum.getShopStageEnum();
|
||||
ShopStageInfoDO shopStageInfo = new ShopStageInfoDO();
|
||||
|
||||
@@ -1,7 +1,24 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import com.cool.store.dao.*;
|
||||
import com.cool.store.entity.*;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.SMSMsgEnum;
|
||||
import com.cool.store.enums.point.ShopSubStageEnum;
|
||||
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.request.*;
|
||||
import com.cool.store.service.DecorationDesignInfoService;
|
||||
import com.cool.store.utils.poi.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
@@ -11,4 +28,257 @@ import org.springframework.stereotype.Service;
|
||||
@Service
|
||||
public class DecorationDesignInfoServiceImpl implements DecorationDesignInfoService {
|
||||
|
||||
@Resource
|
||||
private AcceptanceInfoDAO acceptanceInfoDAO;
|
||||
@Resource
|
||||
private CommonService commonService;
|
||||
@Resource
|
||||
private DecorationDesignInfoDAO decorationDesignInfoDAO;
|
||||
@Resource
|
||||
private ShopInfoDAO shopInfoDAO;
|
||||
@Resource
|
||||
private ShopStageInfoDAO shopStageInfoDAO;
|
||||
@Resource
|
||||
private LineInfoDAO lineInfoDAO;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean assignDesigner(AssignDesignerRequest request) {
|
||||
|
||||
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
if (shopInfoDO == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
|
||||
}
|
||||
if (StringUtils.isEmpty(shopInfoDO.getHqtShopId())){
|
||||
throw new ServiceException(ErrorCodeEnum.HQT_SHOP_ID_NOT_EXIST);
|
||||
}
|
||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopInfoDO.getId(), ShopSubStageEnum.SHOP_STAGE_9);
|
||||
if (shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_00.getShopSubStageStatus())) {
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_STAGE_NOT_OPERATE);
|
||||
}
|
||||
DecorationDesignInfoDO designInfoDO = decorationDesignInfoDAO.getByShopId(shopInfoDO.getId());
|
||||
if (designInfoDO == null) {
|
||||
designInfoDO = new DecorationDesignInfoDO();
|
||||
designInfoDO.setShopId(shopInfoDO.getId());
|
||||
designInfoDO.setCreateTime(new Date());
|
||||
}
|
||||
designInfoDO.setDesignName(request.getDesignName());
|
||||
designInfoDO.setDesignSubmitTime(new Date());
|
||||
designInfoDO.setDesignSheetId(request.getDesignSheetId());
|
||||
designInfoDO.setUpdateTime(new Date());
|
||||
if (designInfoDO.getId() == null) {
|
||||
decorationDesignInfoDAO.insertSelective(designInfoDO);
|
||||
} else {
|
||||
decorationDesignInfoDAO.updateByPrimaryKeySelective(designInfoDO);
|
||||
}
|
||||
|
||||
if (shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_90.getShopSubStageStatus())) {
|
||||
shopStageInfoDAO.updateShopStageInfo(shopInfoDO.getId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_901);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean submitDesignDrawing(SubmitDesignDrawingRequest request) {
|
||||
|
||||
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
if (shopInfoDO == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
|
||||
}
|
||||
if (StringUtils.isEmpty(shopInfoDO.getHqtShopId())){
|
||||
throw new ServiceException(ErrorCodeEnum.HQT_SHOP_ID_NOT_EXIST);
|
||||
}
|
||||
DecorationDesignInfoDO designInfoDO = decorationDesignInfoDAO.getByShopId(shopInfoDO.getId());
|
||||
if (designInfoDO == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_STAGE_NOT_OPERATE);
|
||||
}
|
||||
designInfoDO.setDesignSheetId(request.getDesignSheetId());
|
||||
designInfoDO.setDesignName(request.getDesignName());
|
||||
designInfoDO.setOriginalPhotoUrl(String.join(",", request.getOriginalPhotoUrl()));
|
||||
designInfoDO.setRenderingUrl(String.join(",", request.getRenderingUrl()));
|
||||
designInfoDO.setFloorPlanUrl(String.join(",", request.getFloorPlanUrl()));
|
||||
designInfoDO.setUpdateTime(new Date());
|
||||
designInfoDO.setDesignSubmitTime(new Date());
|
||||
decorationDesignInfoDAO.updateByPrimaryKeySelective(designInfoDO);
|
||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopInfoDO.getId(), ShopSubStageEnum.SHOP_STAGE_9);
|
||||
if (shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_901.getShopSubStageStatus())) {
|
||||
shopStageInfoDAO.updateShopStageInfo(shopInfoDO.getId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_902);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean assignQuotation(AssignQuotationRequest request) {
|
||||
|
||||
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
if (shopInfoDO == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
|
||||
}
|
||||
if (StringUtils.isEmpty(shopInfoDO.getHqtShopId())){
|
||||
throw new ServiceException(ErrorCodeEnum.HQT_SHOP_ID_NOT_EXIST);
|
||||
}
|
||||
DecorationDesignInfoDO designInfoDO = decorationDesignInfoDAO.getByShopId(shopInfoDO.getId());
|
||||
if (designInfoDO == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_STAGE_NOT_OPERATE);
|
||||
}
|
||||
designInfoDO.setQuotationSheetId(request.getQuotationSheetId());
|
||||
designInfoDO.setQuoter(request.getQuoter());
|
||||
designInfoDO.setQuotationSubmitTime(new Date());
|
||||
designInfoDO.setUpdateTime(new Date());
|
||||
decorationDesignInfoDAO.updateByPrimaryKeySelective(designInfoDO);
|
||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopInfoDO.getId(), ShopSubStageEnum.SHOP_STAGE_9);
|
||||
if (shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_902.getShopSubStageStatus())) {
|
||||
shopStageInfoDAO.updateShopStageInfo(shopInfoDO.getId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_903);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean submitQuotationSheet(SubmitQuotationSheetRequest request) {
|
||||
|
||||
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
if (shopInfoDO == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
|
||||
}
|
||||
if (StringUtils.isEmpty(shopInfoDO.getHqtShopId())){
|
||||
throw new ServiceException(ErrorCodeEnum.HQT_SHOP_ID_NOT_EXIST);
|
||||
}
|
||||
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfoDO.getLineId());
|
||||
DecorationDesignInfoDO designInfoDO = decorationDesignInfoDAO.getByShopId(shopInfoDO.getId());
|
||||
if (designInfoDO == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_STAGE_NOT_OPERATE);
|
||||
}
|
||||
designInfoDO.setQuotationSheetId(request.getQuotationSheetId());
|
||||
designInfoDO.setQuotationUrl(String.join(",", request.getQuotationSheetUrl()));
|
||||
designInfoDO.setQuotationSubmitTime(new Date());
|
||||
designInfoDO.setUpdateTime(new Date());
|
||||
decorationDesignInfoDAO.updateByPrimaryKeySelective(designInfoDO);
|
||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopInfoDO.getId(), ShopSubStageEnum.SHOP_STAGE_9);
|
||||
if (shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_903.getShopSubStageStatus())) {
|
||||
shopStageInfoDAO.updateShopStageInfo(shopInfoDO.getId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_905);
|
||||
Map<String, String> templateParam = new HashMap<>();
|
||||
templateParam.put("shopName", shopInfoDO.getShopName());
|
||||
commonService.sendSms(lineInfoDO.getMobile(), SMSMsgEnum.DESIGN_STAGE, templateParam);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean submitConstructionOrder(ConstructionOrderRequest request) {
|
||||
|
||||
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
if (shopInfoDO == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
|
||||
}
|
||||
if (StringUtils.isEmpty(shopInfoDO.getHqtShopId())){
|
||||
throw new ServiceException(ErrorCodeEnum.HQT_SHOP_ID_NOT_EXIST);
|
||||
}
|
||||
DecorationDesignInfoDO designInfoDO = decorationDesignInfoDAO.getByShopId(shopInfoDO.getId());
|
||||
if (designInfoDO == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_STAGE_NOT_OPERATE);
|
||||
}
|
||||
designInfoDO.setConstructionOrderId(request.getConstructionOrderId());
|
||||
designInfoDO.setConstructionPlanStartTime(request.getConstructionPlanStartTime());
|
||||
designInfoDO.setConstructionPlanEndTime(request.getConstructionPlanEndTime());
|
||||
decorationDesignInfoDAO.updateByPrimaryKeySelective(designInfoDO);
|
||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopInfoDO.getId(), ShopSubStageEnum.SHOP_STAGE_11);
|
||||
if (shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_110.getShopSubStageStatus())) {
|
||||
shopStageInfoDAO.updateShopStageInfo(shopInfoDO.getId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_110_5);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean entryConfirmation(EntryConfirmationRequest request) {
|
||||
|
||||
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
if (shopInfoDO == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
|
||||
}
|
||||
if (StringUtils.isEmpty(shopInfoDO.getHqtShopId())){
|
||||
throw new ServiceException(ErrorCodeEnum.HQT_SHOP_ID_NOT_EXIST);
|
||||
}
|
||||
DecorationDesignInfoDO designInfoDO = decorationDesignInfoDAO.getByShopId(shopInfoDO.getId());
|
||||
if (designInfoDO == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_STAGE_NOT_OPERATE);
|
||||
}
|
||||
designInfoDO.setConstructionOrderId(request.getConstructionOrderId());
|
||||
designInfoDO.setActualEntryTime(request.getActualEntryTime());
|
||||
decorationDesignInfoDAO.updateByPrimaryKeySelective(designInfoDO);
|
||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopInfoDO.getId(), ShopSubStageEnum.SHOP_STAGE_11);
|
||||
if (shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_110_5.getShopSubStageStatus())) {
|
||||
shopStageInfoDAO.updateShopStageInfo(shopInfoDO.getId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_111);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean constructionCompleted(ConstructionCompletedRequest request) {
|
||||
|
||||
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
if (shopInfoDO == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
|
||||
}
|
||||
if (StringUtils.isEmpty(shopInfoDO.getHqtShopId())){
|
||||
throw new ServiceException(ErrorCodeEnum.HQT_SHOP_ID_NOT_EXIST);
|
||||
}
|
||||
DecorationDesignInfoDO designInfoDO = decorationDesignInfoDAO.getByShopId(shopInfoDO.getId());
|
||||
if (designInfoDO == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_STAGE_NOT_OPERATE);
|
||||
}
|
||||
designInfoDO.setConstructionOrderId(request.getConstructionOrderId());
|
||||
decorationDesignInfoDAO.updateByPrimaryKeySelective(designInfoDO);
|
||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopInfoDO.getId(), ShopSubStageEnum.SHOP_STAGE_11);
|
||||
if (shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_111.getShopSubStageStatus())) {
|
||||
shopStageInfoDAO.updateShopStageInfo(shopInfoDO.getId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_112);
|
||||
shopStageInfoDAO.updateShopStageInfo(shopInfoDO.getId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_121);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean decorationAcceptance(HqtDecorationAcceptanceRequest request) {
|
||||
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
if (shopInfoDO == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
|
||||
}
|
||||
if (StringUtils.isEmpty(shopInfoDO.getHqtShopId())){
|
||||
throw new ServiceException(ErrorCodeEnum.HQT_SHOP_ID_NOT_EXIST);
|
||||
}
|
||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopInfoDO.getId(), ShopSubStageEnum.SHOP_STAGE_12);
|
||||
if (!shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_122.getShopSubStageStatus())
|
||||
&& !shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_123.getShopSubStageStatus())) {
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_STAGE_NOT_OPERATE);
|
||||
}
|
||||
AcceptanceInfoDO acceptanceInfoDO = acceptanceInfoDAO.selectByShopId(shopInfoDO.getId());
|
||||
if (Objects.isNull(acceptanceInfoDO)) {
|
||||
acceptanceInfoDO = new AcceptanceInfoDO();
|
||||
acceptanceInfoDO.setShopId(shopInfoDO.getId());
|
||||
}
|
||||
acceptanceInfoDO.setDeliveryOrderId(request.getDeliveryOrderId());
|
||||
acceptanceInfoDO.setActualAcceptanceTime(request.getActualAcceptanceTime());
|
||||
acceptanceInfoDO.setAcceptanceAttachment(String.join(",", request.getAcceptanceAttachmentUrl()));
|
||||
acceptanceInfoDO.setShopDoorwayPhoto(String.join(",",request.getShopDoorwayPhotoUrl()));
|
||||
acceptanceInfoDO.setShopInteriorPhoto(String.join(",",request.getShopInteriorPhotoUrl()));
|
||||
acceptanceInfoDO.setBackKitchenPhoto(String.join(",",request.getBackKitchenPhotoUrl()));
|
||||
acceptanceInfoDO.setAddReduceAmount(request.getAddReduceAmount());
|
||||
if (acceptanceInfoDO.getId() == null) {
|
||||
acceptanceInfoDAO.insertSelectiveAcceptanceInfo(acceptanceInfoDO);
|
||||
} else {
|
||||
acceptanceInfoDAO.updateAcceptanceInfo(acceptanceInfoDO);
|
||||
}
|
||||
if (shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_122.getShopSubStageStatus())) {
|
||||
shopStageInfoDAO.updateShopStageInfo(shopInfoDO.getId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_123);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -5,10 +5,7 @@ import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.dao.*;
|
||||
import com.cool.store.entity.DecorationMeasureDO;
|
||||
import com.cool.store.entity.LineInfoDO;
|
||||
import com.cool.store.entity.ShopInfoDO;
|
||||
import com.cool.store.entity.ShopStageInfoDO;
|
||||
import com.cool.store.entity.*;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.MessageEnum;
|
||||
import com.cool.store.enums.UserRoleEnum;
|
||||
@@ -16,9 +13,13 @@ 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.request.AssignSurveyorsRequest;
|
||||
import com.cool.store.request.DecorationMeasureRequest;
|
||||
import com.cool.store.request.SubmitMeasurementRequest;
|
||||
import com.cool.store.response.MeasureResponse;
|
||||
import com.cool.store.service.DecorationMeasureService;
|
||||
import com.cool.store.utils.RedisUtilPool;
|
||||
import com.cool.store.utils.poi.StringUtils;
|
||||
import com.cool.store.vo.DecorationMeasureVO;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -26,11 +27,14 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class DecorationMeasureServiceImpl implements DecorationMeasureService {
|
||||
|
||||
@Resource
|
||||
private DecorationDesignInfoDAO decorationDesignInfoDAO;
|
||||
@Resource
|
||||
private EnterpriseUserRoleDao enterpriseUserRoleDao;
|
||||
private final DecorationMeasureDAO decorationMeasureDAO;
|
||||
@@ -172,4 +176,108 @@ public class DecorationMeasureServiceImpl implements DecorationMeasureService {
|
||||
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean assignSurveyors(AssignSurveyorsRequest request) {
|
||||
|
||||
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
if (shopInfoDO == null){
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
|
||||
}
|
||||
if (StringUtils.isEmpty(shopInfoDO.getHqtShopId())){
|
||||
throw new ServiceException(ErrorCodeEnum.HQT_SHOP_ID_NOT_EXIST);
|
||||
}
|
||||
ShopStageInfoDO shopStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopInfoDO.getId(), ShopSubStageEnum.SHOP_STAGE_8_6);
|
||||
if (shopStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_00.getShopSubStageStatus())) {
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_STAGE_NOT_OPERATE);
|
||||
}
|
||||
DecorationMeasureDO measureDAOByShopId = decorationMeasureDAO.getByShopId(shopInfoDO.getId());
|
||||
if (measureDAOByShopId == null) {
|
||||
measureDAOByShopId = new DecorationMeasureDO();
|
||||
measureDAOByShopId.setDeleted(false);
|
||||
measureDAOByShopId.setShopId(shopInfoDO.getId());
|
||||
measureDAOByShopId.setCreateTime(new Date());
|
||||
}
|
||||
measureDAOByShopId.setShopId(shopInfoDO.getId());
|
||||
measureDAOByShopId.setMeasurementSheetId(request.getMeasurementSheetId());
|
||||
measureDAOByShopId.setMeasureUserName(request.getMeasureUserName());
|
||||
measureDAOByShopId.setDesignLeaderName(request.getDesignLeaderName());
|
||||
measureDAOByShopId.setUpdateTime(new Date());
|
||||
if (measureDAOByShopId.getId() == null) {
|
||||
decorationMeasureDAO.insertSelective(measureDAOByShopId);
|
||||
shopStageInfoDAO.updateShopStageInfo(shopInfoDO.getId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_862);
|
||||
} else {
|
||||
decorationMeasureDAO.updateByPrimaryKeySelective(measureDAOByShopId);
|
||||
}
|
||||
DecorationDesignInfoDO designInfoDO = decorationDesignInfoDAO.getByShopId(shopInfoDO.getId());
|
||||
if (designInfoDO == null) {
|
||||
designInfoDO = new DecorationDesignInfoDO();
|
||||
designInfoDO.setShopId(shopInfoDO.getId());
|
||||
designInfoDO.setCreateTime(new Date());
|
||||
}
|
||||
designInfoDO.setDesignLeaderName(request.getDesignLeaderName());
|
||||
designInfoDO.setDesignSubmitTime(new Date());
|
||||
designInfoDO.setUpdateTime(new Date());
|
||||
if (designInfoDO.getId() == null) {
|
||||
decorationDesignInfoDAO.insertSelective(designInfoDO);
|
||||
shopStageInfoDAO.updateShopStageInfo(shopInfoDO.getId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_90);
|
||||
} else {
|
||||
decorationDesignInfoDAO.updateByPrimaryKeySelective(designInfoDO);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean submitMeasurementDiagram(SubmitMeasurementRequest request) {
|
||||
|
||||
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
if (shopInfoDO == null){
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
|
||||
}
|
||||
if (StringUtils.isEmpty(shopInfoDO.getHqtShopId())){
|
||||
throw new ServiceException(ErrorCodeEnum.HQT_SHOP_ID_NOT_EXIST);
|
||||
}
|
||||
DecorationMeasureDO measureDAOByShopId = decorationMeasureDAO.getByShopId(shopInfoDO.getId());
|
||||
if (measureDAOByShopId == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_STAGE_NOT_OPERATE);
|
||||
}
|
||||
measureDAOByShopId.setMeasureDate(request.getMeasureDate());
|
||||
measureDAOByShopId.setDiagramDate(request.getDiagramDate());
|
||||
measureDAOByShopId.setMeasureUrl(String.join(",", request.getMeasureUrl()));
|
||||
decorationMeasureDAO.updateByPrimaryKeySelective(measureDAOByShopId);
|
||||
ShopStageInfoDO shopStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopInfoDO.getId(), ShopSubStageEnum.SHOP_STAGE_8_6);
|
||||
if (shopStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_862.getShopSubStageStatus())) {
|
||||
shopStageInfoDAO.updateShopStageInfo(shopInfoDO.getId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_863);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MeasureResponse getMeasureData(Long shopId) {
|
||||
MeasureResponse response = new MeasureResponse();
|
||||
DecorationMeasureDO measureDAOByShopId = decorationMeasureDAO.getByShopId(shopId);
|
||||
if (measureDAOByShopId == null) {
|
||||
return response;
|
||||
}
|
||||
response.setMeasureUrl(measureDAOByShopId.getMeasureUrl());
|
||||
if (StringUtils.isBlank(measureDAOByShopId.getMeasureUserName())
|
||||
&& StringUtils.isNotBlank(measureDAOByShopId.getMeasureUserId())) {
|
||||
response.setMeasureUserName(enterpriseUserDAO.getUserName(measureDAOByShopId.getMeasureUserId()));
|
||||
response.setMeasureUserId(measureDAOByShopId.getMeasureUserId());
|
||||
} else {
|
||||
response.setMeasureUserName(measureDAOByShopId.getMeasureUserName());
|
||||
}
|
||||
if (StringUtils.isBlank(measureDAOByShopId.getDesignLeaderName())
|
||||
&& StringUtils.isNotBlank(measureDAOByShopId.getDesignUserId())) {
|
||||
response.setDesignLeaderName(enterpriseUserDAO.getUserName(measureDAOByShopId.getDesignUserId()));
|
||||
response.setDesignUserId(measureDAOByShopId.getDesignUserId());
|
||||
} else {
|
||||
response.setDesignLeaderName(measureDAOByShopId.getDesignLeaderName());
|
||||
}
|
||||
response.setMeasureDate(measureDAOByShopId.getMeasureDate());
|
||||
response.setDiagramDate(measureDAOByShopId.getDiagramDate());
|
||||
response.setMeasurementSheetId(measureDAOByShopId.getMeasurementSheetId());
|
||||
response.setSubmitTime(measureDAOByShopId.getUpdateTime());
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.mapper.LineInfoMapper;
|
||||
import com.cool.store.mapper.ShopInfoMapper;
|
||||
import com.cool.store.request.*;
|
||||
import com.cool.store.response.DecorationDesignResponse;
|
||||
import com.cool.store.response.ThreeSignResponse;
|
||||
import com.cool.store.service.*;
|
||||
import com.cool.store.utils.CoolDateUtils;
|
||||
@@ -93,6 +94,8 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
|
||||
@Resource
|
||||
EnterpriseUserRoleDao enterpriseUserRoleDao;
|
||||
@Resource
|
||||
private HqtAPIService hqtAPIService;
|
||||
|
||||
@Override
|
||||
public DesignInfoVo DesignInfo(Long shopId) {
|
||||
@@ -352,7 +355,10 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
request.getPartnerAcceptance().setStatus(CommonConstants.ONE);
|
||||
request.getPartnerAcceptance().setAcceptanceTime(new Date());
|
||||
String jsonString = JSONObject.toJSONString(request.getPartnerAcceptance());
|
||||
AcceptanceInfoDO acceptanceInfoDO = new AcceptanceInfoDO();
|
||||
AcceptanceInfoDO acceptanceInfoDO = acceptanceInfoDAO.selectByShopId(request.getShopId());
|
||||
if (acceptanceInfoDO == null) {
|
||||
acceptanceInfoDO = new AcceptanceInfoDO();
|
||||
}
|
||||
acceptanceInfoDO.setShopId(request.getShopId());
|
||||
acceptanceInfoDO.setPartnerAcceptanceSignatures(jsonString);
|
||||
acceptanceInfoDO.setUpdateTime(new Date());
|
||||
@@ -361,22 +367,34 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
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(sendUserIds,
|
||||
MessageEnum.MESSAGE_37,
|
||||
map);
|
||||
if (acceptanceInfoDO.getId() == null) {
|
||||
acceptanceInfoDAO.insertSelectiveAcceptanceInfo(acceptanceInfoDO);
|
||||
} else {
|
||||
acceptanceInfoDAO.updateAcceptanceInfo(acceptanceInfoDO);
|
||||
}
|
||||
//更新阶段状态验收中
|
||||
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_122);
|
||||
if (StringUtils.isNotBlank(shopInfoDO.getHqtShopId())) {
|
||||
HqtPartnerAcceptanceRequest hqtPartnerAcceptanceRequest = new HqtPartnerAcceptanceRequest();
|
||||
hqtPartnerAcceptanceRequest.setHqtShopId(shopInfoDO.getHqtShopId());
|
||||
hqtPartnerAcceptanceRequest.setSatisfaction(request.getSatisfaction());
|
||||
hqtPartnerAcceptanceRequest.setComment(request.getPartnerAcceptance().getRemark());
|
||||
hqtAPIService.hqtPartnerAcceptance(hqtPartnerAcceptanceRequest);
|
||||
}else{
|
||||
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(sendUserIds,
|
||||
MessageEnum.MESSAGE_37,
|
||||
map);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return Boolean.TRUE;
|
||||
@@ -546,6 +564,11 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
if (Objects.isNull(request) || request.getShopId() == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||
}
|
||||
Boolean flag = true;
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
if (StringUtils.isNotBlank(shopInfo.getHqtShopId())) {
|
||||
flag = false;
|
||||
}
|
||||
|
||||
DecorationDesignInfoDO decorationDesignInfoDO = request.toDecorationDesignInfoDO();
|
||||
DecorationDesignInfoDO decoration = decorationDesignInfoDAO.getByShopId(request.getShopId());
|
||||
@@ -561,51 +584,58 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
decorationDesignInfoDO.setQuotationSubmitTime(new Date());
|
||||
}
|
||||
decorationDesignInfoDAO.updateByPrimaryKeySelective(decorationDesignInfoDO);
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
LineInfoDO lineInfo = lineInfoMapper.getByLineId(shopInfo.getLineId());
|
||||
if (ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_90.getShopSubStageStatus().equals(subStage.getShopSubStageStatus())) {
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_901);
|
||||
// 给设计师发送企业微信消息
|
||||
sendMeasureUserMessage(request.getShopId(), decorationDesignInfoDO.getDesignUserId(), MessageEnum.MESSAGE_55);
|
||||
if (flag) {
|
||||
sendMeasureUserMessage(request.getShopId(), decorationDesignInfoDO.getDesignUserId(), MessageEnum.MESSAGE_55);
|
||||
}
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
if (ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_901.getShopSubStageStatus().equals(subStage.getShopSubStageStatus())) {
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_902);
|
||||
List<String> quotationOfficeList = enterpriseUserRoleDao.selectUserIdsByRoleIdList(Collections.singletonList(UserRoleEnum.QUOTATION_OFFICE.getCode()));
|
||||
HashMap<String, String> map = new HashMap<>(4);
|
||||
map.put("partnerUsername", lineInfo.getUsername());
|
||||
map.put("partnerMobile", lineInfo.getMobile());
|
||||
map.put("storeName", shopInfo.getShopName());
|
||||
commonService.sendQWMessage(
|
||||
quotationOfficeList,
|
||||
MessageEnum.MESSAGE_59,
|
||||
map
|
||||
);
|
||||
if (flag) {
|
||||
List<String> quotationOfficeList = enterpriseUserRoleDao.selectUserIdsByRoleIdList(Collections.singletonList(UserRoleEnum.QUOTATION_OFFICE.getCode()));
|
||||
HashMap<String, String> map = new HashMap<>(4);
|
||||
map.put("partnerUsername", lineInfo.getUsername());
|
||||
map.put("partnerMobile", lineInfo.getMobile());
|
||||
map.put("storeName", shopInfo.getShopName());
|
||||
commonService.sendQWMessage(
|
||||
quotationOfficeList,
|
||||
MessageEnum.MESSAGE_59,
|
||||
map
|
||||
);
|
||||
}
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
if (ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_902.getShopSubStageStatus().equals(subStage.getShopSubStageStatus())) {
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_903);
|
||||
// 给报价员发送企业微信消息
|
||||
sendMeasureUserMessage(request.getShopId(), request.getQuotationUserId(), MessageEnum.MESSAGE_55);
|
||||
if (flag) {
|
||||
sendMeasureUserMessage(request.getShopId(), request.getQuotationUserId(), MessageEnum.MESSAGE_55);
|
||||
}
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
//更新设计阶段状态=待确认,装修子流程=待进场
|
||||
//更新设计阶段状态=待确认,
|
||||
if (ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_903.getShopSubStageStatus().equals(subStage.getShopSubStageStatus())) {
|
||||
shopStageInfoDAO.batchUpdateShopStageStatus(request.getShopId(), Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_905, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_110));
|
||||
shopStageInfoDAO.batchUpdateShopStageStatus(request.getShopId(), Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_905));
|
||||
Map<String, String> templateParam = new HashMap<>();
|
||||
templateParam.put("shopName", shopInfo.getShopName());
|
||||
commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.DESIGN_STAGE, templateParam);
|
||||
// 发送企业微信消息
|
||||
List<EnterpriseUserDO> sendUsers = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.CONSTRUCTION_CUSTOMER, shopInfo.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", lineInfo.getUsername());
|
||||
map.put("partnerMobile", lineInfo.getMobile());
|
||||
map.put("storeName", shopInfo.getShopName());
|
||||
commonService.sendQWMessage(sendUserIds,
|
||||
MessageEnum.MESSAGE_37,
|
||||
map);
|
||||
if (flag) {
|
||||
List<EnterpriseUserDO> sendUsers = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.CONSTRUCTION_CUSTOMER, shopInfo.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", lineInfo.getUsername());
|
||||
map.put("partnerMobile", lineInfo.getMobile());
|
||||
map.put("storeName", shopInfo.getShopName());
|
||||
commonService.sendQWMessage(sendUserIds,
|
||||
MessageEnum.MESSAGE_37,
|
||||
map);
|
||||
}
|
||||
}
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
@@ -616,39 +646,66 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
//更新装修设计状态
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_901);
|
||||
// 给设计师发送企业微信消息
|
||||
sendMeasureUserMessage(request.getShopId(), decorationDesignInfoDO.getDesignUserId(), MessageEnum.MESSAGE_55);
|
||||
if (flag) {
|
||||
sendMeasureUserMessage(request.getShopId(), decorationDesignInfoDO.getDesignUserId(), MessageEnum.MESSAGE_55);
|
||||
}
|
||||
}
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DecorationDesignVO getDecorationDesign(Long shopId) {
|
||||
public DecorationDesignResponse getDecorationDesign(Long shopId) {
|
||||
if (shopId == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||
}
|
||||
DecorationDesignInfoDO decoration = decorationDesignInfoDAO.getByShopId(shopId);
|
||||
DecorationDesignResponse response = new DecorationDesignResponse();
|
||||
if (decoration == null) {
|
||||
//查询测量阶段的设计组长
|
||||
DecorationMeasureDO measureDO = decorationMeasureDAO.getByShopId(shopId);
|
||||
DecorationDesignVO decorationDesignVO = new DecorationDesignVO();
|
||||
if (measureDO != null) {
|
||||
decorationDesignVO.setDesignLeaderId(measureDO.getDesignUserId());
|
||||
String userName = enterpriseUserDAO.getUserName(measureDO.getDesignUserId());
|
||||
decorationDesignVO.setDesignLeaderName(userName);
|
||||
if (StringUtils.isNotBlank(measureDO.getDesignUserId()) && StringUtils.isBlank(measureDO.getDesignLeaderName())) {
|
||||
String userName = enterpriseUserDAO.getUserName(measureDO.getDesignUserId());
|
||||
response.setDesignLeaderName(userName);
|
||||
response.setDesignLeaderId(measureDO.getDesignUserId());
|
||||
} else {
|
||||
response.setDesignLeaderName(measureDO.getDesignLeaderName());
|
||||
}
|
||||
}
|
||||
return decorationDesignVO;
|
||||
return response;
|
||||
}
|
||||
DecorationDesignVO decorationDesignVO = BeanUtil.toBean(decoration, DecorationDesignVO.class);
|
||||
//查询员工名称
|
||||
Set<String> userIds = new HashSet<>();
|
||||
Optional.ofNullable(decorationDesignVO.getDesignLeaderId()).ifPresent(userIds::add);
|
||||
Optional.ofNullable(decorationDesignVO.getDesignUserId()).ifPresent(userIds::add);
|
||||
Optional.ofNullable(decorationDesignVO.getQuotationUserId()).ifPresent(userIds::add);
|
||||
Map<String, String> userNameMap = enterpriseUserDAO.getUserNameMap(new ArrayList<>(userIds));
|
||||
decorationDesignVO.setDesignLeaderName(userNameMap.get(decorationDesignVO.getDesignLeaderId()));
|
||||
decorationDesignVO.setQuotationUserName(userNameMap.get(decorationDesignVO.getQuotationUserId()));
|
||||
decorationDesignVO.setDesignUserName(userNameMap.get(decorationDesignVO.getDesignUserId()));
|
||||
return decorationDesignVO;
|
||||
response.setDesignSheetId(decoration.getDesignSheetId());
|
||||
if (StringUtils.isNotBlank(decoration.getDesignUserId()) && StringUtils.isBlank(decoration.getDesignName())) {
|
||||
response.setDesignName(enterpriseUserDAO.getUserName(decoration.getDesignUserId()));
|
||||
response.setDesignUserId(decoration.getDesignUserId());
|
||||
} else {
|
||||
response.setDesignName(decoration.getDesignName());
|
||||
}
|
||||
if (StringUtils.isNotBlank(decoration.getDesignLeaderId()) && StringUtils.isBlank(decoration.getDesignLeaderName())) {
|
||||
String userName = enterpriseUserDAO.getUserName(decoration.getDesignLeaderId());
|
||||
response.setDesignLeaderId(decoration.getDesignLeaderId());
|
||||
response.setDesignLeaderName(userName);
|
||||
} else {
|
||||
response.setDesignLeaderName(decoration.getDesignLeaderName());
|
||||
}
|
||||
response.setOriginalPhotoUrl(decoration.getOriginalPhotoUrl());
|
||||
response.setDesignUrl(decoration.getDesignUrl());
|
||||
response.setRenderingUrl(decoration.getRenderingUrl());
|
||||
response.setFloorPlanUrl(decoration.getFloorPlanUrl());
|
||||
response.setDesignSubmitTime(decoration.getDesignSubmitTime());
|
||||
response.setQuotationUrl(decoration.getQuotationUrl());
|
||||
response.setQuotationSheetId(decoration.getQuotationSheetId());
|
||||
if (StringUtils.isNotBlank(decoration.getQuotationUserId()) && StringUtils.isBlank(decoration.getQuoter())) {
|
||||
String userName = enterpriseUserDAO.getUserName(decoration.getQuotationUserId());
|
||||
response.setQuoter(userName);
|
||||
response.setQuotationUserId(decoration.getQuotationUserId());
|
||||
} else {
|
||||
response.setQuoter(decoration.getQuoter());
|
||||
}
|
||||
response.setQuotationUrl(decoration.getQuotationUrl());
|
||||
response.setQuotationSubmitTime(decoration.getQuotationSubmitTime());
|
||||
response.setPartnerAcceptanceSignatures(decoration.getPartnerAcceptanceSignatures());
|
||||
return response;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -669,6 +726,8 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
throw new ServiceException(ErrorCodeEnum.STATUS_NOT_SUPPORT_SUMMIT);
|
||||
}
|
||||
DecorationDesignInfoDO decoration = decorationDesignInfoDAO.getByShopId(request.getShopId());
|
||||
decoration.setConstructionOrderId(request.getConstructionOrderId());
|
||||
decoration.setActualEntryTime(request.getActualEntryTime());
|
||||
decoration.setConstructionAnnex(request.getConstructionAnnex());
|
||||
decoration.setConstructionRemark(request.getConstructionRemark());
|
||||
decoration.setConstructionPlanStartTime(new Date(request.getConstructionPlanStartTime()));
|
||||
@@ -689,15 +748,10 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
return constructionDataVO;
|
||||
}
|
||||
constructionDataVO.setConstructionAnnex(decoration.getConstructionAnnex());
|
||||
constructionDataVO.setConstructionRemark(decoration.getConstructionRemark());
|
||||
constructionDataVO.setConstructionPlanStartTime(decoration.getConstructionPlanStartTime() != null ? decoration.getConstructionPlanStartTime().getTime() : null);
|
||||
constructionDataVO.setConstructionPlanEndTime(decoration.getConstructionPlanEndTime() != null ? decoration.getConstructionPlanEndTime().getTime() : null);
|
||||
constructionDataVO.setConstructionCreateTime(decoration.getConstructionCreateTime() != null ? decoration.getConstructionCreateTime().getTime() : null);
|
||||
constructionDataVO.setConstructionCreateUser(decoration.getConstructionCreateUser());
|
||||
if (StringUtils.isNotEmpty(decoration.getConstructionCreateUser())) {
|
||||
EnterpriseUserDO user = enterpriseUserDAO.getUserInfoById(decoration.getConstructionCreateUser());
|
||||
constructionDataVO.setConstructionCreateUserName(user.getName());
|
||||
}
|
||||
constructionDataVO.setConstructionPlanStartTime(decoration.getConstructionPlanStartTime());
|
||||
constructionDataVO.setConstructionPlanEndTime(decoration.getConstructionPlanEndTime());
|
||||
constructionDataVO.setConstructionOrderId(decoration.getConstructionOrderId());
|
||||
constructionDataVO.setActualEntryTime(decoration.getActualEntryTime());
|
||||
return constructionDataVO;
|
||||
}
|
||||
|
||||
@@ -705,12 +759,12 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean confirmDesign(DecorationDesignRequest request, LoginUserInfo user) {
|
||||
DecorationDesignInfoDO decoration = decorationDesignInfoDAO.getByShopId(request.getShopId());
|
||||
if (StringUtils.isBlank(decoration.getQuotationUrl())) {
|
||||
throw new ServiceException(ErrorCodeEnum.QUOTATION_URL_REQUIRED);
|
||||
}
|
||||
if (StringUtils.isBlank(decoration.getDesignUrl())) {
|
||||
throw new ServiceException(ErrorCodeEnum.DESIGN_URL_REQUIRED);
|
||||
}
|
||||
// if (StringUtils.isBlank(decoration.getQuotationUrl())) {
|
||||
// throw new ServiceException(ErrorCodeEnum.QUOTATION_URL_REQUIRED);
|
||||
// }
|
||||
// if (StringUtils.isBlank(decoration.getDesignUrl())) {
|
||||
// throw new ServiceException(ErrorCodeEnum.DESIGN_URL_REQUIRED);
|
||||
// }
|
||||
//重复提交校验 3秒内不能重复提交
|
||||
String lockKey = "confirmDesign:" + request.getShopId();
|
||||
String lockValue = UUID.randomUUID().toString();
|
||||
@@ -718,13 +772,24 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
if (!acquired) {
|
||||
throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION);
|
||||
}
|
||||
DecorationDesignInfoDO decorationDesignInfoDO = request.toDecorationDesignInfoDO();
|
||||
if (Objects.nonNull(decoration)) {
|
||||
BeanUtil.copyProperties(decorationDesignInfoDO, decoration, "id");
|
||||
decorationDesignInfoDAO.updateByPrimaryKeySelective(decoration);
|
||||
}
|
||||
ThreeAcceptanceDTO threeAcceptanceDTO = request.getPartnerAcceptanceSignatures();
|
||||
threeAcceptanceDTO.setAcceptanceTime(new Date());
|
||||
threeAcceptanceDTO.setStatus(CommonConstants.ONE);
|
||||
threeAcceptanceDTO.setResult(CommonConstants.ONE);
|
||||
threeAcceptanceDTO.setRemark(threeAcceptanceDTO.getRemark() == null ? "" : threeAcceptanceDTO.getRemark());
|
||||
decoration.setPartnerAcceptanceSignatures(JSONObject.toJSONString(threeAcceptanceDTO));
|
||||
decorationDesignInfoDAO.updateByPrimaryKeySelective(decoration);
|
||||
//更新装修设计状态
|
||||
shopStageInfoDAO.batchUpdateShopStageStatus(request.getShopId(), Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_91));
|
||||
shopStageInfoDAO.batchUpdateShopStageStatus(request.getShopId(), Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_91, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_110));
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
if (StringUtils.isNotBlank(shopInfo.getHqtShopId())) {
|
||||
//推送给HQT
|
||||
ConfirmQuotationRequest confirmQuotationRequest = new ConfirmQuotationRequest();
|
||||
confirmQuotationRequest.setHqtShopId(shopInfo.getHqtShopId());
|
||||
confirmQuotationRequest.setQuotationSheetId(decoration.getQuotationSheetId());
|
||||
confirmQuotationRequest.setStatus(CommonConstants.ONE);
|
||||
hqtAPIService.confirmQuotation(confirmQuotationRequest);
|
||||
}
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@@ -769,6 +834,7 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
request.getOperationsAcceptance().setAcceptanceTime(new Date());
|
||||
String jsonString = JSONObject.toJSONString(request.getOperationsAcceptance());
|
||||
AcceptanceInfoDO acceptanceInfoDO = new AcceptanceInfoDO();
|
||||
acceptanceInfoDO.setId(acceptanceInfoDO1.getId());
|
||||
acceptanceInfoDO.setShopId(request.getShopId());
|
||||
acceptanceInfoDO.setOperationsAcceptanceSignatures(jsonString);
|
||||
acceptanceInfoDO.setUpdateTime(new Date());
|
||||
@@ -777,6 +843,8 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
acceptanceInfoDO.setShopInteriorPhoto(request.getShopInteriorPhoto());
|
||||
acceptanceInfoDO.setAcceptanceAttachment(request.getAcceptanceAttachment());
|
||||
acceptanceInfoDO.setBackKitchenPhoto(request.getBackKitchenPhoto());
|
||||
acceptanceInfoDO.setDeliveryOrderId(request.getDeliveryOrderId());
|
||||
acceptanceInfoDO.setAddReduceAmount(request.getAddReduceAmount());
|
||||
acceptanceInfoDAO.updateAcceptanceInfo(acceptanceInfoDO);
|
||||
if (CommonConstants.ONE == request.getOperationsAcceptance().getResult()
|
||||
&& CommonConstants.ONE == partner.getResult()) {
|
||||
@@ -799,11 +867,11 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
if (Objects.isNull(acceptanceInfoDO)) {
|
||||
return threeSignResponse;
|
||||
}
|
||||
//工程部
|
||||
if (StringUtils.isNotEmpty(acceptanceInfoDO.getEngineeringAcceptanceSignatures())) {
|
||||
ThreeAcceptanceDTO engineering = JSONObject.parseObject(acceptanceInfoDO.getEngineeringAcceptanceSignatures(), ThreeAcceptanceDTO.class);
|
||||
threeSignResponse.setEngineeringAcceptance(engineering);
|
||||
}
|
||||
// //工程部
|
||||
// if (StringUtils.isNotEmpty(acceptanceInfoDO.getEngineeringAcceptanceSignatures())) {
|
||||
// ThreeAcceptanceDTO engineering = JSONObject.parseObject(acceptanceInfoDO.getEngineeringAcceptanceSignatures(), ThreeAcceptanceDTO.class);
|
||||
// threeSignResponse.setEngineeringAcceptance(engineering);
|
||||
// }
|
||||
//营运部
|
||||
if (StringUtils.isNotEmpty(acceptanceInfoDO.getOperationsAcceptanceSignatures())) {
|
||||
ThreeAcceptanceDTO operations = JSONObject.parseObject(acceptanceInfoDO.getOperationsAcceptanceSignatures(), ThreeAcceptanceDTO.class);
|
||||
@@ -814,15 +882,18 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
ThreeAcceptanceDTO partner = JSONObject.parseObject(acceptanceInfoDO.getPartnerAcceptanceSignatures(), ThreeAcceptanceDTO.class);
|
||||
threeSignResponse.setPartnerAcceptance(partner);
|
||||
}
|
||||
threeSignResponse.setKsAccount(acceptanceInfoDO.getKsAccount());
|
||||
threeSignResponse.setVerificationPhone(acceptanceInfoDO.getVerificationMobile());
|
||||
threeSignResponse.setShopLocationScreenshots(acceptanceInfoDO.getShopLocationScreenshots());
|
||||
// threeSignResponse.setKsAccount(acceptanceInfoDO.getKsAccount());
|
||||
// threeSignResponse.setVerificationPhone(acceptanceInfoDO.getVerificationMobile());
|
||||
// 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());
|
||||
threeSignResponse.setActualAcceptanceTime(acceptanceInfoDO.getActualAcceptanceTime());
|
||||
threeSignResponse.setAddReduceAmount(acceptanceInfoDO.getAddReduceAmount());
|
||||
threeSignResponse.setDeliveryOrderId(acceptanceInfoDO.getDeliveryOrderId());
|
||||
return threeSignResponse;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,289 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.dao.BigRegionDAO;
|
||||
import com.cool.store.dao.ShopInfoDAO;
|
||||
import com.cool.store.dto.HqtTokenDTO;
|
||||
import com.cool.store.entity.BigRegionDO;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.FranchiseBrandEnum;
|
||||
import com.cool.store.enums.HqtEnum.HqtShopDecorationAttributesEnum;
|
||||
import com.cool.store.enums.HqtEnum.HqtSignFeeEnum;
|
||||
import com.cool.store.enums.SatisfactionEnum;
|
||||
import com.cool.store.enums.ShopDecorationAttributesEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.request.ConfirmQuotationRequest;
|
||||
import com.cool.store.request.HqtBuildRequest;
|
||||
import com.cool.store.request.HqtPartnerAcceptanceRequest;
|
||||
import com.cool.store.request.hqt.*;
|
||||
import com.cool.store.response.HqtAPIResponse;
|
||||
import com.cool.store.service.HqtAPIService;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import okhttp3.*;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Base64;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2025/07/23/14:05
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class HqtAPIServiceImpl implements HqtAPIService {
|
||||
@Value("${hqt.token.url}")
|
||||
private String hqtTokenUrl;
|
||||
|
||||
@Value("${hqt.token.username}")
|
||||
private String hqtUsername;
|
||||
|
||||
@Value("${hqt.token.grant_type}")
|
||||
private String hqtGrantType;
|
||||
|
||||
@Value("${hqt.token.client.id}")
|
||||
private String hqtClientId;
|
||||
@Value("${hqt.token.client.secret}")
|
||||
private String hqtClientSecret;
|
||||
|
||||
@Resource
|
||||
OkHttpClient okHttpClient;
|
||||
@Resource
|
||||
private ShopInfoDAO shopInfoDAO;
|
||||
@Resource
|
||||
private BigRegionDAO bigRegionDAO;
|
||||
|
||||
@Override
|
||||
//@Async
|
||||
public void pushHqtBuild(HqtBuildRequest request) {
|
||||
log.info("开始推送门店信息request:{}",JSONObject.toJSONString(request));
|
||||
Boolean check = request.check();
|
||||
if (!check) {
|
||||
throw new ServiceException(ErrorCodeEnum.HQT_PARAMS_ERROR);
|
||||
}
|
||||
HqtTokenDTO hqtToken = this.getHqtToken();
|
||||
//构建门店装修属性
|
||||
HqtBuildAPIRequest.Field13__c field13__c = getField13__c(request);
|
||||
//构建所属片区
|
||||
HqtBuildAPIRequest.Field124__c field124__c = getField124__c(request);
|
||||
//构建是否已收设计费
|
||||
HqtBuildAPIRequest.Field8__c field8__c = getField8__c(request);
|
||||
//构建加盟品牌
|
||||
HqtBuildAPIRequest.Field123__c field123__c = getField123__c(request);
|
||||
|
||||
HqtBuildAPIRequest hqtBuildAPIRequest = new HqtBuildAPIRequest();
|
||||
getHqtBuildAPIRequest(request, hqtBuildAPIRequest, field13__c, field124__c, field8__c, field123__c);
|
||||
//资源服务URL
|
||||
String url = hqtToken.getEndPoint();
|
||||
String requestUrl = url + "/v1/data/objects/project3X";
|
||||
HqtAPIResponse hqtAPIResponse = sendPostRequest(JSONObject.toJSONString(hqtBuildAPIRequest), requestUrl, hqtToken);
|
||||
shopInfoDAO.updateHqtShopId(request.getShopId(), hqtAPIResponse.getData());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
// @Async
|
||||
public void confirmQuotation(ConfirmQuotationRequest request) {
|
||||
log.info("开始推送加盟商确认报价单信息request:{}",JSONObject.toJSONString(request));
|
||||
Boolean check = request.check();
|
||||
if (!check) {
|
||||
log.info("参数错误");
|
||||
throw new ServiceException(ErrorCodeEnum.HQT_PARAMS_ERROR);
|
||||
}
|
||||
//构建CRM系统门店编码(红圈通门店id)
|
||||
HqtQuotationSheetAPIRequest.Field1__c field1__c = new HqtQuotationSheetAPIRequest.Field1__c();
|
||||
field1__c.setCode(request.getHqtShopId());
|
||||
|
||||
HqtTokenDTO hqtToken = this.getHqtToken();
|
||||
String requestUrl = hqtToken.getEndPoint() + "/v1/data/objects/CustomObject638__c";
|
||||
|
||||
HqtQuotationSheetAPIRequest apiRequest = new HqtQuotationSheetAPIRequest();
|
||||
apiRequest.setField1__c(field1__c);
|
||||
apiRequest.setName__c(request.getQuotationSheetId());
|
||||
|
||||
sendPostRequest(JSONObject.toJSONString(apiRequest), requestUrl, hqtToken);
|
||||
}
|
||||
|
||||
//@Async
|
||||
@Override
|
||||
public void hqtPartnerAcceptance(HqtPartnerAcceptanceRequest request) {
|
||||
log.info("开始推送加盟商验收信息request:{}",JSONObject.toJSONString(request));
|
||||
if (!request.check()){
|
||||
log.info("参数错误");
|
||||
throw new ServiceException(ErrorCodeEnum.HQT_PARAMS_ERROR);
|
||||
}
|
||||
SatisfactionEnum satisfactionEnum = SatisfactionEnum.getEnumByCode(request.getSatisfaction());
|
||||
|
||||
HqtTokenDTO hqtToken = this.getHqtToken();
|
||||
String requestUrl = hqtToken.getEndPoint() + "/v1/data/objects/CustomObject138__c";
|
||||
|
||||
HqtPartnerAcceptanceAPIRequest apiRequest = getHqtPartnerAcceptanceAPIRequest(request, satisfactionEnum);
|
||||
|
||||
sendPostRequest(JSONObject.toJSONString(apiRequest), requestUrl, hqtToken);
|
||||
}
|
||||
|
||||
private static @NotNull HqtPartnerAcceptanceAPIRequest getHqtPartnerAcceptanceAPIRequest(HqtPartnerAcceptanceRequest request, SatisfactionEnum satisfactionEnum) {
|
||||
HqtPartnerAcceptanceAPIRequest apiRequest = new HqtPartnerAcceptanceAPIRequest();
|
||||
|
||||
//加盟商满意度
|
||||
HqtPartnerAcceptanceAPIRequest.Field1__c field1__c = new HqtPartnerAcceptanceAPIRequest.Field1__c();
|
||||
if (satisfactionEnum != null){
|
||||
field1__c.setId(satisfactionEnum.getHqtCode());
|
||||
field1__c.setLabel(satisfactionEnum.getName());
|
||||
field1__c.setName(satisfactionEnum.getHqtCode());
|
||||
}
|
||||
//红圈通门店id
|
||||
HqtPartnerAcceptanceAPIRequest.Field13__c field13__c = new HqtPartnerAcceptanceAPIRequest.Field13__c();
|
||||
field13__c.setCode(request.getHqtShopId());
|
||||
|
||||
apiRequest.setField1__c(field1__c);
|
||||
apiRequest.setField13__c(field13__c);
|
||||
apiRequest.setField14__c(request.getComment());
|
||||
return apiRequest;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BigRegionDO pushHqtRegion(BigRegionDO bigRegionDO) {
|
||||
HqtTokenDTO hqtToken = this.getHqtToken();
|
||||
String requestUrl = hqtToken.getEndPoint() + "/v1/data/objects/CustomObject494__c";
|
||||
|
||||
Map<String, String> requestBody = new HashMap<>();
|
||||
requestBody.put("name",bigRegionDO.getRegionName());
|
||||
HqtAPIResponse responseBody = sendPostRequest(JSONObject.toJSONString(requestBody), requestUrl, hqtToken);
|
||||
String hqtRegionCode = responseBody.getData();
|
||||
|
||||
bigRegionDO.setHqtRegionCode(hqtRegionCode);
|
||||
bigRegionDO.setHqtRegionName(bigRegionDO.getRegionName());
|
||||
bigRegionDAO.updateHqtDate(bigRegionDO);
|
||||
return bigRegionDO;
|
||||
}
|
||||
|
||||
private HqtAPIResponse sendPostRequest(String requestBody, String requestUrl,HqtTokenDTO hqtToken ){
|
||||
log.info("开始发送请求,url:{},requestBody:{}",requestUrl,requestBody);
|
||||
Request request = new Request.Builder()
|
||||
.url(requestUrl)
|
||||
.post(RequestBody.create(MediaType.parse( "application/json"),requestBody))
|
||||
.addHeader("Authorization", "Bearer " + hqtToken.getAccess_token())
|
||||
.addHeader("Content-Type", "application/json")
|
||||
.build();
|
||||
try (Response response = okHttpClient.newCall(request).execute()) {
|
||||
log.info("发起请求 time:{}",System.currentTimeMillis());
|
||||
if (!response.isSuccessful()) {
|
||||
log.info("HTTP请求失败,msg: " + response.message());
|
||||
throw new ServiceException(ErrorCodeEnum.THIRD_API_ERROR,
|
||||
"HTTP请求失败,状态码: " + response.code());
|
||||
}
|
||||
String responseBody = response.body().string();
|
||||
log.info("请求成功responseBody:{}",JSONObject.toJSONString(responseBody));
|
||||
HqtAPIResponse hqtAPIResponse = JSONObject.parseObject(responseBody, HqtAPIResponse.class);
|
||||
return hqtAPIResponse;
|
||||
} catch (ServiceException e) {
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
log.error("API调用异常 - URL: {}, 错误: {}", requestUrl, e.getMessage(), e);
|
||||
throw new ServiceException(ErrorCodeEnum.THIRD_API_ERROR, "接口调用异常: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static void getHqtBuildAPIRequest(HqtBuildRequest request, HqtBuildAPIRequest hqtBuildAPIRequest, HqtBuildAPIRequest.Field13__c field13__c, HqtBuildAPIRequest.Field124__c field124__c, HqtBuildAPIRequest.Field8__c field8__c, HqtBuildAPIRequest.Field123__c field123__c) {
|
||||
hqtBuildAPIRequest.setProjectNo(request.getShopId().toString());
|
||||
hqtBuildAPIRequest.setName(request.getShopName());
|
||||
hqtBuildAPIRequest.setField13__c(field13__c);
|
||||
hqtBuildAPIRequest.setField124__c(field124__c);
|
||||
hqtBuildAPIRequest.setField94__c(request.getSupervisorName());
|
||||
hqtBuildAPIRequest.setField4__c(request.getSupervisorMobile());
|
||||
hqtBuildAPIRequest.setField5__c(request.getPartnershipSignatoryFirst());
|
||||
hqtBuildAPIRequest.setField62__c(request.getPartnershipSignatoryFirstMobile());
|
||||
hqtBuildAPIRequest.setStreet(request.getShopAddress());
|
||||
hqtBuildAPIRequest.setField8__c(field8__c);
|
||||
hqtBuildAPIRequest.setField123__c(field123__c);
|
||||
hqtBuildAPIRequest.setField4__c(request.getSupervisorMobile());
|
||||
}
|
||||
|
||||
private HqtBuildAPIRequest.Field123__c getField123__c(HqtBuildRequest request) {
|
||||
FranchiseBrandEnum franchiseBrand = FranchiseBrandEnum.getEnumByCode(request.getFranchiseBrand());
|
||||
if (franchiseBrand != null) {
|
||||
HqtBuildAPIRequest.Field123__c field123__c = new HqtBuildAPIRequest.Field123__c();
|
||||
field123__c.setId(field123__c.getId() + franchiseBrand.getHqtCode());
|
||||
field123__c.setLabel(franchiseBrand.getDesc());
|
||||
field123__c.setName(franchiseBrand.getHqtCode());
|
||||
field123__c.setPath(field123__c.getPath() + franchiseBrand.getHqtCode());
|
||||
return field123__c;
|
||||
}
|
||||
return new HqtBuildAPIRequest.Field123__c();
|
||||
}
|
||||
|
||||
private HqtBuildAPIRequest.Field13__c getField13__c(HqtBuildRequest request) {
|
||||
HqtBuildAPIRequest.Field13__c field13__c = new HqtBuildAPIRequest.Field13__c();
|
||||
//获取门店装修属性
|
||||
ShopDecorationAttributesEnum shopDecorationAttributesEnum = ShopDecorationAttributesEnum.getShopDecorationAttributesEnumByCode(request.getShopDecorationAttributes());
|
||||
HqtShopDecorationAttributesEnum hqtShopDecorationAttributesEnum = HqtShopDecorationAttributesEnum.getHqtShopDecorationAttributesEnumByShopDecorationAttributesEnum(shopDecorationAttributesEnum);
|
||||
if (hqtShopDecorationAttributesEnum == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.HQT_SHOP_DECORATION_ATTRIBUTES);
|
||||
}
|
||||
field13__c.setId(hqtShopDecorationAttributesEnum.getCode());
|
||||
field13__c.setLabel(hqtShopDecorationAttributesEnum.getMsg());
|
||||
field13__c.setName(hqtShopDecorationAttributesEnum.getCode());
|
||||
return field13__c;
|
||||
}
|
||||
|
||||
private HqtBuildAPIRequest.Field124__c getField124__c(HqtBuildRequest request) {
|
||||
HqtBuildAPIRequest.Field124__c field124__c = new HqtBuildAPIRequest.Field124__c();
|
||||
field124__c.setCode(request.getHqtRegionCode());
|
||||
field124__c.setName(request.getHqtRegionName());
|
||||
return field124__c;
|
||||
}
|
||||
|
||||
private HqtBuildAPIRequest.Field8__c getField8__c(HqtBuildRequest request) {
|
||||
HqtSignFeeEnum hqtSignFee = HqtSignFeeEnum.getCodeByValue(request.getIsPayDesignFee());
|
||||
if (hqtSignFee != null) {
|
||||
HqtBuildAPIRequest.Field8__c field8__c = new HqtBuildAPIRequest.Field8__c();
|
||||
field8__c.setId(hqtSignFee.getCode());
|
||||
field8__c.setLabel(hqtSignFee.getMsg());
|
||||
field8__c.setName(hqtSignFee.getCode());
|
||||
return field8__c;
|
||||
}
|
||||
return new HqtBuildAPIRequest.Field8__c();
|
||||
|
||||
}
|
||||
public HqtTokenDTO getHqtToken() {
|
||||
String url = hqtTokenUrl + "/hecom-tenancy/oauth/token";
|
||||
String auth = hqtClientId + ":" + hqtClientSecret;
|
||||
String encodedAuth = Base64.getEncoder().encodeToString(auth.getBytes(StandardCharsets.UTF_8));
|
||||
RequestBody formBody = new FormBody.Builder()
|
||||
.add("grant_type", hqtGrantType)
|
||||
.add("username", hqtUsername)
|
||||
.build();
|
||||
Request request = new Request.Builder()
|
||||
.url(url)
|
||||
.post(formBody)
|
||||
.addHeader("Authorization", "Basic " + encodedAuth)
|
||||
.addHeader("Host", "tc.cloud.hecom.cn")
|
||||
.build();
|
||||
try (Response response = okHttpClient.newCall(request).execute()) {
|
||||
if (!response.isSuccessful()) {
|
||||
log.info("HTTP请求失败,msg: " + response.message());
|
||||
throw new ServiceException(ErrorCodeEnum.THIRD_API_ERROR,
|
||||
"HTTP请求失败,状态码: " + response.code());
|
||||
}
|
||||
String responseBody = response.body().string();
|
||||
HqtTokenDTO hqtTokenDTO = JSONObject.parseObject(responseBody, HqtTokenDTO.class);
|
||||
return hqtTokenDTO;
|
||||
} catch (ServiceException e) {
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
log.error("API调用异常 - URL: {}, 错误: {}", url, e.getMessage(), e);
|
||||
throw new ServiceException(ErrorCodeEnum.THIRD_API_ERROR, "接口调用异常: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,7 @@ import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.mapper.FranchiseFeeMapper;
|
||||
import com.cool.store.mapper.SignFranchiseMapper;
|
||||
import com.cool.store.request.AuditRequest;
|
||||
import com.cool.store.request.HqtBuildRequest;
|
||||
import com.cool.store.request.OrderSysInfoRequest;
|
||||
import com.cool.store.service.*;
|
||||
import com.cool.store.utils.poi.StringUtils;
|
||||
@@ -36,7 +37,14 @@ import static com.cool.store.enums.point.ShopSubStageStatusEnum.*;
|
||||
@Service
|
||||
public class OrderSysInfoServiceImpl implements OrderSysInfoService {
|
||||
|
||||
|
||||
@Resource
|
||||
private ShopService shopService;
|
||||
@Resource
|
||||
private HqtAPIService hqtAPIService;
|
||||
@Resource
|
||||
private BigRegionDAO bigRegionDAO;
|
||||
@Resource
|
||||
private EnterpriseUserDAO enterpriseUserDAO;
|
||||
@Resource
|
||||
private SyncMainSysServer syncMainSysServer;
|
||||
@Resource
|
||||
@@ -65,7 +73,6 @@ public class OrderSysInfoServiceImpl implements OrderSysInfoService {
|
||||
private String specialUserId;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Integer updateByShopId(OrderSysInfoRequest request, LoginUserInfo user) {
|
||||
@@ -108,7 +115,7 @@ public class OrderSysInfoServiceImpl implements OrderSysInfoService {
|
||||
map.put("storeName", shopInfoDO.getShopName());
|
||||
//自有店财务
|
||||
UserRoleEnum finance = UserRoleEnum.FINANCE;
|
||||
if (JoinModeEnum.OWN_STORE.equals(shopInfo.getJoinMode())){
|
||||
if (JoinModeEnum.OWN_STORE.getCode()==(shopInfo.getJoinMode())) {
|
||||
finance = UserRoleEnum.OWN_SHOP_OFFICE;
|
||||
}
|
||||
List<EnterpriseUserDO> itList = userAuthMappingService.getAllUserByRoleEnumAndRegionId(finance, shopInfoDO.getRegionId());
|
||||
@@ -127,6 +134,10 @@ public class OrderSysInfoServiceImpl implements OrderSysInfoService {
|
||||
}
|
||||
}
|
||||
if (request.getType().equals(OrderSysTypeEnum.ORDER_SYS_TYPE_2.getType())) {
|
||||
//检验门店编码是否重复
|
||||
if(shopService.checkShopCodeRepeat(request.getShopCode(), request.getShopId())){
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_CODE_EXIST);
|
||||
}
|
||||
shopInfoDAO.updateShopCode(request.getShopCode(), request.getShopId());
|
||||
orderSysInfoDO.setReceivingFirmName(request.getReceivingFirmName());
|
||||
orderSysInfoDO.setReceivingMsBankAccount(request.getReceivingMsBankAccount());
|
||||
@@ -144,20 +155,20 @@ public class OrderSysInfoServiceImpl implements OrderSysInfoService {
|
||||
//审批流
|
||||
operationLogService.addOperationLog(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_152, curUserId, curName,
|
||||
OperationTypeEnum.OPERATION_TYPE_0, "建店资料财务提交审批", OperationStatusEnum.PROCESSED);
|
||||
List<EnterpriseUserDO>directorList = new ArrayList<>();
|
||||
List<EnterpriseUserDO> directorList = new ArrayList<>();
|
||||
List<EnterpriseUserDO> headUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.HEAD_OF_DIVISION, shopInfoDAO.getShopInfo(request.getShopId()).getRegionId());
|
||||
if (CollectionUtils.isNotEmpty(headUser)){
|
||||
directorList.addAll(headUser);
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(headUser)) {
|
||||
directorList.addAll(headUser);
|
||||
}
|
||||
List<EnterpriseUserDO> manager = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.REGIONAL_MANAGER, shopInfoDAO.getShopInfo(request.getShopId()).getRegionId());
|
||||
if (CollectionUtils.isNotEmpty(manager)){
|
||||
if (CollectionUtils.isNotEmpty(manager)) {
|
||||
directorList.addAll(manager);
|
||||
}
|
||||
operationLogService.addOperationLog(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_153,
|
||||
curUserId, directorList,
|
||||
OperationTypeEnum.OPERATION_TYPE_1, "建店资料分管总监审批", OperationStatusEnum.NOT_PROCESSED);
|
||||
List<String> userIds = directorList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList());
|
||||
sendSms(request.getShopId(),userIds);
|
||||
List<String> userIds = directorList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList());
|
||||
sendSms(request.getShopId(), userIds);
|
||||
return orderSysInfoDAO.updateByShopId(orderSysInfoDO);
|
||||
} else {
|
||||
orderSysInfoDO.setReceivingUpdateTime(new Date());
|
||||
@@ -171,6 +182,10 @@ public class OrderSysInfoServiceImpl implements OrderSysInfoService {
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Integer audit(AuditRequest request, LoginUserInfo user) {
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
if (shopInfo.getShopDecorationAttributes() == null){
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_DECORATION_ATTRIBUTES_IS_NULL);
|
||||
}
|
||||
String curUserId = user.getUserId();
|
||||
request.setOperateUserId(user.getUserId());
|
||||
request.setOperateUserName(user.getName());
|
||||
@@ -191,10 +206,9 @@ public class OrderSysInfoServiceImpl implements OrderSysInfoService {
|
||||
//查询毛泽军下级区域 只有毛泽军的下级需要总裁处理 其他不需要总裁处理:
|
||||
List<String> regionIds = userAuthMappingService.getAuthRegionIdAndSubRegionIdByUserId(specialUserId);
|
||||
//是否有总裁处理flag
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
Boolean flag = Boolean.FALSE;
|
||||
//如果是毛泽军的下级 则需要总裁处理
|
||||
if(shopInfo!=null&&shopInfo.getRegionId()!=null){
|
||||
if (shopInfo != null && shopInfo.getRegionId() != null) {
|
||||
flag = regionIds.contains(String.valueOf(shopInfo.getRegionId()));
|
||||
}
|
||||
|
||||
@@ -204,25 +218,25 @@ public class OrderSysInfoServiceImpl implements OrderSysInfoService {
|
||||
switch (nowStatus) {
|
||||
case SHOP_SUB_STAGE_STATUS_153:
|
||||
nextStatus = SHOP_SUB_STAGE_STATUS_154;
|
||||
List<EnterpriseUserDO> users = userAuthMappingService.getUserIdByRoleEnumAndRegionId(Arrays.asList(VICE_PRESIDENT_IN_CHARGE,BRAND_HEAD), shopInfoDAO.getShopInfo(request.getShopId()).getRegionId());
|
||||
List<EnterpriseUserDO> users = userAuthMappingService.getUserIdByRoleEnumAndRegionId(Arrays.asList(VICE_PRESIDENT_IN_CHARGE, BRAND_HEAD), shopInfoDAO.getShopInfo(request.getShopId()).getRegionId());
|
||||
List<String> userIds = new ArrayList<>();
|
||||
if(CollectionUtils.isNotEmpty(users)){
|
||||
userIds = users.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(users)) {
|
||||
userIds = users.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList());
|
||||
}
|
||||
sendSms(request.getShopId(),userIds);
|
||||
sendSms(request.getShopId(), userIds);
|
||||
operationLogService.addOperationLog(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_154,
|
||||
curUserId,users,
|
||||
curUserId, users,
|
||||
OperationTypeEnum.OPERATION_TYPE_1, "建店资料分管副总裁审批", OperationStatusEnum.NOT_PROCESSED);
|
||||
break;
|
||||
case SHOP_SUB_STAGE_STATUS_154:
|
||||
nextStatus = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_155;
|
||||
if (flag){
|
||||
if (flag) {
|
||||
List<EnterpriseUserDO> users1 = userAuthMappingService.getAllUserByRoleEnumAndRegionId(PRESIDENT, shopInfoDAO.getShopInfo(request.getShopId()).getRegionId());
|
||||
List<String> userIds1 = new ArrayList<>();
|
||||
if(CollectionUtils.isNotEmpty(users1)){
|
||||
if (CollectionUtils.isNotEmpty(users1)) {
|
||||
userIds1 = users1.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList());
|
||||
}
|
||||
sendSms(request.getShopId(),userIds1);
|
||||
sendSms(request.getShopId(), userIds1);
|
||||
operationLogService.addOperationLog(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_155,
|
||||
curUserId, users1,
|
||||
OperationTypeEnum.OPERATION_TYPE_1, "建店资料总裁审批", OperationStatusEnum.NOT_PROCESSED);
|
||||
@@ -232,25 +246,27 @@ public class OrderSysInfoServiceImpl implements OrderSysInfoService {
|
||||
nextStatus = SHOP_SUB_STAGE_STATUS_156;
|
||||
break;
|
||||
default:
|
||||
nextStatus=null;
|
||||
nextStatus = null;
|
||||
break;
|
||||
}
|
||||
//
|
||||
if (AuditResultTypeEnum.REJECT.getCode().equals(request.getResultType())) {
|
||||
//回退
|
||||
return shopStageInfoDAO.updateShopStageInfo(request.getShopId(), SHOP_SUB_STAGE_STATUS_152);
|
||||
return shopStageInfoDAO.updateShopStageInfo(request.getShopId(), SHOP_SUB_STAGE_STATUS_152);
|
||||
}
|
||||
//测量阶段
|
||||
ShopStageInfoDO measurementStage = shopStageInfoDAO.getShopSubStageInfo(request.getShopId(), ShopSubStageEnum.SHOP_STAGE_8_6);
|
||||
if (AuditResultTypeEnum.PASS.getCode().equals(request.getResultType())) {
|
||||
//如果不是毛泽军下级大区 直接完成不用总裁审批
|
||||
if (!flag && SHOP_SUB_STAGE_STATUS_154.equals(nowStatus)) {
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), SHOP_SUB_STAGE_STATUS_156);
|
||||
stageCompletion(request.getShopId());
|
||||
syncMainSysServer.syncStore(request.getShopId());
|
||||
return CommonConstants.ONE;
|
||||
return CommonConstants.ONE;
|
||||
|
||||
} else {
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), nextStatus);
|
||||
if (SHOP_SUB_STAGE_STATUS_156.equals(nextStatus)){
|
||||
if (SHOP_SUB_STAGE_STATUS_156.equals(nextStatus)) {
|
||||
stageCompletion(request.getShopId());
|
||||
syncMainSysServer.syncStore(request.getShopId());
|
||||
}
|
||||
@@ -259,7 +275,8 @@ public class OrderSysInfoServiceImpl implements OrderSysInfoService {
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
void sendSms(Long shopId,List<String> userIds){
|
||||
|
||||
void sendSms(Long shopId, List<String> userIds) {
|
||||
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(shopId);
|
||||
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfoDO.getLineId());
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
@@ -271,7 +288,8 @@ public class OrderSysInfoServiceImpl implements OrderSysInfoService {
|
||||
MessageEnum.MESSAGE_54,
|
||||
map);
|
||||
}
|
||||
void stageCompletion(Long shopId){
|
||||
|
||||
void stageCompletion(Long shopId) {
|
||||
//初始化数据
|
||||
preparationService.licenseCompleted(shopId);
|
||||
preparationService.sysStoreCompleted(shopId);
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.cool.store.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.dto.GetAccessTokenDTO;
|
||||
import com.cool.store.dto.HqtTokenDTO;
|
||||
import com.cool.store.dto.ModifyPasswordDTO;
|
||||
import com.cool.store.dto.XgjOrganizationDTO;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
@@ -24,6 +25,7 @@ import com.fasterxml.jackson.databind.JavaType;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import okhttp3.*;
|
||||
import okio.Buffer;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -86,6 +88,20 @@ public class PushServiceImpl implements PushService {
|
||||
@Value("${ask.bot.url}")
|
||||
private String askBotUrl;
|
||||
|
||||
@Value("${hqt.token.url}")
|
||||
private String hqtTokenUrl;
|
||||
|
||||
@Value("${hqt.token.username}")
|
||||
private String hqtUsername;
|
||||
|
||||
@Value("${hqt.token.grant_type}")
|
||||
private String hqtGrantType;
|
||||
|
||||
@Value("${hqt.token.client.id}")
|
||||
private String hqtClientId;
|
||||
@Value("${hqt.token.client.secret}")
|
||||
private String hqtClientSecret;
|
||||
|
||||
@Resource
|
||||
OkHttpClient okHttpClient;
|
||||
@Resource
|
||||
@@ -248,6 +264,38 @@ public class PushServiceImpl implements PushService {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public HqtTokenDTO getHqtToken() {
|
||||
String url = hqtTokenUrl + "/hecom-tenancy/oauth/token";
|
||||
String auth = hqtClientId + ":" + hqtClientSecret;
|
||||
String encodedAuth = Base64.getEncoder().encodeToString(auth.getBytes(StandardCharsets.UTF_8));
|
||||
RequestBody formBody = new FormBody.Builder()
|
||||
.add("grant_type", hqtGrantType)
|
||||
.add("username", hqtUsername)
|
||||
.build();
|
||||
Request request = new Request.Builder()
|
||||
.url(url)
|
||||
.post(formBody)
|
||||
.addHeader("Authorization", "Basic " + encodedAuth)
|
||||
.addHeader("Host", "tc.cloud.hecom.cn")
|
||||
.build();
|
||||
try (Response response = okHttpClient.newCall(request).execute()) {
|
||||
if (!response.isSuccessful()) {
|
||||
log.info("HTTP请求失败,msg: " + response.message());
|
||||
throw new ServiceException(ErrorCodeEnum.THIRD_API_ERROR,
|
||||
"HTTP请求失败,状态码: " + response.code());
|
||||
}
|
||||
String responseBody = response.body().string();
|
||||
HqtTokenDTO hqtTokenDTO = objectMapper.readValue(responseBody, HqtTokenDTO.class);
|
||||
return hqtTokenDTO;
|
||||
} catch (ServiceException e) {
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
log.error("API调用异常 - URL: {}, 错误: {}", url, e.getMessage(), e);
|
||||
throw new ServiceException(ErrorCodeEnum.THIRD_API_ERROR, "接口调用异常: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
private <T> T executeApiCall(String url, Object requestBody, Class<T> responseType, String username, String secret){
|
||||
return executePostApiCall(url,requestBody,responseType,username,secret,null);
|
||||
}
|
||||
|
||||
@@ -60,6 +60,8 @@ import static com.cool.store.enums.WorkflowSubStageStatusEnum.*;
|
||||
@Slf4j
|
||||
public class ShopServiceImpl implements ShopService {
|
||||
|
||||
@Resource
|
||||
private DecorationMeasureDAO decorationMeasureDAO;
|
||||
@Resource
|
||||
private LinePayDAO linePayDAO;
|
||||
@Resource
|
||||
@@ -105,8 +107,6 @@ public class ShopServiceImpl implements ShopService {
|
||||
@Resource
|
||||
StoreDao storeDao;
|
||||
@Resource
|
||||
DecorationMeasureDAO decorationMeasureDAO;
|
||||
@Resource
|
||||
DecorationDesignInfoDAO decorationDesignInfoDAO;
|
||||
@Resource
|
||||
StoreService storeService;
|
||||
@@ -308,6 +308,10 @@ public class ShopServiceImpl implements ShopService {
|
||||
|
||||
@Override
|
||||
public Integer updateShopCode(UpdateShopCodeRequest request, String userId) {
|
||||
//检验门店编码是否重复
|
||||
if(this.checkShopCodeRepeat(request.getShopCode(), request.getShopId())){
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_CODE_EXIST);
|
||||
}
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
if (Objects.isNull(shopInfo)) {
|
||||
throw new ServiceException(ErrorCodeEnum.POINT_NOT_EXIST);
|
||||
@@ -429,6 +433,10 @@ public class ShopServiceImpl implements ShopService {
|
||||
|
||||
@Override
|
||||
public Integer updateBranchShopDetail(BranchShopDetailRequest request, String userId) {
|
||||
//检验门店编码是否重复
|
||||
if(this.checkShopCodeRepeat(request.getShopCode(), request.getShopId())){
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_CODE_EXIST);
|
||||
}
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
shopInfo.setUpdateUserId(userId);
|
||||
shopInfo.setUpdateTime(new Date());
|
||||
@@ -893,6 +901,32 @@ public class ShopServiceImpl implements ShopService {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean checkShopCodeRepeat(String shopCode, Long shopId) {
|
||||
//false 未重复, true 重复
|
||||
List<ShopInfoDO> shopListByShopCode = shopInfoDAO.getShopListByShopCode(shopCode);
|
||||
if (CollectionUtils.isEmpty(shopListByShopCode)){
|
||||
return false;
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(shopListByShopCode)&&shopId ==null){
|
||||
return true;
|
||||
}
|
||||
if (shopListByShopCode.size() == 1 && shopListByShopCode.get(0).getId().equals(shopId)){
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean isShowButton(Long shopId) {
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
||||
//店已关联HQT 不展示按钮
|
||||
if (StringUtils.isNotBlank(shopInfo.getHqtShopId())){
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取招商经理信息
|
||||
* @param
|
||||
|
||||
@@ -12,10 +12,7 @@ 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.*;
|
||||
import com.cool.store.request.AddSignFranchiseRequest;
|
||||
import com.cool.store.request.AuditApproveRequest;
|
||||
import com.cool.store.request.AuditResultRequest;
|
||||
import com.cool.store.request.FranchiseAgreementRequest;
|
||||
import com.cool.store.request.*;
|
||||
import com.cool.store.response.AddSignFranchiseResponse;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.*;
|
||||
@@ -44,6 +41,16 @@ import static com.cool.store.enums.point.ShopSubStageStatusEnum.*;
|
||||
@Slf4j
|
||||
public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResultService {
|
||||
|
||||
@Resource
|
||||
private BigRegionDAO bigRegionDAO;
|
||||
@Resource
|
||||
private ShopInfoDAO shopInfoDAO;
|
||||
@Resource
|
||||
private LineInfoDAO lineInfoDAO;
|
||||
@Resource
|
||||
private EnterpriseUserDAO enterpriseUserDAO;
|
||||
@Resource
|
||||
private HqtAPIService hqtAPIService;
|
||||
@Resource
|
||||
private RegionDao regionDao;
|
||||
@Resource
|
||||
@@ -283,6 +290,7 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
shopInfoDO.setDistrictCode(request.getDistrictCode());
|
||||
shopInfoDO.setUpdateTime(new Date());
|
||||
shopInfoDO.setStoreType(request.getStoreType());
|
||||
shopInfoDO.setShopDecorationAttributes(request.getShopDecorationAttributes());
|
||||
shopInfoMapper.updateByPrimaryKeySelective(shopInfoDO);
|
||||
if (Objects.nonNull(pointInfoById)) {
|
||||
pointInfoById.setProvince(request.getProvince());
|
||||
@@ -342,12 +350,7 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
//10s过期
|
||||
acquired = redisUtilPool.setNxExpire(lockKey, lockValue, CommonConstants.TEN_SECONDS);
|
||||
if (Boolean.TRUE.equals(acquired)) {
|
||||
ShopSubStageStatusEnum shopSubStageStatusEnum = null;
|
||||
if (request.getAuditResult() == 1) {
|
||||
shopSubStageStatusEnum = SHOP_SUB_STAGE_STATUS_84;
|
||||
} else if (request.getAuditResult() == 0) {
|
||||
shopSubStageStatusEnum = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_85;
|
||||
}
|
||||
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(shopId);
|
||||
ShopAuditInfoDO shopAuditInfoDO = new ShopAuditInfoDO();
|
||||
shopAuditInfoDO.setShopId(shopId);
|
||||
shopAuditInfoDO.setAuditType(AuditTypeEnum.SIGN_FRANCHISE.getCode());
|
||||
@@ -358,9 +361,8 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
shopAuditInfoDO.setResultType(Constants.ONE_INTEGER);
|
||||
shopAuditInfoDO.setRejectReason(request.getCause());
|
||||
Map<String, String> requestMap = new HashMap<>();
|
||||
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(shopId);
|
||||
LineInfoDO lineInfo = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
|
||||
shopStageInfoDAO.updateShopStageInfo(shopId, shopSubStageStatusEnum);
|
||||
shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_85);
|
||||
Set<String> auditFranchiseFeeUsers = new HashSet<>();
|
||||
List<EnterpriseUserDO> branchUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.JOIN_OFFICE, shopInfoDO.getRegionId());
|
||||
if (Objects.nonNull(branchUser)) {
|
||||
@@ -379,30 +381,29 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
requestMap.put("shopId", String.valueOf(shopInfoDO.getId()));
|
||||
commonService.sendMessage(new ArrayList<>(auditFranchiseFeeUsers), MessageEnum.MESSAGE_20, requestMap);
|
||||
} else if (Constants.ONE_INTEGER.equals(request.getAuditResult())) {
|
||||
if (shopInfoDO.getShopDecorationAttributes().equals(ShopDecorationAttributesEnum.OLD_NEW_OPEN.getCode())) {
|
||||
//老店新开时装修与开业直接完成
|
||||
shopStageInfoDAO.batchUpdateByShopIdsAndSubStageStatus(Arrays.asList(shopId), Arrays.asList(
|
||||
SHOP_SUB_STAGE_STATUS_863, SHOP_SUB_STAGE_STATUS_91, SHOP_SUB_STAGE_STATUS_112, SHOP_SUB_STAGE_STATUS_123, SHOP_SUB_STAGE_STATUS_143
|
||||
));
|
||||
}else{
|
||||
hqtAPIService.pushHqtBuild(getHqtBuildRequest(request.getShopId()));
|
||||
|
||||
}
|
||||
shopAuditInfoDO.setResultType(Constants.ZERO_INTEGER);
|
||||
shopAuditInfoDO.setPassReason(request.getCause());
|
||||
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(request.getShopId());
|
||||
//更新状态为加盟商
|
||||
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
|
||||
//暂时去掉
|
||||
lineInfoDO.setJoinStatus(CommonConstants.TWO);
|
||||
lineInfoMapper.insertOrUpdate(lineInfoDO);
|
||||
shopStageInfoDAO.updateShopStageInfo(shopId, shopSubStageStatusEnum);
|
||||
shopStageInfoDAO.updateShopStageInfo(shopId, SHOP_SUB_STAGE_STATUS_84);
|
||||
//初始化数据
|
||||
preparationService.contractAndBuildStoreCompletion(request.getShopId());
|
||||
|
||||
//判断是否是老店新开
|
||||
SignFranchiseDO signFranchiseDO = signFranchiseMapper.selectByShopId(shopId);
|
||||
log.info("加盟合同审批时签约类型:{}", SignTypeEnum.getDescByCode(signFranchiseDO.getSignType()));
|
||||
Boolean sendNotice = Boolean.TRUE;
|
||||
if (SignTypeEnum.OLD_NEW_OPEN.getCode().equals(signFranchiseDO.getSignType()) || SignTypeEnum.DIRECT_SALES_TO_JOINING.getCode().equals(signFranchiseDO.getSignType())) {
|
||||
//老店新开时装修与开业直接完成
|
||||
shopStageInfoDAO.batchUpdateByShopIdsAndSubStageStatus(Arrays.asList(shopId), Arrays.asList(
|
||||
SHOP_SUB_STAGE_STATUS_863, SHOP_SUB_STAGE_STATUS_91, SHOP_SUB_STAGE_STATUS_112, SHOP_SUB_STAGE_STATUS_123, SHOP_SUB_STAGE_STATUS_143
|
||||
));
|
||||
//老店新开 不需要装修与开业 无需发送通知
|
||||
sendNotice = Boolean.FALSE;
|
||||
}
|
||||
commonService.sendSms(lineInfoDO.getMobile(), SMSMsgEnum.SIGN_CONTRACT);
|
||||
if (sendNotice) {
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
@@ -414,10 +415,10 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
if (Objects.nonNull(userDOList)) {
|
||||
finances.addAll(userDOList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
|
||||
}
|
||||
List<String> liGuiNeiQinList = enterpriseUserRoleDao.selectUserIdsByRoleIdList(Arrays.asList(UserRoleEnum.CONSTRUCTION_CUSTOMER.getCode()));
|
||||
commonService.sendQWMessage(liGuiNeiQinList,
|
||||
MessageEnum.MESSAGE_57,
|
||||
map);
|
||||
// List<String> liGuiNeiQinList = enterpriseUserRoleDao.selectUserIdsByRoleIdList(Arrays.asList(UserRoleEnum.CONSTRUCTION_CUSTOMER.getCode()));
|
||||
// commonService.sendQWMessage(liGuiNeiQinList,
|
||||
// MessageEnum.MESSAGE_57,
|
||||
// map);
|
||||
commonService.sendQWMessage(Collections.singletonList(shopInfoDO.getInvestmentManager()),
|
||||
MessageEnum.MESSAGE_26,
|
||||
map);
|
||||
@@ -443,6 +444,33 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
}
|
||||
}
|
||||
|
||||
public HqtBuildRequest getHqtBuildRequest(Long shopId) {
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
||||
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfo.getLineId());
|
||||
EnterpriseUserDO userInfoById = enterpriseUserDAO.getUserInfoById(shopInfo.getInvestmentManager());
|
||||
BigRegionDO bigRegionDO = bigRegionDAO.getByRegionId(shopInfo.getRegionId());
|
||||
if (StringUtils.isBlank(bigRegionDO.getHqtRegionCode())){
|
||||
bigRegionDO = hqtAPIService.pushHqtRegion(bigRegionDO);
|
||||
}
|
||||
HqtBuildRequest request = new HqtBuildRequest();
|
||||
request.setShopId(shopId);
|
||||
request.setShopCode(shopInfo.getShopCode());
|
||||
request.setShopName(shopInfo.getShopName());
|
||||
request.setShopDecorationAttributes(shopInfo.getShopDecorationAttributes());
|
||||
request.setHqtRegionCode(bigRegionDO.getHqtRegionCode());
|
||||
request.setHqtRegionName(bigRegionDO.getHqtRegionName());
|
||||
request.setSupervisorName(userInfoById.getName());
|
||||
request.setSupervisorMobile(userInfoById.getMobile());
|
||||
request.setPartnershipSignatoryFirst(lineInfoDO.getUsername());
|
||||
request.setPartnershipSignatoryFirstMobile(lineInfoDO.getMobile());
|
||||
request.setShopAddress(shopInfo.getDetailAddress());
|
||||
request.setIsPayDesignFee(CommonConstants.ONE);
|
||||
if (StringUtils.isNotBlank(shopInfo.getFranchiseBrand())) {
|
||||
request.setFranchiseBrand(Integer.valueOf(shopInfo.getFranchiseBrand()));
|
||||
}
|
||||
return request;
|
||||
}
|
||||
|
||||
public AddSignFranchiseResponse from(SignFranchiseDO signFranchiseDO,
|
||||
Long shopId) {
|
||||
AddSignFranchiseResponse addSignFranchiseResponse = new AddSignFranchiseResponse();
|
||||
@@ -485,6 +513,7 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
addSignFranchiseResponse.setCityCode(shopInfoDO.getCityCode());
|
||||
addSignFranchiseResponse.setDistrictCode(shopInfoDO.getDistrictCode());
|
||||
addSignFranchiseResponse.setManagerRegionId(shopInfoDO.getManagerRegionId());
|
||||
addSignFranchiseResponse.setShopDecorationAttributes(shopInfoDO.getShopDecorationAttributes());
|
||||
if (Objects.nonNull(managerRegion)){
|
||||
addSignFranchiseResponse.setManagerRegionName(managerRegion.getName());
|
||||
}
|
||||
@@ -550,7 +579,7 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
}
|
||||
addSignFranchiseResponse.setPayName(new ArrayList<>(payNameSet));
|
||||
addSignFranchiseResponse.setPartnerPayData(partnerPayData);
|
||||
Date earliestPayTime = payTimeList.stream()
|
||||
Date earliestPayTime = payTimeList.stream().filter(Objects::nonNull)
|
||||
.min(Comparator.naturalOrder())
|
||||
.orElse(null);
|
||||
addSignFranchiseResponse.setPayDate(earliestPayTime);
|
||||
|
||||
@@ -123,9 +123,9 @@ public class OpenApiValidateFilter implements Filter {
|
||||
|
||||
// 2. 使用 Jackson 解析 JSON 并转为 TreeMap(自动按键排序)
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
SortedMap<String, String> params = objectMapper.readValue(
|
||||
SortedMap<String, Object> params = objectMapper.readValue(
|
||||
jsonBody,
|
||||
new TypeReference<TreeMap<String, String>>() {}
|
||||
new TypeReference<TreeMap<String, Object>>() {}
|
||||
);
|
||||
params.put("appKey",appKey);
|
||||
params.put("timestamp", timestampStr);
|
||||
|
||||
@@ -184,4 +184,11 @@ public class DataHandlerController {
|
||||
dataHandlerServer.dataHandlerCreateStore();
|
||||
return ResponseResult.success(true);
|
||||
}
|
||||
|
||||
@ApiOperation("红圈通数据处理")
|
||||
@GetMapping("/dataHandlerPushHqt")
|
||||
public ResponseResult<Boolean> dataHandlerPushHqt(){
|
||||
dataHandlerServer.dataHandlerPushHqt();
|
||||
return ResponseResult.success(true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,14 +5,12 @@ import com.cool.store.dto.*;
|
||||
import com.cool.store.dto.store.StoreUserPositionDTO;
|
||||
import com.cool.store.request.OpenApiStoreRequest;
|
||||
import com.cool.store.request.StoreCodeDTO;
|
||||
import com.cool.store.request.*;
|
||||
import com.cool.store.request.xgj.FranchiseFeeCallBackRequest;
|
||||
import com.cool.store.request.xgj.ReceiptCallBackRequest;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.response.bigdata.ApiResponse;
|
||||
import com.cool.store.service.OpenApiService;
|
||||
import com.cool.store.service.PushService;
|
||||
import com.cool.store.service.ShopAccountService;
|
||||
import com.cool.store.service.StoreService;
|
||||
import com.cool.store.service.*;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -34,6 +32,10 @@ import java.util.List;
|
||||
@Slf4j
|
||||
public class OpenApiController {
|
||||
|
||||
@Resource
|
||||
private DecorationDesignInfoService decorationDesignInfoService;
|
||||
@Resource
|
||||
private DecorationMeasureService decorationMeasureService;
|
||||
@Resource
|
||||
OpenApiService openApiService;
|
||||
@Resource
|
||||
@@ -79,5 +81,74 @@ public class OpenApiController {
|
||||
public ApiResponse<List<StoreUserPositionDTO>> getStoreUser(@RequestBody @Validated StoreCodeDTO dto) {
|
||||
return ApiResponse.success(storeService.getStoreUser(dto.getStoreCodeList()));
|
||||
}
|
||||
@ApiOperation("分配测量员,设计组")
|
||||
@PostMapping("/assignSurveyors")
|
||||
public ApiResponse<Boolean> assignSurveyors(@RequestBody @Validated AssignSurveyorsRequest request) {
|
||||
log.info("assignSurveyors request:{}", JSONObject.toJSONString(request));
|
||||
return ApiResponse.success(decorationMeasureService.assignSurveyors(request));
|
||||
}
|
||||
|
||||
@ApiOperation("门店测量、上传测量图")
|
||||
@PostMapping("/submitMeasurementDiagram")
|
||||
public ApiResponse<Boolean> submitMeasurementDiagram(@RequestBody @Validated SubmitMeasurementRequest request) {
|
||||
log.info("submitMeasurementDiagram request:{}", JSONObject.toJSONString(request));
|
||||
return ApiResponse.success(decorationMeasureService.submitMeasurementDiagram(request));
|
||||
}
|
||||
|
||||
@ApiOperation(" 分配设计师")
|
||||
@PostMapping("/assignDesigner")
|
||||
public ApiResponse<Boolean> assignDesigner(@RequestBody @Validated AssignDesignerRequest request) {
|
||||
log.info("assignDesigner request:{}", JSONObject.toJSONString(request));
|
||||
return ApiResponse.success(decorationDesignInfoService.assignDesigner(request));
|
||||
}
|
||||
|
||||
@ApiOperation("上传设计图")
|
||||
@PostMapping("/submitDesignDrawing")
|
||||
public ApiResponse<Boolean> submitDesignDrawing(@RequestBody @Validated SubmitDesignDrawingRequest request) {
|
||||
log.info("submitDesignDrawing request:{}", JSONObject.toJSONString(request));
|
||||
return ApiResponse.success(decorationDesignInfoService.submitDesignDrawing(request));
|
||||
}
|
||||
|
||||
@ApiOperation("分配报价员")
|
||||
@PostMapping("/assignQuotationStaff")
|
||||
public ApiResponse<Boolean> assignQuotation(@RequestBody @Validated AssignQuotationRequest request) {
|
||||
log.info("assignQuotation request:{}", JSONObject.toJSONString(request));
|
||||
return ApiResponse.success(decorationDesignInfoService.assignQuotation(request));
|
||||
}
|
||||
|
||||
@ApiOperation("上传报价单")
|
||||
@PostMapping("/submitQuotationSheet")
|
||||
public ApiResponse<Boolean> submitQuotationSheet(@RequestBody @Validated SubmitQuotationSheetRequest request) {
|
||||
log.info("submitQuotationSheet request:{}", JSONObject.toJSONString(request));
|
||||
return ApiResponse.success(decorationDesignInfoService.submitQuotationSheet(request));
|
||||
}
|
||||
|
||||
@ApiOperation("施工派单")
|
||||
@PostMapping("/submitConstructionOrder")
|
||||
public ApiResponse<Boolean> submitConstructionOrder(@RequestBody @Validated ConstructionOrderRequest request) {
|
||||
log.info("submitConstructionOrder request:{}", JSONObject.toJSONString(request));
|
||||
return ApiResponse.success(decorationDesignInfoService.submitConstructionOrder(request));
|
||||
}
|
||||
|
||||
@ApiOperation("实际进场确认")
|
||||
@PostMapping("/entryConfirmation")
|
||||
public ApiResponse<Boolean> entryConfirmation(@RequestBody @Validated EntryConfirmationRequest request) {
|
||||
log.info("entryConfirmation request:{}", JSONObject.toJSONString(request));
|
||||
return ApiResponse.success(decorationDesignInfoService.entryConfirmation(request));
|
||||
}
|
||||
|
||||
@ApiOperation("施工完成")
|
||||
@PostMapping("/constructionCompleted")
|
||||
public ApiResponse<Boolean> constructionCompleted(@RequestBody @Validated ConstructionCompletedRequest request) {
|
||||
log.info("constructionCompleted request:{}", JSONObject.toJSONString(request));
|
||||
return ApiResponse.success(decorationDesignInfoService.constructionCompleted(request));
|
||||
}
|
||||
|
||||
@ApiOperation("装修验收")
|
||||
@PostMapping("/hqtDecorationAcceptance")
|
||||
public ApiResponse<Boolean> decorationAcceptance(@RequestBody @Validated HqtDecorationAcceptanceRequest request) {
|
||||
log.info("decorationAcceptance request:{}", JSONObject.toJSONString(request));
|
||||
return ApiResponse.success(decorationDesignInfoService.decorationAcceptance(request));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5,6 +5,8 @@ import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.dto.decoration.ConstructionScheduleDTO;
|
||||
import com.cool.store.entity.ShopAuditInfoDO;
|
||||
import com.cool.store.request.*;
|
||||
import com.cool.store.response.DecorationDesignResponse;
|
||||
import com.cool.store.response.MeasureResponse;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.response.ThreeSignResponse;
|
||||
import com.cool.store.service.DecorationMeasureService;
|
||||
@@ -27,7 +29,7 @@ import java.util.List;
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/04/28/下午4:19
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
* @注释: 废弃
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/pc/decoration")
|
||||
@@ -147,7 +149,7 @@ public class PCDecorationController {
|
||||
|
||||
@ApiOperation("查询设计方案")
|
||||
@GetMapping("/getDecorationDesign")
|
||||
public ResponseResult<DecorationDesignVO> getDecorationDesign(@RequestParam Long shopId) {
|
||||
public ResponseResult<DecorationDesignResponse> getDecorationDesign(@RequestParam Long shopId) {
|
||||
return ResponseResult.success(decorationService.getDecorationDesign(shopId));
|
||||
}
|
||||
|
||||
@@ -171,8 +173,8 @@ public class PCDecorationController {
|
||||
|
||||
@ApiOperation("查询测量方案")
|
||||
@GetMapping("/getDecorationMeasure/{shopId}")
|
||||
public ResponseResult<DecorationMeasureVO> getDecorationMeasure(@PathVariable Long shopId) {
|
||||
return ResponseResult.success(decorationMeasureService.getDecorationMeasureByShopId(shopId));
|
||||
public ResponseResult<MeasureResponse> getDecorationMeasure(@PathVariable Long shopId) {
|
||||
return ResponseResult.success(decorationMeasureService.getMeasureData(shopId));
|
||||
}
|
||||
|
||||
@ApiOperation("保存测量方案")
|
||||
|
||||
@@ -171,4 +171,10 @@ public class PCShopController {
|
||||
public ResponseResult<ShopStageInfoVO> getShopStageStatus(@RequestParam("shopId")Long shopId, @RequestParam("subStage")Integer subStage) {
|
||||
return ResponseResult.success(shopService.getShopStageStatus(shopId, subStage));
|
||||
}
|
||||
|
||||
@ApiOperation("是否展示装修阶段按钮")
|
||||
@GetMapping("/isShowButton")
|
||||
public ResponseResult<Boolean> isShowButton(@RequestParam("shopId")Long shopId) {
|
||||
return ResponseResult.success(shopService.isShowButton(shopId));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
package com.cool.store.controller.webb;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.constants.RedisConstant;
|
||||
import com.cool.store.dao.*;
|
||||
import com.cool.store.dto.FoodTokenDTO;
|
||||
import com.cool.store.dto.GetAccessTokenDTO;
|
||||
import com.cool.store.dto.HqtTokenDTO;
|
||||
import com.cool.store.dto.ModifyPasswordDTO;
|
||||
import com.cool.store.entity.*;
|
||||
import com.cool.store.enums.DownSystemTypeEnum;
|
||||
@@ -15,13 +18,14 @@ import com.cool.store.mapper.FranchiseFeeMapper;
|
||||
import com.cool.store.mapper.LineInfoMapper;
|
||||
import com.cool.store.mapper.ShopInfoMapper;
|
||||
import com.cool.store.mq.util.HttpRestTemplateService;
|
||||
import com.cool.store.request.GetPasswordDTO;
|
||||
import com.cool.store.request.*;
|
||||
import com.cool.store.request.bigdata.ProfitDataRequest;
|
||||
import com.cool.store.request.huoma.ShopBasicInfoRequest;
|
||||
import com.cool.store.request.oppty.*;
|
||||
import com.cool.store.request.xgj.PushFranchiseFeeRequest;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.response.bigdata.ActDataResponse;
|
||||
import com.cool.store.response.bigdata.ApiResponse;
|
||||
import com.cool.store.response.bigdata.ProfitDataResponse;
|
||||
import com.cool.store.response.bigdata.ProfitRateResponse;
|
||||
import com.cool.store.response.huoma.ShopBaseInfoResponse;
|
||||
@@ -30,10 +34,12 @@ import com.cool.store.response.oppty.OpportunityDetailResponse;
|
||||
import com.cool.store.response.oppty.OpportunityInfoPageResponse;
|
||||
import com.cool.store.service.*;
|
||||
import com.cool.store.service.impl.CommonService;
|
||||
import com.cool.store.service.impl.OrderSysInfoServiceImpl;
|
||||
import com.cool.store.service.impl.UserAuthMappingServiceImpl;
|
||||
import com.cool.store.utils.CoolDateUtils;
|
||||
import com.cool.store.utils.RedisConstantUtil;
|
||||
import com.cool.store.utils.RedisUtilPool;
|
||||
import com.cool.store.utils.poi.StringUtils;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -50,6 +56,18 @@ import java.util.stream.Collectors;
|
||||
@RequestMapping("/pc/test")
|
||||
public class PCTestController {
|
||||
|
||||
@Resource
|
||||
private EnterpriseUserDAO enterpriseUserDAO;
|
||||
@Resource
|
||||
private BigRegionDAO bigRegionDAO;
|
||||
@Resource
|
||||
private ShopInfoDAO shopInfoDAO;
|
||||
@Resource
|
||||
private HqtAPIService hqtAPIService;
|
||||
@Resource
|
||||
private DecorationDesignInfoService decorationDesignInfoService;
|
||||
@Resource
|
||||
private DecorationMeasureService decorationMeasureService;
|
||||
@Resource
|
||||
private SyncMainSysServer syncMainSysServer;
|
||||
@Resource
|
||||
@@ -419,4 +437,122 @@ public class PCTestController {
|
||||
return ResponseResult.success(Boolean.TRUE);
|
||||
}
|
||||
|
||||
@GetMapping("/getHqtToken")
|
||||
public ResponseResult<HqtTokenDTO> getHqtToken() {
|
||||
return ResponseResult.success(pushService.getHqtToken());
|
||||
}
|
||||
|
||||
@ApiOperation("分配测量员,设计组")
|
||||
@PostMapping("/assignSurveyors")
|
||||
public ApiResponse<Boolean> assignSurveyors(@RequestBody @Validated AssignSurveyorsRequest request) {
|
||||
log.info("assignSurveyors request:{}", JSONObject.toJSONString(request));
|
||||
return ApiResponse.success(decorationMeasureService.assignSurveyors(request));
|
||||
}
|
||||
|
||||
@ApiOperation("门店测量、上传测量图")
|
||||
@PostMapping("/submitMeasurementDiagram")
|
||||
public ApiResponse<Boolean> submitMeasurementDiagram(@RequestBody @Validated SubmitMeasurementRequest request) {
|
||||
log.info("submitMeasurementDiagram request:{}", JSONObject.toJSONString(request));
|
||||
return ApiResponse.success(decorationMeasureService.submitMeasurementDiagram(request));
|
||||
}
|
||||
|
||||
@ApiOperation(" 分配设计师")
|
||||
@PostMapping("/assignDesigner")
|
||||
public ApiResponse<Boolean> assignDesigner(@RequestBody @Validated AssignDesignerRequest request) {
|
||||
log.info("assignDesigner request:{}", JSONObject.toJSONString(request));
|
||||
return ApiResponse.success(decorationDesignInfoService.assignDesigner(request));
|
||||
}
|
||||
|
||||
@ApiOperation("上传设计图")
|
||||
@PostMapping("/submitDesignDrawing")
|
||||
public ApiResponse<Boolean> submitDesignDrawing(@RequestBody @Validated SubmitDesignDrawingRequest request) {
|
||||
log.info("submitDesignDrawing request:{}", JSONObject.toJSONString(request));
|
||||
return ApiResponse.success(decorationDesignInfoService.submitDesignDrawing(request));
|
||||
}
|
||||
|
||||
@ApiOperation("分配报价员")
|
||||
@PostMapping("/assignQuotation")
|
||||
public ApiResponse<Boolean> assignQuotation(@RequestBody @Validated AssignQuotationRequest request) {
|
||||
log.info("assignQuotation request:{}", JSONObject.toJSONString(request));
|
||||
return ApiResponse.success(decorationDesignInfoService.assignQuotation(request));
|
||||
}
|
||||
|
||||
@ApiOperation("上传报价单")
|
||||
@PostMapping("/submitQuotationSheet")
|
||||
public ApiResponse<Boolean> submitQuotationSheet(@RequestBody @Validated SubmitQuotationSheetRequest request) {
|
||||
log.info("submitQuotationSheet request:{}", JSONObject.toJSONString(request));
|
||||
return ApiResponse.success(decorationDesignInfoService.submitQuotationSheet(request));
|
||||
}
|
||||
|
||||
@ApiOperation("施工派单")
|
||||
@PostMapping("/submitConstructionOrder")
|
||||
public ApiResponse<Boolean> submitConstructionOrder(@RequestBody @Validated ConstructionOrderRequest request) {
|
||||
log.info("submitConstructionOrder request:{}", JSONObject.toJSONString(request));
|
||||
return ApiResponse.success(decorationDesignInfoService.submitConstructionOrder(request));
|
||||
}
|
||||
|
||||
@ApiOperation("实际进场确认")
|
||||
@PostMapping("/entryConfirmation")
|
||||
public ApiResponse<Boolean> entryConfirmation(@RequestBody @Validated EntryConfirmationRequest request) {
|
||||
log.info("entryConfirmation request:{}", JSONObject.toJSONString(request));
|
||||
return ApiResponse.success(decorationDesignInfoService.entryConfirmation(request));
|
||||
}
|
||||
|
||||
@ApiOperation("施工完成")
|
||||
@PostMapping("/constructionCompleted")
|
||||
public ApiResponse<Boolean> constructionCompleted(@RequestBody @Validated ConstructionCompletedRequest request) {
|
||||
log.info("constructionCompleted request:{}", JSONObject.toJSONString(request));
|
||||
return ApiResponse.success(decorationDesignInfoService.constructionCompleted(request));
|
||||
}
|
||||
|
||||
@ApiOperation("装修验收")
|
||||
@PostMapping("/decorationAcceptance")
|
||||
public ApiResponse<Boolean> decorationAcceptance(@RequestBody @Validated HqtDecorationAcceptanceRequest request) {
|
||||
log.info("decorationAcceptance request:{}", JSONObject.toJSONString(request));
|
||||
return ApiResponse.success(decorationDesignInfoService.decorationAcceptance(request));
|
||||
}
|
||||
|
||||
@ApiOperation("测试红圈通建店")
|
||||
@GetMapping("/testHqtBuild")
|
||||
public ApiResponse<Boolean> testHqtBuild(@RequestParam("shopId")Long shopId) {
|
||||
HqtBuildRequest hqtBuildRequest = getHqtBuildRequest(shopId);
|
||||
hqtAPIService.pushHqtBuild(hqtBuildRequest);
|
||||
return ApiResponse.success(true);
|
||||
}
|
||||
|
||||
@ApiOperation("测试红圈推送片区")
|
||||
@GetMapping("/testHqtRegion")
|
||||
public ApiResponse<Boolean> testHqtRegion() {
|
||||
hqtAPIService.pushHqtRegion(null);
|
||||
return ApiResponse.success(true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public HqtBuildRequest getHqtBuildRequest(Long shopId) {
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
||||
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfo.getLineId());
|
||||
EnterpriseUserDO userInfoById = enterpriseUserDAO.getUserInfoById(shopInfo.getInvestmentManager());
|
||||
BigRegionDO bigRegionDO = bigRegionDAO.getByRegionId(shopInfo.getRegionId());
|
||||
HqtBuildRequest request = new HqtBuildRequest();
|
||||
request.setShopCode(shopInfo.getShopCode());
|
||||
request.setShopName(shopInfo.getShopName());
|
||||
request.setShopDecorationAttributes(shopInfo.getShopDecorationAttributes());
|
||||
request.setHqtRegionCode(bigRegionDO.getHqtRegionCode());
|
||||
request.setHqtRegionName(bigRegionDO.getHqtRegionName());
|
||||
request.setSupervisorName(userInfoById.getName());
|
||||
request.setSupervisorMobile(userInfoById.getMobile());
|
||||
request.setPartnershipSignatoryFirst(lineInfoDO.getUsername());
|
||||
request.setPartnershipSignatoryFirstMobile(lineInfoDO.getMobile());
|
||||
request.setShopAddress(shopInfo.getDetailAddress());
|
||||
request.setIsPayDesignFee(CommonConstants.ONE);
|
||||
if (StringUtils.isNotBlank(shopInfo.getFranchiseBrand())) {
|
||||
request.setFranchiseBrand(Integer.valueOf(shopInfo.getFranchiseBrand()));
|
||||
}
|
||||
return request;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -10,6 +10,8 @@ import com.cool.store.request.DecorationDesignRequest;
|
||||
import com.cool.store.request.LinePaySubmitRequest;
|
||||
import com.cool.store.request.ThreeAcceptanceCheckRequest;
|
||||
import com.cool.store.request.ThreeAcceptanceRequest;
|
||||
import com.cool.store.response.DecorationDesignResponse;
|
||||
import com.cool.store.response.MeasureResponse;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
|
||||
import com.cool.store.response.ThreeSignResponse;
|
||||
@@ -118,7 +120,7 @@ public class MiniDecorationController {
|
||||
|
||||
@ApiOperation("查询设计方案")
|
||||
@GetMapping("/getDecorationDesign")
|
||||
public ResponseResult<DecorationDesignVO> getDecorationDesign(@RequestParam Long shopId){
|
||||
public ResponseResult<DecorationDesignResponse> getDecorationDesign(@RequestParam Long shopId){
|
||||
return ResponseResult.success(decorationService.getDecorationDesign(shopId));
|
||||
}
|
||||
|
||||
@@ -136,7 +138,7 @@ public class MiniDecorationController {
|
||||
|
||||
@ApiOperation("查询测量方案")
|
||||
@GetMapping("/getDecorationMeasure")
|
||||
public ResponseResult<DecorationMeasureVO> getDecorationMeasure(@RequestParam Long shopId){
|
||||
return ResponseResult.success(decorationMeasureService.getDecorationMeasureByShopId(shopId));
|
||||
public ResponseResult<MeasureResponse> getDecorationMeasure(@RequestParam Long shopId) {
|
||||
return ResponseResult.success(decorationMeasureService.getMeasureData(shopId));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,4 +79,13 @@ aliyun.sms.accessKeySecret=WIMjO4BjVg3YAHwmplq86yOyS2HMpa
|
||||
aliyun.sms.signName=酷店掌
|
||||
|
||||
mybatis.configuration.variables.enterpriseId=e17cd2dc350541df8a8b0af9bd27f77d
|
||||
enterprise.dingCorpId=dingef2502a50df74ccc35c2f4657eb6378f
|
||||
enterprise.dingCorpId=dingef2502a50df74ccc35c2f4657eb6378f
|
||||
|
||||
|
||||
|
||||
hqt.token.url=https://tc.cloud.hecom.cn
|
||||
hqt.token.username=18161486722
|
||||
hqt.token.grant_type=client_credentials
|
||||
hqt.token.client.id=WrPffdGpcWkcPsbN
|
||||
hqt.token.client.secret=rYe9Cwug5LwQNIBJAiW0a7weF9CAhYCD
|
||||
|
||||
|
||||
@@ -128,4 +128,10 @@ cool.api.secret=wP4sN6dL8zK2xM9c
|
||||
|
||||
special.user.id=wpayJeDAAAklx_q1jGhyGUd4yEh8vV_g_woayJeDAAAtwLSAPVMWbpGi9q4caSujg
|
||||
|
||||
ask.bot.url=https://auth.wx.askbot.cn
|
||||
ask.bot.url=https://auth.wx.askbot.cn
|
||||
|
||||
hqt.token.url=https://tc.cloud.hecom.cn
|
||||
hqt.token.username=18161486722
|
||||
hqt.token.grant_type=client_credentials
|
||||
hqt.token.client.id=WrPffdGpcWkcPsbN
|
||||
hqt.token.client.secret=rYe9Cwug5LwQNIBJAiW0a7weF9CAhYCD
|
||||
@@ -134,3 +134,10 @@ special.user.id=wpayJeDAAAhGIFgUJpJN-zg39JuNbYhg_woayJeDAAA0TC8mkCJeXouw94hYA-D3
|
||||
|
||||
ask.bot.url=https://test.auth.wx.askbot.cn
|
||||
|
||||
|
||||
hqt.token.url=https://tc.cloud.hecom.cn
|
||||
hqt.token.username=18161486722
|
||||
hqt.token.grant_type=client_credentials
|
||||
hqt.token.client.id=WrPffdGpcWkcPsbN
|
||||
hqt.token.client.secret=rYe9Cwug5LwQNIBJAiW0a7weF9CAhYCD
|
||||
|
||||
|
||||
Reference in New Issue
Block a user