Merge remote-tracking branch 'origin/cc_partner_init' into cc_partner_init

This commit is contained in:
shuo.wang
2024-05-07 14:27:21 +08:00
22 changed files with 132 additions and 157 deletions

View File

@@ -81,10 +81,29 @@ public class EmployeeTrainingServiceImpl implements EmployeeTrainingService {
List<Long> regionIds = list.stream().map(EmployeeTrainingVO::getRegionId).distinct().collect(Collectors.toList());
List<String> storeIdList = list.stream().map(EmployeeTrainingVO::getTrainingStoreId).distinct().collect(Collectors.toList());
List<StoreDO> storeDOList = storeDAO.getEffectiveStoreByStoreIds(storeIdList);
Map<String, String> storeNameMap = storeDOList.stream().collect(Collectors.toMap(StoreDO::getStoreId, StoreDO::getStoreName));
List<String> userIdList = list.stream().map(EmployeeTrainingVO::getTrainingTeacherUserId).distinct().collect(Collectors.toList());
List<String> practicalUserIdList = list.stream().map(EmployeeTrainingVO::getPracticalAssessmentUserId).distinct().collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(practicalUserIdList)) {
userIdList.addAll(practicalUserIdList);
}
Map<String, String> userNameMap = enterpriseUserDAO.getUserNameMap(userIdList);
Map<Long, String> regionNameMap = regionService.getBelongWarRegionNameMap(regionIds);
list.forEach(item -> {
item.setRegionNodeName(regionNameMap.get(item.getRegionId()));
item.setTrainingStoreName(storeNameMap.get(item.getTrainingStoreId()));
item.setTrainingTeacherUserName(userNameMap.get(item.getTrainingTeacherUserId()));
item.setPracticalAssessmentUserName(userNameMap.get(item.getPracticalAssessmentUserId()));
});
return new PageInfo<>(list);
}
@@ -179,7 +198,7 @@ public class EmployeeTrainingServiceImpl implements EmployeeTrainingService {
assessmentDataDO.setShopId(shopId);
assessmentDataDOList.add(assessmentDataDO);
});
assessmentDataDAO.batchInsert(assessmentDataDOList);
assessmentDataDAO.batchInsertDO(assessmentDataDOList);
}
@Override
@@ -207,6 +226,9 @@ public class EmployeeTrainingServiceImpl implements EmployeeTrainingService {
@Override
public List<EmployeeTrainingVO> trainerUserList(String userId, Integer status) {
List<EmployeeTrainingVO> list = employeeTrainingDAO.trainingListByShopId(null, userId, status);
if(CollectionUtils.isEmpty(list)){
return list;
}
List<String> storeIdList = list.stream().map(EmployeeTrainingVO::getTrainingStoreId).collect(Collectors.toList());
List<StoreDO> storeDOList = storeDAO.getEffectiveStoreByStoreIds(storeIdList);
Map<String, String> storeNameMap = storeDOList.stream().collect(Collectors.toMap(StoreDO::getStoreId, StoreDO::getStoreName));
@@ -239,6 +261,20 @@ public class EmployeeTrainingServiceImpl implements EmployeeTrainingService {
employeeUserTrainingVO.setMobile(tempUserDetailDO.getMobile());
employeeUserTrainingVO.setRoleId(tempUserDetailDO.getRoleId());
employeeUserTrainingVO.setIdCard(tempUserDetailDO.getIdCard());
employeeUserTrainingVO.setId(tempUserDetailDO.getId());
employeeUserTrainingVO.setUsername(tempUserDetailDO.getUsername());
employeeUserTrainingVO.setRegionId(tempUserDetailDO.getRegionId());
employeeUserTrainingVO.setShopId(tempUserDetailDO.getShopId());
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(tempUserDetailDO.getShopId());
if(shopInfoDO != null){
employeeUserTrainingVO.setShopName(shopInfoDO.getShopName());
}
StoreDO storeDO = storeDAO.getByStoreId(employeeTrainingDO.getTrainingStoreId());
if(storeDO != null){
employeeUserTrainingVO.setTrainingStoreName(storeDO.getStoreName());
}
employeeUserTrainingVO.setTrainingTeacherUserName(enterpriseUserDAO.getUserName(employeeTrainingDO.getTrainingTeacherUserId()));
List<AssessmentTemplateDO> assessmentTemplateDOList = assessmentTemplateDAO.listByType(AssessmentTemplateType.TRAINER.getCode());
List<Long> templateIdList = assessmentTemplateDOList.stream().map(AssessmentTemplateDO::getId).collect(Collectors.toList());
@@ -280,8 +316,8 @@ public class EmployeeTrainingServiceImpl implements EmployeeTrainingService {
if (CollectionUtils.isEmpty(request.getList())) {
return;
}
Long shopId = request.getList().get(0).getShopId();
Long userDetailId = request.getList().get(0).getShopId();
Long userDetailId = request.getUserDetailId();
TempUserDetailDO tempUserDetailDO = tempUserDetailDAO.selectById(userDetailId);
EmployeeTrainingDO employeeTrainingDO = employeeTrainingDAO.selectByUserDetailId(userDetailId);
@@ -300,13 +336,13 @@ public class EmployeeTrainingServiceImpl implements EmployeeTrainingService {
} else {
assessmentDataDO = new AssessmentDataDO();
assessmentDataDO.setTemplateId(item.getTemplateId());
assessmentDataDO.setAssessmentUserId(item.getUserDetailId());
assessmentDataDO.setAssessmentUserId(userId);
assessmentDataDO.setShopId(item.getShopId());
assessmentDataDO.setQualified(item.getQualified());
assessmentDataDAO.insertSelective(assessmentDataDO);
}
});
Integer num = assessmentDataDAO.selectCount(userId, shopId);
Integer num = assessmentDataDAO.selectCount(userId, tempUserDetailDO.getShopId());
employeeTrainingDO.setAssessmentNum(num);
if (num.equals(employeeTrainingDO.getAssessmentTotalNum())) {
employeeTrainingDO.setAssessmentStatus(1);
@@ -396,6 +432,8 @@ public class EmployeeTrainingServiceImpl implements EmployeeTrainingService {
assessmentTemplateDataVO.setComments(assessmentDataDO.getComments());
assessmentTemplateDataVO.setQualified(assessmentDataDO.getQualified());
assessmentTemplateDataVO.setAssessmentDataId(assessmentDataDO.getId());
assessmentTemplateDataVO.setPicture(assessmentDataDO.getPicture());
assessmentTemplateDataVO.setVideo(assessmentDataDO.getVideo());
}
assessmentTemplateDataVO.setScore(item.getScore());
assessmentTemplateDataVO.setTemplateName(item.getTemplateName());
@@ -405,6 +443,7 @@ public class EmployeeTrainingServiceImpl implements EmployeeTrainingService {
assessmentTemplateDataVO.setType(item.getType());
assessmentTemplateDataVO.setCategory(item.getCategory());
assessmentTemplateDataVO.setTemplateRequirements(item.getTemplateRequirements());
assessmentTemplateDataVO.setCheckType(item.getCheckType());
templateDataVOList.add(assessmentTemplateDataVO);
});
assessmentUserTrainingVO.setTemplateDataList(templateDataVOList);

View File

@@ -188,6 +188,7 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
return new ResponseResult(500, initiatingResponse.getMsg(), initiatingResponse.getData());
} else {
String redisKey = "OA:" + request.getMobile() + request.getIdCardNo();
log.info("initiating redisKey:{},request:{}",redisKey,JSONObject.toJSONString(request));
redisUtilPool.setString(redisKey, JSONObject.toJSONString(request));
lineInfoDO.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_75.getCode());
lineInfoMapper.updateByPrimaryKeySelective(lineInfoDO);

View File

@@ -32,10 +32,9 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
@Service
@Slf4j
@@ -259,14 +258,22 @@ public class SysStoreAppServiceImpl implements SysStoreAppService,AuditResultSer
SysStoreAppRequest sysStoreAppRequest,
LineInfoDO lineInfoDO,
PointInfoDO pointInfoDO) {
//用户信息map
List<String> userIdList = new ArrayList<>();
userIdList.add(sysStoreAppRequest.getSupervisorDetail().getSupervisorId());//督导
userIdList.add(sysStoreAppRequest.getFranInfo().getInviteUserId());//邀约人
userIdList.add(pointInfoDO.getDevelopmentManager());//选址人
userIdList.add(lineInfoDO.getInvestmentManager());//招商人
List<EnterpriseUserDO> userInfoByUserIds = enterpriseUserMapper.getUserInfoByUserIds(userIdList);
Map<String, EnterpriseUserDO> userMap = userInfoByUserIds.stream().collect(Collectors.toMap(k -> k.getUserId(), Function.identity()));
NewStoreRequest newStoreRequest = new NewStoreRequest();
ArrayList<String> objects = new ArrayList<>();
objects.add("123");
// accessory_address
newStoreRequest.setAccessory_address(objects);
// apply_user
LoginUserInfo user = CurrentUserHolder.getUser();
//todo 写死
//todo LoginUserInfo user = CurrentUserHolder.getUser();
newStoreRequest.setApply_user("19110026");
// city1
newStoreRequest.setCity1(pointInfoDO.getCity());
@@ -275,8 +282,7 @@ public class SysStoreAppServiceImpl implements SysStoreAppService,AuditResultSer
newStoreRequest.setCsgs(thirdDepartmentDO.getDepartmentCode());
// csqmc
newStoreRequest.setCsqmc(BusinessDistrictEnum.getByCode(sysStoreAppRequest.getStoreDetail().getSubBusinessType()).getDesc());
// ddxm
EnterpriseUserDO ddxm = enterpriseUserMapper.getUserInfoById(sysStoreAppRequest.getSupervisorDetail().getSupervisorId());//督导
//todo ddxm 督导 sysStoreAppRequest.getSupervisorDetail().getSupervisorId()
newStoreRequest.setDdxm("22090043");
// dpzlht
newStoreRequest.setDpzlht(objects);
@@ -285,8 +291,7 @@ public class SysStoreAppServiceImpl implements SysStoreAppService,AuditResultSer
// forecast_turnover
newStoreRequest.setForecast_turnover(sysStoreAppRequest.getStoreDetail().getEstimatedTurnover());
// invite_people
//todo xiesi
EnterpriseUserDO invitePeople = enterpriseUserMapper.getUserInfoById(sysStoreAppRequest.getFranInfo().getInviteUserId());//邀约人
//todo 邀约人 sysStoreAppRequest.getFranInfo().getInviteUserId()
newStoreRequest.setInvite_people("21100037");
// jms_id
newStoreRequest.setJms_id(lineInfoDO.getPartnerNum());
@@ -304,15 +309,11 @@ public class SysStoreAppServiceImpl implements SysStoreAppService,AuditResultSer
newStoreRequest.setLandlord_name(sysStoreAppRequest.getStoreDetail().getLandlordName());
// landlord_tel
newStoreRequest.setLandlord_tel(sysStoreAppRequest.getStoreDetail().getLandlordMobile());
// location_people
EnterpriseUserDO locationPeople = enterpriseUserMapper.getUserInfoById(pointInfoDO.getDevelopmentManager());//门店选址人
//todo 写死
//todo location_people 门店选址人 pointInfoDO.getDevelopmentManager()
newStoreRequest.setLocation_people("21100037");
// mdyzj
newStoreRequest.setMdyzj(sysStoreAppRequest.getStoreDetail().getStoreRent());
// merchant_people
EnterpriseUserDO merchantPeople = enterpriseUserMapper.getUserInfoById(lineInfoDO.getInvestmentManager());//招商人工号
//todo 写死
//todo merchant_people 招商人工号 lineInfoDO.getInvestmentManager()
newStoreRequest.setMerchant_people("22090043");
// name1
newStoreRequest.setName1(sysStoreAppRequest.getStoreDetail().getStoreName());

View File

@@ -105,7 +105,7 @@ public class TrainingExperienceServiceImpl extends LineFlowService implements Tr
@Override
public LeaseBaseInfoDO getTrainingExperience(Long lineId) {
List<String> roleNames = new ArrayList<>();
//todo 写死了,记得改
//todo 写死
roleNames.add("加盟店店长");
roleNames.add("加盟店储备店长");