开业筹备阶段1.0

This commit is contained in:
shuo.wang
2024-04-25 20:03:27 +08:00
parent 54f4dc7f77
commit 1e170ebe7c
37 changed files with 657 additions and 320 deletions

View File

@@ -154,10 +154,5 @@ public class CommonConstants {
// public static final String DEAULT_SELECT_SITE_MANAGER = "09080211"; // public static final String DEAULT_SELECT_SITE_MANAGER = "09080211";
public static final String DEAULT_SELECT_SITE_MANAGER = "020125244825417786"; public static final String DEAULT_SELECT_SITE_MANAGER = "020125244825417786";
//开业运营方案审核0通过
public static final Byte opening_Operation_Plan_PASS = Byte.valueOf((byte)0);
//开业运营方案审核1拒绝
public static final Byte opening_Operation_Plan_REJECT = Byte.valueOf((byte)1);
public static final int MAX_LENGTH_ONE_HUNDRED = 100; public static final int MAX_LENGTH_ONE_HUNDRED = 100;
} }

View File

@@ -178,6 +178,7 @@ public enum ErrorCodeEnum {
SHOP_ID_NOT_EXIST(103010,"shopId不存在",null), SHOP_ID_NOT_EXIST(103010,"shopId不存在",null),
FIRST_ORDER_PARAM_NULL(103020,"首批订货金参数为空",null), FIRST_ORDER_PARAM_NULL(103020,"首批订货金参数为空",null),
XFSG_SERVICE_ERROR(103099,"鲜丰服务调用失败",null), XFSG_SERVICE_ERROR(103099,"鲜丰服务调用失败",null),
GET_FIRST_ORDER(103021,"获取鲜丰首批订货金失败",null)
; ;

View File

@@ -32,8 +32,8 @@ public class OpeningOperationPlanAuditDAO {
return shopAuditInfoMapper.updateByPrimaryKeySelective(shopAuditInfoDO); return shopAuditInfoMapper.updateByPrimaryKeySelective(shopAuditInfoDO);
} }
public Byte selectByShopId(Long shopId) { public Long selectIdByShopId(Long shopId) {
return shopAuditInfoMapper.selectAuditResultByShopId(shopId); return shopAuditInfoMapper.selectAuditIdByShopId(shopId);
} }
} }

View File

@@ -28,9 +28,6 @@ public class OpeningOperationPlanDAO {
return openingOperationPlanDO.getId(); return openingOperationPlanDO.getId();
} }
public OpeningOperationPlanDO selectById(Long Id){
return openingOperationPlanMapper.selectByPrimaryKey(Id);
}
public Long updateSelective( OpeningOperationPlanDO openingOperationPlanDO){ public Long updateSelective( OpeningOperationPlanDO openingOperationPlanDO){
openingOperationPlanMapper.updateByPrimaryKeySelective(openingOperationPlanDO); openingOperationPlanMapper.updateByPrimaryKeySelective(openingOperationPlanDO);
@@ -41,8 +38,8 @@ public class OpeningOperationPlanDAO {
return openingOperationPlanMapper.selectByShopId(shopId); return openingOperationPlanMapper.selectByShopId(shopId);
} }
//条件关联查询 //条件关联查询
public List<OpeningOperationPlanDTO> selectConditionPlanList(List<Long> shopIdList, OpeningOperationPlanDTO openingOperationPlanDTO){ public List<OpeningOperationPlanDTO> selectConditionPlanList( OpeningOperationPlanDTO openingOperationPlanDTO){
return openingOperationPlanMapper.selectPlanListByShopId(shopIdList, openingOperationPlanDTO); return openingOperationPlanMapper.selectPlanListByShopId( openingOperationPlanDTO);
} }
} }

View File

@@ -13,6 +13,7 @@ import com.github.pagehelper.PageHelper;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import javax.annotation.Resource; import javax.annotation.Resource;
@@ -139,9 +140,9 @@ public class ShopInfoDAO {
* @Date: 2024/4/24 * @Date: 2024/4/24
* @description: 开业运营方案根据shopname获取列表 * @description: 开业运营方案根据shopname获取列表
*/ */
public Page<OpenPlanShopInfoDTO> getOpenPlanShopListByShopName(String shopName, String bigName, String fightName, Integer pageNum, Integer pageSize){ public Page<OpenPlanShopInfoDTO> getOpenPlanShopListByShopName( List<Long> shopIdlist,String shopName, String bigName, String fightName, Integer pageNum, Integer pageSize){
PageHelper.startPage(pageNum, pageSize); PageHelper.startPage(pageNum, pageSize);
return shopInfoMapper.getOpenPlanShopListByShopName(shopName,bigName,fightName); return shopInfoMapper.getOpenPlanShopListByShopName(shopIdlist,shopName,bigName,fightName);
} }
public Map<Long, Integer> getSelectedShopNumMap(List<Long> lineIds) { public Map<Long, Integer> getSelectedShopNumMap(List<Long> lineIds) {
@@ -151,4 +152,20 @@ public class ShopInfoDAO {
List<LineCountDTO> selectedShopNum = shopInfoMapper.getSelectedShopNum(lineIds); List<LineCountDTO> selectedShopNum = shopInfoMapper.getSelectedShopNum(lineIds);
return selectedShopNum.stream().collect(Collectors.toMap(k->k.getLineId(), v->v.getSelectedShopNum())); return selectedShopNum.stream().collect(Collectors.toMap(k->k.getLineId(), v->v.getSelectedShopNum()));
} }
/**
* @Auther: wangshuo
* @Date: 2024/4/25
* @description:获取筹建阶段shopid
*/
public List<Long> queryShopIdListByStage(){
return shopInfoMapper.queryShopIdListByStage();
};
/**
* @Auther: wangshuo
* @Date: 2024/4/25
* @description: 根据idlist 获取shopcode
*/
public List<OpenPlanShopInfoDTO> queryShopCodeListByid(@Param("shopIdList") List<Long> shopIdList){
return shopInfoMapper.queryShopCodeListByid(shopIdList);
};
} }

View File

@@ -146,5 +146,7 @@ public class ShopStageInfoDAO {
ShopSubStageStatusEnum shopSubStageStatus = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_21; ShopSubStageStatusEnum shopSubStageStatus = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_21;
return shopStageInfoMapper.getRentContractToDoPage(userId, shopSubStageStatus.getShopSubStageEnum().getShopSubStage(), shopSubStageStatus.getShopSubStageStatus()); return shopStageInfoMapper.getRentContractToDoPage(userId, shopSubStageStatus.getShopSubStageEnum().getShopSubStage(), shopSubStageStatus.getShopSubStageStatus());
} }
public List<Long> getShopIdListByStageStatus(List<Long> shopIdList){
return shopStageInfoMapper.getShopIdListByStageStatus(shopIdList);
}
} }

View File

@@ -11,7 +11,6 @@ public interface OpeningOperationPlanMapper extends Mapper<OpeningOperationPlanD
OpeningOperationPlanDO selectByShopId(@Param("shopId") Long shopId); OpeningOperationPlanDO selectByShopId(@Param("shopId") Long shopId);
List<OpeningOperationPlanDTO> selectPlanListByShopId(@Param("shopId") List<Long> shopId, List<OpeningOperationPlanDTO> selectPlanListByShopId(@Param("openingOperationPlanDTO") OpeningOperationPlanDTO openingOperationPlanDTO );
@Param("openingOperationPlanDTO") OpeningOperationPlanDTO openingOperationPlanDTO );
} }

View File

@@ -20,5 +20,5 @@ public interface ShopAuditInfoMapper extends Mapper<ShopAuditInfoDO> {
* @Date: 2024/4/23 * @Date: 2024/4/23
* @description:根据店铺id查询审批结果 * @description:根据店铺id查询审批结果
*/ */
Byte selectAuditResultByShopId(@Param("shopId") Long shopId); Long selectAuditIdByShopId(@Param("shopId") Long shopId);
} }

View File

@@ -68,8 +68,20 @@ public interface ShopInfoMapper extends Mapper<ShopInfoDO> {
* @Date: 2024/4/24 * @Date: 2024/4/24
* @description: 开业运营方案根据shopname获取列表 * @description: 开业运营方案根据shopname获取列表
*/ */
Page<OpenPlanShopInfoDTO> getOpenPlanShopListByShopName(@Param("shopName") String shopName, Page<OpenPlanShopInfoDTO> getOpenPlanShopListByShopName(@Param("shopIdlist")List<Long> shopIdlist, @Param("shopName") String shopName,
@Param("bigName") String bigName, @Param("fightName") String fightName); @Param("bigName") String bigName, @Param("fightName") String fightName);
/**
* @Auther: wangshuo
* @Date: 2024/4/25
* @description:获取筹建阶段shopid
*/
List<Long> queryShopIdListByStage();
/**
* @Auther: wangshuo
* @Date: 2024/4/25
* @description: 根据idlist 获取shopcode
*/
List<OpenPlanShopInfoDTO> queryShopCodeListByid(@Param("shopIdList") List<Long> shopIdList);
List<LineCountDTO> getSelectedShopNum(@Param("lineIds") List<Long> lineIds); List<LineCountDTO> getSelectedShopNum(@Param("lineIds") List<Long> lineIds);
} }

View File

@@ -86,4 +86,10 @@ public interface ShopStageInfoMapper extends Mapper<ShopStageInfoDO> {
* @return * @return
*/ */
Page<RentInfoToDoVO> getRentContractToDoPage(@Param("userId") String userId, @Param("shopSubStage")Integer shopSubStage, @Param("shopSubStageStatus") Integer shopSubStageStatus); Page<RentInfoToDoVO> getRentContractToDoPage(@Param("userId") String userId, @Param("shopSubStage")Integer shopSubStage, @Param("shopSubStageStatus") Integer shopSubStageStatus);
} /**
* @Auther: wangshuo
* @Date: 2024/4/25
* @description:获取处于订货金阶段的shopid
*/
List<Long> getShopIdListByStageStatus(@Param("shopIdList")List<Long> shopIdList);
}

View File

@@ -43,17 +43,15 @@
FROM xfsg_opening_operation_plan op FROM xfsg_opening_operation_plan op
JOIN xfsg_shop_info si ON op.shop_id = si.id JOIN xfsg_shop_info si ON op.shop_id = si.id
where where
<if test="shopId != null and shopId.size >0 ">
<foreach item="shopId" index="index" collection="shopIdList" open="(" separator="," close=")">
#{shopId}
</foreach>
</if>
<if test="openingOperationPlanDTO.planStartDate != null"> <if test="openingOperationPlanDTO.planStartDate != null">
AND DATE(op.create_time) >= #{openingOperationPlanDTO.planStartDate} op.create_time >= #{openingOperationPlanDTO.planStartDate}
</if> </if>
<if test="openingOperationPlanDTO.planEndDate != null"> <if test="openingOperationPlanDTO.planEndDate != null">
<![CDATA[AND DATE(op.create_time) <= #{openingOperationPlanDTO.planEndDate}]]> <![CDATA[AND op.create_time <= #{openingOperationPlanDTO.planEndDate}]]>
</if> </if>
<if test="openingOperationPlanDTO.resultType != null">
and op.result_type = #{openingOperationPlanDTO.resultType}
</if>
</select> </select>

View File

@@ -39,9 +39,9 @@
id,shop_id,audit_type,submitted_user_id,submitted_user_name,result_type,pass_reason,reject_reason, id,shop_id,audit_type,submitted_user_id,submitted_user_name,result_type,pass_reason,reject_reason,
certify_file,create_time,update_time,deleted certify_file,create_time,update_time,deleted
</sql> </sql>
<select id="selectAuditResultByShopId" resultType="java.lang.Byte"> <select id="selectAuditIdByShopId" resultType="java.lang.Long">
select select
result_type id
from from
xfsg_shop_audit_info xfsg_shop_audit_info
where where

View File

@@ -81,6 +81,12 @@
join xfsg_line_info li on si.line_id = li.id join xfsg_line_info li on si.line_id = li.id
join xfsg_system_building_shop xsbs on si.id = xsbs.big_name join xfsg_system_building_shop xsbs on si.id = xsbs.big_name
where 1=1 where 1=1
<if test="shopIdlist != null and shopIdlist.size>0">
and si.id in
<foreach collection="shopIdlist" item="shopId" separator="," open="(" close=")">
#{shopId}
</foreach>
</if>
<if test="shopName != null and shopName != ''"> <if test="shopName != null and shopName != ''">
AND si.shop_name = #{shopName} AND si.shop_name = #{shopName}
</if> </if>
@@ -92,6 +98,23 @@
</if> </if>
</select> </select>
<select id="queryShopIdListByStage" resultType="java.lang.Long">
select id
from xfsg_shop_info
where shop_stage = 2
and deleted = 0
</select>
<select id="queryShopCodeListByid" resultType="com.cool.store.dto.openPreparation.OpenPlanShopInfoDTO">
select id as shopId,shop_code as shopCode
from xfsg_shop_info
where 1=1
<if test="shopIdList != null and shopIdList.size >0">
and id in
<foreach collection="shopIdList" separator="," open="" close="" item="shopId">
#{shopId}
</foreach>
</if>
</select>
<select id="getSelectedShopNum" resultType="com.cool.store.dto.point.LineCountDTO"> <select id="getSelectedShopNum" resultType="com.cool.store.dto.point.LineCountDTO">
select select

View File

@@ -133,5 +133,16 @@
where where
a.shop_sub_stage = #{shopSubStage} and a.shop_sub_stage_status = #{shopSubStageStatus} and a.deleted = 0 and b.deleted = 0 and b.investment_manager = #{userId} a.shop_sub_stage = #{shopSubStage} and a.shop_sub_stage_status = #{shopSubStageStatus} and a.deleted = 0 and b.deleted = 0 and b.investment_manager = #{userId}
</select> </select>
<select id="getShopIdListByStageStatus" resultType="java.lang.Long">
select shop_id
from xfsg_shop_stage_info
where shop_stage = 2 and shop_sub_stage = 150 and shop_sub_stage_status= 1505 and is_terminated = 0
<if test="shopIdList != null and shopIdList.size>0">
and shop_id in
<foreach collection="shopIdList" item="shopId" separator="," open="(" close=")">
#{shopId}
</foreach>
</if>
</select>
</mapper> </mapper>

View File

@@ -34,4 +34,7 @@ public class FirstOrderDTO {
@ApiModelProperty("更新人") @ApiModelProperty("更新人")
private String updateUserId; private String updateUserId;
@ApiModelProperty("结果")
private Integer resultType;
} }

View File

@@ -31,13 +31,13 @@ public class OpeningOperationPlanDTO {
private Date submissionTime; private Date submissionTime;
@ApiModelProperty("审核结果,0待审核1通过2拒绝") @ApiModelProperty("审核结果,0待审核1通过2拒绝")
private String resultType; private Integer resultType;
@ApiModelProperty("起始日期") @ApiModelProperty("起始日期")
public LocalDate planStartDate; public Date planStartDate;
@ApiModelProperty("结束日期") @ApiModelProperty("结束日期")
public LocalDate planEndDate; public Date planEndDate;

View File

@@ -103,6 +103,11 @@ public class OpeningOperationPlanDO {
*/ */
@Column(name = "audit_id") @Column(name = "audit_id")
private Long auditId; private Long auditId;
/**
* 审核结果状态0.待审核 1. 通过 2. 拒绝
*/
@Column(name = "result_type")
private Integer resultType;
public Integer getResultType() { public Integer getResultType() {
return resultType; return resultType;
@@ -112,11 +117,7 @@ public class OpeningOperationPlanDO {
this.resultType = resultType; this.resultType = resultType;
} }
/**
* 审核结果状态0.待审核 1. 通过 2. 拒绝
*/
@Column(name = "result_type")
private Integer resultType;

View File

@@ -4,6 +4,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.time.LocalDate; import java.time.LocalDate;
import java.util.Date;
/** /**
* @Auther: WangShuo * @Auther: WangShuo
@@ -16,15 +17,17 @@ public class PlanListRequest {
@ApiModelProperty("店铺名称") @ApiModelProperty("店铺名称")
private String shopName; private String shopName;
@ApiModelProperty("起始日期") @ApiModelProperty("起始日期")
private LocalDate planStartDate; private Date planStartDate;
@ApiModelProperty("结束日期") @ApiModelProperty("结束日期")
private LocalDate planEndDate; private Date planEndDate;
@ApiModelProperty("大区名称") @ApiModelProperty("大区名称")
private String bigName; private String bigName;
@ApiModelProperty("战区名称") @ApiModelProperty("战区名称")
private String fightName; private String fightName;
@ApiModelProperty("分页数据量") @ApiModelProperty("审核状态")
private Integer pageNum; private Integer resultType;
@ApiModelProperty("页数") @ApiModelProperty("页数")
private Integer pageNum;
@ApiModelProperty("分页数据量")
private Integer pageSize; private Integer pageSize;
} }

View File

@@ -0,0 +1,21 @@
package com.cool.store.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Auther: WangShuo
* @Date: 2024/04/25/下午6:58
* @Version 1.0
* @注释:
*/
@Data
public class OpenPreparationFlushVO {
private Long shopId;
@ApiModelProperty("开业运营方案阶段状态")
private Integer openPlanState;
@ApiModelProperty("首批订货金阶段状态")
private Integer firstOderState;
}

View File

@@ -57,5 +57,5 @@ public class OpeningOperationPlanListVO {
private Date submissionTime; private Date submissionTime;
@ApiModelProperty("审核结果,0待审核1通过2拒绝") @ApiModelProperty("审核结果,0待审核1通过2拒绝")
private String resultType; private Integer resultType;
} }

View File

@@ -42,5 +42,5 @@ public class OpeningOperationPlanVO {
private String passReason; private String passReason;
@ApiModelProperty("审核结果,0待审核1通过2拒绝") @ApiModelProperty("审核结果,0待审核1通过2拒绝")
private String resultType; private Integer resultType;
} }

View File

@@ -38,5 +38,11 @@ public interface CoolStoreStartFlowService {
* @Param projectId:项目主键,clientCode:客户编号,pCode:项目编号 * @Param projectId:项目主键,clientCode:客户编号,pCode:项目编号
*/ */
ResponseResult getStoreDetail(Long projectId,String clientCode,String pCode); ResponseResult getStoreDetail(Long projectId,String clientCode,String pCode);
/**
* @Auther: wangshuo
* @Date: 2024/4/25
* @description:获取订货金
*/
ResponseResult getFirstOrder(String shopCode);
} }

View File

@@ -22,7 +22,7 @@ public interface OpeningOperationPlanService {
*/ */
Long savePlan(OpeningOperationPlanRequest openingOperationPlanRequest); Long savePlan(OpeningOperationPlanRequest openingOperationPlanRequest);
OpeningOperationPlanVO getPlanById(Long ShopId); OpeningOperationPlanVO getPlanByShopId(Long ShopId);
/** /**
* @Auther: wangshuo * @Auther: wangshuo
* @Date: 2024/4/23 * @Date: 2024/4/23

View File

@@ -1,6 +1,7 @@
package com.cool.store.service; package com.cool.store.service;
import com.cool.store.entity.LineInfoDO; import com.cool.store.entity.LineInfoDO;
import com.cool.store.entity.ShopInfoDO;
import com.cool.store.request.AddShopRequest; import com.cool.store.request.AddShopRequest;
import com.cool.store.request.DeleteShopRequest; import com.cool.store.request.DeleteShopRequest;
import com.cool.store.vo.shop.MiniShopPageVO; import com.cool.store.vo.shop.MiniShopPageVO;
@@ -63,5 +64,8 @@ public interface ShopService {
*/ */
Long addShop(AddShopRequest request); Long addShop(AddShopRequest request);
/**
* 获取店铺信息
*/
ShopInfoDO getShopInfo(Long shopId);
} }

View File

@@ -67,39 +67,38 @@ public class CoolStoreStartFlowServiceImpl implements CoolStoreStartFlowService
Map<String, Object> requestMap = new HashMap<>(); Map<String, Object> requestMap = new HashMap<>();
fillSignatureInfo(requestMap); fillSignatureInfo(requestMap);
String url = null; String url = null;
if (Constants.ONE_INTEGER == type){ if (Constants.ONE_INTEGER == type) {
url = xfsgUrl + Constants.FRANCHISE_AGREEMENT_COMPANY + "?timestamp=" + requestMap.get("timestamp") + "&signature=" + requestMap.get("signature"); url = xfsgUrl + Constants.FRANCHISE_AGREEMENT_COMPANY + "?timestamp=" + requestMap.get("timestamp") + "&signature=" + requestMap.get("signature");
}else if (Constants.ZERO_INTEGER == type){ } else if (Constants.ZERO_INTEGER == type) {
url = xfsgUrl + Constants.FRANCHISE_AGREEMENT_PERSON + "?timestamp=" + requestMap.get("timestamp") + "&signature=" + requestMap.get("signature"); url = xfsgUrl + Constants.FRANCHISE_AGREEMENT_PERSON + "?timestamp=" + requestMap.get("timestamp") + "&signature=" + requestMap.get("signature");
} }
InitiatingResponse initiatingResponse = httpRestTemplateService.postForObject(url, request, InitiatingResponse.class); InitiatingResponse initiatingResponse = httpRestTemplateService.postForObject(url, request, InitiatingResponse.class);
log.info("franchiseAgreement API response:{}",JSONObject.toJSONString(initiatingResponse)); log.info("franchiseAgreement API response:{}", JSONObject.toJSONString(initiatingResponse));
if (initiatingResponse.getCode() != 0L){ if (initiatingResponse.getCode() != 0L) {
return new ResponseResult(500,initiatingResponse.getMsg(),initiatingResponse.getData()); return new ResponseResult(500, initiatingResponse.getMsg(), initiatingResponse.getData());
}else { } else {
return new ResponseResult(200000,initiatingResponse.getMsg(),initiatingResponse.getData()); return new ResponseResult(200000, initiatingResponse.getMsg(), initiatingResponse.getData());
} }
} }
@Override @Override
public ResponseResult getProjectList(String shopCode) { public ResponseResult getProjectList(String shopCode) {
log.info("getProjectList param:{}", shopCode); log.info("getProjectList param:{}", shopCode);
if (Objects.isNull(shopCode)) { if (Objects.isNull(shopCode)) {
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR); throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
} }
String url = String.format(Constants.GET_PROJECT_LIST, shopCode); String url = String.format(Constants.GET_PROJECT_LIST, shopCode);
log.info("CoolStoreStartFlowServiceImpl#getOrder, url:{}",url); log.info("CoolStoreStartFlowServiceImpl#getOrder, url:{}", url);
try { try {
JSONObject jsonObject = httpRestTemplateService.getForObject(url, JSONObject.class, new HashMap<>()); JSONObject jsonObject = httpRestTemplateService.getForObject(url, JSONObject.class, new HashMap<>());
log.info("CoolStoreStartFlowServiceImpl#getOrder,jsonObject:{}",jsonObject.toJSONString()); log.info("CoolStoreStartFlowServiceImpl#getOrder,jsonObject:{}", jsonObject.toJSONString());
if (jsonObject.get("status").equals(Constants.SUCCESS)) { if (jsonObject.get("status").equals(Constants.SUCCESS)) {
return new ResponseResult(200,jsonObject.get("data").toString(),jsonObject.get("msg").toString()); return new ResponseResult(200, jsonObject.get("data").toString(), jsonObject.get("msg").toString());
}else } else {
{ return new ResponseResult(500, jsonObject.get("msg").toString());
return new ResponseResult(500,jsonObject.get("msg").toString());
} }
}catch (Exception e){ } catch (Exception e) {
log.info("调用鲜丰服务异常,getProjectList error:{}",e); log.info("调用鲜丰服务异常,getProjectList error:{}", e);
throw new ServiceException(ErrorCodeEnum.XFSG_SERVICE_ERROR); throw new ServiceException(ErrorCodeEnum.XFSG_SERVICE_ERROR);
} }
@@ -107,8 +106,8 @@ public class CoolStoreStartFlowServiceImpl implements CoolStoreStartFlowService
@Override @Override
public ResponseResult getStoreDetail(Long projectId, String clientCode, String pCode) { public ResponseResult getStoreDetail(Long projectId, String clientCode, String pCode) {
log.info("getStoreList projectId:{},clientCode:{},pCode:{}", projectId,clientCode,pCode); log.info("getStoreList projectId:{},clientCode:{},pCode:{}", projectId, clientCode, pCode);
if (Objects.isNull(projectId)&&Objects.isNull(clientCode)&&Objects.isNull(pCode)) { if (Objects.isNull(projectId) && Objects.isNull(clientCode) && Objects.isNull(pCode)) {
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR); throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
} }
HashMap requestMap = new HashMap(); HashMap requestMap = new HashMap();
@@ -117,20 +116,40 @@ public class CoolStoreStartFlowServiceImpl implements CoolStoreStartFlowService
requestMap.put("pCode", pCode); requestMap.put("pCode", pCode);
try { try {
JSONObject jsonObject = httpRestTemplateService.getForObject(Constants.GET_PROJECT_DETAIL, JSONObject.class, requestMap); JSONObject jsonObject = httpRestTemplateService.getForObject(Constants.GET_PROJECT_DETAIL, JSONObject.class, requestMap);
log.info("FirstOrderServiceImp#getStoreDetail, jsonObject:{}",jsonObject.toJSONString()); log.info("FirstOrderServiceImp#getStoreDetail, jsonObject:{}", jsonObject.toJSONString());
if (jsonObject.get("status").equals(Constants.SUCCESS)) { if (jsonObject.get("status").equals(Constants.SUCCESS)) {
return new ResponseResult(200,jsonObject.get("data").toString(),jsonObject.get("msg").toString()); return new ResponseResult(200, jsonObject.get("data").toString(), jsonObject.get("msg").toString());
}else } else {
{ return new ResponseResult(500, jsonObject.get("msg").toString());
return new ResponseResult(500,jsonObject.get("msg").toString());
} }
}catch (Exception e){ } catch (Exception e) {
log.info("调用鲜丰服务异常,getProjectList error:{}",e); log.info("调用鲜丰服务异常,getProjectList error:{}", e);
throw new ServiceException(ErrorCodeEnum.XFSG_SERVICE_ERROR); throw new ServiceException(ErrorCodeEnum.XFSG_SERVICE_ERROR);
} }
} }
@Override
public ResponseResult getFirstOrder(String shopCode) {
log.info("getFirstOrder shopCode:{}", shopCode);
if (Objects.isNull(shopCode)) {
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
}
try {
String url = xfsgUrl + Constants.FRANCHISEE_STORE_NUM + "?storeCode=" + shopCode;
JSONObject jsonObject = httpRestTemplateService.getForObject(url, JSONObject.class, new HashMap<>());
log.info("get url:{},jsonObject:{}", url, jsonObject);
String string = jsonObject.getString("data");
if (string == null) {
throw new ServiceException(ErrorCodeEnum.GET_FIRST_ORDER);
}
return ResponseResult.success(string);
} catch (Exception e) {
log.error("获取鲜丰订货金异常", e);
throw new ServiceException(ErrorCodeEnum. GET_FIRST_ORDER);
}
}
private void fillSignatureInfo(Map<String, Object> requestMap) { private void fillSignatureInfo(Map<String, Object> requestMap) {
long timestamp = System.currentTimeMillis(); long timestamp = System.currentTimeMillis();

View File

@@ -1,20 +1,30 @@
package com.cool.store.service.impl; package com.cool.store.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.cool.store.context.CurrentUserHolder; import com.cool.store.context.CurrentUserHolder;
import com.cool.store.dao.FirstOrderDAO; import com.cool.store.dao.FirstOrderDAO;
import com.cool.store.dao.OpeningOperationPlanAuditDAO;
import com.cool.store.dao.ShopStageInfoDAO;
import com.cool.store.dto.openPreparation.FirstOrderDTO; import com.cool.store.dto.openPreparation.FirstOrderDTO;
import com.cool.store.entity.FirstOrderDO; import com.cool.store.entity.FirstOrderDO;
import com.cool.store.entity.ShopInfoDO;
import com.cool.store.entity.ShopStageInfoDO;
import com.cool.store.enums.AuditResultTypeEnum;
import com.cool.store.enums.ErrorCodeEnum; import com.cool.store.enums.ErrorCodeEnum;
import com.cool.store.enums.point.ShopSubStageEnum;
import com.cool.store.enums.point.ShopSubStageStatusEnum;
import com.cool.store.exception.ServiceException; import com.cool.store.exception.ServiceException;
import com.cool.store.mq.util.HttpRestTemplateService;
import com.cool.store.response.ResponseResult; import com.cool.store.response.ResponseResult;
import com.cool.store.service.CoolStoreStartFlowService; import com.cool.store.service.CoolStoreStartFlowService;
import com.cool.store.service.FirstOrderService; import com.cool.store.service.FirstOrderService;
import com.fasterxml.jackson.core.JsonProcessingException; import com.cool.store.service.PreparationService;
import com.fasterxml.jackson.databind.JsonNode; import com.cool.store.service.ShopService;
import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.Date; import java.util.Date;
@@ -30,37 +40,72 @@ import java.util.Date;
public class FirstOrderServiceImp implements FirstOrderService { public class FirstOrderServiceImp implements FirstOrderService {
@Resource @Resource
private FirstOrderDAO firstOrderDAO; private FirstOrderDAO firstOrderDAO;
@Value("${xfsg.url}")
private String xfsgUrl;
@Resource @Resource
CoolStoreStartFlowService coolStoreStartFlowService; private PreparationService preparationService;
;
@Resource
private HttpRestTemplateService httpRestTemplateService;
@Resource
private ShopService shopService;
@Resource
private OpeningOperationPlanAuditDAO openingOperationPlanAuditDAO;
@Resource
private ShopStageInfoDAO shopStageInfoDAO;
@Resource
private CoolStoreStartFlowService coolStoreStartFlowService;
@Override @Override
public Integer saveOrder(FirstOrderDO order) { public Integer saveOrder(FirstOrderDO order) {
String userId = CurrentUserHolder.getUserId(); String userId = CurrentUserHolder.getUserId();
log.info("save order:{}",JSONObject.toJSONString(order)); log.info("save order:{}", JSONObject.toJSONString(order));
if (order == null ) { if (order == null) {
throw new ServiceException(ErrorCodeEnum.FIRST_ORDER_PARAM_NULL); throw new ServiceException(ErrorCodeEnum.FIRST_ORDER_PARAM_NULL);
} }
FirstOrderDTO firstOrderDTO = firstOrderDAO.selectFirstOrderByShopId(order.getShopId()); FirstOrderDTO firstOrderDTO = firstOrderDAO.selectFirstOrderByShopId(order.getShopId());
if (firstOrderDTO == null) { if (firstOrderDTO == null) {
//第一次提交
order.setCreateTime(new Date()); order.setCreateTime(new Date());
order.setUpdateTime(new Date()); order.setUpdateTime(new Date());
order.setCreateUserId(userId); order.setCreateUserId(userId);
order.setUpdateUserId(userId); order.setUpdateUserId(userId);
} else { } else {
//修改提交
order.setUpdateTime(new Date()); order.setUpdateTime(new Date());
order.setUpdateUserId(userId); order.setUpdateUserId(userId);
} }
return firstOrderDAO.insertFirstOrder(order); Integer flag = firstOrderDAO.insertFirstOrder(order);
//云立方同步
if (flag > 0) {
try {
ShopInfoDO shopInfo = shopService.getShopInfo(order.getShopId());
String shopCode = shopInfo.getShopCode();
String data = coolStoreStartFlowService.getFirstOrder(shopCode).getData().toString();
log.info("saveOrder,data:{}", data);
if (data == null) {
throw new ServiceException(ErrorCodeEnum.GET_FIRST_ORDER);
}
if (data.equals("true")) {
//更改子阶段状态
shopStageInfoDAO.updateShopStageAndAuditInfo(order.getShopId(),
ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_151, null);
preparationService.whetherToOpenForAcceptance(order.getShopId());
}
} catch (Exception e) {
log.error("获取鲜丰订货金异常", e);
}
}
return flag;
} }
@Override @Override
public FirstOrderDTO getOrder(Long shopId) { public FirstOrderDTO getOrder(Long shopId) {
log.info("get order:{}",shopId); log.info("getOrder shopId:{},", shopId);
if (shopId == null) { if (shopId == null) {
log.error("shopId is null"); log.error("shopId/shopCode is null");
throw new ServiceException(ErrorCodeEnum.FIRST_ORDER_PARAM_NULL); throw new ServiceException(ErrorCodeEnum.FIRST_ORDER_PARAM_NULL);
} }
return firstOrderDAO.selectFirstOrderByShopId(shopId); return firstOrderDAO.selectFirstOrderByShopId(shopId);
} }
} }

View File

@@ -4,6 +4,7 @@ package com.cool.store.service.impl;
import com.cool.store.context.CurrentUserHolder; import com.cool.store.context.CurrentUserHolder;
import com.cool.store.dao.OpeningOperationPlanAuditDAO; import com.cool.store.dao.OpeningOperationPlanAuditDAO;
import com.cool.store.dao.OpeningOperationPlanDAO; import com.cool.store.dao.OpeningOperationPlanDAO;
import com.cool.store.dao.ShopAuditInfoDAO;
import com.cool.store.dao.ShopStageInfoDAO; import com.cool.store.dao.ShopStageInfoDAO;
import com.cool.store.entity.OpeningOperationPlanDO; import com.cool.store.entity.OpeningOperationPlanDO;
import com.cool.store.entity.ShopAuditInfoDO; import com.cool.store.entity.ShopAuditInfoDO;
@@ -13,6 +14,7 @@ import com.cool.store.enums.point.ShopSubStageStatusEnum;
import com.cool.store.exception.ServiceException; import com.cool.store.exception.ServiceException;
import com.cool.store.request.OpeningOperationPlanAuditRequest; import com.cool.store.request.OpeningOperationPlanAuditRequest;
import com.cool.store.service.OpeningOperationPlanAuditService; import com.cool.store.service.OpeningOperationPlanAuditService;
import com.cool.store.service.PreparationService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@@ -37,6 +39,8 @@ public class OpeningOperationPlanAuditImpl implements OpeningOperationPlanAuditS
private OpeningOperationPlanDAO openingOperationPlanDAO; private OpeningOperationPlanDAO openingOperationPlanDAO;
@Resource @Resource
private ShopStageInfoDAO shopStageInfoDAO; private ShopStageInfoDAO shopStageInfoDAO;
@Resource
private PreparationService preparationService;
@Override @Override
public Long addNewPlanAudit(OpeningOperationPlanAuditRequest request) { public Long addNewPlanAudit(OpeningOperationPlanAuditRequest request) {
@@ -49,51 +53,54 @@ public class OpeningOperationPlanAuditImpl implements OpeningOperationPlanAuditS
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public Boolean auditPlan(OpeningOperationPlanAuditRequest request) { public Boolean auditPlan(OpeningOperationPlanAuditRequest request) {
log.info("auditPlan request:{}", request); log.info("auditPlan request:{}", request);
if (Objects.isNull(request.getId())) if (Objects.isNull(request.getId())) {
{ log.error("auditPlan request id is null");
log.error("auditPlan request id is null"); throw new ServiceException("auditPlan request id is null");
throw new ServiceException("auditPlan request id is null"); }
}
String userId = CurrentUserHolder.getUserId(); String userId = CurrentUserHolder.getUserId();
try{ try {
Integer audit = openingOperationPlanAuditDAO.updateSelective(request.toShopAuditInfoDO()); Integer audit = openingOperationPlanAuditDAO.updateSelective(request.toShopAuditInfoDO());
if (Objects.isNull(audit)){ if (Objects.isNull(audit)) {
log.error("auditPlan audit is null"); log.error("auditPlan audit is null");
throw new ServiceException(ErrorCodeEnum.UPDATE_AUDIT_PLAN_FALSE); throw new ServiceException(ErrorCodeEnum.UPDATE_AUDIT_PLAN_FALSE);
} }
OpeningOperationPlanDO openingOperationPlanDO = new OpeningOperationPlanDO(); Long auditId = openingOperationPlanAuditDAO.selectIdByShopId(request.getShopId());
openingOperationPlanDO.setUpdateUserId(userId); OpeningOperationPlanDO openingOperationPlanDO = new OpeningOperationPlanDO();
openingOperationPlanDO.setUpdateTime(new Date()); openingOperationPlanDO.setUpdateUserId(userId);
openingOperationPlanDO.setResultType(request.getResultType()); openingOperationPlanDO.setUpdateTime(new Date());
Long plan = openingOperationPlanDAO.updateSelective(openingOperationPlanDO); openingOperationPlanDO.setResultType(request.getResultType());
if (Objects.isNull(plan)){ Long plan = openingOperationPlanDAO.updateSelective(openingOperationPlanDO);
log.error("auditPlan plan is null"); if (Objects.isNull(plan)) {
throw new ServiceException(ErrorCodeEnum.UPDATE_PLAN_FALSE); log.error("auditPlan plan is null");
} throw new ServiceException(ErrorCodeEnum.UPDATE_PLAN_FALSE);
}
if (request.getResultType().equals(OpeningOperationPlanResultTypeEnum.PASS_AUDIT.getCode())){ if (request.getResultType().equals(OpeningOperationPlanResultTypeEnum.PASS_AUDIT.getCode())) {
Integer Stage = shopStageInfoDAO.updateShopStageAndAuditInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_143, request.getShopId()); //更改子阶段
if (Objects.isNull(Stage)){ Integer Stage = shopStageInfoDAO.updateShopStageAndAuditInfo(request.getShopId(),
ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_143, auditId);
if (Objects.isNull(Stage)) {
log.error("auditPlan stage is null"); log.error("auditPlan stage is null");
throw new ServiceException(ErrorCodeEnum.UPDATE_SHOP_SUB_STAGE_STATUS_FALSE); throw new ServiceException(ErrorCodeEnum.UPDATE_SHOP_SUB_STAGE_STATUS_FALSE);
} }
}else { preparationService.whetherToOpenForAcceptance(request.getShopId());
if (request.getResultType().equals(OpeningOperationPlanResultTypeEnum.REJECT_AUDIT.getCode())){ } else {
Integer Stage = shopStageInfoDAO.updateShopStageAndAuditInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_142, request.getShopId()); if (request.getResultType().equals(OpeningOperationPlanResultTypeEnum.REJECT_AUDIT.getCode())) {
if (Objects.isNull(Stage)){ //更改子阶段
log.error("auditPlan stage is null"); Integer Stage = shopStageInfoDAO.updateShopStageAndAuditInfo(request.getShopId(),
throw new ServiceException(ErrorCodeEnum.UPDATE_SHOP_SUB_STAGE_STATUS_FALSE); ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_142, auditId);
} if (Objects.isNull(Stage)) {
} log.error("auditPlan stage is null");
} throw new ServiceException(ErrorCodeEnum.UPDATE_SHOP_SUB_STAGE_STATUS_FALSE);
return Boolean.TRUE; }
} }
catch (Exception e) { }
log.error("auditPlan Exception:{}", e); return Boolean.TRUE;
e.printStackTrace(); } catch (Exception e) {
return Boolean.FALSE; log.error("auditPlan Exception:{}", e);
} e.printStackTrace();
return Boolean.FALSE;
}
} }

View File

@@ -124,15 +124,16 @@ public class OpeningOperationPlanImpl implements OpeningOperationPlanService {
} }
@Override @Override
public OpeningOperationPlanVO getPlanById(Long Id) { public OpeningOperationPlanVO getPlanByShopId(Long shopId) {
log.info( "getPlanBy Id:{}", Id ); log.info( "getPlanBy shopId:{}", shopId );
if (Objects.isNull(Id)){ if (Objects.isNull(shopId)){
log.error("getPlanBy Id is null"); log.error(" getPlanByShopId shopId is null");
throw new ServiceException(ErrorCodeEnum.ID_IS_NULL); throw new ServiceException(ErrorCodeEnum.SHOP_ID_IS_NULL);
} }
OpeningOperationPlanVO openingOperationPlanVO = new OpeningOperationPlanVO(); OpeningOperationPlanVO openingOperationPlanVO = new OpeningOperationPlanVO();
OpeningOperationPlanDO openingOperationPlanDO = openingOperationPlanDAO.selectById(Id); OpeningOperationPlanDO openingOperationPlanDO = openingOperationPlanDAO.selectByShopId(shopId);
try { try {
if ((openingOperationPlanDO!=null)){
String preparationUserIds = openingOperationPlanDO.getPreparationUserIds(); String preparationUserIds = openingOperationPlanDO.getPreparationUserIds();
List<String> stream = Arrays.stream(preparationUserIds.split(CommonConstants.COMMA)).collect(Collectors.toList()); List<String> stream = Arrays.stream(preparationUserIds.split(CommonConstants.COMMA)).collect(Collectors.toList());
List<UserInfoDTO> nameByUserId = enterpriseUserDAO.getNameByUserId(stream); List<UserInfoDTO> nameByUserId = enterpriseUserDAO.getNameByUserId(stream);
@@ -143,45 +144,44 @@ public class OpeningOperationPlanImpl implements OpeningOperationPlanService {
BeanUtils.copyProperties(openingOperationPlanDO, openingOperationPlanVO); BeanUtils.copyProperties(openingOperationPlanDO, openingOperationPlanVO);
openingOperationPlanVO.setPreparationUsers(preparationUserName); openingOperationPlanVO.setPreparationUsers(preparationUserName);
return openingOperationPlanVO; return openingOperationPlanVO;
}
} catch (IllegalAccessException | InvocationTargetException e) { } catch (IllegalAccessException | InvocationTargetException e) {
e.printStackTrace(); e.printStackTrace();
return null; return null;
} }
return openingOperationPlanVO;
} }
@Override @Override
public List<OpeningOperationPlanListVO> getPlanListPage(PlanListRequest request) { public List<OpeningOperationPlanListVO> getPlanListPage(PlanListRequest request) {
log.info("getPlanListPage request:{}", JSONObject.toJSONString(request)); log.info("getPlanListPage request:{}", JSONObject.toJSONString(request));
//根据ShopName等查询门店名字1门店代码1开店负责人1督导id1 //shopId,提交时间,审核状态
Page<OpenPlanShopInfoDTO> openPlanShopList = shopInfoDAO.
getOpenPlanShopListByShopName(request.getShopName(), request.getBigName(), request.getFightName(),
request.getPageNum(), request.getPageSize());
log.info("getPlanListPage openPlanShopList:{}",JSONObject.toJSONString(openPlanShopList) );
List<OpeningOperationPlanListVO> openingOperationPlanListVOList= openPlanShopList.stream().map(dto -> {
OpeningOperationPlanListVO vO = new OpeningOperationPlanListVO();
vO.setShopId(dto.getShopId());
vO.setLineId(dto.getLineId());
vO.setShopName(dto.getShopName());
vO.setShopManagerUserId(dto.getShopManagerUserId());
vO.setSupervisorUserId(dto.getSupervisorUserId());
vO.setShopCode(dto.getShopCode());
vO.setBigName(dto.getBigName());
vO.setFightName(dto.getFightName());
return vO;
}).collect(Collectors.toList());
log.info("getPlanListPage openingOperationPlanVOList:{}", JSONObject.toJSONString(openingOperationPlanListVOList) );
//提交时间,审核状态
List<Long> shopIdList = openPlanShopList.stream()
.map(OpenPlanShopInfoDTO::getShopId)
.collect(Collectors.toList());
OpeningOperationPlanDTO openingOperationPlanDTO =new OpeningOperationPlanDTO(); OpeningOperationPlanDTO openingOperationPlanDTO =new OpeningOperationPlanDTO();
openingOperationPlanDTO.setPlanStartDate(request.getPlanStartDate()); openingOperationPlanDTO.setPlanStartDate(request.getPlanStartDate());
openingOperationPlanDTO.setPlanEndDate(request.getPlanEndDate()); openingOperationPlanDTO.setPlanEndDate(request.getPlanEndDate());
List<OpeningOperationPlanDTO> openingOperationPlanDTOS = openingOperationPlanDAO.selectConditionPlanList(shopIdList, openingOperationPlanDTO); openingOperationPlanDTO.setResultType(request.getResultType());
List<OpeningOperationPlanDTO> openingOperationPlanDTOS = openingOperationPlanDAO.selectConditionPlanList(openingOperationPlanDTO);
log.info("getPlanListPage openingOperationPlanDTOS:{}",JSONObject.toJSONString(openingOperationPlanDTOS) ); log.info("getPlanListPage openingOperationPlanDTOS:{}",JSONObject.toJSONString(openingOperationPlanDTOS) );
Map<Long, OpeningOperationPlanDTO> voPlanMap = openingOperationPlanDTOS.stream() //包装VO
.collect(Collectors.toMap(OpeningOperationPlanDTO::getShopId, vo -> vo)); List<OpeningOperationPlanListVO> openingOperationPlanListVOList = openingOperationPlanDTOS.stream().map(dto->{
log.info("getPlanListPage voPlanMap:{}",JSONObject.toJSONString(voPlanMap) ); OpeningOperationPlanListVO vO = new OpeningOperationPlanListVO();
vO.setShopId(dto.getShopId());
vO.setSubmissionTime(dto.getSubmissionTime());
vO.setResultType(dto.getResultType());
return vO;
}).collect(Collectors.toList());
log.info("getPlanListPage openingOperationPlanVOList:{}", JSONObject.toJSONString(openingOperationPlanListVOList) );
List<Long> shopIdlist = openingOperationPlanDTOS.stream().map(OpeningOperationPlanDTO::getShopId)
.collect(Collectors.toList());
log.info("getPlanListPage shopIdlist:{}",JSONObject.toJSONString(shopIdlist) );
//根据ShopName等查询门店名字1门店代码1开店负责人id1督导id1,大区名称,战区名称,线索id
Page<OpenPlanShopInfoDTO> openPlanShopList = shopInfoDAO.
getOpenPlanShopListByShopName(shopIdlist,request.getShopName(), request.getBigName(), request.getFightName(),
request.getPageNum(), request.getPageSize());
log.info("getPlanListPage openPlanShopList:{}",JSONObject.toJSONString(openPlanShopList) );
Map<Long, OpenPlanShopInfoDTO> shopInfoMap = openPlanShopList.stream()
.collect(Collectors.toMap(OpenPlanShopInfoDTO::getShopId, vo -> vo));
log.info("getPlanListPage shopInfoMap:{}", JSONObject.toJSONString(shopInfoMap) );
//开店负责人name //开店负责人name
List<String> shopManagerUserIdList = openPlanShopList.stream() List<String> shopManagerUserIdList = openPlanShopList.stream()
.map(OpenPlanShopInfoDTO::getShopManagerUserId) .map(OpenPlanShopInfoDTO::getShopManagerUserId)
@@ -210,8 +210,11 @@ public class OpeningOperationPlanImpl implements OpeningOperationPlanService {
.collect(Collectors.toMap(PlanLineDTO::getLineId, vo -> vo)); .collect(Collectors.toMap(PlanLineDTO::getLineId, vo -> vo));
log.info("getPlanListPage linemap:{}",JSONObject.toJSONString(linemap) ); log.info("getPlanListPage linemap:{}",JSONObject.toJSONString(linemap) );
for (OpeningOperationPlanListVO vo:openingOperationPlanListVOList){ for (OpeningOperationPlanListVO vo:openingOperationPlanListVOList){
vo.setSubmissionTime(voPlanMap.get(vo.getShopId()).getSubmissionTime()); vo.setLineId(shopInfoMap.get(vo.getShopId()).getLineId());
vo.setResultType(voPlanMap.get(vo.getShopId()).getResultType()); vo.setShopName(shopInfoMap.get(vo.getShopId()).getShopName());
vo.setShopCode(shopInfoMap.get(vo.getShopId()).getShopCode());
vo.setBigName(shopInfoMap.get(vo.getShopId()).getBigName());
vo.setFightName(shopInfoMap.get(vo.getShopId()).getFightName());
vo.setShopManagerName(voManagerMap.get(vo.getShopId()).getName()); vo.setShopManagerName(voManagerMap.get(vo.getShopId()).getName());
vo.setSupervisorName(voSupervisorList.get(vo.getSupervisorUserId()).getName()); vo.setSupervisorName(voSupervisorList.get(vo.getSupervisorUserId()).getName());
vo.setPartnerName(linemap.get(vo.getLineId()).getInvestmentManagerName()); vo.setPartnerName(linemap.get(vo.getLineId()).getInvestmentManagerName());

View File

@@ -145,4 +145,10 @@ public class ShopServiceImpl implements ShopService {
shopStageInfoDAO.initShopStageInfo(lineInfo.getId(), shopIds); shopStageInfoDAO.initShopStageInfo(lineInfo.getId(), shopIds);
return 1L; return 1L;
} }
@Override
public ShopInfoDO getShopInfo(Long shopId) {
return shopInfoDAO.getShopInfo(shopId);
}
} }

View File

@@ -191,5 +191,6 @@ public class Constants
public static final String GET_PROJECT_LIST = "https://hzly.cloudcubic.net/ajaxHandle/synchronization/JCallBackSynchronizationHandler.ashx?action=app&controller=GetProjectByCustomLable&remark=%s"; public static final String GET_PROJECT_LIST = "https://hzly.cloudcubic.net/ajaxHandle/synchronization/JCallBackSynchronizationHandler.ashx?action=app&controller=GetProjectByCustomLable&remark=%s";
public static final String GET_PROJECT_DETAIL= "https://hzly.cloudcubic.net/ajaxHandle/synchronization/JCallBackSynchronizationHandler.ashx?action=app&controller=GetProjectDetails"; public static final String GET_PROJECT_DETAIL= "https://hzly.cloudcubic.net/ajaxHandle/synchronization/JCallBackSynchronizationHandler.ashx?action=app&controller=GetProjectDetails";
public static final String FIRST_ORDER = "/api/kdz/get-store-balance";
} }

View File

@@ -1,52 +0,0 @@
package com.cool.store.controller.webb;
import com.alibaba.fastjson.JSONObject;
import com.cool.store.dto.openPreparation.FirstOrderDTO;
import com.cool.store.entity.FirstOrderDO;
import com.cool.store.mq.util.HttpRestTemplateService;
import com.cool.store.request.FirstOrderRequest;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.FirstOrderService;
import com.cool.store.utils.poi.constant.Constants;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.beanutils.BeanUtils;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.lang.reflect.InvocationTargetException;
import java.util.HashMap;
/**
* @Auther: WangShuo
* @Date: 2024/04/24/下午9:22
* @Version 1.0
* @注释:
*/
@RestController
@RequestMapping("/pc/firstOrder")
@Api(tags = "PC首批订货金")
@Slf4j
public class FirstOrderController {
@Resource
private FirstOrderService firstOrderService;
@GetMapping("/get")
public ResponseResult<FirstOrderDTO> get(@RequestParam("shopId") Long shopId) {
FirstOrderDTO order = firstOrderService.getOrder(shopId);
return ResponseResult.success(order);
}
@PostMapping("/submit")
public ResponseResult getSubmit(@RequestBody FirstOrderRequest request) {
FirstOrderDO firstOrderDO = new FirstOrderDO();
try {
BeanUtils.copyProperties(firstOrderDO,request );
firstOrderService.saveOrder(firstOrderDO);
return ResponseResult.success();
} catch (IllegalAccessException |InvocationTargetException e) {
throw new RuntimeException(e);
}
}
}

View File

@@ -0,0 +1,144 @@
package com.cool.store.controller.webb;
import com.alibaba.fastjson.JSONObject;
import com.cool.store.dao.ShopStageInfoDAO;
import com.cool.store.dto.openPreparation.FirstOrderDTO;
import com.cool.store.entity.FirstOrderDO;
import com.cool.store.entity.ShopInfoDO;
import com.cool.store.entity.ShopStageInfoDO;
import com.cool.store.enums.AuditStatusEnum;
import com.cool.store.enums.ErrorCodeEnum;
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.FirstOrderRequest;
import com.cool.store.request.OpeningOperationPlanAuditRequest;
import com.cool.store.request.OpeningOperationPlanRequest;
import com.cool.store.request.PlanListRequest;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.*;
import com.cool.store.vo.OpenPreparationFlushVO;
import com.cool.store.vo.OpeningOperationPlanListVO;
import com.cool.store.vo.OpeningOperationPlanVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.beanutils.BeanUtils;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.lang.reflect.InvocationTargetException;
import java.util.List;
/**
* @Auther: WangShuo
* @Date: 2024/04/25/下午6:35
* @Version 1.0
* @注释:
*/
@RestController
@RequestMapping("/pc/OpenPreparation")
@Api(tags = "pc开业筹备")
@Slf4j
public class OpenPreparationController {
@Resource
private CoolStoreStartFlowService coolStoreStartFlowService;
@Resource
private ShopStageInfoDAO shopStageInfoDAO;
@Resource
private FirstOrderService firstOrderService;
@Resource
private ShopService shopService;
@Resource
private PreparationService preparationService;
@Resource
private OpeningOperationPlanService openingOperationPlanService;
@Resource
private OpeningOperationPlanAuditService openingOperationPlanAuditService;
@GetMapping("/flush")
public ResponseResult flush(@RequestParam("shopId") Long shopId) {
ShopStageInfoDO planStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_14);
log.info("flush shopStageInfo:{}", planStageInfo);
ShopStageInfoDO orderStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_15);
try {
if (!orderStageInfo.getShopSubStageStatus().
equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_151.getShopSubStageStatus())) {
ShopInfoDO shopInfo = shopService.getShopInfo(shopId);
String shopCode = shopInfo.getShopCode();
String data = coolStoreStartFlowService.getFirstOrder(shopCode).getData().toString();
log.info("saveOrder,data:{}", data);
if (data == null) {
throw new ServiceException(ErrorCodeEnum.GET_FIRST_ORDER);
}
if (data.equals("true")) {
//更改子阶段状态
shopStageInfoDAO.updateShopStageAndAuditInfo(shopId,
ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_151, null);
preparationService.whetherToOpenForAcceptance(shopId);
}
}
} catch (Exception e) {
log.error("获取鲜丰订货金异常", e);
}
ShopStageInfoDO firstOrderStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_15);
log.info("flush orderStageInfo:{}", orderStageInfo);
OpenPreparationFlushVO flushVO = new OpenPreparationFlushVO();
flushVO.setShopId(shopId);
flushVO.setOpenPlanState(planStageInfo.getShopSubStageStatus());
flushVO.setFirstOderState(firstOrderStageInfo.getShopSubStageStatus());
return ResponseResult.success(flushVO);
}
@PostMapping("/openingOperationPlan/submit")
@ApiOperation("提交开业运营方案")
public ResponseResult submitPlan(@RequestBody OpeningOperationPlanRequest request) {
openingOperationPlanService.savePlan(request);
return ResponseResult.success();
}
@GetMapping("/openingOperationPlan/getPlan")
@ApiOperation("查询开业运营方案")
public ResponseResult<OpeningOperationPlanVO> getPlan(@RequestParam("shopId") Long shopId) {
OpeningOperationPlanVO plan = openingOperationPlanService.getPlanByShopId(shopId);
log.info("openingOperationPlan,getPlan:{}", JSONObject.toJSONString(plan));
return ResponseResult.success(plan);
}
@PostMapping("/openingOperationPlan/audit")
@ApiOperation("审核运营方案")
public ResponseResult auditPlan(@RequestBody OpeningOperationPlanAuditRequest request) {
openingOperationPlanAuditService.auditPlan(request);
return ResponseResult.success();
}
@GetMapping("/openingOperationPlan/planList")
@ApiOperation("查询运营方案列表")
public ResponseResult<List<OpeningOperationPlanListVO>> planList(@RequestBody PlanListRequest request) {
openingOperationPlanService.getPlanListPage(request);
return ResponseResult.success(openingOperationPlanService.getPlanListPage(request));
}
@GetMapping("/firstOrder/get")
@ApiOperation("查询订货金")
public ResponseResult<FirstOrderDTO> get(@RequestParam("shopId") Long shopId) {
FirstOrderDTO order = firstOrderService.getOrder(shopId);
return ResponseResult.success(order);
}
@PostMapping("/firstOrder/submit")
@ApiOperation("提交订货金")
public ResponseResult submit(@RequestBody FirstOrderRequest request) {
FirstOrderDO firstOrderDO = new FirstOrderDO();
try {
BeanUtils.copyProperties(firstOrderDO, request);
firstOrderService.saveOrder(firstOrderDO);
return ResponseResult.success();
} catch (IllegalAccessException | InvocationTargetException e) {
throw new RuntimeException(e);
}
}
}

View File

@@ -1,60 +0,0 @@
package com.cool.store.controller.webb;
import com.cool.store.mapper.OpeningOperationPlanMapper;
import com.cool.store.request.OpeningOperationPlanAuditRequest;
import com.cool.store.request.OpeningOperationPlanRequest;
import com.cool.store.request.PlanListRequest;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.OpeningOperationPlanAuditService;
import com.cool.store.service.OpeningOperationPlanService;
import com.cool.store.vo.OpeningOperationPlanListVO;
import com.cool.store.vo.OpeningOperationPlanVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* @Auther: WangShuo
* @Date: 2024/04/22/下午5:28
* @Version 1.0
* @注释:
*/
@RestController
@RequestMapping("pc/openingOperationPlan")
@Api(tags = "开业运营方案")
public class OpeningOperationPlanController {
@Resource
private OpeningOperationPlanService openingOperationPlanService;
@Resource
private OpeningOperationPlanAuditService openingOperationPlanAuditService;
@PostMapping("/submit")
@ApiOperation("提交开业运营方案")
public ResponseResult submitPlan(@RequestBody OpeningOperationPlanRequest request){
Long planId = openingOperationPlanService.savePlan(request);
return ResponseResult.success();
}
@GetMapping("/getPlan")
@ApiOperation("查询开业运营方案")
public ResponseResult<OpeningOperationPlanVO> getPlan(@RequestParam Long planId){
OpeningOperationPlanVO plan = openingOperationPlanService.getPlanById(planId);
return ResponseResult.success(plan);
}
@PostMapping("/audit")
@ApiOperation("审核运营方案")
public ResponseResult auditPlan(@RequestBody OpeningOperationPlanAuditRequest request){
openingOperationPlanAuditService.auditPlan(request);
return ResponseResult.success();
}
@GetMapping("/planList")
@ApiOperation("查询运营方案列表")
public ResponseResult<List<OpeningOperationPlanListVO>> planList(@RequestBody PlanListRequest request){
openingOperationPlanService.getPlanListPage(request);
return ResponseResult.success(openingOperationPlanService.getPlanListPage(request));
}
}

View File

@@ -0,0 +1,112 @@
package com.cool.store.controller.webc;
import com.alibaba.fastjson.JSONObject;
import com.cool.store.dao.ShopStageInfoDAO;
import com.cool.store.dto.openPreparation.FirstOrderDTO;
import com.cool.store.entity.ShopInfoDO;
import com.cool.store.entity.ShopStageInfoDO;
import com.cool.store.enums.AuditStatusEnum;
import com.cool.store.enums.ErrorCodeEnum;
import com.cool.store.enums.point.ShopSubStageEnum;
import com.cool.store.enums.point.ShopSubStageStatusEnum;
import com.cool.store.exception.ServiceException;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.*;
import com.cool.store.vo.OpenPreparationFlushVO;
import com.cool.store.vo.OpeningOperationPlanVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.Objects;
/**
* @Auther: WangShuo
* @Date: 2024/04/25/下午7:07
* @Version 1.0
* @注释:
*/
@RestController
@RequestMapping("/mini/OpenPreparation")
@Api(tags = "mini开业筹备")
@Slf4j
public class MiniOpenPreparationController {
@Resource
private OpeningOperationPlanService openingOperationPlanService;
@Resource
private OpeningOperationPlanAuditService openingOperationPlanAuditService;
@Resource
private CoolStoreStartFlowService coolStoreStartFlowService;
@Resource
private ShopStageInfoDAO shopStageInfoDAO;
@Resource
private FirstOrderService firstOrderService;
@Resource
private ShopService shopService;
@Resource
private PreparationService preparationService;
@GetMapping("/openingOperationPlan/getPlan")
@ApiOperation("查询开业运营方案")
public ResponseResult<OpeningOperationPlanVO> getPlan(@RequestParam("shopId") Long shopId) {
OpeningOperationPlanVO plan = openingOperationPlanService.getPlanByShopId(shopId);
log.info("MiniOpeningOperationPlanController#getPlan:{}", JSONObject.toJSONString(plan));
if (plan == null) {
log.info("运营方案未上传");
return ResponseResult.success(null);
}
if (plan.getResultType().equals(AuditStatusEnum.PASS.getCode())) {
return ResponseResult.success(plan);
} else {
log.info("运营方案待审核或未通过");
return ResponseResult.success(null);
}
}
@GetMapping("/firstOrder/get")
@ApiOperation("查询订货金")
public ResponseResult<FirstOrderDTO> get(@RequestParam("shopId") Long shopId) {
FirstOrderDTO order = firstOrderService.getOrder(shopId);
ShopStageInfoDO firstOrderStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_15);
order.setResultType(firstOrderStageInfo.getShopSubStageStatus());
return ResponseResult.success(order);
}
@GetMapping("/firstOrder/flush")
public ResponseResult flush(@RequestParam Long shopId) {
ShopStageInfoDO orderStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_15);
try {
if (!orderStageInfo.getShopSubStageStatus().
equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_151.getShopSubStageStatus())) {
ShopInfoDO shopInfo = shopService.getShopInfo(shopId);
String shopCode = shopInfo.getShopCode();
String data = coolStoreStartFlowService.getFirstOrder(shopCode).getData().toString();
log.info("saveOrder,data:{}", data);
if (data == null) {
throw new ServiceException(ErrorCodeEnum.GET_FIRST_ORDER);
}
if (data.equals("true")) {
//更改子阶段状态
shopStageInfoDAO.updateShopStageAndAuditInfo(shopId,
ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_151, null);
preparationService.whetherToOpenForAcceptance(shopId);
}
}
} catch (Exception e) {
log.error("获取鲜丰订货金异常", e);
}
ShopStageInfoDO firstOrderStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_15);
log.info("flush orderStageInfo:{}", firstOrderStageInfo);
OpenPreparationFlushVO flushVO = new OpenPreparationFlushVO();
flushVO.setShopId(shopId);
flushVO.setFirstOderState(firstOrderStageInfo.getShopSubStageStatus());
return ResponseResult.success(flushVO);
}
}

View File

@@ -1,39 +0,0 @@
package com.cool.store.controller.webc;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.OpeningOperationPlanAuditService;
import com.cool.store.service.OpeningOperationPlanService;
import com.cool.store.vo.OpeningOperationPlanVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* @Auther: WangShuo
* @Date: 2024/04/24/下午7:32
* @Version 1.0
* @注释:
*/
@RestController
@RequestMapping("/mini/openingOperationPlan")
@Api(tags = "开业运营方案操作")
@Slf4j
public class MiniOpeningOperationPlanController {
@Resource
private OpeningOperationPlanService openingOperationPlanService;
@Resource
private OpeningOperationPlanAuditService openingOperationPlanAuditService;
@GetMapping("/getPlan")
@ApiOperation("查询开业运营方案")
public ResponseResult<OpeningOperationPlanVO> getPlan(@RequestParam Long planId){
OpeningOperationPlanVO plan = openingOperationPlanService.getPlanById(planId);
return ResponseResult.success(plan);
}
}

View File

@@ -1,23 +1,29 @@
package com.cool.store.job; package com.cool.store.job;
import com.cool.store.dao.LineInfoDAO; import com.alibaba.fastjson.JSONObject;
import com.cool.store.dao.LineInterviewDAO; import com.cool.store.dao.*;
import com.cool.store.dto.openPreparation.OpenPlanShopInfoDTO;
import com.cool.store.entity.LeaseBaseInfoDO; import com.cool.store.entity.LeaseBaseInfoDO;
import com.cool.store.entity.LineInterviewDO; import com.cool.store.entity.LineInterviewDO;
import com.cool.store.enums.InterviewStatusEnum; import com.cool.store.enums.*;
import com.cool.store.enums.WorkflowStageEnum; import com.cool.store.enums.point.ShopSubStageStatusEnum;
import com.cool.store.enums.WorkflowSubStageEnum; import com.cool.store.exception.ServiceException;
import com.cool.store.enums.WorkflowSubStageStatusEnum;
import com.cool.store.mapper.LineInfoMapper; import com.cool.store.mapper.LineInfoMapper;
import com.cool.store.mapper.TrainingExperienceMapper; import com.cool.store.mapper.TrainingExperienceMapper;
import com.cool.store.mq.util.HttpRestTemplateService;
import com.cool.store.service.PreparationService;
import com.cool.store.utils.poi.constant.Constants;
import com.xxl.job.core.context.XxlJobHelper; import com.xxl.job.core.context.XxlJobHelper;
import com.xxl.job.core.handler.annotation.XxlJob; import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@Slf4j @Slf4j
@@ -27,15 +33,24 @@ public class XxlJobHandler {
@Resource @Resource
TrainingExperienceMapper trainingExperienceMapper; TrainingExperienceMapper trainingExperienceMapper;
@Value("${xfsg.url}")
private String xfsgUrl;
@Resource
private HttpRestTemplateService httpRestTemplateService;
@Resource @Resource
LineInfoMapper lineInfoMapper; LineInfoMapper lineInfoMapper;
@Resource
private PreparationService preparationService;
@Resource @Resource
private LineInterviewDAO lineInterviewDAO; private LineInterviewDAO lineInterviewDAO;
@Resource @Resource
private LineInfoDAO lineInfoDAO; private LineInfoDAO lineInfoDAO;
@Resource
private ShopInfoDAO shopInfoDAO;
@Resource
private ShopStageInfoDAO shopStageInfoDAO;
@Resource
private OpeningOperationPlanAuditDAO openingOperationPlanAuditDAO;
/** /**
* 每天都将待体验门店信息变更到体验中 * 每天都将待体验门店信息变更到体验中
*/ */
@@ -72,4 +87,41 @@ public class XxlJobHandler {
lineInterviewDAO.batchUpdateInterviewStatus(interviewIds, InterviewStatusEnum.WAIT_AUDIT); lineInterviewDAO.batchUpdateInterviewStatus(interviewIds, InterviewStatusEnum.WAIT_AUDIT);
XxlJobHelper.handleSuccess(); XxlJobHelper.handleSuccess();
} }
/**
* @Auther: wangshuo
* @Date: 2024/4/25
* @description:每天查询更新订货金
*/
@XxlJob("updateFirstOrder")
public void updateFirstOrder() {
log.info("----查询更新订货金----");
List<Long> shopIdListByStage = shopInfoDAO.queryShopIdListByStage();
if (CollectionUtils.isEmpty(shopIdListByStage)) {
log.info("------今日没有待更新数据------");
return;
}
List<Long> shopIdListByStageStatus = shopStageInfoDAO.getShopIdListByStageStatus(shopIdListByStage);
List<OpenPlanShopInfoDTO> openPlanShopInfoDTOS = shopInfoDAO.queryShopCodeListByid(shopIdListByStageStatus);
Map<Long, String> map = openPlanShopInfoDTOS.stream().
collect(Collectors.toMap(OpenPlanShopInfoDTO::getShopId, OpenPlanShopInfoDTO::getShopCode));
for (Long shopId : map.keySet()){
String shopCode = map.get(shopId);
try {
String url = xfsgUrl + Constants.FIRST_ORDER + "?storeCode=" + shopCode;
JSONObject jsonObject = httpRestTemplateService.getForObject(url, JSONObject.class, new HashMap<>());
log.info("updateFirstOrder url:{},jsonObject:{}",url,jsonObject);
String string = jsonObject.getString("data");
if (string == null) {
throw new ServiceException(ErrorCodeEnum.GET_FIRST_ORDER);
}
if (string.equals("true")) {
shopStageInfoDAO.updateShopStageAndAuditInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_151, null);
preparationService.whetherToOpenForAcceptance(shopId);
}
}catch (Exception e) {
log.error("获取鲜丰订货金异常",e);
}
}
}
} }

View File

@@ -1,5 +1,5 @@
spring.application.name=hsay-partner-web spring.application.name=hsay-partner-web
spring.profiles.active=@profileActive@ spring.profiles.active=test
server.port=40000 server.port=40000
server.servlet.context-path=/xfsg server.servlet.context-path=/xfsg