切换公司
parent
2f8281179a
commit
e3b0bcd304
|
|
@ -108,4 +108,17 @@ public class BizDriverController {
|
||||||
bizDriverService.cancel(id);
|
bizDriverService.cancel(id);
|
||||||
return R.success();
|
return R.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 切换公司
|
||||||
|
*
|
||||||
|
* @param companyId Id
|
||||||
|
*/
|
||||||
|
@GetMapping("/change_company")
|
||||||
|
public R<?> changeCompany(@RequestParam Long id,
|
||||||
|
@RequestParam Long companyId
|
||||||
|
) {
|
||||||
|
bizDriverService.changeCompany(id, companyId);
|
||||||
|
return R.success();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -115,4 +115,17 @@ public class BizTruckController {
|
||||||
bizTruckService.cancel(id);
|
bizTruckService.cancel(id);
|
||||||
return R.success();
|
return R.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 切换公司
|
||||||
|
*
|
||||||
|
* @param companyId Id
|
||||||
|
*/
|
||||||
|
@GetMapping("/change_company")
|
||||||
|
public R<?> changeCompany(@RequestParam Long id,
|
||||||
|
@RequestParam Long companyId
|
||||||
|
) {
|
||||||
|
bizTruckService.changeCompany(id, companyId);
|
||||||
|
return R.success();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -223,4 +223,11 @@ public class BizDriverService extends ServiceImpl<BizDriverMapper, BizDriverEnti
|
||||||
.eq(BizDriverEntity::getId, id)
|
.eq(BizDriverEntity::getId, id)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void changeCompany(Long id, Long companyId) {
|
||||||
|
this.updateById(new BizDriverEntity()
|
||||||
|
.setId(id)
|
||||||
|
.setCompanyId(companyId)
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,6 @@ import com.njzscloud.supervisory.sys.dict.pojo.DictItemEntity;
|
||||||
import com.njzscloud.supervisory.sys.dict.service.DictItemService;
|
import com.njzscloud.supervisory.sys.dict.service.DictItemService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
|
@ -46,8 +45,7 @@ import java.util.stream.Collectors;
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class BizTruckService extends ServiceImpl<BizTruckMapper, BizTruckEntity> implements IService<BizTruckEntity> {
|
public class BizTruckService extends ServiceImpl<BizTruckMapper, BizTruckEntity> implements IService<BizTruckEntity> {
|
||||||
private final DeviceLocalizerService deviceLocalizerService;
|
private final DeviceLocalizerService deviceLocalizerService;
|
||||||
@Autowired
|
private final DictItemService dictItemService;
|
||||||
private DictItemService dictItemService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增
|
* 新增
|
||||||
|
|
@ -75,7 +73,7 @@ public class BizTruckService extends ServiceImpl<BizTruckMapper, BizTruckEntity>
|
||||||
/**
|
/**
|
||||||
* 修改
|
* 修改
|
||||||
*
|
*
|
||||||
* @param bizTruckEntity 数据
|
* @param modifyBizTruckParam 数据
|
||||||
*/
|
*/
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void modify(ModifyBizTruckParam modifyBizTruckParam) {
|
public void modify(ModifyBizTruckParam modifyBizTruckParam) {
|
||||||
|
|
@ -231,4 +229,11 @@ public class BizTruckService extends ServiceImpl<BizTruckMapper, BizTruckEntity>
|
||||||
.eq(BizTruckEntity::getId, id)
|
.eq(BizTruckEntity::getId, id)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void changeCompany(Long id, Long companyId) {
|
||||||
|
this.updateById(new BizTruckEntity()
|
||||||
|
.setId(id)
|
||||||
|
.setCompanyId(companyId)
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue