数据处理代码
This commit is contained in:
@@ -96,10 +96,16 @@ public class LinePayDAO {
|
|||||||
if (CollectionUtils.isEmpty(linePayDOList)){
|
if (CollectionUtils.isEmpty(linePayDOList)){
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return 0;
|
return linePayMapper.dataUpdateLinePay(linePayDOList);
|
||||||
}
|
}
|
||||||
|
|
||||||
public LinePayDO selectByPaymentReceiptCode(String paymentReceiptCode) {
|
public LinePayDO selectByPaymentReceiptCode(String paymentReceiptCode) {
|
||||||
return linePayMapper.selectByPaymentReceiptCode(paymentReceiptCode);
|
return linePayMapper.selectByPaymentReceiptCode(paymentReceiptCode);
|
||||||
}
|
}
|
||||||
|
public Integer updateXgjClaimStatus(List<Long> shopIds,Integer xgjClaimStatus,Integer payBusinessType){
|
||||||
|
if (CollectionUtils.isEmpty(shopIds)){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return linePayMapper.updateXgjClaimStatus(shopIds,xgjClaimStatus,payBusinessType);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,4 +66,6 @@ public interface LinePayMapper {
|
|||||||
List<LinePayDO> getDateHandler();
|
List<LinePayDO> getDateHandler();
|
||||||
|
|
||||||
Integer dataUpdateLinePay(@Param("list") List<LinePayDO> linePayDOList);
|
Integer dataUpdateLinePay(@Param("list") List<LinePayDO> linePayDOList);
|
||||||
|
|
||||||
|
Integer updateXgjClaimStatus(@Param("list") List<Long> shopIds,@Param("xgjClaimStatus") Integer xgjClaimStatus,@Param("payBusinessType") Integer payBusinessType);
|
||||||
}
|
}
|
||||||
@@ -32,8 +32,9 @@
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id,shop_id, partner_id, line_id, pay_status, pay_type, pay_user_name, pay_account, bank_code,
|
id,shop_id, partner_id, line_id, pay_status, pay_type, pay_user_name, pay_account, bank_code,
|
||||||
bank_name, branch_bank_code, branch_bank_name, pay_time, pay_pic, promise_pic, create_time,
|
bank_name, branch_bank_code, branch_bank_name, pay_time, pay_pic, promise_pic, create_time,
|
||||||
update_time, create_user_id, update_user_id, deleted,pay_business_type,amount,combined_field,xgj_claim_status,payment_receipt_code,pay_serial_number,
|
update_time, create_user_id, update_user_id,
|
||||||
|
deleted,pay_business_type,amount,combined_field,xgj_claim_status,payment_receipt_code,pay_serial_number,
|
||||||
remark
|
remark
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||||
@@ -83,8 +84,8 @@
|
|||||||
<if test="branchBankName != null">
|
<if test="branchBankName != null">
|
||||||
branch_bank_name,
|
branch_bank_name,
|
||||||
</if>
|
</if>
|
||||||
pay_time,
|
pay_time,
|
||||||
pay_pic,
|
pay_pic,
|
||||||
|
|
||||||
<if test="promisePic != null">
|
<if test="promisePic != null">
|
||||||
promise_pic,
|
promise_pic,
|
||||||
@@ -160,8 +161,8 @@
|
|||||||
<if test="branchBankName != null">
|
<if test="branchBankName != null">
|
||||||
#{branchBankName,jdbcType=VARCHAR},
|
#{branchBankName,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
#{payTime,jdbcType=TIMESTAMP},
|
#{payTime,jdbcType=TIMESTAMP},
|
||||||
#{payPic,jdbcType=VARCHAR},
|
#{payPic,jdbcType=VARCHAR},
|
||||||
<if test="promisePic != null">
|
<if test="promisePic != null">
|
||||||
#{promisePic,jdbcType=VARCHAR},
|
#{promisePic,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
@@ -239,8 +240,8 @@
|
|||||||
<if test="branchBankName != null">
|
<if test="branchBankName != null">
|
||||||
branch_bank_name = #{branchBankName,jdbcType=VARCHAR},
|
branch_bank_name = #{branchBankName,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
pay_time = #{payTime,jdbcType=TIMESTAMP},
|
pay_time = #{payTime,jdbcType=TIMESTAMP},
|
||||||
pay_pic = #{payPic,jdbcType=VARCHAR},
|
pay_pic = #{payPic,jdbcType=VARCHAR},
|
||||||
|
|
||||||
<if test="promisePic != null">
|
<if test="promisePic != null">
|
||||||
promise_pic = #{promisePic,jdbcType=VARCHAR},
|
promise_pic = #{promisePic,jdbcType=VARCHAR},
|
||||||
@@ -285,7 +286,7 @@
|
|||||||
update xfsg_line_pay
|
update xfsg_line_pay
|
||||||
set audit_id = #{auditId}
|
set audit_id = #{auditId}
|
||||||
where line_id = #{lineId}
|
where line_id = #{lineId}
|
||||||
and partner_id = #{partnerId}
|
and partner_id = #{partnerId}
|
||||||
</update>
|
</update>
|
||||||
<sql id="dynamicQuery">
|
<sql id="dynamicQuery">
|
||||||
<trim prefix="WHERE" prefixOverrides="AND | OR">
|
<trim prefix="WHERE" prefixOverrides="AND | OR">
|
||||||
@@ -353,14 +354,15 @@
|
|||||||
select *
|
select *
|
||||||
from xfsg_line_pay
|
from xfsg_line_pay
|
||||||
where line_id = #{lineId}
|
where line_id = #{lineId}
|
||||||
and deleted = '0' limit 1
|
and deleted = '0' limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getByLineIdAndPayTypeAndShopId" resultMap="BaseResultMap">
|
<select id="getByLineIdAndPayTypeAndShopId" resultMap="BaseResultMap">
|
||||||
select <include refid="Base_Column_List"/>
|
select
|
||||||
|
<include refid="Base_Column_List"/>
|
||||||
from xfsg_line_pay
|
from xfsg_line_pay
|
||||||
<where>
|
<where>
|
||||||
deleted = '0'
|
deleted = '0'
|
||||||
and pay_business_type = #{payBusinessType}
|
and pay_business_type = #{payBusinessType}
|
||||||
<if test="lineId != null and lineId != ''">
|
<if test="lineId != null and lineId != ''">
|
||||||
and line_id = #{lineId}
|
and line_id = #{lineId}
|
||||||
@@ -388,18 +390,52 @@
|
|||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
<select id="getFranchiseFeePayInfoByShopId" resultType="com.cool.store.entity.LinePayDO">
|
<select id="getFranchiseFeePayInfoByShopId" resultType="com.cool.store.entity.LinePayDO">
|
||||||
select * from xfsg_line_pay where deleted = 0 and shop_id = #{shopId} and pay_business_type = 1 order by create_time desc
|
select * from xfsg_line_pay where deleted = 0 and shop_id = #{shopId} and pay_business_type = 1 order by
|
||||||
|
create_time desc
|
||||||
</select>
|
</select>
|
||||||
<select id="getDateHandler" resultType="com.cool.store.entity.LinePayDO">
|
<select id="getDateHandler" resultType="com.cool.store.entity.LinePayDO">
|
||||||
select * from xfsg_line_pay where deleted = 0 and pay_business_type = 1 and pay_pic is null and combined_field is not null
|
select * from xfsg_line_pay where deleted = 0 and pay_business_type = 1 and pay_pic is null and combined_field
|
||||||
|
is not null
|
||||||
</select>
|
</select>
|
||||||
<update id="deleteById">
|
<update id="deleteById">
|
||||||
update xfsg_line_pay set deleted = 1 ,update_time = now(),update_user_id = #{userId} where id = #{id}
|
update xfsg_line_pay set deleted = 1 ,update_time = now(),update_user_id = #{userId} where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<select id="selectByPaymentReceiptCode" resultType="com.cool.store.entity.LinePayDO">
|
<select id="selectByPaymentReceiptCode" resultType="com.cool.store.entity.LinePayDO">
|
||||||
select * from xfsg_line_pay where deleted = 0 and payment_receipt_code = #{paymentReceiptCode} and pay_business_type = 1 order by create_time desc
|
select * from xfsg_line_pay where deleted = 0 and payment_receipt_code = #{paymentReceiptCode} and
|
||||||
|
pay_business_type = 1 order by create_time desc
|
||||||
</select>
|
</select>
|
||||||
<update id="dataUpdateLinePay"></update>
|
<update id="dataUpdateLinePay">
|
||||||
|
<foreach collection="list" separator=";" item="item" index="index">
|
||||||
|
update xfsg_line_pay
|
||||||
|
<set>
|
||||||
|
<if test="item.payTime !=null">
|
||||||
|
pay_time = #{item.payTime},
|
||||||
|
</if>
|
||||||
|
<if test="item.payPic !=null and item !=''">
|
||||||
|
pay_pic = #{item.payPic},
|
||||||
|
</if>
|
||||||
|
<if test="item.paymentReceiptCode!=null and item.paymentReceiptCode !=''">
|
||||||
|
payment_receipt_code = #{item.paymentReceiptCode},
|
||||||
|
</if>
|
||||||
|
<if test="item.xgjClaimStatus">
|
||||||
|
xgj_claim_status = #{item.xgjClaimStatus}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
</set>
|
||||||
|
where id = #{item.id}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
<update id="updateXgjClaimStatus">
|
||||||
|
update xfsg_line_pay
|
||||||
|
set
|
||||||
|
xgj_claim_status = #{xgjClaimStatus},
|
||||||
|
update_time = now()
|
||||||
|
where shop_id in (
|
||||||
|
<foreach collection="list" item="shopId" separator=",">
|
||||||
|
#{shopId}
|
||||||
|
</foreach>
|
||||||
|
) and pay_business_type = #{payBusinessType}
|
||||||
|
</update>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
||||||
|
|||||||
@@ -8,15 +8,13 @@ import com.cool.store.dao.*;
|
|||||||
import com.cool.store.dto.*;
|
import com.cool.store.dto.*;
|
||||||
import com.cool.store.entity.*;
|
import com.cool.store.entity.*;
|
||||||
import com.cool.store.enums.*;
|
import com.cool.store.enums.*;
|
||||||
|
import com.cool.store.enums.point.PayBusinessTypeEnum;
|
||||||
import com.cool.store.enums.point.ShopStageEnum;
|
import com.cool.store.enums.point.ShopStageEnum;
|
||||||
import com.cool.store.enums.point.ShopSubStageEnum;
|
import com.cool.store.enums.point.ShopSubStageEnum;
|
||||||
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||||
import com.cool.store.exception.ServiceException;
|
import com.cool.store.exception.ServiceException;
|
||||||
import com.cool.store.mapper.*;
|
import com.cool.store.mapper.*;
|
||||||
import com.cool.store.service.DataHandlerServer;
|
import com.cool.store.service.*;
|
||||||
import com.cool.store.service.FranchiseFeeService;
|
|
||||||
import com.cool.store.service.OpenApiService;
|
|
||||||
import com.cool.store.service.PreparationService;
|
|
||||||
import com.cool.store.utils.StringUtil;
|
import com.cool.store.utils.StringUtil;
|
||||||
import com.cool.store.utils.easyExcel.EasyExcelUtil;
|
import com.cool.store.utils.easyExcel.EasyExcelUtil;
|
||||||
import com.cool.store.utils.poi.DateUtils;
|
import com.cool.store.utils.poi.DateUtils;
|
||||||
@@ -48,9 +46,11 @@ import static com.cool.store.utils.poi.DateUtils.YYYY_MM_DD;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
public class DataHandlerServerImpl implements DataHandlerServer {
|
public class DataHandlerServerImpl implements DataHandlerServer {
|
||||||
@Resource
|
@Resource
|
||||||
private OpenApiService openApiService;
|
private LinePayService linePayService;
|
||||||
@Resource
|
@Resource
|
||||||
private LinePayDAO linePayDAO;
|
private OpenApiService openApiService;
|
||||||
|
@Resource
|
||||||
|
private LinePayDAO linePayDAO;
|
||||||
@Resource
|
@Resource
|
||||||
private AcceptanceInfoDAO acceptanceInfoDAO;
|
private AcceptanceInfoDAO acceptanceInfoDAO;
|
||||||
@Resource
|
@Resource
|
||||||
@@ -932,7 +932,7 @@ public class DataHandlerServerImpl implements DataHandlerServer {
|
|||||||
ShopSubStageEnum shopSubStageEnum = ShopSubStageEnum.SHOP_STAGE_25;
|
ShopSubStageEnum shopSubStageEnum = ShopSubStageEnum.SHOP_STAGE_25;
|
||||||
List<Long> shopIds = shopAccountDAO.getShopId();
|
List<Long> shopIds = shopAccountDAO.getShopId();
|
||||||
for (ShopStageInfoDO shopStageInfoDO : subStages) {
|
for (ShopStageInfoDO shopStageInfoDO : subStages) {
|
||||||
if (jdStageShopIds.contains(shopStageInfoDO.getShopId())){
|
if (jdStageShopIds.contains(shopStageInfoDO.getShopId())) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
LineInfoDO lineInfoDO = lineMap.get(shopStageInfoDO.getLineId());
|
LineInfoDO lineInfoDO = lineMap.get(shopStageInfoDO.getLineId());
|
||||||
@@ -988,12 +988,12 @@ public class DataHandlerServerImpl implements DataHandlerServer {
|
|||||||
if (CollectionUtils.isEmpty(shopInfoList)) {
|
if (CollectionUtils.isEmpty(shopInfoList)) {
|
||||||
log.info("导入数据根据shopCode 未找到数据");
|
log.info("导入数据根据shopCode 未找到数据");
|
||||||
}
|
}
|
||||||
List<Long> shopIds = shopInfoList.stream().map(ShopInfoDO::getId).collect(Collectors.toList());
|
List<Long> shopIds = shopInfoList.stream().map(ShopInfoDO::getId).collect(Collectors.toList());
|
||||||
Map<String, List<ShopInfoDO>> shopMapByCode = shopInfoList.stream().collect(Collectors.groupingBy(ShopInfoDO::getShopCode));
|
Map<String, List<ShopInfoDO>> shopMapByCode = shopInfoList.stream().collect(Collectors.groupingBy(ShopInfoDO::getShopCode));
|
||||||
//装修验收数据
|
//装修验收数据
|
||||||
List<AcceptanceInfoDO> acceptanceInfoDOList = acceptanceInfoDAO.selectByShopIds(shopIds);
|
List<AcceptanceInfoDO> acceptanceInfoDOList = acceptanceInfoDAO.selectByShopIds(shopIds);
|
||||||
Map<Long, AcceptanceInfoDO> acceptanceInfoMap = acceptanceInfoDOList.stream().collect(Collectors.toMap(AcceptanceInfoDO::getShopId, item -> item));
|
Map<Long, AcceptanceInfoDO> acceptanceInfoMap = acceptanceInfoDOList.stream().collect(Collectors.toMap(AcceptanceInfoDO::getShopId, item -> item));
|
||||||
//合同阶段
|
//合同阶段
|
||||||
List<ShopStageInfoDO> signFranchiseStageList = shopStageInfoDAO.getSubStageList(shopIds, ShopSubStageEnum.SHOP_STAGE_8.getShopSubStage());
|
List<ShopStageInfoDO> signFranchiseStageList = shopStageInfoDAO.getSubStageList(shopIds, ShopSubStageEnum.SHOP_STAGE_8.getShopSubStage());
|
||||||
Map<Long, ShopStageInfoDO> signFranchiseStageMap = signFranchiseStageList.stream().collect(Collectors.toMap(ShopStageInfoDO::getShopId, Function.identity()));
|
Map<Long, ShopStageInfoDO> signFranchiseStageMap = signFranchiseStageList.stream().collect(Collectors.toMap(ShopStageInfoDO::getShopId, Function.identity()));
|
||||||
//装修阶段需要变更的shopId
|
//装修阶段需要变更的shopId
|
||||||
@@ -1003,23 +1003,23 @@ public class DataHandlerServerImpl implements DataHandlerServer {
|
|||||||
for (ImportOaOldShopDataDTO dto : list) {
|
for (ImportOaOldShopDataDTO dto : list) {
|
||||||
String shopCode = dto.getShopCode();
|
String shopCode = dto.getShopCode();
|
||||||
List<ShopInfoDO> shopInfoDOS = shopMapByCode.get(shopCode);
|
List<ShopInfoDO> shopInfoDOS = shopMapByCode.get(shopCode);
|
||||||
if (CollectionUtils.isEmpty(shopInfoDOS)){
|
if (CollectionUtils.isEmpty(shopInfoDOS)) {
|
||||||
errorList.add(new ImportOaOldShopDataErrorDTO(dto.getShopCode(), "门店编码未找到"));
|
errorList.add(new ImportOaOldShopDataErrorDTO(dto.getShopCode(), "门店编码未找到"));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (shopInfoDOS.size() > 1){
|
if (shopInfoDOS.size() > 1) {
|
||||||
errorList.add(new ImportOaOldShopDataErrorDTO(dto.getShopCode(), "门店编码重复"));
|
errorList.add(new ImportOaOldShopDataErrorDTO(dto.getShopCode(), "门店编码重复"));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
ShopInfoDO shopInfoDO = shopInfoDOS.get(0);
|
ShopInfoDO shopInfoDO = shopInfoDOS.get(0);
|
||||||
Long shopId = shopInfoDO.getId();
|
Long shopId = shopInfoDO.getId();
|
||||||
ShopStageInfoDO signFranchiseStage = signFranchiseStageMap.get(shopId);
|
ShopStageInfoDO signFranchiseStage = signFranchiseStageMap.get(shopId);
|
||||||
if (!signFranchiseStage.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_84.getShopSubStageStatus())){
|
if (!signFranchiseStage.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_84.getShopSubStageStatus())) {
|
||||||
errorList.add(new ImportOaOldShopDataErrorDTO(dto.getShopCode(), "合同阶段未完成"));
|
errorList.add(new ImportOaOldShopDataErrorDTO(dto.getShopCode(), "合同阶段未完成"));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
AcceptanceInfoDO acceptanceInfoDO = acceptanceInfoMap.get(shopId);
|
AcceptanceInfoDO acceptanceInfoDO = acceptanceInfoMap.get(shopId);
|
||||||
if (Objects.isNull(acceptanceInfoDO)){
|
if (Objects.isNull(acceptanceInfoDO)) {
|
||||||
initFitmentShopIdList.add(shopId);
|
initFitmentShopIdList.add(shopId);
|
||||||
}
|
}
|
||||||
fitmentFhopIdList.add(shopId);
|
fitmentFhopIdList.add(shopId);
|
||||||
@@ -1029,7 +1029,7 @@ public class DataHandlerServerImpl implements DataHandlerServer {
|
|||||||
shopStageInfoDAO.dataUpdateStatus(fitmentFhopIdList, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_91);
|
shopStageInfoDAO.dataUpdateStatus(fitmentFhopIdList, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_91);
|
||||||
shopStageInfoDAO.dataUpdateStatus(fitmentFhopIdList, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_112);
|
shopStageInfoDAO.dataUpdateStatus(fitmentFhopIdList, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_112);
|
||||||
shopStageInfoDAO.dataUpdateStatus(fitmentFhopIdList, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_123);
|
shopStageInfoDAO.dataUpdateStatus(fitmentFhopIdList, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_123);
|
||||||
//装修表初始化
|
//装修表初始化
|
||||||
acceptanceInfoDAO.initAcceptanceInfo(initFitmentShopIdList);
|
acceptanceInfoDAO.initAcceptanceInfo(initFitmentShopIdList);
|
||||||
if (!errorList.isEmpty()) {
|
if (!errorList.isEmpty()) {
|
||||||
task.setStatus(ImportTaskStatusEnum.ERROR.getCode());
|
task.setStatus(ImportTaskStatusEnum.ERROR.getCode());
|
||||||
@@ -1056,43 +1056,57 @@ public class DataHandlerServerImpl implements DataHandlerServer {
|
|||||||
public Boolean franchiseFeeStageDateHandler() {
|
public Boolean franchiseFeeStageDateHandler() {
|
||||||
//处理加盟费阶段待审核(对账中)
|
//处理加盟费阶段待审核(对账中)
|
||||||
List<ShopStageInfoDO> waitAuditStageList = shopStageInfoDAO.getShopStageInfoByShopSubStageStatus(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_72.getShopSubStageStatus());
|
List<ShopStageInfoDO> waitAuditStageList = shopStageInfoDAO.getShopStageInfoByShopSubStageStatus(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_72.getShopSubStageStatus());
|
||||||
log.info("waitAuditStageList:{}", JSONObject.toJSONString(waitAuditStageList));
|
log.info("waitAuditStageList:{}", JSONObject.toJSONString(waitAuditStageList));
|
||||||
List<Long> waitAuditShopIdList = waitAuditStageList.stream().map(ShopStageInfoDO::getShopId).collect(Collectors.toList());
|
List<Long> waitAuditShopIdList = waitAuditStageList.stream().map(ShopStageInfoDO::getShopId).collect(Collectors.toList());
|
||||||
shopStageInfoDAO.dataUpdateStatus(waitAuditShopIdList,ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_73);
|
// shopStageInfoDAO.dataUpdateStatus(waitAuditShopIdList,ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_73);
|
||||||
franchiseFeeDAO.batchUpdateXgjCollectionStatus(waitAuditShopIdList,XGJCollectionStatusEnum.COMPLETED.getCode());
|
franchiseFeeDAO.batchUpdateXgjCollectionStatus(waitAuditShopIdList, XGJCollectionStatusEnum.WAIT_PAY.getCode());
|
||||||
|
linePayDAO.updateXgjClaimStatus(waitAuditShopIdList, ClaimStatusEnum.TO_BE_CLAIMED.getCode(), PayBusinessTypeEnum.FRANCHISE_FEE.getCode());
|
||||||
//已缴费 修改新管家回调状态
|
//已缴费 修改新管家回调状态
|
||||||
List<ShopStageInfoDO> isPaidStageList = shopStageInfoDAO.getShopStageInfoByShopSubStageStatus(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_73.getShopSubStageStatus());
|
List<ShopStageInfoDO> isPaidStageList = shopStageInfoDAO.getShopStageInfoByShopSubStageStatus(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_73.getShopSubStageStatus());
|
||||||
List<Long> isPaidShopId = isPaidStageList.stream().map(ShopStageInfoDO::getShopId).collect(Collectors.toList());
|
List<Long> isPaidShopId = isPaidStageList.stream().map(ShopStageInfoDO::getShopId).collect(Collectors.toList());
|
||||||
franchiseFeeDAO.batchUpdateXgjCollectionStatus(isPaidShopId,XGJCollectionStatusEnum.COMPLETED.getCode());
|
franchiseFeeDAO.batchUpdateXgjCollectionStatus(isPaidShopId, XGJCollectionStatusEnum.COMPLETED.getCode());
|
||||||
|
linePayDAO.updateXgjClaimStatus(isPaidShopId, ClaimStatusEnum.Claimed.getCode(), PayBusinessTypeEnum.FRANCHISE_FEE.getCode());
|
||||||
//待加盟商缴费阶段
|
//待加盟商缴费阶段
|
||||||
List<ShopStageInfoDO> waitPayStageList = shopStageInfoDAO.getShopStageInfoByShopSubStageStatus(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_71.getShopSubStageStatus());
|
List<ShopStageInfoDO> waitPayStageList = shopStageInfoDAO.getShopStageInfoByShopSubStageStatus(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_71.getShopSubStageStatus());
|
||||||
List<Long> waitPayShopIds = waitPayStageList.stream().map(ShopStageInfoDO::getShopId).collect(Collectors.toList());
|
List<Long> waitPayShopIds = waitPayStageList.stream().map(ShopStageInfoDO::getShopId).collect(Collectors.toList());
|
||||||
franchiseFeeDAO.batchUpdateXgjCollectionStatus(waitPayShopIds,XGJCollectionStatusEnum.WAIT_PAY.getCode());
|
franchiseFeeDAO.batchUpdateXgjCollectionStatus(waitPayShopIds, XGJCollectionStatusEnum.WAIT_PAY.getCode());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Boolean franchiseFeeDateHandler(Integer pageSize, Integer pageNum) {
|
public Boolean franchiseFeeDateHandler(Integer pageSize, Integer pageNum) {
|
||||||
|
|
||||||
PageHelper.startPage(pageNum, pageSize);
|
PageHelper.startPage(pageNum, pageSize);
|
||||||
List<LinePayDO> dateHandler = linePayDAO.getDateHandler();
|
List<LinePayDO> dateHandler = linePayDAO.getDateHandler();
|
||||||
for (LinePayDO linePayDO : dateHandler){
|
List<ShopStageInfoDO> waitAuditStageList = shopStageInfoDAO.getShopStageInfoByShopSubStageStatus(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_72.getShopSubStageStatus());
|
||||||
|
log.info("waitAuditStageList:{}", JSONObject.toJSONString(waitAuditStageList));
|
||||||
|
List<Long> waitAuditShopIdList = waitAuditStageList.stream().map(ShopStageInfoDO::getShopId).collect(Collectors.toList());
|
||||||
|
for (LinePayDO linePayDO : dateHandler) {
|
||||||
JSONArray jsonArray = JSONObject.parseArray(linePayDO.getCombinedField());
|
JSONArray jsonArray = JSONObject.parseArray(linePayDO.getCombinedField());
|
||||||
JSONObject jsonObject = jsonArray.getJSONObject(0);
|
JSONObject jsonObject = jsonArray.getJSONObject(0);
|
||||||
linePayDO.setPayTime(jsonObject.getDate("payTime"));
|
linePayDO.setPayTime(jsonObject.getDate("payTime"));
|
||||||
linePayDO.setPayPic(jsonObject.getString("payPic"));
|
linePayDO.setPayPic(jsonObject.getString("payPic"));
|
||||||
|
if (waitAuditShopIdList.contains(linePayDO.getShopId())) {
|
||||||
|
linePayDO.setXgjClaimStatus(ClaimStatusEnum.TO_BE_CLAIMED.getCode());
|
||||||
|
if (StringUtils.isBlank(linePayDO.getPaymentReceiptCode())) {
|
||||||
|
linePayDO.setPaymentReceiptCode(linePayService.getPaymentReceiptCode());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
linePayDO.setXgjClaimStatus(ClaimStatusEnum.Claimed.getCode());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
linePayDAO.dataUpdateLinePay(dateHandler);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Boolean batchStatusRefreshYls(BatchStatusRefreshDTO batchStatusRefreshDTO) {
|
public Boolean batchStatusRefreshYls(BatchStatusRefreshDTO batchStatusRefreshDTO) {
|
||||||
if (CollectionUtils.isEmpty(batchStatusRefreshDTO.getShopCode())){
|
if (CollectionUtils.isEmpty(batchStatusRefreshDTO.getShopCode())) {
|
||||||
log.info("数据处理 门店编码为空");
|
log.info("数据处理 门店编码为空");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
for (String shopCode : batchStatusRefreshDTO.getShopCode()){
|
for (String shopCode : batchStatusRefreshDTO.getShopCode()) {
|
||||||
StatusRefreshDTO statusRefreshDTO = new StatusRefreshDTO();
|
StatusRefreshDTO statusRefreshDTO = new StatusRefreshDTO();
|
||||||
statusRefreshDTO.setShopCode(shopCode);
|
statusRefreshDTO.setShopCode(shopCode);
|
||||||
statusRefreshDTO.setSystemSource(batchStatusRefreshDTO.getSystemSource());
|
statusRefreshDTO.setSystemSource(batchStatusRefreshDTO.getSystemSource());
|
||||||
@@ -1100,10 +1114,10 @@ public class DataHandlerServerImpl implements DataHandlerServer {
|
|||||||
openApiService.statusRefresh(statusRefreshDTO);
|
openApiService.statusRefresh(statusRefreshDTO);
|
||||||
}
|
}
|
||||||
List<String> shopCodeList = new ArrayList<>();
|
List<String> shopCodeList = new ArrayList<>();
|
||||||
for (String shopCode : batchStatusRefreshDTO.getShopCode()){
|
for (String shopCode : batchStatusRefreshDTO.getShopCode()) {
|
||||||
shopCodeList.add(StringUtils.substringAfter(shopCode, "_"));
|
shopCodeList.add(StringUtils.substringAfter(shopCode, "_"));
|
||||||
}
|
}
|
||||||
posAndOrderInfoDAO.batchUpdateYlsRemarkByShopCode(shopCodeList,batchStatusRefreshDTO.getRemark());
|
posAndOrderInfoDAO.batchUpdateYlsRemarkByShopCode(shopCodeList, batchStatusRefreshDTO.getRemark());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -263,14 +263,11 @@ public class DeskServiceImpl implements DeskService {
|
|||||||
//督导代填
|
//督导代填
|
||||||
if (userRoleIds.contains(UserRoleEnum.QW_SUPERVISION.getCode()) || userRoleIds.contains(UserRoleEnum.SUPERVISION.getCode())) {
|
if (userRoleIds.contains(UserRoleEnum.QW_SUPERVISION.getCode()) || userRoleIds.contains(UserRoleEnum.SUPERVISION.getCode())) {
|
||||||
pageInfo = commonPendingVOPageInfo(pageNum, pageSize, user, ShopSubStageEnum.SHOP_STAGE_7,
|
pageInfo = commonPendingVOPageInfo(pageNum, pageSize, user, ShopSubStageEnum.SHOP_STAGE_7,
|
||||||
Arrays.asList(SHOP_SUB_STAGE_STATUS_71.getShopSubStageStatus(), SHOP_SUB_STAGE_STATUS_74.getShopSubStageStatus()), Boolean.FALSE,keyword);
|
Arrays.asList(SHOP_SUB_STAGE_STATUS_71.getShopSubStageStatus(), SHOP_SUB_STAGE_STATUS_72.getShopSubStageStatus()), Boolean.FALSE,keyword);
|
||||||
} else {
|
} else {
|
||||||
if (userRoleIds.contains(UserRoleEnum.JOIN_OFFICE.getCode()) || userRoleIds.contains(UserRoleEnum.REGION_OFFICE.getCode())) {
|
if (userRoleIds.contains(UserRoleEnum.JOIN_OFFICE.getCode()) || userRoleIds.contains(UserRoleEnum.REGION_OFFICE.getCode())) {
|
||||||
subStageStatusList.add(SHOP_SUB_STAGE_STATUS_70.getShopSubStageStatus());
|
subStageStatusList.add(SHOP_SUB_STAGE_STATUS_70.getShopSubStageStatus());
|
||||||
}
|
}
|
||||||
if (userRoleIds.contains(UserRoleEnum.BRANCH_OFFICE.getCode()) || userRoleIds.contains(UserRoleEnum.REGION_OFFICE.getCode())) {
|
|
||||||
subStageStatusList.add(SHOP_SUB_STAGE_STATUS_72.getShopSubStageStatus());
|
|
||||||
}
|
|
||||||
if (!subStageStatusList.isEmpty()) {
|
if (!subStageStatusList.isEmpty()) {
|
||||||
pageInfo = commonPendingVOPageInfo(pageNum, pageSize, user, ShopSubStageEnum.SHOP_STAGE_7,
|
pageInfo = commonPendingVOPageInfo(pageNum, pageSize, user, ShopSubStageEnum.SHOP_STAGE_7,
|
||||||
subStageStatusList, Boolean.TRUE,keyword);
|
subStageStatusList, Boolean.TRUE,keyword);
|
||||||
|
|||||||
@@ -166,4 +166,15 @@ public class DataHandlerController {
|
|||||||
public ApiResponse<Boolean> batchStatusRefreshYls(@RequestBody @Validated BatchStatusRefreshDTO batchStatusRefreshDTO) {
|
public ApiResponse<Boolean> batchStatusRefreshYls(@RequestBody @Validated BatchStatusRefreshDTO batchStatusRefreshDTO) {
|
||||||
return ApiResponse.success(dataHandlerServer.batchStatusRefreshYls(batchStatusRefreshDTO));
|
return ApiResponse.success(dataHandlerServer.batchStatusRefreshYls(batchStatusRefreshDTO));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("处理加盟费阶段")
|
||||||
|
@GetMapping("/franchiseFeeStageDateHandler")
|
||||||
|
public ResponseResult<Boolean> franchiseFeeStageDateHandler(){
|
||||||
|
return ResponseResult.success(dataHandlerServer.franchiseFeeStageDateHandler());
|
||||||
|
}
|
||||||
|
@ApiOperation("处理加盟费缴费信息历史数据")
|
||||||
|
@GetMapping("/franchiseFeeDateHandler")
|
||||||
|
public ResponseResult<Boolean> franchiseFeeDateHandler(@RequestParam("pageSize") Integer pageSize, @RequestParam("pageNum") Integer pageNum){
|
||||||
|
return ResponseResult.success(dataHandlerServer.franchiseFeeDateHandler(pageSize,pageNum));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user