|
@@ -127,7 +127,8 @@ public class PersonalServiceImpl extends ServiceImpl<PersonalMapper, Personal> i
|
|
|
public WorkNodeCommit add(Personal personal){
|
|
|
personal.setOrderId(businessNumberService.takeOrderNumber());
|
|
|
//确定内业人员
|
|
|
- personal.setInwardStaff(nextInwardStaff());
|
|
|
+ //下单时暂不确定内业人员,客户经理报价反馈后再确定。否则会有内业轮空。
|
|
|
+ //personal.setInwardStaff(nextInwardStaff());
|
|
|
//确定定价内业人员
|
|
|
personal.setPricingStaff(aimPriceStaff());
|
|
|
this.save(personal);
|
|
@@ -273,7 +274,7 @@ public class PersonalServiceImpl extends ServiceImpl<PersonalMapper, Personal> i
|
|
|
* 确定内业人员
|
|
|
* @return
|
|
|
*/
|
|
|
- private synchronized Long nextInwardStaff(){
|
|
|
+ public synchronized Long nextInwardStaff(){
|
|
|
GlobalConfig inwardStaffRoll = globalConfigService.getGlobalConfig(GlobalConfigEnum.DEPARTMENT_TURNS.getCode(), GlobalConfigEnum.DepartmentTurns.INWARD_STAFF_ROLL.getCode());
|
|
|
List<User> users = userService.simplePostName(PERSONAL_INWARD);
|
|
|
if (CollectionUtil.isEmpty(users)){
|
|
@@ -296,6 +297,16 @@ public class PersonalServiceImpl extends ServiceImpl<PersonalMapper, Personal> i
|
|
|
return nextStaffId;
|
|
|
}
|
|
|
|
|
|
+ @Transactional
|
|
|
+ @Override
|
|
|
+ public void fixationInwardStaff(Long personalId) {
|
|
|
+ Personal per = this.getOne(new LambdaQueryWrapper<Personal>().select(Personal::getId,Personal::getInwardStaff).eq(BaseEntity::getId, personalId).eq(BaseEntity::getDeleted, Boolean.FALSE));
|
|
|
+ if (per.getInwardStaff() == null){
|
|
|
+ Long nextStaffId = this.nextInwardStaff();
|
|
|
+ this.update(new LambdaUpdateWrapper<Personal>().set(Personal::getInwardStaff,nextStaffId).eq(BaseEntity::getId,personalId));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 确定定价内业
|
|
|
* @return
|