Merge #133 into master from cc_20260512_merge_fix
feat:上传租赁合同审批 * cc_20260512_merge_fix: (1 commits squashed) - feat:上传租赁合同审批 Signed-off-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com> Merged-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com> CR-link: https://codeup.aliyun.com/692ea314dec569489f6f167c/hangzhou/java/custom_zxjp/change/133
This commit is contained in:
@@ -360,8 +360,8 @@ public class ShopStageInfoDAO {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public List<ShopStageInfoDO> getOperationsConsultantStageInfo(List<Long> shopIds, Integer shopSubStage,
|
public List<ShopStageInfoDO> getOperationsConsultantStageInfo(List<Long> shopIds, Integer shopSubStage,
|
||||||
List<Integer> shopSubStageStatusList,
|
List<Integer> shopSubStageStatusList,
|
||||||
String investmentUserId, DeskRequest deskRequest) {
|
String investmentUserId, DeskRequest deskRequest) {
|
||||||
return shopStageInfoMapper.getOperationsConsultantStageInfo(shopIds, shopSubStage, shopSubStageStatusList, investmentUserId, deskRequest);
|
return shopStageInfoMapper.getOperationsConsultantStageInfo(shopIds, shopSubStage, shopSubStageStatusList, investmentUserId, deskRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -52,15 +52,15 @@ public interface ShopStageInfoMapper extends Mapper<ShopStageInfoDO> {
|
|||||||
|
|
||||||
Integer getCompletionCount(@Param("shopId") Long shopId);
|
Integer getCompletionCount(@Param("shopId") Long shopId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 跟新店铺阶段信息
|
* 跟新店铺阶段信息
|
||||||
* @param shopId
|
* @param shopId
|
||||||
* @param shopSubStage
|
* @param shopSubStage
|
||||||
* @param shopSubStageStatus
|
* @param shopSubStageStatus
|
||||||
* @param isTerminated
|
* @param isTerminated
|
||||||
* @param remark
|
* @param remark
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Integer updateShopStageInfo(@Param("shopId") Long shopId, @Param("shopSubStage") Integer shopSubStage, @Param("shopSubStageStatus") Integer shopSubStageStatus,
|
Integer updateShopStageInfo(@Param("shopId") Long shopId, @Param("shopSubStage") Integer shopSubStage, @Param("shopSubStageStatus") Integer shopSubStageStatus,
|
||||||
@Param("isTerminated")boolean isTerminated, @Param("remark") String remark);
|
@Param("isTerminated")boolean isTerminated, @Param("remark") String remark);
|
||||||
|
|
||||||
@@ -88,7 +88,7 @@ public interface ShopStageInfoMapper extends Mapper<ShopStageInfoDO> {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Integer updateShopStageAndAuditInfo(@Param("shopId") Long shopId, @Param("shopSubStage") Integer shopSubStage, @Param("shopSubStageStatus") Integer shopSubStageStatus,
|
Integer updateShopStageAndAuditInfo(@Param("shopId") Long shopId, @Param("shopSubStage") Integer shopSubStage, @Param("shopSubStageStatus") Integer shopSubStageStatus,
|
||||||
@Param("isTerminated")boolean isTerminated, @Param("remark") String remark, @Param("auditId")Long auditId);
|
@Param("isTerminated")boolean isTerminated, @Param("remark") String remark, @Param("auditId")Long auditId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取子阶段信息
|
* 获取子阶段信息
|
||||||
@@ -167,10 +167,10 @@ public interface ShopStageInfoMapper extends Mapper<ShopStageInfoDO> {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<ShopStageInfoDO> getOperationsConsultantStageInfo(@Param("shopIds") List<Long> shopIds,
|
List<ShopStageInfoDO> getOperationsConsultantStageInfo(@Param("shopIds") List<Long> shopIds,
|
||||||
@Param("shopSubStage") Integer shopSubStage,
|
@Param("shopSubStage") Integer shopSubStage,
|
||||||
@Param("shopSubStageStatusList") List<Integer> shopSubStageStatusList,
|
@Param("shopSubStageStatusList") List<Integer> shopSubStageStatusList,
|
||||||
@Param("operationsConsultant") String operationsConsultant,
|
@Param("operationsConsultant") String operationsConsultant,
|
||||||
@Param("request") DeskRequest deskRequest);
|
@Param("request") DeskRequest deskRequest);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -206,9 +206,9 @@ public interface ShopStageInfoMapper extends Mapper<ShopStageInfoDO> {
|
|||||||
List<ShopStageInfoDO> getShopSubStages(@Param("shopIds") List<Long> shopIds);
|
List<ShopStageInfoDO> getShopSubStages(@Param("shopIds") List<Long> shopIds);
|
||||||
|
|
||||||
Integer dataUpdateStatus(@Param("list") List<Long> list, @Param("shopSubStage") Integer shopSubStage, @Param("shopSubStageStatus") Integer shopSubStageStatus,
|
Integer dataUpdateStatus(@Param("list") List<Long> list, @Param("shopSubStage") Integer shopSubStage, @Param("shopSubStageStatus") Integer shopSubStageStatus,
|
||||||
@Param("isTerminated")boolean isTerminated, @Param("remark") String remark);
|
|
||||||
|
|
||||||
Integer dataUpdateAcceptanceStatus(@Param("list") List<Long> list, @Param("shopSubStage") Integer shopSubStage, @Param("shopSubStageStatus") Integer shopSubStageStatus,
|
|
||||||
@Param("isTerminated")boolean isTerminated, @Param("remark") String remark);
|
@Param("isTerminated")boolean isTerminated, @Param("remark") String remark);
|
||||||
|
|
||||||
|
Integer dataUpdateAcceptanceStatus(@Param("list") List<Long> list, @Param("shopSubStage") Integer shopSubStage, @Param("shopSubStageStatus") Integer shopSubStageStatus,
|
||||||
|
@Param("isTerminated")boolean isTerminated, @Param("remark") String remark);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,31 +63,31 @@
|
|||||||
|
|
||||||
<select id="getPreparationProcess" resultType="com.cool.store.vo.Preparation.PreparationProcessVO">
|
<select id="getPreparationProcess" resultType="com.cool.store.vo.Preparation.PreparationProcessVO">
|
||||||
select
|
select
|
||||||
max(plan_complete_time) as planStartTime,
|
max(plan_complete_time) as planStartTime,
|
||||||
sum(if(is_terminated = 1, 1, 0)) as finishCount
|
sum(if(is_terminated = 1, 1, 0)) as finishCount
|
||||||
from xfsg_shop_stage_info where shop_id = #{shopId}
|
from xfsg_shop_stage_info where shop_id = #{shopId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getAllCompletionCount" resultType="java.lang.Integer">
|
<select id="getAllCompletionCount" resultType="java.lang.Integer">
|
||||||
select
|
select
|
||||||
count(1)
|
count(1)
|
||||||
from
|
from
|
||||||
xfsg_shop_stage_info
|
xfsg_shop_stage_info
|
||||||
where
|
where
|
||||||
shop_id = #{shopId} and deleted = 0 and is_terminated = 1
|
shop_id = #{shopId} and deleted = 0 and is_terminated = 1
|
||||||
and shop_sub_stage in (60,40,120,140,150)
|
and shop_sub_stage in (60,40,120,140,150)
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<update id="updateShopStageInfo">
|
<update id="updateShopStageInfo">
|
||||||
update
|
update
|
||||||
xfsg_shop_stage_info
|
xfsg_shop_stage_info
|
||||||
set
|
set
|
||||||
shop_sub_stage_status = #{shopSubStageStatus},
|
shop_sub_stage_status = #{shopSubStageStatus},
|
||||||
is_terminated = #{isTerminated},
|
is_terminated = #{isTerminated},
|
||||||
remark = #{remark},
|
remark = #{remark},
|
||||||
actual_complete_time = if(is_terminated, now(), null)
|
actual_complete_time = if(is_terminated, now(), null)
|
||||||
where
|
where
|
||||||
shop_id = #{shopId} and shop_sub_stage = #{shopSubStage}
|
shop_id = #{shopId} and shop_sub_stage = #{shopSubStage}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
|
||||||
@@ -116,28 +116,28 @@
|
|||||||
|
|
||||||
<update id="updateShopStageAndAuditInfo">
|
<update id="updateShopStageAndAuditInfo">
|
||||||
update
|
update
|
||||||
xfsg_shop_stage_info
|
xfsg_shop_stage_info
|
||||||
set
|
set
|
||||||
shop_sub_stage_status = #{shopSubStageStatus},
|
shop_sub_stage_status = #{shopSubStageStatus},
|
||||||
is_terminated = #{isTerminated},
|
is_terminated = #{isTerminated},
|
||||||
remark = #{remark},
|
remark = #{remark},
|
||||||
actual_complete_time = if(is_terminated, now(), null),
|
actual_complete_time = if(is_terminated, now(), null),
|
||||||
audit_id = #{auditId}
|
audit_id = #{auditId}
|
||||||
where
|
where
|
||||||
shop_id = #{shopId} and shop_sub_stage = #{shopSubStage}
|
shop_id = #{shopId} and shop_sub_stage = #{shopSubStage}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<update id="updateShopStageToNotStarted">
|
<update id="updateShopStageToNotStarted">
|
||||||
update
|
update
|
||||||
xfsg_shop_stage_info
|
xfsg_shop_stage_info
|
||||||
set
|
set
|
||||||
shop_sub_stage_status = -100,
|
shop_sub_stage_status = -100,
|
||||||
is_terminated = 0,
|
is_terminated = 0,
|
||||||
remark = '未开始',
|
remark = '未开始',
|
||||||
actual_complete_time = null,
|
actual_complete_time = null,
|
||||||
audit_id = null
|
audit_id = null
|
||||||
where
|
where
|
||||||
shop_id = #{shopId} and shop_sub_stage = #{shopSubStage}
|
shop_id = #{shopId} and shop_sub_stage = #{shopSubStage}
|
||||||
</update>
|
</update>
|
||||||
<update id="updateByShopId">
|
<update id="updateByShopId">
|
||||||
update xfsg_shop_stage_info
|
update xfsg_shop_stage_info
|
||||||
@@ -244,9 +244,9 @@
|
|||||||
inner join xfsg_line_info b on a.line_id = b.id
|
inner join xfsg_line_info b on a.line_id = b.id
|
||||||
left join xfsg_shop_info c on a.shop_id = c.id
|
left join xfsg_shop_info c on a.shop_id = c.id
|
||||||
where c.deleted=0
|
where c.deleted=0
|
||||||
and a.shop_sub_stage = #{shopSubStage}
|
and a.shop_sub_stage = #{shopSubStage}
|
||||||
and a.deleted = 0
|
and a.deleted = 0
|
||||||
and b.deleted = 0
|
and b.deleted = 0
|
||||||
<if test="shopSubStageStatusList != null and shopSubStageStatusList.size() > 0">
|
<if test="shopSubStageStatusList != null and shopSubStageStatusList.size() > 0">
|
||||||
and a.shop_sub_stage_status in
|
and a.shop_sub_stage_status in
|
||||||
<foreach collection="shopSubStageStatusList" item="shopSubStageStatus" index="index" open="(" separator="," close=")">
|
<foreach collection="shopSubStageStatusList" item="shopSubStageStatus" index="index" open="(" separator="," close=")">
|
||||||
@@ -307,12 +307,12 @@
|
|||||||
</select>
|
</select>
|
||||||
<select id="getShopContractIncompletion" resultType="java.lang.Long">
|
<select id="getShopContractIncompletion" resultType="java.lang.Long">
|
||||||
SELECT
|
SELECT
|
||||||
shop_id
|
shop_id
|
||||||
FROM
|
FROM
|
||||||
xfsg_shop_stage_info
|
xfsg_shop_stage_info
|
||||||
WHERE
|
WHERE
|
||||||
shop_sub_stage = 110
|
shop_sub_stage = 110
|
||||||
AND (shop_sub_stage_status = 1100 OR shop_sub_stage_status = 1110)
|
AND (shop_sub_stage_status = 1100 OR shop_sub_stage_status = 1110)
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
@@ -320,7 +320,7 @@
|
|||||||
select
|
select
|
||||||
*
|
*
|
||||||
from xfsg_shop_stage_info a
|
from xfsg_shop_stage_info a
|
||||||
left join xfsg_shop_info si on a.shop_id = si.id
|
left join xfsg_shop_info si on a.shop_id = si.id
|
||||||
<if test="request.signTypes != null and request.signTypes.size() >0">
|
<if test="request.signTypes != null and request.signTypes.size() >0">
|
||||||
left join xfsg_sign_franchise sign on a.shop_id = sign.shop_id
|
left join xfsg_sign_franchise sign on a.shop_id = sign.shop_id
|
||||||
</if>
|
</if>
|
||||||
@@ -334,9 +334,9 @@
|
|||||||
</if>
|
</if>
|
||||||
<if test="shopSubStage!=null">
|
<if test="shopSubStage!=null">
|
||||||
and a.shop_sub_stage = #{shopSubStage}
|
and a.shop_sub_stage = #{shopSubStage}
|
||||||
<if test = "shopSubStage == 86 or shopSubStage == 90 or shopSubStage == 110 or shopSubStage == 120">
|
<if test = "shopSubStage == 86 or shopSubStage == 90 or shopSubStage == 110 or shopSubStage == 120">
|
||||||
and (si.hqt_shop_id is null or si.hqt_shop_id = '')
|
and (si.hqt_shop_id is null or si.hqt_shop_id = '')
|
||||||
</if>
|
</if>
|
||||||
</if>
|
</if>
|
||||||
<if test="shopSubStageStatusList != null and shopSubStageStatusList.size() > 0">
|
<if test="shopSubStageStatusList != null and shopSubStageStatusList.size() > 0">
|
||||||
and a.shop_sub_stage_status in
|
and a.shop_sub_stage_status in
|
||||||
@@ -510,7 +510,7 @@
|
|||||||
|
|
||||||
<select id="getShopCountByLineIdAndStageStatus" resultType="integer">
|
<select id="getShopCountByLineIdAndStageStatus" resultType="integer">
|
||||||
select count(1) from xfsg_shop_stage_info where shop_stage = #{shopStage} and shop_sub_stage = #{shopSubStage}
|
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}
|
and shop_sub_stage_status = #{shopSubStageStatus} and line_id = #{lineId}
|
||||||
</select>
|
</select>
|
||||||
<select id="getSubStageListBySubStageStatus" resultType="com.cool.store.entity.ShopStageInfoDO">
|
<select id="getSubStageListBySubStageStatus" resultType="com.cool.store.entity.ShopStageInfoDO">
|
||||||
select *
|
select *
|
||||||
@@ -600,22 +600,22 @@
|
|||||||
</select>
|
</select>
|
||||||
<select id="getScheduleAll" resultType="com.cool.store.dto.Preparation.ScheduleDTO">
|
<select id="getScheduleAll" resultType="com.cool.store.dto.Preparation.ScheduleDTO">
|
||||||
select
|
select
|
||||||
shop_id as shopId,
|
shop_id as shopId,
|
||||||
max(plan_complete_time) as planCompleteTime,
|
max(plan_complete_time) as planCompleteTime,
|
||||||
count(1)-1 as totalColumn,
|
count(1)-1 as totalColumn,
|
||||||
sum(if(is_terminated = 1 and shop_sub_stage!=85, 1, 0)) as completionColumn
|
sum(if(is_terminated = 1 and shop_sub_stage!=85, 1, 0)) as completionColumn
|
||||||
from xfsg_shop_stage_info where shop_stage = 2 and
|
from xfsg_shop_stage_info where shop_stage = 2 and
|
||||||
shop_id = #{shopId}
|
shop_id = #{shopId}
|
||||||
|
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
<select id="getCompletionCount" resultType="java.lang.Integer">
|
<select id="getCompletionCount" resultType="java.lang.Integer">
|
||||||
select
|
select
|
||||||
count(1)
|
count(1)
|
||||||
from
|
from
|
||||||
xfsg_shop_stage_info
|
xfsg_shop_stage_info
|
||||||
where
|
where
|
||||||
shop_id = #{shopId} and deleted = 0 and is_terminated = 1 and shop_stage in (1,2)
|
shop_id = #{shopId} and deleted = 0 and is_terminated = 1 and shop_stage in (1,2)
|
||||||
</select>
|
</select>
|
||||||
<select id="getShopSubStages" resultType="com.cool.store.entity.ShopStageInfoDO">
|
<select id="getShopSubStages" resultType="com.cool.store.entity.ShopStageInfoDO">
|
||||||
select shop_id as shopId,
|
select shop_id as shopId,
|
||||||
|
|||||||
@@ -21,4 +21,13 @@ public interface OperationLogService {
|
|||||||
List<AuditInfoResponse> getAuditInfo(Long shopId,List<Integer> shopSubStageList);
|
List<AuditInfoResponse> getAuditInfo(Long shopId,List<Integer> shopSubStageList);
|
||||||
|
|
||||||
Boolean batchUpdateProcessed( List<OperationLogDO> operationLogs,Long audit , String userId, String reason);
|
Boolean batchUpdateProcessed( List<OperationLogDO> operationLogs,Long audit , String userId, String reason);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 后期新增的阶段数据 对于处在阶段中的数据 可能没有提前生成审批记录 直接插入数据 且是审批完成状态
|
||||||
|
* @param subStageStatusEnum
|
||||||
|
* @param audit
|
||||||
|
* @param userId
|
||||||
|
* @param reason
|
||||||
|
*/
|
||||||
|
Boolean handleApproveTimeNoDate(Long shopId,ShopSubStageStatusEnum subStageStatusEnum,Long audit , String userId, String reason);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -304,7 +304,7 @@ public interface PointService {
|
|||||||
* @param request
|
* @param request
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Integer uploadRentContract(AddRentContractRequest request);
|
Integer uploadRentContract(AddRentContractRequest request,String userId,String userName);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取租赁合同详情
|
* 获取租赁合同详情
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ public class OperationLogServiceImpl implements OperationLogService {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
Map<Date, List<OperationLogDO>> operationLogMap = logList.stream().collect(Collectors.groupingBy(OperationLogDO::getCreateTime));
|
Map<Date, List<OperationLogDO>> operationLogMap = logList.stream().collect(Collectors.groupingBy(OperationLogDO::getCreateTime));
|
||||||
//根据时间分组
|
//根据时间分组
|
||||||
for (Date date : operationLogMap.keySet()) {
|
for (Date date : operationLogMap.keySet()) {
|
||||||
List<OperationLogDO> operations = operationLogMap.get(date);
|
List<OperationLogDO> operations = operationLogMap.get(date);
|
||||||
AuditInfoResponse auditInfoResponse = new AuditInfoResponse();
|
AuditInfoResponse auditInfoResponse = new AuditInfoResponse();
|
||||||
@@ -230,11 +230,35 @@ public class OperationLogServiceImpl implements OperationLogService {
|
|||||||
operationLogDO.setCreateTime(createTime);
|
operationLogDO.setCreateTime(createTime);
|
||||||
operationLogDO.setUpdateTime(updateTime);
|
operationLogDO.setUpdateTime(updateTime);
|
||||||
operationLogDO.setCreateUserId(userId);
|
operationLogDO.setCreateUserId(userId);
|
||||||
operationLogDAO.addOperationLog(operationLogDO);
|
operationLogDAO.addOperationLog(operationLogDO);
|
||||||
}
|
}
|
||||||
return operationLogDAO.batchUpdateByPrimaryKeySelective(operationLogList);
|
return operationLogDAO.batchUpdateByPrimaryKeySelective(operationLogList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean handleApproveTimeNoDate(Long shopId,ShopSubStageStatusEnum subStageStatusEnum, Long audit, String userId, String reason) {
|
||||||
|
OperationLogDO operationLogDO = new OperationLogDO();
|
||||||
|
operationLogDO.setOperator(userId);
|
||||||
|
operationLogDO.setAuditResultId(audit);
|
||||||
|
operationLogDO.setRemarks(reason);
|
||||||
|
operationLogDO.setShopId(shopId);
|
||||||
|
operationLogDO.setShopSubStage(subStageStatusEnum.getShopSubStageEnum().getShopSubStage());
|
||||||
|
operationLogDO.setShopSubStageStatus(subStageStatusEnum.getShopSubStageStatus());
|
||||||
|
operationLogDO.setStatus(OperationStatusEnum.PROCESSED.getCode());
|
||||||
|
operationLogDO.setType(OperationTypeEnum.OPERATION_TYPE_1.getCode());
|
||||||
|
String userName = enterpriseUserDAO.getUserName(userId);
|
||||||
|
if (StringUtils.isNotBlank(userName)) {
|
||||||
|
operationLogDO.setOperatorName(userName);
|
||||||
|
}
|
||||||
|
Date createTime = new Date();
|
||||||
|
Date updateTime = new Date();
|
||||||
|
operationLogDO.setCreateTime(createTime);
|
||||||
|
operationLogDO.setUpdateTime(updateTime);
|
||||||
|
operationLogDO.setCreateUserId(userId);
|
||||||
|
operationLogDAO.addOperationLog(operationLogDO);
|
||||||
|
return Boolean.TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -51,8 +51,7 @@ import java.util.*;
|
|||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import static com.cool.store.enums.point.ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_21;
|
import static com.cool.store.enums.point.ShopSubStageStatusEnum.*;
|
||||||
import static com.cool.store.enums.point.ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_21_5;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author zhangchenbiao
|
* @author zhangchenbiao
|
||||||
@@ -106,6 +105,10 @@ public class PointServiceImpl implements PointService {
|
|||||||
private String enterpriseId;
|
private String enterpriseId;
|
||||||
@Resource
|
@Resource
|
||||||
SysRoleMapper sysRoleMapper;
|
SysRoleMapper sysRoleMapper;
|
||||||
|
@Resource
|
||||||
|
OperationLogService operationLogService;
|
||||||
|
@Resource
|
||||||
|
OperationLogDAO operationLogDAO;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
PointFinancialDataDAO pointFinancialDataDAO;
|
PointFinancialDataDAO pointFinancialDataDAO;
|
||||||
@@ -125,7 +128,7 @@ public class PointServiceImpl implements PointService {
|
|||||||
String userId = user.getUserId();
|
String userId = user.getUserId();
|
||||||
PointInfoDO pointInfo = AddPointDetailRequest.convertPointDO(shopPointDetailRequest);
|
PointInfoDO pointInfo = AddPointDetailRequest.convertPointDO(shopPointDetailRequest);
|
||||||
if (shopId != null) {
|
if (shopId != null) {
|
||||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
||||||
if (Objects.isNull(shopInfo)){
|
if (Objects.isNull(shopInfo)){
|
||||||
throw new ServiceException(ErrorCodeEnum.SHOP_ID_NOT_EXIST);
|
throw new ServiceException(ErrorCodeEnum.SHOP_ID_NOT_EXIST);
|
||||||
}
|
}
|
||||||
@@ -329,7 +332,7 @@ public class PointServiceImpl implements PointService {
|
|||||||
//租赁合同回到未开始
|
//租赁合同回到未开始
|
||||||
Integer result = shopStageInfoDAO.updateShopStageToNotStarted(shopId, ShopSubStageEnum.SHOP_STAGE_2);
|
Integer result = shopStageInfoDAO.updateShopStageToNotStarted(shopId, ShopSubStageEnum.SHOP_STAGE_2);
|
||||||
if (result > CommonConstants.ZERO) {
|
if (result > CommonConstants.ZERO) {
|
||||||
//删除租赁合同
|
//删除租赁合同
|
||||||
shopRentInfoDAO.deleteRentContractByShopId(shopId);
|
shopRentInfoDAO.deleteRentContractByShopId(shopId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1031,7 +1034,7 @@ public class PointServiceImpl implements PointService {
|
|||||||
pointInfoDAO.updatePointInfo(updatePoint);
|
pointInfoDAO.updatePointInfo(updatePoint);
|
||||||
ShopInfoDO updateShop = new ShopInfoDO();
|
ShopInfoDO updateShop = new ShopInfoDO();
|
||||||
updateShop.setId(shopId);
|
updateShop.setId(shopId);
|
||||||
// updateShop.setShopName(pointInfo.getPointName());
|
// updateShop.setShopName(pointInfo.getPointName());
|
||||||
updateShop.setPointId(pointId);
|
updateShop.setPointId(pointId);
|
||||||
updateShop.setInvestRegionId(pointInfo.getRegionId());
|
updateShop.setInvestRegionId(pointInfo.getRegionId());
|
||||||
shopInfoDAO.updateShopInfo(updateShop);
|
shopInfoDAO.updateShopInfo(updateShop);
|
||||||
@@ -1126,7 +1129,7 @@ public class PointServiceImpl implements PointService {
|
|||||||
Long pointId = pointInfoDAO.addPointInfo(pointInfo);
|
Long pointId = pointInfoDAO.addPointInfo(pointInfo);
|
||||||
pointDetailInfo.setPointId(pointId);
|
pointDetailInfo.setPointId(pointId);
|
||||||
pointDetailInfoDAO.addPointDetailInfo(pointDetailInfo);
|
pointDetailInfoDAO.addPointDetailInfo(pointDetailInfo);
|
||||||
// shopInfo.setShopName(pointInfo.getPointName());
|
// shopInfo.setShopName(pointInfo.getPointName());
|
||||||
shopInfo.setPointId(pointId);
|
shopInfo.setPointId(pointId);
|
||||||
shopInfoDAO.updateShopInfo(shopInfo);
|
shopInfoDAO.updateShopInfo(shopInfo);
|
||||||
PointRecommendDO pointRecommendDO = new PointRecommendDO();
|
PointRecommendDO pointRecommendDO = new PointRecommendDO();
|
||||||
@@ -1195,14 +1198,13 @@ public class PointServiceImpl implements PointService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer uploadRentContract(AddRentContractRequest request) {
|
public Integer uploadRentContract(AddRentContractRequest request,String userId,String userName) {
|
||||||
if (!request.check()) {
|
if (!request.check()) {
|
||||||
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
||||||
}
|
}
|
||||||
Long pointId = request.getPointId(), shopId = request.getShopId();
|
Long pointId = request.getPointId(), shopId = request.getShopId();
|
||||||
ShopInfoDO shopInfo = null;
|
ShopInfoDO shopInfo = shopInfo = shopInfoDAO.getShopInfo(shopId);;
|
||||||
if (Objects.isNull(pointId) && Objects.nonNull(shopId)) {
|
if (Objects.isNull(pointId) && Objects.nonNull(shopId)) {
|
||||||
shopInfo = shopInfoDAO.getShopInfo(shopId);
|
|
||||||
pointId = shopInfo.getPointId();
|
pointId = shopInfo.getPointId();
|
||||||
}
|
}
|
||||||
if (Objects.nonNull(pointId) && Objects.isNull(shopId)) {
|
if (Objects.nonNull(pointId) && Objects.isNull(shopId)) {
|
||||||
@@ -1239,6 +1241,13 @@ public class PointServiceImpl implements PointService {
|
|||||||
MessageEnum.MESSAGE_15,
|
MessageEnum.MESSAGE_15,
|
||||||
map);
|
map);
|
||||||
}
|
}
|
||||||
|
// 审批记录
|
||||||
|
operationLogService.addOperationLog(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_20, userId, userName,
|
||||||
|
OperationTypeEnum.OPERATION_TYPE_0, "加盟商上传租赁合同", OperationStatusEnum.PROCESSED);
|
||||||
|
List<EnterpriseUserDO> userDOList = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.REGION_MANAGER, shopInfo.getInvestRegionId());
|
||||||
|
operationLogService.addOperationLog(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_21,
|
||||||
|
userId, userDOList,
|
||||||
|
OperationTypeEnum.OPERATION_TYPE_1, "招商片区老总审核", OperationStatusEnum.NOT_PROCESSED);
|
||||||
return shopStageInfoDAO.updateShopStageInfo(shopId, SHOP_SUB_STAGE_STATUS_21);
|
return shopStageInfoDAO.updateShopStageInfo(shopId, SHOP_SUB_STAGE_STATUS_21);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1286,6 +1295,8 @@ public class PointServiceImpl implements PointService {
|
|||||||
Long auditId = shopAuditInfoDAO.addAuditInfo(AuditRentContractRequest.convert(request, AuditTypeEnum.UPLOAD_RENT_CONTRACT));
|
Long auditId = shopAuditInfoDAO.addAuditInfo(AuditRentContractRequest.convert(request, AuditTypeEnum.UPLOAD_RENT_CONTRACT));
|
||||||
|
|
||||||
ShopSubStageStatusEnum subStageStatus = null;
|
ShopSubStageStatusEnum subStageStatus = null;
|
||||||
|
Integer current = shopStageInfo.getShopSubStageStatus();
|
||||||
|
ShopSubStageStatusEnum currentShopSubStageStatusEnum = getShopSubStageStatusEnum(current);
|
||||||
if (AuditResultTypeEnum.PASS.getCode().equals(request.getResultType())){
|
if (AuditResultTypeEnum.PASS.getCode().equals(request.getResultType())){
|
||||||
if (shopStageInfo.getShopSubStageStatus().equals(SHOP_SUB_STAGE_STATUS_21.getShopSubStageStatus())){
|
if (shopStageInfo.getShopSubStageStatus().equals(SHOP_SUB_STAGE_STATUS_21.getShopSubStageStatus())){
|
||||||
subStageStatus = SHOP_SUB_STAGE_STATUS_21_5;
|
subStageStatus = SHOP_SUB_STAGE_STATUS_21_5;
|
||||||
@@ -1296,6 +1307,16 @@ public class PointServiceImpl implements PointService {
|
|||||||
}else {
|
}else {
|
||||||
subStageStatus = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_22;
|
subStageStatus = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_22;
|
||||||
}
|
}
|
||||||
|
//处理审批
|
||||||
|
handleApprove(shopId,AuditTypeEnum.UPLOAD_RENT_CONTRACT,request.getOperateUserId(),request.getOperateUserName(),
|
||||||
|
request.getResultType(),currentShopSubStageStatusEnum,request.getReason());
|
||||||
|
//如果有下一级
|
||||||
|
if (SHOP_SUB_STAGE_STATUS_21.getShopSubStageStatus().equals(currentShopSubStageStatusEnum.getShopSubStageStatus())){
|
||||||
|
List<EnterpriseUserDO> userDOList = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.BRANCH_OFFICE, shopInfo.getInvestRegionId());
|
||||||
|
operationLogService.addOperationLog(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_21_5,
|
||||||
|
request.getOperateUserId(), userDOList,
|
||||||
|
OperationTypeEnum.OPERATION_TYPE_1, "分部内勤审核", OperationStatusEnum.NOT_PROCESSED);
|
||||||
|
}
|
||||||
|
|
||||||
if (ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_23.equals(subStageStatus)) {
|
if (ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_23.equals(subStageStatus)) {
|
||||||
//审核通过铺位变为已签约
|
//审核通过铺位变为已签约
|
||||||
@@ -1324,6 +1345,41 @@ public class PointServiceImpl implements PointService {
|
|||||||
return CommonConstants.ONE;
|
return CommonConstants.ONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理审批
|
||||||
|
* @param shopId
|
||||||
|
* @param auditTypeEnum
|
||||||
|
* @param userId
|
||||||
|
* @param userName
|
||||||
|
* @param resultType
|
||||||
|
* @param currentStatusEnum
|
||||||
|
* @param cause
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private Boolean handleApprove(Long shopId,AuditTypeEnum auditTypeEnum,String userId,String userName,Integer resultType,ShopSubStageStatusEnum currentStatusEnum,String cause){
|
||||||
|
ShopAuditInfoDO shopAuditInfoDO = new ShopAuditInfoDO();
|
||||||
|
shopAuditInfoDO.setShopId(shopId);
|
||||||
|
shopAuditInfoDO.setAuditType(auditTypeEnum.getCode());
|
||||||
|
shopAuditInfoDO.setSubmittedUserId(userId);
|
||||||
|
shopAuditInfoDO.setSubmittedUserName(userName);
|
||||||
|
shopAuditInfoDO.setResultType(resultType);
|
||||||
|
if (AuditResultTypeEnum.PASS.getCode().equals(shopAuditInfoDO.getResultType())) {
|
||||||
|
shopAuditInfoDO.setPassReason(cause);
|
||||||
|
} else {
|
||||||
|
shopAuditInfoDO.setRejectReason(cause);
|
||||||
|
}
|
||||||
|
Long auditId = shopAuditInfoDAO.addAuditInfo(shopAuditInfoDO);
|
||||||
|
//更新操作记录
|
||||||
|
List<OperationLogDO> operationLogs = operationLogDAO.getBySubStageStatusEnumAndsStatus(shopId, currentStatusEnum, OperationTypeEnum.OPERATION_TYPE_1.getCode());
|
||||||
|
if (CollectionUtils.isNotEmpty(operationLogs)){
|
||||||
|
operationLogService.batchUpdateProcessed(operationLogs, auditId, userId, cause);
|
||||||
|
}else {
|
||||||
|
operationLogService.handleApproveTimeNoDate(shopId,currentStatusEnum,auditId, userId, cause);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer updateRentContract(UpdateRentContractRequest request) {
|
public Integer updateRentContract(UpdateRentContractRequest request) {
|
||||||
if (!request.check()) {
|
if (!request.check()) {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.cool.store.controller.webb;
|
|||||||
|
|
||||||
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.context.LoginUserInfo;
|
||||||
import com.cool.store.context.PartnerUserHolder;
|
import com.cool.store.context.PartnerUserHolder;
|
||||||
import com.cool.store.dto.point.PointStatisticsDTO;
|
import com.cool.store.dto.point.PointStatisticsDTO;
|
||||||
import com.cool.store.dto.point.ShopPointDTO;
|
import com.cool.store.dto.point.ShopPointDTO;
|
||||||
@@ -283,7 +284,8 @@ public class PointController {
|
|||||||
@ApiOperation("上传租赁合同")
|
@ApiOperation("上传租赁合同")
|
||||||
@PostMapping("/uploadRentContract")
|
@PostMapping("/uploadRentContract")
|
||||||
public ResponseResult<Integer> uploadRentContract(@RequestBody @Validated AddRentContractRequest request) {
|
public ResponseResult<Integer> uploadRentContract(@RequestBody @Validated AddRentContractRequest request) {
|
||||||
return ResponseResult.success(pointService.uploadRentContract(request));
|
LoginUserInfo user = CurrentUserHolder.getUser();
|
||||||
|
return ResponseResult.success(pointService.uploadRentContract(request,user.getUserId(),user.getName()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("保存点位测算 V3.0 新增")
|
@ApiOperation("保存点位测算 V3.0 新增")
|
||||||
|
|||||||
@@ -97,9 +97,9 @@ public class MiniShopController {
|
|||||||
@ApiOperation("上传租赁合同")
|
@ApiOperation("上传租赁合同")
|
||||||
@PostMapping("/uploadRentContract")
|
@PostMapping("/uploadRentContract")
|
||||||
public ResponseResult<Integer> uploadRentContract(@RequestBody @Validated AddRentContractRequest request) {
|
public ResponseResult<Integer> uploadRentContract(@RequestBody @Validated AddRentContractRequest request) {
|
||||||
Long lineId = PartnerUserHolder.getUser().getLineId();
|
PartnerUserInfoVO user = PartnerUserHolder.getUser();
|
||||||
request.setCurLineId(lineId);
|
request.setCurLineId(user.getLineId());
|
||||||
return ResponseResult.success(pointService.uploadRentContract(request));
|
return ResponseResult.success(pointService.uploadRentContract(request,user.getPartnerId(),user.getUsername()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("获取租赁合同详情")
|
@ApiOperation("获取租赁合同详情")
|
||||||
|
|||||||
Reference in New Issue
Block a user