Merge remote-tracking branch 'origin/cc_partner_init' into cc_partner_init
This commit is contained in:
@@ -35,4 +35,8 @@ public class OpenAcceptanceInfoDAO {
|
||||
public int updateByPrimaryKeySelective(OpenAcceptanceInfoDO acceptanceInfoDO) {
|
||||
return openAcceptanceInfoMapper.updateByPrimaryKeySelective(acceptanceInfoDO);
|
||||
}
|
||||
|
||||
public int shopOpenAcceptanceStatusUpdate(){
|
||||
return openAcceptanceInfoMapper.shopOpenAcceptanceStatusUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -256,5 +256,13 @@ public class ShopStageInfoDAO {
|
||||
ShopSubStageEnum shopSubStageEnum = ShopSubStageEnum.SHOP_STAGE_16;
|
||||
return shopStageInfoMapper.getShopCountByLineIdAndStageStatus(lineId, shopSubStageEnum.getShopStageEnum().getShopStage(), shopSubStageEnum.getShopSubStage(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_00.getShopSubStageStatus());
|
||||
}
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/5/11
|
||||
* @description:获取处于a阶段或b阶段,和c阶段的
|
||||
*/
|
||||
public List<ShopStageInfoDO> getSubStageListBySubStageStatus(ShopSubStageStatusEnum a,ShopSubStageStatusEnum b, ShopSubStageStatusEnum c){
|
||||
|
||||
return shopStageInfoMapper.getSubStageListBySubStageStatus(a.getShopSubStageStatus(),b.getShopSubStageStatus(),c.getShopSubStageStatus());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,4 +12,6 @@ public interface OpenAcceptanceInfoMapper extends Mapper<OpenAcceptanceInfoDO> {
|
||||
|
||||
|
||||
List<OpenAcceptanceInfoListVO> openAcceptanceList(@Param("openAcceptance") OpenAcceptanceRequest openAcceptanceRequest);
|
||||
|
||||
int shopOpenAcceptanceStatusUpdate();
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.dto.Preparation.ScheduleDTO;
|
||||
import com.cool.store.entity.ShopStageInfoDO;
|
||||
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||
import com.cool.store.vo.shop.RentInfoToDoVO;
|
||||
import com.github.pagehelper.Page;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@@ -134,4 +135,10 @@ public interface ShopStageInfoMapper extends Mapper<ShopStageInfoDO> {
|
||||
* @return
|
||||
*/
|
||||
Integer getShopCountByLineIdAndStageStatus(@Param("lineId")Long lineId, @Param("shopStage") Integer shopStage, @Param("shopSubStage") Integer shopSubStage, @Param("shopSubStageStatus") Integer shopSubStageStatus);
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/5/11
|
||||
* @description:获取处于a阶段或b阶段,和c阶段的
|
||||
*/
|
||||
List<ShopStageInfoDO> getSubStageListBySubStageStatus(@Param("subStageStatusA")Integer subStageStatusA,@Param("subStageStatusB")Integer subStageStatusB,@Param("subStageStatusC")Integer subStageStatusC );
|
||||
}
|
||||
|
||||
@@ -24,13 +24,14 @@
|
||||
<result column="plan_acceptance_time" jdbcType="TIMESTAMP" property="planAcceptanceTime"/>
|
||||
<result column="actual_acceptance_time" jdbcType="TIMESTAMP" property="actualAcceptanceTime"/>
|
||||
<result column="booking_user" jdbcType="VARCHAR" property="bookingUser"/>
|
||||
<result column="plan_exit_time" jdbcType="TIMESTAMP" property="planExitTime"/>
|
||||
</resultMap>
|
||||
<sql id="baseColumn">
|
||||
id
|
||||
,shop_id,actual_entry_time,planned_completion_time,planned_start_time,decoration_planned_completion_time,
|
||||
decoration_planned_start_time,construction_completion_time,engineering_acceptance_signatures,
|
||||
operations_acceptance_signatures,partner_acceptance_signatures,
|
||||
create_time,update_time,deleted,plan_acceptance_time,actual_acceptance_time,booking_user
|
||||
create_time,update_time,deleted,plan_acceptance_time,actual_acceptance_time,booking_user,plan_exit_time
|
||||
</sql>
|
||||
<update id="updateByShopIDSelective">
|
||||
update xfsg_acceptance_info
|
||||
@@ -77,6 +78,9 @@
|
||||
<if test="bookingUser !=null ">
|
||||
booking_user =#{bookingUser},
|
||||
</if>
|
||||
<if test="planExitTime !=null">
|
||||
plan_exit_time =#{planExitTime}
|
||||
</if>
|
||||
</set>
|
||||
where shop_id = #{shopId}
|
||||
</update>
|
||||
|
||||
@@ -54,25 +54,25 @@
|
||||
<update id="batchUpdate">
|
||||
update xfsg_assessment_data
|
||||
<set>
|
||||
qualified = CASE id
|
||||
qualified = CASE template_id
|
||||
<foreach collection="AssessmentDataDOS" separator=" " item="item">
|
||||
WHEN #{item.id} THEN #{item.qualified}
|
||||
WHEN #{item.templateId} THEN #{item.qualified}
|
||||
</foreach>
|
||||
END,
|
||||
reason = CASE id
|
||||
reason = CASE template_id
|
||||
<foreach collection="AssessmentDataDOS" separator=" " item="item">
|
||||
WHEN #{item.id} THEN #{item.reason}
|
||||
WHEN #{item.templateId} THEN #{item.reason}
|
||||
</foreach>
|
||||
END,
|
||||
comments = CASE id
|
||||
comments = CASE template_id
|
||||
<foreach collection="AssessmentDataDOS" separator=" " item="item">
|
||||
WHEN #{item.id} THEN #{item.comments}
|
||||
WHEN #{item.templateId} THEN #{item.comments}
|
||||
</foreach>
|
||||
END
|
||||
</set>
|
||||
where id in (
|
||||
where template_id in (
|
||||
<foreach collection="AssessmentDataDOS" item="item" separator=",">
|
||||
#{item.id}
|
||||
#{item.templateId}
|
||||
</foreach>
|
||||
)
|
||||
</update>
|
||||
|
||||
@@ -27,7 +27,23 @@
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
|
||||
<update id="shopOpenAcceptanceStatusUpdate">
|
||||
UPDATE xfsg_shop_stage_info s
|
||||
SET shop_sub_stage_status = 1710
|
||||
WHERE
|
||||
shop_sub_stage_status = 1700
|
||||
AND shop_id IN (
|
||||
SELECT
|
||||
shop_id
|
||||
FROM
|
||||
xfsg_open_acceptance_info
|
||||
WHERE
|
||||
acceptance_status = 1
|
||||
AND plan_open_time BETWEEN DATE_SUB( NOW( ), INTERVAL 7 DAY )
|
||||
AND DATE_SUB( NOW( ), INTERVAL 3 DAY )
|
||||
)
|
||||
</update>
|
||||
|
||||
<select id="openAcceptanceList" resultType="com.cool.store.vo.OpenAcceptanceInfoListVO">
|
||||
SELECT
|
||||
o.id AS openAcceptanceInfoId,
|
||||
|
||||
@@ -265,4 +265,18 @@
|
||||
<select id="getShopCountByLineIdAndStageStatus" resultType="integer">
|
||||
select count(1) from xfsg_shop_stage_info where shop_stage = #{shopStage} and shop_sub_stage = #{shopSubStage} and shop_sub_stage_status = #{shopSubStageStatus} and line_id = #{lineId}
|
||||
</select>
|
||||
<select id="getSubStageListBySubStageStatus" resultType="com.cool.store.entity.ShopStageInfoDO">
|
||||
select *
|
||||
from xfsg_shop_stage_info
|
||||
where 1=1
|
||||
<if test="subStageStatusA !=null">
|
||||
or shop_sub_stage_status = #{subStageStatusA}
|
||||
</if>
|
||||
<if test="subStageStatusB !=null">
|
||||
or shop_sub_stage_status = #{subStageStatusB}
|
||||
</if>
|
||||
<if test="subStageStatusC !=null">
|
||||
and shop_sub_stage_status = #{subStageStatusC}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -3,6 +3,7 @@ package com.cool.store.dto.decoration;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -10,7 +11,7 @@ import java.util.List;
|
||||
* @Date 2024/4/28 15:17
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
|
||||
public class BudgetDTO {
|
||||
@ApiModelProperty("预算主键")
|
||||
private Long id;
|
||||
@@ -19,15 +20,87 @@ public class BudgetDTO {
|
||||
@ApiModelProperty("计价类型")
|
||||
private String type;
|
||||
@ApiModelProperty("合计")
|
||||
private String vzHj;
|
||||
private BigDecimal vzHj;
|
||||
@ApiModelProperty("取费合计")
|
||||
private String totalAmount;
|
||||
private BigDecimal totalAmount;
|
||||
@ApiModelProperty("成本合计")
|
||||
private String totalCost;
|
||||
private BigDecimal totalCost;
|
||||
@ApiModelProperty("创建时间")
|
||||
private String createDate;
|
||||
@ApiModelProperty("创建人")
|
||||
private String createBy;
|
||||
@ApiModelProperty("预算详情")
|
||||
private List<BudgetDetailDTO> details;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public BigDecimal getVzHj() {
|
||||
return vzHj;
|
||||
}
|
||||
|
||||
public void setVzHj(BigDecimal vzHj) {
|
||||
this.vzHj = vzHj.setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
}
|
||||
|
||||
public BigDecimal getTotalAmount() {
|
||||
return totalAmount;
|
||||
}
|
||||
|
||||
public void setTotalAmount(BigDecimal totalAmount) {
|
||||
this.totalAmount = totalAmount.setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
}
|
||||
|
||||
public BigDecimal getTotalCost() {
|
||||
return totalCost;
|
||||
}
|
||||
|
||||
public void setTotalCost(BigDecimal totalCost) {
|
||||
this.totalCost = totalCost.setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
}
|
||||
|
||||
public String getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(String createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
public String getCreateBy() {
|
||||
return createBy;
|
||||
}
|
||||
|
||||
public void setCreateBy(String createBy) {
|
||||
this.createBy = createBy;
|
||||
}
|
||||
|
||||
public List<BudgetDetailDTO> getDetails() {
|
||||
return details;
|
||||
}
|
||||
|
||||
public void setDetails(List<BudgetDetailDTO> details) {
|
||||
this.details = details;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,19 +25,19 @@ public class BudgetDetailDTO {
|
||||
@ApiModelProperty("预算工程量")
|
||||
private String amount;
|
||||
@ApiModelProperty("单价")
|
||||
private String unitPrice;
|
||||
private BigDecimal unitPrice;
|
||||
@ApiModelProperty("预算合计")
|
||||
private String totalPrice;
|
||||
private BigDecimal totalPrice;
|
||||
@ApiModelProperty("人工单价")
|
||||
private String labour;
|
||||
private BigDecimal labour;
|
||||
@ApiModelProperty("材料单价")
|
||||
private String material;
|
||||
private BigDecimal material;
|
||||
@ApiModelProperty("主材成本")
|
||||
private String mainMaterialCostPrice;
|
||||
private BigDecimal mainMaterialCostPrice;
|
||||
@ApiModelProperty("辅材成本")
|
||||
private String auxiliaryMaterialCostPrice;
|
||||
private BigDecimal auxiliaryMaterialCostPrice;
|
||||
@ApiModelProperty("人工成本")
|
||||
private String labourCostPrice;
|
||||
private BigDecimal labourCostPrice;
|
||||
@ApiModelProperty("结算工程量")
|
||||
private String remark;
|
||||
@ApiModelProperty("结算合计")
|
||||
@@ -49,9 +49,177 @@ public class BudgetDetailDTO {
|
||||
@ApiModelProperty("损耗单价")
|
||||
private BigDecimal lossPrice;
|
||||
@ApiModelProperty("计划利润")
|
||||
private String planProfit;
|
||||
private BigDecimal planProfit;
|
||||
@ApiModelProperty("利润率")
|
||||
private BigDecimal profitRate;
|
||||
@ApiModelProperty("唯一供应商")
|
||||
private String supplierName;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getNodeType() {
|
||||
return nodeType;
|
||||
}
|
||||
|
||||
public void setNodeType(String nodeType) {
|
||||
this.nodeType = nodeType;
|
||||
}
|
||||
|
||||
public String getNumber() {
|
||||
return number;
|
||||
}
|
||||
|
||||
public void setNumber(String number) {
|
||||
this.number = number;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getUnitName() {
|
||||
return unitName;
|
||||
}
|
||||
|
||||
public void setUnitName(String unitName) {
|
||||
this.unitName = unitName;
|
||||
}
|
||||
|
||||
public String getAmount() {
|
||||
return amount;
|
||||
}
|
||||
|
||||
public void setAmount(String amount) {
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public BigDecimal getUnitPrice() {
|
||||
return unitPrice;
|
||||
}
|
||||
|
||||
public void setUnitPrice(BigDecimal unitPrice) {
|
||||
this.unitPrice = unitPrice.setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
}
|
||||
|
||||
public BigDecimal getTotalPrice() {
|
||||
return totalPrice;
|
||||
}
|
||||
|
||||
public void setTotalPrice(BigDecimal totalPrice) {
|
||||
this.totalPrice = totalPrice.setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
}
|
||||
|
||||
public BigDecimal getLabour() {
|
||||
return labour;
|
||||
}
|
||||
|
||||
public void setLabour(BigDecimal labour) {
|
||||
this.labour = labour.setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
}
|
||||
|
||||
public BigDecimal getMaterial() {
|
||||
return material;
|
||||
}
|
||||
|
||||
public void setMaterial(BigDecimal material) {
|
||||
this.material = material.setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
}
|
||||
|
||||
public BigDecimal getMainMaterialCostPrice() {
|
||||
return mainMaterialCostPrice;
|
||||
}
|
||||
|
||||
public void setMainMaterialCostPrice(BigDecimal mainMaterialCostPrice) {
|
||||
this.mainMaterialCostPrice = mainMaterialCostPrice.setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
}
|
||||
|
||||
public BigDecimal getAuxiliaryMaterialCostPrice() {
|
||||
return auxiliaryMaterialCostPrice;
|
||||
}
|
||||
|
||||
public void setAuxiliaryMaterialCostPrice(BigDecimal auxiliaryMaterialCostPrice) {
|
||||
this.auxiliaryMaterialCostPrice = auxiliaryMaterialCostPrice.setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
}
|
||||
|
||||
public BigDecimal getLabourCostPrice() {
|
||||
return labourCostPrice;
|
||||
}
|
||||
|
||||
public void setLabourCostPrice(BigDecimal labourCostPrice) {
|
||||
this.labourCostPrice = labourCostPrice.setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public BigDecimal getLoss() {
|
||||
return loss;
|
||||
}
|
||||
|
||||
public void setLoss(BigDecimal loss) {
|
||||
this.loss = loss.setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
}
|
||||
|
||||
public BigDecimal getTotalCost() {
|
||||
return totalCost;
|
||||
}
|
||||
|
||||
public void setTotalCost(BigDecimal totalCost) {
|
||||
this.totalCost = totalCost.setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
}
|
||||
|
||||
public BigDecimal getCost() {
|
||||
return cost;
|
||||
}
|
||||
|
||||
public void setCost(BigDecimal cost) {
|
||||
this.cost = cost.setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
}
|
||||
|
||||
public BigDecimal getLossPrice() {
|
||||
return lossPrice;
|
||||
}
|
||||
|
||||
public void setLossPrice(BigDecimal lossPrice) {
|
||||
this.lossPrice = lossPrice.setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
}
|
||||
|
||||
public BigDecimal getPlanProfit() {
|
||||
return planProfit;
|
||||
}
|
||||
|
||||
public void setPlanProfit(BigDecimal planProfit) {
|
||||
this.planProfit = planProfit.setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
}
|
||||
|
||||
public BigDecimal getProfitRate() {
|
||||
return profitRate;
|
||||
}
|
||||
|
||||
public void setProfitRate(BigDecimal profitRate) {
|
||||
this.profitRate = profitRate.setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
}
|
||||
|
||||
public String getSupplierName() {
|
||||
return supplierName;
|
||||
}
|
||||
|
||||
public void setSupplierName(String supplierName) {
|
||||
this.supplierName = supplierName;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package com.cool.store.entity;
|
||||
|
||||
import java.util.Date;
|
||||
import javax.persistence.*;
|
||||
|
||||
@@ -82,20 +83,37 @@ public class AcceptanceInfoDO {
|
||||
/**
|
||||
* 是否删除:0.否 1.是
|
||||
*/
|
||||
@Column(name = "deleted")
|
||||
private Boolean deleted;
|
||||
/**
|
||||
* 计划验收时间
|
||||
*/
|
||||
@Column(name = "plan_acceptance_time")
|
||||
private Date planAcceptanceTime;
|
||||
|
||||
/**
|
||||
* 实际验收时间
|
||||
*/
|
||||
@Column(name = "actual_acceptance_time")
|
||||
private Date actualAcceptanceTime;
|
||||
/**
|
||||
* 预约人
|
||||
*/
|
||||
@Column(name = "booking_user")
|
||||
private String bookingUser;
|
||||
/**
|
||||
*计划撤场时间
|
||||
*/
|
||||
@Column(name = "plan_exit_time")
|
||||
private Date planExitTime;
|
||||
|
||||
public Date getPlanExitTime() {
|
||||
return planExitTime;
|
||||
}
|
||||
|
||||
public void setPlanExitTime(Date planExitTime) {
|
||||
this.planExitTime = planExitTime;
|
||||
}
|
||||
|
||||
public Date getPlanAcceptanceTime() {
|
||||
return planAcceptanceTime;
|
||||
|
||||
@@ -107,7 +107,8 @@ public class XfsgTrainingPersonSyncListener implements MessageListener {
|
||||
TempUserDetailDO tempUserDetailDO = fillTempUserDetailDO(shopInfoDO, staffBaseInfoDTO);
|
||||
tempUserDetailDAO.insertSelective(tempUserDetailDO);
|
||||
}
|
||||
}else if(checkTempUserDetailDO != null && checkTempUserDetailDO.getShopId() == 0L){
|
||||
}else if(checkTempUserDetailDO != null &&
|
||||
(checkTempUserDetailDO.getShopId() == 0L || checkTempUserDetailDO.getShopId() != shopInfoDO.getId())){
|
||||
// 已录入,但是没有店铺id
|
||||
checkTempUserDetailDO.setLineId(shopInfoDO.getLineId());
|
||||
checkTempUserDetailDO.setShopId(shopInfoDO.getId());
|
||||
|
||||
@@ -112,5 +112,10 @@ public interface DecorationService {
|
||||
* @description:获取验收列表
|
||||
*/
|
||||
PageInfo<fitmentCheckVO> getFitmentAcceptanceList(AcceptanceListRequest request, LoginUserInfo user);
|
||||
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/5/11
|
||||
* @description:获取验收列表详情
|
||||
*/
|
||||
fitmentCheckVO getAcceptanceDetail(Long shopId, LoginUserInfo user);
|
||||
}
|
||||
|
||||
@@ -32,4 +32,5 @@ public interface OpeningOperationPlanService {
|
||||
*/
|
||||
PageInfo<OpeningOperationPlanListVO> getPlanListPage(PlanListRequest request);
|
||||
Boolean flush(Long shopId);
|
||||
Boolean getStatus(Long shopId);
|
||||
}
|
||||
|
||||
@@ -97,6 +97,7 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
private CommonService commonService;
|
||||
@Resource
|
||||
private AssessmentTemplateService assessmentTemplateService;
|
||||
|
||||
@Override
|
||||
public DesignInfoVo DesignInfo(Long shopId) {
|
||||
DecorationDTO decoration = getDecorationDTO(shopId);
|
||||
@@ -176,14 +177,13 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
//预算
|
||||
BudgetDTO proposedBookBudget = getBudgetDTOS(decoration);
|
||||
if (proposedBookBudget == null) return null;
|
||||
String vzHj = proposedBookBudget.getVzHj();
|
||||
BigDecimal vzHj = proposedBookBudget.getVzHj();
|
||||
//支付二维码url
|
||||
Long regionId = shopInfoDAO.getRegionIdByid(shopId);
|
||||
String payPic = regionQrcodeConfigDao.getPayPicByRegionId(regionId);
|
||||
DecorationModelDTO decorationModelDTO = new DecorationModelDTO();
|
||||
decorationModelDTO.setPayUrl(payPic);
|
||||
BigDecimal totalAmount = new BigDecimal(vzHj);
|
||||
decorationModelDTO.setTotalAmount(totalAmount.setScale(2, RoundingMode.HALF_UP));
|
||||
decorationModelDTO.setTotalAmount(vzHj);
|
||||
return decorationModelDTO;
|
||||
}
|
||||
|
||||
@@ -285,6 +285,7 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
name.add(CommonConstants.EIGHT_DAY);
|
||||
name.add(CommonConstants.WITHDRAWAL);
|
||||
ConstructionScheduleDTO approach = new ConstructionScheduleDTO();
|
||||
AcceptanceInfoDO acceptanceInfoDO = acceptanceInfoDAO.selectByShopId(shopId);
|
||||
ConstructionScheduleDTO constructionSage = new ConstructionScheduleDTO();
|
||||
for (ConstructionScheduleDTO constructionScheduleDTO : constructionSchedule) {
|
||||
if (name.contains(constructionScheduleDTO.getName())) {
|
||||
@@ -292,27 +293,35 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
if (constructionScheduleDTO.getName().equals(CommonConstants.APPROACH)) {
|
||||
approach = constructionScheduleDTO;
|
||||
}
|
||||
//计划撤场时间
|
||||
if (constructionScheduleDTO.getName().equals(CommonConstants.WITHDRAWAL)) {
|
||||
ConstructionScheduleDTO withdrawal = constructionScheduleDTO;
|
||||
if (Objects.nonNull(acceptanceInfoDO)) {
|
||||
Date date = CoolDateUtils.parseDate(withdrawal.getPlanBeginDate(), CoolDateUtils.DATE_FORMAT_DAY);
|
||||
acceptanceInfoDO.setPlanExitTime(date);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (constructionScheduleDTO.getName().equals(CommonConstants.CONSTRUCTION_PHASE)) {
|
||||
constructionSage = constructionScheduleDTO;
|
||||
}
|
||||
}
|
||||
//设置进场时间xfsg_acceptance_info
|
||||
AcceptanceInfoDO acceptanceInfoDO = acceptanceInfoDAO.selectByShopId(shopId);
|
||||
if (Objects.nonNull(acceptanceInfoDO) && StringUtils.isNotEmpty(approach.getActualBeginDate())) {
|
||||
Date date = CoolDateUtils.parseDate(approach.getActualBeginDate(), CoolDateUtils.DATE_FORMAT_DAY);
|
||||
acceptanceInfoDO.setActualEntryTime(date);
|
||||
}
|
||||
|
||||
//施工完成时间,计划开始和完成时间 //
|
||||
if (StringUtils.isNotEmpty(constructionSage.getActualEndDate())) {
|
||||
if (Objects.nonNull(acceptanceInfoDO) && StringUtils.isNotEmpty(constructionSage.getActualEndDate())) {
|
||||
Date date = CoolDateUtils.parseDate(constructionSage.getActualEndDate(), CoolDateUtils.DATE_FORMAT_DAY);
|
||||
acceptanceInfoDO.setConstructionCompletionTime(date);
|
||||
}
|
||||
if (StringUtils.isNotEmpty(constructionSage.getPlanBeginDate())) {
|
||||
if (Objects.nonNull(acceptanceInfoDO) && StringUtils.isNotEmpty(constructionSage.getPlanBeginDate())) {
|
||||
Date date = CoolDateUtils.parseDate(constructionSage.getPlanBeginDate(), CoolDateUtils.DATE_FORMAT_DAY);
|
||||
acceptanceInfoDO.setPlannedStartTime(date);
|
||||
}
|
||||
if (StringUtils.isNotEmpty(constructionSage.getPlanEndDate())) {
|
||||
if (Objects.nonNull(acceptanceInfoDO) && StringUtils.isNotEmpty(constructionSage.getPlanEndDate())) {
|
||||
Date date = CoolDateUtils.parseDate(constructionSage.getPlanEndDate(), CoolDateUtils.DATE_FORMAT_DAY);
|
||||
acceptanceInfoDO.setPlannedCompletionTime(date);
|
||||
}
|
||||
@@ -363,7 +372,7 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
List<AssessmentTemplateVO> assessmentTemplateVOS = assessmentTemplateService.listByType(AssessmentTemplateType.TRIPARTITE_ACCEPTANCE.getCode());
|
||||
Long max = assessmentTemplateVOS.stream().mapToLong(AssessmentTemplateVO::getId).max().orElse(0L);
|
||||
Long min = assessmentTemplateVOS.stream().mapToLong(AssessmentTemplateVO::getId).min().orElse(0L);
|
||||
List<AssessmentDataDO> assessmentDataDOList = assessmentDataDAO.selectListByShopId(request.getShopId(), min,max);
|
||||
List<AssessmentDataDO> assessmentDataDOList = assessmentDataDAO.selectListByShopId(request.getShopId(), min, max);
|
||||
List<AssessmentDataDO> assessmentDataDOS = new ArrayList<>();
|
||||
for (AssessmentDataDTO assessmentDataDTO : request.getAssessmentDataDTOS()) {
|
||||
AssessmentDataDO assessmentDataDO = new AssessmentDataDO();
|
||||
@@ -381,6 +390,7 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
} else {
|
||||
assessmentDataService.batchInsertSelective(assessmentDataDOS);
|
||||
}
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_122);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@@ -389,7 +399,7 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
List<AssessmentTemplateVO> assessmentTemplateVOS = assessmentTemplateService.listByType(AssessmentTemplateType.TRIPARTITE_ACCEPTANCE.getCode());
|
||||
Long max = assessmentTemplateVOS.stream().mapToLong(AssessmentTemplateVO::getId).max().orElse(0L);
|
||||
Long min = assessmentTemplateVOS.stream().mapToLong(AssessmentTemplateVO::getId).min().orElse(0L);
|
||||
List<AssessmentDataDO> assessmentDataDOS = assessmentDataDAO.selectListByShopId(shopId,min,max);
|
||||
List<AssessmentDataDO> assessmentDataDOS = assessmentDataDAO.selectListByShopId(shopId, min, max);
|
||||
if (CollectionUtils.isEmpty(assessmentDataDOS)) {
|
||||
log.error("该用户门店三方验收检查项为空");
|
||||
return null;
|
||||
@@ -467,7 +477,7 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
}
|
||||
Map<Long, ShopInfoDO> ShopIdmap = shopInfoDOS.stream().collect(Collectors.toMap(ShopInfoDO::getId, dto1 -> dto1));
|
||||
//招商经理,选址人员(拓展经理)id
|
||||
List<Long> lineIds = shopInfoDOS.stream().filter(o->o.getLineId()!=null)
|
||||
List<Long> lineIds = shopInfoDOS.stream().filter(o -> o.getLineId() != null)
|
||||
.map(ShopInfoDO::getLineId).distinct().collect(Collectors.toList());
|
||||
List<LineInfoDO> lineInfos = lineInfoMapper.getByLineIds(lineIds);
|
||||
Map<Long, LineInfoDO> lineInfoDOMap = lineInfos.stream().collect(Collectors.toMap(LineInfoDO::getId, dto -> dto));
|
||||
@@ -532,7 +542,7 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
}
|
||||
}
|
||||
if (Objects.nonNull(ShopStageInfoDOMap.get(shopId))) {
|
||||
fitmentCheckVO.setShopSubStageStatus(ShopStageInfoDOMap.get(shopId).getShopSubStageStatus());
|
||||
fitmentCheckVO.setShopSubStageStatus(ShopStageInfoDOMap.get(shopId).getShopSubStageStatus());
|
||||
}
|
||||
fitmentCheckVOList.add(fitmentCheckVO);
|
||||
}
|
||||
@@ -540,6 +550,59 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
return pageInfo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public fitmentCheckVO getAcceptanceDetail(Long shopId, LoginUserInfo user) {
|
||||
fitmentCheckVO fitmentCheckVO = new fitmentCheckVO();
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
||||
if (Objects.isNull(shopInfo)) {
|
||||
log.error("店铺信息不存在 shopId:{}", shopId);
|
||||
return null;
|
||||
}
|
||||
//招商经理,选址人员(拓展经理)id
|
||||
Long lineId = shopInfo.getLineId();
|
||||
LineInfoDO lineInfo = lineInfoMapper.getByLineId(lineId);
|
||||
if (Objects.isNull(lineInfo)) {
|
||||
log.error("线索信息不存在 shopId:{}", shopId);
|
||||
return null;
|
||||
}
|
||||
//招商name
|
||||
List<String> userIds = new ArrayList<>();
|
||||
userIds.add(lineInfo.getInvestmentManager());
|
||||
//选址人员(拓展经理)name
|
||||
userIds.add(lineInfo.getDevelopmentManager());
|
||||
Map<String, String> userNameMap = enterpriseUserDAO.getUserNameMap(userIds);
|
||||
//所属战区
|
||||
Long regionId = shopInfo.getRegionId();
|
||||
String regionName = regionService.getBelongWarRegionName(regionId);
|
||||
//战区经理name
|
||||
String fightMangerUserId = sysRoleService.getUserIdByRegionIdWithRolePriority(regionId, Arrays.asList(UserRoleEnum.THEATER_MANAGER));
|
||||
String fightName = enterpriseUserDAO.getUserName(fightMangerUserId);
|
||||
//施工计划完成时间 //施工实际完成实际//计划验收时间//验收实际时间
|
||||
AcceptanceInfoDO acceptanceInfoDOS = acceptanceInfoDAO.selectByShopId(shopId);
|
||||
//验收状态
|
||||
ShopStageInfoDO subStage = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_12);
|
||||
fitmentCheckVO.setShopId(shopId);
|
||||
fitmentCheckVO.setLineId(lineId);
|
||||
fitmentCheckVO.setShopName(shopInfo.getShopName());
|
||||
fitmentCheckVO.setStoreNum(shopInfo.getStoreNum());
|
||||
fitmentCheckVO.setPartnerName(lineInfo.getUsername());
|
||||
fitmentCheckVO.setRegionId(regionId);
|
||||
fitmentCheckVO.setRegion(regionName);
|
||||
fitmentCheckVO.setFightManager(fightName);
|
||||
if (userNameMap != null) {
|
||||
fitmentCheckVO.setInvestmentManager(userNameMap.get(lineInfo.getInvestmentManager()));
|
||||
fitmentCheckVO.setSitterName(userNameMap.get(lineInfo.getDevelopmentManager()));
|
||||
}
|
||||
if (Objects.nonNull(acceptanceInfoDOS)) {
|
||||
fitmentCheckVO.setPlanEndTime(acceptanceInfoDOS.getDecorationPlannedCompletionTime());
|
||||
fitmentCheckVO.setActualEndTime(acceptanceInfoDOS.getConstructionCompletionTime());
|
||||
fitmentCheckVO.setPlanAcceptanceTime(acceptanceInfoDOS.getPlanAcceptanceTime());
|
||||
fitmentCheckVO.setAcceptanceTime(acceptanceInfoDOS.getActualAcceptanceTime());
|
||||
}
|
||||
fitmentCheckVO.setShopSubStageStatus(subStage.getShopSubStageStatus());
|
||||
return fitmentCheckVO;
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public Boolean pcSubmitAcceptanceSign(ThreeAcceptanceRequest request) {
|
||||
@@ -607,7 +670,7 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean bookingAcceptance(BookingAcceptanceRequest request,LoginUserInfo user) {
|
||||
public Boolean bookingAcceptance(BookingAcceptanceRequest request, LoginUserInfo user) {
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_121);
|
||||
ShopStageInfoDO newShopStageInfoDO = new ShopStageInfoDO();
|
||||
SimpleDateFormat sdf = new SimpleDateFormat(CoolDateUtils.DATE_FORMAT_SEC);
|
||||
|
||||
@@ -12,6 +12,7 @@ import com.cool.store.entity.*;
|
||||
import com.cool.store.enums.AssessmentTemplateType;
|
||||
import com.cool.store.enums.ExamStatusEnum;
|
||||
import com.cool.store.enums.MessageEnum;
|
||||
import com.cool.store.enums.UserRoleEnum;
|
||||
import com.cool.store.enums.video.ResourceStatusEnum;
|
||||
import com.cool.store.enums.video.UploadTypeEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
@@ -492,7 +493,12 @@ public class EmployeeTrainingServiceImpl implements EmployeeTrainingService {
|
||||
Map<Long, String> regionNameMap = regionService.getBelongWarRegionNameMap(Collections.singletonList(employeeTrainingDO.getRegionId()));
|
||||
assessmentUserTrainingVO.setRegionNodeName(regionNameMap.get(employeeTrainingDO.getRegionId()));
|
||||
|
||||
List<AssessmentTemplateDO> assessmentTemplateDOList = assessmentTemplateDAO.listByType(AssessmentTemplateType.STORE_MANAGER.getCode());
|
||||
Integer templateType = AssessmentTemplateType.STORE_MANAGER.getCode();
|
||||
if(UserRoleEnum.XFSG_CLERK.getCode().equals(tempUserDetailDO.getRoleId())){
|
||||
templateType = AssessmentTemplateType.CLERK.getCode();
|
||||
}
|
||||
|
||||
List<AssessmentTemplateDO> assessmentTemplateDOList = assessmentTemplateDAO.listByType(templateType);
|
||||
|
||||
List<Long> templateIdList = assessmentTemplateDOList.stream().map(AssessmentTemplateDO::getId).collect(Collectors.toList());
|
||||
|
||||
@@ -553,8 +559,11 @@ public class EmployeeTrainingServiceImpl implements EmployeeTrainingService {
|
||||
EnterpriseUserDO enterpriseUserDO = enterpriseUserDAO.getUserInfoByThirdOaUniqueFlag(tempUserDetailDO.getIdCard());
|
||||
String userId = enterpriseUserDO.getUserId();
|
||||
AtomicReference<Long> totalScore = new AtomicReference<>(0L);
|
||||
|
||||
List<AssessmentTemplateDO> assessmentTemplateDOList = assessmentTemplateDAO.listByType(AssessmentTemplateType.STORE_MANAGER.getCode());
|
||||
Integer templateType = AssessmentTemplateType.STORE_MANAGER.getCode();
|
||||
if(UserRoleEnum.XFSG_CLERK.getCode().equals(tempUserDetailDO.getRoleId())){
|
||||
templateType = AssessmentTemplateType.CLERK.getCode();
|
||||
}
|
||||
List<AssessmentTemplateDO> assessmentTemplateDOList = assessmentTemplateDAO.listByType(templateType);
|
||||
|
||||
List<Long> templateIdList = assessmentTemplateDOList.stream().map(AssessmentTemplateDO::getId).collect(Collectors.toList());
|
||||
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import com.cool.store.dao.NewStoreOpeningDAO;
|
||||
import com.cool.store.dao.ShopStageInfoDAO;
|
||||
import com.cool.store.entity.NewStoreOpeningDO;
|
||||
import com.cool.store.entity.ShopStageInfoDO;
|
||||
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.NewStoreOpeningRequest;
|
||||
import com.cool.store.service.NewStoreOpeningService;
|
||||
import com.cool.store.vo.NewStoreOpeningVO;
|
||||
@@ -22,6 +27,9 @@ public class NewStoreOpeningServiceImpl implements NewStoreOpeningService {
|
||||
@Resource
|
||||
private NewStoreOpeningDAO newStoreOpeningDAO;
|
||||
|
||||
@Resource
|
||||
private ShopStageInfoDAO shopStageInfoDAO;
|
||||
|
||||
@Override
|
||||
public List<NewStoreOpeningVO> storeTodoList(Long shopId) {
|
||||
List<NewStoreOpeningDO> storeOpeningDOList = newStoreOpeningDAO.storeTodoList(shopId);
|
||||
@@ -41,6 +49,13 @@ public class NewStoreOpeningServiceImpl implements NewStoreOpeningService {
|
||||
|
||||
@Override
|
||||
public void addStoreTodo(NewStoreOpeningRequest newStoreOpeningRequest) {
|
||||
// 判断是否可以添加
|
||||
ShopStageInfoDO shopStageInfoDO = shopStageInfoDAO.getShopSubStageInfo(newStoreOpeningRequest.getShopId(), ShopSubStageEnum.SHOP_STAGE_17);
|
||||
|
||||
if(shopStageInfoDO != null && shopStageInfoDO.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_171.getShopSubStageStatus())){
|
||||
throw new ServiceException("该店铺已经完成试运营,不能再添加待办事项");
|
||||
}
|
||||
|
||||
NewStoreOpeningDO newStoreOpeningDO = new NewStoreOpeningDO();
|
||||
newStoreOpeningDO.setShopId(newStoreOpeningRequest.getShopId());
|
||||
newStoreOpeningDO.setTodoItem(newStoreOpeningRequest.getTodoItem());
|
||||
|
||||
@@ -10,6 +10,7 @@ import com.cool.store.entity.ShopStageInfoDO;
|
||||
import com.cool.store.enums.point.ShopStageEnum;
|
||||
import com.cool.store.enums.point.ShopSubStageEnum;
|
||||
import com.cool.store.enums.point.ShopSubStageFieldEnum;
|
||||
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.request.OpenAcceptanceRequest;
|
||||
import com.cool.store.request.ShopAcceptanceRequest;
|
||||
@@ -143,6 +144,10 @@ public class OpenAcceptanceInfoServiceImpl implements OpenAcceptanceInfoService
|
||||
shopInfoDO.setId(shopAcceptanceRequest.getShopId());
|
||||
shopInfoDO.setPlanOpenTime(shopAcceptanceRequest.getPlanOpenTime());
|
||||
shopInfoDAO.updateShopInfo(shopInfoDO);
|
||||
//开业验收完成
|
||||
shopStageInfoDAO.updateShopStageInfo(shopInfoDO.getId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_161);
|
||||
//新店开业试运营
|
||||
shopStageInfoDAO.updateShopStageInfo(shopInfoDO.getId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_170);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -197,7 +197,7 @@ public class OpeningOperationPlanImpl implements OpeningOperationPlanService {
|
||||
public Boolean flush(Long shopId) {
|
||||
ShopStageInfoDO orderStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_15);
|
||||
try {
|
||||
if (!ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_151.getShopSubStageStatus().
|
||||
if (ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_152.getShopSubStageStatus().
|
||||
equals(orderStageInfo.getShopSubStageStatus())) {
|
||||
ShopInfoDO shopInfo = shopService.getShopInfo(shopId);
|
||||
String shopCode = shopInfo.getShopCode();
|
||||
@@ -218,5 +218,19 @@ public class OpeningOperationPlanImpl implements OpeningOperationPlanService {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean getStatus(Long shopId) {
|
||||
try{
|
||||
ShopInfoDO shopInfo = shopService.getShopInfo(shopId);
|
||||
String shopCode = shopInfo.getShopCode();
|
||||
Boolean firstOrder = coolStoreStartFlowService.getFirstOrder(shopCode);
|
||||
return firstOrder;
|
||||
}catch (Exception e){
|
||||
log.error("获取鲜丰订货金异常或更新状态失败");
|
||||
throw new ServiceException(ErrorCodeEnum.YLF_ERROR);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.cool.store.utils.poi;
|
||||
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.time.DateFormatUtils;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.lang.management.ManagementFactory;
|
||||
import java.text.ParseException;
|
||||
@@ -223,4 +224,17 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
|
||||
}
|
||||
return new SimpleDateFormat(YYYY_MM_DD_HH_MM_SS).format(new Date(time));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @Date: 2024/5/11
|
||||
* @description:获取X天后的时间 LocalDate
|
||||
*/
|
||||
public static LocalDate getPlusFDays(Date date, Integer days) {
|
||||
Instant instant = date.toInstant();
|
||||
ZoneId zone = ZoneId.systemDefault();
|
||||
LocalDate localDate = instant.atZone(zone).toLocalDate();
|
||||
LocalDate datePlusFDays = localDate.plusDays(days);
|
||||
return datePlusFDays;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,6 +70,12 @@ public class PCDecorationController {
|
||||
LoginUserInfo user = CurrentUserHolder.getUser();
|
||||
return ResponseResult.success(decorationService.getFitmentAcceptanceList(request,user));
|
||||
}
|
||||
@ApiOperation("获取验收列表详情")
|
||||
@GetMapping("/getAcceptanceDetail")
|
||||
public ResponseResult<fitmentCheckVO> getAcceptanceDetail(@RequestParam("shopId") Long shopId){
|
||||
LoginUserInfo user = CurrentUserHolder.getUser();
|
||||
return ResponseResult.success(decorationService.getAcceptanceDetail(shopId,user));
|
||||
}
|
||||
@ApiOperation("预约验收")
|
||||
@PostMapping("/bookingAcceptance")
|
||||
public ResponseResult<Boolean> submitBookingAcceptance(@RequestBody BookingAcceptanceRequest response){
|
||||
|
||||
@@ -18,6 +18,7 @@ import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.*;
|
||||
import com.cool.store.vo.OpeningOperationPlanListVO;
|
||||
import com.cool.store.vo.OpeningOperationPlanVO;
|
||||
import com.cool.store.vo.shop.ShopStageInfoVO;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -52,7 +53,11 @@ public class PCOpenPreparationController {
|
||||
public ResponseResult<Boolean> flush(@RequestParam("shopId") Long shopId) {
|
||||
return ResponseResult.success(openingOperationPlanService.flush(shopId));
|
||||
}
|
||||
|
||||
@ApiOperation("获取鲜丰订货金状态")
|
||||
@GetMapping("/getStatus")
|
||||
public ResponseResult<Boolean> getStatus(@RequestParam("shopId") Long shopId) {
|
||||
return ResponseResult.success(openingOperationPlanService.getStatus(shopId));
|
||||
}
|
||||
@PostMapping("/openingOperationPlan/submit")
|
||||
@ApiOperation("提交开业运营方案")
|
||||
public ResponseResult submitPlan(@RequestBody OpeningOperationPlanRequest request) {
|
||||
|
||||
@@ -5,7 +5,10 @@ import com.cool.store.dao.*;
|
||||
import com.cool.store.entity.*;
|
||||
import com.cool.store.enums.MessageEnum;
|
||||
import com.cool.store.enums.SMSMsgEnum;
|
||||
import com.cool.store.mq.util.HttpRestTemplateService;
|
||||
import com.cool.store.request.xfsgFirstOrderListRequest;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.response.xfsgFirstOderListResponse;
|
||||
import com.cool.store.service.ShopService;
|
||||
import com.cool.store.service.impl.CommonService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -29,7 +32,10 @@ public class PCTestController {
|
||||
private ShopService shopService;
|
||||
@Resource
|
||||
private LineInterviewDAO lineInterviewDAO;
|
||||
static String url = "https://hzly.cloudcubic.net/ajaxHandle/synchronization/JCallBackSynchronizationHandler.ashx?action=app&controller=GetProjectDetails&projectid=";
|
||||
|
||||
@Resource
|
||||
private HttpRestTemplateService httpRestTemplateService;
|
||||
|
||||
@GetMapping("/sendMessage")
|
||||
public ResponseResult<Boolean> sendMessage(@RequestParam("lineId")Long lineId, @RequestParam("pointId")Long pointId, @RequestParam MessageEnum messageEnum){
|
||||
@@ -71,4 +77,5 @@ public class PCTestController {
|
||||
shopService.initShop(lineInfo);
|
||||
return ResponseResult.success(Boolean.FALSE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -86,6 +86,8 @@ public class XxlJobHandler {
|
||||
private EnterpriseUserDAO enterpriseUserDAO;
|
||||
@Resource
|
||||
private UserAuthMappingService userAuthMappingService;
|
||||
@Resource
|
||||
private OpenAcceptanceInfoDAO openAcceptanceInfoDAO;
|
||||
|
||||
/**
|
||||
* 每天都将待体验门店信息变更到体验中
|
||||
@@ -176,7 +178,6 @@ public class XxlJobHandler {
|
||||
* @description: 每天更新装修阶段进场时间等,至预约状态
|
||||
*/
|
||||
@XxlJob("fitmentAcceptanceHandler")
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void fitmentAcceptanceHandler() {
|
||||
log.info("----定时任务每天更新装修阶段进场时间,施工完成时间等,至预约状态----");
|
||||
boolean hasNext = true;
|
||||
@@ -184,17 +185,18 @@ public class XxlJobHandler {
|
||||
int pageSize = 50;
|
||||
while (hasNext) {
|
||||
PageHelper.startPage(pageNum, pageSize);
|
||||
//获取表中进场时间为空的店铺
|
||||
List<AcceptanceInfoDO> acceptanceList = acceptanceInfoDAO.selectByEntryTimeNull();
|
||||
if (CollectionUtils.isEmpty(acceptanceList)) {
|
||||
//获取表中处于施工中或施工完成阶段并且三方验收未预约的
|
||||
List<ShopStageInfoDO> subStageList = shopStageInfoDAO.getSubStageListBySubStageStatus(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_111,
|
||||
ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_112, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_120);
|
||||
if (CollectionUtils.isEmpty(subStageList)) {
|
||||
log.info("------定时任务结束调用鲜丰获取进场时间结束------");
|
||||
return;
|
||||
}
|
||||
int flag = CommonConstants.ZERO;
|
||||
for (AcceptanceInfoDO acceptanceInfoDO : acceptanceList) {
|
||||
for (ShopStageInfoDO shopStageInfoDO : subStageList) {
|
||||
int flag = CommonConstants.ZERO;
|
||||
while (flag < CommonConstants.TWO) {
|
||||
try {
|
||||
Long shopId = acceptanceInfoDO.getShopId();
|
||||
Long shopId = shopStageInfoDO.getShopId();
|
||||
//施工子阶段
|
||||
List<ConstructionScheduleDTO> construction = decorationService.getConstruction(shopId);
|
||||
Map<String, ConstructionScheduleDTO> constructionMap = construction.stream().
|
||||
@@ -204,22 +206,22 @@ public class XxlJobHandler {
|
||||
if (Objects.nonNull(approach)) {
|
||||
Date date = CoolDateUtils.parseDate(approach.getActualBeginDate(), CoolDateUtils.DATE_FORMAT_DAY);
|
||||
if (Objects.nonNull(date)) {
|
||||
Result result = getResult(date,CommonConstants.FOUR);
|
||||
if (result.datePlusDays.equals(result.localDate)) {
|
||||
//三方验收带预约
|
||||
LocalDate plusFDays = DateUtils.getPlusFDays(date, CommonConstants.FOUR);
|
||||
//小于等于当前时间
|
||||
if (plusFDays.isEqual(LocalDate.now()) || plusFDays.isBefore(LocalDate.now())) {
|
||||
//三方验收待预约
|
||||
shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_120);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
} catch (Exception e) {
|
||||
log.error("定时任务设置进场时间失败,shopId:{}", acceptanceInfoDO.getShopId());
|
||||
log.error("定时任务设置进场时间失败,shopId:{}", shopStageInfoDO.getShopId());
|
||||
flag++;
|
||||
}
|
||||
}
|
||||
flag = CommonConstants.ZERO;
|
||||
}
|
||||
hasNext = acceptanceList.size() >= pageSize;
|
||||
hasNext = subStageList.size() >= pageSize;
|
||||
pageNum++;
|
||||
}
|
||||
log.info("------定时任务结束调用鲜丰获取进场时间结束------");
|
||||
@@ -248,24 +250,30 @@ public class XxlJobHandler {
|
||||
}
|
||||
List<Long> shopIds = shopIdListByStageStatus.stream().filter(o -> o.getShopId() != null).map(o -> o.getShopId()).collect(Collectors.toList());
|
||||
List<AcceptanceInfoDO> acceptanceInfoDOS = acceptanceInfoDAO.selectByShopIds(shopIds);
|
||||
int flag = CommonConstants.ZERO;
|
||||
|
||||
for (AcceptanceInfoDO acceptanceInfoDO : acceptanceInfoDOS) {
|
||||
int flag = CommonConstants.ZERO;
|
||||
//进场时间
|
||||
while (flag < CommonConstants.TWO) {
|
||||
try {
|
||||
Date approach = acceptanceInfoDO.getActualEntryTime();
|
||||
if (Objects.nonNull(approach)) {
|
||||
Result result = getResult(approach,CommonConstants.FOUR);
|
||||
if (result.datePlusDays.equals(result.localDate)) {
|
||||
LocalDate plusFDays = DateUtils.getPlusFDays(approach, CommonConstants.FOUR);
|
||||
if (plusFDays.equals(LocalDate.now())) {
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(acceptanceInfoDO.getShopId());
|
||||
EnterpriseUserDO userByRoleEnumAndRegionId = userAuthMappingService
|
||||
.getUserByRoleEnumAndRegionId(UserRoleEnum.ENGINEER_DEP_SUPERVISOR, shopInfo.getRegionId());
|
||||
if (StringUtils.isBlank(userByRoleEnumAndRegionId.getUserId())) {
|
||||
log.error("定时任务三方验收待预约钉钉通知,工程监理id为空,shopId:#{}", acceptanceInfoDO.getShopId());
|
||||
break;
|
||||
}
|
||||
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(shopInfo.getLineId());
|
||||
Map<String, String> messageMap = new HashMap<>();
|
||||
messageMap.put("storeName", shopInfo.getShopName());
|
||||
messageMap.put("partnerUsername", lineInfo.getUsername());
|
||||
messageMap.put("partnerMobile", lineInfo.getMobile());
|
||||
commonService.sendMessage(Arrays.asList(userByRoleEnumAndRegionId.getUserId()), MessageEnum.MESSAGE_24, messageMap);
|
||||
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -274,7 +282,6 @@ public class XxlJobHandler {
|
||||
flag++;
|
||||
}
|
||||
}
|
||||
flag = CommonConstants.ZERO;
|
||||
}
|
||||
hasNext = shopIdListByStageStatus.size() >= pageSize;
|
||||
pageNum++;
|
||||
@@ -282,24 +289,6 @@ public class XxlJobHandler {
|
||||
|
||||
}
|
||||
|
||||
private static @NotNull Result getResult(Date date,Integer days) {
|
||||
Instant instant = date.toInstant();
|
||||
ZoneId zone = ZoneId.systemDefault();
|
||||
LocalDate localDate = instant.atZone(zone).toLocalDate();
|
||||
LocalDate datePlusFiveDays = localDate.plusDays(days); // 5天
|
||||
Result result = new Result(localDate, datePlusFiveDays);
|
||||
return result;
|
||||
}
|
||||
|
||||
private static class Result {
|
||||
public final LocalDate localDate;
|
||||
public final LocalDate datePlusDays;
|
||||
|
||||
public Result(LocalDate localDate, LocalDate datePlusDays) {
|
||||
this.localDate = localDate;
|
||||
this.datePlusDays = datePlusDays;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
@@ -332,42 +321,40 @@ public class XxlJobHandler {
|
||||
try {
|
||||
Date approach = acceptanceInfoDO.getActualEntryTime();
|
||||
if (Objects.nonNull(approach)) {
|
||||
Result result = getResult(approach,CommonConstants.SIX);//7 day
|
||||
if (result.datePlusDays.equals(result.localDate)) {
|
||||
LocalDate plusFDays = DateUtils.getPlusFDays(approach, CommonConstants.SIX);//7 day
|
||||
if (plusFDays.equals(LocalDate.now())) {
|
||||
//三方验收带预约
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(acceptanceInfoDO.getShopId());
|
||||
//加盟商手机号
|
||||
Long lineId = shopInfo.getLineId();
|
||||
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(lineId);
|
||||
if (Objects.isNull(lineInfo) && StringUtils.isNull(lineInfo.getMobile())) {
|
||||
log.error("定时任务三方验收预约短信通知:加盟商手机号为空,shopId:#{}", acceptanceInfoDO.getShopId());
|
||||
break;
|
||||
}
|
||||
EnterpriseUserDO supervisor = userAuthMappingService
|
||||
.getUserByRoleEnumAndRegionId(UserRoleEnum.ENGINEER_DEP_SUPERVISOR, shopInfo.getRegionId());
|
||||
//获取撤场计划完成时间
|
||||
List<ConstructionScheduleDTO> construction = decorationService.getConstruction(acceptanceInfoDO.getShopId());
|
||||
Map<String, ConstructionScheduleDTO> map = construction.stream()
|
||||
.filter(o -> StringUtils.isNoneBlank(o.getName()))
|
||||
.collect(Collectors.toMap(ConstructionScheduleDTO::getName, dto -> dto));
|
||||
ConstructionScheduleDTO withdrawal = map.get(CommonConstants.WITHDRAWAL);
|
||||
//获取计划撤场时间
|
||||
Date planExitTime = acceptanceInfoDO.getPlanExitTime();
|
||||
//获取施工阶段计划完成时间
|
||||
ConstructionScheduleDTO constructionInfo = decorationService.getConstructionInfo(acceptanceInfoDO.getShopId());
|
||||
Date decorationEndTime = acceptanceInfoDO.getDecorationPlannedCompletionTime();
|
||||
//获取计划验收时间
|
||||
String palnAcceptanceTime = CoolDateUtils.DateFormat(acceptanceInfoDO.getPlanAcceptanceTime(), CoolDateUtils.DATE_FORMAT_SEC);
|
||||
//区域监理name
|
||||
String supervisorName = enterpriseUserDAO.getUserName(supervisor.getUserId());
|
||||
String planAcceptanceTime = CoolDateUtils.DateFormat(acceptanceInfoDO.getPlanAcceptanceTime(), CoolDateUtils.DATE_FORMAT_SEC);
|
||||
//区域监理手机号
|
||||
String mobile = supervisor.getMobile();
|
||||
Map<String, String> messageMap = new HashMap<>();
|
||||
if (Objects.nonNull(withdrawal) && withdrawal.getPlanEndDate() != null) {
|
||||
messageMap.put("demolitionPlanTime", withdrawal.getPlanEndDate());
|
||||
if (Objects.nonNull(planExitTime)) {
|
||||
String date = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, planExitTime);
|
||||
messageMap.put("demolitionPlanTime", date);
|
||||
} else {
|
||||
|
||||
if (Objects.nonNull(constructionInfo)) {
|
||||
messageMap.put("demolitionPlanTime", constructionInfo.getPlanEndDate());
|
||||
if (Objects.nonNull(decorationEndTime)) {
|
||||
String date = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, decorationEndTime);
|
||||
messageMap.put("demolitionPlanTime", date);
|
||||
}
|
||||
}
|
||||
messageMap.put("palnAcceptanceTime", palnAcceptanceTime);
|
||||
messageMap.put("supervisionName", supervisorName);
|
||||
messageMap.put("palnAcceptanceTime", planAcceptanceTime);
|
||||
messageMap.put("supervisionName", supervisor.getName());
|
||||
messageMap.put("supervisionMobile", mobile);
|
||||
//加盟商手机号
|
||||
ShopStageInfoDO stageInfoDO = lineIdMap.get(acceptanceInfoDO.getShopId());
|
||||
Long lineId = stageInfoDO.getLineId();
|
||||
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(lineId);
|
||||
commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.THREE_ACCEPTANCE_WAIT, messageMap);
|
||||
}
|
||||
}
|
||||
@@ -409,8 +396,6 @@ public class XxlJobHandler {
|
||||
}
|
||||
List<Long> shopIds = ShopStageInfoList.stream().filter(o -> o.getShopId() != null)
|
||||
.map(ShopStageInfoDO::getShopId).collect(Collectors.toList());
|
||||
Map<Long, ShopStageInfoDO> lineIdMap = ShopStageInfoList.stream().filter(o -> o.getLineId() != null)
|
||||
.collect(Collectors.toMap(ShopStageInfoDO::getLineId, Function.identity()));
|
||||
List<AcceptanceInfoDO> acceptanceList = acceptanceInfoDAO.selectByShopIds(shopIds);
|
||||
List<ShopInfoDO> shopListByIds = shopInfoDAO.getShopListByIds(shopIds);
|
||||
Map<Long, ShopInfoDO> shopIdMap = shopListByIds.stream().filter(o -> o.getId() != null)
|
||||
@@ -420,14 +405,16 @@ public class XxlJobHandler {
|
||||
Date approach = acceptance.getActualEntryTime();
|
||||
Long shopId = acceptance.getShopId();
|
||||
if (Objects.nonNull(approach)) {
|
||||
Result result = getResult(approach,CommonConstants.SIX);//7天
|
||||
if (result.datePlusDays.equals(result.localDate)) {
|
||||
ShopStageInfoDO stageInfoDO = lineIdMap.get(shopId);
|
||||
LocalDate plusFDays = DateUtils.getPlusFDays(approach, CommonConstants.SIX);//7天
|
||||
if (plusFDays.equals(LocalDate.now())) {
|
||||
ShopInfoDO shopInfoDO = shopIdMap.get(shopId);
|
||||
Long lineId = stageInfoDO.getLineId();
|
||||
if (StringUtils.isBlank(shopInfoDO.getSupervisorUserId())){
|
||||
log.error("定时任务三方待验收钉钉通知,督导id为空,shopId:{}", shopId);
|
||||
}
|
||||
Long lineId = shopInfoDO.getLineId();
|
||||
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(lineId);
|
||||
Map<String, String> messageMap = new HashMap<>();
|
||||
messageMap.put("storeName",shopInfoDO.getShopName());
|
||||
messageMap.put("storeName", shopInfoDO.getShopName());
|
||||
messageMap.put("partnerUsername", lineInfo.getUsername());
|
||||
messageMap.put("partnerMobile", lineInfo.getMobile());
|
||||
commonService.sendMessage(Arrays.asList(shopInfoDO.getSupervisorUserId()), MessageEnum.MESSAGE_25, messageMap);
|
||||
@@ -478,7 +465,6 @@ public class XxlJobHandler {
|
||||
StaffExamInfoDTO staffExamInfoDTO = xfsgEhrService.getUserExamInfo(enterpriseUserDO.getJobnumber());
|
||||
if (staffExamInfoDTO != null && StringUtils.isNotBlank(staffExamInfoDTO.getExamResult())
|
||||
&& StringUtils.isNotBlank(staffExamInfoDTO.getExamScore())) {
|
||||
|
||||
employeeTrainingDO.setTheoreticalExamScore(StringUtils.isNotBlank(staffExamInfoDTO.getExamScore()) ? Integer.valueOf(staffExamInfoDTO.getExamScore()) : null);
|
||||
employeeTrainingDO.setTheoreticalExamStatus(ExamStatusEnum.matchCodeByDesc(staffExamInfoDTO.getExamResult()));
|
||||
employeeTrainingDAO.updateByPrimaryKeySelective(employeeTrainingDO);
|
||||
@@ -488,4 +474,15 @@ public class XxlJobHandler {
|
||||
XxlJobHelper.handleSuccess();
|
||||
}
|
||||
|
||||
/**
|
||||
* 店铺新店开业状态更新
|
||||
*/
|
||||
@XxlJob("shopOpenAcceptanceStatusUpdate")
|
||||
public void shopOpenAcceptanceStatusUpdate() {
|
||||
log.info("------店铺新店开业状态更新------");
|
||||
int num = openAcceptanceInfoDAO.shopOpenAcceptanceStatusUpdate();
|
||||
log.info("------店铺新店开业状态更新完成num:{}------", num);
|
||||
XxlJobHelper.handleSuccess();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user